From a7b9aeb9c18df07402646075a53254885520a0a0 Mon Sep 17 00:00:00 2001 From: Rob <1572423+robweber@users.noreply.github.com> Date: Mon, 30 Sep 2019 13:55:40 -0500 Subject: [PATCH] Replace Dropbox files with Kodi Module (#152) * remove dropbox lib locally and use script.module.dropbox closes #151 --- addon.xml | 2 +- resources/lib/.gitignore | 2 - resources/lib/dropbox/__init__.py | 4 - resources/lib/dropbox/async.py | 310 - resources/lib/dropbox/auth.py | 723 - resources/lib/dropbox/base.py | 4051 -- resources/lib/dropbox/base_team.py | 1564 - resources/lib/dropbox/common.py | 323 - resources/lib/dropbox/dropbox.py | 515 - resources/lib/dropbox/exceptions.py | 89 - resources/lib/dropbox/file_properties.py | 2959 -- resources/lib/dropbox/file_requests.py | 1434 - resources/lib/dropbox/files.py | 10781 ----- resources/lib/dropbox/oauth.py | 515 - resources/lib/dropbox/paper.py | 4370 -- resources/lib/dropbox/pkg_resources.py | 4 - resources/lib/dropbox/properties.py | 835 - resources/lib/dropbox/session.py | 51 - resources/lib/dropbox/sharing.py | 18225 -------- resources/lib/dropbox/stone_base.py | 75 - resources/lib/dropbox/stone_serializers.py | 1011 - resources/lib/dropbox/stone_validators.py | 592 - resources/lib/dropbox/team.py | 17082 -------- resources/lib/dropbox/team_common.py | 468 - resources/lib/dropbox/team_log.py | 41817 ------------------- resources/lib/dropbox/team_policies.py | 1040 - resources/lib/dropbox/trusted-certs.crt | 1396 - resources/lib/dropbox/users.py | 1710 - resources/lib/dropbox/users_common.py | 84 - 29 files changed, 1 insertion(+), 112031 deletions(-) delete mode 100644 resources/lib/.gitignore delete mode 100644 resources/lib/dropbox/__init__.py delete mode 100644 resources/lib/dropbox/async.py delete mode 100644 resources/lib/dropbox/auth.py delete mode 100644 resources/lib/dropbox/base.py delete mode 100644 resources/lib/dropbox/base_team.py delete mode 100644 resources/lib/dropbox/common.py delete mode 100644 resources/lib/dropbox/dropbox.py delete mode 100644 resources/lib/dropbox/exceptions.py delete mode 100644 resources/lib/dropbox/file_properties.py delete mode 100644 resources/lib/dropbox/file_requests.py delete mode 100644 resources/lib/dropbox/files.py delete mode 100644 resources/lib/dropbox/oauth.py delete mode 100644 resources/lib/dropbox/paper.py delete mode 100644 resources/lib/dropbox/pkg_resources.py delete mode 100644 resources/lib/dropbox/properties.py delete mode 100644 resources/lib/dropbox/session.py delete mode 100644 resources/lib/dropbox/sharing.py delete mode 100644 resources/lib/dropbox/stone_base.py delete mode 100644 resources/lib/dropbox/stone_serializers.py delete mode 100644 resources/lib/dropbox/stone_validators.py delete mode 100644 resources/lib/dropbox/team.py delete mode 100644 resources/lib/dropbox/team_common.py delete mode 100644 resources/lib/dropbox/team_log.py delete mode 100644 resources/lib/dropbox/team_policies.py delete mode 100644 resources/lib/dropbox/trusted-certs.crt delete mode 100644 resources/lib/dropbox/users.py delete mode 100644 resources/lib/dropbox/users_common.py diff --git a/addon.xml b/addon.xml index 0106429..230b61a 100644 --- a/addon.xml +++ b/addon.xml @@ -9,7 +9,7 @@ - + executable diff --git a/resources/lib/.gitignore b/resources/lib/.gitignore deleted file mode 100644 index 696f993..0000000 --- a/resources/lib/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ - -*.pyo \ No newline at end of file diff --git a/resources/lib/dropbox/__init__.py b/resources/lib/dropbox/__init__.py deleted file mode 100644 index c830bc3..0000000 --- a/resources/lib/dropbox/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from __future__ import absolute_import - -from .dropbox import __version__, Dropbox, DropboxTeam, create_session # noqa: F401 -from .oauth import DropboxOAuth2Flow, DropboxOAuth2FlowNoRedirect # noqa: F401 diff --git a/resources/lib/dropbox/async.py b/resources/lib/dropbox/async.py deleted file mode 100644 index 453d9e9..0000000 --- a/resources/lib/dropbox/async.py +++ /dev/null @@ -1,310 +0,0 @@ -# -*- coding: utf-8 -*- -# Auto-generated by Stone, do not modify. -# flake8: noqa -# pylint: skip-file -try: - from . import stone_validators as bv - from . import stone_base as bb -except (SystemError, ValueError): - # Catch errors raised when importing a relative module when not in a package. - # This makes testing this file directly (outside of a package) easier. - import stone_validators as bv - import stone_base as bb - -class LaunchResultBase(bb.Union): - """ - Result returned by methods that launch an asynchronous job. A method who may - either launch an asynchronous job, or complete the request synchronously, - can use this union by extending it, and adding a 'complete' field with the - type of the synchronous response. See :class:`LaunchEmptyResult` for an - example. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar str async_job_id: This response indicates that the processing is - asynchronous. The string is an id that can be used to obtain the status - of the asynchronous job. - """ - - _catch_all = None - - @classmethod - def async_job_id(cls, val): - """ - Create an instance of this class set to the ``async_job_id`` tag with - value ``val``. - - :param str val: - :rtype: LaunchResultBase - """ - return cls('async_job_id', val) - - def is_async_job_id(self): - """ - Check if the union tag is ``async_job_id``. - - :rtype: bool - """ - return self._tag == 'async_job_id' - - def get_async_job_id(self): - """ - This response indicates that the processing is asynchronous. The string - is an id that can be used to obtain the status of the asynchronous job. - - Only call this if :meth:`is_async_job_id` is true. - - :rtype: str - """ - if not self.is_async_job_id(): - raise AttributeError("tag 'async_job_id' not set") - return self._value - - def __repr__(self): - return 'LaunchResultBase(%r, %r)' % (self._tag, self._value) - -LaunchResultBase_validator = bv.Union(LaunchResultBase) - -class LaunchEmptyResult(LaunchResultBase): - """ - Result returned by methods that may either launch an asynchronous job or - complete synchronously. Upon synchronous completion of the job, no - additional information is returned. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar complete: The job finished synchronously and successfully. - """ - - # Attribute is overwritten below the class definition - complete = None - - def is_complete(self): - """ - Check if the union tag is ``complete``. - - :rtype: bool - """ - return self._tag == 'complete' - - def __repr__(self): - return 'LaunchEmptyResult(%r, %r)' % (self._tag, self._value) - -LaunchEmptyResult_validator = bv.Union(LaunchEmptyResult) - -class PollArg(object): - """ - Arguments for methods that poll the status of an asynchronous job. - - :ivar async_job_id: Id of the asynchronous job. This is the value of a - response returned from the method that launched the job. - """ - - __slots__ = [ - '_async_job_id_value', - '_async_job_id_present', - ] - - _has_required_fields = True - - def __init__(self, - async_job_id=None): - self._async_job_id_value = None - self._async_job_id_present = False - if async_job_id is not None: - self.async_job_id = async_job_id - - @property - def async_job_id(self): - """ - Id of the asynchronous job. This is the value of a response returned - from the method that launched the job. - - :rtype: str - """ - if self._async_job_id_present: - return self._async_job_id_value - else: - raise AttributeError("missing required field 'async_job_id'") - - @async_job_id.setter - def async_job_id(self, val): - val = self._async_job_id_validator.validate(val) - self._async_job_id_value = val - self._async_job_id_present = True - - @async_job_id.deleter - def async_job_id(self): - self._async_job_id_value = None - self._async_job_id_present = False - - def __repr__(self): - return 'PollArg(async_job_id={!r})'.format( - self._async_job_id_value, - ) - -PollArg_validator = bv.Struct(PollArg) - -class PollResultBase(bb.Union): - """ - Result returned by methods that poll for the status of an asynchronous job. - Unions that extend this union should add a 'complete' field with a type of - the information returned upon job completion. See :class:`PollEmptyResult` - for an example. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar in_progress: The asynchronous job is still in progress. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - in_progress = None - - def is_in_progress(self): - """ - Check if the union tag is ``in_progress``. - - :rtype: bool - """ - return self._tag == 'in_progress' - - def __repr__(self): - return 'PollResultBase(%r, %r)' % (self._tag, self._value) - -PollResultBase_validator = bv.Union(PollResultBase) - -class PollEmptyResult(PollResultBase): - """ - Result returned by methods that poll for the status of an asynchronous job. - Upon completion of the job, no additional information is returned. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar complete: The asynchronous job has completed successfully. - """ - - # Attribute is overwritten below the class definition - complete = None - - def is_complete(self): - """ - Check if the union tag is ``complete``. - - :rtype: bool - """ - return self._tag == 'complete' - - def __repr__(self): - return 'PollEmptyResult(%r, %r)' % (self._tag, self._value) - -PollEmptyResult_validator = bv.Union(PollEmptyResult) - -class PollError(bb.Union): - """ - Error returned by methods for polling the status of asynchronous job. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar invalid_async_job_id: The job ID is invalid. - :ivar internal_error: Something went wrong with the job on Dropbox's end. - You'll need to verify that the action you were taking succeeded, and if - not, try again. This should happen very rarely. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - invalid_async_job_id = None - # Attribute is overwritten below the class definition - internal_error = None - # Attribute is overwritten below the class definition - other = None - - def is_invalid_async_job_id(self): - """ - Check if the union tag is ``invalid_async_job_id``. - - :rtype: bool - """ - return self._tag == 'invalid_async_job_id' - - def is_internal_error(self): - """ - Check if the union tag is ``internal_error``. - - :rtype: bool - """ - return self._tag == 'internal_error' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'PollError(%r, %r)' % (self._tag, self._value) - -PollError_validator = bv.Union(PollError) - -AsyncJobId_validator = bv.String(min_length=1) -LaunchResultBase._async_job_id_validator = AsyncJobId_validator -LaunchResultBase._tagmap = { - 'async_job_id': LaunchResultBase._async_job_id_validator, -} - -LaunchEmptyResult._complete_validator = bv.Void() -LaunchEmptyResult._tagmap = { - 'complete': LaunchEmptyResult._complete_validator, -} -LaunchEmptyResult._tagmap.update(LaunchResultBase._tagmap) - -LaunchEmptyResult.complete = LaunchEmptyResult('complete') - -PollArg._async_job_id_validator = AsyncJobId_validator -PollArg._all_field_names_ = set(['async_job_id']) -PollArg._all_fields_ = [('async_job_id', PollArg._async_job_id_validator)] - -PollResultBase._in_progress_validator = bv.Void() -PollResultBase._tagmap = { - 'in_progress': PollResultBase._in_progress_validator, -} - -PollResultBase.in_progress = PollResultBase('in_progress') - -PollEmptyResult._complete_validator = bv.Void() -PollEmptyResult._tagmap = { - 'complete': PollEmptyResult._complete_validator, -} -PollEmptyResult._tagmap.update(PollResultBase._tagmap) - -PollEmptyResult.complete = PollEmptyResult('complete') - -PollError._invalid_async_job_id_validator = bv.Void() -PollError._internal_error_validator = bv.Void() -PollError._other_validator = bv.Void() -PollError._tagmap = { - 'invalid_async_job_id': PollError._invalid_async_job_id_validator, - 'internal_error': PollError._internal_error_validator, - 'other': PollError._other_validator, -} - -PollError.invalid_async_job_id = PollError('invalid_async_job_id') -PollError.internal_error = PollError('internal_error') -PollError.other = PollError('other') - -ROUTES = { -} - diff --git a/resources/lib/dropbox/auth.py b/resources/lib/dropbox/auth.py deleted file mode 100644 index 2dd5ef0..0000000 --- a/resources/lib/dropbox/auth.py +++ /dev/null @@ -1,723 +0,0 @@ -# -*- coding: utf-8 -*- -# Auto-generated by Stone, do not modify. -# flake8: noqa -# pylint: skip-file -try: - from . import stone_validators as bv - from . import stone_base as bb -except (SystemError, ValueError): - # Catch errors raised when importing a relative module when not in a package. - # This makes testing this file directly (outside of a package) easier. - import stone_validators as bv - import stone_base as bb - -class AccessError(bb.Union): - """ - Error occurred because the account doesn't have permission to access the - resource. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar InvalidAccountTypeError invalid_account_type: Current account type - cannot access the resource. - :ivar PaperAccessError paper_access_denied: Current account cannot access - Paper. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def invalid_account_type(cls, val): - """ - Create an instance of this class set to the ``invalid_account_type`` tag - with value ``val``. - - :param InvalidAccountTypeError val: - :rtype: AccessError - """ - return cls('invalid_account_type', val) - - @classmethod - def paper_access_denied(cls, val): - """ - Create an instance of this class set to the ``paper_access_denied`` tag - with value ``val``. - - :param PaperAccessError val: - :rtype: AccessError - """ - return cls('paper_access_denied', val) - - def is_invalid_account_type(self): - """ - Check if the union tag is ``invalid_account_type``. - - :rtype: bool - """ - return self._tag == 'invalid_account_type' - - def is_paper_access_denied(self): - """ - Check if the union tag is ``paper_access_denied``. - - :rtype: bool - """ - return self._tag == 'paper_access_denied' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_invalid_account_type(self): - """ - Current account type cannot access the resource. - - Only call this if :meth:`is_invalid_account_type` is true. - - :rtype: InvalidAccountTypeError - """ - if not self.is_invalid_account_type(): - raise AttributeError("tag 'invalid_account_type' not set") - return self._value - - def get_paper_access_denied(self): - """ - Current account cannot access Paper. - - Only call this if :meth:`is_paper_access_denied` is true. - - :rtype: PaperAccessError - """ - if not self.is_paper_access_denied(): - raise AttributeError("tag 'paper_access_denied' not set") - return self._value - - def __repr__(self): - return 'AccessError(%r, %r)' % (self._tag, self._value) - -AccessError_validator = bv.Union(AccessError) - -class AuthError(bb.Union): - """ - Errors occurred during authentication. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar invalid_access_token: The access token is invalid. - :ivar invalid_select_user: The user specified in 'Dropbox-API-Select-User' - is no longer on the team. - :ivar invalid_select_admin: The user specified in 'Dropbox-API-Select-Admin' - is not a Dropbox Business team admin. - :ivar user_suspended: The user has been suspended. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - invalid_access_token = None - # Attribute is overwritten below the class definition - invalid_select_user = None - # Attribute is overwritten below the class definition - invalid_select_admin = None - # Attribute is overwritten below the class definition - user_suspended = None - # Attribute is overwritten below the class definition - other = None - - def is_invalid_access_token(self): - """ - Check if the union tag is ``invalid_access_token``. - - :rtype: bool - """ - return self._tag == 'invalid_access_token' - - def is_invalid_select_user(self): - """ - Check if the union tag is ``invalid_select_user``. - - :rtype: bool - """ - return self._tag == 'invalid_select_user' - - def is_invalid_select_admin(self): - """ - Check if the union tag is ``invalid_select_admin``. - - :rtype: bool - """ - return self._tag == 'invalid_select_admin' - - def is_user_suspended(self): - """ - Check if the union tag is ``user_suspended``. - - :rtype: bool - """ - return self._tag == 'user_suspended' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'AuthError(%r, %r)' % (self._tag, self._value) - -AuthError_validator = bv.Union(AuthError) - -class InvalidAccountTypeError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar endpoint: Current account type doesn't have permission to access this - route endpoint. - :ivar feature: Current account type doesn't have permission to access this - feature. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - endpoint = None - # Attribute is overwritten below the class definition - feature = None - # Attribute is overwritten below the class definition - other = None - - def is_endpoint(self): - """ - Check if the union tag is ``endpoint``. - - :rtype: bool - """ - return self._tag == 'endpoint' - - def is_feature(self): - """ - Check if the union tag is ``feature``. - - :rtype: bool - """ - return self._tag == 'feature' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'InvalidAccountTypeError(%r, %r)' % (self._tag, self._value) - -InvalidAccountTypeError_validator = bv.Union(InvalidAccountTypeError) - -class PaperAccessError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar paper_disabled: Paper is disabled. - :ivar not_paper_user: The provided user has not used Paper yet. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - paper_disabled = None - # Attribute is overwritten below the class definition - not_paper_user = None - # Attribute is overwritten below the class definition - other = None - - def is_paper_disabled(self): - """ - Check if the union tag is ``paper_disabled``. - - :rtype: bool - """ - return self._tag == 'paper_disabled' - - def is_not_paper_user(self): - """ - Check if the union tag is ``not_paper_user``. - - :rtype: bool - """ - return self._tag == 'not_paper_user' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'PaperAccessError(%r, %r)' % (self._tag, self._value) - -PaperAccessError_validator = bv.Union(PaperAccessError) - -class RateLimitError(object): - """ - Error occurred because the app is being rate limited. - - :ivar reason: The reason why the app is being rate limited. - :ivar retry_after: The number of seconds that the app should wait before - making another request. - """ - - __slots__ = [ - '_reason_value', - '_reason_present', - '_retry_after_value', - '_retry_after_present', - ] - - _has_required_fields = True - - def __init__(self, - reason=None, - retry_after=None): - self._reason_value = None - self._reason_present = False - self._retry_after_value = None - self._retry_after_present = False - if reason is not None: - self.reason = reason - if retry_after is not None: - self.retry_after = retry_after - - @property - def reason(self): - """ - The reason why the app is being rate limited. - - :rtype: RateLimitReason - """ - if self._reason_present: - return self._reason_value - else: - raise AttributeError("missing required field 'reason'") - - @reason.setter - def reason(self, val): - self._reason_validator.validate_type_only(val) - self._reason_value = val - self._reason_present = True - - @reason.deleter - def reason(self): - self._reason_value = None - self._reason_present = False - - @property - def retry_after(self): - """ - The number of seconds that the app should wait before making another - request. - - :rtype: long - """ - if self._retry_after_present: - return self._retry_after_value - else: - return 1 - - @retry_after.setter - def retry_after(self, val): - val = self._retry_after_validator.validate(val) - self._retry_after_value = val - self._retry_after_present = True - - @retry_after.deleter - def retry_after(self): - self._retry_after_value = None - self._retry_after_present = False - - def __repr__(self): - return 'RateLimitError(reason={!r}, retry_after={!r})'.format( - self._reason_value, - self._retry_after_value, - ) - -RateLimitError_validator = bv.Struct(RateLimitError) - -class RateLimitReason(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar too_many_requests: You are making too many requests in the past few - minutes. - :ivar too_many_write_operations: There are currently too many write - operations happening in the user's Dropbox. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - too_many_requests = None - # Attribute is overwritten below the class definition - too_many_write_operations = None - # Attribute is overwritten below the class definition - other = None - - def is_too_many_requests(self): - """ - Check if the union tag is ``too_many_requests``. - - :rtype: bool - """ - return self._tag == 'too_many_requests' - - def is_too_many_write_operations(self): - """ - Check if the union tag is ``too_many_write_operations``. - - :rtype: bool - """ - return self._tag == 'too_many_write_operations' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'RateLimitReason(%r, %r)' % (self._tag, self._value) - -RateLimitReason_validator = bv.Union(RateLimitReason) - -class TokenFromOAuth1Arg(object): - """ - :ivar oauth1_token: The supplied OAuth 1.0 access token. - :ivar oauth1_token_secret: The token secret associated with the supplied - access token. - """ - - __slots__ = [ - '_oauth1_token_value', - '_oauth1_token_present', - '_oauth1_token_secret_value', - '_oauth1_token_secret_present', - ] - - _has_required_fields = True - - def __init__(self, - oauth1_token=None, - oauth1_token_secret=None): - self._oauth1_token_value = None - self._oauth1_token_present = False - self._oauth1_token_secret_value = None - self._oauth1_token_secret_present = False - if oauth1_token is not None: - self.oauth1_token = oauth1_token - if oauth1_token_secret is not None: - self.oauth1_token_secret = oauth1_token_secret - - @property - def oauth1_token(self): - """ - The supplied OAuth 1.0 access token. - - :rtype: str - """ - if self._oauth1_token_present: - return self._oauth1_token_value - else: - raise AttributeError("missing required field 'oauth1_token'") - - @oauth1_token.setter - def oauth1_token(self, val): - val = self._oauth1_token_validator.validate(val) - self._oauth1_token_value = val - self._oauth1_token_present = True - - @oauth1_token.deleter - def oauth1_token(self): - self._oauth1_token_value = None - self._oauth1_token_present = False - - @property - def oauth1_token_secret(self): - """ - The token secret associated with the supplied access token. - - :rtype: str - """ - if self._oauth1_token_secret_present: - return self._oauth1_token_secret_value - else: - raise AttributeError("missing required field 'oauth1_token_secret'") - - @oauth1_token_secret.setter - def oauth1_token_secret(self, val): - val = self._oauth1_token_secret_validator.validate(val) - self._oauth1_token_secret_value = val - self._oauth1_token_secret_present = True - - @oauth1_token_secret.deleter - def oauth1_token_secret(self): - self._oauth1_token_secret_value = None - self._oauth1_token_secret_present = False - - def __repr__(self): - return 'TokenFromOAuth1Arg(oauth1_token={!r}, oauth1_token_secret={!r})'.format( - self._oauth1_token_value, - self._oauth1_token_secret_value, - ) - -TokenFromOAuth1Arg_validator = bv.Struct(TokenFromOAuth1Arg) - -class TokenFromOAuth1Error(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar invalid_oauth1_token_info: Part or all of the OAuth 1.0 access token - info is invalid. - :ivar app_id_mismatch: The authorized app does not match the app associated - with the supplied access token. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - invalid_oauth1_token_info = None - # Attribute is overwritten below the class definition - app_id_mismatch = None - # Attribute is overwritten below the class definition - other = None - - def is_invalid_oauth1_token_info(self): - """ - Check if the union tag is ``invalid_oauth1_token_info``. - - :rtype: bool - """ - return self._tag == 'invalid_oauth1_token_info' - - def is_app_id_mismatch(self): - """ - Check if the union tag is ``app_id_mismatch``. - - :rtype: bool - """ - return self._tag == 'app_id_mismatch' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'TokenFromOAuth1Error(%r, %r)' % (self._tag, self._value) - -TokenFromOAuth1Error_validator = bv.Union(TokenFromOAuth1Error) - -class TokenFromOAuth1Result(object): - """ - :ivar oauth2_token: The OAuth 2.0 token generated from the supplied OAuth - 1.0 token. - """ - - __slots__ = [ - '_oauth2_token_value', - '_oauth2_token_present', - ] - - _has_required_fields = True - - def __init__(self, - oauth2_token=None): - self._oauth2_token_value = None - self._oauth2_token_present = False - if oauth2_token is not None: - self.oauth2_token = oauth2_token - - @property - def oauth2_token(self): - """ - The OAuth 2.0 token generated from the supplied OAuth 1.0 token. - - :rtype: str - """ - if self._oauth2_token_present: - return self._oauth2_token_value - else: - raise AttributeError("missing required field 'oauth2_token'") - - @oauth2_token.setter - def oauth2_token(self, val): - val = self._oauth2_token_validator.validate(val) - self._oauth2_token_value = val - self._oauth2_token_present = True - - @oauth2_token.deleter - def oauth2_token(self): - self._oauth2_token_value = None - self._oauth2_token_present = False - - def __repr__(self): - return 'TokenFromOAuth1Result(oauth2_token={!r})'.format( - self._oauth2_token_value, - ) - -TokenFromOAuth1Result_validator = bv.Struct(TokenFromOAuth1Result) - -AccessError._invalid_account_type_validator = InvalidAccountTypeError_validator -AccessError._paper_access_denied_validator = PaperAccessError_validator -AccessError._other_validator = bv.Void() -AccessError._tagmap = { - 'invalid_account_type': AccessError._invalid_account_type_validator, - 'paper_access_denied': AccessError._paper_access_denied_validator, - 'other': AccessError._other_validator, -} - -AccessError.other = AccessError('other') - -AuthError._invalid_access_token_validator = bv.Void() -AuthError._invalid_select_user_validator = bv.Void() -AuthError._invalid_select_admin_validator = bv.Void() -AuthError._user_suspended_validator = bv.Void() -AuthError._other_validator = bv.Void() -AuthError._tagmap = { - 'invalid_access_token': AuthError._invalid_access_token_validator, - 'invalid_select_user': AuthError._invalid_select_user_validator, - 'invalid_select_admin': AuthError._invalid_select_admin_validator, - 'user_suspended': AuthError._user_suspended_validator, - 'other': AuthError._other_validator, -} - -AuthError.invalid_access_token = AuthError('invalid_access_token') -AuthError.invalid_select_user = AuthError('invalid_select_user') -AuthError.invalid_select_admin = AuthError('invalid_select_admin') -AuthError.user_suspended = AuthError('user_suspended') -AuthError.other = AuthError('other') - -InvalidAccountTypeError._endpoint_validator = bv.Void() -InvalidAccountTypeError._feature_validator = bv.Void() -InvalidAccountTypeError._other_validator = bv.Void() -InvalidAccountTypeError._tagmap = { - 'endpoint': InvalidAccountTypeError._endpoint_validator, - 'feature': InvalidAccountTypeError._feature_validator, - 'other': InvalidAccountTypeError._other_validator, -} - -InvalidAccountTypeError.endpoint = InvalidAccountTypeError('endpoint') -InvalidAccountTypeError.feature = InvalidAccountTypeError('feature') -InvalidAccountTypeError.other = InvalidAccountTypeError('other') - -PaperAccessError._paper_disabled_validator = bv.Void() -PaperAccessError._not_paper_user_validator = bv.Void() -PaperAccessError._other_validator = bv.Void() -PaperAccessError._tagmap = { - 'paper_disabled': PaperAccessError._paper_disabled_validator, - 'not_paper_user': PaperAccessError._not_paper_user_validator, - 'other': PaperAccessError._other_validator, -} - -PaperAccessError.paper_disabled = PaperAccessError('paper_disabled') -PaperAccessError.not_paper_user = PaperAccessError('not_paper_user') -PaperAccessError.other = PaperAccessError('other') - -RateLimitError._reason_validator = RateLimitReason_validator -RateLimitError._retry_after_validator = bv.UInt64() -RateLimitError._all_field_names_ = set([ - 'reason', - 'retry_after', -]) -RateLimitError._all_fields_ = [ - ('reason', RateLimitError._reason_validator), - ('retry_after', RateLimitError._retry_after_validator), -] - -RateLimitReason._too_many_requests_validator = bv.Void() -RateLimitReason._too_many_write_operations_validator = bv.Void() -RateLimitReason._other_validator = bv.Void() -RateLimitReason._tagmap = { - 'too_many_requests': RateLimitReason._too_many_requests_validator, - 'too_many_write_operations': RateLimitReason._too_many_write_operations_validator, - 'other': RateLimitReason._other_validator, -} - -RateLimitReason.too_many_requests = RateLimitReason('too_many_requests') -RateLimitReason.too_many_write_operations = RateLimitReason('too_many_write_operations') -RateLimitReason.other = RateLimitReason('other') - -TokenFromOAuth1Arg._oauth1_token_validator = bv.String(min_length=1) -TokenFromOAuth1Arg._oauth1_token_secret_validator = bv.String(min_length=1) -TokenFromOAuth1Arg._all_field_names_ = set([ - 'oauth1_token', - 'oauth1_token_secret', -]) -TokenFromOAuth1Arg._all_fields_ = [ - ('oauth1_token', TokenFromOAuth1Arg._oauth1_token_validator), - ('oauth1_token_secret', TokenFromOAuth1Arg._oauth1_token_secret_validator), -] - -TokenFromOAuth1Error._invalid_oauth1_token_info_validator = bv.Void() -TokenFromOAuth1Error._app_id_mismatch_validator = bv.Void() -TokenFromOAuth1Error._other_validator = bv.Void() -TokenFromOAuth1Error._tagmap = { - 'invalid_oauth1_token_info': TokenFromOAuth1Error._invalid_oauth1_token_info_validator, - 'app_id_mismatch': TokenFromOAuth1Error._app_id_mismatch_validator, - 'other': TokenFromOAuth1Error._other_validator, -} - -TokenFromOAuth1Error.invalid_oauth1_token_info = TokenFromOAuth1Error('invalid_oauth1_token_info') -TokenFromOAuth1Error.app_id_mismatch = TokenFromOAuth1Error('app_id_mismatch') -TokenFromOAuth1Error.other = TokenFromOAuth1Error('other') - -TokenFromOAuth1Result._oauth2_token_validator = bv.String(min_length=1) -TokenFromOAuth1Result._all_field_names_ = set(['oauth2_token']) -TokenFromOAuth1Result._all_fields_ = [('oauth2_token', TokenFromOAuth1Result._oauth2_token_validator)] - -token_from_oauth1 = bb.Route( - 'token/from_oauth1', - False, - TokenFromOAuth1Arg_validator, - TokenFromOAuth1Result_validator, - TokenFromOAuth1Error_validator, - {'host': u'api', - 'style': u'rpc'}, -) -token_revoke = bb.Route( - 'token/revoke', - False, - bv.Void(), - bv.Void(), - bv.Void(), - {'host': u'api', - 'style': u'rpc'}, -) - -ROUTES = { - 'token/from_oauth1': token_from_oauth1, - 'token/revoke': token_revoke, -} - diff --git a/resources/lib/dropbox/base.py b/resources/lib/dropbox/base.py deleted file mode 100644 index 583839c..0000000 --- a/resources/lib/dropbox/base.py +++ /dev/null @@ -1,4051 +0,0 @@ -# -*- coding: utf-8 -*- -# Auto-generated by Stone, do not modify. -# flake8: noqa -# pylint: skip-file - -from abc import ABCMeta, abstractmethod -import warnings - -from . import ( - async, - auth, - common, - file_properties, - file_requests, - files, - paper, - sharing, - team, - team_common, - team_log, - team_policies, - users, - users_common, -) - - -class DropboxBase(object): - __metaclass__ = ABCMeta - - @abstractmethod - def request(self, route, namespace, arg, arg_binary=None): - pass - - # ------------------------------------------ - # Routes in auth namespace - - def auth_token_from_oauth1(self, - oauth1_token, - oauth1_token_secret): - """ - Creates an OAuth 2.0 access token from the supplied OAuth 1.0 access - token. - - :param str oauth1_token: The supplied OAuth 1.0 access token. - :param str oauth1_token_secret: The token secret associated with the - supplied access token. - :rtype: :class:`dropbox.auth.TokenFromOAuth1Result` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.auth.TokenFromOAuth1Error` - """ - arg = auth.TokenFromOAuth1Arg(oauth1_token, - oauth1_token_secret) - r = self.request( - auth.token_from_oauth1, - 'auth', - arg, - None, - ) - return r - - def auth_token_revoke(self): - """ - Disables the access token used to authenticate the call. - - :rtype: None - """ - arg = None - r = self.request( - auth.token_revoke, - 'auth', - arg, - None, - ) - return None - - # ------------------------------------------ - # Routes in file_properties namespace - - def file_properties_properties_add(self, - path, - property_groups): - """ - Add property groups to a Dropbox file. See - :meth:`file_properties_templates_add_for_user` or - :meth:`file_properties_templates_add_for_team` to create new templates. - - :param str path: A unique identifier for the file or folder. - :param list property_groups: The property groups which are to be added - to a Dropbox file. - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.file_properties.AddPropertiesError` - """ - arg = file_properties.AddPropertiesArg(path, - property_groups) - r = self.request( - file_properties.properties_add, - 'file_properties', - arg, - None, - ) - return None - - def file_properties_properties_overwrite(self, - path, - property_groups): - """ - Overwrite property groups associated with a file. This endpoint should - be used instead of :meth:`file_properties_properties_update` when - property groups are being updated via a "snapshot" instead of via a - "delta". In other words, this endpoint will delete all omitted fields - from a property group, whereas :meth:`file_properties_properties_update` - will only delete fields that are explicitly marked for deletion. - - :param str path: A unique identifier for the file or folder. - :param list property_groups: The property groups "snapshot" updates to - force apply. - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.file_properties.InvalidPropertyGroupError` - """ - arg = file_properties.OverwritePropertyGroupArg(path, - property_groups) - r = self.request( - file_properties.properties_overwrite, - 'file_properties', - arg, - None, - ) - return None - - def file_properties_properties_remove(self, - path, - property_template_ids): - """ - Remove the specified property group from the file. To remove specific - property field key value pairs, see - :meth:`file_properties_properties_update`. To update a template, see - :meth:`file_properties_templates_update_for_user` or - :meth:`file_properties_templates_update_for_team`. Templates can't be - removed once created. - - :param str path: A unique identifier for the file or folder. - :param list property_template_ids: A list of identifiers for a template - created by :meth:`file_properties_templates_add_for_user` or - :meth:`file_properties_templates_add_for_team`. - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.file_properties.RemovePropertiesError` - """ - arg = file_properties.RemovePropertiesArg(path, - property_template_ids) - r = self.request( - file_properties.properties_remove, - 'file_properties', - arg, - None, - ) - return None - - def file_properties_properties_search(self, - queries, - template_filter=file_properties.TemplateFilter.filter_none): - """ - Search across property templates for particular property field values. - - :param list queries: Queries to search. - :param template_filter: Filter results to contain only properties - associated with these template IDs. - :type template_filter: :class:`dropbox.file_properties.TemplateFilter` - :rtype: :class:`dropbox.file_properties.PropertiesSearchResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.file_properties.PropertiesSearchError` - """ - arg = file_properties.PropertiesSearchArg(queries, - template_filter) - r = self.request( - file_properties.properties_search, - 'file_properties', - arg, - None, - ) - return r - - def file_properties_properties_update(self, - path, - update_property_groups): - """ - Add, update or remove properties associated with the supplied file and - templates. This endpoint should be used instead of - :meth:`file_properties_properties_overwrite` when property groups are - being updated via a "delta" instead of via a "snapshot" . In other - words, this endpoint will not delete any omitted fields from a property - group, whereas :meth:`file_properties_properties_overwrite` will delete - any fields that are omitted from a property group. - - :param str path: A unique identifier for the file or folder. - :param list update_property_groups: The property groups "delta" updates - to apply. - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.file_properties.UpdatePropertiesError` - """ - arg = file_properties.UpdatePropertiesArg(path, - update_property_groups) - r = self.request( - file_properties.properties_update, - 'file_properties', - arg, - None, - ) - return None - - def file_properties_templates_add_for_team(self, - name, - description, - fields): - """ - Add a template associated with a team. See - :meth:`file_properties_properties_add` to add properties to a file or - folder. - - :rtype: :class:`dropbox.file_properties.AddTemplateResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.file_properties.ModifyTemplateError` - """ - arg = file_properties.AddTemplateArg(name, - description, - fields) - r = self.request( - file_properties.templates_add_for_team, - 'file_properties', - arg, - None, - ) - return r - - def file_properties_templates_add_for_user(self, - name, - description, - fields): - """ - Add a template associated with a user. See - :meth:`file_properties_properties_add` to add properties to a file. This - endpoint can't be called on a team member or admin's behalf. - - :rtype: :class:`dropbox.file_properties.AddTemplateResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.file_properties.ModifyTemplateError` - """ - arg = file_properties.AddTemplateArg(name, - description, - fields) - r = self.request( - file_properties.templates_add_for_user, - 'file_properties', - arg, - None, - ) - return r - - def file_properties_templates_get_for_team(self, - template_id): - """ - Get the schema for a specified template. - - :param str template_id: An identifier for template added by route See - :meth:`file_properties_templates_add_for_user` or - :meth:`file_properties_templates_add_for_team`. - :rtype: :class:`dropbox.file_properties.GetTemplateResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.file_properties.TemplateError` - """ - arg = file_properties.GetTemplateArg(template_id) - r = self.request( - file_properties.templates_get_for_team, - 'file_properties', - arg, - None, - ) - return r - - def file_properties_templates_get_for_user(self, - template_id): - """ - Get the schema for a specified template. This endpoint can't be called - on a team member or admin's behalf. - - :param str template_id: An identifier for template added by route See - :meth:`file_properties_templates_add_for_user` or - :meth:`file_properties_templates_add_for_team`. - :rtype: :class:`dropbox.file_properties.GetTemplateResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.file_properties.TemplateError` - """ - arg = file_properties.GetTemplateArg(template_id) - r = self.request( - file_properties.templates_get_for_user, - 'file_properties', - arg, - None, - ) - return r - - def file_properties_templates_list_for_team(self): - """ - Get the template identifiers for a team. To get the schema of each - template use :meth:`file_properties_templates_get_for_team`. - - :rtype: :class:`dropbox.file_properties.ListTemplateResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.file_properties.TemplateError` - """ - arg = None - r = self.request( - file_properties.templates_list_for_team, - 'file_properties', - arg, - None, - ) - return r - - def file_properties_templates_list_for_user(self): - """ - Get the template identifiers for a team. To get the schema of each - template use :meth:`file_properties_templates_get_for_user`. This - endpoint can't be called on a team member or admin's behalf. - - :rtype: :class:`dropbox.file_properties.ListTemplateResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.file_properties.TemplateError` - """ - arg = None - r = self.request( - file_properties.templates_list_for_user, - 'file_properties', - arg, - None, - ) - return r - - def file_properties_templates_update_for_team(self, - template_id, - name=None, - description=None, - add_fields=None): - """ - Update a template associated with a team. This route can update the - template name, the template description and add optional properties to - templates. - - :param str template_id: An identifier for template added by See - :meth:`file_properties_templates_add_for_user` or - :meth:`file_properties_templates_add_for_team`. - :param Nullable name: A display name for the template. template names - can be up to 256 bytes. - :param Nullable description: Description for the new template. Template - descriptions can be up to 1024 bytes. - :param Nullable add_fields: Property field templates to be added to the - group template. There can be up to 32 properties in a single - template. - :rtype: :class:`dropbox.file_properties.UpdateTemplateResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.file_properties.ModifyTemplateError` - """ - arg = file_properties.UpdateTemplateArg(template_id, - name, - description, - add_fields) - r = self.request( - file_properties.templates_update_for_team, - 'file_properties', - arg, - None, - ) - return r - - def file_properties_templates_update_for_user(self, - template_id, - name=None, - description=None, - add_fields=None): - """ - Update a template associated with a user. This route can update the - template name, the template description and add optional properties to - templates. This endpoint can't be called on a team member or admin's - behalf. - - :param str template_id: An identifier for template added by See - :meth:`file_properties_templates_add_for_user` or - :meth:`file_properties_templates_add_for_team`. - :param Nullable name: A display name for the template. template names - can be up to 256 bytes. - :param Nullable description: Description for the new template. Template - descriptions can be up to 1024 bytes. - :param Nullable add_fields: Property field templates to be added to the - group template. There can be up to 32 properties in a single - template. - :rtype: :class:`dropbox.file_properties.UpdateTemplateResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.file_properties.ModifyTemplateError` - """ - arg = file_properties.UpdateTemplateArg(template_id, - name, - description, - add_fields) - r = self.request( - file_properties.templates_update_for_user, - 'file_properties', - arg, - None, - ) - return r - - # ------------------------------------------ - # Routes in file_requests namespace - - def file_requests_create(self, - title, - destination, - deadline=None, - open=True): - """ - Creates a file request for this user. - - :param str title: The title of the file request. Must not be empty. - :param str destination: The path of the folder in the Dropbox where - uploaded files will be sent. For apps with the app folder - permission, this will be relative to the app folder. - :param Nullable deadline: The deadline for the file request. Deadlines - can only be set by Pro and Business accounts. - :param bool open: Whether or not the file request should be open. If the - file request is closed, it will not accept any file submissions, but - it can be opened later. - :rtype: :class:`dropbox.file_requests.FileRequest` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.file_requests.CreateFileRequestError` - """ - arg = file_requests.CreateFileRequestArgs(title, - destination, - deadline, - open) - r = self.request( - file_requests.create, - 'file_requests', - arg, - None, - ) - return r - - def file_requests_get(self, - id): - """ - Returns the specified file request. - - :param str id: The ID of the file request to retrieve. - :rtype: :class:`dropbox.file_requests.FileRequest` - """ - arg = file_requests.GetFileRequestArgs(id) - r = self.request( - file_requests.get, - 'file_requests', - arg, - None, - ) - return r - - def file_requests_list(self): - """ - Returns a list of file requests owned by this user. For apps with the - app folder permission, this will only return file requests with - destinations in the app folder. - - :rtype: :class:`dropbox.file_requests.ListFileRequestsResult` - """ - arg = None - r = self.request( - file_requests.list, - 'file_requests', - arg, - None, - ) - return r - - def file_requests_update(self, - id, - title=None, - destination=None, - deadline=file_requests.UpdateFileRequestDeadline.no_update, - open=None): - """ - Update a file request. - - :param str id: The ID of the file request to update. - :param Nullable title: The new title of the file request. Must not be - empty. - :param Nullable destination: The new path of the folder in the Dropbox - where uploaded files will be sent. For apps with the app folder - permission, this will be relative to the app folder. - :param deadline: The new deadline for the file request. - :type deadline: :class:`dropbox.file_requests.UpdateFileRequestDeadline` - :param Nullable open: Whether to set this file request as open or - closed. - :rtype: :class:`dropbox.file_requests.FileRequest` - """ - arg = file_requests.UpdateFileRequestArgs(id, - title, - destination, - deadline, - open) - r = self.request( - file_requests.update, - 'file_requests', - arg, - None, - ) - return r - - # ------------------------------------------ - # Routes in files namespace - - def files_alpha_get_metadata(self, - path, - include_media_info=False, - include_deleted=False, - include_has_explicit_shared_members=False, - include_property_templates=None): - """ - Returns the metadata for a file or folder. This is an alpha endpoint - compatible with the properties API. Note: Metadata for the root folder - is unsupported. - - :param Nullable include_property_templates: If set to a valid list of - template IDs, ``FileMetadata.property_groups`` is set for files with - custom properties. - :rtype: :class:`dropbox.files.Metadata` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.AlphaGetMetadataError` - """ - arg = files.AlphaGetMetadataArg(path, - include_media_info, - include_deleted, - include_has_explicit_shared_members, - include_property_templates) - r = self.request( - files.alpha_get_metadata, - 'files', - arg, - None, - ) - return r - - def files_alpha_upload(self, - f, - path, - mode=files.WriteMode.add, - autorename=False, - client_modified=None, - mute=False, - property_groups=None): - """ - Create a new file with the contents provided in the request. Note that - this endpoint is part of the properties API alpha and is slightly - different from :meth:`files_upload`. Do not use this to upload a file - larger than 150 MB. Instead, create an upload session with - :meth:`files_upload_session_start`. - - :param bytes f: Contents to upload. - :param Nullable property_groups: List of custom properties to add to - file. - :rtype: :class:`dropbox.files.FileMetadata` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.UploadErrorWithProperties` - """ - arg = files.CommitInfoWithProperties(path, - mode, - autorename, - client_modified, - mute, - property_groups) - r = self.request( - files.alpha_upload, - 'files', - arg, - f, - ) - return r - - def files_copy(self, - from_path, - to_path, - allow_shared_folder=False, - autorename=False, - allow_ownership_transfer=False): - """ - Copy a file or folder to a different location in the user's Dropbox. If - the source path is a folder all its contents will be copied. - - :param bool allow_shared_folder: If true, :meth:`files_copy` will copy - contents in shared folder, otherwise - ``RelocationError.cant_copy_shared_folder`` will be returned if - ``from_path`` contains shared folder. This field is always true for - :meth:`files_move`. - :param bool autorename: If there's a conflict, have the Dropbox server - try to autorename the file to avoid the conflict. - :param bool allow_ownership_transfer: Allow moves by owner even if it - would result in an ownership transfer for the content being moved. - This does not apply to copies. - :rtype: :class:`dropbox.files.Metadata` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.RelocationError` - """ - warnings.warn( - 'copy is deprecated. Use copy_v2.', - DeprecationWarning, - ) - arg = files.RelocationArg(from_path, - to_path, - allow_shared_folder, - autorename, - allow_ownership_transfer) - r = self.request( - files.copy, - 'files', - arg, - None, - ) - return r - - def files_copy_batch(self, - entries, - allow_shared_folder=False, - autorename=False, - allow_ownership_transfer=False): - """ - Copy multiple files or folders to different locations at once in the - user's Dropbox. If ``RelocationBatchArg.allow_shared_folder`` is false, - this route is atomic. If on entry failes, the whole transaction will - abort. If ``RelocationBatchArg.allow_shared_folder`` is true, not - atomicity is guaranteed, but you will be able to copy the contents of - shared folders to new locations. This route will return job ID - immediately and do the async copy job in background. Please use - :meth:`files_copy_batch_check` to check the job status. - - :param list entries: List of entries to be moved or copied. Each entry - is :class:`dropbox.files.RelocationPath`. - :param bool allow_shared_folder: If true, :meth:`files_copy_batch` will - copy contents in shared folder, otherwise - ``RelocationError.cant_copy_shared_folder`` will be returned if - ``RelocationPath.from_path`` contains shared folder. This field is - always true for :meth:`files_move_batch`. - :param bool autorename: If there's a conflict with any file, have the - Dropbox server try to autorename that file to avoid the conflict. - :param bool allow_ownership_transfer: Allow moves by owner even if it - would result in an ownership transfer for the content being moved. - This does not apply to copies. - :rtype: :class:`dropbox.files.RelocationBatchLaunch` - """ - arg = files.RelocationBatchArg(entries, - allow_shared_folder, - autorename, - allow_ownership_transfer) - r = self.request( - files.copy_batch, - 'files', - arg, - None, - ) - return r - - def files_copy_batch_check(self, - async_job_id): - """ - Returns the status of an asynchronous job for :meth:`files_copy_batch`. - If success, it returns list of results for each entry. - - :param str async_job_id: Id of the asynchronous job. This is the value - of a response returned from the method that launched the job. - :rtype: :class:`dropbox.files.RelocationBatchJobStatus` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.PollError` - """ - arg = async.PollArg(async_job_id) - r = self.request( - files.copy_batch_check, - 'files', - arg, - None, - ) - return r - - def files_copy_reference_get(self, - path): - """ - Get a copy reference to a file or folder. This reference string can be - used to save that file or folder to another user's Dropbox by passing it - to :meth:`files_copy_reference_save`. - - :param str path: The path to the file or folder you want to get a copy - reference to. - :rtype: :class:`dropbox.files.GetCopyReferenceResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.GetCopyReferenceError` - """ - arg = files.GetCopyReferenceArg(path) - r = self.request( - files.copy_reference_get, - 'files', - arg, - None, - ) - return r - - def files_copy_reference_save(self, - copy_reference, - path): - """ - Save a copy reference returned by :meth:`files_copy_reference_get` to - the user's Dropbox. - - :param str copy_reference: A copy reference returned by - :meth:`files_copy_reference_get`. - :param str path: Path in the user's Dropbox that is the destination. - :rtype: :class:`dropbox.files.SaveCopyReferenceResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.SaveCopyReferenceError` - """ - arg = files.SaveCopyReferenceArg(copy_reference, - path) - r = self.request( - files.copy_reference_save, - 'files', - arg, - None, - ) - return r - - def files_copy_v2(self, - from_path, - to_path, - allow_shared_folder=False, - autorename=False, - allow_ownership_transfer=False): - """ - Copy a file or folder to a different location in the user's Dropbox. If - the source path is a folder all its contents will be copied. - - :param bool allow_shared_folder: If true, :meth:`files_copy` will copy - contents in shared folder, otherwise - ``RelocationError.cant_copy_shared_folder`` will be returned if - ``from_path`` contains shared folder. This field is always true for - :meth:`files_move`. - :param bool autorename: If there's a conflict, have the Dropbox server - try to autorename the file to avoid the conflict. - :param bool allow_ownership_transfer: Allow moves by owner even if it - would result in an ownership transfer for the content being moved. - This does not apply to copies. - :rtype: :class:`dropbox.files.RelocationResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.RelocationError` - """ - arg = files.RelocationArg(from_path, - to_path, - allow_shared_folder, - autorename, - allow_ownership_transfer) - r = self.request( - files.copy_v2, - 'files', - arg, - None, - ) - return r - - def files_create_folder(self, - path, - autorename=False): - """ - Create a folder at a given path. - - :param str path: Path in the user's Dropbox to create. - :param bool autorename: If there's a conflict, have the Dropbox server - try to autorename the folder to avoid the conflict. - :rtype: :class:`dropbox.files.FolderMetadata` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.CreateFolderError` - """ - warnings.warn( - 'create_folder is deprecated. Use create_folder_v2.', - DeprecationWarning, - ) - arg = files.CreateFolderArg(path, - autorename) - r = self.request( - files.create_folder, - 'files', - arg, - None, - ) - return r - - def files_create_folder_v2(self, - path, - autorename=False): - """ - Create a folder at a given path. - - :param str path: Path in the user's Dropbox to create. - :param bool autorename: If there's a conflict, have the Dropbox server - try to autorename the folder to avoid the conflict. - :rtype: :class:`dropbox.files.CreateFolderResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.CreateFolderError` - """ - arg = files.CreateFolderArg(path, - autorename) - r = self.request( - files.create_folder_v2, - 'files', - arg, - None, - ) - return r - - def files_delete(self, - path): - """ - Delete the file or folder at a given path. If the path is a folder, all - its contents will be deleted too. A successful response indicates that - the file or folder was deleted. The returned metadata will be the - corresponding :class:`dropbox.files.FileMetadata` or - :class:`dropbox.files.FolderMetadata` for the item at time of deletion, - and not a :class:`dropbox.files.DeletedMetadata` object. - - :param str path: Path in the user's Dropbox to delete. - :rtype: :class:`dropbox.files.Metadata` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.DeleteError` - """ - warnings.warn( - 'delete is deprecated. Use delete_v2.', - DeprecationWarning, - ) - arg = files.DeleteArg(path) - r = self.request( - files.delete, - 'files', - arg, - None, - ) - return r - - def files_delete_batch(self, - entries): - """ - Delete multiple files/folders at once. This route is asynchronous, which - returns a job ID immediately and runs the delete batch asynchronously. - Use :meth:`files_delete_batch_check` to check the job status. - - :type entries: list - :rtype: :class:`dropbox.files.DeleteBatchLaunch` - """ - arg = files.DeleteBatchArg(entries) - r = self.request( - files.delete_batch, - 'files', - arg, - None, - ) - return r - - def files_delete_batch_check(self, - async_job_id): - """ - Returns the status of an asynchronous job for - :meth:`files_delete_batch`. If success, it returns list of result for - each entry. - - :param str async_job_id: Id of the asynchronous job. This is the value - of a response returned from the method that launched the job. - :rtype: :class:`dropbox.files.DeleteBatchJobStatus` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.PollError` - """ - arg = async.PollArg(async_job_id) - r = self.request( - files.delete_batch_check, - 'files', - arg, - None, - ) - return r - - def files_delete_v2(self, - path): - """ - Delete the file or folder at a given path. If the path is a folder, all - its contents will be deleted too. A successful response indicates that - the file or folder was deleted. The returned metadata will be the - corresponding :class:`dropbox.files.FileMetadata` or - :class:`dropbox.files.FolderMetadata` for the item at time of deletion, - and not a :class:`dropbox.files.DeletedMetadata` object. - - :param str path: Path in the user's Dropbox to delete. - :rtype: :class:`dropbox.files.DeleteResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.DeleteError` - """ - arg = files.DeleteArg(path) - r = self.request( - files.delete_v2, - 'files', - arg, - None, - ) - return r - - def files_download(self, - path, - rev=None): - """ - Download a file from a user's Dropbox. - - :param str path: The path of the file to download. - :param Nullable rev: Please specify revision in ``path`` instead. - :rtype: (:class:`dropbox.files.FileMetadata`, - :class:`requests.models.Response`) - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.DownloadError` - - If you do not consume the entire response body, then you must call close - on the response object, otherwise you will max out your available - connections. We recommend using the `contextlib.closing - `_ - context manager to ensure this. - """ - arg = files.DownloadArg(path, - rev) - r = self.request( - files.download, - 'files', - arg, - None, - ) - return r - - def files_download_to_file(self, - download_path, - path, - rev=None): - """ - Download a file from a user's Dropbox. - - :param str download_path: Path on local machine to save file. - :param str path: The path of the file to download. - :param Nullable rev: Please specify revision in ``path`` instead. - :rtype: (:class:`dropbox.files.FileMetadata`, - :class:`requests.models.Response`) - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.DownloadError` - """ - arg = files.DownloadArg(path, - rev) - r = self.request( - files.download, - 'files', - arg, - None, - ) - self._save_body_to_file(download_path, r[1]) - return r[0] - - def files_get_metadata(self, - path, - include_media_info=False, - include_deleted=False, - include_has_explicit_shared_members=False): - """ - Returns the metadata for a file or folder. Note: Metadata for the root - folder is unsupported. - - :param str path: The path of a file or folder on Dropbox. - :param bool include_media_info: If true, ``FileMetadata.media_info`` is - set for photo and video. - :param bool include_deleted: If true, - :class:`dropbox.files.DeletedMetadata` will be returned for deleted - file or folder, otherwise ``LookupError.not_found`` will be - returned. - :param bool include_has_explicit_shared_members: If true, the results - will include a flag for each file indicating whether or not that - file has any explicit members. - :rtype: :class:`dropbox.files.Metadata` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.GetMetadataError` - """ - arg = files.GetMetadataArg(path, - include_media_info, - include_deleted, - include_has_explicit_shared_members) - r = self.request( - files.get_metadata, - 'files', - arg, - None, - ) - return r - - def files_get_preview(self, - path, - rev=None): - """ - Get a preview for a file. Currently, PDF previews are generated for - files with the following extensions: .ai, .doc, .docm, .docx, .eps, - .odp, .odt, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .rtf. HTML previews - are generated for files with the following extensions: .csv, .ods, .xls, - .xlsm, .xlsx. Other formats will return an unsupported extension error. - - :param str path: The path of the file to preview. - :param Nullable rev: Please specify revision in ``path`` instead. - :rtype: (:class:`dropbox.files.FileMetadata`, - :class:`requests.models.Response`) - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.PreviewError` - - If you do not consume the entire response body, then you must call close - on the response object, otherwise you will max out your available - connections. We recommend using the `contextlib.closing - `_ - context manager to ensure this. - """ - arg = files.PreviewArg(path, - rev) - r = self.request( - files.get_preview, - 'files', - arg, - None, - ) - return r - - def files_get_preview_to_file(self, - download_path, - path, - rev=None): - """ - Get a preview for a file. Currently, PDF previews are generated for - files with the following extensions: .ai, .doc, .docm, .docx, .eps, - .odp, .odt, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .rtf. HTML previews - are generated for files with the following extensions: .csv, .ods, .xls, - .xlsm, .xlsx. Other formats will return an unsupported extension error. - - :param str download_path: Path on local machine to save file. - :param str path: The path of the file to preview. - :param Nullable rev: Please specify revision in ``path`` instead. - :rtype: (:class:`dropbox.files.FileMetadata`, - :class:`requests.models.Response`) - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.PreviewError` - """ - arg = files.PreviewArg(path, - rev) - r = self.request( - files.get_preview, - 'files', - arg, - None, - ) - self._save_body_to_file(download_path, r[1]) - return r[0] - - def files_get_temporary_link(self, - path): - """ - Get a temporary link to stream content of a file. This link will expire - in four hours and afterwards you will get 410 Gone. Content-Type of the - link is determined automatically by the file's mime type. - - :param str path: The path to the file you want a temporary link to. - :rtype: :class:`dropbox.files.GetTemporaryLinkResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.GetTemporaryLinkError` - """ - arg = files.GetTemporaryLinkArg(path) - r = self.request( - files.get_temporary_link, - 'files', - arg, - None, - ) - return r - - def files_get_thumbnail(self, - path, - format=files.ThumbnailFormat.jpeg, - size=files.ThumbnailSize.w64h64): - """ - Get a thumbnail for an image. This method currently supports files with - the following file extensions: jpg, jpeg, png, tiff, tif, gif and bmp. - Photos that are larger than 20MB in size won't be converted to a - thumbnail. - - :param str path: The path to the image file you want to thumbnail. - :param format: The format for the thumbnail image, jpeg (default) or - png. For images that are photos, jpeg should be preferred, while - png is better for screenshots and digital arts. - :type format: :class:`dropbox.files.ThumbnailFormat` - :param size: The size for the thumbnail image. - :type size: :class:`dropbox.files.ThumbnailSize` - :rtype: (:class:`dropbox.files.FileMetadata`, - :class:`requests.models.Response`) - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.ThumbnailError` - - If you do not consume the entire response body, then you must call close - on the response object, otherwise you will max out your available - connections. We recommend using the `contextlib.closing - `_ - context manager to ensure this. - """ - arg = files.ThumbnailArg(path, - format, - size) - r = self.request( - files.get_thumbnail, - 'files', - arg, - None, - ) - return r - - def files_get_thumbnail_to_file(self, - download_path, - path, - format=files.ThumbnailFormat.jpeg, - size=files.ThumbnailSize.w64h64): - """ - Get a thumbnail for an image. This method currently supports files with - the following file extensions: jpg, jpeg, png, tiff, tif, gif and bmp. - Photos that are larger than 20MB in size won't be converted to a - thumbnail. - - :param str download_path: Path on local machine to save file. - :param str path: The path to the image file you want to thumbnail. - :param format: The format for the thumbnail image, jpeg (default) or - png. For images that are photos, jpeg should be preferred, while - png is better for screenshots and digital arts. - :type format: :class:`dropbox.files.ThumbnailFormat` - :param size: The size for the thumbnail image. - :type size: :class:`dropbox.files.ThumbnailSize` - :rtype: (:class:`dropbox.files.FileMetadata`, - :class:`requests.models.Response`) - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.ThumbnailError` - """ - arg = files.ThumbnailArg(path, - format, - size) - r = self.request( - files.get_thumbnail, - 'files', - arg, - None, - ) - self._save_body_to_file(download_path, r[1]) - return r[0] - - def files_get_thumbnail_batch(self, - entries): - """ - Get thumbnails for a list of images. We allow up to 25 thumbnails in a - single batch. This method currently supports files with the following - file extensions: jpg, jpeg, png, tiff, tif, gif and bmp. Photos that are - larger than 20MB in size won't be converted to a thumbnail. - - :param list entries: List of files to get thumbnails. - :rtype: :class:`dropbox.files.GetThumbnailBatchResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.GetThumbnailBatchError` - """ - arg = files.GetThumbnailBatchArg(entries) - r = self.request( - files.get_thumbnail_batch, - 'files', - arg, - None, - ) - return r - - def files_list_folder(self, - path, - recursive=False, - include_media_info=False, - include_deleted=False, - include_has_explicit_shared_members=False, - include_mounted_folders=True, - limit=None, - shared_link=None): - """ - Starts returning the contents of a folder. If the result's - ``ListFolderResult.has_more`` field is ``True``, call - :meth:`files_list_folder_continue` with the returned - ``ListFolderResult.cursor`` to retrieve more entries. If you're using - ``ListFolderArg.recursive`` set to ``True`` to keep a local cache of the - contents of a Dropbox account, iterate through each entry in order and - process them as follows to keep your local state in sync: For each - :class:`dropbox.files.FileMetadata`, store the new entry at the given - path in your local state. If the required parent folders don't exist - yet, create them. If there's already something else at the given path, - replace it and remove all its children. For each - :class:`dropbox.files.FolderMetadata`, store the new entry at the given - path in your local state. If the required parent folders don't exist - yet, create them. If there's already something else at the given path, - replace it but leave the children as they are. Check the new entry's - ``FolderSharingInfo.read_only`` and set all its children's read-only - statuses to match. For each :class:`dropbox.files.DeletedMetadata`, if - your local state has something at the given path, remove it and all its - children. If there's nothing at the given path, ignore this entry. Note: - :class:`dropbox.auth.RateLimitError` may be returned if multiple - :meth:`files_list_folder` or :meth:`files_list_folder_continue` calls - with same parameters are made simultaneously by same API app for same - user. If your app implements retry logic, please hold off the retry - until the previous request finishes. - - :param str path: A unique identifier for the file. - :param bool recursive: If true, the list folder operation will be - applied recursively to all subfolders and the response will contain - contents of all subfolders. - :param bool include_media_info: If true, ``FileMetadata.media_info`` is - set for photo and video. - :param bool include_deleted: If true, the results will include entries - for files and folders that used to exist but were deleted. - :param bool include_has_explicit_shared_members: If true, the results - will include a flag for each file indicating whether or not that - file has any explicit members. - :param bool include_mounted_folders: If true, the results will include - entries under mounted folders which includes app folder, shared - folder and team folder. - :param Nullable limit: The maximum number of results to return per - request. Note: This is an approximate number and there can be - slightly more entries returned in some cases. - :param Nullable shared_link: A shared link to list the contents of. If - the link is password-protected, the password must be provided. If - this field is present, ``ListFolderArg.path`` will be relative to - root of the shared link. Only non-recursive mode is supported for - shared link. - :rtype: :class:`dropbox.files.ListFolderResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.ListFolderError` - """ - arg = files.ListFolderArg(path, - recursive, - include_media_info, - include_deleted, - include_has_explicit_shared_members, - include_mounted_folders, - limit, - shared_link) - r = self.request( - files.list_folder, - 'files', - arg, - None, - ) - return r - - def files_list_folder_continue(self, - cursor): - """ - Once a cursor has been retrieved from :meth:`files_list_folder`, use - this to paginate through all files and retrieve updates to the folder, - following the same rules as documented for :meth:`files_list_folder`. - - :param str cursor: The cursor returned by your last call to - :meth:`files_list_folder` or :meth:`files_list_folder_continue`. - :rtype: :class:`dropbox.files.ListFolderResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.ListFolderContinueError` - """ - arg = files.ListFolderContinueArg(cursor) - r = self.request( - files.list_folder_continue, - 'files', - arg, - None, - ) - return r - - def files_list_folder_get_latest_cursor(self, - path, - recursive=False, - include_media_info=False, - include_deleted=False, - include_has_explicit_shared_members=False, - include_mounted_folders=True, - limit=None, - shared_link=None): - """ - A way to quickly get a cursor for the folder's state. Unlike - :meth:`files_list_folder`, :meth:`files_list_folder_get_latest_cursor` - doesn't return any entries. This endpoint is for app which only needs to - know about new files and modifications and doesn't need to know about - files that already exist in Dropbox. - - :param str path: A unique identifier for the file. - :param bool recursive: If true, the list folder operation will be - applied recursively to all subfolders and the response will contain - contents of all subfolders. - :param bool include_media_info: If true, ``FileMetadata.media_info`` is - set for photo and video. - :param bool include_deleted: If true, the results will include entries - for files and folders that used to exist but were deleted. - :param bool include_has_explicit_shared_members: If true, the results - will include a flag for each file indicating whether or not that - file has any explicit members. - :param bool include_mounted_folders: If true, the results will include - entries under mounted folders which includes app folder, shared - folder and team folder. - :param Nullable limit: The maximum number of results to return per - request. Note: This is an approximate number and there can be - slightly more entries returned in some cases. - :param Nullable shared_link: A shared link to list the contents of. If - the link is password-protected, the password must be provided. If - this field is present, ``ListFolderArg.path`` will be relative to - root of the shared link. Only non-recursive mode is supported for - shared link. - :rtype: :class:`dropbox.files.ListFolderGetLatestCursorResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.ListFolderError` - """ - arg = files.ListFolderArg(path, - recursive, - include_media_info, - include_deleted, - include_has_explicit_shared_members, - include_mounted_folders, - limit, - shared_link) - r = self.request( - files.list_folder_get_latest_cursor, - 'files', - arg, - None, - ) - return r - - def files_list_folder_longpoll(self, - cursor, - timeout=30): - """ - A longpoll endpoint to wait for changes on an account. In conjunction - with :meth:`files_list_folder_continue`, this call gives you a - low-latency way to monitor an account for file changes. The connection - will block until there are changes available or a timeout occurs. This - endpoint is useful mostly for client-side apps. If you're looking for - server-side notifications, check out our `webhooks documentation - `_. - - :param str cursor: A cursor as returned by :meth:`files_list_folder` or - :meth:`files_list_folder_continue`. Cursors retrieved by setting - ``ListFolderArg.include_media_info`` to ``True`` are not supported. - :param long timeout: A timeout in seconds. The request will block for at - most this length of time, plus up to 90 seconds of random jitter - added to avoid the thundering herd problem. Care should be taken - when using this parameter, as some network infrastructure does not - support long timeouts. - :rtype: :class:`dropbox.files.ListFolderLongpollResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.ListFolderLongpollError` - """ - arg = files.ListFolderLongpollArg(cursor, - timeout) - r = self.request( - files.list_folder_longpoll, - 'files', - arg, - None, - ) - return r - - def files_list_revisions(self, - path, - mode=files.ListRevisionsMode.path, - limit=10): - """ - Returns revisions for files based on a file path or a file id. The file - path or file id is identified from the latest file entry at the given - file path or id. This end point allows your app to query either by file - path or file id by setting the mode parameter appropriately. In the - ``ListRevisionsMode.path`` (default) mode, all revisions at the same - file path as the latest file entry are returned. If revisions with the - same file id are desired, then mode must be set to - ``ListRevisionsMode.id``. The ``ListRevisionsMode.id`` mode is useful to - retrieve revisions for a given file across moves or renames. - - :param str path: The path to the file you want to see the revisions of. - :param mode: Determines the behavior of the API in listing the revisions - for a given file path or id. - :type mode: :class:`dropbox.files.ListRevisionsMode` - :param long limit: The maximum number of revision entries returned. - :rtype: :class:`dropbox.files.ListRevisionsResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.ListRevisionsError` - """ - arg = files.ListRevisionsArg(path, - mode, - limit) - r = self.request( - files.list_revisions, - 'files', - arg, - None, - ) - return r - - def files_move(self, - from_path, - to_path, - allow_shared_folder=False, - autorename=False, - allow_ownership_transfer=False): - """ - Move a file or folder to a different location in the user's Dropbox. If - the source path is a folder all its contents will be moved. - - :param bool allow_shared_folder: If true, :meth:`files_copy` will copy - contents in shared folder, otherwise - ``RelocationError.cant_copy_shared_folder`` will be returned if - ``from_path`` contains shared folder. This field is always true for - :meth:`files_move`. - :param bool autorename: If there's a conflict, have the Dropbox server - try to autorename the file to avoid the conflict. - :param bool allow_ownership_transfer: Allow moves by owner even if it - would result in an ownership transfer for the content being moved. - This does not apply to copies. - :rtype: :class:`dropbox.files.Metadata` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.RelocationError` - """ - warnings.warn( - 'move is deprecated. Use move_v2.', - DeprecationWarning, - ) - arg = files.RelocationArg(from_path, - to_path, - allow_shared_folder, - autorename, - allow_ownership_transfer) - r = self.request( - files.move, - 'files', - arg, - None, - ) - return r - - def files_move_batch(self, - entries, - allow_shared_folder=False, - autorename=False, - allow_ownership_transfer=False): - """ - Move multiple files or folders to different locations at once in the - user's Dropbox. This route is 'all or nothing', which means if one entry - fails, the whole transaction will abort. This route will return job ID - immediately and do the async moving job in background. Please use - :meth:`files_move_batch_check` to check the job status. - - :param list entries: List of entries to be moved or copied. Each entry - is :class:`dropbox.files.RelocationPath`. - :param bool allow_shared_folder: If true, :meth:`files_copy_batch` will - copy contents in shared folder, otherwise - ``RelocationError.cant_copy_shared_folder`` will be returned if - ``RelocationPath.from_path`` contains shared folder. This field is - always true for :meth:`files_move_batch`. - :param bool autorename: If there's a conflict with any file, have the - Dropbox server try to autorename that file to avoid the conflict. - :param bool allow_ownership_transfer: Allow moves by owner even if it - would result in an ownership transfer for the content being moved. - This does not apply to copies. - :rtype: :class:`dropbox.files.RelocationBatchLaunch` - """ - arg = files.RelocationBatchArg(entries, - allow_shared_folder, - autorename, - allow_ownership_transfer) - r = self.request( - files.move_batch, - 'files', - arg, - None, - ) - return r - - def files_move_batch_check(self, - async_job_id): - """ - Returns the status of an asynchronous job for :meth:`files_move_batch`. - If success, it returns list of results for each entry. - - :param str async_job_id: Id of the asynchronous job. This is the value - of a response returned from the method that launched the job. - :rtype: :class:`dropbox.files.RelocationBatchJobStatus` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.PollError` - """ - arg = async.PollArg(async_job_id) - r = self.request( - files.move_batch_check, - 'files', - arg, - None, - ) - return r - - def files_move_v2(self, - from_path, - to_path, - allow_shared_folder=False, - autorename=False, - allow_ownership_transfer=False): - """ - Move a file or folder to a different location in the user's Dropbox. If - the source path is a folder all its contents will be moved. - - :param bool allow_shared_folder: If true, :meth:`files_copy` will copy - contents in shared folder, otherwise - ``RelocationError.cant_copy_shared_folder`` will be returned if - ``from_path`` contains shared folder. This field is always true for - :meth:`files_move`. - :param bool autorename: If there's a conflict, have the Dropbox server - try to autorename the file to avoid the conflict. - :param bool allow_ownership_transfer: Allow moves by owner even if it - would result in an ownership transfer for the content being moved. - This does not apply to copies. - :rtype: :class:`dropbox.files.RelocationResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.RelocationError` - """ - arg = files.RelocationArg(from_path, - to_path, - allow_shared_folder, - autorename, - allow_ownership_transfer) - r = self.request( - files.move_v2, - 'files', - arg, - None, - ) - return r - - def files_permanently_delete(self, - path): - """ - Permanently delete the file or folder at a given path (see - https://www.dropbox.com/en/help/40). Note: This endpoint is only - available for Dropbox Business apps. - - :param str path: Path in the user's Dropbox to delete. - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.DeleteError` - """ - arg = files.DeleteArg(path) - r = self.request( - files.permanently_delete, - 'files', - arg, - None, - ) - return None - - def files_properties_add(self, - path, - property_groups): - """ - :param str path: A unique identifier for the file or folder. - :param list property_groups: The property groups which are to be added - to a Dropbox file. - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.AddPropertiesError` - """ - warnings.warn( - 'properties/add is deprecated.', - DeprecationWarning, - ) - arg = file_properties.AddPropertiesArg(path, - property_groups) - r = self.request( - files.properties_add, - 'files', - arg, - None, - ) - return None - - def files_properties_overwrite(self, - path, - property_groups): - """ - :param str path: A unique identifier for the file or folder. - :param list property_groups: The property groups "snapshot" updates to - force apply. - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.InvalidPropertyGroupError` - """ - warnings.warn( - 'properties/overwrite is deprecated.', - DeprecationWarning, - ) - arg = file_properties.OverwritePropertyGroupArg(path, - property_groups) - r = self.request( - files.properties_overwrite, - 'files', - arg, - None, - ) - return None - - def files_properties_remove(self, - path, - property_template_ids): - """ - :param str path: A unique identifier for the file or folder. - :param list property_template_ids: A list of identifiers for a template - created by :meth:`files_templates_add_for_user` or - :meth:`files_templates_add_for_team`. - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.RemovePropertiesError` - """ - warnings.warn( - 'properties/remove is deprecated.', - DeprecationWarning, - ) - arg = file_properties.RemovePropertiesArg(path, - property_template_ids) - r = self.request( - files.properties_remove, - 'files', - arg, - None, - ) - return None - - def files_properties_template_get(self, - template_id): - """ - :param str template_id: An identifier for template added by route See - :meth:`files_templates_add_for_user` or - :meth:`files_templates_add_for_team`. - :rtype: :class:`dropbox.files.GetTemplateResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.TemplateError` - """ - warnings.warn( - 'properties/template/get is deprecated.', - DeprecationWarning, - ) - arg = file_properties.GetTemplateArg(template_id) - r = self.request( - files.properties_template_get, - 'files', - arg, - None, - ) - return r - - def files_properties_template_list(self): - warnings.warn( - 'properties/template/list is deprecated.', - DeprecationWarning, - ) - arg = None - r = self.request( - files.properties_template_list, - 'files', - arg, - None, - ) - return r - - def files_properties_update(self, - path, - update_property_groups): - """ - :param str path: A unique identifier for the file or folder. - :param list update_property_groups: The property groups "delta" updates - to apply. - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.UpdatePropertiesError` - """ - warnings.warn( - 'properties/update is deprecated.', - DeprecationWarning, - ) - arg = file_properties.UpdatePropertiesArg(path, - update_property_groups) - r = self.request( - files.properties_update, - 'files', - arg, - None, - ) - return None - - def files_restore(self, - path, - rev): - """ - Restore a file to a specific revision. - - :param str path: The path to the file you want to restore. - :param str rev: The revision to restore for the file. - :rtype: :class:`dropbox.files.FileMetadata` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.RestoreError` - """ - arg = files.RestoreArg(path, - rev) - r = self.request( - files.restore, - 'files', - arg, - None, - ) - return r - - def files_save_url(self, - path, - url): - """ - Save a specified URL into a file in user's Dropbox. If the given path - already exists, the file will be renamed to avoid the conflict (e.g. - myfile (1).txt). - - :param str path: The path in Dropbox where the URL will be saved to. - :param str url: The URL to be saved. - :rtype: :class:`dropbox.files.SaveUrlResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.SaveUrlError` - """ - arg = files.SaveUrlArg(path, - url) - r = self.request( - files.save_url, - 'files', - arg, - None, - ) - return r - - def files_save_url_check_job_status(self, - async_job_id): - """ - Check the status of a :meth:`files_save_url` job. - - :param str async_job_id: Id of the asynchronous job. This is the value - of a response returned from the method that launched the job. - :rtype: :class:`dropbox.files.SaveUrlJobStatus` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.PollError` - """ - arg = async.PollArg(async_job_id) - r = self.request( - files.save_url_check_job_status, - 'files', - arg, - None, - ) - return r - - def files_search(self, - path, - query, - start=0, - max_results=100, - mode=files.SearchMode.filename): - """ - Searches for files and folders. Note: Recent changes may not immediately - be reflected in search results due to a short delay in indexing. - - :param str path: The path in the user's Dropbox to search. Should - probably be a folder. - :param str query: The string to search for. The search string is split - on spaces into multiple tokens. For file name searching, the last - token is used for prefix matching (i.e. "bat c" matches "bat cave" - but not "batman car"). - :param long start: The starting index within the search results (used - for paging). - :param long max_results: The maximum number of search results to return. - :param mode: The search mode (filename, filename_and_content, or - deleted_filename). Note that searching file content is only - available for Dropbox Business accounts. - :type mode: :class:`dropbox.files.SearchMode` - :rtype: :class:`dropbox.files.SearchResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.SearchError` - """ - arg = files.SearchArg(path, - query, - start, - max_results, - mode) - r = self.request( - files.search, - 'files', - arg, - None, - ) - return r - - def files_upload(self, - f, - path, - mode=files.WriteMode.add, - autorename=False, - client_modified=None, - mute=False): - """ - Create a new file with the contents provided in the request. Do not use - this to upload a file larger than 150 MB. Instead, create an upload - session with :meth:`files_upload_session_start`. - - :param bytes f: Contents to upload. - :param str path: Path in the user's Dropbox to save the file. - :param mode: Selects what to do if the file already exists. - :type mode: :class:`dropbox.files.WriteMode` - :param bool autorename: If there's a conflict, as determined by - ``mode``, have the Dropbox server try to autorename the file to - avoid conflict. - :param Nullable client_modified: The value to store as the - ``client_modified`` timestamp. Dropbox automatically records the - time at which the file was written to the Dropbox servers. It can - also record an additional timestamp, provided by Dropbox desktop - clients, mobile clients, and API apps of when the file was actually - created or modified. - :param bool mute: Normally, users are made aware of any file - modifications in their Dropbox account via notifications in the - client software. If ``True``, this tells the clients that this - modification shouldn't result in a user notification. - :rtype: :class:`dropbox.files.FileMetadata` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.UploadError` - """ - arg = files.CommitInfo(path, - mode, - autorename, - client_modified, - mute) - r = self.request( - files.upload, - 'files', - arg, - f, - ) - return r - - def files_upload_session_append(self, - f, - session_id, - offset): - """ - Append more data to an upload session. A single request should not - upload more than 150 MB. - - :param bytes f: Contents to upload. - :param str session_id: The upload session ID (returned by - :meth:`files_upload_session_start`). - :param long offset: The amount of data that has been uploaded so far. We - use this to make sure upload data isn't lost or duplicated in the - event of a network error. - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.UploadSessionLookupError` - """ - warnings.warn( - 'upload_session/append is deprecated. Use upload_session/append_v2.', - DeprecationWarning, - ) - arg = files.UploadSessionCursor(session_id, - offset) - r = self.request( - files.upload_session_append, - 'files', - arg, - f, - ) - return None - - def files_upload_session_append_v2(self, - f, - cursor, - close=False): - """ - Append more data to an upload session. When the parameter close is set, - this call will close the session. A single request should not upload - more than 150 MB. - - :param bytes f: Contents to upload. - :param cursor: Contains the upload session ID and the offset. - :type cursor: :class:`dropbox.files.UploadSessionCursor` - :param bool close: If true, the current session will be closed, at which - point you won't be able to call - :meth:`files_upload_session_append_v2` anymore with the current - session. - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.UploadSessionLookupError` - """ - arg = files.UploadSessionAppendArg(cursor, - close) - r = self.request( - files.upload_session_append_v2, - 'files', - arg, - f, - ) - return None - - def files_upload_session_finish(self, - f, - cursor, - commit): - """ - Finish an upload session and save the uploaded data to the given file - path. A single request should not upload more than 150 MB. - - :param bytes f: Contents to upload. - :param cursor: Contains the upload session ID and the offset. - :type cursor: :class:`dropbox.files.UploadSessionCursor` - :param commit: Contains the path and other optional modifiers for the - commit. - :type commit: :class:`dropbox.files.CommitInfo` - :rtype: :class:`dropbox.files.FileMetadata` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.UploadSessionFinishError` - """ - arg = files.UploadSessionFinishArg(cursor, - commit) - r = self.request( - files.upload_session_finish, - 'files', - arg, - f, - ) - return r - - def files_upload_session_finish_batch(self, - entries): - """ - This route helps you commit many files at once into a user's Dropbox. - Use :meth:`files_upload_session_start` and - :meth:`files_upload_session_append_v2` to upload file contents. We - recommend uploading many files in parallel to increase throughput. Once - the file contents have been uploaded, rather than calling - :meth:`files_upload_session_finish`, use this route to finish all your - upload sessions in a single request. ``UploadSessionStartArg.close`` or - ``UploadSessionAppendArg.close`` needs to be true for the last - :meth:`files_upload_session_start` or - :meth:`files_upload_session_append_v2` call. This route will return a - job_id immediately and do the async commit job in background. Use - :meth:`files_upload_session_finish_batch_check` to check the job status. - For the same account, this route should be executed serially. That means - you should not start the next job before current job finishes. We allow - up to 1000 entries in a single request. - - :param list entries: Commit information for each file in the batch. - :rtype: :class:`dropbox.files.UploadSessionFinishBatchLaunch` - """ - arg = files.UploadSessionFinishBatchArg(entries) - r = self.request( - files.upload_session_finish_batch, - 'files', - arg, - None, - ) - return r - - def files_upload_session_finish_batch_check(self, - async_job_id): - """ - Returns the status of an asynchronous job for - :meth:`files_upload_session_finish_batch`. If success, it returns list - of result for each entry. - - :param str async_job_id: Id of the asynchronous job. This is the value - of a response returned from the method that launched the job. - :rtype: :class:`dropbox.files.UploadSessionFinishBatchJobStatus` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.files.PollError` - """ - arg = async.PollArg(async_job_id) - r = self.request( - files.upload_session_finish_batch_check, - 'files', - arg, - None, - ) - return r - - def files_upload_session_start(self, - f, - close=False): - """ - Upload sessions allow you to upload a single file in one or more - requests, for example where the size of the file is greater than 150 MB. - This call starts a new upload session with the given data. You can then - use :meth:`files_upload_session_append_v2` to add more data and - :meth:`files_upload_session_finish` to save all the data to a file in - Dropbox. A single request should not upload more than 150 MB. An upload - session can be used for a maximum of 48 hours. Attempting to use an - ``UploadSessionStartResult.session_id`` with - :meth:`files_upload_session_append_v2` or - :meth:`files_upload_session_finish` more than 48 hours after its - creation will return a ``UploadSessionLookupError.not_found``. - - :param bytes f: Contents to upload. - :param bool close: If true, the current session will be closed, at which - point you won't be able to call - :meth:`files_upload_session_append_v2` anymore with the current - session. - :rtype: :class:`dropbox.files.UploadSessionStartResult` - """ - arg = files.UploadSessionStartArg(close) - r = self.request( - files.upload_session_start, - 'files', - arg, - f, - ) - return r - - # ------------------------------------------ - # Routes in paper namespace - - def paper_docs_archive(self, - doc_id): - """ - Marks the given Paper doc as archived. Note: This action can be - performed or undone by anyone with edit permissions to the doc. - - :param str doc_id: The Paper doc ID. - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.paper.DocLookupError` - """ - arg = paper.RefPaperDoc(doc_id) - r = self.request( - paper.docs_archive, - 'paper', - arg, - None, - ) - return None - - def paper_docs_create(self, - f, - import_format, - parent_folder_id=None): - """ - Creates a new Paper doc with the provided content. - - :param bytes f: Contents to upload. - :param Nullable parent_folder_id: 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. - :param import_format: The format of provided data. - :type import_format: :class:`dropbox.paper.ImportFormat` - :rtype: :class:`dropbox.paper.PaperDocCreateUpdateResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.paper.PaperDocCreateError` - """ - arg = paper.PaperDocCreateArgs(import_format, - parent_folder_id) - r = self.request( - paper.docs_create, - 'paper', - arg, - f, - ) - return r - - def paper_docs_download(self, - doc_id, - export_format): - """ - Exports and downloads Paper doc either as HTML or markdown. - - :type export_format: :class:`dropbox.paper.ExportFormat` - :rtype: (:class:`dropbox.paper.PaperDocExportResult`, - :class:`requests.models.Response`) - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.paper.DocLookupError` - - If you do not consume the entire response body, then you must call close - on the response object, otherwise you will max out your available - connections. We recommend using the `contextlib.closing - `_ - context manager to ensure this. - """ - arg = paper.PaperDocExport(doc_id, - export_format) - r = self.request( - paper.docs_download, - 'paper', - arg, - None, - ) - return r - - def paper_docs_download_to_file(self, - download_path, - doc_id, - export_format): - """ - Exports and downloads Paper doc either as HTML or markdown. - - :param str download_path: Path on local machine to save file. - :type export_format: :class:`dropbox.paper.ExportFormat` - :rtype: (:class:`dropbox.paper.PaperDocExportResult`, - :class:`requests.models.Response`) - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.paper.DocLookupError` - """ - arg = paper.PaperDocExport(doc_id, - export_format) - r = self.request( - paper.docs_download, - 'paper', - arg, - None, - ) - self._save_body_to_file(download_path, r[1]) - return r[0] - - def paper_docs_folder_users_list(self, - doc_id, - limit=1000): - """ - Lists the users who are explicitly invited to the Paper folder in which - the Paper doc is contained. For private folders all users (including - owner) shared on the folder are listed and for team folders all non-team - users shared on the folder are returned. - - :param int 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. - :rtype: :class:`dropbox.paper.ListUsersOnFolderResponse` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.paper.DocLookupError` - """ - arg = paper.ListUsersOnFolderArgs(doc_id, - limit) - r = self.request( - paper.docs_folder_users_list, - 'paper', - arg, - None, - ) - return r - - def paper_docs_folder_users_list_continue(self, - doc_id, - cursor): - """ - Once a cursor has been retrieved from - :meth:`paper_docs_folder_users_list`, use this to paginate through all - users on the Paper folder. - - :param str cursor: The cursor obtained from - :meth:`paper_docs_folder_users_list` or - :meth:`paper_docs_folder_users_list_continue`. Allows for - pagination. - :rtype: :class:`dropbox.paper.ListUsersOnFolderResponse` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.paper.ListUsersCursorError` - """ - arg = paper.ListUsersOnFolderContinueArgs(doc_id, - cursor) - r = self.request( - paper.docs_folder_users_list_continue, - 'paper', - arg, - None, - ) - return r - - def paper_docs_get_folder_info(self, - doc_id): - """ - Retrieves folder information for the given Paper doc. This includes: - - folder sharing policy; permissions for subfolders are set by the - top-level folder. - full 'filepath', i.e. the list of folders (both - folderId and folderName) from the root folder to the folder directly - containing the Paper doc. Note: If the Paper doc is not in any folder - (aka unfiled) the response will be empty. - - :param str doc_id: The Paper doc ID. - :rtype: :class:`dropbox.paper.FoldersContainingPaperDoc` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.paper.DocLookupError` - """ - arg = paper.RefPaperDoc(doc_id) - r = self.request( - paper.docs_get_folder_info, - 'paper', - arg, - None, - ) - return r - - def paper_docs_list(self, - filter_by=paper.ListPaperDocsFilterBy.docs_accessed, - sort_by=paper.ListPaperDocsSortBy.accessed, - sort_order=paper.ListPaperDocsSortOrder.ascending, - limit=1000): - """ - Return the list of all Paper docs according to the argument - specifications. To iterate over through the full pagination, pass the - cursor to :meth:`paper_docs_list_continue`. - - :param filter_by: Allows user to specify how the Paper docs should be - filtered. - :type filter_by: :class:`dropbox.paper.ListPaperDocsFilterBy` - :param sort_by: Allows user to specify how the Paper docs should be - sorted. - :type sort_by: :class:`dropbox.paper.ListPaperDocsSortBy` - :param sort_order: Allows user to specify the sort order of the result. - :type sort_order: :class:`dropbox.paper.ListPaperDocsSortOrder` - :param int 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. - :rtype: :class:`dropbox.paper.ListPaperDocsResponse` - """ - arg = paper.ListPaperDocsArgs(filter_by, - sort_by, - sort_order, - limit) - r = self.request( - paper.docs_list, - 'paper', - arg, - None, - ) - return r - - def paper_docs_list_continue(self, - cursor): - """ - Once a cursor has been retrieved from :meth:`paper_docs_list`, use this - to paginate through all Paper doc. - - :param str cursor: The cursor obtained from :meth:`paper_docs_list` or - :meth:`paper_docs_list_continue`. Allows for pagination. - :rtype: :class:`dropbox.paper.ListPaperDocsResponse` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.paper.ListDocsCursorError` - """ - arg = paper.ListPaperDocsContinueArgs(cursor) - r = self.request( - paper.docs_list_continue, - 'paper', - arg, - None, - ) - return r - - def paper_docs_permanently_delete(self, - doc_id): - """ - Permanently deletes the given Paper doc. This operation is final as the - doc cannot be recovered. Note: This action can be performed only by the - doc owner. - - :param str doc_id: The Paper doc ID. - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.paper.DocLookupError` - """ - arg = paper.RefPaperDoc(doc_id) - r = self.request( - paper.docs_permanently_delete, - 'paper', - arg, - None, - ) - return None - - def paper_docs_sharing_policy_get(self, - doc_id): - """ - Gets the default sharing policy for the given Paper doc. - - :param str doc_id: The Paper doc ID. - :rtype: :class:`dropbox.paper.SharingPolicy` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.paper.DocLookupError` - """ - arg = paper.RefPaperDoc(doc_id) - r = self.request( - paper.docs_sharing_policy_get, - 'paper', - arg, - None, - ) - return r - - def paper_docs_sharing_policy_set(self, - doc_id, - sharing_policy): - """ - Sets the default sharing policy for the given Paper doc. The default - 'team_sharing_policy' can be changed only by teams, omit this field for - personal accounts. Note: 'public_sharing_policy' cannot be set to the - value 'disabled' because this setting can be changed only via the team - admin console. - - :param sharing_policy: The default sharing policy to be set for the - Paper doc. - :type sharing_policy: :class:`dropbox.paper.SharingPolicy` - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.paper.DocLookupError` - """ - arg = paper.PaperDocSharingPolicy(doc_id, - sharing_policy) - r = self.request( - paper.docs_sharing_policy_set, - 'paper', - arg, - None, - ) - return None - - def paper_docs_update(self, - f, - doc_id, - doc_update_policy, - revision, - import_format): - """ - Updates an existing Paper doc with the provided content. - - :param bytes f: Contents to upload. - :param doc_update_policy: The policy used for the current update call. - :type doc_update_policy: :class:`dropbox.paper.PaperDocUpdatePolicy` - :param long 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. - :param import_format: The format of provided data. - :type import_format: :class:`dropbox.paper.ImportFormat` - :rtype: :class:`dropbox.paper.PaperDocCreateUpdateResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.paper.PaperDocUpdateError` - """ - arg = paper.PaperDocUpdateArgs(doc_id, - doc_update_policy, - revision, - import_format) - r = self.request( - paper.docs_update, - 'paper', - arg, - f, - ) - return r - - def paper_docs_users_add(self, - doc_id, - members, - custom_message=None, - quiet=False): - """ - Allows an owner or editor to add users to a Paper doc or change their - permissions using their email address or Dropbox account ID. Note: The - Doc owner's permissions cannot be changed. - - :param list members: User which should be added to the Paper doc. - Specify only email address or Dropbox account ID. - :param Nullable custom_message: A personal message that will be emailed - to each successfully added member. - :param bool quiet: Clients should set this to true if no email message - shall be sent to added users. - :rtype: list - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.paper.DocLookupError` - """ - arg = paper.AddPaperDocUser(doc_id, - members, - custom_message, - quiet) - r = self.request( - paper.docs_users_add, - 'paper', - arg, - None, - ) - return r - - def paper_docs_users_list(self, - doc_id, - limit=1000, - filter_by=paper.UserOnPaperDocFilter.shared): - """ - Lists all users who visited the Paper doc or users with explicit access. - This call excludes users who have been removed. The list is sorted by - the date of the visit or the share date. The list will include both - users, the explicitly shared ones as well as those who came in using the - Paper url link. - - :param int 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. - :param filter_by: Specify this attribute if you want to obtain users - that have already accessed the Paper doc. - :type filter_by: :class:`dropbox.paper.UserOnPaperDocFilter` - :rtype: :class:`dropbox.paper.ListUsersOnPaperDocResponse` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.paper.DocLookupError` - """ - arg = paper.ListUsersOnPaperDocArgs(doc_id, - limit, - filter_by) - r = self.request( - paper.docs_users_list, - 'paper', - arg, - None, - ) - return r - - def paper_docs_users_list_continue(self, - doc_id, - cursor): - """ - Once a cursor has been retrieved from :meth:`paper_docs_users_list`, use - this to paginate through all users on the Paper doc. - - :param str cursor: The cursor obtained from - :meth:`paper_docs_users_list` or - :meth:`paper_docs_users_list_continue`. Allows for pagination. - :rtype: :class:`dropbox.paper.ListUsersOnPaperDocResponse` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.paper.ListUsersCursorError` - """ - arg = paper.ListUsersOnPaperDocContinueArgs(doc_id, - cursor) - r = self.request( - paper.docs_users_list_continue, - 'paper', - arg, - None, - ) - return r - - def paper_docs_users_remove(self, - doc_id, - member): - """ - Allows an owner or editor to remove users from a Paper doc using their - email address or Dropbox account ID. Note: Doc owner cannot be removed. - - :param member: User which should be removed from the Paper doc. Specify - only email address or Dropbox account ID. - :type member: :class:`dropbox.paper.MemberSelector` - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.paper.DocLookupError` - """ - arg = paper.RemovePaperDocUser(doc_id, - member) - r = self.request( - paper.docs_users_remove, - 'paper', - arg, - None, - ) - return None - - # ------------------------------------------ - # Routes in sharing namespace - - def sharing_add_file_member(self, - file, - members, - custom_message=None, - quiet=False, - access_level=sharing.AccessLevel.viewer, - add_message_as_comment=False): - """ - Adds specified members to a file. - - :param str file: File to which to add members. - :param list members: Members to add. Note that even an email address is - given, this may result in a user being directy added to the - membership if that email is the user's main account email. - :param Nullable custom_message: Message to send to added members in - their invitation. - :param bool quiet: Whether added members should be notified via device - notifications of their invitation. - :param access_level: AccessLevel union object, describing what access - level we want to give new members. - :type access_level: :class:`dropbox.sharing.AccessLevel` - :param bool add_message_as_comment: If the custom message should be - added as a comment on the file. - :rtype: list - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.AddFileMemberError` - """ - arg = sharing.AddFileMemberArgs(file, - members, - custom_message, - quiet, - access_level, - add_message_as_comment) - r = self.request( - sharing.add_file_member, - 'sharing', - arg, - None, - ) - return r - - def sharing_add_folder_member(self, - shared_folder_id, - members, - quiet=False, - custom_message=None): - """ - Allows an owner or editor (if the ACL update policy allows) of a shared - folder to add another member. For the new member to get access to all - the functionality for this folder, you will need to call - :meth:`sharing_mount_folder` on their behalf. Apps must have full - Dropbox access to use this endpoint. - - :param str shared_folder_id: The ID for the shared folder. - :param list members: The intended list of members to add. Added members - will receive invites to join the shared folder. - :param bool quiet: Whether added members should be notified via email - and device notifications of their invite. - :param Nullable custom_message: Optional message to display to added - members in their invitation. - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.AddFolderMemberError` - """ - arg = sharing.AddFolderMemberArg(shared_folder_id, - members, - quiet, - custom_message) - r = self.request( - sharing.add_folder_member, - 'sharing', - arg, - None, - ) - return None - - def sharing_change_file_member_access(self, - file, - member, - access_level): - """ - Identical to update_file_member but with less information returned. - - :param str file: File for which we are changing a member's access. - :param member: The member whose access we are changing. - :type member: :class:`dropbox.sharing.MemberSelector` - :param access_level: The new access level for the member. - :type access_level: :class:`dropbox.sharing.AccessLevel` - :rtype: :class:`dropbox.sharing.FileMemberActionResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.FileMemberActionError` - """ - warnings.warn( - 'change_file_member_access is deprecated. Use update_file_member.', - DeprecationWarning, - ) - arg = sharing.ChangeFileMemberAccessArgs(file, - member, - access_level) - r = self.request( - sharing.change_file_member_access, - 'sharing', - arg, - None, - ) - return r - - def sharing_check_job_status(self, - async_job_id): - """ - Returns the status of an asynchronous job. Apps must have full Dropbox - access to use this endpoint. - - :param str async_job_id: Id of the asynchronous job. This is the value - of a response returned from the method that launched the job. - :rtype: :class:`dropbox.sharing.JobStatus` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.PollError` - """ - arg = async.PollArg(async_job_id) - r = self.request( - sharing.check_job_status, - 'sharing', - arg, - None, - ) - return r - - def sharing_check_remove_member_job_status(self, - async_job_id): - """ - Returns the status of an asynchronous job for sharing a folder. Apps - must have full Dropbox access to use this endpoint. - - :param str async_job_id: Id of the asynchronous job. This is the value - of a response returned from the method that launched the job. - :rtype: :class:`dropbox.sharing.RemoveMemberJobStatus` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.PollError` - """ - arg = async.PollArg(async_job_id) - r = self.request( - sharing.check_remove_member_job_status, - 'sharing', - arg, - None, - ) - return r - - def sharing_check_share_job_status(self, - async_job_id): - """ - Returns the status of an asynchronous job for sharing a folder. Apps - must have full Dropbox access to use this endpoint. - - :param str async_job_id: Id of the asynchronous job. This is the value - of a response returned from the method that launched the job. - :rtype: :class:`dropbox.sharing.ShareFolderJobStatus` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.PollError` - """ - arg = async.PollArg(async_job_id) - r = self.request( - sharing.check_share_job_status, - 'sharing', - arg, - None, - ) - return r - - def sharing_create_shared_link(self, - path, - short_url=False, - pending_upload=None): - """ - Create a shared link. If a shared link already exists for the given - path, that link is returned. Note that in the returned - :class:`dropbox.sharing.PathLinkMetadata`, the ``PathLinkMetadata.url`` - field is the shortened URL if ``CreateSharedLinkArg.short_url`` argument - is set to ``True``. Previously, it was technically possible to break a - shared link by moving or renaming the corresponding file or folder. In - the future, this will no longer be the case, so your app shouldn't rely - on this behavior. Instead, if your app needs to revoke a shared link, - use :meth:`sharing_revoke_shared_link`. - - :param str path: The path to share. - :param bool short_url: Whether to return a shortened URL. - :param Nullable pending_upload: If it's okay to share a path that does - not yet exist, set this to either ``PendingUploadMode.file`` or - ``PendingUploadMode.folder`` to indicate whether to assume it's a - file or folder. - :rtype: :class:`dropbox.sharing.PathLinkMetadata` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.CreateSharedLinkError` - """ - warnings.warn( - 'create_shared_link is deprecated. Use create_shared_link_with_settings.', - DeprecationWarning, - ) - arg = sharing.CreateSharedLinkArg(path, - short_url, - pending_upload) - r = self.request( - sharing.create_shared_link, - 'sharing', - arg, - None, - ) - return r - - def sharing_create_shared_link_with_settings(self, - path, - settings=None): - """ - Create a shared link with custom settings. If no settings are given then - the default visibility is ``RequestedVisibility.public`` (The resolved - visibility, though, may depend on other aspects such as team and shared - folder settings). - - :param str path: The path to be shared by the shared link. - :param Nullable settings: The requested settings for the newly created - shared link. - :rtype: :class:`dropbox.sharing.SharedLinkMetadata` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.CreateSharedLinkWithSettingsError` - """ - arg = sharing.CreateSharedLinkWithSettingsArg(path, - settings) - r = self.request( - sharing.create_shared_link_with_settings, - 'sharing', - arg, - None, - ) - return r - - def sharing_get_file_metadata(self, - file, - actions=None): - """ - Returns shared file metadata. - - :param str file: The file to query. - :param Nullable actions: A list of `FileAction`s corresponding to - `FilePermission`s that should appear in the response's - ``SharedFileMetadata.permissions`` field describing the actions the - authenticated user can perform on the file. - :rtype: :class:`dropbox.sharing.SharedFileMetadata` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.GetFileMetadataError` - """ - arg = sharing.GetFileMetadataArg(file, - actions) - r = self.request( - sharing.get_file_metadata, - 'sharing', - arg, - None, - ) - return r - - def sharing_get_file_metadata_batch(self, - files, - actions=None): - """ - Returns shared file metadata. - - :param list files: The files to query. - :param Nullable actions: A list of `FileAction`s corresponding to - `FilePermission`s that should appear in the response's - ``SharedFileMetadata.permissions`` field describing the actions the - authenticated user can perform on the file. - :rtype: list - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.SharingUserError` - """ - arg = sharing.GetFileMetadataBatchArg(files, - actions) - r = self.request( - sharing.get_file_metadata_batch, - 'sharing', - arg, - None, - ) - return r - - def sharing_get_folder_metadata(self, - shared_folder_id, - actions=None): - """ - Returns shared folder metadata by its folder ID. Apps must have full - Dropbox access to use this endpoint. - - :param str shared_folder_id: The ID for the shared folder. - :param Nullable actions: A list of `FolderAction`s corresponding to - `FolderPermission`s that should appear in the response's - ``SharedFolderMetadata.permissions`` field describing the actions - the authenticated user can perform on the folder. - :rtype: :class:`dropbox.sharing.SharedFolderMetadata` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.SharedFolderAccessError` - """ - arg = sharing.GetMetadataArgs(shared_folder_id, - actions) - r = self.request( - sharing.get_folder_metadata, - 'sharing', - arg, - None, - ) - return r - - def sharing_get_shared_link_file(self, - url, - path=None, - link_password=None): - """ - Download the shared link's file from a user's Dropbox. - - :param str url: URL of the shared link. - :param Nullable path: If the shared link is to a folder, this parameter - can be used to retrieve the metadata for a specific file or - sub-folder in this folder. A relative path should be used. - :param Nullable link_password: If the shared link has a password, this - parameter can be used. - :rtype: (:class:`dropbox.sharing.SharedLinkMetadata`, - :class:`requests.models.Response`) - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.GetSharedLinkFileError` - - If you do not consume the entire response body, then you must call close - on the response object, otherwise you will max out your available - connections. We recommend using the `contextlib.closing - `_ - context manager to ensure this. - """ - arg = sharing.GetSharedLinkMetadataArg(url, - path, - link_password) - r = self.request( - sharing.get_shared_link_file, - 'sharing', - arg, - None, - ) - return r - - def sharing_get_shared_link_file_to_file(self, - download_path, - url, - path=None, - link_password=None): - """ - Download the shared link's file from a user's Dropbox. - - :param str download_path: Path on local machine to save file. - :param str url: URL of the shared link. - :param Nullable path: If the shared link is to a folder, this parameter - can be used to retrieve the metadata for a specific file or - sub-folder in this folder. A relative path should be used. - :param Nullable link_password: If the shared link has a password, this - parameter can be used. - :rtype: (:class:`dropbox.sharing.SharedLinkMetadata`, - :class:`requests.models.Response`) - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.GetSharedLinkFileError` - """ - arg = sharing.GetSharedLinkMetadataArg(url, - path, - link_password) - r = self.request( - sharing.get_shared_link_file, - 'sharing', - arg, - None, - ) - self._save_body_to_file(download_path, r[1]) - return r[0] - - def sharing_get_shared_link_metadata(self, - url, - path=None, - link_password=None): - """ - Get the shared link's metadata. - - :param str url: URL of the shared link. - :param Nullable path: If the shared link is to a folder, this parameter - can be used to retrieve the metadata for a specific file or - sub-folder in this folder. A relative path should be used. - :param Nullable link_password: If the shared link has a password, this - parameter can be used. - :rtype: :class:`dropbox.sharing.SharedLinkMetadata` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.SharedLinkError` - """ - arg = sharing.GetSharedLinkMetadataArg(url, - path, - link_password) - r = self.request( - sharing.get_shared_link_metadata, - 'sharing', - arg, - None, - ) - return r - - def sharing_get_shared_links(self, - path=None): - """ - Returns a list of :class:`dropbox.sharing.LinkMetadata` objects for this - user, including collection links. If no path is given, returns a list of - all shared links for the current user, including collection links, up to - a maximum of 1000 links. If a non-empty path is given, returns a list of - all shared links that allow access to the given path. Collection links - are never returned in this case. Note that the url field in the response - is never the shortened URL. - - :param Nullable path: See :meth:`sharing_get_shared_links` description. - :rtype: :class:`dropbox.sharing.GetSharedLinksResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.GetSharedLinksError` - """ - warnings.warn( - 'get_shared_links is deprecated. Use list_shared_links.', - DeprecationWarning, - ) - arg = sharing.GetSharedLinksArg(path) - r = self.request( - sharing.get_shared_links, - 'sharing', - arg, - None, - ) - return r - - def sharing_list_file_members(self, - file, - actions=None, - include_inherited=True, - limit=100): - """ - Use to obtain the members who have been invited to a file, both - inherited and uninherited members. - - :param str file: The file for which you want to see members. - :param Nullable actions: The actions for which to return permissions on - a member. - :param bool include_inherited: Whether to include members who only have - access from a parent shared folder. - :param long limit: Number of members to return max per query. Defaults - to 100 if no limit is specified. - :rtype: :class:`dropbox.sharing.SharedFileMembers` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.ListFileMembersError` - """ - arg = sharing.ListFileMembersArg(file, - actions, - include_inherited, - limit) - r = self.request( - sharing.list_file_members, - 'sharing', - arg, - None, - ) - return r - - def sharing_list_file_members_batch(self, - files, - limit=10): - """ - Get members of multiple files at once. The arguments to this route are - more limited, and the limit on query result size per file is more - strict. To customize the results more, use the individual file endpoint. - Inherited users and groups are not included in the result, and - permissions are not returned for this endpoint. - - :param list files: Files for which to return members. - :param long limit: Number of members to return max per query. Defaults - to 10 if no limit is specified. - :rtype: list - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.SharingUserError` - """ - arg = sharing.ListFileMembersBatchArg(files, - limit) - r = self.request( - sharing.list_file_members_batch, - 'sharing', - arg, - None, - ) - return r - - def sharing_list_file_members_continue(self, - cursor): - """ - Once a cursor has been retrieved from :meth:`sharing_list_file_members` - or :meth:`sharing_list_file_members_batch`, use this to paginate through - all shared file members. - - :param str cursor: The cursor returned by your last call to - :meth:`sharing_list_file_members`, - :meth:`sharing_list_file_members_continue`, or - :meth:`sharing_list_file_members_batch`. - :rtype: :class:`dropbox.sharing.SharedFileMembers` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.ListFileMembersContinueError` - """ - arg = sharing.ListFileMembersContinueArg(cursor) - r = self.request( - sharing.list_file_members_continue, - 'sharing', - arg, - None, - ) - return r - - def sharing_list_folder_members(self, - shared_folder_id, - actions=None, - limit=1000): - """ - Returns shared folder membership by its folder ID. Apps must have full - Dropbox access to use this endpoint. - - :param str shared_folder_id: The ID for the shared folder. - :rtype: :class:`dropbox.sharing.SharedFolderMembers` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.SharedFolderAccessError` - """ - arg = sharing.ListFolderMembersArgs(shared_folder_id, - actions, - limit) - r = self.request( - sharing.list_folder_members, - 'sharing', - arg, - None, - ) - return r - - def sharing_list_folder_members_continue(self, - cursor): - """ - Once a cursor has been retrieved from - :meth:`sharing_list_folder_members`, use this to paginate through all - shared folder members. Apps must have full Dropbox access to use this - endpoint. - - :param str cursor: The cursor returned by your last call to - :meth:`sharing_list_folder_members` or - :meth:`sharing_list_folder_members_continue`. - :rtype: :class:`dropbox.sharing.SharedFolderMembers` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.ListFolderMembersContinueError` - """ - arg = sharing.ListFolderMembersContinueArg(cursor) - r = self.request( - sharing.list_folder_members_continue, - 'sharing', - arg, - None, - ) - return r - - def sharing_list_folders(self, - limit=1000, - actions=None): - """ - Return the list of all shared folders the current user has access to. - Apps must have full Dropbox access to use this endpoint. - - :param long limit: The maximum number of results to return per request. - :param Nullable actions: A list of `FolderAction`s corresponding to - `FolderPermission`s that should appear in the response's - ``SharedFolderMetadata.permissions`` field describing the actions - the authenticated user can perform on the folder. - :rtype: :class:`dropbox.sharing.ListFoldersResult` - """ - arg = sharing.ListFoldersArgs(limit, - actions) - r = self.request( - sharing.list_folders, - 'sharing', - arg, - None, - ) - return r - - def sharing_list_folders_continue(self, - cursor): - """ - Once a cursor has been retrieved from :meth:`sharing_list_folders`, use - this to paginate through all shared folders. The cursor must come from a - previous call to :meth:`sharing_list_folders` or - :meth:`sharing_list_folders_continue`. Apps must have full Dropbox - access to use this endpoint. - - :param str cursor: The cursor returned by the previous API call - specified in the endpoint description. - :rtype: :class:`dropbox.sharing.ListFoldersResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.ListFoldersContinueError` - """ - arg = sharing.ListFoldersContinueArg(cursor) - r = self.request( - sharing.list_folders_continue, - 'sharing', - arg, - None, - ) - return r - - def sharing_list_mountable_folders(self, - limit=1000, - actions=None): - """ - Return the list of all shared folders the current user can mount or - unmount. Apps must have full Dropbox access to use this endpoint. - - :param long limit: The maximum number of results to return per request. - :param Nullable actions: A list of `FolderAction`s corresponding to - `FolderPermission`s that should appear in the response's - ``SharedFolderMetadata.permissions`` field describing the actions - the authenticated user can perform on the folder. - :rtype: :class:`dropbox.sharing.ListFoldersResult` - """ - arg = sharing.ListFoldersArgs(limit, - actions) - r = self.request( - sharing.list_mountable_folders, - 'sharing', - arg, - None, - ) - return r - - def sharing_list_mountable_folders_continue(self, - cursor): - """ - Once a cursor has been retrieved from - :meth:`sharing_list_mountable_folders`, use this to paginate through all - mountable shared folders. The cursor must come from a previous call to - :meth:`sharing_list_mountable_folders` or - :meth:`sharing_list_mountable_folders_continue`. Apps must have full - Dropbox access to use this endpoint. - - :param str cursor: The cursor returned by the previous API call - specified in the endpoint description. - :rtype: :class:`dropbox.sharing.ListFoldersResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.ListFoldersContinueError` - """ - arg = sharing.ListFoldersContinueArg(cursor) - r = self.request( - sharing.list_mountable_folders_continue, - 'sharing', - arg, - None, - ) - return r - - def sharing_list_received_files(self, - limit=100, - actions=None): - """ - Returns a list of all files shared with current user. Does not include - files the user has received via shared folders, and does not include - unclaimed invitations. - - :param long limit: Number of files to return max per query. Defaults to - 100 if no limit is specified. - :param Nullable actions: A list of `FileAction`s corresponding to - `FilePermission`s that should appear in the response's - ``SharedFileMetadata.permissions`` field describing the actions the - authenticated user can perform on the file. - :rtype: :class:`dropbox.sharing.ListFilesResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.SharingUserError` - """ - arg = sharing.ListFilesArg(limit, - actions) - r = self.request( - sharing.list_received_files, - 'sharing', - arg, - None, - ) - return r - - def sharing_list_received_files_continue(self, - cursor): - """ - Get more results with a cursor from :meth:`sharing_list_received_files`. - - :param str cursor: Cursor in ``ListFilesResult.cursor``. - :rtype: :class:`dropbox.sharing.ListFilesResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.ListFilesContinueError` - """ - arg = sharing.ListFilesContinueArg(cursor) - r = self.request( - sharing.list_received_files_continue, - 'sharing', - arg, - None, - ) - return r - - def sharing_list_shared_links(self, - path=None, - cursor=None, - direct_only=None): - """ - List shared links of this user. If no path is given, returns a list of - all shared links for the current user. If a non-empty path is given, - returns a list of all shared links that allow access to the given path - - direct links to the given path and links to parent folders of the given - path. Links to parent folders can be suppressed by setting direct_only - to true. - - :param Nullable path: See :meth:`sharing_list_shared_links` description. - :param Nullable cursor: The cursor returned by your last call to - :meth:`sharing_list_shared_links`. - :param Nullable direct_only: See :meth:`sharing_list_shared_links` - description. - :rtype: :class:`dropbox.sharing.ListSharedLinksResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.ListSharedLinksError` - """ - arg = sharing.ListSharedLinksArg(path, - cursor, - direct_only) - r = self.request( - sharing.list_shared_links, - 'sharing', - arg, - None, - ) - return r - - def sharing_modify_shared_link_settings(self, - url, - settings, - remove_expiration=False): - """ - Modify the shared link's settings. If the requested visibility conflict - with the shared links policy of the team or the shared folder (in case - the linked file is part of a shared folder) then the - ``LinkPermissions.resolved_visibility`` of the returned - :class:`dropbox.sharing.SharedLinkMetadata` will reflect the actual - visibility of the shared link and the - ``LinkPermissions.requested_visibility`` will reflect the requested - visibility. - - :param str url: URL of the shared link to change its settings. - :param settings: Set of settings for the shared link. - :type settings: :class:`dropbox.sharing.SharedLinkSettings` - :param bool remove_expiration: If set to true, removes the expiration of - the shared link. - :rtype: :class:`dropbox.sharing.SharedLinkMetadata` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.ModifySharedLinkSettingsError` - """ - arg = sharing.ModifySharedLinkSettingsArgs(url, - settings, - remove_expiration) - r = self.request( - sharing.modify_shared_link_settings, - 'sharing', - arg, - None, - ) - return r - - def sharing_mount_folder(self, - shared_folder_id): - """ - The current user mounts the designated folder. Mount a shared folder for - a user after they have been added as a member. Once mounted, the shared - folder will appear in their Dropbox. Apps must have full Dropbox access - to use this endpoint. - - :param str shared_folder_id: The ID of the shared folder to mount. - :rtype: :class:`dropbox.sharing.SharedFolderMetadata` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.MountFolderError` - """ - arg = sharing.MountFolderArg(shared_folder_id) - r = self.request( - sharing.mount_folder, - 'sharing', - arg, - None, - ) - return r - - def sharing_relinquish_file_membership(self, - file): - """ - The current user relinquishes their membership in the designated file. - Note that the current user may still have inherited access to this file - through the parent folder. Apps must have full Dropbox access to use - this endpoint. - - :param str file: The path or id for the file. - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.RelinquishFileMembershipError` - """ - arg = sharing.RelinquishFileMembershipArg(file) - r = self.request( - sharing.relinquish_file_membership, - 'sharing', - arg, - None, - ) - return None - - def sharing_relinquish_folder_membership(self, - shared_folder_id, - leave_a_copy=False): - """ - The current user relinquishes their membership in the designated shared - folder and will no longer have access to the folder. A folder owner - cannot relinquish membership in their own folder. This will run - synchronously if leave_a_copy is false, and asynchronously if - leave_a_copy is true. Apps must have full Dropbox access to use this - endpoint. - - :param str shared_folder_id: The ID for the shared folder. - :param bool leave_a_copy: Keep a copy of the folder's contents upon - relinquishing membership. - :rtype: :class:`dropbox.sharing.LaunchEmptyResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.RelinquishFolderMembershipError` - """ - arg = sharing.RelinquishFolderMembershipArg(shared_folder_id, - leave_a_copy) - r = self.request( - sharing.relinquish_folder_membership, - 'sharing', - arg, - None, - ) - return r - - def sharing_remove_file_member(self, - file, - member): - """ - Identical to remove_file_member_2 but with less information returned. - - :param str file: File from which to remove members. - :param member: Member to remove from this file. Note that even if an - email is specified, it may result in the removal of a user (not an - invitee) if the user's main account corresponds to that email - address. - :type member: :class:`dropbox.sharing.MemberSelector` - :rtype: :class:`dropbox.sharing.FileMemberActionIndividualResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.RemoveFileMemberError` - """ - warnings.warn( - 'remove_file_member is deprecated. Use remove_file_member_2.', - DeprecationWarning, - ) - arg = sharing.RemoveFileMemberArg(file, - member) - r = self.request( - sharing.remove_file_member, - 'sharing', - arg, - None, - ) - return r - - def sharing_remove_file_member_2(self, - file, - member): - """ - Removes a specified member from the file. - - :param str file: File from which to remove members. - :param member: Member to remove from this file. Note that even if an - email is specified, it may result in the removal of a user (not an - invitee) if the user's main account corresponds to that email - address. - :type member: :class:`dropbox.sharing.MemberSelector` - :rtype: :class:`dropbox.sharing.FileMemberRemoveActionResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.RemoveFileMemberError` - """ - arg = sharing.RemoveFileMemberArg(file, - member) - r = self.request( - sharing.remove_file_member_2, - 'sharing', - arg, - None, - ) - return r - - def sharing_remove_folder_member(self, - shared_folder_id, - member, - leave_a_copy): - """ - Allows an owner or editor (if the ACL update policy allows) of a shared - folder to remove another member. Apps must have full Dropbox access to - use this endpoint. - - :param str shared_folder_id: The ID for the shared folder. - :param member: The member to remove from the folder. - :type member: :class:`dropbox.sharing.MemberSelector` - :param bool leave_a_copy: If true, the removed user will keep their copy - of the folder after it's unshared, assuming it was mounted. - Otherwise, it will be removed from their Dropbox. Also, this must be - set to false when kicking a group. - :rtype: :class:`dropbox.sharing.LaunchResultBase` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.RemoveFolderMemberError` - """ - arg = sharing.RemoveFolderMemberArg(shared_folder_id, - member, - leave_a_copy) - r = self.request( - sharing.remove_folder_member, - 'sharing', - arg, - None, - ) - return r - - def sharing_revoke_shared_link(self, - url): - """ - Revoke a shared link. Note that even after revoking a shared link to a - file, the file may be accessible if there are shared links leading to - any of the file parent folders. To list all shared links that enable - access to a specific file, you can use the - :meth:`sharing_list_shared_links` with the file as the - ``ListSharedLinksArg.path`` argument. - - :param str url: URL of the shared link. - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.RevokeSharedLinkError` - """ - arg = sharing.RevokeSharedLinkArg(url) - r = self.request( - sharing.revoke_shared_link, - 'sharing', - arg, - None, - ) - return None - - def sharing_share_folder(self, - path, - acl_update_policy=None, - force_async=False, - member_policy=None, - shared_link_policy=None, - viewer_info_policy=None, - actions=None, - link_settings=None): - """ - Share a folder with collaborators. Most sharing will be completed - synchronously. Large folders will be completed asynchronously. To make - testing the async case repeatable, set `ShareFolderArg.force_async`. If - a ``ShareFolderLaunch.async_job_id`` is returned, you'll need to call - :meth:`sharing_check_share_job_status` until the action completes to get - the metadata for the folder. Apps must have full Dropbox access to use - this endpoint. - - :param Nullable actions: A list of `FolderAction`s corresponding to - `FolderPermission`s that should appear in the response's - ``SharedFolderMetadata.permissions`` field describing the actions - the authenticated user can perform on the folder. - :param Nullable link_settings: Settings on the link for this folder. - :rtype: :class:`dropbox.sharing.ShareFolderLaunch` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.ShareFolderError` - """ - arg = sharing.ShareFolderArg(path, - acl_update_policy, - force_async, - member_policy, - shared_link_policy, - viewer_info_policy, - actions, - link_settings) - r = self.request( - sharing.share_folder, - 'sharing', - arg, - None, - ) - return r - - def sharing_transfer_folder(self, - shared_folder_id, - to_dropbox_id): - """ - Transfer ownership of a shared folder to a member of the shared folder. - User must have ``AccessLevel.owner`` access to the shared folder to - perform a transfer. Apps must have full Dropbox access to use this - endpoint. - - :param str shared_folder_id: The ID for the shared folder. - :param str to_dropbox_id: A account or team member ID to transfer - ownership to. - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.TransferFolderError` - """ - arg = sharing.TransferFolderArg(shared_folder_id, - to_dropbox_id) - r = self.request( - sharing.transfer_folder, - 'sharing', - arg, - None, - ) - return None - - def sharing_unmount_folder(self, - shared_folder_id): - """ - The current user unmounts the designated folder. They can re-mount the - folder at a later time using :meth:`sharing_mount_folder`. Apps must - have full Dropbox access to use this endpoint. - - :param str shared_folder_id: The ID for the shared folder. - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.UnmountFolderError` - """ - arg = sharing.UnmountFolderArg(shared_folder_id) - r = self.request( - sharing.unmount_folder, - 'sharing', - arg, - None, - ) - return None - - def sharing_unshare_file(self, - file): - """ - Remove all members from this file. Does not remove inherited members. - - :param str file: The file to unshare. - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.UnshareFileError` - """ - arg = sharing.UnshareFileArg(file) - r = self.request( - sharing.unshare_file, - 'sharing', - arg, - None, - ) - return None - - def sharing_unshare_folder(self, - shared_folder_id, - leave_a_copy=False): - """ - Allows a shared folder owner to unshare the folder. You'll need to call - :meth:`sharing_check_job_status` to determine if the action has - completed successfully. Apps must have full Dropbox access to use this - endpoint. - - :param str shared_folder_id: The ID for the shared folder. - :param bool leave_a_copy: If true, members of this shared folder will - get a copy of this folder after it's unshared. Otherwise, it will be - removed from their Dropbox. The current user, who is an owner, will - always retain their copy. - :rtype: :class:`dropbox.sharing.LaunchEmptyResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.UnshareFolderError` - """ - arg = sharing.UnshareFolderArg(shared_folder_id, - leave_a_copy) - r = self.request( - sharing.unshare_folder, - 'sharing', - arg, - None, - ) - return r - - def sharing_update_file_member(self, - file, - member, - access_level): - """ - Changes a member's access on a shared file. - - :rtype: :class:`dropbox.sharing.MemberAccessLevelResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.FileMemberActionError` - """ - arg = sharing.UpdateFileMemberArgs(file, - member, - access_level) - r = self.request( - sharing.update_file_member, - 'sharing', - arg, - None, - ) - return r - - def sharing_update_folder_member(self, - shared_folder_id, - member, - access_level): - """ - Allows an owner or editor of a shared folder to update another member's - permissions. Apps must have full Dropbox access to use this endpoint. - - :param str shared_folder_id: The ID for the shared folder. - :param member: The member of the shared folder to update. Only the - ``MemberSelector.dropbox_id`` may be set at this time. - :type member: :class:`dropbox.sharing.MemberSelector` - :param access_level: The new access level for ``member``. - ``AccessLevel.owner`` is disallowed. - :type access_level: :class:`dropbox.sharing.AccessLevel` - :rtype: :class:`dropbox.sharing.MemberAccessLevelResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.UpdateFolderMemberError` - """ - arg = sharing.UpdateFolderMemberArg(shared_folder_id, - member, - access_level) - r = self.request( - sharing.update_folder_member, - 'sharing', - arg, - None, - ) - return r - - def sharing_update_folder_policy(self, - shared_folder_id, - member_policy=None, - acl_update_policy=None, - viewer_info_policy=None, - shared_link_policy=None, - link_settings=None, - actions=None): - """ - Update the sharing policies for a shared folder. User must have - ``AccessLevel.owner`` access to the shared folder to update its - policies. Apps must have full Dropbox access to use this endpoint. - - :param str shared_folder_id: The ID for the shared folder. - :param Nullable member_policy: Who can be a member of this shared - folder. Only applicable if the current user is on a team. - :param Nullable acl_update_policy: Who can add and remove members of - this shared folder. - :param Nullable viewer_info_policy: Who can enable/disable viewer info - for this shared folder. - :param Nullable shared_link_policy: The policy to apply to shared links - created for content inside this shared folder. The current user must - be on a team to set this policy to ``SharedLinkPolicy.members``. - :param Nullable link_settings: Settings on the link for this folder. - :param Nullable actions: A list of `FolderAction`s corresponding to - `FolderPermission`s that should appear in the response's - ``SharedFolderMetadata.permissions`` field describing the actions - the authenticated user can perform on the folder. - :rtype: :class:`dropbox.sharing.SharedFolderMetadata` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.sharing.UpdateFolderPolicyError` - """ - arg = sharing.UpdateFolderPolicyArg(shared_folder_id, - member_policy, - acl_update_policy, - viewer_info_policy, - shared_link_policy, - link_settings, - actions) - r = self.request( - sharing.update_folder_policy, - 'sharing', - arg, - None, - ) - return r - - # ------------------------------------------ - # Routes in team_log namespace - - def team_log_get_events(self, - limit=1000, - account_id=None, - time=None, - category=None): - """ - Retrieves team events. Permission : Team Auditing. - - :param long limit: Number of results to return per call. - :param Nullable account_id: Filter the events by account ID. Return ony - events with this account_id as either Actor, Context, or - Participants. - :param Nullable time: Filter by time range. - :param Nullable category: Filter the returned events to a single - category. - :rtype: :class:`dropbox.team_log.GetTeamEventsResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team_log.GetTeamEventsError` - """ - arg = team_log.GetTeamEventsArg(limit, - account_id, - time, - category) - r = self.request( - team_log.get_events, - 'team_log', - arg, - None, - ) - return r - - def team_log_get_events_continue(self, - cursor): - """ - Once a cursor has been retrieved from :meth:`team_log_get_events`, use - this to paginate through all events. Permission : Team Auditing. - - :param str cursor: Indicates from what point to get the next set of - events. - :rtype: :class:`dropbox.team_log.GetTeamEventsResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team_log.GetTeamEventsContinueError` - """ - arg = team_log.GetTeamEventsContinueArg(cursor) - r = self.request( - team_log.get_events_continue, - 'team_log', - arg, - None, - ) - return r - - # ------------------------------------------ - # Routes in users namespace - - def users_get_account(self, - account_id): - """ - Get information about a user's account. - - :param str account_id: A user's account identifier. - :rtype: :class:`dropbox.users.BasicAccount` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.users.GetAccountError` - """ - arg = users.GetAccountArg(account_id) - r = self.request( - users.get_account, - 'users', - arg, - None, - ) - return r - - def users_get_account_batch(self, - account_ids): - """ - Get information about multiple user accounts. At most 300 accounts may - be queried per request. - - :param list account_ids: List of user account identifiers. Should not - contain any duplicate account IDs. - :rtype: list - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.users.GetAccountBatchError` - """ - arg = users.GetAccountBatchArg(account_ids) - r = self.request( - users.get_account_batch, - 'users', - arg, - None, - ) - return r - - def users_get_current_account(self): - """ - Get information about the current user's account. - - :rtype: :class:`dropbox.users.FullAccount` - """ - arg = None - r = self.request( - users.get_current_account, - 'users', - arg, - None, - ) - return r - - def users_get_space_usage(self): - """ - Get the space usage information for the current user's account. - - :rtype: :class:`dropbox.users.SpaceUsage` - """ - arg = None - r = self.request( - users.get_space_usage, - 'users', - arg, - None, - ) - return r - diff --git a/resources/lib/dropbox/base_team.py b/resources/lib/dropbox/base_team.py deleted file mode 100644 index 80d092a..0000000 --- a/resources/lib/dropbox/base_team.py +++ /dev/null @@ -1,1564 +0,0 @@ -# -*- coding: utf-8 -*- -# Auto-generated by Stone, do not modify. -# flake8: noqa -# pylint: skip-file - -from abc import ABCMeta, abstractmethod -import warnings - -from . import ( - async, - auth, - common, - file_properties, - file_requests, - files, - paper, - sharing, - team, - team_common, - team_log, - team_policies, - users, - users_common, -) - - -class DropboxTeamBase(object): - __metaclass__ = ABCMeta - - @abstractmethod - def request(self, route, namespace, arg, arg_binary=None): - pass - - # ------------------------------------------ - # Routes in team namespace - - def team_devices_list_member_devices(self, - team_member_id, - include_web_sessions=True, - include_desktop_clients=True, - include_mobile_clients=True): - """ - List all device sessions of a team's member. - - :param str team_member_id: The team's member id. - :param bool include_web_sessions: Whether to list web sessions of the - team's member. - :param bool include_desktop_clients: Whether to list linked desktop - devices of the team's member. - :param bool include_mobile_clients: Whether to list linked mobile - devices of the team's member. - :rtype: :class:`dropbox.team.ListMemberDevicesResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.ListMemberDevicesError` - """ - arg = team.ListMemberDevicesArg(team_member_id, - include_web_sessions, - include_desktop_clients, - include_mobile_clients) - r = self.request( - team.devices_list_member_devices, - 'team', - arg, - None, - ) - return r - - def team_devices_list_members_devices(self, - cursor=None, - include_web_sessions=True, - include_desktop_clients=True, - include_mobile_clients=True): - """ - List all device sessions of a team. - - :param Nullable cursor: At the first call to the - :meth:`team_devices_list_members_devices` the cursor shouldn't be - passed. Then, if the result of the call includes a cursor, the - following requests should include the received cursors in order to - receive the next sub list of team devices. - :param bool include_web_sessions: Whether to list web sessions of the - team members. - :param bool include_desktop_clients: Whether to list desktop clients of - the team members. - :param bool include_mobile_clients: Whether to list mobile clients of - the team members. - :rtype: :class:`dropbox.team.ListMembersDevicesResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.ListMembersDevicesError` - """ - arg = team.ListMembersDevicesArg(cursor, - include_web_sessions, - include_desktop_clients, - include_mobile_clients) - r = self.request( - team.devices_list_members_devices, - 'team', - arg, - None, - ) - return r - - def team_devices_list_team_devices(self, - cursor=None, - include_web_sessions=True, - include_desktop_clients=True, - include_mobile_clients=True): - """ - List all device sessions of a team. - - :param Nullable cursor: At the first call to the - :meth:`team_devices_list_team_devices` the cursor shouldn't be - passed. Then, if the result of the call includes a cursor, the - following requests should include the received cursors in order to - receive the next sub list of team devices. - :param bool include_web_sessions: Whether to list web sessions of the - team members. - :param bool include_desktop_clients: Whether to list desktop clients of - the team members. - :param bool include_mobile_clients: Whether to list mobile clients of - the team members. - :rtype: :class:`dropbox.team.ListTeamDevicesResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.ListTeamDevicesError` - """ - warnings.warn( - 'devices/list_team_devices is deprecated. Use devices/list_members_devices.', - DeprecationWarning, - ) - arg = team.ListTeamDevicesArg(cursor, - include_web_sessions, - include_desktop_clients, - include_mobile_clients) - r = self.request( - team.devices_list_team_devices, - 'team', - arg, - None, - ) - return r - - def team_devices_revoke_device_session(self, - arg): - """ - Revoke a device session of a team's member. - - :type arg: :class:`dropbox.team.RevokeDeviceSessionArg` - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.RevokeDeviceSessionError` - """ - r = self.request( - team.devices_revoke_device_session, - 'team', - arg, - None, - ) - return None - - def team_devices_revoke_device_session_batch(self, - revoke_devices): - """ - Revoke a list of device sessions of team members. - - :type revoke_devices: list - :rtype: :class:`dropbox.team.RevokeDeviceSessionBatchResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.RevokeDeviceSessionBatchError` - """ - arg = team.RevokeDeviceSessionBatchArg(revoke_devices) - r = self.request( - team.devices_revoke_device_session_batch, - 'team', - arg, - None, - ) - return r - - def team_features_get_values(self, - features): - """ - Get the values for one or more featues. This route allows you to check - your account's capability for what feature you can access or what value - you have for certain features. Permission : Team information. - - :param list features: A list of features in - :class:`dropbox.team.Feature`. If the list is empty, this route will - return :class:`dropbox.team.FeaturesGetValuesBatchError`. - :rtype: :class:`dropbox.team.FeaturesGetValuesBatchResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.FeaturesGetValuesBatchError` - """ - arg = team.FeaturesGetValuesBatchArg(features) - r = self.request( - team.features_get_values, - 'team', - arg, - None, - ) - return r - - def team_get_info(self): - """ - Retrieves information about a team. - - :rtype: :class:`dropbox.team.TeamGetInfoResult` - """ - arg = None - r = self.request( - team.get_info, - 'team', - arg, - None, - ) - return r - - def team_groups_create(self, - group_name, - group_external_id=None, - group_management_type=None): - """ - Creates a new, empty group, with a requested name. Permission : Team - member management. - - :param str group_name: Group name. - :param Nullable group_external_id: The creator of a team can associate - an arbitrary external ID to the group. - :param Nullable group_management_type: Whether the team can be managed - by selected users, or only by team admins. - :rtype: :class:`dropbox.team.GroupFullInfo` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.GroupCreateError` - """ - arg = team.GroupCreateArg(group_name, - group_external_id, - group_management_type) - r = self.request( - team.groups_create, - 'team', - arg, - None, - ) - return r - - def team_groups_delete(self, - arg): - """ - Deletes a group. The group is deleted immediately. However the revoking - of group-owned resources may take additional time. Use the - :meth:`team_groups_job_status_get` to determine whether this process has - completed. Permission : Team member management. - - :param arg: Argument for selecting a single group, either by group_id or - by external group ID. - :type arg: :class:`dropbox.team.GroupSelector` - :rtype: :class:`dropbox.team.LaunchEmptyResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.GroupDeleteError` - """ - r = self.request( - team.groups_delete, - 'team', - arg, - None, - ) - return r - - def team_groups_get_info(self, - arg): - """ - Retrieves information about one or more groups. Note that the optional - field ``GroupFullInfo.members`` is not returned for system-managed - groups. Permission : Team Information. - - :param arg: Argument for selecting a list of groups, either by - group_ids, or external group IDs. - :type arg: :class:`dropbox.team.GroupsSelector` - :rtype: list - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.GroupsGetInfoError` - """ - r = self.request( - team.groups_get_info, - 'team', - arg, - None, - ) - return r - - def team_groups_job_status_get(self, - async_job_id): - """ - Once an async_job_id is returned from :meth:`team_groups_delete`, - :meth:`team_groups_members_add` , or :meth:`team_groups_members_remove` - use this method to poll the status of granting/revoking group members' - access to group-owned resources. Permission : Team member management. - - :param str async_job_id: Id of the asynchronous job. This is the value - of a response returned from the method that launched the job. - :rtype: :class:`dropbox.team.PollEmptyResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.GroupsPollError` - """ - arg = async.PollArg(async_job_id) - r = self.request( - team.groups_job_status_get, - 'team', - arg, - None, - ) - return r - - def team_groups_list(self, - limit=1000): - """ - Lists groups on a team. Permission : Team Information. - - :param long limit: Number of results to return per call. - :rtype: :class:`dropbox.team.GroupsListResult` - """ - arg = team.GroupsListArg(limit) - r = self.request( - team.groups_list, - 'team', - arg, - None, - ) - return r - - def team_groups_list_continue(self, - cursor): - """ - Once a cursor has been retrieved from :meth:`team_groups_list`, use this - to paginate through all groups. Permission : Team Information. - - :param str cursor: Indicates from what point to get the next set of - groups. - :rtype: :class:`dropbox.team.GroupsListResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.GroupsListContinueError` - """ - arg = team.GroupsListContinueArg(cursor) - r = self.request( - team.groups_list_continue, - 'team', - arg, - None, - ) - return r - - def team_groups_members_add(self, - group, - members, - return_members=True): - """ - Adds members to a group. The members are added immediately. However the - granting of group-owned resources may take additional time. Use the - :meth:`team_groups_job_status_get` to determine whether this process has - completed. Permission : Team member management. - - :param group: Group to which users will be added. - :type group: :class:`dropbox.team.GroupSelector` - :param list members: List of users to be added to the group. - :rtype: :class:`dropbox.team.GroupMembersChangeResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.GroupMembersAddError` - """ - arg = team.GroupMembersAddArg(group, - members, - return_members) - r = self.request( - team.groups_members_add, - 'team', - arg, - None, - ) - return r - - def team_groups_members_list(self, - group, - limit=1000): - """ - Lists members of a group. Permission : Team Information. - - :param group: The group whose members are to be listed. - :type group: :class:`dropbox.team.GroupSelector` - :param long limit: Number of results to return per call. - :rtype: :class:`dropbox.team.GroupsMembersListResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.GroupSelectorError` - """ - arg = team.GroupsMembersListArg(group, - limit) - r = self.request( - team.groups_members_list, - 'team', - arg, - None, - ) - return r - - def team_groups_members_list_continue(self, - cursor): - """ - Once a cursor has been retrieved from :meth:`team_groups_members_list`, - use this to paginate through all members of the group. Permission : Team - information. - - :param str cursor: Indicates from what point to get the next set of - groups. - :rtype: :class:`dropbox.team.GroupsMembersListResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.GroupsMembersListContinueError` - """ - arg = team.GroupsMembersListContinueArg(cursor) - r = self.request( - team.groups_members_list_continue, - 'team', - arg, - None, - ) - return r - - def team_groups_members_remove(self, - group, - users, - return_members=True): - """ - Removes members from a group. The members are removed immediately. - However the revoking of group-owned resources may take additional time. - Use the :meth:`team_groups_job_status_get` to determine whether this - process has completed. This method permits removing the only owner of a - group, even in cases where this is not possible via the web client. - Permission : Team member management. - - :param group: Group from which users will be removed. - :type group: :class:`dropbox.team.GroupSelector` - :param list users: List of users to be removed from the group. - :rtype: :class:`dropbox.team.GroupMembersChangeResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.GroupMembersRemoveError` - """ - arg = team.GroupMembersRemoveArg(group, - users, - return_members) - r = self.request( - team.groups_members_remove, - 'team', - arg, - None, - ) - return r - - def team_groups_members_set_access_type(self, - group, - user, - access_type, - return_members=True): - """ - Sets a member's access type in a group. Permission : Team member - management. - - :param access_type: New group access type the user will have. - :type access_type: :class:`dropbox.team.GroupAccessType` - :param bool return_members: Whether to return the list of members in the - group. Note that the default value will cause all the group members - to be returned in the response. This may take a long time for large - groups. - :rtype: list - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.GroupMemberSetAccessTypeError` - """ - arg = team.GroupMembersSetAccessTypeArg(group, - user, - access_type, - return_members) - r = self.request( - team.groups_members_set_access_type, - 'team', - arg, - None, - ) - return r - - def team_groups_update(self, - group, - return_members=True, - new_group_name=None, - new_group_external_id=None, - new_group_management_type=None): - """ - Updates a group's name and/or external ID. Permission : Team member - management. - - :param group: Specify a group. - :type group: :class:`dropbox.team.GroupSelector` - :param Nullable new_group_name: Optional argument. Set group name to - this if provided. - :param Nullable new_group_external_id: Optional argument. New group - external ID. If the argument is None, the group's external_id won't - be updated. If the argument is empty string, the group's external id - will be cleared. - :param Nullable new_group_management_type: Set new group management - type, if provided. - :rtype: :class:`dropbox.team.GroupFullInfo` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.GroupUpdateError` - """ - arg = team.GroupUpdateArgs(group, - return_members, - new_group_name, - new_group_external_id, - new_group_management_type) - r = self.request( - team.groups_update, - 'team', - arg, - None, - ) - return r - - def team_linked_apps_list_member_linked_apps(self, - team_member_id): - """ - List all linked applications of the team member. Note, this endpoint - does not list any team-linked applications. - - :param str team_member_id: The team member id. - :rtype: :class:`dropbox.team.ListMemberAppsResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.ListMemberAppsError` - """ - arg = team.ListMemberAppsArg(team_member_id) - r = self.request( - team.linked_apps_list_member_linked_apps, - 'team', - arg, - None, - ) - return r - - def team_linked_apps_list_members_linked_apps(self, - cursor=None): - """ - List all applications linked to the team members' accounts. Note, this - endpoint does not list any team-linked applications. - - :param Nullable cursor: At the first call to the - :meth:`team_linked_apps_list_members_linked_apps` the cursor - shouldn't be passed. Then, if the result of the call includes a - cursor, the following requests should include the received cursors - in order to receive the next sub list of the team applications. - :rtype: :class:`dropbox.team.ListMembersAppsResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.ListMembersAppsError` - """ - arg = team.ListMembersAppsArg(cursor) - r = self.request( - team.linked_apps_list_members_linked_apps, - 'team', - arg, - None, - ) - return r - - def team_linked_apps_list_team_linked_apps(self, - cursor=None): - """ - List all applications linked to the team members' accounts. Note, this - endpoint doesn't list any team-linked applications. - - :param Nullable cursor: At the first call to the - :meth:`team_linked_apps_list_team_linked_apps` the cursor shouldn't - be passed. Then, if the result of the call includes a cursor, the - following requests should include the received cursors in order to - receive the next sub list of the team applications. - :rtype: :class:`dropbox.team.ListTeamAppsResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.ListTeamAppsError` - """ - warnings.warn( - 'linked_apps/list_team_linked_apps is deprecated. Use linked_apps/list_members_linked_apps.', - DeprecationWarning, - ) - arg = team.ListTeamAppsArg(cursor) - r = self.request( - team.linked_apps_list_team_linked_apps, - 'team', - arg, - None, - ) - return r - - def team_linked_apps_revoke_linked_app(self, - app_id, - team_member_id, - keep_app_folder=True): - """ - Revoke a linked application of the team member. - - :param str app_id: The application's unique id. - :param str team_member_id: The unique id of the member owning the - device. - :param bool keep_app_folder: Whether to keep the application dedicated - folder (in case the application uses one). - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.RevokeLinkedAppError` - """ - arg = team.RevokeLinkedApiAppArg(app_id, - team_member_id, - keep_app_folder) - r = self.request( - team.linked_apps_revoke_linked_app, - 'team', - arg, - None, - ) - return None - - def team_linked_apps_revoke_linked_app_batch(self, - revoke_linked_app): - """ - Revoke a list of linked applications of the team members. - - :type revoke_linked_app: list - :rtype: :class:`dropbox.team.RevokeLinkedAppBatchResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.RevokeLinkedAppBatchError` - """ - arg = team.RevokeLinkedApiAppBatchArg(revoke_linked_app) - r = self.request( - team.linked_apps_revoke_linked_app_batch, - 'team', - arg, - None, - ) - return r - - def team_member_space_limits_get_custom_quota(self, - users): - """ - Get users custom quota. Returns none as the custom quota if none was - set. A maximum of 1000 members can be specified in a single call. - - :param list users: List of users. - :rtype: list - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.CustomQuotaError` - """ - arg = team.CustomQuotaUsersArg(users) - r = self.request( - team.member_space_limits_get_custom_quota, - 'team', - arg, - None, - ) - return r - - def team_member_space_limits_remove_custom_quota(self, - users): - """ - Remove users custom quota. A maximum of 1000 members can be specified in - a single call. - - :param list users: List of users. - :rtype: list - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.CustomQuotaError` - """ - arg = team.CustomQuotaUsersArg(users) - r = self.request( - team.member_space_limits_remove_custom_quota, - 'team', - arg, - None, - ) - return r - - def team_member_space_limits_set_custom_quota(self, - users_and_quotas): - """ - Set users custom quota. Custom quota has to be at least 25GB. A maximum - of 1000 members can be specified in a single call. - - :param list users_and_quotas: List of users and their custom quotas. - :rtype: list - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.CustomQuotaError` - """ - arg = team.SetCustomQuotaArg(users_and_quotas) - r = self.request( - team.member_space_limits_set_custom_quota, - 'team', - arg, - None, - ) - return r - - def team_members_add(self, - new_members, - force_async=False): - """ - Adds members to a team. Permission : Team member management A maximum of - 20 members can be specified in a single call. If no Dropbox account - exists with the email address specified, a new Dropbox account will be - created with the given email address, and that account will be invited - to the team. If a personal Dropbox account exists with the email address - specified in the call, this call will create a placeholder Dropbox - account for the user on the team and send an email inviting the user to - migrate their existing personal account onto the team. Team member - management apps are required to set an initial given_name and surname - for a user to use in the team invitation and for 'Perform as team - member' actions taken on the user before they become 'active'. - - :param list new_members: Details of new members to be added to the team. - :param bool force_async: Whether to force the add to happen - asynchronously. - :rtype: :class:`dropbox.team.MembersAddLaunch` - """ - arg = team.MembersAddArg(new_members, - force_async) - r = self.request( - team.members_add, - 'team', - arg, - None, - ) - return r - - def team_members_add_job_status_get(self, - async_job_id): - """ - Once an async_job_id is returned from :meth:`team_members_add` , use - this to poll the status of the asynchronous request. Permission : Team - member management. - - :param str async_job_id: Id of the asynchronous job. This is the value - of a response returned from the method that launched the job. - :rtype: :class:`dropbox.team.MembersAddJobStatus` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.PollError` - """ - arg = async.PollArg(async_job_id) - r = self.request( - team.members_add_job_status_get, - 'team', - arg, - None, - ) - return r - - def team_members_get_info(self, - members): - """ - Returns information about multiple team members. Permission : Team - information This endpoint will return - ``MembersGetInfoItem.id_not_found``, for IDs (or emails) that cannot be - matched to a valid team member. - - :param list members: List of team members. - :rtype: list - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.MembersGetInfoError` - """ - arg = team.MembersGetInfoArgs(members) - r = self.request( - team.members_get_info, - 'team', - arg, - None, - ) - return r - - def team_members_list(self, - limit=1000, - include_removed=False): - """ - Lists members of a team. Permission : Team information. - - :param long limit: Number of results to return per call. - :param bool include_removed: Whether to return removed members. - :rtype: :class:`dropbox.team.MembersListResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.MembersListError` - """ - arg = team.MembersListArg(limit, - include_removed) - r = self.request( - team.members_list, - 'team', - arg, - None, - ) - return r - - def team_members_list_continue(self, - cursor): - """ - Once a cursor has been retrieved from :meth:`team_members_list`, use - this to paginate through all team members. Permission : Team - information. - - :param str cursor: Indicates from what point to get the next set of - members. - :rtype: :class:`dropbox.team.MembersListResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.MembersListContinueError` - """ - arg = team.MembersListContinueArg(cursor) - r = self.request( - team.members_list_continue, - 'team', - arg, - None, - ) - return r - - def team_members_recover(self, - user): - """ - Recover a deleted member. Permission : Team member management Exactly - one of team_member_id, email, or external_id must be provided to - identify the user account. - - :param user: Identity of user to recover. - :type user: :class:`dropbox.team.UserSelectorArg` - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.MembersRecoverError` - """ - arg = team.MembersRecoverArg(user) - r = self.request( - team.members_recover, - 'team', - arg, - None, - ) - return None - - def team_members_remove(self, - user, - wipe_data=True, - transfer_dest_id=None, - transfer_admin_id=None, - keep_account=False): - """ - Removes a member from a team. Permission : Team member management - Exactly one of team_member_id, email, or external_id must be provided to - identify the user account. Accounts can be recovered via - :meth:`team_members_recover` for a 7 day period or until the account has - been permanently deleted or transferred to another account (whichever - comes first). Calling :meth:`team_members_add` while a user is still - recoverable on your team will return with - ``MemberAddResult.user_already_on_team``. Accounts can have their files - transferred via the admin console for a limited time, based on the - version history length associated with the team (120 days for most - teams). This endpoint may initiate an asynchronous job. To obtain the - final result of the job, the client should periodically poll - :meth:`team_members_remove_job_status_get`. - - :param Nullable transfer_dest_id: If provided, files from the deleted - member account will be transferred to this user. - :param Nullable transfer_admin_id: If provided, errors during the - transfer process will be sent via email to this user. If the - transfer_dest_id argument was provided, then this argument must be - provided as well. - :param bool keep_account: Downgrade the member to a Basic account. The - user will retain the email address associated with their Dropbox - account and data in their account that is not restricted to team - members. In order to keep the account the argument wipe_data should - be set to False. - :rtype: :class:`dropbox.team.LaunchEmptyResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.MembersRemoveError` - """ - arg = team.MembersRemoveArg(user, - wipe_data, - transfer_dest_id, - transfer_admin_id, - keep_account) - r = self.request( - team.members_remove, - 'team', - arg, - None, - ) - return r - - def team_members_remove_job_status_get(self, - async_job_id): - """ - Once an async_job_id is returned from :meth:`team_members_remove` , use - this to poll the status of the asynchronous request. Permission : Team - member management. - - :param str async_job_id: Id of the asynchronous job. This is the value - of a response returned from the method that launched the job. - :rtype: :class:`dropbox.team.PollEmptyResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.PollError` - """ - arg = async.PollArg(async_job_id) - r = self.request( - team.members_remove_job_status_get, - 'team', - arg, - None, - ) - return r - - def team_members_send_welcome_email(self, - arg): - """ - Sends welcome email to pending team member. Permission : Team member - management Exactly one of team_member_id, email, or external_id must be - provided to identify the user account. No-op if team member is not - pending. - - :param arg: Argument for selecting a single user, either by - team_member_id, external_id or email. - :type arg: :class:`dropbox.team.UserSelectorArg` - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.MembersSendWelcomeError` - """ - r = self.request( - team.members_send_welcome_email, - 'team', - arg, - None, - ) - return None - - def team_members_set_admin_permissions(self, - user, - new_role): - """ - Updates a team member's permissions. Permission : Team member - management. - - :param user: Identity of user whose role will be set. - :type user: :class:`dropbox.team.UserSelectorArg` - :param new_role: The new role of the member. - :type new_role: :class:`dropbox.team.AdminTier` - :rtype: :class:`dropbox.team.MembersSetPermissionsResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.MembersSetPermissionsError` - """ - arg = team.MembersSetPermissionsArg(user, - new_role) - r = self.request( - team.members_set_admin_permissions, - 'team', - arg, - None, - ) - return r - - def team_members_set_profile(self, - user, - new_email=None, - new_external_id=None, - new_given_name=None, - new_surname=None, - new_persistent_id=None): - """ - Updates a team member's profile. Permission : Team member management. - - :param user: Identity of user whose profile will be set. - :type user: :class:`dropbox.team.UserSelectorArg` - :param Nullable new_email: New email for member. - :param Nullable new_external_id: New external ID for member. - :param Nullable new_given_name: New given name for member. - :param Nullable new_surname: New surname for member. - :param Nullable new_persistent_id: New persistent ID. This field only - available to teams using persistent ID SAML configuration. - :rtype: :class:`dropbox.team.TeamMemberInfo` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.MembersSetProfileError` - """ - arg = team.MembersSetProfileArg(user, - new_email, - new_external_id, - new_given_name, - new_surname, - new_persistent_id) - r = self.request( - team.members_set_profile, - 'team', - arg, - None, - ) - return r - - def team_members_suspend(self, - user, - wipe_data=True): - """ - Suspend a member from a team. Permission : Team member management - Exactly one of team_member_id, email, or external_id must be provided to - identify the user account. - - :param user: Identity of user to remove/suspend. - :type user: :class:`dropbox.team.UserSelectorArg` - :param bool wipe_data: If provided, controls if the user's data will be - deleted on their linked devices. - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.MembersSuspendError` - """ - arg = team.MembersDeactivateArg(user, - wipe_data) - r = self.request( - team.members_suspend, - 'team', - arg, - None, - ) - return None - - def team_members_unsuspend(self, - user): - """ - Unsuspend a member from a team. Permission : Team member management - Exactly one of team_member_id, email, or external_id must be provided to - identify the user account. - - :param user: Identity of user to unsuspend. - :type user: :class:`dropbox.team.UserSelectorArg` - :rtype: None - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.MembersUnsuspendError` - """ - arg = team.MembersUnsuspendArg(user) - r = self.request( - team.members_unsuspend, - 'team', - arg, - None, - ) - return None - - def team_namespaces_list(self, - limit=1000): - """ - Returns a list of all team-accessible namespaces. This list includes - team folders, shared folders containing team members, team members' home - namespaces, and team members' app folders. Home namespaces and app - folders are always owned by this team or members of the team, but shared - folders may be owned by other users or other teams. Duplicates may occur - in the list. - - :param long limit: Specifying a value here has no effect. - :rtype: :class:`dropbox.team.TeamNamespacesListResult` - """ - arg = team.TeamNamespacesListArg(limit) - r = self.request( - team.namespaces_list, - 'team', - arg, - None, - ) - return r - - def team_namespaces_list_continue(self, - cursor): - """ - Once a cursor has been retrieved from :meth:`team_namespaces_list`, use - this to paginate through all team-accessible namespaces. Duplicates may - occur in the list. - - :param str cursor: Indicates from what point to get the next set of - team-accessible namespaces. - :rtype: :class:`dropbox.team.TeamNamespacesListResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.TeamNamespacesListContinueError` - """ - arg = team.TeamNamespacesListContinueArg(cursor) - r = self.request( - team.namespaces_list_continue, - 'team', - arg, - None, - ) - return r - - def team_properties_template_add(self, - name, - description, - fields): - warnings.warn( - 'properties/template/add is deprecated.', - DeprecationWarning, - ) - arg = file_properties.AddTemplateArg(name, - description, - fields) - r = self.request( - team.properties_template_add, - 'team', - arg, - None, - ) - return r - - def team_properties_template_get(self, - template_id): - """ - :param str template_id: An identifier for template added by route See - :meth:`team_templates_add_for_user` or - :meth:`team_templates_add_for_team`. - :rtype: :class:`dropbox.team.GetTemplateResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.TemplateError` - """ - warnings.warn( - 'properties/template/get is deprecated.', - DeprecationWarning, - ) - arg = file_properties.GetTemplateArg(template_id) - r = self.request( - team.properties_template_get, - 'team', - arg, - None, - ) - return r - - def team_properties_template_list(self): - warnings.warn( - 'properties/template/list is deprecated.', - DeprecationWarning, - ) - arg = None - r = self.request( - team.properties_template_list, - 'team', - arg, - None, - ) - return r - - def team_properties_template_update(self, - template_id, - name=None, - description=None, - add_fields=None): - """ - :param str template_id: An identifier for template added by See - :meth:`team_templates_add_for_user` or - :meth:`team_templates_add_for_team`. - :param Nullable name: A display name for the template. template names - can be up to 256 bytes. - :param Nullable description: Description for the new template. Template - descriptions can be up to 1024 bytes. - :param Nullable add_fields: Property field templates to be added to the - group template. There can be up to 32 properties in a single - template. - :rtype: :class:`dropbox.team.UpdateTemplateResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.ModifyTemplateError` - """ - warnings.warn( - 'properties/template/update is deprecated.', - DeprecationWarning, - ) - arg = file_properties.UpdateTemplateArg(template_id, - name, - description, - add_fields) - r = self.request( - team.properties_template_update, - 'team', - arg, - None, - ) - return r - - def team_reports_get_activity(self, - start_date=None, - end_date=None): - """ - Retrieves reporting data about a team's user activity. - - :param Nullable start_date: Optional starting date (inclusive). - :param Nullable end_date: Optional ending date (exclusive). - :rtype: :class:`dropbox.team.GetActivityReport` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.DateRangeError` - """ - arg = team.DateRange(start_date, - end_date) - r = self.request( - team.reports_get_activity, - 'team', - arg, - None, - ) - return r - - def team_reports_get_devices(self, - start_date=None, - end_date=None): - """ - Retrieves reporting data about a team's linked devices. - - :param Nullable start_date: Optional starting date (inclusive). - :param Nullable end_date: Optional ending date (exclusive). - :rtype: :class:`dropbox.team.GetDevicesReport` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.DateRangeError` - """ - arg = team.DateRange(start_date, - end_date) - r = self.request( - team.reports_get_devices, - 'team', - arg, - None, - ) - return r - - def team_reports_get_membership(self, - start_date=None, - end_date=None): - """ - Retrieves reporting data about a team's membership. - - :param Nullable start_date: Optional starting date (inclusive). - :param Nullable end_date: Optional ending date (exclusive). - :rtype: :class:`dropbox.team.GetMembershipReport` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.DateRangeError` - """ - arg = team.DateRange(start_date, - end_date) - r = self.request( - team.reports_get_membership, - 'team', - arg, - None, - ) - return r - - def team_reports_get_storage(self, - start_date=None, - end_date=None): - """ - Retrieves reporting data about a team's storage usage. - - :param Nullable start_date: Optional starting date (inclusive). - :param Nullable end_date: Optional ending date (exclusive). - :rtype: :class:`dropbox.team.GetStorageReport` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.DateRangeError` - """ - arg = team.DateRange(start_date, - end_date) - r = self.request( - team.reports_get_storage, - 'team', - arg, - None, - ) - return r - - def team_team_folder_activate(self, - team_folder_id): - """ - Sets an archived team folder's status to active. Permission : Team - member file access. - - :param str team_folder_id: The ID of the team folder. - :rtype: :class:`dropbox.team.TeamFolderMetadata` - """ - arg = team.TeamFolderIdArg(team_folder_id) - r = self.request( - team.team_folder_activate, - 'team', - arg, - None, - ) - return r - - def team_team_folder_archive(self, - team_folder_id, - force_async_off=False): - """ - Sets an active team folder's status to archived and removes all folder - and file members. Permission : Team member file access. - - :param bool force_async_off: Whether to force the archive to happen - synchronously. - :rtype: :class:`dropbox.team.TeamFolderArchiveLaunch` - """ - arg = team.TeamFolderArchiveArg(team_folder_id, - force_async_off) - r = self.request( - team.team_folder_archive, - 'team', - arg, - None, - ) - return r - - def team_team_folder_archive_check(self, - async_job_id): - """ - Returns the status of an asynchronous job for archiving a team folder. - Permission : Team member file access. - - :param str async_job_id: Id of the asynchronous job. This is the value - of a response returned from the method that launched the job. - :rtype: :class:`dropbox.team.TeamFolderArchiveJobStatus` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.PollError` - """ - arg = async.PollArg(async_job_id) - r = self.request( - team.team_folder_archive_check, - 'team', - arg, - None, - ) - return r - - def team_team_folder_create(self, - name): - """ - Creates a new, active, team folder with no members. Permission : Team - member file access. - - :param str name: Name for the new team folder. - :rtype: :class:`dropbox.team.TeamFolderMetadata` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.TeamFolderCreateError` - """ - arg = team.TeamFolderCreateArg(name) - r = self.request( - team.team_folder_create, - 'team', - arg, - None, - ) - return r - - def team_team_folder_get_info(self, - team_folder_ids): - """ - Retrieves metadata for team folders. Permission : Team member file - access. - - :param list team_folder_ids: The list of team folder IDs. - :rtype: list - """ - arg = team.TeamFolderIdListArg(team_folder_ids) - r = self.request( - team.team_folder_get_info, - 'team', - arg, - None, - ) - return r - - def team_team_folder_list(self, - limit=1000): - """ - Lists all team folders. Permission : Team member file access. - - :param long limit: The maximum number of results to return per request. - :rtype: :class:`dropbox.team.TeamFolderListResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.TeamFolderListError` - """ - arg = team.TeamFolderListArg(limit) - r = self.request( - team.team_folder_list, - 'team', - arg, - None, - ) - return r - - def team_team_folder_list_continue(self, - cursor): - """ - Once a cursor has been retrieved from :meth:`team_team_folder_list`, use - this to paginate through all team folders. Permission : Team member file - access. - - :param str cursor: Indicates from what point to get the next set of team - folders. - :rtype: :class:`dropbox.team.TeamFolderListResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.TeamFolderListContinueError` - """ - arg = team.TeamFolderListContinueArg(cursor) - r = self.request( - team.team_folder_list_continue, - 'team', - arg, - None, - ) - return r - - def team_team_folder_permanently_delete(self, - team_folder_id): - """ - Permanently deletes an archived team folder. Permission : Team member - file access. - - :param str team_folder_id: The ID of the team folder. - :rtype: None - """ - arg = team.TeamFolderIdArg(team_folder_id) - r = self.request( - team.team_folder_permanently_delete, - 'team', - arg, - None, - ) - return None - - def team_team_folder_rename(self, - team_folder_id, - name): - """ - Changes an active team folder's name. Permission : Team member file - access. - - :param str name: New team folder name. - :rtype: :class:`dropbox.team.TeamFolderMetadata` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.TeamFolderRenameError` - """ - arg = team.TeamFolderRenameArg(team_folder_id, - name) - r = self.request( - team.team_folder_rename, - 'team', - arg, - None, - ) - return r - - def team_token_get_authenticated_admin(self): - """ - Returns the member profile of the admin who generated the team access - token used to make the call. - - :rtype: :class:`dropbox.team.TokenGetAuthenticatedAdminResult` - :raises: :class:`dropbox.exceptions.ApiError` - - If this raises, ApiError.reason is of type: - :class:`dropbox.team.TokenGetAuthenticatedAdminError` - """ - arg = None - r = self.request( - team.token_get_authenticated_admin, - 'team', - arg, - None, - ) - return r - diff --git a/resources/lib/dropbox/common.py b/resources/lib/dropbox/common.py deleted file mode 100644 index 2a26747..0000000 --- a/resources/lib/dropbox/common.py +++ /dev/null @@ -1,323 +0,0 @@ -# -*- coding: utf-8 -*- -# Auto-generated by Stone, do not modify. -# flake8: noqa -# pylint: skip-file -try: - from . import stone_validators as bv - from . import stone_base as bb -except (SystemError, ValueError): - # Catch errors raised when importing a relative module when not in a package. - # This makes testing this file directly (outside of a package) easier. - import stone_validators as bv - import stone_base as bb - -class InvalidPathRootError(object): - """ - :ivar path_root: The latest path root id for user's team if the user is - still in a team. - """ - - __slots__ = [ - '_path_root_value', - '_path_root_present', - ] - - _has_required_fields = False - - def __init__(self, - path_root=None): - self._path_root_value = None - self._path_root_present = False - if path_root is not None: - self.path_root = path_root - - @property - def path_root(self): - """ - The latest path root id for user's team if the user is still in a team. - - :rtype: str - """ - if self._path_root_present: - return self._path_root_value - else: - return None - - @path_root.setter - def path_root(self, val): - if val is None: - del self.path_root - return - val = self._path_root_validator.validate(val) - self._path_root_value = val - self._path_root_present = True - - @path_root.deleter - def path_root(self): - self._path_root_value = None - self._path_root_present = False - - def __repr__(self): - return 'InvalidPathRootError(path_root={!r})'.format( - self._path_root_value, - ) - -InvalidPathRootError_validator = bv.Struct(InvalidPathRootError) - -class PathRoot(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar home: Paths are relative to the authenticating user's home directory, - whether or not that user belongs to a team. - :ivar member_home: Paths are relative to the authenticating team member's - home directory. (This results in ``PathRootError.invalid`` if the user - does not belong to a team.). - :ivar str team: Paths are relative to the given team directory. (This - results in :field:`PathRootError.invalid` if the user is not a member of - the team associated with that path root id.). - :ivar user_home: Paths are relative to the user's home directory. (This - results in ``PathRootError.invalid`` if the belongs to a team.). - :ivar str namespace_id: Paths are relative to given namespace id (This - results in :field:`PathRootError.no_permission` if you don't have access - to this namespace.). - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - home = None - # Attribute is overwritten below the class definition - member_home = None - # Attribute is overwritten below the class definition - user_home = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def team(cls, val): - """ - Create an instance of this class set to the ``team`` tag with value - ``val``. - - :param str val: - :rtype: PathRoot - """ - return cls('team', val) - - @classmethod - def namespace_id(cls, val): - """ - Create an instance of this class set to the ``namespace_id`` tag with - value ``val``. - - :param str val: - :rtype: PathRoot - """ - return cls('namespace_id', val) - - def is_home(self): - """ - Check if the union tag is ``home``. - - :rtype: bool - """ - return self._tag == 'home' - - def is_member_home(self): - """ - Check if the union tag is ``member_home``. - - :rtype: bool - """ - return self._tag == 'member_home' - - def is_team(self): - """ - Check if the union tag is ``team``. - - :rtype: bool - """ - return self._tag == 'team' - - def is_user_home(self): - """ - Check if the union tag is ``user_home``. - - :rtype: bool - """ - return self._tag == 'user_home' - - def is_namespace_id(self): - """ - Check if the union tag is ``namespace_id``. - - :rtype: bool - """ - return self._tag == 'namespace_id' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_team(self): - """ - Paths are relative to the given team directory. (This results in - ``PathRootError.invalid`` if the user is not a member of the team - associated with that path root id.). - - Only call this if :meth:`is_team` is true. - - :rtype: str - """ - if not self.is_team(): - raise AttributeError("tag 'team' not set") - return self._value - - def get_namespace_id(self): - """ - Paths are relative to given namespace id (This results in - ``PathRootError.no_permission`` if you don't have access to this - namespace.). - - Only call this if :meth:`is_namespace_id` is true. - - :rtype: str - """ - if not self.is_namespace_id(): - raise AttributeError("tag 'namespace_id' not set") - return self._value - - def __repr__(self): - return 'PathRoot(%r, %r)' % (self._tag, self._value) - -PathRoot_validator = bv.Union(PathRoot) - -class PathRootError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar InvalidPathRootError invalid: The path root id value in - Dropbox-API-Path-Root header is no longer valid. - :ivar no_permission: You don't have permission to access the path root id in - Dropbox-API-Path-Root header. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - no_permission = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def invalid(cls, val): - """ - Create an instance of this class set to the ``invalid`` tag with value - ``val``. - - :param InvalidPathRootError val: - :rtype: PathRootError - """ - return cls('invalid', val) - - def is_invalid(self): - """ - Check if the union tag is ``invalid``. - - :rtype: bool - """ - return self._tag == 'invalid' - - def is_no_permission(self): - """ - Check if the union tag is ``no_permission``. - - :rtype: bool - """ - return self._tag == 'no_permission' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_invalid(self): - """ - The path root id value in Dropbox-API-Path-Root header is no longer - valid. - - Only call this if :meth:`is_invalid` is true. - - :rtype: InvalidPathRootError - """ - if not self.is_invalid(): - raise AttributeError("tag 'invalid' not set") - return self._value - - def __repr__(self): - return 'PathRootError(%r, %r)' % (self._tag, self._value) - -PathRootError_validator = bv.Union(PathRootError) - -Date_validator = bv.Timestamp(u'%Y-%m-%d') -DisplayName_validator = bv.String(min_length=1, pattern=u'[^/:?*<>"|]*') -DisplayNameLegacy_validator = bv.String(min_length=1) -DropboxTimestamp_validator = bv.Timestamp(u'%Y-%m-%dT%H:%M:%SZ') -EmailAddress_validator = bv.String(max_length=255, pattern=u"^['&A-Za-z0-9._%+-]+@[A-Za-z0-9-][A-Za-z0-9.-]*.[A-Za-z]{2,15}$") -# A ISO639-1 code. -LanguageCode_validator = bv.String(min_length=2) -NamePart_validator = bv.String(min_length=1, max_length=100, pattern=u'[^/:?*<>"|]*') -NamespaceId_validator = bv.String(pattern=u'[-_0-9a-zA-Z:]+') -OptionalNamePart_validator = bv.String(max_length=100, pattern=u'[^/:?*<>"|]*') -PathRootId_validator = NamespaceId_validator -SessionId_validator = bv.String() -SharedFolderId_validator = NamespaceId_validator -InvalidPathRootError._path_root_validator = bv.Nullable(PathRootId_validator) -InvalidPathRootError._all_field_names_ = set(['path_root']) -InvalidPathRootError._all_fields_ = [('path_root', InvalidPathRootError._path_root_validator)] - -PathRoot._home_validator = bv.Void() -PathRoot._member_home_validator = bv.Void() -PathRoot._team_validator = PathRootId_validator -PathRoot._user_home_validator = bv.Void() -PathRoot._namespace_id_validator = PathRootId_validator -PathRoot._other_validator = bv.Void() -PathRoot._tagmap = { - 'home': PathRoot._home_validator, - 'member_home': PathRoot._member_home_validator, - 'team': PathRoot._team_validator, - 'user_home': PathRoot._user_home_validator, - 'namespace_id': PathRoot._namespace_id_validator, - 'other': PathRoot._other_validator, -} - -PathRoot.home = PathRoot('home') -PathRoot.member_home = PathRoot('member_home') -PathRoot.user_home = PathRoot('user_home') -PathRoot.other = PathRoot('other') - -PathRootError._invalid_validator = InvalidPathRootError_validator -PathRootError._no_permission_validator = bv.Void() -PathRootError._other_validator = bv.Void() -PathRootError._tagmap = { - 'invalid': PathRootError._invalid_validator, - 'no_permission': PathRootError._no_permission_validator, - 'other': PathRootError._other_validator, -} - -PathRootError.no_permission = PathRootError('no_permission') -PathRootError.other = PathRootError('other') - -ROUTES = { -} - diff --git a/resources/lib/dropbox/dropbox.py b/resources/lib/dropbox/dropbox.py deleted file mode 100644 index 12f4c63..0000000 --- a/resources/lib/dropbox/dropbox.py +++ /dev/null @@ -1,515 +0,0 @@ -__all__ = [ - 'Dropbox', - 'DropboxTeam', - 'create_session', -] - -# This should always be 0.0.0 in master. Only update this after tagging -# before release. -__version__ = '0.0.0' - -import contextlib -import json -import logging -import random -import time - -import requests -import six - -from . import files, stone_serializers -from .auth import ( - AuthError_validator, - RateLimitError_validator, -) -from .base import DropboxBase -from .base_team import DropboxTeamBase -from .exceptions import ( - ApiError, - AuthError, - BadInputError, - HttpError, - InternalServerError, - RateLimitError, -) -from .session import ( - API_HOST, - API_CONTENT_HOST, - API_NOTIFICATION_HOST, - HOST_API, - HOST_CONTENT, - HOST_NOTIFY, - pinned_session, -) - -class RouteResult(object): - """The successful result of a call to a route.""" - - def __init__(self, obj_result, http_resp=None): - """ - :param str obj_result: The result of a route not including the binary - payload portion, if one exists. Must be serialized JSON. - :param requests.models.Response http_resp: A raw HTTP response. It will - be used to stream the binary-body payload of the response. - """ - assert isinstance(obj_result, six.string_types), \ - 'obj_result: expected string, got %r' % type(obj_result) - if http_resp is not None: - assert isinstance(http_resp, requests.models.Response), \ - 'http_resp: expected requests.models.Response, got %r' % \ - type(http_resp) - self.obj_result = obj_result - self.http_resp = http_resp - -class RouteErrorResult(object): - """The error result of a call to a route.""" - - def __init__(self, request_id, obj_result): - """ - :param str request_id: A request_id can be shared with Dropbox Support - to pinpoint the exact request that returns an error. - :param str obj_result: The result of a route not including the binary - payload portion, if one exists. - """ - self.request_id = request_id - self.obj_result = obj_result - -def create_session(max_connections=8, proxies=None): - """ - Creates a session object that can be used by multiple :class:`Dropbox` and - :class:`DropboxTeam` instances. This lets you share a connection pool - amongst them, as well as proxy parameters. - - :param int max_connections: Maximum connection pool size. - :param dict proxies: See the `requests module - `_ - for more details. - :rtype: :class:`requests.sessions.Session`. `See the requests module - `_ - for more details. - """ - # We only need as many pool_connections as we have unique hostnames. - session = pinned_session(pool_maxsize=max_connections) - if proxies: - session.proxies = proxies - return session - -class _DropboxTransport(object): - """ - Responsible for implementing the wire protocol for making requests to the - Dropbox API. - """ - - _API_VERSION = '2' - - # Download style means that the route argument goes in a Dropbox-API-Arg - # header, and the result comes back in a Dropbox-API-Result header. The - # HTTP response body contains a binary payload. - _ROUTE_STYLE_DOWNLOAD = 'download' - - # Upload style means that the route argument goes in a Dropbox-API-Arg - # header. The HTTP request body contains a binary payload. The result - # comes back in a Dropbox-API-Result header. - _ROUTE_STYLE_UPLOAD = 'upload' - - # RPC style means that the argument and result of a route are contained in - # the HTTP body. - _ROUTE_STYLE_RPC = 'rpc' - - # This is the default longest time we'll block on receiving data from the server - _DEFAULT_TIMEOUT = 30 - - def __init__(self, - oauth2_access_token, - max_retries_on_error=4, - max_retries_on_rate_limit=None, - user_agent=None, - session=None, - headers=None, - timeout=_DEFAULT_TIMEOUT): - """ - :param str oauth2_access_token: OAuth2 access token for making client - requests. - - :param int max_retries_on_error: On 5xx errors, the number of times to - retry. - :param Optional[int] max_retries_on_rate_limit: On 429 errors, the - number of times to retry. If `None`, always retries. - :param str user_agent: The user agent to use when making requests. This - helps us identify requests coming from your application. We - recommend you use the format "AppName/Version". If set, we append - "/OfficialDropboxPythonSDKv2/__version__" to the user_agent, - :param session: If not provided, a new session (connection pool) is - created. To share a session across multiple clients, use - :func:`create_session`. - :type session: :class:`requests.sessions.Session` - :param dict headers: Additional headers to add to requests. - :param Optional[float] timeout: Maximum duration in seconds that - client will wait for any single packet from the - server. After the timeout the client will give up on - connection. If `None`, client will wait forever. Defaults - to 30 seconds. - """ - assert len(oauth2_access_token) > 0, \ - 'OAuth2 access token cannot be empty.' - assert headers is None or isinstance(headers, dict), \ - 'Expected dict, got %r' % headers - self._oauth2_access_token = oauth2_access_token - - self._max_retries_on_error = max_retries_on_error - self._max_retries_on_rate_limit = max_retries_on_rate_limit - if session: - assert isinstance(session, requests.sessions.Session), \ - 'Expected requests.sessions.Session, got %r' % session - self._session = session - else: - self._session = create_session() - self._headers = headers - - base_user_agent = 'OfficialDropboxPythonSDKv2/' + __version__ - if user_agent: - self._raw_user_agent = user_agent - self._user_agent = '{}/{}'.format(user_agent, base_user_agent) - else: - self._raw_user_agent = None - self._user_agent = base_user_agent - - self._logger = logging.getLogger('dropbox') - - self._host_map = {HOST_API: API_HOST, - HOST_CONTENT: API_CONTENT_HOST, - HOST_NOTIFY: API_NOTIFICATION_HOST} - - self._timeout = timeout - - def request(self, - route, - namespace, - request_arg, - request_binary, - timeout=None): - """ - Makes a request to the Dropbox API and in the process validates that - the route argument and result are the expected data types. The - request_arg is converted to JSON based on the arg_data_type. Likewise, - the response is deserialized from JSON and converted to an object based - on the {result,error}_data_type. - - :param host: The Dropbox API host to connect to. - :param route: The route to make the request to. - :type route: :class:`.datatypes.stone_base.Route` - :param request_arg: Argument for the route that conforms to the - validator specified by route.arg_type. - :param request_binary: String or file pointer representing the binary - payload. Use None if there is no binary payload. - :param Optional[float] timeout: Maximum duration in seconds - that client will wait for any single packet from the - server. After the timeout the client will give up on - connection. If `None`, will use default timeout set on - Dropbox object. Defaults to `None`. - :return: The route's result. - """ - host = route.attrs['host'] or 'api' - route_name = namespace + '/' + route.name - route_style = route.attrs['style'] or 'rpc' - serialized_arg = stone_serializers.json_encode(route.arg_type, - request_arg) - - if (timeout is None and - route == files.list_folder_longpoll): - # The client normally sends a timeout value to the - # longpoll route. The server will respond after - # + random(0, 90) seconds. We increase the - # socket timeout to the longpoll timeout value plus 90 - # seconds so that we don't cut the server response short - # due to a shorter socket timeout. - # NB: This is done here because base.py is auto-generated - timeout = request_arg.timeout + 90 - - res = self.request_json_string_with_retry(host, - route_name, - route_style, - serialized_arg, - request_binary, - timeout=timeout) - decoded_obj_result = json.loads(res.obj_result) - if isinstance(res, RouteResult): - returned_data_type = route.result_type - obj = decoded_obj_result - elif isinstance(res, RouteErrorResult): - returned_data_type = route.error_type - obj = decoded_obj_result['error'] - user_message = decoded_obj_result.get('user_message') - user_message_text = user_message and user_message.get('text') - user_message_locale = user_message and user_message.get('locale') - else: - raise AssertionError('Expected RouteResult or RouteErrorResult, ' - 'but res is %s' % type(res)) - - deserialized_result = stone_serializers.json_compat_obj_decode( - returned_data_type, obj, strict=False) - - if isinstance(res, RouteErrorResult): - raise ApiError(res.request_id, - deserialized_result, - user_message_text, - user_message_locale) - elif route_style == self._ROUTE_STYLE_DOWNLOAD: - return (deserialized_result, res.http_resp) - else: - return deserialized_result - - def request_json_object(self, - host, - route_name, - route_style, - request_arg, - request_binary, - timeout=None): - """ - Makes a request to the Dropbox API, taking a JSON-serializable Python - object as an argument, and returning one as a response. - - :param host: The Dropbox API host to connect to. - :param route_name: The name of the route to invoke. - :param route_style: The style of the route. - :param str request_arg: A JSON-serializable Python object representing - the argument for the route. - :param Optional[bytes] request_binary: Bytes representing the binary - payload. Use None if there is no binary payload. - :param Optional[float] timeout: Maximum duration in seconds - that client will wait for any single packet from the - server. After the timeout the client will give up on - connection. If `None`, will use default timeout set on - Dropbox object. Defaults to `None`. - :return: The route's result as a JSON-serializable Python object. - """ - serialized_arg = json.dumps(request_arg) - res = self.request_json_string_with_retry(host, - route_name, - route_style, - serialized_arg, - request_binary, - timeout=timeout) - # This can throw a ValueError if the result is not deserializable, - # but that would be completely unexpected. - deserialized_result = json.loads(res.obj_result) - if isinstance(res, RouteResult) and res.http_resp is not None: - return (deserialized_result, res.http_resp) - else: - return deserialized_result - - def request_json_string_with_retry(self, - host, - route_name, - route_style, - request_json_arg, - request_binary, - timeout=None): - """ - See :meth:`request_json_object` for description of parameters. - - :param request_json_arg: A string representing the serialized JSON - argument to the route. - """ - attempt = 0 - rate_limit_errors = 0 - while True: - self._logger.info('Request to %s', route_name) - try: - return self.request_json_string(host, - route_name, - route_style, - request_json_arg, - request_binary, - timeout=timeout) - except InternalServerError as e: - attempt += 1 - if attempt <= self._max_retries_on_error: - # Use exponential backoff - backoff = 2**attempt * random.random() - self._logger.info( - 'HttpError status_code=%s: Retrying in %.1f seconds', - e.status_code, backoff) - time.sleep(backoff) - else: - raise - except RateLimitError as e: - rate_limit_errors += 1 - if (self._max_retries_on_rate_limit is None or - self._max_retries_on_rate_limit >= rate_limit_errors): - # Set default backoff to 5 seconds. - backoff = e.backoff if e.backoff is not None else 5.0 - self._logger.info( - 'Ratelimit: Retrying in %.1f seconds.', backoff) - time.sleep(backoff) - else: - raise - - def request_json_string(self, - host, - func_name, - route_style, - request_json_arg, - request_binary, - timeout=None): - """ - See :meth:`request_json_string_with_retry` for description of - parameters. - """ - if host not in self._host_map: - raise ValueError('Unknown value for host: %r' % host) - - if not isinstance(request_binary, (six.binary_type, type(None))): - # Disallow streams and file-like objects even though the underlying - # requests library supports them. This is to prevent incorrect - # behavior when a non-rewindable stream is read from, but the - # request fails and needs to be re-tried at a later time. - raise TypeError('expected request_binary as binary type, got %s' % - type(request_binary)) - - # Fully qualified hostname - fq_hostname = self._host_map[host] - url = self._get_route_url(fq_hostname, func_name) - - headers = {'User-Agent': self._user_agent} - if host != HOST_NOTIFY: - headers['Authorization'] = 'Bearer %s' % self._oauth2_access_token - if self._headers: - headers.update(self._headers) - - # The contents of the body of the HTTP request - body = None - # Whether the response should be streamed incrementally, or buffered - # entirely. If stream is True, the caller is responsible for closing - # the HTTP response. - stream = False - - if route_style == self._ROUTE_STYLE_RPC: - headers['Content-Type'] = 'application/json' - body = request_json_arg - elif route_style == self._ROUTE_STYLE_DOWNLOAD: - headers['Dropbox-API-Arg'] = request_json_arg - stream = True - elif route_style == self._ROUTE_STYLE_UPLOAD: - headers['Content-Type'] = 'application/octet-stream' - headers['Dropbox-API-Arg'] = request_json_arg - body = request_binary - else: - raise ValueError('Unknown operation style: %r' % route_style) - - if timeout is None: - timeout = self._timeout - - r = self._session.post(url, - headers=headers, - data=body, - stream=stream, - verify=True, - timeout=timeout, - ) - - request_id = r.headers.get('x-dropbox-request-id') - if r.status_code >= 500: - raise InternalServerError(request_id, r.status_code, r.text) - elif r.status_code == 400: - raise BadInputError(request_id, r.text) - elif r.status_code == 401: - assert r.headers.get('content-type') == 'application/json', ( - 'Expected content-type to be application/json, got %r' % - r.headers.get('content-type')) - err = stone_serializers.json_compat_obj_decode( - AuthError_validator, r.json()['error']) - raise AuthError(request_id, err) - elif r.status_code == 429: - err = None - if r.headers.get('content-type') == 'application/json': - err = stone_serializers.json_compat_obj_decode( - RateLimitError_validator, r.json()['error']) - retry_after = err.retry_after - else: - retry_after_str = r.headers.get('retry-after') - if retry_after_str is not None: - retry_after = int(retry_after_str) - else: - retry_after = None - raise RateLimitError(request_id, err, retry_after) - elif 200 <= r.status_code <= 299: - if route_style == self._ROUTE_STYLE_DOWNLOAD: - raw_resp = r.headers['dropbox-api-result'] - else: - assert r.headers.get('content-type') == 'application/json', ( - 'Expected content-type to be application/json, got %r' % - r.headers.get('content-type')) - raw_resp = r.content.decode('utf-8') - if route_style == self._ROUTE_STYLE_DOWNLOAD: - return RouteResult(raw_resp, r) - else: - return RouteResult(raw_resp) - elif r.status_code in (403, 404, 409): - raw_resp = r.content.decode('utf-8') - return RouteErrorResult(request_id, raw_resp) - else: - raise HttpError(request_id, r.status_code, r.text) - - def _get_route_url(self, hostname, route_name): - """Returns the URL of the route. - - :param str hostname: Hostname to make the request to. - :param str route_name: Name of the route. - :rtype: str - """ - return 'https://{hostname}/{version}/{route_name}'.format( - hostname=hostname, - version=Dropbox._API_VERSION, - route_name=route_name, - ) - - def _save_body_to_file(self, download_path, http_resp, chunksize=2**16): - """ - Saves the body of an HTTP response to a file. - - :param str download_path: Local path to save data to. - :param http_resp: The HTTP response whose body will be saved. - :type http_resp: :class:`requests.models.Response` - :rtype: None - """ - with open(download_path, 'wb') as f: - with contextlib.closing(http_resp): - for c in http_resp.iter_content(chunksize): - f.write(c) - -class Dropbox(_DropboxTransport, DropboxBase): - """ - Use this class to make requests to the Dropbox API using a user's access - token. Methods of this class are meant to act on the corresponding user's - Dropbox. - """ - pass - -class DropboxTeam(_DropboxTransport, DropboxTeamBase): - """ - Use this class to make requests to the Dropbox API using a team's access - token. Methods of this class are meant to act on the team, but there is - also an :meth:`as_user` method for assuming a team member's identity. - """ - - def as_user(self, team_member_id): - """ - Allows a team credential to assume the identity of a member of the - team. - - :return: A :class:`Dropbox` object that can be used to query on behalf - of this member of the team. - :rtype: Dropbox - """ - new_headers = self._headers.copy() if self._headers else {} - new_headers['Dropbox-API-Select-User'] = team_member_id - return Dropbox( - self._oauth2_access_token, - max_retries_on_error=self._max_retries_on_error, - max_retries_on_rate_limit=self._max_retries_on_rate_limit, - user_agent=self._raw_user_agent, - session=self._session, - headers=new_headers, - ) diff --git a/resources/lib/dropbox/exceptions.py b/resources/lib/dropbox/exceptions.py deleted file mode 100644 index 3dcead5..0000000 --- a/resources/lib/dropbox/exceptions.py +++ /dev/null @@ -1,89 +0,0 @@ -class DropboxException(Exception): - """All errors related to making an API request extend this.""" - - def __init__(self, request_id, *args, **kwargs): - # A request_id can be shared with Dropbox Support to pinpoint the exact - # request that returns an error. - super(DropboxException, self).__init__(request_id, *args, **kwargs) - self.request_id = request_id - - def __str__(self): - return repr(self) - - -class ApiError(DropboxException): - """Errors produced by the Dropbox API.""" - - def __init__(self, request_id, error, user_message_text, user_message_locale): - """ - :param (str) request_id: A request_id can be shared with Dropbox - Support to pinpoint the exact request that returns an error. - :param error: An instance of the error data type for the route. - :param (str) user_message_text: A human-readable message that can be - displayed to the end user. Is None, if unavailable. - :param (str) user_message_locale: The locale of ``user_message_text``, - if present. - """ - super(ApiError, self).__init__(request_id, error) - self.error = error - self.user_message_text = user_message_text - self.user_message_locale = user_message_locale - - def __repr__(self): - return 'ApiError({!r}, {})'.format(self.request_id, self.error) - - -class HttpError(DropboxException): - """Errors produced at the HTTP layer.""" - - def __init__(self, request_id, status_code, body): - super(HttpError, self).__init__(request_id, status_code, body) - self.status_code = status_code - self.body = body - - def __repr__(self): - return 'HttpError({!r}, {}, {!r})'.format(self.request_id, - self.status_code, self.body) - - -class BadInputError(HttpError): - """Errors due to bad input parameters to an API Operation.""" - - def __init__(self, request_id, message): - super(BadInputError, self).__init__(request_id, 400, message) - self.message = message - - def __repr__(self): - return 'BadInputError({!r}, {!r})'.format(self.request_id, self.message) - - -class AuthError(HttpError): - """Errors due to invalid authentication credentials.""" - - def __init__(self, request_id, error): - super(AuthError, self).__init__(request_id, 401, None) - self.error = error - - def __repr__(self): - return 'AuthError({!r}, {!r})'.format(self.request_id, self.error) - - -class RateLimitError(HttpError): - """Error caused by rate limiting.""" - - def __init__(self, request_id, error=None, backoff=None): - super(RateLimitError, self).__init__(request_id, 429, None) - self.error = error - self.backoff = backoff - - def __repr__(self): - return 'RateLimitError({!r}, {!r}, {!r})'.format( - self.request_id, self.error, self.backoff) - - -class InternalServerError(HttpError): - """Errors due to a problem on Dropbox.""" - - def __repr__(self): - return 'InternalServerError({!r}, {}, {!r})'.format( - self.request_id, self.status_code, self.body) diff --git a/resources/lib/dropbox/file_properties.py b/resources/lib/dropbox/file_properties.py deleted file mode 100644 index f4a5ac7..0000000 --- a/resources/lib/dropbox/file_properties.py +++ /dev/null @@ -1,2959 +0,0 @@ -# -*- coding: utf-8 -*- -# Auto-generated by Stone, do not modify. -# flake8: noqa -# pylint: skip-file -""" -This namespace contains helpers for property and template metadata endpoints. - -These endpoints enable you to tag arbitrary key/value data to Dropbox files. - -The most basic unit in this namespace is the :type:`PropertyField`. These fields encapsulate the actual key/value data. - -Fields are added to a Dropbox file using a :type:`PropertyGroup`. Property groups contain a reference to a Dropbox file and a :type:`PropertyGroupTemplate`. Property groups are uniquely identified by the combination of their associated Dropbox file and template. - -The :type:`PropertyGroupTemplate` is a way of restricting the possible key names and value types of the data within a property group. The possible key names and value types are explicitly enumerated using :type:`PropertyFieldTemplate` objects. - -You can think of a property group template as a class definition for a particular key/value metadata object, and the property groups themselves as the instantiations of these objects. -""" - -try: - from . import stone_validators as bv - from . import stone_base as bb -except (SystemError, ValueError): - # Catch errors raised when importing a relative module when not in a package. - # This makes testing this file directly (outside of a package) easier. - import stone_validators as bv - import stone_base as bb - -class AddPropertiesArg(object): - """ - :ivar path: A unique identifier for the file or folder. - :ivar property_groups: The property groups which are to be added to a - Dropbox file. - """ - - __slots__ = [ - '_path_value', - '_path_present', - '_property_groups_value', - '_property_groups_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - property_groups=None): - self._path_value = None - self._path_present = False - self._property_groups_value = None - self._property_groups_present = False - if path is not None: - self.path = path - if property_groups is not None: - self.property_groups = property_groups - - @property - def path(self): - """ - A unique identifier for the file or folder. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def property_groups(self): - """ - The property groups which are to be added to a Dropbox file. - - :rtype: list of [PropertyGroup] - """ - if self._property_groups_present: - return self._property_groups_value - else: - raise AttributeError("missing required field 'property_groups'") - - @property_groups.setter - def property_groups(self, val): - val = self._property_groups_validator.validate(val) - self._property_groups_value = val - self._property_groups_present = True - - @property_groups.deleter - def property_groups(self): - self._property_groups_value = None - self._property_groups_present = False - - def __repr__(self): - return 'AddPropertiesArg(path={!r}, property_groups={!r})'.format( - self._path_value, - self._property_groups_value, - ) - -AddPropertiesArg_validator = bv.Struct(AddPropertiesArg) - -class TemplateError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar str template_not_found: Template does not exist for the given - identifier. - :ivar restricted_content: You do not have permission to modify this - template. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - restricted_content = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def template_not_found(cls, val): - """ - Create an instance of this class set to the ``template_not_found`` tag - with value ``val``. - - :param str val: - :rtype: TemplateError - """ - return cls('template_not_found', val) - - def is_template_not_found(self): - """ - Check if the union tag is ``template_not_found``. - - :rtype: bool - """ - return self._tag == 'template_not_found' - - def is_restricted_content(self): - """ - Check if the union tag is ``restricted_content``. - - :rtype: bool - """ - return self._tag == 'restricted_content' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_template_not_found(self): - """ - Template does not exist for the given identifier. - - Only call this if :meth:`is_template_not_found` is true. - - :rtype: str - """ - if not self.is_template_not_found(): - raise AttributeError("tag 'template_not_found' not set") - return self._value - - def __repr__(self): - return 'TemplateError(%r, %r)' % (self._tag, self._value) - -TemplateError_validator = bv.Union(TemplateError) - -class PropertiesError(TemplateError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar unsupported_folder: This folder cannot be tagged. Tagging folders is - not supported for team-owned templates. - """ - - # Attribute is overwritten below the class definition - unsupported_folder = None - - @classmethod - def path(cls, val): - """ - Create an instance of this class set to the ``path`` tag with value - ``val``. - - :param LookupError val: - :rtype: PropertiesError - """ - return cls('path', val) - - def is_path(self): - """ - Check if the union tag is ``path``. - - :rtype: bool - """ - return self._tag == 'path' - - def is_unsupported_folder(self): - """ - Check if the union tag is ``unsupported_folder``. - - :rtype: bool - """ - return self._tag == 'unsupported_folder' - - def get_path(self): - """ - Only call this if :meth:`is_path` is true. - - :rtype: LookupError - """ - if not self.is_path(): - raise AttributeError("tag 'path' not set") - return self._value - - def __repr__(self): - return 'PropertiesError(%r, %r)' % (self._tag, self._value) - -PropertiesError_validator = bv.Union(PropertiesError) - -class InvalidPropertyGroupError(PropertiesError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar property_field_too_large: One or more of the supplied property field - values is too large. - :ivar does_not_fit_template: One or more of the supplied property fields - does not conform to the template specifications. - """ - - # Attribute is overwritten below the class definition - property_field_too_large = None - # Attribute is overwritten below the class definition - does_not_fit_template = None - - def is_property_field_too_large(self): - """ - Check if the union tag is ``property_field_too_large``. - - :rtype: bool - """ - return self._tag == 'property_field_too_large' - - def is_does_not_fit_template(self): - """ - Check if the union tag is ``does_not_fit_template``. - - :rtype: bool - """ - return self._tag == 'does_not_fit_template' - - def __repr__(self): - return 'InvalidPropertyGroupError(%r, %r)' % (self._tag, self._value) - -InvalidPropertyGroupError_validator = bv.Union(InvalidPropertyGroupError) - -class AddPropertiesError(InvalidPropertyGroupError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar property_group_already_exists: A property group associated with this - template and file already exists. - """ - - # Attribute is overwritten below the class definition - property_group_already_exists = None - - def is_property_group_already_exists(self): - """ - Check if the union tag is ``property_group_already_exists``. - - :rtype: bool - """ - return self._tag == 'property_group_already_exists' - - def __repr__(self): - return 'AddPropertiesError(%r, %r)' % (self._tag, self._value) - -AddPropertiesError_validator = bv.Union(AddPropertiesError) - -class PropertyGroupTemplate(object): - """ - Defines how a property group may be structured. - - :ivar name: Display name for the template. Template names can be up to 256 - bytes. - :ivar description: Description for the template. Template descriptions can - be up to 1024 bytes. - :ivar fields: Definitions of the property fields associated with this - template. There can be up to 32 properties in a single template. - """ - - __slots__ = [ - '_name_value', - '_name_present', - '_description_value', - '_description_present', - '_fields_value', - '_fields_present', - ] - - _has_required_fields = True - - def __init__(self, - name=None, - description=None, - fields=None): - self._name_value = None - self._name_present = False - self._description_value = None - self._description_present = False - self._fields_value = None - self._fields_present = False - if name is not None: - self.name = name - if description is not None: - self.description = description - if fields is not None: - self.fields = fields - - @property - def name(self): - """ - Display name for the template. Template names can be up to 256 bytes. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") - - @name.setter - def name(self, val): - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - @property - def description(self): - """ - Description for the template. Template descriptions can be up to 1024 - bytes. - - :rtype: str - """ - if self._description_present: - return self._description_value - else: - raise AttributeError("missing required field 'description'") - - @description.setter - def description(self, val): - val = self._description_validator.validate(val) - self._description_value = val - self._description_present = True - - @description.deleter - def description(self): - self._description_value = None - self._description_present = False - - @property - def fields(self): - """ - Definitions of the property fields associated with this template. There - can be up to 32 properties in a single template. - - :rtype: list of [PropertyFieldTemplate] - """ - if self._fields_present: - return self._fields_value - else: - raise AttributeError("missing required field 'fields'") - - @fields.setter - def fields(self, val): - val = self._fields_validator.validate(val) - self._fields_value = val - self._fields_present = True - - @fields.deleter - def fields(self): - self._fields_value = None - self._fields_present = False - - def __repr__(self): - return 'PropertyGroupTemplate(name={!r}, description={!r}, fields={!r})'.format( - self._name_value, - self._description_value, - self._fields_value, - ) - -PropertyGroupTemplate_validator = bv.Struct(PropertyGroupTemplate) - -class AddTemplateArg(PropertyGroupTemplate): - - __slots__ = [ - ] - - _has_required_fields = True - - def __init__(self, - name=None, - description=None, - fields=None): - super(AddTemplateArg, self).__init__(name, - description, - fields) - - def __repr__(self): - return 'AddTemplateArg(name={!r}, description={!r}, fields={!r})'.format( - self._name_value, - self._description_value, - self._fields_value, - ) - -AddTemplateArg_validator = bv.Struct(AddTemplateArg) - -class AddTemplateResult(object): - """ - :ivar template_id: An identifier for template added by See - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_user` - or - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_team`. - """ - - __slots__ = [ - '_template_id_value', - '_template_id_present', - ] - - _has_required_fields = True - - def __init__(self, - template_id=None): - self._template_id_value = None - self._template_id_present = False - if template_id is not None: - self.template_id = template_id - - @property - def template_id(self): - """ - An identifier for template added by See - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_user` - or - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_team`. - - :rtype: str - """ - if self._template_id_present: - return self._template_id_value - else: - raise AttributeError("missing required field 'template_id'") - - @template_id.setter - def template_id(self, val): - val = self._template_id_validator.validate(val) - self._template_id_value = val - self._template_id_present = True - - @template_id.deleter - def template_id(self): - self._template_id_value = None - self._template_id_present = False - - def __repr__(self): - return 'AddTemplateResult(template_id={!r})'.format( - self._template_id_value, - ) - -AddTemplateResult_validator = bv.Struct(AddTemplateResult) - -class GetTemplateArg(object): - """ - :ivar template_id: An identifier for template added by route See - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_user` - or - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_team`. - """ - - __slots__ = [ - '_template_id_value', - '_template_id_present', - ] - - _has_required_fields = True - - def __init__(self, - template_id=None): - self._template_id_value = None - self._template_id_present = False - if template_id is not None: - self.template_id = template_id - - @property - def template_id(self): - """ - An identifier for template added by route See - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_user` - or - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_team`. - - :rtype: str - """ - if self._template_id_present: - return self._template_id_value - else: - raise AttributeError("missing required field 'template_id'") - - @template_id.setter - def template_id(self, val): - val = self._template_id_validator.validate(val) - self._template_id_value = val - self._template_id_present = True - - @template_id.deleter - def template_id(self): - self._template_id_value = None - self._template_id_present = False - - def __repr__(self): - return 'GetTemplateArg(template_id={!r})'.format( - self._template_id_value, - ) - -GetTemplateArg_validator = bv.Struct(GetTemplateArg) - -class GetTemplateResult(PropertyGroupTemplate): - - __slots__ = [ - ] - - _has_required_fields = True - - def __init__(self, - name=None, - description=None, - fields=None): - super(GetTemplateResult, self).__init__(name, - description, - fields) - - def __repr__(self): - return 'GetTemplateResult(name={!r}, description={!r}, fields={!r})'.format( - self._name_value, - self._description_value, - self._fields_value, - ) - -GetTemplateResult_validator = bv.Struct(GetTemplateResult) - -class ListTemplateResult(object): - """ - :ivar template_ids: List of identifiers for templates added by See - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_user` - or - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_team`. - """ - - __slots__ = [ - '_template_ids_value', - '_template_ids_present', - ] - - _has_required_fields = True - - def __init__(self, - template_ids=None): - self._template_ids_value = None - self._template_ids_present = False - if template_ids is not None: - self.template_ids = template_ids - - @property - def template_ids(self): - """ - List of identifiers for templates added by See - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_user` - or - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_team`. - - :rtype: list of [str] - """ - if self._template_ids_present: - return self._template_ids_value - else: - raise AttributeError("missing required field 'template_ids'") - - @template_ids.setter - def template_ids(self, val): - val = self._template_ids_validator.validate(val) - self._template_ids_value = val - self._template_ids_present = True - - @template_ids.deleter - def template_ids(self): - self._template_ids_value = None - self._template_ids_present = False - - def __repr__(self): - return 'ListTemplateResult(template_ids={!r})'.format( - self._template_ids_value, - ) - -ListTemplateResult_validator = bv.Struct(ListTemplateResult) - -class LogicalOperator(bb.Union): - """ - Logical operator to join search queries together. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar or_operator: Append a query with an "or" operator. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - or_operator = None - # Attribute is overwritten below the class definition - other = None - - def is_or_operator(self): - """ - Check if the union tag is ``or_operator``. - - :rtype: bool - """ - return self._tag == 'or_operator' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'LogicalOperator(%r, %r)' % (self._tag, self._value) - -LogicalOperator_validator = bv.Union(LogicalOperator) - -class LookUpPropertiesError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar property_group_not_found: No property group was found. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - property_group_not_found = None - # Attribute is overwritten below the class definition - other = None - - def is_property_group_not_found(self): - """ - Check if the union tag is ``property_group_not_found``. - - :rtype: bool - """ - return self._tag == 'property_group_not_found' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'LookUpPropertiesError(%r, %r)' % (self._tag, self._value) - -LookUpPropertiesError_validator = bv.Union(LookUpPropertiesError) - -class LookupError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar not_found: There is nothing at the given path. - :ivar not_file: We were expecting a file, but the given path refers to - something that isn't a file. - :ivar not_folder: We were expecting a folder, but the given path refers to - something that isn't a folder. - :ivar restricted_content: The file cannot be transferred because the content - is restricted. For example, sometimes there are legal restrictions due - to copyright claims. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - not_found = None - # Attribute is overwritten below the class definition - not_file = None - # Attribute is overwritten below the class definition - not_folder = None - # Attribute is overwritten below the class definition - restricted_content = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def malformed_path(cls, val): - """ - Create an instance of this class set to the ``malformed_path`` tag with - value ``val``. - - :param str val: - :rtype: LookupError - """ - return cls('malformed_path', val) - - def is_malformed_path(self): - """ - Check if the union tag is ``malformed_path``. - - :rtype: bool - """ - return self._tag == 'malformed_path' - - def is_not_found(self): - """ - Check if the union tag is ``not_found``. - - :rtype: bool - """ - return self._tag == 'not_found' - - def is_not_file(self): - """ - Check if the union tag is ``not_file``. - - :rtype: bool - """ - return self._tag == 'not_file' - - def is_not_folder(self): - """ - Check if the union tag is ``not_folder``. - - :rtype: bool - """ - return self._tag == 'not_folder' - - def is_restricted_content(self): - """ - Check if the union tag is ``restricted_content``. - - :rtype: bool - """ - return self._tag == 'restricted_content' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_malformed_path(self): - """ - Only call this if :meth:`is_malformed_path` is true. - - :rtype: str - """ - if not self.is_malformed_path(): - raise AttributeError("tag 'malformed_path' not set") - return self._value - - def __repr__(self): - return 'LookupError(%r, %r)' % (self._tag, self._value) - -LookupError_validator = bv.Union(LookupError) - -class ModifyTemplateError(TemplateError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar conflicting_property_names: A property field key with that name - already exists in the template. - :ivar too_many_properties: There are too many properties in the changed - template. The maximum number of properties per template is 32. - :ivar too_many_templates: There are too many templates for the team. - :ivar template_attribute_too_large: The template name, description or one or - more of the property field keys is too large. - """ - - # Attribute is overwritten below the class definition - conflicting_property_names = None - # Attribute is overwritten below the class definition - too_many_properties = None - # Attribute is overwritten below the class definition - too_many_templates = None - # Attribute is overwritten below the class definition - template_attribute_too_large = None - - def is_conflicting_property_names(self): - """ - Check if the union tag is ``conflicting_property_names``. - - :rtype: bool - """ - return self._tag == 'conflicting_property_names' - - def is_too_many_properties(self): - """ - Check if the union tag is ``too_many_properties``. - - :rtype: bool - """ - return self._tag == 'too_many_properties' - - def is_too_many_templates(self): - """ - Check if the union tag is ``too_many_templates``. - - :rtype: bool - """ - return self._tag == 'too_many_templates' - - def is_template_attribute_too_large(self): - """ - Check if the union tag is ``template_attribute_too_large``. - - :rtype: bool - """ - return self._tag == 'template_attribute_too_large' - - def __repr__(self): - return 'ModifyTemplateError(%r, %r)' % (self._tag, self._value) - -ModifyTemplateError_validator = bv.Union(ModifyTemplateError) - -class OverwritePropertyGroupArg(object): - """ - :ivar path: A unique identifier for the file or folder. - :ivar property_groups: The property groups "snapshot" updates to force - apply. - """ - - __slots__ = [ - '_path_value', - '_path_present', - '_property_groups_value', - '_property_groups_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - property_groups=None): - self._path_value = None - self._path_present = False - self._property_groups_value = None - self._property_groups_present = False - if path is not None: - self.path = path - if property_groups is not None: - self.property_groups = property_groups - - @property - def path(self): - """ - A unique identifier for the file or folder. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def property_groups(self): - """ - The property groups "snapshot" updates to force apply. - - :rtype: list of [PropertyGroup] - """ - if self._property_groups_present: - return self._property_groups_value - else: - raise AttributeError("missing required field 'property_groups'") - - @property_groups.setter - def property_groups(self, val): - val = self._property_groups_validator.validate(val) - self._property_groups_value = val - self._property_groups_present = True - - @property_groups.deleter - def property_groups(self): - self._property_groups_value = None - self._property_groups_present = False - - def __repr__(self): - return 'OverwritePropertyGroupArg(path={!r}, property_groups={!r})'.format( - self._path_value, - self._property_groups_value, - ) - -OverwritePropertyGroupArg_validator = bv.Struct(OverwritePropertyGroupArg) - -class PropertiesSearchArg(object): - """ - :ivar queries: Queries to search. - :ivar template_filter: Filter results to contain only properties associated - with these template IDs. - """ - - __slots__ = [ - '_queries_value', - '_queries_present', - '_template_filter_value', - '_template_filter_present', - ] - - _has_required_fields = True - - def __init__(self, - queries=None, - template_filter=None): - self._queries_value = None - self._queries_present = False - self._template_filter_value = None - self._template_filter_present = False - if queries is not None: - self.queries = queries - if template_filter is not None: - self.template_filter = template_filter - - @property - def queries(self): - """ - Queries to search. - - :rtype: list of [PropertiesSearchQuery] - """ - if self._queries_present: - return self._queries_value - else: - raise AttributeError("missing required field 'queries'") - - @queries.setter - def queries(self, val): - val = self._queries_validator.validate(val) - self._queries_value = val - self._queries_present = True - - @queries.deleter - def queries(self): - self._queries_value = None - self._queries_present = False - - @property - def template_filter(self): - """ - Filter results to contain only properties associated with these template - IDs. - - :rtype: TemplateFilter - """ - if self._template_filter_present: - return self._template_filter_value - else: - return TemplateFilter.filter_none - - @template_filter.setter - def template_filter(self, val): - self._template_filter_validator.validate_type_only(val) - self._template_filter_value = val - self._template_filter_present = True - - @template_filter.deleter - def template_filter(self): - self._template_filter_value = None - self._template_filter_present = False - - def __repr__(self): - return 'PropertiesSearchArg(queries={!r}, template_filter={!r})'.format( - self._queries_value, - self._template_filter_value, - ) - -PropertiesSearchArg_validator = bv.Struct(PropertiesSearchArg) - -class PropertiesSearchError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def property_group_lookup(cls, val): - """ - Create an instance of this class set to the ``property_group_lookup`` - tag with value ``val``. - - :param LookUpPropertiesError val: - :rtype: PropertiesSearchError - """ - return cls('property_group_lookup', val) - - def is_property_group_lookup(self): - """ - Check if the union tag is ``property_group_lookup``. - - :rtype: bool - """ - return self._tag == 'property_group_lookup' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_property_group_lookup(self): - """ - Only call this if :meth:`is_property_group_lookup` is true. - - :rtype: LookUpPropertiesError - """ - if not self.is_property_group_lookup(): - raise AttributeError("tag 'property_group_lookup' not set") - return self._value - - def __repr__(self): - return 'PropertiesSearchError(%r, %r)' % (self._tag, self._value) - -PropertiesSearchError_validator = bv.Union(PropertiesSearchError) - -class PropertiesSearchMatch(object): - """ - :ivar id: The ID for the matched file or folder. - :ivar path: The path for the matched file or folder. - :ivar property_groups: List of custom property groups associated with the - file. - """ - - __slots__ = [ - '_id_value', - '_id_present', - '_path_value', - '_path_present', - '_property_groups_value', - '_property_groups_present', - ] - - _has_required_fields = True - - def __init__(self, - id=None, - path=None, - property_groups=None): - self._id_value = None - self._id_present = False - self._path_value = None - self._path_present = False - self._property_groups_value = None - self._property_groups_present = False - if id is not None: - self.id = id - if path is not None: - self.path = path - if property_groups is not None: - self.property_groups = property_groups - - @property - def id(self): - """ - The ID for the matched file or folder. - - :rtype: str - """ - if self._id_present: - return self._id_value - else: - raise AttributeError("missing required field 'id'") - - @id.setter - def id(self, val): - val = self._id_validator.validate(val) - self._id_value = val - self._id_present = True - - @id.deleter - def id(self): - self._id_value = None - self._id_present = False - - @property - def path(self): - """ - The path for the matched file or folder. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def property_groups(self): - """ - List of custom property groups associated with the file. - - :rtype: list of [PropertyGroup] - """ - if self._property_groups_present: - return self._property_groups_value - else: - raise AttributeError("missing required field 'property_groups'") - - @property_groups.setter - def property_groups(self, val): - val = self._property_groups_validator.validate(val) - self._property_groups_value = val - self._property_groups_present = True - - @property_groups.deleter - def property_groups(self): - self._property_groups_value = None - self._property_groups_present = False - - def __repr__(self): - return 'PropertiesSearchMatch(id={!r}, path={!r}, property_groups={!r})'.format( - self._id_value, - self._path_value, - self._property_groups_value, - ) - -PropertiesSearchMatch_validator = bv.Struct(PropertiesSearchMatch) - -class PropertiesSearchMode(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar str field_name: Search for a value associated with this field name. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def field_name(cls, val): - """ - Create an instance of this class set to the ``field_name`` tag with - value ``val``. - - :param str val: - :rtype: PropertiesSearchMode - """ - return cls('field_name', val) - - def is_field_name(self): - """ - Check if the union tag is ``field_name``. - - :rtype: bool - """ - return self._tag == 'field_name' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_field_name(self): - """ - Search for a value associated with this field name. - - Only call this if :meth:`is_field_name` is true. - - :rtype: str - """ - if not self.is_field_name(): - raise AttributeError("tag 'field_name' not set") - return self._value - - def __repr__(self): - return 'PropertiesSearchMode(%r, %r)' % (self._tag, self._value) - -PropertiesSearchMode_validator = bv.Union(PropertiesSearchMode) - -class PropertiesSearchQuery(object): - """ - :ivar query: The property field value for which to search across templates. - :ivar mode: The mode with which to perform the search. - :ivar logical_operator: The logical operator with which to append the query. - """ - - __slots__ = [ - '_query_value', - '_query_present', - '_mode_value', - '_mode_present', - '_logical_operator_value', - '_logical_operator_present', - ] - - _has_required_fields = True - - def __init__(self, - query=None, - mode=None, - logical_operator=None): - self._query_value = None - self._query_present = False - self._mode_value = None - self._mode_present = False - self._logical_operator_value = None - self._logical_operator_present = False - if query is not None: - self.query = query - if mode is not None: - self.mode = mode - if logical_operator is not None: - self.logical_operator = logical_operator - - @property - def query(self): - """ - The property field value for which to search across templates. - - :rtype: str - """ - if self._query_present: - return self._query_value - else: - raise AttributeError("missing required field 'query'") - - @query.setter - def query(self, val): - val = self._query_validator.validate(val) - self._query_value = val - self._query_present = True - - @query.deleter - def query(self): - self._query_value = None - self._query_present = False - - @property - def mode(self): - """ - The mode with which to perform the search. - - :rtype: PropertiesSearchMode - """ - if self._mode_present: - return self._mode_value - else: - raise AttributeError("missing required field 'mode'") - - @mode.setter - def mode(self, val): - self._mode_validator.validate_type_only(val) - self._mode_value = val - self._mode_present = True - - @mode.deleter - def mode(self): - self._mode_value = None - self._mode_present = False - - @property - def logical_operator(self): - """ - The logical operator with which to append the query. - - :rtype: LogicalOperator - """ - if self._logical_operator_present: - return self._logical_operator_value - else: - return LogicalOperator.or_operator - - @logical_operator.setter - def logical_operator(self, val): - self._logical_operator_validator.validate_type_only(val) - self._logical_operator_value = val - self._logical_operator_present = True - - @logical_operator.deleter - def logical_operator(self): - self._logical_operator_value = None - self._logical_operator_present = False - - def __repr__(self): - return 'PropertiesSearchQuery(query={!r}, mode={!r}, logical_operator={!r})'.format( - self._query_value, - self._mode_value, - self._logical_operator_value, - ) - -PropertiesSearchQuery_validator = bv.Struct(PropertiesSearchQuery) - -class PropertiesSearchResult(object): - """ - :ivar matches: A list (possibly empty) of matches for the query. - """ - - __slots__ = [ - '_matches_value', - '_matches_present', - ] - - _has_required_fields = True - - def __init__(self, - matches=None): - self._matches_value = None - self._matches_present = False - if matches is not None: - self.matches = matches - - @property - def matches(self): - """ - A list (possibly empty) of matches for the query. - - :rtype: list of [PropertiesSearchMatch] - """ - if self._matches_present: - return self._matches_value - else: - raise AttributeError("missing required field 'matches'") - - @matches.setter - def matches(self, val): - val = self._matches_validator.validate(val) - self._matches_value = val - self._matches_present = True - - @matches.deleter - def matches(self): - self._matches_value = None - self._matches_present = False - - def __repr__(self): - return 'PropertiesSearchResult(matches={!r})'.format( - self._matches_value, - ) - -PropertiesSearchResult_validator = bv.Struct(PropertiesSearchResult) - -class PropertyField(object): - """ - Raw key/value data to be associated with a Dropbox file. Property fields are - added to Dropbox files as a :class:`PropertyGroup`. - - :ivar name: Key of the property field associated with a file and template. - Keys can be up to 256 bytes. - :ivar value: Value of the property field associated with a file and - template. Values can be up to 1024 bytes. - """ - - __slots__ = [ - '_name_value', - '_name_present', - '_value_value', - '_value_present', - ] - - _has_required_fields = True - - def __init__(self, - name=None, - value=None): - self._name_value = None - self._name_present = False - self._value_value = None - self._value_present = False - if name is not None: - self.name = name - if value is not None: - self.value = value - - @property - def name(self): - """ - Key of the property field associated with a file and template. Keys can - be up to 256 bytes. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") - - @name.setter - def name(self, val): - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - @property - def value(self): - """ - Value of the property field associated with a file and template. Values - can be up to 1024 bytes. - - :rtype: str - """ - if self._value_present: - return self._value_value - else: - raise AttributeError("missing required field 'value'") - - @value.setter - def value(self, val): - val = self._value_validator.validate(val) - self._value_value = val - self._value_present = True - - @value.deleter - def value(self): - self._value_value = None - self._value_present = False - - def __repr__(self): - return 'PropertyField(name={!r}, value={!r})'.format( - self._name_value, - self._value_value, - ) - -PropertyField_validator = bv.Struct(PropertyField) - -class PropertyFieldTemplate(object): - """ - Defines how a single property field may be structured. Used exclusively by - :class:`PropertyGroupTemplate`. - - :ivar name: Key of the property field being described. Property field keys - can be up to 256 bytes. - :ivar description: Description of the property field. Property field - descriptions can be up to 1024 bytes. - :ivar type: Data type of the value of this property field. This type will be - enforced upon property creation and modifications. - """ - - __slots__ = [ - '_name_value', - '_name_present', - '_description_value', - '_description_present', - '_type_value', - '_type_present', - ] - - _has_required_fields = True - - def __init__(self, - name=None, - description=None, - type=None): - self._name_value = None - self._name_present = False - self._description_value = None - self._description_present = False - self._type_value = None - self._type_present = False - if name is not None: - self.name = name - if description is not None: - self.description = description - if type is not None: - self.type = type - - @property - def name(self): - """ - Key of the property field being described. Property field keys can be up - to 256 bytes. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") - - @name.setter - def name(self, val): - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - @property - def description(self): - """ - Description of the property field. Property field descriptions can be up - to 1024 bytes. - - :rtype: str - """ - if self._description_present: - return self._description_value - else: - raise AttributeError("missing required field 'description'") - - @description.setter - def description(self, val): - val = self._description_validator.validate(val) - self._description_value = val - self._description_present = True - - @description.deleter - def description(self): - self._description_value = None - self._description_present = False - - @property - def type(self): - """ - Data type of the value of this property field. This type will be - enforced upon property creation and modifications. - - :rtype: PropertyType - """ - if self._type_present: - return self._type_value - else: - raise AttributeError("missing required field 'type'") - - @type.setter - def type(self, val): - self._type_validator.validate_type_only(val) - self._type_value = val - self._type_present = True - - @type.deleter - def type(self): - self._type_value = None - self._type_present = False - - def __repr__(self): - return 'PropertyFieldTemplate(name={!r}, description={!r}, type={!r})'.format( - self._name_value, - self._description_value, - self._type_value, - ) - -PropertyFieldTemplate_validator = bv.Struct(PropertyFieldTemplate) - -class PropertyGroup(object): - """ - A subset of the property fields described by the corresponding - :class:`PropertyGroupTemplate`. Properties are always added to a Dropbox - file as a :class:`PropertyGroup`. The possible key names and value types in - this group are defined by the corresponding :class:`PropertyGroupTemplate`. - - :ivar template_id: A unique identifier for the associated template. - :ivar fields: The actual properties associated with the template. There can - be up to 32 property types per template. - """ - - __slots__ = [ - '_template_id_value', - '_template_id_present', - '_fields_value', - '_fields_present', - ] - - _has_required_fields = True - - def __init__(self, - template_id=None, - fields=None): - self._template_id_value = None - self._template_id_present = False - self._fields_value = None - self._fields_present = False - if template_id is not None: - self.template_id = template_id - if fields is not None: - self.fields = fields - - @property - def template_id(self): - """ - A unique identifier for the associated template. - - :rtype: str - """ - if self._template_id_present: - return self._template_id_value - else: - raise AttributeError("missing required field 'template_id'") - - @template_id.setter - def template_id(self, val): - val = self._template_id_validator.validate(val) - self._template_id_value = val - self._template_id_present = True - - @template_id.deleter - def template_id(self): - self._template_id_value = None - self._template_id_present = False - - @property - def fields(self): - """ - The actual properties associated with the template. There can be up to - 32 property types per template. - - :rtype: list of [PropertyField] - """ - if self._fields_present: - return self._fields_value - else: - raise AttributeError("missing required field 'fields'") - - @fields.setter - def fields(self, val): - val = self._fields_validator.validate(val) - self._fields_value = val - self._fields_present = True - - @fields.deleter - def fields(self): - self._fields_value = None - self._fields_present = False - - def __repr__(self): - return 'PropertyGroup(template_id={!r}, fields={!r})'.format( - self._template_id_value, - self._fields_value, - ) - -PropertyGroup_validator = bv.Struct(PropertyGroup) - -class PropertyGroupUpdate(object): - """ - :ivar template_id: A unique identifier for a property template. - :ivar add_or_update_fields: Property fields to update. If the property field - already exists, it is updated. If the property field doesn't exist, the - property group is added. - :ivar remove_fields: Property fields to remove (by name), provided they - exist. - """ - - __slots__ = [ - '_template_id_value', - '_template_id_present', - '_add_or_update_fields_value', - '_add_or_update_fields_present', - '_remove_fields_value', - '_remove_fields_present', - ] - - _has_required_fields = True - - def __init__(self, - template_id=None, - add_or_update_fields=None, - remove_fields=None): - self._template_id_value = None - self._template_id_present = False - self._add_or_update_fields_value = None - self._add_or_update_fields_present = False - self._remove_fields_value = None - self._remove_fields_present = False - if template_id is not None: - self.template_id = template_id - if add_or_update_fields is not None: - self.add_or_update_fields = add_or_update_fields - if remove_fields is not None: - self.remove_fields = remove_fields - - @property - def template_id(self): - """ - A unique identifier for a property template. - - :rtype: str - """ - if self._template_id_present: - return self._template_id_value - else: - raise AttributeError("missing required field 'template_id'") - - @template_id.setter - def template_id(self, val): - val = self._template_id_validator.validate(val) - self._template_id_value = val - self._template_id_present = True - - @template_id.deleter - def template_id(self): - self._template_id_value = None - self._template_id_present = False - - @property - def add_or_update_fields(self): - """ - Property fields to update. If the property field already exists, it is - updated. If the property field doesn't exist, the property group is - added. - - :rtype: list of [PropertyField] - """ - if self._add_or_update_fields_present: - return self._add_or_update_fields_value - else: - return None - - @add_or_update_fields.setter - def add_or_update_fields(self, val): - if val is None: - del self.add_or_update_fields - return - val = self._add_or_update_fields_validator.validate(val) - self._add_or_update_fields_value = val - self._add_or_update_fields_present = True - - @add_or_update_fields.deleter - def add_or_update_fields(self): - self._add_or_update_fields_value = None - self._add_or_update_fields_present = False - - @property - def remove_fields(self): - """ - Property fields to remove (by name), provided they exist. - - :rtype: list of [str] - """ - if self._remove_fields_present: - return self._remove_fields_value - else: - return None - - @remove_fields.setter - def remove_fields(self, val): - if val is None: - del self.remove_fields - return - val = self._remove_fields_validator.validate(val) - self._remove_fields_value = val - self._remove_fields_present = True - - @remove_fields.deleter - def remove_fields(self): - self._remove_fields_value = None - self._remove_fields_present = False - - def __repr__(self): - return 'PropertyGroupUpdate(template_id={!r}, add_or_update_fields={!r}, remove_fields={!r})'.format( - self._template_id_value, - self._add_or_update_fields_value, - self._remove_fields_value, - ) - -PropertyGroupUpdate_validator = bv.Struct(PropertyGroupUpdate) - -class PropertyType(bb.Union): - """ - Data type of the given property field added. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar string: The associated property field will be of type string. Unicode - is supported. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - string = None - # Attribute is overwritten below the class definition - other = None - - def is_string(self): - """ - Check if the union tag is ``string``. - - :rtype: bool - """ - return self._tag == 'string' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'PropertyType(%r, %r)' % (self._tag, self._value) - -PropertyType_validator = bv.Union(PropertyType) - -class RemovePropertiesArg(object): - """ - :ivar path: A unique identifier for the file or folder. - :ivar property_template_ids: A list of identifiers for a template created by - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_user` - or - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_team`. - """ - - __slots__ = [ - '_path_value', - '_path_present', - '_property_template_ids_value', - '_property_template_ids_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - property_template_ids=None): - self._path_value = None - self._path_present = False - self._property_template_ids_value = None - self._property_template_ids_present = False - if path is not None: - self.path = path - if property_template_ids is not None: - self.property_template_ids = property_template_ids - - @property - def path(self): - """ - A unique identifier for the file or folder. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def property_template_ids(self): - """ - A list of identifiers for a template created by - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_user` - or - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_team`. - - :rtype: list of [str] - """ - if self._property_template_ids_present: - return self._property_template_ids_value - else: - raise AttributeError("missing required field 'property_template_ids'") - - @property_template_ids.setter - def property_template_ids(self, val): - val = self._property_template_ids_validator.validate(val) - self._property_template_ids_value = val - self._property_template_ids_present = True - - @property_template_ids.deleter - def property_template_ids(self): - self._property_template_ids_value = None - self._property_template_ids_present = False - - def __repr__(self): - return 'RemovePropertiesArg(path={!r}, property_template_ids={!r})'.format( - self._path_value, - self._property_template_ids_value, - ) - -RemovePropertiesArg_validator = bv.Struct(RemovePropertiesArg) - -class RemovePropertiesError(PropertiesError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - @classmethod - def property_group_lookup(cls, val): - """ - Create an instance of this class set to the ``property_group_lookup`` - tag with value ``val``. - - :param LookUpPropertiesError val: - :rtype: RemovePropertiesError - """ - return cls('property_group_lookup', val) - - def is_property_group_lookup(self): - """ - Check if the union tag is ``property_group_lookup``. - - :rtype: bool - """ - return self._tag == 'property_group_lookup' - - def get_property_group_lookup(self): - """ - Only call this if :meth:`is_property_group_lookup` is true. - - :rtype: LookUpPropertiesError - """ - if not self.is_property_group_lookup(): - raise AttributeError("tag 'property_group_lookup' not set") - return self._value - - def __repr__(self): - return 'RemovePropertiesError(%r, %r)' % (self._tag, self._value) - -RemovePropertiesError_validator = bv.Union(RemovePropertiesError) - -class TemplateFilter(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar filter_none: No templates will be filtered from the result (all - templates will be returned). - :ivar list of [str] filter_some: Only templates with an ID in the supplied - list will be returned (a subset of templates will be returned). - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - filter_none = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def filter_some(cls, val): - """ - Create an instance of this class set to the ``filter_some`` tag with - value ``val``. - - :param list of [str] val: - :rtype: TemplateFilter - """ - return cls('filter_some', val) - - def is_filter_none(self): - """ - Check if the union tag is ``filter_none``. - - :rtype: bool - """ - return self._tag == 'filter_none' - - def is_filter_some(self): - """ - Check if the union tag is ``filter_some``. - - :rtype: bool - """ - return self._tag == 'filter_some' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_filter_some(self): - """ - Only templates with an ID in the supplied list will be returned (a - subset of templates will be returned). - - Only call this if :meth:`is_filter_some` is true. - - :rtype: list of [str] - """ - if not self.is_filter_some(): - raise AttributeError("tag 'filter_some' not set") - return self._value - - def __repr__(self): - return 'TemplateFilter(%r, %r)' % (self._tag, self._value) - -TemplateFilter_validator = bv.Union(TemplateFilter) - -class TemplateOwnerType(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar user: Template will be associated with a user. - :ivar team: Template will be associated with a team. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - user = None - # Attribute is overwritten below the class definition - team = None - # Attribute is overwritten below the class definition - other = None - - def is_user(self): - """ - Check if the union tag is ``user``. - - :rtype: bool - """ - return self._tag == 'user' - - def is_team(self): - """ - Check if the union tag is ``team``. - - :rtype: bool - """ - return self._tag == 'team' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'TemplateOwnerType(%r, %r)' % (self._tag, self._value) - -TemplateOwnerType_validator = bv.Union(TemplateOwnerType) - -class UpdatePropertiesArg(object): - """ - :ivar path: A unique identifier for the file or folder. - :ivar update_property_groups: The property groups "delta" updates to apply. - """ - - __slots__ = [ - '_path_value', - '_path_present', - '_update_property_groups_value', - '_update_property_groups_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - update_property_groups=None): - self._path_value = None - self._path_present = False - self._update_property_groups_value = None - self._update_property_groups_present = False - if path is not None: - self.path = path - if update_property_groups is not None: - self.update_property_groups = update_property_groups - - @property - def path(self): - """ - A unique identifier for the file or folder. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def update_property_groups(self): - """ - The property groups "delta" updates to apply. - - :rtype: list of [PropertyGroupUpdate] - """ - if self._update_property_groups_present: - return self._update_property_groups_value - else: - raise AttributeError("missing required field 'update_property_groups'") - - @update_property_groups.setter - def update_property_groups(self, val): - val = self._update_property_groups_validator.validate(val) - self._update_property_groups_value = val - self._update_property_groups_present = True - - @update_property_groups.deleter - def update_property_groups(self): - self._update_property_groups_value = None - self._update_property_groups_present = False - - def __repr__(self): - return 'UpdatePropertiesArg(path={!r}, update_property_groups={!r})'.format( - self._path_value, - self._update_property_groups_value, - ) - -UpdatePropertiesArg_validator = bv.Struct(UpdatePropertiesArg) - -class UpdatePropertiesError(InvalidPropertyGroupError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - @classmethod - def property_group_lookup(cls, val): - """ - Create an instance of this class set to the ``property_group_lookup`` - tag with value ``val``. - - :param LookUpPropertiesError val: - :rtype: UpdatePropertiesError - """ - return cls('property_group_lookup', val) - - def is_property_group_lookup(self): - """ - Check if the union tag is ``property_group_lookup``. - - :rtype: bool - """ - return self._tag == 'property_group_lookup' - - def get_property_group_lookup(self): - """ - Only call this if :meth:`is_property_group_lookup` is true. - - :rtype: LookUpPropertiesError - """ - if not self.is_property_group_lookup(): - raise AttributeError("tag 'property_group_lookup' not set") - return self._value - - def __repr__(self): - return 'UpdatePropertiesError(%r, %r)' % (self._tag, self._value) - -UpdatePropertiesError_validator = bv.Union(UpdatePropertiesError) - -class UpdateTemplateArg(object): - """ - :ivar template_id: An identifier for template added by See - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_user` - or - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_team`. - :ivar name: A display name for the template. template names can be up to 256 - bytes. - :ivar description: Description for the new template. Template descriptions - can be up to 1024 bytes. - :ivar add_fields: Property field templates to be added to the group - template. There can be up to 32 properties in a single template. - """ - - __slots__ = [ - '_template_id_value', - '_template_id_present', - '_name_value', - '_name_present', - '_description_value', - '_description_present', - '_add_fields_value', - '_add_fields_present', - ] - - _has_required_fields = True - - def __init__(self, - template_id=None, - name=None, - description=None, - add_fields=None): - self._template_id_value = None - self._template_id_present = False - self._name_value = None - self._name_present = False - self._description_value = None - self._description_present = False - self._add_fields_value = None - self._add_fields_present = False - if template_id is not None: - self.template_id = template_id - if name is not None: - self.name = name - if description is not None: - self.description = description - if add_fields is not None: - self.add_fields = add_fields - - @property - def template_id(self): - """ - An identifier for template added by See - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_user` - or - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_team`. - - :rtype: str - """ - if self._template_id_present: - return self._template_id_value - else: - raise AttributeError("missing required field 'template_id'") - - @template_id.setter - def template_id(self, val): - val = self._template_id_validator.validate(val) - self._template_id_value = val - self._template_id_present = True - - @template_id.deleter - def template_id(self): - self._template_id_value = None - self._template_id_present = False - - @property - def name(self): - """ - A display name for the template. template names can be up to 256 bytes. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - return None - - @name.setter - def name(self, val): - if val is None: - del self.name - return - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - @property - def description(self): - """ - Description for the new template. Template descriptions can be up to - 1024 bytes. - - :rtype: str - """ - if self._description_present: - return self._description_value - else: - return None - - @description.setter - def description(self, val): - if val is None: - del self.description - return - val = self._description_validator.validate(val) - self._description_value = val - self._description_present = True - - @description.deleter - def description(self): - self._description_value = None - self._description_present = False - - @property - def add_fields(self): - """ - Property field templates to be added to the group template. There can be - up to 32 properties in a single template. - - :rtype: list of [PropertyFieldTemplate] - """ - if self._add_fields_present: - return self._add_fields_value - else: - return None - - @add_fields.setter - def add_fields(self, val): - if val is None: - del self.add_fields - return - val = self._add_fields_validator.validate(val) - self._add_fields_value = val - self._add_fields_present = True - - @add_fields.deleter - def add_fields(self): - self._add_fields_value = None - self._add_fields_present = False - - def __repr__(self): - return 'UpdateTemplateArg(template_id={!r}, name={!r}, description={!r}, add_fields={!r})'.format( - self._template_id_value, - self._name_value, - self._description_value, - self._add_fields_value, - ) - -UpdateTemplateArg_validator = bv.Struct(UpdateTemplateArg) - -class UpdateTemplateResult(object): - """ - :ivar template_id: An identifier for template added by route See - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_user` - or - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_team`. - """ - - __slots__ = [ - '_template_id_value', - '_template_id_present', - ] - - _has_required_fields = True - - def __init__(self, - template_id=None): - self._template_id_value = None - self._template_id_present = False - if template_id is not None: - self.template_id = template_id - - @property - def template_id(self): - """ - An identifier for template added by route See - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_user` - or - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_team`. - - :rtype: str - """ - if self._template_id_present: - return self._template_id_value - else: - raise AttributeError("missing required field 'template_id'") - - @template_id.setter - def template_id(self, val): - val = self._template_id_validator.validate(val) - self._template_id_value = val - self._template_id_present = True - - @template_id.deleter - def template_id(self): - self._template_id_value = None - self._template_id_present = False - - def __repr__(self): - return 'UpdateTemplateResult(template_id={!r})'.format( - self._template_id_value, - ) - -UpdateTemplateResult_validator = bv.Struct(UpdateTemplateResult) - -Id_validator = bv.String(min_length=1) -PathOrId_validator = bv.String(pattern=u'/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/.*)?)') -TemplateId_validator = bv.String(min_length=1, pattern=u'(/|ptid:).*') -AddPropertiesArg._path_validator = PathOrId_validator -AddPropertiesArg._property_groups_validator = bv.List(PropertyGroup_validator) -AddPropertiesArg._all_field_names_ = set([ - 'path', - 'property_groups', -]) -AddPropertiesArg._all_fields_ = [ - ('path', AddPropertiesArg._path_validator), - ('property_groups', AddPropertiesArg._property_groups_validator), -] - -TemplateError._template_not_found_validator = TemplateId_validator -TemplateError._restricted_content_validator = bv.Void() -TemplateError._other_validator = bv.Void() -TemplateError._tagmap = { - 'template_not_found': TemplateError._template_not_found_validator, - 'restricted_content': TemplateError._restricted_content_validator, - 'other': TemplateError._other_validator, -} - -TemplateError.restricted_content = TemplateError('restricted_content') -TemplateError.other = TemplateError('other') - -PropertiesError._path_validator = LookupError_validator -PropertiesError._unsupported_folder_validator = bv.Void() -PropertiesError._tagmap = { - 'path': PropertiesError._path_validator, - 'unsupported_folder': PropertiesError._unsupported_folder_validator, -} -PropertiesError._tagmap.update(TemplateError._tagmap) - -PropertiesError.unsupported_folder = PropertiesError('unsupported_folder') - -InvalidPropertyGroupError._property_field_too_large_validator = bv.Void() -InvalidPropertyGroupError._does_not_fit_template_validator = bv.Void() -InvalidPropertyGroupError._tagmap = { - 'property_field_too_large': InvalidPropertyGroupError._property_field_too_large_validator, - 'does_not_fit_template': InvalidPropertyGroupError._does_not_fit_template_validator, -} -InvalidPropertyGroupError._tagmap.update(PropertiesError._tagmap) - -InvalidPropertyGroupError.property_field_too_large = InvalidPropertyGroupError('property_field_too_large') -InvalidPropertyGroupError.does_not_fit_template = InvalidPropertyGroupError('does_not_fit_template') - -AddPropertiesError._property_group_already_exists_validator = bv.Void() -AddPropertiesError._tagmap = { - 'property_group_already_exists': AddPropertiesError._property_group_already_exists_validator, -} -AddPropertiesError._tagmap.update(InvalidPropertyGroupError._tagmap) - -AddPropertiesError.property_group_already_exists = AddPropertiesError('property_group_already_exists') - -PropertyGroupTemplate._name_validator = bv.String() -PropertyGroupTemplate._description_validator = bv.String() -PropertyGroupTemplate._fields_validator = bv.List(PropertyFieldTemplate_validator) -PropertyGroupTemplate._all_field_names_ = set([ - 'name', - 'description', - 'fields', -]) -PropertyGroupTemplate._all_fields_ = [ - ('name', PropertyGroupTemplate._name_validator), - ('description', PropertyGroupTemplate._description_validator), - ('fields', PropertyGroupTemplate._fields_validator), -] - -AddTemplateArg._all_field_names_ = PropertyGroupTemplate._all_field_names_.union(set([])) -AddTemplateArg._all_fields_ = PropertyGroupTemplate._all_fields_ + [] - -AddTemplateResult._template_id_validator = TemplateId_validator -AddTemplateResult._all_field_names_ = set(['template_id']) -AddTemplateResult._all_fields_ = [('template_id', AddTemplateResult._template_id_validator)] - -GetTemplateArg._template_id_validator = TemplateId_validator -GetTemplateArg._all_field_names_ = set(['template_id']) -GetTemplateArg._all_fields_ = [('template_id', GetTemplateArg._template_id_validator)] - -GetTemplateResult._all_field_names_ = PropertyGroupTemplate._all_field_names_.union(set([])) -GetTemplateResult._all_fields_ = PropertyGroupTemplate._all_fields_ + [] - -ListTemplateResult._template_ids_validator = bv.List(TemplateId_validator) -ListTemplateResult._all_field_names_ = set(['template_ids']) -ListTemplateResult._all_fields_ = [('template_ids', ListTemplateResult._template_ids_validator)] - -LogicalOperator._or_operator_validator = bv.Void() -LogicalOperator._other_validator = bv.Void() -LogicalOperator._tagmap = { - 'or_operator': LogicalOperator._or_operator_validator, - 'other': LogicalOperator._other_validator, -} - -LogicalOperator.or_operator = LogicalOperator('or_operator') -LogicalOperator.other = LogicalOperator('other') - -LookUpPropertiesError._property_group_not_found_validator = bv.Void() -LookUpPropertiesError._other_validator = bv.Void() -LookUpPropertiesError._tagmap = { - 'property_group_not_found': LookUpPropertiesError._property_group_not_found_validator, - 'other': LookUpPropertiesError._other_validator, -} - -LookUpPropertiesError.property_group_not_found = LookUpPropertiesError('property_group_not_found') -LookUpPropertiesError.other = LookUpPropertiesError('other') - -LookupError._malformed_path_validator = bv.String() -LookupError._not_found_validator = bv.Void() -LookupError._not_file_validator = bv.Void() -LookupError._not_folder_validator = bv.Void() -LookupError._restricted_content_validator = bv.Void() -LookupError._other_validator = bv.Void() -LookupError._tagmap = { - 'malformed_path': LookupError._malformed_path_validator, - 'not_found': LookupError._not_found_validator, - 'not_file': LookupError._not_file_validator, - 'not_folder': LookupError._not_folder_validator, - 'restricted_content': LookupError._restricted_content_validator, - 'other': LookupError._other_validator, -} - -LookupError.not_found = LookupError('not_found') -LookupError.not_file = LookupError('not_file') -LookupError.not_folder = LookupError('not_folder') -LookupError.restricted_content = LookupError('restricted_content') -LookupError.other = LookupError('other') - -ModifyTemplateError._conflicting_property_names_validator = bv.Void() -ModifyTemplateError._too_many_properties_validator = bv.Void() -ModifyTemplateError._too_many_templates_validator = bv.Void() -ModifyTemplateError._template_attribute_too_large_validator = bv.Void() -ModifyTemplateError._tagmap = { - 'conflicting_property_names': ModifyTemplateError._conflicting_property_names_validator, - 'too_many_properties': ModifyTemplateError._too_many_properties_validator, - 'too_many_templates': ModifyTemplateError._too_many_templates_validator, - 'template_attribute_too_large': ModifyTemplateError._template_attribute_too_large_validator, -} -ModifyTemplateError._tagmap.update(TemplateError._tagmap) - -ModifyTemplateError.conflicting_property_names = ModifyTemplateError('conflicting_property_names') -ModifyTemplateError.too_many_properties = ModifyTemplateError('too_many_properties') -ModifyTemplateError.too_many_templates = ModifyTemplateError('too_many_templates') -ModifyTemplateError.template_attribute_too_large = ModifyTemplateError('template_attribute_too_large') - -OverwritePropertyGroupArg._path_validator = PathOrId_validator -OverwritePropertyGroupArg._property_groups_validator = bv.List(PropertyGroup_validator, min_items=1) -OverwritePropertyGroupArg._all_field_names_ = set([ - 'path', - 'property_groups', -]) -OverwritePropertyGroupArg._all_fields_ = [ - ('path', OverwritePropertyGroupArg._path_validator), - ('property_groups', OverwritePropertyGroupArg._property_groups_validator), -] - -PropertiesSearchArg._queries_validator = bv.List(PropertiesSearchQuery_validator, min_items=1) -PropertiesSearchArg._template_filter_validator = TemplateFilter_validator -PropertiesSearchArg._all_field_names_ = set([ - 'queries', - 'template_filter', -]) -PropertiesSearchArg._all_fields_ = [ - ('queries', PropertiesSearchArg._queries_validator), - ('template_filter', PropertiesSearchArg._template_filter_validator), -] - -PropertiesSearchError._property_group_lookup_validator = LookUpPropertiesError_validator -PropertiesSearchError._other_validator = bv.Void() -PropertiesSearchError._tagmap = { - 'property_group_lookup': PropertiesSearchError._property_group_lookup_validator, - 'other': PropertiesSearchError._other_validator, -} - -PropertiesSearchError.other = PropertiesSearchError('other') - -PropertiesSearchMatch._id_validator = Id_validator -PropertiesSearchMatch._path_validator = bv.String() -PropertiesSearchMatch._property_groups_validator = bv.List(PropertyGroup_validator) -PropertiesSearchMatch._all_field_names_ = set([ - 'id', - 'path', - 'property_groups', -]) -PropertiesSearchMatch._all_fields_ = [ - ('id', PropertiesSearchMatch._id_validator), - ('path', PropertiesSearchMatch._path_validator), - ('property_groups', PropertiesSearchMatch._property_groups_validator), -] - -PropertiesSearchMode._field_name_validator = bv.String() -PropertiesSearchMode._other_validator = bv.Void() -PropertiesSearchMode._tagmap = { - 'field_name': PropertiesSearchMode._field_name_validator, - 'other': PropertiesSearchMode._other_validator, -} - -PropertiesSearchMode.other = PropertiesSearchMode('other') - -PropertiesSearchQuery._query_validator = bv.String() -PropertiesSearchQuery._mode_validator = PropertiesSearchMode_validator -PropertiesSearchQuery._logical_operator_validator = LogicalOperator_validator -PropertiesSearchQuery._all_field_names_ = set([ - 'query', - 'mode', - 'logical_operator', -]) -PropertiesSearchQuery._all_fields_ = [ - ('query', PropertiesSearchQuery._query_validator), - ('mode', PropertiesSearchQuery._mode_validator), - ('logical_operator', PropertiesSearchQuery._logical_operator_validator), -] - -PropertiesSearchResult._matches_validator = bv.List(PropertiesSearchMatch_validator) -PropertiesSearchResult._all_field_names_ = set(['matches']) -PropertiesSearchResult._all_fields_ = [('matches', PropertiesSearchResult._matches_validator)] - -PropertyField._name_validator = bv.String() -PropertyField._value_validator = bv.String() -PropertyField._all_field_names_ = set([ - 'name', - 'value', -]) -PropertyField._all_fields_ = [ - ('name', PropertyField._name_validator), - ('value', PropertyField._value_validator), -] - -PropertyFieldTemplate._name_validator = bv.String() -PropertyFieldTemplate._description_validator = bv.String() -PropertyFieldTemplate._type_validator = PropertyType_validator -PropertyFieldTemplate._all_field_names_ = set([ - 'name', - 'description', - 'type', -]) -PropertyFieldTemplate._all_fields_ = [ - ('name', PropertyFieldTemplate._name_validator), - ('description', PropertyFieldTemplate._description_validator), - ('type', PropertyFieldTemplate._type_validator), -] - -PropertyGroup._template_id_validator = TemplateId_validator -PropertyGroup._fields_validator = bv.List(PropertyField_validator) -PropertyGroup._all_field_names_ = set([ - 'template_id', - 'fields', -]) -PropertyGroup._all_fields_ = [ - ('template_id', PropertyGroup._template_id_validator), - ('fields', PropertyGroup._fields_validator), -] - -PropertyGroupUpdate._template_id_validator = TemplateId_validator -PropertyGroupUpdate._add_or_update_fields_validator = bv.Nullable(bv.List(PropertyField_validator)) -PropertyGroupUpdate._remove_fields_validator = bv.Nullable(bv.List(bv.String())) -PropertyGroupUpdate._all_field_names_ = set([ - 'template_id', - 'add_or_update_fields', - 'remove_fields', -]) -PropertyGroupUpdate._all_fields_ = [ - ('template_id', PropertyGroupUpdate._template_id_validator), - ('add_or_update_fields', PropertyGroupUpdate._add_or_update_fields_validator), - ('remove_fields', PropertyGroupUpdate._remove_fields_validator), -] - -PropertyType._string_validator = bv.Void() -PropertyType._other_validator = bv.Void() -PropertyType._tagmap = { - 'string': PropertyType._string_validator, - 'other': PropertyType._other_validator, -} - -PropertyType.string = PropertyType('string') -PropertyType.other = PropertyType('other') - -RemovePropertiesArg._path_validator = PathOrId_validator -RemovePropertiesArg._property_template_ids_validator = bv.List(TemplateId_validator) -RemovePropertiesArg._all_field_names_ = set([ - 'path', - 'property_template_ids', -]) -RemovePropertiesArg._all_fields_ = [ - ('path', RemovePropertiesArg._path_validator), - ('property_template_ids', RemovePropertiesArg._property_template_ids_validator), -] - -RemovePropertiesError._property_group_lookup_validator = LookUpPropertiesError_validator -RemovePropertiesError._tagmap = { - 'property_group_lookup': RemovePropertiesError._property_group_lookup_validator, -} -RemovePropertiesError._tagmap.update(PropertiesError._tagmap) - -TemplateFilter._filter_none_validator = bv.Void() -TemplateFilter._filter_some_validator = bv.List(TemplateId_validator, min_items=1) -TemplateFilter._other_validator = bv.Void() -TemplateFilter._tagmap = { - 'filter_none': TemplateFilter._filter_none_validator, - 'filter_some': TemplateFilter._filter_some_validator, - 'other': TemplateFilter._other_validator, -} - -TemplateFilter.filter_none = TemplateFilter('filter_none') -TemplateFilter.other = TemplateFilter('other') - -TemplateOwnerType._user_validator = bv.Void() -TemplateOwnerType._team_validator = bv.Void() -TemplateOwnerType._other_validator = bv.Void() -TemplateOwnerType._tagmap = { - 'user': TemplateOwnerType._user_validator, - 'team': TemplateOwnerType._team_validator, - 'other': TemplateOwnerType._other_validator, -} - -TemplateOwnerType.user = TemplateOwnerType('user') -TemplateOwnerType.team = TemplateOwnerType('team') -TemplateOwnerType.other = TemplateOwnerType('other') - -UpdatePropertiesArg._path_validator = PathOrId_validator -UpdatePropertiesArg._update_property_groups_validator = bv.List(PropertyGroupUpdate_validator) -UpdatePropertiesArg._all_field_names_ = set([ - 'path', - 'update_property_groups', -]) -UpdatePropertiesArg._all_fields_ = [ - ('path', UpdatePropertiesArg._path_validator), - ('update_property_groups', UpdatePropertiesArg._update_property_groups_validator), -] - -UpdatePropertiesError._property_group_lookup_validator = LookUpPropertiesError_validator -UpdatePropertiesError._tagmap = { - 'property_group_lookup': UpdatePropertiesError._property_group_lookup_validator, -} -UpdatePropertiesError._tagmap.update(InvalidPropertyGroupError._tagmap) - -UpdateTemplateArg._template_id_validator = TemplateId_validator -UpdateTemplateArg._name_validator = bv.Nullable(bv.String()) -UpdateTemplateArg._description_validator = bv.Nullable(bv.String()) -UpdateTemplateArg._add_fields_validator = bv.Nullable(bv.List(PropertyFieldTemplate_validator)) -UpdateTemplateArg._all_field_names_ = set([ - 'template_id', - 'name', - 'description', - 'add_fields', -]) -UpdateTemplateArg._all_fields_ = [ - ('template_id', UpdateTemplateArg._template_id_validator), - ('name', UpdateTemplateArg._name_validator), - ('description', UpdateTemplateArg._description_validator), - ('add_fields', UpdateTemplateArg._add_fields_validator), -] - -UpdateTemplateResult._template_id_validator = TemplateId_validator -UpdateTemplateResult._all_field_names_ = set(['template_id']) -UpdateTemplateResult._all_fields_ = [('template_id', UpdateTemplateResult._template_id_validator)] - -properties_add = bb.Route( - 'properties/add', - False, - AddPropertiesArg_validator, - bv.Void(), - AddPropertiesError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -properties_overwrite = bb.Route( - 'properties/overwrite', - False, - OverwritePropertyGroupArg_validator, - bv.Void(), - InvalidPropertyGroupError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -properties_remove = bb.Route( - 'properties/remove', - False, - RemovePropertiesArg_validator, - bv.Void(), - RemovePropertiesError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -properties_search = bb.Route( - 'properties/search', - False, - PropertiesSearchArg_validator, - PropertiesSearchResult_validator, - PropertiesSearchError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -properties_update = bb.Route( - 'properties/update', - False, - UpdatePropertiesArg_validator, - bv.Void(), - UpdatePropertiesError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -templates_add_for_team = bb.Route( - 'templates/add_for_team', - False, - AddTemplateArg_validator, - AddTemplateResult_validator, - ModifyTemplateError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -templates_add_for_user = bb.Route( - 'templates/add_for_user', - False, - AddTemplateArg_validator, - AddTemplateResult_validator, - ModifyTemplateError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -templates_get_for_team = bb.Route( - 'templates/get_for_team', - False, - GetTemplateArg_validator, - GetTemplateResult_validator, - TemplateError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -templates_get_for_user = bb.Route( - 'templates/get_for_user', - False, - GetTemplateArg_validator, - GetTemplateResult_validator, - TemplateError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -templates_list_for_team = bb.Route( - 'templates/list_for_team', - False, - bv.Void(), - ListTemplateResult_validator, - TemplateError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -templates_list_for_user = bb.Route( - 'templates/list_for_user', - False, - bv.Void(), - ListTemplateResult_validator, - TemplateError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -templates_update_for_team = bb.Route( - 'templates/update_for_team', - False, - UpdateTemplateArg_validator, - UpdateTemplateResult_validator, - ModifyTemplateError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -templates_update_for_user = bb.Route( - 'templates/update_for_user', - False, - UpdateTemplateArg_validator, - UpdateTemplateResult_validator, - ModifyTemplateError_validator, - {'host': u'api', - 'style': u'rpc'}, -) - -ROUTES = { - 'properties/add': properties_add, - 'properties/overwrite': properties_overwrite, - 'properties/remove': properties_remove, - 'properties/search': properties_search, - 'properties/update': properties_update, - 'templates/add_for_team': templates_add_for_team, - 'templates/add_for_user': templates_add_for_user, - 'templates/get_for_team': templates_get_for_team, - 'templates/get_for_user': templates_get_for_user, - 'templates/list_for_team': templates_list_for_team, - 'templates/list_for_user': templates_list_for_user, - 'templates/update_for_team': templates_update_for_team, - 'templates/update_for_user': templates_update_for_user, -} - diff --git a/resources/lib/dropbox/file_requests.py b/resources/lib/dropbox/file_requests.py deleted file mode 100644 index 874db8f..0000000 --- a/resources/lib/dropbox/file_requests.py +++ /dev/null @@ -1,1434 +0,0 @@ -# -*- coding: utf-8 -*- -# Auto-generated by Stone, do not modify. -# flake8: noqa -# pylint: skip-file -""" -This namespace contains endpoints and data types for file request operations. -""" - -try: - from . import stone_validators as bv - from . import stone_base as bb -except (SystemError, ValueError): - # Catch errors raised when importing a relative module when not in a package. - # This makes testing this file directly (outside of a package) easier. - import stone_validators as bv - import stone_base as bb - -try: - from . import ( - common, - files, - ) -except (SystemError, ValueError): - import common - import files - -class CreateFileRequestArgs(object): - """ - Arguments for :meth:`dropbox.dropbox.Dropbox.file_requests_create`. - - :ivar title: The title of the file request. Must not be empty. - :ivar destination: The path of the folder in the Dropbox where uploaded - files will be sent. For apps with the app folder permission, this will - be relative to the app folder. - :ivar deadline: The deadline for the file request. Deadlines can only be set - by Pro and Business accounts. - :ivar open: Whether or not the file request should be open. If the file - request is closed, it will not accept any file submissions, but it can - be opened later. - """ - - __slots__ = [ - '_title_value', - '_title_present', - '_destination_value', - '_destination_present', - '_deadline_value', - '_deadline_present', - '_open_value', - '_open_present', - ] - - _has_required_fields = True - - def __init__(self, - title=None, - destination=None, - deadline=None, - open=None): - self._title_value = None - self._title_present = False - self._destination_value = None - self._destination_present = False - self._deadline_value = None - self._deadline_present = False - self._open_value = None - self._open_present = False - if title is not None: - self.title = title - if destination is not None: - self.destination = destination - if deadline is not None: - self.deadline = deadline - if open is not None: - self.open = open - - @property - def title(self): - """ - The title of the file request. Must not be empty. - - :rtype: str - """ - if self._title_present: - return self._title_value - else: - raise AttributeError("missing required field 'title'") - - @title.setter - def title(self, val): - val = self._title_validator.validate(val) - self._title_value = val - self._title_present = True - - @title.deleter - def title(self): - self._title_value = None - self._title_present = False - - @property - def destination(self): - """ - The path of the folder in the Dropbox where uploaded files will be sent. - For apps with the app folder permission, this will be relative to the - app folder. - - :rtype: str - """ - if self._destination_present: - return self._destination_value - else: - raise AttributeError("missing required field 'destination'") - - @destination.setter - def destination(self, val): - val = self._destination_validator.validate(val) - self._destination_value = val - self._destination_present = True - - @destination.deleter - def destination(self): - self._destination_value = None - self._destination_present = False - - @property - def deadline(self): - """ - The deadline for the file request. Deadlines can only be set by Pro and - Business accounts. - - :rtype: FileRequestDeadline - """ - if self._deadline_present: - return self._deadline_value - else: - return None - - @deadline.setter - def deadline(self, val): - if val is None: - del self.deadline - return - self._deadline_validator.validate_type_only(val) - self._deadline_value = val - self._deadline_present = True - - @deadline.deleter - def deadline(self): - self._deadline_value = None - self._deadline_present = False - - @property - def open(self): - """ - Whether or not the file request should be open. If the file request is - closed, it will not accept any file submissions, but it can be opened - later. - - :rtype: bool - """ - if self._open_present: - return self._open_value - else: - return True - - @open.setter - def open(self, val): - val = self._open_validator.validate(val) - self._open_value = val - self._open_present = True - - @open.deleter - def open(self): - self._open_value = None - self._open_present = False - - def __repr__(self): - return 'CreateFileRequestArgs(title={!r}, destination={!r}, deadline={!r}, open={!r})'.format( - self._title_value, - self._destination_value, - self._deadline_value, - self._open_value, - ) - -CreateFileRequestArgs_validator = bv.Struct(CreateFileRequestArgs) - -class GeneralFileRequestsError(bb.Union): - """ - There is an error accessing the file requests functionality. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar disabled_for_team: This user's Dropbox Business team doesn't allow - file requests. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - disabled_for_team = None - # Attribute is overwritten below the class definition - other = None - - def is_disabled_for_team(self): - """ - Check if the union tag is ``disabled_for_team``. - - :rtype: bool - """ - return self._tag == 'disabled_for_team' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'GeneralFileRequestsError(%r, %r)' % (self._tag, self._value) - -GeneralFileRequestsError_validator = bv.Union(GeneralFileRequestsError) - -class FileRequestError(GeneralFileRequestsError): - """ - There is an error with the file request. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar not_found: This file request ID was not found. - :ivar not_a_folder: The specified path is not a folder. - :ivar app_lacks_access: This file request is not accessible to this app. - Apps with the app folder permission can only access file requests in - their app folder. - :ivar no_permission: This user doesn't have permission to access or modify - this file request. - :ivar email_unverified: This user's email address is not verified. File - requests are only available on accounts with a verified email address. - Users can verify their email address `here - `_. - :ivar validation_error: There was an error validating the request. For - example, the title was invalid, or there were disallowed characters in - the destination path. - """ - - # Attribute is overwritten below the class definition - not_found = None - # Attribute is overwritten below the class definition - not_a_folder = None - # Attribute is overwritten below the class definition - app_lacks_access = None - # Attribute is overwritten below the class definition - no_permission = None - # Attribute is overwritten below the class definition - email_unverified = None - # Attribute is overwritten below the class definition - validation_error = None - - def is_not_found(self): - """ - Check if the union tag is ``not_found``. - - :rtype: bool - """ - return self._tag == 'not_found' - - def is_not_a_folder(self): - """ - Check if the union tag is ``not_a_folder``. - - :rtype: bool - """ - return self._tag == 'not_a_folder' - - def is_app_lacks_access(self): - """ - Check if the union tag is ``app_lacks_access``. - - :rtype: bool - """ - return self._tag == 'app_lacks_access' - - def is_no_permission(self): - """ - Check if the union tag is ``no_permission``. - - :rtype: bool - """ - return self._tag == 'no_permission' - - def is_email_unverified(self): - """ - Check if the union tag is ``email_unverified``. - - :rtype: bool - """ - return self._tag == 'email_unverified' - - def is_validation_error(self): - """ - Check if the union tag is ``validation_error``. - - :rtype: bool - """ - return self._tag == 'validation_error' - - def __repr__(self): - return 'FileRequestError(%r, %r)' % (self._tag, self._value) - -FileRequestError_validator = bv.Union(FileRequestError) - -class CreateFileRequestError(FileRequestError): - """ - There was an error creating the file request. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar invalid_location: File requests are not available on the specified - folder. - :ivar rate_limit: The user has reached the rate limit for creating file - requests. The limit is currently 100 file requests per day. - """ - - # Attribute is overwritten below the class definition - invalid_location = None - # Attribute is overwritten below the class definition - rate_limit = None - - def is_invalid_location(self): - """ - Check if the union tag is ``invalid_location``. - - :rtype: bool - """ - return self._tag == 'invalid_location' - - def is_rate_limit(self): - """ - Check if the union tag is ``rate_limit``. - - :rtype: bool - """ - return self._tag == 'rate_limit' - - def __repr__(self): - return 'CreateFileRequestError(%r, %r)' % (self._tag, self._value) - -CreateFileRequestError_validator = bv.Union(CreateFileRequestError) - -class FileRequest(object): - """ - A `file request `_ for receiving files - into the user's Dropbox account. - - :ivar id: The ID of the file request. - :ivar url: The URL of the file request. - :ivar title: The title of the file request. - :ivar destination: The path of the folder in the Dropbox where uploaded - files will be sent. This can be None if the destination was removed. For - apps with the app folder permission, this will be relative to the app - folder. - :ivar created: When this file request was created. - :ivar deadline: The deadline for this file request. Only set if the request - has a deadline. - :ivar is_open: Whether or not the file request is open. If the file request - is closed, it will not accept any more file submissions. - :ivar file_count: The number of files this file request has received. - """ - - __slots__ = [ - '_id_value', - '_id_present', - '_url_value', - '_url_present', - '_title_value', - '_title_present', - '_destination_value', - '_destination_present', - '_created_value', - '_created_present', - '_deadline_value', - '_deadline_present', - '_is_open_value', - '_is_open_present', - '_file_count_value', - '_file_count_present', - ] - - _has_required_fields = True - - def __init__(self, - id=None, - url=None, - title=None, - created=None, - is_open=None, - file_count=None, - destination=None, - deadline=None): - self._id_value = None - self._id_present = False - self._url_value = None - self._url_present = False - self._title_value = None - self._title_present = False - self._destination_value = None - self._destination_present = False - self._created_value = None - self._created_present = False - self._deadline_value = None - self._deadline_present = False - self._is_open_value = None - self._is_open_present = False - self._file_count_value = None - self._file_count_present = False - if id is not None: - self.id = id - if url is not None: - self.url = url - if title is not None: - self.title = title - if destination is not None: - self.destination = destination - if created is not None: - self.created = created - if deadline is not None: - self.deadline = deadline - if is_open is not None: - self.is_open = is_open - if file_count is not None: - self.file_count = file_count - - @property - def id(self): - """ - The ID of the file request. - - :rtype: str - """ - if self._id_present: - return self._id_value - else: - raise AttributeError("missing required field 'id'") - - @id.setter - def id(self, val): - val = self._id_validator.validate(val) - self._id_value = val - self._id_present = True - - @id.deleter - def id(self): - self._id_value = None - self._id_present = False - - @property - def url(self): - """ - The URL of the file request. - - :rtype: str - """ - if self._url_present: - return self._url_value - else: - raise AttributeError("missing required field 'url'") - - @url.setter - def url(self, val): - val = self._url_validator.validate(val) - self._url_value = val - self._url_present = True - - @url.deleter - def url(self): - self._url_value = None - self._url_present = False - - @property - def title(self): - """ - The title of the file request. - - :rtype: str - """ - if self._title_present: - return self._title_value - else: - raise AttributeError("missing required field 'title'") - - @title.setter - def title(self, val): - val = self._title_validator.validate(val) - self._title_value = val - self._title_present = True - - @title.deleter - def title(self): - self._title_value = None - self._title_present = False - - @property - def destination(self): - """ - The path of the folder in the Dropbox where uploaded files will be sent. - This can be None if the destination was removed. For apps with the app - folder permission, this will be relative to the app folder. - - :rtype: str - """ - if self._destination_present: - return self._destination_value - else: - return None - - @destination.setter - def destination(self, val): - if val is None: - del self.destination - return - val = self._destination_validator.validate(val) - self._destination_value = val - self._destination_present = True - - @destination.deleter - def destination(self): - self._destination_value = None - self._destination_present = False - - @property - def created(self): - """ - When this file request was created. - - :rtype: datetime.datetime - """ - if self._created_present: - return self._created_value - else: - raise AttributeError("missing required field 'created'") - - @created.setter - def created(self, val): - val = self._created_validator.validate(val) - self._created_value = val - self._created_present = True - - @created.deleter - def created(self): - self._created_value = None - self._created_present = False - - @property - def deadline(self): - """ - The deadline for this file request. Only set if the request has a - deadline. - - :rtype: FileRequestDeadline - """ - if self._deadline_present: - return self._deadline_value - else: - return None - - @deadline.setter - def deadline(self, val): - if val is None: - del self.deadline - return - self._deadline_validator.validate_type_only(val) - self._deadline_value = val - self._deadline_present = True - - @deadline.deleter - def deadline(self): - self._deadline_value = None - self._deadline_present = False - - @property - def is_open(self): - """ - Whether or not the file request is open. If the file request is closed, - it will not accept any more file submissions. - - :rtype: bool - """ - if self._is_open_present: - return self._is_open_value - else: - raise AttributeError("missing required field 'is_open'") - - @is_open.setter - def is_open(self, val): - val = self._is_open_validator.validate(val) - self._is_open_value = val - self._is_open_present = True - - @is_open.deleter - def is_open(self): - self._is_open_value = None - self._is_open_present = False - - @property - def file_count(self): - """ - The number of files this file request has received. - - :rtype: long - """ - if self._file_count_present: - return self._file_count_value - else: - raise AttributeError("missing required field 'file_count'") - - @file_count.setter - def file_count(self, val): - val = self._file_count_validator.validate(val) - self._file_count_value = val - self._file_count_present = True - - @file_count.deleter - def file_count(self): - self._file_count_value = None - self._file_count_present = False - - def __repr__(self): - return 'FileRequest(id={!r}, url={!r}, title={!r}, created={!r}, is_open={!r}, file_count={!r}, destination={!r}, deadline={!r})'.format( - self._id_value, - self._url_value, - self._title_value, - self._created_value, - self._is_open_value, - self._file_count_value, - self._destination_value, - self._deadline_value, - ) - -FileRequest_validator = bv.Struct(FileRequest) - -class FileRequestDeadline(object): - """ - :ivar deadline: The deadline for this file request. - :ivar allow_late_uploads: If set, allow uploads after the deadline has - passed. These uploads will be marked overdue. - """ - - __slots__ = [ - '_deadline_value', - '_deadline_present', - '_allow_late_uploads_value', - '_allow_late_uploads_present', - ] - - _has_required_fields = True - - def __init__(self, - deadline=None, - allow_late_uploads=None): - self._deadline_value = None - self._deadline_present = False - self._allow_late_uploads_value = None - self._allow_late_uploads_present = False - if deadline is not None: - self.deadline = deadline - if allow_late_uploads is not None: - self.allow_late_uploads = allow_late_uploads - - @property - def deadline(self): - """ - The deadline for this file request. - - :rtype: datetime.datetime - """ - if self._deadline_present: - return self._deadline_value - else: - raise AttributeError("missing required field 'deadline'") - - @deadline.setter - def deadline(self, val): - val = self._deadline_validator.validate(val) - self._deadline_value = val - self._deadline_present = True - - @deadline.deleter - def deadline(self): - self._deadline_value = None - self._deadline_present = False - - @property - def allow_late_uploads(self): - """ - If set, allow uploads after the deadline has passed. These uploads will - be marked overdue. - - :rtype: GracePeriod - """ - if self._allow_late_uploads_present: - return self._allow_late_uploads_value - else: - return None - - @allow_late_uploads.setter - def allow_late_uploads(self, val): - if val is None: - del self.allow_late_uploads - return - self._allow_late_uploads_validator.validate_type_only(val) - self._allow_late_uploads_value = val - self._allow_late_uploads_present = True - - @allow_late_uploads.deleter - def allow_late_uploads(self): - self._allow_late_uploads_value = None - self._allow_late_uploads_present = False - - def __repr__(self): - return 'FileRequestDeadline(deadline={!r}, allow_late_uploads={!r})'.format( - self._deadline_value, - self._allow_late_uploads_value, - ) - -FileRequestDeadline_validator = bv.Struct(FileRequestDeadline) - -class GetFileRequestArgs(object): - """ - Arguments for :meth:`dropbox.dropbox.Dropbox.file_requests_get`. - - :ivar id: The ID of the file request to retrieve. - """ - - __slots__ = [ - '_id_value', - '_id_present', - ] - - _has_required_fields = True - - def __init__(self, - id=None): - self._id_value = None - self._id_present = False - if id is not None: - self.id = id - - @property - def id(self): - """ - The ID of the file request to retrieve. - - :rtype: str - """ - if self._id_present: - return self._id_value - else: - raise AttributeError("missing required field 'id'") - - @id.setter - def id(self, val): - val = self._id_validator.validate(val) - self._id_value = val - self._id_present = True - - @id.deleter - def id(self): - self._id_value = None - self._id_present = False - - def __repr__(self): - return 'GetFileRequestArgs(id={!r})'.format( - self._id_value, - ) - -GetFileRequestArgs_validator = bv.Struct(GetFileRequestArgs) - -class GetFileRequestError(FileRequestError): - """ - There was an error retrieving the specified file request. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - def __repr__(self): - return 'GetFileRequestError(%r, %r)' % (self._tag, self._value) - -GetFileRequestError_validator = bv.Union(GetFileRequestError) - -class GracePeriod(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - one_day = None - # Attribute is overwritten below the class definition - two_days = None - # Attribute is overwritten below the class definition - seven_days = None - # Attribute is overwritten below the class definition - thirty_days = None - # Attribute is overwritten below the class definition - always = None - # Attribute is overwritten below the class definition - other = None - - def is_one_day(self): - """ - Check if the union tag is ``one_day``. - - :rtype: bool - """ - return self._tag == 'one_day' - - def is_two_days(self): - """ - Check if the union tag is ``two_days``. - - :rtype: bool - """ - return self._tag == 'two_days' - - def is_seven_days(self): - """ - Check if the union tag is ``seven_days``. - - :rtype: bool - """ - return self._tag == 'seven_days' - - def is_thirty_days(self): - """ - Check if the union tag is ``thirty_days``. - - :rtype: bool - """ - return self._tag == 'thirty_days' - - def is_always(self): - """ - Check if the union tag is ``always``. - - :rtype: bool - """ - return self._tag == 'always' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'GracePeriod(%r, %r)' % (self._tag, self._value) - -GracePeriod_validator = bv.Union(GracePeriod) - -class ListFileRequestsError(GeneralFileRequestsError): - """ - There was an error retrieving the file requests. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - def __repr__(self): - return 'ListFileRequestsError(%r, %r)' % (self._tag, self._value) - -ListFileRequestsError_validator = bv.Union(ListFileRequestsError) - -class ListFileRequestsResult(object): - """ - Result for :meth:`dropbox.dropbox.Dropbox.file_requests_list`. - - :ivar file_requests: The file requests owned by this user. Apps with the app - folder permission will only see file requests in their app folder. - """ - - __slots__ = [ - '_file_requests_value', - '_file_requests_present', - ] - - _has_required_fields = True - - def __init__(self, - file_requests=None): - self._file_requests_value = None - self._file_requests_present = False - if file_requests is not None: - self.file_requests = file_requests - - @property - def file_requests(self): - """ - The file requests owned by this user. Apps with the app folder - permission will only see file requests in their app folder. - - :rtype: list of [FileRequest] - """ - if self._file_requests_present: - return self._file_requests_value - else: - raise AttributeError("missing required field 'file_requests'") - - @file_requests.setter - def file_requests(self, val): - val = self._file_requests_validator.validate(val) - self._file_requests_value = val - self._file_requests_present = True - - @file_requests.deleter - def file_requests(self): - self._file_requests_value = None - self._file_requests_present = False - - def __repr__(self): - return 'ListFileRequestsResult(file_requests={!r})'.format( - self._file_requests_value, - ) - -ListFileRequestsResult_validator = bv.Struct(ListFileRequestsResult) - -class UpdateFileRequestArgs(object): - """ - Arguments for :meth:`dropbox.dropbox.Dropbox.file_requests_update`. - - :ivar id: The ID of the file request to update. - :ivar title: The new title of the file request. Must not be empty. - :ivar destination: The new path of the folder in the Dropbox where uploaded - files will be sent. For apps with the app folder permission, this will - be relative to the app folder. - :ivar deadline: The new deadline for the file request. - :ivar open: Whether to set this file request as open or closed. - """ - - __slots__ = [ - '_id_value', - '_id_present', - '_title_value', - '_title_present', - '_destination_value', - '_destination_present', - '_deadline_value', - '_deadline_present', - '_open_value', - '_open_present', - ] - - _has_required_fields = True - - def __init__(self, - id=None, - title=None, - destination=None, - deadline=None, - open=None): - self._id_value = None - self._id_present = False - self._title_value = None - self._title_present = False - self._destination_value = None - self._destination_present = False - self._deadline_value = None - self._deadline_present = False - self._open_value = None - self._open_present = False - if id is not None: - self.id = id - if title is not None: - self.title = title - if destination is not None: - self.destination = destination - if deadline is not None: - self.deadline = deadline - if open is not None: - self.open = open - - @property - def id(self): - """ - The ID of the file request to update. - - :rtype: str - """ - if self._id_present: - return self._id_value - else: - raise AttributeError("missing required field 'id'") - - @id.setter - def id(self, val): - val = self._id_validator.validate(val) - self._id_value = val - self._id_present = True - - @id.deleter - def id(self): - self._id_value = None - self._id_present = False - - @property - def title(self): - """ - The new title of the file request. Must not be empty. - - :rtype: str - """ - if self._title_present: - return self._title_value - else: - return None - - @title.setter - def title(self, val): - if val is None: - del self.title - return - val = self._title_validator.validate(val) - self._title_value = val - self._title_present = True - - @title.deleter - def title(self): - self._title_value = None - self._title_present = False - - @property - def destination(self): - """ - The new path of the folder in the Dropbox where uploaded files will be - sent. For apps with the app folder permission, this will be relative to - the app folder. - - :rtype: str - """ - if self._destination_present: - return self._destination_value - else: - return None - - @destination.setter - def destination(self, val): - if val is None: - del self.destination - return - val = self._destination_validator.validate(val) - self._destination_value = val - self._destination_present = True - - @destination.deleter - def destination(self): - self._destination_value = None - self._destination_present = False - - @property - def deadline(self): - """ - The new deadline for the file request. - - :rtype: UpdateFileRequestDeadline - """ - if self._deadline_present: - return self._deadline_value - else: - return UpdateFileRequestDeadline.no_update - - @deadline.setter - def deadline(self, val): - self._deadline_validator.validate_type_only(val) - self._deadline_value = val - self._deadline_present = True - - @deadline.deleter - def deadline(self): - self._deadline_value = None - self._deadline_present = False - - @property - def open(self): - """ - Whether to set this file request as open or closed. - - :rtype: bool - """ - if self._open_present: - return self._open_value - else: - return None - - @open.setter - def open(self, val): - if val is None: - del self.open - return - val = self._open_validator.validate(val) - self._open_value = val - self._open_present = True - - @open.deleter - def open(self): - self._open_value = None - self._open_present = False - - def __repr__(self): - return 'UpdateFileRequestArgs(id={!r}, title={!r}, destination={!r}, deadline={!r}, open={!r})'.format( - self._id_value, - self._title_value, - self._destination_value, - self._deadline_value, - self._open_value, - ) - -UpdateFileRequestArgs_validator = bv.Struct(UpdateFileRequestArgs) - -class UpdateFileRequestDeadline(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar no_update: Do not change the file request's deadline. - :ivar Optional[FileRequestDeadline] update: If :val:`null`, the file - request's deadline is cleared. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - no_update = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def update(cls, val): - """ - Create an instance of this class set to the ``update`` tag with value - ``val``. - - :param FileRequestDeadline val: - :rtype: UpdateFileRequestDeadline - """ - return cls('update', val) - - def is_no_update(self): - """ - Check if the union tag is ``no_update``. - - :rtype: bool - """ - return self._tag == 'no_update' - - def is_update(self): - """ - Check if the union tag is ``update``. - - :rtype: bool - """ - return self._tag == 'update' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_update(self): - """ - If None, the file request's deadline is cleared. - - Only call this if :meth:`is_update` is true. - - :rtype: FileRequestDeadline - """ - if not self.is_update(): - raise AttributeError("tag 'update' not set") - return self._value - - def __repr__(self): - return 'UpdateFileRequestDeadline(%r, %r)' % (self._tag, self._value) - -UpdateFileRequestDeadline_validator = bv.Union(UpdateFileRequestDeadline) - -class UpdateFileRequestError(FileRequestError): - """ - There is an error updating the file request. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - def __repr__(self): - return 'UpdateFileRequestError(%r, %r)' % (self._tag, self._value) - -UpdateFileRequestError_validator = bv.Union(UpdateFileRequestError) - -FileRequestId_validator = bv.String(min_length=1, pattern=u'[-_0-9a-zA-Z]+') -FileRequestValidationError_validator = bv.Nullable(bv.String()) -CreateFileRequestArgs._title_validator = bv.String(min_length=1) -CreateFileRequestArgs._destination_validator = files.Path_validator -CreateFileRequestArgs._deadline_validator = bv.Nullable(FileRequestDeadline_validator) -CreateFileRequestArgs._open_validator = bv.Boolean() -CreateFileRequestArgs._all_field_names_ = set([ - 'title', - 'destination', - 'deadline', - 'open', -]) -CreateFileRequestArgs._all_fields_ = [ - ('title', CreateFileRequestArgs._title_validator), - ('destination', CreateFileRequestArgs._destination_validator), - ('deadline', CreateFileRequestArgs._deadline_validator), - ('open', CreateFileRequestArgs._open_validator), -] - -GeneralFileRequestsError._disabled_for_team_validator = bv.Void() -GeneralFileRequestsError._other_validator = bv.Void() -GeneralFileRequestsError._tagmap = { - 'disabled_for_team': GeneralFileRequestsError._disabled_for_team_validator, - 'other': GeneralFileRequestsError._other_validator, -} - -GeneralFileRequestsError.disabled_for_team = GeneralFileRequestsError('disabled_for_team') -GeneralFileRequestsError.other = GeneralFileRequestsError('other') - -FileRequestError._not_found_validator = bv.Void() -FileRequestError._not_a_folder_validator = bv.Void() -FileRequestError._app_lacks_access_validator = bv.Void() -FileRequestError._no_permission_validator = bv.Void() -FileRequestError._email_unverified_validator = bv.Void() -FileRequestError._validation_error_validator = bv.Void() -FileRequestError._tagmap = { - 'not_found': FileRequestError._not_found_validator, - 'not_a_folder': FileRequestError._not_a_folder_validator, - 'app_lacks_access': FileRequestError._app_lacks_access_validator, - 'no_permission': FileRequestError._no_permission_validator, - 'email_unverified': FileRequestError._email_unverified_validator, - 'validation_error': FileRequestError._validation_error_validator, -} -FileRequestError._tagmap.update(GeneralFileRequestsError._tagmap) - -FileRequestError.not_found = FileRequestError('not_found') -FileRequestError.not_a_folder = FileRequestError('not_a_folder') -FileRequestError.app_lacks_access = FileRequestError('app_lacks_access') -FileRequestError.no_permission = FileRequestError('no_permission') -FileRequestError.email_unverified = FileRequestError('email_unverified') -FileRequestError.validation_error = FileRequestError('validation_error') - -CreateFileRequestError._invalid_location_validator = bv.Void() -CreateFileRequestError._rate_limit_validator = bv.Void() -CreateFileRequestError._tagmap = { - 'invalid_location': CreateFileRequestError._invalid_location_validator, - 'rate_limit': CreateFileRequestError._rate_limit_validator, -} -CreateFileRequestError._tagmap.update(FileRequestError._tagmap) - -CreateFileRequestError.invalid_location = CreateFileRequestError('invalid_location') -CreateFileRequestError.rate_limit = CreateFileRequestError('rate_limit') - -FileRequest._id_validator = FileRequestId_validator -FileRequest._url_validator = bv.String(min_length=1) -FileRequest._title_validator = bv.String(min_length=1) -FileRequest._destination_validator = bv.Nullable(files.Path_validator) -FileRequest._created_validator = common.DropboxTimestamp_validator -FileRequest._deadline_validator = bv.Nullable(FileRequestDeadline_validator) -FileRequest._is_open_validator = bv.Boolean() -FileRequest._file_count_validator = bv.Int64() -FileRequest._all_field_names_ = set([ - 'id', - 'url', - 'title', - 'destination', - 'created', - 'deadline', - 'is_open', - 'file_count', -]) -FileRequest._all_fields_ = [ - ('id', FileRequest._id_validator), - ('url', FileRequest._url_validator), - ('title', FileRequest._title_validator), - ('destination', FileRequest._destination_validator), - ('created', FileRequest._created_validator), - ('deadline', FileRequest._deadline_validator), - ('is_open', FileRequest._is_open_validator), - ('file_count', FileRequest._file_count_validator), -] - -FileRequestDeadline._deadline_validator = common.DropboxTimestamp_validator -FileRequestDeadline._allow_late_uploads_validator = bv.Nullable(GracePeriod_validator) -FileRequestDeadline._all_field_names_ = set([ - 'deadline', - 'allow_late_uploads', -]) -FileRequestDeadline._all_fields_ = [ - ('deadline', FileRequestDeadline._deadline_validator), - ('allow_late_uploads', FileRequestDeadline._allow_late_uploads_validator), -] - -GetFileRequestArgs._id_validator = FileRequestId_validator -GetFileRequestArgs._all_field_names_ = set(['id']) -GetFileRequestArgs._all_fields_ = [('id', GetFileRequestArgs._id_validator)] - -GetFileRequestError._tagmap = { -} -GetFileRequestError._tagmap.update(FileRequestError._tagmap) - -GracePeriod._one_day_validator = bv.Void() -GracePeriod._two_days_validator = bv.Void() -GracePeriod._seven_days_validator = bv.Void() -GracePeriod._thirty_days_validator = bv.Void() -GracePeriod._always_validator = bv.Void() -GracePeriod._other_validator = bv.Void() -GracePeriod._tagmap = { - 'one_day': GracePeriod._one_day_validator, - 'two_days': GracePeriod._two_days_validator, - 'seven_days': GracePeriod._seven_days_validator, - 'thirty_days': GracePeriod._thirty_days_validator, - 'always': GracePeriod._always_validator, - 'other': GracePeriod._other_validator, -} - -GracePeriod.one_day = GracePeriod('one_day') -GracePeriod.two_days = GracePeriod('two_days') -GracePeriod.seven_days = GracePeriod('seven_days') -GracePeriod.thirty_days = GracePeriod('thirty_days') -GracePeriod.always = GracePeriod('always') -GracePeriod.other = GracePeriod('other') - -ListFileRequestsError._tagmap = { -} -ListFileRequestsError._tagmap.update(GeneralFileRequestsError._tagmap) - -ListFileRequestsResult._file_requests_validator = bv.List(FileRequest_validator) -ListFileRequestsResult._all_field_names_ = set(['file_requests']) -ListFileRequestsResult._all_fields_ = [('file_requests', ListFileRequestsResult._file_requests_validator)] - -UpdateFileRequestArgs._id_validator = FileRequestId_validator -UpdateFileRequestArgs._title_validator = bv.Nullable(bv.String(min_length=1)) -UpdateFileRequestArgs._destination_validator = bv.Nullable(files.Path_validator) -UpdateFileRequestArgs._deadline_validator = UpdateFileRequestDeadline_validator -UpdateFileRequestArgs._open_validator = bv.Nullable(bv.Boolean()) -UpdateFileRequestArgs._all_field_names_ = set([ - 'id', - 'title', - 'destination', - 'deadline', - 'open', -]) -UpdateFileRequestArgs._all_fields_ = [ - ('id', UpdateFileRequestArgs._id_validator), - ('title', UpdateFileRequestArgs._title_validator), - ('destination', UpdateFileRequestArgs._destination_validator), - ('deadline', UpdateFileRequestArgs._deadline_validator), - ('open', UpdateFileRequestArgs._open_validator), -] - -UpdateFileRequestDeadline._no_update_validator = bv.Void() -UpdateFileRequestDeadline._update_validator = bv.Nullable(FileRequestDeadline_validator) -UpdateFileRequestDeadline._other_validator = bv.Void() -UpdateFileRequestDeadline._tagmap = { - 'no_update': UpdateFileRequestDeadline._no_update_validator, - 'update': UpdateFileRequestDeadline._update_validator, - 'other': UpdateFileRequestDeadline._other_validator, -} - -UpdateFileRequestDeadline.no_update = UpdateFileRequestDeadline('no_update') -UpdateFileRequestDeadline.other = UpdateFileRequestDeadline('other') - -UpdateFileRequestError._tagmap = { -} -UpdateFileRequestError._tagmap.update(FileRequestError._tagmap) - -create = bb.Route( - 'create', - False, - CreateFileRequestArgs_validator, - FileRequest_validator, - CreateFileRequestError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -get = bb.Route( - 'get', - False, - GetFileRequestArgs_validator, - FileRequest_validator, - GetFileRequestError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -list = bb.Route( - 'list', - False, - bv.Void(), - ListFileRequestsResult_validator, - ListFileRequestsError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -update = bb.Route( - 'update', - False, - UpdateFileRequestArgs_validator, - FileRequest_validator, - UpdateFileRequestError_validator, - {'host': u'api', - 'style': u'rpc'}, -) - -ROUTES = { - 'create': create, - 'get': get, - 'list': list, - 'update': update, -} - diff --git a/resources/lib/dropbox/files.py b/resources/lib/dropbox/files.py deleted file mode 100644 index 32c27bb..0000000 --- a/resources/lib/dropbox/files.py +++ /dev/null @@ -1,10781 +0,0 @@ -# -*- coding: utf-8 -*- -# Auto-generated by Stone, do not modify. -# flake8: noqa -# pylint: skip-file -""" -This namespace contains endpoints and data types for basic file operations. -""" - -try: - from . import stone_validators as bv - from . import stone_base as bb -except (SystemError, ValueError): - # Catch errors raised when importing a relative module when not in a package. - # This makes testing this file directly (outside of a package) easier. - import stone_validators as bv - import stone_base as bb - -try: - from . import ( - async, - common, - file_properties, - users_common, - ) -except (SystemError, ValueError): - import async - import common - import file_properties - import users_common - -class GetMetadataArg(object): - """ - :ivar path: The path of a file or folder on Dropbox. - :ivar include_media_info: If true, ``FileMetadata.media_info`` is set for - photo and video. - :ivar include_deleted: If true, :class:`DeletedMetadata` will be returned - for deleted file or folder, otherwise ``LookupError.not_found`` will be - returned. - :ivar include_has_explicit_shared_members: If true, the results will include - a flag for each file indicating whether or not that file has any - explicit members. - """ - - __slots__ = [ - '_path_value', - '_path_present', - '_include_media_info_value', - '_include_media_info_present', - '_include_deleted_value', - '_include_deleted_present', - '_include_has_explicit_shared_members_value', - '_include_has_explicit_shared_members_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - include_media_info=None, - include_deleted=None, - include_has_explicit_shared_members=None): - self._path_value = None - self._path_present = False - self._include_media_info_value = None - self._include_media_info_present = False - self._include_deleted_value = None - self._include_deleted_present = False - self._include_has_explicit_shared_members_value = None - self._include_has_explicit_shared_members_present = False - if path is not None: - self.path = path - if include_media_info is not None: - self.include_media_info = include_media_info - if include_deleted is not None: - self.include_deleted = include_deleted - if include_has_explicit_shared_members is not None: - self.include_has_explicit_shared_members = include_has_explicit_shared_members - - @property - def path(self): - """ - The path of a file or folder on Dropbox. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def include_media_info(self): - """ - If true, ``FileMetadata.media_info`` is set for photo and video. - - :rtype: bool - """ - if self._include_media_info_present: - return self._include_media_info_value - else: - return False - - @include_media_info.setter - def include_media_info(self, val): - val = self._include_media_info_validator.validate(val) - self._include_media_info_value = val - self._include_media_info_present = True - - @include_media_info.deleter - def include_media_info(self): - self._include_media_info_value = None - self._include_media_info_present = False - - @property - def include_deleted(self): - """ - If true, :class:`DeletedMetadata` will be returned for deleted file or - folder, otherwise ``LookupError.not_found`` will be returned. - - :rtype: bool - """ - if self._include_deleted_present: - return self._include_deleted_value - else: - return False - - @include_deleted.setter - def include_deleted(self, val): - val = self._include_deleted_validator.validate(val) - self._include_deleted_value = val - self._include_deleted_present = True - - @include_deleted.deleter - def include_deleted(self): - self._include_deleted_value = None - self._include_deleted_present = False - - @property - def include_has_explicit_shared_members(self): - """ - If true, the results will include a flag for each file indicating - whether or not that file has any explicit members. - - :rtype: bool - """ - if self._include_has_explicit_shared_members_present: - return self._include_has_explicit_shared_members_value - else: - return False - - @include_has_explicit_shared_members.setter - def include_has_explicit_shared_members(self, val): - val = self._include_has_explicit_shared_members_validator.validate(val) - self._include_has_explicit_shared_members_value = val - self._include_has_explicit_shared_members_present = True - - @include_has_explicit_shared_members.deleter - def include_has_explicit_shared_members(self): - self._include_has_explicit_shared_members_value = None - self._include_has_explicit_shared_members_present = False - - def __repr__(self): - return 'GetMetadataArg(path={!r}, include_media_info={!r}, include_deleted={!r}, include_has_explicit_shared_members={!r})'.format( - self._path_value, - self._include_media_info_value, - self._include_deleted_value, - self._include_has_explicit_shared_members_value, - ) - -GetMetadataArg_validator = bv.Struct(GetMetadataArg) - -class AlphaGetMetadataArg(GetMetadataArg): - """ - :ivar include_property_templates: If set to a valid list of template IDs, - ``FileMetadata.property_groups`` is set for files with custom - properties. - """ - - __slots__ = [ - '_include_property_templates_value', - '_include_property_templates_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - include_media_info=None, - include_deleted=None, - include_has_explicit_shared_members=None, - include_property_templates=None): - super(AlphaGetMetadataArg, self).__init__(path, - include_media_info, - include_deleted, - include_has_explicit_shared_members) - self._include_property_templates_value = None - self._include_property_templates_present = False - if include_property_templates is not None: - self.include_property_templates = include_property_templates - - @property - def include_property_templates(self): - """ - If set to a valid list of template IDs, ``FileMetadata.property_groups`` - is set for files with custom properties. - - :rtype: list of [str] - """ - if self._include_property_templates_present: - return self._include_property_templates_value - else: - return None - - @include_property_templates.setter - def include_property_templates(self, val): - if val is None: - del self.include_property_templates - return - val = self._include_property_templates_validator.validate(val) - self._include_property_templates_value = val - self._include_property_templates_present = True - - @include_property_templates.deleter - def include_property_templates(self): - self._include_property_templates_value = None - self._include_property_templates_present = False - - def __repr__(self): - return 'AlphaGetMetadataArg(path={!r}, include_media_info={!r}, include_deleted={!r}, include_has_explicit_shared_members={!r}, include_property_templates={!r})'.format( - self._path_value, - self._include_media_info_value, - self._include_deleted_value, - self._include_has_explicit_shared_members_value, - self._include_property_templates_value, - ) - -AlphaGetMetadataArg_validator = bv.Struct(AlphaGetMetadataArg) - -class GetMetadataError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = None - - @classmethod - def path(cls, val): - """ - Create an instance of this class set to the ``path`` tag with value - ``val``. - - :param LookupError val: - :rtype: GetMetadataError - """ - return cls('path', val) - - def is_path(self): - """ - Check if the union tag is ``path``. - - :rtype: bool - """ - return self._tag == 'path' - - def get_path(self): - """ - Only call this if :meth:`is_path` is true. - - :rtype: LookupError - """ - if not self.is_path(): - raise AttributeError("tag 'path' not set") - return self._value - - def __repr__(self): - return 'GetMetadataError(%r, %r)' % (self._tag, self._value) - -GetMetadataError_validator = bv.Union(GetMetadataError) - -class AlphaGetMetadataError(GetMetadataError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - @classmethod - def properties_error(cls, val): - """ - Create an instance of this class set to the ``properties_error`` tag - with value ``val``. - - :param file_properties.LookUpPropertiesError_validator val: - :rtype: AlphaGetMetadataError - """ - return cls('properties_error', val) - - def is_properties_error(self): - """ - Check if the union tag is ``properties_error``. - - :rtype: bool - """ - return self._tag == 'properties_error' - - def get_properties_error(self): - """ - Only call this if :meth:`is_properties_error` is true. - - :rtype: file_properties.LookUpPropertiesError_validator - """ - if not self.is_properties_error(): - raise AttributeError("tag 'properties_error' not set") - return self._value - - def __repr__(self): - return 'AlphaGetMetadataError(%r, %r)' % (self._tag, self._value) - -AlphaGetMetadataError_validator = bv.Union(AlphaGetMetadataError) - -class CommitInfo(object): - """ - :ivar path: Path in the user's Dropbox to save the file. - :ivar mode: Selects what to do if the file already exists. - :ivar autorename: If there's a conflict, as determined by ``mode``, have the - Dropbox server try to autorename the file to avoid conflict. - :ivar client_modified: The value to store as the ``client_modified`` - timestamp. Dropbox automatically records the time at which the file was - written to the Dropbox servers. It can also record an additional - timestamp, provided by Dropbox desktop clients, mobile clients, and API - apps of when the file was actually created or modified. - :ivar mute: Normally, users are made aware of any file modifications in - their Dropbox account via notifications in the client software. If - ``True``, this tells the clients that this modification shouldn't result - in a user notification. - """ - - __slots__ = [ - '_path_value', - '_path_present', - '_mode_value', - '_mode_present', - '_autorename_value', - '_autorename_present', - '_client_modified_value', - '_client_modified_present', - '_mute_value', - '_mute_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - mode=None, - autorename=None, - client_modified=None, - mute=None): - self._path_value = None - self._path_present = False - self._mode_value = None - self._mode_present = False - self._autorename_value = None - self._autorename_present = False - self._client_modified_value = None - self._client_modified_present = False - self._mute_value = None - self._mute_present = False - if path is not None: - self.path = path - if mode is not None: - self.mode = mode - if autorename is not None: - self.autorename = autorename - if client_modified is not None: - self.client_modified = client_modified - if mute is not None: - self.mute = mute - - @property - def path(self): - """ - Path in the user's Dropbox to save the file. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def mode(self): - """ - Selects what to do if the file already exists. - - :rtype: WriteMode - """ - if self._mode_present: - return self._mode_value - else: - return WriteMode.add - - @mode.setter - def mode(self, val): - self._mode_validator.validate_type_only(val) - self._mode_value = val - self._mode_present = True - - @mode.deleter - def mode(self): - self._mode_value = None - self._mode_present = False - - @property - def autorename(self): - """ - If there's a conflict, as determined by ``mode``, have the Dropbox - server try to autorename the file to avoid conflict. - - :rtype: bool - """ - if self._autorename_present: - return self._autorename_value - else: - return False - - @autorename.setter - def autorename(self, val): - val = self._autorename_validator.validate(val) - self._autorename_value = val - self._autorename_present = True - - @autorename.deleter - def autorename(self): - self._autorename_value = None - self._autorename_present = False - - @property - def client_modified(self): - """ - The value to store as the ``client_modified`` timestamp. Dropbox - automatically records the time at which the file was written to the - Dropbox servers. It can also record an additional timestamp, provided by - Dropbox desktop clients, mobile clients, and API apps of when the file - was actually created or modified. - - :rtype: datetime.datetime - """ - if self._client_modified_present: - return self._client_modified_value - else: - return None - - @client_modified.setter - def client_modified(self, val): - if val is None: - del self.client_modified - return - val = self._client_modified_validator.validate(val) - self._client_modified_value = val - self._client_modified_present = True - - @client_modified.deleter - def client_modified(self): - self._client_modified_value = None - self._client_modified_present = False - - @property - def mute(self): - """ - Normally, users are made aware of any file modifications in their - Dropbox account via notifications in the client software. If ``True``, - this tells the clients that this modification shouldn't result in a user - notification. - - :rtype: bool - """ - if self._mute_present: - return self._mute_value - else: - return False - - @mute.setter - def mute(self, val): - val = self._mute_validator.validate(val) - self._mute_value = val - self._mute_present = True - - @mute.deleter - def mute(self): - self._mute_value = None - self._mute_present = False - - def __repr__(self): - return 'CommitInfo(path={!r}, mode={!r}, autorename={!r}, client_modified={!r}, mute={!r})'.format( - self._path_value, - self._mode_value, - self._autorename_value, - self._client_modified_value, - self._mute_value, - ) - -CommitInfo_validator = bv.Struct(CommitInfo) - -class CommitInfoWithProperties(CommitInfo): - """ - :ivar property_groups: List of custom properties to add to file. - """ - - __slots__ = [ - '_property_groups_value', - '_property_groups_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - mode=None, - autorename=None, - client_modified=None, - mute=None, - property_groups=None): - super(CommitInfoWithProperties, self).__init__(path, - mode, - autorename, - client_modified, - mute) - self._property_groups_value = None - self._property_groups_present = False - if property_groups is not None: - self.property_groups = property_groups - - @property - def property_groups(self): - """ - List of custom properties to add to file. - - :rtype: list of [file_properties.PropertyGroup_validator] - """ - if self._property_groups_present: - return self._property_groups_value - else: - return None - - @property_groups.setter - def property_groups(self, val): - if val is None: - del self.property_groups - return - val = self._property_groups_validator.validate(val) - self._property_groups_value = val - self._property_groups_present = True - - @property_groups.deleter - def property_groups(self): - self._property_groups_value = None - self._property_groups_present = False - - def __repr__(self): - return 'CommitInfoWithProperties(path={!r}, mode={!r}, autorename={!r}, client_modified={!r}, mute={!r}, property_groups={!r})'.format( - self._path_value, - self._mode_value, - self._autorename_value, - self._client_modified_value, - self._mute_value, - self._property_groups_value, - ) - -CommitInfoWithProperties_validator = bv.Struct(CommitInfoWithProperties) - -class CreateFolderArg(object): - """ - :ivar path: Path in the user's Dropbox to create. - :ivar autorename: If there's a conflict, have the Dropbox server try to - autorename the folder to avoid the conflict. - """ - - __slots__ = [ - '_path_value', - '_path_present', - '_autorename_value', - '_autorename_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - autorename=None): - self._path_value = None - self._path_present = False - self._autorename_value = None - self._autorename_present = False - if path is not None: - self.path = path - if autorename is not None: - self.autorename = autorename - - @property - def path(self): - """ - Path in the user's Dropbox to create. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def autorename(self): - """ - If there's a conflict, have the Dropbox server try to autorename the - folder to avoid the conflict. - - :rtype: bool - """ - if self._autorename_present: - return self._autorename_value - else: - return False - - @autorename.setter - def autorename(self, val): - val = self._autorename_validator.validate(val) - self._autorename_value = val - self._autorename_present = True - - @autorename.deleter - def autorename(self): - self._autorename_value = None - self._autorename_present = False - - def __repr__(self): - return 'CreateFolderArg(path={!r}, autorename={!r})'.format( - self._path_value, - self._autorename_value, - ) - -CreateFolderArg_validator = bv.Struct(CreateFolderArg) - -class CreateFolderError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = None - - @classmethod - def path(cls, val): - """ - Create an instance of this class set to the ``path`` tag with value - ``val``. - - :param WriteError val: - :rtype: CreateFolderError - """ - return cls('path', val) - - def is_path(self): - """ - Check if the union tag is ``path``. - - :rtype: bool - """ - return self._tag == 'path' - - def get_path(self): - """ - Only call this if :meth:`is_path` is true. - - :rtype: WriteError - """ - if not self.is_path(): - raise AttributeError("tag 'path' not set") - return self._value - - def __repr__(self): - return 'CreateFolderError(%r, %r)' % (self._tag, self._value) - -CreateFolderError_validator = bv.Union(CreateFolderError) - -class FileOpsResult(object): - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'FileOpsResult()' - -FileOpsResult_validator = bv.Struct(FileOpsResult) - -class CreateFolderResult(FileOpsResult): - """ - :ivar metadata: Metadata of the created folder. - """ - - __slots__ = [ - '_metadata_value', - '_metadata_present', - ] - - _has_required_fields = True - - def __init__(self, - metadata=None): - super(CreateFolderResult, self).__init__() - self._metadata_value = None - self._metadata_present = False - if metadata is not None: - self.metadata = metadata - - @property - def metadata(self): - """ - Metadata of the created folder. - - :rtype: FolderMetadata - """ - if self._metadata_present: - return self._metadata_value - else: - raise AttributeError("missing required field 'metadata'") - - @metadata.setter - def metadata(self, val): - self._metadata_validator.validate_type_only(val) - self._metadata_value = val - self._metadata_present = True - - @metadata.deleter - def metadata(self): - self._metadata_value = None - self._metadata_present = False - - def __repr__(self): - return 'CreateFolderResult(metadata={!r})'.format( - self._metadata_value, - ) - -CreateFolderResult_validator = bv.Struct(CreateFolderResult) - -class DeleteArg(object): - """ - :ivar path: Path in the user's Dropbox to delete. - """ - - __slots__ = [ - '_path_value', - '_path_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None): - self._path_value = None - self._path_present = False - if path is not None: - self.path = path - - @property - def path(self): - """ - Path in the user's Dropbox to delete. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - def __repr__(self): - return 'DeleteArg(path={!r})'.format( - self._path_value, - ) - -DeleteArg_validator = bv.Struct(DeleteArg) - -class DeleteBatchArg(object): - - __slots__ = [ - '_entries_value', - '_entries_present', - ] - - _has_required_fields = True - - def __init__(self, - entries=None): - self._entries_value = None - self._entries_present = False - if entries is not None: - self.entries = entries - - @property - def entries(self): - """ - :rtype: list of [DeleteArg] - """ - if self._entries_present: - return self._entries_value - else: - raise AttributeError("missing required field 'entries'") - - @entries.setter - def entries(self, val): - val = self._entries_validator.validate(val) - self._entries_value = val - self._entries_present = True - - @entries.deleter - def entries(self): - self._entries_value = None - self._entries_present = False - - def __repr__(self): - return 'DeleteBatchArg(entries={!r})'.format( - self._entries_value, - ) - -DeleteBatchArg_validator = bv.Struct(DeleteBatchArg) - -class DeleteBatchError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar too_many_write_operations: Use - ``DeleteError.too_many_write_operations``. - :meth:`dropbox.dropbox.Dropbox.files_delete_batch` now provides smaller - granularity about which entry has failed because of this. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - too_many_write_operations = None - # Attribute is overwritten below the class definition - other = None - - def is_too_many_write_operations(self): - """ - Check if the union tag is ``too_many_write_operations``. - - :rtype: bool - """ - return self._tag == 'too_many_write_operations' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'DeleteBatchError(%r, %r)' % (self._tag, self._value) - -DeleteBatchError_validator = bv.Union(DeleteBatchError) - -class DeleteBatchJobStatus(async.PollResultBase): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar DeleteBatchResult complete: The batch delete has finished. - :ivar DeleteBatchError failed: The batch delete has failed. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def complete(cls, val): - """ - Create an instance of this class set to the ``complete`` tag with value - ``val``. - - :param DeleteBatchResult val: - :rtype: DeleteBatchJobStatus - """ - return cls('complete', val) - - @classmethod - def failed(cls, val): - """ - Create an instance of this class set to the ``failed`` tag with value - ``val``. - - :param DeleteBatchError val: - :rtype: DeleteBatchJobStatus - """ - return cls('failed', val) - - def is_complete(self): - """ - Check if the union tag is ``complete``. - - :rtype: bool - """ - return self._tag == 'complete' - - def is_failed(self): - """ - Check if the union tag is ``failed``. - - :rtype: bool - """ - return self._tag == 'failed' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_complete(self): - """ - The batch delete has finished. - - Only call this if :meth:`is_complete` is true. - - :rtype: DeleteBatchResult - """ - if not self.is_complete(): - raise AttributeError("tag 'complete' not set") - return self._value - - def get_failed(self): - """ - The batch delete has failed. - - Only call this if :meth:`is_failed` is true. - - :rtype: DeleteBatchError - """ - if not self.is_failed(): - raise AttributeError("tag 'failed' not set") - return self._value - - def __repr__(self): - return 'DeleteBatchJobStatus(%r, %r)' % (self._tag, self._value) - -DeleteBatchJobStatus_validator = bv.Union(DeleteBatchJobStatus) - -class DeleteBatchLaunch(async.LaunchResultBase): - """ - Result returned by :meth:`dropbox.dropbox.Dropbox.files_delete_batch` that - may either launch an asynchronous job or complete synchronously. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def complete(cls, val): - """ - Create an instance of this class set to the ``complete`` tag with value - ``val``. - - :param DeleteBatchResult val: - :rtype: DeleteBatchLaunch - """ - return cls('complete', val) - - def is_complete(self): - """ - Check if the union tag is ``complete``. - - :rtype: bool - """ - return self._tag == 'complete' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_complete(self): - """ - Only call this if :meth:`is_complete` is true. - - :rtype: DeleteBatchResult - """ - if not self.is_complete(): - raise AttributeError("tag 'complete' not set") - return self._value - - def __repr__(self): - return 'DeleteBatchLaunch(%r, %r)' % (self._tag, self._value) - -DeleteBatchLaunch_validator = bv.Union(DeleteBatchLaunch) - -class DeleteBatchResult(FileOpsResult): - - __slots__ = [ - '_entries_value', - '_entries_present', - ] - - _has_required_fields = True - - def __init__(self, - entries=None): - super(DeleteBatchResult, self).__init__() - self._entries_value = None - self._entries_present = False - if entries is not None: - self.entries = entries - - @property - def entries(self): - """ - :rtype: list of [DeleteBatchResultEntry] - """ - if self._entries_present: - return self._entries_value - else: - raise AttributeError("missing required field 'entries'") - - @entries.setter - def entries(self, val): - val = self._entries_validator.validate(val) - self._entries_value = val - self._entries_present = True - - @entries.deleter - def entries(self): - self._entries_value = None - self._entries_present = False - - def __repr__(self): - return 'DeleteBatchResult(entries={!r})'.format( - self._entries_value, - ) - -DeleteBatchResult_validator = bv.Struct(DeleteBatchResult) - -class DeleteBatchResultData(object): - """ - :ivar metadata: Metadata of the deleted object. - """ - - __slots__ = [ - '_metadata_value', - '_metadata_present', - ] - - _has_required_fields = True - - def __init__(self, - metadata=None): - self._metadata_value = None - self._metadata_present = False - if metadata is not None: - self.metadata = metadata - - @property - def metadata(self): - """ - Metadata of the deleted object. - - :rtype: Metadata - """ - if self._metadata_present: - return self._metadata_value - else: - raise AttributeError("missing required field 'metadata'") - - @metadata.setter - def metadata(self, val): - self._metadata_validator.validate_type_only(val) - self._metadata_value = val - self._metadata_present = True - - @metadata.deleter - def metadata(self): - self._metadata_value = None - self._metadata_present = False - - def __repr__(self): - return 'DeleteBatchResultData(metadata={!r})'.format( - self._metadata_value, - ) - -DeleteBatchResultData_validator = bv.Struct(DeleteBatchResultData) - -class DeleteBatchResultEntry(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = None - - @classmethod - def success(cls, val): - """ - Create an instance of this class set to the ``success`` tag with value - ``val``. - - :param DeleteBatchResultData val: - :rtype: DeleteBatchResultEntry - """ - return cls('success', val) - - @classmethod - def failure(cls, val): - """ - Create an instance of this class set to the ``failure`` tag with value - ``val``. - - :param DeleteError val: - :rtype: DeleteBatchResultEntry - """ - return cls('failure', val) - - def is_success(self): - """ - Check if the union tag is ``success``. - - :rtype: bool - """ - return self._tag == 'success' - - def is_failure(self): - """ - Check if the union tag is ``failure``. - - :rtype: bool - """ - return self._tag == 'failure' - - def get_success(self): - """ - Only call this if :meth:`is_success` is true. - - :rtype: DeleteBatchResultData - """ - if not self.is_success(): - raise AttributeError("tag 'success' not set") - return self._value - - def get_failure(self): - """ - Only call this if :meth:`is_failure` is true. - - :rtype: DeleteError - """ - if not self.is_failure(): - raise AttributeError("tag 'failure' not set") - return self._value - - def __repr__(self): - return 'DeleteBatchResultEntry(%r, %r)' % (self._tag, self._value) - -DeleteBatchResultEntry_validator = bv.Union(DeleteBatchResultEntry) - -class DeleteError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar too_many_write_operations: There are too many write operations in - user's Dropbox. Please retry this request. - :ivar too_many_files: There are too many files in one request. Please retry - with fewer files. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - too_many_write_operations = None - # Attribute is overwritten below the class definition - too_many_files = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def path_lookup(cls, val): - """ - Create an instance of this class set to the ``path_lookup`` tag with - value ``val``. - - :param LookupError val: - :rtype: DeleteError - """ - return cls('path_lookup', val) - - @classmethod - def path_write(cls, val): - """ - Create an instance of this class set to the ``path_write`` tag with - value ``val``. - - :param WriteError val: - :rtype: DeleteError - """ - return cls('path_write', val) - - def is_path_lookup(self): - """ - Check if the union tag is ``path_lookup``. - - :rtype: bool - """ - return self._tag == 'path_lookup' - - def is_path_write(self): - """ - Check if the union tag is ``path_write``. - - :rtype: bool - """ - return self._tag == 'path_write' - - def is_too_many_write_operations(self): - """ - Check if the union tag is ``too_many_write_operations``. - - :rtype: bool - """ - return self._tag == 'too_many_write_operations' - - def is_too_many_files(self): - """ - Check if the union tag is ``too_many_files``. - - :rtype: bool - """ - return self._tag == 'too_many_files' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_path_lookup(self): - """ - Only call this if :meth:`is_path_lookup` is true. - - :rtype: LookupError - """ - if not self.is_path_lookup(): - raise AttributeError("tag 'path_lookup' not set") - return self._value - - def get_path_write(self): - """ - Only call this if :meth:`is_path_write` is true. - - :rtype: WriteError - """ - if not self.is_path_write(): - raise AttributeError("tag 'path_write' not set") - return self._value - - def __repr__(self): - return 'DeleteError(%r, %r)' % (self._tag, self._value) - -DeleteError_validator = bv.Union(DeleteError) - -class DeleteResult(FileOpsResult): - """ - :ivar metadata: Metadata of the deleted object. - """ - - __slots__ = [ - '_metadata_value', - '_metadata_present', - ] - - _has_required_fields = True - - def __init__(self, - metadata=None): - super(DeleteResult, self).__init__() - self._metadata_value = None - self._metadata_present = False - if metadata is not None: - self.metadata = metadata - - @property - def metadata(self): - """ - Metadata of the deleted object. - - :rtype: Metadata - """ - if self._metadata_present: - return self._metadata_value - else: - raise AttributeError("missing required field 'metadata'") - - @metadata.setter - def metadata(self, val): - self._metadata_validator.validate_type_only(val) - self._metadata_value = val - self._metadata_present = True - - @metadata.deleter - def metadata(self): - self._metadata_value = None - self._metadata_present = False - - def __repr__(self): - return 'DeleteResult(metadata={!r})'.format( - self._metadata_value, - ) - -DeleteResult_validator = bv.Struct(DeleteResult) - -class Metadata(object): - """ - Metadata for a file or folder. - - :ivar name: The last component of the path (including extension). This never - contains a slash. - :ivar path_lower: The lowercased full path in the user's Dropbox. This - always starts with a slash. This field will be null if the file or - folder is not mounted. - :ivar path_display: The cased path to be used for display purposes only. In - rare instances the casing will not correctly match the user's - filesystem, but this behavior will match the path provided in the Core - API v1, and at least the last path component will have the correct - casing. Changes to only the casing of paths won't be returned by - :meth:`dropbox.dropbox.Dropbox.files_list_folder_continue`. This field - will be null if the file or folder is not mounted. - :ivar parent_shared_folder_id: Please use - ``FileSharingInfo.parent_shared_folder_id`` or - ``FolderSharingInfo.parent_shared_folder_id`` instead. - """ - - __slots__ = [ - '_name_value', - '_name_present', - '_path_lower_value', - '_path_lower_present', - '_path_display_value', - '_path_display_present', - '_parent_shared_folder_id_value', - '_parent_shared_folder_id_present', - ] - - _has_required_fields = True - - def __init__(self, - name=None, - path_lower=None, - path_display=None, - parent_shared_folder_id=None): - self._name_value = None - self._name_present = False - self._path_lower_value = None - self._path_lower_present = False - self._path_display_value = None - self._path_display_present = False - self._parent_shared_folder_id_value = None - self._parent_shared_folder_id_present = False - if name is not None: - self.name = name - if path_lower is not None: - self.path_lower = path_lower - if path_display is not None: - self.path_display = path_display - if parent_shared_folder_id is not None: - self.parent_shared_folder_id = parent_shared_folder_id - - @property - def name(self): - """ - The last component of the path (including extension). This never - contains a slash. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") - - @name.setter - def name(self, val): - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - @property - def path_lower(self): - """ - The lowercased full path in the user's Dropbox. This always starts with - a slash. This field will be null if the file or folder is not mounted. - - :rtype: str - """ - if self._path_lower_present: - return self._path_lower_value - else: - return None - - @path_lower.setter - def path_lower(self, val): - if val is None: - del self.path_lower - return - val = self._path_lower_validator.validate(val) - self._path_lower_value = val - self._path_lower_present = True - - @path_lower.deleter - def path_lower(self): - self._path_lower_value = None - self._path_lower_present = False - - @property - def path_display(self): - """ - The cased path to be used for display purposes only. In rare instances - the casing will not correctly match the user's filesystem, but this - behavior will match the path provided in the Core API v1, and at least - the last path component will have the correct casing. Changes to only - the casing of paths won't be returned by - :meth:`dropbox.dropbox.Dropbox.files_list_folder_continue`. This field - will be null if the file or folder is not mounted. - - :rtype: str - """ - if self._path_display_present: - return self._path_display_value - else: - return None - - @path_display.setter - def path_display(self, val): - if val is None: - del self.path_display - return - val = self._path_display_validator.validate(val) - self._path_display_value = val - self._path_display_present = True - - @path_display.deleter - def path_display(self): - self._path_display_value = None - self._path_display_present = False - - @property - def parent_shared_folder_id(self): - """ - Please use ``FileSharingInfo.parent_shared_folder_id`` or - ``FolderSharingInfo.parent_shared_folder_id`` instead. - - :rtype: str - """ - if self._parent_shared_folder_id_present: - return self._parent_shared_folder_id_value - else: - return None - - @parent_shared_folder_id.setter - def parent_shared_folder_id(self, val): - if val is None: - del self.parent_shared_folder_id - return - val = self._parent_shared_folder_id_validator.validate(val) - self._parent_shared_folder_id_value = val - self._parent_shared_folder_id_present = True - - @parent_shared_folder_id.deleter - def parent_shared_folder_id(self): - self._parent_shared_folder_id_value = None - self._parent_shared_folder_id_present = False - - def __repr__(self): - return 'Metadata(name={!r}, path_lower={!r}, path_display={!r}, parent_shared_folder_id={!r})'.format( - self._name_value, - self._path_lower_value, - self._path_display_value, - self._parent_shared_folder_id_value, - ) - -Metadata_validator = bv.StructTree(Metadata) - -class DeletedMetadata(Metadata): - """ - Indicates that there used to be a file or folder at this path, but it no - longer exists. - """ - - __slots__ = [ - ] - - _has_required_fields = True - - def __init__(self, - name=None, - path_lower=None, - path_display=None, - parent_shared_folder_id=None): - super(DeletedMetadata, self).__init__(name, - path_lower, - path_display, - parent_shared_folder_id) - - def __repr__(self): - return 'DeletedMetadata(name={!r}, path_lower={!r}, path_display={!r}, parent_shared_folder_id={!r})'.format( - self._name_value, - self._path_lower_value, - self._path_display_value, - self._parent_shared_folder_id_value, - ) - -DeletedMetadata_validator = bv.Struct(DeletedMetadata) - -class Dimensions(object): - """ - Dimensions for a photo or video. - - :ivar height: Height of the photo/video. - :ivar width: Width of the photo/video. - """ - - __slots__ = [ - '_height_value', - '_height_present', - '_width_value', - '_width_present', - ] - - _has_required_fields = True - - def __init__(self, - height=None, - width=None): - self._height_value = None - self._height_present = False - self._width_value = None - self._width_present = False - if height is not None: - self.height = height - if width is not None: - self.width = width - - @property - def height(self): - """ - Height of the photo/video. - - :rtype: long - """ - if self._height_present: - return self._height_value - else: - raise AttributeError("missing required field 'height'") - - @height.setter - def height(self, val): - val = self._height_validator.validate(val) - self._height_value = val - self._height_present = True - - @height.deleter - def height(self): - self._height_value = None - self._height_present = False - - @property - def width(self): - """ - Width of the photo/video. - - :rtype: long - """ - if self._width_present: - return self._width_value - else: - raise AttributeError("missing required field 'width'") - - @width.setter - def width(self, val): - val = self._width_validator.validate(val) - self._width_value = val - self._width_present = True - - @width.deleter - def width(self): - self._width_value = None - self._width_present = False - - def __repr__(self): - return 'Dimensions(height={!r}, width={!r})'.format( - self._height_value, - self._width_value, - ) - -Dimensions_validator = bv.Struct(Dimensions) - -class DownloadArg(object): - """ - :ivar path: The path of the file to download. - :ivar rev: Please specify revision in ``path`` instead. - """ - - __slots__ = [ - '_path_value', - '_path_present', - '_rev_value', - '_rev_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - rev=None): - self._path_value = None - self._path_present = False - self._rev_value = None - self._rev_present = False - if path is not None: - self.path = path - if rev is not None: - self.rev = rev - - @property - def path(self): - """ - The path of the file to download. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def rev(self): - """ - Please specify revision in ``path`` instead. - - :rtype: str - """ - if self._rev_present: - return self._rev_value - else: - return None - - @rev.setter - def rev(self, val): - if val is None: - del self.rev - return - val = self._rev_validator.validate(val) - self._rev_value = val - self._rev_present = True - - @rev.deleter - def rev(self): - self._rev_value = None - self._rev_present = False - - def __repr__(self): - return 'DownloadArg(path={!r}, rev={!r})'.format( - self._path_value, - self._rev_value, - ) - -DownloadArg_validator = bv.Struct(DownloadArg) - -class DownloadError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def path(cls, val): - """ - Create an instance of this class set to the ``path`` tag with value - ``val``. - - :param LookupError val: - :rtype: DownloadError - """ - return cls('path', val) - - def is_path(self): - """ - Check if the union tag is ``path``. - - :rtype: bool - """ - return self._tag == 'path' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_path(self): - """ - Only call this if :meth:`is_path` is true. - - :rtype: LookupError - """ - if not self.is_path(): - raise AttributeError("tag 'path' not set") - return self._value - - def __repr__(self): - return 'DownloadError(%r, %r)' % (self._tag, self._value) - -DownloadError_validator = bv.Union(DownloadError) - -class FileMetadata(Metadata): - """ - :ivar id: A unique identifier for the file. - :ivar client_modified: For files, this is the modification time set by the - desktop client when the file was added to Dropbox. Since this time is - not verified (the Dropbox server stores whatever the desktop client - sends up), this should only be used for display purposes (such as - sorting) and not, for example, to determine if a file has changed or - not. - :ivar server_modified: The last time the file was modified on Dropbox. - :ivar rev: A unique identifier for the current revision of a file. This - field is the same rev as elsewhere in the API and can be used to detect - changes and avoid conflicts. - :ivar size: The file size in bytes. - :ivar media_info: Additional information if the file is a photo or video. - :ivar sharing_info: Set if this file is contained in a shared folder. - :ivar property_groups: Additional information if the file has custom - properties with the property template specified. - :ivar has_explicit_shared_members: This flag will only be present if - include_has_explicit_shared_members is true in - :meth:`dropbox.dropbox.Dropbox.files_list_folder` or - :meth:`dropbox.dropbox.Dropbox.files_get_metadata`. If this flag is - present, it will be true if this file has any explicit shared members. - This is different from sharing_info in that this could be true in the - case where a file has explicit members but is not contained within a - shared folder. - :ivar content_hash: A hash of the file content. This field can be used to - verify data integrity. For more information see our `Content hash - `_ page. - """ - - __slots__ = [ - '_id_value', - '_id_present', - '_client_modified_value', - '_client_modified_present', - '_server_modified_value', - '_server_modified_present', - '_rev_value', - '_rev_present', - '_size_value', - '_size_present', - '_media_info_value', - '_media_info_present', - '_sharing_info_value', - '_sharing_info_present', - '_property_groups_value', - '_property_groups_present', - '_has_explicit_shared_members_value', - '_has_explicit_shared_members_present', - '_content_hash_value', - '_content_hash_present', - ] - - _has_required_fields = True - - def __init__(self, - name=None, - id=None, - client_modified=None, - server_modified=None, - rev=None, - size=None, - path_lower=None, - path_display=None, - parent_shared_folder_id=None, - media_info=None, - sharing_info=None, - property_groups=None, - has_explicit_shared_members=None, - content_hash=None): - super(FileMetadata, self).__init__(name, - path_lower, - path_display, - parent_shared_folder_id) - self._id_value = None - self._id_present = False - self._client_modified_value = None - self._client_modified_present = False - self._server_modified_value = None - self._server_modified_present = False - self._rev_value = None - self._rev_present = False - self._size_value = None - self._size_present = False - self._media_info_value = None - self._media_info_present = False - self._sharing_info_value = None - self._sharing_info_present = False - self._property_groups_value = None - self._property_groups_present = False - self._has_explicit_shared_members_value = None - self._has_explicit_shared_members_present = False - self._content_hash_value = None - self._content_hash_present = False - if id is not None: - self.id = id - if client_modified is not None: - self.client_modified = client_modified - if server_modified is not None: - self.server_modified = server_modified - if rev is not None: - self.rev = rev - if size is not None: - self.size = size - if media_info is not None: - self.media_info = media_info - if sharing_info is not None: - self.sharing_info = sharing_info - if property_groups is not None: - self.property_groups = property_groups - if has_explicit_shared_members is not None: - self.has_explicit_shared_members = has_explicit_shared_members - if content_hash is not None: - self.content_hash = content_hash - - @property - def id(self): - """ - A unique identifier for the file. - - :rtype: str - """ - if self._id_present: - return self._id_value - else: - raise AttributeError("missing required field 'id'") - - @id.setter - def id(self, val): - val = self._id_validator.validate(val) - self._id_value = val - self._id_present = True - - @id.deleter - def id(self): - self._id_value = None - self._id_present = False - - @property - def client_modified(self): - """ - For files, this is the modification time set by the desktop client when - the file was added to Dropbox. Since this time is not verified (the - Dropbox server stores whatever the desktop client sends up), this should - only be used for display purposes (such as sorting) and not, for - example, to determine if a file has changed or not. - - :rtype: datetime.datetime - """ - if self._client_modified_present: - return self._client_modified_value - else: - raise AttributeError("missing required field 'client_modified'") - - @client_modified.setter - def client_modified(self, val): - val = self._client_modified_validator.validate(val) - self._client_modified_value = val - self._client_modified_present = True - - @client_modified.deleter - def client_modified(self): - self._client_modified_value = None - self._client_modified_present = False - - @property - def server_modified(self): - """ - The last time the file was modified on Dropbox. - - :rtype: datetime.datetime - """ - if self._server_modified_present: - return self._server_modified_value - else: - raise AttributeError("missing required field 'server_modified'") - - @server_modified.setter - def server_modified(self, val): - val = self._server_modified_validator.validate(val) - self._server_modified_value = val - self._server_modified_present = True - - @server_modified.deleter - def server_modified(self): - self._server_modified_value = None - self._server_modified_present = False - - @property - def rev(self): - """ - A unique identifier for the current revision of a file. This field is - the same rev as elsewhere in the API and can be used to detect changes - and avoid conflicts. - - :rtype: str - """ - if self._rev_present: - return self._rev_value - else: - raise AttributeError("missing required field 'rev'") - - @rev.setter - def rev(self, val): - val = self._rev_validator.validate(val) - self._rev_value = val - self._rev_present = True - - @rev.deleter - def rev(self): - self._rev_value = None - self._rev_present = False - - @property - def size(self): - """ - The file size in bytes. - - :rtype: long - """ - if self._size_present: - return self._size_value - else: - raise AttributeError("missing required field 'size'") - - @size.setter - def size(self, val): - val = self._size_validator.validate(val) - self._size_value = val - self._size_present = True - - @size.deleter - def size(self): - self._size_value = None - self._size_present = False - - @property - def media_info(self): - """ - Additional information if the file is a photo or video. - - :rtype: MediaInfo - """ - if self._media_info_present: - return self._media_info_value - else: - return None - - @media_info.setter - def media_info(self, val): - if val is None: - del self.media_info - return - self._media_info_validator.validate_type_only(val) - self._media_info_value = val - self._media_info_present = True - - @media_info.deleter - def media_info(self): - self._media_info_value = None - self._media_info_present = False - - @property - def sharing_info(self): - """ - Set if this file is contained in a shared folder. - - :rtype: FileSharingInfo - """ - if self._sharing_info_present: - return self._sharing_info_value - else: - return None - - @sharing_info.setter - def sharing_info(self, val): - if val is None: - del self.sharing_info - return - self._sharing_info_validator.validate_type_only(val) - self._sharing_info_value = val - self._sharing_info_present = True - - @sharing_info.deleter - def sharing_info(self): - self._sharing_info_value = None - self._sharing_info_present = False - - @property - def property_groups(self): - """ - Additional information if the file has custom properties with the - property template specified. - - :rtype: list of [file_properties.PropertyGroup_validator] - """ - if self._property_groups_present: - return self._property_groups_value - else: - return None - - @property_groups.setter - def property_groups(self, val): - if val is None: - del self.property_groups - return - val = self._property_groups_validator.validate(val) - self._property_groups_value = val - self._property_groups_present = True - - @property_groups.deleter - def property_groups(self): - self._property_groups_value = None - self._property_groups_present = False - - @property - def has_explicit_shared_members(self): - """ - This flag will only be present if include_has_explicit_shared_members - is true in :meth:`dropbox.dropbox.Dropbox.files_list_folder` or - :meth:`dropbox.dropbox.Dropbox.files_get_metadata`. If this flag is - present, it will be true if this file has any explicit shared members. - This is different from sharing_info in that this could be true in the - case where a file has explicit members but is not contained within a - shared folder. - - :rtype: bool - """ - if self._has_explicit_shared_members_present: - return self._has_explicit_shared_members_value - else: - return None - - @has_explicit_shared_members.setter - def has_explicit_shared_members(self, val): - if val is None: - del self.has_explicit_shared_members - return - val = self._has_explicit_shared_members_validator.validate(val) - self._has_explicit_shared_members_value = val - self._has_explicit_shared_members_present = True - - @has_explicit_shared_members.deleter - def has_explicit_shared_members(self): - self._has_explicit_shared_members_value = None - self._has_explicit_shared_members_present = False - - @property - def content_hash(self): - """ - A hash of the file content. This field can be used to verify data - integrity. For more information see our `Content hash - `_ page. - - :rtype: str - """ - if self._content_hash_present: - return self._content_hash_value - else: - return None - - @content_hash.setter - def content_hash(self, val): - if val is None: - del self.content_hash - return - val = self._content_hash_validator.validate(val) - self._content_hash_value = val - self._content_hash_present = True - - @content_hash.deleter - def content_hash(self): - self._content_hash_value = None - self._content_hash_present = False - - def __repr__(self): - return 'FileMetadata(name={!r}, id={!r}, client_modified={!r}, server_modified={!r}, rev={!r}, size={!r}, path_lower={!r}, path_display={!r}, parent_shared_folder_id={!r}, media_info={!r}, sharing_info={!r}, property_groups={!r}, has_explicit_shared_members={!r}, content_hash={!r})'.format( - self._name_value, - self._id_value, - self._client_modified_value, - self._server_modified_value, - self._rev_value, - self._size_value, - self._path_lower_value, - self._path_display_value, - self._parent_shared_folder_id_value, - self._media_info_value, - self._sharing_info_value, - self._property_groups_value, - self._has_explicit_shared_members_value, - self._content_hash_value, - ) - -FileMetadata_validator = bv.Struct(FileMetadata) - -class SharingInfo(object): - """ - Sharing info for a file or folder. - - :ivar read_only: True if the file or folder is inside a read-only shared - folder. - """ - - __slots__ = [ - '_read_only_value', - '_read_only_present', - ] - - _has_required_fields = True - - def __init__(self, - read_only=None): - self._read_only_value = None - self._read_only_present = False - if read_only is not None: - self.read_only = read_only - - @property - def read_only(self): - """ - True if the file or folder is inside a read-only shared folder. - - :rtype: bool - """ - if self._read_only_present: - return self._read_only_value - else: - raise AttributeError("missing required field 'read_only'") - - @read_only.setter - def read_only(self, val): - val = self._read_only_validator.validate(val) - self._read_only_value = val - self._read_only_present = True - - @read_only.deleter - def read_only(self): - self._read_only_value = None - self._read_only_present = False - - def __repr__(self): - return 'SharingInfo(read_only={!r})'.format( - self._read_only_value, - ) - -SharingInfo_validator = bv.Struct(SharingInfo) - -class FileSharingInfo(SharingInfo): - """ - Sharing info for a file which is contained by a shared folder. - - :ivar parent_shared_folder_id: ID of shared folder that holds this file. - :ivar modified_by: The last user who modified the file. This field will be - null if the user's account has been deleted. - """ - - __slots__ = [ - '_parent_shared_folder_id_value', - '_parent_shared_folder_id_present', - '_modified_by_value', - '_modified_by_present', - ] - - _has_required_fields = True - - def __init__(self, - read_only=None, - parent_shared_folder_id=None, - modified_by=None): - super(FileSharingInfo, self).__init__(read_only) - self._parent_shared_folder_id_value = None - self._parent_shared_folder_id_present = False - self._modified_by_value = None - self._modified_by_present = False - if parent_shared_folder_id is not None: - self.parent_shared_folder_id = parent_shared_folder_id - if modified_by is not None: - self.modified_by = modified_by - - @property - def parent_shared_folder_id(self): - """ - ID of shared folder that holds this file. - - :rtype: str - """ - if self._parent_shared_folder_id_present: - return self._parent_shared_folder_id_value - else: - raise AttributeError("missing required field 'parent_shared_folder_id'") - - @parent_shared_folder_id.setter - def parent_shared_folder_id(self, val): - val = self._parent_shared_folder_id_validator.validate(val) - self._parent_shared_folder_id_value = val - self._parent_shared_folder_id_present = True - - @parent_shared_folder_id.deleter - def parent_shared_folder_id(self): - self._parent_shared_folder_id_value = None - self._parent_shared_folder_id_present = False - - @property - def modified_by(self): - """ - The last user who modified the file. This field will be null if the - user's account has been deleted. - - :rtype: str - """ - if self._modified_by_present: - return self._modified_by_value - else: - return None - - @modified_by.setter - def modified_by(self, val): - if val is None: - del self.modified_by - return - val = self._modified_by_validator.validate(val) - self._modified_by_value = val - self._modified_by_present = True - - @modified_by.deleter - def modified_by(self): - self._modified_by_value = None - self._modified_by_present = False - - def __repr__(self): - return 'FileSharingInfo(read_only={!r}, parent_shared_folder_id={!r}, modified_by={!r})'.format( - self._read_only_value, - self._parent_shared_folder_id_value, - self._modified_by_value, - ) - -FileSharingInfo_validator = bv.Struct(FileSharingInfo) - -class FolderMetadata(Metadata): - """ - :ivar id: A unique identifier for the folder. - :ivar shared_folder_id: Please use ``sharing_info`` instead. - :ivar sharing_info: Set if the folder is contained in a shared folder or is - a shared folder mount point. - :ivar property_groups: Additional information if the file has custom - properties with the property template specified. - """ - - __slots__ = [ - '_id_value', - '_id_present', - '_shared_folder_id_value', - '_shared_folder_id_present', - '_sharing_info_value', - '_sharing_info_present', - '_property_groups_value', - '_property_groups_present', - ] - - _has_required_fields = True - - def __init__(self, - name=None, - id=None, - path_lower=None, - path_display=None, - parent_shared_folder_id=None, - shared_folder_id=None, - sharing_info=None, - property_groups=None): - super(FolderMetadata, self).__init__(name, - path_lower, - path_display, - parent_shared_folder_id) - self._id_value = None - self._id_present = False - self._shared_folder_id_value = None - self._shared_folder_id_present = False - self._sharing_info_value = None - self._sharing_info_present = False - self._property_groups_value = None - self._property_groups_present = False - if id is not None: - self.id = id - if shared_folder_id is not None: - self.shared_folder_id = shared_folder_id - if sharing_info is not None: - self.sharing_info = sharing_info - if property_groups is not None: - self.property_groups = property_groups - - @property - def id(self): - """ - A unique identifier for the folder. - - :rtype: str - """ - if self._id_present: - return self._id_value - else: - raise AttributeError("missing required field 'id'") - - @id.setter - def id(self, val): - val = self._id_validator.validate(val) - self._id_value = val - self._id_present = True - - @id.deleter - def id(self): - self._id_value = None - self._id_present = False - - @property - def shared_folder_id(self): - """ - Please use ``sharing_info`` instead. - - :rtype: str - """ - if self._shared_folder_id_present: - return self._shared_folder_id_value - else: - return None - - @shared_folder_id.setter - def shared_folder_id(self, val): - if val is None: - del self.shared_folder_id - return - val = self._shared_folder_id_validator.validate(val) - self._shared_folder_id_value = val - self._shared_folder_id_present = True - - @shared_folder_id.deleter - def shared_folder_id(self): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - - @property - def sharing_info(self): - """ - Set if the folder is contained in a shared folder or is a shared folder - mount point. - - :rtype: FolderSharingInfo - """ - if self._sharing_info_present: - return self._sharing_info_value - else: - return None - - @sharing_info.setter - def sharing_info(self, val): - if val is None: - del self.sharing_info - return - self._sharing_info_validator.validate_type_only(val) - self._sharing_info_value = val - self._sharing_info_present = True - - @sharing_info.deleter - def sharing_info(self): - self._sharing_info_value = None - self._sharing_info_present = False - - @property - def property_groups(self): - """ - Additional information if the file has custom properties with the - property template specified. - - :rtype: list of [file_properties.PropertyGroup_validator] - """ - if self._property_groups_present: - return self._property_groups_value - else: - return None - - @property_groups.setter - def property_groups(self, val): - if val is None: - del self.property_groups - return - val = self._property_groups_validator.validate(val) - self._property_groups_value = val - self._property_groups_present = True - - @property_groups.deleter - def property_groups(self): - self._property_groups_value = None - self._property_groups_present = False - - def __repr__(self): - return 'FolderMetadata(name={!r}, id={!r}, path_lower={!r}, path_display={!r}, parent_shared_folder_id={!r}, shared_folder_id={!r}, sharing_info={!r}, property_groups={!r})'.format( - self._name_value, - self._id_value, - self._path_lower_value, - self._path_display_value, - self._parent_shared_folder_id_value, - self._shared_folder_id_value, - self._sharing_info_value, - self._property_groups_value, - ) - -FolderMetadata_validator = bv.Struct(FolderMetadata) - -class FolderSharingInfo(SharingInfo): - """ - Sharing info for a folder which is contained in a shared folder or is a - shared folder mount point. - - :ivar parent_shared_folder_id: Set if the folder is contained by a shared - folder. - :ivar shared_folder_id: If this folder is a shared folder mount point, the - ID of the shared folder mounted at this location. - :ivar traverse_only: Specifies that the folder can only be traversed and the - user can only see a limited subset of the contents of this folder - because they don't have read access to this folder. They do, however, - have access to some sub folder. - :ivar no_access: Specifies that the folder cannot be accessed by the user. - """ - - __slots__ = [ - '_parent_shared_folder_id_value', - '_parent_shared_folder_id_present', - '_shared_folder_id_value', - '_shared_folder_id_present', - '_traverse_only_value', - '_traverse_only_present', - '_no_access_value', - '_no_access_present', - ] - - _has_required_fields = True - - def __init__(self, - read_only=None, - parent_shared_folder_id=None, - shared_folder_id=None, - traverse_only=None, - no_access=None): - super(FolderSharingInfo, self).__init__(read_only) - self._parent_shared_folder_id_value = None - self._parent_shared_folder_id_present = False - self._shared_folder_id_value = None - self._shared_folder_id_present = False - self._traverse_only_value = None - self._traverse_only_present = False - self._no_access_value = None - self._no_access_present = False - if parent_shared_folder_id is not None: - self.parent_shared_folder_id = parent_shared_folder_id - if shared_folder_id is not None: - self.shared_folder_id = shared_folder_id - if traverse_only is not None: - self.traverse_only = traverse_only - if no_access is not None: - self.no_access = no_access - - @property - def parent_shared_folder_id(self): - """ - Set if the folder is contained by a shared folder. - - :rtype: str - """ - if self._parent_shared_folder_id_present: - return self._parent_shared_folder_id_value - else: - return None - - @parent_shared_folder_id.setter - def parent_shared_folder_id(self, val): - if val is None: - del self.parent_shared_folder_id - return - val = self._parent_shared_folder_id_validator.validate(val) - self._parent_shared_folder_id_value = val - self._parent_shared_folder_id_present = True - - @parent_shared_folder_id.deleter - def parent_shared_folder_id(self): - self._parent_shared_folder_id_value = None - self._parent_shared_folder_id_present = False - - @property - def shared_folder_id(self): - """ - If this folder is a shared folder mount point, the ID of the shared - folder mounted at this location. - - :rtype: str - """ - if self._shared_folder_id_present: - return self._shared_folder_id_value - else: - return None - - @shared_folder_id.setter - def shared_folder_id(self, val): - if val is None: - del self.shared_folder_id - return - val = self._shared_folder_id_validator.validate(val) - self._shared_folder_id_value = val - self._shared_folder_id_present = True - - @shared_folder_id.deleter - def shared_folder_id(self): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - - @property - def traverse_only(self): - """ - Specifies that the folder can only be traversed and the user can only - see a limited subset of the contents of this folder because they don't - have read access to this folder. They do, however, have access to some - sub folder. - - :rtype: bool - """ - if self._traverse_only_present: - return self._traverse_only_value - else: - return False - - @traverse_only.setter - def traverse_only(self, val): - val = self._traverse_only_validator.validate(val) - self._traverse_only_value = val - self._traverse_only_present = True - - @traverse_only.deleter - def traverse_only(self): - self._traverse_only_value = None - self._traverse_only_present = False - - @property - def no_access(self): - """ - Specifies that the folder cannot be accessed by the user. - - :rtype: bool - """ - if self._no_access_present: - return self._no_access_value - else: - return False - - @no_access.setter - def no_access(self, val): - val = self._no_access_validator.validate(val) - self._no_access_value = val - self._no_access_present = True - - @no_access.deleter - def no_access(self): - self._no_access_value = None - self._no_access_present = False - - def __repr__(self): - return 'FolderSharingInfo(read_only={!r}, parent_shared_folder_id={!r}, shared_folder_id={!r}, traverse_only={!r}, no_access={!r})'.format( - self._read_only_value, - self._parent_shared_folder_id_value, - self._shared_folder_id_value, - self._traverse_only_value, - self._no_access_value, - ) - -FolderSharingInfo_validator = bv.Struct(FolderSharingInfo) - -class GetCopyReferenceArg(object): - """ - :ivar path: The path to the file or folder you want to get a copy reference - to. - """ - - __slots__ = [ - '_path_value', - '_path_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None): - self._path_value = None - self._path_present = False - if path is not None: - self.path = path - - @property - def path(self): - """ - The path to the file or folder you want to get a copy reference to. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - def __repr__(self): - return 'GetCopyReferenceArg(path={!r})'.format( - self._path_value, - ) - -GetCopyReferenceArg_validator = bv.Struct(GetCopyReferenceArg) - -class GetCopyReferenceError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def path(cls, val): - """ - Create an instance of this class set to the ``path`` tag with value - ``val``. - - :param LookupError val: - :rtype: GetCopyReferenceError - """ - return cls('path', val) - - def is_path(self): - """ - Check if the union tag is ``path``. - - :rtype: bool - """ - return self._tag == 'path' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_path(self): - """ - Only call this if :meth:`is_path` is true. - - :rtype: LookupError - """ - if not self.is_path(): - raise AttributeError("tag 'path' not set") - return self._value - - def __repr__(self): - return 'GetCopyReferenceError(%r, %r)' % (self._tag, self._value) - -GetCopyReferenceError_validator = bv.Union(GetCopyReferenceError) - -class GetCopyReferenceResult(object): - """ - :ivar metadata: Metadata of the file or folder. - :ivar copy_reference: A copy reference to the file or folder. - :ivar expires: The expiration date of the copy reference. This value is - currently set to be far enough in the future so that expiration is - effectively not an issue. - """ - - __slots__ = [ - '_metadata_value', - '_metadata_present', - '_copy_reference_value', - '_copy_reference_present', - '_expires_value', - '_expires_present', - ] - - _has_required_fields = True - - def __init__(self, - metadata=None, - copy_reference=None, - expires=None): - self._metadata_value = None - self._metadata_present = False - self._copy_reference_value = None - self._copy_reference_present = False - self._expires_value = None - self._expires_present = False - if metadata is not None: - self.metadata = metadata - if copy_reference is not None: - self.copy_reference = copy_reference - if expires is not None: - self.expires = expires - - @property - def metadata(self): - """ - Metadata of the file or folder. - - :rtype: Metadata - """ - if self._metadata_present: - return self._metadata_value - else: - raise AttributeError("missing required field 'metadata'") - - @metadata.setter - def metadata(self, val): - self._metadata_validator.validate_type_only(val) - self._metadata_value = val - self._metadata_present = True - - @metadata.deleter - def metadata(self): - self._metadata_value = None - self._metadata_present = False - - @property - def copy_reference(self): - """ - A copy reference to the file or folder. - - :rtype: str - """ - if self._copy_reference_present: - return self._copy_reference_value - else: - raise AttributeError("missing required field 'copy_reference'") - - @copy_reference.setter - def copy_reference(self, val): - val = self._copy_reference_validator.validate(val) - self._copy_reference_value = val - self._copy_reference_present = True - - @copy_reference.deleter - def copy_reference(self): - self._copy_reference_value = None - self._copy_reference_present = False - - @property - def expires(self): - """ - The expiration date of the copy reference. This value is currently set - to be far enough in the future so that expiration is effectively not an - issue. - - :rtype: datetime.datetime - """ - if self._expires_present: - return self._expires_value - else: - raise AttributeError("missing required field 'expires'") - - @expires.setter - def expires(self, val): - val = self._expires_validator.validate(val) - self._expires_value = val - self._expires_present = True - - @expires.deleter - def expires(self): - self._expires_value = None - self._expires_present = False - - def __repr__(self): - return 'GetCopyReferenceResult(metadata={!r}, copy_reference={!r}, expires={!r})'.format( - self._metadata_value, - self._copy_reference_value, - self._expires_value, - ) - -GetCopyReferenceResult_validator = bv.Struct(GetCopyReferenceResult) - -class GetTemporaryLinkArg(object): - """ - :ivar path: The path to the file you want a temporary link to. - """ - - __slots__ = [ - '_path_value', - '_path_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None): - self._path_value = None - self._path_present = False - if path is not None: - self.path = path - - @property - def path(self): - """ - The path to the file you want a temporary link to. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - def __repr__(self): - return 'GetTemporaryLinkArg(path={!r})'.format( - self._path_value, - ) - -GetTemporaryLinkArg_validator = bv.Struct(GetTemporaryLinkArg) - -class GetTemporaryLinkError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def path(cls, val): - """ - Create an instance of this class set to the ``path`` tag with value - ``val``. - - :param LookupError val: - :rtype: GetTemporaryLinkError - """ - return cls('path', val) - - def is_path(self): - """ - Check if the union tag is ``path``. - - :rtype: bool - """ - return self._tag == 'path' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_path(self): - """ - Only call this if :meth:`is_path` is true. - - :rtype: LookupError - """ - if not self.is_path(): - raise AttributeError("tag 'path' not set") - return self._value - - def __repr__(self): - return 'GetTemporaryLinkError(%r, %r)' % (self._tag, self._value) - -GetTemporaryLinkError_validator = bv.Union(GetTemporaryLinkError) - -class GetTemporaryLinkResult(object): - """ - :ivar metadata: Metadata of the file. - :ivar link: The temporary link which can be used to stream content the file. - """ - - __slots__ = [ - '_metadata_value', - '_metadata_present', - '_link_value', - '_link_present', - ] - - _has_required_fields = True - - def __init__(self, - metadata=None, - link=None): - self._metadata_value = None - self._metadata_present = False - self._link_value = None - self._link_present = False - if metadata is not None: - self.metadata = metadata - if link is not None: - self.link = link - - @property - def metadata(self): - """ - Metadata of the file. - - :rtype: FileMetadata - """ - if self._metadata_present: - return self._metadata_value - else: - raise AttributeError("missing required field 'metadata'") - - @metadata.setter - def metadata(self, val): - self._metadata_validator.validate_type_only(val) - self._metadata_value = val - self._metadata_present = True - - @metadata.deleter - def metadata(self): - self._metadata_value = None - self._metadata_present = False - - @property - def link(self): - """ - The temporary link which can be used to stream content the file. - - :rtype: str - """ - if self._link_present: - return self._link_value - else: - raise AttributeError("missing required field 'link'") - - @link.setter - def link(self, val): - val = self._link_validator.validate(val) - self._link_value = val - self._link_present = True - - @link.deleter - def link(self): - self._link_value = None - self._link_present = False - - def __repr__(self): - return 'GetTemporaryLinkResult(metadata={!r}, link={!r})'.format( - self._metadata_value, - self._link_value, - ) - -GetTemporaryLinkResult_validator = bv.Struct(GetTemporaryLinkResult) - -class GetThumbnailBatchArg(object): - """ - Arguments for :meth:`dropbox.dropbox.Dropbox.files_get_thumbnail_batch`. - - :ivar entries: List of files to get thumbnails. - """ - - __slots__ = [ - '_entries_value', - '_entries_present', - ] - - _has_required_fields = True - - def __init__(self, - entries=None): - self._entries_value = None - self._entries_present = False - if entries is not None: - self.entries = entries - - @property - def entries(self): - """ - List of files to get thumbnails. - - :rtype: list of [ThumbnailArg] - """ - if self._entries_present: - return self._entries_value - else: - raise AttributeError("missing required field 'entries'") - - @entries.setter - def entries(self, val): - val = self._entries_validator.validate(val) - self._entries_value = val - self._entries_present = True - - @entries.deleter - def entries(self): - self._entries_value = None - self._entries_present = False - - def __repr__(self): - return 'GetThumbnailBatchArg(entries={!r})'.format( - self._entries_value, - ) - -GetThumbnailBatchArg_validator = bv.Struct(GetThumbnailBatchArg) - -class GetThumbnailBatchError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar too_many_files: The operation involves more than 25 files. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - too_many_files = None - # Attribute is overwritten below the class definition - other = None - - def is_too_many_files(self): - """ - Check if the union tag is ``too_many_files``. - - :rtype: bool - """ - return self._tag == 'too_many_files' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'GetThumbnailBatchError(%r, %r)' % (self._tag, self._value) - -GetThumbnailBatchError_validator = bv.Union(GetThumbnailBatchError) - -class GetThumbnailBatchResult(object): - """ - :ivar entries: List of files and their thumbnails. - """ - - __slots__ = [ - '_entries_value', - '_entries_present', - ] - - _has_required_fields = True - - def __init__(self, - entries=None): - self._entries_value = None - self._entries_present = False - if entries is not None: - self.entries = entries - - @property - def entries(self): - """ - List of files and their thumbnails. - - :rtype: list of [GetThumbnailBatchResultEntry] - """ - if self._entries_present: - return self._entries_value - else: - raise AttributeError("missing required field 'entries'") - - @entries.setter - def entries(self, val): - val = self._entries_validator.validate(val) - self._entries_value = val - self._entries_present = True - - @entries.deleter - def entries(self): - self._entries_value = None - self._entries_present = False - - def __repr__(self): - return 'GetThumbnailBatchResult(entries={!r})'.format( - self._entries_value, - ) - -GetThumbnailBatchResult_validator = bv.Struct(GetThumbnailBatchResult) - -class GetThumbnailBatchResultData(object): - - __slots__ = [ - '_metadata_value', - '_metadata_present', - '_thumbnail_value', - '_thumbnail_present', - ] - - _has_required_fields = True - - def __init__(self, - metadata=None, - thumbnail=None): - self._metadata_value = None - self._metadata_present = False - self._thumbnail_value = None - self._thumbnail_present = False - if metadata is not None: - self.metadata = metadata - if thumbnail is not None: - self.thumbnail = thumbnail - - @property - def metadata(self): - """ - :rtype: FileMetadata - """ - if self._metadata_present: - return self._metadata_value - else: - raise AttributeError("missing required field 'metadata'") - - @metadata.setter - def metadata(self, val): - self._metadata_validator.validate_type_only(val) - self._metadata_value = val - self._metadata_present = True - - @metadata.deleter - def metadata(self): - self._metadata_value = None - self._metadata_present = False - - @property - def thumbnail(self): - """ - :rtype: str - """ - if self._thumbnail_present: - return self._thumbnail_value - else: - raise AttributeError("missing required field 'thumbnail'") - - @thumbnail.setter - def thumbnail(self, val): - val = self._thumbnail_validator.validate(val) - self._thumbnail_value = val - self._thumbnail_present = True - - @thumbnail.deleter - def thumbnail(self): - self._thumbnail_value = None - self._thumbnail_present = False - - def __repr__(self): - return 'GetThumbnailBatchResultData(metadata={!r}, thumbnail={!r})'.format( - self._metadata_value, - self._thumbnail_value, - ) - -GetThumbnailBatchResultData_validator = bv.Struct(GetThumbnailBatchResultData) - -class GetThumbnailBatchResultEntry(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar ThumbnailError failure: The result for this file if it was an error. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def success(cls, val): - """ - Create an instance of this class set to the ``success`` tag with value - ``val``. - - :param GetThumbnailBatchResultData val: - :rtype: GetThumbnailBatchResultEntry - """ - return cls('success', val) - - @classmethod - def failure(cls, val): - """ - Create an instance of this class set to the ``failure`` tag with value - ``val``. - - :param ThumbnailError val: - :rtype: GetThumbnailBatchResultEntry - """ - return cls('failure', val) - - def is_success(self): - """ - Check if the union tag is ``success``. - - :rtype: bool - """ - return self._tag == 'success' - - def is_failure(self): - """ - Check if the union tag is ``failure``. - - :rtype: bool - """ - return self._tag == 'failure' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_success(self): - """ - Only call this if :meth:`is_success` is true. - - :rtype: GetThumbnailBatchResultData - """ - if not self.is_success(): - raise AttributeError("tag 'success' not set") - return self._value - - def get_failure(self): - """ - The result for this file if it was an error. - - Only call this if :meth:`is_failure` is true. - - :rtype: ThumbnailError - """ - if not self.is_failure(): - raise AttributeError("tag 'failure' not set") - return self._value - - def __repr__(self): - return 'GetThumbnailBatchResultEntry(%r, %r)' % (self._tag, self._value) - -GetThumbnailBatchResultEntry_validator = bv.Union(GetThumbnailBatchResultEntry) - -class GpsCoordinates(object): - """ - GPS coordinates for a photo or video. - - :ivar latitude: Latitude of the GPS coordinates. - :ivar longitude: Longitude of the GPS coordinates. - """ - - __slots__ = [ - '_latitude_value', - '_latitude_present', - '_longitude_value', - '_longitude_present', - ] - - _has_required_fields = True - - def __init__(self, - latitude=None, - longitude=None): - self._latitude_value = None - self._latitude_present = False - self._longitude_value = None - self._longitude_present = False - if latitude is not None: - self.latitude = latitude - if longitude is not None: - self.longitude = longitude - - @property - def latitude(self): - """ - Latitude of the GPS coordinates. - - :rtype: float - """ - if self._latitude_present: - return self._latitude_value - else: - raise AttributeError("missing required field 'latitude'") - - @latitude.setter - def latitude(self, val): - val = self._latitude_validator.validate(val) - self._latitude_value = val - self._latitude_present = True - - @latitude.deleter - def latitude(self): - self._latitude_value = None - self._latitude_present = False - - @property - def longitude(self): - """ - Longitude of the GPS coordinates. - - :rtype: float - """ - if self._longitude_present: - return self._longitude_value - else: - raise AttributeError("missing required field 'longitude'") - - @longitude.setter - def longitude(self, val): - val = self._longitude_validator.validate(val) - self._longitude_value = val - self._longitude_present = True - - @longitude.deleter - def longitude(self): - self._longitude_value = None - self._longitude_present = False - - def __repr__(self): - return 'GpsCoordinates(latitude={!r}, longitude={!r})'.format( - self._latitude_value, - self._longitude_value, - ) - -GpsCoordinates_validator = bv.Struct(GpsCoordinates) - -class ListFolderArg(object): - """ - :ivar path: A unique identifier for the file. - :ivar recursive: If true, the list folder operation will be applied - recursively to all subfolders and the response will contain contents of - all subfolders. - :ivar include_media_info: If true, ``FileMetadata.media_info`` is set for - photo and video. - :ivar include_deleted: If true, the results will include entries for files - and folders that used to exist but were deleted. - :ivar include_has_explicit_shared_members: If true, the results will include - a flag for each file indicating whether or not that file has any - explicit members. - :ivar include_mounted_folders: If true, the results will include entries - under mounted folders which includes app folder, shared folder and team - folder. - :ivar limit: The maximum number of results to return per request. Note: This - is an approximate number and there can be slightly more entries returned - in some cases. - :ivar shared_link: A shared link to list the contents of. If the link is - password-protected, the password must be provided. If this field is - present, ``ListFolderArg.path`` will be relative to root of the shared - link. Only non-recursive mode is supported for shared link. - """ - - __slots__ = [ - '_path_value', - '_path_present', - '_recursive_value', - '_recursive_present', - '_include_media_info_value', - '_include_media_info_present', - '_include_deleted_value', - '_include_deleted_present', - '_include_has_explicit_shared_members_value', - '_include_has_explicit_shared_members_present', - '_include_mounted_folders_value', - '_include_mounted_folders_present', - '_limit_value', - '_limit_present', - '_shared_link_value', - '_shared_link_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - recursive=None, - include_media_info=None, - include_deleted=None, - include_has_explicit_shared_members=None, - include_mounted_folders=None, - limit=None, - shared_link=None): - self._path_value = None - self._path_present = False - self._recursive_value = None - self._recursive_present = False - self._include_media_info_value = None - self._include_media_info_present = False - self._include_deleted_value = None - self._include_deleted_present = False - self._include_has_explicit_shared_members_value = None - self._include_has_explicit_shared_members_present = False - self._include_mounted_folders_value = None - self._include_mounted_folders_present = False - self._limit_value = None - self._limit_present = False - self._shared_link_value = None - self._shared_link_present = False - if path is not None: - self.path = path - if recursive is not None: - self.recursive = recursive - if include_media_info is not None: - self.include_media_info = include_media_info - if include_deleted is not None: - self.include_deleted = include_deleted - if include_has_explicit_shared_members is not None: - self.include_has_explicit_shared_members = include_has_explicit_shared_members - if include_mounted_folders is not None: - self.include_mounted_folders = include_mounted_folders - if limit is not None: - self.limit = limit - if shared_link is not None: - self.shared_link = shared_link - - @property - def path(self): - """ - A unique identifier for the file. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def recursive(self): - """ - If true, the list folder operation will be applied recursively to all - subfolders and the response will contain contents of all subfolders. - - :rtype: bool - """ - if self._recursive_present: - return self._recursive_value - else: - return False - - @recursive.setter - def recursive(self, val): - val = self._recursive_validator.validate(val) - self._recursive_value = val - self._recursive_present = True - - @recursive.deleter - def recursive(self): - self._recursive_value = None - self._recursive_present = False - - @property - def include_media_info(self): - """ - If true, ``FileMetadata.media_info`` is set for photo and video. - - :rtype: bool - """ - if self._include_media_info_present: - return self._include_media_info_value - else: - return False - - @include_media_info.setter - def include_media_info(self, val): - val = self._include_media_info_validator.validate(val) - self._include_media_info_value = val - self._include_media_info_present = True - - @include_media_info.deleter - def include_media_info(self): - self._include_media_info_value = None - self._include_media_info_present = False - - @property - def include_deleted(self): - """ - If true, the results will include entries for files and folders that - used to exist but were deleted. - - :rtype: bool - """ - if self._include_deleted_present: - return self._include_deleted_value - else: - return False - - @include_deleted.setter - def include_deleted(self, val): - val = self._include_deleted_validator.validate(val) - self._include_deleted_value = val - self._include_deleted_present = True - - @include_deleted.deleter - def include_deleted(self): - self._include_deleted_value = None - self._include_deleted_present = False - - @property - def include_has_explicit_shared_members(self): - """ - If true, the results will include a flag for each file indicating - whether or not that file has any explicit members. - - :rtype: bool - """ - if self._include_has_explicit_shared_members_present: - return self._include_has_explicit_shared_members_value - else: - return False - - @include_has_explicit_shared_members.setter - def include_has_explicit_shared_members(self, val): - val = self._include_has_explicit_shared_members_validator.validate(val) - self._include_has_explicit_shared_members_value = val - self._include_has_explicit_shared_members_present = True - - @include_has_explicit_shared_members.deleter - def include_has_explicit_shared_members(self): - self._include_has_explicit_shared_members_value = None - self._include_has_explicit_shared_members_present = False - - @property - def include_mounted_folders(self): - """ - If true, the results will include entries under mounted folders which - includes app folder, shared folder and team folder. - - :rtype: bool - """ - if self._include_mounted_folders_present: - return self._include_mounted_folders_value - else: - return True - - @include_mounted_folders.setter - def include_mounted_folders(self, val): - val = self._include_mounted_folders_validator.validate(val) - self._include_mounted_folders_value = val - self._include_mounted_folders_present = True - - @include_mounted_folders.deleter - def include_mounted_folders(self): - self._include_mounted_folders_value = None - self._include_mounted_folders_present = False - - @property - def limit(self): - """ - The maximum number of results to return per request. Note: This is an - approximate number and there can be slightly more entries returned in - some cases. - - :rtype: long - """ - if self._limit_present: - return self._limit_value - else: - return None - - @limit.setter - def limit(self, val): - if val is None: - del self.limit - return - val = self._limit_validator.validate(val) - self._limit_value = val - self._limit_present = True - - @limit.deleter - def limit(self): - self._limit_value = None - self._limit_present = False - - @property - def shared_link(self): - """ - A shared link to list the contents of. If the link is - password-protected, the password must be provided. If this field is - present, ``ListFolderArg.path`` will be relative to root of the shared - link. Only non-recursive mode is supported for shared link. - - :rtype: SharedLink - """ - if self._shared_link_present: - return self._shared_link_value - else: - return None - - @shared_link.setter - def shared_link(self, val): - if val is None: - del self.shared_link - return - self._shared_link_validator.validate_type_only(val) - self._shared_link_value = val - self._shared_link_present = True - - @shared_link.deleter - def shared_link(self): - self._shared_link_value = None - self._shared_link_present = False - - def __repr__(self): - return 'ListFolderArg(path={!r}, recursive={!r}, include_media_info={!r}, include_deleted={!r}, include_has_explicit_shared_members={!r}, include_mounted_folders={!r}, limit={!r}, shared_link={!r})'.format( - self._path_value, - self._recursive_value, - self._include_media_info_value, - self._include_deleted_value, - self._include_has_explicit_shared_members_value, - self._include_mounted_folders_value, - self._limit_value, - self._shared_link_value, - ) - -ListFolderArg_validator = bv.Struct(ListFolderArg) - -class ListFolderContinueArg(object): - """ - :ivar cursor: The cursor returned by your last call to - :meth:`dropbox.dropbox.Dropbox.files_list_folder` or - :meth:`dropbox.dropbox.Dropbox.files_list_folder_continue`. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - cursor=None): - self._cursor_value = None - self._cursor_present = False - if cursor is not None: - self.cursor = cursor - - @property - def cursor(self): - """ - The cursor returned by your last call to - :meth:`dropbox.dropbox.Dropbox.files_list_folder` or - :meth:`dropbox.dropbox.Dropbox.files_list_folder_continue`. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'ListFolderContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - -ListFolderContinueArg_validator = bv.Struct(ListFolderContinueArg) - -class ListFolderContinueError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar reset: Indicates that the cursor has been invalidated. Call - :meth:`dropbox.dropbox.Dropbox.files_list_folder` to obtain a new - cursor. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - reset = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def path(cls, val): - """ - Create an instance of this class set to the ``path`` tag with value - ``val``. - - :param LookupError val: - :rtype: ListFolderContinueError - """ - return cls('path', val) - - def is_path(self): - """ - Check if the union tag is ``path``. - - :rtype: bool - """ - return self._tag == 'path' - - def is_reset(self): - """ - Check if the union tag is ``reset``. - - :rtype: bool - """ - return self._tag == 'reset' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_path(self): - """ - Only call this if :meth:`is_path` is true. - - :rtype: LookupError - """ - if not self.is_path(): - raise AttributeError("tag 'path' not set") - return self._value - - def __repr__(self): - return 'ListFolderContinueError(%r, %r)' % (self._tag, self._value) - -ListFolderContinueError_validator = bv.Union(ListFolderContinueError) - -class ListFolderError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def path(cls, val): - """ - Create an instance of this class set to the ``path`` tag with value - ``val``. - - :param LookupError val: - :rtype: ListFolderError - """ - return cls('path', val) - - def is_path(self): - """ - Check if the union tag is ``path``. - - :rtype: bool - """ - return self._tag == 'path' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_path(self): - """ - Only call this if :meth:`is_path` is true. - - :rtype: LookupError - """ - if not self.is_path(): - raise AttributeError("tag 'path' not set") - return self._value - - def __repr__(self): - return 'ListFolderError(%r, %r)' % (self._tag, self._value) - -ListFolderError_validator = bv.Union(ListFolderError) - -class ListFolderGetLatestCursorResult(object): - """ - :ivar cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.files_list_folder_continue` to see what's - changed in the folder since your previous query. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - cursor=None): - self._cursor_value = None - self._cursor_present = False - if cursor is not None: - self.cursor = cursor - - @property - def cursor(self): - """ - Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.files_list_folder_continue` to see what's - changed in the folder since your previous query. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'ListFolderGetLatestCursorResult(cursor={!r})'.format( - self._cursor_value, - ) - -ListFolderGetLatestCursorResult_validator = bv.Struct(ListFolderGetLatestCursorResult) - -class ListFolderLongpollArg(object): - """ - :ivar cursor: A cursor as returned by - :meth:`dropbox.dropbox.Dropbox.files_list_folder` or - :meth:`dropbox.dropbox.Dropbox.files_list_folder_continue`. Cursors - retrieved by setting ``ListFolderArg.include_media_info`` to ``True`` - are not supported. - :ivar timeout: A timeout in seconds. The request will block for at most this - length of time, plus up to 90 seconds of random jitter added to avoid - the thundering herd problem. Care should be taken when using this - parameter, as some network infrastructure does not support long - timeouts. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - '_timeout_value', - '_timeout_present', - ] - - _has_required_fields = True - - def __init__(self, - cursor=None, - timeout=None): - self._cursor_value = None - self._cursor_present = False - self._timeout_value = None - self._timeout_present = False - if cursor is not None: - self.cursor = cursor - if timeout is not None: - self.timeout = timeout - - @property - def cursor(self): - """ - A cursor as returned by - :meth:`dropbox.dropbox.Dropbox.files_list_folder` or - :meth:`dropbox.dropbox.Dropbox.files_list_folder_continue`. Cursors - retrieved by setting ``ListFolderArg.include_media_info`` to ``True`` - are not supported. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - @property - def timeout(self): - """ - A timeout in seconds. The request will block for at most this length of - time, plus up to 90 seconds of random jitter added to avoid the - thundering herd problem. Care should be taken when using this parameter, - as some network infrastructure does not support long timeouts. - - :rtype: long - """ - if self._timeout_present: - return self._timeout_value - else: - return 30 - - @timeout.setter - def timeout(self, val): - val = self._timeout_validator.validate(val) - self._timeout_value = val - self._timeout_present = True - - @timeout.deleter - def timeout(self): - self._timeout_value = None - self._timeout_present = False - - def __repr__(self): - return 'ListFolderLongpollArg(cursor={!r}, timeout={!r})'.format( - self._cursor_value, - self._timeout_value, - ) - -ListFolderLongpollArg_validator = bv.Struct(ListFolderLongpollArg) - -class ListFolderLongpollError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar reset: Indicates that the cursor has been invalidated. Call - :meth:`dropbox.dropbox.Dropbox.files_list_folder` to obtain a new - cursor. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - reset = None - # Attribute is overwritten below the class definition - other = None - - def is_reset(self): - """ - Check if the union tag is ``reset``. - - :rtype: bool - """ - return self._tag == 'reset' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'ListFolderLongpollError(%r, %r)' % (self._tag, self._value) - -ListFolderLongpollError_validator = bv.Union(ListFolderLongpollError) - -class ListFolderLongpollResult(object): - """ - :ivar changes: Indicates whether new changes are available. If true, call - :meth:`dropbox.dropbox.Dropbox.files_list_folder_continue` to retrieve - the changes. - :ivar backoff: If present, backoff for at least this many seconds before - calling :meth:`dropbox.dropbox.Dropbox.files_list_folder_longpoll` - again. - """ - - __slots__ = [ - '_changes_value', - '_changes_present', - '_backoff_value', - '_backoff_present', - ] - - _has_required_fields = True - - def __init__(self, - changes=None, - backoff=None): - self._changes_value = None - self._changes_present = False - self._backoff_value = None - self._backoff_present = False - if changes is not None: - self.changes = changes - if backoff is not None: - self.backoff = backoff - - @property - def changes(self): - """ - Indicates whether new changes are available. If true, call - :meth:`dropbox.dropbox.Dropbox.files_list_folder_continue` to retrieve - the changes. - - :rtype: bool - """ - if self._changes_present: - return self._changes_value - else: - raise AttributeError("missing required field 'changes'") - - @changes.setter - def changes(self, val): - val = self._changes_validator.validate(val) - self._changes_value = val - self._changes_present = True - - @changes.deleter - def changes(self): - self._changes_value = None - self._changes_present = False - - @property - def backoff(self): - """ - If present, backoff for at least this many seconds before calling - :meth:`dropbox.dropbox.Dropbox.files_list_folder_longpoll` again. - - :rtype: long - """ - if self._backoff_present: - return self._backoff_value - else: - return None - - @backoff.setter - def backoff(self, val): - if val is None: - del self.backoff - return - val = self._backoff_validator.validate(val) - self._backoff_value = val - self._backoff_present = True - - @backoff.deleter - def backoff(self): - self._backoff_value = None - self._backoff_present = False - - def __repr__(self): - return 'ListFolderLongpollResult(changes={!r}, backoff={!r})'.format( - self._changes_value, - self._backoff_value, - ) - -ListFolderLongpollResult_validator = bv.Struct(ListFolderLongpollResult) - -class ListFolderResult(object): - """ - :ivar entries: The files and (direct) subfolders in the folder. - :ivar cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.files_list_folder_continue` to see what's - changed in the folder since your previous query. - :ivar has_more: If true, then there are more entries available. Pass the - cursor to :meth:`dropbox.dropbox.Dropbox.files_list_folder_continue` to - retrieve the rest. - """ - - __slots__ = [ - '_entries_value', - '_entries_present', - '_cursor_value', - '_cursor_present', - '_has_more_value', - '_has_more_present', - ] - - _has_required_fields = True - - def __init__(self, - entries=None, - cursor=None, - has_more=None): - self._entries_value = None - self._entries_present = False - self._cursor_value = None - self._cursor_present = False - self._has_more_value = None - self._has_more_present = False - if entries is not None: - self.entries = entries - if cursor is not None: - self.cursor = cursor - if has_more is not None: - self.has_more = has_more - - @property - def entries(self): - """ - The files and (direct) subfolders in the folder. - - :rtype: list of [Metadata] - """ - if self._entries_present: - return self._entries_value - else: - raise AttributeError("missing required field 'entries'") - - @entries.setter - def entries(self, val): - val = self._entries_validator.validate(val) - self._entries_value = val - self._entries_present = True - - @entries.deleter - def entries(self): - self._entries_value = None - self._entries_present = False - - @property - def cursor(self): - """ - Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.files_list_folder_continue` to see what's - changed in the folder since your previous query. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - @property - def has_more(self): - """ - If true, then there are more entries available. Pass the cursor to - :meth:`dropbox.dropbox.Dropbox.files_list_folder_continue` to retrieve - the rest. - - :rtype: bool - """ - if self._has_more_present: - return self._has_more_value - else: - raise AttributeError("missing required field 'has_more'") - - @has_more.setter - def has_more(self, val): - val = self._has_more_validator.validate(val) - self._has_more_value = val - self._has_more_present = True - - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False - - def __repr__(self): - return 'ListFolderResult(entries={!r}, cursor={!r}, has_more={!r})'.format( - self._entries_value, - self._cursor_value, - self._has_more_value, - ) - -ListFolderResult_validator = bv.Struct(ListFolderResult) - -class ListRevisionsArg(object): - """ - :ivar path: The path to the file you want to see the revisions of. - :ivar mode: Determines the behavior of the API in listing the revisions for - a given file path or id. - :ivar limit: The maximum number of revision entries returned. - """ - - __slots__ = [ - '_path_value', - '_path_present', - '_mode_value', - '_mode_present', - '_limit_value', - '_limit_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - mode=None, - limit=None): - self._path_value = None - self._path_present = False - self._mode_value = None - self._mode_present = False - self._limit_value = None - self._limit_present = False - if path is not None: - self.path = path - if mode is not None: - self.mode = mode - if limit is not None: - self.limit = limit - - @property - def path(self): - """ - The path to the file you want to see the revisions of. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def mode(self): - """ - Determines the behavior of the API in listing the revisions for a given - file path or id. - - :rtype: ListRevisionsMode - """ - if self._mode_present: - return self._mode_value - else: - return ListRevisionsMode.path - - @mode.setter - def mode(self, val): - self._mode_validator.validate_type_only(val) - self._mode_value = val - self._mode_present = True - - @mode.deleter - def mode(self): - self._mode_value = None - self._mode_present = False - - @property - def limit(self): - """ - The maximum number of revision entries returned. - - :rtype: long - """ - if self._limit_present: - return self._limit_value - else: - return 10 - - @limit.setter - def limit(self, val): - val = self._limit_validator.validate(val) - self._limit_value = val - self._limit_present = True - - @limit.deleter - def limit(self): - self._limit_value = None - self._limit_present = False - - def __repr__(self): - return 'ListRevisionsArg(path={!r}, mode={!r}, limit={!r})'.format( - self._path_value, - self._mode_value, - self._limit_value, - ) - -ListRevisionsArg_validator = bv.Struct(ListRevisionsArg) - -class ListRevisionsError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def path(cls, val): - """ - Create an instance of this class set to the ``path`` tag with value - ``val``. - - :param LookupError val: - :rtype: ListRevisionsError - """ - return cls('path', val) - - def is_path(self): - """ - Check if the union tag is ``path``. - - :rtype: bool - """ - return self._tag == 'path' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_path(self): - """ - Only call this if :meth:`is_path` is true. - - :rtype: LookupError - """ - if not self.is_path(): - raise AttributeError("tag 'path' not set") - return self._value - - def __repr__(self): - return 'ListRevisionsError(%r, %r)' % (self._tag, self._value) - -ListRevisionsError_validator = bv.Union(ListRevisionsError) - -class ListRevisionsMode(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar path: Returns revisions with the same file path as identified by the - latest file entry at the given file path or id. - :ivar id: Returns revisions with the same file id as identified by the - latest file entry at the given file path or id. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - path = None - # Attribute is overwritten below the class definition - id = None - # Attribute is overwritten below the class definition - other = None - - def is_path(self): - """ - Check if the union tag is ``path``. - - :rtype: bool - """ - return self._tag == 'path' - - def is_id(self): - """ - Check if the union tag is ``id``. - - :rtype: bool - """ - return self._tag == 'id' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'ListRevisionsMode(%r, %r)' % (self._tag, self._value) - -ListRevisionsMode_validator = bv.Union(ListRevisionsMode) - -class ListRevisionsResult(object): - """ - :ivar is_deleted: If the file identified by the latest revision in the - response is either deleted or moved. - :ivar server_deleted: The time of deletion if the file was deleted. - :ivar entries: The revisions for the file. Only revisions that are not - deleted will show up here. - """ - - __slots__ = [ - '_is_deleted_value', - '_is_deleted_present', - '_server_deleted_value', - '_server_deleted_present', - '_entries_value', - '_entries_present', - ] - - _has_required_fields = True - - def __init__(self, - is_deleted=None, - entries=None, - server_deleted=None): - self._is_deleted_value = None - self._is_deleted_present = False - self._server_deleted_value = None - self._server_deleted_present = False - self._entries_value = None - self._entries_present = False - if is_deleted is not None: - self.is_deleted = is_deleted - if server_deleted is not None: - self.server_deleted = server_deleted - if entries is not None: - self.entries = entries - - @property - def is_deleted(self): - """ - If the file identified by the latest revision in the response is either - deleted or moved. - - :rtype: bool - """ - if self._is_deleted_present: - return self._is_deleted_value - else: - raise AttributeError("missing required field 'is_deleted'") - - @is_deleted.setter - def is_deleted(self, val): - val = self._is_deleted_validator.validate(val) - self._is_deleted_value = val - self._is_deleted_present = True - - @is_deleted.deleter - def is_deleted(self): - self._is_deleted_value = None - self._is_deleted_present = False - - @property - def server_deleted(self): - """ - The time of deletion if the file was deleted. - - :rtype: datetime.datetime - """ - if self._server_deleted_present: - return self._server_deleted_value - else: - return None - - @server_deleted.setter - def server_deleted(self, val): - if val is None: - del self.server_deleted - return - val = self._server_deleted_validator.validate(val) - self._server_deleted_value = val - self._server_deleted_present = True - - @server_deleted.deleter - def server_deleted(self): - self._server_deleted_value = None - self._server_deleted_present = False - - @property - def entries(self): - """ - The revisions for the file. Only revisions that are not deleted will - show up here. - - :rtype: list of [FileMetadata] - """ - if self._entries_present: - return self._entries_value - else: - raise AttributeError("missing required field 'entries'") - - @entries.setter - def entries(self, val): - val = self._entries_validator.validate(val) - self._entries_value = val - self._entries_present = True - - @entries.deleter - def entries(self): - self._entries_value = None - self._entries_present = False - - def __repr__(self): - return 'ListRevisionsResult(is_deleted={!r}, entries={!r}, server_deleted={!r})'.format( - self._is_deleted_value, - self._entries_value, - self._server_deleted_value, - ) - -ListRevisionsResult_validator = bv.Struct(ListRevisionsResult) - -class LookupError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar not_found: There is nothing at the given path. - :ivar not_file: We were expecting a file, but the given path refers to - something that isn't a file. - :ivar not_folder: We were expecting a folder, but the given path refers to - something that isn't a folder. - :ivar restricted_content: The file cannot be transferred because the content - is restricted. For example, sometimes there are legal restrictions due - to copyright claims. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - not_found = None - # Attribute is overwritten below the class definition - not_file = None - # Attribute is overwritten below the class definition - not_folder = None - # Attribute is overwritten below the class definition - restricted_content = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def malformed_path(cls, val): - """ - Create an instance of this class set to the ``malformed_path`` tag with - value ``val``. - - :param Optional[str] val: - :rtype: LookupError - """ - return cls('malformed_path', val) - - def is_malformed_path(self): - """ - Check if the union tag is ``malformed_path``. - - :rtype: bool - """ - return self._tag == 'malformed_path' - - def is_not_found(self): - """ - Check if the union tag is ``not_found``. - - :rtype: bool - """ - return self._tag == 'not_found' - - def is_not_file(self): - """ - Check if the union tag is ``not_file``. - - :rtype: bool - """ - return self._tag == 'not_file' - - def is_not_folder(self): - """ - Check if the union tag is ``not_folder``. - - :rtype: bool - """ - return self._tag == 'not_folder' - - def is_restricted_content(self): - """ - Check if the union tag is ``restricted_content``. - - :rtype: bool - """ - return self._tag == 'restricted_content' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_malformed_path(self): - """ - Only call this if :meth:`is_malformed_path` is true. - - :rtype: Optional[str] - """ - if not self.is_malformed_path(): - raise AttributeError("tag 'malformed_path' not set") - return self._value - - def __repr__(self): - return 'LookupError(%r, %r)' % (self._tag, self._value) - -LookupError_validator = bv.Union(LookupError) - -class MediaInfo(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar pending: Indicate the photo/video is still under processing and - metadata is not available yet. - :ivar MediaMetadata metadata: The metadata for the photo/video. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - pending = None - - @classmethod - def metadata(cls, val): - """ - Create an instance of this class set to the ``metadata`` tag with value - ``val``. - - :param MediaMetadata val: - :rtype: MediaInfo - """ - return cls('metadata', val) - - def is_pending(self): - """ - Check if the union tag is ``pending``. - - :rtype: bool - """ - return self._tag == 'pending' - - def is_metadata(self): - """ - Check if the union tag is ``metadata``. - - :rtype: bool - """ - return self._tag == 'metadata' - - def get_metadata(self): - """ - The metadata for the photo/video. - - Only call this if :meth:`is_metadata` is true. - - :rtype: MediaMetadata - """ - if not self.is_metadata(): - raise AttributeError("tag 'metadata' not set") - return self._value - - def __repr__(self): - return 'MediaInfo(%r, %r)' % (self._tag, self._value) - -MediaInfo_validator = bv.Union(MediaInfo) - -class MediaMetadata(object): - """ - Metadata for a photo or video. - - :ivar dimensions: Dimension of the photo/video. - :ivar location: The GPS coordinate of the photo/video. - :ivar time_taken: The timestamp when the photo/video is taken. - """ - - __slots__ = [ - '_dimensions_value', - '_dimensions_present', - '_location_value', - '_location_present', - '_time_taken_value', - '_time_taken_present', - ] - - _has_required_fields = False - - def __init__(self, - dimensions=None, - location=None, - time_taken=None): - self._dimensions_value = None - self._dimensions_present = False - self._location_value = None - self._location_present = False - self._time_taken_value = None - self._time_taken_present = False - if dimensions is not None: - self.dimensions = dimensions - if location is not None: - self.location = location - if time_taken is not None: - self.time_taken = time_taken - - @property - def dimensions(self): - """ - Dimension of the photo/video. - - :rtype: Dimensions - """ - if self._dimensions_present: - return self._dimensions_value - else: - return None - - @dimensions.setter - def dimensions(self, val): - if val is None: - del self.dimensions - return - self._dimensions_validator.validate_type_only(val) - self._dimensions_value = val - self._dimensions_present = True - - @dimensions.deleter - def dimensions(self): - self._dimensions_value = None - self._dimensions_present = False - - @property - def location(self): - """ - The GPS coordinate of the photo/video. - - :rtype: GpsCoordinates - """ - if self._location_present: - return self._location_value - else: - return None - - @location.setter - def location(self, val): - if val is None: - del self.location - return - self._location_validator.validate_type_only(val) - self._location_value = val - self._location_present = True - - @location.deleter - def location(self): - self._location_value = None - self._location_present = False - - @property - def time_taken(self): - """ - The timestamp when the photo/video is taken. - - :rtype: datetime.datetime - """ - if self._time_taken_present: - return self._time_taken_value - else: - return None - - @time_taken.setter - def time_taken(self, val): - if val is None: - del self.time_taken - return - val = self._time_taken_validator.validate(val) - self._time_taken_value = val - self._time_taken_present = True - - @time_taken.deleter - def time_taken(self): - self._time_taken_value = None - self._time_taken_present = False - - def __repr__(self): - return 'MediaMetadata(dimensions={!r}, location={!r}, time_taken={!r})'.format( - self._dimensions_value, - self._location_value, - self._time_taken_value, - ) - -MediaMetadata_validator = bv.StructTree(MediaMetadata) - -class PhotoMetadata(MediaMetadata): - """ - Metadata for a photo. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self, - dimensions=None, - location=None, - time_taken=None): - super(PhotoMetadata, self).__init__(dimensions, - location, - time_taken) - - def __repr__(self): - return 'PhotoMetadata(dimensions={!r}, location={!r}, time_taken={!r})'.format( - self._dimensions_value, - self._location_value, - self._time_taken_value, - ) - -PhotoMetadata_validator = bv.Struct(PhotoMetadata) - -class PreviewArg(object): - """ - :ivar path: The path of the file to preview. - :ivar rev: Please specify revision in ``path`` instead. - """ - - __slots__ = [ - '_path_value', - '_path_present', - '_rev_value', - '_rev_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - rev=None): - self._path_value = None - self._path_present = False - self._rev_value = None - self._rev_present = False - if path is not None: - self.path = path - if rev is not None: - self.rev = rev - - @property - def path(self): - """ - The path of the file to preview. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def rev(self): - """ - Please specify revision in ``path`` instead. - - :rtype: str - """ - if self._rev_present: - return self._rev_value - else: - return None - - @rev.setter - def rev(self, val): - if val is None: - del self.rev - return - val = self._rev_validator.validate(val) - self._rev_value = val - self._rev_present = True - - @rev.deleter - def rev(self): - self._rev_value = None - self._rev_present = False - - def __repr__(self): - return 'PreviewArg(path={!r}, rev={!r})'.format( - self._path_value, - self._rev_value, - ) - -PreviewArg_validator = bv.Struct(PreviewArg) - -class PreviewError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar LookupError path: An error occurs when downloading metadata for the - file. - :ivar in_progress: This preview generation is still in progress and the file - is not ready for preview yet. - :ivar unsupported_extension: The file extension is not supported preview - generation. - :ivar unsupported_content: The file content is not supported for preview - generation. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - in_progress = None - # Attribute is overwritten below the class definition - unsupported_extension = None - # Attribute is overwritten below the class definition - unsupported_content = None - - @classmethod - def path(cls, val): - """ - Create an instance of this class set to the ``path`` tag with value - ``val``. - - :param LookupError val: - :rtype: PreviewError - """ - return cls('path', val) - - def is_path(self): - """ - Check if the union tag is ``path``. - - :rtype: bool - """ - return self._tag == 'path' - - def is_in_progress(self): - """ - Check if the union tag is ``in_progress``. - - :rtype: bool - """ - return self._tag == 'in_progress' - - def is_unsupported_extension(self): - """ - Check if the union tag is ``unsupported_extension``. - - :rtype: bool - """ - return self._tag == 'unsupported_extension' - - def is_unsupported_content(self): - """ - Check if the union tag is ``unsupported_content``. - - :rtype: bool - """ - return self._tag == 'unsupported_content' - - def get_path(self): - """ - An error occurs when downloading metadata for the file. - - Only call this if :meth:`is_path` is true. - - :rtype: LookupError - """ - if not self.is_path(): - raise AttributeError("tag 'path' not set") - return self._value - - def __repr__(self): - return 'PreviewError(%r, %r)' % (self._tag, self._value) - -PreviewError_validator = bv.Union(PreviewError) - -class RelocationPath(object): - """ - :ivar from_path: Path in the user's Dropbox to be copied or moved. - :ivar to_path: Path in the user's Dropbox that is the destination. - """ - - __slots__ = [ - '_from_path_value', - '_from_path_present', - '_to_path_value', - '_to_path_present', - ] - - _has_required_fields = True - - def __init__(self, - from_path=None, - to_path=None): - self._from_path_value = None - self._from_path_present = False - self._to_path_value = None - self._to_path_present = False - if from_path is not None: - self.from_path = from_path - if to_path is not None: - self.to_path = to_path - - @property - def from_path(self): - """ - Path in the user's Dropbox to be copied or moved. - - :rtype: str - """ - if self._from_path_present: - return self._from_path_value - else: - raise AttributeError("missing required field 'from_path'") - - @from_path.setter - def from_path(self, val): - val = self._from_path_validator.validate(val) - self._from_path_value = val - self._from_path_present = True - - @from_path.deleter - def from_path(self): - self._from_path_value = None - self._from_path_present = False - - @property - def to_path(self): - """ - Path in the user's Dropbox that is the destination. - - :rtype: str - """ - if self._to_path_present: - return self._to_path_value - else: - raise AttributeError("missing required field 'to_path'") - - @to_path.setter - def to_path(self, val): - val = self._to_path_validator.validate(val) - self._to_path_value = val - self._to_path_present = True - - @to_path.deleter - def to_path(self): - self._to_path_value = None - self._to_path_present = False - - def __repr__(self): - return 'RelocationPath(from_path={!r}, to_path={!r})'.format( - self._from_path_value, - self._to_path_value, - ) - -RelocationPath_validator = bv.Struct(RelocationPath) - -class RelocationArg(RelocationPath): - """ - :ivar allow_shared_folder: If true, - :meth:`dropbox.dropbox.Dropbox.files_copy` will copy contents in shared - folder, otherwise ``RelocationError.cant_copy_shared_folder`` will be - returned if ``from_path`` contains shared folder. This field is always - true for :meth:`dropbox.dropbox.Dropbox.files_move`. - :ivar autorename: If there's a conflict, have the Dropbox server try to - autorename the file to avoid the conflict. - :ivar allow_ownership_transfer: Allow moves by owner even if it would result - in an ownership transfer for the content being moved. This does not - apply to copies. - """ - - __slots__ = [ - '_allow_shared_folder_value', - '_allow_shared_folder_present', - '_autorename_value', - '_autorename_present', - '_allow_ownership_transfer_value', - '_allow_ownership_transfer_present', - ] - - _has_required_fields = True - - def __init__(self, - from_path=None, - to_path=None, - allow_shared_folder=None, - autorename=None, - allow_ownership_transfer=None): - super(RelocationArg, self).__init__(from_path, - to_path) - self._allow_shared_folder_value = None - self._allow_shared_folder_present = False - self._autorename_value = None - self._autorename_present = False - self._allow_ownership_transfer_value = None - self._allow_ownership_transfer_present = False - if allow_shared_folder is not None: - self.allow_shared_folder = allow_shared_folder - if autorename is not None: - self.autorename = autorename - if allow_ownership_transfer is not None: - self.allow_ownership_transfer = allow_ownership_transfer - - @property - def allow_shared_folder(self): - """ - If true, :meth:`dropbox.dropbox.Dropbox.files_copy` will copy contents - in shared folder, otherwise ``RelocationError.cant_copy_shared_folder`` - will be returned if ``from_path`` contains shared folder. This field is - always true for :meth:`dropbox.dropbox.Dropbox.files_move`. - - :rtype: bool - """ - if self._allow_shared_folder_present: - return self._allow_shared_folder_value - else: - return False - - @allow_shared_folder.setter - def allow_shared_folder(self, val): - val = self._allow_shared_folder_validator.validate(val) - self._allow_shared_folder_value = val - self._allow_shared_folder_present = True - - @allow_shared_folder.deleter - def allow_shared_folder(self): - self._allow_shared_folder_value = None - self._allow_shared_folder_present = False - - @property - def autorename(self): - """ - If there's a conflict, have the Dropbox server try to autorename the - file to avoid the conflict. - - :rtype: bool - """ - if self._autorename_present: - return self._autorename_value - else: - return False - - @autorename.setter - def autorename(self, val): - val = self._autorename_validator.validate(val) - self._autorename_value = val - self._autorename_present = True - - @autorename.deleter - def autorename(self): - self._autorename_value = None - self._autorename_present = False - - @property - def allow_ownership_transfer(self): - """ - Allow moves by owner even if it would result in an ownership transfer - for the content being moved. This does not apply to copies. - - :rtype: bool - """ - if self._allow_ownership_transfer_present: - return self._allow_ownership_transfer_value - else: - return False - - @allow_ownership_transfer.setter - def allow_ownership_transfer(self, val): - val = self._allow_ownership_transfer_validator.validate(val) - self._allow_ownership_transfer_value = val - self._allow_ownership_transfer_present = True - - @allow_ownership_transfer.deleter - def allow_ownership_transfer(self): - self._allow_ownership_transfer_value = None - self._allow_ownership_transfer_present = False - - def __repr__(self): - return 'RelocationArg(from_path={!r}, to_path={!r}, allow_shared_folder={!r}, autorename={!r}, allow_ownership_transfer={!r})'.format( - self._from_path_value, - self._to_path_value, - self._allow_shared_folder_value, - self._autorename_value, - self._allow_ownership_transfer_value, - ) - -RelocationArg_validator = bv.Struct(RelocationArg) - -class RelocationBatchArg(object): - """ - :ivar entries: List of entries to be moved or copied. Each entry is - :class:`RelocationPath`. - :ivar allow_shared_folder: If true, - :meth:`dropbox.dropbox.Dropbox.files_copy_batch` will copy contents in - shared folder, otherwise ``RelocationError.cant_copy_shared_folder`` - will be returned if ``RelocationPath.from_path`` contains shared folder. - This field is always true for - :meth:`dropbox.dropbox.Dropbox.files_move_batch`. - :ivar autorename: If there's a conflict with any file, have the Dropbox - server try to autorename that file to avoid the conflict. - :ivar allow_ownership_transfer: Allow moves by owner even if it would result - in an ownership transfer for the content being moved. This does not - apply to copies. - """ - - __slots__ = [ - '_entries_value', - '_entries_present', - '_allow_shared_folder_value', - '_allow_shared_folder_present', - '_autorename_value', - '_autorename_present', - '_allow_ownership_transfer_value', - '_allow_ownership_transfer_present', - ] - - _has_required_fields = True - - def __init__(self, - entries=None, - allow_shared_folder=None, - autorename=None, - allow_ownership_transfer=None): - self._entries_value = None - self._entries_present = False - self._allow_shared_folder_value = None - self._allow_shared_folder_present = False - self._autorename_value = None - self._autorename_present = False - self._allow_ownership_transfer_value = None - self._allow_ownership_transfer_present = False - if entries is not None: - self.entries = entries - if allow_shared_folder is not None: - self.allow_shared_folder = allow_shared_folder - if autorename is not None: - self.autorename = autorename - if allow_ownership_transfer is not None: - self.allow_ownership_transfer = allow_ownership_transfer - - @property - def entries(self): - """ - List of entries to be moved or copied. Each entry is - :class:`RelocationPath`. - - :rtype: list of [RelocationPath] - """ - if self._entries_present: - return self._entries_value - else: - raise AttributeError("missing required field 'entries'") - - @entries.setter - def entries(self, val): - val = self._entries_validator.validate(val) - self._entries_value = val - self._entries_present = True - - @entries.deleter - def entries(self): - self._entries_value = None - self._entries_present = False - - @property - def allow_shared_folder(self): - """ - If true, :meth:`dropbox.dropbox.Dropbox.files_copy_batch` will copy - contents in shared folder, otherwise - ``RelocationError.cant_copy_shared_folder`` will be returned if - ``RelocationPath.from_path`` contains shared folder. This field is - always true for :meth:`dropbox.dropbox.Dropbox.files_move_batch`. - - :rtype: bool - """ - if self._allow_shared_folder_present: - return self._allow_shared_folder_value - else: - return False - - @allow_shared_folder.setter - def allow_shared_folder(self, val): - val = self._allow_shared_folder_validator.validate(val) - self._allow_shared_folder_value = val - self._allow_shared_folder_present = True - - @allow_shared_folder.deleter - def allow_shared_folder(self): - self._allow_shared_folder_value = None - self._allow_shared_folder_present = False - - @property - def autorename(self): - """ - If there's a conflict with any file, have the Dropbox server try to - autorename that file to avoid the conflict. - - :rtype: bool - """ - if self._autorename_present: - return self._autorename_value - else: - return False - - @autorename.setter - def autorename(self, val): - val = self._autorename_validator.validate(val) - self._autorename_value = val - self._autorename_present = True - - @autorename.deleter - def autorename(self): - self._autorename_value = None - self._autorename_present = False - - @property - def allow_ownership_transfer(self): - """ - Allow moves by owner even if it would result in an ownership transfer - for the content being moved. This does not apply to copies. - - :rtype: bool - """ - if self._allow_ownership_transfer_present: - return self._allow_ownership_transfer_value - else: - return False - - @allow_ownership_transfer.setter - def allow_ownership_transfer(self, val): - val = self._allow_ownership_transfer_validator.validate(val) - self._allow_ownership_transfer_value = val - self._allow_ownership_transfer_present = True - - @allow_ownership_transfer.deleter - def allow_ownership_transfer(self): - self._allow_ownership_transfer_value = None - self._allow_ownership_transfer_present = False - - def __repr__(self): - return 'RelocationBatchArg(entries={!r}, allow_shared_folder={!r}, autorename={!r}, allow_ownership_transfer={!r})'.format( - self._entries_value, - self._allow_shared_folder_value, - self._autorename_value, - self._allow_ownership_transfer_value, - ) - -RelocationBatchArg_validator = bv.Struct(RelocationBatchArg) - -class RelocationError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar cant_copy_shared_folder: Shared folders can't be copied. - :ivar cant_nest_shared_folder: Your move operation would result in nested - shared folders. This is not allowed. - :ivar cant_move_folder_into_itself: You cannot move a folder into itself. - :ivar too_many_files: The operation would involve more than 10,000 files and - folders. - :ivar duplicated_or_nested_paths: There are duplicated/nested paths among - ``RelocationArg.from_path`` and ``RelocationArg.to_path``. - :ivar cant_transfer_ownership: Your move operation would result in an - ownership transfer. You may reissue the request with the field - ``RelocationArg.allow_ownership_transfer`` to true. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - cant_copy_shared_folder = None - # Attribute is overwritten below the class definition - cant_nest_shared_folder = None - # Attribute is overwritten below the class definition - cant_move_folder_into_itself = None - # Attribute is overwritten below the class definition - too_many_files = None - # Attribute is overwritten below the class definition - duplicated_or_nested_paths = None - # Attribute is overwritten below the class definition - cant_transfer_ownership = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def from_lookup(cls, val): - """ - Create an instance of this class set to the ``from_lookup`` tag with - value ``val``. - - :param LookupError val: - :rtype: RelocationError - """ - return cls('from_lookup', val) - - @classmethod - def from_write(cls, val): - """ - Create an instance of this class set to the ``from_write`` tag with - value ``val``. - - :param WriteError val: - :rtype: RelocationError - """ - return cls('from_write', val) - - @classmethod - def to(cls, val): - """ - Create an instance of this class set to the ``to`` tag with value - ``val``. - - :param WriteError val: - :rtype: RelocationError - """ - return cls('to', val) - - def is_from_lookup(self): - """ - Check if the union tag is ``from_lookup``. - - :rtype: bool - """ - return self._tag == 'from_lookup' - - def is_from_write(self): - """ - Check if the union tag is ``from_write``. - - :rtype: bool - """ - return self._tag == 'from_write' - - def is_to(self): - """ - Check if the union tag is ``to``. - - :rtype: bool - """ - return self._tag == 'to' - - def is_cant_copy_shared_folder(self): - """ - Check if the union tag is ``cant_copy_shared_folder``. - - :rtype: bool - """ - return self._tag == 'cant_copy_shared_folder' - - def is_cant_nest_shared_folder(self): - """ - Check if the union tag is ``cant_nest_shared_folder``. - - :rtype: bool - """ - return self._tag == 'cant_nest_shared_folder' - - def is_cant_move_folder_into_itself(self): - """ - Check if the union tag is ``cant_move_folder_into_itself``. - - :rtype: bool - """ - return self._tag == 'cant_move_folder_into_itself' - - def is_too_many_files(self): - """ - Check if the union tag is ``too_many_files``. - - :rtype: bool - """ - return self._tag == 'too_many_files' - - def is_duplicated_or_nested_paths(self): - """ - Check if the union tag is ``duplicated_or_nested_paths``. - - :rtype: bool - """ - return self._tag == 'duplicated_or_nested_paths' - - def is_cant_transfer_ownership(self): - """ - Check if the union tag is ``cant_transfer_ownership``. - - :rtype: bool - """ - return self._tag == 'cant_transfer_ownership' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_from_lookup(self): - """ - Only call this if :meth:`is_from_lookup` is true. - - :rtype: LookupError - """ - if not self.is_from_lookup(): - raise AttributeError("tag 'from_lookup' not set") - return self._value - - def get_from_write(self): - """ - Only call this if :meth:`is_from_write` is true. - - :rtype: WriteError - """ - if not self.is_from_write(): - raise AttributeError("tag 'from_write' not set") - return self._value - - def get_to(self): - """ - Only call this if :meth:`is_to` is true. - - :rtype: WriteError - """ - if not self.is_to(): - raise AttributeError("tag 'to' not set") - return self._value - - def __repr__(self): - return 'RelocationError(%r, %r)' % (self._tag, self._value) - -RelocationError_validator = bv.Union(RelocationError) - -class RelocationBatchError(RelocationError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar too_many_write_operations: There are too many write operations in - user's Dropbox. Please retry this request. - """ - - # Attribute is overwritten below the class definition - too_many_write_operations = None - - def is_too_many_write_operations(self): - """ - Check if the union tag is ``too_many_write_operations``. - - :rtype: bool - """ - return self._tag == 'too_many_write_operations' - - def __repr__(self): - return 'RelocationBatchError(%r, %r)' % (self._tag, self._value) - -RelocationBatchError_validator = bv.Union(RelocationBatchError) - -class RelocationBatchJobStatus(async.PollResultBase): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar RelocationBatchResult complete: The copy or move batch job has - finished. - :ivar RelocationBatchError failed: The copy or move batch job has failed - with exception. - """ - - @classmethod - def complete(cls, val): - """ - Create an instance of this class set to the ``complete`` tag with value - ``val``. - - :param RelocationBatchResult val: - :rtype: RelocationBatchJobStatus - """ - return cls('complete', val) - - @classmethod - def failed(cls, val): - """ - Create an instance of this class set to the ``failed`` tag with value - ``val``. - - :param RelocationBatchError val: - :rtype: RelocationBatchJobStatus - """ - return cls('failed', val) - - def is_complete(self): - """ - Check if the union tag is ``complete``. - - :rtype: bool - """ - return self._tag == 'complete' - - def is_failed(self): - """ - Check if the union tag is ``failed``. - - :rtype: bool - """ - return self._tag == 'failed' - - def get_complete(self): - """ - The copy or move batch job has finished. - - Only call this if :meth:`is_complete` is true. - - :rtype: RelocationBatchResult - """ - if not self.is_complete(): - raise AttributeError("tag 'complete' not set") - return self._value - - def get_failed(self): - """ - The copy or move batch job has failed with exception. - - Only call this if :meth:`is_failed` is true. - - :rtype: RelocationBatchError - """ - if not self.is_failed(): - raise AttributeError("tag 'failed' not set") - return self._value - - def __repr__(self): - return 'RelocationBatchJobStatus(%r, %r)' % (self._tag, self._value) - -RelocationBatchJobStatus_validator = bv.Union(RelocationBatchJobStatus) - -class RelocationBatchLaunch(async.LaunchResultBase): - """ - Result returned by :meth:`dropbox.dropbox.Dropbox.files_copy_batch` or - :meth:`dropbox.dropbox.Dropbox.files_move_batch` that may either launch an - asynchronous job or complete synchronously. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def complete(cls, val): - """ - Create an instance of this class set to the ``complete`` tag with value - ``val``. - - :param RelocationBatchResult val: - :rtype: RelocationBatchLaunch - """ - return cls('complete', val) - - def is_complete(self): - """ - Check if the union tag is ``complete``. - - :rtype: bool - """ - return self._tag == 'complete' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_complete(self): - """ - Only call this if :meth:`is_complete` is true. - - :rtype: RelocationBatchResult - """ - if not self.is_complete(): - raise AttributeError("tag 'complete' not set") - return self._value - - def __repr__(self): - return 'RelocationBatchLaunch(%r, %r)' % (self._tag, self._value) - -RelocationBatchLaunch_validator = bv.Union(RelocationBatchLaunch) - -class RelocationBatchResult(FileOpsResult): - - __slots__ = [ - '_entries_value', - '_entries_present', - ] - - _has_required_fields = True - - def __init__(self, - entries=None): - super(RelocationBatchResult, self).__init__() - self._entries_value = None - self._entries_present = False - if entries is not None: - self.entries = entries - - @property - def entries(self): - """ - :rtype: list of [RelocationBatchResultData] - """ - if self._entries_present: - return self._entries_value - else: - raise AttributeError("missing required field 'entries'") - - @entries.setter - def entries(self, val): - val = self._entries_validator.validate(val) - self._entries_value = val - self._entries_present = True - - @entries.deleter - def entries(self): - self._entries_value = None - self._entries_present = False - - def __repr__(self): - return 'RelocationBatchResult(entries={!r})'.format( - self._entries_value, - ) - -RelocationBatchResult_validator = bv.Struct(RelocationBatchResult) - -class RelocationBatchResultData(object): - """ - :ivar metadata: Metadata of the relocated object. - """ - - __slots__ = [ - '_metadata_value', - '_metadata_present', - ] - - _has_required_fields = True - - def __init__(self, - metadata=None): - self._metadata_value = None - self._metadata_present = False - if metadata is not None: - self.metadata = metadata - - @property - def metadata(self): - """ - Metadata of the relocated object. - - :rtype: Metadata - """ - if self._metadata_present: - return self._metadata_value - else: - raise AttributeError("missing required field 'metadata'") - - @metadata.setter - def metadata(self, val): - self._metadata_validator.validate_type_only(val) - self._metadata_value = val - self._metadata_present = True - - @metadata.deleter - def metadata(self): - self._metadata_value = None - self._metadata_present = False - - def __repr__(self): - return 'RelocationBatchResultData(metadata={!r})'.format( - self._metadata_value, - ) - -RelocationBatchResultData_validator = bv.Struct(RelocationBatchResultData) - -class RelocationResult(FileOpsResult): - """ - :ivar metadata: Metadata of the relocated object. - """ - - __slots__ = [ - '_metadata_value', - '_metadata_present', - ] - - _has_required_fields = True - - def __init__(self, - metadata=None): - super(RelocationResult, self).__init__() - self._metadata_value = None - self._metadata_present = False - if metadata is not None: - self.metadata = metadata - - @property - def metadata(self): - """ - Metadata of the relocated object. - - :rtype: Metadata - """ - if self._metadata_present: - return self._metadata_value - else: - raise AttributeError("missing required field 'metadata'") - - @metadata.setter - def metadata(self, val): - self._metadata_validator.validate_type_only(val) - self._metadata_value = val - self._metadata_present = True - - @metadata.deleter - def metadata(self): - self._metadata_value = None - self._metadata_present = False - - def __repr__(self): - return 'RelocationResult(metadata={!r})'.format( - self._metadata_value, - ) - -RelocationResult_validator = bv.Struct(RelocationResult) - -class RestoreArg(object): - """ - :ivar path: The path to the file you want to restore. - :ivar rev: The revision to restore for the file. - """ - - __slots__ = [ - '_path_value', - '_path_present', - '_rev_value', - '_rev_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - rev=None): - self._path_value = None - self._path_present = False - self._rev_value = None - self._rev_present = False - if path is not None: - self.path = path - if rev is not None: - self.rev = rev - - @property - def path(self): - """ - The path to the file you want to restore. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def rev(self): - """ - The revision to restore for the file. - - :rtype: str - """ - if self._rev_present: - return self._rev_value - else: - raise AttributeError("missing required field 'rev'") - - @rev.setter - def rev(self, val): - val = self._rev_validator.validate(val) - self._rev_value = val - self._rev_present = True - - @rev.deleter - def rev(self): - self._rev_value = None - self._rev_present = False - - def __repr__(self): - return 'RestoreArg(path={!r}, rev={!r})'.format( - self._path_value, - self._rev_value, - ) - -RestoreArg_validator = bv.Struct(RestoreArg) - -class RestoreError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar LookupError path_lookup: An error occurs when downloading metadata for - the file. - :ivar WriteError path_write: An error occurs when trying to restore the file - to that path. - :ivar invalid_revision: The revision is invalid. It may point to a different - file. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - invalid_revision = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def path_lookup(cls, val): - """ - Create an instance of this class set to the ``path_lookup`` tag with - value ``val``. - - :param LookupError val: - :rtype: RestoreError - """ - return cls('path_lookup', val) - - @classmethod - def path_write(cls, val): - """ - Create an instance of this class set to the ``path_write`` tag with - value ``val``. - - :param WriteError val: - :rtype: RestoreError - """ - return cls('path_write', val) - - def is_path_lookup(self): - """ - Check if the union tag is ``path_lookup``. - - :rtype: bool - """ - return self._tag == 'path_lookup' - - def is_path_write(self): - """ - Check if the union tag is ``path_write``. - - :rtype: bool - """ - return self._tag == 'path_write' - - def is_invalid_revision(self): - """ - Check if the union tag is ``invalid_revision``. - - :rtype: bool - """ - return self._tag == 'invalid_revision' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_path_lookup(self): - """ - An error occurs when downloading metadata for the file. - - Only call this if :meth:`is_path_lookup` is true. - - :rtype: LookupError - """ - if not self.is_path_lookup(): - raise AttributeError("tag 'path_lookup' not set") - return self._value - - def get_path_write(self): - """ - An error occurs when trying to restore the file to that path. - - Only call this if :meth:`is_path_write` is true. - - :rtype: WriteError - """ - if not self.is_path_write(): - raise AttributeError("tag 'path_write' not set") - return self._value - - def __repr__(self): - return 'RestoreError(%r, %r)' % (self._tag, self._value) - -RestoreError_validator = bv.Union(RestoreError) - -class SaveCopyReferenceArg(object): - """ - :ivar copy_reference: A copy reference returned by - :meth:`dropbox.dropbox.Dropbox.files_copy_reference_get`. - :ivar path: Path in the user's Dropbox that is the destination. - """ - - __slots__ = [ - '_copy_reference_value', - '_copy_reference_present', - '_path_value', - '_path_present', - ] - - _has_required_fields = True - - def __init__(self, - copy_reference=None, - path=None): - self._copy_reference_value = None - self._copy_reference_present = False - self._path_value = None - self._path_present = False - if copy_reference is not None: - self.copy_reference = copy_reference - if path is not None: - self.path = path - - @property - def copy_reference(self): - """ - A copy reference returned by - :meth:`dropbox.dropbox.Dropbox.files_copy_reference_get`. - - :rtype: str - """ - if self._copy_reference_present: - return self._copy_reference_value - else: - raise AttributeError("missing required field 'copy_reference'") - - @copy_reference.setter - def copy_reference(self, val): - val = self._copy_reference_validator.validate(val) - self._copy_reference_value = val - self._copy_reference_present = True - - @copy_reference.deleter - def copy_reference(self): - self._copy_reference_value = None - self._copy_reference_present = False - - @property - def path(self): - """ - Path in the user's Dropbox that is the destination. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - def __repr__(self): - return 'SaveCopyReferenceArg(copy_reference={!r}, path={!r})'.format( - self._copy_reference_value, - self._path_value, - ) - -SaveCopyReferenceArg_validator = bv.Struct(SaveCopyReferenceArg) - -class SaveCopyReferenceError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar invalid_copy_reference: The copy reference is invalid. - :ivar no_permission: You don't have permission to save the given copy - reference. Please make sure this app is same app which created the copy - reference and the source user is still linked to the app. - :ivar not_found: The file referenced by the copy reference cannot be found. - :ivar too_many_files: The operation would involve more than 10,000 files and - folders. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - invalid_copy_reference = None - # Attribute is overwritten below the class definition - no_permission = None - # Attribute is overwritten below the class definition - not_found = None - # Attribute is overwritten below the class definition - too_many_files = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def path(cls, val): - """ - Create an instance of this class set to the ``path`` tag with value - ``val``. - - :param WriteError val: - :rtype: SaveCopyReferenceError - """ - return cls('path', val) - - def is_path(self): - """ - Check if the union tag is ``path``. - - :rtype: bool - """ - return self._tag == 'path' - - def is_invalid_copy_reference(self): - """ - Check if the union tag is ``invalid_copy_reference``. - - :rtype: bool - """ - return self._tag == 'invalid_copy_reference' - - def is_no_permission(self): - """ - Check if the union tag is ``no_permission``. - - :rtype: bool - """ - return self._tag == 'no_permission' - - def is_not_found(self): - """ - Check if the union tag is ``not_found``. - - :rtype: bool - """ - return self._tag == 'not_found' - - def is_too_many_files(self): - """ - Check if the union tag is ``too_many_files``. - - :rtype: bool - """ - return self._tag == 'too_many_files' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_path(self): - """ - Only call this if :meth:`is_path` is true. - - :rtype: WriteError - """ - if not self.is_path(): - raise AttributeError("tag 'path' not set") - return self._value - - def __repr__(self): - return 'SaveCopyReferenceError(%r, %r)' % (self._tag, self._value) - -SaveCopyReferenceError_validator = bv.Union(SaveCopyReferenceError) - -class SaveCopyReferenceResult(object): - """ - :ivar metadata: The metadata of the saved file or folder in the user's - Dropbox. - """ - - __slots__ = [ - '_metadata_value', - '_metadata_present', - ] - - _has_required_fields = True - - def __init__(self, - metadata=None): - self._metadata_value = None - self._metadata_present = False - if metadata is not None: - self.metadata = metadata - - @property - def metadata(self): - """ - The metadata of the saved file or folder in the user's Dropbox. - - :rtype: Metadata - """ - if self._metadata_present: - return self._metadata_value - else: - raise AttributeError("missing required field 'metadata'") - - @metadata.setter - def metadata(self, val): - self._metadata_validator.validate_type_only(val) - self._metadata_value = val - self._metadata_present = True - - @metadata.deleter - def metadata(self): - self._metadata_value = None - self._metadata_present = False - - def __repr__(self): - return 'SaveCopyReferenceResult(metadata={!r})'.format( - self._metadata_value, - ) - -SaveCopyReferenceResult_validator = bv.Struct(SaveCopyReferenceResult) - -class SaveUrlArg(object): - """ - :ivar path: The path in Dropbox where the URL will be saved to. - :ivar url: The URL to be saved. - """ - - __slots__ = [ - '_path_value', - '_path_present', - '_url_value', - '_url_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - url=None): - self._path_value = None - self._path_present = False - self._url_value = None - self._url_present = False - if path is not None: - self.path = path - if url is not None: - self.url = url - - @property - def path(self): - """ - The path in Dropbox where the URL will be saved to. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def url(self): - """ - The URL to be saved. - - :rtype: str - """ - if self._url_present: - return self._url_value - else: - raise AttributeError("missing required field 'url'") - - @url.setter - def url(self, val): - val = self._url_validator.validate(val) - self._url_value = val - self._url_present = True - - @url.deleter - def url(self): - self._url_value = None - self._url_present = False - - def __repr__(self): - return 'SaveUrlArg(path={!r}, url={!r})'.format( - self._path_value, - self._url_value, - ) - -SaveUrlArg_validator = bv.Struct(SaveUrlArg) - -class SaveUrlError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar download_failed: Failed downloading the given URL. - :ivar invalid_url: The given URL is invalid. - :ivar not_found: The file where the URL is saved to no longer exists. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - download_failed = None - # Attribute is overwritten below the class definition - invalid_url = None - # Attribute is overwritten below the class definition - not_found = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def path(cls, val): - """ - Create an instance of this class set to the ``path`` tag with value - ``val``. - - :param WriteError val: - :rtype: SaveUrlError - """ - return cls('path', val) - - def is_path(self): - """ - Check if the union tag is ``path``. - - :rtype: bool - """ - return self._tag == 'path' - - def is_download_failed(self): - """ - Check if the union tag is ``download_failed``. - - :rtype: bool - """ - return self._tag == 'download_failed' - - def is_invalid_url(self): - """ - Check if the union tag is ``invalid_url``. - - :rtype: bool - """ - return self._tag == 'invalid_url' - - def is_not_found(self): - """ - Check if the union tag is ``not_found``. - - :rtype: bool - """ - return self._tag == 'not_found' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_path(self): - """ - Only call this if :meth:`is_path` is true. - - :rtype: WriteError - """ - if not self.is_path(): - raise AttributeError("tag 'path' not set") - return self._value - - def __repr__(self): - return 'SaveUrlError(%r, %r)' % (self._tag, self._value) - -SaveUrlError_validator = bv.Union(SaveUrlError) - -class SaveUrlJobStatus(async.PollResultBase): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar FileMetadata complete: Metadata of the file where the URL is saved to. - """ - - @classmethod - def complete(cls, val): - """ - Create an instance of this class set to the ``complete`` tag with value - ``val``. - - :param FileMetadata val: - :rtype: SaveUrlJobStatus - """ - return cls('complete', val) - - @classmethod - def failed(cls, val): - """ - Create an instance of this class set to the ``failed`` tag with value - ``val``. - - :param SaveUrlError val: - :rtype: SaveUrlJobStatus - """ - return cls('failed', val) - - def is_complete(self): - """ - Check if the union tag is ``complete``. - - :rtype: bool - """ - return self._tag == 'complete' - - def is_failed(self): - """ - Check if the union tag is ``failed``. - - :rtype: bool - """ - return self._tag == 'failed' - - def get_complete(self): - """ - Metadata of the file where the URL is saved to. - - Only call this if :meth:`is_complete` is true. - - :rtype: FileMetadata - """ - if not self.is_complete(): - raise AttributeError("tag 'complete' not set") - return self._value - - def get_failed(self): - """ - Only call this if :meth:`is_failed` is true. - - :rtype: SaveUrlError - """ - if not self.is_failed(): - raise AttributeError("tag 'failed' not set") - return self._value - - def __repr__(self): - return 'SaveUrlJobStatus(%r, %r)' % (self._tag, self._value) - -SaveUrlJobStatus_validator = bv.Union(SaveUrlJobStatus) - -class SaveUrlResult(async.LaunchResultBase): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar FileMetadata complete: Metadata of the file where the URL is saved to. - """ - - @classmethod - def complete(cls, val): - """ - Create an instance of this class set to the ``complete`` tag with value - ``val``. - - :param FileMetadata val: - :rtype: SaveUrlResult - """ - return cls('complete', val) - - def is_complete(self): - """ - Check if the union tag is ``complete``. - - :rtype: bool - """ - return self._tag == 'complete' - - def get_complete(self): - """ - Metadata of the file where the URL is saved to. - - Only call this if :meth:`is_complete` is true. - - :rtype: FileMetadata - """ - if not self.is_complete(): - raise AttributeError("tag 'complete' not set") - return self._value - - def __repr__(self): - return 'SaveUrlResult(%r, %r)' % (self._tag, self._value) - -SaveUrlResult_validator = bv.Union(SaveUrlResult) - -class SearchArg(object): - """ - :ivar path: The path in the user's Dropbox to search. Should probably be a - folder. - :ivar query: The string to search for. The search string is split on spaces - into multiple tokens. For file name searching, the last token is used - for prefix matching (i.e. "bat c" matches "bat cave" but not "batman - car"). - :ivar start: The starting index within the search results (used for paging). - :ivar max_results: The maximum number of search results to return. - :ivar mode: The search mode (filename, filename_and_content, or - deleted_filename). Note that searching file content is only available - for Dropbox Business accounts. - """ - - __slots__ = [ - '_path_value', - '_path_present', - '_query_value', - '_query_present', - '_start_value', - '_start_present', - '_max_results_value', - '_max_results_present', - '_mode_value', - '_mode_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - query=None, - start=None, - max_results=None, - mode=None): - self._path_value = None - self._path_present = False - self._query_value = None - self._query_present = False - self._start_value = None - self._start_present = False - self._max_results_value = None - self._max_results_present = False - self._mode_value = None - self._mode_present = False - if path is not None: - self.path = path - if query is not None: - self.query = query - if start is not None: - self.start = start - if max_results is not None: - self.max_results = max_results - if mode is not None: - self.mode = mode - - @property - def path(self): - """ - The path in the user's Dropbox to search. Should probably be a folder. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def query(self): - """ - The string to search for. The search string is split on spaces into - multiple tokens. For file name searching, the last token is used for - prefix matching (i.e. "bat c" matches "bat cave" but not "batman car"). - - :rtype: str - """ - if self._query_present: - return self._query_value - else: - raise AttributeError("missing required field 'query'") - - @query.setter - def query(self, val): - val = self._query_validator.validate(val) - self._query_value = val - self._query_present = True - - @query.deleter - def query(self): - self._query_value = None - self._query_present = False - - @property - def start(self): - """ - The starting index within the search results (used for paging). - - :rtype: long - """ - if self._start_present: - return self._start_value - else: - return 0 - - @start.setter - def start(self, val): - val = self._start_validator.validate(val) - self._start_value = val - self._start_present = True - - @start.deleter - def start(self): - self._start_value = None - self._start_present = False - - @property - def max_results(self): - """ - The maximum number of search results to return. - - :rtype: long - """ - if self._max_results_present: - return self._max_results_value - else: - return 100 - - @max_results.setter - def max_results(self, val): - val = self._max_results_validator.validate(val) - self._max_results_value = val - self._max_results_present = True - - @max_results.deleter - def max_results(self): - self._max_results_value = None - self._max_results_present = False - - @property - def mode(self): - """ - The search mode (filename, filename_and_content, or deleted_filename). - Note that searching file content is only available for Dropbox Business - accounts. - - :rtype: SearchMode - """ - if self._mode_present: - return self._mode_value - else: - return SearchMode.filename - - @mode.setter - def mode(self, val): - self._mode_validator.validate_type_only(val) - self._mode_value = val - self._mode_present = True - - @mode.deleter - def mode(self): - self._mode_value = None - self._mode_present = False - - def __repr__(self): - return 'SearchArg(path={!r}, query={!r}, start={!r}, max_results={!r}, mode={!r})'.format( - self._path_value, - self._query_value, - self._start_value, - self._max_results_value, - self._mode_value, - ) - -SearchArg_validator = bv.Struct(SearchArg) - -class SearchError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def path(cls, val): - """ - Create an instance of this class set to the ``path`` tag with value - ``val``. - - :param LookupError val: - :rtype: SearchError - """ - return cls('path', val) - - def is_path(self): - """ - Check if the union tag is ``path``. - - :rtype: bool - """ - return self._tag == 'path' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_path(self): - """ - Only call this if :meth:`is_path` is true. - - :rtype: LookupError - """ - if not self.is_path(): - raise AttributeError("tag 'path' not set") - return self._value - - def __repr__(self): - return 'SearchError(%r, %r)' % (self._tag, self._value) - -SearchError_validator = bv.Union(SearchError) - -class SearchMatch(object): - """ - :ivar match_type: The type of the match. - :ivar metadata: The metadata for the matched file or folder. - """ - - __slots__ = [ - '_match_type_value', - '_match_type_present', - '_metadata_value', - '_metadata_present', - ] - - _has_required_fields = True - - def __init__(self, - match_type=None, - metadata=None): - self._match_type_value = None - self._match_type_present = False - self._metadata_value = None - self._metadata_present = False - if match_type is not None: - self.match_type = match_type - if metadata is not None: - self.metadata = metadata - - @property - def match_type(self): - """ - The type of the match. - - :rtype: SearchMatchType - """ - if self._match_type_present: - return self._match_type_value - else: - raise AttributeError("missing required field 'match_type'") - - @match_type.setter - def match_type(self, val): - self._match_type_validator.validate_type_only(val) - self._match_type_value = val - self._match_type_present = True - - @match_type.deleter - def match_type(self): - self._match_type_value = None - self._match_type_present = False - - @property - def metadata(self): - """ - The metadata for the matched file or folder. - - :rtype: Metadata - """ - if self._metadata_present: - return self._metadata_value - else: - raise AttributeError("missing required field 'metadata'") - - @metadata.setter - def metadata(self, val): - self._metadata_validator.validate_type_only(val) - self._metadata_value = val - self._metadata_present = True - - @metadata.deleter - def metadata(self): - self._metadata_value = None - self._metadata_present = False - - def __repr__(self): - return 'SearchMatch(match_type={!r}, metadata={!r})'.format( - self._match_type_value, - self._metadata_value, - ) - -SearchMatch_validator = bv.Struct(SearchMatch) - -class SearchMatchType(bb.Union): - """ - Indicates what type of match was found for a given item. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar filename: This item was matched on its file or folder name. - :ivar content: This item was matched based on its file contents. - :ivar both: This item was matched based on both its contents and its file - name. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - filename = None - # Attribute is overwritten below the class definition - content = None - # Attribute is overwritten below the class definition - both = None - - def is_filename(self): - """ - Check if the union tag is ``filename``. - - :rtype: bool - """ - return self._tag == 'filename' - - def is_content(self): - """ - Check if the union tag is ``content``. - - :rtype: bool - """ - return self._tag == 'content' - - def is_both(self): - """ - Check if the union tag is ``both``. - - :rtype: bool - """ - return self._tag == 'both' - - def __repr__(self): - return 'SearchMatchType(%r, %r)' % (self._tag, self._value) - -SearchMatchType_validator = bv.Union(SearchMatchType) - -class SearchMode(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar filename: Search file and folder names. - :ivar filename_and_content: Search file and folder names as well as file - contents. - :ivar deleted_filename: Search for deleted file and folder names. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - filename = None - # Attribute is overwritten below the class definition - filename_and_content = None - # Attribute is overwritten below the class definition - deleted_filename = None - - def is_filename(self): - """ - Check if the union tag is ``filename``. - - :rtype: bool - """ - return self._tag == 'filename' - - def is_filename_and_content(self): - """ - Check if the union tag is ``filename_and_content``. - - :rtype: bool - """ - return self._tag == 'filename_and_content' - - def is_deleted_filename(self): - """ - Check if the union tag is ``deleted_filename``. - - :rtype: bool - """ - return self._tag == 'deleted_filename' - - def __repr__(self): - return 'SearchMode(%r, %r)' % (self._tag, self._value) - -SearchMode_validator = bv.Union(SearchMode) - -class SearchResult(object): - """ - :ivar matches: A list (possibly empty) of matches for the query. - :ivar more: Used for paging. If true, indicates there is another page of - results available that can be fetched by calling - :meth:`dropbox.dropbox.Dropbox.files_search` again. - :ivar start: Used for paging. Value to set the start argument to when - calling :meth:`dropbox.dropbox.Dropbox.files_search` to fetch the next - page of results. - """ - - __slots__ = [ - '_matches_value', - '_matches_present', - '_more_value', - '_more_present', - '_start_value', - '_start_present', - ] - - _has_required_fields = True - - def __init__(self, - matches=None, - more=None, - start=None): - self._matches_value = None - self._matches_present = False - self._more_value = None - self._more_present = False - self._start_value = None - self._start_present = False - if matches is not None: - self.matches = matches - if more is not None: - self.more = more - if start is not None: - self.start = start - - @property - def matches(self): - """ - A list (possibly empty) of matches for the query. - - :rtype: list of [SearchMatch] - """ - if self._matches_present: - return self._matches_value - else: - raise AttributeError("missing required field 'matches'") - - @matches.setter - def matches(self, val): - val = self._matches_validator.validate(val) - self._matches_value = val - self._matches_present = True - - @matches.deleter - def matches(self): - self._matches_value = None - self._matches_present = False - - @property - def more(self): - """ - Used for paging. If true, indicates there is another page of results - available that can be fetched by calling - :meth:`dropbox.dropbox.Dropbox.files_search` again. - - :rtype: bool - """ - if self._more_present: - return self._more_value - else: - raise AttributeError("missing required field 'more'") - - @more.setter - def more(self, val): - val = self._more_validator.validate(val) - self._more_value = val - self._more_present = True - - @more.deleter - def more(self): - self._more_value = None - self._more_present = False - - @property - def start(self): - """ - Used for paging. Value to set the start argument to when calling - :meth:`dropbox.dropbox.Dropbox.files_search` to fetch the next page of - results. - - :rtype: long - """ - if self._start_present: - return self._start_value - else: - raise AttributeError("missing required field 'start'") - - @start.setter - def start(self, val): - val = self._start_validator.validate(val) - self._start_value = val - self._start_present = True - - @start.deleter - def start(self): - self._start_value = None - self._start_present = False - - def __repr__(self): - return 'SearchResult(matches={!r}, more={!r}, start={!r})'.format( - self._matches_value, - self._more_value, - self._start_value, - ) - -SearchResult_validator = bv.Struct(SearchResult) - -class SharedLink(object): - """ - :ivar url: Shared link url. - :ivar password: Password for the shared link. - """ - - __slots__ = [ - '_url_value', - '_url_present', - '_password_value', - '_password_present', - ] - - _has_required_fields = True - - def __init__(self, - url=None, - password=None): - self._url_value = None - self._url_present = False - self._password_value = None - self._password_present = False - if url is not None: - self.url = url - if password is not None: - self.password = password - - @property - def url(self): - """ - Shared link url. - - :rtype: str - """ - if self._url_present: - return self._url_value - else: - raise AttributeError("missing required field 'url'") - - @url.setter - def url(self, val): - val = self._url_validator.validate(val) - self._url_value = val - self._url_present = True - - @url.deleter - def url(self): - self._url_value = None - self._url_present = False - - @property - def password(self): - """ - Password for the shared link. - - :rtype: str - """ - if self._password_present: - return self._password_value - else: - return None - - @password.setter - def password(self, val): - if val is None: - del self.password - return - val = self._password_validator.validate(val) - self._password_value = val - self._password_present = True - - @password.deleter - def password(self): - self._password_value = None - self._password_present = False - - def __repr__(self): - return 'SharedLink(url={!r}, password={!r})'.format( - self._url_value, - self._password_value, - ) - -SharedLink_validator = bv.Struct(SharedLink) - -class ThumbnailArg(object): - """ - :ivar path: The path to the image file you want to thumbnail. - :ivar format: The format for the thumbnail image, jpeg (default) or png. For - images that are photos, jpeg should be preferred, while png is better - for screenshots and digital arts. - :ivar size: The size for the thumbnail image. - """ - - __slots__ = [ - '_path_value', - '_path_present', - '_format_value', - '_format_present', - '_size_value', - '_size_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - format=None, - size=None): - self._path_value = None - self._path_present = False - self._format_value = None - self._format_present = False - self._size_value = None - self._size_present = False - if path is not None: - self.path = path - if format is not None: - self.format = format - if size is not None: - self.size = size - - @property - def path(self): - """ - The path to the image file you want to thumbnail. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def format(self): - """ - The format for the thumbnail image, jpeg (default) or png. For images - that are photos, jpeg should be preferred, while png is better for - screenshots and digital arts. - - :rtype: ThumbnailFormat - """ - if self._format_present: - return self._format_value - else: - return ThumbnailFormat.jpeg - - @format.setter - def format(self, val): - self._format_validator.validate_type_only(val) - self._format_value = val - self._format_present = True - - @format.deleter - def format(self): - self._format_value = None - self._format_present = False - - @property - def size(self): - """ - The size for the thumbnail image. - - :rtype: ThumbnailSize - """ - if self._size_present: - return self._size_value - else: - return ThumbnailSize.w64h64 - - @size.setter - def size(self, val): - self._size_validator.validate_type_only(val) - self._size_value = val - self._size_present = True - - @size.deleter - def size(self): - self._size_value = None - self._size_present = False - - def __repr__(self): - return 'ThumbnailArg(path={!r}, format={!r}, size={!r})'.format( - self._path_value, - self._format_value, - self._size_value, - ) - -ThumbnailArg_validator = bv.Struct(ThumbnailArg) - -class ThumbnailError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar LookupError path: An error occurs when downloading metadata for the - image. - :ivar unsupported_extension: The file extension doesn't allow conversion to - a thumbnail. - :ivar unsupported_image: The image cannot be converted to a thumbnail. - :ivar conversion_error: An error occurs during thumbnail conversion. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - unsupported_extension = None - # Attribute is overwritten below the class definition - unsupported_image = None - # Attribute is overwritten below the class definition - conversion_error = None - - @classmethod - def path(cls, val): - """ - Create an instance of this class set to the ``path`` tag with value - ``val``. - - :param LookupError val: - :rtype: ThumbnailError - """ - return cls('path', val) - - def is_path(self): - """ - Check if the union tag is ``path``. - - :rtype: bool - """ - return self._tag == 'path' - - def is_unsupported_extension(self): - """ - Check if the union tag is ``unsupported_extension``. - - :rtype: bool - """ - return self._tag == 'unsupported_extension' - - def is_unsupported_image(self): - """ - Check if the union tag is ``unsupported_image``. - - :rtype: bool - """ - return self._tag == 'unsupported_image' - - def is_conversion_error(self): - """ - Check if the union tag is ``conversion_error``. - - :rtype: bool - """ - return self._tag == 'conversion_error' - - def get_path(self): - """ - An error occurs when downloading metadata for the image. - - Only call this if :meth:`is_path` is true. - - :rtype: LookupError - """ - if not self.is_path(): - raise AttributeError("tag 'path' not set") - return self._value - - def __repr__(self): - return 'ThumbnailError(%r, %r)' % (self._tag, self._value) - -ThumbnailError_validator = bv.Union(ThumbnailError) - -class ThumbnailFormat(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - jpeg = None - # Attribute is overwritten below the class definition - png = None - - def is_jpeg(self): - """ - Check if the union tag is ``jpeg``. - - :rtype: bool - """ - return self._tag == 'jpeg' - - def is_png(self): - """ - Check if the union tag is ``png``. - - :rtype: bool - """ - return self._tag == 'png' - - def __repr__(self): - return 'ThumbnailFormat(%r, %r)' % (self._tag, self._value) - -ThumbnailFormat_validator = bv.Union(ThumbnailFormat) - -class ThumbnailSize(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar w32h32: 32 by 32 px. - :ivar w64h64: 64 by 64 px. - :ivar w128h128: 128 by 128 px. - :ivar w640h480: 640 by 480 px. - :ivar w1024h768: 1024 by 768. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - w32h32 = None - # Attribute is overwritten below the class definition - w64h64 = None - # Attribute is overwritten below the class definition - w128h128 = None - # Attribute is overwritten below the class definition - w640h480 = None - # Attribute is overwritten below the class definition - w1024h768 = None - - def is_w32h32(self): - """ - Check if the union tag is ``w32h32``. - - :rtype: bool - """ - return self._tag == 'w32h32' - - def is_w64h64(self): - """ - Check if the union tag is ``w64h64``. - - :rtype: bool - """ - return self._tag == 'w64h64' - - def is_w128h128(self): - """ - Check if the union tag is ``w128h128``. - - :rtype: bool - """ - return self._tag == 'w128h128' - - def is_w640h480(self): - """ - Check if the union tag is ``w640h480``. - - :rtype: bool - """ - return self._tag == 'w640h480' - - def is_w1024h768(self): - """ - Check if the union tag is ``w1024h768``. - - :rtype: bool - """ - return self._tag == 'w1024h768' - - def __repr__(self): - return 'ThumbnailSize(%r, %r)' % (self._tag, self._value) - -ThumbnailSize_validator = bv.Union(ThumbnailSize) - -class UploadError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar UploadWriteFailed path: Unable to save the uploaded contents to a - file. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def path(cls, val): - """ - Create an instance of this class set to the ``path`` tag with value - ``val``. - - :param UploadWriteFailed val: - :rtype: UploadError - """ - return cls('path', val) - - def is_path(self): - """ - Check if the union tag is ``path``. - - :rtype: bool - """ - return self._tag == 'path' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_path(self): - """ - Unable to save the uploaded contents to a file. - - Only call this if :meth:`is_path` is true. - - :rtype: UploadWriteFailed - """ - if not self.is_path(): - raise AttributeError("tag 'path' not set") - return self._value - - def __repr__(self): - return 'UploadError(%r, %r)' % (self._tag, self._value) - -UploadError_validator = bv.Union(UploadError) - -class UploadErrorWithProperties(UploadError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - @classmethod - def properties_error(cls, val): - """ - Create an instance of this class set to the ``properties_error`` tag - with value ``val``. - - :param file_properties.InvalidPropertyGroupError_validator val: - :rtype: UploadErrorWithProperties - """ - return cls('properties_error', val) - - def is_properties_error(self): - """ - Check if the union tag is ``properties_error``. - - :rtype: bool - """ - return self._tag == 'properties_error' - - def get_properties_error(self): - """ - Only call this if :meth:`is_properties_error` is true. - - :rtype: file_properties.InvalidPropertyGroupError_validator - """ - if not self.is_properties_error(): - raise AttributeError("tag 'properties_error' not set") - return self._value - - def __repr__(self): - return 'UploadErrorWithProperties(%r, %r)' % (self._tag, self._value) - -UploadErrorWithProperties_validator = bv.Union(UploadErrorWithProperties) - -class UploadSessionAppendArg(object): - """ - :ivar cursor: Contains the upload session ID and the offset. - :ivar close: If true, the current session will be closed, at which point you - won't be able to call - :meth:`dropbox.dropbox.Dropbox.files_upload_session_append_v2` anymore - with the current session. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - '_close_value', - '_close_present', - ] - - _has_required_fields = True - - def __init__(self, - cursor=None, - close=None): - self._cursor_value = None - self._cursor_present = False - self._close_value = None - self._close_present = False - if cursor is not None: - self.cursor = cursor - if close is not None: - self.close = close - - @property - def cursor(self): - """ - Contains the upload session ID and the offset. - - :rtype: UploadSessionCursor - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - self._cursor_validator.validate_type_only(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - @property - def close(self): - """ - If true, the current session will be closed, at which point you won't be - able to call - :meth:`dropbox.dropbox.Dropbox.files_upload_session_append_v2` anymore - with the current session. - - :rtype: bool - """ - if self._close_present: - return self._close_value - else: - return False - - @close.setter - def close(self, val): - val = self._close_validator.validate(val) - self._close_value = val - self._close_present = True - - @close.deleter - def close(self): - self._close_value = None - self._close_present = False - - def __repr__(self): - return 'UploadSessionAppendArg(cursor={!r}, close={!r})'.format( - self._cursor_value, - self._close_value, - ) - -UploadSessionAppendArg_validator = bv.Struct(UploadSessionAppendArg) - -class UploadSessionCursor(object): - """ - :ivar session_id: The upload session ID (returned by - :meth:`dropbox.dropbox.Dropbox.files_upload_session_start`). - :ivar offset: The amount of data that has been uploaded so far. We use this - to make sure upload data isn't lost or duplicated in the event of a - network error. - """ - - __slots__ = [ - '_session_id_value', - '_session_id_present', - '_offset_value', - '_offset_present', - ] - - _has_required_fields = True - - def __init__(self, - session_id=None, - offset=None): - self._session_id_value = None - self._session_id_present = False - self._offset_value = None - self._offset_present = False - if session_id is not None: - self.session_id = session_id - if offset is not None: - self.offset = offset - - @property - def session_id(self): - """ - The upload session ID (returned by - :meth:`dropbox.dropbox.Dropbox.files_upload_session_start`). - - :rtype: str - """ - if self._session_id_present: - return self._session_id_value - else: - raise AttributeError("missing required field 'session_id'") - - @session_id.setter - def session_id(self, val): - val = self._session_id_validator.validate(val) - self._session_id_value = val - self._session_id_present = True - - @session_id.deleter - def session_id(self): - self._session_id_value = None - self._session_id_present = False - - @property - def offset(self): - """ - The amount of data that has been uploaded so far. We use this to make - sure upload data isn't lost or duplicated in the event of a network - error. - - :rtype: long - """ - if self._offset_present: - return self._offset_value - else: - raise AttributeError("missing required field 'offset'") - - @offset.setter - def offset(self, val): - val = self._offset_validator.validate(val) - self._offset_value = val - self._offset_present = True - - @offset.deleter - def offset(self): - self._offset_value = None - self._offset_present = False - - def __repr__(self): - return 'UploadSessionCursor(session_id={!r}, offset={!r})'.format( - self._session_id_value, - self._offset_value, - ) - -UploadSessionCursor_validator = bv.Struct(UploadSessionCursor) - -class UploadSessionFinishArg(object): - """ - :ivar cursor: Contains the upload session ID and the offset. - :ivar commit: Contains the path and other optional modifiers for the commit. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - '_commit_value', - '_commit_present', - ] - - _has_required_fields = True - - def __init__(self, - cursor=None, - commit=None): - self._cursor_value = None - self._cursor_present = False - self._commit_value = None - self._commit_present = False - if cursor is not None: - self.cursor = cursor - if commit is not None: - self.commit = commit - - @property - def cursor(self): - """ - Contains the upload session ID and the offset. - - :rtype: UploadSessionCursor - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - self._cursor_validator.validate_type_only(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - @property - def commit(self): - """ - Contains the path and other optional modifiers for the commit. - - :rtype: CommitInfo - """ - if self._commit_present: - return self._commit_value - else: - raise AttributeError("missing required field 'commit'") - - @commit.setter - def commit(self, val): - self._commit_validator.validate_type_only(val) - self._commit_value = val - self._commit_present = True - - @commit.deleter - def commit(self): - self._commit_value = None - self._commit_present = False - - def __repr__(self): - return 'UploadSessionFinishArg(cursor={!r}, commit={!r})'.format( - self._cursor_value, - self._commit_value, - ) - -UploadSessionFinishArg_validator = bv.Struct(UploadSessionFinishArg) - -class UploadSessionFinishBatchArg(object): - """ - :ivar entries: Commit information for each file in the batch. - """ - - __slots__ = [ - '_entries_value', - '_entries_present', - ] - - _has_required_fields = True - - def __init__(self, - entries=None): - self._entries_value = None - self._entries_present = False - if entries is not None: - self.entries = entries - - @property - def entries(self): - """ - Commit information for each file in the batch. - - :rtype: list of [UploadSessionFinishArg] - """ - if self._entries_present: - return self._entries_value - else: - raise AttributeError("missing required field 'entries'") - - @entries.setter - def entries(self, val): - val = self._entries_validator.validate(val) - self._entries_value = val - self._entries_present = True - - @entries.deleter - def entries(self): - self._entries_value = None - self._entries_present = False - - def __repr__(self): - return 'UploadSessionFinishBatchArg(entries={!r})'.format( - self._entries_value, - ) - -UploadSessionFinishBatchArg_validator = bv.Struct(UploadSessionFinishBatchArg) - -class UploadSessionFinishBatchJobStatus(async.PollResultBase): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar UploadSessionFinishBatchResult complete: The - :meth:`dropbox.dropbox.Dropbox.files_upload_session_finish_batch` has - finished. - """ - - @classmethod - def complete(cls, val): - """ - Create an instance of this class set to the ``complete`` tag with value - ``val``. - - :param UploadSessionFinishBatchResult val: - :rtype: UploadSessionFinishBatchJobStatus - """ - return cls('complete', val) - - def is_complete(self): - """ - Check if the union tag is ``complete``. - - :rtype: bool - """ - return self._tag == 'complete' - - def get_complete(self): - """ - The :meth:`dropbox.dropbox.Dropbox.files_upload_session_finish_batch` - has finished. - - Only call this if :meth:`is_complete` is true. - - :rtype: UploadSessionFinishBatchResult - """ - if not self.is_complete(): - raise AttributeError("tag 'complete' not set") - return self._value - - def __repr__(self): - return 'UploadSessionFinishBatchJobStatus(%r, %r)' % (self._tag, self._value) - -UploadSessionFinishBatchJobStatus_validator = bv.Union(UploadSessionFinishBatchJobStatus) - -class UploadSessionFinishBatchLaunch(async.LaunchResultBase): - """ - Result returned by - :meth:`dropbox.dropbox.Dropbox.files_upload_session_finish_batch` that may - either launch an asynchronous job or complete synchronously. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def complete(cls, val): - """ - Create an instance of this class set to the ``complete`` tag with value - ``val``. - - :param UploadSessionFinishBatchResult val: - :rtype: UploadSessionFinishBatchLaunch - """ - return cls('complete', val) - - def is_complete(self): - """ - Check if the union tag is ``complete``. - - :rtype: bool - """ - return self._tag == 'complete' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_complete(self): - """ - Only call this if :meth:`is_complete` is true. - - :rtype: UploadSessionFinishBatchResult - """ - if not self.is_complete(): - raise AttributeError("tag 'complete' not set") - return self._value - - def __repr__(self): - return 'UploadSessionFinishBatchLaunch(%r, %r)' % (self._tag, self._value) - -UploadSessionFinishBatchLaunch_validator = bv.Union(UploadSessionFinishBatchLaunch) - -class UploadSessionFinishBatchResult(object): - """ - :ivar entries: Commit result for each file in the batch. - """ - - __slots__ = [ - '_entries_value', - '_entries_present', - ] - - _has_required_fields = True - - def __init__(self, - entries=None): - self._entries_value = None - self._entries_present = False - if entries is not None: - self.entries = entries - - @property - def entries(self): - """ - Commit result for each file in the batch. - - :rtype: list of [UploadSessionFinishBatchResultEntry] - """ - if self._entries_present: - return self._entries_value - else: - raise AttributeError("missing required field 'entries'") - - @entries.setter - def entries(self, val): - val = self._entries_validator.validate(val) - self._entries_value = val - self._entries_present = True - - @entries.deleter - def entries(self): - self._entries_value = None - self._entries_present = False - - def __repr__(self): - return 'UploadSessionFinishBatchResult(entries={!r})'.format( - self._entries_value, - ) - -UploadSessionFinishBatchResult_validator = bv.Struct(UploadSessionFinishBatchResult) - -class UploadSessionFinishBatchResultEntry(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = None - - @classmethod - def success(cls, val): - """ - Create an instance of this class set to the ``success`` tag with value - ``val``. - - :param FileMetadata val: - :rtype: UploadSessionFinishBatchResultEntry - """ - return cls('success', val) - - @classmethod - def failure(cls, val): - """ - Create an instance of this class set to the ``failure`` tag with value - ``val``. - - :param UploadSessionFinishError val: - :rtype: UploadSessionFinishBatchResultEntry - """ - return cls('failure', val) - - def is_success(self): - """ - Check if the union tag is ``success``. - - :rtype: bool - """ - return self._tag == 'success' - - def is_failure(self): - """ - Check if the union tag is ``failure``. - - :rtype: bool - """ - return self._tag == 'failure' - - def get_success(self): - """ - Only call this if :meth:`is_success` is true. - - :rtype: FileMetadata - """ - if not self.is_success(): - raise AttributeError("tag 'success' not set") - return self._value - - def get_failure(self): - """ - Only call this if :meth:`is_failure` is true. - - :rtype: UploadSessionFinishError - """ - if not self.is_failure(): - raise AttributeError("tag 'failure' not set") - return self._value - - def __repr__(self): - return 'UploadSessionFinishBatchResultEntry(%r, %r)' % (self._tag, self._value) - -UploadSessionFinishBatchResultEntry_validator = bv.Union(UploadSessionFinishBatchResultEntry) - -class UploadSessionFinishError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar UploadSessionLookupError lookup_failed: The session arguments are - incorrect; the value explains the reason. - :ivar WriteError path: Unable to save the uploaded contents to a file. - :ivar too_many_shared_folder_targets: The batch request commits files into - too many different shared folders. Please limit your batch request to - files contained in a single shared folder. - :ivar too_many_write_operations: There are too many write operations - happening in the user's Dropbox. You should retry uploading this file. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - too_many_shared_folder_targets = None - # Attribute is overwritten below the class definition - too_many_write_operations = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def lookup_failed(cls, val): - """ - Create an instance of this class set to the ``lookup_failed`` tag with - value ``val``. - - :param UploadSessionLookupError val: - :rtype: UploadSessionFinishError - """ - return cls('lookup_failed', val) - - @classmethod - def path(cls, val): - """ - Create an instance of this class set to the ``path`` tag with value - ``val``. - - :param WriteError val: - :rtype: UploadSessionFinishError - """ - return cls('path', val) - - def is_lookup_failed(self): - """ - Check if the union tag is ``lookup_failed``. - - :rtype: bool - """ - return self._tag == 'lookup_failed' - - def is_path(self): - """ - Check if the union tag is ``path``. - - :rtype: bool - """ - return self._tag == 'path' - - def is_too_many_shared_folder_targets(self): - """ - Check if the union tag is ``too_many_shared_folder_targets``. - - :rtype: bool - """ - return self._tag == 'too_many_shared_folder_targets' - - def is_too_many_write_operations(self): - """ - Check if the union tag is ``too_many_write_operations``. - - :rtype: bool - """ - return self._tag == 'too_many_write_operations' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_lookup_failed(self): - """ - The session arguments are incorrect; the value explains the reason. - - Only call this if :meth:`is_lookup_failed` is true. - - :rtype: UploadSessionLookupError - """ - if not self.is_lookup_failed(): - raise AttributeError("tag 'lookup_failed' not set") - return self._value - - def get_path(self): - """ - Unable to save the uploaded contents to a file. - - Only call this if :meth:`is_path` is true. - - :rtype: WriteError - """ - if not self.is_path(): - raise AttributeError("tag 'path' not set") - return self._value - - def __repr__(self): - return 'UploadSessionFinishError(%r, %r)' % (self._tag, self._value) - -UploadSessionFinishError_validator = bv.Union(UploadSessionFinishError) - -class UploadSessionLookupError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar not_found: The upload session ID was not found or has expired. Upload - sessions are valid for 48 hours. - :ivar UploadSessionOffsetError incorrect_offset: The specified offset was - incorrect. See the value for the correct offset. This error may occur - when a previous request was received and processed successfully but the - client did not receive the response, e.g. due to a network error. - :ivar closed: You are attempting to append data to an upload session that - has alread been closed (i.e. committed). - :ivar not_closed: The session must be closed before calling - upload_session/finish_batch. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - not_found = None - # Attribute is overwritten below the class definition - closed = None - # Attribute is overwritten below the class definition - not_closed = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def incorrect_offset(cls, val): - """ - Create an instance of this class set to the ``incorrect_offset`` tag - with value ``val``. - - :param UploadSessionOffsetError val: - :rtype: UploadSessionLookupError - """ - return cls('incorrect_offset', val) - - def is_not_found(self): - """ - Check if the union tag is ``not_found``. - - :rtype: bool - """ - return self._tag == 'not_found' - - def is_incorrect_offset(self): - """ - Check if the union tag is ``incorrect_offset``. - - :rtype: bool - """ - return self._tag == 'incorrect_offset' - - def is_closed(self): - """ - Check if the union tag is ``closed``. - - :rtype: bool - """ - return self._tag == 'closed' - - def is_not_closed(self): - """ - Check if the union tag is ``not_closed``. - - :rtype: bool - """ - return self._tag == 'not_closed' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_incorrect_offset(self): - """ - The specified offset was incorrect. See the value for the correct - offset. This error may occur when a previous request was received and - processed successfully but the client did not receive the response, e.g. - due to a network error. - - Only call this if :meth:`is_incorrect_offset` is true. - - :rtype: UploadSessionOffsetError - """ - if not self.is_incorrect_offset(): - raise AttributeError("tag 'incorrect_offset' not set") - return self._value - - def __repr__(self): - return 'UploadSessionLookupError(%r, %r)' % (self._tag, self._value) - -UploadSessionLookupError_validator = bv.Union(UploadSessionLookupError) - -class UploadSessionOffsetError(object): - """ - :ivar correct_offset: The offset up to which data has been collected. - """ - - __slots__ = [ - '_correct_offset_value', - '_correct_offset_present', - ] - - _has_required_fields = True - - def __init__(self, - correct_offset=None): - self._correct_offset_value = None - self._correct_offset_present = False - if correct_offset is not None: - self.correct_offset = correct_offset - - @property - def correct_offset(self): - """ - The offset up to which data has been collected. - - :rtype: long - """ - if self._correct_offset_present: - return self._correct_offset_value - else: - raise AttributeError("missing required field 'correct_offset'") - - @correct_offset.setter - def correct_offset(self, val): - val = self._correct_offset_validator.validate(val) - self._correct_offset_value = val - self._correct_offset_present = True - - @correct_offset.deleter - def correct_offset(self): - self._correct_offset_value = None - self._correct_offset_present = False - - def __repr__(self): - return 'UploadSessionOffsetError(correct_offset={!r})'.format( - self._correct_offset_value, - ) - -UploadSessionOffsetError_validator = bv.Struct(UploadSessionOffsetError) - -class UploadSessionStartArg(object): - """ - :ivar close: If true, the current session will be closed, at which point you - won't be able to call - :meth:`dropbox.dropbox.Dropbox.files_upload_session_append_v2` anymore - with the current session. - """ - - __slots__ = [ - '_close_value', - '_close_present', - ] - - _has_required_fields = False - - def __init__(self, - close=None): - self._close_value = None - self._close_present = False - if close is not None: - self.close = close - - @property - def close(self): - """ - If true, the current session will be closed, at which point you won't be - able to call - :meth:`dropbox.dropbox.Dropbox.files_upload_session_append_v2` anymore - with the current session. - - :rtype: bool - """ - if self._close_present: - return self._close_value - else: - return False - - @close.setter - def close(self, val): - val = self._close_validator.validate(val) - self._close_value = val - self._close_present = True - - @close.deleter - def close(self): - self._close_value = None - self._close_present = False - - def __repr__(self): - return 'UploadSessionStartArg(close={!r})'.format( - self._close_value, - ) - -UploadSessionStartArg_validator = bv.Struct(UploadSessionStartArg) - -class UploadSessionStartResult(object): - """ - :ivar session_id: A unique identifier for the upload session. Pass this to - :meth:`dropbox.dropbox.Dropbox.files_upload_session_append_v2` and - :meth:`dropbox.dropbox.Dropbox.files_upload_session_finish`. - """ - - __slots__ = [ - '_session_id_value', - '_session_id_present', - ] - - _has_required_fields = True - - def __init__(self, - session_id=None): - self._session_id_value = None - self._session_id_present = False - if session_id is not None: - self.session_id = session_id - - @property - def session_id(self): - """ - A unique identifier for the upload session. Pass this to - :meth:`dropbox.dropbox.Dropbox.files_upload_session_append_v2` and - :meth:`dropbox.dropbox.Dropbox.files_upload_session_finish`. - - :rtype: str - """ - if self._session_id_present: - return self._session_id_value - else: - raise AttributeError("missing required field 'session_id'") - - @session_id.setter - def session_id(self, val): - val = self._session_id_validator.validate(val) - self._session_id_value = val - self._session_id_present = True - - @session_id.deleter - def session_id(self): - self._session_id_value = None - self._session_id_present = False - - def __repr__(self): - return 'UploadSessionStartResult(session_id={!r})'.format( - self._session_id_value, - ) - -UploadSessionStartResult_validator = bv.Struct(UploadSessionStartResult) - -class UploadWriteFailed(object): - """ - :ivar reason: The reason why the file couldn't be saved. - :ivar upload_session_id: The upload session ID; this may be used to retry - the commit. - """ - - __slots__ = [ - '_reason_value', - '_reason_present', - '_upload_session_id_value', - '_upload_session_id_present', - ] - - _has_required_fields = True - - def __init__(self, - reason=None, - upload_session_id=None): - self._reason_value = None - self._reason_present = False - self._upload_session_id_value = None - self._upload_session_id_present = False - if reason is not None: - self.reason = reason - if upload_session_id is not None: - self.upload_session_id = upload_session_id - - @property - def reason(self): - """ - The reason why the file couldn't be saved. - - :rtype: WriteError - """ - if self._reason_present: - return self._reason_value - else: - raise AttributeError("missing required field 'reason'") - - @reason.setter - def reason(self, val): - self._reason_validator.validate_type_only(val) - self._reason_value = val - self._reason_present = True - - @reason.deleter - def reason(self): - self._reason_value = None - self._reason_present = False - - @property - def upload_session_id(self): - """ - The upload session ID; this may be used to retry the commit. - - :rtype: str - """ - if self._upload_session_id_present: - return self._upload_session_id_value - else: - raise AttributeError("missing required field 'upload_session_id'") - - @upload_session_id.setter - def upload_session_id(self, val): - val = self._upload_session_id_validator.validate(val) - self._upload_session_id_value = val - self._upload_session_id_present = True - - @upload_session_id.deleter - def upload_session_id(self): - self._upload_session_id_value = None - self._upload_session_id_present = False - - def __repr__(self): - return 'UploadWriteFailed(reason={!r}, upload_session_id={!r})'.format( - self._reason_value, - self._upload_session_id_value, - ) - -UploadWriteFailed_validator = bv.Struct(UploadWriteFailed) - -class VideoMetadata(MediaMetadata): - """ - Metadata for a video. - - :ivar duration: The duration of the video in milliseconds. - """ - - __slots__ = [ - '_duration_value', - '_duration_present', - ] - - _has_required_fields = False - - def __init__(self, - dimensions=None, - location=None, - time_taken=None, - duration=None): - super(VideoMetadata, self).__init__(dimensions, - location, - time_taken) - self._duration_value = None - self._duration_present = False - if duration is not None: - self.duration = duration - - @property - def duration(self): - """ - The duration of the video in milliseconds. - - :rtype: long - """ - if self._duration_present: - return self._duration_value - else: - return None - - @duration.setter - def duration(self, val): - if val is None: - del self.duration - return - val = self._duration_validator.validate(val) - self._duration_value = val - self._duration_present = True - - @duration.deleter - def duration(self): - self._duration_value = None - self._duration_present = False - - def __repr__(self): - return 'VideoMetadata(dimensions={!r}, location={!r}, time_taken={!r}, duration={!r})'.format( - self._dimensions_value, - self._location_value, - self._time_taken_value, - self._duration_value, - ) - -VideoMetadata_validator = bv.Struct(VideoMetadata) - -class WriteConflictError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar file: There's a file in the way. - :ivar folder: There's a folder in the way. - :ivar file_ancestor: There's a file at an ancestor path, so we couldn't - create the required parent folders. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - file = None - # Attribute is overwritten below the class definition - folder = None - # Attribute is overwritten below the class definition - file_ancestor = None - # Attribute is overwritten below the class definition - other = None - - def is_file(self): - """ - Check if the union tag is ``file``. - - :rtype: bool - """ - return self._tag == 'file' - - def is_folder(self): - """ - Check if the union tag is ``folder``. - - :rtype: bool - """ - return self._tag == 'folder' - - def is_file_ancestor(self): - """ - Check if the union tag is ``file_ancestor``. - - :rtype: bool - """ - return self._tag == 'file_ancestor' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'WriteConflictError(%r, %r)' % (self._tag, self._value) - -WriteConflictError_validator = bv.Union(WriteConflictError) - -class WriteError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar WriteConflictError conflict: Couldn't write to the target path because - there was something in the way. - :ivar no_write_permission: The user doesn't have permissions to write to the - target location. - :ivar insufficient_space: The user doesn't have enough available space - (bytes) to write more data. - :ivar disallowed_name: Dropbox will not save the file or folder because of - its name. - :ivar team_folder: This endpoint cannot move or delete team folders. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - no_write_permission = None - # Attribute is overwritten below the class definition - insufficient_space = None - # Attribute is overwritten below the class definition - disallowed_name = None - # Attribute is overwritten below the class definition - team_folder = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def malformed_path(cls, val): - """ - Create an instance of this class set to the ``malformed_path`` tag with - value ``val``. - - :param Optional[str] val: - :rtype: WriteError - """ - return cls('malformed_path', val) - - @classmethod - def conflict(cls, val): - """ - Create an instance of this class set to the ``conflict`` tag with value - ``val``. - - :param WriteConflictError val: - :rtype: WriteError - """ - return cls('conflict', val) - - def is_malformed_path(self): - """ - Check if the union tag is ``malformed_path``. - - :rtype: bool - """ - return self._tag == 'malformed_path' - - def is_conflict(self): - """ - Check if the union tag is ``conflict``. - - :rtype: bool - """ - return self._tag == 'conflict' - - def is_no_write_permission(self): - """ - Check if the union tag is ``no_write_permission``. - - :rtype: bool - """ - return self._tag == 'no_write_permission' - - def is_insufficient_space(self): - """ - Check if the union tag is ``insufficient_space``. - - :rtype: bool - """ - return self._tag == 'insufficient_space' - - def is_disallowed_name(self): - """ - Check if the union tag is ``disallowed_name``. - - :rtype: bool - """ - return self._tag == 'disallowed_name' - - def is_team_folder(self): - """ - Check if the union tag is ``team_folder``. - - :rtype: bool - """ - return self._tag == 'team_folder' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_malformed_path(self): - """ - Only call this if :meth:`is_malformed_path` is true. - - :rtype: Optional[str] - """ - if not self.is_malformed_path(): - raise AttributeError("tag 'malformed_path' not set") - return self._value - - def get_conflict(self): - """ - Couldn't write to the target path because there was something in the - way. - - Only call this if :meth:`is_conflict` is true. - - :rtype: WriteConflictError - """ - if not self.is_conflict(): - raise AttributeError("tag 'conflict' not set") - return self._value - - def __repr__(self): - return 'WriteError(%r, %r)' % (self._tag, self._value) - -WriteError_validator = bv.Union(WriteError) - -class WriteMode(bb.Union): - """ - Your intent when writing a file to some path. This is used to determine what - constitutes a conflict and what the autorename strategy is. In some - situations, the conflict behavior is identical: (a) If the target path - doesn't refer to anything, the file is always written; no conflict. (b) If - the target path refers to a folder, it's always a conflict. (c) If the - target path refers to a file with identical contents, nothing gets written; - no conflict. The conflict checking differs in the case where there's a file - at the target path with contents different from the contents you're trying - to write. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar add: Do not overwrite an existing file if there is a conflict. The - autorename strategy is to append a number to the file name. For example, - "document.txt" might become "document (2).txt". - :ivar overwrite: Always overwrite the existing file. The autorename strategy - is the same as it is for ``add``. - :ivar str update: Overwrite if the given "rev" matches the existing file's - "rev". The autorename strategy is to append the string "conflicted copy" - to the file name. For example, "document.txt" might become "document - (conflicted copy).txt" or "document (Panda's conflicted copy).txt". - """ - - _catch_all = None - # Attribute is overwritten below the class definition - add = None - # Attribute is overwritten below the class definition - overwrite = None - - @classmethod - def update(cls, val): - """ - Create an instance of this class set to the ``update`` tag with value - ``val``. - - :param str val: - :rtype: WriteMode - """ - return cls('update', val) - - def is_add(self): - """ - Check if the union tag is ``add``. - - :rtype: bool - """ - return self._tag == 'add' - - def is_overwrite(self): - """ - Check if the union tag is ``overwrite``. - - :rtype: bool - """ - return self._tag == 'overwrite' - - def is_update(self): - """ - Check if the union tag is ``update``. - - :rtype: bool - """ - return self._tag == 'update' - - def get_update(self): - """ - Overwrite if the given "rev" matches the existing file's "rev". The - autorename strategy is to append the string "conflicted copy" to the - file name. For example, "document.txt" might become "document - (conflicted copy).txt" or "document (Panda's conflicted copy).txt". - - Only call this if :meth:`is_update` is true. - - :rtype: str - """ - if not self.is_update(): - raise AttributeError("tag 'update' not set") - return self._value - - def __repr__(self): - return 'WriteMode(%r, %r)' % (self._tag, self._value) - -WriteMode_validator = bv.Union(WriteMode) - -Id_validator = bv.String(min_length=1) -ListFolderCursor_validator = bv.String(min_length=1) -MalformedPathError_validator = bv.Nullable(bv.String()) -Path_validator = bv.String(pattern=u'/(.|[\\r\\n])*') -PathOrId_validator = bv.String(pattern=u'/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/.*)?)') -PathR_validator = bv.String(pattern=u'(/(.|[\\r\\n])*)?|(ns:[0-9]+(/.*)?)') -PathROrId_validator = bv.String(pattern=u'(/(.|[\\r\\n])*)?|id:.*|(ns:[0-9]+(/.*)?)') -ReadPath_validator = bv.String(pattern=u'(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)') -Rev_validator = bv.String(min_length=9, pattern=u'[0-9a-f]+') -Sha256HexHash_validator = bv.String(min_length=64, max_length=64) -SharedLinkUrl_validator = bv.String() -WritePath_validator = bv.String(pattern=u'(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)') -WritePathOrId_validator = bv.String(pattern=u'(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)') -GetMetadataArg._path_validator = ReadPath_validator -GetMetadataArg._include_media_info_validator = bv.Boolean() -GetMetadataArg._include_deleted_validator = bv.Boolean() -GetMetadataArg._include_has_explicit_shared_members_validator = bv.Boolean() -GetMetadataArg._all_field_names_ = set([ - 'path', - 'include_media_info', - 'include_deleted', - 'include_has_explicit_shared_members', -]) -GetMetadataArg._all_fields_ = [ - ('path', GetMetadataArg._path_validator), - ('include_media_info', GetMetadataArg._include_media_info_validator), - ('include_deleted', GetMetadataArg._include_deleted_validator), - ('include_has_explicit_shared_members', GetMetadataArg._include_has_explicit_shared_members_validator), -] - -AlphaGetMetadataArg._include_property_templates_validator = bv.Nullable(bv.List(file_properties.TemplateId_validator)) -AlphaGetMetadataArg._all_field_names_ = GetMetadataArg._all_field_names_.union(set(['include_property_templates'])) -AlphaGetMetadataArg._all_fields_ = GetMetadataArg._all_fields_ + [('include_property_templates', AlphaGetMetadataArg._include_property_templates_validator)] - -GetMetadataError._path_validator = LookupError_validator -GetMetadataError._tagmap = { - 'path': GetMetadataError._path_validator, -} - -AlphaGetMetadataError._properties_error_validator = file_properties.LookUpPropertiesError_validator -AlphaGetMetadataError._tagmap = { - 'properties_error': AlphaGetMetadataError._properties_error_validator, -} -AlphaGetMetadataError._tagmap.update(GetMetadataError._tagmap) - -CommitInfo._path_validator = WritePathOrId_validator -CommitInfo._mode_validator = WriteMode_validator -CommitInfo._autorename_validator = bv.Boolean() -CommitInfo._client_modified_validator = bv.Nullable(common.DropboxTimestamp_validator) -CommitInfo._mute_validator = bv.Boolean() -CommitInfo._all_field_names_ = set([ - 'path', - 'mode', - 'autorename', - 'client_modified', - 'mute', -]) -CommitInfo._all_fields_ = [ - ('path', CommitInfo._path_validator), - ('mode', CommitInfo._mode_validator), - ('autorename', CommitInfo._autorename_validator), - ('client_modified', CommitInfo._client_modified_validator), - ('mute', CommitInfo._mute_validator), -] - -CommitInfoWithProperties._property_groups_validator = bv.Nullable(bv.List(file_properties.PropertyGroup_validator)) -CommitInfoWithProperties._all_field_names_ = CommitInfo._all_field_names_.union(set(['property_groups'])) -CommitInfoWithProperties._all_fields_ = CommitInfo._all_fields_ + [('property_groups', CommitInfoWithProperties._property_groups_validator)] - -CreateFolderArg._path_validator = WritePath_validator -CreateFolderArg._autorename_validator = bv.Boolean() -CreateFolderArg._all_field_names_ = set([ - 'path', - 'autorename', -]) -CreateFolderArg._all_fields_ = [ - ('path', CreateFolderArg._path_validator), - ('autorename', CreateFolderArg._autorename_validator), -] - -CreateFolderError._path_validator = WriteError_validator -CreateFolderError._tagmap = { - 'path': CreateFolderError._path_validator, -} - -FileOpsResult._all_field_names_ = set([]) -FileOpsResult._all_fields_ = [] - -CreateFolderResult._metadata_validator = FolderMetadata_validator -CreateFolderResult._all_field_names_ = FileOpsResult._all_field_names_.union(set(['metadata'])) -CreateFolderResult._all_fields_ = FileOpsResult._all_fields_ + [('metadata', CreateFolderResult._metadata_validator)] - -DeleteArg._path_validator = WritePathOrId_validator -DeleteArg._all_field_names_ = set(['path']) -DeleteArg._all_fields_ = [('path', DeleteArg._path_validator)] - -DeleteBatchArg._entries_validator = bv.List(DeleteArg_validator) -DeleteBatchArg._all_field_names_ = set(['entries']) -DeleteBatchArg._all_fields_ = [('entries', DeleteBatchArg._entries_validator)] - -DeleteBatchError._too_many_write_operations_validator = bv.Void() -DeleteBatchError._other_validator = bv.Void() -DeleteBatchError._tagmap = { - 'too_many_write_operations': DeleteBatchError._too_many_write_operations_validator, - 'other': DeleteBatchError._other_validator, -} - -DeleteBatchError.too_many_write_operations = DeleteBatchError('too_many_write_operations') -DeleteBatchError.other = DeleteBatchError('other') - -DeleteBatchJobStatus._complete_validator = DeleteBatchResult_validator -DeleteBatchJobStatus._failed_validator = DeleteBatchError_validator -DeleteBatchJobStatus._other_validator = bv.Void() -DeleteBatchJobStatus._tagmap = { - 'complete': DeleteBatchJobStatus._complete_validator, - 'failed': DeleteBatchJobStatus._failed_validator, - 'other': DeleteBatchJobStatus._other_validator, -} -DeleteBatchJobStatus._tagmap.update(async.PollResultBase._tagmap) - -DeleteBatchJobStatus.other = DeleteBatchJobStatus('other') - -DeleteBatchLaunch._complete_validator = DeleteBatchResult_validator -DeleteBatchLaunch._other_validator = bv.Void() -DeleteBatchLaunch._tagmap = { - 'complete': DeleteBatchLaunch._complete_validator, - 'other': DeleteBatchLaunch._other_validator, -} -DeleteBatchLaunch._tagmap.update(async.LaunchResultBase._tagmap) - -DeleteBatchLaunch.other = DeleteBatchLaunch('other') - -DeleteBatchResult._entries_validator = bv.List(DeleteBatchResultEntry_validator) -DeleteBatchResult._all_field_names_ = FileOpsResult._all_field_names_.union(set(['entries'])) -DeleteBatchResult._all_fields_ = FileOpsResult._all_fields_ + [('entries', DeleteBatchResult._entries_validator)] - -DeleteBatchResultData._metadata_validator = Metadata_validator -DeleteBatchResultData._all_field_names_ = set(['metadata']) -DeleteBatchResultData._all_fields_ = [('metadata', DeleteBatchResultData._metadata_validator)] - -DeleteBatchResultEntry._success_validator = DeleteBatchResultData_validator -DeleteBatchResultEntry._failure_validator = DeleteError_validator -DeleteBatchResultEntry._tagmap = { - 'success': DeleteBatchResultEntry._success_validator, - 'failure': DeleteBatchResultEntry._failure_validator, -} - -DeleteError._path_lookup_validator = LookupError_validator -DeleteError._path_write_validator = WriteError_validator -DeleteError._too_many_write_operations_validator = bv.Void() -DeleteError._too_many_files_validator = bv.Void() -DeleteError._other_validator = bv.Void() -DeleteError._tagmap = { - 'path_lookup': DeleteError._path_lookup_validator, - 'path_write': DeleteError._path_write_validator, - 'too_many_write_operations': DeleteError._too_many_write_operations_validator, - 'too_many_files': DeleteError._too_many_files_validator, - 'other': DeleteError._other_validator, -} - -DeleteError.too_many_write_operations = DeleteError('too_many_write_operations') -DeleteError.too_many_files = DeleteError('too_many_files') -DeleteError.other = DeleteError('other') - -DeleteResult._metadata_validator = Metadata_validator -DeleteResult._all_field_names_ = FileOpsResult._all_field_names_.union(set(['metadata'])) -DeleteResult._all_fields_ = FileOpsResult._all_fields_ + [('metadata', DeleteResult._metadata_validator)] - -Metadata._name_validator = bv.String() -Metadata._path_lower_validator = bv.Nullable(bv.String()) -Metadata._path_display_validator = bv.Nullable(bv.String()) -Metadata._parent_shared_folder_id_validator = bv.Nullable(common.SharedFolderId_validator) -Metadata._field_names_ = set([ - 'name', - 'path_lower', - 'path_display', - 'parent_shared_folder_id', -]) -Metadata._all_field_names_ = Metadata._field_names_ -Metadata._fields_ = [ - ('name', Metadata._name_validator), - ('path_lower', Metadata._path_lower_validator), - ('path_display', Metadata._path_display_validator), - ('parent_shared_folder_id', Metadata._parent_shared_folder_id_validator), -] -Metadata._all_fields_ = Metadata._fields_ - -Metadata._tag_to_subtype_ = { - (u'file',): FileMetadata_validator, - (u'folder',): FolderMetadata_validator, - (u'deleted',): DeletedMetadata_validator, -} -Metadata._pytype_to_tag_and_subtype_ = { - FileMetadata: ((u'file',), FileMetadata_validator), - FolderMetadata: ((u'folder',), FolderMetadata_validator), - DeletedMetadata: ((u'deleted',), DeletedMetadata_validator), -} -Metadata._is_catch_all_ = False - -DeletedMetadata._field_names_ = set([]) -DeletedMetadata._all_field_names_ = Metadata._all_field_names_.union(DeletedMetadata._field_names_) -DeletedMetadata._fields_ = [] -DeletedMetadata._all_fields_ = Metadata._all_fields_ + DeletedMetadata._fields_ - -Dimensions._height_validator = bv.UInt64() -Dimensions._width_validator = bv.UInt64() -Dimensions._all_field_names_ = set([ - 'height', - 'width', -]) -Dimensions._all_fields_ = [ - ('height', Dimensions._height_validator), - ('width', Dimensions._width_validator), -] - -DownloadArg._path_validator = ReadPath_validator -DownloadArg._rev_validator = bv.Nullable(Rev_validator) -DownloadArg._all_field_names_ = set([ - 'path', - 'rev', -]) -DownloadArg._all_fields_ = [ - ('path', DownloadArg._path_validator), - ('rev', DownloadArg._rev_validator), -] - -DownloadError._path_validator = LookupError_validator -DownloadError._other_validator = bv.Void() -DownloadError._tagmap = { - 'path': DownloadError._path_validator, - 'other': DownloadError._other_validator, -} - -DownloadError.other = DownloadError('other') - -FileMetadata._id_validator = Id_validator -FileMetadata._client_modified_validator = common.DropboxTimestamp_validator -FileMetadata._server_modified_validator = common.DropboxTimestamp_validator -FileMetadata._rev_validator = Rev_validator -FileMetadata._size_validator = bv.UInt64() -FileMetadata._media_info_validator = bv.Nullable(MediaInfo_validator) -FileMetadata._sharing_info_validator = bv.Nullable(FileSharingInfo_validator) -FileMetadata._property_groups_validator = bv.Nullable(bv.List(file_properties.PropertyGroup_validator)) -FileMetadata._has_explicit_shared_members_validator = bv.Nullable(bv.Boolean()) -FileMetadata._content_hash_validator = bv.Nullable(Sha256HexHash_validator) -FileMetadata._field_names_ = set([ - 'id', - 'client_modified', - 'server_modified', - 'rev', - 'size', - 'media_info', - 'sharing_info', - 'property_groups', - 'has_explicit_shared_members', - 'content_hash', -]) -FileMetadata._all_field_names_ = Metadata._all_field_names_.union(FileMetadata._field_names_) -FileMetadata._fields_ = [ - ('id', FileMetadata._id_validator), - ('client_modified', FileMetadata._client_modified_validator), - ('server_modified', FileMetadata._server_modified_validator), - ('rev', FileMetadata._rev_validator), - ('size', FileMetadata._size_validator), - ('media_info', FileMetadata._media_info_validator), - ('sharing_info', FileMetadata._sharing_info_validator), - ('property_groups', FileMetadata._property_groups_validator), - ('has_explicit_shared_members', FileMetadata._has_explicit_shared_members_validator), - ('content_hash', FileMetadata._content_hash_validator), -] -FileMetadata._all_fields_ = Metadata._all_fields_ + FileMetadata._fields_ - -SharingInfo._read_only_validator = bv.Boolean() -SharingInfo._all_field_names_ = set(['read_only']) -SharingInfo._all_fields_ = [('read_only', SharingInfo._read_only_validator)] - -FileSharingInfo._parent_shared_folder_id_validator = common.SharedFolderId_validator -FileSharingInfo._modified_by_validator = bv.Nullable(users_common.AccountId_validator) -FileSharingInfo._all_field_names_ = SharingInfo._all_field_names_.union(set([ - 'parent_shared_folder_id', - 'modified_by', -])) -FileSharingInfo._all_fields_ = SharingInfo._all_fields_ + [ - ('parent_shared_folder_id', FileSharingInfo._parent_shared_folder_id_validator), - ('modified_by', FileSharingInfo._modified_by_validator), -] - -FolderMetadata._id_validator = Id_validator -FolderMetadata._shared_folder_id_validator = bv.Nullable(common.SharedFolderId_validator) -FolderMetadata._sharing_info_validator = bv.Nullable(FolderSharingInfo_validator) -FolderMetadata._property_groups_validator = bv.Nullable(bv.List(file_properties.PropertyGroup_validator)) -FolderMetadata._field_names_ = set([ - 'id', - 'shared_folder_id', - 'sharing_info', - 'property_groups', -]) -FolderMetadata._all_field_names_ = Metadata._all_field_names_.union(FolderMetadata._field_names_) -FolderMetadata._fields_ = [ - ('id', FolderMetadata._id_validator), - ('shared_folder_id', FolderMetadata._shared_folder_id_validator), - ('sharing_info', FolderMetadata._sharing_info_validator), - ('property_groups', FolderMetadata._property_groups_validator), -] -FolderMetadata._all_fields_ = Metadata._all_fields_ + FolderMetadata._fields_ - -FolderSharingInfo._parent_shared_folder_id_validator = bv.Nullable(common.SharedFolderId_validator) -FolderSharingInfo._shared_folder_id_validator = bv.Nullable(common.SharedFolderId_validator) -FolderSharingInfo._traverse_only_validator = bv.Boolean() -FolderSharingInfo._no_access_validator = bv.Boolean() -FolderSharingInfo._all_field_names_ = SharingInfo._all_field_names_.union(set([ - 'parent_shared_folder_id', - 'shared_folder_id', - 'traverse_only', - 'no_access', -])) -FolderSharingInfo._all_fields_ = SharingInfo._all_fields_ + [ - ('parent_shared_folder_id', FolderSharingInfo._parent_shared_folder_id_validator), - ('shared_folder_id', FolderSharingInfo._shared_folder_id_validator), - ('traverse_only', FolderSharingInfo._traverse_only_validator), - ('no_access', FolderSharingInfo._no_access_validator), -] - -GetCopyReferenceArg._path_validator = ReadPath_validator -GetCopyReferenceArg._all_field_names_ = set(['path']) -GetCopyReferenceArg._all_fields_ = [('path', GetCopyReferenceArg._path_validator)] - -GetCopyReferenceError._path_validator = LookupError_validator -GetCopyReferenceError._other_validator = bv.Void() -GetCopyReferenceError._tagmap = { - 'path': GetCopyReferenceError._path_validator, - 'other': GetCopyReferenceError._other_validator, -} - -GetCopyReferenceError.other = GetCopyReferenceError('other') - -GetCopyReferenceResult._metadata_validator = Metadata_validator -GetCopyReferenceResult._copy_reference_validator = bv.String() -GetCopyReferenceResult._expires_validator = common.DropboxTimestamp_validator -GetCopyReferenceResult._all_field_names_ = set([ - 'metadata', - 'copy_reference', - 'expires', -]) -GetCopyReferenceResult._all_fields_ = [ - ('metadata', GetCopyReferenceResult._metadata_validator), - ('copy_reference', GetCopyReferenceResult._copy_reference_validator), - ('expires', GetCopyReferenceResult._expires_validator), -] - -GetTemporaryLinkArg._path_validator = ReadPath_validator -GetTemporaryLinkArg._all_field_names_ = set(['path']) -GetTemporaryLinkArg._all_fields_ = [('path', GetTemporaryLinkArg._path_validator)] - -GetTemporaryLinkError._path_validator = LookupError_validator -GetTemporaryLinkError._other_validator = bv.Void() -GetTemporaryLinkError._tagmap = { - 'path': GetTemporaryLinkError._path_validator, - 'other': GetTemporaryLinkError._other_validator, -} - -GetTemporaryLinkError.other = GetTemporaryLinkError('other') - -GetTemporaryLinkResult._metadata_validator = FileMetadata_validator -GetTemporaryLinkResult._link_validator = bv.String() -GetTemporaryLinkResult._all_field_names_ = set([ - 'metadata', - 'link', -]) -GetTemporaryLinkResult._all_fields_ = [ - ('metadata', GetTemporaryLinkResult._metadata_validator), - ('link', GetTemporaryLinkResult._link_validator), -] - -GetThumbnailBatchArg._entries_validator = bv.List(ThumbnailArg_validator) -GetThumbnailBatchArg._all_field_names_ = set(['entries']) -GetThumbnailBatchArg._all_fields_ = [('entries', GetThumbnailBatchArg._entries_validator)] - -GetThumbnailBatchError._too_many_files_validator = bv.Void() -GetThumbnailBatchError._other_validator = bv.Void() -GetThumbnailBatchError._tagmap = { - 'too_many_files': GetThumbnailBatchError._too_many_files_validator, - 'other': GetThumbnailBatchError._other_validator, -} - -GetThumbnailBatchError.too_many_files = GetThumbnailBatchError('too_many_files') -GetThumbnailBatchError.other = GetThumbnailBatchError('other') - -GetThumbnailBatchResult._entries_validator = bv.List(GetThumbnailBatchResultEntry_validator) -GetThumbnailBatchResult._all_field_names_ = set(['entries']) -GetThumbnailBatchResult._all_fields_ = [('entries', GetThumbnailBatchResult._entries_validator)] - -GetThumbnailBatchResultData._metadata_validator = FileMetadata_validator -GetThumbnailBatchResultData._thumbnail_validator = bv.String() -GetThumbnailBatchResultData._all_field_names_ = set([ - 'metadata', - 'thumbnail', -]) -GetThumbnailBatchResultData._all_fields_ = [ - ('metadata', GetThumbnailBatchResultData._metadata_validator), - ('thumbnail', GetThumbnailBatchResultData._thumbnail_validator), -] - -GetThumbnailBatchResultEntry._success_validator = GetThumbnailBatchResultData_validator -GetThumbnailBatchResultEntry._failure_validator = ThumbnailError_validator -GetThumbnailBatchResultEntry._other_validator = bv.Void() -GetThumbnailBatchResultEntry._tagmap = { - 'success': GetThumbnailBatchResultEntry._success_validator, - 'failure': GetThumbnailBatchResultEntry._failure_validator, - 'other': GetThumbnailBatchResultEntry._other_validator, -} - -GetThumbnailBatchResultEntry.other = GetThumbnailBatchResultEntry('other') - -GpsCoordinates._latitude_validator = bv.Float64() -GpsCoordinates._longitude_validator = bv.Float64() -GpsCoordinates._all_field_names_ = set([ - 'latitude', - 'longitude', -]) -GpsCoordinates._all_fields_ = [ - ('latitude', GpsCoordinates._latitude_validator), - ('longitude', GpsCoordinates._longitude_validator), -] - -ListFolderArg._path_validator = PathROrId_validator -ListFolderArg._recursive_validator = bv.Boolean() -ListFolderArg._include_media_info_validator = bv.Boolean() -ListFolderArg._include_deleted_validator = bv.Boolean() -ListFolderArg._include_has_explicit_shared_members_validator = bv.Boolean() -ListFolderArg._include_mounted_folders_validator = bv.Boolean() -ListFolderArg._limit_validator = bv.Nullable(bv.UInt32(min_value=1, max_value=2000)) -ListFolderArg._shared_link_validator = bv.Nullable(SharedLink_validator) -ListFolderArg._all_field_names_ = set([ - 'path', - 'recursive', - 'include_media_info', - 'include_deleted', - 'include_has_explicit_shared_members', - 'include_mounted_folders', - 'limit', - 'shared_link', -]) -ListFolderArg._all_fields_ = [ - ('path', ListFolderArg._path_validator), - ('recursive', ListFolderArg._recursive_validator), - ('include_media_info', ListFolderArg._include_media_info_validator), - ('include_deleted', ListFolderArg._include_deleted_validator), - ('include_has_explicit_shared_members', ListFolderArg._include_has_explicit_shared_members_validator), - ('include_mounted_folders', ListFolderArg._include_mounted_folders_validator), - ('limit', ListFolderArg._limit_validator), - ('shared_link', ListFolderArg._shared_link_validator), -] - -ListFolderContinueArg._cursor_validator = ListFolderCursor_validator -ListFolderContinueArg._all_field_names_ = set(['cursor']) -ListFolderContinueArg._all_fields_ = [('cursor', ListFolderContinueArg._cursor_validator)] - -ListFolderContinueError._path_validator = LookupError_validator -ListFolderContinueError._reset_validator = bv.Void() -ListFolderContinueError._other_validator = bv.Void() -ListFolderContinueError._tagmap = { - 'path': ListFolderContinueError._path_validator, - 'reset': ListFolderContinueError._reset_validator, - 'other': ListFolderContinueError._other_validator, -} - -ListFolderContinueError.reset = ListFolderContinueError('reset') -ListFolderContinueError.other = ListFolderContinueError('other') - -ListFolderError._path_validator = LookupError_validator -ListFolderError._other_validator = bv.Void() -ListFolderError._tagmap = { - 'path': ListFolderError._path_validator, - 'other': ListFolderError._other_validator, -} - -ListFolderError.other = ListFolderError('other') - -ListFolderGetLatestCursorResult._cursor_validator = ListFolderCursor_validator -ListFolderGetLatestCursorResult._all_field_names_ = set(['cursor']) -ListFolderGetLatestCursorResult._all_fields_ = [('cursor', ListFolderGetLatestCursorResult._cursor_validator)] - -ListFolderLongpollArg._cursor_validator = ListFolderCursor_validator -ListFolderLongpollArg._timeout_validator = bv.UInt64(min_value=30, max_value=480) -ListFolderLongpollArg._all_field_names_ = set([ - 'cursor', - 'timeout', -]) -ListFolderLongpollArg._all_fields_ = [ - ('cursor', ListFolderLongpollArg._cursor_validator), - ('timeout', ListFolderLongpollArg._timeout_validator), -] - -ListFolderLongpollError._reset_validator = bv.Void() -ListFolderLongpollError._other_validator = bv.Void() -ListFolderLongpollError._tagmap = { - 'reset': ListFolderLongpollError._reset_validator, - 'other': ListFolderLongpollError._other_validator, -} - -ListFolderLongpollError.reset = ListFolderLongpollError('reset') -ListFolderLongpollError.other = ListFolderLongpollError('other') - -ListFolderLongpollResult._changes_validator = bv.Boolean() -ListFolderLongpollResult._backoff_validator = bv.Nullable(bv.UInt64()) -ListFolderLongpollResult._all_field_names_ = set([ - 'changes', - 'backoff', -]) -ListFolderLongpollResult._all_fields_ = [ - ('changes', ListFolderLongpollResult._changes_validator), - ('backoff', ListFolderLongpollResult._backoff_validator), -] - -ListFolderResult._entries_validator = bv.List(Metadata_validator) -ListFolderResult._cursor_validator = ListFolderCursor_validator -ListFolderResult._has_more_validator = bv.Boolean() -ListFolderResult._all_field_names_ = set([ - 'entries', - 'cursor', - 'has_more', -]) -ListFolderResult._all_fields_ = [ - ('entries', ListFolderResult._entries_validator), - ('cursor', ListFolderResult._cursor_validator), - ('has_more', ListFolderResult._has_more_validator), -] - -ListRevisionsArg._path_validator = PathOrId_validator -ListRevisionsArg._mode_validator = ListRevisionsMode_validator -ListRevisionsArg._limit_validator = bv.UInt64(min_value=1, max_value=100) -ListRevisionsArg._all_field_names_ = set([ - 'path', - 'mode', - 'limit', -]) -ListRevisionsArg._all_fields_ = [ - ('path', ListRevisionsArg._path_validator), - ('mode', ListRevisionsArg._mode_validator), - ('limit', ListRevisionsArg._limit_validator), -] - -ListRevisionsError._path_validator = LookupError_validator -ListRevisionsError._other_validator = bv.Void() -ListRevisionsError._tagmap = { - 'path': ListRevisionsError._path_validator, - 'other': ListRevisionsError._other_validator, -} - -ListRevisionsError.other = ListRevisionsError('other') - -ListRevisionsMode._path_validator = bv.Void() -ListRevisionsMode._id_validator = bv.Void() -ListRevisionsMode._other_validator = bv.Void() -ListRevisionsMode._tagmap = { - 'path': ListRevisionsMode._path_validator, - 'id': ListRevisionsMode._id_validator, - 'other': ListRevisionsMode._other_validator, -} - -ListRevisionsMode.path = ListRevisionsMode('path') -ListRevisionsMode.id = ListRevisionsMode('id') -ListRevisionsMode.other = ListRevisionsMode('other') - -ListRevisionsResult._is_deleted_validator = bv.Boolean() -ListRevisionsResult._server_deleted_validator = bv.Nullable(common.DropboxTimestamp_validator) -ListRevisionsResult._entries_validator = bv.List(FileMetadata_validator) -ListRevisionsResult._all_field_names_ = set([ - 'is_deleted', - 'server_deleted', - 'entries', -]) -ListRevisionsResult._all_fields_ = [ - ('is_deleted', ListRevisionsResult._is_deleted_validator), - ('server_deleted', ListRevisionsResult._server_deleted_validator), - ('entries', ListRevisionsResult._entries_validator), -] - -LookupError._malformed_path_validator = MalformedPathError_validator -LookupError._not_found_validator = bv.Void() -LookupError._not_file_validator = bv.Void() -LookupError._not_folder_validator = bv.Void() -LookupError._restricted_content_validator = bv.Void() -LookupError._other_validator = bv.Void() -LookupError._tagmap = { - 'malformed_path': LookupError._malformed_path_validator, - 'not_found': LookupError._not_found_validator, - 'not_file': LookupError._not_file_validator, - 'not_folder': LookupError._not_folder_validator, - 'restricted_content': LookupError._restricted_content_validator, - 'other': LookupError._other_validator, -} - -LookupError.not_found = LookupError('not_found') -LookupError.not_file = LookupError('not_file') -LookupError.not_folder = LookupError('not_folder') -LookupError.restricted_content = LookupError('restricted_content') -LookupError.other = LookupError('other') - -MediaInfo._pending_validator = bv.Void() -MediaInfo._metadata_validator = MediaMetadata_validator -MediaInfo._tagmap = { - 'pending': MediaInfo._pending_validator, - 'metadata': MediaInfo._metadata_validator, -} - -MediaInfo.pending = MediaInfo('pending') - -MediaMetadata._dimensions_validator = bv.Nullable(Dimensions_validator) -MediaMetadata._location_validator = bv.Nullable(GpsCoordinates_validator) -MediaMetadata._time_taken_validator = bv.Nullable(common.DropboxTimestamp_validator) -MediaMetadata._field_names_ = set([ - 'dimensions', - 'location', - 'time_taken', -]) -MediaMetadata._all_field_names_ = MediaMetadata._field_names_ -MediaMetadata._fields_ = [ - ('dimensions', MediaMetadata._dimensions_validator), - ('location', MediaMetadata._location_validator), - ('time_taken', MediaMetadata._time_taken_validator), -] -MediaMetadata._all_fields_ = MediaMetadata._fields_ - -MediaMetadata._tag_to_subtype_ = { - (u'photo',): PhotoMetadata_validator, - (u'video',): VideoMetadata_validator, -} -MediaMetadata._pytype_to_tag_and_subtype_ = { - PhotoMetadata: ((u'photo',), PhotoMetadata_validator), - VideoMetadata: ((u'video',), VideoMetadata_validator), -} -MediaMetadata._is_catch_all_ = False - -PhotoMetadata._field_names_ = set([]) -PhotoMetadata._all_field_names_ = MediaMetadata._all_field_names_.union(PhotoMetadata._field_names_) -PhotoMetadata._fields_ = [] -PhotoMetadata._all_fields_ = MediaMetadata._all_fields_ + PhotoMetadata._fields_ - -PreviewArg._path_validator = ReadPath_validator -PreviewArg._rev_validator = bv.Nullable(Rev_validator) -PreviewArg._all_field_names_ = set([ - 'path', - 'rev', -]) -PreviewArg._all_fields_ = [ - ('path', PreviewArg._path_validator), - ('rev', PreviewArg._rev_validator), -] - -PreviewError._path_validator = LookupError_validator -PreviewError._in_progress_validator = bv.Void() -PreviewError._unsupported_extension_validator = bv.Void() -PreviewError._unsupported_content_validator = bv.Void() -PreviewError._tagmap = { - 'path': PreviewError._path_validator, - 'in_progress': PreviewError._in_progress_validator, - 'unsupported_extension': PreviewError._unsupported_extension_validator, - 'unsupported_content': PreviewError._unsupported_content_validator, -} - -PreviewError.in_progress = PreviewError('in_progress') -PreviewError.unsupported_extension = PreviewError('unsupported_extension') -PreviewError.unsupported_content = PreviewError('unsupported_content') - -RelocationPath._from_path_validator = WritePathOrId_validator -RelocationPath._to_path_validator = WritePathOrId_validator -RelocationPath._all_field_names_ = set([ - 'from_path', - 'to_path', -]) -RelocationPath._all_fields_ = [ - ('from_path', RelocationPath._from_path_validator), - ('to_path', RelocationPath._to_path_validator), -] - -RelocationArg._allow_shared_folder_validator = bv.Boolean() -RelocationArg._autorename_validator = bv.Boolean() -RelocationArg._allow_ownership_transfer_validator = bv.Boolean() -RelocationArg._all_field_names_ = RelocationPath._all_field_names_.union(set([ - 'allow_shared_folder', - 'autorename', - 'allow_ownership_transfer', -])) -RelocationArg._all_fields_ = RelocationPath._all_fields_ + [ - ('allow_shared_folder', RelocationArg._allow_shared_folder_validator), - ('autorename', RelocationArg._autorename_validator), - ('allow_ownership_transfer', RelocationArg._allow_ownership_transfer_validator), -] - -RelocationBatchArg._entries_validator = bv.List(RelocationPath_validator) -RelocationBatchArg._allow_shared_folder_validator = bv.Boolean() -RelocationBatchArg._autorename_validator = bv.Boolean() -RelocationBatchArg._allow_ownership_transfer_validator = bv.Boolean() -RelocationBatchArg._all_field_names_ = set([ - 'entries', - 'allow_shared_folder', - 'autorename', - 'allow_ownership_transfer', -]) -RelocationBatchArg._all_fields_ = [ - ('entries', RelocationBatchArg._entries_validator), - ('allow_shared_folder', RelocationBatchArg._allow_shared_folder_validator), - ('autorename', RelocationBatchArg._autorename_validator), - ('allow_ownership_transfer', RelocationBatchArg._allow_ownership_transfer_validator), -] - -RelocationError._from_lookup_validator = LookupError_validator -RelocationError._from_write_validator = WriteError_validator -RelocationError._to_validator = WriteError_validator -RelocationError._cant_copy_shared_folder_validator = bv.Void() -RelocationError._cant_nest_shared_folder_validator = bv.Void() -RelocationError._cant_move_folder_into_itself_validator = bv.Void() -RelocationError._too_many_files_validator = bv.Void() -RelocationError._duplicated_or_nested_paths_validator = bv.Void() -RelocationError._cant_transfer_ownership_validator = bv.Void() -RelocationError._other_validator = bv.Void() -RelocationError._tagmap = { - 'from_lookup': RelocationError._from_lookup_validator, - 'from_write': RelocationError._from_write_validator, - 'to': RelocationError._to_validator, - 'cant_copy_shared_folder': RelocationError._cant_copy_shared_folder_validator, - 'cant_nest_shared_folder': RelocationError._cant_nest_shared_folder_validator, - 'cant_move_folder_into_itself': RelocationError._cant_move_folder_into_itself_validator, - 'too_many_files': RelocationError._too_many_files_validator, - 'duplicated_or_nested_paths': RelocationError._duplicated_or_nested_paths_validator, - 'cant_transfer_ownership': RelocationError._cant_transfer_ownership_validator, - 'other': RelocationError._other_validator, -} - -RelocationError.cant_copy_shared_folder = RelocationError('cant_copy_shared_folder') -RelocationError.cant_nest_shared_folder = RelocationError('cant_nest_shared_folder') -RelocationError.cant_move_folder_into_itself = RelocationError('cant_move_folder_into_itself') -RelocationError.too_many_files = RelocationError('too_many_files') -RelocationError.duplicated_or_nested_paths = RelocationError('duplicated_or_nested_paths') -RelocationError.cant_transfer_ownership = RelocationError('cant_transfer_ownership') -RelocationError.other = RelocationError('other') - -RelocationBatchError._too_many_write_operations_validator = bv.Void() -RelocationBatchError._tagmap = { - 'too_many_write_operations': RelocationBatchError._too_many_write_operations_validator, -} -RelocationBatchError._tagmap.update(RelocationError._tagmap) - -RelocationBatchError.too_many_write_operations = RelocationBatchError('too_many_write_operations') - -RelocationBatchJobStatus._complete_validator = RelocationBatchResult_validator -RelocationBatchJobStatus._failed_validator = RelocationBatchError_validator -RelocationBatchJobStatus._tagmap = { - 'complete': RelocationBatchJobStatus._complete_validator, - 'failed': RelocationBatchJobStatus._failed_validator, -} -RelocationBatchJobStatus._tagmap.update(async.PollResultBase._tagmap) - -RelocationBatchLaunch._complete_validator = RelocationBatchResult_validator -RelocationBatchLaunch._other_validator = bv.Void() -RelocationBatchLaunch._tagmap = { - 'complete': RelocationBatchLaunch._complete_validator, - 'other': RelocationBatchLaunch._other_validator, -} -RelocationBatchLaunch._tagmap.update(async.LaunchResultBase._tagmap) - -RelocationBatchLaunch.other = RelocationBatchLaunch('other') - -RelocationBatchResult._entries_validator = bv.List(RelocationBatchResultData_validator) -RelocationBatchResult._all_field_names_ = FileOpsResult._all_field_names_.union(set(['entries'])) -RelocationBatchResult._all_fields_ = FileOpsResult._all_fields_ + [('entries', RelocationBatchResult._entries_validator)] - -RelocationBatchResultData._metadata_validator = Metadata_validator -RelocationBatchResultData._all_field_names_ = set(['metadata']) -RelocationBatchResultData._all_fields_ = [('metadata', RelocationBatchResultData._metadata_validator)] - -RelocationResult._metadata_validator = Metadata_validator -RelocationResult._all_field_names_ = FileOpsResult._all_field_names_.union(set(['metadata'])) -RelocationResult._all_fields_ = FileOpsResult._all_fields_ + [('metadata', RelocationResult._metadata_validator)] - -RestoreArg._path_validator = WritePath_validator -RestoreArg._rev_validator = Rev_validator -RestoreArg._all_field_names_ = set([ - 'path', - 'rev', -]) -RestoreArg._all_fields_ = [ - ('path', RestoreArg._path_validator), - ('rev', RestoreArg._rev_validator), -] - -RestoreError._path_lookup_validator = LookupError_validator -RestoreError._path_write_validator = WriteError_validator -RestoreError._invalid_revision_validator = bv.Void() -RestoreError._other_validator = bv.Void() -RestoreError._tagmap = { - 'path_lookup': RestoreError._path_lookup_validator, - 'path_write': RestoreError._path_write_validator, - 'invalid_revision': RestoreError._invalid_revision_validator, - 'other': RestoreError._other_validator, -} - -RestoreError.invalid_revision = RestoreError('invalid_revision') -RestoreError.other = RestoreError('other') - -SaveCopyReferenceArg._copy_reference_validator = bv.String() -SaveCopyReferenceArg._path_validator = Path_validator -SaveCopyReferenceArg._all_field_names_ = set([ - 'copy_reference', - 'path', -]) -SaveCopyReferenceArg._all_fields_ = [ - ('copy_reference', SaveCopyReferenceArg._copy_reference_validator), - ('path', SaveCopyReferenceArg._path_validator), -] - -SaveCopyReferenceError._path_validator = WriteError_validator -SaveCopyReferenceError._invalid_copy_reference_validator = bv.Void() -SaveCopyReferenceError._no_permission_validator = bv.Void() -SaveCopyReferenceError._not_found_validator = bv.Void() -SaveCopyReferenceError._too_many_files_validator = bv.Void() -SaveCopyReferenceError._other_validator = bv.Void() -SaveCopyReferenceError._tagmap = { - 'path': SaveCopyReferenceError._path_validator, - 'invalid_copy_reference': SaveCopyReferenceError._invalid_copy_reference_validator, - 'no_permission': SaveCopyReferenceError._no_permission_validator, - 'not_found': SaveCopyReferenceError._not_found_validator, - 'too_many_files': SaveCopyReferenceError._too_many_files_validator, - 'other': SaveCopyReferenceError._other_validator, -} - -SaveCopyReferenceError.invalid_copy_reference = SaveCopyReferenceError('invalid_copy_reference') -SaveCopyReferenceError.no_permission = SaveCopyReferenceError('no_permission') -SaveCopyReferenceError.not_found = SaveCopyReferenceError('not_found') -SaveCopyReferenceError.too_many_files = SaveCopyReferenceError('too_many_files') -SaveCopyReferenceError.other = SaveCopyReferenceError('other') - -SaveCopyReferenceResult._metadata_validator = Metadata_validator -SaveCopyReferenceResult._all_field_names_ = set(['metadata']) -SaveCopyReferenceResult._all_fields_ = [('metadata', SaveCopyReferenceResult._metadata_validator)] - -SaveUrlArg._path_validator = Path_validator -SaveUrlArg._url_validator = bv.String() -SaveUrlArg._all_field_names_ = set([ - 'path', - 'url', -]) -SaveUrlArg._all_fields_ = [ - ('path', SaveUrlArg._path_validator), - ('url', SaveUrlArg._url_validator), -] - -SaveUrlError._path_validator = WriteError_validator -SaveUrlError._download_failed_validator = bv.Void() -SaveUrlError._invalid_url_validator = bv.Void() -SaveUrlError._not_found_validator = bv.Void() -SaveUrlError._other_validator = bv.Void() -SaveUrlError._tagmap = { - 'path': SaveUrlError._path_validator, - 'download_failed': SaveUrlError._download_failed_validator, - 'invalid_url': SaveUrlError._invalid_url_validator, - 'not_found': SaveUrlError._not_found_validator, - 'other': SaveUrlError._other_validator, -} - -SaveUrlError.download_failed = SaveUrlError('download_failed') -SaveUrlError.invalid_url = SaveUrlError('invalid_url') -SaveUrlError.not_found = SaveUrlError('not_found') -SaveUrlError.other = SaveUrlError('other') - -SaveUrlJobStatus._complete_validator = FileMetadata_validator -SaveUrlJobStatus._failed_validator = SaveUrlError_validator -SaveUrlJobStatus._tagmap = { - 'complete': SaveUrlJobStatus._complete_validator, - 'failed': SaveUrlJobStatus._failed_validator, -} -SaveUrlJobStatus._tagmap.update(async.PollResultBase._tagmap) - -SaveUrlResult._complete_validator = FileMetadata_validator -SaveUrlResult._tagmap = { - 'complete': SaveUrlResult._complete_validator, -} -SaveUrlResult._tagmap.update(async.LaunchResultBase._tagmap) - -SearchArg._path_validator = PathROrId_validator -SearchArg._query_validator = bv.String() -SearchArg._start_validator = bv.UInt64() -SearchArg._max_results_validator = bv.UInt64(min_value=1, max_value=1000) -SearchArg._mode_validator = SearchMode_validator -SearchArg._all_field_names_ = set([ - 'path', - 'query', - 'start', - 'max_results', - 'mode', -]) -SearchArg._all_fields_ = [ - ('path', SearchArg._path_validator), - ('query', SearchArg._query_validator), - ('start', SearchArg._start_validator), - ('max_results', SearchArg._max_results_validator), - ('mode', SearchArg._mode_validator), -] - -SearchError._path_validator = LookupError_validator -SearchError._other_validator = bv.Void() -SearchError._tagmap = { - 'path': SearchError._path_validator, - 'other': SearchError._other_validator, -} - -SearchError.other = SearchError('other') - -SearchMatch._match_type_validator = SearchMatchType_validator -SearchMatch._metadata_validator = Metadata_validator -SearchMatch._all_field_names_ = set([ - 'match_type', - 'metadata', -]) -SearchMatch._all_fields_ = [ - ('match_type', SearchMatch._match_type_validator), - ('metadata', SearchMatch._metadata_validator), -] - -SearchMatchType._filename_validator = bv.Void() -SearchMatchType._content_validator = bv.Void() -SearchMatchType._both_validator = bv.Void() -SearchMatchType._tagmap = { - 'filename': SearchMatchType._filename_validator, - 'content': SearchMatchType._content_validator, - 'both': SearchMatchType._both_validator, -} - -SearchMatchType.filename = SearchMatchType('filename') -SearchMatchType.content = SearchMatchType('content') -SearchMatchType.both = SearchMatchType('both') - -SearchMode._filename_validator = bv.Void() -SearchMode._filename_and_content_validator = bv.Void() -SearchMode._deleted_filename_validator = bv.Void() -SearchMode._tagmap = { - 'filename': SearchMode._filename_validator, - 'filename_and_content': SearchMode._filename_and_content_validator, - 'deleted_filename': SearchMode._deleted_filename_validator, -} - -SearchMode.filename = SearchMode('filename') -SearchMode.filename_and_content = SearchMode('filename_and_content') -SearchMode.deleted_filename = SearchMode('deleted_filename') - -SearchResult._matches_validator = bv.List(SearchMatch_validator) -SearchResult._more_validator = bv.Boolean() -SearchResult._start_validator = bv.UInt64() -SearchResult._all_field_names_ = set([ - 'matches', - 'more', - 'start', -]) -SearchResult._all_fields_ = [ - ('matches', SearchResult._matches_validator), - ('more', SearchResult._more_validator), - ('start', SearchResult._start_validator), -] - -SharedLink._url_validator = SharedLinkUrl_validator -SharedLink._password_validator = bv.Nullable(bv.String()) -SharedLink._all_field_names_ = set([ - 'url', - 'password', -]) -SharedLink._all_fields_ = [ - ('url', SharedLink._url_validator), - ('password', SharedLink._password_validator), -] - -ThumbnailArg._path_validator = ReadPath_validator -ThumbnailArg._format_validator = ThumbnailFormat_validator -ThumbnailArg._size_validator = ThumbnailSize_validator -ThumbnailArg._all_field_names_ = set([ - 'path', - 'format', - 'size', -]) -ThumbnailArg._all_fields_ = [ - ('path', ThumbnailArg._path_validator), - ('format', ThumbnailArg._format_validator), - ('size', ThumbnailArg._size_validator), -] - -ThumbnailError._path_validator = LookupError_validator -ThumbnailError._unsupported_extension_validator = bv.Void() -ThumbnailError._unsupported_image_validator = bv.Void() -ThumbnailError._conversion_error_validator = bv.Void() -ThumbnailError._tagmap = { - 'path': ThumbnailError._path_validator, - 'unsupported_extension': ThumbnailError._unsupported_extension_validator, - 'unsupported_image': ThumbnailError._unsupported_image_validator, - 'conversion_error': ThumbnailError._conversion_error_validator, -} - -ThumbnailError.unsupported_extension = ThumbnailError('unsupported_extension') -ThumbnailError.unsupported_image = ThumbnailError('unsupported_image') -ThumbnailError.conversion_error = ThumbnailError('conversion_error') - -ThumbnailFormat._jpeg_validator = bv.Void() -ThumbnailFormat._png_validator = bv.Void() -ThumbnailFormat._tagmap = { - 'jpeg': ThumbnailFormat._jpeg_validator, - 'png': ThumbnailFormat._png_validator, -} - -ThumbnailFormat.jpeg = ThumbnailFormat('jpeg') -ThumbnailFormat.png = ThumbnailFormat('png') - -ThumbnailSize._w32h32_validator = bv.Void() -ThumbnailSize._w64h64_validator = bv.Void() -ThumbnailSize._w128h128_validator = bv.Void() -ThumbnailSize._w640h480_validator = bv.Void() -ThumbnailSize._w1024h768_validator = bv.Void() -ThumbnailSize._tagmap = { - 'w32h32': ThumbnailSize._w32h32_validator, - 'w64h64': ThumbnailSize._w64h64_validator, - 'w128h128': ThumbnailSize._w128h128_validator, - 'w640h480': ThumbnailSize._w640h480_validator, - 'w1024h768': ThumbnailSize._w1024h768_validator, -} - -ThumbnailSize.w32h32 = ThumbnailSize('w32h32') -ThumbnailSize.w64h64 = ThumbnailSize('w64h64') -ThumbnailSize.w128h128 = ThumbnailSize('w128h128') -ThumbnailSize.w640h480 = ThumbnailSize('w640h480') -ThumbnailSize.w1024h768 = ThumbnailSize('w1024h768') - -UploadError._path_validator = UploadWriteFailed_validator -UploadError._other_validator = bv.Void() -UploadError._tagmap = { - 'path': UploadError._path_validator, - 'other': UploadError._other_validator, -} - -UploadError.other = UploadError('other') - -UploadErrorWithProperties._properties_error_validator = file_properties.InvalidPropertyGroupError_validator -UploadErrorWithProperties._tagmap = { - 'properties_error': UploadErrorWithProperties._properties_error_validator, -} -UploadErrorWithProperties._tagmap.update(UploadError._tagmap) - -UploadSessionAppendArg._cursor_validator = UploadSessionCursor_validator -UploadSessionAppendArg._close_validator = bv.Boolean() -UploadSessionAppendArg._all_field_names_ = set([ - 'cursor', - 'close', -]) -UploadSessionAppendArg._all_fields_ = [ - ('cursor', UploadSessionAppendArg._cursor_validator), - ('close', UploadSessionAppendArg._close_validator), -] - -UploadSessionCursor._session_id_validator = bv.String() -UploadSessionCursor._offset_validator = bv.UInt64() -UploadSessionCursor._all_field_names_ = set([ - 'session_id', - 'offset', -]) -UploadSessionCursor._all_fields_ = [ - ('session_id', UploadSessionCursor._session_id_validator), - ('offset', UploadSessionCursor._offset_validator), -] - -UploadSessionFinishArg._cursor_validator = UploadSessionCursor_validator -UploadSessionFinishArg._commit_validator = CommitInfo_validator -UploadSessionFinishArg._all_field_names_ = set([ - 'cursor', - 'commit', -]) -UploadSessionFinishArg._all_fields_ = [ - ('cursor', UploadSessionFinishArg._cursor_validator), - ('commit', UploadSessionFinishArg._commit_validator), -] - -UploadSessionFinishBatchArg._entries_validator = bv.List(UploadSessionFinishArg_validator, max_items=1000) -UploadSessionFinishBatchArg._all_field_names_ = set(['entries']) -UploadSessionFinishBatchArg._all_fields_ = [('entries', UploadSessionFinishBatchArg._entries_validator)] - -UploadSessionFinishBatchJobStatus._complete_validator = UploadSessionFinishBatchResult_validator -UploadSessionFinishBatchJobStatus._tagmap = { - 'complete': UploadSessionFinishBatchJobStatus._complete_validator, -} -UploadSessionFinishBatchJobStatus._tagmap.update(async.PollResultBase._tagmap) - -UploadSessionFinishBatchLaunch._complete_validator = UploadSessionFinishBatchResult_validator -UploadSessionFinishBatchLaunch._other_validator = bv.Void() -UploadSessionFinishBatchLaunch._tagmap = { - 'complete': UploadSessionFinishBatchLaunch._complete_validator, - 'other': UploadSessionFinishBatchLaunch._other_validator, -} -UploadSessionFinishBatchLaunch._tagmap.update(async.LaunchResultBase._tagmap) - -UploadSessionFinishBatchLaunch.other = UploadSessionFinishBatchLaunch('other') - -UploadSessionFinishBatchResult._entries_validator = bv.List(UploadSessionFinishBatchResultEntry_validator) -UploadSessionFinishBatchResult._all_field_names_ = set(['entries']) -UploadSessionFinishBatchResult._all_fields_ = [('entries', UploadSessionFinishBatchResult._entries_validator)] - -UploadSessionFinishBatchResultEntry._success_validator = FileMetadata_validator -UploadSessionFinishBatchResultEntry._failure_validator = UploadSessionFinishError_validator -UploadSessionFinishBatchResultEntry._tagmap = { - 'success': UploadSessionFinishBatchResultEntry._success_validator, - 'failure': UploadSessionFinishBatchResultEntry._failure_validator, -} - -UploadSessionFinishError._lookup_failed_validator = UploadSessionLookupError_validator -UploadSessionFinishError._path_validator = WriteError_validator -UploadSessionFinishError._too_many_shared_folder_targets_validator = bv.Void() -UploadSessionFinishError._too_many_write_operations_validator = bv.Void() -UploadSessionFinishError._other_validator = bv.Void() -UploadSessionFinishError._tagmap = { - 'lookup_failed': UploadSessionFinishError._lookup_failed_validator, - 'path': UploadSessionFinishError._path_validator, - 'too_many_shared_folder_targets': UploadSessionFinishError._too_many_shared_folder_targets_validator, - 'too_many_write_operations': UploadSessionFinishError._too_many_write_operations_validator, - 'other': UploadSessionFinishError._other_validator, -} - -UploadSessionFinishError.too_many_shared_folder_targets = UploadSessionFinishError('too_many_shared_folder_targets') -UploadSessionFinishError.too_many_write_operations = UploadSessionFinishError('too_many_write_operations') -UploadSessionFinishError.other = UploadSessionFinishError('other') - -UploadSessionLookupError._not_found_validator = bv.Void() -UploadSessionLookupError._incorrect_offset_validator = UploadSessionOffsetError_validator -UploadSessionLookupError._closed_validator = bv.Void() -UploadSessionLookupError._not_closed_validator = bv.Void() -UploadSessionLookupError._other_validator = bv.Void() -UploadSessionLookupError._tagmap = { - 'not_found': UploadSessionLookupError._not_found_validator, - 'incorrect_offset': UploadSessionLookupError._incorrect_offset_validator, - 'closed': UploadSessionLookupError._closed_validator, - 'not_closed': UploadSessionLookupError._not_closed_validator, - 'other': UploadSessionLookupError._other_validator, -} - -UploadSessionLookupError.not_found = UploadSessionLookupError('not_found') -UploadSessionLookupError.closed = UploadSessionLookupError('closed') -UploadSessionLookupError.not_closed = UploadSessionLookupError('not_closed') -UploadSessionLookupError.other = UploadSessionLookupError('other') - -UploadSessionOffsetError._correct_offset_validator = bv.UInt64() -UploadSessionOffsetError._all_field_names_ = set(['correct_offset']) -UploadSessionOffsetError._all_fields_ = [('correct_offset', UploadSessionOffsetError._correct_offset_validator)] - -UploadSessionStartArg._close_validator = bv.Boolean() -UploadSessionStartArg._all_field_names_ = set(['close']) -UploadSessionStartArg._all_fields_ = [('close', UploadSessionStartArg._close_validator)] - -UploadSessionStartResult._session_id_validator = bv.String() -UploadSessionStartResult._all_field_names_ = set(['session_id']) -UploadSessionStartResult._all_fields_ = [('session_id', UploadSessionStartResult._session_id_validator)] - -UploadWriteFailed._reason_validator = WriteError_validator -UploadWriteFailed._upload_session_id_validator = bv.String() -UploadWriteFailed._all_field_names_ = set([ - 'reason', - 'upload_session_id', -]) -UploadWriteFailed._all_fields_ = [ - ('reason', UploadWriteFailed._reason_validator), - ('upload_session_id', UploadWriteFailed._upload_session_id_validator), -] - -VideoMetadata._duration_validator = bv.Nullable(bv.UInt64()) -VideoMetadata._field_names_ = set(['duration']) -VideoMetadata._all_field_names_ = MediaMetadata._all_field_names_.union(VideoMetadata._field_names_) -VideoMetadata._fields_ = [('duration', VideoMetadata._duration_validator)] -VideoMetadata._all_fields_ = MediaMetadata._all_fields_ + VideoMetadata._fields_ - -WriteConflictError._file_validator = bv.Void() -WriteConflictError._folder_validator = bv.Void() -WriteConflictError._file_ancestor_validator = bv.Void() -WriteConflictError._other_validator = bv.Void() -WriteConflictError._tagmap = { - 'file': WriteConflictError._file_validator, - 'folder': WriteConflictError._folder_validator, - 'file_ancestor': WriteConflictError._file_ancestor_validator, - 'other': WriteConflictError._other_validator, -} - -WriteConflictError.file = WriteConflictError('file') -WriteConflictError.folder = WriteConflictError('folder') -WriteConflictError.file_ancestor = WriteConflictError('file_ancestor') -WriteConflictError.other = WriteConflictError('other') - -WriteError._malformed_path_validator = MalformedPathError_validator -WriteError._conflict_validator = WriteConflictError_validator -WriteError._no_write_permission_validator = bv.Void() -WriteError._insufficient_space_validator = bv.Void() -WriteError._disallowed_name_validator = bv.Void() -WriteError._team_folder_validator = bv.Void() -WriteError._other_validator = bv.Void() -WriteError._tagmap = { - 'malformed_path': WriteError._malformed_path_validator, - 'conflict': WriteError._conflict_validator, - 'no_write_permission': WriteError._no_write_permission_validator, - 'insufficient_space': WriteError._insufficient_space_validator, - 'disallowed_name': WriteError._disallowed_name_validator, - 'team_folder': WriteError._team_folder_validator, - 'other': WriteError._other_validator, -} - -WriteError.no_write_permission = WriteError('no_write_permission') -WriteError.insufficient_space = WriteError('insufficient_space') -WriteError.disallowed_name = WriteError('disallowed_name') -WriteError.team_folder = WriteError('team_folder') -WriteError.other = WriteError('other') - -WriteMode._add_validator = bv.Void() -WriteMode._overwrite_validator = bv.Void() -WriteMode._update_validator = Rev_validator -WriteMode._tagmap = { - 'add': WriteMode._add_validator, - 'overwrite': WriteMode._overwrite_validator, - 'update': WriteMode._update_validator, -} - -WriteMode.add = WriteMode('add') -WriteMode.overwrite = WriteMode('overwrite') - -alpha_get_metadata = bb.Route( - 'alpha/get_metadata', - False, - AlphaGetMetadataArg_validator, - Metadata_validator, - AlphaGetMetadataError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -alpha_upload = bb.Route( - 'alpha/upload', - False, - CommitInfoWithProperties_validator, - FileMetadata_validator, - UploadErrorWithProperties_validator, - {'host': u'content', - 'style': u'upload'}, -) -copy = bb.Route( - 'copy', - True, - RelocationArg_validator, - Metadata_validator, - RelocationError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -copy_batch = bb.Route( - 'copy_batch', - False, - RelocationBatchArg_validator, - RelocationBatchLaunch_validator, - bv.Void(), - {'host': u'api', - 'style': u'rpc'}, -) -copy_batch_check = bb.Route( - 'copy_batch/check', - False, - async.PollArg_validator, - RelocationBatchJobStatus_validator, - async.PollError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -copy_reference_get = bb.Route( - 'copy_reference/get', - False, - GetCopyReferenceArg_validator, - GetCopyReferenceResult_validator, - GetCopyReferenceError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -copy_reference_save = bb.Route( - 'copy_reference/save', - False, - SaveCopyReferenceArg_validator, - SaveCopyReferenceResult_validator, - SaveCopyReferenceError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -copy_v2 = bb.Route( - 'copy_v2', - False, - RelocationArg_validator, - RelocationResult_validator, - RelocationError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -create_folder = bb.Route( - 'create_folder', - True, - CreateFolderArg_validator, - FolderMetadata_validator, - CreateFolderError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -create_folder_v2 = bb.Route( - 'create_folder_v2', - False, - CreateFolderArg_validator, - CreateFolderResult_validator, - CreateFolderError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -delete = bb.Route( - 'delete', - True, - DeleteArg_validator, - Metadata_validator, - DeleteError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -delete_batch = bb.Route( - 'delete_batch', - False, - DeleteBatchArg_validator, - DeleteBatchLaunch_validator, - bv.Void(), - {'host': u'api', - 'style': u'rpc'}, -) -delete_batch_check = bb.Route( - 'delete_batch/check', - False, - async.PollArg_validator, - DeleteBatchJobStatus_validator, - async.PollError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -delete_v2 = bb.Route( - 'delete_v2', - False, - DeleteArg_validator, - DeleteResult_validator, - DeleteError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -download = bb.Route( - 'download', - False, - DownloadArg_validator, - FileMetadata_validator, - DownloadError_validator, - {'host': u'content', - 'style': u'download'}, -) -get_metadata = bb.Route( - 'get_metadata', - False, - GetMetadataArg_validator, - Metadata_validator, - GetMetadataError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -get_preview = bb.Route( - 'get_preview', - False, - PreviewArg_validator, - FileMetadata_validator, - PreviewError_validator, - {'host': u'content', - 'style': u'download'}, -) -get_temporary_link = bb.Route( - 'get_temporary_link', - False, - GetTemporaryLinkArg_validator, - GetTemporaryLinkResult_validator, - GetTemporaryLinkError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -get_thumbnail = bb.Route( - 'get_thumbnail', - False, - ThumbnailArg_validator, - FileMetadata_validator, - ThumbnailError_validator, - {'host': u'content', - 'style': u'download'}, -) -get_thumbnail_batch = bb.Route( - 'get_thumbnail_batch', - False, - GetThumbnailBatchArg_validator, - GetThumbnailBatchResult_validator, - GetThumbnailBatchError_validator, - {'host': u'content', - 'style': u'rpc'}, -) -list_folder = bb.Route( - 'list_folder', - False, - ListFolderArg_validator, - ListFolderResult_validator, - ListFolderError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -list_folder_continue = bb.Route( - 'list_folder/continue', - False, - ListFolderContinueArg_validator, - ListFolderResult_validator, - ListFolderContinueError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -list_folder_get_latest_cursor = bb.Route( - 'list_folder/get_latest_cursor', - False, - ListFolderArg_validator, - ListFolderGetLatestCursorResult_validator, - ListFolderError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -list_folder_longpoll = bb.Route( - 'list_folder/longpoll', - False, - ListFolderLongpollArg_validator, - ListFolderLongpollResult_validator, - ListFolderLongpollError_validator, - {'host': u'notify', - 'style': u'rpc'}, -) -list_revisions = bb.Route( - 'list_revisions', - False, - ListRevisionsArg_validator, - ListRevisionsResult_validator, - ListRevisionsError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -move = bb.Route( - 'move', - True, - RelocationArg_validator, - Metadata_validator, - RelocationError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -move_batch = bb.Route( - 'move_batch', - False, - RelocationBatchArg_validator, - RelocationBatchLaunch_validator, - bv.Void(), - {'host': u'api', - 'style': u'rpc'}, -) -move_batch_check = bb.Route( - 'move_batch/check', - False, - async.PollArg_validator, - RelocationBatchJobStatus_validator, - async.PollError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -move_v2 = bb.Route( - 'move_v2', - False, - RelocationArg_validator, - RelocationResult_validator, - RelocationError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -permanently_delete = bb.Route( - 'permanently_delete', - False, - DeleteArg_validator, - bv.Void(), - DeleteError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -properties_add = bb.Route( - 'properties/add', - True, - file_properties.AddPropertiesArg_validator, - bv.Void(), - file_properties.AddPropertiesError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -properties_overwrite = bb.Route( - 'properties/overwrite', - True, - file_properties.OverwritePropertyGroupArg_validator, - bv.Void(), - file_properties.InvalidPropertyGroupError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -properties_remove = bb.Route( - 'properties/remove', - True, - file_properties.RemovePropertiesArg_validator, - bv.Void(), - file_properties.RemovePropertiesError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -properties_template_get = bb.Route( - 'properties/template/get', - True, - file_properties.GetTemplateArg_validator, - file_properties.GetTemplateResult_validator, - file_properties.TemplateError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -properties_template_list = bb.Route( - 'properties/template/list', - True, - bv.Void(), - file_properties.ListTemplateResult_validator, - file_properties.TemplateError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -properties_update = bb.Route( - 'properties/update', - True, - file_properties.UpdatePropertiesArg_validator, - bv.Void(), - file_properties.UpdatePropertiesError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -restore = bb.Route( - 'restore', - False, - RestoreArg_validator, - FileMetadata_validator, - RestoreError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -save_url = bb.Route( - 'save_url', - False, - SaveUrlArg_validator, - SaveUrlResult_validator, - SaveUrlError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -save_url_check_job_status = bb.Route( - 'save_url/check_job_status', - False, - async.PollArg_validator, - SaveUrlJobStatus_validator, - async.PollError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -search = bb.Route( - 'search', - False, - SearchArg_validator, - SearchResult_validator, - SearchError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -upload = bb.Route( - 'upload', - False, - CommitInfo_validator, - FileMetadata_validator, - UploadError_validator, - {'host': u'content', - 'style': u'upload'}, -) -upload_session_append = bb.Route( - 'upload_session/append', - True, - UploadSessionCursor_validator, - bv.Void(), - UploadSessionLookupError_validator, - {'host': u'content', - 'style': u'upload'}, -) -upload_session_append_v2 = bb.Route( - 'upload_session/append_v2', - False, - UploadSessionAppendArg_validator, - bv.Void(), - UploadSessionLookupError_validator, - {'host': u'content', - 'style': u'upload'}, -) -upload_session_finish = bb.Route( - 'upload_session/finish', - False, - UploadSessionFinishArg_validator, - FileMetadata_validator, - UploadSessionFinishError_validator, - {'host': u'content', - 'style': u'upload'}, -) -upload_session_finish_batch = bb.Route( - 'upload_session/finish_batch', - False, - UploadSessionFinishBatchArg_validator, - UploadSessionFinishBatchLaunch_validator, - bv.Void(), - {'host': u'api', - 'style': u'rpc'}, -) -upload_session_finish_batch_check = bb.Route( - 'upload_session/finish_batch/check', - False, - async.PollArg_validator, - UploadSessionFinishBatchJobStatus_validator, - async.PollError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -upload_session_start = bb.Route( - 'upload_session/start', - False, - UploadSessionStartArg_validator, - UploadSessionStartResult_validator, - bv.Void(), - {'host': u'content', - 'style': u'upload'}, -) - -ROUTES = { - 'alpha/get_metadata': alpha_get_metadata, - 'alpha/upload': alpha_upload, - 'copy': copy, - 'copy_batch': copy_batch, - 'copy_batch/check': copy_batch_check, - 'copy_reference/get': copy_reference_get, - 'copy_reference/save': copy_reference_save, - 'copy_v2': copy_v2, - 'create_folder': create_folder, - 'create_folder_v2': create_folder_v2, - 'delete': delete, - 'delete_batch': delete_batch, - 'delete_batch/check': delete_batch_check, - 'delete_v2': delete_v2, - 'download': download, - 'get_metadata': get_metadata, - 'get_preview': get_preview, - 'get_temporary_link': get_temporary_link, - 'get_thumbnail': get_thumbnail, - 'get_thumbnail_batch': get_thumbnail_batch, - 'list_folder': list_folder, - 'list_folder/continue': list_folder_continue, - 'list_folder/get_latest_cursor': list_folder_get_latest_cursor, - 'list_folder/longpoll': list_folder_longpoll, - 'list_revisions': list_revisions, - 'move': move, - 'move_batch': move_batch, - 'move_batch/check': move_batch_check, - 'move_v2': move_v2, - 'permanently_delete': permanently_delete, - 'properties/add': properties_add, - 'properties/overwrite': properties_overwrite, - 'properties/remove': properties_remove, - 'properties/template/get': properties_template_get, - 'properties/template/list': properties_template_list, - 'properties/update': properties_update, - 'restore': restore, - 'save_url': save_url, - 'save_url/check_job_status': save_url_check_job_status, - 'search': search, - 'upload': upload, - 'upload_session/append': upload_session_append, - 'upload_session/append_v2': upload_session_append_v2, - 'upload_session/finish': upload_session_finish, - 'upload_session/finish_batch': upload_session_finish_batch, - 'upload_session/finish_batch/check': upload_session_finish_batch_check, - 'upload_session/start': upload_session_start, -} - diff --git a/resources/lib/dropbox/oauth.py b/resources/lib/dropbox/oauth.py deleted file mode 100644 index c51f870..0000000 --- a/resources/lib/dropbox/oauth.py +++ /dev/null @@ -1,515 +0,0 @@ -__all__ = [ - 'BadRequestException', - 'BadStateException', - 'CsrfException', - 'DropboxOAuth2Flow', - 'DropboxOAuth2FlowNoRedirect', - 'NotApprovedException', - 'OAuth2FlowNoRedirectResult', - 'OAuth2FlowResult', - 'ProviderException', -] - -import base64 -import os -import six -import urllib - -from .session import ( - API_HOST, - WEB_HOST, - pinned_session, -) - -if six.PY3: - url_path_quote = urllib.parse.quote # pylint: disable=no-member,useless-suppression - url_encode = urllib.parse.urlencode # pylint: disable=no-member,useless-suppression -else: - url_path_quote = urllib.quote # pylint: disable=no-member,useless-suppression - url_encode = urllib.urlencode # pylint: disable=no-member,useless-suppression - - -class OAuth2FlowNoRedirectResult(object): - """ - Authorization information for an OAuth2Flow performed with no redirect. - """ - - def __init__(self, access_token, account_id, user_id): - """ - Args: - access_token (str): Token to be used to authenticate later - requests. - account_id (str): The Dropbox user's account ID. - user_id (str): Deprecated (use account_id instead). - """ - self.access_token = access_token - self.account_id = account_id - self.user_id = user_id - - def __repr__(self): - return 'OAuth2FlowNoRedirectResult(%r, %r, %r)' % ( - self.access_token, - self.account_id, - self.user_id, - ) - - -class OAuth2FlowResult(OAuth2FlowNoRedirectResult): - """ - Authorization information for an OAuth2Flow with redirect. - """ - - def __init__(self, access_token, account_id, user_id, url_state): - """ - Same as OAuth2FlowNoRedirectResult but with url_state. - - Args: - url_state (str): The url state that was set by - :meth:`DropboxOAuth2Flow.start`. - """ - super(OAuth2FlowResult, self).__init__( - access_token, account_id, user_id) - self.url_state = url_state - - @classmethod - def from_no_redirect_result(cls, result, url_state): - assert isinstance(result, OAuth2FlowNoRedirectResult) - return cls( - result.access_token, result.account_id, result.user_id, url_state) - - def __repr__(self): - return 'OAuth2FlowResult(%r, %r, %r, %r)' % ( - self.access_token, - self.account_id, - self.user_id, - self.url_state, - ) - - -class DropboxOAuth2FlowBase(object): - - def __init__(self, consumer_key, consumer_secret, locale=None): - self.consumer_key = consumer_key - self.consumer_secret = consumer_secret - self.locale = locale - self.requests_session = pinned_session() - - def _get_authorize_url(self, redirect_uri, state): - params = dict(response_type='code', - client_id=self.consumer_key) - if redirect_uri is not None: - params['redirect_uri'] = redirect_uri - if state is not None: - params['state'] = state - - return self.build_url('/oauth2/authorize', params, WEB_HOST) - - def _finish(self, code, redirect_uri): - url = self.build_url('/oauth2/token') - params = {'grant_type': 'authorization_code', - 'code': code, - 'client_id': self.consumer_key, - 'client_secret': self.consumer_secret, - } - if self.locale is not None: - params['locale'] = self.locale - if redirect_uri is not None: - params['redirect_uri'] = redirect_uri - - resp = self.requests_session.post(url, data=params) - resp.raise_for_status() - - d = resp.json() - - if 'team_id' in d: - account_id = d['team_id'] - else: - account_id = d['account_id'] - - access_token = d['access_token'] - uid = d['uid'] - - return OAuth2FlowNoRedirectResult( - access_token, - account_id, - uid) - - def build_path(self, target, params=None): - """Build the path component for an API URL. - - This method urlencodes the parameters, adds them - to the end of the target url, and puts a marker for the API - version in front. - - :param str target: A target url (e.g. '/files') to build upon. - :param dict params: Optional dictionary of parameters (name to value). - :return: The path and parameters components of an API URL. - :rtype: str - """ - if six.PY2 and isinstance(target, six.text_type): - target = target.encode('utf8') - - target_path = url_path_quote(target) - - params = params or {} - params = params.copy() - - if self.locale: - params['locale'] = self.locale - - if params: - query_string = _params_to_urlencoded(params) - return "%s?%s" % (target_path, query_string) - else: - return target_path - - def build_url(self, target, params=None, host=API_HOST): - """Build an API URL. - - This method adds scheme and hostname to the path - returned from build_path. - - :param str target: A target url (e.g. '/files') to build upon. - :param dict params: Optional dictionary of parameters (name to value). - :return: The full API URL. - :rtype: str - """ - return "https://%s%s" % (host, self.build_path(target, params)) - - -class DropboxOAuth2FlowNoRedirect(DropboxOAuth2FlowBase): - """ - OAuth 2 authorization helper for apps that can't provide a redirect URI - (such as the command-line example apps). - - Example:: - - from dropbox import DropboxOAuth2FlowNoRedirect - - auth_flow = DropboxOAuth2FlowNoRedirect(APP_KEY, APP_SECRET) - - authorize_url = auth_flow.start() - print "1. Go to: " + authorize_url - print "2. Click \\"Allow\\" (you might have to log in first)." - print "3. Copy the authorization code." - auth_code = raw_input("Enter the authorization code here: ").strip() - - try: - oauth_result = auth_flow.finish(auth_code) - except Exception, e: - print('Error: %s' % (e,)) - return - - dbx = Dropbox(oauth_result.access_token) - """ - - def __init__(self, consumer_key, consumer_secret, locale=None): # noqa: E501; pylint: disable=useless-super-delegation - """ - Construct an instance. - - Parameters - :param str consumer_key: Your API app's "app key". - :param str consumer_secret: Your API app's "app secret". - :param str locale: The locale of the user of your application. For - example "en" or "en_US". Some API calls return localized data and - error messages; this setting tells the server which locale to use. - By default, the server uses "en_US". - """ - # pylint: disable=useless-super-delegation - super(DropboxOAuth2FlowNoRedirect, self).__init__( - consumer_key, - consumer_secret, - locale, - ) - - def start(self): - """ - Starts the OAuth 2 authorization process. - - :return: The URL for a page on Dropbox's website. This page will let - the user "approve" your app, which gives your app permission to - access the user's Dropbox account. Tell the user to visit this URL - and approve your app. - """ - return self._get_authorize_url(None, None) - - def finish(self, code): - """ - If the user approves your app, they will be presented with an - "authorization code". Have the user copy/paste that authorization code - into your app and then call this method to get an access token. - - :param str code: The authorization code shown to the user when they - approved your app. - :rtype: OAuth2FlowNoRedirectResult - :raises: The same exceptions as :meth:`DropboxOAuth2Flow.finish()`. - """ - return self._finish(code, None) - - -class DropboxOAuth2Flow(DropboxOAuth2FlowBase): - """ - OAuth 2 authorization helper. Use this for web apps. - - OAuth 2 has a two-step authorization process. The first step is having the - user authorize your app. The second involves getting an OAuth 2 access - token from Dropbox. - - Example:: - - from dropbox import DropboxOAuth2Flow - - def get_dropbox_auth_flow(web_app_session): - redirect_uri = "https://my-web-server.org/dropbox-auth-finish" - return DropboxOAuth2Flow( - APP_KEY, APP_SECRET, redirect_uri, web_app_session, - "dropbox-auth-csrf-token") - - # URL handler for /dropbox-auth-start - def dropbox_auth_start(web_app_session, request): - authorize_url = get_dropbox_auth_flow(web_app_session).start() - redirect_to(authorize_url) - - # URL handler for /dropbox-auth-finish - def dropbox_auth_finish(web_app_session, request): - try: - oauth_result = \\ - get_dropbox_auth_flow(web_app_session).finish( - request.query_params) - except BadRequestException, e: - http_status(400) - except BadStateException, e: - # Start the auth flow again. - redirect_to("/dropbox-auth-start") - except CsrfException, e: - http_status(403) - except NotApprovedException, e: - flash('Not approved? Why not?') - return redirect_to("/home") - except ProviderException, e: - logger.log("Auth error: %s" % (e,)) - http_status(403) - - """ - - def __init__(self, consumer_key, consumer_secret, redirect_uri, session, - csrf_token_session_key, locale=None): - """ - Construct an instance. - - :param str consumer_key: Your API app's "app key". - :param str consumer_secret: Your API app's "app secret". - :param str redirect_uri: The URI that the Dropbox server will redirect - the user to after the user finishes authorizing your app. This URI - must be HTTPS-based and pre-registered with the Dropbox servers, - though localhost URIs are allowed without pre-registration and can - be either HTTP or HTTPS. - :param dict session: A dict-like object that represents the current - user's web session (will be used to save the CSRF token). - :param str csrf_token_session_key: The key to use when storing the CSRF - token in the session (for example: "dropbox-auth-csrf-token"). - :param str locale: The locale of the user of your application. For - example "en" or "en_US". Some API calls return localized data and - error messages; this setting tells the server which locale to use. - By default, the server uses "en_US". - """ - super(DropboxOAuth2Flow, self).__init__(consumer_key, consumer_secret, locale) - self.redirect_uri = redirect_uri - self.session = session - self.csrf_token_session_key = csrf_token_session_key - - def start(self, url_state=None): - """ - Starts the OAuth 2 authorization process. - - This function builds an "authorization URL". You should redirect your - user's browser to this URL, which will give them an opportunity to - grant your app access to their Dropbox account. When the user - completes this process, they will be automatically redirected to the - ``redirect_uri`` you passed in to the constructor. - - This function will also save a CSRF token to - ``session[csrf_token_session_key]`` (as provided to the constructor). - This CSRF token will be checked on :meth:`finish()` to prevent request - forgery. - - :param str url_state: Any data that you would like to keep in the URL - through the authorization process. This exact value will be - returned to you by :meth:`finish()`. - :return: The URL for a page on Dropbox's website. This page will let - the user "approve" your app, which gives your app permission to - access the user's Dropbox account. Tell the user to visit this URL - and approve your app. - """ - csrf_token = base64.urlsafe_b64encode(os.urandom(16)).decode('ascii') - state = csrf_token - if url_state is not None: - state += "|" + url_state - self.session[self.csrf_token_session_key] = csrf_token - - return self._get_authorize_url(self.redirect_uri, state) - - def finish(self, query_params): - """ - Call this after the user has visited the authorize URL (see - :meth:`start()`), approved your app and was redirected to your redirect - URI. - - :param dict query_params: The query parameters on the GET request to - your redirect URI. - :rtype: OAuth2FlowResult - :raises: :class:`BadRequestException` If the redirect URL was missing - parameters or if the given parameters were not valid. - :raises: :class:`BadStateException` If there's no CSRF token in the - session. - :raises: :class:`CsrfException` If the ``state`` query parameter - doesn't contain the CSRF token from the user's session. - :raises: :class:`NotApprovedException` If the user chose not to - approve your app. - :raises: :class:`ProviderException` If Dropbox redirected to your - redirect URI with some unexpected error identifier and error message. - """ - # Check well-formedness of request. - - state = query_params.get('state') - if state is None: - raise BadRequestException("Missing query parameter 'state'.") - - error = query_params.get('error') - error_description = query_params.get('error_description') - code = query_params.get('code') - - if error is not None and code is not None: - raise BadRequestException( - "Query parameters 'code' and 'error' are both set; " - "only one must be set.") - if error is None and code is None: - raise BadRequestException( - "Neither query parameter 'code' or 'error' is set.") - - # Check CSRF token - - if self.csrf_token_session_key not in self.session: - raise BadStateException('Missing CSRF token in session.') - csrf_token_from_session = self.session[self.csrf_token_session_key] - if len(csrf_token_from_session) <= 20: - raise AssertionError('CSRF token unexpectedly short: %r' % - csrf_token_from_session) - - split_pos = state.find('|') - if split_pos < 0: - given_csrf_token = state - url_state = None - else: - given_csrf_token = state[0:split_pos] - url_state = state[split_pos + 1:] - - if not _safe_equals(csrf_token_from_session, given_csrf_token): - raise CsrfException('expected %r, got %r' % - (csrf_token_from_session, given_csrf_token)) - - del self.session[self.csrf_token_session_key] - - # Check for error identifier - - if error is not None: - if error == 'access_denied': - # The user clicked "Deny" - if error_description is None: - raise NotApprovedException( - 'No additional description from Dropbox') - else: - raise NotApprovedException( - 'Additional description from Dropbox: %s' % - error_description) - else: - # All other errors - full_message = error - if error_description is not None: - full_message += ": " + error_description - raise ProviderException(full_message) - - # If everything went ok, make the network call to get an access token. - - no_redirect_result = self._finish(code, self.redirect_uri) - return OAuth2FlowResult.from_no_redirect_result( - no_redirect_result, url_state) - - -class BadRequestException(Exception): - """ - Thrown if the redirect URL was missing parameters or if the - given parameters were not valid. - - The recommended action is to show an HTTP 400 error page. - """ - pass - - -class BadStateException(Exception): - """ - Thrown if all the parameters are correct, but there's no CSRF token in the - session. This probably means that the session expired. - - The recommended action is to redirect the user's browser to try the - approval process again. - """ - pass - - -class CsrfException(Exception): - """ - Thrown if the given 'state' parameter doesn't contain the CSRF token from - the user's session. This is blocked to prevent CSRF attacks. - - The recommended action is to respond with an HTTP 403 error page. - """ - pass - - -class NotApprovedException(Exception): - """ - The user chose not to approve your app. - """ - pass - - -class ProviderException(Exception): - """ - Dropbox redirected to your redirect URI with some unexpected error - identifier and error message. - - The recommended action is to log the error, tell the user something went - wrong, and let them try again. - """ - pass - - -def _safe_equals(a, b): - if len(a) != len(b): - return False - res = 0 - for ca, cb in zip(a, b): - res |= ord(ca) ^ ord(cb) - return res == 0 - - -def _params_to_urlencoded(params): - """ - Returns a application/x-www-form-urlencoded ``str`` representing the - key/value pairs in ``params``. - - Keys are values are ``str()``'d before calling ``urllib.urlencode``, with - the exception of unicode objects which are utf8-encoded. - """ - def encode(o): - if isinstance(o, six.binary_type): - return o - else: - if isinstance(o, six.text_type): - return o.encode('utf-8') - else: - return str(o).encode('utf-8') - - utf8_params = {encode(k): encode(v) for k, v in six.iteritems(params)} - return url_encode(utf8_params) diff --git a/resources/lib/dropbox/paper.py b/resources/lib/dropbox/paper.py deleted file mode 100644 index bc09345..0000000 --- a/resources/lib/dropbox/paper.py +++ /dev/null @@ -1,4370 +0,0 @@ -# -*- coding: utf-8 -*- -# Auto-generated by Stone, do not modify. -# flake8: noqa -# pylint: skip-file -""" -This namespace contains endpoints and data types for managing docs and folders in Dropbox Paper. -""" - -try: - from . import stone_validators as bv - from . import stone_base as bb -except (SystemError, ValueError): - # Catch errors raised when importing a relative module when not in a package. - # This makes testing this file directly (outside of a package) easier. - import stone_validators as bv - import stone_base as bb - -try: - from . import ( - common, - sharing, - ) -except (SystemError, ValueError): - import common - import sharing - -class AddMember(object): - """ - :ivar permission_level: Permission for the user. - :ivar member: User which should be added to the Paper doc. Specify only - email address or Dropbox account ID. - """ - - __slots__ = [ - '_permission_level_value', - '_permission_level_present', - '_member_value', - '_member_present', - ] - - _has_required_fields = True - - def __init__(self, - member=None, - permission_level=None): - self._permission_level_value = None - self._permission_level_present = False - self._member_value = None - self._member_present = False - if permission_level is not None: - self.permission_level = permission_level - if member is not None: - self.member = member - - @property - def permission_level(self): - """ - Permission for the user. - - :rtype: PaperDocPermissionLevel - """ - if self._permission_level_present: - return self._permission_level_value - else: - return PaperDocPermissionLevel.edit - - @permission_level.setter - def permission_level(self, val): - self._permission_level_validator.validate_type_only(val) - self._permission_level_value = val - self._permission_level_present = True - - @permission_level.deleter - def permission_level(self): - self._permission_level_value = None - self._permission_level_present = False - - @property - def member(self): - """ - User which should be added to the Paper doc. Specify only email address - or Dropbox account ID. - - :rtype: sharing.MemberSelector_validator - """ - if self._member_present: - return self._member_value - else: - raise AttributeError("missing required field 'member'") - - @member.setter - def member(self, val): - self._member_validator.validate_type_only(val) - self._member_value = val - self._member_present = True - - @member.deleter - def member(self): - self._member_value = None - self._member_present = False - - def __repr__(self): - return 'AddMember(member={!r}, permission_level={!r})'.format( - self._member_value, - self._permission_level_value, - ) - -AddMember_validator = bv.Struct(AddMember) - -class RefPaperDoc(object): - """ - :ivar doc_id: The Paper doc ID. - """ - - __slots__ = [ - '_doc_id_value', - '_doc_id_present', - ] - - _has_required_fields = True - - def __init__(self, - doc_id=None): - self._doc_id_value = None - self._doc_id_present = False - if doc_id is not None: - self.doc_id = doc_id - - @property - def doc_id(self): - """ - The Paper doc ID. - - :rtype: str - """ - if self._doc_id_present: - return self._doc_id_value - else: - raise AttributeError("missing required field 'doc_id'") - - @doc_id.setter - def doc_id(self, val): - val = self._doc_id_validator.validate(val) - self._doc_id_value = val - self._doc_id_present = True - - @doc_id.deleter - def doc_id(self): - self._doc_id_value = None - self._doc_id_present = False - - def __repr__(self): - return 'RefPaperDoc(doc_id={!r})'.format( - self._doc_id_value, - ) - -RefPaperDoc_validator = bv.Struct(RefPaperDoc) - -class AddPaperDocUser(RefPaperDoc): - """ - :ivar members: User which should be added to the Paper doc. Specify only - email address or Dropbox account ID. - :ivar custom_message: A personal message that will be emailed to each - successfully added member. - :ivar quiet: Clients should set this to true if no email message shall be - sent to added users. - """ - - __slots__ = [ - '_members_value', - '_members_present', - '_custom_message_value', - '_custom_message_present', - '_quiet_value', - '_quiet_present', - ] - - _has_required_fields = True - - def __init__(self, - doc_id=None, - members=None, - custom_message=None, - quiet=None): - super(AddPaperDocUser, self).__init__(doc_id) - self._members_value = None - self._members_present = False - self._custom_message_value = None - self._custom_message_present = False - self._quiet_value = None - self._quiet_present = False - if members is not None: - self.members = members - if custom_message is not None: - self.custom_message = custom_message - if quiet is not None: - self.quiet = quiet - - @property - def members(self): - """ - User which should be added to the Paper doc. Specify only email address - or Dropbox account ID. - - :rtype: list of [AddMember] - """ - if self._members_present: - return self._members_value - else: - raise AttributeError("missing required field 'members'") - - @members.setter - def members(self, val): - val = self._members_validator.validate(val) - self._members_value = val - self._members_present = True - - @members.deleter - def members(self): - self._members_value = None - self._members_present = False - - @property - def custom_message(self): - """ - A personal message that will be emailed to each successfully added - member. - - :rtype: str - """ - if self._custom_message_present: - return self._custom_message_value - else: - return None - - @custom_message.setter - def custom_message(self, val): - if val is None: - del self.custom_message - return - val = self._custom_message_validator.validate(val) - self._custom_message_value = val - self._custom_message_present = True - - @custom_message.deleter - def custom_message(self): - self._custom_message_value = None - self._custom_message_present = False - - @property - def quiet(self): - """ - Clients should set this to true if no email message shall be sent to - added users. - - :rtype: bool - """ - if self._quiet_present: - return self._quiet_value - else: - return False - - @quiet.setter - def quiet(self, val): - val = self._quiet_validator.validate(val) - self._quiet_value = val - self._quiet_present = True - - @quiet.deleter - def quiet(self): - self._quiet_value = None - self._quiet_present = False - - def __repr__(self): - return 'AddPaperDocUser(doc_id={!r}, members={!r}, custom_message={!r}, quiet={!r})'.format( - self._doc_id_value, - self._members_value, - self._custom_message_value, - self._quiet_value, - ) - -AddPaperDocUser_validator = bv.Struct(AddPaperDocUser) - -class AddPaperDocUserMemberResult(object): - """ - Per-member result for :meth:`dropbox.dropbox.Dropbox.paper_docs_users_add`. - - :ivar member: One of specified input members. - :ivar result: The outcome of the action on this member. - """ - - __slots__ = [ - '_member_value', - '_member_present', - '_result_value', - '_result_present', - ] - - _has_required_fields = True - - def __init__(self, - member=None, - result=None): - self._member_value = None - self._member_present = False - self._result_value = None - self._result_present = False - if member is not None: - self.member = member - if result is not None: - self.result = result - - @property - def member(self): - """ - One of specified input members. - - :rtype: sharing.MemberSelector_validator - """ - if self._member_present: - return self._member_value - else: - raise AttributeError("missing required field 'member'") - - @member.setter - def member(self, val): - self._member_validator.validate_type_only(val) - self._member_value = val - self._member_present = True - - @member.deleter - def member(self): - self._member_value = None - self._member_present = False - - @property - def result(self): - """ - The outcome of the action on this member. - - :rtype: AddPaperDocUserResult - """ - if self._result_present: - return self._result_value - else: - raise AttributeError("missing required field 'result'") - - @result.setter - def result(self, val): - self._result_validator.validate_type_only(val) - self._result_value = val - self._result_present = True - - @result.deleter - def result(self): - self._result_value = None - self._result_present = False - - def __repr__(self): - return 'AddPaperDocUserMemberResult(member={!r}, result={!r})'.format( - self._member_value, - self._result_value, - ) - -AddPaperDocUserMemberResult_validator = bv.Struct(AddPaperDocUserMemberResult) - -class AddPaperDocUserResult(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar success: User was successfully added to the Paper doc. - :ivar unknown_error: Something unexpected happened when trying to add the - user to the Paper doc. - :ivar sharing_outside_team_disabled: The Paper doc can be shared only with - team members. - :ivar daily_limit_reached: The daily limit of how many users can be added to - the Paper doc was reached. - :ivar user_is_owner: Owner's permissions cannot be changed. - :ivar failed_user_data_retrieval: User data could not be retrieved. Clients - should retry. - :ivar permission_already_granted: This user already has the correct - permission to the Paper doc. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - success = None - # Attribute is overwritten below the class definition - unknown_error = None - # Attribute is overwritten below the class definition - sharing_outside_team_disabled = None - # Attribute is overwritten below the class definition - daily_limit_reached = None - # Attribute is overwritten below the class definition - user_is_owner = None - # Attribute is overwritten below the class definition - failed_user_data_retrieval = None - # Attribute is overwritten below the class definition - permission_already_granted = None - # Attribute is overwritten below the class definition - other = None - - def is_success(self): - """ - Check if the union tag is ``success``. - - :rtype: bool - """ - return self._tag == 'success' - - def is_unknown_error(self): - """ - Check if the union tag is ``unknown_error``. - - :rtype: bool - """ - return self._tag == 'unknown_error' - - def is_sharing_outside_team_disabled(self): - """ - Check if the union tag is ``sharing_outside_team_disabled``. - - :rtype: bool - """ - return self._tag == 'sharing_outside_team_disabled' - - def is_daily_limit_reached(self): - """ - Check if the union tag is ``daily_limit_reached``. - - :rtype: bool - """ - return self._tag == 'daily_limit_reached' - - def is_user_is_owner(self): - """ - Check if the union tag is ``user_is_owner``. - - :rtype: bool - """ - return self._tag == 'user_is_owner' - - def is_failed_user_data_retrieval(self): - """ - Check if the union tag is ``failed_user_data_retrieval``. - - :rtype: bool - """ - return self._tag == 'failed_user_data_retrieval' - - def is_permission_already_granted(self): - """ - Check if the union tag is ``permission_already_granted``. - - :rtype: bool - """ - return self._tag == 'permission_already_granted' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'AddPaperDocUserResult(%r, %r)' % (self._tag, self._value) - -AddPaperDocUserResult_validator = bv.Union(AddPaperDocUserResult) - -class Cursor(object): - """ - :ivar value: The actual cursor value. - :ivar 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. - """ - - __slots__ = [ - '_value_value', - '_value_present', - '_expiration_value', - '_expiration_present', - ] - - _has_required_fields = True - - def __init__(self, - value=None, - expiration=None): - self._value_value = None - self._value_present = False - self._expiration_value = None - self._expiration_present = False - if value is not None: - self.value = value - if expiration is not None: - self.expiration = expiration - - @property - def value(self): - """ - The actual cursor value. - - :rtype: str - """ - if self._value_present: - return self._value_value - else: - raise AttributeError("missing required field 'value'") - - @value.setter - def value(self, val): - val = self._value_validator.validate(val) - self._value_value = val - self._value_present = True - - @value.deleter - def value(self): - self._value_value = None - self._value_present = False - - @property - def expiration(self): - """ - 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. - - :rtype: datetime.datetime - """ - if self._expiration_present: - return self._expiration_value - else: - return None - - @expiration.setter - def expiration(self, val): - if val is None: - del self.expiration - return - val = self._expiration_validator.validate(val) - self._expiration_value = val - self._expiration_present = True - - @expiration.deleter - def expiration(self): - self._expiration_value = None - self._expiration_present = False - - def __repr__(self): - return 'Cursor(value={!r}, expiration={!r})'.format( - self._value_value, - self._expiration_value, - ) - -Cursor_validator = bv.Struct(Cursor) - -class PaperApiBaseError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar insufficient_permissions: Your account does not have permissions to - perform this action. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - insufficient_permissions = None - # Attribute is overwritten below the class definition - other = None - - def is_insufficient_permissions(self): - """ - Check if the union tag is ``insufficient_permissions``. - - :rtype: bool - """ - return self._tag == 'insufficient_permissions' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'PaperApiBaseError(%r, %r)' % (self._tag, self._value) - -PaperApiBaseError_validator = bv.Union(PaperApiBaseError) - -class DocLookupError(PaperApiBaseError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar doc_not_found: The required doc was not found. - """ - - # Attribute is overwritten below the class definition - doc_not_found = None - - def is_doc_not_found(self): - """ - Check if the union tag is ``doc_not_found``. - - :rtype: bool - """ - return self._tag == 'doc_not_found' - - def __repr__(self): - return 'DocLookupError(%r, %r)' % (self._tag, self._value) - -DocLookupError_validator = bv.Union(DocLookupError) - -class DocSubscriptionLevel(bb.Union): - """ - The subscription level of a Paper doc. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar default: No change email messages unless you're the creator. - :ivar ignore: Ignored: Not shown in pad lists or activity and no email - message is sent. - :ivar every: Subscribed: Shown in pad lists and activity and change email - messages are sent. - :ivar no_email: Unsubscribed: Shown in pad lists, but not in activity and no - change email messages are sent. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - default = None - # Attribute is overwritten below the class definition - ignore = None - # Attribute is overwritten below the class definition - every = None - # Attribute is overwritten below the class definition - no_email = None - - def is_default(self): - """ - Check if the union tag is ``default``. - - :rtype: bool - """ - return self._tag == 'default' - - def is_ignore(self): - """ - Check if the union tag is ``ignore``. - - :rtype: bool - """ - return self._tag == 'ignore' - - def is_every(self): - """ - Check if the union tag is ``every``. - - :rtype: bool - """ - return self._tag == 'every' - - def is_no_email(self): - """ - Check if the union tag is ``no_email``. - - :rtype: bool - """ - return self._tag == 'no_email' - - def __repr__(self): - return 'DocSubscriptionLevel(%r, %r)' % (self._tag, self._value) - -DocSubscriptionLevel_validator = bv.Union(DocSubscriptionLevel) - -class ExportFormat(bb.Union): - """ - The desired export format of the Paper doc. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar html: The HTML export format. - :ivar markdown: The markdown export format. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - html = None - # Attribute is overwritten below the class definition - markdown = None - # Attribute is overwritten below the class definition - other = None - - def is_html(self): - """ - Check if the union tag is ``html``. - - :rtype: bool - """ - return self._tag == 'html' - - def is_markdown(self): - """ - Check if the union tag is ``markdown``. - - :rtype: bool - """ - return self._tag == 'markdown' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'ExportFormat(%r, %r)' % (self._tag, self._value) - -ExportFormat_validator = bv.Union(ExportFormat) - -class Folder(object): - """ - Data structure representing a Paper folder. - - :ivar id: Paper folder ID. This ID uniquely identifies the folder. - :ivar name: Paper folder name. - """ - - __slots__ = [ - '_id_value', - '_id_present', - '_name_value', - '_name_present', - ] - - _has_required_fields = True - - def __init__(self, - id=None, - name=None): - self._id_value = None - self._id_present = False - self._name_value = None - self._name_present = False - if id is not None: - self.id = id - if name is not None: - self.name = name - - @property - def id(self): - """ - Paper folder ID. This ID uniquely identifies the folder. - - :rtype: str - """ - if self._id_present: - return self._id_value - else: - raise AttributeError("missing required field 'id'") - - @id.setter - def id(self, val): - val = self._id_validator.validate(val) - self._id_value = val - self._id_present = True - - @id.deleter - def id(self): - self._id_value = None - self._id_present = False - - @property - def name(self): - """ - Paper folder name. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") - - @name.setter - def name(self, val): - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - def __repr__(self): - return 'Folder(id={!r}, name={!r})'.format( - self._id_value, - self._name_value, - ) - -Folder_validator = bv.Struct(Folder) - -class FolderSharingPolicyType(bb.Union): - """ - The sharing policy of a Paper folder. Note: The sharing policy of - subfolders is inherited from the root folder. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar team: Everyone in your team and anyone directly invited can access - this folder. - :ivar invite_only: Only people directly invited can access this folder. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - team = None - # Attribute is overwritten below the class definition - invite_only = None - - def is_team(self): - """ - Check if the union tag is ``team``. - - :rtype: bool - """ - return self._tag == 'team' - - def is_invite_only(self): - """ - Check if the union tag is ``invite_only``. - - :rtype: bool - """ - return self._tag == 'invite_only' - - def __repr__(self): - return 'FolderSharingPolicyType(%r, %r)' % (self._tag, self._value) - -FolderSharingPolicyType_validator = bv.Union(FolderSharingPolicyType) - -class FolderSubscriptionLevel(bb.Union): - """ - The subscription level of a Paper folder. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar none: Not shown in activity, no email messages. - :ivar activity_only: Shown in activity, no email messages. - :ivar daily_emails: Shown in activity, daily email messages. - :ivar weekly_emails: Shown in activity, weekly email messages. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - none = None - # Attribute is overwritten below the class definition - activity_only = None - # Attribute is overwritten below the class definition - daily_emails = None - # Attribute is overwritten below the class definition - weekly_emails = None - - def is_none(self): - """ - Check if the union tag is ``none``. - - :rtype: bool - """ - return self._tag == 'none' - - def is_activity_only(self): - """ - Check if the union tag is ``activity_only``. - - :rtype: bool - """ - return self._tag == 'activity_only' - - def is_daily_emails(self): - """ - Check if the union tag is ``daily_emails``. - - :rtype: bool - """ - return self._tag == 'daily_emails' - - def is_weekly_emails(self): - """ - Check if the union tag is ``weekly_emails``. - - :rtype: bool - """ - return self._tag == 'weekly_emails' - - def __repr__(self): - return 'FolderSubscriptionLevel(%r, %r)' % (self._tag, self._value) - -FolderSubscriptionLevel_validator = bv.Union(FolderSubscriptionLevel) - -class FoldersContainingPaperDoc(object): - """ - Metadata about Paper folders containing the specififed Paper doc. - - :ivar folder_sharing_policy_type: The sharing policy of the folder - containing the Paper doc. - :ivar folders: The folder path. If present the first folder is the root - folder. - """ - - __slots__ = [ - '_folder_sharing_policy_type_value', - '_folder_sharing_policy_type_present', - '_folders_value', - '_folders_present', - ] - - _has_required_fields = False - - def __init__(self, - folder_sharing_policy_type=None, - folders=None): - self._folder_sharing_policy_type_value = None - self._folder_sharing_policy_type_present = False - self._folders_value = None - self._folders_present = False - if folder_sharing_policy_type is not None: - self.folder_sharing_policy_type = folder_sharing_policy_type - if folders is not None: - self.folders = folders - - @property - def folder_sharing_policy_type(self): - """ - The sharing policy of the folder containing the Paper doc. - - :rtype: FolderSharingPolicyType - """ - if self._folder_sharing_policy_type_present: - return self._folder_sharing_policy_type_value - else: - return None - - @folder_sharing_policy_type.setter - def folder_sharing_policy_type(self, val): - if val is None: - del self.folder_sharing_policy_type - return - self._folder_sharing_policy_type_validator.validate_type_only(val) - self._folder_sharing_policy_type_value = val - self._folder_sharing_policy_type_present = True - - @folder_sharing_policy_type.deleter - def folder_sharing_policy_type(self): - self._folder_sharing_policy_type_value = None - self._folder_sharing_policy_type_present = False - - @property - def folders(self): - """ - The folder path. If present the first folder is the root folder. - - :rtype: list of [Folder] - """ - if self._folders_present: - return self._folders_value - else: - return None - - @folders.setter - def folders(self, val): - if val is None: - del self.folders - return - val = self._folders_validator.validate(val) - self._folders_value = val - self._folders_present = True - - @folders.deleter - def folders(self): - self._folders_value = None - self._folders_present = False - - def __repr__(self): - return 'FoldersContainingPaperDoc(folder_sharing_policy_type={!r}, folders={!r})'.format( - self._folder_sharing_policy_type_value, - self._folders_value, - ) - -FoldersContainingPaperDoc_validator = bv.Struct(FoldersContainingPaperDoc) - -class ImportFormat(bb.Union): - """ - The import format of the incoming data. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar html: The provided data is interpreted as standard HTML. - :ivar markdown: The provided data is interpreted as markdown. Note: The - first line of the provided document will be used as the doc title. - :ivar plain_text: The provided data is interpreted as plain text. Note: The - first line of the provided document will be used as the doc title. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - html = None - # Attribute is overwritten below the class definition - markdown = None - # Attribute is overwritten below the class definition - plain_text = None - # Attribute is overwritten below the class definition - other = None - - def is_html(self): - """ - Check if the union tag is ``html``. - - :rtype: bool - """ - return self._tag == 'html' - - def is_markdown(self): - """ - Check if the union tag is ``markdown``. - - :rtype: bool - """ - return self._tag == 'markdown' - - def is_plain_text(self): - """ - Check if the union tag is ``plain_text``. - - :rtype: bool - """ - return self._tag == 'plain_text' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'ImportFormat(%r, %r)' % (self._tag, self._value) - -ImportFormat_validator = bv.Union(ImportFormat) - -class InviteeInfoWithPermissionLevel(object): - """ - :ivar invitee: Email address invited to the Paper doc. - :ivar permission_level: Permission level for the invitee. - """ - - __slots__ = [ - '_invitee_value', - '_invitee_present', - '_permission_level_value', - '_permission_level_present', - ] - - _has_required_fields = True - - def __init__(self, - invitee=None, - permission_level=None): - self._invitee_value = None - self._invitee_present = False - self._permission_level_value = None - self._permission_level_present = False - if invitee is not None: - self.invitee = invitee - if permission_level is not None: - self.permission_level = permission_level - - @property - def invitee(self): - """ - Email address invited to the Paper doc. - - :rtype: sharing.InviteeInfo_validator - """ - if self._invitee_present: - return self._invitee_value - else: - raise AttributeError("missing required field 'invitee'") - - @invitee.setter - def invitee(self, val): - self._invitee_validator.validate_type_only(val) - self._invitee_value = val - self._invitee_present = True - - @invitee.deleter - def invitee(self): - self._invitee_value = None - self._invitee_present = False - - @property - def permission_level(self): - """ - Permission level for the invitee. - - :rtype: PaperDocPermissionLevel - """ - if self._permission_level_present: - return self._permission_level_value - else: - raise AttributeError("missing required field 'permission_level'") - - @permission_level.setter - def permission_level(self, val): - self._permission_level_validator.validate_type_only(val) - self._permission_level_value = val - self._permission_level_present = True - - @permission_level.deleter - def permission_level(self): - self._permission_level_value = None - self._permission_level_present = False - - def __repr__(self): - return 'InviteeInfoWithPermissionLevel(invitee={!r}, permission_level={!r})'.format( - self._invitee_value, - self._permission_level_value, - ) - -InviteeInfoWithPermissionLevel_validator = bv.Struct(InviteeInfoWithPermissionLevel) - -class ListDocsCursorError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def cursor_error(cls, val): - """ - Create an instance of this class set to the ``cursor_error`` tag with - value ``val``. - - :param PaperApiCursorError val: - :rtype: ListDocsCursorError - """ - return cls('cursor_error', val) - - def is_cursor_error(self): - """ - Check if the union tag is ``cursor_error``. - - :rtype: bool - """ - return self._tag == 'cursor_error' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_cursor_error(self): - """ - Only call this if :meth:`is_cursor_error` is true. - - :rtype: PaperApiCursorError - """ - if not self.is_cursor_error(): - raise AttributeError("tag 'cursor_error' not set") - return self._value - - def __repr__(self): - return 'ListDocsCursorError(%r, %r)' % (self._tag, self._value) - -ListDocsCursorError_validator = bv.Union(ListDocsCursorError) - -class ListPaperDocsArgs(object): - """ - :ivar filter_by: Allows user to specify how the Paper docs should be - filtered. - :ivar sort_by: Allows user to specify how the Paper docs should be sorted. - :ivar sort_order: Allows user to specify the sort order of the result. - :ivar 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. - """ - - __slots__ = [ - '_filter_by_value', - '_filter_by_present', - '_sort_by_value', - '_sort_by_present', - '_sort_order_value', - '_sort_order_present', - '_limit_value', - '_limit_present', - ] - - _has_required_fields = False - - def __init__(self, - filter_by=None, - sort_by=None, - sort_order=None, - limit=None): - self._filter_by_value = None - self._filter_by_present = False - self._sort_by_value = None - self._sort_by_present = False - self._sort_order_value = None - self._sort_order_present = False - self._limit_value = None - self._limit_present = False - if filter_by is not None: - self.filter_by = filter_by - if sort_by is not None: - self.sort_by = sort_by - if sort_order is not None: - self.sort_order = sort_order - if limit is not None: - self.limit = limit - - @property - def filter_by(self): - """ - Allows user to specify how the Paper docs should be filtered. - - :rtype: ListPaperDocsFilterBy - """ - if self._filter_by_present: - return self._filter_by_value - else: - return ListPaperDocsFilterBy.docs_accessed - - @filter_by.setter - def filter_by(self, val): - self._filter_by_validator.validate_type_only(val) - self._filter_by_value = val - self._filter_by_present = True - - @filter_by.deleter - def filter_by(self): - self._filter_by_value = None - self._filter_by_present = False - - @property - def sort_by(self): - """ - Allows user to specify how the Paper docs should be sorted. - - :rtype: ListPaperDocsSortBy - """ - if self._sort_by_present: - return self._sort_by_value - else: - return ListPaperDocsSortBy.accessed - - @sort_by.setter - def sort_by(self, val): - self._sort_by_validator.validate_type_only(val) - self._sort_by_value = val - self._sort_by_present = True - - @sort_by.deleter - def sort_by(self): - self._sort_by_value = None - self._sort_by_present = False - - @property - def sort_order(self): - """ - Allows user to specify the sort order of the result. - - :rtype: ListPaperDocsSortOrder - """ - if self._sort_order_present: - return self._sort_order_value - else: - return ListPaperDocsSortOrder.ascending - - @sort_order.setter - def sort_order(self, val): - self._sort_order_validator.validate_type_only(val) - self._sort_order_value = val - self._sort_order_present = True - - @sort_order.deleter - def sort_order(self): - self._sort_order_value = None - self._sort_order_present = False - - @property - def limit(self): - """ - Size limit per batch. The maximum number of docs that can be retrieved - per batch is 1000. Higher value results in invalid arguments error. - - :rtype: long - """ - if self._limit_present: - return self._limit_value - else: - return 1000 - - @limit.setter - def limit(self, val): - val = self._limit_validator.validate(val) - self._limit_value = val - self._limit_present = True - - @limit.deleter - def limit(self): - self._limit_value = None - self._limit_present = False - - def __repr__(self): - return 'ListPaperDocsArgs(filter_by={!r}, sort_by={!r}, sort_order={!r}, limit={!r})'.format( - self._filter_by_value, - self._sort_by_value, - self._sort_order_value, - self._limit_value, - ) - -ListPaperDocsArgs_validator = bv.Struct(ListPaperDocsArgs) - -class ListPaperDocsContinueArgs(object): - """ - :ivar cursor: The cursor obtained from - :meth:`dropbox.dropbox.Dropbox.paper_docs_list` or - :meth:`dropbox.dropbox.Dropbox.paper_docs_list_continue`. Allows for - pagination. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - cursor=None): - self._cursor_value = None - self._cursor_present = False - if cursor is not None: - self.cursor = cursor - - @property - def cursor(self): - """ - The cursor obtained from :meth:`dropbox.dropbox.Dropbox.paper_docs_list` - or :meth:`dropbox.dropbox.Dropbox.paper_docs_list_continue`. Allows for - pagination. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'ListPaperDocsContinueArgs(cursor={!r})'.format( - self._cursor_value, - ) - -ListPaperDocsContinueArgs_validator = bv.Struct(ListPaperDocsContinueArgs) - -class ListPaperDocsFilterBy(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar docs_accessed: Fetches all Paper doc IDs that the user has ever - accessed. - :ivar docs_created: Fetches only the Paper doc IDs that the user has - created. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - docs_accessed = None - # Attribute is overwritten below the class definition - docs_created = None - # Attribute is overwritten below the class definition - other = None - - def is_docs_accessed(self): - """ - Check if the union tag is ``docs_accessed``. - - :rtype: bool - """ - return self._tag == 'docs_accessed' - - def is_docs_created(self): - """ - Check if the union tag is ``docs_created``. - - :rtype: bool - """ - return self._tag == 'docs_created' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'ListPaperDocsFilterBy(%r, %r)' % (self._tag, self._value) - -ListPaperDocsFilterBy_validator = bv.Union(ListPaperDocsFilterBy) - -class ListPaperDocsResponse(object): - """ - :ivar doc_ids: 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 - :meth:`dropbox.dropbox.Dropbox.paper_docs_list`. - :ivar cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.paper_docs_list_continue` to paginate - through all files. The cursor preserves all properties as specified in - the original call to :meth:`dropbox.dropbox.Dropbox.paper_docs_list`. - :ivar has_more: Will be set to True if a subsequent call with the provided - cursor to :meth:`dropbox.dropbox.Dropbox.paper_docs_list_continue` - returns immediately with some results. If set to False please allow some - delay before making another call to - :meth:`dropbox.dropbox.Dropbox.paper_docs_list_continue`. - """ - - __slots__ = [ - '_doc_ids_value', - '_doc_ids_present', - '_cursor_value', - '_cursor_present', - '_has_more_value', - '_has_more_present', - ] - - _has_required_fields = True - - def __init__(self, - doc_ids=None, - cursor=None, - has_more=None): - self._doc_ids_value = None - self._doc_ids_present = False - self._cursor_value = None - self._cursor_present = False - self._has_more_value = None - self._has_more_present = False - if doc_ids is not None: - self.doc_ids = doc_ids - if cursor is not None: - self.cursor = cursor - if has_more is not None: - self.has_more = has_more - - @property - def doc_ids(self): - """ - 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 - :meth:`dropbox.dropbox.Dropbox.paper_docs_list`. - - :rtype: list of [str] - """ - if self._doc_ids_present: - return self._doc_ids_value - else: - raise AttributeError("missing required field 'doc_ids'") - - @doc_ids.setter - def doc_ids(self, val): - val = self._doc_ids_validator.validate(val) - self._doc_ids_value = val - self._doc_ids_present = True - - @doc_ids.deleter - def doc_ids(self): - self._doc_ids_value = None - self._doc_ids_present = False - - @property - def cursor(self): - """ - Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.paper_docs_list_continue` to paginate - through all files. The cursor preserves all properties as specified in - the original call to :meth:`dropbox.dropbox.Dropbox.paper_docs_list`. - - :rtype: Cursor - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - self._cursor_validator.validate_type_only(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - @property - def has_more(self): - """ - Will be set to True if a subsequent call with the provided cursor to - :meth:`dropbox.dropbox.Dropbox.paper_docs_list_continue` returns - immediately with some results. If set to False please allow some delay - before making another call to - :meth:`dropbox.dropbox.Dropbox.paper_docs_list_continue`. - - :rtype: bool - """ - if self._has_more_present: - return self._has_more_value - else: - raise AttributeError("missing required field 'has_more'") - - @has_more.setter - def has_more(self, val): - val = self._has_more_validator.validate(val) - self._has_more_value = val - self._has_more_present = True - - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False - - def __repr__(self): - return 'ListPaperDocsResponse(doc_ids={!r}, cursor={!r}, has_more={!r})'.format( - self._doc_ids_value, - self._cursor_value, - self._has_more_value, - ) - -ListPaperDocsResponse_validator = bv.Struct(ListPaperDocsResponse) - -class ListPaperDocsSortBy(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar accessed: Sorts the Paper docs by the time they were last accessed. - :ivar modified: Sorts the Paper docs by the time they were last modified. - :ivar created: Sorts the Paper docs by the creation time. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - accessed = None - # Attribute is overwritten below the class definition - modified = None - # Attribute is overwritten below the class definition - created = None - # Attribute is overwritten below the class definition - other = None - - def is_accessed(self): - """ - Check if the union tag is ``accessed``. - - :rtype: bool - """ - return self._tag == 'accessed' - - def is_modified(self): - """ - Check if the union tag is ``modified``. - - :rtype: bool - """ - return self._tag == 'modified' - - def is_created(self): - """ - Check if the union tag is ``created``. - - :rtype: bool - """ - return self._tag == 'created' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'ListPaperDocsSortBy(%r, %r)' % (self._tag, self._value) - -ListPaperDocsSortBy_validator = bv.Union(ListPaperDocsSortBy) - -class ListPaperDocsSortOrder(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar ascending: Sorts the search result in ascending order. - :ivar descending: Sorts the search result in descending order. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - ascending = None - # Attribute is overwritten below the class definition - descending = None - # Attribute is overwritten below the class definition - other = None - - def is_ascending(self): - """ - Check if the union tag is ``ascending``. - - :rtype: bool - """ - return self._tag == 'ascending' - - def is_descending(self): - """ - Check if the union tag is ``descending``. - - :rtype: bool - """ - return self._tag == 'descending' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'ListPaperDocsSortOrder(%r, %r)' % (self._tag, self._value) - -ListPaperDocsSortOrder_validator = bv.Union(ListPaperDocsSortOrder) - -class ListUsersCursorError(PaperApiBaseError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar doc_not_found: The required doc was not found. - """ - - # Attribute is overwritten below the class definition - doc_not_found = None - - @classmethod - def cursor_error(cls, val): - """ - Create an instance of this class set to the ``cursor_error`` tag with - value ``val``. - - :param PaperApiCursorError val: - :rtype: ListUsersCursorError - """ - return cls('cursor_error', val) - - def is_doc_not_found(self): - """ - Check if the union tag is ``doc_not_found``. - - :rtype: bool - """ - return self._tag == 'doc_not_found' - - def is_cursor_error(self): - """ - Check if the union tag is ``cursor_error``. - - :rtype: bool - """ - return self._tag == 'cursor_error' - - def get_cursor_error(self): - """ - Only call this if :meth:`is_cursor_error` is true. - - :rtype: PaperApiCursorError - """ - if not self.is_cursor_error(): - raise AttributeError("tag 'cursor_error' not set") - return self._value - - def __repr__(self): - return 'ListUsersCursorError(%r, %r)' % (self._tag, self._value) - -ListUsersCursorError_validator = bv.Union(ListUsersCursorError) - -class ListUsersOnFolderArgs(RefPaperDoc): - """ - :ivar 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. - """ - - __slots__ = [ - '_limit_value', - '_limit_present', - ] - - _has_required_fields = True - - def __init__(self, - doc_id=None, - limit=None): - super(ListUsersOnFolderArgs, self).__init__(doc_id) - self._limit_value = None - self._limit_present = False - if limit is not None: - self.limit = limit - - @property - def limit(self): - """ - Size limit per batch. The maximum number of users that can be retrieved - per batch is 1000. Higher value results in invalid arguments error. - - :rtype: long - """ - if self._limit_present: - return self._limit_value - else: - return 1000 - - @limit.setter - def limit(self, val): - val = self._limit_validator.validate(val) - self._limit_value = val - self._limit_present = True - - @limit.deleter - def limit(self): - self._limit_value = None - self._limit_present = False - - def __repr__(self): - return 'ListUsersOnFolderArgs(doc_id={!r}, limit={!r})'.format( - self._doc_id_value, - self._limit_value, - ) - -ListUsersOnFolderArgs_validator = bv.Struct(ListUsersOnFolderArgs) - -class ListUsersOnFolderContinueArgs(RefPaperDoc): - """ - :ivar cursor: The cursor obtained from - :meth:`dropbox.dropbox.Dropbox.paper_docs_folder_users_list` or - :meth:`dropbox.dropbox.Dropbox.paper_docs_folder_users_list_continue`. - Allows for pagination. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - doc_id=None, - cursor=None): - super(ListUsersOnFolderContinueArgs, self).__init__(doc_id) - self._cursor_value = None - self._cursor_present = False - if cursor is not None: - self.cursor = cursor - - @property - def cursor(self): - """ - The cursor obtained from - :meth:`dropbox.dropbox.Dropbox.paper_docs_folder_users_list` or - :meth:`dropbox.dropbox.Dropbox.paper_docs_folder_users_list_continue`. - Allows for pagination. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'ListUsersOnFolderContinueArgs(doc_id={!r}, cursor={!r})'.format( - self._doc_id_value, - self._cursor_value, - ) - -ListUsersOnFolderContinueArgs_validator = bv.Struct(ListUsersOnFolderContinueArgs) - -class ListUsersOnFolderResponse(object): - """ - :ivar invitees: List of email addresses that are invited on the Paper - folder. - :ivar users: List of users that are invited on the Paper folder. - :ivar cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.paper_docs_folder_users_list_continue` to - paginate through all users. The cursor preserves all properties as - specified in the original call to - :meth:`dropbox.dropbox.Dropbox.paper_docs_folder_users_list`. - :ivar has_more: Will be set to True if a subsequent call with the provided - cursor to - :meth:`dropbox.dropbox.Dropbox.paper_docs_folder_users_list_continue` - returns immediately with some results. If set to False please allow some - delay before making another call to - :meth:`dropbox.dropbox.Dropbox.paper_docs_folder_users_list_continue`. - """ - - __slots__ = [ - '_invitees_value', - '_invitees_present', - '_users_value', - '_users_present', - '_cursor_value', - '_cursor_present', - '_has_more_value', - '_has_more_present', - ] - - _has_required_fields = True - - def __init__(self, - invitees=None, - users=None, - cursor=None, - has_more=None): - self._invitees_value = None - self._invitees_present = False - self._users_value = None - self._users_present = False - self._cursor_value = None - self._cursor_present = False - self._has_more_value = None - self._has_more_present = False - if invitees is not None: - self.invitees = invitees - if users is not None: - self.users = users - if cursor is not None: - self.cursor = cursor - if has_more is not None: - self.has_more = has_more - - @property - def invitees(self): - """ - List of email addresses that are invited on the Paper folder. - - :rtype: list of [sharing.InviteeInfo_validator] - """ - if self._invitees_present: - return self._invitees_value - else: - raise AttributeError("missing required field 'invitees'") - - @invitees.setter - def invitees(self, val): - val = self._invitees_validator.validate(val) - self._invitees_value = val - self._invitees_present = True - - @invitees.deleter - def invitees(self): - self._invitees_value = None - self._invitees_present = False - - @property - def users(self): - """ - List of users that are invited on the Paper folder. - - :rtype: list of [sharing.UserInfo_validator] - """ - if self._users_present: - return self._users_value - else: - raise AttributeError("missing required field 'users'") - - @users.setter - def users(self, val): - val = self._users_validator.validate(val) - self._users_value = val - self._users_present = True - - @users.deleter - def users(self): - self._users_value = None - self._users_present = False - - @property - def cursor(self): - """ - Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.paper_docs_folder_users_list_continue` to - paginate through all users. The cursor preserves all properties as - specified in the original call to - :meth:`dropbox.dropbox.Dropbox.paper_docs_folder_users_list`. - - :rtype: Cursor - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - self._cursor_validator.validate_type_only(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - @property - def has_more(self): - """ - Will be set to True if a subsequent call with the provided cursor to - :meth:`dropbox.dropbox.Dropbox.paper_docs_folder_users_list_continue` - returns immediately with some results. If set to False please allow some - delay before making another call to - :meth:`dropbox.dropbox.Dropbox.paper_docs_folder_users_list_continue`. - - :rtype: bool - """ - if self._has_more_present: - return self._has_more_value - else: - raise AttributeError("missing required field 'has_more'") - - @has_more.setter - def has_more(self, val): - val = self._has_more_validator.validate(val) - self._has_more_value = val - self._has_more_present = True - - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False - - def __repr__(self): - return 'ListUsersOnFolderResponse(invitees={!r}, users={!r}, cursor={!r}, has_more={!r})'.format( - self._invitees_value, - self._users_value, - self._cursor_value, - self._has_more_value, - ) - -ListUsersOnFolderResponse_validator = bv.Struct(ListUsersOnFolderResponse) - -class ListUsersOnPaperDocArgs(RefPaperDoc): - """ - :ivar 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. - :ivar filter_by: Specify this attribute if you want to obtain users that - have already accessed the Paper doc. - """ - - __slots__ = [ - '_limit_value', - '_limit_present', - '_filter_by_value', - '_filter_by_present', - ] - - _has_required_fields = True - - def __init__(self, - doc_id=None, - limit=None, - filter_by=None): - super(ListUsersOnPaperDocArgs, self).__init__(doc_id) - self._limit_value = None - self._limit_present = False - self._filter_by_value = None - self._filter_by_present = False - if limit is not None: - self.limit = limit - if filter_by is not None: - self.filter_by = filter_by - - @property - def limit(self): - """ - Size limit per batch. The maximum number of users that can be retrieved - per batch is 1000. Higher value results in invalid arguments error. - - :rtype: long - """ - if self._limit_present: - return self._limit_value - else: - return 1000 - - @limit.setter - def limit(self, val): - val = self._limit_validator.validate(val) - self._limit_value = val - self._limit_present = True - - @limit.deleter - def limit(self): - self._limit_value = None - self._limit_present = False - - @property - def filter_by(self): - """ - Specify this attribute if you want to obtain users that have already - accessed the Paper doc. - - :rtype: UserOnPaperDocFilter - """ - if self._filter_by_present: - return self._filter_by_value - else: - return UserOnPaperDocFilter.shared - - @filter_by.setter - def filter_by(self, val): - self._filter_by_validator.validate_type_only(val) - self._filter_by_value = val - self._filter_by_present = True - - @filter_by.deleter - def filter_by(self): - self._filter_by_value = None - self._filter_by_present = False - - def __repr__(self): - return 'ListUsersOnPaperDocArgs(doc_id={!r}, limit={!r}, filter_by={!r})'.format( - self._doc_id_value, - self._limit_value, - self._filter_by_value, - ) - -ListUsersOnPaperDocArgs_validator = bv.Struct(ListUsersOnPaperDocArgs) - -class ListUsersOnPaperDocContinueArgs(RefPaperDoc): - """ - :ivar cursor: The cursor obtained from - :meth:`dropbox.dropbox.Dropbox.paper_docs_users_list` or - :meth:`dropbox.dropbox.Dropbox.paper_docs_users_list_continue`. Allows - for pagination. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - doc_id=None, - cursor=None): - super(ListUsersOnPaperDocContinueArgs, self).__init__(doc_id) - self._cursor_value = None - self._cursor_present = False - if cursor is not None: - self.cursor = cursor - - @property - def cursor(self): - """ - The cursor obtained from - :meth:`dropbox.dropbox.Dropbox.paper_docs_users_list` or - :meth:`dropbox.dropbox.Dropbox.paper_docs_users_list_continue`. Allows - for pagination. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'ListUsersOnPaperDocContinueArgs(doc_id={!r}, cursor={!r})'.format( - self._doc_id_value, - self._cursor_value, - ) - -ListUsersOnPaperDocContinueArgs_validator = bv.Struct(ListUsersOnPaperDocContinueArgs) - -class ListUsersOnPaperDocResponse(object): - """ - :ivar invitees: List of email addresses with their respective permission - levels that are invited on the Paper doc. - :ivar users: List of users with their respective permission levels that are - invited on the Paper folder. - :ivar doc_owner: The Paper doc owner. This field is populated on every - single response. - :ivar cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.paper_docs_users_list_continue` to - paginate through all users. The cursor preserves all properties as - specified in the original call to - :meth:`dropbox.dropbox.Dropbox.paper_docs_users_list`. - :ivar has_more: Will be set to True if a subsequent call with the provided - cursor to :meth:`dropbox.dropbox.Dropbox.paper_docs_users_list_continue` - returns immediately with some results. If set to False please allow some - delay before making another call to - :meth:`dropbox.dropbox.Dropbox.paper_docs_users_list_continue`. - """ - - __slots__ = [ - '_invitees_value', - '_invitees_present', - '_users_value', - '_users_present', - '_doc_owner_value', - '_doc_owner_present', - '_cursor_value', - '_cursor_present', - '_has_more_value', - '_has_more_present', - ] - - _has_required_fields = True - - def __init__(self, - invitees=None, - users=None, - doc_owner=None, - cursor=None, - has_more=None): - self._invitees_value = None - self._invitees_present = False - self._users_value = None - self._users_present = False - self._doc_owner_value = None - self._doc_owner_present = False - self._cursor_value = None - self._cursor_present = False - self._has_more_value = None - self._has_more_present = False - if invitees is not None: - self.invitees = invitees - if users is not None: - self.users = users - if doc_owner is not None: - self.doc_owner = doc_owner - if cursor is not None: - self.cursor = cursor - if has_more is not None: - self.has_more = has_more - - @property - def invitees(self): - """ - List of email addresses with their respective permission levels that are - invited on the Paper doc. - - :rtype: list of [InviteeInfoWithPermissionLevel] - """ - if self._invitees_present: - return self._invitees_value - else: - raise AttributeError("missing required field 'invitees'") - - @invitees.setter - def invitees(self, val): - val = self._invitees_validator.validate(val) - self._invitees_value = val - self._invitees_present = True - - @invitees.deleter - def invitees(self): - self._invitees_value = None - self._invitees_present = False - - @property - def users(self): - """ - List of users with their respective permission levels that are invited - on the Paper folder. - - :rtype: list of [UserInfoWithPermissionLevel] - """ - if self._users_present: - return self._users_value - else: - raise AttributeError("missing required field 'users'") - - @users.setter - def users(self, val): - val = self._users_validator.validate(val) - self._users_value = val - self._users_present = True - - @users.deleter - def users(self): - self._users_value = None - self._users_present = False - - @property - def doc_owner(self): - """ - The Paper doc owner. This field is populated on every single response. - - :rtype: sharing.UserInfo_validator - """ - if self._doc_owner_present: - return self._doc_owner_value - else: - raise AttributeError("missing required field 'doc_owner'") - - @doc_owner.setter - def doc_owner(self, val): - self._doc_owner_validator.validate_type_only(val) - self._doc_owner_value = val - self._doc_owner_present = True - - @doc_owner.deleter - def doc_owner(self): - self._doc_owner_value = None - self._doc_owner_present = False - - @property - def cursor(self): - """ - Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.paper_docs_users_list_continue` to - paginate through all users. The cursor preserves all properties as - specified in the original call to - :meth:`dropbox.dropbox.Dropbox.paper_docs_users_list`. - - :rtype: Cursor - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - self._cursor_validator.validate_type_only(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - @property - def has_more(self): - """ - Will be set to True if a subsequent call with the provided cursor to - :meth:`dropbox.dropbox.Dropbox.paper_docs_users_list_continue` returns - immediately with some results. If set to False please allow some delay - before making another call to - :meth:`dropbox.dropbox.Dropbox.paper_docs_users_list_continue`. - - :rtype: bool - """ - if self._has_more_present: - return self._has_more_value - else: - raise AttributeError("missing required field 'has_more'") - - @has_more.setter - def has_more(self, val): - val = self._has_more_validator.validate(val) - self._has_more_value = val - self._has_more_present = True - - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False - - def __repr__(self): - return 'ListUsersOnPaperDocResponse(invitees={!r}, users={!r}, doc_owner={!r}, cursor={!r}, has_more={!r})'.format( - self._invitees_value, - self._users_value, - self._doc_owner_value, - self._cursor_value, - self._has_more_value, - ) - -ListUsersOnPaperDocResponse_validator = bv.Struct(ListUsersOnPaperDocResponse) - -class PaperApiCursorError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar expired_cursor: The provided cursor is expired. - :ivar invalid_cursor: The provided cursor is invalid. - :ivar wrong_user_in_cursor: The provided cursor contains invalid user. - :ivar reset: Indicates that the cursor has been invalidated. Call the - corresponding non-continue endpoint to obtain a new cursor. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - expired_cursor = None - # Attribute is overwritten below the class definition - invalid_cursor = None - # Attribute is overwritten below the class definition - wrong_user_in_cursor = None - # Attribute is overwritten below the class definition - reset = None - # Attribute is overwritten below the class definition - other = None - - def is_expired_cursor(self): - """ - Check if the union tag is ``expired_cursor``. - - :rtype: bool - """ - return self._tag == 'expired_cursor' - - def is_invalid_cursor(self): - """ - Check if the union tag is ``invalid_cursor``. - - :rtype: bool - """ - return self._tag == 'invalid_cursor' - - def is_wrong_user_in_cursor(self): - """ - Check if the union tag is ``wrong_user_in_cursor``. - - :rtype: bool - """ - return self._tag == 'wrong_user_in_cursor' - - def is_reset(self): - """ - Check if the union tag is ``reset``. - - :rtype: bool - """ - return self._tag == 'reset' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'PaperApiCursorError(%r, %r)' % (self._tag, self._value) - -PaperApiCursorError_validator = bv.Union(PaperApiCursorError) - -class PaperDocCreateArgs(object): - """ - :ivar parent_folder_id: 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. - :ivar import_format: The format of provided data. - """ - - __slots__ = [ - '_parent_folder_id_value', - '_parent_folder_id_present', - '_import_format_value', - '_import_format_present', - ] - - _has_required_fields = True - - def __init__(self, - import_format=None, - parent_folder_id=None): - self._parent_folder_id_value = None - self._parent_folder_id_present = False - self._import_format_value = None - self._import_format_present = False - if parent_folder_id is not None: - self.parent_folder_id = parent_folder_id - if import_format is not None: - self.import_format = import_format - - @property - def parent_folder_id(self): - """ - 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. - - :rtype: str - """ - if self._parent_folder_id_present: - return self._parent_folder_id_value - else: - return None - - @parent_folder_id.setter - def parent_folder_id(self, val): - if val is None: - del self.parent_folder_id - return - val = self._parent_folder_id_validator.validate(val) - self._parent_folder_id_value = val - self._parent_folder_id_present = True - - @parent_folder_id.deleter - def parent_folder_id(self): - self._parent_folder_id_value = None - self._parent_folder_id_present = False - - @property - def import_format(self): - """ - The format of provided data. - - :rtype: ImportFormat - """ - if self._import_format_present: - return self._import_format_value - else: - raise AttributeError("missing required field 'import_format'") - - @import_format.setter - def import_format(self, val): - self._import_format_validator.validate_type_only(val) - self._import_format_value = val - self._import_format_present = True - - @import_format.deleter - def import_format(self): - self._import_format_value = None - self._import_format_present = False - - def __repr__(self): - return 'PaperDocCreateArgs(import_format={!r}, parent_folder_id={!r})'.format( - self._import_format_value, - self._parent_folder_id_value, - ) - -PaperDocCreateArgs_validator = bv.Struct(PaperDocCreateArgs) - -class PaperDocCreateError(PaperApiBaseError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar content_malformed: The provided content was malformed and cannot be - imported to Paper. - :ivar folder_not_found: The specified Paper folder is cannot be found. - :ivar doc_length_exceeded: The newly created Paper doc would be too large. - Please split the content into multiple docs. - :ivar image_size_exceeded: The imported document contains an image that is - too large. The current limit is 1MB. Note: This only applies to HTML - with data uri. - """ - - # Attribute is overwritten below the class definition - content_malformed = None - # Attribute is overwritten below the class definition - folder_not_found = None - # Attribute is overwritten below the class definition - doc_length_exceeded = None - # Attribute is overwritten below the class definition - image_size_exceeded = None - - def is_content_malformed(self): - """ - Check if the union tag is ``content_malformed``. - - :rtype: bool - """ - return self._tag == 'content_malformed' - - def is_folder_not_found(self): - """ - Check if the union tag is ``folder_not_found``. - - :rtype: bool - """ - return self._tag == 'folder_not_found' - - def is_doc_length_exceeded(self): - """ - Check if the union tag is ``doc_length_exceeded``. - - :rtype: bool - """ - return self._tag == 'doc_length_exceeded' - - def is_image_size_exceeded(self): - """ - Check if the union tag is ``image_size_exceeded``. - - :rtype: bool - """ - return self._tag == 'image_size_exceeded' - - def __repr__(self): - return 'PaperDocCreateError(%r, %r)' % (self._tag, self._value) - -PaperDocCreateError_validator = bv.Union(PaperDocCreateError) - -class PaperDocCreateUpdateResult(object): - """ - :ivar doc_id: Doc ID of the newly created doc. - :ivar revision: The Paper doc revision. Simply an ever increasing number. - :ivar title: The Paper doc title. - """ - - __slots__ = [ - '_doc_id_value', - '_doc_id_present', - '_revision_value', - '_revision_present', - '_title_value', - '_title_present', - ] - - _has_required_fields = True - - def __init__(self, - doc_id=None, - revision=None, - title=None): - self._doc_id_value = None - self._doc_id_present = False - self._revision_value = None - self._revision_present = False - self._title_value = None - self._title_present = False - if doc_id is not None: - self.doc_id = doc_id - if revision is not None: - self.revision = revision - if title is not None: - self.title = title - - @property - def doc_id(self): - """ - Doc ID of the newly created doc. - - :rtype: str - """ - if self._doc_id_present: - return self._doc_id_value - else: - raise AttributeError("missing required field 'doc_id'") - - @doc_id.setter - def doc_id(self, val): - val = self._doc_id_validator.validate(val) - self._doc_id_value = val - self._doc_id_present = True - - @doc_id.deleter - def doc_id(self): - self._doc_id_value = None - self._doc_id_present = False - - @property - def revision(self): - """ - The Paper doc revision. Simply an ever increasing number. - - :rtype: long - """ - if self._revision_present: - return self._revision_value - else: - raise AttributeError("missing required field 'revision'") - - @revision.setter - def revision(self, val): - val = self._revision_validator.validate(val) - self._revision_value = val - self._revision_present = True - - @revision.deleter - def revision(self): - self._revision_value = None - self._revision_present = False - - @property - def title(self): - """ - The Paper doc title. - - :rtype: str - """ - if self._title_present: - return self._title_value - else: - raise AttributeError("missing required field 'title'") - - @title.setter - def title(self, val): - val = self._title_validator.validate(val) - self._title_value = val - self._title_present = True - - @title.deleter - def title(self): - self._title_value = None - self._title_present = False - - def __repr__(self): - return 'PaperDocCreateUpdateResult(doc_id={!r}, revision={!r}, title={!r})'.format( - self._doc_id_value, - self._revision_value, - self._title_value, - ) - -PaperDocCreateUpdateResult_validator = bv.Struct(PaperDocCreateUpdateResult) - -class PaperDocExport(RefPaperDoc): - - __slots__ = [ - '_export_format_value', - '_export_format_present', - ] - - _has_required_fields = True - - def __init__(self, - doc_id=None, - export_format=None): - super(PaperDocExport, self).__init__(doc_id) - self._export_format_value = None - self._export_format_present = False - if export_format is not None: - self.export_format = export_format - - @property - def export_format(self): - """ - :rtype: ExportFormat - """ - if self._export_format_present: - return self._export_format_value - else: - raise AttributeError("missing required field 'export_format'") - - @export_format.setter - def export_format(self, val): - self._export_format_validator.validate_type_only(val) - self._export_format_value = val - self._export_format_present = True - - @export_format.deleter - def export_format(self): - self._export_format_value = None - self._export_format_present = False - - def __repr__(self): - return 'PaperDocExport(doc_id={!r}, export_format={!r})'.format( - self._doc_id_value, - self._export_format_value, - ) - -PaperDocExport_validator = bv.Struct(PaperDocExport) - -class PaperDocExportResult(object): - """ - :ivar owner: The Paper doc owner's email address. - :ivar title: The Paper doc title. - :ivar revision: The Paper doc revision. Simply an ever increasing number. - :ivar mime_type: MIME type of the export. This corresponds to - :class:`ExportFormat` specified in the request. - """ - - __slots__ = [ - '_owner_value', - '_owner_present', - '_title_value', - '_title_present', - '_revision_value', - '_revision_present', - '_mime_type_value', - '_mime_type_present', - ] - - _has_required_fields = True - - def __init__(self, - owner=None, - title=None, - revision=None, - mime_type=None): - self._owner_value = None - self._owner_present = False - self._title_value = None - self._title_present = False - self._revision_value = None - self._revision_present = False - self._mime_type_value = None - self._mime_type_present = False - if owner is not None: - self.owner = owner - if title is not None: - self.title = title - if revision is not None: - self.revision = revision - if mime_type is not None: - self.mime_type = mime_type - - @property - def owner(self): - """ - The Paper doc owner's email address. - - :rtype: str - """ - if self._owner_present: - return self._owner_value - else: - raise AttributeError("missing required field 'owner'") - - @owner.setter - def owner(self, val): - val = self._owner_validator.validate(val) - self._owner_value = val - self._owner_present = True - - @owner.deleter - def owner(self): - self._owner_value = None - self._owner_present = False - - @property - def title(self): - """ - The Paper doc title. - - :rtype: str - """ - if self._title_present: - return self._title_value - else: - raise AttributeError("missing required field 'title'") - - @title.setter - def title(self, val): - val = self._title_validator.validate(val) - self._title_value = val - self._title_present = True - - @title.deleter - def title(self): - self._title_value = None - self._title_present = False - - @property - def revision(self): - """ - The Paper doc revision. Simply an ever increasing number. - - :rtype: long - """ - if self._revision_present: - return self._revision_value - else: - raise AttributeError("missing required field 'revision'") - - @revision.setter - def revision(self, val): - val = self._revision_validator.validate(val) - self._revision_value = val - self._revision_present = True - - @revision.deleter - def revision(self): - self._revision_value = None - self._revision_present = False - - @property - def mime_type(self): - """ - MIME type of the export. This corresponds to :class:`ExportFormat` - specified in the request. - - :rtype: str - """ - if self._mime_type_present: - return self._mime_type_value - else: - raise AttributeError("missing required field 'mime_type'") - - @mime_type.setter - def mime_type(self, val): - val = self._mime_type_validator.validate(val) - self._mime_type_value = val - self._mime_type_present = True - - @mime_type.deleter - def mime_type(self): - self._mime_type_value = None - self._mime_type_present = False - - def __repr__(self): - return 'PaperDocExportResult(owner={!r}, title={!r}, revision={!r}, mime_type={!r})'.format( - self._owner_value, - self._title_value, - self._revision_value, - self._mime_type_value, - ) - -PaperDocExportResult_validator = bv.Struct(PaperDocExportResult) - -class PaperDocPermissionLevel(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar edit: User will be granted edit permissions. - :ivar view_and_comment: User will be granted view and comment permissions. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - edit = None - # Attribute is overwritten below the class definition - view_and_comment = None - # Attribute is overwritten below the class definition - other = None - - def is_edit(self): - """ - Check if the union tag is ``edit``. - - :rtype: bool - """ - return self._tag == 'edit' - - def is_view_and_comment(self): - """ - Check if the union tag is ``view_and_comment``. - - :rtype: bool - """ - return self._tag == 'view_and_comment' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'PaperDocPermissionLevel(%r, %r)' % (self._tag, self._value) - -PaperDocPermissionLevel_validator = bv.Union(PaperDocPermissionLevel) - -class PaperDocSharingPolicy(RefPaperDoc): - """ - :ivar sharing_policy: The default sharing policy to be set for the Paper - doc. - """ - - __slots__ = [ - '_sharing_policy_value', - '_sharing_policy_present', - ] - - _has_required_fields = True - - def __init__(self, - doc_id=None, - sharing_policy=None): - super(PaperDocSharingPolicy, self).__init__(doc_id) - self._sharing_policy_value = None - self._sharing_policy_present = False - if sharing_policy is not None: - self.sharing_policy = sharing_policy - - @property - def sharing_policy(self): - """ - The default sharing policy to be set for the Paper doc. - - :rtype: SharingPolicy - """ - if self._sharing_policy_present: - return self._sharing_policy_value - else: - raise AttributeError("missing required field 'sharing_policy'") - - @sharing_policy.setter - def sharing_policy(self, val): - self._sharing_policy_validator.validate_type_only(val) - self._sharing_policy_value = val - self._sharing_policy_present = True - - @sharing_policy.deleter - def sharing_policy(self): - self._sharing_policy_value = None - self._sharing_policy_present = False - - def __repr__(self): - return 'PaperDocSharingPolicy(doc_id={!r}, sharing_policy={!r})'.format( - self._doc_id_value, - self._sharing_policy_value, - ) - -PaperDocSharingPolicy_validator = bv.Struct(PaperDocSharingPolicy) - -class PaperDocUpdateArgs(RefPaperDoc): - """ - :ivar doc_update_policy: The policy used for the current update call. - :ivar 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. - :ivar import_format: The format of provided data. - """ - - __slots__ = [ - '_doc_update_policy_value', - '_doc_update_policy_present', - '_revision_value', - '_revision_present', - '_import_format_value', - '_import_format_present', - ] - - _has_required_fields = True - - def __init__(self, - doc_id=None, - doc_update_policy=None, - revision=None, - import_format=None): - super(PaperDocUpdateArgs, self).__init__(doc_id) - self._doc_update_policy_value = None - self._doc_update_policy_present = False - self._revision_value = None - self._revision_present = False - self._import_format_value = None - self._import_format_present = False - if doc_update_policy is not None: - self.doc_update_policy = doc_update_policy - if revision is not None: - self.revision = revision - if import_format is not None: - self.import_format = import_format - - @property - def doc_update_policy(self): - """ - The policy used for the current update call. - - :rtype: PaperDocUpdatePolicy - """ - if self._doc_update_policy_present: - return self._doc_update_policy_value - else: - raise AttributeError("missing required field 'doc_update_policy'") - - @doc_update_policy.setter - def doc_update_policy(self, val): - self._doc_update_policy_validator.validate_type_only(val) - self._doc_update_policy_value = val - self._doc_update_policy_present = True - - @doc_update_policy.deleter - def doc_update_policy(self): - self._doc_update_policy_value = None - self._doc_update_policy_present = False - - @property - def revision(self): - """ - The latest doc revision. This value must match the head revision or an - error code will be returned. This is to prevent colliding writes. - - :rtype: long - """ - if self._revision_present: - return self._revision_value - else: - raise AttributeError("missing required field 'revision'") - - @revision.setter - def revision(self, val): - val = self._revision_validator.validate(val) - self._revision_value = val - self._revision_present = True - - @revision.deleter - def revision(self): - self._revision_value = None - self._revision_present = False - - @property - def import_format(self): - """ - The format of provided data. - - :rtype: ImportFormat - """ - if self._import_format_present: - return self._import_format_value - else: - raise AttributeError("missing required field 'import_format'") - - @import_format.setter - def import_format(self, val): - self._import_format_validator.validate_type_only(val) - self._import_format_value = val - self._import_format_present = True - - @import_format.deleter - def import_format(self): - self._import_format_value = None - self._import_format_present = False - - def __repr__(self): - return 'PaperDocUpdateArgs(doc_id={!r}, doc_update_policy={!r}, revision={!r}, import_format={!r})'.format( - self._doc_id_value, - self._doc_update_policy_value, - self._revision_value, - self._import_format_value, - ) - -PaperDocUpdateArgs_validator = bv.Struct(PaperDocUpdateArgs) - -class PaperDocUpdateError(DocLookupError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar content_malformed: The provided content was malformed and cannot be - imported to Paper. - :ivar revision_mismatch: The provided revision does not match the document - head. - :ivar doc_length_exceeded: The newly created Paper doc would be too large, - split the content into multiple docs. - :ivar image_size_exceeded: The imported document contains an image that is - too large. The current limit is 1MB. Note: This only applies to HTML - with data uri. - :ivar doc_archived: This operation is not allowed on archived Paper docs. - :ivar doc_deleted: This operation is not allowed on deleted Paper docs. - """ - - # Attribute is overwritten below the class definition - content_malformed = None - # Attribute is overwritten below the class definition - revision_mismatch = None - # Attribute is overwritten below the class definition - doc_length_exceeded = None - # Attribute is overwritten below the class definition - image_size_exceeded = None - # Attribute is overwritten below the class definition - doc_archived = None - # Attribute is overwritten below the class definition - doc_deleted = None - - def is_content_malformed(self): - """ - Check if the union tag is ``content_malformed``. - - :rtype: bool - """ - return self._tag == 'content_malformed' - - def is_revision_mismatch(self): - """ - Check if the union tag is ``revision_mismatch``. - - :rtype: bool - """ - return self._tag == 'revision_mismatch' - - def is_doc_length_exceeded(self): - """ - Check if the union tag is ``doc_length_exceeded``. - - :rtype: bool - """ - return self._tag == 'doc_length_exceeded' - - def is_image_size_exceeded(self): - """ - Check if the union tag is ``image_size_exceeded``. - - :rtype: bool - """ - return self._tag == 'image_size_exceeded' - - def is_doc_archived(self): - """ - Check if the union tag is ``doc_archived``. - - :rtype: bool - """ - return self._tag == 'doc_archived' - - def is_doc_deleted(self): - """ - Check if the union tag is ``doc_deleted``. - - :rtype: bool - """ - return self._tag == 'doc_deleted' - - def __repr__(self): - return 'PaperDocUpdateError(%r, %r)' % (self._tag, self._value) - -PaperDocUpdateError_validator = bv.Union(PaperDocUpdateError) - -class PaperDocUpdatePolicy(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar append: The content will be appended to the doc. - :ivar prepend: The content will be prepended to the doc. Note: the doc title - will not be affected. - :ivar overwrite_all: The document will be overwitten at the head with the - provided content. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - append = None - # Attribute is overwritten below the class definition - prepend = None - # Attribute is overwritten below the class definition - overwrite_all = None - # Attribute is overwritten below the class definition - other = None - - def is_append(self): - """ - Check if the union tag is ``append``. - - :rtype: bool - """ - return self._tag == 'append' - - def is_prepend(self): - """ - Check if the union tag is ``prepend``. - - :rtype: bool - """ - return self._tag == 'prepend' - - def is_overwrite_all(self): - """ - Check if the union tag is ``overwrite_all``. - - :rtype: bool - """ - return self._tag == 'overwrite_all' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'PaperDocUpdatePolicy(%r, %r)' % (self._tag, self._value) - -PaperDocUpdatePolicy_validator = bv.Union(PaperDocUpdatePolicy) - -class RemovePaperDocUser(RefPaperDoc): - """ - :ivar member: User which should be removed from the Paper doc. Specify only - email address or Dropbox account ID. - """ - - __slots__ = [ - '_member_value', - '_member_present', - ] - - _has_required_fields = True - - def __init__(self, - doc_id=None, - member=None): - super(RemovePaperDocUser, self).__init__(doc_id) - self._member_value = None - self._member_present = False - if member is not None: - self.member = member - - @property - def member(self): - """ - User which should be removed from the Paper doc. Specify only email - address or Dropbox account ID. - - :rtype: sharing.MemberSelector_validator - """ - if self._member_present: - return self._member_value - else: - raise AttributeError("missing required field 'member'") - - @member.setter - def member(self, val): - self._member_validator.validate_type_only(val) - self._member_value = val - self._member_present = True - - @member.deleter - def member(self): - self._member_value = None - self._member_present = False - - def __repr__(self): - return 'RemovePaperDocUser(doc_id={!r}, member={!r})'.format( - self._doc_id_value, - self._member_value, - ) - -RemovePaperDocUser_validator = bv.Struct(RemovePaperDocUser) - -class SharingPolicy(object): - """ - Sharing policy of Paper doc. - - :ivar public_sharing_policy: This value applies to the non-team members. - :ivar team_sharing_policy: This value applies to the team members only. The - value is null for all personal accounts. - """ - - __slots__ = [ - '_public_sharing_policy_value', - '_public_sharing_policy_present', - '_team_sharing_policy_value', - '_team_sharing_policy_present', - ] - - _has_required_fields = False - - def __init__(self, - public_sharing_policy=None, - team_sharing_policy=None): - self._public_sharing_policy_value = None - self._public_sharing_policy_present = False - self._team_sharing_policy_value = None - self._team_sharing_policy_present = False - if public_sharing_policy is not None: - self.public_sharing_policy = public_sharing_policy - if team_sharing_policy is not None: - self.team_sharing_policy = team_sharing_policy - - @property - def public_sharing_policy(self): - """ - This value applies to the non-team members. - - :rtype: SharingPublicPolicyType - """ - if self._public_sharing_policy_present: - return self._public_sharing_policy_value - else: - return None - - @public_sharing_policy.setter - def public_sharing_policy(self, val): - if val is None: - del self.public_sharing_policy - return - self._public_sharing_policy_validator.validate_type_only(val) - self._public_sharing_policy_value = val - self._public_sharing_policy_present = True - - @public_sharing_policy.deleter - def public_sharing_policy(self): - self._public_sharing_policy_value = None - self._public_sharing_policy_present = False - - @property - def team_sharing_policy(self): - """ - This value applies to the team members only. The value is null for all - personal accounts. - - :rtype: SharingTeamPolicyType - """ - if self._team_sharing_policy_present: - return self._team_sharing_policy_value - else: - return None - - @team_sharing_policy.setter - def team_sharing_policy(self, val): - if val is None: - del self.team_sharing_policy - return - self._team_sharing_policy_validator.validate_type_only(val) - self._team_sharing_policy_value = val - self._team_sharing_policy_present = True - - @team_sharing_policy.deleter - def team_sharing_policy(self): - self._team_sharing_policy_value = None - self._team_sharing_policy_present = False - - def __repr__(self): - return 'SharingPolicy(public_sharing_policy={!r}, team_sharing_policy={!r})'.format( - self._public_sharing_policy_value, - self._team_sharing_policy_value, - ) - -SharingPolicy_validator = bv.Struct(SharingPolicy) - -class SharingTeamPolicyType(bb.Union): - """ - The sharing policy type of the Paper doc. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar people_with_link_can_edit: Users who have a link to this doc can edit - it. - :ivar people_with_link_can_view_and_comment: Users who have a link to this - doc can view and comment on it. - :ivar invite_only: Users must be explicitly invited to this doc. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - people_with_link_can_edit = None - # Attribute is overwritten below the class definition - people_with_link_can_view_and_comment = None - # Attribute is overwritten below the class definition - invite_only = None - - def is_people_with_link_can_edit(self): - """ - Check if the union tag is ``people_with_link_can_edit``. - - :rtype: bool - """ - return self._tag == 'people_with_link_can_edit' - - def is_people_with_link_can_view_and_comment(self): - """ - Check if the union tag is ``people_with_link_can_view_and_comment``. - - :rtype: bool - """ - return self._tag == 'people_with_link_can_view_and_comment' - - def is_invite_only(self): - """ - Check if the union tag is ``invite_only``. - - :rtype: bool - """ - return self._tag == 'invite_only' - - def __repr__(self): - return 'SharingTeamPolicyType(%r, %r)' % (self._tag, self._value) - -SharingTeamPolicyType_validator = bv.Union(SharingTeamPolicyType) - -class SharingPublicPolicyType(SharingTeamPolicyType): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar disabled: Value used to indicate that doc sharing is enabled only - within team. - """ - - # Attribute is overwritten below the class definition - disabled = None - - def is_disabled(self): - """ - Check if the union tag is ``disabled``. - - :rtype: bool - """ - return self._tag == 'disabled' - - def __repr__(self): - return 'SharingPublicPolicyType(%r, %r)' % (self._tag, self._value) - -SharingPublicPolicyType_validator = bv.Union(SharingPublicPolicyType) - -class UserInfoWithPermissionLevel(object): - """ - :ivar user: User shared on the Paper doc. - :ivar permission_level: Permission level for the user. - """ - - __slots__ = [ - '_user_value', - '_user_present', - '_permission_level_value', - '_permission_level_present', - ] - - _has_required_fields = True - - def __init__(self, - user=None, - permission_level=None): - self._user_value = None - self._user_present = False - self._permission_level_value = None - self._permission_level_present = False - if user is not None: - self.user = user - if permission_level is not None: - self.permission_level = permission_level - - @property - def user(self): - """ - User shared on the Paper doc. - - :rtype: sharing.UserInfo_validator - """ - if self._user_present: - return self._user_value - else: - raise AttributeError("missing required field 'user'") - - @user.setter - def user(self, val): - self._user_validator.validate_type_only(val) - self._user_value = val - self._user_present = True - - @user.deleter - def user(self): - self._user_value = None - self._user_present = False - - @property - def permission_level(self): - """ - Permission level for the user. - - :rtype: PaperDocPermissionLevel - """ - if self._permission_level_present: - return self._permission_level_value - else: - raise AttributeError("missing required field 'permission_level'") - - @permission_level.setter - def permission_level(self, val): - self._permission_level_validator.validate_type_only(val) - self._permission_level_value = val - self._permission_level_present = True - - @permission_level.deleter - def permission_level(self): - self._permission_level_value = None - self._permission_level_present = False - - def __repr__(self): - return 'UserInfoWithPermissionLevel(user={!r}, permission_level={!r})'.format( - self._user_value, - self._permission_level_value, - ) - -UserInfoWithPermissionLevel_validator = bv.Struct(UserInfoWithPermissionLevel) - -class UserOnPaperDocFilter(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar visited: all users who have visited the Paper doc. - :ivar shared: All uses who are shared on the Paper doc. This includes all - users who have visited the Paper doc as well as those who have not. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - visited = None - # Attribute is overwritten below the class definition - shared = None - # Attribute is overwritten below the class definition - other = None - - def is_visited(self): - """ - Check if the union tag is ``visited``. - - :rtype: bool - """ - return self._tag == 'visited' - - def is_shared(self): - """ - Check if the union tag is ``shared``. - - :rtype: bool - """ - return self._tag == 'shared' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'UserOnPaperDocFilter(%r, %r)' % (self._tag, self._value) - -UserOnPaperDocFilter_validator = bv.Union(UserOnPaperDocFilter) - -# Paper doc ID. -PaperDocId_validator = bv.String() -AddMember._permission_level_validator = PaperDocPermissionLevel_validator -AddMember._member_validator = sharing.MemberSelector_validator -AddMember._all_field_names_ = set([ - 'permission_level', - 'member', -]) -AddMember._all_fields_ = [ - ('permission_level', AddMember._permission_level_validator), - ('member', AddMember._member_validator), -] - -RefPaperDoc._doc_id_validator = PaperDocId_validator -RefPaperDoc._all_field_names_ = set(['doc_id']) -RefPaperDoc._all_fields_ = [('doc_id', RefPaperDoc._doc_id_validator)] - -AddPaperDocUser._members_validator = bv.List(AddMember_validator, max_items=20) -AddPaperDocUser._custom_message_validator = bv.Nullable(bv.String()) -AddPaperDocUser._quiet_validator = bv.Boolean() -AddPaperDocUser._all_field_names_ = RefPaperDoc._all_field_names_.union(set([ - 'members', - 'custom_message', - 'quiet', -])) -AddPaperDocUser._all_fields_ = RefPaperDoc._all_fields_ + [ - ('members', AddPaperDocUser._members_validator), - ('custom_message', AddPaperDocUser._custom_message_validator), - ('quiet', AddPaperDocUser._quiet_validator), -] - -AddPaperDocUserMemberResult._member_validator = sharing.MemberSelector_validator -AddPaperDocUserMemberResult._result_validator = AddPaperDocUserResult_validator -AddPaperDocUserMemberResult._all_field_names_ = set([ - 'member', - 'result', -]) -AddPaperDocUserMemberResult._all_fields_ = [ - ('member', AddPaperDocUserMemberResult._member_validator), - ('result', AddPaperDocUserMemberResult._result_validator), -] - -AddPaperDocUserResult._success_validator = bv.Void() -AddPaperDocUserResult._unknown_error_validator = bv.Void() -AddPaperDocUserResult._sharing_outside_team_disabled_validator = bv.Void() -AddPaperDocUserResult._daily_limit_reached_validator = bv.Void() -AddPaperDocUserResult._user_is_owner_validator = bv.Void() -AddPaperDocUserResult._failed_user_data_retrieval_validator = bv.Void() -AddPaperDocUserResult._permission_already_granted_validator = bv.Void() -AddPaperDocUserResult._other_validator = bv.Void() -AddPaperDocUserResult._tagmap = { - 'success': AddPaperDocUserResult._success_validator, - 'unknown_error': AddPaperDocUserResult._unknown_error_validator, - 'sharing_outside_team_disabled': AddPaperDocUserResult._sharing_outside_team_disabled_validator, - 'daily_limit_reached': AddPaperDocUserResult._daily_limit_reached_validator, - 'user_is_owner': AddPaperDocUserResult._user_is_owner_validator, - 'failed_user_data_retrieval': AddPaperDocUserResult._failed_user_data_retrieval_validator, - 'permission_already_granted': AddPaperDocUserResult._permission_already_granted_validator, - 'other': AddPaperDocUserResult._other_validator, -} - -AddPaperDocUserResult.success = AddPaperDocUserResult('success') -AddPaperDocUserResult.unknown_error = AddPaperDocUserResult('unknown_error') -AddPaperDocUserResult.sharing_outside_team_disabled = AddPaperDocUserResult('sharing_outside_team_disabled') -AddPaperDocUserResult.daily_limit_reached = AddPaperDocUserResult('daily_limit_reached') -AddPaperDocUserResult.user_is_owner = AddPaperDocUserResult('user_is_owner') -AddPaperDocUserResult.failed_user_data_retrieval = AddPaperDocUserResult('failed_user_data_retrieval') -AddPaperDocUserResult.permission_already_granted = AddPaperDocUserResult('permission_already_granted') -AddPaperDocUserResult.other = AddPaperDocUserResult('other') - -Cursor._value_validator = bv.String() -Cursor._expiration_validator = bv.Nullable(common.DropboxTimestamp_validator) -Cursor._all_field_names_ = set([ - 'value', - 'expiration', -]) -Cursor._all_fields_ = [ - ('value', Cursor._value_validator), - ('expiration', Cursor._expiration_validator), -] - -PaperApiBaseError._insufficient_permissions_validator = bv.Void() -PaperApiBaseError._other_validator = bv.Void() -PaperApiBaseError._tagmap = { - 'insufficient_permissions': PaperApiBaseError._insufficient_permissions_validator, - 'other': PaperApiBaseError._other_validator, -} - -PaperApiBaseError.insufficient_permissions = PaperApiBaseError('insufficient_permissions') -PaperApiBaseError.other = PaperApiBaseError('other') - -DocLookupError._doc_not_found_validator = bv.Void() -DocLookupError._tagmap = { - 'doc_not_found': DocLookupError._doc_not_found_validator, -} -DocLookupError._tagmap.update(PaperApiBaseError._tagmap) - -DocLookupError.doc_not_found = DocLookupError('doc_not_found') - -DocSubscriptionLevel._default_validator = bv.Void() -DocSubscriptionLevel._ignore_validator = bv.Void() -DocSubscriptionLevel._every_validator = bv.Void() -DocSubscriptionLevel._no_email_validator = bv.Void() -DocSubscriptionLevel._tagmap = { - 'default': DocSubscriptionLevel._default_validator, - 'ignore': DocSubscriptionLevel._ignore_validator, - 'every': DocSubscriptionLevel._every_validator, - 'no_email': DocSubscriptionLevel._no_email_validator, -} - -DocSubscriptionLevel.default = DocSubscriptionLevel('default') -DocSubscriptionLevel.ignore = DocSubscriptionLevel('ignore') -DocSubscriptionLevel.every = DocSubscriptionLevel('every') -DocSubscriptionLevel.no_email = DocSubscriptionLevel('no_email') - -ExportFormat._html_validator = bv.Void() -ExportFormat._markdown_validator = bv.Void() -ExportFormat._other_validator = bv.Void() -ExportFormat._tagmap = { - 'html': ExportFormat._html_validator, - 'markdown': ExportFormat._markdown_validator, - 'other': ExportFormat._other_validator, -} - -ExportFormat.html = ExportFormat('html') -ExportFormat.markdown = ExportFormat('markdown') -ExportFormat.other = ExportFormat('other') - -Folder._id_validator = bv.String() -Folder._name_validator = bv.String() -Folder._all_field_names_ = set([ - 'id', - 'name', -]) -Folder._all_fields_ = [ - ('id', Folder._id_validator), - ('name', Folder._name_validator), -] - -FolderSharingPolicyType._team_validator = bv.Void() -FolderSharingPolicyType._invite_only_validator = bv.Void() -FolderSharingPolicyType._tagmap = { - 'team': FolderSharingPolicyType._team_validator, - 'invite_only': FolderSharingPolicyType._invite_only_validator, -} - -FolderSharingPolicyType.team = FolderSharingPolicyType('team') -FolderSharingPolicyType.invite_only = FolderSharingPolicyType('invite_only') - -FolderSubscriptionLevel._none_validator = bv.Void() -FolderSubscriptionLevel._activity_only_validator = bv.Void() -FolderSubscriptionLevel._daily_emails_validator = bv.Void() -FolderSubscriptionLevel._weekly_emails_validator = bv.Void() -FolderSubscriptionLevel._tagmap = { - 'none': FolderSubscriptionLevel._none_validator, - 'activity_only': FolderSubscriptionLevel._activity_only_validator, - 'daily_emails': FolderSubscriptionLevel._daily_emails_validator, - 'weekly_emails': FolderSubscriptionLevel._weekly_emails_validator, -} - -FolderSubscriptionLevel.none = FolderSubscriptionLevel('none') -FolderSubscriptionLevel.activity_only = FolderSubscriptionLevel('activity_only') -FolderSubscriptionLevel.daily_emails = FolderSubscriptionLevel('daily_emails') -FolderSubscriptionLevel.weekly_emails = FolderSubscriptionLevel('weekly_emails') - -FoldersContainingPaperDoc._folder_sharing_policy_type_validator = bv.Nullable(FolderSharingPolicyType_validator) -FoldersContainingPaperDoc._folders_validator = bv.Nullable(bv.List(Folder_validator)) -FoldersContainingPaperDoc._all_field_names_ = set([ - 'folder_sharing_policy_type', - 'folders', -]) -FoldersContainingPaperDoc._all_fields_ = [ - ('folder_sharing_policy_type', FoldersContainingPaperDoc._folder_sharing_policy_type_validator), - ('folders', FoldersContainingPaperDoc._folders_validator), -] - -ImportFormat._html_validator = bv.Void() -ImportFormat._markdown_validator = bv.Void() -ImportFormat._plain_text_validator = bv.Void() -ImportFormat._other_validator = bv.Void() -ImportFormat._tagmap = { - 'html': ImportFormat._html_validator, - 'markdown': ImportFormat._markdown_validator, - 'plain_text': ImportFormat._plain_text_validator, - 'other': ImportFormat._other_validator, -} - -ImportFormat.html = ImportFormat('html') -ImportFormat.markdown = ImportFormat('markdown') -ImportFormat.plain_text = ImportFormat('plain_text') -ImportFormat.other = ImportFormat('other') - -InviteeInfoWithPermissionLevel._invitee_validator = sharing.InviteeInfo_validator -InviteeInfoWithPermissionLevel._permission_level_validator = PaperDocPermissionLevel_validator -InviteeInfoWithPermissionLevel._all_field_names_ = set([ - 'invitee', - 'permission_level', -]) -InviteeInfoWithPermissionLevel._all_fields_ = [ - ('invitee', InviteeInfoWithPermissionLevel._invitee_validator), - ('permission_level', InviteeInfoWithPermissionLevel._permission_level_validator), -] - -ListDocsCursorError._cursor_error_validator = PaperApiCursorError_validator -ListDocsCursorError._other_validator = bv.Void() -ListDocsCursorError._tagmap = { - 'cursor_error': ListDocsCursorError._cursor_error_validator, - 'other': ListDocsCursorError._other_validator, -} - -ListDocsCursorError.other = ListDocsCursorError('other') - -ListPaperDocsArgs._filter_by_validator = ListPaperDocsFilterBy_validator -ListPaperDocsArgs._sort_by_validator = ListPaperDocsSortBy_validator -ListPaperDocsArgs._sort_order_validator = ListPaperDocsSortOrder_validator -ListPaperDocsArgs._limit_validator = bv.Int32(min_value=1, max_value=1000) -ListPaperDocsArgs._all_field_names_ = set([ - 'filter_by', - 'sort_by', - 'sort_order', - 'limit', -]) -ListPaperDocsArgs._all_fields_ = [ - ('filter_by', ListPaperDocsArgs._filter_by_validator), - ('sort_by', ListPaperDocsArgs._sort_by_validator), - ('sort_order', ListPaperDocsArgs._sort_order_validator), - ('limit', ListPaperDocsArgs._limit_validator), -] - -ListPaperDocsContinueArgs._cursor_validator = bv.String() -ListPaperDocsContinueArgs._all_field_names_ = set(['cursor']) -ListPaperDocsContinueArgs._all_fields_ = [('cursor', ListPaperDocsContinueArgs._cursor_validator)] - -ListPaperDocsFilterBy._docs_accessed_validator = bv.Void() -ListPaperDocsFilterBy._docs_created_validator = bv.Void() -ListPaperDocsFilterBy._other_validator = bv.Void() -ListPaperDocsFilterBy._tagmap = { - 'docs_accessed': ListPaperDocsFilterBy._docs_accessed_validator, - 'docs_created': ListPaperDocsFilterBy._docs_created_validator, - 'other': ListPaperDocsFilterBy._other_validator, -} - -ListPaperDocsFilterBy.docs_accessed = ListPaperDocsFilterBy('docs_accessed') -ListPaperDocsFilterBy.docs_created = ListPaperDocsFilterBy('docs_created') -ListPaperDocsFilterBy.other = ListPaperDocsFilterBy('other') - -ListPaperDocsResponse._doc_ids_validator = bv.List(bv.String()) -ListPaperDocsResponse._cursor_validator = Cursor_validator -ListPaperDocsResponse._has_more_validator = bv.Boolean() -ListPaperDocsResponse._all_field_names_ = set([ - 'doc_ids', - 'cursor', - 'has_more', -]) -ListPaperDocsResponse._all_fields_ = [ - ('doc_ids', ListPaperDocsResponse._doc_ids_validator), - ('cursor', ListPaperDocsResponse._cursor_validator), - ('has_more', ListPaperDocsResponse._has_more_validator), -] - -ListPaperDocsSortBy._accessed_validator = bv.Void() -ListPaperDocsSortBy._modified_validator = bv.Void() -ListPaperDocsSortBy._created_validator = bv.Void() -ListPaperDocsSortBy._other_validator = bv.Void() -ListPaperDocsSortBy._tagmap = { - 'accessed': ListPaperDocsSortBy._accessed_validator, - 'modified': ListPaperDocsSortBy._modified_validator, - 'created': ListPaperDocsSortBy._created_validator, - 'other': ListPaperDocsSortBy._other_validator, -} - -ListPaperDocsSortBy.accessed = ListPaperDocsSortBy('accessed') -ListPaperDocsSortBy.modified = ListPaperDocsSortBy('modified') -ListPaperDocsSortBy.created = ListPaperDocsSortBy('created') -ListPaperDocsSortBy.other = ListPaperDocsSortBy('other') - -ListPaperDocsSortOrder._ascending_validator = bv.Void() -ListPaperDocsSortOrder._descending_validator = bv.Void() -ListPaperDocsSortOrder._other_validator = bv.Void() -ListPaperDocsSortOrder._tagmap = { - 'ascending': ListPaperDocsSortOrder._ascending_validator, - 'descending': ListPaperDocsSortOrder._descending_validator, - 'other': ListPaperDocsSortOrder._other_validator, -} - -ListPaperDocsSortOrder.ascending = ListPaperDocsSortOrder('ascending') -ListPaperDocsSortOrder.descending = ListPaperDocsSortOrder('descending') -ListPaperDocsSortOrder.other = ListPaperDocsSortOrder('other') - -ListUsersCursorError._doc_not_found_validator = bv.Void() -ListUsersCursorError._cursor_error_validator = PaperApiCursorError_validator -ListUsersCursorError._tagmap = { - 'doc_not_found': ListUsersCursorError._doc_not_found_validator, - 'cursor_error': ListUsersCursorError._cursor_error_validator, -} -ListUsersCursorError._tagmap.update(PaperApiBaseError._tagmap) - -ListUsersCursorError.doc_not_found = ListUsersCursorError('doc_not_found') - -ListUsersOnFolderArgs._limit_validator = bv.Int32(min_value=1, max_value=1000) -ListUsersOnFolderArgs._all_field_names_ = RefPaperDoc._all_field_names_.union(set(['limit'])) -ListUsersOnFolderArgs._all_fields_ = RefPaperDoc._all_fields_ + [('limit', ListUsersOnFolderArgs._limit_validator)] - -ListUsersOnFolderContinueArgs._cursor_validator = bv.String() -ListUsersOnFolderContinueArgs._all_field_names_ = RefPaperDoc._all_field_names_.union(set(['cursor'])) -ListUsersOnFolderContinueArgs._all_fields_ = RefPaperDoc._all_fields_ + [('cursor', ListUsersOnFolderContinueArgs._cursor_validator)] - -ListUsersOnFolderResponse._invitees_validator = bv.List(sharing.InviteeInfo_validator) -ListUsersOnFolderResponse._users_validator = bv.List(sharing.UserInfo_validator) -ListUsersOnFolderResponse._cursor_validator = Cursor_validator -ListUsersOnFolderResponse._has_more_validator = bv.Boolean() -ListUsersOnFolderResponse._all_field_names_ = set([ - 'invitees', - 'users', - 'cursor', - 'has_more', -]) -ListUsersOnFolderResponse._all_fields_ = [ - ('invitees', ListUsersOnFolderResponse._invitees_validator), - ('users', ListUsersOnFolderResponse._users_validator), - ('cursor', ListUsersOnFolderResponse._cursor_validator), - ('has_more', ListUsersOnFolderResponse._has_more_validator), -] - -ListUsersOnPaperDocArgs._limit_validator = bv.Int32(min_value=1, max_value=1000) -ListUsersOnPaperDocArgs._filter_by_validator = UserOnPaperDocFilter_validator -ListUsersOnPaperDocArgs._all_field_names_ = RefPaperDoc._all_field_names_.union(set([ - 'limit', - 'filter_by', -])) -ListUsersOnPaperDocArgs._all_fields_ = RefPaperDoc._all_fields_ + [ - ('limit', ListUsersOnPaperDocArgs._limit_validator), - ('filter_by', ListUsersOnPaperDocArgs._filter_by_validator), -] - -ListUsersOnPaperDocContinueArgs._cursor_validator = bv.String() -ListUsersOnPaperDocContinueArgs._all_field_names_ = RefPaperDoc._all_field_names_.union(set(['cursor'])) -ListUsersOnPaperDocContinueArgs._all_fields_ = RefPaperDoc._all_fields_ + [('cursor', ListUsersOnPaperDocContinueArgs._cursor_validator)] - -ListUsersOnPaperDocResponse._invitees_validator = bv.List(InviteeInfoWithPermissionLevel_validator) -ListUsersOnPaperDocResponse._users_validator = bv.List(UserInfoWithPermissionLevel_validator) -ListUsersOnPaperDocResponse._doc_owner_validator = sharing.UserInfo_validator -ListUsersOnPaperDocResponse._cursor_validator = Cursor_validator -ListUsersOnPaperDocResponse._has_more_validator = bv.Boolean() -ListUsersOnPaperDocResponse._all_field_names_ = set([ - 'invitees', - 'users', - 'doc_owner', - 'cursor', - 'has_more', -]) -ListUsersOnPaperDocResponse._all_fields_ = [ - ('invitees', ListUsersOnPaperDocResponse._invitees_validator), - ('users', ListUsersOnPaperDocResponse._users_validator), - ('doc_owner', ListUsersOnPaperDocResponse._doc_owner_validator), - ('cursor', ListUsersOnPaperDocResponse._cursor_validator), - ('has_more', ListUsersOnPaperDocResponse._has_more_validator), -] - -PaperApiCursorError._expired_cursor_validator = bv.Void() -PaperApiCursorError._invalid_cursor_validator = bv.Void() -PaperApiCursorError._wrong_user_in_cursor_validator = bv.Void() -PaperApiCursorError._reset_validator = bv.Void() -PaperApiCursorError._other_validator = bv.Void() -PaperApiCursorError._tagmap = { - 'expired_cursor': PaperApiCursorError._expired_cursor_validator, - 'invalid_cursor': PaperApiCursorError._invalid_cursor_validator, - 'wrong_user_in_cursor': PaperApiCursorError._wrong_user_in_cursor_validator, - 'reset': PaperApiCursorError._reset_validator, - 'other': PaperApiCursorError._other_validator, -} - -PaperApiCursorError.expired_cursor = PaperApiCursorError('expired_cursor') -PaperApiCursorError.invalid_cursor = PaperApiCursorError('invalid_cursor') -PaperApiCursorError.wrong_user_in_cursor = PaperApiCursorError('wrong_user_in_cursor') -PaperApiCursorError.reset = PaperApiCursorError('reset') -PaperApiCursorError.other = PaperApiCursorError('other') - -PaperDocCreateArgs._parent_folder_id_validator = bv.Nullable(bv.String()) -PaperDocCreateArgs._import_format_validator = ImportFormat_validator -PaperDocCreateArgs._all_field_names_ = set([ - 'parent_folder_id', - 'import_format', -]) -PaperDocCreateArgs._all_fields_ = [ - ('parent_folder_id', PaperDocCreateArgs._parent_folder_id_validator), - ('import_format', PaperDocCreateArgs._import_format_validator), -] - -PaperDocCreateError._content_malformed_validator = bv.Void() -PaperDocCreateError._folder_not_found_validator = bv.Void() -PaperDocCreateError._doc_length_exceeded_validator = bv.Void() -PaperDocCreateError._image_size_exceeded_validator = bv.Void() -PaperDocCreateError._tagmap = { - 'content_malformed': PaperDocCreateError._content_malformed_validator, - 'folder_not_found': PaperDocCreateError._folder_not_found_validator, - 'doc_length_exceeded': PaperDocCreateError._doc_length_exceeded_validator, - 'image_size_exceeded': PaperDocCreateError._image_size_exceeded_validator, -} -PaperDocCreateError._tagmap.update(PaperApiBaseError._tagmap) - -PaperDocCreateError.content_malformed = PaperDocCreateError('content_malformed') -PaperDocCreateError.folder_not_found = PaperDocCreateError('folder_not_found') -PaperDocCreateError.doc_length_exceeded = PaperDocCreateError('doc_length_exceeded') -PaperDocCreateError.image_size_exceeded = PaperDocCreateError('image_size_exceeded') - -PaperDocCreateUpdateResult._doc_id_validator = bv.String() -PaperDocCreateUpdateResult._revision_validator = bv.Int64() -PaperDocCreateUpdateResult._title_validator = bv.String() -PaperDocCreateUpdateResult._all_field_names_ = set([ - 'doc_id', - 'revision', - 'title', -]) -PaperDocCreateUpdateResult._all_fields_ = [ - ('doc_id', PaperDocCreateUpdateResult._doc_id_validator), - ('revision', PaperDocCreateUpdateResult._revision_validator), - ('title', PaperDocCreateUpdateResult._title_validator), -] - -PaperDocExport._export_format_validator = ExportFormat_validator -PaperDocExport._all_field_names_ = RefPaperDoc._all_field_names_.union(set(['export_format'])) -PaperDocExport._all_fields_ = RefPaperDoc._all_fields_ + [('export_format', PaperDocExport._export_format_validator)] - -PaperDocExportResult._owner_validator = bv.String() -PaperDocExportResult._title_validator = bv.String() -PaperDocExportResult._revision_validator = bv.Int64() -PaperDocExportResult._mime_type_validator = bv.String() -PaperDocExportResult._all_field_names_ = set([ - 'owner', - 'title', - 'revision', - 'mime_type', -]) -PaperDocExportResult._all_fields_ = [ - ('owner', PaperDocExportResult._owner_validator), - ('title', PaperDocExportResult._title_validator), - ('revision', PaperDocExportResult._revision_validator), - ('mime_type', PaperDocExportResult._mime_type_validator), -] - -PaperDocPermissionLevel._edit_validator = bv.Void() -PaperDocPermissionLevel._view_and_comment_validator = bv.Void() -PaperDocPermissionLevel._other_validator = bv.Void() -PaperDocPermissionLevel._tagmap = { - 'edit': PaperDocPermissionLevel._edit_validator, - 'view_and_comment': PaperDocPermissionLevel._view_and_comment_validator, - 'other': PaperDocPermissionLevel._other_validator, -} - -PaperDocPermissionLevel.edit = PaperDocPermissionLevel('edit') -PaperDocPermissionLevel.view_and_comment = PaperDocPermissionLevel('view_and_comment') -PaperDocPermissionLevel.other = PaperDocPermissionLevel('other') - -PaperDocSharingPolicy._sharing_policy_validator = SharingPolicy_validator -PaperDocSharingPolicy._all_field_names_ = RefPaperDoc._all_field_names_.union(set(['sharing_policy'])) -PaperDocSharingPolicy._all_fields_ = RefPaperDoc._all_fields_ + [('sharing_policy', PaperDocSharingPolicy._sharing_policy_validator)] - -PaperDocUpdateArgs._doc_update_policy_validator = PaperDocUpdatePolicy_validator -PaperDocUpdateArgs._revision_validator = bv.Int64() -PaperDocUpdateArgs._import_format_validator = ImportFormat_validator -PaperDocUpdateArgs._all_field_names_ = RefPaperDoc._all_field_names_.union(set([ - 'doc_update_policy', - 'revision', - 'import_format', -])) -PaperDocUpdateArgs._all_fields_ = RefPaperDoc._all_fields_ + [ - ('doc_update_policy', PaperDocUpdateArgs._doc_update_policy_validator), - ('revision', PaperDocUpdateArgs._revision_validator), - ('import_format', PaperDocUpdateArgs._import_format_validator), -] - -PaperDocUpdateError._content_malformed_validator = bv.Void() -PaperDocUpdateError._revision_mismatch_validator = bv.Void() -PaperDocUpdateError._doc_length_exceeded_validator = bv.Void() -PaperDocUpdateError._image_size_exceeded_validator = bv.Void() -PaperDocUpdateError._doc_archived_validator = bv.Void() -PaperDocUpdateError._doc_deleted_validator = bv.Void() -PaperDocUpdateError._tagmap = { - 'content_malformed': PaperDocUpdateError._content_malformed_validator, - 'revision_mismatch': PaperDocUpdateError._revision_mismatch_validator, - 'doc_length_exceeded': PaperDocUpdateError._doc_length_exceeded_validator, - 'image_size_exceeded': PaperDocUpdateError._image_size_exceeded_validator, - 'doc_archived': PaperDocUpdateError._doc_archived_validator, - 'doc_deleted': PaperDocUpdateError._doc_deleted_validator, -} -PaperDocUpdateError._tagmap.update(DocLookupError._tagmap) - -PaperDocUpdateError.content_malformed = PaperDocUpdateError('content_malformed') -PaperDocUpdateError.revision_mismatch = PaperDocUpdateError('revision_mismatch') -PaperDocUpdateError.doc_length_exceeded = PaperDocUpdateError('doc_length_exceeded') -PaperDocUpdateError.image_size_exceeded = PaperDocUpdateError('image_size_exceeded') -PaperDocUpdateError.doc_archived = PaperDocUpdateError('doc_archived') -PaperDocUpdateError.doc_deleted = PaperDocUpdateError('doc_deleted') - -PaperDocUpdatePolicy._append_validator = bv.Void() -PaperDocUpdatePolicy._prepend_validator = bv.Void() -PaperDocUpdatePolicy._overwrite_all_validator = bv.Void() -PaperDocUpdatePolicy._other_validator = bv.Void() -PaperDocUpdatePolicy._tagmap = { - 'append': PaperDocUpdatePolicy._append_validator, - 'prepend': PaperDocUpdatePolicy._prepend_validator, - 'overwrite_all': PaperDocUpdatePolicy._overwrite_all_validator, - 'other': PaperDocUpdatePolicy._other_validator, -} - -PaperDocUpdatePolicy.append = PaperDocUpdatePolicy('append') -PaperDocUpdatePolicy.prepend = PaperDocUpdatePolicy('prepend') -PaperDocUpdatePolicy.overwrite_all = PaperDocUpdatePolicy('overwrite_all') -PaperDocUpdatePolicy.other = PaperDocUpdatePolicy('other') - -RemovePaperDocUser._member_validator = sharing.MemberSelector_validator -RemovePaperDocUser._all_field_names_ = RefPaperDoc._all_field_names_.union(set(['member'])) -RemovePaperDocUser._all_fields_ = RefPaperDoc._all_fields_ + [('member', RemovePaperDocUser._member_validator)] - -SharingPolicy._public_sharing_policy_validator = bv.Nullable(SharingPublicPolicyType_validator) -SharingPolicy._team_sharing_policy_validator = bv.Nullable(SharingTeamPolicyType_validator) -SharingPolicy._all_field_names_ = set([ - 'public_sharing_policy', - 'team_sharing_policy', -]) -SharingPolicy._all_fields_ = [ - ('public_sharing_policy', SharingPolicy._public_sharing_policy_validator), - ('team_sharing_policy', SharingPolicy._team_sharing_policy_validator), -] - -SharingTeamPolicyType._people_with_link_can_edit_validator = bv.Void() -SharingTeamPolicyType._people_with_link_can_view_and_comment_validator = bv.Void() -SharingTeamPolicyType._invite_only_validator = bv.Void() -SharingTeamPolicyType._tagmap = { - 'people_with_link_can_edit': SharingTeamPolicyType._people_with_link_can_edit_validator, - 'people_with_link_can_view_and_comment': SharingTeamPolicyType._people_with_link_can_view_and_comment_validator, - 'invite_only': SharingTeamPolicyType._invite_only_validator, -} - -SharingTeamPolicyType.people_with_link_can_edit = SharingTeamPolicyType('people_with_link_can_edit') -SharingTeamPolicyType.people_with_link_can_view_and_comment = SharingTeamPolicyType('people_with_link_can_view_and_comment') -SharingTeamPolicyType.invite_only = SharingTeamPolicyType('invite_only') - -SharingPublicPolicyType._disabled_validator = bv.Void() -SharingPublicPolicyType._tagmap = { - 'disabled': SharingPublicPolicyType._disabled_validator, -} -SharingPublicPolicyType._tagmap.update(SharingTeamPolicyType._tagmap) - -SharingPublicPolicyType.disabled = SharingPublicPolicyType('disabled') - -UserInfoWithPermissionLevel._user_validator = sharing.UserInfo_validator -UserInfoWithPermissionLevel._permission_level_validator = PaperDocPermissionLevel_validator -UserInfoWithPermissionLevel._all_field_names_ = set([ - 'user', - 'permission_level', -]) -UserInfoWithPermissionLevel._all_fields_ = [ - ('user', UserInfoWithPermissionLevel._user_validator), - ('permission_level', UserInfoWithPermissionLevel._permission_level_validator), -] - -UserOnPaperDocFilter._visited_validator = bv.Void() -UserOnPaperDocFilter._shared_validator = bv.Void() -UserOnPaperDocFilter._other_validator = bv.Void() -UserOnPaperDocFilter._tagmap = { - 'visited': UserOnPaperDocFilter._visited_validator, - 'shared': UserOnPaperDocFilter._shared_validator, - 'other': UserOnPaperDocFilter._other_validator, -} - -UserOnPaperDocFilter.visited = UserOnPaperDocFilter('visited') -UserOnPaperDocFilter.shared = UserOnPaperDocFilter('shared') -UserOnPaperDocFilter.other = UserOnPaperDocFilter('other') - -docs_archive = bb.Route( - 'docs/archive', - False, - RefPaperDoc_validator, - bv.Void(), - DocLookupError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -docs_create = bb.Route( - 'docs/create', - False, - PaperDocCreateArgs_validator, - PaperDocCreateUpdateResult_validator, - PaperDocCreateError_validator, - {'host': u'api', - 'style': u'upload'}, -) -docs_download = bb.Route( - 'docs/download', - False, - PaperDocExport_validator, - PaperDocExportResult_validator, - DocLookupError_validator, - {'host': u'api', - 'style': u'download'}, -) -docs_folder_users_list = bb.Route( - 'docs/folder_users/list', - False, - ListUsersOnFolderArgs_validator, - ListUsersOnFolderResponse_validator, - DocLookupError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -docs_folder_users_list_continue = bb.Route( - 'docs/folder_users/list/continue', - False, - ListUsersOnFolderContinueArgs_validator, - ListUsersOnFolderResponse_validator, - ListUsersCursorError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -docs_get_folder_info = bb.Route( - 'docs/get_folder_info', - False, - RefPaperDoc_validator, - FoldersContainingPaperDoc_validator, - DocLookupError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -docs_list = bb.Route( - 'docs/list', - False, - ListPaperDocsArgs_validator, - ListPaperDocsResponse_validator, - bv.Void(), - {'host': u'api', - 'style': u'rpc'}, -) -docs_list_continue = bb.Route( - 'docs/list/continue', - False, - ListPaperDocsContinueArgs_validator, - ListPaperDocsResponse_validator, - ListDocsCursorError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -docs_permanently_delete = bb.Route( - 'docs/permanently_delete', - False, - RefPaperDoc_validator, - bv.Void(), - DocLookupError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -docs_sharing_policy_get = bb.Route( - 'docs/sharing_policy/get', - False, - RefPaperDoc_validator, - SharingPolicy_validator, - DocLookupError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -docs_sharing_policy_set = bb.Route( - 'docs/sharing_policy/set', - False, - PaperDocSharingPolicy_validator, - bv.Void(), - DocLookupError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -docs_update = bb.Route( - 'docs/update', - False, - PaperDocUpdateArgs_validator, - PaperDocCreateUpdateResult_validator, - PaperDocUpdateError_validator, - {'host': u'api', - 'style': u'upload'}, -) -docs_users_add = bb.Route( - 'docs/users/add', - False, - AddPaperDocUser_validator, - bv.List(AddPaperDocUserMemberResult_validator), - DocLookupError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -docs_users_list = bb.Route( - 'docs/users/list', - False, - ListUsersOnPaperDocArgs_validator, - ListUsersOnPaperDocResponse_validator, - DocLookupError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -docs_users_list_continue = bb.Route( - 'docs/users/list/continue', - False, - ListUsersOnPaperDocContinueArgs_validator, - ListUsersOnPaperDocResponse_validator, - ListUsersCursorError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -docs_users_remove = bb.Route( - 'docs/users/remove', - False, - RemovePaperDocUser_validator, - bv.Void(), - DocLookupError_validator, - {'host': u'api', - 'style': u'rpc'}, -) - -ROUTES = { - 'docs/archive': docs_archive, - 'docs/create': docs_create, - 'docs/download': docs_download, - 'docs/folder_users/list': docs_folder_users_list, - 'docs/folder_users/list/continue': docs_folder_users_list_continue, - 'docs/get_folder_info': docs_get_folder_info, - 'docs/list': docs_list, - 'docs/list/continue': docs_list_continue, - 'docs/permanently_delete': docs_permanently_delete, - 'docs/sharing_policy/get': docs_sharing_policy_get, - 'docs/sharing_policy/set': docs_sharing_policy_set, - 'docs/update': docs_update, - 'docs/users/add': docs_users_add, - 'docs/users/list': docs_users_list, - 'docs/users/list/continue': docs_users_list_continue, - 'docs/users/remove': docs_users_remove, -} - diff --git a/resources/lib/dropbox/pkg_resources.py b/resources/lib/dropbox/pkg_resources.py deleted file mode 100644 index d6f7535..0000000 --- a/resources/lib/dropbox/pkg_resources.py +++ /dev/null @@ -1,4 +0,0 @@ -import resources.lib.utils as utils - -def resource_filename(*args): - return utils.addon_dir() + "/resources/lib/dropbox/trusted-certs.crt" diff --git a/resources/lib/dropbox/properties.py b/resources/lib/dropbox/properties.py deleted file mode 100644 index f6f4bd8..0000000 --- a/resources/lib/dropbox/properties.py +++ /dev/null @@ -1,835 +0,0 @@ -# -*- coding: utf-8 -*- -# Auto-generated by Stone, do not modify. -# flake8: noqa -# pylint: skip-file -""" -This namespace contains helper entities for property and property/template endpoints. -""" - -try: - from . import stone_validators as bv - from . import stone_base as bb -except (SystemError, ValueError): - # Catch errors raised when importing a relative module when not in a package. - # This makes testing this file directly (outside of a package) easier. - import stone_validators as bv - import stone_base as bb - -class GetPropertyTemplateArg(object): - """ - :ivar template_id: An identifier for property template added by route - properties/template/add. - """ - - __slots__ = [ - '_template_id_value', - '_template_id_present', - ] - - _has_required_fields = True - - def __init__(self, - template_id=None): - self._template_id_value = None - self._template_id_present = False - if template_id is not None: - self.template_id = template_id - - @property - def template_id(self): - """ - An identifier for property template added by route - properties/template/add. - - :rtype: str - """ - if self._template_id_present: - return self._template_id_value - else: - raise AttributeError("missing required field 'template_id'") - - @template_id.setter - def template_id(self, val): - val = self._template_id_validator.validate(val) - self._template_id_value = val - self._template_id_present = True - - @template_id.deleter - def template_id(self): - self._template_id_value = None - self._template_id_present = False - - def __repr__(self): - return 'GetPropertyTemplateArg(template_id={!r})'.format( - self._template_id_value, - ) - -GetPropertyTemplateArg_validator = bv.Struct(GetPropertyTemplateArg) - -class PropertyGroupTemplate(object): - """ - Describes property templates that can be filled and associated with a file. - - :ivar name: A display name for the property template. Property template - names can be up to 256 bytes. - :ivar description: Description for new property template. Property template - descriptions can be up to 1024 bytes. - :ivar fields: This is a list of custom properties associated with a property - template. There can be up to 64 properties in a single property - template. - """ - - __slots__ = [ - '_name_value', - '_name_present', - '_description_value', - '_description_present', - '_fields_value', - '_fields_present', - ] - - _has_required_fields = True - - def __init__(self, - name=None, - description=None, - fields=None): - self._name_value = None - self._name_present = False - self._description_value = None - self._description_present = False - self._fields_value = None - self._fields_present = False - if name is not None: - self.name = name - if description is not None: - self.description = description - if fields is not None: - self.fields = fields - - @property - def name(self): - """ - A display name for the property template. Property template names can be - up to 256 bytes. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") - - @name.setter - def name(self, val): - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - @property - def description(self): - """ - Description for new property template. Property template descriptions - can be up to 1024 bytes. - - :rtype: str - """ - if self._description_present: - return self._description_value - else: - raise AttributeError("missing required field 'description'") - - @description.setter - def description(self, val): - val = self._description_validator.validate(val) - self._description_value = val - self._description_present = True - - @description.deleter - def description(self): - self._description_value = None - self._description_present = False - - @property - def fields(self): - """ - This is a list of custom properties associated with a property template. - There can be up to 64 properties in a single property template. - - :rtype: list of [PropertyFieldTemplate] - """ - if self._fields_present: - return self._fields_value - else: - raise AttributeError("missing required field 'fields'") - - @fields.setter - def fields(self, val): - val = self._fields_validator.validate(val) - self._fields_value = val - self._fields_present = True - - @fields.deleter - def fields(self): - self._fields_value = None - self._fields_present = False - - def __repr__(self): - return 'PropertyGroupTemplate(name={!r}, description={!r}, fields={!r})'.format( - self._name_value, - self._description_value, - self._fields_value, - ) - -PropertyGroupTemplate_validator = bv.Struct(PropertyGroupTemplate) - -class GetPropertyTemplateResult(PropertyGroupTemplate): - """ - The Property template for the specified template. - """ - - __slots__ = [ - ] - - _has_required_fields = True - - def __init__(self, - name=None, - description=None, - fields=None): - super(GetPropertyTemplateResult, self).__init__(name, - description, - fields) - - def __repr__(self): - return 'GetPropertyTemplateResult(name={!r}, description={!r}, fields={!r})'.format( - self._name_value, - self._description_value, - self._fields_value, - ) - -GetPropertyTemplateResult_validator = bv.Struct(GetPropertyTemplateResult) - -class ListPropertyTemplateIds(object): - """ - :ivar template_ids: List of identifiers for templates added by route - properties/template/add. - """ - - __slots__ = [ - '_template_ids_value', - '_template_ids_present', - ] - - _has_required_fields = True - - def __init__(self, - template_ids=None): - self._template_ids_value = None - self._template_ids_present = False - if template_ids is not None: - self.template_ids = template_ids - - @property - def template_ids(self): - """ - List of identifiers for templates added by route - properties/template/add. - - :rtype: list of [str] - """ - if self._template_ids_present: - return self._template_ids_value - else: - raise AttributeError("missing required field 'template_ids'") - - @template_ids.setter - def template_ids(self, val): - val = self._template_ids_validator.validate(val) - self._template_ids_value = val - self._template_ids_present = True - - @template_ids.deleter - def template_ids(self): - self._template_ids_value = None - self._template_ids_present = False - - def __repr__(self): - return 'ListPropertyTemplateIds(template_ids={!r})'.format( - self._template_ids_value, - ) - -ListPropertyTemplateIds_validator = bv.Struct(ListPropertyTemplateIds) - -class PropertyTemplateError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar str template_not_found: Property template does not exist for given - identifier. - :ivar restricted_content: You do not have the permissions to modify this - property template. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - restricted_content = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def template_not_found(cls, val): - """ - Create an instance of this class set to the ``template_not_found`` tag - with value ``val``. - - :param str val: - :rtype: PropertyTemplateError - """ - return cls('template_not_found', val) - - def is_template_not_found(self): - """ - Check if the union tag is ``template_not_found``. - - :rtype: bool - """ - return self._tag == 'template_not_found' - - def is_restricted_content(self): - """ - Check if the union tag is ``restricted_content``. - - :rtype: bool - """ - return self._tag == 'restricted_content' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_template_not_found(self): - """ - Property template does not exist for given identifier. - - Only call this if :meth:`is_template_not_found` is true. - - :rtype: str - """ - if not self.is_template_not_found(): - raise AttributeError("tag 'template_not_found' not set") - return self._value - - def __repr__(self): - return 'PropertyTemplateError(%r, %r)' % (self._tag, self._value) - -PropertyTemplateError_validator = bv.Union(PropertyTemplateError) - -class ModifyPropertyTemplateError(PropertyTemplateError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar conflicting_property_names: A property field name already exists in - the template. - :ivar too_many_properties: There are too many properties in the changed - template. The maximum number of properties per template is 32. - :ivar too_many_templates: There are too many templates for the team. - :ivar template_attribute_too_large: The template name, description or field - names is too large. - """ - - # Attribute is overwritten below the class definition - conflicting_property_names = None - # Attribute is overwritten below the class definition - too_many_properties = None - # Attribute is overwritten below the class definition - too_many_templates = None - # Attribute is overwritten below the class definition - template_attribute_too_large = None - - def is_conflicting_property_names(self): - """ - Check if the union tag is ``conflicting_property_names``. - - :rtype: bool - """ - return self._tag == 'conflicting_property_names' - - def is_too_many_properties(self): - """ - Check if the union tag is ``too_many_properties``. - - :rtype: bool - """ - return self._tag == 'too_many_properties' - - def is_too_many_templates(self): - """ - Check if the union tag is ``too_many_templates``. - - :rtype: bool - """ - return self._tag == 'too_many_templates' - - def is_template_attribute_too_large(self): - """ - Check if the union tag is ``template_attribute_too_large``. - - :rtype: bool - """ - return self._tag == 'template_attribute_too_large' - - def __repr__(self): - return 'ModifyPropertyTemplateError(%r, %r)' % (self._tag, self._value) - -ModifyPropertyTemplateError_validator = bv.Union(ModifyPropertyTemplateError) - -class PropertyField(object): - """ - :ivar name: This is the name or key of a custom property in a property - template. File property names can be up to 256 bytes. - :ivar value: Value of a custom property attached to a file. Values can be up - to 1024 bytes. - """ - - __slots__ = [ - '_name_value', - '_name_present', - '_value_value', - '_value_present', - ] - - _has_required_fields = True - - def __init__(self, - name=None, - value=None): - self._name_value = None - self._name_present = False - self._value_value = None - self._value_present = False - if name is not None: - self.name = name - if value is not None: - self.value = value - - @property - def name(self): - """ - This is the name or key of a custom property in a property template. - File property names can be up to 256 bytes. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") - - @name.setter - def name(self, val): - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - @property - def value(self): - """ - Value of a custom property attached to a file. Values can be up to 1024 - bytes. - - :rtype: str - """ - if self._value_present: - return self._value_value - else: - raise AttributeError("missing required field 'value'") - - @value.setter - def value(self, val): - val = self._value_validator.validate(val) - self._value_value = val - self._value_present = True - - @value.deleter - def value(self): - self._value_value = None - self._value_present = False - - def __repr__(self): - return 'PropertyField(name={!r}, value={!r})'.format( - self._name_value, - self._value_value, - ) - -PropertyField_validator = bv.Struct(PropertyField) - -class PropertyFieldTemplate(object): - """ - Describe a single property field type which that can be part of a property - template. - - :ivar name: This is the name or key of a custom property in a property - template. File property names can be up to 256 bytes. - :ivar description: This is the description for a custom property in a - property template. File property description can be up to 1024 bytes. - :ivar type: This is the data type of the value of this property. This type - will be enforced upon property creation and modifications. - """ - - __slots__ = [ - '_name_value', - '_name_present', - '_description_value', - '_description_present', - '_type_value', - '_type_present', - ] - - _has_required_fields = True - - def __init__(self, - name=None, - description=None, - type=None): - self._name_value = None - self._name_present = False - self._description_value = None - self._description_present = False - self._type_value = None - self._type_present = False - if name is not None: - self.name = name - if description is not None: - self.description = description - if type is not None: - self.type = type - - @property - def name(self): - """ - This is the name or key of a custom property in a property template. - File property names can be up to 256 bytes. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") - - @name.setter - def name(self, val): - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - @property - def description(self): - """ - This is the description for a custom property in a property template. - File property description can be up to 1024 bytes. - - :rtype: str - """ - if self._description_present: - return self._description_value - else: - raise AttributeError("missing required field 'description'") - - @description.setter - def description(self, val): - val = self._description_validator.validate(val) - self._description_value = val - self._description_present = True - - @description.deleter - def description(self): - self._description_value = None - self._description_present = False - - @property - def type(self): - """ - This is the data type of the value of this property. This type will be - enforced upon property creation and modifications. - - :rtype: PropertyType - """ - if self._type_present: - return self._type_value - else: - raise AttributeError("missing required field 'type'") - - @type.setter - def type(self, val): - self._type_validator.validate_type_only(val) - self._type_value = val - self._type_present = True - - @type.deleter - def type(self): - self._type_value = None - self._type_present = False - - def __repr__(self): - return 'PropertyFieldTemplate(name={!r}, description={!r}, type={!r})'.format( - self._name_value, - self._description_value, - self._type_value, - ) - -PropertyFieldTemplate_validator = bv.Struct(PropertyFieldTemplate) - -class PropertyGroup(object): - """ - Collection of custom properties in filled property templates. - - :ivar template_id: A unique identifier for a property template type. - :ivar fields: This is a list of custom properties associated with a file. - There can be up to 32 properties for a template. - """ - - __slots__ = [ - '_template_id_value', - '_template_id_present', - '_fields_value', - '_fields_present', - ] - - _has_required_fields = True - - def __init__(self, - template_id=None, - fields=None): - self._template_id_value = None - self._template_id_present = False - self._fields_value = None - self._fields_present = False - if template_id is not None: - self.template_id = template_id - if fields is not None: - self.fields = fields - - @property - def template_id(self): - """ - A unique identifier for a property template type. - - :rtype: str - """ - if self._template_id_present: - return self._template_id_value - else: - raise AttributeError("missing required field 'template_id'") - - @template_id.setter - def template_id(self, val): - val = self._template_id_validator.validate(val) - self._template_id_value = val - self._template_id_present = True - - @template_id.deleter - def template_id(self): - self._template_id_value = None - self._template_id_present = False - - @property - def fields(self): - """ - This is a list of custom properties associated with a file. There can be - up to 32 properties for a template. - - :rtype: list of [PropertyField] - """ - if self._fields_present: - return self._fields_value - else: - raise AttributeError("missing required field 'fields'") - - @fields.setter - def fields(self, val): - val = self._fields_validator.validate(val) - self._fields_value = val - self._fields_present = True - - @fields.deleter - def fields(self): - self._fields_value = None - self._fields_present = False - - def __repr__(self): - return 'PropertyGroup(template_id={!r}, fields={!r})'.format( - self._template_id_value, - self._fields_value, - ) - -PropertyGroup_validator = bv.Struct(PropertyGroup) - -class PropertyType(bb.Union): - """ - Data type of the given property added. This endpoint is in beta and only - properties of type strings is supported. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar string: The associated property will be of type string. Unicode is - supported. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - string = None - # Attribute is overwritten below the class definition - other = None - - def is_string(self): - """ - Check if the union tag is ``string``. - - :rtype: bool - """ - return self._tag == 'string' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'PropertyType(%r, %r)' % (self._tag, self._value) - -PropertyType_validator = bv.Union(PropertyType) - -TemplateId_validator = bv.String(min_length=1, pattern=u'(/|ptid:).*') -GetPropertyTemplateArg._template_id_validator = TemplateId_validator -GetPropertyTemplateArg._all_field_names_ = set(['template_id']) -GetPropertyTemplateArg._all_fields_ = [('template_id', GetPropertyTemplateArg._template_id_validator)] - -PropertyGroupTemplate._name_validator = bv.String() -PropertyGroupTemplate._description_validator = bv.String() -PropertyGroupTemplate._fields_validator = bv.List(PropertyFieldTemplate_validator) -PropertyGroupTemplate._all_field_names_ = set([ - 'name', - 'description', - 'fields', -]) -PropertyGroupTemplate._all_fields_ = [ - ('name', PropertyGroupTemplate._name_validator), - ('description', PropertyGroupTemplate._description_validator), - ('fields', PropertyGroupTemplate._fields_validator), -] - -GetPropertyTemplateResult._all_field_names_ = PropertyGroupTemplate._all_field_names_.union(set([])) -GetPropertyTemplateResult._all_fields_ = PropertyGroupTemplate._all_fields_ + [] - -ListPropertyTemplateIds._template_ids_validator = bv.List(TemplateId_validator) -ListPropertyTemplateIds._all_field_names_ = set(['template_ids']) -ListPropertyTemplateIds._all_fields_ = [('template_ids', ListPropertyTemplateIds._template_ids_validator)] - -PropertyTemplateError._template_not_found_validator = TemplateId_validator -PropertyTemplateError._restricted_content_validator = bv.Void() -PropertyTemplateError._other_validator = bv.Void() -PropertyTemplateError._tagmap = { - 'template_not_found': PropertyTemplateError._template_not_found_validator, - 'restricted_content': PropertyTemplateError._restricted_content_validator, - 'other': PropertyTemplateError._other_validator, -} - -PropertyTemplateError.restricted_content = PropertyTemplateError('restricted_content') -PropertyTemplateError.other = PropertyTemplateError('other') - -ModifyPropertyTemplateError._conflicting_property_names_validator = bv.Void() -ModifyPropertyTemplateError._too_many_properties_validator = bv.Void() -ModifyPropertyTemplateError._too_many_templates_validator = bv.Void() -ModifyPropertyTemplateError._template_attribute_too_large_validator = bv.Void() -ModifyPropertyTemplateError._tagmap = { - 'conflicting_property_names': ModifyPropertyTemplateError._conflicting_property_names_validator, - 'too_many_properties': ModifyPropertyTemplateError._too_many_properties_validator, - 'too_many_templates': ModifyPropertyTemplateError._too_many_templates_validator, - 'template_attribute_too_large': ModifyPropertyTemplateError._template_attribute_too_large_validator, -} -ModifyPropertyTemplateError._tagmap.update(PropertyTemplateError._tagmap) - -ModifyPropertyTemplateError.conflicting_property_names = ModifyPropertyTemplateError('conflicting_property_names') -ModifyPropertyTemplateError.too_many_properties = ModifyPropertyTemplateError('too_many_properties') -ModifyPropertyTemplateError.too_many_templates = ModifyPropertyTemplateError('too_many_templates') -ModifyPropertyTemplateError.template_attribute_too_large = ModifyPropertyTemplateError('template_attribute_too_large') - -PropertyField._name_validator = bv.String() -PropertyField._value_validator = bv.String() -PropertyField._all_field_names_ = set([ - 'name', - 'value', -]) -PropertyField._all_fields_ = [ - ('name', PropertyField._name_validator), - ('value', PropertyField._value_validator), -] - -PropertyFieldTemplate._name_validator = bv.String() -PropertyFieldTemplate._description_validator = bv.String() -PropertyFieldTemplate._type_validator = PropertyType_validator -PropertyFieldTemplate._all_field_names_ = set([ - 'name', - 'description', - 'type', -]) -PropertyFieldTemplate._all_fields_ = [ - ('name', PropertyFieldTemplate._name_validator), - ('description', PropertyFieldTemplate._description_validator), - ('type', PropertyFieldTemplate._type_validator), -] - -PropertyGroup._template_id_validator = TemplateId_validator -PropertyGroup._fields_validator = bv.List(PropertyField_validator) -PropertyGroup._all_field_names_ = set([ - 'template_id', - 'fields', -]) -PropertyGroup._all_fields_ = [ - ('template_id', PropertyGroup._template_id_validator), - ('fields', PropertyGroup._fields_validator), -] - -PropertyType._string_validator = bv.Void() -PropertyType._other_validator = bv.Void() -PropertyType._tagmap = { - 'string': PropertyType._string_validator, - 'other': PropertyType._other_validator, -} - -PropertyType.string = PropertyType('string') -PropertyType.other = PropertyType('other') - -ROUTES = { -} - diff --git a/resources/lib/dropbox/session.py b/resources/lib/dropbox/session.py deleted file mode 100644 index 22c9ec7..0000000 --- a/resources/lib/dropbox/session.py +++ /dev/null @@ -1,51 +0,0 @@ -import pkg_resources -import os -import ssl - -import requests -from requests.adapters import HTTPAdapter -from requests.packages.urllib3.poolmanager import PoolManager - -API_DOMAIN = os.environ.get('DROPBOX_API_DOMAIN', - os.environ.get('DROPBOX_DOMAIN', '.dropboxapi.com')) - -WEB_DOMAIN = os.environ.get('DROPBOX_WEB_DOMAIN', - os.environ.get('DROPBOX_DOMAIN', '.dropbox.com')) - -# Default short hostname for RPC-style routes. -HOST_API = 'api' - -# Default short hostname for upload and download-style routes. -HOST_CONTENT = 'content' - -# Default short hostname for longpoll routes. -HOST_NOTIFY = 'notify' - -# Default short hostname for the Drobox website. -HOST_WWW = 'www' - -API_HOST = os.environ.get('DROPBOX_API_HOST', HOST_API + API_DOMAIN) -API_CONTENT_HOST = os.environ.get('DROPBOX_API_CONTENT_HOST', HOST_CONTENT + API_DOMAIN) -API_NOTIFICATION_HOST = os.environ.get('DROPBOX_API_NOTIFY_HOST', HOST_NOTIFY + API_DOMAIN) -WEB_HOST = os.environ.get('DROPBOX_WEB_HOST', HOST_WWW + WEB_DOMAIN) - -_TRUSTED_CERT_FILE = pkg_resources.resource_filename(__name__, 'trusted-certs.crt') - -# TODO(kelkabany): We probably only want to instantiate this once so that even -# if multiple Dropbox objects are instantiated, they all share the same pool. -class _SSLAdapter(HTTPAdapter): - def init_poolmanager(self, connections, maxsize, block=False, **_): - self.poolmanager = PoolManager( - num_pools=connections, - maxsize=maxsize, - block=block, - cert_reqs=ssl.CERT_REQUIRED, - ca_certs=_TRUSTED_CERT_FILE, - ) - -def pinned_session(pool_maxsize=8): - http_adapter = _SSLAdapter(pool_connections=4, pool_maxsize=pool_maxsize) - _session = requests.session() - _session.mount('https://', http_adapter) - - return _session diff --git a/resources/lib/dropbox/sharing.py b/resources/lib/dropbox/sharing.py deleted file mode 100644 index dacdc33..0000000 --- a/resources/lib/dropbox/sharing.py +++ /dev/null @@ -1,18225 +0,0 @@ -# -*- coding: utf-8 -*- -# Auto-generated by Stone, do not modify. -# flake8: noqa -# pylint: skip-file -""" -This namespace contains endpoints and data types for creating and managing shared links and shared folders. -""" - -try: - from . import stone_validators as bv - from . import stone_base as bb -except (SystemError, ValueError): - # Catch errors raised when importing a relative module when not in a package. - # This makes testing this file directly (outside of a package) easier. - import stone_validators as bv - import stone_base as bb - -try: - from . import ( - async, - common, - files, - team_common, - users, - users_common, - ) -except (SystemError, ValueError): - import async - import common - import files - import team_common - import users - import users_common - -class AccessLevel(bb.Union): - """ - Defines the access levels for collaborators. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar owner: The collaborator is the owner of the shared folder. Owners can - view and edit the shared folder as well as set the folder's policies - using :meth:`dropbox.dropbox.Dropbox.sharing_update_folder_policy`. - :ivar editor: The collaborator can both view and edit the shared folder. - :ivar viewer: The collaborator can only view the shared folder. - :ivar viewer_no_comment: The collaborator can only view the shared folder - and does not have any access to comments. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - owner = None - # Attribute is overwritten below the class definition - editor = None - # Attribute is overwritten below the class definition - viewer = None - # Attribute is overwritten below the class definition - viewer_no_comment = None - # Attribute is overwritten below the class definition - other = None - - def is_owner(self): - """ - Check if the union tag is ``owner``. - - :rtype: bool - """ - return self._tag == 'owner' - - def is_editor(self): - """ - Check if the union tag is ``editor``. - - :rtype: bool - """ - return self._tag == 'editor' - - def is_viewer(self): - """ - Check if the union tag is ``viewer``. - - :rtype: bool - """ - return self._tag == 'viewer' - - def is_viewer_no_comment(self): - """ - Check if the union tag is ``viewer_no_comment``. - - :rtype: bool - """ - return self._tag == 'viewer_no_comment' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'AccessLevel(%r, %r)' % (self._tag, self._value) - -AccessLevel_validator = bv.Union(AccessLevel) - -class AclUpdatePolicy(bb.Union): - """ - Who can change a shared folder's access control list (ACL). In other words, - who can add, remove, or change the privileges of members. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar owner: Only the owner can update the ACL. - :ivar editors: Any editor can update the ACL. This may be further restricted - to editors on the same team. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - owner = None - # Attribute is overwritten below the class definition - editors = None - # Attribute is overwritten below the class definition - other = None - - def is_owner(self): - """ - Check if the union tag is ``owner``. - - :rtype: bool - """ - return self._tag == 'owner' - - def is_editors(self): - """ - Check if the union tag is ``editors``. - - :rtype: bool - """ - return self._tag == 'editors' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'AclUpdatePolicy(%r, %r)' % (self._tag, self._value) - -AclUpdatePolicy_validator = bv.Union(AclUpdatePolicy) - -class AddFileMemberArgs(object): - """ - Arguments for :meth:`dropbox.dropbox.Dropbox.sharing_add_file_member`. - - :ivar file: File to which to add members. - :ivar members: Members to add. Note that even an email address is given, - this may result in a user being directy added to the membership if that - email is the user's main account email. - :ivar custom_message: Message to send to added members in their invitation. - :ivar quiet: Whether added members should be notified via device - notifications of their invitation. - :ivar access_level: AccessLevel union object, describing what access level - we want to give new members. - :ivar add_message_as_comment: If the custom message should be added as a - comment on the file. - """ - - __slots__ = [ - '_file_value', - '_file_present', - '_members_value', - '_members_present', - '_custom_message_value', - '_custom_message_present', - '_quiet_value', - '_quiet_present', - '_access_level_value', - '_access_level_present', - '_add_message_as_comment_value', - '_add_message_as_comment_present', - ] - - _has_required_fields = True - - def __init__(self, - file=None, - members=None, - custom_message=None, - quiet=None, - access_level=None, - add_message_as_comment=None): - self._file_value = None - self._file_present = False - self._members_value = None - self._members_present = False - self._custom_message_value = None - self._custom_message_present = False - self._quiet_value = None - self._quiet_present = False - self._access_level_value = None - self._access_level_present = False - self._add_message_as_comment_value = None - self._add_message_as_comment_present = False - if file is not None: - self.file = file - if members is not None: - self.members = members - if custom_message is not None: - self.custom_message = custom_message - if quiet is not None: - self.quiet = quiet - if access_level is not None: - self.access_level = access_level - if add_message_as_comment is not None: - self.add_message_as_comment = add_message_as_comment - - @property - def file(self): - """ - File to which to add members. - - :rtype: str - """ - if self._file_present: - return self._file_value - else: - raise AttributeError("missing required field 'file'") - - @file.setter - def file(self, val): - val = self._file_validator.validate(val) - self._file_value = val - self._file_present = True - - @file.deleter - def file(self): - self._file_value = None - self._file_present = False - - @property - def members(self): - """ - Members to add. Note that even an email address is given, this may - result in a user being directy added to the membership if that email is - the user's main account email. - - :rtype: list of [MemberSelector] - """ - if self._members_present: - return self._members_value - else: - raise AttributeError("missing required field 'members'") - - @members.setter - def members(self, val): - val = self._members_validator.validate(val) - self._members_value = val - self._members_present = True - - @members.deleter - def members(self): - self._members_value = None - self._members_present = False - - @property - def custom_message(self): - """ - Message to send to added members in their invitation. - - :rtype: str - """ - if self._custom_message_present: - return self._custom_message_value - else: - return None - - @custom_message.setter - def custom_message(self, val): - if val is None: - del self.custom_message - return - val = self._custom_message_validator.validate(val) - self._custom_message_value = val - self._custom_message_present = True - - @custom_message.deleter - def custom_message(self): - self._custom_message_value = None - self._custom_message_present = False - - @property - def quiet(self): - """ - Whether added members should be notified via device notifications of - their invitation. - - :rtype: bool - """ - if self._quiet_present: - return self._quiet_value - else: - return False - - @quiet.setter - def quiet(self, val): - val = self._quiet_validator.validate(val) - self._quiet_value = val - self._quiet_present = True - - @quiet.deleter - def quiet(self): - self._quiet_value = None - self._quiet_present = False - - @property - def access_level(self): - """ - AccessLevel union object, describing what access level we want to give - new members. - - :rtype: AccessLevel - """ - if self._access_level_present: - return self._access_level_value - else: - return AccessLevel.viewer - - @access_level.setter - def access_level(self, val): - self._access_level_validator.validate_type_only(val) - self._access_level_value = val - self._access_level_present = True - - @access_level.deleter - def access_level(self): - self._access_level_value = None - self._access_level_present = False - - @property - def add_message_as_comment(self): - """ - If the custom message should be added as a comment on the file. - - :rtype: bool - """ - if self._add_message_as_comment_present: - return self._add_message_as_comment_value - else: - return False - - @add_message_as_comment.setter - def add_message_as_comment(self, val): - val = self._add_message_as_comment_validator.validate(val) - self._add_message_as_comment_value = val - self._add_message_as_comment_present = True - - @add_message_as_comment.deleter - def add_message_as_comment(self): - self._add_message_as_comment_value = None - self._add_message_as_comment_present = False - - def __repr__(self): - return 'AddFileMemberArgs(file={!r}, members={!r}, custom_message={!r}, quiet={!r}, access_level={!r}, add_message_as_comment={!r})'.format( - self._file_value, - self._members_value, - self._custom_message_value, - self._quiet_value, - self._access_level_value, - self._add_message_as_comment_value, - ) - -AddFileMemberArgs_validator = bv.Struct(AddFileMemberArgs) - -class AddFileMemberError(bb.Union): - """ - Errors for :meth:`dropbox.dropbox.Dropbox.sharing_add_file_member`. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar rate_limit: The user has reached the rate limit for invitations. - :ivar invalid_comment: The custom message did not pass comment permissions - checks. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - rate_limit = None - # Attribute is overwritten below the class definition - invalid_comment = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def user_error(cls, val): - """ - Create an instance of this class set to the ``user_error`` tag with - value ``val``. - - :param SharingUserError val: - :rtype: AddFileMemberError - """ - return cls('user_error', val) - - @classmethod - def access_error(cls, val): - """ - Create an instance of this class set to the ``access_error`` tag with - value ``val``. - - :param SharingFileAccessError val: - :rtype: AddFileMemberError - """ - return cls('access_error', val) - - def is_user_error(self): - """ - Check if the union tag is ``user_error``. - - :rtype: bool - """ - return self._tag == 'user_error' - - def is_access_error(self): - """ - Check if the union tag is ``access_error``. - - :rtype: bool - """ - return self._tag == 'access_error' - - def is_rate_limit(self): - """ - Check if the union tag is ``rate_limit``. - - :rtype: bool - """ - return self._tag == 'rate_limit' - - def is_invalid_comment(self): - """ - Check if the union tag is ``invalid_comment``. - - :rtype: bool - """ - return self._tag == 'invalid_comment' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_user_error(self): - """ - Only call this if :meth:`is_user_error` is true. - - :rtype: SharingUserError - """ - if not self.is_user_error(): - raise AttributeError("tag 'user_error' not set") - return self._value - - def get_access_error(self): - """ - Only call this if :meth:`is_access_error` is true. - - :rtype: SharingFileAccessError - """ - if not self.is_access_error(): - raise AttributeError("tag 'access_error' not set") - return self._value - - def __repr__(self): - return 'AddFileMemberError(%r, %r)' % (self._tag, self._value) - -AddFileMemberError_validator = bv.Union(AddFileMemberError) - -class AddFolderMemberArg(object): - """ - :ivar shared_folder_id: The ID for the shared folder. - :ivar members: The intended list of members to add. Added members will - receive invites to join the shared folder. - :ivar quiet: Whether added members should be notified via email and device - notifications of their invite. - :ivar custom_message: Optional message to display to added members in their - invitation. - """ - - __slots__ = [ - '_shared_folder_id_value', - '_shared_folder_id_present', - '_members_value', - '_members_present', - '_quiet_value', - '_quiet_present', - '_custom_message_value', - '_custom_message_present', - ] - - _has_required_fields = True - - def __init__(self, - shared_folder_id=None, - members=None, - quiet=None, - custom_message=None): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - self._members_value = None - self._members_present = False - self._quiet_value = None - self._quiet_present = False - self._custom_message_value = None - self._custom_message_present = False - if shared_folder_id is not None: - self.shared_folder_id = shared_folder_id - if members is not None: - self.members = members - if quiet is not None: - self.quiet = quiet - if custom_message is not None: - self.custom_message = custom_message - - @property - def shared_folder_id(self): - """ - The ID for the shared folder. - - :rtype: str - """ - if self._shared_folder_id_present: - return self._shared_folder_id_value - else: - raise AttributeError("missing required field 'shared_folder_id'") - - @shared_folder_id.setter - def shared_folder_id(self, val): - val = self._shared_folder_id_validator.validate(val) - self._shared_folder_id_value = val - self._shared_folder_id_present = True - - @shared_folder_id.deleter - def shared_folder_id(self): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - - @property - def members(self): - """ - The intended list of members to add. Added members will receive invites - to join the shared folder. - - :rtype: list of [AddMember] - """ - if self._members_present: - return self._members_value - else: - raise AttributeError("missing required field 'members'") - - @members.setter - def members(self, val): - val = self._members_validator.validate(val) - self._members_value = val - self._members_present = True - - @members.deleter - def members(self): - self._members_value = None - self._members_present = False - - @property - def quiet(self): - """ - Whether added members should be notified via email and device - notifications of their invite. - - :rtype: bool - """ - if self._quiet_present: - return self._quiet_value - else: - return False - - @quiet.setter - def quiet(self, val): - val = self._quiet_validator.validate(val) - self._quiet_value = val - self._quiet_present = True - - @quiet.deleter - def quiet(self): - self._quiet_value = None - self._quiet_present = False - - @property - def custom_message(self): - """ - Optional message to display to added members in their invitation. - - :rtype: str - """ - if self._custom_message_present: - return self._custom_message_value - else: - return None - - @custom_message.setter - def custom_message(self, val): - if val is None: - del self.custom_message - return - val = self._custom_message_validator.validate(val) - self._custom_message_value = val - self._custom_message_present = True - - @custom_message.deleter - def custom_message(self): - self._custom_message_value = None - self._custom_message_present = False - - def __repr__(self): - return 'AddFolderMemberArg(shared_folder_id={!r}, members={!r}, quiet={!r}, custom_message={!r})'.format( - self._shared_folder_id_value, - self._members_value, - self._quiet_value, - self._custom_message_value, - ) - -AddFolderMemberArg_validator = bv.Struct(AddFolderMemberArg) - -class AddFolderMemberError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar SharedFolderAccessError access_error: Unable to access shared folder. - :ivar email_unverified: The current user's e-mail address is unverified. - :ivar AddMemberSelectorError bad_member: ``AddFolderMemberArg.members`` - contains a bad invitation recipient. - :ivar cant_share_outside_team: Your team policy does not allow sharing - outside of the team. - :ivar long too_many_members: The value is the member limit that was reached. - :ivar long too_many_pending_invites: The value is the pending invite limit - that was reached. - :ivar rate_limit: The current user has hit the limit of invites they can - send per day. Try again in 24 hours. - :ivar too_many_invitees: The current user is trying to share with too many - people at once. - :ivar insufficient_plan: The current user's account doesn't support this - action. An example of this is when adding a read-only member. This - action can only be performed by users that have upgraded to a Pro or - Business plan. - :ivar team_folder: This action cannot be performed on a team shared folder. - :ivar no_permission: The current user does not have permission to perform - this action. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - email_unverified = None - # Attribute is overwritten below the class definition - cant_share_outside_team = None - # Attribute is overwritten below the class definition - rate_limit = None - # Attribute is overwritten below the class definition - too_many_invitees = None - # Attribute is overwritten below the class definition - insufficient_plan = None - # Attribute is overwritten below the class definition - team_folder = None - # Attribute is overwritten below the class definition - no_permission = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def access_error(cls, val): - """ - Create an instance of this class set to the ``access_error`` tag with - value ``val``. - - :param SharedFolderAccessError val: - :rtype: AddFolderMemberError - """ - return cls('access_error', val) - - @classmethod - def bad_member(cls, val): - """ - Create an instance of this class set to the ``bad_member`` tag with - value ``val``. - - :param AddMemberSelectorError val: - :rtype: AddFolderMemberError - """ - return cls('bad_member', val) - - @classmethod - def too_many_members(cls, val): - """ - Create an instance of this class set to the ``too_many_members`` tag - with value ``val``. - - :param long val: - :rtype: AddFolderMemberError - """ - return cls('too_many_members', val) - - @classmethod - def too_many_pending_invites(cls, val): - """ - Create an instance of this class set to the ``too_many_pending_invites`` - tag with value ``val``. - - :param long val: - :rtype: AddFolderMemberError - """ - return cls('too_many_pending_invites', val) - - def is_access_error(self): - """ - Check if the union tag is ``access_error``. - - :rtype: bool - """ - return self._tag == 'access_error' - - def is_email_unverified(self): - """ - Check if the union tag is ``email_unverified``. - - :rtype: bool - """ - return self._tag == 'email_unverified' - - def is_bad_member(self): - """ - Check if the union tag is ``bad_member``. - - :rtype: bool - """ - return self._tag == 'bad_member' - - def is_cant_share_outside_team(self): - """ - Check if the union tag is ``cant_share_outside_team``. - - :rtype: bool - """ - return self._tag == 'cant_share_outside_team' - - def is_too_many_members(self): - """ - Check if the union tag is ``too_many_members``. - - :rtype: bool - """ - return self._tag == 'too_many_members' - - def is_too_many_pending_invites(self): - """ - Check if the union tag is ``too_many_pending_invites``. - - :rtype: bool - """ - return self._tag == 'too_many_pending_invites' - - def is_rate_limit(self): - """ - Check if the union tag is ``rate_limit``. - - :rtype: bool - """ - return self._tag == 'rate_limit' - - def is_too_many_invitees(self): - """ - Check if the union tag is ``too_many_invitees``. - - :rtype: bool - """ - return self._tag == 'too_many_invitees' - - def is_insufficient_plan(self): - """ - Check if the union tag is ``insufficient_plan``. - - :rtype: bool - """ - return self._tag == 'insufficient_plan' - - def is_team_folder(self): - """ - Check if the union tag is ``team_folder``. - - :rtype: bool - """ - return self._tag == 'team_folder' - - def is_no_permission(self): - """ - Check if the union tag is ``no_permission``. - - :rtype: bool - """ - return self._tag == 'no_permission' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_access_error(self): - """ - Unable to access shared folder. - - Only call this if :meth:`is_access_error` is true. - - :rtype: SharedFolderAccessError - """ - if not self.is_access_error(): - raise AttributeError("tag 'access_error' not set") - return self._value - - def get_bad_member(self): - """ - ``AddFolderMemberArg.members`` contains a bad invitation recipient. - - Only call this if :meth:`is_bad_member` is true. - - :rtype: AddMemberSelectorError - """ - if not self.is_bad_member(): - raise AttributeError("tag 'bad_member' not set") - return self._value - - def get_too_many_members(self): - """ - The value is the member limit that was reached. - - Only call this if :meth:`is_too_many_members` is true. - - :rtype: long - """ - if not self.is_too_many_members(): - raise AttributeError("tag 'too_many_members' not set") - return self._value - - def get_too_many_pending_invites(self): - """ - The value is the pending invite limit that was reached. - - Only call this if :meth:`is_too_many_pending_invites` is true. - - :rtype: long - """ - if not self.is_too_many_pending_invites(): - raise AttributeError("tag 'too_many_pending_invites' not set") - return self._value - - def __repr__(self): - return 'AddFolderMemberError(%r, %r)' % (self._tag, self._value) - -AddFolderMemberError_validator = bv.Union(AddFolderMemberError) - -class AddMember(object): - """ - The member and type of access the member should have when added to a shared - folder. - - :ivar member: The member to add to the shared folder. - :ivar access_level: The access level to grant ``member`` to the shared - folder. ``AccessLevel.owner`` is disallowed. - """ - - __slots__ = [ - '_member_value', - '_member_present', - '_access_level_value', - '_access_level_present', - ] - - _has_required_fields = True - - def __init__(self, - member=None, - access_level=None): - self._member_value = None - self._member_present = False - self._access_level_value = None - self._access_level_present = False - if member is not None: - self.member = member - if access_level is not None: - self.access_level = access_level - - @property - def member(self): - """ - The member to add to the shared folder. - - :rtype: MemberSelector - """ - if self._member_present: - return self._member_value - else: - raise AttributeError("missing required field 'member'") - - @member.setter - def member(self, val): - self._member_validator.validate_type_only(val) - self._member_value = val - self._member_present = True - - @member.deleter - def member(self): - self._member_value = None - self._member_present = False - - @property - def access_level(self): - """ - The access level to grant ``member`` to the shared folder. - ``AccessLevel.owner`` is disallowed. - - :rtype: AccessLevel - """ - if self._access_level_present: - return self._access_level_value - else: - return AccessLevel.viewer - - @access_level.setter - def access_level(self, val): - self._access_level_validator.validate_type_only(val) - self._access_level_value = val - self._access_level_present = True - - @access_level.deleter - def access_level(self): - self._access_level_value = None - self._access_level_present = False - - def __repr__(self): - return 'AddMember(member={!r}, access_level={!r})'.format( - self._member_value, - self._access_level_value, - ) - -AddMember_validator = bv.Struct(AddMember) - -class AddMemberSelectorError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar automatic_group: Automatically created groups can only be added to - team folders. - :ivar str invalid_dropbox_id: The value is the ID that could not be - identified. - :ivar str invalid_email: The value is the e-email address that is malformed. - :ivar str unverified_dropbox_id: The value is the ID of the Dropbox user - with an unverified e-mail address. Invite unverified users by e-mail - address instead of by their Dropbox ID. - :ivar group_deleted: At least one of the specified groups in - ``AddFolderMemberArg.members`` is deleted. - :ivar group_not_on_team: Sharing to a group that is not on the current - user's team. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - automatic_group = None - # Attribute is overwritten below the class definition - group_deleted = None - # Attribute is overwritten below the class definition - group_not_on_team = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def invalid_dropbox_id(cls, val): - """ - Create an instance of this class set to the ``invalid_dropbox_id`` tag - with value ``val``. - - :param str val: - :rtype: AddMemberSelectorError - """ - return cls('invalid_dropbox_id', val) - - @classmethod - def invalid_email(cls, val): - """ - Create an instance of this class set to the ``invalid_email`` tag with - value ``val``. - - :param str val: - :rtype: AddMemberSelectorError - """ - return cls('invalid_email', val) - - @classmethod - def unverified_dropbox_id(cls, val): - """ - Create an instance of this class set to the ``unverified_dropbox_id`` - tag with value ``val``. - - :param str val: - :rtype: AddMemberSelectorError - """ - return cls('unverified_dropbox_id', val) - - def is_automatic_group(self): - """ - Check if the union tag is ``automatic_group``. - - :rtype: bool - """ - return self._tag == 'automatic_group' - - def is_invalid_dropbox_id(self): - """ - Check if the union tag is ``invalid_dropbox_id``. - - :rtype: bool - """ - return self._tag == 'invalid_dropbox_id' - - def is_invalid_email(self): - """ - Check if the union tag is ``invalid_email``. - - :rtype: bool - """ - return self._tag == 'invalid_email' - - def is_unverified_dropbox_id(self): - """ - Check if the union tag is ``unverified_dropbox_id``. - - :rtype: bool - """ - return self._tag == 'unverified_dropbox_id' - - def is_group_deleted(self): - """ - Check if the union tag is ``group_deleted``. - - :rtype: bool - """ - return self._tag == 'group_deleted' - - def is_group_not_on_team(self): - """ - Check if the union tag is ``group_not_on_team``. - - :rtype: bool - """ - return self._tag == 'group_not_on_team' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_invalid_dropbox_id(self): - """ - The value is the ID that could not be identified. - - Only call this if :meth:`is_invalid_dropbox_id` is true. - - :rtype: str - """ - if not self.is_invalid_dropbox_id(): - raise AttributeError("tag 'invalid_dropbox_id' not set") - return self._value - - def get_invalid_email(self): - """ - The value is the e-email address that is malformed. - - Only call this if :meth:`is_invalid_email` is true. - - :rtype: str - """ - if not self.is_invalid_email(): - raise AttributeError("tag 'invalid_email' not set") - return self._value - - def get_unverified_dropbox_id(self): - """ - The value is the ID of the Dropbox user with an unverified e-mail - address. Invite unverified users by e-mail address instead of by their - Dropbox ID. - - Only call this if :meth:`is_unverified_dropbox_id` is true. - - :rtype: str - """ - if not self.is_unverified_dropbox_id(): - raise AttributeError("tag 'unverified_dropbox_id' not set") - return self._value - - def __repr__(self): - return 'AddMemberSelectorError(%r, %r)' % (self._tag, self._value) - -AddMemberSelectorError_validator = bv.Union(AddMemberSelectorError) - -class AudienceExceptionContentInfo(object): - """ - Information about the content that has a link audience different than that - of this folder. - - :ivar name: The name of the content, which is either a file or a folder. - """ - - __slots__ = [ - '_name_value', - '_name_present', - ] - - _has_required_fields = True - - def __init__(self, - name=None): - self._name_value = None - self._name_present = False - if name is not None: - self.name = name - - @property - def name(self): - """ - The name of the content, which is either a file or a folder. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") - - @name.setter - def name(self, val): - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - def __repr__(self): - return 'AudienceExceptionContentInfo(name={!r})'.format( - self._name_value, - ) - -AudienceExceptionContentInfo_validator = bv.Struct(AudienceExceptionContentInfo) - -class AudienceExceptions(object): - """ - The total count and truncated list of information of content inside this - folder that has a different audience than the link on this folder. This is - only returned for folders. - - :ivar exceptions: A truncated list of some of the content that is an - exception. The length of this list could be smaller than the count since - it is only a sample but will not be empty as long as count is not 0. - """ - - __slots__ = [ - '_count_value', - '_count_present', - '_exceptions_value', - '_exceptions_present', - ] - - _has_required_fields = True - - def __init__(self, - count=None, - exceptions=None): - self._count_value = None - self._count_present = False - self._exceptions_value = None - self._exceptions_present = False - if count is not None: - self.count = count - if exceptions is not None: - self.exceptions = exceptions - - @property - def count(self): - """ - :rtype: long - """ - if self._count_present: - return self._count_value - else: - raise AttributeError("missing required field 'count'") - - @count.setter - def count(self, val): - val = self._count_validator.validate(val) - self._count_value = val - self._count_present = True - - @count.deleter - def count(self): - self._count_value = None - self._count_present = False - - @property - def exceptions(self): - """ - A truncated list of some of the content that is an exception. The length - of this list could be smaller than the count since it is only a sample - but will not be empty as long as count is not 0. - - :rtype: list of [AudienceExceptionContentInfo] - """ - if self._exceptions_present: - return self._exceptions_value - else: - raise AttributeError("missing required field 'exceptions'") - - @exceptions.setter - def exceptions(self, val): - val = self._exceptions_validator.validate(val) - self._exceptions_value = val - self._exceptions_present = True - - @exceptions.deleter - def exceptions(self): - self._exceptions_value = None - self._exceptions_present = False - - def __repr__(self): - return 'AudienceExceptions(count={!r}, exceptions={!r})'.format( - self._count_value, - self._exceptions_value, - ) - -AudienceExceptions_validator = bv.Struct(AudienceExceptions) - -class AudienceRestrictingSharedFolder(object): - """ - Information about the shared folder that prevents the link audience for this - link from being more restrictive. - - :ivar shared_folder_id: The ID of the shared folder. - :ivar name: The name of the shared folder. - :ivar audience: The link audience of the shared folder. - """ - - __slots__ = [ - '_shared_folder_id_value', - '_shared_folder_id_present', - '_name_value', - '_name_present', - '_audience_value', - '_audience_present', - ] - - _has_required_fields = True - - def __init__(self, - shared_folder_id=None, - name=None, - audience=None): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - self._name_value = None - self._name_present = False - self._audience_value = None - self._audience_present = False - if shared_folder_id is not None: - self.shared_folder_id = shared_folder_id - if name is not None: - self.name = name - if audience is not None: - self.audience = audience - - @property - def shared_folder_id(self): - """ - The ID of the shared folder. - - :rtype: str - """ - if self._shared_folder_id_present: - return self._shared_folder_id_value - else: - raise AttributeError("missing required field 'shared_folder_id'") - - @shared_folder_id.setter - def shared_folder_id(self, val): - val = self._shared_folder_id_validator.validate(val) - self._shared_folder_id_value = val - self._shared_folder_id_present = True - - @shared_folder_id.deleter - def shared_folder_id(self): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - - @property - def name(self): - """ - The name of the shared folder. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") - - @name.setter - def name(self, val): - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - @property - def audience(self): - """ - The link audience of the shared folder. - - :rtype: LinkAudience - """ - if self._audience_present: - return self._audience_value - else: - raise AttributeError("missing required field 'audience'") - - @audience.setter - def audience(self, val): - self._audience_validator.validate_type_only(val) - self._audience_value = val - self._audience_present = True - - @audience.deleter - def audience(self): - self._audience_value = None - self._audience_present = False - - def __repr__(self): - return 'AudienceRestrictingSharedFolder(shared_folder_id={!r}, name={!r}, audience={!r})'.format( - self._shared_folder_id_value, - self._name_value, - self._audience_value, - ) - -AudienceRestrictingSharedFolder_validator = bv.Struct(AudienceRestrictingSharedFolder) - -class ChangeFileMemberAccessArgs(object): - """ - Arguments for - :meth:`dropbox.dropbox.Dropbox.sharing_change_file_member_access`. - - :ivar file: File for which we are changing a member's access. - :ivar member: The member whose access we are changing. - :ivar access_level: The new access level for the member. - """ - - __slots__ = [ - '_file_value', - '_file_present', - '_member_value', - '_member_present', - '_access_level_value', - '_access_level_present', - ] - - _has_required_fields = True - - def __init__(self, - file=None, - member=None, - access_level=None): - self._file_value = None - self._file_present = False - self._member_value = None - self._member_present = False - self._access_level_value = None - self._access_level_present = False - if file is not None: - self.file = file - if member is not None: - self.member = member - if access_level is not None: - self.access_level = access_level - - @property - def file(self): - """ - File for which we are changing a member's access. - - :rtype: str - """ - if self._file_present: - return self._file_value - else: - raise AttributeError("missing required field 'file'") - - @file.setter - def file(self, val): - val = self._file_validator.validate(val) - self._file_value = val - self._file_present = True - - @file.deleter - def file(self): - self._file_value = None - self._file_present = False - - @property - def member(self): - """ - The member whose access we are changing. - - :rtype: MemberSelector - """ - if self._member_present: - return self._member_value - else: - raise AttributeError("missing required field 'member'") - - @member.setter - def member(self, val): - self._member_validator.validate_type_only(val) - self._member_value = val - self._member_present = True - - @member.deleter - def member(self): - self._member_value = None - self._member_present = False - - @property - def access_level(self): - """ - The new access level for the member. - - :rtype: AccessLevel - """ - if self._access_level_present: - return self._access_level_value - else: - raise AttributeError("missing required field 'access_level'") - - @access_level.setter - def access_level(self, val): - self._access_level_validator.validate_type_only(val) - self._access_level_value = val - self._access_level_present = True - - @access_level.deleter - def access_level(self): - self._access_level_value = None - self._access_level_present = False - - def __repr__(self): - return 'ChangeFileMemberAccessArgs(file={!r}, member={!r}, access_level={!r})'.format( - self._file_value, - self._member_value, - self._access_level_value, - ) - -ChangeFileMemberAccessArgs_validator = bv.Struct(ChangeFileMemberAccessArgs) - -class LinkMetadata(object): - """ - Metadata for a shared link. This can be either a :class:`PathLinkMetadata` - or :class:`CollectionLinkMetadata`. - - :ivar url: URL of the shared link. - :ivar visibility: Who can access the link. - :ivar expires: Expiration time, if set. By default the link won't expire. - """ - - __slots__ = [ - '_url_value', - '_url_present', - '_visibility_value', - '_visibility_present', - '_expires_value', - '_expires_present', - ] - - _has_required_fields = True - - def __init__(self, - url=None, - visibility=None, - expires=None): - self._url_value = None - self._url_present = False - self._visibility_value = None - self._visibility_present = False - self._expires_value = None - self._expires_present = False - if url is not None: - self.url = url - if visibility is not None: - self.visibility = visibility - if expires is not None: - self.expires = expires - - @property - def url(self): - """ - URL of the shared link. - - :rtype: str - """ - if self._url_present: - return self._url_value - else: - raise AttributeError("missing required field 'url'") - - @url.setter - def url(self, val): - val = self._url_validator.validate(val) - self._url_value = val - self._url_present = True - - @url.deleter - def url(self): - self._url_value = None - self._url_present = False - - @property - def visibility(self): - """ - Who can access the link. - - :rtype: Visibility - """ - if self._visibility_present: - return self._visibility_value - else: - raise AttributeError("missing required field 'visibility'") - - @visibility.setter - def visibility(self, val): - self._visibility_validator.validate_type_only(val) - self._visibility_value = val - self._visibility_present = True - - @visibility.deleter - def visibility(self): - self._visibility_value = None - self._visibility_present = False - - @property - def expires(self): - """ - Expiration time, if set. By default the link won't expire. - - :rtype: datetime.datetime - """ - if self._expires_present: - return self._expires_value - else: - return None - - @expires.setter - def expires(self, val): - if val is None: - del self.expires - return - val = self._expires_validator.validate(val) - self._expires_value = val - self._expires_present = True - - @expires.deleter - def expires(self): - self._expires_value = None - self._expires_present = False - - def __repr__(self): - return 'LinkMetadata(url={!r}, visibility={!r}, expires={!r})'.format( - self._url_value, - self._visibility_value, - self._expires_value, - ) - -LinkMetadata_validator = bv.StructTree(LinkMetadata) - -class CollectionLinkMetadata(LinkMetadata): - """ - Metadata for a collection-based shared link. - """ - - __slots__ = [ - ] - - _has_required_fields = True - - def __init__(self, - url=None, - visibility=None, - expires=None): - super(CollectionLinkMetadata, self).__init__(url, - visibility, - expires) - - def __repr__(self): - return 'CollectionLinkMetadata(url={!r}, visibility={!r}, expires={!r})'.format( - self._url_value, - self._visibility_value, - self._expires_value, - ) - -CollectionLinkMetadata_validator = bv.Struct(CollectionLinkMetadata) - -class CreateSharedLinkArg(object): - """ - :ivar path: The path to share. - :ivar short_url: Whether to return a shortened URL. - :ivar pending_upload: If it's okay to share a path that does not yet exist, - set this to either ``PendingUploadMode.file`` or - ``PendingUploadMode.folder`` to indicate whether to assume it's a file - or folder. - """ - - __slots__ = [ - '_path_value', - '_path_present', - '_short_url_value', - '_short_url_present', - '_pending_upload_value', - '_pending_upload_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - short_url=None, - pending_upload=None): - self._path_value = None - self._path_present = False - self._short_url_value = None - self._short_url_present = False - self._pending_upload_value = None - self._pending_upload_present = False - if path is not None: - self.path = path - if short_url is not None: - self.short_url = short_url - if pending_upload is not None: - self.pending_upload = pending_upload - - @property - def path(self): - """ - The path to share. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def short_url(self): - """ - Whether to return a shortened URL. - - :rtype: bool - """ - if self._short_url_present: - return self._short_url_value - else: - return False - - @short_url.setter - def short_url(self, val): - val = self._short_url_validator.validate(val) - self._short_url_value = val - self._short_url_present = True - - @short_url.deleter - def short_url(self): - self._short_url_value = None - self._short_url_present = False - - @property - def pending_upload(self): - """ - If it's okay to share a path that does not yet exist, set this to either - ``PendingUploadMode.file`` or ``PendingUploadMode.folder`` to indicate - whether to assume it's a file or folder. - - :rtype: PendingUploadMode - """ - if self._pending_upload_present: - return self._pending_upload_value - else: - return None - - @pending_upload.setter - def pending_upload(self, val): - if val is None: - del self.pending_upload - return - self._pending_upload_validator.validate_type_only(val) - self._pending_upload_value = val - self._pending_upload_present = True - - @pending_upload.deleter - def pending_upload(self): - self._pending_upload_value = None - self._pending_upload_present = False - - def __repr__(self): - return 'CreateSharedLinkArg(path={!r}, short_url={!r}, pending_upload={!r})'.format( - self._path_value, - self._short_url_value, - self._pending_upload_value, - ) - -CreateSharedLinkArg_validator = bv.Struct(CreateSharedLinkArg) - -class CreateSharedLinkError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def path(cls, val): - """ - Create an instance of this class set to the ``path`` tag with value - ``val``. - - :param files.LookupError_validator val: - :rtype: CreateSharedLinkError - """ - return cls('path', val) - - def is_path(self): - """ - Check if the union tag is ``path``. - - :rtype: bool - """ - return self._tag == 'path' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_path(self): - """ - Only call this if :meth:`is_path` is true. - - :rtype: files.LookupError_validator - """ - if not self.is_path(): - raise AttributeError("tag 'path' not set") - return self._value - - def __repr__(self): - return 'CreateSharedLinkError(%r, %r)' % (self._tag, self._value) - -CreateSharedLinkError_validator = bv.Union(CreateSharedLinkError) - -class CreateSharedLinkWithSettingsArg(object): - """ - :ivar path: The path to be shared by the shared link. - :ivar settings: The requested settings for the newly created shared link. - """ - - __slots__ = [ - '_path_value', - '_path_present', - '_settings_value', - '_settings_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - settings=None): - self._path_value = None - self._path_present = False - self._settings_value = None - self._settings_present = False - if path is not None: - self.path = path - if settings is not None: - self.settings = settings - - @property - def path(self): - """ - The path to be shared by the shared link. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def settings(self): - """ - The requested settings for the newly created shared link. - - :rtype: SharedLinkSettings - """ - if self._settings_present: - return self._settings_value - else: - return None - - @settings.setter - def settings(self, val): - if val is None: - del self.settings - return - self._settings_validator.validate_type_only(val) - self._settings_value = val - self._settings_present = True - - @settings.deleter - def settings(self): - self._settings_value = None - self._settings_present = False - - def __repr__(self): - return 'CreateSharedLinkWithSettingsArg(path={!r}, settings={!r})'.format( - self._path_value, - self._settings_value, - ) - -CreateSharedLinkWithSettingsArg_validator = bv.Struct(CreateSharedLinkWithSettingsArg) - -class CreateSharedLinkWithSettingsError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar email_not_verified: User's email should be verified. - :ivar shared_link_already_exists: The shared link already exists. You can - call :meth:`dropbox.dropbox.Dropbox.sharing_list_shared_links` to get - the existing link. - :ivar SharedLinkSettingsError settings_error: There is an error with the - given settings. - :ivar access_denied: Access to the requested path is forbidden. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - email_not_verified = None - # Attribute is overwritten below the class definition - shared_link_already_exists = None - # Attribute is overwritten below the class definition - access_denied = None - - @classmethod - def path(cls, val): - """ - Create an instance of this class set to the ``path`` tag with value - ``val``. - - :param files.LookupError_validator val: - :rtype: CreateSharedLinkWithSettingsError - """ - return cls('path', val) - - @classmethod - def settings_error(cls, val): - """ - Create an instance of this class set to the ``settings_error`` tag with - value ``val``. - - :param SharedLinkSettingsError val: - :rtype: CreateSharedLinkWithSettingsError - """ - return cls('settings_error', val) - - def is_path(self): - """ - Check if the union tag is ``path``. - - :rtype: bool - """ - return self._tag == 'path' - - def is_email_not_verified(self): - """ - Check if the union tag is ``email_not_verified``. - - :rtype: bool - """ - return self._tag == 'email_not_verified' - - def is_shared_link_already_exists(self): - """ - Check if the union tag is ``shared_link_already_exists``. - - :rtype: bool - """ - return self._tag == 'shared_link_already_exists' - - def is_settings_error(self): - """ - Check if the union tag is ``settings_error``. - - :rtype: bool - """ - return self._tag == 'settings_error' - - def is_access_denied(self): - """ - Check if the union tag is ``access_denied``. - - :rtype: bool - """ - return self._tag == 'access_denied' - - def get_path(self): - """ - Only call this if :meth:`is_path` is true. - - :rtype: files.LookupError_validator - """ - if not self.is_path(): - raise AttributeError("tag 'path' not set") - return self._value - - def get_settings_error(self): - """ - There is an error with the given settings. - - Only call this if :meth:`is_settings_error` is true. - - :rtype: SharedLinkSettingsError - """ - if not self.is_settings_error(): - raise AttributeError("tag 'settings_error' not set") - return self._value - - def __repr__(self): - return 'CreateSharedLinkWithSettingsError(%r, %r)' % (self._tag, self._value) - -CreateSharedLinkWithSettingsError_validator = bv.Union(CreateSharedLinkWithSettingsError) - -class SharedContentLinkMetadataBase(object): - """ - :ivar access_level: The access level on the link for this file. - :ivar audience_options: The audience options that are available for the - content. Some audience options may be unavailable. For example, - team_only may be unavailable if the content is not owned by a user on a - team. The 'default' audience option is always available if the user can - modify link settings. - :ivar audience_restricting_shared_folder: The shared folder that prevents - the link audience for this link from being more restrictive. - :ivar current_audience: The current audience of the link. - :ivar expiry: Whether the link has an expiry set on it. A link with an - expiry will have its audience changed to members when the expiry is - reached. - :ivar link_permissions: A list of permissions for actions you can perform on - the link. - :ivar password_protected: Whether the link is protected by a password. - """ - - __slots__ = [ - '_access_level_value', - '_access_level_present', - '_audience_options_value', - '_audience_options_present', - '_audience_restricting_shared_folder_value', - '_audience_restricting_shared_folder_present', - '_current_audience_value', - '_current_audience_present', - '_expiry_value', - '_expiry_present', - '_link_permissions_value', - '_link_permissions_present', - '_password_protected_value', - '_password_protected_present', - ] - - _has_required_fields = True - - def __init__(self, - audience_options=None, - current_audience=None, - link_permissions=None, - password_protected=None, - access_level=None, - audience_restricting_shared_folder=None, - expiry=None): - self._access_level_value = None - self._access_level_present = False - self._audience_options_value = None - self._audience_options_present = False - self._audience_restricting_shared_folder_value = None - self._audience_restricting_shared_folder_present = False - self._current_audience_value = None - self._current_audience_present = False - self._expiry_value = None - self._expiry_present = False - self._link_permissions_value = None - self._link_permissions_present = False - self._password_protected_value = None - self._password_protected_present = False - if access_level is not None: - self.access_level = access_level - if audience_options is not None: - self.audience_options = audience_options - if audience_restricting_shared_folder is not None: - self.audience_restricting_shared_folder = audience_restricting_shared_folder - if current_audience is not None: - self.current_audience = current_audience - if expiry is not None: - self.expiry = expiry - if link_permissions is not None: - self.link_permissions = link_permissions - if password_protected is not None: - self.password_protected = password_protected - - @property - def access_level(self): - """ - The access level on the link for this file. - - :rtype: AccessLevel - """ - if self._access_level_present: - return self._access_level_value - else: - return None - - @access_level.setter - def access_level(self, val): - if val is None: - del self.access_level - return - self._access_level_validator.validate_type_only(val) - self._access_level_value = val - self._access_level_present = True - - @access_level.deleter - def access_level(self): - self._access_level_value = None - self._access_level_present = False - - @property - def audience_options(self): - """ - The audience options that are available for the content. Some audience - options may be unavailable. For example, team_only may be unavailable if - the content is not owned by a user on a team. The 'default' audience - option is always available if the user can modify link settings. - - :rtype: list of [LinkAudience] - """ - if self._audience_options_present: - return self._audience_options_value - else: - raise AttributeError("missing required field 'audience_options'") - - @audience_options.setter - def audience_options(self, val): - val = self._audience_options_validator.validate(val) - self._audience_options_value = val - self._audience_options_present = True - - @audience_options.deleter - def audience_options(self): - self._audience_options_value = None - self._audience_options_present = False - - @property - def audience_restricting_shared_folder(self): - """ - The shared folder that prevents the link audience for this link from - being more restrictive. - - :rtype: AudienceRestrictingSharedFolder - """ - if self._audience_restricting_shared_folder_present: - return self._audience_restricting_shared_folder_value - else: - return None - - @audience_restricting_shared_folder.setter - def audience_restricting_shared_folder(self, val): - if val is None: - del self.audience_restricting_shared_folder - return - self._audience_restricting_shared_folder_validator.validate_type_only(val) - self._audience_restricting_shared_folder_value = val - self._audience_restricting_shared_folder_present = True - - @audience_restricting_shared_folder.deleter - def audience_restricting_shared_folder(self): - self._audience_restricting_shared_folder_value = None - self._audience_restricting_shared_folder_present = False - - @property - def current_audience(self): - """ - The current audience of the link. - - :rtype: LinkAudience - """ - if self._current_audience_present: - return self._current_audience_value - else: - raise AttributeError("missing required field 'current_audience'") - - @current_audience.setter - def current_audience(self, val): - self._current_audience_validator.validate_type_only(val) - self._current_audience_value = val - self._current_audience_present = True - - @current_audience.deleter - def current_audience(self): - self._current_audience_value = None - self._current_audience_present = False - - @property - def expiry(self): - """ - Whether the link has an expiry set on it. A link with an expiry will - have its audience changed to members when the expiry is reached. - - :rtype: datetime.datetime - """ - if self._expiry_present: - return self._expiry_value - else: - return None - - @expiry.setter - def expiry(self, val): - if val is None: - del self.expiry - return - val = self._expiry_validator.validate(val) - self._expiry_value = val - self._expiry_present = True - - @expiry.deleter - def expiry(self): - self._expiry_value = None - self._expiry_present = False - - @property - def link_permissions(self): - """ - A list of permissions for actions you can perform on the link. - - :rtype: list of [LinkPermission] - """ - if self._link_permissions_present: - return self._link_permissions_value - else: - raise AttributeError("missing required field 'link_permissions'") - - @link_permissions.setter - def link_permissions(self, val): - val = self._link_permissions_validator.validate(val) - self._link_permissions_value = val - self._link_permissions_present = True - - @link_permissions.deleter - def link_permissions(self): - self._link_permissions_value = None - self._link_permissions_present = False - - @property - def password_protected(self): - """ - Whether the link is protected by a password. - - :rtype: bool - """ - if self._password_protected_present: - return self._password_protected_value - else: - raise AttributeError("missing required field 'password_protected'") - - @password_protected.setter - def password_protected(self, val): - val = self._password_protected_validator.validate(val) - self._password_protected_value = val - self._password_protected_present = True - - @password_protected.deleter - def password_protected(self): - self._password_protected_value = None - self._password_protected_present = False - - def __repr__(self): - return 'SharedContentLinkMetadataBase(audience_options={!r}, current_audience={!r}, link_permissions={!r}, password_protected={!r}, access_level={!r}, audience_restricting_shared_folder={!r}, expiry={!r})'.format( - self._audience_options_value, - self._current_audience_value, - self._link_permissions_value, - self._password_protected_value, - self._access_level_value, - self._audience_restricting_shared_folder_value, - self._expiry_value, - ) - -SharedContentLinkMetadataBase_validator = bv.Struct(SharedContentLinkMetadataBase) - -class ExpectedSharedContentLinkMetadata(SharedContentLinkMetadataBase): - """ - The expected metadata of a shared link for a file or folder when a link is - first created for the content. Absent if the link already exists. - """ - - __slots__ = [ - ] - - _has_required_fields = True - - def __init__(self, - audience_options=None, - current_audience=None, - link_permissions=None, - password_protected=None, - access_level=None, - audience_restricting_shared_folder=None, - expiry=None): - super(ExpectedSharedContentLinkMetadata, self).__init__(audience_options, - current_audience, - link_permissions, - password_protected, - access_level, - audience_restricting_shared_folder, - expiry) - - def __repr__(self): - return 'ExpectedSharedContentLinkMetadata(audience_options={!r}, current_audience={!r}, link_permissions={!r}, password_protected={!r}, access_level={!r}, audience_restricting_shared_folder={!r}, expiry={!r})'.format( - self._audience_options_value, - self._current_audience_value, - self._link_permissions_value, - self._password_protected_value, - self._access_level_value, - self._audience_restricting_shared_folder_value, - self._expiry_value, - ) - -ExpectedSharedContentLinkMetadata_validator = bv.Struct(ExpectedSharedContentLinkMetadata) - -class FileAction(bb.Union): - """ - Sharing actions that may be taken on files. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar disable_viewer_info: Disable viewer information on the file. - :ivar edit_contents: Change or edit contents of the file. - :ivar enable_viewer_info: Enable viewer information on the file. - :ivar invite_viewer: Add a member with view permissions. - :ivar invite_viewer_no_comment: Add a member with view permissions but no - comment permissions. - :ivar unshare: Stop sharing this file. - :ivar relinquish_membership: Relinquish one's own membership to the file. - :ivar share_link: Use create_link instead. - :ivar create_link: Create a shared link to the file. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - disable_viewer_info = None - # Attribute is overwritten below the class definition - edit_contents = None - # Attribute is overwritten below the class definition - enable_viewer_info = None - # Attribute is overwritten below the class definition - invite_viewer = None - # Attribute is overwritten below the class definition - invite_viewer_no_comment = None - # Attribute is overwritten below the class definition - unshare = None - # Attribute is overwritten below the class definition - relinquish_membership = None - # Attribute is overwritten below the class definition - share_link = None - # Attribute is overwritten below the class definition - create_link = None - # Attribute is overwritten below the class definition - other = None - - def is_disable_viewer_info(self): - """ - Check if the union tag is ``disable_viewer_info``. - - :rtype: bool - """ - return self._tag == 'disable_viewer_info' - - def is_edit_contents(self): - """ - Check if the union tag is ``edit_contents``. - - :rtype: bool - """ - return self._tag == 'edit_contents' - - def is_enable_viewer_info(self): - """ - Check if the union tag is ``enable_viewer_info``. - - :rtype: bool - """ - return self._tag == 'enable_viewer_info' - - def is_invite_viewer(self): - """ - Check if the union tag is ``invite_viewer``. - - :rtype: bool - """ - return self._tag == 'invite_viewer' - - def is_invite_viewer_no_comment(self): - """ - Check if the union tag is ``invite_viewer_no_comment``. - - :rtype: bool - """ - return self._tag == 'invite_viewer_no_comment' - - def is_unshare(self): - """ - Check if the union tag is ``unshare``. - - :rtype: bool - """ - return self._tag == 'unshare' - - def is_relinquish_membership(self): - """ - Check if the union tag is ``relinquish_membership``. - - :rtype: bool - """ - return self._tag == 'relinquish_membership' - - def is_share_link(self): - """ - Check if the union tag is ``share_link``. - - :rtype: bool - """ - return self._tag == 'share_link' - - def is_create_link(self): - """ - Check if the union tag is ``create_link``. - - :rtype: bool - """ - return self._tag == 'create_link' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'FileAction(%r, %r)' % (self._tag, self._value) - -FileAction_validator = bv.Union(FileAction) - -class FileErrorResult(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar str file_not_found_error: File specified by id was not found. - :ivar str invalid_file_action_error: User does not have permission to take - the specified action on the file. - :ivar str permission_denied_error: User does not have permission to access - file specified by file.Id. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def file_not_found_error(cls, val): - """ - Create an instance of this class set to the ``file_not_found_error`` tag - with value ``val``. - - :param str val: - :rtype: FileErrorResult - """ - return cls('file_not_found_error', val) - - @classmethod - def invalid_file_action_error(cls, val): - """ - Create an instance of this class set to the - ``invalid_file_action_error`` tag with value ``val``. - - :param str val: - :rtype: FileErrorResult - """ - return cls('invalid_file_action_error', val) - - @classmethod - def permission_denied_error(cls, val): - """ - Create an instance of this class set to the ``permission_denied_error`` - tag with value ``val``. - - :param str val: - :rtype: FileErrorResult - """ - return cls('permission_denied_error', val) - - def is_file_not_found_error(self): - """ - Check if the union tag is ``file_not_found_error``. - - :rtype: bool - """ - return self._tag == 'file_not_found_error' - - def is_invalid_file_action_error(self): - """ - Check if the union tag is ``invalid_file_action_error``. - - :rtype: bool - """ - return self._tag == 'invalid_file_action_error' - - def is_permission_denied_error(self): - """ - Check if the union tag is ``permission_denied_error``. - - :rtype: bool - """ - return self._tag == 'permission_denied_error' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_file_not_found_error(self): - """ - File specified by id was not found. - - Only call this if :meth:`is_file_not_found_error` is true. - - :rtype: str - """ - if not self.is_file_not_found_error(): - raise AttributeError("tag 'file_not_found_error' not set") - return self._value - - def get_invalid_file_action_error(self): - """ - User does not have permission to take the specified action on the file. - - Only call this if :meth:`is_invalid_file_action_error` is true. - - :rtype: str - """ - if not self.is_invalid_file_action_error(): - raise AttributeError("tag 'invalid_file_action_error' not set") - return self._value - - def get_permission_denied_error(self): - """ - User does not have permission to access file specified by file.Id. - - Only call this if :meth:`is_permission_denied_error` is true. - - :rtype: str - """ - if not self.is_permission_denied_error(): - raise AttributeError("tag 'permission_denied_error' not set") - return self._value - - def __repr__(self): - return 'FileErrorResult(%r, %r)' % (self._tag, self._value) - -FileErrorResult_validator = bv.Union(FileErrorResult) - -class SharedLinkMetadata(object): - """ - The metadata of a shared link. - - :ivar url: URL of the shared link. - :ivar id: A unique identifier for the linked file. - :ivar name: The linked file name (including extension). This never contains - a slash. - :ivar expires: Expiration time, if set. By default the link won't expire. - :ivar path_lower: The lowercased full path in the user's Dropbox. This - always starts with a slash. This field will only be present only if the - linked file is in the authenticated user's dropbox. - :ivar link_permissions: The link's access permissions. - :ivar team_member_info: The team membership information of the link's owner. - This field will only be present if the link's owner is a team member. - :ivar content_owner_team_info: The team information of the content's owner. - This field will only be present if the content's owner is a team member - and the content's owner team is different from the link's owner team. - """ - - __slots__ = [ - '_url_value', - '_url_present', - '_id_value', - '_id_present', - '_name_value', - '_name_present', - '_expires_value', - '_expires_present', - '_path_lower_value', - '_path_lower_present', - '_link_permissions_value', - '_link_permissions_present', - '_team_member_info_value', - '_team_member_info_present', - '_content_owner_team_info_value', - '_content_owner_team_info_present', - ] - - _has_required_fields = True - - def __init__(self, - url=None, - name=None, - link_permissions=None, - id=None, - expires=None, - path_lower=None, - team_member_info=None, - content_owner_team_info=None): - self._url_value = None - self._url_present = False - self._id_value = None - self._id_present = False - self._name_value = None - self._name_present = False - self._expires_value = None - self._expires_present = False - self._path_lower_value = None - self._path_lower_present = False - self._link_permissions_value = None - self._link_permissions_present = False - self._team_member_info_value = None - self._team_member_info_present = False - self._content_owner_team_info_value = None - self._content_owner_team_info_present = False - if url is not None: - self.url = url - if id is not None: - self.id = id - if name is not None: - self.name = name - if expires is not None: - self.expires = expires - if path_lower is not None: - self.path_lower = path_lower - if link_permissions is not None: - self.link_permissions = link_permissions - if team_member_info is not None: - self.team_member_info = team_member_info - if content_owner_team_info is not None: - self.content_owner_team_info = content_owner_team_info - - @property - def url(self): - """ - URL of the shared link. - - :rtype: str - """ - if self._url_present: - return self._url_value - else: - raise AttributeError("missing required field 'url'") - - @url.setter - def url(self, val): - val = self._url_validator.validate(val) - self._url_value = val - self._url_present = True - - @url.deleter - def url(self): - self._url_value = None - self._url_present = False - - @property - def id(self): - """ - A unique identifier for the linked file. - - :rtype: str - """ - if self._id_present: - return self._id_value - else: - return None - - @id.setter - def id(self, val): - if val is None: - del self.id - return - val = self._id_validator.validate(val) - self._id_value = val - self._id_present = True - - @id.deleter - def id(self): - self._id_value = None - self._id_present = False - - @property - def name(self): - """ - The linked file name (including extension). This never contains a slash. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") - - @name.setter - def name(self, val): - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - @property - def expires(self): - """ - Expiration time, if set. By default the link won't expire. - - :rtype: datetime.datetime - """ - if self._expires_present: - return self._expires_value - else: - return None - - @expires.setter - def expires(self, val): - if val is None: - del self.expires - return - val = self._expires_validator.validate(val) - self._expires_value = val - self._expires_present = True - - @expires.deleter - def expires(self): - self._expires_value = None - self._expires_present = False - - @property - def path_lower(self): - """ - The lowercased full path in the user's Dropbox. This always starts with - a slash. This field will only be present only if the linked file is in - the authenticated user's dropbox. - - :rtype: str - """ - if self._path_lower_present: - return self._path_lower_value - else: - return None - - @path_lower.setter - def path_lower(self, val): - if val is None: - del self.path_lower - return - val = self._path_lower_validator.validate(val) - self._path_lower_value = val - self._path_lower_present = True - - @path_lower.deleter - def path_lower(self): - self._path_lower_value = None - self._path_lower_present = False - - @property - def link_permissions(self): - """ - The link's access permissions. - - :rtype: LinkPermissions - """ - if self._link_permissions_present: - return self._link_permissions_value - else: - raise AttributeError("missing required field 'link_permissions'") - - @link_permissions.setter - def link_permissions(self, val): - self._link_permissions_validator.validate_type_only(val) - self._link_permissions_value = val - self._link_permissions_present = True - - @link_permissions.deleter - def link_permissions(self): - self._link_permissions_value = None - self._link_permissions_present = False - - @property - def team_member_info(self): - """ - The team membership information of the link's owner. This field will - only be present if the link's owner is a team member. - - :rtype: TeamMemberInfo - """ - if self._team_member_info_present: - return self._team_member_info_value - else: - return None - - @team_member_info.setter - def team_member_info(self, val): - if val is None: - del self.team_member_info - return - self._team_member_info_validator.validate_type_only(val) - self._team_member_info_value = val - self._team_member_info_present = True - - @team_member_info.deleter - def team_member_info(self): - self._team_member_info_value = None - self._team_member_info_present = False - - @property - def content_owner_team_info(self): - """ - The team information of the content's owner. This field will only be - present if the content's owner is a team member and the content's owner - team is different from the link's owner team. - - :rtype: users.Team_validator - """ - if self._content_owner_team_info_present: - return self._content_owner_team_info_value - else: - return None - - @content_owner_team_info.setter - def content_owner_team_info(self, val): - if val is None: - del self.content_owner_team_info - return - val = self._content_owner_team_info_validator.validate(val) - self._content_owner_team_info_value = val - self._content_owner_team_info_present = True - - @content_owner_team_info.deleter - def content_owner_team_info(self): - self._content_owner_team_info_value = None - self._content_owner_team_info_present = False - - def __repr__(self): - return 'SharedLinkMetadata(url={!r}, name={!r}, link_permissions={!r}, id={!r}, expires={!r}, path_lower={!r}, team_member_info={!r}, content_owner_team_info={!r})'.format( - self._url_value, - self._name_value, - self._link_permissions_value, - self._id_value, - self._expires_value, - self._path_lower_value, - self._team_member_info_value, - self._content_owner_team_info_value, - ) - -SharedLinkMetadata_validator = bv.StructTree(SharedLinkMetadata) - -class FileLinkMetadata(SharedLinkMetadata): - """ - The metadata of a file shared link. - - :ivar client_modified: The modification time set by the desktop client when - the file was added to Dropbox. Since this time is not verified (the - Dropbox server stores whatever the desktop client sends up), this should - only be used for display purposes (such as sorting) and not, for - example, to determine if a file has changed or not. - :ivar server_modified: The last time the file was modified on Dropbox. - :ivar rev: A unique identifier for the current revision of a file. This - field is the same rev as elsewhere in the API and can be used to detect - changes and avoid conflicts. - :ivar size: The file size in bytes. - """ - - __slots__ = [ - '_client_modified_value', - '_client_modified_present', - '_server_modified_value', - '_server_modified_present', - '_rev_value', - '_rev_present', - '_size_value', - '_size_present', - ] - - _has_required_fields = True - - def __init__(self, - url=None, - name=None, - link_permissions=None, - client_modified=None, - server_modified=None, - rev=None, - size=None, - id=None, - expires=None, - path_lower=None, - team_member_info=None, - content_owner_team_info=None): - super(FileLinkMetadata, self).__init__(url, - name, - link_permissions, - id, - expires, - path_lower, - team_member_info, - content_owner_team_info) - self._client_modified_value = None - self._client_modified_present = False - self._server_modified_value = None - self._server_modified_present = False - self._rev_value = None - self._rev_present = False - self._size_value = None - self._size_present = False - if client_modified is not None: - self.client_modified = client_modified - if server_modified is not None: - self.server_modified = server_modified - if rev is not None: - self.rev = rev - if size is not None: - self.size = size - - @property - def client_modified(self): - """ - The modification time set by the desktop client when the file was added - to Dropbox. Since this time is not verified (the Dropbox server stores - whatever the desktop client sends up), this should only be used for - display purposes (such as sorting) and not, for example, to determine if - a file has changed or not. - - :rtype: datetime.datetime - """ - if self._client_modified_present: - return self._client_modified_value - else: - raise AttributeError("missing required field 'client_modified'") - - @client_modified.setter - def client_modified(self, val): - val = self._client_modified_validator.validate(val) - self._client_modified_value = val - self._client_modified_present = True - - @client_modified.deleter - def client_modified(self): - self._client_modified_value = None - self._client_modified_present = False - - @property - def server_modified(self): - """ - The last time the file was modified on Dropbox. - - :rtype: datetime.datetime - """ - if self._server_modified_present: - return self._server_modified_value - else: - raise AttributeError("missing required field 'server_modified'") - - @server_modified.setter - def server_modified(self, val): - val = self._server_modified_validator.validate(val) - self._server_modified_value = val - self._server_modified_present = True - - @server_modified.deleter - def server_modified(self): - self._server_modified_value = None - self._server_modified_present = False - - @property - def rev(self): - """ - A unique identifier for the current revision of a file. This field is - the same rev as elsewhere in the API and can be used to detect changes - and avoid conflicts. - - :rtype: str - """ - if self._rev_present: - return self._rev_value - else: - raise AttributeError("missing required field 'rev'") - - @rev.setter - def rev(self, val): - val = self._rev_validator.validate(val) - self._rev_value = val - self._rev_present = True - - @rev.deleter - def rev(self): - self._rev_value = None - self._rev_present = False - - @property - def size(self): - """ - The file size in bytes. - - :rtype: long - """ - if self._size_present: - return self._size_value - else: - raise AttributeError("missing required field 'size'") - - @size.setter - def size(self, val): - val = self._size_validator.validate(val) - self._size_value = val - self._size_present = True - - @size.deleter - def size(self): - self._size_value = None - self._size_present = False - - def __repr__(self): - return 'FileLinkMetadata(url={!r}, name={!r}, link_permissions={!r}, client_modified={!r}, server_modified={!r}, rev={!r}, size={!r}, id={!r}, expires={!r}, path_lower={!r}, team_member_info={!r}, content_owner_team_info={!r})'.format( - self._url_value, - self._name_value, - self._link_permissions_value, - self._client_modified_value, - self._server_modified_value, - self._rev_value, - self._size_value, - self._id_value, - self._expires_value, - self._path_lower_value, - self._team_member_info_value, - self._content_owner_team_info_value, - ) - -FileLinkMetadata_validator = bv.Struct(FileLinkMetadata) - -class FileMemberActionError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar invalid_member: Specified member was not found. - :ivar no_permission: User does not have permission to perform this action on - this member. - :ivar SharingFileAccessError access_error: Specified file was invalid or - user does not have access. - :ivar MemberAccessLevelResult no_explicit_access: The action cannot be - completed because the target member does not have explicit access to the - file. The return value is the access that the member has to the file - from a parent folder. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - invalid_member = None - # Attribute is overwritten below the class definition - no_permission = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def access_error(cls, val): - """ - Create an instance of this class set to the ``access_error`` tag with - value ``val``. - - :param SharingFileAccessError val: - :rtype: FileMemberActionError - """ - return cls('access_error', val) - - @classmethod - def no_explicit_access(cls, val): - """ - Create an instance of this class set to the ``no_explicit_access`` tag - with value ``val``. - - :param MemberAccessLevelResult val: - :rtype: FileMemberActionError - """ - return cls('no_explicit_access', val) - - def is_invalid_member(self): - """ - Check if the union tag is ``invalid_member``. - - :rtype: bool - """ - return self._tag == 'invalid_member' - - def is_no_permission(self): - """ - Check if the union tag is ``no_permission``. - - :rtype: bool - """ - return self._tag == 'no_permission' - - def is_access_error(self): - """ - Check if the union tag is ``access_error``. - - :rtype: bool - """ - return self._tag == 'access_error' - - def is_no_explicit_access(self): - """ - Check if the union tag is ``no_explicit_access``. - - :rtype: bool - """ - return self._tag == 'no_explicit_access' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_access_error(self): - """ - Specified file was invalid or user does not have access. - - Only call this if :meth:`is_access_error` is true. - - :rtype: SharingFileAccessError - """ - if not self.is_access_error(): - raise AttributeError("tag 'access_error' not set") - return self._value - - def get_no_explicit_access(self): - """ - The action cannot be completed because the target member does not have - explicit access to the file. The return value is the access that the - member has to the file from a parent folder. - - Only call this if :meth:`is_no_explicit_access` is true. - - :rtype: MemberAccessLevelResult - """ - if not self.is_no_explicit_access(): - raise AttributeError("tag 'no_explicit_access' not set") - return self._value - - def __repr__(self): - return 'FileMemberActionError(%r, %r)' % (self._tag, self._value) - -FileMemberActionError_validator = bv.Union(FileMemberActionError) - -class FileMemberActionIndividualResult(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar Optional[AccessLevel] success: Member was successfully removed from - this file. If AccessLevel is given, the member still has access via a - parent shared folder. - :ivar FileMemberActionError member_error: User was not able to perform this - action. - """ - - _catch_all = None - - @classmethod - def success(cls, val): - """ - Create an instance of this class set to the ``success`` tag with value - ``val``. - - :param AccessLevel val: - :rtype: FileMemberActionIndividualResult - """ - return cls('success', val) - - @classmethod - def member_error(cls, val): - """ - Create an instance of this class set to the ``member_error`` tag with - value ``val``. - - :param FileMemberActionError val: - :rtype: FileMemberActionIndividualResult - """ - return cls('member_error', val) - - def is_success(self): - """ - Check if the union tag is ``success``. - - :rtype: bool - """ - return self._tag == 'success' - - def is_member_error(self): - """ - Check if the union tag is ``member_error``. - - :rtype: bool - """ - return self._tag == 'member_error' - - def get_success(self): - """ - Member was successfully removed from this file. If AccessLevel is given, - the member still has access via a parent shared folder. - - Only call this if :meth:`is_success` is true. - - :rtype: AccessLevel - """ - if not self.is_success(): - raise AttributeError("tag 'success' not set") - return self._value - - def get_member_error(self): - """ - User was not able to perform this action. - - Only call this if :meth:`is_member_error` is true. - - :rtype: FileMemberActionError - """ - if not self.is_member_error(): - raise AttributeError("tag 'member_error' not set") - return self._value - - def __repr__(self): - return 'FileMemberActionIndividualResult(%r, %r)' % (self._tag, self._value) - -FileMemberActionIndividualResult_validator = bv.Union(FileMemberActionIndividualResult) - -class FileMemberActionResult(object): - """ - Per-member result for - :meth:`dropbox.dropbox.Dropbox.sharing_add_file_member` or - :meth:`dropbox.dropbox.Dropbox.sharing_change_file_member_access`. - - :ivar member: One of specified input members. - :ivar result: The outcome of the action on this member. - """ - - __slots__ = [ - '_member_value', - '_member_present', - '_result_value', - '_result_present', - ] - - _has_required_fields = True - - def __init__(self, - member=None, - result=None): - self._member_value = None - self._member_present = False - self._result_value = None - self._result_present = False - if member is not None: - self.member = member - if result is not None: - self.result = result - - @property - def member(self): - """ - One of specified input members. - - :rtype: MemberSelector - """ - if self._member_present: - return self._member_value - else: - raise AttributeError("missing required field 'member'") - - @member.setter - def member(self, val): - self._member_validator.validate_type_only(val) - self._member_value = val - self._member_present = True - - @member.deleter - def member(self): - self._member_value = None - self._member_present = False - - @property - def result(self): - """ - The outcome of the action on this member. - - :rtype: FileMemberActionIndividualResult - """ - if self._result_present: - return self._result_value - else: - raise AttributeError("missing required field 'result'") - - @result.setter - def result(self, val): - self._result_validator.validate_type_only(val) - self._result_value = val - self._result_present = True - - @result.deleter - def result(self): - self._result_value = None - self._result_present = False - - def __repr__(self): - return 'FileMemberActionResult(member={!r}, result={!r})'.format( - self._member_value, - self._result_value, - ) - -FileMemberActionResult_validator = bv.Struct(FileMemberActionResult) - -class FileMemberRemoveActionResult(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar MemberAccessLevelResult success: Member was successfully removed from - this file. - :ivar FileMemberActionError member_error: User was not able to remove this - member. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def success(cls, val): - """ - Create an instance of this class set to the ``success`` tag with value - ``val``. - - :param MemberAccessLevelResult val: - :rtype: FileMemberRemoveActionResult - """ - return cls('success', val) - - @classmethod - def member_error(cls, val): - """ - Create an instance of this class set to the ``member_error`` tag with - value ``val``. - - :param FileMemberActionError val: - :rtype: FileMemberRemoveActionResult - """ - return cls('member_error', val) - - def is_success(self): - """ - Check if the union tag is ``success``. - - :rtype: bool - """ - return self._tag == 'success' - - def is_member_error(self): - """ - Check if the union tag is ``member_error``. - - :rtype: bool - """ - return self._tag == 'member_error' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_success(self): - """ - Member was successfully removed from this file. - - Only call this if :meth:`is_success` is true. - - :rtype: MemberAccessLevelResult - """ - if not self.is_success(): - raise AttributeError("tag 'success' not set") - return self._value - - def get_member_error(self): - """ - User was not able to remove this member. - - Only call this if :meth:`is_member_error` is true. - - :rtype: FileMemberActionError - """ - if not self.is_member_error(): - raise AttributeError("tag 'member_error' not set") - return self._value - - def __repr__(self): - return 'FileMemberRemoveActionResult(%r, %r)' % (self._tag, self._value) - -FileMemberRemoveActionResult_validator = bv.Union(FileMemberRemoveActionResult) - -class FilePermission(object): - """ - Whether the user is allowed to take the sharing action on the file. - - :ivar action: The action that the user may wish to take on the file. - :ivar allow: True if the user is allowed to take the action. - :ivar reason: The reason why the user is denied the permission. Not present - if the action is allowed. - """ - - __slots__ = [ - '_action_value', - '_action_present', - '_allow_value', - '_allow_present', - '_reason_value', - '_reason_present', - ] - - _has_required_fields = True - - def __init__(self, - action=None, - allow=None, - reason=None): - self._action_value = None - self._action_present = False - self._allow_value = None - self._allow_present = False - self._reason_value = None - self._reason_present = False - if action is not None: - self.action = action - if allow is not None: - self.allow = allow - if reason is not None: - self.reason = reason - - @property - def action(self): - """ - The action that the user may wish to take on the file. - - :rtype: FileAction - """ - if self._action_present: - return self._action_value - else: - raise AttributeError("missing required field 'action'") - - @action.setter - def action(self, val): - self._action_validator.validate_type_only(val) - self._action_value = val - self._action_present = True - - @action.deleter - def action(self): - self._action_value = None - self._action_present = False - - @property - def allow(self): - """ - True if the user is allowed to take the action. - - :rtype: bool - """ - if self._allow_present: - return self._allow_value - else: - raise AttributeError("missing required field 'allow'") - - @allow.setter - def allow(self, val): - val = self._allow_validator.validate(val) - self._allow_value = val - self._allow_present = True - - @allow.deleter - def allow(self): - self._allow_value = None - self._allow_present = False - - @property - def reason(self): - """ - The reason why the user is denied the permission. Not present if the - action is allowed. - - :rtype: PermissionDeniedReason - """ - if self._reason_present: - return self._reason_value - else: - return None - - @reason.setter - def reason(self, val): - if val is None: - del self.reason - return - self._reason_validator.validate_type_only(val) - self._reason_value = val - self._reason_present = True - - @reason.deleter - def reason(self): - self._reason_value = None - self._reason_present = False - - def __repr__(self): - return 'FilePermission(action={!r}, allow={!r}, reason={!r})'.format( - self._action_value, - self._allow_value, - self._reason_value, - ) - -FilePermission_validator = bv.Struct(FilePermission) - -class FolderAction(bb.Union): - """ - Actions that may be taken on shared folders. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar change_options: Change folder options, such as who can be invited to - join the folder. - :ivar disable_viewer_info: Disable viewer information for this folder. - :ivar edit_contents: Change or edit contents of the folder. - :ivar enable_viewer_info: Enable viewer information on the folder. - :ivar invite_editor: Invite a user or group to join the folder with read and - write permission. - :ivar invite_viewer: Invite a user or group to join the folder with read - permission. - :ivar invite_viewer_no_comment: Invite a user or group to join the folder - with read permission but no comment permissions. - :ivar relinquish_membership: Relinquish one's own membership in the folder. - :ivar unmount: Unmount the folder. - :ivar unshare: Stop sharing this folder. - :ivar leave_a_copy: Keep a copy of the contents upon leaving or being kicked - from the folder. - :ivar share_link: This action is deprecated. Use create_link instead. - :ivar create_link: Create a shared link for folder. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - change_options = None - # Attribute is overwritten below the class definition - disable_viewer_info = None - # Attribute is overwritten below the class definition - edit_contents = None - # Attribute is overwritten below the class definition - enable_viewer_info = None - # Attribute is overwritten below the class definition - invite_editor = None - # Attribute is overwritten below the class definition - invite_viewer = None - # Attribute is overwritten below the class definition - invite_viewer_no_comment = None - # Attribute is overwritten below the class definition - relinquish_membership = None - # Attribute is overwritten below the class definition - unmount = None - # Attribute is overwritten below the class definition - unshare = None - # Attribute is overwritten below the class definition - leave_a_copy = None - # Attribute is overwritten below the class definition - share_link = None - # Attribute is overwritten below the class definition - create_link = None - # Attribute is overwritten below the class definition - other = None - - def is_change_options(self): - """ - Check if the union tag is ``change_options``. - - :rtype: bool - """ - return self._tag == 'change_options' - - def is_disable_viewer_info(self): - """ - Check if the union tag is ``disable_viewer_info``. - - :rtype: bool - """ - return self._tag == 'disable_viewer_info' - - def is_edit_contents(self): - """ - Check if the union tag is ``edit_contents``. - - :rtype: bool - """ - return self._tag == 'edit_contents' - - def is_enable_viewer_info(self): - """ - Check if the union tag is ``enable_viewer_info``. - - :rtype: bool - """ - return self._tag == 'enable_viewer_info' - - def is_invite_editor(self): - """ - Check if the union tag is ``invite_editor``. - - :rtype: bool - """ - return self._tag == 'invite_editor' - - def is_invite_viewer(self): - """ - Check if the union tag is ``invite_viewer``. - - :rtype: bool - """ - return self._tag == 'invite_viewer' - - def is_invite_viewer_no_comment(self): - """ - Check if the union tag is ``invite_viewer_no_comment``. - - :rtype: bool - """ - return self._tag == 'invite_viewer_no_comment' - - def is_relinquish_membership(self): - """ - Check if the union tag is ``relinquish_membership``. - - :rtype: bool - """ - return self._tag == 'relinquish_membership' - - def is_unmount(self): - """ - Check if the union tag is ``unmount``. - - :rtype: bool - """ - return self._tag == 'unmount' - - def is_unshare(self): - """ - Check if the union tag is ``unshare``. - - :rtype: bool - """ - return self._tag == 'unshare' - - def is_leave_a_copy(self): - """ - Check if the union tag is ``leave_a_copy``. - - :rtype: bool - """ - return self._tag == 'leave_a_copy' - - def is_share_link(self): - """ - Check if the union tag is ``share_link``. - - :rtype: bool - """ - return self._tag == 'share_link' - - def is_create_link(self): - """ - Check if the union tag is ``create_link``. - - :rtype: bool - """ - return self._tag == 'create_link' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'FolderAction(%r, %r)' % (self._tag, self._value) - -FolderAction_validator = bv.Union(FolderAction) - -class FolderLinkMetadata(SharedLinkMetadata): - """ - The metadata of a folder shared link. - """ - - __slots__ = [ - ] - - _has_required_fields = True - - def __init__(self, - url=None, - name=None, - link_permissions=None, - id=None, - expires=None, - path_lower=None, - team_member_info=None, - content_owner_team_info=None): - super(FolderLinkMetadata, self).__init__(url, - name, - link_permissions, - id, - expires, - path_lower, - team_member_info, - content_owner_team_info) - - def __repr__(self): - return 'FolderLinkMetadata(url={!r}, name={!r}, link_permissions={!r}, id={!r}, expires={!r}, path_lower={!r}, team_member_info={!r}, content_owner_team_info={!r})'.format( - self._url_value, - self._name_value, - self._link_permissions_value, - self._id_value, - self._expires_value, - self._path_lower_value, - self._team_member_info_value, - self._content_owner_team_info_value, - ) - -FolderLinkMetadata_validator = bv.Struct(FolderLinkMetadata) - -class FolderPermission(object): - """ - Whether the user is allowed to take the action on the shared folder. - - :ivar action: The action that the user may wish to take on the folder. - :ivar allow: True if the user is allowed to take the action. - :ivar reason: The reason why the user is denied the permission. Not present - if the action is allowed, or if no reason is available. - """ - - __slots__ = [ - '_action_value', - '_action_present', - '_allow_value', - '_allow_present', - '_reason_value', - '_reason_present', - ] - - _has_required_fields = True - - def __init__(self, - action=None, - allow=None, - reason=None): - self._action_value = None - self._action_present = False - self._allow_value = None - self._allow_present = False - self._reason_value = None - self._reason_present = False - if action is not None: - self.action = action - if allow is not None: - self.allow = allow - if reason is not None: - self.reason = reason - - @property - def action(self): - """ - The action that the user may wish to take on the folder. - - :rtype: FolderAction - """ - if self._action_present: - return self._action_value - else: - raise AttributeError("missing required field 'action'") - - @action.setter - def action(self, val): - self._action_validator.validate_type_only(val) - self._action_value = val - self._action_present = True - - @action.deleter - def action(self): - self._action_value = None - self._action_present = False - - @property - def allow(self): - """ - True if the user is allowed to take the action. - - :rtype: bool - """ - if self._allow_present: - return self._allow_value - else: - raise AttributeError("missing required field 'allow'") - - @allow.setter - def allow(self, val): - val = self._allow_validator.validate(val) - self._allow_value = val - self._allow_present = True - - @allow.deleter - def allow(self): - self._allow_value = None - self._allow_present = False - - @property - def reason(self): - """ - The reason why the user is denied the permission. Not present if the - action is allowed, or if no reason is available. - - :rtype: PermissionDeniedReason - """ - if self._reason_present: - return self._reason_value - else: - return None - - @reason.setter - def reason(self, val): - if val is None: - del self.reason - return - self._reason_validator.validate_type_only(val) - self._reason_value = val - self._reason_present = True - - @reason.deleter - def reason(self): - self._reason_value = None - self._reason_present = False - - def __repr__(self): - return 'FolderPermission(action={!r}, allow={!r}, reason={!r})'.format( - self._action_value, - self._allow_value, - self._reason_value, - ) - -FolderPermission_validator = bv.Struct(FolderPermission) - -class FolderPolicy(object): - """ - A set of policies governing membership and privileges for a shared folder. - - :ivar member_policy: Who can be a member of this shared folder, as set on - the folder itself. The effective policy may differ from this value if - the team-wide policy is more restrictive. Present only if the folder is - owned by a team. - :ivar resolved_member_policy: Who can be a member of this shared folder, - taking into account both the folder and the team-wide policy. This value - may differ from that of member_policy if the team-wide policy is more - restrictive than the folder policy. Present only if the folder is owned - by a team. - :ivar acl_update_policy: Who can add and remove members from this shared - folder. - :ivar shared_link_policy: Who links can be shared with. - :ivar viewer_info_policy: Who can enable/disable viewer info for this shared - folder. - """ - - __slots__ = [ - '_member_policy_value', - '_member_policy_present', - '_resolved_member_policy_value', - '_resolved_member_policy_present', - '_acl_update_policy_value', - '_acl_update_policy_present', - '_shared_link_policy_value', - '_shared_link_policy_present', - '_viewer_info_policy_value', - '_viewer_info_policy_present', - ] - - _has_required_fields = True - - def __init__(self, - acl_update_policy=None, - shared_link_policy=None, - member_policy=None, - resolved_member_policy=None, - viewer_info_policy=None): - self._member_policy_value = None - self._member_policy_present = False - self._resolved_member_policy_value = None - self._resolved_member_policy_present = False - self._acl_update_policy_value = None - self._acl_update_policy_present = False - self._shared_link_policy_value = None - self._shared_link_policy_present = False - self._viewer_info_policy_value = None - self._viewer_info_policy_present = False - if member_policy is not None: - self.member_policy = member_policy - if resolved_member_policy is not None: - self.resolved_member_policy = resolved_member_policy - if acl_update_policy is not None: - self.acl_update_policy = acl_update_policy - if shared_link_policy is not None: - self.shared_link_policy = shared_link_policy - if viewer_info_policy is not None: - self.viewer_info_policy = viewer_info_policy - - @property - def member_policy(self): - """ - Who can be a member of this shared folder, as set on the folder itself. - The effective policy may differ from this value if the team-wide policy - is more restrictive. Present only if the folder is owned by a team. - - :rtype: MemberPolicy - """ - if self._member_policy_present: - return self._member_policy_value - else: - return None - - @member_policy.setter - def member_policy(self, val): - if val is None: - del self.member_policy - return - self._member_policy_validator.validate_type_only(val) - self._member_policy_value = val - self._member_policy_present = True - - @member_policy.deleter - def member_policy(self): - self._member_policy_value = None - self._member_policy_present = False - - @property - def resolved_member_policy(self): - """ - Who can be a member of this shared folder, taking into account both the - folder and the team-wide policy. This value may differ from that of - member_policy if the team-wide policy is more restrictive than the - folder policy. Present only if the folder is owned by a team. - - :rtype: MemberPolicy - """ - if self._resolved_member_policy_present: - return self._resolved_member_policy_value - else: - return None - - @resolved_member_policy.setter - def resolved_member_policy(self, val): - if val is None: - del self.resolved_member_policy - return - self._resolved_member_policy_validator.validate_type_only(val) - self._resolved_member_policy_value = val - self._resolved_member_policy_present = True - - @resolved_member_policy.deleter - def resolved_member_policy(self): - self._resolved_member_policy_value = None - self._resolved_member_policy_present = False - - @property - def acl_update_policy(self): - """ - Who can add and remove members from this shared folder. - - :rtype: AclUpdatePolicy - """ - if self._acl_update_policy_present: - return self._acl_update_policy_value - else: - raise AttributeError("missing required field 'acl_update_policy'") - - @acl_update_policy.setter - def acl_update_policy(self, val): - self._acl_update_policy_validator.validate_type_only(val) - self._acl_update_policy_value = val - self._acl_update_policy_present = True - - @acl_update_policy.deleter - def acl_update_policy(self): - self._acl_update_policy_value = None - self._acl_update_policy_present = False - - @property - def shared_link_policy(self): - """ - Who links can be shared with. - - :rtype: SharedLinkPolicy - """ - if self._shared_link_policy_present: - return self._shared_link_policy_value - else: - raise AttributeError("missing required field 'shared_link_policy'") - - @shared_link_policy.setter - def shared_link_policy(self, val): - self._shared_link_policy_validator.validate_type_only(val) - self._shared_link_policy_value = val - self._shared_link_policy_present = True - - @shared_link_policy.deleter - def shared_link_policy(self): - self._shared_link_policy_value = None - self._shared_link_policy_present = False - - @property - def viewer_info_policy(self): - """ - Who can enable/disable viewer info for this shared folder. - - :rtype: ViewerInfoPolicy - """ - if self._viewer_info_policy_present: - return self._viewer_info_policy_value - else: - return None - - @viewer_info_policy.setter - def viewer_info_policy(self, val): - if val is None: - del self.viewer_info_policy - return - self._viewer_info_policy_validator.validate_type_only(val) - self._viewer_info_policy_value = val - self._viewer_info_policy_present = True - - @viewer_info_policy.deleter - def viewer_info_policy(self): - self._viewer_info_policy_value = None - self._viewer_info_policy_present = False - - def __repr__(self): - return 'FolderPolicy(acl_update_policy={!r}, shared_link_policy={!r}, member_policy={!r}, resolved_member_policy={!r}, viewer_info_policy={!r})'.format( - self._acl_update_policy_value, - self._shared_link_policy_value, - self._member_policy_value, - self._resolved_member_policy_value, - self._viewer_info_policy_value, - ) - -FolderPolicy_validator = bv.Struct(FolderPolicy) - -class GetFileMetadataArg(object): - """ - Arguments of :meth:`dropbox.dropbox.Dropbox.sharing_get_file_metadata`. - - :ivar file: The file to query. - :ivar actions: A list of `FileAction`s corresponding to `FilePermission`s - that should appear in the response's ``SharedFileMetadata.permissions`` - field describing the actions the authenticated user can perform on the - file. - """ - - __slots__ = [ - '_file_value', - '_file_present', - '_actions_value', - '_actions_present', - ] - - _has_required_fields = True - - def __init__(self, - file=None, - actions=None): - self._file_value = None - self._file_present = False - self._actions_value = None - self._actions_present = False - if file is not None: - self.file = file - if actions is not None: - self.actions = actions - - @property - def file(self): - """ - The file to query. - - :rtype: str - """ - if self._file_present: - return self._file_value - else: - raise AttributeError("missing required field 'file'") - - @file.setter - def file(self, val): - val = self._file_validator.validate(val) - self._file_value = val - self._file_present = True - - @file.deleter - def file(self): - self._file_value = None - self._file_present = False - - @property - def actions(self): - """ - A list of `FileAction`s corresponding to `FilePermission`s that should - appear in the response's ``SharedFileMetadata.permissions`` field - describing the actions the authenticated user can perform on the file. - - :rtype: list of [FileAction] - """ - if self._actions_present: - return self._actions_value - else: - return None - - @actions.setter - def actions(self, val): - if val is None: - del self.actions - return - val = self._actions_validator.validate(val) - self._actions_value = val - self._actions_present = True - - @actions.deleter - def actions(self): - self._actions_value = None - self._actions_present = False - - def __repr__(self): - return 'GetFileMetadataArg(file={!r}, actions={!r})'.format( - self._file_value, - self._actions_value, - ) - -GetFileMetadataArg_validator = bv.Struct(GetFileMetadataArg) - -class GetFileMetadataBatchArg(object): - """ - Arguments of - :meth:`dropbox.dropbox.Dropbox.sharing_get_file_metadata_batch`. - - :ivar files: The files to query. - :ivar actions: A list of `FileAction`s corresponding to `FilePermission`s - that should appear in the response's ``SharedFileMetadata.permissions`` - field describing the actions the authenticated user can perform on the - file. - """ - - __slots__ = [ - '_files_value', - '_files_present', - '_actions_value', - '_actions_present', - ] - - _has_required_fields = True - - def __init__(self, - files=None, - actions=None): - self._files_value = None - self._files_present = False - self._actions_value = None - self._actions_present = False - if files is not None: - self.files = files - if actions is not None: - self.actions = actions - - @property - def files(self): - """ - The files to query. - - :rtype: list of [str] - """ - if self._files_present: - return self._files_value - else: - raise AttributeError("missing required field 'files'") - - @files.setter - def files(self, val): - val = self._files_validator.validate(val) - self._files_value = val - self._files_present = True - - @files.deleter - def files(self): - self._files_value = None - self._files_present = False - - @property - def actions(self): - """ - A list of `FileAction`s corresponding to `FilePermission`s that should - appear in the response's ``SharedFileMetadata.permissions`` field - describing the actions the authenticated user can perform on the file. - - :rtype: list of [FileAction] - """ - if self._actions_present: - return self._actions_value - else: - return None - - @actions.setter - def actions(self, val): - if val is None: - del self.actions - return - val = self._actions_validator.validate(val) - self._actions_value = val - self._actions_present = True - - @actions.deleter - def actions(self): - self._actions_value = None - self._actions_present = False - - def __repr__(self): - return 'GetFileMetadataBatchArg(files={!r}, actions={!r})'.format( - self._files_value, - self._actions_value, - ) - -GetFileMetadataBatchArg_validator = bv.Struct(GetFileMetadataBatchArg) - -class GetFileMetadataBatchResult(object): - """ - Per file results of - :meth:`dropbox.dropbox.Dropbox.sharing_get_file_metadata_batch`. - - :ivar file: This is the input file identifier corresponding to one of - ``GetFileMetadataBatchArg.files``. - :ivar result: The result for this particular file. - """ - - __slots__ = [ - '_file_value', - '_file_present', - '_result_value', - '_result_present', - ] - - _has_required_fields = True - - def __init__(self, - file=None, - result=None): - self._file_value = None - self._file_present = False - self._result_value = None - self._result_present = False - if file is not None: - self.file = file - if result is not None: - self.result = result - - @property - def file(self): - """ - This is the input file identifier corresponding to one of - ``GetFileMetadataBatchArg.files``. - - :rtype: str - """ - if self._file_present: - return self._file_value - else: - raise AttributeError("missing required field 'file'") - - @file.setter - def file(self, val): - val = self._file_validator.validate(val) - self._file_value = val - self._file_present = True - - @file.deleter - def file(self): - self._file_value = None - self._file_present = False - - @property - def result(self): - """ - The result for this particular file. - - :rtype: GetFileMetadataIndividualResult - """ - if self._result_present: - return self._result_value - else: - raise AttributeError("missing required field 'result'") - - @result.setter - def result(self, val): - self._result_validator.validate_type_only(val) - self._result_value = val - self._result_present = True - - @result.deleter - def result(self): - self._result_value = None - self._result_present = False - - def __repr__(self): - return 'GetFileMetadataBatchResult(file={!r}, result={!r})'.format( - self._file_value, - self._result_value, - ) - -GetFileMetadataBatchResult_validator = bv.Struct(GetFileMetadataBatchResult) - -class GetFileMetadataError(bb.Union): - """ - Error result for :meth:`dropbox.dropbox.Dropbox.sharing_get_file_metadata`. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def user_error(cls, val): - """ - Create an instance of this class set to the ``user_error`` tag with - value ``val``. - - :param SharingUserError val: - :rtype: GetFileMetadataError - """ - return cls('user_error', val) - - @classmethod - def access_error(cls, val): - """ - Create an instance of this class set to the ``access_error`` tag with - value ``val``. - - :param SharingFileAccessError val: - :rtype: GetFileMetadataError - """ - return cls('access_error', val) - - def is_user_error(self): - """ - Check if the union tag is ``user_error``. - - :rtype: bool - """ - return self._tag == 'user_error' - - def is_access_error(self): - """ - Check if the union tag is ``access_error``. - - :rtype: bool - """ - return self._tag == 'access_error' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_user_error(self): - """ - Only call this if :meth:`is_user_error` is true. - - :rtype: SharingUserError - """ - if not self.is_user_error(): - raise AttributeError("tag 'user_error' not set") - return self._value - - def get_access_error(self): - """ - Only call this if :meth:`is_access_error` is true. - - :rtype: SharingFileAccessError - """ - if not self.is_access_error(): - raise AttributeError("tag 'access_error' not set") - return self._value - - def __repr__(self): - return 'GetFileMetadataError(%r, %r)' % (self._tag, self._value) - -GetFileMetadataError_validator = bv.Union(GetFileMetadataError) - -class GetFileMetadataIndividualResult(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar SharedFileMetadata metadata: The result for this file if it was - successful. - :ivar SharingFileAccessError access_error: The result for this file if it - was an error. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def metadata(cls, val): - """ - Create an instance of this class set to the ``metadata`` tag with value - ``val``. - - :param SharedFileMetadata val: - :rtype: GetFileMetadataIndividualResult - """ - return cls('metadata', val) - - @classmethod - def access_error(cls, val): - """ - Create an instance of this class set to the ``access_error`` tag with - value ``val``. - - :param SharingFileAccessError val: - :rtype: GetFileMetadataIndividualResult - """ - return cls('access_error', val) - - def is_metadata(self): - """ - Check if the union tag is ``metadata``. - - :rtype: bool - """ - return self._tag == 'metadata' - - def is_access_error(self): - """ - Check if the union tag is ``access_error``. - - :rtype: bool - """ - return self._tag == 'access_error' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_metadata(self): - """ - The result for this file if it was successful. - - Only call this if :meth:`is_metadata` is true. - - :rtype: SharedFileMetadata - """ - if not self.is_metadata(): - raise AttributeError("tag 'metadata' not set") - return self._value - - def get_access_error(self): - """ - The result for this file if it was an error. - - Only call this if :meth:`is_access_error` is true. - - :rtype: SharingFileAccessError - """ - if not self.is_access_error(): - raise AttributeError("tag 'access_error' not set") - return self._value - - def __repr__(self): - return 'GetFileMetadataIndividualResult(%r, %r)' % (self._tag, self._value) - -GetFileMetadataIndividualResult_validator = bv.Union(GetFileMetadataIndividualResult) - -class GetMetadataArgs(object): - """ - :ivar shared_folder_id: The ID for the shared folder. - :ivar actions: A list of `FolderAction`s corresponding to - `FolderPermission`s that should appear in the response's - ``SharedFolderMetadata.permissions`` field describing the actions the - authenticated user can perform on the folder. - """ - - __slots__ = [ - '_shared_folder_id_value', - '_shared_folder_id_present', - '_actions_value', - '_actions_present', - ] - - _has_required_fields = True - - def __init__(self, - shared_folder_id=None, - actions=None): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - self._actions_value = None - self._actions_present = False - if shared_folder_id is not None: - self.shared_folder_id = shared_folder_id - if actions is not None: - self.actions = actions - - @property - def shared_folder_id(self): - """ - The ID for the shared folder. - - :rtype: str - """ - if self._shared_folder_id_present: - return self._shared_folder_id_value - else: - raise AttributeError("missing required field 'shared_folder_id'") - - @shared_folder_id.setter - def shared_folder_id(self, val): - val = self._shared_folder_id_validator.validate(val) - self._shared_folder_id_value = val - self._shared_folder_id_present = True - - @shared_folder_id.deleter - def shared_folder_id(self): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - - @property - def actions(self): - """ - A list of `FolderAction`s corresponding to `FolderPermission`s that - should appear in the response's ``SharedFolderMetadata.permissions`` - field describing the actions the authenticated user can perform on the - folder. - - :rtype: list of [FolderAction] - """ - if self._actions_present: - return self._actions_value - else: - return None - - @actions.setter - def actions(self, val): - if val is None: - del self.actions - return - val = self._actions_validator.validate(val) - self._actions_value = val - self._actions_present = True - - @actions.deleter - def actions(self): - self._actions_value = None - self._actions_present = False - - def __repr__(self): - return 'GetMetadataArgs(shared_folder_id={!r}, actions={!r})'.format( - self._shared_folder_id_value, - self._actions_value, - ) - -GetMetadataArgs_validator = bv.Struct(GetMetadataArgs) - -class SharedLinkError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar shared_link_not_found: The shared link wasn't found. - :ivar shared_link_access_denied: The caller is not allowed to access this - shared link. - :ivar unsupported_link_type: This type of link is not supported. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - shared_link_not_found = None - # Attribute is overwritten below the class definition - shared_link_access_denied = None - # Attribute is overwritten below the class definition - unsupported_link_type = None - # Attribute is overwritten below the class definition - other = None - - def is_shared_link_not_found(self): - """ - Check if the union tag is ``shared_link_not_found``. - - :rtype: bool - """ - return self._tag == 'shared_link_not_found' - - def is_shared_link_access_denied(self): - """ - Check if the union tag is ``shared_link_access_denied``. - - :rtype: bool - """ - return self._tag == 'shared_link_access_denied' - - def is_unsupported_link_type(self): - """ - Check if the union tag is ``unsupported_link_type``. - - :rtype: bool - """ - return self._tag == 'unsupported_link_type' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SharedLinkError(%r, %r)' % (self._tag, self._value) - -SharedLinkError_validator = bv.Union(SharedLinkError) - -class GetSharedLinkFileError(SharedLinkError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar shared_link_is_directory: Directories cannot be retrieved by this - endpoint. - """ - - # Attribute is overwritten below the class definition - shared_link_is_directory = None - - def is_shared_link_is_directory(self): - """ - Check if the union tag is ``shared_link_is_directory``. - - :rtype: bool - """ - return self._tag == 'shared_link_is_directory' - - def __repr__(self): - return 'GetSharedLinkFileError(%r, %r)' % (self._tag, self._value) - -GetSharedLinkFileError_validator = bv.Union(GetSharedLinkFileError) - -class GetSharedLinkMetadataArg(object): - """ - :ivar url: URL of the shared link. - :ivar path: If the shared link is to a folder, this parameter can be used to - retrieve the metadata for a specific file or sub-folder in this folder. - A relative path should be used. - :ivar link_password: If the shared link has a password, this parameter can - be used. - """ - - __slots__ = [ - '_url_value', - '_url_present', - '_path_value', - '_path_present', - '_link_password_value', - '_link_password_present', - ] - - _has_required_fields = True - - def __init__(self, - url=None, - path=None, - link_password=None): - self._url_value = None - self._url_present = False - self._path_value = None - self._path_present = False - self._link_password_value = None - self._link_password_present = False - if url is not None: - self.url = url - if path is not None: - self.path = path - if link_password is not None: - self.link_password = link_password - - @property - def url(self): - """ - URL of the shared link. - - :rtype: str - """ - if self._url_present: - return self._url_value - else: - raise AttributeError("missing required field 'url'") - - @url.setter - def url(self, val): - val = self._url_validator.validate(val) - self._url_value = val - self._url_present = True - - @url.deleter - def url(self): - self._url_value = None - self._url_present = False - - @property - def path(self): - """ - If the shared link is to a folder, this parameter can be used to - retrieve the metadata for a specific file or sub-folder in this folder. - A relative path should be used. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - return None - - @path.setter - def path(self, val): - if val is None: - del self.path - return - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def link_password(self): - """ - If the shared link has a password, this parameter can be used. - - :rtype: str - """ - if self._link_password_present: - return self._link_password_value - else: - return None - - @link_password.setter - def link_password(self, val): - if val is None: - del self.link_password - return - val = self._link_password_validator.validate(val) - self._link_password_value = val - self._link_password_present = True - - @link_password.deleter - def link_password(self): - self._link_password_value = None - self._link_password_present = False - - def __repr__(self): - return 'GetSharedLinkMetadataArg(url={!r}, path={!r}, link_password={!r})'.format( - self._url_value, - self._path_value, - self._link_password_value, - ) - -GetSharedLinkMetadataArg_validator = bv.Struct(GetSharedLinkMetadataArg) - -class GetSharedLinksArg(object): - """ - :ivar path: See :meth:`dropbox.dropbox.Dropbox.sharing_get_shared_links` - description. - """ - - __slots__ = [ - '_path_value', - '_path_present', - ] - - _has_required_fields = False - - def __init__(self, - path=None): - self._path_value = None - self._path_present = False - if path is not None: - self.path = path - - @property - def path(self): - """ - See :meth:`dropbox.dropbox.Dropbox.sharing_get_shared_links` - description. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - return None - - @path.setter - def path(self, val): - if val is None: - del self.path - return - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - def __repr__(self): - return 'GetSharedLinksArg(path={!r})'.format( - self._path_value, - ) - -GetSharedLinksArg_validator = bv.Struct(GetSharedLinksArg) - -class GetSharedLinksError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def path(cls, val): - """ - Create an instance of this class set to the ``path`` tag with value - ``val``. - - :param Optional[str] val: - :rtype: GetSharedLinksError - """ - return cls('path', val) - - def is_path(self): - """ - Check if the union tag is ``path``. - - :rtype: bool - """ - return self._tag == 'path' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_path(self): - """ - Only call this if :meth:`is_path` is true. - - :rtype: Optional[str] - """ - if not self.is_path(): - raise AttributeError("tag 'path' not set") - return self._value - - def __repr__(self): - return 'GetSharedLinksError(%r, %r)' % (self._tag, self._value) - -GetSharedLinksError_validator = bv.Union(GetSharedLinksError) - -class GetSharedLinksResult(object): - """ - :ivar links: Shared links applicable to the path argument. - """ - - __slots__ = [ - '_links_value', - '_links_present', - ] - - _has_required_fields = True - - def __init__(self, - links=None): - self._links_value = None - self._links_present = False - if links is not None: - self.links = links - - @property - def links(self): - """ - Shared links applicable to the path argument. - - :rtype: list of [LinkMetadata] - """ - if self._links_present: - return self._links_value - else: - raise AttributeError("missing required field 'links'") - - @links.setter - def links(self, val): - val = self._links_validator.validate(val) - self._links_value = val - self._links_present = True - - @links.deleter - def links(self): - self._links_value = None - self._links_present = False - - def __repr__(self): - return 'GetSharedLinksResult(links={!r})'.format( - self._links_value, - ) - -GetSharedLinksResult_validator = bv.Struct(GetSharedLinksResult) - -class GroupInfo(team_common.GroupSummary): - """ - The information about a group. Groups is a way to manage a list of users - who need same access permission to the shared folder. - - :ivar group_type: The type of group. - :ivar is_member: If the current user is a member of the group. - :ivar is_owner: If the current user is an owner of the group. - :ivar same_team: If the group is owned by the current user's team. - """ - - __slots__ = [ - '_group_type_value', - '_group_type_present', - '_is_member_value', - '_is_member_present', - '_is_owner_value', - '_is_owner_present', - '_same_team_value', - '_same_team_present', - ] - - _has_required_fields = True - - def __init__(self, - group_name=None, - group_id=None, - group_management_type=None, - group_type=None, - is_member=None, - is_owner=None, - same_team=None, - group_external_id=None, - member_count=None): - super(GroupInfo, self).__init__(group_name, - group_id, - group_management_type, - group_external_id, - member_count) - self._group_type_value = None - self._group_type_present = False - self._is_member_value = None - self._is_member_present = False - self._is_owner_value = None - self._is_owner_present = False - self._same_team_value = None - self._same_team_present = False - if group_type is not None: - self.group_type = group_type - if is_member is not None: - self.is_member = is_member - if is_owner is not None: - self.is_owner = is_owner - if same_team is not None: - self.same_team = same_team - - @property - def group_type(self): - """ - The type of group. - - :rtype: team_common.GroupType_validator - """ - if self._group_type_present: - return self._group_type_value - else: - raise AttributeError("missing required field 'group_type'") - - @group_type.setter - def group_type(self, val): - self._group_type_validator.validate_type_only(val) - self._group_type_value = val - self._group_type_present = True - - @group_type.deleter - def group_type(self): - self._group_type_value = None - self._group_type_present = False - - @property - def is_member(self): - """ - If the current user is a member of the group. - - :rtype: bool - """ - if self._is_member_present: - return self._is_member_value - else: - raise AttributeError("missing required field 'is_member'") - - @is_member.setter - def is_member(self, val): - val = self._is_member_validator.validate(val) - self._is_member_value = val - self._is_member_present = True - - @is_member.deleter - def is_member(self): - self._is_member_value = None - self._is_member_present = False - - @property - def is_owner(self): - """ - If the current user is an owner of the group. - - :rtype: bool - """ - if self._is_owner_present: - return self._is_owner_value - else: - raise AttributeError("missing required field 'is_owner'") - - @is_owner.setter - def is_owner(self, val): - val = self._is_owner_validator.validate(val) - self._is_owner_value = val - self._is_owner_present = True - - @is_owner.deleter - def is_owner(self): - self._is_owner_value = None - self._is_owner_present = False - - @property - def same_team(self): - """ - If the group is owned by the current user's team. - - :rtype: bool - """ - if self._same_team_present: - return self._same_team_value - else: - raise AttributeError("missing required field 'same_team'") - - @same_team.setter - def same_team(self, val): - val = self._same_team_validator.validate(val) - self._same_team_value = val - self._same_team_present = True - - @same_team.deleter - def same_team(self): - self._same_team_value = None - self._same_team_present = False - - def __repr__(self): - return 'GroupInfo(group_name={!r}, group_id={!r}, group_management_type={!r}, group_type={!r}, is_member={!r}, is_owner={!r}, same_team={!r}, group_external_id={!r}, member_count={!r})'.format( - self._group_name_value, - self._group_id_value, - self._group_management_type_value, - self._group_type_value, - self._is_member_value, - self._is_owner_value, - self._same_team_value, - self._group_external_id_value, - self._member_count_value, - ) - -GroupInfo_validator = bv.Struct(GroupInfo) - -class MembershipInfo(object): - """ - The information about a member of the shared content. - - :ivar access_type: The access type for this member. - :ivar permissions: The permissions that requesting user has on this member. - The set of permissions corresponds to the MemberActions in the request. - :ivar initials: Suggested name initials for a member. - :ivar is_inherited: True if the member has access from a parent folder. - """ - - __slots__ = [ - '_access_type_value', - '_access_type_present', - '_permissions_value', - '_permissions_present', - '_initials_value', - '_initials_present', - '_is_inherited_value', - '_is_inherited_present', - ] - - _has_required_fields = True - - def __init__(self, - access_type=None, - permissions=None, - initials=None, - is_inherited=None): - self._access_type_value = None - self._access_type_present = False - self._permissions_value = None - self._permissions_present = False - self._initials_value = None - self._initials_present = False - self._is_inherited_value = None - self._is_inherited_present = False - if access_type is not None: - self.access_type = access_type - if permissions is not None: - self.permissions = permissions - if initials is not None: - self.initials = initials - if is_inherited is not None: - self.is_inherited = is_inherited - - @property - def access_type(self): - """ - The access type for this member. - - :rtype: AccessLevel - """ - if self._access_type_present: - return self._access_type_value - else: - raise AttributeError("missing required field 'access_type'") - - @access_type.setter - def access_type(self, val): - self._access_type_validator.validate_type_only(val) - self._access_type_value = val - self._access_type_present = True - - @access_type.deleter - def access_type(self): - self._access_type_value = None - self._access_type_present = False - - @property - def permissions(self): - """ - The permissions that requesting user has on this member. The set of - permissions corresponds to the MemberActions in the request. - - :rtype: list of [MemberPermission] - """ - if self._permissions_present: - return self._permissions_value - else: - return None - - @permissions.setter - def permissions(self, val): - if val is None: - del self.permissions - return - val = self._permissions_validator.validate(val) - self._permissions_value = val - self._permissions_present = True - - @permissions.deleter - def permissions(self): - self._permissions_value = None - self._permissions_present = False - - @property - def initials(self): - """ - Suggested name initials for a member. - - :rtype: str - """ - if self._initials_present: - return self._initials_value - else: - return None - - @initials.setter - def initials(self, val): - if val is None: - del self.initials - return - val = self._initials_validator.validate(val) - self._initials_value = val - self._initials_present = True - - @initials.deleter - def initials(self): - self._initials_value = None - self._initials_present = False - - @property - def is_inherited(self): - """ - True if the member has access from a parent folder. - - :rtype: bool - """ - if self._is_inherited_present: - return self._is_inherited_value - else: - return False - - @is_inherited.setter - def is_inherited(self, val): - val = self._is_inherited_validator.validate(val) - self._is_inherited_value = val - self._is_inherited_present = True - - @is_inherited.deleter - def is_inherited(self): - self._is_inherited_value = None - self._is_inherited_present = False - - def __repr__(self): - return 'MembershipInfo(access_type={!r}, permissions={!r}, initials={!r}, is_inherited={!r})'.format( - self._access_type_value, - self._permissions_value, - self._initials_value, - self._is_inherited_value, - ) - -MembershipInfo_validator = bv.Struct(MembershipInfo) - -class GroupMembershipInfo(MembershipInfo): - """ - The information about a group member of the shared content. - - :ivar group: The information about the membership group. - """ - - __slots__ = [ - '_group_value', - '_group_present', - ] - - _has_required_fields = True - - def __init__(self, - access_type=None, - group=None, - permissions=None, - initials=None, - is_inherited=None): - super(GroupMembershipInfo, self).__init__(access_type, - permissions, - initials, - is_inherited) - self._group_value = None - self._group_present = False - if group is not None: - self.group = group - - @property - def group(self): - """ - The information about the membership group. - - :rtype: GroupInfo - """ - if self._group_present: - return self._group_value - else: - raise AttributeError("missing required field 'group'") - - @group.setter - def group(self, val): - self._group_validator.validate_type_only(val) - self._group_value = val - self._group_present = True - - @group.deleter - def group(self): - self._group_value = None - self._group_present = False - - def __repr__(self): - return 'GroupMembershipInfo(access_type={!r}, group={!r}, permissions={!r}, initials={!r}, is_inherited={!r})'.format( - self._access_type_value, - self._group_value, - self._permissions_value, - self._initials_value, - self._is_inherited_value, - ) - -GroupMembershipInfo_validator = bv.Struct(GroupMembershipInfo) - -class InsufficientPlan(object): - """ - :ivar message: A message to tell the user to upgrade in order to support - expected action. - :ivar upsell_url: A URL to send the user to in order to obtain the account - type they need, e.g. upgrading. Absent if there is no action the user - can take to upgrade. - """ - - __slots__ = [ - '_message_value', - '_message_present', - '_upsell_url_value', - '_upsell_url_present', - ] - - _has_required_fields = True - - def __init__(self, - message=None, - upsell_url=None): - self._message_value = None - self._message_present = False - self._upsell_url_value = None - self._upsell_url_present = False - if message is not None: - self.message = message - if upsell_url is not None: - self.upsell_url = upsell_url - - @property - def message(self): - """ - A message to tell the user to upgrade in order to support expected - action. - - :rtype: str - """ - if self._message_present: - return self._message_value - else: - raise AttributeError("missing required field 'message'") - - @message.setter - def message(self, val): - val = self._message_validator.validate(val) - self._message_value = val - self._message_present = True - - @message.deleter - def message(self): - self._message_value = None - self._message_present = False - - @property - def upsell_url(self): - """ - A URL to send the user to in order to obtain the account type they need, - e.g. upgrading. Absent if there is no action the user can take to - upgrade. - - :rtype: str - """ - if self._upsell_url_present: - return self._upsell_url_value - else: - return None - - @upsell_url.setter - def upsell_url(self, val): - if val is None: - del self.upsell_url - return - val = self._upsell_url_validator.validate(val) - self._upsell_url_value = val - self._upsell_url_present = True - - @upsell_url.deleter - def upsell_url(self): - self._upsell_url_value = None - self._upsell_url_present = False - - def __repr__(self): - return 'InsufficientPlan(message={!r}, upsell_url={!r})'.format( - self._message_value, - self._upsell_url_value, - ) - -InsufficientPlan_validator = bv.Struct(InsufficientPlan) - -class InsufficientQuotaAmounts(object): - """ - :ivar space_needed: The amount of space needed to add the item (the size of - the item). - :ivar space_shortage: The amount of extra space needed to add the item. - :ivar space_left: The amount of space left in the user's Dropbox, less than - space_needed. - """ - - __slots__ = [ - '_space_needed_value', - '_space_needed_present', - '_space_shortage_value', - '_space_shortage_present', - '_space_left_value', - '_space_left_present', - ] - - _has_required_fields = True - - def __init__(self, - space_needed=None, - space_shortage=None, - space_left=None): - self._space_needed_value = None - self._space_needed_present = False - self._space_shortage_value = None - self._space_shortage_present = False - self._space_left_value = None - self._space_left_present = False - if space_needed is not None: - self.space_needed = space_needed - if space_shortage is not None: - self.space_shortage = space_shortage - if space_left is not None: - self.space_left = space_left - - @property - def space_needed(self): - """ - The amount of space needed to add the item (the size of the item). - - :rtype: long - """ - if self._space_needed_present: - return self._space_needed_value - else: - raise AttributeError("missing required field 'space_needed'") - - @space_needed.setter - def space_needed(self, val): - val = self._space_needed_validator.validate(val) - self._space_needed_value = val - self._space_needed_present = True - - @space_needed.deleter - def space_needed(self): - self._space_needed_value = None - self._space_needed_present = False - - @property - def space_shortage(self): - """ - The amount of extra space needed to add the item. - - :rtype: long - """ - if self._space_shortage_present: - return self._space_shortage_value - else: - raise AttributeError("missing required field 'space_shortage'") - - @space_shortage.setter - def space_shortage(self, val): - val = self._space_shortage_validator.validate(val) - self._space_shortage_value = val - self._space_shortage_present = True - - @space_shortage.deleter - def space_shortage(self): - self._space_shortage_value = None - self._space_shortage_present = False - - @property - def space_left(self): - """ - The amount of space left in the user's Dropbox, less than space_needed. - - :rtype: long - """ - if self._space_left_present: - return self._space_left_value - else: - raise AttributeError("missing required field 'space_left'") - - @space_left.setter - def space_left(self, val): - val = self._space_left_validator.validate(val) - self._space_left_value = val - self._space_left_present = True - - @space_left.deleter - def space_left(self): - self._space_left_value = None - self._space_left_present = False - - def __repr__(self): - return 'InsufficientQuotaAmounts(space_needed={!r}, space_shortage={!r}, space_left={!r})'.format( - self._space_needed_value, - self._space_shortage_value, - self._space_left_value, - ) - -InsufficientQuotaAmounts_validator = bv.Struct(InsufficientQuotaAmounts) - -class InviteeInfo(bb.Union): - """ - Information about the recipient of a shared content invitation. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar str email: E-mail address of invited user. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def email(cls, val): - """ - Create an instance of this class set to the ``email`` tag with value - ``val``. - - :param str val: - :rtype: InviteeInfo - """ - return cls('email', val) - - def is_email(self): - """ - Check if the union tag is ``email``. - - :rtype: bool - """ - return self._tag == 'email' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_email(self): - """ - E-mail address of invited user. - - Only call this if :meth:`is_email` is true. - - :rtype: str - """ - if not self.is_email(): - raise AttributeError("tag 'email' not set") - return self._value - - def __repr__(self): - return 'InviteeInfo(%r, %r)' % (self._tag, self._value) - -InviteeInfo_validator = bv.Union(InviteeInfo) - -class InviteeMembershipInfo(MembershipInfo): - """ - Information about an invited member of a shared content. - - :ivar invitee: Recipient of the invitation. - :ivar user: The user this invitation is tied to, if available. - """ - - __slots__ = [ - '_invitee_value', - '_invitee_present', - '_user_value', - '_user_present', - ] - - _has_required_fields = True - - def __init__(self, - access_type=None, - invitee=None, - permissions=None, - initials=None, - is_inherited=None, - user=None): - super(InviteeMembershipInfo, self).__init__(access_type, - permissions, - initials, - is_inherited) - self._invitee_value = None - self._invitee_present = False - self._user_value = None - self._user_present = False - if invitee is not None: - self.invitee = invitee - if user is not None: - self.user = user - - @property - def invitee(self): - """ - Recipient of the invitation. - - :rtype: InviteeInfo - """ - if self._invitee_present: - return self._invitee_value - else: - raise AttributeError("missing required field 'invitee'") - - @invitee.setter - def invitee(self, val): - self._invitee_validator.validate_type_only(val) - self._invitee_value = val - self._invitee_present = True - - @invitee.deleter - def invitee(self): - self._invitee_value = None - self._invitee_present = False - - @property - def user(self): - """ - The user this invitation is tied to, if available. - - :rtype: UserInfo - """ - if self._user_present: - return self._user_value - else: - return None - - @user.setter - def user(self, val): - if val is None: - del self.user - return - self._user_validator.validate_type_only(val) - self._user_value = val - self._user_present = True - - @user.deleter - def user(self): - self._user_value = None - self._user_present = False - - def __repr__(self): - return 'InviteeMembershipInfo(access_type={!r}, invitee={!r}, permissions={!r}, initials={!r}, is_inherited={!r}, user={!r})'.format( - self._access_type_value, - self._invitee_value, - self._permissions_value, - self._initials_value, - self._is_inherited_value, - self._user_value, - ) - -InviteeMembershipInfo_validator = bv.Struct(InviteeMembershipInfo) - -class JobError(bb.Union): - """ - Error occurred while performing an asynchronous job from - :meth:`dropbox.dropbox.Dropbox.sharing_unshare_folder` or - :meth:`dropbox.dropbox.Dropbox.sharing_remove_folder_member`. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar UnshareFolderError unshare_folder_error: Error occurred while - performing :meth:`dropbox.dropbox.Dropbox.sharing_unshare_folder` - action. - :ivar RemoveFolderMemberError remove_folder_member_error: Error occurred - while performing - :meth:`dropbox.dropbox.Dropbox.sharing_remove_folder_member` action. - :ivar RelinquishFolderMembershipError relinquish_folder_membership_error: - Error occurred while performing - :meth:`dropbox.dropbox.Dropbox.sharing_relinquish_folder_membership` - action. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def unshare_folder_error(cls, val): - """ - Create an instance of this class set to the ``unshare_folder_error`` tag - with value ``val``. - - :param UnshareFolderError val: - :rtype: JobError - """ - return cls('unshare_folder_error', val) - - @classmethod - def remove_folder_member_error(cls, val): - """ - Create an instance of this class set to the - ``remove_folder_member_error`` tag with value ``val``. - - :param RemoveFolderMemberError val: - :rtype: JobError - """ - return cls('remove_folder_member_error', val) - - @classmethod - def relinquish_folder_membership_error(cls, val): - """ - Create an instance of this class set to the - ``relinquish_folder_membership_error`` tag with value ``val``. - - :param RelinquishFolderMembershipError val: - :rtype: JobError - """ - return cls('relinquish_folder_membership_error', val) - - def is_unshare_folder_error(self): - """ - Check if the union tag is ``unshare_folder_error``. - - :rtype: bool - """ - return self._tag == 'unshare_folder_error' - - def is_remove_folder_member_error(self): - """ - Check if the union tag is ``remove_folder_member_error``. - - :rtype: bool - """ - return self._tag == 'remove_folder_member_error' - - def is_relinquish_folder_membership_error(self): - """ - Check if the union tag is ``relinquish_folder_membership_error``. - - :rtype: bool - """ - return self._tag == 'relinquish_folder_membership_error' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_unshare_folder_error(self): - """ - Error occurred while performing - :meth:`dropbox.dropbox.Dropbox.sharing_unshare_folder` action. - - Only call this if :meth:`is_unshare_folder_error` is true. - - :rtype: UnshareFolderError - """ - if not self.is_unshare_folder_error(): - raise AttributeError("tag 'unshare_folder_error' not set") - return self._value - - def get_remove_folder_member_error(self): - """ - Error occurred while performing - :meth:`dropbox.dropbox.Dropbox.sharing_remove_folder_member` action. - - Only call this if :meth:`is_remove_folder_member_error` is true. - - :rtype: RemoveFolderMemberError - """ - if not self.is_remove_folder_member_error(): - raise AttributeError("tag 'remove_folder_member_error' not set") - return self._value - - def get_relinquish_folder_membership_error(self): - """ - Error occurred while performing - :meth:`dropbox.dropbox.Dropbox.sharing_relinquish_folder_membership` - action. - - Only call this if :meth:`is_relinquish_folder_membership_error` is true. - - :rtype: RelinquishFolderMembershipError - """ - if not self.is_relinquish_folder_membership_error(): - raise AttributeError("tag 'relinquish_folder_membership_error' not set") - return self._value - - def __repr__(self): - return 'JobError(%r, %r)' % (self._tag, self._value) - -JobError_validator = bv.Union(JobError) - -class JobStatus(async.PollResultBase): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar complete: The asynchronous job has finished. - :ivar JobError failed: The asynchronous job returned an error. - """ - - # Attribute is overwritten below the class definition - complete = None - - @classmethod - def failed(cls, val): - """ - Create an instance of this class set to the ``failed`` tag with value - ``val``. - - :param JobError val: - :rtype: JobStatus - """ - return cls('failed', val) - - def is_complete(self): - """ - Check if the union tag is ``complete``. - - :rtype: bool - """ - return self._tag == 'complete' - - def is_failed(self): - """ - Check if the union tag is ``failed``. - - :rtype: bool - """ - return self._tag == 'failed' - - def get_failed(self): - """ - The asynchronous job returned an error. - - Only call this if :meth:`is_failed` is true. - - :rtype: JobError - """ - if not self.is_failed(): - raise AttributeError("tag 'failed' not set") - return self._value - - def __repr__(self): - return 'JobStatus(%r, %r)' % (self._tag, self._value) - -JobStatus_validator = bv.Union(JobStatus) - -class LinkAction(bb.Union): - """ - Actions that can be performed on a link. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar change_access_level: Change the access level of the link. - :ivar change_audience: Change the audience of the link. - :ivar remove_expiry: Remove the expiry date of the link. - :ivar remove_password: Remove the password of the link. - :ivar set_expiry: Create or modify the expiry date of the link. - :ivar set_password: Create or modify the password of the link. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - change_access_level = None - # Attribute is overwritten below the class definition - change_audience = None - # Attribute is overwritten below the class definition - remove_expiry = None - # Attribute is overwritten below the class definition - remove_password = None - # Attribute is overwritten below the class definition - set_expiry = None - # Attribute is overwritten below the class definition - set_password = None - # Attribute is overwritten below the class definition - other = None - - def is_change_access_level(self): - """ - Check if the union tag is ``change_access_level``. - - :rtype: bool - """ - return self._tag == 'change_access_level' - - def is_change_audience(self): - """ - Check if the union tag is ``change_audience``. - - :rtype: bool - """ - return self._tag == 'change_audience' - - def is_remove_expiry(self): - """ - Check if the union tag is ``remove_expiry``. - - :rtype: bool - """ - return self._tag == 'remove_expiry' - - def is_remove_password(self): - """ - Check if the union tag is ``remove_password``. - - :rtype: bool - """ - return self._tag == 'remove_password' - - def is_set_expiry(self): - """ - Check if the union tag is ``set_expiry``. - - :rtype: bool - """ - return self._tag == 'set_expiry' - - def is_set_password(self): - """ - Check if the union tag is ``set_password``. - - :rtype: bool - """ - return self._tag == 'set_password' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'LinkAction(%r, %r)' % (self._tag, self._value) - -LinkAction_validator = bv.Union(LinkAction) - -class LinkAudience(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar public: Link is accessible by anyone. - :ivar team: Link is accessible only by team members. - :ivar members: Link is accessible only by members of the content. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - public = None - # Attribute is overwritten below the class definition - team = None - # Attribute is overwritten below the class definition - members = None - # Attribute is overwritten below the class definition - other = None - - def is_public(self): - """ - Check if the union tag is ``public``. - - :rtype: bool - """ - return self._tag == 'public' - - def is_team(self): - """ - Check if the union tag is ``team``. - - :rtype: bool - """ - return self._tag == 'team' - - def is_members(self): - """ - Check if the union tag is ``members``. - - :rtype: bool - """ - return self._tag == 'members' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'LinkAudience(%r, %r)' % (self._tag, self._value) - -LinkAudience_validator = bv.Union(LinkAudience) - -class LinkExpiry(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar remove_expiry: Remove the currently set expiry for the link. - :ivar datetime.datetime set_expiry: Set a new expiry or change an existing - expiry. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - remove_expiry = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def set_expiry(cls, val): - """ - Create an instance of this class set to the ``set_expiry`` tag with - value ``val``. - - :param datetime.datetime val: - :rtype: LinkExpiry - """ - return cls('set_expiry', val) - - def is_remove_expiry(self): - """ - Check if the union tag is ``remove_expiry``. - - :rtype: bool - """ - return self._tag == 'remove_expiry' - - def is_set_expiry(self): - """ - Check if the union tag is ``set_expiry``. - - :rtype: bool - """ - return self._tag == 'set_expiry' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_set_expiry(self): - """ - Set a new expiry or change an existing expiry. - - Only call this if :meth:`is_set_expiry` is true. - - :rtype: datetime.datetime - """ - if not self.is_set_expiry(): - raise AttributeError("tag 'set_expiry' not set") - return self._value - - def __repr__(self): - return 'LinkExpiry(%r, %r)' % (self._tag, self._value) - -LinkExpiry_validator = bv.Union(LinkExpiry) - -class LinkPassword(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar remove_password: Remove the currently set password for the link. - :ivar str set_password: Set a new password or change an existing password. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - remove_password = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def set_password(cls, val): - """ - Create an instance of this class set to the ``set_password`` tag with - value ``val``. - - :param str val: - :rtype: LinkPassword - """ - return cls('set_password', val) - - def is_remove_password(self): - """ - Check if the union tag is ``remove_password``. - - :rtype: bool - """ - return self._tag == 'remove_password' - - def is_set_password(self): - """ - Check if the union tag is ``set_password``. - - :rtype: bool - """ - return self._tag == 'set_password' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_set_password(self): - """ - Set a new password or change an existing password. - - Only call this if :meth:`is_set_password` is true. - - :rtype: str - """ - if not self.is_set_password(): - raise AttributeError("tag 'set_password' not set") - return self._value - - def __repr__(self): - return 'LinkPassword(%r, %r)' % (self._tag, self._value) - -LinkPassword_validator = bv.Union(LinkPassword) - -class LinkPermission(object): - """ - Permissions for actions that can be performed on a link. - """ - - __slots__ = [ - '_action_value', - '_action_present', - '_allow_value', - '_allow_present', - '_reason_value', - '_reason_present', - ] - - _has_required_fields = True - - def __init__(self, - action=None, - allow=None, - reason=None): - self._action_value = None - self._action_present = False - self._allow_value = None - self._allow_present = False - self._reason_value = None - self._reason_present = False - if action is not None: - self.action = action - if allow is not None: - self.allow = allow - if reason is not None: - self.reason = reason - - @property - def action(self): - """ - :rtype: LinkAction - """ - if self._action_present: - return self._action_value - else: - raise AttributeError("missing required field 'action'") - - @action.setter - def action(self, val): - self._action_validator.validate_type_only(val) - self._action_value = val - self._action_present = True - - @action.deleter - def action(self): - self._action_value = None - self._action_present = False - - @property - def allow(self): - """ - :rtype: bool - """ - if self._allow_present: - return self._allow_value - else: - raise AttributeError("missing required field 'allow'") - - @allow.setter - def allow(self, val): - val = self._allow_validator.validate(val) - self._allow_value = val - self._allow_present = True - - @allow.deleter - def allow(self): - self._allow_value = None - self._allow_present = False - - @property - def reason(self): - """ - :rtype: PermissionDeniedReason - """ - if self._reason_present: - return self._reason_value - else: - return None - - @reason.setter - def reason(self, val): - if val is None: - del self.reason - return - self._reason_validator.validate_type_only(val) - self._reason_value = val - self._reason_present = True - - @reason.deleter - def reason(self): - self._reason_value = None - self._reason_present = False - - def __repr__(self): - return 'LinkPermission(action={!r}, allow={!r}, reason={!r})'.format( - self._action_value, - self._allow_value, - self._reason_value, - ) - -LinkPermission_validator = bv.Struct(LinkPermission) - -class LinkPermissions(object): - """ - :ivar resolved_visibility: The current visibility of the link after - considering the shared links policies of the the team (in case the - link's owner is part of a team) and the shared folder (in case the - linked file is part of a shared folder). This field is shown only if the - caller has access to this info (the link's owner always has access to - this data). - :ivar requested_visibility: The shared link's requested visibility. This can - be overridden by the team and shared folder policies. The final - visibility, after considering these policies, can be found in - ``resolved_visibility``. This is shown only if the caller is the link's - owner. - :ivar can_revoke: Whether the caller can revoke the shared link. - :ivar revoke_failure_reason: The failure reason for revoking the link. This - field will only be present if the ``can_revoke`` is ``False``. - """ - - __slots__ = [ - '_resolved_visibility_value', - '_resolved_visibility_present', - '_requested_visibility_value', - '_requested_visibility_present', - '_can_revoke_value', - '_can_revoke_present', - '_revoke_failure_reason_value', - '_revoke_failure_reason_present', - ] - - _has_required_fields = True - - def __init__(self, - can_revoke=None, - resolved_visibility=None, - requested_visibility=None, - revoke_failure_reason=None): - self._resolved_visibility_value = None - self._resolved_visibility_present = False - self._requested_visibility_value = None - self._requested_visibility_present = False - self._can_revoke_value = None - self._can_revoke_present = False - self._revoke_failure_reason_value = None - self._revoke_failure_reason_present = False - if resolved_visibility is not None: - self.resolved_visibility = resolved_visibility - if requested_visibility is not None: - self.requested_visibility = requested_visibility - if can_revoke is not None: - self.can_revoke = can_revoke - if revoke_failure_reason is not None: - self.revoke_failure_reason = revoke_failure_reason - - @property - def resolved_visibility(self): - """ - The current visibility of the link after considering the shared links - policies of the the team (in case the link's owner is part of a team) - and the shared folder (in case the linked file is part of a shared - folder). This field is shown only if the caller has access to this info - (the link's owner always has access to this data). - - :rtype: ResolvedVisibility - """ - if self._resolved_visibility_present: - return self._resolved_visibility_value - else: - return None - - @resolved_visibility.setter - def resolved_visibility(self, val): - if val is None: - del self.resolved_visibility - return - self._resolved_visibility_validator.validate_type_only(val) - self._resolved_visibility_value = val - self._resolved_visibility_present = True - - @resolved_visibility.deleter - def resolved_visibility(self): - self._resolved_visibility_value = None - self._resolved_visibility_present = False - - @property - def requested_visibility(self): - """ - The shared link's requested visibility. This can be overridden by the - team and shared folder policies. The final visibility, after considering - these policies, can be found in ``resolved_visibility``. This is shown - only if the caller is the link's owner. - - :rtype: RequestedVisibility - """ - if self._requested_visibility_present: - return self._requested_visibility_value - else: - return None - - @requested_visibility.setter - def requested_visibility(self, val): - if val is None: - del self.requested_visibility - return - self._requested_visibility_validator.validate_type_only(val) - self._requested_visibility_value = val - self._requested_visibility_present = True - - @requested_visibility.deleter - def requested_visibility(self): - self._requested_visibility_value = None - self._requested_visibility_present = False - - @property - def can_revoke(self): - """ - Whether the caller can revoke the shared link. - - :rtype: bool - """ - if self._can_revoke_present: - return self._can_revoke_value - else: - raise AttributeError("missing required field 'can_revoke'") - - @can_revoke.setter - def can_revoke(self, val): - val = self._can_revoke_validator.validate(val) - self._can_revoke_value = val - self._can_revoke_present = True - - @can_revoke.deleter - def can_revoke(self): - self._can_revoke_value = None - self._can_revoke_present = False - - @property - def revoke_failure_reason(self): - """ - The failure reason for revoking the link. This field will only be - present if the ``can_revoke`` is ``False``. - - :rtype: SharedLinkAccessFailureReason - """ - if self._revoke_failure_reason_present: - return self._revoke_failure_reason_value - else: - return None - - @revoke_failure_reason.setter - def revoke_failure_reason(self, val): - if val is None: - del self.revoke_failure_reason - return - self._revoke_failure_reason_validator.validate_type_only(val) - self._revoke_failure_reason_value = val - self._revoke_failure_reason_present = True - - @revoke_failure_reason.deleter - def revoke_failure_reason(self): - self._revoke_failure_reason_value = None - self._revoke_failure_reason_present = False - - def __repr__(self): - return 'LinkPermissions(can_revoke={!r}, resolved_visibility={!r}, requested_visibility={!r}, revoke_failure_reason={!r})'.format( - self._can_revoke_value, - self._resolved_visibility_value, - self._requested_visibility_value, - self._revoke_failure_reason_value, - ) - -LinkPermissions_validator = bv.Struct(LinkPermissions) - -class LinkSettings(object): - """ - Settings that apply to a link. - - :ivar access_level: The access level on the link for this file. Currently, - it only accepts 'viewer' and 'viewer_no_comment'. - :ivar audience: The type of audience on the link for this file. - :ivar expiry: An expiry timestamp to set on a link. - :ivar password: The password for the link. - """ - - __slots__ = [ - '_access_level_value', - '_access_level_present', - '_audience_value', - '_audience_present', - '_expiry_value', - '_expiry_present', - '_password_value', - '_password_present', - ] - - _has_required_fields = False - - def __init__(self, - access_level=None, - audience=None, - expiry=None, - password=None): - self._access_level_value = None - self._access_level_present = False - self._audience_value = None - self._audience_present = False - self._expiry_value = None - self._expiry_present = False - self._password_value = None - self._password_present = False - if access_level is not None: - self.access_level = access_level - if audience is not None: - self.audience = audience - if expiry is not None: - self.expiry = expiry - if password is not None: - self.password = password - - @property - def access_level(self): - """ - The access level on the link for this file. Currently, it only accepts - 'viewer' and 'viewer_no_comment'. - - :rtype: AccessLevel - """ - if self._access_level_present: - return self._access_level_value - else: - return None - - @access_level.setter - def access_level(self, val): - if val is None: - del self.access_level - return - self._access_level_validator.validate_type_only(val) - self._access_level_value = val - self._access_level_present = True - - @access_level.deleter - def access_level(self): - self._access_level_value = None - self._access_level_present = False - - @property - def audience(self): - """ - The type of audience on the link for this file. - - :rtype: LinkAudience - """ - if self._audience_present: - return self._audience_value - else: - return None - - @audience.setter - def audience(self, val): - if val is None: - del self.audience - return - self._audience_validator.validate_type_only(val) - self._audience_value = val - self._audience_present = True - - @audience.deleter - def audience(self): - self._audience_value = None - self._audience_present = False - - @property - def expiry(self): - """ - An expiry timestamp to set on a link. - - :rtype: LinkExpiry - """ - if self._expiry_present: - return self._expiry_value - else: - return None - - @expiry.setter - def expiry(self, val): - if val is None: - del self.expiry - return - self._expiry_validator.validate_type_only(val) - self._expiry_value = val - self._expiry_present = True - - @expiry.deleter - def expiry(self): - self._expiry_value = None - self._expiry_present = False - - @property - def password(self): - """ - The password for the link. - - :rtype: LinkPassword - """ - if self._password_present: - return self._password_value - else: - return None - - @password.setter - def password(self, val): - if val is None: - del self.password - return - self._password_validator.validate_type_only(val) - self._password_value = val - self._password_present = True - - @password.deleter - def password(self): - self._password_value = None - self._password_present = False - - def __repr__(self): - return 'LinkSettings(access_level={!r}, audience={!r}, expiry={!r}, password={!r})'.format( - self._access_level_value, - self._audience_value, - self._expiry_value, - self._password_value, - ) - -LinkSettings_validator = bv.Struct(LinkSettings) - -class ListFileMembersArg(object): - """ - Arguments for :meth:`dropbox.dropbox.Dropbox.sharing_list_file_members`. - - :ivar file: The file for which you want to see members. - :ivar actions: The actions for which to return permissions on a member. - :ivar include_inherited: Whether to include members who only have access - from a parent shared folder. - :ivar limit: Number of members to return max per query. Defaults to 100 if - no limit is specified. - """ - - __slots__ = [ - '_file_value', - '_file_present', - '_actions_value', - '_actions_present', - '_include_inherited_value', - '_include_inherited_present', - '_limit_value', - '_limit_present', - ] - - _has_required_fields = True - - def __init__(self, - file=None, - actions=None, - include_inherited=None, - limit=None): - self._file_value = None - self._file_present = False - self._actions_value = None - self._actions_present = False - self._include_inherited_value = None - self._include_inherited_present = False - self._limit_value = None - self._limit_present = False - if file is not None: - self.file = file - if actions is not None: - self.actions = actions - if include_inherited is not None: - self.include_inherited = include_inherited - if limit is not None: - self.limit = limit - - @property - def file(self): - """ - The file for which you want to see members. - - :rtype: str - """ - if self._file_present: - return self._file_value - else: - raise AttributeError("missing required field 'file'") - - @file.setter - def file(self, val): - val = self._file_validator.validate(val) - self._file_value = val - self._file_present = True - - @file.deleter - def file(self): - self._file_value = None - self._file_present = False - - @property - def actions(self): - """ - The actions for which to return permissions on a member. - - :rtype: list of [MemberAction] - """ - if self._actions_present: - return self._actions_value - else: - return None - - @actions.setter - def actions(self, val): - if val is None: - del self.actions - return - val = self._actions_validator.validate(val) - self._actions_value = val - self._actions_present = True - - @actions.deleter - def actions(self): - self._actions_value = None - self._actions_present = False - - @property - def include_inherited(self): - """ - Whether to include members who only have access from a parent shared - folder. - - :rtype: bool - """ - if self._include_inherited_present: - return self._include_inherited_value - else: - return True - - @include_inherited.setter - def include_inherited(self, val): - val = self._include_inherited_validator.validate(val) - self._include_inherited_value = val - self._include_inherited_present = True - - @include_inherited.deleter - def include_inherited(self): - self._include_inherited_value = None - self._include_inherited_present = False - - @property - def limit(self): - """ - Number of members to return max per query. Defaults to 100 if no limit - is specified. - - :rtype: long - """ - if self._limit_present: - return self._limit_value - else: - return 100 - - @limit.setter - def limit(self, val): - val = self._limit_validator.validate(val) - self._limit_value = val - self._limit_present = True - - @limit.deleter - def limit(self): - self._limit_value = None - self._limit_present = False - - def __repr__(self): - return 'ListFileMembersArg(file={!r}, actions={!r}, include_inherited={!r}, limit={!r})'.format( - self._file_value, - self._actions_value, - self._include_inherited_value, - self._limit_value, - ) - -ListFileMembersArg_validator = bv.Struct(ListFileMembersArg) - -class ListFileMembersBatchArg(object): - """ - Arguments for - :meth:`dropbox.dropbox.Dropbox.sharing_list_file_members_batch`. - - :ivar files: Files for which to return members. - :ivar limit: Number of members to return max per query. Defaults to 10 if no - limit is specified. - """ - - __slots__ = [ - '_files_value', - '_files_present', - '_limit_value', - '_limit_present', - ] - - _has_required_fields = True - - def __init__(self, - files=None, - limit=None): - self._files_value = None - self._files_present = False - self._limit_value = None - self._limit_present = False - if files is not None: - self.files = files - if limit is not None: - self.limit = limit - - @property - def files(self): - """ - Files for which to return members. - - :rtype: list of [str] - """ - if self._files_present: - return self._files_value - else: - raise AttributeError("missing required field 'files'") - - @files.setter - def files(self, val): - val = self._files_validator.validate(val) - self._files_value = val - self._files_present = True - - @files.deleter - def files(self): - self._files_value = None - self._files_present = False - - @property - def limit(self): - """ - Number of members to return max per query. Defaults to 10 if no limit is - specified. - - :rtype: long - """ - if self._limit_present: - return self._limit_value - else: - return 10 - - @limit.setter - def limit(self, val): - val = self._limit_validator.validate(val) - self._limit_value = val - self._limit_present = True - - @limit.deleter - def limit(self): - self._limit_value = None - self._limit_present = False - - def __repr__(self): - return 'ListFileMembersBatchArg(files={!r}, limit={!r})'.format( - self._files_value, - self._limit_value, - ) - -ListFileMembersBatchArg_validator = bv.Struct(ListFileMembersBatchArg) - -class ListFileMembersBatchResult(object): - """ - Per-file result for - :meth:`dropbox.dropbox.Dropbox.sharing_list_file_members_batch`. - - :ivar file: This is the input file identifier, whether an ID or a path. - :ivar result: The result for this particular file. - """ - - __slots__ = [ - '_file_value', - '_file_present', - '_result_value', - '_result_present', - ] - - _has_required_fields = True - - def __init__(self, - file=None, - result=None): - self._file_value = None - self._file_present = False - self._result_value = None - self._result_present = False - if file is not None: - self.file = file - if result is not None: - self.result = result - - @property - def file(self): - """ - This is the input file identifier, whether an ID or a path. - - :rtype: str - """ - if self._file_present: - return self._file_value - else: - raise AttributeError("missing required field 'file'") - - @file.setter - def file(self, val): - val = self._file_validator.validate(val) - self._file_value = val - self._file_present = True - - @file.deleter - def file(self): - self._file_value = None - self._file_present = False - - @property - def result(self): - """ - The result for this particular file. - - :rtype: ListFileMembersIndividualResult - """ - if self._result_present: - return self._result_value - else: - raise AttributeError("missing required field 'result'") - - @result.setter - def result(self, val): - self._result_validator.validate_type_only(val) - self._result_value = val - self._result_present = True - - @result.deleter - def result(self): - self._result_value = None - self._result_present = False - - def __repr__(self): - return 'ListFileMembersBatchResult(file={!r}, result={!r})'.format( - self._file_value, - self._result_value, - ) - -ListFileMembersBatchResult_validator = bv.Struct(ListFileMembersBatchResult) - -class ListFileMembersContinueArg(object): - """ - Arguments for - :meth:`dropbox.dropbox.Dropbox.sharing_list_file_members_continue`. - - :ivar cursor: The cursor returned by your last call to - :meth:`dropbox.dropbox.Dropbox.sharing_list_file_members`, - :meth:`dropbox.dropbox.Dropbox.sharing_list_file_members_continue`, or - :meth:`dropbox.dropbox.Dropbox.sharing_list_file_members_batch`. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - cursor=None): - self._cursor_value = None - self._cursor_present = False - if cursor is not None: - self.cursor = cursor - - @property - def cursor(self): - """ - The cursor returned by your last call to - :meth:`dropbox.dropbox.Dropbox.sharing_list_file_members`, - :meth:`dropbox.dropbox.Dropbox.sharing_list_file_members_continue`, or - :meth:`dropbox.dropbox.Dropbox.sharing_list_file_members_batch`. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'ListFileMembersContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - -ListFileMembersContinueArg_validator = bv.Struct(ListFileMembersContinueArg) - -class ListFileMembersContinueError(bb.Union): - """ - Error for - :meth:`dropbox.dropbox.Dropbox.sharing_list_file_members_continue`. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar invalid_cursor: ``ListFileMembersContinueArg.cursor`` is invalid. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - invalid_cursor = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def user_error(cls, val): - """ - Create an instance of this class set to the ``user_error`` tag with - value ``val``. - - :param SharingUserError val: - :rtype: ListFileMembersContinueError - """ - return cls('user_error', val) - - @classmethod - def access_error(cls, val): - """ - Create an instance of this class set to the ``access_error`` tag with - value ``val``. - - :param SharingFileAccessError val: - :rtype: ListFileMembersContinueError - """ - return cls('access_error', val) - - def is_user_error(self): - """ - Check if the union tag is ``user_error``. - - :rtype: bool - """ - return self._tag == 'user_error' - - def is_access_error(self): - """ - Check if the union tag is ``access_error``. - - :rtype: bool - """ - return self._tag == 'access_error' - - def is_invalid_cursor(self): - """ - Check if the union tag is ``invalid_cursor``. - - :rtype: bool - """ - return self._tag == 'invalid_cursor' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_user_error(self): - """ - Only call this if :meth:`is_user_error` is true. - - :rtype: SharingUserError - """ - if not self.is_user_error(): - raise AttributeError("tag 'user_error' not set") - return self._value - - def get_access_error(self): - """ - Only call this if :meth:`is_access_error` is true. - - :rtype: SharingFileAccessError - """ - if not self.is_access_error(): - raise AttributeError("tag 'access_error' not set") - return self._value - - def __repr__(self): - return 'ListFileMembersContinueError(%r, %r)' % (self._tag, self._value) - -ListFileMembersContinueError_validator = bv.Union(ListFileMembersContinueError) - -class ListFileMembersCountResult(object): - """ - :ivar members: A list of members on this file. - :ivar member_count: The number of members on this file. This does not - include inherited members. - """ - - __slots__ = [ - '_members_value', - '_members_present', - '_member_count_value', - '_member_count_present', - ] - - _has_required_fields = True - - def __init__(self, - members=None, - member_count=None): - self._members_value = None - self._members_present = False - self._member_count_value = None - self._member_count_present = False - if members is not None: - self.members = members - if member_count is not None: - self.member_count = member_count - - @property - def members(self): - """ - A list of members on this file. - - :rtype: SharedFileMembers - """ - if self._members_present: - return self._members_value - else: - raise AttributeError("missing required field 'members'") - - @members.setter - def members(self, val): - self._members_validator.validate_type_only(val) - self._members_value = val - self._members_present = True - - @members.deleter - def members(self): - self._members_value = None - self._members_present = False - - @property - def member_count(self): - """ - The number of members on this file. This does not include inherited - members. - - :rtype: long - """ - if self._member_count_present: - return self._member_count_value - else: - raise AttributeError("missing required field 'member_count'") - - @member_count.setter - def member_count(self, val): - val = self._member_count_validator.validate(val) - self._member_count_value = val - self._member_count_present = True - - @member_count.deleter - def member_count(self): - self._member_count_value = None - self._member_count_present = False - - def __repr__(self): - return 'ListFileMembersCountResult(members={!r}, member_count={!r})'.format( - self._members_value, - self._member_count_value, - ) - -ListFileMembersCountResult_validator = bv.Struct(ListFileMembersCountResult) - -class ListFileMembersError(bb.Union): - """ - Error for :meth:`dropbox.dropbox.Dropbox.sharing_list_file_members`. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def user_error(cls, val): - """ - Create an instance of this class set to the ``user_error`` tag with - value ``val``. - - :param SharingUserError val: - :rtype: ListFileMembersError - """ - return cls('user_error', val) - - @classmethod - def access_error(cls, val): - """ - Create an instance of this class set to the ``access_error`` tag with - value ``val``. - - :param SharingFileAccessError val: - :rtype: ListFileMembersError - """ - return cls('access_error', val) - - def is_user_error(self): - """ - Check if the union tag is ``user_error``. - - :rtype: bool - """ - return self._tag == 'user_error' - - def is_access_error(self): - """ - Check if the union tag is ``access_error``. - - :rtype: bool - """ - return self._tag == 'access_error' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_user_error(self): - """ - Only call this if :meth:`is_user_error` is true. - - :rtype: SharingUserError - """ - if not self.is_user_error(): - raise AttributeError("tag 'user_error' not set") - return self._value - - def get_access_error(self): - """ - Only call this if :meth:`is_access_error` is true. - - :rtype: SharingFileAccessError - """ - if not self.is_access_error(): - raise AttributeError("tag 'access_error' not set") - return self._value - - def __repr__(self): - return 'ListFileMembersError(%r, %r)' % (self._tag, self._value) - -ListFileMembersError_validator = bv.Union(ListFileMembersError) - -class ListFileMembersIndividualResult(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar ListFileMembersCountResult result: The results of the query for this - file if it was successful. - :ivar SharingFileAccessError access_error: The result of the query for this - file if it was an error. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def result(cls, val): - """ - Create an instance of this class set to the ``result`` tag with value - ``val``. - - :param ListFileMembersCountResult val: - :rtype: ListFileMembersIndividualResult - """ - return cls('result', val) - - @classmethod - def access_error(cls, val): - """ - Create an instance of this class set to the ``access_error`` tag with - value ``val``. - - :param SharingFileAccessError val: - :rtype: ListFileMembersIndividualResult - """ - return cls('access_error', val) - - def is_result(self): - """ - Check if the union tag is ``result``. - - :rtype: bool - """ - return self._tag == 'result' - - def is_access_error(self): - """ - Check if the union tag is ``access_error``. - - :rtype: bool - """ - return self._tag == 'access_error' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_result(self): - """ - The results of the query for this file if it was successful. - - Only call this if :meth:`is_result` is true. - - :rtype: ListFileMembersCountResult - """ - if not self.is_result(): - raise AttributeError("tag 'result' not set") - return self._value - - def get_access_error(self): - """ - The result of the query for this file if it was an error. - - Only call this if :meth:`is_access_error` is true. - - :rtype: SharingFileAccessError - """ - if not self.is_access_error(): - raise AttributeError("tag 'access_error' not set") - return self._value - - def __repr__(self): - return 'ListFileMembersIndividualResult(%r, %r)' % (self._tag, self._value) - -ListFileMembersIndividualResult_validator = bv.Union(ListFileMembersIndividualResult) - -class ListFilesArg(object): - """ - Arguments for :meth:`dropbox.dropbox.Dropbox.sharing_list_received_files`. - - :ivar limit: Number of files to return max per query. Defaults to 100 if no - limit is specified. - :ivar actions: A list of `FileAction`s corresponding to `FilePermission`s - that should appear in the response's ``SharedFileMetadata.permissions`` - field describing the actions the authenticated user can perform on the - file. - """ - - __slots__ = [ - '_limit_value', - '_limit_present', - '_actions_value', - '_actions_present', - ] - - _has_required_fields = False - - def __init__(self, - limit=None, - actions=None): - self._limit_value = None - self._limit_present = False - self._actions_value = None - self._actions_present = False - if limit is not None: - self.limit = limit - if actions is not None: - self.actions = actions - - @property - def limit(self): - """ - Number of files to return max per query. Defaults to 100 if no limit is - specified. - - :rtype: long - """ - if self._limit_present: - return self._limit_value - else: - return 100 - - @limit.setter - def limit(self, val): - val = self._limit_validator.validate(val) - self._limit_value = val - self._limit_present = True - - @limit.deleter - def limit(self): - self._limit_value = None - self._limit_present = False - - @property - def actions(self): - """ - A list of `FileAction`s corresponding to `FilePermission`s that should - appear in the response's ``SharedFileMetadata.permissions`` field - describing the actions the authenticated user can perform on the file. - - :rtype: list of [FileAction] - """ - if self._actions_present: - return self._actions_value - else: - return None - - @actions.setter - def actions(self, val): - if val is None: - del self.actions - return - val = self._actions_validator.validate(val) - self._actions_value = val - self._actions_present = True - - @actions.deleter - def actions(self): - self._actions_value = None - self._actions_present = False - - def __repr__(self): - return 'ListFilesArg(limit={!r}, actions={!r})'.format( - self._limit_value, - self._actions_value, - ) - -ListFilesArg_validator = bv.Struct(ListFilesArg) - -class ListFilesContinueArg(object): - """ - Arguments for - :meth:`dropbox.dropbox.Dropbox.sharing_list_received_files_continue`. - - :ivar cursor: Cursor in ``ListFilesResult.cursor``. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - cursor=None): - self._cursor_value = None - self._cursor_present = False - if cursor is not None: - self.cursor = cursor - - @property - def cursor(self): - """ - Cursor in ``ListFilesResult.cursor``. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'ListFilesContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - -ListFilesContinueArg_validator = bv.Struct(ListFilesContinueArg) - -class ListFilesContinueError(bb.Union): - """ - Error results for - :meth:`dropbox.dropbox.Dropbox.sharing_list_received_files_continue`. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar SharingUserError user_error: User account had a problem. - :ivar invalid_cursor: ``ListFilesContinueArg.cursor`` is invalid. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - invalid_cursor = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def user_error(cls, val): - """ - Create an instance of this class set to the ``user_error`` tag with - value ``val``. - - :param SharingUserError val: - :rtype: ListFilesContinueError - """ - return cls('user_error', val) - - def is_user_error(self): - """ - Check if the union tag is ``user_error``. - - :rtype: bool - """ - return self._tag == 'user_error' - - def is_invalid_cursor(self): - """ - Check if the union tag is ``invalid_cursor``. - - :rtype: bool - """ - return self._tag == 'invalid_cursor' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_user_error(self): - """ - User account had a problem. - - Only call this if :meth:`is_user_error` is true. - - :rtype: SharingUserError - """ - if not self.is_user_error(): - raise AttributeError("tag 'user_error' not set") - return self._value - - def __repr__(self): - return 'ListFilesContinueError(%r, %r)' % (self._tag, self._value) - -ListFilesContinueError_validator = bv.Union(ListFilesContinueError) - -class ListFilesResult(object): - """ - Success results for - :meth:`dropbox.dropbox.Dropbox.sharing_list_received_files`. - - :ivar entries: Information about the files shared with current user. - :ivar cursor: Cursor used to obtain additional shared files. - """ - - __slots__ = [ - '_entries_value', - '_entries_present', - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - entries=None, - cursor=None): - self._entries_value = None - self._entries_present = False - self._cursor_value = None - self._cursor_present = False - if entries is not None: - self.entries = entries - if cursor is not None: - self.cursor = cursor - - @property - def entries(self): - """ - Information about the files shared with current user. - - :rtype: list of [SharedFileMetadata] - """ - if self._entries_present: - return self._entries_value - else: - raise AttributeError("missing required field 'entries'") - - @entries.setter - def entries(self, val): - val = self._entries_validator.validate(val) - self._entries_value = val - self._entries_present = True - - @entries.deleter - def entries(self): - self._entries_value = None - self._entries_present = False - - @property - def cursor(self): - """ - Cursor used to obtain additional shared files. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - return None - - @cursor.setter - def cursor(self, val): - if val is None: - del self.cursor - return - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'ListFilesResult(entries={!r}, cursor={!r})'.format( - self._entries_value, - self._cursor_value, - ) - -ListFilesResult_validator = bv.Struct(ListFilesResult) - -class ListFolderMembersCursorArg(object): - """ - :ivar actions: This is a list indicating whether each returned member will - include a boolean value ``MemberPermission.allow`` that describes - whether the current user can perform the MemberAction on the member. - :ivar limit: The maximum number of results that include members, groups and - invitees to return per request. - """ - - __slots__ = [ - '_actions_value', - '_actions_present', - '_limit_value', - '_limit_present', - ] - - _has_required_fields = False - - def __init__(self, - actions=None, - limit=None): - self._actions_value = None - self._actions_present = False - self._limit_value = None - self._limit_present = False - if actions is not None: - self.actions = actions - if limit is not None: - self.limit = limit - - @property - def actions(self): - """ - This is a list indicating whether each returned member will include a - boolean value ``MemberPermission.allow`` that describes whether the - current user can perform the MemberAction on the member. - - :rtype: list of [MemberAction] - """ - if self._actions_present: - return self._actions_value - else: - return None - - @actions.setter - def actions(self, val): - if val is None: - del self.actions - return - val = self._actions_validator.validate(val) - self._actions_value = val - self._actions_present = True - - @actions.deleter - def actions(self): - self._actions_value = None - self._actions_present = False - - @property - def limit(self): - """ - The maximum number of results that include members, groups and invitees - to return per request. - - :rtype: long - """ - if self._limit_present: - return self._limit_value - else: - return 1000 - - @limit.setter - def limit(self, val): - val = self._limit_validator.validate(val) - self._limit_value = val - self._limit_present = True - - @limit.deleter - def limit(self): - self._limit_value = None - self._limit_present = False - - def __repr__(self): - return 'ListFolderMembersCursorArg(actions={!r}, limit={!r})'.format( - self._actions_value, - self._limit_value, - ) - -ListFolderMembersCursorArg_validator = bv.Struct(ListFolderMembersCursorArg) - -class ListFolderMembersArgs(ListFolderMembersCursorArg): - """ - :ivar shared_folder_id: The ID for the shared folder. - """ - - __slots__ = [ - '_shared_folder_id_value', - '_shared_folder_id_present', - ] - - _has_required_fields = True - - def __init__(self, - shared_folder_id=None, - actions=None, - limit=None): - super(ListFolderMembersArgs, self).__init__(actions, - limit) - self._shared_folder_id_value = None - self._shared_folder_id_present = False - if shared_folder_id is not None: - self.shared_folder_id = shared_folder_id - - @property - def shared_folder_id(self): - """ - The ID for the shared folder. - - :rtype: str - """ - if self._shared_folder_id_present: - return self._shared_folder_id_value - else: - raise AttributeError("missing required field 'shared_folder_id'") - - @shared_folder_id.setter - def shared_folder_id(self, val): - val = self._shared_folder_id_validator.validate(val) - self._shared_folder_id_value = val - self._shared_folder_id_present = True - - @shared_folder_id.deleter - def shared_folder_id(self): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - - def __repr__(self): - return 'ListFolderMembersArgs(shared_folder_id={!r}, actions={!r}, limit={!r})'.format( - self._shared_folder_id_value, - self._actions_value, - self._limit_value, - ) - -ListFolderMembersArgs_validator = bv.Struct(ListFolderMembersArgs) - -class ListFolderMembersContinueArg(object): - """ - :ivar cursor: The cursor returned by your last call to - :meth:`dropbox.dropbox.Dropbox.sharing_list_folder_members` or - :meth:`dropbox.dropbox.Dropbox.sharing_list_folder_members_continue`. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - cursor=None): - self._cursor_value = None - self._cursor_present = False - if cursor is not None: - self.cursor = cursor - - @property - def cursor(self): - """ - The cursor returned by your last call to - :meth:`dropbox.dropbox.Dropbox.sharing_list_folder_members` or - :meth:`dropbox.dropbox.Dropbox.sharing_list_folder_members_continue`. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'ListFolderMembersContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - -ListFolderMembersContinueArg_validator = bv.Struct(ListFolderMembersContinueArg) - -class ListFolderMembersContinueError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar invalid_cursor: ``ListFolderMembersContinueArg.cursor`` is invalid. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - invalid_cursor = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def access_error(cls, val): - """ - Create an instance of this class set to the ``access_error`` tag with - value ``val``. - - :param SharedFolderAccessError val: - :rtype: ListFolderMembersContinueError - """ - return cls('access_error', val) - - def is_access_error(self): - """ - Check if the union tag is ``access_error``. - - :rtype: bool - """ - return self._tag == 'access_error' - - def is_invalid_cursor(self): - """ - Check if the union tag is ``invalid_cursor``. - - :rtype: bool - """ - return self._tag == 'invalid_cursor' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_access_error(self): - """ - Only call this if :meth:`is_access_error` is true. - - :rtype: SharedFolderAccessError - """ - if not self.is_access_error(): - raise AttributeError("tag 'access_error' not set") - return self._value - - def __repr__(self): - return 'ListFolderMembersContinueError(%r, %r)' % (self._tag, self._value) - -ListFolderMembersContinueError_validator = bv.Union(ListFolderMembersContinueError) - -class ListFoldersArgs(object): - """ - :ivar limit: The maximum number of results to return per request. - :ivar actions: A list of `FolderAction`s corresponding to - `FolderPermission`s that should appear in the response's - ``SharedFolderMetadata.permissions`` field describing the actions the - authenticated user can perform on the folder. - """ - - __slots__ = [ - '_limit_value', - '_limit_present', - '_actions_value', - '_actions_present', - ] - - _has_required_fields = False - - def __init__(self, - limit=None, - actions=None): - self._limit_value = None - self._limit_present = False - self._actions_value = None - self._actions_present = False - if limit is not None: - self.limit = limit - if actions is not None: - self.actions = actions - - @property - def limit(self): - """ - The maximum number of results to return per request. - - :rtype: long - """ - if self._limit_present: - return self._limit_value - else: - return 1000 - - @limit.setter - def limit(self, val): - val = self._limit_validator.validate(val) - self._limit_value = val - self._limit_present = True - - @limit.deleter - def limit(self): - self._limit_value = None - self._limit_present = False - - @property - def actions(self): - """ - A list of `FolderAction`s corresponding to `FolderPermission`s that - should appear in the response's ``SharedFolderMetadata.permissions`` - field describing the actions the authenticated user can perform on the - folder. - - :rtype: list of [FolderAction] - """ - if self._actions_present: - return self._actions_value - else: - return None - - @actions.setter - def actions(self, val): - if val is None: - del self.actions - return - val = self._actions_validator.validate(val) - self._actions_value = val - self._actions_present = True - - @actions.deleter - def actions(self): - self._actions_value = None - self._actions_present = False - - def __repr__(self): - return 'ListFoldersArgs(limit={!r}, actions={!r})'.format( - self._limit_value, - self._actions_value, - ) - -ListFoldersArgs_validator = bv.Struct(ListFoldersArgs) - -class ListFoldersContinueArg(object): - """ - :ivar cursor: The cursor returned by the previous API call specified in the - endpoint description. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - cursor=None): - self._cursor_value = None - self._cursor_present = False - if cursor is not None: - self.cursor = cursor - - @property - def cursor(self): - """ - The cursor returned by the previous API call specified in the endpoint - description. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'ListFoldersContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - -ListFoldersContinueArg_validator = bv.Struct(ListFoldersContinueArg) - -class ListFoldersContinueError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar invalid_cursor: ``ListFoldersContinueArg.cursor`` is invalid. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - invalid_cursor = None - # Attribute is overwritten below the class definition - other = None - - def is_invalid_cursor(self): - """ - Check if the union tag is ``invalid_cursor``. - - :rtype: bool - """ - return self._tag == 'invalid_cursor' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'ListFoldersContinueError(%r, %r)' % (self._tag, self._value) - -ListFoldersContinueError_validator = bv.Union(ListFoldersContinueError) - -class ListFoldersResult(object): - """ - Result for :meth:`dropbox.dropbox.Dropbox.sharing_list_folders` or - :meth:`dropbox.dropbox.Dropbox.sharing_list_mountable_folders`, depending on - which endpoint was requested. Unmounted shared folders can be identified by - the absence of ``SharedFolderMetadata.path_lower``. - - :ivar entries: List of all shared folders the authenticated user has access - to. - :ivar cursor: Present if there are additional shared folders that have not - been returned yet. Pass the cursor into the corresponding continue - endpoint (either - :meth:`dropbox.dropbox.Dropbox.sharing_list_folders_continue` or - :meth:`dropbox.dropbox.Dropbox.sharing_list_mountable_folders_continue`) - to list additional folders. - """ - - __slots__ = [ - '_entries_value', - '_entries_present', - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - entries=None, - cursor=None): - self._entries_value = None - self._entries_present = False - self._cursor_value = None - self._cursor_present = False - if entries is not None: - self.entries = entries - if cursor is not None: - self.cursor = cursor - - @property - def entries(self): - """ - List of all shared folders the authenticated user has access to. - - :rtype: list of [SharedFolderMetadata] - """ - if self._entries_present: - return self._entries_value - else: - raise AttributeError("missing required field 'entries'") - - @entries.setter - def entries(self, val): - val = self._entries_validator.validate(val) - self._entries_value = val - self._entries_present = True - - @entries.deleter - def entries(self): - self._entries_value = None - self._entries_present = False - - @property - def cursor(self): - """ - Present if there are additional shared folders that have not been - returned yet. Pass the cursor into the corresponding continue endpoint - (either :meth:`dropbox.dropbox.Dropbox.sharing_list_folders_continue` or - :meth:`dropbox.dropbox.Dropbox.sharing_list_mountable_folders_continue`) - to list additional folders. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - return None - - @cursor.setter - def cursor(self, val): - if val is None: - del self.cursor - return - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'ListFoldersResult(entries={!r}, cursor={!r})'.format( - self._entries_value, - self._cursor_value, - ) - -ListFoldersResult_validator = bv.Struct(ListFoldersResult) - -class ListSharedLinksArg(object): - """ - :ivar path: See :meth:`dropbox.dropbox.Dropbox.sharing_list_shared_links` - description. - :ivar cursor: The cursor returned by your last call to - :meth:`dropbox.dropbox.Dropbox.sharing_list_shared_links`. - :ivar direct_only: See - :meth:`dropbox.dropbox.Dropbox.sharing_list_shared_links` description. - """ - - __slots__ = [ - '_path_value', - '_path_present', - '_cursor_value', - '_cursor_present', - '_direct_only_value', - '_direct_only_present', - ] - - _has_required_fields = False - - def __init__(self, - path=None, - cursor=None, - direct_only=None): - self._path_value = None - self._path_present = False - self._cursor_value = None - self._cursor_present = False - self._direct_only_value = None - self._direct_only_present = False - if path is not None: - self.path = path - if cursor is not None: - self.cursor = cursor - if direct_only is not None: - self.direct_only = direct_only - - @property - def path(self): - """ - See :meth:`dropbox.dropbox.Dropbox.sharing_list_shared_links` - description. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - return None - - @path.setter - def path(self, val): - if val is None: - del self.path - return - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def cursor(self): - """ - The cursor returned by your last call to - :meth:`dropbox.dropbox.Dropbox.sharing_list_shared_links`. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - return None - - @cursor.setter - def cursor(self, val): - if val is None: - del self.cursor - return - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - @property - def direct_only(self): - """ - See :meth:`dropbox.dropbox.Dropbox.sharing_list_shared_links` - description. - - :rtype: bool - """ - if self._direct_only_present: - return self._direct_only_value - else: - return None - - @direct_only.setter - def direct_only(self, val): - if val is None: - del self.direct_only - return - val = self._direct_only_validator.validate(val) - self._direct_only_value = val - self._direct_only_present = True - - @direct_only.deleter - def direct_only(self): - self._direct_only_value = None - self._direct_only_present = False - - def __repr__(self): - return 'ListSharedLinksArg(path={!r}, cursor={!r}, direct_only={!r})'.format( - self._path_value, - self._cursor_value, - self._direct_only_value, - ) - -ListSharedLinksArg_validator = bv.Struct(ListSharedLinksArg) - -class ListSharedLinksError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar reset: Indicates that the cursor has been invalidated. Call - :meth:`dropbox.dropbox.Dropbox.sharing_list_shared_links` to obtain a - new cursor. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - reset = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def path(cls, val): - """ - Create an instance of this class set to the ``path`` tag with value - ``val``. - - :param files.LookupError_validator val: - :rtype: ListSharedLinksError - """ - return cls('path', val) - - def is_path(self): - """ - Check if the union tag is ``path``. - - :rtype: bool - """ - return self._tag == 'path' - - def is_reset(self): - """ - Check if the union tag is ``reset``. - - :rtype: bool - """ - return self._tag == 'reset' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_path(self): - """ - Only call this if :meth:`is_path` is true. - - :rtype: files.LookupError_validator - """ - if not self.is_path(): - raise AttributeError("tag 'path' not set") - return self._value - - def __repr__(self): - return 'ListSharedLinksError(%r, %r)' % (self._tag, self._value) - -ListSharedLinksError_validator = bv.Union(ListSharedLinksError) - -class ListSharedLinksResult(object): - """ - :ivar links: Shared links applicable to the path argument. - :ivar has_more: Is true if there are additional shared links that have not - been returned yet. Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.sharing_list_shared_links` to retrieve - them. - :ivar cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.sharing_list_shared_links` to obtain the - additional links. Cursor is returned only if no path is given. - """ - - __slots__ = [ - '_links_value', - '_links_present', - '_has_more_value', - '_has_more_present', - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - links=None, - has_more=None, - cursor=None): - self._links_value = None - self._links_present = False - self._has_more_value = None - self._has_more_present = False - self._cursor_value = None - self._cursor_present = False - if links is not None: - self.links = links - if has_more is not None: - self.has_more = has_more - if cursor is not None: - self.cursor = cursor - - @property - def links(self): - """ - Shared links applicable to the path argument. - - :rtype: list of [SharedLinkMetadata] - """ - if self._links_present: - return self._links_value - else: - raise AttributeError("missing required field 'links'") - - @links.setter - def links(self, val): - val = self._links_validator.validate(val) - self._links_value = val - self._links_present = True - - @links.deleter - def links(self): - self._links_value = None - self._links_present = False - - @property - def has_more(self): - """ - Is true if there are additional shared links that have not been returned - yet. Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.sharing_list_shared_links` to retrieve - them. - - :rtype: bool - """ - if self._has_more_present: - return self._has_more_value - else: - raise AttributeError("missing required field 'has_more'") - - @has_more.setter - def has_more(self, val): - val = self._has_more_validator.validate(val) - self._has_more_value = val - self._has_more_present = True - - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False - - @property - def cursor(self): - """ - Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.sharing_list_shared_links` to obtain the - additional links. Cursor is returned only if no path is given. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - return None - - @cursor.setter - def cursor(self, val): - if val is None: - del self.cursor - return - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'ListSharedLinksResult(links={!r}, has_more={!r}, cursor={!r})'.format( - self._links_value, - self._has_more_value, - self._cursor_value, - ) - -ListSharedLinksResult_validator = bv.Struct(ListSharedLinksResult) - -class MemberAccessLevelResult(object): - """ - Contains information about a member's access level to content after an - operation. - - :ivar access_level: The member still has this level of access to the content - through a parent folder. - :ivar warning: A localized string with additional information about why the - user has this access level to the content. - :ivar access_details: The parent folders that a member has access to. The - field is present if the user has access to the first parent folder where - the member gains access. - """ - - __slots__ = [ - '_access_level_value', - '_access_level_present', - '_warning_value', - '_warning_present', - '_access_details_value', - '_access_details_present', - ] - - _has_required_fields = False - - def __init__(self, - access_level=None, - warning=None, - access_details=None): - self._access_level_value = None - self._access_level_present = False - self._warning_value = None - self._warning_present = False - self._access_details_value = None - self._access_details_present = False - if access_level is not None: - self.access_level = access_level - if warning is not None: - self.warning = warning - if access_details is not None: - self.access_details = access_details - - @property - def access_level(self): - """ - The member still has this level of access to the content through a - parent folder. - - :rtype: AccessLevel - """ - if self._access_level_present: - return self._access_level_value - else: - return None - - @access_level.setter - def access_level(self, val): - if val is None: - del self.access_level - return - self._access_level_validator.validate_type_only(val) - self._access_level_value = val - self._access_level_present = True - - @access_level.deleter - def access_level(self): - self._access_level_value = None - self._access_level_present = False - - @property - def warning(self): - """ - A localized string with additional information about why the user has - this access level to the content. - - :rtype: str - """ - if self._warning_present: - return self._warning_value - else: - return None - - @warning.setter - def warning(self, val): - if val is None: - del self.warning - return - val = self._warning_validator.validate(val) - self._warning_value = val - self._warning_present = True - - @warning.deleter - def warning(self): - self._warning_value = None - self._warning_present = False - - @property - def access_details(self): - """ - The parent folders that a member has access to. The field is present if - the user has access to the first parent folder where the member gains - access. - - :rtype: list of [ParentFolderAccessInfo] - """ - if self._access_details_present: - return self._access_details_value - else: - return None - - @access_details.setter - def access_details(self, val): - if val is None: - del self.access_details - return - val = self._access_details_validator.validate(val) - self._access_details_value = val - self._access_details_present = True - - @access_details.deleter - def access_details(self): - self._access_details_value = None - self._access_details_present = False - - def __repr__(self): - return 'MemberAccessLevelResult(access_level={!r}, warning={!r}, access_details={!r})'.format( - self._access_level_value, - self._warning_value, - self._access_details_value, - ) - -MemberAccessLevelResult_validator = bv.Struct(MemberAccessLevelResult) - -class MemberAction(bb.Union): - """ - Actions that may be taken on members of a shared folder. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar leave_a_copy: Allow the member to keep a copy of the folder when - removing. - :ivar make_editor: Make the member an editor of the folder. - :ivar make_owner: Make the member an owner of the folder. - :ivar make_viewer: Make the member a viewer of the folder. - :ivar make_viewer_no_comment: Make the member a viewer of the folder without - commenting permissions. - :ivar remove: Remove the member from the folder. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - leave_a_copy = None - # Attribute is overwritten below the class definition - make_editor = None - # Attribute is overwritten below the class definition - make_owner = None - # Attribute is overwritten below the class definition - make_viewer = None - # Attribute is overwritten below the class definition - make_viewer_no_comment = None - # Attribute is overwritten below the class definition - remove = None - # Attribute is overwritten below the class definition - other = None - - def is_leave_a_copy(self): - """ - Check if the union tag is ``leave_a_copy``. - - :rtype: bool - """ - return self._tag == 'leave_a_copy' - - def is_make_editor(self): - """ - Check if the union tag is ``make_editor``. - - :rtype: bool - """ - return self._tag == 'make_editor' - - def is_make_owner(self): - """ - Check if the union tag is ``make_owner``. - - :rtype: bool - """ - return self._tag == 'make_owner' - - def is_make_viewer(self): - """ - Check if the union tag is ``make_viewer``. - - :rtype: bool - """ - return self._tag == 'make_viewer' - - def is_make_viewer_no_comment(self): - """ - Check if the union tag is ``make_viewer_no_comment``. - - :rtype: bool - """ - return self._tag == 'make_viewer_no_comment' - - def is_remove(self): - """ - Check if the union tag is ``remove``. - - :rtype: bool - """ - return self._tag == 'remove' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'MemberAction(%r, %r)' % (self._tag, self._value) - -MemberAction_validator = bv.Union(MemberAction) - -class MemberPermission(object): - """ - Whether the user is allowed to take the action on the associated member. - - :ivar action: The action that the user may wish to take on the member. - :ivar allow: True if the user is allowed to take the action. - :ivar reason: The reason why the user is denied the permission. Not present - if the action is allowed. - """ - - __slots__ = [ - '_action_value', - '_action_present', - '_allow_value', - '_allow_present', - '_reason_value', - '_reason_present', - ] - - _has_required_fields = True - - def __init__(self, - action=None, - allow=None, - reason=None): - self._action_value = None - self._action_present = False - self._allow_value = None - self._allow_present = False - self._reason_value = None - self._reason_present = False - if action is not None: - self.action = action - if allow is not None: - self.allow = allow - if reason is not None: - self.reason = reason - - @property - def action(self): - """ - The action that the user may wish to take on the member. - - :rtype: MemberAction - """ - if self._action_present: - return self._action_value - else: - raise AttributeError("missing required field 'action'") - - @action.setter - def action(self, val): - self._action_validator.validate_type_only(val) - self._action_value = val - self._action_present = True - - @action.deleter - def action(self): - self._action_value = None - self._action_present = False - - @property - def allow(self): - """ - True if the user is allowed to take the action. - - :rtype: bool - """ - if self._allow_present: - return self._allow_value - else: - raise AttributeError("missing required field 'allow'") - - @allow.setter - def allow(self, val): - val = self._allow_validator.validate(val) - self._allow_value = val - self._allow_present = True - - @allow.deleter - def allow(self): - self._allow_value = None - self._allow_present = False - - @property - def reason(self): - """ - The reason why the user is denied the permission. Not present if the - action is allowed. - - :rtype: PermissionDeniedReason - """ - if self._reason_present: - return self._reason_value - else: - return None - - @reason.setter - def reason(self, val): - if val is None: - del self.reason - return - self._reason_validator.validate_type_only(val) - self._reason_value = val - self._reason_present = True - - @reason.deleter - def reason(self): - self._reason_value = None - self._reason_present = False - - def __repr__(self): - return 'MemberPermission(action={!r}, allow={!r}, reason={!r})'.format( - self._action_value, - self._allow_value, - self._reason_value, - ) - -MemberPermission_validator = bv.Struct(MemberPermission) - -class MemberPolicy(bb.Union): - """ - Policy governing who can be a member of a shared folder. Only applicable to - folders owned by a user on a team. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar team: Only a teammate can become a member. - :ivar anyone: Anyone can become a member. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - team = None - # Attribute is overwritten below the class definition - anyone = None - # Attribute is overwritten below the class definition - other = None - - def is_team(self): - """ - Check if the union tag is ``team``. - - :rtype: bool - """ - return self._tag == 'team' - - def is_anyone(self): - """ - Check if the union tag is ``anyone``. - - :rtype: bool - """ - return self._tag == 'anyone' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'MemberPolicy(%r, %r)' % (self._tag, self._value) - -MemberPolicy_validator = bv.Union(MemberPolicy) - -class MemberSelector(bb.Union): - """ - Includes different ways to identify a member of a shared folder. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar str dropbox_id: Dropbox account, team member, or group ID of member. - :ivar str email: E-mail address of member. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def dropbox_id(cls, val): - """ - Create an instance of this class set to the ``dropbox_id`` tag with - value ``val``. - - :param str val: - :rtype: MemberSelector - """ - return cls('dropbox_id', val) - - @classmethod - def email(cls, val): - """ - Create an instance of this class set to the ``email`` tag with value - ``val``. - - :param str val: - :rtype: MemberSelector - """ - return cls('email', val) - - def is_dropbox_id(self): - """ - Check if the union tag is ``dropbox_id``. - - :rtype: bool - """ - return self._tag == 'dropbox_id' - - def is_email(self): - """ - Check if the union tag is ``email``. - - :rtype: bool - """ - return self._tag == 'email' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_dropbox_id(self): - """ - Dropbox account, team member, or group ID of member. - - Only call this if :meth:`is_dropbox_id` is true. - - :rtype: str - """ - if not self.is_dropbox_id(): - raise AttributeError("tag 'dropbox_id' not set") - return self._value - - def get_email(self): - """ - E-mail address of member. - - Only call this if :meth:`is_email` is true. - - :rtype: str - """ - if not self.is_email(): - raise AttributeError("tag 'email' not set") - return self._value - - def __repr__(self): - return 'MemberSelector(%r, %r)' % (self._tag, self._value) - -MemberSelector_validator = bv.Union(MemberSelector) - -class ModifySharedLinkSettingsArgs(object): - """ - :ivar url: URL of the shared link to change its settings. - :ivar settings: Set of settings for the shared link. - :ivar remove_expiration: If set to true, removes the expiration of the - shared link. - """ - - __slots__ = [ - '_url_value', - '_url_present', - '_settings_value', - '_settings_present', - '_remove_expiration_value', - '_remove_expiration_present', - ] - - _has_required_fields = True - - def __init__(self, - url=None, - settings=None, - remove_expiration=None): - self._url_value = None - self._url_present = False - self._settings_value = None - self._settings_present = False - self._remove_expiration_value = None - self._remove_expiration_present = False - if url is not None: - self.url = url - if settings is not None: - self.settings = settings - if remove_expiration is not None: - self.remove_expiration = remove_expiration - - @property - def url(self): - """ - URL of the shared link to change its settings. - - :rtype: str - """ - if self._url_present: - return self._url_value - else: - raise AttributeError("missing required field 'url'") - - @url.setter - def url(self, val): - val = self._url_validator.validate(val) - self._url_value = val - self._url_present = True - - @url.deleter - def url(self): - self._url_value = None - self._url_present = False - - @property - def settings(self): - """ - Set of settings for the shared link. - - :rtype: SharedLinkSettings - """ - if self._settings_present: - return self._settings_value - else: - raise AttributeError("missing required field 'settings'") - - @settings.setter - def settings(self, val): - self._settings_validator.validate_type_only(val) - self._settings_value = val - self._settings_present = True - - @settings.deleter - def settings(self): - self._settings_value = None - self._settings_present = False - - @property - def remove_expiration(self): - """ - If set to true, removes the expiration of the shared link. - - :rtype: bool - """ - if self._remove_expiration_present: - return self._remove_expiration_value - else: - return False - - @remove_expiration.setter - def remove_expiration(self, val): - val = self._remove_expiration_validator.validate(val) - self._remove_expiration_value = val - self._remove_expiration_present = True - - @remove_expiration.deleter - def remove_expiration(self): - self._remove_expiration_value = None - self._remove_expiration_present = False - - def __repr__(self): - return 'ModifySharedLinkSettingsArgs(url={!r}, settings={!r}, remove_expiration={!r})'.format( - self._url_value, - self._settings_value, - self._remove_expiration_value, - ) - -ModifySharedLinkSettingsArgs_validator = bv.Struct(ModifySharedLinkSettingsArgs) - -class ModifySharedLinkSettingsError(SharedLinkError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar SharedLinkSettingsError settings_error: There is an error with the - given settings. - :ivar email_not_verified: The caller's email should be verified. - """ - - # Attribute is overwritten below the class definition - email_not_verified = None - - @classmethod - def settings_error(cls, val): - """ - Create an instance of this class set to the ``settings_error`` tag with - value ``val``. - - :param SharedLinkSettingsError val: - :rtype: ModifySharedLinkSettingsError - """ - return cls('settings_error', val) - - def is_settings_error(self): - """ - Check if the union tag is ``settings_error``. - - :rtype: bool - """ - return self._tag == 'settings_error' - - def is_email_not_verified(self): - """ - Check if the union tag is ``email_not_verified``. - - :rtype: bool - """ - return self._tag == 'email_not_verified' - - def get_settings_error(self): - """ - There is an error with the given settings. - - Only call this if :meth:`is_settings_error` is true. - - :rtype: SharedLinkSettingsError - """ - if not self.is_settings_error(): - raise AttributeError("tag 'settings_error' not set") - return self._value - - def __repr__(self): - return 'ModifySharedLinkSettingsError(%r, %r)' % (self._tag, self._value) - -ModifySharedLinkSettingsError_validator = bv.Union(ModifySharedLinkSettingsError) - -class MountFolderArg(object): - """ - :ivar shared_folder_id: The ID of the shared folder to mount. - """ - - __slots__ = [ - '_shared_folder_id_value', - '_shared_folder_id_present', - ] - - _has_required_fields = True - - def __init__(self, - shared_folder_id=None): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - if shared_folder_id is not None: - self.shared_folder_id = shared_folder_id - - @property - def shared_folder_id(self): - """ - The ID of the shared folder to mount. - - :rtype: str - """ - if self._shared_folder_id_present: - return self._shared_folder_id_value - else: - raise AttributeError("missing required field 'shared_folder_id'") - - @shared_folder_id.setter - def shared_folder_id(self, val): - val = self._shared_folder_id_validator.validate(val) - self._shared_folder_id_value = val - self._shared_folder_id_present = True - - @shared_folder_id.deleter - def shared_folder_id(self): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - - def __repr__(self): - return 'MountFolderArg(shared_folder_id={!r})'.format( - self._shared_folder_id_value, - ) - -MountFolderArg_validator = bv.Struct(MountFolderArg) - -class MountFolderError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar inside_shared_folder: Mounting would cause a shared folder to be - inside another, which is disallowed. - :ivar InsufficientQuotaAmounts insufficient_quota: The current user does not - have enough space to mount the shared folder. - :ivar already_mounted: The shared folder is already mounted. - :ivar no_permission: The current user does not have permission to perform - this action. - :ivar not_mountable: The shared folder is not mountable. One example where - this can occur is when the shared folder belongs within a team folder in - the user's Dropbox. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - inside_shared_folder = None - # Attribute is overwritten below the class definition - already_mounted = None - # Attribute is overwritten below the class definition - no_permission = None - # Attribute is overwritten below the class definition - not_mountable = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def access_error(cls, val): - """ - Create an instance of this class set to the ``access_error`` tag with - value ``val``. - - :param SharedFolderAccessError val: - :rtype: MountFolderError - """ - return cls('access_error', val) - - @classmethod - def insufficient_quota(cls, val): - """ - Create an instance of this class set to the ``insufficient_quota`` tag - with value ``val``. - - :param InsufficientQuotaAmounts val: - :rtype: MountFolderError - """ - return cls('insufficient_quota', val) - - def is_access_error(self): - """ - Check if the union tag is ``access_error``. - - :rtype: bool - """ - return self._tag == 'access_error' - - def is_inside_shared_folder(self): - """ - Check if the union tag is ``inside_shared_folder``. - - :rtype: bool - """ - return self._tag == 'inside_shared_folder' - - def is_insufficient_quota(self): - """ - Check if the union tag is ``insufficient_quota``. - - :rtype: bool - """ - return self._tag == 'insufficient_quota' - - def is_already_mounted(self): - """ - Check if the union tag is ``already_mounted``. - - :rtype: bool - """ - return self._tag == 'already_mounted' - - def is_no_permission(self): - """ - Check if the union tag is ``no_permission``. - - :rtype: bool - """ - return self._tag == 'no_permission' - - def is_not_mountable(self): - """ - Check if the union tag is ``not_mountable``. - - :rtype: bool - """ - return self._tag == 'not_mountable' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_access_error(self): - """ - Only call this if :meth:`is_access_error` is true. - - :rtype: SharedFolderAccessError - """ - if not self.is_access_error(): - raise AttributeError("tag 'access_error' not set") - return self._value - - def get_insufficient_quota(self): - """ - The current user does not have enough space to mount the shared folder. - - Only call this if :meth:`is_insufficient_quota` is true. - - :rtype: InsufficientQuotaAmounts - """ - if not self.is_insufficient_quota(): - raise AttributeError("tag 'insufficient_quota' not set") - return self._value - - def __repr__(self): - return 'MountFolderError(%r, %r)' % (self._tag, self._value) - -MountFolderError_validator = bv.Union(MountFolderError) - -class ParentFolderAccessInfo(object): - """ - Contains information about a parent folder that a member has access to. - - :ivar folder_name: Display name for the folder. - :ivar shared_folder_id: The identifier of the parent shared folder. - :ivar permissions: The user's permissions for the parent shared folder. - :ivar path: The full path to the parent shared folder relative to the acting - user's root. - """ - - __slots__ = [ - '_folder_name_value', - '_folder_name_present', - '_shared_folder_id_value', - '_shared_folder_id_present', - '_permissions_value', - '_permissions_present', - '_path_value', - '_path_present', - ] - - _has_required_fields = True - - def __init__(self, - folder_name=None, - shared_folder_id=None, - permissions=None, - path=None): - self._folder_name_value = None - self._folder_name_present = False - self._shared_folder_id_value = None - self._shared_folder_id_present = False - self._permissions_value = None - self._permissions_present = False - self._path_value = None - self._path_present = False - if folder_name is not None: - self.folder_name = folder_name - if shared_folder_id is not None: - self.shared_folder_id = shared_folder_id - if permissions is not None: - self.permissions = permissions - if path is not None: - self.path = path - - @property - def folder_name(self): - """ - Display name for the folder. - - :rtype: str - """ - if self._folder_name_present: - return self._folder_name_value - else: - raise AttributeError("missing required field 'folder_name'") - - @folder_name.setter - def folder_name(self, val): - val = self._folder_name_validator.validate(val) - self._folder_name_value = val - self._folder_name_present = True - - @folder_name.deleter - def folder_name(self): - self._folder_name_value = None - self._folder_name_present = False - - @property - def shared_folder_id(self): - """ - The identifier of the parent shared folder. - - :rtype: str - """ - if self._shared_folder_id_present: - return self._shared_folder_id_value - else: - raise AttributeError("missing required field 'shared_folder_id'") - - @shared_folder_id.setter - def shared_folder_id(self, val): - val = self._shared_folder_id_validator.validate(val) - self._shared_folder_id_value = val - self._shared_folder_id_present = True - - @shared_folder_id.deleter - def shared_folder_id(self): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - - @property - def permissions(self): - """ - The user's permissions for the parent shared folder. - - :rtype: list of [MemberPermission] - """ - if self._permissions_present: - return self._permissions_value - else: - raise AttributeError("missing required field 'permissions'") - - @permissions.setter - def permissions(self, val): - val = self._permissions_validator.validate(val) - self._permissions_value = val - self._permissions_present = True - - @permissions.deleter - def permissions(self): - self._permissions_value = None - self._permissions_present = False - - @property - def path(self): - """ - The full path to the parent shared folder relative to the acting user's - root. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - def __repr__(self): - return 'ParentFolderAccessInfo(folder_name={!r}, shared_folder_id={!r}, permissions={!r}, path={!r})'.format( - self._folder_name_value, - self._shared_folder_id_value, - self._permissions_value, - self._path_value, - ) - -ParentFolderAccessInfo_validator = bv.Struct(ParentFolderAccessInfo) - -class PathLinkMetadata(LinkMetadata): - """ - Metadata for a path-based shared link. - - :ivar path: Path in user's Dropbox. - """ - - __slots__ = [ - '_path_value', - '_path_present', - ] - - _has_required_fields = True - - def __init__(self, - url=None, - visibility=None, - path=None, - expires=None): - super(PathLinkMetadata, self).__init__(url, - visibility, - expires) - self._path_value = None - self._path_present = False - if path is not None: - self.path = path - - @property - def path(self): - """ - Path in user's Dropbox. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - def __repr__(self): - return 'PathLinkMetadata(url={!r}, visibility={!r}, path={!r}, expires={!r})'.format( - self._url_value, - self._visibility_value, - self._path_value, - self._expires_value, - ) - -PathLinkMetadata_validator = bv.Struct(PathLinkMetadata) - -class PendingUploadMode(bb.Union): - """ - Flag to indicate pending upload default (for linking to not-yet-existing - paths). - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar file: Assume pending uploads are files. - :ivar folder: Assume pending uploads are folders. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - file = None - # Attribute is overwritten below the class definition - folder = None - - def is_file(self): - """ - Check if the union tag is ``file``. - - :rtype: bool - """ - return self._tag == 'file' - - def is_folder(self): - """ - Check if the union tag is ``folder``. - - :rtype: bool - """ - return self._tag == 'folder' - - def __repr__(self): - return 'PendingUploadMode(%r, %r)' % (self._tag, self._value) - -PendingUploadMode_validator = bv.Union(PendingUploadMode) - -class PermissionDeniedReason(bb.Union): - """ - Possible reasons the user is denied a permission. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar user_not_same_team_as_owner: User is not on the same team as the - folder owner. - :ivar user_not_allowed_by_owner: User is prohibited by the owner from taking - the action. - :ivar target_is_indirect_member: Target is indirectly a member of the - folder, for example by being part of a group. - :ivar target_is_owner: Target is the owner of the folder. - :ivar target_is_self: Target is the user itself. - :ivar target_not_active: Target is not an active member of the team. - :ivar folder_is_limited_team_folder: Folder is team folder for a limited - team. - :ivar owner_not_on_team: The content owner needs to be on a Dropbox team to - perform this action. - :ivar permission_denied: The user does not have permission to perform this - action on the link. - :ivar restricted_by_team: The user's team policy prevents performing this - action on the link. - :ivar user_account_type: The user's account type does not support this - action. - :ivar user_not_on_team: The user needs to be on a Dropbox team to perform - this action. - :ivar folder_is_inside_shared_folder: Folder is inside of another shared - folder. - :ivar restricted_by_parent_folder: Policy cannot be changed due to - restrictions from parent folder. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - user_not_same_team_as_owner = None - # Attribute is overwritten below the class definition - user_not_allowed_by_owner = None - # Attribute is overwritten below the class definition - target_is_indirect_member = None - # Attribute is overwritten below the class definition - target_is_owner = None - # Attribute is overwritten below the class definition - target_is_self = None - # Attribute is overwritten below the class definition - target_not_active = None - # Attribute is overwritten below the class definition - folder_is_limited_team_folder = None - # Attribute is overwritten below the class definition - owner_not_on_team = None - # Attribute is overwritten below the class definition - permission_denied = None - # Attribute is overwritten below the class definition - restricted_by_team = None - # Attribute is overwritten below the class definition - user_account_type = None - # Attribute is overwritten below the class definition - user_not_on_team = None - # Attribute is overwritten below the class definition - folder_is_inside_shared_folder = None - # Attribute is overwritten below the class definition - restricted_by_parent_folder = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def insufficient_plan(cls, val): - """ - Create an instance of this class set to the ``insufficient_plan`` tag - with value ``val``. - - :param InsufficientPlan val: - :rtype: PermissionDeniedReason - """ - return cls('insufficient_plan', val) - - def is_user_not_same_team_as_owner(self): - """ - Check if the union tag is ``user_not_same_team_as_owner``. - - :rtype: bool - """ - return self._tag == 'user_not_same_team_as_owner' - - def is_user_not_allowed_by_owner(self): - """ - Check if the union tag is ``user_not_allowed_by_owner``. - - :rtype: bool - """ - return self._tag == 'user_not_allowed_by_owner' - - def is_target_is_indirect_member(self): - """ - Check if the union tag is ``target_is_indirect_member``. - - :rtype: bool - """ - return self._tag == 'target_is_indirect_member' - - def is_target_is_owner(self): - """ - Check if the union tag is ``target_is_owner``. - - :rtype: bool - """ - return self._tag == 'target_is_owner' - - def is_target_is_self(self): - """ - Check if the union tag is ``target_is_self``. - - :rtype: bool - """ - return self._tag == 'target_is_self' - - def is_target_not_active(self): - """ - Check if the union tag is ``target_not_active``. - - :rtype: bool - """ - return self._tag == 'target_not_active' - - def is_folder_is_limited_team_folder(self): - """ - Check if the union tag is ``folder_is_limited_team_folder``. - - :rtype: bool - """ - return self._tag == 'folder_is_limited_team_folder' - - def is_owner_not_on_team(self): - """ - Check if the union tag is ``owner_not_on_team``. - - :rtype: bool - """ - return self._tag == 'owner_not_on_team' - - def is_permission_denied(self): - """ - Check if the union tag is ``permission_denied``. - - :rtype: bool - """ - return self._tag == 'permission_denied' - - def is_restricted_by_team(self): - """ - Check if the union tag is ``restricted_by_team``. - - :rtype: bool - """ - return self._tag == 'restricted_by_team' - - def is_user_account_type(self): - """ - Check if the union tag is ``user_account_type``. - - :rtype: bool - """ - return self._tag == 'user_account_type' - - def is_user_not_on_team(self): - """ - Check if the union tag is ``user_not_on_team``. - - :rtype: bool - """ - return self._tag == 'user_not_on_team' - - def is_folder_is_inside_shared_folder(self): - """ - Check if the union tag is ``folder_is_inside_shared_folder``. - - :rtype: bool - """ - return self._tag == 'folder_is_inside_shared_folder' - - def is_restricted_by_parent_folder(self): - """ - Check if the union tag is ``restricted_by_parent_folder``. - - :rtype: bool - """ - return self._tag == 'restricted_by_parent_folder' - - def is_insufficient_plan(self): - """ - Check if the union tag is ``insufficient_plan``. - - :rtype: bool - """ - return self._tag == 'insufficient_plan' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_insufficient_plan(self): - """ - Only call this if :meth:`is_insufficient_plan` is true. - - :rtype: InsufficientPlan - """ - if not self.is_insufficient_plan(): - raise AttributeError("tag 'insufficient_plan' not set") - return self._value - - def __repr__(self): - return 'PermissionDeniedReason(%r, %r)' % (self._tag, self._value) - -PermissionDeniedReason_validator = bv.Union(PermissionDeniedReason) - -class RelinquishFileMembershipArg(object): - """ - :ivar file: The path or id for the file. - """ - - __slots__ = [ - '_file_value', - '_file_present', - ] - - _has_required_fields = True - - def __init__(self, - file=None): - self._file_value = None - self._file_present = False - if file is not None: - self.file = file - - @property - def file(self): - """ - The path or id for the file. - - :rtype: str - """ - if self._file_present: - return self._file_value - else: - raise AttributeError("missing required field 'file'") - - @file.setter - def file(self, val): - val = self._file_validator.validate(val) - self._file_value = val - self._file_present = True - - @file.deleter - def file(self): - self._file_value = None - self._file_present = False - - def __repr__(self): - return 'RelinquishFileMembershipArg(file={!r})'.format( - self._file_value, - ) - -RelinquishFileMembershipArg_validator = bv.Struct(RelinquishFileMembershipArg) - -class RelinquishFileMembershipError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar group_access: The current user has access to the shared file via a - group. You can't relinquish membership to a file shared via groups. - :ivar no_permission: The current user does not have permission to perform - this action. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - group_access = None - # Attribute is overwritten below the class definition - no_permission = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def access_error(cls, val): - """ - Create an instance of this class set to the ``access_error`` tag with - value ``val``. - - :param SharingFileAccessError val: - :rtype: RelinquishFileMembershipError - """ - return cls('access_error', val) - - def is_access_error(self): - """ - Check if the union tag is ``access_error``. - - :rtype: bool - """ - return self._tag == 'access_error' - - def is_group_access(self): - """ - Check if the union tag is ``group_access``. - - :rtype: bool - """ - return self._tag == 'group_access' - - def is_no_permission(self): - """ - Check if the union tag is ``no_permission``. - - :rtype: bool - """ - return self._tag == 'no_permission' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_access_error(self): - """ - Only call this if :meth:`is_access_error` is true. - - :rtype: SharingFileAccessError - """ - if not self.is_access_error(): - raise AttributeError("tag 'access_error' not set") - return self._value - - def __repr__(self): - return 'RelinquishFileMembershipError(%r, %r)' % (self._tag, self._value) - -RelinquishFileMembershipError_validator = bv.Union(RelinquishFileMembershipError) - -class RelinquishFolderMembershipArg(object): - """ - :ivar shared_folder_id: The ID for the shared folder. - :ivar leave_a_copy: Keep a copy of the folder's contents upon relinquishing - membership. - """ - - __slots__ = [ - '_shared_folder_id_value', - '_shared_folder_id_present', - '_leave_a_copy_value', - '_leave_a_copy_present', - ] - - _has_required_fields = True - - def __init__(self, - shared_folder_id=None, - leave_a_copy=None): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - self._leave_a_copy_value = None - self._leave_a_copy_present = False - if shared_folder_id is not None: - self.shared_folder_id = shared_folder_id - if leave_a_copy is not None: - self.leave_a_copy = leave_a_copy - - @property - def shared_folder_id(self): - """ - The ID for the shared folder. - - :rtype: str - """ - if self._shared_folder_id_present: - return self._shared_folder_id_value - else: - raise AttributeError("missing required field 'shared_folder_id'") - - @shared_folder_id.setter - def shared_folder_id(self, val): - val = self._shared_folder_id_validator.validate(val) - self._shared_folder_id_value = val - self._shared_folder_id_present = True - - @shared_folder_id.deleter - def shared_folder_id(self): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - - @property - def leave_a_copy(self): - """ - Keep a copy of the folder's contents upon relinquishing membership. - - :rtype: bool - """ - if self._leave_a_copy_present: - return self._leave_a_copy_value - else: - return False - - @leave_a_copy.setter - def leave_a_copy(self, val): - val = self._leave_a_copy_validator.validate(val) - self._leave_a_copy_value = val - self._leave_a_copy_present = True - - @leave_a_copy.deleter - def leave_a_copy(self): - self._leave_a_copy_value = None - self._leave_a_copy_present = False - - def __repr__(self): - return 'RelinquishFolderMembershipArg(shared_folder_id={!r}, leave_a_copy={!r})'.format( - self._shared_folder_id_value, - self._leave_a_copy_value, - ) - -RelinquishFolderMembershipArg_validator = bv.Struct(RelinquishFolderMembershipArg) - -class RelinquishFolderMembershipError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar folder_owner: The current user is the owner of the shared folder. - Owners cannot relinquish membership to their own folders. Try unsharing - or transferring ownership first. - :ivar mounted: The shared folder is currently mounted. Unmount the shared - folder before relinquishing membership. - :ivar group_access: The current user has access to the shared folder via a - group. You can't relinquish membership to folders shared via groups. - :ivar team_folder: This action cannot be performed on a team shared folder. - :ivar no_permission: The current user does not have permission to perform - this action. - :ivar no_explicit_access: The current user only has inherited access to the - shared folder. You can't relinquish inherited membership to folders. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - folder_owner = None - # Attribute is overwritten below the class definition - mounted = None - # Attribute is overwritten below the class definition - group_access = None - # Attribute is overwritten below the class definition - team_folder = None - # Attribute is overwritten below the class definition - no_permission = None - # Attribute is overwritten below the class definition - no_explicit_access = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def access_error(cls, val): - """ - Create an instance of this class set to the ``access_error`` tag with - value ``val``. - - :param SharedFolderAccessError val: - :rtype: RelinquishFolderMembershipError - """ - return cls('access_error', val) - - def is_access_error(self): - """ - Check if the union tag is ``access_error``. - - :rtype: bool - """ - return self._tag == 'access_error' - - def is_folder_owner(self): - """ - Check if the union tag is ``folder_owner``. - - :rtype: bool - """ - return self._tag == 'folder_owner' - - def is_mounted(self): - """ - Check if the union tag is ``mounted``. - - :rtype: bool - """ - return self._tag == 'mounted' - - def is_group_access(self): - """ - Check if the union tag is ``group_access``. - - :rtype: bool - """ - return self._tag == 'group_access' - - def is_team_folder(self): - """ - Check if the union tag is ``team_folder``. - - :rtype: bool - """ - return self._tag == 'team_folder' - - def is_no_permission(self): - """ - Check if the union tag is ``no_permission``. - - :rtype: bool - """ - return self._tag == 'no_permission' - - def is_no_explicit_access(self): - """ - Check if the union tag is ``no_explicit_access``. - - :rtype: bool - """ - return self._tag == 'no_explicit_access' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_access_error(self): - """ - Only call this if :meth:`is_access_error` is true. - - :rtype: SharedFolderAccessError - """ - if not self.is_access_error(): - raise AttributeError("tag 'access_error' not set") - return self._value - - def __repr__(self): - return 'RelinquishFolderMembershipError(%r, %r)' % (self._tag, self._value) - -RelinquishFolderMembershipError_validator = bv.Union(RelinquishFolderMembershipError) - -class RemoveFileMemberArg(object): - """ - Arguments for :meth:`dropbox.dropbox.Dropbox.sharing_remove_file_member_2`. - - :ivar file: File from which to remove members. - :ivar member: Member to remove from this file. Note that even if an email is - specified, it may result in the removal of a user (not an invitee) if - the user's main account corresponds to that email address. - """ - - __slots__ = [ - '_file_value', - '_file_present', - '_member_value', - '_member_present', - ] - - _has_required_fields = True - - def __init__(self, - file=None, - member=None): - self._file_value = None - self._file_present = False - self._member_value = None - self._member_present = False - if file is not None: - self.file = file - if member is not None: - self.member = member - - @property - def file(self): - """ - File from which to remove members. - - :rtype: str - """ - if self._file_present: - return self._file_value - else: - raise AttributeError("missing required field 'file'") - - @file.setter - def file(self, val): - val = self._file_validator.validate(val) - self._file_value = val - self._file_present = True - - @file.deleter - def file(self): - self._file_value = None - self._file_present = False - - @property - def member(self): - """ - Member to remove from this file. Note that even if an email is - specified, it may result in the removal of a user (not an invitee) if - the user's main account corresponds to that email address. - - :rtype: MemberSelector - """ - if self._member_present: - return self._member_value - else: - raise AttributeError("missing required field 'member'") - - @member.setter - def member(self, val): - self._member_validator.validate_type_only(val) - self._member_value = val - self._member_present = True - - @member.deleter - def member(self): - self._member_value = None - self._member_present = False - - def __repr__(self): - return 'RemoveFileMemberArg(file={!r}, member={!r})'.format( - self._file_value, - self._member_value, - ) - -RemoveFileMemberArg_validator = bv.Struct(RemoveFileMemberArg) - -class RemoveFileMemberError(bb.Union): - """ - Errors for :meth:`dropbox.dropbox.Dropbox.sharing_remove_file_member_2`. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar MemberAccessLevelResult no_explicit_access: This member does not have - explicit access to the file and therefore cannot be removed. The return - value is the access that a user might have to the file from a parent - folder. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def user_error(cls, val): - """ - Create an instance of this class set to the ``user_error`` tag with - value ``val``. - - :param SharingUserError val: - :rtype: RemoveFileMemberError - """ - return cls('user_error', val) - - @classmethod - def access_error(cls, val): - """ - Create an instance of this class set to the ``access_error`` tag with - value ``val``. - - :param SharingFileAccessError val: - :rtype: RemoveFileMemberError - """ - return cls('access_error', val) - - @classmethod - def no_explicit_access(cls, val): - """ - Create an instance of this class set to the ``no_explicit_access`` tag - with value ``val``. - - :param MemberAccessLevelResult val: - :rtype: RemoveFileMemberError - """ - return cls('no_explicit_access', val) - - def is_user_error(self): - """ - Check if the union tag is ``user_error``. - - :rtype: bool - """ - return self._tag == 'user_error' - - def is_access_error(self): - """ - Check if the union tag is ``access_error``. - - :rtype: bool - """ - return self._tag == 'access_error' - - def is_no_explicit_access(self): - """ - Check if the union tag is ``no_explicit_access``. - - :rtype: bool - """ - return self._tag == 'no_explicit_access' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_user_error(self): - """ - Only call this if :meth:`is_user_error` is true. - - :rtype: SharingUserError - """ - if not self.is_user_error(): - raise AttributeError("tag 'user_error' not set") - return self._value - - def get_access_error(self): - """ - Only call this if :meth:`is_access_error` is true. - - :rtype: SharingFileAccessError - """ - if not self.is_access_error(): - raise AttributeError("tag 'access_error' not set") - return self._value - - def get_no_explicit_access(self): - """ - This member does not have explicit access to the file and therefore - cannot be removed. The return value is the access that a user might have - to the file from a parent folder. - - Only call this if :meth:`is_no_explicit_access` is true. - - :rtype: MemberAccessLevelResult - """ - if not self.is_no_explicit_access(): - raise AttributeError("tag 'no_explicit_access' not set") - return self._value - - def __repr__(self): - return 'RemoveFileMemberError(%r, %r)' % (self._tag, self._value) - -RemoveFileMemberError_validator = bv.Union(RemoveFileMemberError) - -class RemoveFolderMemberArg(object): - """ - :ivar shared_folder_id: The ID for the shared folder. - :ivar member: The member to remove from the folder. - :ivar leave_a_copy: If true, the removed user will keep their copy of the - folder after it's unshared, assuming it was mounted. Otherwise, it will - be removed from their Dropbox. Also, this must be set to false when - kicking a group. - """ - - __slots__ = [ - '_shared_folder_id_value', - '_shared_folder_id_present', - '_member_value', - '_member_present', - '_leave_a_copy_value', - '_leave_a_copy_present', - ] - - _has_required_fields = True - - def __init__(self, - shared_folder_id=None, - member=None, - leave_a_copy=None): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - self._member_value = None - self._member_present = False - self._leave_a_copy_value = None - self._leave_a_copy_present = False - if shared_folder_id is not None: - self.shared_folder_id = shared_folder_id - if member is not None: - self.member = member - if leave_a_copy is not None: - self.leave_a_copy = leave_a_copy - - @property - def shared_folder_id(self): - """ - The ID for the shared folder. - - :rtype: str - """ - if self._shared_folder_id_present: - return self._shared_folder_id_value - else: - raise AttributeError("missing required field 'shared_folder_id'") - - @shared_folder_id.setter - def shared_folder_id(self, val): - val = self._shared_folder_id_validator.validate(val) - self._shared_folder_id_value = val - self._shared_folder_id_present = True - - @shared_folder_id.deleter - def shared_folder_id(self): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - - @property - def member(self): - """ - The member to remove from the folder. - - :rtype: MemberSelector - """ - if self._member_present: - return self._member_value - else: - raise AttributeError("missing required field 'member'") - - @member.setter - def member(self, val): - self._member_validator.validate_type_only(val) - self._member_value = val - self._member_present = True - - @member.deleter - def member(self): - self._member_value = None - self._member_present = False - - @property - def leave_a_copy(self): - """ - If true, the removed user will keep their copy of the folder after it's - unshared, assuming it was mounted. Otherwise, it will be removed from - their Dropbox. Also, this must be set to false when kicking a group. - - :rtype: bool - """ - if self._leave_a_copy_present: - return self._leave_a_copy_value - else: - raise AttributeError("missing required field 'leave_a_copy'") - - @leave_a_copy.setter - def leave_a_copy(self, val): - val = self._leave_a_copy_validator.validate(val) - self._leave_a_copy_value = val - self._leave_a_copy_present = True - - @leave_a_copy.deleter - def leave_a_copy(self): - self._leave_a_copy_value = None - self._leave_a_copy_present = False - - def __repr__(self): - return 'RemoveFolderMemberArg(shared_folder_id={!r}, member={!r}, leave_a_copy={!r})'.format( - self._shared_folder_id_value, - self._member_value, - self._leave_a_copy_value, - ) - -RemoveFolderMemberArg_validator = bv.Struct(RemoveFolderMemberArg) - -class RemoveFolderMemberError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar folder_owner: The target user is the owner of the shared folder. You - can't remove this user until ownership has been transferred to another - member. - :ivar group_access: The target user has access to the shared folder via a - group. - :ivar team_folder: This action cannot be performed on a team shared folder. - :ivar no_permission: The current user does not have permission to perform - this action. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - folder_owner = None - # Attribute is overwritten below the class definition - group_access = None - # Attribute is overwritten below the class definition - team_folder = None - # Attribute is overwritten below the class definition - no_permission = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def access_error(cls, val): - """ - Create an instance of this class set to the ``access_error`` tag with - value ``val``. - - :param SharedFolderAccessError val: - :rtype: RemoveFolderMemberError - """ - return cls('access_error', val) - - @classmethod - def member_error(cls, val): - """ - Create an instance of this class set to the ``member_error`` tag with - value ``val``. - - :param SharedFolderMemberError val: - :rtype: RemoveFolderMemberError - """ - return cls('member_error', val) - - def is_access_error(self): - """ - Check if the union tag is ``access_error``. - - :rtype: bool - """ - return self._tag == 'access_error' - - def is_member_error(self): - """ - Check if the union tag is ``member_error``. - - :rtype: bool - """ - return self._tag == 'member_error' - - def is_folder_owner(self): - """ - Check if the union tag is ``folder_owner``. - - :rtype: bool - """ - return self._tag == 'folder_owner' - - def is_group_access(self): - """ - Check if the union tag is ``group_access``. - - :rtype: bool - """ - return self._tag == 'group_access' - - def is_team_folder(self): - """ - Check if the union tag is ``team_folder``. - - :rtype: bool - """ - return self._tag == 'team_folder' - - def is_no_permission(self): - """ - Check if the union tag is ``no_permission``. - - :rtype: bool - """ - return self._tag == 'no_permission' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_access_error(self): - """ - Only call this if :meth:`is_access_error` is true. - - :rtype: SharedFolderAccessError - """ - if not self.is_access_error(): - raise AttributeError("tag 'access_error' not set") - return self._value - - def get_member_error(self): - """ - Only call this if :meth:`is_member_error` is true. - - :rtype: SharedFolderMemberError - """ - if not self.is_member_error(): - raise AttributeError("tag 'member_error' not set") - return self._value - - def __repr__(self): - return 'RemoveFolderMemberError(%r, %r)' % (self._tag, self._value) - -RemoveFolderMemberError_validator = bv.Union(RemoveFolderMemberError) - -class RemoveMemberJobStatus(async.PollResultBase): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar MemberAccessLevelResult complete: Removing the folder member has - finished. The value is information about whether the member has another - form of access. - """ - - @classmethod - def complete(cls, val): - """ - Create an instance of this class set to the ``complete`` tag with value - ``val``. - - :param MemberAccessLevelResult val: - :rtype: RemoveMemberJobStatus - """ - return cls('complete', val) - - @classmethod - def failed(cls, val): - """ - Create an instance of this class set to the ``failed`` tag with value - ``val``. - - :param RemoveFolderMemberError val: - :rtype: RemoveMemberJobStatus - """ - return cls('failed', val) - - def is_complete(self): - """ - Check if the union tag is ``complete``. - - :rtype: bool - """ - return self._tag == 'complete' - - def is_failed(self): - """ - Check if the union tag is ``failed``. - - :rtype: bool - """ - return self._tag == 'failed' - - def get_complete(self): - """ - Removing the folder member has finished. The value is information about - whether the member has another form of access. - - Only call this if :meth:`is_complete` is true. - - :rtype: MemberAccessLevelResult - """ - if not self.is_complete(): - raise AttributeError("tag 'complete' not set") - return self._value - - def get_failed(self): - """ - Only call this if :meth:`is_failed` is true. - - :rtype: RemoveFolderMemberError - """ - if not self.is_failed(): - raise AttributeError("tag 'failed' not set") - return self._value - - def __repr__(self): - return 'RemoveMemberJobStatus(%r, %r)' % (self._tag, self._value) - -RemoveMemberJobStatus_validator = bv.Union(RemoveMemberJobStatus) - -class RequestedVisibility(bb.Union): - """ - The access permission that can be requested by the caller for the shared - link. Note that the final resolved visibility of the shared link takes into - account other aspects, such as team and shared folder settings. Check the - :class:`ResolvedVisibility` for more info on the possible resolved - visibility values of shared links. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar public: Anyone who has received the link can access it. No login - required. - :ivar team_only: Only members of the same team can access the link. Login is - required. - :ivar password: A link-specific password is required to access the link. - Login is not required. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - public = None - # Attribute is overwritten below the class definition - team_only = None - # Attribute is overwritten below the class definition - password = None - - def is_public(self): - """ - Check if the union tag is ``public``. - - :rtype: bool - """ - return self._tag == 'public' - - def is_team_only(self): - """ - Check if the union tag is ``team_only``. - - :rtype: bool - """ - return self._tag == 'team_only' - - def is_password(self): - """ - Check if the union tag is ``password``. - - :rtype: bool - """ - return self._tag == 'password' - - def __repr__(self): - return 'RequestedVisibility(%r, %r)' % (self._tag, self._value) - -RequestedVisibility_validator = bv.Union(RequestedVisibility) - -class ResolvedVisibility(RequestedVisibility): - """ - The actual access permissions values of shared links after taking into - account user preferences and the team and shared folder settings. Check the - :class:`RequestedVisibility` for more info on the possible visibility values - that can be set by the shared link's owner. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar team_and_password: Only members of the same team who have the - link-specific password can access the link. Login is required. - :ivar shared_folder_only: Only members of the shared folder containing the - linked file can access the link. Login is required. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - team_and_password = None - # Attribute is overwritten below the class definition - shared_folder_only = None - # Attribute is overwritten below the class definition - other = None - - def is_team_and_password(self): - """ - Check if the union tag is ``team_and_password``. - - :rtype: bool - """ - return self._tag == 'team_and_password' - - def is_shared_folder_only(self): - """ - Check if the union tag is ``shared_folder_only``. - - :rtype: bool - """ - return self._tag == 'shared_folder_only' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'ResolvedVisibility(%r, %r)' % (self._tag, self._value) - -ResolvedVisibility_validator = bv.Union(ResolvedVisibility) - -class RevokeSharedLinkArg(object): - """ - :ivar url: URL of the shared link. - """ - - __slots__ = [ - '_url_value', - '_url_present', - ] - - _has_required_fields = True - - def __init__(self, - url=None): - self._url_value = None - self._url_present = False - if url is not None: - self.url = url - - @property - def url(self): - """ - URL of the shared link. - - :rtype: str - """ - if self._url_present: - return self._url_value - else: - raise AttributeError("missing required field 'url'") - - @url.setter - def url(self, val): - val = self._url_validator.validate(val) - self._url_value = val - self._url_present = True - - @url.deleter - def url(self): - self._url_value = None - self._url_present = False - - def __repr__(self): - return 'RevokeSharedLinkArg(url={!r})'.format( - self._url_value, - ) - -RevokeSharedLinkArg_validator = bv.Struct(RevokeSharedLinkArg) - -class RevokeSharedLinkError(SharedLinkError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar shared_link_malformed: Shared link is malformed. - """ - - # Attribute is overwritten below the class definition - shared_link_malformed = None - - def is_shared_link_malformed(self): - """ - Check if the union tag is ``shared_link_malformed``. - - :rtype: bool - """ - return self._tag == 'shared_link_malformed' - - def __repr__(self): - return 'RevokeSharedLinkError(%r, %r)' % (self._tag, self._value) - -RevokeSharedLinkError_validator = bv.Union(RevokeSharedLinkError) - -class ShareFolderArgBase(object): - """ - :ivar acl_update_policy: Who can add and remove members of this shared - folder. - :ivar force_async: Whether to force the share to happen asynchronously. - :ivar member_policy: Who can be a member of this shared folder. Only - applicable if the current user is on a team. - :ivar path: The path to the folder to share. If it does not exist, then a - new one is created. - :ivar shared_link_policy: The policy to apply to shared links created for - content inside this shared folder. The current user must be on a team - to set this policy to ``SharedLinkPolicy.members``. - :ivar viewer_info_policy: Who can enable/disable viewer info for this shared - folder. - """ - - __slots__ = [ - '_acl_update_policy_value', - '_acl_update_policy_present', - '_force_async_value', - '_force_async_present', - '_member_policy_value', - '_member_policy_present', - '_path_value', - '_path_present', - '_shared_link_policy_value', - '_shared_link_policy_present', - '_viewer_info_policy_value', - '_viewer_info_policy_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - acl_update_policy=None, - force_async=None, - member_policy=None, - shared_link_policy=None, - viewer_info_policy=None): - self._acl_update_policy_value = None - self._acl_update_policy_present = False - self._force_async_value = None - self._force_async_present = False - self._member_policy_value = None - self._member_policy_present = False - self._path_value = None - self._path_present = False - self._shared_link_policy_value = None - self._shared_link_policy_present = False - self._viewer_info_policy_value = None - self._viewer_info_policy_present = False - if acl_update_policy is not None: - self.acl_update_policy = acl_update_policy - if force_async is not None: - self.force_async = force_async - if member_policy is not None: - self.member_policy = member_policy - if path is not None: - self.path = path - if shared_link_policy is not None: - self.shared_link_policy = shared_link_policy - if viewer_info_policy is not None: - self.viewer_info_policy = viewer_info_policy - - @property - def acl_update_policy(self): - """ - Who can add and remove members of this shared folder. - - :rtype: AclUpdatePolicy - """ - if self._acl_update_policy_present: - return self._acl_update_policy_value - else: - return None - - @acl_update_policy.setter - def acl_update_policy(self, val): - if val is None: - del self.acl_update_policy - return - self._acl_update_policy_validator.validate_type_only(val) - self._acl_update_policy_value = val - self._acl_update_policy_present = True - - @acl_update_policy.deleter - def acl_update_policy(self): - self._acl_update_policy_value = None - self._acl_update_policy_present = False - - @property - def force_async(self): - """ - Whether to force the share to happen asynchronously. - - :rtype: bool - """ - if self._force_async_present: - return self._force_async_value - else: - return False - - @force_async.setter - def force_async(self, val): - val = self._force_async_validator.validate(val) - self._force_async_value = val - self._force_async_present = True - - @force_async.deleter - def force_async(self): - self._force_async_value = None - self._force_async_present = False - - @property - def member_policy(self): - """ - Who can be a member of this shared folder. Only applicable if the - current user is on a team. - - :rtype: MemberPolicy - """ - if self._member_policy_present: - return self._member_policy_value - else: - return None - - @member_policy.setter - def member_policy(self, val): - if val is None: - del self.member_policy - return - self._member_policy_validator.validate_type_only(val) - self._member_policy_value = val - self._member_policy_present = True - - @member_policy.deleter - def member_policy(self): - self._member_policy_value = None - self._member_policy_present = False - - @property - def path(self): - """ - The path to the folder to share. If it does not exist, then a new one is - created. - - :rtype: str - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - val = self._path_validator.validate(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def shared_link_policy(self): - """ - The policy to apply to shared links created for content inside this - shared folder. The current user must be on a team to set this policy to - ``SharedLinkPolicy.members``. - - :rtype: SharedLinkPolicy - """ - if self._shared_link_policy_present: - return self._shared_link_policy_value - else: - return None - - @shared_link_policy.setter - def shared_link_policy(self, val): - if val is None: - del self.shared_link_policy - return - self._shared_link_policy_validator.validate_type_only(val) - self._shared_link_policy_value = val - self._shared_link_policy_present = True - - @shared_link_policy.deleter - def shared_link_policy(self): - self._shared_link_policy_value = None - self._shared_link_policy_present = False - - @property - def viewer_info_policy(self): - """ - Who can enable/disable viewer info for this shared folder. - - :rtype: ViewerInfoPolicy - """ - if self._viewer_info_policy_present: - return self._viewer_info_policy_value - else: - return None - - @viewer_info_policy.setter - def viewer_info_policy(self, val): - if val is None: - del self.viewer_info_policy - return - self._viewer_info_policy_validator.validate_type_only(val) - self._viewer_info_policy_value = val - self._viewer_info_policy_present = True - - @viewer_info_policy.deleter - def viewer_info_policy(self): - self._viewer_info_policy_value = None - self._viewer_info_policy_present = False - - def __repr__(self): - return 'ShareFolderArgBase(path={!r}, acl_update_policy={!r}, force_async={!r}, member_policy={!r}, shared_link_policy={!r}, viewer_info_policy={!r})'.format( - self._path_value, - self._acl_update_policy_value, - self._force_async_value, - self._member_policy_value, - self._shared_link_policy_value, - self._viewer_info_policy_value, - ) - -ShareFolderArgBase_validator = bv.Struct(ShareFolderArgBase) - -class ShareFolderArg(ShareFolderArgBase): - """ - :ivar actions: A list of `FolderAction`s corresponding to - `FolderPermission`s that should appear in the response's - ``SharedFolderMetadata.permissions`` field describing the actions the - authenticated user can perform on the folder. - :ivar link_settings: Settings on the link for this folder. - """ - - __slots__ = [ - '_actions_value', - '_actions_present', - '_link_settings_value', - '_link_settings_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - acl_update_policy=None, - force_async=None, - member_policy=None, - shared_link_policy=None, - viewer_info_policy=None, - actions=None, - link_settings=None): - super(ShareFolderArg, self).__init__(path, - acl_update_policy, - force_async, - member_policy, - shared_link_policy, - viewer_info_policy) - self._actions_value = None - self._actions_present = False - self._link_settings_value = None - self._link_settings_present = False - if actions is not None: - self.actions = actions - if link_settings is not None: - self.link_settings = link_settings - - @property - def actions(self): - """ - A list of `FolderAction`s corresponding to `FolderPermission`s that - should appear in the response's ``SharedFolderMetadata.permissions`` - field describing the actions the authenticated user can perform on the - folder. - - :rtype: list of [FolderAction] - """ - if self._actions_present: - return self._actions_value - else: - return None - - @actions.setter - def actions(self, val): - if val is None: - del self.actions - return - val = self._actions_validator.validate(val) - self._actions_value = val - self._actions_present = True - - @actions.deleter - def actions(self): - self._actions_value = None - self._actions_present = False - - @property - def link_settings(self): - """ - Settings on the link for this folder. - - :rtype: LinkSettings - """ - if self._link_settings_present: - return self._link_settings_value - else: - return None - - @link_settings.setter - def link_settings(self, val): - if val is None: - del self.link_settings - return - self._link_settings_validator.validate_type_only(val) - self._link_settings_value = val - self._link_settings_present = True - - @link_settings.deleter - def link_settings(self): - self._link_settings_value = None - self._link_settings_present = False - - def __repr__(self): - return 'ShareFolderArg(path={!r}, acl_update_policy={!r}, force_async={!r}, member_policy={!r}, shared_link_policy={!r}, viewer_info_policy={!r}, actions={!r}, link_settings={!r})'.format( - self._path_value, - self._acl_update_policy_value, - self._force_async_value, - self._member_policy_value, - self._shared_link_policy_value, - self._viewer_info_policy_value, - self._actions_value, - self._link_settings_value, - ) - -ShareFolderArg_validator = bv.Struct(ShareFolderArg) - -class ShareFolderErrorBase(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar email_unverified: The current user's e-mail address is unverified. - :ivar SharePathError bad_path: ``ShareFolderArg.path`` is invalid. - :ivar team_policy_disallows_member_policy: Team policy is more restrictive - than ``ShareFolderArg.member_policy``. - :ivar disallowed_shared_link_policy: The current user's account is not - allowed to select the specified ``ShareFolderArg.shared_link_policy``. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - email_unverified = None - # Attribute is overwritten below the class definition - team_policy_disallows_member_policy = None - # Attribute is overwritten below the class definition - disallowed_shared_link_policy = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def bad_path(cls, val): - """ - Create an instance of this class set to the ``bad_path`` tag with value - ``val``. - - :param SharePathError val: - :rtype: ShareFolderErrorBase - """ - return cls('bad_path', val) - - def is_email_unverified(self): - """ - Check if the union tag is ``email_unverified``. - - :rtype: bool - """ - return self._tag == 'email_unverified' - - def is_bad_path(self): - """ - Check if the union tag is ``bad_path``. - - :rtype: bool - """ - return self._tag == 'bad_path' - - def is_team_policy_disallows_member_policy(self): - """ - Check if the union tag is ``team_policy_disallows_member_policy``. - - :rtype: bool - """ - return self._tag == 'team_policy_disallows_member_policy' - - def is_disallowed_shared_link_policy(self): - """ - Check if the union tag is ``disallowed_shared_link_policy``. - - :rtype: bool - """ - return self._tag == 'disallowed_shared_link_policy' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_bad_path(self): - """ - ``ShareFolderArg.path`` is invalid. - - Only call this if :meth:`is_bad_path` is true. - - :rtype: SharePathError - """ - if not self.is_bad_path(): - raise AttributeError("tag 'bad_path' not set") - return self._value - - def __repr__(self): - return 'ShareFolderErrorBase(%r, %r)' % (self._tag, self._value) - -ShareFolderErrorBase_validator = bv.Union(ShareFolderErrorBase) - -class ShareFolderError(ShareFolderErrorBase): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar no_permission: The current user does not have permission to perform - this action. - """ - - # Attribute is overwritten below the class definition - no_permission = None - - def is_no_permission(self): - """ - Check if the union tag is ``no_permission``. - - :rtype: bool - """ - return self._tag == 'no_permission' - - def __repr__(self): - return 'ShareFolderError(%r, %r)' % (self._tag, self._value) - -ShareFolderError_validator = bv.Union(ShareFolderError) - -class ShareFolderJobStatus(async.PollResultBase): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar SharedFolderMetadata complete: The share job has finished. The value - is the metadata for the folder. - """ - - @classmethod - def complete(cls, val): - """ - Create an instance of this class set to the ``complete`` tag with value - ``val``. - - :param SharedFolderMetadata val: - :rtype: ShareFolderJobStatus - """ - return cls('complete', val) - - @classmethod - def failed(cls, val): - """ - Create an instance of this class set to the ``failed`` tag with value - ``val``. - - :param ShareFolderError val: - :rtype: ShareFolderJobStatus - """ - return cls('failed', val) - - def is_complete(self): - """ - Check if the union tag is ``complete``. - - :rtype: bool - """ - return self._tag == 'complete' - - def is_failed(self): - """ - Check if the union tag is ``failed``. - - :rtype: bool - """ - return self._tag == 'failed' - - def get_complete(self): - """ - The share job has finished. The value is the metadata for the folder. - - Only call this if :meth:`is_complete` is true. - - :rtype: SharedFolderMetadata - """ - if not self.is_complete(): - raise AttributeError("tag 'complete' not set") - return self._value - - def get_failed(self): - """ - Only call this if :meth:`is_failed` is true. - - :rtype: ShareFolderError - """ - if not self.is_failed(): - raise AttributeError("tag 'failed' not set") - return self._value - - def __repr__(self): - return 'ShareFolderJobStatus(%r, %r)' % (self._tag, self._value) - -ShareFolderJobStatus_validator = bv.Union(ShareFolderJobStatus) - -class ShareFolderLaunch(async.LaunchResultBase): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - @classmethod - def complete(cls, val): - """ - Create an instance of this class set to the ``complete`` tag with value - ``val``. - - :param SharedFolderMetadata val: - :rtype: ShareFolderLaunch - """ - return cls('complete', val) - - def is_complete(self): - """ - Check if the union tag is ``complete``. - - :rtype: bool - """ - return self._tag == 'complete' - - def get_complete(self): - """ - Only call this if :meth:`is_complete` is true. - - :rtype: SharedFolderMetadata - """ - if not self.is_complete(): - raise AttributeError("tag 'complete' not set") - return self._value - - def __repr__(self): - return 'ShareFolderLaunch(%r, %r)' % (self._tag, self._value) - -ShareFolderLaunch_validator = bv.Union(ShareFolderLaunch) - -class SharePathError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar is_file: A file is at the specified path. - :ivar inside_shared_folder: We do not support sharing a folder inside a - shared folder. - :ivar contains_shared_folder: We do not support shared folders that contain - shared folders. - :ivar contains_app_folder: We do not support shared folders that contain app - folders. - :ivar contains_team_folder: We do not support shared folders that contain - team folders. - :ivar is_app_folder: We do not support sharing an app folder. - :ivar inside_app_folder: We do not support sharing a folder inside an app - folder. - :ivar is_public_folder: A public folder can't be shared this way. Use a - public link instead. - :ivar inside_public_folder: A folder inside a public folder can't be shared - this way. Use a public link instead. - :ivar SharedFolderMetadata already_shared: Folder is already shared. - Contains metadata about the existing shared folder. - :ivar invalid_path: Path is not valid. - :ivar is_osx_package: We do not support sharing a Mac OS X package. - :ivar inside_osx_package: We do not support sharing a folder inside a Mac OS - X package. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - is_file = None - # Attribute is overwritten below the class definition - inside_shared_folder = None - # Attribute is overwritten below the class definition - contains_shared_folder = None - # Attribute is overwritten below the class definition - contains_app_folder = None - # Attribute is overwritten below the class definition - contains_team_folder = None - # Attribute is overwritten below the class definition - is_app_folder = None - # Attribute is overwritten below the class definition - inside_app_folder = None - # Attribute is overwritten below the class definition - is_public_folder = None - # Attribute is overwritten below the class definition - inside_public_folder = None - # Attribute is overwritten below the class definition - invalid_path = None - # Attribute is overwritten below the class definition - is_osx_package = None - # Attribute is overwritten below the class definition - inside_osx_package = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def already_shared(cls, val): - """ - Create an instance of this class set to the ``already_shared`` tag with - value ``val``. - - :param SharedFolderMetadata val: - :rtype: SharePathError - """ - return cls('already_shared', val) - - def is_is_file(self): - """ - Check if the union tag is ``is_file``. - - :rtype: bool - """ - return self._tag == 'is_file' - - def is_inside_shared_folder(self): - """ - Check if the union tag is ``inside_shared_folder``. - - :rtype: bool - """ - return self._tag == 'inside_shared_folder' - - def is_contains_shared_folder(self): - """ - Check if the union tag is ``contains_shared_folder``. - - :rtype: bool - """ - return self._tag == 'contains_shared_folder' - - def is_contains_app_folder(self): - """ - Check if the union tag is ``contains_app_folder``. - - :rtype: bool - """ - return self._tag == 'contains_app_folder' - - def is_contains_team_folder(self): - """ - Check if the union tag is ``contains_team_folder``. - - :rtype: bool - """ - return self._tag == 'contains_team_folder' - - def is_is_app_folder(self): - """ - Check if the union tag is ``is_app_folder``. - - :rtype: bool - """ - return self._tag == 'is_app_folder' - - def is_inside_app_folder(self): - """ - Check if the union tag is ``inside_app_folder``. - - :rtype: bool - """ - return self._tag == 'inside_app_folder' - - def is_is_public_folder(self): - """ - Check if the union tag is ``is_public_folder``. - - :rtype: bool - """ - return self._tag == 'is_public_folder' - - def is_inside_public_folder(self): - """ - Check if the union tag is ``inside_public_folder``. - - :rtype: bool - """ - return self._tag == 'inside_public_folder' - - def is_already_shared(self): - """ - Check if the union tag is ``already_shared``. - - :rtype: bool - """ - return self._tag == 'already_shared' - - def is_invalid_path(self): - """ - Check if the union tag is ``invalid_path``. - - :rtype: bool - """ - return self._tag == 'invalid_path' - - def is_is_osx_package(self): - """ - Check if the union tag is ``is_osx_package``. - - :rtype: bool - """ - return self._tag == 'is_osx_package' - - def is_inside_osx_package(self): - """ - Check if the union tag is ``inside_osx_package``. - - :rtype: bool - """ - return self._tag == 'inside_osx_package' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_already_shared(self): - """ - Folder is already shared. Contains metadata about the existing shared - folder. - - Only call this if :meth:`is_already_shared` is true. - - :rtype: SharedFolderMetadata - """ - if not self.is_already_shared(): - raise AttributeError("tag 'already_shared' not set") - return self._value - - def __repr__(self): - return 'SharePathError(%r, %r)' % (self._tag, self._value) - -SharePathError_validator = bv.Union(SharePathError) - -class SharedContentLinkMetadata(SharedContentLinkMetadataBase): - """ - Metadata of a shared link for a file or folder. - - :ivar audience_exceptions: The content inside this folder with link audience - different than this folder's. This is only returned when an endpoint - that returns metadata for a single shared folder is called, e.g. - /get_folder_metadata. - :ivar url: The URL of the link. - """ - - __slots__ = [ - '_audience_exceptions_value', - '_audience_exceptions_present', - '_url_value', - '_url_present', - ] - - _has_required_fields = True - - def __init__(self, - audience_options=None, - current_audience=None, - link_permissions=None, - password_protected=None, - url=None, - access_level=None, - audience_restricting_shared_folder=None, - expiry=None, - audience_exceptions=None): - super(SharedContentLinkMetadata, self).__init__(audience_options, - current_audience, - link_permissions, - password_protected, - access_level, - audience_restricting_shared_folder, - expiry) - self._audience_exceptions_value = None - self._audience_exceptions_present = False - self._url_value = None - self._url_present = False - if audience_exceptions is not None: - self.audience_exceptions = audience_exceptions - if url is not None: - self.url = url - - @property - def audience_exceptions(self): - """ - The content inside this folder with link audience different than this - folder's. This is only returned when an endpoint that returns metadata - for a single shared folder is called, e.g. /get_folder_metadata. - - :rtype: AudienceExceptions - """ - if self._audience_exceptions_present: - return self._audience_exceptions_value - else: - return None - - @audience_exceptions.setter - def audience_exceptions(self, val): - if val is None: - del self.audience_exceptions - return - self._audience_exceptions_validator.validate_type_only(val) - self._audience_exceptions_value = val - self._audience_exceptions_present = True - - @audience_exceptions.deleter - def audience_exceptions(self): - self._audience_exceptions_value = None - self._audience_exceptions_present = False - - @property - def url(self): - """ - The URL of the link. - - :rtype: str - """ - if self._url_present: - return self._url_value - else: - raise AttributeError("missing required field 'url'") - - @url.setter - def url(self, val): - val = self._url_validator.validate(val) - self._url_value = val - self._url_present = True - - @url.deleter - def url(self): - self._url_value = None - self._url_present = False - - def __repr__(self): - return 'SharedContentLinkMetadata(audience_options={!r}, current_audience={!r}, link_permissions={!r}, password_protected={!r}, url={!r}, access_level={!r}, audience_restricting_shared_folder={!r}, expiry={!r}, audience_exceptions={!r})'.format( - self._audience_options_value, - self._current_audience_value, - self._link_permissions_value, - self._password_protected_value, - self._url_value, - self._access_level_value, - self._audience_restricting_shared_folder_value, - self._expiry_value, - self._audience_exceptions_value, - ) - -SharedContentLinkMetadata_validator = bv.Struct(SharedContentLinkMetadata) - -class SharedFileMembers(object): - """ - Shared file user, group, and invitee membership. Used for the results of - :meth:`dropbox.dropbox.Dropbox.sharing_list_file_members` and - :meth:`dropbox.dropbox.Dropbox.sharing_list_file_members_continue`, and used - as part of the results for - :meth:`dropbox.dropbox.Dropbox.sharing_list_file_members_batch`. - - :ivar users: The list of user members of the shared file. - :ivar groups: The list of group members of the shared file. - :ivar invitees: The list of invited members of a file, but have not logged - in and claimed this. - :ivar cursor: Present if there are additional shared file members that have - not been returned yet. Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.sharing_list_file_members_continue` to - list additional members. - """ - - __slots__ = [ - '_users_value', - '_users_present', - '_groups_value', - '_groups_present', - '_invitees_value', - '_invitees_present', - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - users=None, - groups=None, - invitees=None, - cursor=None): - self._users_value = None - self._users_present = False - self._groups_value = None - self._groups_present = False - self._invitees_value = None - self._invitees_present = False - self._cursor_value = None - self._cursor_present = False - if users is not None: - self.users = users - if groups is not None: - self.groups = groups - if invitees is not None: - self.invitees = invitees - if cursor is not None: - self.cursor = cursor - - @property - def users(self): - """ - The list of user members of the shared file. - - :rtype: list of [UserFileMembershipInfo] - """ - if self._users_present: - return self._users_value - else: - raise AttributeError("missing required field 'users'") - - @users.setter - def users(self, val): - val = self._users_validator.validate(val) - self._users_value = val - self._users_present = True - - @users.deleter - def users(self): - self._users_value = None - self._users_present = False - - @property - def groups(self): - """ - The list of group members of the shared file. - - :rtype: list of [GroupMembershipInfo] - """ - if self._groups_present: - return self._groups_value - else: - raise AttributeError("missing required field 'groups'") - - @groups.setter - def groups(self, val): - val = self._groups_validator.validate(val) - self._groups_value = val - self._groups_present = True - - @groups.deleter - def groups(self): - self._groups_value = None - self._groups_present = False - - @property - def invitees(self): - """ - The list of invited members of a file, but have not logged in and - claimed this. - - :rtype: list of [InviteeMembershipInfo] - """ - if self._invitees_present: - return self._invitees_value - else: - raise AttributeError("missing required field 'invitees'") - - @invitees.setter - def invitees(self, val): - val = self._invitees_validator.validate(val) - self._invitees_value = val - self._invitees_present = True - - @invitees.deleter - def invitees(self): - self._invitees_value = None - self._invitees_present = False - - @property - def cursor(self): - """ - Present if there are additional shared file members that have not been - returned yet. Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.sharing_list_file_members_continue` to - list additional members. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - return None - - @cursor.setter - def cursor(self, val): - if val is None: - del self.cursor - return - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'SharedFileMembers(users={!r}, groups={!r}, invitees={!r}, cursor={!r})'.format( - self._users_value, - self._groups_value, - self._invitees_value, - self._cursor_value, - ) - -SharedFileMembers_validator = bv.Struct(SharedFileMembers) - -class SharedFileMetadata(object): - """ - Properties of the shared file. - - :ivar access_type: The current user's access level for this shared file. - :ivar id: The ID of the file. - :ivar expected_link_metadata: The expected metadata of the link associated - for the file when it is first shared. Absent if the link already exists. - This is for an unreleased feature so it may not be returned yet. - :ivar link_metadata: The metadata of the link associated for the file. This - is for an unreleased feature so it may not be returned yet. - :ivar name: The name of this file. - :ivar owner_display_names: The display names of the users that own the file. - If the file is part of a team folder, the display names of the team - admins are also included. Absent if the owner display names cannot be - fetched. - :ivar owner_team: The team that owns the file. This field is not present if - the file is not owned by a team. - :ivar parent_shared_folder_id: The ID of the parent shared folder. This - field is present only if the file is contained within a shared folder. - :ivar path_display: The cased path to be used for display purposes only. In - rare instances the casing will not correctly match the user's - filesystem, but this behavior will match the path provided in the Core - API v1. Absent for unmounted files. - :ivar path_lower: The lower-case full path of this file. Absent for - unmounted files. - :ivar permissions: The sharing permissions that requesting user has on this - file. This corresponds to the entries given in - ``GetFileMetadataBatchArg.actions`` or ``GetFileMetadataArg.actions``. - :ivar policy: Policies governing this shared file. - :ivar preview_url: URL for displaying a web preview of the shared file. - :ivar time_invited: Timestamp indicating when the current user was invited - to this shared file. If the user was not invited to the shared file, the - timestamp will indicate when the user was invited to the parent shared - folder. This value may be absent. - """ - - __slots__ = [ - '_access_type_value', - '_access_type_present', - '_id_value', - '_id_present', - '_expected_link_metadata_value', - '_expected_link_metadata_present', - '_link_metadata_value', - '_link_metadata_present', - '_name_value', - '_name_present', - '_owner_display_names_value', - '_owner_display_names_present', - '_owner_team_value', - '_owner_team_present', - '_parent_shared_folder_id_value', - '_parent_shared_folder_id_present', - '_path_display_value', - '_path_display_present', - '_path_lower_value', - '_path_lower_present', - '_permissions_value', - '_permissions_present', - '_policy_value', - '_policy_present', - '_preview_url_value', - '_preview_url_present', - '_time_invited_value', - '_time_invited_present', - ] - - _has_required_fields = True - - def __init__(self, - id=None, - name=None, - policy=None, - preview_url=None, - access_type=None, - expected_link_metadata=None, - link_metadata=None, - owner_display_names=None, - owner_team=None, - parent_shared_folder_id=None, - path_display=None, - path_lower=None, - permissions=None, - time_invited=None): - self._access_type_value = None - self._access_type_present = False - self._id_value = None - self._id_present = False - self._expected_link_metadata_value = None - self._expected_link_metadata_present = False - self._link_metadata_value = None - self._link_metadata_present = False - self._name_value = None - self._name_present = False - self._owner_display_names_value = None - self._owner_display_names_present = False - self._owner_team_value = None - self._owner_team_present = False - self._parent_shared_folder_id_value = None - self._parent_shared_folder_id_present = False - self._path_display_value = None - self._path_display_present = False - self._path_lower_value = None - self._path_lower_present = False - self._permissions_value = None - self._permissions_present = False - self._policy_value = None - self._policy_present = False - self._preview_url_value = None - self._preview_url_present = False - self._time_invited_value = None - self._time_invited_present = False - if access_type is not None: - self.access_type = access_type - if id is not None: - self.id = id - if expected_link_metadata is not None: - self.expected_link_metadata = expected_link_metadata - if link_metadata is not None: - self.link_metadata = link_metadata - if name is not None: - self.name = name - if owner_display_names is not None: - self.owner_display_names = owner_display_names - if owner_team is not None: - self.owner_team = owner_team - if parent_shared_folder_id is not None: - self.parent_shared_folder_id = parent_shared_folder_id - if path_display is not None: - self.path_display = path_display - if path_lower is not None: - self.path_lower = path_lower - if permissions is not None: - self.permissions = permissions - if policy is not None: - self.policy = policy - if preview_url is not None: - self.preview_url = preview_url - if time_invited is not None: - self.time_invited = time_invited - - @property - def access_type(self): - """ - The current user's access level for this shared file. - - :rtype: AccessLevel - """ - if self._access_type_present: - return self._access_type_value - else: - return None - - @access_type.setter - def access_type(self, val): - if val is None: - del self.access_type - return - self._access_type_validator.validate_type_only(val) - self._access_type_value = val - self._access_type_present = True - - @access_type.deleter - def access_type(self): - self._access_type_value = None - self._access_type_present = False - - @property - def id(self): - """ - The ID of the file. - - :rtype: str - """ - if self._id_present: - return self._id_value - else: - raise AttributeError("missing required field 'id'") - - @id.setter - def id(self, val): - val = self._id_validator.validate(val) - self._id_value = val - self._id_present = True - - @id.deleter - def id(self): - self._id_value = None - self._id_present = False - - @property - def expected_link_metadata(self): - """ - The expected metadata of the link associated for the file when it is - first shared. Absent if the link already exists. This is for an - unreleased feature so it may not be returned yet. - - :rtype: ExpectedSharedContentLinkMetadata - """ - if self._expected_link_metadata_present: - return self._expected_link_metadata_value - else: - return None - - @expected_link_metadata.setter - def expected_link_metadata(self, val): - if val is None: - del self.expected_link_metadata - return - self._expected_link_metadata_validator.validate_type_only(val) - self._expected_link_metadata_value = val - self._expected_link_metadata_present = True - - @expected_link_metadata.deleter - def expected_link_metadata(self): - self._expected_link_metadata_value = None - self._expected_link_metadata_present = False - - @property - def link_metadata(self): - """ - The metadata of the link associated for the file. This is for an - unreleased feature so it may not be returned yet. - - :rtype: SharedContentLinkMetadata - """ - if self._link_metadata_present: - return self._link_metadata_value - else: - return None - - @link_metadata.setter - def link_metadata(self, val): - if val is None: - del self.link_metadata - return - self._link_metadata_validator.validate_type_only(val) - self._link_metadata_value = val - self._link_metadata_present = True - - @link_metadata.deleter - def link_metadata(self): - self._link_metadata_value = None - self._link_metadata_present = False - - @property - def name(self): - """ - The name of this file. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") - - @name.setter - def name(self, val): - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - @property - def owner_display_names(self): - """ - The display names of the users that own the file. If the file is part of - a team folder, the display names of the team admins are also included. - Absent if the owner display names cannot be fetched. - - :rtype: list of [str] - """ - if self._owner_display_names_present: - return self._owner_display_names_value - else: - return None - - @owner_display_names.setter - def owner_display_names(self, val): - if val is None: - del self.owner_display_names - return - val = self._owner_display_names_validator.validate(val) - self._owner_display_names_value = val - self._owner_display_names_present = True - - @owner_display_names.deleter - def owner_display_names(self): - self._owner_display_names_value = None - self._owner_display_names_present = False - - @property - def owner_team(self): - """ - The team that owns the file. This field is not present if the file is - not owned by a team. - - :rtype: users.Team_validator - """ - if self._owner_team_present: - return self._owner_team_value - else: - return None - - @owner_team.setter - def owner_team(self, val): - if val is None: - del self.owner_team - return - self._owner_team_validator.validate_type_only(val) - self._owner_team_value = val - self._owner_team_present = True - - @owner_team.deleter - def owner_team(self): - self._owner_team_value = None - self._owner_team_present = False - - @property - def parent_shared_folder_id(self): - """ - The ID of the parent shared folder. This field is present only if the - file is contained within a shared folder. - - :rtype: str - """ - if self._parent_shared_folder_id_present: - return self._parent_shared_folder_id_value - else: - return None - - @parent_shared_folder_id.setter - def parent_shared_folder_id(self, val): - if val is None: - del self.parent_shared_folder_id - return - val = self._parent_shared_folder_id_validator.validate(val) - self._parent_shared_folder_id_value = val - self._parent_shared_folder_id_present = True - - @parent_shared_folder_id.deleter - def parent_shared_folder_id(self): - self._parent_shared_folder_id_value = None - self._parent_shared_folder_id_present = False - - @property - def path_display(self): - """ - The cased path to be used for display purposes only. In rare instances - the casing will not correctly match the user's filesystem, but this - behavior will match the path provided in the Core API v1. Absent for - unmounted files. - - :rtype: str - """ - if self._path_display_present: - return self._path_display_value - else: - return None - - @path_display.setter - def path_display(self, val): - if val is None: - del self.path_display - return - val = self._path_display_validator.validate(val) - self._path_display_value = val - self._path_display_present = True - - @path_display.deleter - def path_display(self): - self._path_display_value = None - self._path_display_present = False - - @property - def path_lower(self): - """ - The lower-case full path of this file. Absent for unmounted files. - - :rtype: str - """ - if self._path_lower_present: - return self._path_lower_value - else: - return None - - @path_lower.setter - def path_lower(self, val): - if val is None: - del self.path_lower - return - val = self._path_lower_validator.validate(val) - self._path_lower_value = val - self._path_lower_present = True - - @path_lower.deleter - def path_lower(self): - self._path_lower_value = None - self._path_lower_present = False - - @property - def permissions(self): - """ - The sharing permissions that requesting user has on this file. This - corresponds to the entries given in ``GetFileMetadataBatchArg.actions`` - or ``GetFileMetadataArg.actions``. - - :rtype: list of [FilePermission] - """ - if self._permissions_present: - return self._permissions_value - else: - return None - - @permissions.setter - def permissions(self, val): - if val is None: - del self.permissions - return - val = self._permissions_validator.validate(val) - self._permissions_value = val - self._permissions_present = True - - @permissions.deleter - def permissions(self): - self._permissions_value = None - self._permissions_present = False - - @property - def policy(self): - """ - Policies governing this shared file. - - :rtype: FolderPolicy - """ - if self._policy_present: - return self._policy_value - else: - raise AttributeError("missing required field 'policy'") - - @policy.setter - def policy(self, val): - self._policy_validator.validate_type_only(val) - self._policy_value = val - self._policy_present = True - - @policy.deleter - def policy(self): - self._policy_value = None - self._policy_present = False - - @property - def preview_url(self): - """ - URL for displaying a web preview of the shared file. - - :rtype: str - """ - if self._preview_url_present: - return self._preview_url_value - else: - raise AttributeError("missing required field 'preview_url'") - - @preview_url.setter - def preview_url(self, val): - val = self._preview_url_validator.validate(val) - self._preview_url_value = val - self._preview_url_present = True - - @preview_url.deleter - def preview_url(self): - self._preview_url_value = None - self._preview_url_present = False - - @property - def time_invited(self): - """ - Timestamp indicating when the current user was invited to this shared - file. If the user was not invited to the shared file, the timestamp will - indicate when the user was invited to the parent shared folder. This - value may be absent. - - :rtype: datetime.datetime - """ - if self._time_invited_present: - return self._time_invited_value - else: - return None - - @time_invited.setter - def time_invited(self, val): - if val is None: - del self.time_invited - return - val = self._time_invited_validator.validate(val) - self._time_invited_value = val - self._time_invited_present = True - - @time_invited.deleter - def time_invited(self): - self._time_invited_value = None - self._time_invited_present = False - - def __repr__(self): - return 'SharedFileMetadata(id={!r}, name={!r}, policy={!r}, preview_url={!r}, access_type={!r}, expected_link_metadata={!r}, link_metadata={!r}, owner_display_names={!r}, owner_team={!r}, parent_shared_folder_id={!r}, path_display={!r}, path_lower={!r}, permissions={!r}, time_invited={!r})'.format( - self._id_value, - self._name_value, - self._policy_value, - self._preview_url_value, - self._access_type_value, - self._expected_link_metadata_value, - self._link_metadata_value, - self._owner_display_names_value, - self._owner_team_value, - self._parent_shared_folder_id_value, - self._path_display_value, - self._path_lower_value, - self._permissions_value, - self._time_invited_value, - ) - -SharedFileMetadata_validator = bv.Struct(SharedFileMetadata) - -class SharedFolderAccessError(bb.Union): - """ - There is an error accessing the shared folder. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar invalid_id: This shared folder ID is invalid. - :ivar not_a_member: The user is not a member of the shared folder thus - cannot access it. - :ivar email_unverified: The current user's e-mail address is unverified. - :ivar unmounted: The shared folder is unmounted. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - invalid_id = None - # Attribute is overwritten below the class definition - not_a_member = None - # Attribute is overwritten below the class definition - email_unverified = None - # Attribute is overwritten below the class definition - unmounted = None - # Attribute is overwritten below the class definition - other = None - - def is_invalid_id(self): - """ - Check if the union tag is ``invalid_id``. - - :rtype: bool - """ - return self._tag == 'invalid_id' - - def is_not_a_member(self): - """ - Check if the union tag is ``not_a_member``. - - :rtype: bool - """ - return self._tag == 'not_a_member' - - def is_email_unverified(self): - """ - Check if the union tag is ``email_unverified``. - - :rtype: bool - """ - return self._tag == 'email_unverified' - - def is_unmounted(self): - """ - Check if the union tag is ``unmounted``. - - :rtype: bool - """ - return self._tag == 'unmounted' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SharedFolderAccessError(%r, %r)' % (self._tag, self._value) - -SharedFolderAccessError_validator = bv.Union(SharedFolderAccessError) - -class SharedFolderMemberError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar invalid_dropbox_id: The target dropbox_id is invalid. - :ivar not_a_member: The target dropbox_id is not a member of the shared - folder. - :ivar MemberAccessLevelResult no_explicit_access: The target member only has - inherited access to the shared folder. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - invalid_dropbox_id = None - # Attribute is overwritten below the class definition - not_a_member = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def no_explicit_access(cls, val): - """ - Create an instance of this class set to the ``no_explicit_access`` tag - with value ``val``. - - :param MemberAccessLevelResult val: - :rtype: SharedFolderMemberError - """ - return cls('no_explicit_access', val) - - def is_invalid_dropbox_id(self): - """ - Check if the union tag is ``invalid_dropbox_id``. - - :rtype: bool - """ - return self._tag == 'invalid_dropbox_id' - - def is_not_a_member(self): - """ - Check if the union tag is ``not_a_member``. - - :rtype: bool - """ - return self._tag == 'not_a_member' - - def is_no_explicit_access(self): - """ - Check if the union tag is ``no_explicit_access``. - - :rtype: bool - """ - return self._tag == 'no_explicit_access' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_no_explicit_access(self): - """ - The target member only has inherited access to the shared folder. - - Only call this if :meth:`is_no_explicit_access` is true. - - :rtype: MemberAccessLevelResult - """ - if not self.is_no_explicit_access(): - raise AttributeError("tag 'no_explicit_access' not set") - return self._value - - def __repr__(self): - return 'SharedFolderMemberError(%r, %r)' % (self._tag, self._value) - -SharedFolderMemberError_validator = bv.Union(SharedFolderMemberError) - -class SharedFolderMembers(object): - """ - Shared folder user and group membership. - - :ivar users: The list of user members of the shared folder. - :ivar groups: The list of group members of the shared folder. - :ivar invitees: The list of invitees to the shared folder. - :ivar cursor: Present if there are additional shared folder members that - have not been returned yet. Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.sharing_list_folder_members_continue` to - list additional members. - """ - - __slots__ = [ - '_users_value', - '_users_present', - '_groups_value', - '_groups_present', - '_invitees_value', - '_invitees_present', - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - users=None, - groups=None, - invitees=None, - cursor=None): - self._users_value = None - self._users_present = False - self._groups_value = None - self._groups_present = False - self._invitees_value = None - self._invitees_present = False - self._cursor_value = None - self._cursor_present = False - if users is not None: - self.users = users - if groups is not None: - self.groups = groups - if invitees is not None: - self.invitees = invitees - if cursor is not None: - self.cursor = cursor - - @property - def users(self): - """ - The list of user members of the shared folder. - - :rtype: list of [UserMembershipInfo] - """ - if self._users_present: - return self._users_value - else: - raise AttributeError("missing required field 'users'") - - @users.setter - def users(self, val): - val = self._users_validator.validate(val) - self._users_value = val - self._users_present = True - - @users.deleter - def users(self): - self._users_value = None - self._users_present = False - - @property - def groups(self): - """ - The list of group members of the shared folder. - - :rtype: list of [GroupMembershipInfo] - """ - if self._groups_present: - return self._groups_value - else: - raise AttributeError("missing required field 'groups'") - - @groups.setter - def groups(self, val): - val = self._groups_validator.validate(val) - self._groups_value = val - self._groups_present = True - - @groups.deleter - def groups(self): - self._groups_value = None - self._groups_present = False - - @property - def invitees(self): - """ - The list of invitees to the shared folder. - - :rtype: list of [InviteeMembershipInfo] - """ - if self._invitees_present: - return self._invitees_value - else: - raise AttributeError("missing required field 'invitees'") - - @invitees.setter - def invitees(self, val): - val = self._invitees_validator.validate(val) - self._invitees_value = val - self._invitees_present = True - - @invitees.deleter - def invitees(self): - self._invitees_value = None - self._invitees_present = False - - @property - def cursor(self): - """ - Present if there are additional shared folder members that have not been - returned yet. Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.sharing_list_folder_members_continue` to - list additional members. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - return None - - @cursor.setter - def cursor(self, val): - if val is None: - del self.cursor - return - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'SharedFolderMembers(users={!r}, groups={!r}, invitees={!r}, cursor={!r})'.format( - self._users_value, - self._groups_value, - self._invitees_value, - self._cursor_value, - ) - -SharedFolderMembers_validator = bv.Struct(SharedFolderMembers) - -class SharedFolderMetadataBase(object): - """ - Properties of the shared folder. - - :ivar access_type: The current user's access level for this shared folder. - :ivar is_inside_team_folder: Whether this folder is inside of a team folder. - :ivar is_team_folder: Whether this folder is a `team folder - `_. - :ivar owner_display_names: The display names of the users that own the - folder. If the folder is part of a team folder, the display names of the - team admins are also included. Absent if the owner display names cannot - be fetched. - :ivar owner_team: The team that owns the folder. This field is not present - if the folder is not owned by a team. - :ivar parent_shared_folder_id: The ID of the parent shared folder. This - field is present only if the folder is contained within another shared - folder. - :ivar path_lower: The lower-cased full path of this shared folder. Absent - for unmounted folders. - """ - - __slots__ = [ - '_access_type_value', - '_access_type_present', - '_is_inside_team_folder_value', - '_is_inside_team_folder_present', - '_is_team_folder_value', - '_is_team_folder_present', - '_owner_display_names_value', - '_owner_display_names_present', - '_owner_team_value', - '_owner_team_present', - '_parent_shared_folder_id_value', - '_parent_shared_folder_id_present', - '_path_lower_value', - '_path_lower_present', - ] - - _has_required_fields = True - - def __init__(self, - access_type=None, - is_inside_team_folder=None, - is_team_folder=None, - owner_display_names=None, - owner_team=None, - parent_shared_folder_id=None, - path_lower=None): - self._access_type_value = None - self._access_type_present = False - self._is_inside_team_folder_value = None - self._is_inside_team_folder_present = False - self._is_team_folder_value = None - self._is_team_folder_present = False - self._owner_display_names_value = None - self._owner_display_names_present = False - self._owner_team_value = None - self._owner_team_present = False - self._parent_shared_folder_id_value = None - self._parent_shared_folder_id_present = False - self._path_lower_value = None - self._path_lower_present = False - if access_type is not None: - self.access_type = access_type - if is_inside_team_folder is not None: - self.is_inside_team_folder = is_inside_team_folder - if is_team_folder is not None: - self.is_team_folder = is_team_folder - if owner_display_names is not None: - self.owner_display_names = owner_display_names - if owner_team is not None: - self.owner_team = owner_team - if parent_shared_folder_id is not None: - self.parent_shared_folder_id = parent_shared_folder_id - if path_lower is not None: - self.path_lower = path_lower - - @property - def access_type(self): - """ - The current user's access level for this shared folder. - - :rtype: AccessLevel - """ - if self._access_type_present: - return self._access_type_value - else: - raise AttributeError("missing required field 'access_type'") - - @access_type.setter - def access_type(self, val): - self._access_type_validator.validate_type_only(val) - self._access_type_value = val - self._access_type_present = True - - @access_type.deleter - def access_type(self): - self._access_type_value = None - self._access_type_present = False - - @property - def is_inside_team_folder(self): - """ - Whether this folder is inside of a team folder. - - :rtype: bool - """ - if self._is_inside_team_folder_present: - return self._is_inside_team_folder_value - else: - raise AttributeError("missing required field 'is_inside_team_folder'") - - @is_inside_team_folder.setter - def is_inside_team_folder(self, val): - val = self._is_inside_team_folder_validator.validate(val) - self._is_inside_team_folder_value = val - self._is_inside_team_folder_present = True - - @is_inside_team_folder.deleter - def is_inside_team_folder(self): - self._is_inside_team_folder_value = None - self._is_inside_team_folder_present = False - - @property - def is_team_folder(self): - """ - Whether this folder is a `team folder - `_. - - :rtype: bool - """ - if self._is_team_folder_present: - return self._is_team_folder_value - else: - raise AttributeError("missing required field 'is_team_folder'") - - @is_team_folder.setter - def is_team_folder(self, val): - val = self._is_team_folder_validator.validate(val) - self._is_team_folder_value = val - self._is_team_folder_present = True - - @is_team_folder.deleter - def is_team_folder(self): - self._is_team_folder_value = None - self._is_team_folder_present = False - - @property - def owner_display_names(self): - """ - The display names of the users that own the folder. If the folder is - part of a team folder, the display names of the team admins are also - included. Absent if the owner display names cannot be fetched. - - :rtype: list of [str] - """ - if self._owner_display_names_present: - return self._owner_display_names_value - else: - return None - - @owner_display_names.setter - def owner_display_names(self, val): - if val is None: - del self.owner_display_names - return - val = self._owner_display_names_validator.validate(val) - self._owner_display_names_value = val - self._owner_display_names_present = True - - @owner_display_names.deleter - def owner_display_names(self): - self._owner_display_names_value = None - self._owner_display_names_present = False - - @property - def owner_team(self): - """ - The team that owns the folder. This field is not present if the folder - is not owned by a team. - - :rtype: users.Team_validator - """ - if self._owner_team_present: - return self._owner_team_value - else: - return None - - @owner_team.setter - def owner_team(self, val): - if val is None: - del self.owner_team - return - self._owner_team_validator.validate_type_only(val) - self._owner_team_value = val - self._owner_team_present = True - - @owner_team.deleter - def owner_team(self): - self._owner_team_value = None - self._owner_team_present = False - - @property - def parent_shared_folder_id(self): - """ - The ID of the parent shared folder. This field is present only if the - folder is contained within another shared folder. - - :rtype: str - """ - if self._parent_shared_folder_id_present: - return self._parent_shared_folder_id_value - else: - return None - - @parent_shared_folder_id.setter - def parent_shared_folder_id(self, val): - if val is None: - del self.parent_shared_folder_id - return - val = self._parent_shared_folder_id_validator.validate(val) - self._parent_shared_folder_id_value = val - self._parent_shared_folder_id_present = True - - @parent_shared_folder_id.deleter - def parent_shared_folder_id(self): - self._parent_shared_folder_id_value = None - self._parent_shared_folder_id_present = False - - @property - def path_lower(self): - """ - The lower-cased full path of this shared folder. Absent for unmounted - folders. - - :rtype: str - """ - if self._path_lower_present: - return self._path_lower_value - else: - return None - - @path_lower.setter - def path_lower(self, val): - if val is None: - del self.path_lower - return - val = self._path_lower_validator.validate(val) - self._path_lower_value = val - self._path_lower_present = True - - @path_lower.deleter - def path_lower(self): - self._path_lower_value = None - self._path_lower_present = False - - def __repr__(self): - return 'SharedFolderMetadataBase(access_type={!r}, is_inside_team_folder={!r}, is_team_folder={!r}, owner_display_names={!r}, owner_team={!r}, parent_shared_folder_id={!r}, path_lower={!r})'.format( - self._access_type_value, - self._is_inside_team_folder_value, - self._is_team_folder_value, - self._owner_display_names_value, - self._owner_team_value, - self._parent_shared_folder_id_value, - self._path_lower_value, - ) - -SharedFolderMetadataBase_validator = bv.Struct(SharedFolderMetadataBase) - -class SharedFolderMetadata(SharedFolderMetadataBase): - """ - The metadata which includes basic information about the shared folder. - - :ivar link_metadata: The metadata of the shared content link to this shared - folder. Absent if there is no link on the folder. This is for an - unreleased feature so it may not be returned yet. - :ivar name: The name of the this shared folder. - :ivar permissions: Actions the current user may perform on the folder and - its contents. The set of permissions corresponds to the FolderActions in - the request. - :ivar policy: Policies governing this shared folder. - :ivar preview_url: URL for displaying a web preview of the shared folder. - :ivar shared_folder_id: The ID of the shared folder. - :ivar time_invited: Timestamp indicating when the current user was invited - to this shared folder. - """ - - __slots__ = [ - '_link_metadata_value', - '_link_metadata_present', - '_name_value', - '_name_present', - '_permissions_value', - '_permissions_present', - '_policy_value', - '_policy_present', - '_preview_url_value', - '_preview_url_present', - '_shared_folder_id_value', - '_shared_folder_id_present', - '_time_invited_value', - '_time_invited_present', - ] - - _has_required_fields = True - - def __init__(self, - access_type=None, - is_inside_team_folder=None, - is_team_folder=None, - name=None, - policy=None, - preview_url=None, - shared_folder_id=None, - time_invited=None, - owner_display_names=None, - owner_team=None, - parent_shared_folder_id=None, - path_lower=None, - link_metadata=None, - permissions=None): - super(SharedFolderMetadata, self).__init__(access_type, - is_inside_team_folder, - is_team_folder, - owner_display_names, - owner_team, - parent_shared_folder_id, - path_lower) - self._link_metadata_value = None - self._link_metadata_present = False - self._name_value = None - self._name_present = False - self._permissions_value = None - self._permissions_present = False - self._policy_value = None - self._policy_present = False - self._preview_url_value = None - self._preview_url_present = False - self._shared_folder_id_value = None - self._shared_folder_id_present = False - self._time_invited_value = None - self._time_invited_present = False - if link_metadata is not None: - self.link_metadata = link_metadata - if name is not None: - self.name = name - if permissions is not None: - self.permissions = permissions - if policy is not None: - self.policy = policy - if preview_url is not None: - self.preview_url = preview_url - if shared_folder_id is not None: - self.shared_folder_id = shared_folder_id - if time_invited is not None: - self.time_invited = time_invited - - @property - def link_metadata(self): - """ - The metadata of the shared content link to this shared folder. Absent if - there is no link on the folder. This is for an unreleased feature so it - may not be returned yet. - - :rtype: SharedContentLinkMetadata - """ - if self._link_metadata_present: - return self._link_metadata_value - else: - return None - - @link_metadata.setter - def link_metadata(self, val): - if val is None: - del self.link_metadata - return - self._link_metadata_validator.validate_type_only(val) - self._link_metadata_value = val - self._link_metadata_present = True - - @link_metadata.deleter - def link_metadata(self): - self._link_metadata_value = None - self._link_metadata_present = False - - @property - def name(self): - """ - The name of the this shared folder. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") - - @name.setter - def name(self, val): - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - @property - def permissions(self): - """ - Actions the current user may perform on the folder and its contents. The - set of permissions corresponds to the FolderActions in the request. - - :rtype: list of [FolderPermission] - """ - if self._permissions_present: - return self._permissions_value - else: - return None - - @permissions.setter - def permissions(self, val): - if val is None: - del self.permissions - return - val = self._permissions_validator.validate(val) - self._permissions_value = val - self._permissions_present = True - - @permissions.deleter - def permissions(self): - self._permissions_value = None - self._permissions_present = False - - @property - def policy(self): - """ - Policies governing this shared folder. - - :rtype: FolderPolicy - """ - if self._policy_present: - return self._policy_value - else: - raise AttributeError("missing required field 'policy'") - - @policy.setter - def policy(self, val): - self._policy_validator.validate_type_only(val) - self._policy_value = val - self._policy_present = True - - @policy.deleter - def policy(self): - self._policy_value = None - self._policy_present = False - - @property - def preview_url(self): - """ - URL for displaying a web preview of the shared folder. - - :rtype: str - """ - if self._preview_url_present: - return self._preview_url_value - else: - raise AttributeError("missing required field 'preview_url'") - - @preview_url.setter - def preview_url(self, val): - val = self._preview_url_validator.validate(val) - self._preview_url_value = val - self._preview_url_present = True - - @preview_url.deleter - def preview_url(self): - self._preview_url_value = None - self._preview_url_present = False - - @property - def shared_folder_id(self): - """ - The ID of the shared folder. - - :rtype: str - """ - if self._shared_folder_id_present: - return self._shared_folder_id_value - else: - raise AttributeError("missing required field 'shared_folder_id'") - - @shared_folder_id.setter - def shared_folder_id(self, val): - val = self._shared_folder_id_validator.validate(val) - self._shared_folder_id_value = val - self._shared_folder_id_present = True - - @shared_folder_id.deleter - def shared_folder_id(self): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - - @property - def time_invited(self): - """ - Timestamp indicating when the current user was invited to this shared - folder. - - :rtype: datetime.datetime - """ - if self._time_invited_present: - return self._time_invited_value - else: - raise AttributeError("missing required field 'time_invited'") - - @time_invited.setter - def time_invited(self, val): - val = self._time_invited_validator.validate(val) - self._time_invited_value = val - self._time_invited_present = True - - @time_invited.deleter - def time_invited(self): - self._time_invited_value = None - self._time_invited_present = False - - def __repr__(self): - return 'SharedFolderMetadata(access_type={!r}, is_inside_team_folder={!r}, is_team_folder={!r}, name={!r}, policy={!r}, preview_url={!r}, shared_folder_id={!r}, time_invited={!r}, owner_display_names={!r}, owner_team={!r}, parent_shared_folder_id={!r}, path_lower={!r}, link_metadata={!r}, permissions={!r})'.format( - self._access_type_value, - self._is_inside_team_folder_value, - self._is_team_folder_value, - self._name_value, - self._policy_value, - self._preview_url_value, - self._shared_folder_id_value, - self._time_invited_value, - self._owner_display_names_value, - self._owner_team_value, - self._parent_shared_folder_id_value, - self._path_lower_value, - self._link_metadata_value, - self._permissions_value, - ) - -SharedFolderMetadata_validator = bv.Struct(SharedFolderMetadata) - -class SharedLinkAccessFailureReason(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar login_required: User is not logged in. - :ivar email_verify_required: User's email is not verified. - :ivar password_required: The link is password protected. - :ivar team_only: Access is allowed for team members only. - :ivar owner_only: Access is allowed for the shared link's owner only. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - login_required = None - # Attribute is overwritten below the class definition - email_verify_required = None - # Attribute is overwritten below the class definition - password_required = None - # Attribute is overwritten below the class definition - team_only = None - # Attribute is overwritten below the class definition - owner_only = None - # Attribute is overwritten below the class definition - other = None - - def is_login_required(self): - """ - Check if the union tag is ``login_required``. - - :rtype: bool - """ - return self._tag == 'login_required' - - def is_email_verify_required(self): - """ - Check if the union tag is ``email_verify_required``. - - :rtype: bool - """ - return self._tag == 'email_verify_required' - - def is_password_required(self): - """ - Check if the union tag is ``password_required``. - - :rtype: bool - """ - return self._tag == 'password_required' - - def is_team_only(self): - """ - Check if the union tag is ``team_only``. - - :rtype: bool - """ - return self._tag == 'team_only' - - def is_owner_only(self): - """ - Check if the union tag is ``owner_only``. - - :rtype: bool - """ - return self._tag == 'owner_only' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SharedLinkAccessFailureReason(%r, %r)' % (self._tag, self._value) - -SharedLinkAccessFailureReason_validator = bv.Union(SharedLinkAccessFailureReason) - -class SharedLinkPolicy(bb.Union): - """ - Who can view shared links in this folder. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar anyone: Links can be shared with anyone. - :ivar team: Links can be shared with anyone on the same team as the owner. - :ivar members: Links can only be shared among members of the shared folder. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - anyone = None - # Attribute is overwritten below the class definition - team = None - # Attribute is overwritten below the class definition - members = None - # Attribute is overwritten below the class definition - other = None - - def is_anyone(self): - """ - Check if the union tag is ``anyone``. - - :rtype: bool - """ - return self._tag == 'anyone' - - def is_team(self): - """ - Check if the union tag is ``team``. - - :rtype: bool - """ - return self._tag == 'team' - - def is_members(self): - """ - Check if the union tag is ``members``. - - :rtype: bool - """ - return self._tag == 'members' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SharedLinkPolicy(%r, %r)' % (self._tag, self._value) - -SharedLinkPolicy_validator = bv.Union(SharedLinkPolicy) - -class SharedLinkSettings(object): - """ - :ivar requested_visibility: The requested access for this shared link. - :ivar link_password: If ``requested_visibility`` is - ``RequestedVisibility.password`` this is needed to specify the password - to access the link. - :ivar expires: Expiration time of the shared link. By default the link won't - expire. - """ - - __slots__ = [ - '_requested_visibility_value', - '_requested_visibility_present', - '_link_password_value', - '_link_password_present', - '_expires_value', - '_expires_present', - ] - - _has_required_fields = False - - def __init__(self, - requested_visibility=None, - link_password=None, - expires=None): - self._requested_visibility_value = None - self._requested_visibility_present = False - self._link_password_value = None - self._link_password_present = False - self._expires_value = None - self._expires_present = False - if requested_visibility is not None: - self.requested_visibility = requested_visibility - if link_password is not None: - self.link_password = link_password - if expires is not None: - self.expires = expires - - @property - def requested_visibility(self): - """ - The requested access for this shared link. - - :rtype: RequestedVisibility - """ - if self._requested_visibility_present: - return self._requested_visibility_value - else: - return None - - @requested_visibility.setter - def requested_visibility(self, val): - if val is None: - del self.requested_visibility - return - self._requested_visibility_validator.validate_type_only(val) - self._requested_visibility_value = val - self._requested_visibility_present = True - - @requested_visibility.deleter - def requested_visibility(self): - self._requested_visibility_value = None - self._requested_visibility_present = False - - @property - def link_password(self): - """ - If ``requested_visibility`` is ``RequestedVisibility.password`` this is - needed to specify the password to access the link. - - :rtype: str - """ - if self._link_password_present: - return self._link_password_value - else: - return None - - @link_password.setter - def link_password(self, val): - if val is None: - del self.link_password - return - val = self._link_password_validator.validate(val) - self._link_password_value = val - self._link_password_present = True - - @link_password.deleter - def link_password(self): - self._link_password_value = None - self._link_password_present = False - - @property - def expires(self): - """ - Expiration time of the shared link. By default the link won't expire. - - :rtype: datetime.datetime - """ - if self._expires_present: - return self._expires_value - else: - return None - - @expires.setter - def expires(self, val): - if val is None: - del self.expires - return - val = self._expires_validator.validate(val) - self._expires_value = val - self._expires_present = True - - @expires.deleter - def expires(self): - self._expires_value = None - self._expires_present = False - - def __repr__(self): - return 'SharedLinkSettings(requested_visibility={!r}, link_password={!r}, expires={!r})'.format( - self._requested_visibility_value, - self._link_password_value, - self._expires_value, - ) - -SharedLinkSettings_validator = bv.Struct(SharedLinkSettings) - -class SharedLinkSettingsError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar invalid_settings: The given settings are invalid (for example, all - attributes of the :class:`SharedLinkSettings` are empty, the requested - visibility is ``RequestedVisibility.password`` but the - ``SharedLinkSettings.link_password`` is missing, - ``SharedLinkSettings.expires`` is set to the past, etc.). - :ivar not_authorized: User is not allowed to modify the settings of this - link. Note that basic users can only set ``RequestedVisibility.public`` - as the ``SharedLinkSettings.requested_visibility`` and cannot set - ``SharedLinkSettings.expires``. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - invalid_settings = None - # Attribute is overwritten below the class definition - not_authorized = None - - def is_invalid_settings(self): - """ - Check if the union tag is ``invalid_settings``. - - :rtype: bool - """ - return self._tag == 'invalid_settings' - - def is_not_authorized(self): - """ - Check if the union tag is ``not_authorized``. - - :rtype: bool - """ - return self._tag == 'not_authorized' - - def __repr__(self): - return 'SharedLinkSettingsError(%r, %r)' % (self._tag, self._value) - -SharedLinkSettingsError_validator = bv.Union(SharedLinkSettingsError) - -class SharingFileAccessError(bb.Union): - """ - User could not access this file. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar no_permission: Current user does not have sufficient privileges to - perform the desired action. - :ivar invalid_file: File specified was not found. - :ivar is_folder: A folder can't be shared this way. Use folder sharing or a - shared link instead. - :ivar inside_public_folder: A file inside a public folder can't be shared - this way. Use a public link instead. - :ivar inside_osx_package: A Mac OS X package can't be shared this way. Use a - shared link instead. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - no_permission = None - # Attribute is overwritten below the class definition - invalid_file = None - # Attribute is overwritten below the class definition - is_folder = None - # Attribute is overwritten below the class definition - inside_public_folder = None - # Attribute is overwritten below the class definition - inside_osx_package = None - # Attribute is overwritten below the class definition - other = None - - def is_no_permission(self): - """ - Check if the union tag is ``no_permission``. - - :rtype: bool - """ - return self._tag == 'no_permission' - - def is_invalid_file(self): - """ - Check if the union tag is ``invalid_file``. - - :rtype: bool - """ - return self._tag == 'invalid_file' - - def is_is_folder(self): - """ - Check if the union tag is ``is_folder``. - - :rtype: bool - """ - return self._tag == 'is_folder' - - def is_inside_public_folder(self): - """ - Check if the union tag is ``inside_public_folder``. - - :rtype: bool - """ - return self._tag == 'inside_public_folder' - - def is_inside_osx_package(self): - """ - Check if the union tag is ``inside_osx_package``. - - :rtype: bool - """ - return self._tag == 'inside_osx_package' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SharingFileAccessError(%r, %r)' % (self._tag, self._value) - -SharingFileAccessError_validator = bv.Union(SharingFileAccessError) - -class SharingUserError(bb.Union): - """ - User account had a problem preventing this action. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar email_unverified: The current user must verify the account e-mail - address before performing this action. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - email_unverified = None - # Attribute is overwritten below the class definition - other = None - - def is_email_unverified(self): - """ - Check if the union tag is ``email_unverified``. - - :rtype: bool - """ - return self._tag == 'email_unverified' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SharingUserError(%r, %r)' % (self._tag, self._value) - -SharingUserError_validator = bv.Union(SharingUserError) - -class TeamMemberInfo(object): - """ - Information about a team member. - - :ivar team_info: Information about the member's team. - :ivar display_name: The display name of the user. - :ivar member_id: ID of user as a member of a team. This field will only be - present if the member is in the same team as current user. - """ - - __slots__ = [ - '_team_info_value', - '_team_info_present', - '_display_name_value', - '_display_name_present', - '_member_id_value', - '_member_id_present', - ] - - _has_required_fields = True - - def __init__(self, - team_info=None, - display_name=None, - member_id=None): - self._team_info_value = None - self._team_info_present = False - self._display_name_value = None - self._display_name_present = False - self._member_id_value = None - self._member_id_present = False - if team_info is not None: - self.team_info = team_info - if display_name is not None: - self.display_name = display_name - if member_id is not None: - self.member_id = member_id - - @property - def team_info(self): - """ - Information about the member's team. - - :rtype: users.Team_validator - """ - if self._team_info_present: - return self._team_info_value - else: - raise AttributeError("missing required field 'team_info'") - - @team_info.setter - def team_info(self, val): - val = self._team_info_validator.validate(val) - self._team_info_value = val - self._team_info_present = True - - @team_info.deleter - def team_info(self): - self._team_info_value = None - self._team_info_present = False - - @property - def display_name(self): - """ - The display name of the user. - - :rtype: str - """ - if self._display_name_present: - return self._display_name_value - else: - raise AttributeError("missing required field 'display_name'") - - @display_name.setter - def display_name(self, val): - val = self._display_name_validator.validate(val) - self._display_name_value = val - self._display_name_present = True - - @display_name.deleter - def display_name(self): - self._display_name_value = None - self._display_name_present = False - - @property - def member_id(self): - """ - ID of user as a member of a team. This field will only be present if the - member is in the same team as current user. - - :rtype: str - """ - if self._member_id_present: - return self._member_id_value - else: - return None - - @member_id.setter - def member_id(self, val): - if val is None: - del self.member_id - return - val = self._member_id_validator.validate(val) - self._member_id_value = val - self._member_id_present = True - - @member_id.deleter - def member_id(self): - self._member_id_value = None - self._member_id_present = False - - def __repr__(self): - return 'TeamMemberInfo(team_info={!r}, display_name={!r}, member_id={!r})'.format( - self._team_info_value, - self._display_name_value, - self._member_id_value, - ) - -TeamMemberInfo_validator = bv.Struct(TeamMemberInfo) - -class TransferFolderArg(object): - """ - :ivar shared_folder_id: The ID for the shared folder. - :ivar to_dropbox_id: A account or team member ID to transfer ownership to. - """ - - __slots__ = [ - '_shared_folder_id_value', - '_shared_folder_id_present', - '_to_dropbox_id_value', - '_to_dropbox_id_present', - ] - - _has_required_fields = True - - def __init__(self, - shared_folder_id=None, - to_dropbox_id=None): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - self._to_dropbox_id_value = None - self._to_dropbox_id_present = False - if shared_folder_id is not None: - self.shared_folder_id = shared_folder_id - if to_dropbox_id is not None: - self.to_dropbox_id = to_dropbox_id - - @property - def shared_folder_id(self): - """ - The ID for the shared folder. - - :rtype: str - """ - if self._shared_folder_id_present: - return self._shared_folder_id_value - else: - raise AttributeError("missing required field 'shared_folder_id'") - - @shared_folder_id.setter - def shared_folder_id(self, val): - val = self._shared_folder_id_validator.validate(val) - self._shared_folder_id_value = val - self._shared_folder_id_present = True - - @shared_folder_id.deleter - def shared_folder_id(self): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - - @property - def to_dropbox_id(self): - """ - A account or team member ID to transfer ownership to. - - :rtype: str - """ - if self._to_dropbox_id_present: - return self._to_dropbox_id_value - else: - raise AttributeError("missing required field 'to_dropbox_id'") - - @to_dropbox_id.setter - def to_dropbox_id(self, val): - val = self._to_dropbox_id_validator.validate(val) - self._to_dropbox_id_value = val - self._to_dropbox_id_present = True - - @to_dropbox_id.deleter - def to_dropbox_id(self): - self._to_dropbox_id_value = None - self._to_dropbox_id_present = False - - def __repr__(self): - return 'TransferFolderArg(shared_folder_id={!r}, to_dropbox_id={!r})'.format( - self._shared_folder_id_value, - self._to_dropbox_id_value, - ) - -TransferFolderArg_validator = bv.Struct(TransferFolderArg) - -class TransferFolderError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar invalid_dropbox_id: ``TransferFolderArg.to_dropbox_id`` is invalid. - :ivar new_owner_not_a_member: The new designated owner is not currently a - member of the shared folder. - :ivar new_owner_unmounted: The new designated owner has not added the folder - to their Dropbox. - :ivar new_owner_email_unverified: The new designated owner's e-mail address - is unverified. - :ivar team_folder: This action cannot be performed on a team shared folder. - :ivar no_permission: The current user does not have permission to perform - this action. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - invalid_dropbox_id = None - # Attribute is overwritten below the class definition - new_owner_not_a_member = None - # Attribute is overwritten below the class definition - new_owner_unmounted = None - # Attribute is overwritten below the class definition - new_owner_email_unverified = None - # Attribute is overwritten below the class definition - team_folder = None - # Attribute is overwritten below the class definition - no_permission = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def access_error(cls, val): - """ - Create an instance of this class set to the ``access_error`` tag with - value ``val``. - - :param SharedFolderAccessError val: - :rtype: TransferFolderError - """ - return cls('access_error', val) - - def is_access_error(self): - """ - Check if the union tag is ``access_error``. - - :rtype: bool - """ - return self._tag == 'access_error' - - def is_invalid_dropbox_id(self): - """ - Check if the union tag is ``invalid_dropbox_id``. - - :rtype: bool - """ - return self._tag == 'invalid_dropbox_id' - - def is_new_owner_not_a_member(self): - """ - Check if the union tag is ``new_owner_not_a_member``. - - :rtype: bool - """ - return self._tag == 'new_owner_not_a_member' - - def is_new_owner_unmounted(self): - """ - Check if the union tag is ``new_owner_unmounted``. - - :rtype: bool - """ - return self._tag == 'new_owner_unmounted' - - def is_new_owner_email_unverified(self): - """ - Check if the union tag is ``new_owner_email_unverified``. - - :rtype: bool - """ - return self._tag == 'new_owner_email_unverified' - - def is_team_folder(self): - """ - Check if the union tag is ``team_folder``. - - :rtype: bool - """ - return self._tag == 'team_folder' - - def is_no_permission(self): - """ - Check if the union tag is ``no_permission``. - - :rtype: bool - """ - return self._tag == 'no_permission' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_access_error(self): - """ - Only call this if :meth:`is_access_error` is true. - - :rtype: SharedFolderAccessError - """ - if not self.is_access_error(): - raise AttributeError("tag 'access_error' not set") - return self._value - - def __repr__(self): - return 'TransferFolderError(%r, %r)' % (self._tag, self._value) - -TransferFolderError_validator = bv.Union(TransferFolderError) - -class UnmountFolderArg(object): - """ - :ivar shared_folder_id: The ID for the shared folder. - """ - - __slots__ = [ - '_shared_folder_id_value', - '_shared_folder_id_present', - ] - - _has_required_fields = True - - def __init__(self, - shared_folder_id=None): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - if shared_folder_id is not None: - self.shared_folder_id = shared_folder_id - - @property - def shared_folder_id(self): - """ - The ID for the shared folder. - - :rtype: str - """ - if self._shared_folder_id_present: - return self._shared_folder_id_value - else: - raise AttributeError("missing required field 'shared_folder_id'") - - @shared_folder_id.setter - def shared_folder_id(self, val): - val = self._shared_folder_id_validator.validate(val) - self._shared_folder_id_value = val - self._shared_folder_id_present = True - - @shared_folder_id.deleter - def shared_folder_id(self): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - - def __repr__(self): - return 'UnmountFolderArg(shared_folder_id={!r})'.format( - self._shared_folder_id_value, - ) - -UnmountFolderArg_validator = bv.Struct(UnmountFolderArg) - -class UnmountFolderError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar no_permission: The current user does not have permission to perform - this action. - :ivar not_unmountable: The shared folder can't be unmounted. One example - where this can occur is when the shared folder's parent folder is also a - shared folder that resides in the current user's Dropbox. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - no_permission = None - # Attribute is overwritten below the class definition - not_unmountable = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def access_error(cls, val): - """ - Create an instance of this class set to the ``access_error`` tag with - value ``val``. - - :param SharedFolderAccessError val: - :rtype: UnmountFolderError - """ - return cls('access_error', val) - - def is_access_error(self): - """ - Check if the union tag is ``access_error``. - - :rtype: bool - """ - return self._tag == 'access_error' - - def is_no_permission(self): - """ - Check if the union tag is ``no_permission``. - - :rtype: bool - """ - return self._tag == 'no_permission' - - def is_not_unmountable(self): - """ - Check if the union tag is ``not_unmountable``. - - :rtype: bool - """ - return self._tag == 'not_unmountable' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_access_error(self): - """ - Only call this if :meth:`is_access_error` is true. - - :rtype: SharedFolderAccessError - """ - if not self.is_access_error(): - raise AttributeError("tag 'access_error' not set") - return self._value - - def __repr__(self): - return 'UnmountFolderError(%r, %r)' % (self._tag, self._value) - -UnmountFolderError_validator = bv.Union(UnmountFolderError) - -class UnshareFileArg(object): - """ - Arguments for :meth:`dropbox.dropbox.Dropbox.sharing_unshare_file`. - - :ivar file: The file to unshare. - """ - - __slots__ = [ - '_file_value', - '_file_present', - ] - - _has_required_fields = True - - def __init__(self, - file=None): - self._file_value = None - self._file_present = False - if file is not None: - self.file = file - - @property - def file(self): - """ - The file to unshare. - - :rtype: str - """ - if self._file_present: - return self._file_value - else: - raise AttributeError("missing required field 'file'") - - @file.setter - def file(self, val): - val = self._file_validator.validate(val) - self._file_value = val - self._file_present = True - - @file.deleter - def file(self): - self._file_value = None - self._file_present = False - - def __repr__(self): - return 'UnshareFileArg(file={!r})'.format( - self._file_value, - ) - -UnshareFileArg_validator = bv.Struct(UnshareFileArg) - -class UnshareFileError(bb.Union): - """ - Error result for :meth:`dropbox.dropbox.Dropbox.sharing_unshare_file`. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def user_error(cls, val): - """ - Create an instance of this class set to the ``user_error`` tag with - value ``val``. - - :param SharingUserError val: - :rtype: UnshareFileError - """ - return cls('user_error', val) - - @classmethod - def access_error(cls, val): - """ - Create an instance of this class set to the ``access_error`` tag with - value ``val``. - - :param SharingFileAccessError val: - :rtype: UnshareFileError - """ - return cls('access_error', val) - - def is_user_error(self): - """ - Check if the union tag is ``user_error``. - - :rtype: bool - """ - return self._tag == 'user_error' - - def is_access_error(self): - """ - Check if the union tag is ``access_error``. - - :rtype: bool - """ - return self._tag == 'access_error' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_user_error(self): - """ - Only call this if :meth:`is_user_error` is true. - - :rtype: SharingUserError - """ - if not self.is_user_error(): - raise AttributeError("tag 'user_error' not set") - return self._value - - def get_access_error(self): - """ - Only call this if :meth:`is_access_error` is true. - - :rtype: SharingFileAccessError - """ - if not self.is_access_error(): - raise AttributeError("tag 'access_error' not set") - return self._value - - def __repr__(self): - return 'UnshareFileError(%r, %r)' % (self._tag, self._value) - -UnshareFileError_validator = bv.Union(UnshareFileError) - -class UnshareFolderArg(object): - """ - :ivar shared_folder_id: The ID for the shared folder. - :ivar leave_a_copy: If true, members of this shared folder will get a copy - of this folder after it's unshared. Otherwise, it will be removed from - their Dropbox. The current user, who is an owner, will always retain - their copy. - """ - - __slots__ = [ - '_shared_folder_id_value', - '_shared_folder_id_present', - '_leave_a_copy_value', - '_leave_a_copy_present', - ] - - _has_required_fields = True - - def __init__(self, - shared_folder_id=None, - leave_a_copy=None): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - self._leave_a_copy_value = None - self._leave_a_copy_present = False - if shared_folder_id is not None: - self.shared_folder_id = shared_folder_id - if leave_a_copy is not None: - self.leave_a_copy = leave_a_copy - - @property - def shared_folder_id(self): - """ - The ID for the shared folder. - - :rtype: str - """ - if self._shared_folder_id_present: - return self._shared_folder_id_value - else: - raise AttributeError("missing required field 'shared_folder_id'") - - @shared_folder_id.setter - def shared_folder_id(self, val): - val = self._shared_folder_id_validator.validate(val) - self._shared_folder_id_value = val - self._shared_folder_id_present = True - - @shared_folder_id.deleter - def shared_folder_id(self): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - - @property - def leave_a_copy(self): - """ - If true, members of this shared folder will get a copy of this folder - after it's unshared. Otherwise, it will be removed from their Dropbox. - The current user, who is an owner, will always retain their copy. - - :rtype: bool - """ - if self._leave_a_copy_present: - return self._leave_a_copy_value - else: - return False - - @leave_a_copy.setter - def leave_a_copy(self, val): - val = self._leave_a_copy_validator.validate(val) - self._leave_a_copy_value = val - self._leave_a_copy_present = True - - @leave_a_copy.deleter - def leave_a_copy(self): - self._leave_a_copy_value = None - self._leave_a_copy_present = False - - def __repr__(self): - return 'UnshareFolderArg(shared_folder_id={!r}, leave_a_copy={!r})'.format( - self._shared_folder_id_value, - self._leave_a_copy_value, - ) - -UnshareFolderArg_validator = bv.Struct(UnshareFolderArg) - -class UnshareFolderError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar team_folder: This action cannot be performed on a team shared folder. - :ivar no_permission: The current user does not have permission to perform - this action. - :ivar too_many_files: This shared folder has too many files to be unshared. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - team_folder = None - # Attribute is overwritten below the class definition - no_permission = None - # Attribute is overwritten below the class definition - too_many_files = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def access_error(cls, val): - """ - Create an instance of this class set to the ``access_error`` tag with - value ``val``. - - :param SharedFolderAccessError val: - :rtype: UnshareFolderError - """ - return cls('access_error', val) - - def is_access_error(self): - """ - Check if the union tag is ``access_error``. - - :rtype: bool - """ - return self._tag == 'access_error' - - def is_team_folder(self): - """ - Check if the union tag is ``team_folder``. - - :rtype: bool - """ - return self._tag == 'team_folder' - - def is_no_permission(self): - """ - Check if the union tag is ``no_permission``. - - :rtype: bool - """ - return self._tag == 'no_permission' - - def is_too_many_files(self): - """ - Check if the union tag is ``too_many_files``. - - :rtype: bool - """ - return self._tag == 'too_many_files' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_access_error(self): - """ - Only call this if :meth:`is_access_error` is true. - - :rtype: SharedFolderAccessError - """ - if not self.is_access_error(): - raise AttributeError("tag 'access_error' not set") - return self._value - - def __repr__(self): - return 'UnshareFolderError(%r, %r)' % (self._tag, self._value) - -UnshareFolderError_validator = bv.Union(UnshareFolderError) - -class UpdateFileMemberArgs(ChangeFileMemberAccessArgs): - """ - Arguments for :meth:`dropbox.dropbox.Dropbox.sharing_update_file_member`. - """ - - __slots__ = [ - ] - - _has_required_fields = True - - def __init__(self, - file=None, - member=None, - access_level=None): - super(UpdateFileMemberArgs, self).__init__(file, - member, - access_level) - - def __repr__(self): - return 'UpdateFileMemberArgs(file={!r}, member={!r}, access_level={!r})'.format( - self._file_value, - self._member_value, - self._access_level_value, - ) - -UpdateFileMemberArgs_validator = bv.Struct(UpdateFileMemberArgs) - -class UpdateFolderMemberArg(object): - """ - :ivar shared_folder_id: The ID for the shared folder. - :ivar member: The member of the shared folder to update. Only the - ``MemberSelector.dropbox_id`` may be set at this time. - :ivar access_level: The new access level for ``member``. - ``AccessLevel.owner`` is disallowed. - """ - - __slots__ = [ - '_shared_folder_id_value', - '_shared_folder_id_present', - '_member_value', - '_member_present', - '_access_level_value', - '_access_level_present', - ] - - _has_required_fields = True - - def __init__(self, - shared_folder_id=None, - member=None, - access_level=None): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - self._member_value = None - self._member_present = False - self._access_level_value = None - self._access_level_present = False - if shared_folder_id is not None: - self.shared_folder_id = shared_folder_id - if member is not None: - self.member = member - if access_level is not None: - self.access_level = access_level - - @property - def shared_folder_id(self): - """ - The ID for the shared folder. - - :rtype: str - """ - if self._shared_folder_id_present: - return self._shared_folder_id_value - else: - raise AttributeError("missing required field 'shared_folder_id'") - - @shared_folder_id.setter - def shared_folder_id(self, val): - val = self._shared_folder_id_validator.validate(val) - self._shared_folder_id_value = val - self._shared_folder_id_present = True - - @shared_folder_id.deleter - def shared_folder_id(self): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - - @property - def member(self): - """ - The member of the shared folder to update. Only the - ``MemberSelector.dropbox_id`` may be set at this time. - - :rtype: MemberSelector - """ - if self._member_present: - return self._member_value - else: - raise AttributeError("missing required field 'member'") - - @member.setter - def member(self, val): - self._member_validator.validate_type_only(val) - self._member_value = val - self._member_present = True - - @member.deleter - def member(self): - self._member_value = None - self._member_present = False - - @property - def access_level(self): - """ - The new access level for ``member``. ``AccessLevel.owner`` is - disallowed. - - :rtype: AccessLevel - """ - if self._access_level_present: - return self._access_level_value - else: - raise AttributeError("missing required field 'access_level'") - - @access_level.setter - def access_level(self, val): - self._access_level_validator.validate_type_only(val) - self._access_level_value = val - self._access_level_present = True - - @access_level.deleter - def access_level(self): - self._access_level_value = None - self._access_level_present = False - - def __repr__(self): - return 'UpdateFolderMemberArg(shared_folder_id={!r}, member={!r}, access_level={!r})'.format( - self._shared_folder_id_value, - self._member_value, - self._access_level_value, - ) - -UpdateFolderMemberArg_validator = bv.Struct(UpdateFolderMemberArg) - -class UpdateFolderMemberError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar AddFolderMemberError no_explicit_access: If updating the access type - required the member to be added to the shared folder and there was an - error when adding the member. - :ivar insufficient_plan: The current user's account doesn't support this - action. An example of this is when downgrading a member from editor to - viewer. This action can only be performed by users that have upgraded to - a Pro or Business plan. - :ivar no_permission: The current user does not have permission to perform - this action. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - insufficient_plan = None - # Attribute is overwritten below the class definition - no_permission = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def access_error(cls, val): - """ - Create an instance of this class set to the ``access_error`` tag with - value ``val``. - - :param SharedFolderAccessError val: - :rtype: UpdateFolderMemberError - """ - return cls('access_error', val) - - @classmethod - def member_error(cls, val): - """ - Create an instance of this class set to the ``member_error`` tag with - value ``val``. - - :param SharedFolderMemberError val: - :rtype: UpdateFolderMemberError - """ - return cls('member_error', val) - - @classmethod - def no_explicit_access(cls, val): - """ - Create an instance of this class set to the ``no_explicit_access`` tag - with value ``val``. - - :param AddFolderMemberError val: - :rtype: UpdateFolderMemberError - """ - return cls('no_explicit_access', val) - - def is_access_error(self): - """ - Check if the union tag is ``access_error``. - - :rtype: bool - """ - return self._tag == 'access_error' - - def is_member_error(self): - """ - Check if the union tag is ``member_error``. - - :rtype: bool - """ - return self._tag == 'member_error' - - def is_no_explicit_access(self): - """ - Check if the union tag is ``no_explicit_access``. - - :rtype: bool - """ - return self._tag == 'no_explicit_access' - - def is_insufficient_plan(self): - """ - Check if the union tag is ``insufficient_plan``. - - :rtype: bool - """ - return self._tag == 'insufficient_plan' - - def is_no_permission(self): - """ - Check if the union tag is ``no_permission``. - - :rtype: bool - """ - return self._tag == 'no_permission' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_access_error(self): - """ - Only call this if :meth:`is_access_error` is true. - - :rtype: SharedFolderAccessError - """ - if not self.is_access_error(): - raise AttributeError("tag 'access_error' not set") - return self._value - - def get_member_error(self): - """ - Only call this if :meth:`is_member_error` is true. - - :rtype: SharedFolderMemberError - """ - if not self.is_member_error(): - raise AttributeError("tag 'member_error' not set") - return self._value - - def get_no_explicit_access(self): - """ - If updating the access type required the member to be added to the - shared folder and there was an error when adding the member. - - Only call this if :meth:`is_no_explicit_access` is true. - - :rtype: AddFolderMemberError - """ - if not self.is_no_explicit_access(): - raise AttributeError("tag 'no_explicit_access' not set") - return self._value - - def __repr__(self): - return 'UpdateFolderMemberError(%r, %r)' % (self._tag, self._value) - -UpdateFolderMemberError_validator = bv.Union(UpdateFolderMemberError) - -class UpdateFolderPolicyArg(object): - """ - If any of the policies are unset, then they retain their current setting. - - :ivar shared_folder_id: The ID for the shared folder. - :ivar member_policy: Who can be a member of this shared folder. Only - applicable if the current user is on a team. - :ivar acl_update_policy: Who can add and remove members of this shared - folder. - :ivar viewer_info_policy: Who can enable/disable viewer info for this shared - folder. - :ivar shared_link_policy: The policy to apply to shared links created for - content inside this shared folder. The current user must be on a team to - set this policy to ``SharedLinkPolicy.members``. - :ivar link_settings: Settings on the link for this folder. - :ivar actions: A list of `FolderAction`s corresponding to - `FolderPermission`s that should appear in the response's - ``SharedFolderMetadata.permissions`` field describing the actions the - authenticated user can perform on the folder. - """ - - __slots__ = [ - '_shared_folder_id_value', - '_shared_folder_id_present', - '_member_policy_value', - '_member_policy_present', - '_acl_update_policy_value', - '_acl_update_policy_present', - '_viewer_info_policy_value', - '_viewer_info_policy_present', - '_shared_link_policy_value', - '_shared_link_policy_present', - '_link_settings_value', - '_link_settings_present', - '_actions_value', - '_actions_present', - ] - - _has_required_fields = True - - def __init__(self, - shared_folder_id=None, - member_policy=None, - acl_update_policy=None, - viewer_info_policy=None, - shared_link_policy=None, - link_settings=None, - actions=None): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - self._member_policy_value = None - self._member_policy_present = False - self._acl_update_policy_value = None - self._acl_update_policy_present = False - self._viewer_info_policy_value = None - self._viewer_info_policy_present = False - self._shared_link_policy_value = None - self._shared_link_policy_present = False - self._link_settings_value = None - self._link_settings_present = False - self._actions_value = None - self._actions_present = False - if shared_folder_id is not None: - self.shared_folder_id = shared_folder_id - if member_policy is not None: - self.member_policy = member_policy - if acl_update_policy is not None: - self.acl_update_policy = acl_update_policy - if viewer_info_policy is not None: - self.viewer_info_policy = viewer_info_policy - if shared_link_policy is not None: - self.shared_link_policy = shared_link_policy - if link_settings is not None: - self.link_settings = link_settings - if actions is not None: - self.actions = actions - - @property - def shared_folder_id(self): - """ - The ID for the shared folder. - - :rtype: str - """ - if self._shared_folder_id_present: - return self._shared_folder_id_value - else: - raise AttributeError("missing required field 'shared_folder_id'") - - @shared_folder_id.setter - def shared_folder_id(self, val): - val = self._shared_folder_id_validator.validate(val) - self._shared_folder_id_value = val - self._shared_folder_id_present = True - - @shared_folder_id.deleter - def shared_folder_id(self): - self._shared_folder_id_value = None - self._shared_folder_id_present = False - - @property - def member_policy(self): - """ - Who can be a member of this shared folder. Only applicable if the - current user is on a team. - - :rtype: MemberPolicy - """ - if self._member_policy_present: - return self._member_policy_value - else: - return None - - @member_policy.setter - def member_policy(self, val): - if val is None: - del self.member_policy - return - self._member_policy_validator.validate_type_only(val) - self._member_policy_value = val - self._member_policy_present = True - - @member_policy.deleter - def member_policy(self): - self._member_policy_value = None - self._member_policy_present = False - - @property - def acl_update_policy(self): - """ - Who can add and remove members of this shared folder. - - :rtype: AclUpdatePolicy - """ - if self._acl_update_policy_present: - return self._acl_update_policy_value - else: - return None - - @acl_update_policy.setter - def acl_update_policy(self, val): - if val is None: - del self.acl_update_policy - return - self._acl_update_policy_validator.validate_type_only(val) - self._acl_update_policy_value = val - self._acl_update_policy_present = True - - @acl_update_policy.deleter - def acl_update_policy(self): - self._acl_update_policy_value = None - self._acl_update_policy_present = False - - @property - def viewer_info_policy(self): - """ - Who can enable/disable viewer info for this shared folder. - - :rtype: ViewerInfoPolicy - """ - if self._viewer_info_policy_present: - return self._viewer_info_policy_value - else: - return None - - @viewer_info_policy.setter - def viewer_info_policy(self, val): - if val is None: - del self.viewer_info_policy - return - self._viewer_info_policy_validator.validate_type_only(val) - self._viewer_info_policy_value = val - self._viewer_info_policy_present = True - - @viewer_info_policy.deleter - def viewer_info_policy(self): - self._viewer_info_policy_value = None - self._viewer_info_policy_present = False - - @property - def shared_link_policy(self): - """ - The policy to apply to shared links created for content inside this - shared folder. The current user must be on a team to set this policy to - ``SharedLinkPolicy.members``. - - :rtype: SharedLinkPolicy - """ - if self._shared_link_policy_present: - return self._shared_link_policy_value - else: - return None - - @shared_link_policy.setter - def shared_link_policy(self, val): - if val is None: - del self.shared_link_policy - return - self._shared_link_policy_validator.validate_type_only(val) - self._shared_link_policy_value = val - self._shared_link_policy_present = True - - @shared_link_policy.deleter - def shared_link_policy(self): - self._shared_link_policy_value = None - self._shared_link_policy_present = False - - @property - def link_settings(self): - """ - Settings on the link for this folder. - - :rtype: LinkSettings - """ - if self._link_settings_present: - return self._link_settings_value - else: - return None - - @link_settings.setter - def link_settings(self, val): - if val is None: - del self.link_settings - return - self._link_settings_validator.validate_type_only(val) - self._link_settings_value = val - self._link_settings_present = True - - @link_settings.deleter - def link_settings(self): - self._link_settings_value = None - self._link_settings_present = False - - @property - def actions(self): - """ - A list of `FolderAction`s corresponding to `FolderPermission`s that - should appear in the response's ``SharedFolderMetadata.permissions`` - field describing the actions the authenticated user can perform on the - folder. - - :rtype: list of [FolderAction] - """ - if self._actions_present: - return self._actions_value - else: - return None - - @actions.setter - def actions(self, val): - if val is None: - del self.actions - return - val = self._actions_validator.validate(val) - self._actions_value = val - self._actions_present = True - - @actions.deleter - def actions(self): - self._actions_value = None - self._actions_present = False - - def __repr__(self): - return 'UpdateFolderPolicyArg(shared_folder_id={!r}, member_policy={!r}, acl_update_policy={!r}, viewer_info_policy={!r}, shared_link_policy={!r}, link_settings={!r}, actions={!r})'.format( - self._shared_folder_id_value, - self._member_policy_value, - self._acl_update_policy_value, - self._viewer_info_policy_value, - self._shared_link_policy_value, - self._link_settings_value, - self._actions_value, - ) - -UpdateFolderPolicyArg_validator = bv.Struct(UpdateFolderPolicyArg) - -class UpdateFolderPolicyError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar not_on_team: ``UpdateFolderPolicyArg.member_policy`` was set even - though user is not on a team. - :ivar team_policy_disallows_member_policy: Team policy is more restrictive - than ``ShareFolderArg.member_policy``. - :ivar disallowed_shared_link_policy: The current account is not allowed to - select the specified ``ShareFolderArg.shared_link_policy``. - :ivar no_permission: The current user does not have permission to perform - this action. - :ivar team_folder: This action cannot be performed on a team shared folder. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - not_on_team = None - # Attribute is overwritten below the class definition - team_policy_disallows_member_policy = None - # Attribute is overwritten below the class definition - disallowed_shared_link_policy = None - # Attribute is overwritten below the class definition - no_permission = None - # Attribute is overwritten below the class definition - team_folder = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def access_error(cls, val): - """ - Create an instance of this class set to the ``access_error`` tag with - value ``val``. - - :param SharedFolderAccessError val: - :rtype: UpdateFolderPolicyError - """ - return cls('access_error', val) - - def is_access_error(self): - """ - Check if the union tag is ``access_error``. - - :rtype: bool - """ - return self._tag == 'access_error' - - def is_not_on_team(self): - """ - Check if the union tag is ``not_on_team``. - - :rtype: bool - """ - return self._tag == 'not_on_team' - - def is_team_policy_disallows_member_policy(self): - """ - Check if the union tag is ``team_policy_disallows_member_policy``. - - :rtype: bool - """ - return self._tag == 'team_policy_disallows_member_policy' - - def is_disallowed_shared_link_policy(self): - """ - Check if the union tag is ``disallowed_shared_link_policy``. - - :rtype: bool - """ - return self._tag == 'disallowed_shared_link_policy' - - def is_no_permission(self): - """ - Check if the union tag is ``no_permission``. - - :rtype: bool - """ - return self._tag == 'no_permission' - - def is_team_folder(self): - """ - Check if the union tag is ``team_folder``. - - :rtype: bool - """ - return self._tag == 'team_folder' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_access_error(self): - """ - Only call this if :meth:`is_access_error` is true. - - :rtype: SharedFolderAccessError - """ - if not self.is_access_error(): - raise AttributeError("tag 'access_error' not set") - return self._value - - def __repr__(self): - return 'UpdateFolderPolicyError(%r, %r)' % (self._tag, self._value) - -UpdateFolderPolicyError_validator = bv.Union(UpdateFolderPolicyError) - -class UserMembershipInfo(MembershipInfo): - """ - The information about a user member of the shared content. - - :ivar user: The account information for the membership user. - """ - - __slots__ = [ - '_user_value', - '_user_present', - ] - - _has_required_fields = True - - def __init__(self, - access_type=None, - user=None, - permissions=None, - initials=None, - is_inherited=None): - super(UserMembershipInfo, self).__init__(access_type, - permissions, - initials, - is_inherited) - self._user_value = None - self._user_present = False - if user is not None: - self.user = user - - @property - def user(self): - """ - The account information for the membership user. - - :rtype: UserInfo - """ - if self._user_present: - return self._user_value - else: - raise AttributeError("missing required field 'user'") - - @user.setter - def user(self, val): - self._user_validator.validate_type_only(val) - self._user_value = val - self._user_present = True - - @user.deleter - def user(self): - self._user_value = None - self._user_present = False - - def __repr__(self): - return 'UserMembershipInfo(access_type={!r}, user={!r}, permissions={!r}, initials={!r}, is_inherited={!r})'.format( - self._access_type_value, - self._user_value, - self._permissions_value, - self._initials_value, - self._is_inherited_value, - ) - -UserMembershipInfo_validator = bv.Struct(UserMembershipInfo) - -class UserFileMembershipInfo(UserMembershipInfo): - """ - The information about a user member of the shared content with an appended - last seen timestamp. - - :ivar time_last_seen: The UTC timestamp of when the user has last seen the - content, if they have. - """ - - __slots__ = [ - '_time_last_seen_value', - '_time_last_seen_present', - ] - - _has_required_fields = True - - def __init__(self, - access_type=None, - user=None, - permissions=None, - initials=None, - is_inherited=None, - time_last_seen=None): - super(UserFileMembershipInfo, self).__init__(access_type, - user, - permissions, - initials, - is_inherited) - self._time_last_seen_value = None - self._time_last_seen_present = False - if time_last_seen is not None: - self.time_last_seen = time_last_seen - - @property - def time_last_seen(self): - """ - The UTC timestamp of when the user has last seen the content, if they - have. - - :rtype: datetime.datetime - """ - if self._time_last_seen_present: - return self._time_last_seen_value - else: - return None - - @time_last_seen.setter - def time_last_seen(self, val): - if val is None: - del self.time_last_seen - return - val = self._time_last_seen_validator.validate(val) - self._time_last_seen_value = val - self._time_last_seen_present = True - - @time_last_seen.deleter - def time_last_seen(self): - self._time_last_seen_value = None - self._time_last_seen_present = False - - def __repr__(self): - return 'UserFileMembershipInfo(access_type={!r}, user={!r}, permissions={!r}, initials={!r}, is_inherited={!r}, time_last_seen={!r})'.format( - self._access_type_value, - self._user_value, - self._permissions_value, - self._initials_value, - self._is_inherited_value, - self._time_last_seen_value, - ) - -UserFileMembershipInfo_validator = bv.Struct(UserFileMembershipInfo) - -class UserInfo(object): - """ - Basic information about a user. Use - :meth:`dropbox.dropbox.Dropbox.sharing_users_account` and - :meth:`dropbox.dropbox.Dropbox.sharing_users_account_batch` to obtain more - detailed information. - - :ivar account_id: The account ID of the user. - :ivar same_team: If the user is in the same team as current user. - :ivar team_member_id: The team member ID of the shared folder member. Only - present if ``same_team`` is true. - """ - - __slots__ = [ - '_account_id_value', - '_account_id_present', - '_same_team_value', - '_same_team_present', - '_team_member_id_value', - '_team_member_id_present', - ] - - _has_required_fields = True - - def __init__(self, - account_id=None, - same_team=None, - team_member_id=None): - self._account_id_value = None - self._account_id_present = False - self._same_team_value = None - self._same_team_present = False - self._team_member_id_value = None - self._team_member_id_present = False - if account_id is not None: - self.account_id = account_id - if same_team is not None: - self.same_team = same_team - if team_member_id is not None: - self.team_member_id = team_member_id - - @property - def account_id(self): - """ - The account ID of the user. - - :rtype: str - """ - if self._account_id_present: - return self._account_id_value - else: - raise AttributeError("missing required field 'account_id'") - - @account_id.setter - def account_id(self, val): - val = self._account_id_validator.validate(val) - self._account_id_value = val - self._account_id_present = True - - @account_id.deleter - def account_id(self): - self._account_id_value = None - self._account_id_present = False - - @property - def same_team(self): - """ - If the user is in the same team as current user. - - :rtype: bool - """ - if self._same_team_present: - return self._same_team_value - else: - raise AttributeError("missing required field 'same_team'") - - @same_team.setter - def same_team(self, val): - val = self._same_team_validator.validate(val) - self._same_team_value = val - self._same_team_present = True - - @same_team.deleter - def same_team(self): - self._same_team_value = None - self._same_team_present = False - - @property - def team_member_id(self): - """ - The team member ID of the shared folder member. Only present if - ``same_team`` is true. - - :rtype: str - """ - if self._team_member_id_present: - return self._team_member_id_value - else: - return None - - @team_member_id.setter - def team_member_id(self, val): - if val is None: - del self.team_member_id - return - val = self._team_member_id_validator.validate(val) - self._team_member_id_value = val - self._team_member_id_present = True - - @team_member_id.deleter - def team_member_id(self): - self._team_member_id_value = None - self._team_member_id_present = False - - def __repr__(self): - return 'UserInfo(account_id={!r}, same_team={!r}, team_member_id={!r})'.format( - self._account_id_value, - self._same_team_value, - self._team_member_id_value, - ) - -UserInfo_validator = bv.Struct(UserInfo) - -class ViewerInfoPolicy(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar enabled: Viewer information is available on this file. - :ivar disabled: Viewer information is disabled on this file. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - enabled = None - # Attribute is overwritten below the class definition - disabled = None - # Attribute is overwritten below the class definition - other = None - - def is_enabled(self): - """ - Check if the union tag is ``enabled``. - - :rtype: bool - """ - return self._tag == 'enabled' - - def is_disabled(self): - """ - Check if the union tag is ``disabled``. - - :rtype: bool - """ - return self._tag == 'disabled' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'ViewerInfoPolicy(%r, %r)' % (self._tag, self._value) - -ViewerInfoPolicy_validator = bv.Union(ViewerInfoPolicy) - -class Visibility(bb.Union): - """ - Who can access a shared link. The most open visibility is ``public``. The - default depends on many aspects, such as team and user preferences and - shared folder settings. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar public: Anyone who has received the link can access it. No login - required. - :ivar team_only: Only members of the same team can access the link. Login is - required. - :ivar password: A link-specific password is required to access the link. - Login is not required. - :ivar team_and_password: Only members of the same team who have the - link-specific password can access the link. - :ivar shared_folder_only: Only members of the shared folder containing the - linked file can access the link. Login is required. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - public = None - # Attribute is overwritten below the class definition - team_only = None - # Attribute is overwritten below the class definition - password = None - # Attribute is overwritten below the class definition - team_and_password = None - # Attribute is overwritten below the class definition - shared_folder_only = None - # Attribute is overwritten below the class definition - other = None - - def is_public(self): - """ - Check if the union tag is ``public``. - - :rtype: bool - """ - return self._tag == 'public' - - def is_team_only(self): - """ - Check if the union tag is ``team_only``. - - :rtype: bool - """ - return self._tag == 'team_only' - - def is_password(self): - """ - Check if the union tag is ``password``. - - :rtype: bool - """ - return self._tag == 'password' - - def is_team_and_password(self): - """ - Check if the union tag is ``team_and_password``. - - :rtype: bool - """ - return self._tag == 'team_and_password' - - def is_shared_folder_only(self): - """ - Check if the union tag is ``shared_folder_only``. - - :rtype: bool - """ - return self._tag == 'shared_folder_only' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'Visibility(%r, %r)' % (self._tag, self._value) - -Visibility_validator = bv.Union(Visibility) - -DropboxId_validator = bv.String(min_length=1) -FileId_validator = bv.String(min_length=1, pattern=u'id:.*') -GetSharedLinkFileArg_validator = GetSharedLinkMetadataArg_validator -GetSharedLinkFileArg = GetSharedLinkMetadataArg -Id_validator = files.Id_validator -Path_validator = files.Path_validator -PathOrId_validator = bv.String(min_length=1, pattern=u'((/|id:).*|nspath:[0-9]+:.*)|ns:[0-9]+(/.*)?') -ReadPath_validator = files.ReadPath_validator -Rev_validator = files.Rev_validator -TeamInfo_validator = users.Team_validator -TeamInfo = users.Team -AccessLevel._owner_validator = bv.Void() -AccessLevel._editor_validator = bv.Void() -AccessLevel._viewer_validator = bv.Void() -AccessLevel._viewer_no_comment_validator = bv.Void() -AccessLevel._other_validator = bv.Void() -AccessLevel._tagmap = { - 'owner': AccessLevel._owner_validator, - 'editor': AccessLevel._editor_validator, - 'viewer': AccessLevel._viewer_validator, - 'viewer_no_comment': AccessLevel._viewer_no_comment_validator, - 'other': AccessLevel._other_validator, -} - -AccessLevel.owner = AccessLevel('owner') -AccessLevel.editor = AccessLevel('editor') -AccessLevel.viewer = AccessLevel('viewer') -AccessLevel.viewer_no_comment = AccessLevel('viewer_no_comment') -AccessLevel.other = AccessLevel('other') - -AclUpdatePolicy._owner_validator = bv.Void() -AclUpdatePolicy._editors_validator = bv.Void() -AclUpdatePolicy._other_validator = bv.Void() -AclUpdatePolicy._tagmap = { - 'owner': AclUpdatePolicy._owner_validator, - 'editors': AclUpdatePolicy._editors_validator, - 'other': AclUpdatePolicy._other_validator, -} - -AclUpdatePolicy.owner = AclUpdatePolicy('owner') -AclUpdatePolicy.editors = AclUpdatePolicy('editors') -AclUpdatePolicy.other = AclUpdatePolicy('other') - -AddFileMemberArgs._file_validator = PathOrId_validator -AddFileMemberArgs._members_validator = bv.List(MemberSelector_validator) -AddFileMemberArgs._custom_message_validator = bv.Nullable(bv.String()) -AddFileMemberArgs._quiet_validator = bv.Boolean() -AddFileMemberArgs._access_level_validator = AccessLevel_validator -AddFileMemberArgs._add_message_as_comment_validator = bv.Boolean() -AddFileMemberArgs._all_field_names_ = set([ - 'file', - 'members', - 'custom_message', - 'quiet', - 'access_level', - 'add_message_as_comment', -]) -AddFileMemberArgs._all_fields_ = [ - ('file', AddFileMemberArgs._file_validator), - ('members', AddFileMemberArgs._members_validator), - ('custom_message', AddFileMemberArgs._custom_message_validator), - ('quiet', AddFileMemberArgs._quiet_validator), - ('access_level', AddFileMemberArgs._access_level_validator), - ('add_message_as_comment', AddFileMemberArgs._add_message_as_comment_validator), -] - -AddFileMemberError._user_error_validator = SharingUserError_validator -AddFileMemberError._access_error_validator = SharingFileAccessError_validator -AddFileMemberError._rate_limit_validator = bv.Void() -AddFileMemberError._invalid_comment_validator = bv.Void() -AddFileMemberError._other_validator = bv.Void() -AddFileMemberError._tagmap = { - 'user_error': AddFileMemberError._user_error_validator, - 'access_error': AddFileMemberError._access_error_validator, - 'rate_limit': AddFileMemberError._rate_limit_validator, - 'invalid_comment': AddFileMemberError._invalid_comment_validator, - 'other': AddFileMemberError._other_validator, -} - -AddFileMemberError.rate_limit = AddFileMemberError('rate_limit') -AddFileMemberError.invalid_comment = AddFileMemberError('invalid_comment') -AddFileMemberError.other = AddFileMemberError('other') - -AddFolderMemberArg._shared_folder_id_validator = common.SharedFolderId_validator -AddFolderMemberArg._members_validator = bv.List(AddMember_validator) -AddFolderMemberArg._quiet_validator = bv.Boolean() -AddFolderMemberArg._custom_message_validator = bv.Nullable(bv.String(min_length=1)) -AddFolderMemberArg._all_field_names_ = set([ - 'shared_folder_id', - 'members', - 'quiet', - 'custom_message', -]) -AddFolderMemberArg._all_fields_ = [ - ('shared_folder_id', AddFolderMemberArg._shared_folder_id_validator), - ('members', AddFolderMemberArg._members_validator), - ('quiet', AddFolderMemberArg._quiet_validator), - ('custom_message', AddFolderMemberArg._custom_message_validator), -] - -AddFolderMemberError._access_error_validator = SharedFolderAccessError_validator -AddFolderMemberError._email_unverified_validator = bv.Void() -AddFolderMemberError._bad_member_validator = AddMemberSelectorError_validator -AddFolderMemberError._cant_share_outside_team_validator = bv.Void() -AddFolderMemberError._too_many_members_validator = bv.UInt64() -AddFolderMemberError._too_many_pending_invites_validator = bv.UInt64() -AddFolderMemberError._rate_limit_validator = bv.Void() -AddFolderMemberError._too_many_invitees_validator = bv.Void() -AddFolderMemberError._insufficient_plan_validator = bv.Void() -AddFolderMemberError._team_folder_validator = bv.Void() -AddFolderMemberError._no_permission_validator = bv.Void() -AddFolderMemberError._other_validator = bv.Void() -AddFolderMemberError._tagmap = { - 'access_error': AddFolderMemberError._access_error_validator, - 'email_unverified': AddFolderMemberError._email_unverified_validator, - 'bad_member': AddFolderMemberError._bad_member_validator, - 'cant_share_outside_team': AddFolderMemberError._cant_share_outside_team_validator, - 'too_many_members': AddFolderMemberError._too_many_members_validator, - 'too_many_pending_invites': AddFolderMemberError._too_many_pending_invites_validator, - 'rate_limit': AddFolderMemberError._rate_limit_validator, - 'too_many_invitees': AddFolderMemberError._too_many_invitees_validator, - 'insufficient_plan': AddFolderMemberError._insufficient_plan_validator, - 'team_folder': AddFolderMemberError._team_folder_validator, - 'no_permission': AddFolderMemberError._no_permission_validator, - 'other': AddFolderMemberError._other_validator, -} - -AddFolderMemberError.email_unverified = AddFolderMemberError('email_unverified') -AddFolderMemberError.cant_share_outside_team = AddFolderMemberError('cant_share_outside_team') -AddFolderMemberError.rate_limit = AddFolderMemberError('rate_limit') -AddFolderMemberError.too_many_invitees = AddFolderMemberError('too_many_invitees') -AddFolderMemberError.insufficient_plan = AddFolderMemberError('insufficient_plan') -AddFolderMemberError.team_folder = AddFolderMemberError('team_folder') -AddFolderMemberError.no_permission = AddFolderMemberError('no_permission') -AddFolderMemberError.other = AddFolderMemberError('other') - -AddMember._member_validator = MemberSelector_validator -AddMember._access_level_validator = AccessLevel_validator -AddMember._all_field_names_ = set([ - 'member', - 'access_level', -]) -AddMember._all_fields_ = [ - ('member', AddMember._member_validator), - ('access_level', AddMember._access_level_validator), -] - -AddMemberSelectorError._automatic_group_validator = bv.Void() -AddMemberSelectorError._invalid_dropbox_id_validator = DropboxId_validator -AddMemberSelectorError._invalid_email_validator = common.EmailAddress_validator -AddMemberSelectorError._unverified_dropbox_id_validator = DropboxId_validator -AddMemberSelectorError._group_deleted_validator = bv.Void() -AddMemberSelectorError._group_not_on_team_validator = bv.Void() -AddMemberSelectorError._other_validator = bv.Void() -AddMemberSelectorError._tagmap = { - 'automatic_group': AddMemberSelectorError._automatic_group_validator, - 'invalid_dropbox_id': AddMemberSelectorError._invalid_dropbox_id_validator, - 'invalid_email': AddMemberSelectorError._invalid_email_validator, - 'unverified_dropbox_id': AddMemberSelectorError._unverified_dropbox_id_validator, - 'group_deleted': AddMemberSelectorError._group_deleted_validator, - 'group_not_on_team': AddMemberSelectorError._group_not_on_team_validator, - 'other': AddMemberSelectorError._other_validator, -} - -AddMemberSelectorError.automatic_group = AddMemberSelectorError('automatic_group') -AddMemberSelectorError.group_deleted = AddMemberSelectorError('group_deleted') -AddMemberSelectorError.group_not_on_team = AddMemberSelectorError('group_not_on_team') -AddMemberSelectorError.other = AddMemberSelectorError('other') - -AudienceExceptionContentInfo._name_validator = bv.String() -AudienceExceptionContentInfo._all_field_names_ = set(['name']) -AudienceExceptionContentInfo._all_fields_ = [('name', AudienceExceptionContentInfo._name_validator)] - -AudienceExceptions._count_validator = bv.UInt32() -AudienceExceptions._exceptions_validator = bv.List(AudienceExceptionContentInfo_validator) -AudienceExceptions._all_field_names_ = set([ - 'count', - 'exceptions', -]) -AudienceExceptions._all_fields_ = [ - ('count', AudienceExceptions._count_validator), - ('exceptions', AudienceExceptions._exceptions_validator), -] - -AudienceRestrictingSharedFolder._shared_folder_id_validator = common.SharedFolderId_validator -AudienceRestrictingSharedFolder._name_validator = bv.String() -AudienceRestrictingSharedFolder._audience_validator = LinkAudience_validator -AudienceRestrictingSharedFolder._all_field_names_ = set([ - 'shared_folder_id', - 'name', - 'audience', -]) -AudienceRestrictingSharedFolder._all_fields_ = [ - ('shared_folder_id', AudienceRestrictingSharedFolder._shared_folder_id_validator), - ('name', AudienceRestrictingSharedFolder._name_validator), - ('audience', AudienceRestrictingSharedFolder._audience_validator), -] - -ChangeFileMemberAccessArgs._file_validator = PathOrId_validator -ChangeFileMemberAccessArgs._member_validator = MemberSelector_validator -ChangeFileMemberAccessArgs._access_level_validator = AccessLevel_validator -ChangeFileMemberAccessArgs._all_field_names_ = set([ - 'file', - 'member', - 'access_level', -]) -ChangeFileMemberAccessArgs._all_fields_ = [ - ('file', ChangeFileMemberAccessArgs._file_validator), - ('member', ChangeFileMemberAccessArgs._member_validator), - ('access_level', ChangeFileMemberAccessArgs._access_level_validator), -] - -LinkMetadata._url_validator = bv.String() -LinkMetadata._visibility_validator = Visibility_validator -LinkMetadata._expires_validator = bv.Nullable(common.DropboxTimestamp_validator) -LinkMetadata._field_names_ = set([ - 'url', - 'visibility', - 'expires', -]) -LinkMetadata._all_field_names_ = LinkMetadata._field_names_ -LinkMetadata._fields_ = [ - ('url', LinkMetadata._url_validator), - ('visibility', LinkMetadata._visibility_validator), - ('expires', LinkMetadata._expires_validator), -] -LinkMetadata._all_fields_ = LinkMetadata._fields_ - -LinkMetadata._tag_to_subtype_ = { - (u'path',): PathLinkMetadata_validator, - (u'collection',): CollectionLinkMetadata_validator, -} -LinkMetadata._pytype_to_tag_and_subtype_ = { - PathLinkMetadata: ((u'path',), PathLinkMetadata_validator), - CollectionLinkMetadata: ((u'collection',), CollectionLinkMetadata_validator), -} -LinkMetadata._is_catch_all_ = True - -CollectionLinkMetadata._field_names_ = set([]) -CollectionLinkMetadata._all_field_names_ = LinkMetadata._all_field_names_.union(CollectionLinkMetadata._field_names_) -CollectionLinkMetadata._fields_ = [] -CollectionLinkMetadata._all_fields_ = LinkMetadata._all_fields_ + CollectionLinkMetadata._fields_ - -CreateSharedLinkArg._path_validator = bv.String() -CreateSharedLinkArg._short_url_validator = bv.Boolean() -CreateSharedLinkArg._pending_upload_validator = bv.Nullable(PendingUploadMode_validator) -CreateSharedLinkArg._all_field_names_ = set([ - 'path', - 'short_url', - 'pending_upload', -]) -CreateSharedLinkArg._all_fields_ = [ - ('path', CreateSharedLinkArg._path_validator), - ('short_url', CreateSharedLinkArg._short_url_validator), - ('pending_upload', CreateSharedLinkArg._pending_upload_validator), -] - -CreateSharedLinkError._path_validator = files.LookupError_validator -CreateSharedLinkError._other_validator = bv.Void() -CreateSharedLinkError._tagmap = { - 'path': CreateSharedLinkError._path_validator, - 'other': CreateSharedLinkError._other_validator, -} - -CreateSharedLinkError.other = CreateSharedLinkError('other') - -CreateSharedLinkWithSettingsArg._path_validator = ReadPath_validator -CreateSharedLinkWithSettingsArg._settings_validator = bv.Nullable(SharedLinkSettings_validator) -CreateSharedLinkWithSettingsArg._all_field_names_ = set([ - 'path', - 'settings', -]) -CreateSharedLinkWithSettingsArg._all_fields_ = [ - ('path', CreateSharedLinkWithSettingsArg._path_validator), - ('settings', CreateSharedLinkWithSettingsArg._settings_validator), -] - -CreateSharedLinkWithSettingsError._path_validator = files.LookupError_validator -CreateSharedLinkWithSettingsError._email_not_verified_validator = bv.Void() -CreateSharedLinkWithSettingsError._shared_link_already_exists_validator = bv.Void() -CreateSharedLinkWithSettingsError._settings_error_validator = SharedLinkSettingsError_validator -CreateSharedLinkWithSettingsError._access_denied_validator = bv.Void() -CreateSharedLinkWithSettingsError._tagmap = { - 'path': CreateSharedLinkWithSettingsError._path_validator, - 'email_not_verified': CreateSharedLinkWithSettingsError._email_not_verified_validator, - 'shared_link_already_exists': CreateSharedLinkWithSettingsError._shared_link_already_exists_validator, - 'settings_error': CreateSharedLinkWithSettingsError._settings_error_validator, - 'access_denied': CreateSharedLinkWithSettingsError._access_denied_validator, -} - -CreateSharedLinkWithSettingsError.email_not_verified = CreateSharedLinkWithSettingsError('email_not_verified') -CreateSharedLinkWithSettingsError.shared_link_already_exists = CreateSharedLinkWithSettingsError('shared_link_already_exists') -CreateSharedLinkWithSettingsError.access_denied = CreateSharedLinkWithSettingsError('access_denied') - -SharedContentLinkMetadataBase._access_level_validator = bv.Nullable(AccessLevel_validator) -SharedContentLinkMetadataBase._audience_options_validator = bv.List(LinkAudience_validator) -SharedContentLinkMetadataBase._audience_restricting_shared_folder_validator = bv.Nullable(AudienceRestrictingSharedFolder_validator) -SharedContentLinkMetadataBase._current_audience_validator = LinkAudience_validator -SharedContentLinkMetadataBase._expiry_validator = bv.Nullable(common.DropboxTimestamp_validator) -SharedContentLinkMetadataBase._link_permissions_validator = bv.List(LinkPermission_validator) -SharedContentLinkMetadataBase._password_protected_validator = bv.Boolean() -SharedContentLinkMetadataBase._all_field_names_ = set([ - 'access_level', - 'audience_options', - 'audience_restricting_shared_folder', - 'current_audience', - 'expiry', - 'link_permissions', - 'password_protected', -]) -SharedContentLinkMetadataBase._all_fields_ = [ - ('access_level', SharedContentLinkMetadataBase._access_level_validator), - ('audience_options', SharedContentLinkMetadataBase._audience_options_validator), - ('audience_restricting_shared_folder', SharedContentLinkMetadataBase._audience_restricting_shared_folder_validator), - ('current_audience', SharedContentLinkMetadataBase._current_audience_validator), - ('expiry', SharedContentLinkMetadataBase._expiry_validator), - ('link_permissions', SharedContentLinkMetadataBase._link_permissions_validator), - ('password_protected', SharedContentLinkMetadataBase._password_protected_validator), -] - -ExpectedSharedContentLinkMetadata._all_field_names_ = SharedContentLinkMetadataBase._all_field_names_.union(set([])) -ExpectedSharedContentLinkMetadata._all_fields_ = SharedContentLinkMetadataBase._all_fields_ + [] - -FileAction._disable_viewer_info_validator = bv.Void() -FileAction._edit_contents_validator = bv.Void() -FileAction._enable_viewer_info_validator = bv.Void() -FileAction._invite_viewer_validator = bv.Void() -FileAction._invite_viewer_no_comment_validator = bv.Void() -FileAction._unshare_validator = bv.Void() -FileAction._relinquish_membership_validator = bv.Void() -FileAction._share_link_validator = bv.Void() -FileAction._create_link_validator = bv.Void() -FileAction._other_validator = bv.Void() -FileAction._tagmap = { - 'disable_viewer_info': FileAction._disable_viewer_info_validator, - 'edit_contents': FileAction._edit_contents_validator, - 'enable_viewer_info': FileAction._enable_viewer_info_validator, - 'invite_viewer': FileAction._invite_viewer_validator, - 'invite_viewer_no_comment': FileAction._invite_viewer_no_comment_validator, - 'unshare': FileAction._unshare_validator, - 'relinquish_membership': FileAction._relinquish_membership_validator, - 'share_link': FileAction._share_link_validator, - 'create_link': FileAction._create_link_validator, - 'other': FileAction._other_validator, -} - -FileAction.disable_viewer_info = FileAction('disable_viewer_info') -FileAction.edit_contents = FileAction('edit_contents') -FileAction.enable_viewer_info = FileAction('enable_viewer_info') -FileAction.invite_viewer = FileAction('invite_viewer') -FileAction.invite_viewer_no_comment = FileAction('invite_viewer_no_comment') -FileAction.unshare = FileAction('unshare') -FileAction.relinquish_membership = FileAction('relinquish_membership') -FileAction.share_link = FileAction('share_link') -FileAction.create_link = FileAction('create_link') -FileAction.other = FileAction('other') - -FileErrorResult._file_not_found_error_validator = files.Id_validator -FileErrorResult._invalid_file_action_error_validator = files.Id_validator -FileErrorResult._permission_denied_error_validator = files.Id_validator -FileErrorResult._other_validator = bv.Void() -FileErrorResult._tagmap = { - 'file_not_found_error': FileErrorResult._file_not_found_error_validator, - 'invalid_file_action_error': FileErrorResult._invalid_file_action_error_validator, - 'permission_denied_error': FileErrorResult._permission_denied_error_validator, - 'other': FileErrorResult._other_validator, -} - -FileErrorResult.other = FileErrorResult('other') - -SharedLinkMetadata._url_validator = bv.String() -SharedLinkMetadata._id_validator = bv.Nullable(Id_validator) -SharedLinkMetadata._name_validator = bv.String() -SharedLinkMetadata._expires_validator = bv.Nullable(common.DropboxTimestamp_validator) -SharedLinkMetadata._path_lower_validator = bv.Nullable(bv.String()) -SharedLinkMetadata._link_permissions_validator = LinkPermissions_validator -SharedLinkMetadata._team_member_info_validator = bv.Nullable(TeamMemberInfo_validator) -SharedLinkMetadata._content_owner_team_info_validator = bv.Nullable(TeamInfo_validator) -SharedLinkMetadata._field_names_ = set([ - 'url', - 'id', - 'name', - 'expires', - 'path_lower', - 'link_permissions', - 'team_member_info', - 'content_owner_team_info', -]) -SharedLinkMetadata._all_field_names_ = SharedLinkMetadata._field_names_ -SharedLinkMetadata._fields_ = [ - ('url', SharedLinkMetadata._url_validator), - ('id', SharedLinkMetadata._id_validator), - ('name', SharedLinkMetadata._name_validator), - ('expires', SharedLinkMetadata._expires_validator), - ('path_lower', SharedLinkMetadata._path_lower_validator), - ('link_permissions', SharedLinkMetadata._link_permissions_validator), - ('team_member_info', SharedLinkMetadata._team_member_info_validator), - ('content_owner_team_info', SharedLinkMetadata._content_owner_team_info_validator), -] -SharedLinkMetadata._all_fields_ = SharedLinkMetadata._fields_ - -SharedLinkMetadata._tag_to_subtype_ = { - (u'file',): FileLinkMetadata_validator, - (u'folder',): FolderLinkMetadata_validator, -} -SharedLinkMetadata._pytype_to_tag_and_subtype_ = { - FileLinkMetadata: ((u'file',), FileLinkMetadata_validator), - FolderLinkMetadata: ((u'folder',), FolderLinkMetadata_validator), -} -SharedLinkMetadata._is_catch_all_ = True - -FileLinkMetadata._client_modified_validator = common.DropboxTimestamp_validator -FileLinkMetadata._server_modified_validator = common.DropboxTimestamp_validator -FileLinkMetadata._rev_validator = Rev_validator -FileLinkMetadata._size_validator = bv.UInt64() -FileLinkMetadata._field_names_ = set([ - 'client_modified', - 'server_modified', - 'rev', - 'size', -]) -FileLinkMetadata._all_field_names_ = SharedLinkMetadata._all_field_names_.union(FileLinkMetadata._field_names_) -FileLinkMetadata._fields_ = [ - ('client_modified', FileLinkMetadata._client_modified_validator), - ('server_modified', FileLinkMetadata._server_modified_validator), - ('rev', FileLinkMetadata._rev_validator), - ('size', FileLinkMetadata._size_validator), -] -FileLinkMetadata._all_fields_ = SharedLinkMetadata._all_fields_ + FileLinkMetadata._fields_ - -FileMemberActionError._invalid_member_validator = bv.Void() -FileMemberActionError._no_permission_validator = bv.Void() -FileMemberActionError._access_error_validator = SharingFileAccessError_validator -FileMemberActionError._no_explicit_access_validator = MemberAccessLevelResult_validator -FileMemberActionError._other_validator = bv.Void() -FileMemberActionError._tagmap = { - 'invalid_member': FileMemberActionError._invalid_member_validator, - 'no_permission': FileMemberActionError._no_permission_validator, - 'access_error': FileMemberActionError._access_error_validator, - 'no_explicit_access': FileMemberActionError._no_explicit_access_validator, - 'other': FileMemberActionError._other_validator, -} - -FileMemberActionError.invalid_member = FileMemberActionError('invalid_member') -FileMemberActionError.no_permission = FileMemberActionError('no_permission') -FileMemberActionError.other = FileMemberActionError('other') - -FileMemberActionIndividualResult._success_validator = bv.Nullable(AccessLevel_validator) -FileMemberActionIndividualResult._member_error_validator = FileMemberActionError_validator -FileMemberActionIndividualResult._tagmap = { - 'success': FileMemberActionIndividualResult._success_validator, - 'member_error': FileMemberActionIndividualResult._member_error_validator, -} - -FileMemberActionResult._member_validator = MemberSelector_validator -FileMemberActionResult._result_validator = FileMemberActionIndividualResult_validator -FileMemberActionResult._all_field_names_ = set([ - 'member', - 'result', -]) -FileMemberActionResult._all_fields_ = [ - ('member', FileMemberActionResult._member_validator), - ('result', FileMemberActionResult._result_validator), -] - -FileMemberRemoveActionResult._success_validator = MemberAccessLevelResult_validator -FileMemberRemoveActionResult._member_error_validator = FileMemberActionError_validator -FileMemberRemoveActionResult._other_validator = bv.Void() -FileMemberRemoveActionResult._tagmap = { - 'success': FileMemberRemoveActionResult._success_validator, - 'member_error': FileMemberRemoveActionResult._member_error_validator, - 'other': FileMemberRemoveActionResult._other_validator, -} - -FileMemberRemoveActionResult.other = FileMemberRemoveActionResult('other') - -FilePermission._action_validator = FileAction_validator -FilePermission._allow_validator = bv.Boolean() -FilePermission._reason_validator = bv.Nullable(PermissionDeniedReason_validator) -FilePermission._all_field_names_ = set([ - 'action', - 'allow', - 'reason', -]) -FilePermission._all_fields_ = [ - ('action', FilePermission._action_validator), - ('allow', FilePermission._allow_validator), - ('reason', FilePermission._reason_validator), -] - -FolderAction._change_options_validator = bv.Void() -FolderAction._disable_viewer_info_validator = bv.Void() -FolderAction._edit_contents_validator = bv.Void() -FolderAction._enable_viewer_info_validator = bv.Void() -FolderAction._invite_editor_validator = bv.Void() -FolderAction._invite_viewer_validator = bv.Void() -FolderAction._invite_viewer_no_comment_validator = bv.Void() -FolderAction._relinquish_membership_validator = bv.Void() -FolderAction._unmount_validator = bv.Void() -FolderAction._unshare_validator = bv.Void() -FolderAction._leave_a_copy_validator = bv.Void() -FolderAction._share_link_validator = bv.Void() -FolderAction._create_link_validator = bv.Void() -FolderAction._other_validator = bv.Void() -FolderAction._tagmap = { - 'change_options': FolderAction._change_options_validator, - 'disable_viewer_info': FolderAction._disable_viewer_info_validator, - 'edit_contents': FolderAction._edit_contents_validator, - 'enable_viewer_info': FolderAction._enable_viewer_info_validator, - 'invite_editor': FolderAction._invite_editor_validator, - 'invite_viewer': FolderAction._invite_viewer_validator, - 'invite_viewer_no_comment': FolderAction._invite_viewer_no_comment_validator, - 'relinquish_membership': FolderAction._relinquish_membership_validator, - 'unmount': FolderAction._unmount_validator, - 'unshare': FolderAction._unshare_validator, - 'leave_a_copy': FolderAction._leave_a_copy_validator, - 'share_link': FolderAction._share_link_validator, - 'create_link': FolderAction._create_link_validator, - 'other': FolderAction._other_validator, -} - -FolderAction.change_options = FolderAction('change_options') -FolderAction.disable_viewer_info = FolderAction('disable_viewer_info') -FolderAction.edit_contents = FolderAction('edit_contents') -FolderAction.enable_viewer_info = FolderAction('enable_viewer_info') -FolderAction.invite_editor = FolderAction('invite_editor') -FolderAction.invite_viewer = FolderAction('invite_viewer') -FolderAction.invite_viewer_no_comment = FolderAction('invite_viewer_no_comment') -FolderAction.relinquish_membership = FolderAction('relinquish_membership') -FolderAction.unmount = FolderAction('unmount') -FolderAction.unshare = FolderAction('unshare') -FolderAction.leave_a_copy = FolderAction('leave_a_copy') -FolderAction.share_link = FolderAction('share_link') -FolderAction.create_link = FolderAction('create_link') -FolderAction.other = FolderAction('other') - -FolderLinkMetadata._field_names_ = set([]) -FolderLinkMetadata._all_field_names_ = SharedLinkMetadata._all_field_names_.union(FolderLinkMetadata._field_names_) -FolderLinkMetadata._fields_ = [] -FolderLinkMetadata._all_fields_ = SharedLinkMetadata._all_fields_ + FolderLinkMetadata._fields_ - -FolderPermission._action_validator = FolderAction_validator -FolderPermission._allow_validator = bv.Boolean() -FolderPermission._reason_validator = bv.Nullable(PermissionDeniedReason_validator) -FolderPermission._all_field_names_ = set([ - 'action', - 'allow', - 'reason', -]) -FolderPermission._all_fields_ = [ - ('action', FolderPermission._action_validator), - ('allow', FolderPermission._allow_validator), - ('reason', FolderPermission._reason_validator), -] - -FolderPolicy._member_policy_validator = bv.Nullable(MemberPolicy_validator) -FolderPolicy._resolved_member_policy_validator = bv.Nullable(MemberPolicy_validator) -FolderPolicy._acl_update_policy_validator = AclUpdatePolicy_validator -FolderPolicy._shared_link_policy_validator = SharedLinkPolicy_validator -FolderPolicy._viewer_info_policy_validator = bv.Nullable(ViewerInfoPolicy_validator) -FolderPolicy._all_field_names_ = set([ - 'member_policy', - 'resolved_member_policy', - 'acl_update_policy', - 'shared_link_policy', - 'viewer_info_policy', -]) -FolderPolicy._all_fields_ = [ - ('member_policy', FolderPolicy._member_policy_validator), - ('resolved_member_policy', FolderPolicy._resolved_member_policy_validator), - ('acl_update_policy', FolderPolicy._acl_update_policy_validator), - ('shared_link_policy', FolderPolicy._shared_link_policy_validator), - ('viewer_info_policy', FolderPolicy._viewer_info_policy_validator), -] - -GetFileMetadataArg._file_validator = PathOrId_validator -GetFileMetadataArg._actions_validator = bv.Nullable(bv.List(FileAction_validator)) -GetFileMetadataArg._all_field_names_ = set([ - 'file', - 'actions', -]) -GetFileMetadataArg._all_fields_ = [ - ('file', GetFileMetadataArg._file_validator), - ('actions', GetFileMetadataArg._actions_validator), -] - -GetFileMetadataBatchArg._files_validator = bv.List(PathOrId_validator, max_items=100) -GetFileMetadataBatchArg._actions_validator = bv.Nullable(bv.List(FileAction_validator)) -GetFileMetadataBatchArg._all_field_names_ = set([ - 'files', - 'actions', -]) -GetFileMetadataBatchArg._all_fields_ = [ - ('files', GetFileMetadataBatchArg._files_validator), - ('actions', GetFileMetadataBatchArg._actions_validator), -] - -GetFileMetadataBatchResult._file_validator = PathOrId_validator -GetFileMetadataBatchResult._result_validator = GetFileMetadataIndividualResult_validator -GetFileMetadataBatchResult._all_field_names_ = set([ - 'file', - 'result', -]) -GetFileMetadataBatchResult._all_fields_ = [ - ('file', GetFileMetadataBatchResult._file_validator), - ('result', GetFileMetadataBatchResult._result_validator), -] - -GetFileMetadataError._user_error_validator = SharingUserError_validator -GetFileMetadataError._access_error_validator = SharingFileAccessError_validator -GetFileMetadataError._other_validator = bv.Void() -GetFileMetadataError._tagmap = { - 'user_error': GetFileMetadataError._user_error_validator, - 'access_error': GetFileMetadataError._access_error_validator, - 'other': GetFileMetadataError._other_validator, -} - -GetFileMetadataError.other = GetFileMetadataError('other') - -GetFileMetadataIndividualResult._metadata_validator = SharedFileMetadata_validator -GetFileMetadataIndividualResult._access_error_validator = SharingFileAccessError_validator -GetFileMetadataIndividualResult._other_validator = bv.Void() -GetFileMetadataIndividualResult._tagmap = { - 'metadata': GetFileMetadataIndividualResult._metadata_validator, - 'access_error': GetFileMetadataIndividualResult._access_error_validator, - 'other': GetFileMetadataIndividualResult._other_validator, -} - -GetFileMetadataIndividualResult.other = GetFileMetadataIndividualResult('other') - -GetMetadataArgs._shared_folder_id_validator = common.SharedFolderId_validator -GetMetadataArgs._actions_validator = bv.Nullable(bv.List(FolderAction_validator)) -GetMetadataArgs._all_field_names_ = set([ - 'shared_folder_id', - 'actions', -]) -GetMetadataArgs._all_fields_ = [ - ('shared_folder_id', GetMetadataArgs._shared_folder_id_validator), - ('actions', GetMetadataArgs._actions_validator), -] - -SharedLinkError._shared_link_not_found_validator = bv.Void() -SharedLinkError._shared_link_access_denied_validator = bv.Void() -SharedLinkError._unsupported_link_type_validator = bv.Void() -SharedLinkError._other_validator = bv.Void() -SharedLinkError._tagmap = { - 'shared_link_not_found': SharedLinkError._shared_link_not_found_validator, - 'shared_link_access_denied': SharedLinkError._shared_link_access_denied_validator, - 'unsupported_link_type': SharedLinkError._unsupported_link_type_validator, - 'other': SharedLinkError._other_validator, -} - -SharedLinkError.shared_link_not_found = SharedLinkError('shared_link_not_found') -SharedLinkError.shared_link_access_denied = SharedLinkError('shared_link_access_denied') -SharedLinkError.unsupported_link_type = SharedLinkError('unsupported_link_type') -SharedLinkError.other = SharedLinkError('other') - -GetSharedLinkFileError._shared_link_is_directory_validator = bv.Void() -GetSharedLinkFileError._tagmap = { - 'shared_link_is_directory': GetSharedLinkFileError._shared_link_is_directory_validator, -} -GetSharedLinkFileError._tagmap.update(SharedLinkError._tagmap) - -GetSharedLinkFileError.shared_link_is_directory = GetSharedLinkFileError('shared_link_is_directory') - -GetSharedLinkMetadataArg._url_validator = bv.String() -GetSharedLinkMetadataArg._path_validator = bv.Nullable(Path_validator) -GetSharedLinkMetadataArg._link_password_validator = bv.Nullable(bv.String()) -GetSharedLinkMetadataArg._all_field_names_ = set([ - 'url', - 'path', - 'link_password', -]) -GetSharedLinkMetadataArg._all_fields_ = [ - ('url', GetSharedLinkMetadataArg._url_validator), - ('path', GetSharedLinkMetadataArg._path_validator), - ('link_password', GetSharedLinkMetadataArg._link_password_validator), -] - -GetSharedLinksArg._path_validator = bv.Nullable(bv.String()) -GetSharedLinksArg._all_field_names_ = set(['path']) -GetSharedLinksArg._all_fields_ = [('path', GetSharedLinksArg._path_validator)] - -GetSharedLinksError._path_validator = files.MalformedPathError_validator -GetSharedLinksError._other_validator = bv.Void() -GetSharedLinksError._tagmap = { - 'path': GetSharedLinksError._path_validator, - 'other': GetSharedLinksError._other_validator, -} - -GetSharedLinksError.other = GetSharedLinksError('other') - -GetSharedLinksResult._links_validator = bv.List(LinkMetadata_validator) -GetSharedLinksResult._all_field_names_ = set(['links']) -GetSharedLinksResult._all_fields_ = [('links', GetSharedLinksResult._links_validator)] - -GroupInfo._group_type_validator = team_common.GroupType_validator -GroupInfo._is_member_validator = bv.Boolean() -GroupInfo._is_owner_validator = bv.Boolean() -GroupInfo._same_team_validator = bv.Boolean() -GroupInfo._all_field_names_ = team_common.GroupSummary._all_field_names_.union(set([ - 'group_type', - 'is_member', - 'is_owner', - 'same_team', -])) -GroupInfo._all_fields_ = team_common.GroupSummary._all_fields_ + [ - ('group_type', GroupInfo._group_type_validator), - ('is_member', GroupInfo._is_member_validator), - ('is_owner', GroupInfo._is_owner_validator), - ('same_team', GroupInfo._same_team_validator), -] - -MembershipInfo._access_type_validator = AccessLevel_validator -MembershipInfo._permissions_validator = bv.Nullable(bv.List(MemberPermission_validator)) -MembershipInfo._initials_validator = bv.Nullable(bv.String()) -MembershipInfo._is_inherited_validator = bv.Boolean() -MembershipInfo._all_field_names_ = set([ - 'access_type', - 'permissions', - 'initials', - 'is_inherited', -]) -MembershipInfo._all_fields_ = [ - ('access_type', MembershipInfo._access_type_validator), - ('permissions', MembershipInfo._permissions_validator), - ('initials', MembershipInfo._initials_validator), - ('is_inherited', MembershipInfo._is_inherited_validator), -] - -GroupMembershipInfo._group_validator = GroupInfo_validator -GroupMembershipInfo._all_field_names_ = MembershipInfo._all_field_names_.union(set(['group'])) -GroupMembershipInfo._all_fields_ = MembershipInfo._all_fields_ + [('group', GroupMembershipInfo._group_validator)] - -InsufficientPlan._message_validator = bv.String() -InsufficientPlan._upsell_url_validator = bv.Nullable(bv.String()) -InsufficientPlan._all_field_names_ = set([ - 'message', - 'upsell_url', -]) -InsufficientPlan._all_fields_ = [ - ('message', InsufficientPlan._message_validator), - ('upsell_url', InsufficientPlan._upsell_url_validator), -] - -InsufficientQuotaAmounts._space_needed_validator = bv.UInt64() -InsufficientQuotaAmounts._space_shortage_validator = bv.UInt64() -InsufficientQuotaAmounts._space_left_validator = bv.UInt64() -InsufficientQuotaAmounts._all_field_names_ = set([ - 'space_needed', - 'space_shortage', - 'space_left', -]) -InsufficientQuotaAmounts._all_fields_ = [ - ('space_needed', InsufficientQuotaAmounts._space_needed_validator), - ('space_shortage', InsufficientQuotaAmounts._space_shortage_validator), - ('space_left', InsufficientQuotaAmounts._space_left_validator), -] - -InviteeInfo._email_validator = common.EmailAddress_validator -InviteeInfo._other_validator = bv.Void() -InviteeInfo._tagmap = { - 'email': InviteeInfo._email_validator, - 'other': InviteeInfo._other_validator, -} - -InviteeInfo.other = InviteeInfo('other') - -InviteeMembershipInfo._invitee_validator = InviteeInfo_validator -InviteeMembershipInfo._user_validator = bv.Nullable(UserInfo_validator) -InviteeMembershipInfo._all_field_names_ = MembershipInfo._all_field_names_.union(set([ - 'invitee', - 'user', -])) -InviteeMembershipInfo._all_fields_ = MembershipInfo._all_fields_ + [ - ('invitee', InviteeMembershipInfo._invitee_validator), - ('user', InviteeMembershipInfo._user_validator), -] - -JobError._unshare_folder_error_validator = UnshareFolderError_validator -JobError._remove_folder_member_error_validator = RemoveFolderMemberError_validator -JobError._relinquish_folder_membership_error_validator = RelinquishFolderMembershipError_validator -JobError._other_validator = bv.Void() -JobError._tagmap = { - 'unshare_folder_error': JobError._unshare_folder_error_validator, - 'remove_folder_member_error': JobError._remove_folder_member_error_validator, - 'relinquish_folder_membership_error': JobError._relinquish_folder_membership_error_validator, - 'other': JobError._other_validator, -} - -JobError.other = JobError('other') - -JobStatus._complete_validator = bv.Void() -JobStatus._failed_validator = JobError_validator -JobStatus._tagmap = { - 'complete': JobStatus._complete_validator, - 'failed': JobStatus._failed_validator, -} -JobStatus._tagmap.update(async.PollResultBase._tagmap) - -JobStatus.complete = JobStatus('complete') - -LinkAction._change_access_level_validator = bv.Void() -LinkAction._change_audience_validator = bv.Void() -LinkAction._remove_expiry_validator = bv.Void() -LinkAction._remove_password_validator = bv.Void() -LinkAction._set_expiry_validator = bv.Void() -LinkAction._set_password_validator = bv.Void() -LinkAction._other_validator = bv.Void() -LinkAction._tagmap = { - 'change_access_level': LinkAction._change_access_level_validator, - 'change_audience': LinkAction._change_audience_validator, - 'remove_expiry': LinkAction._remove_expiry_validator, - 'remove_password': LinkAction._remove_password_validator, - 'set_expiry': LinkAction._set_expiry_validator, - 'set_password': LinkAction._set_password_validator, - 'other': LinkAction._other_validator, -} - -LinkAction.change_access_level = LinkAction('change_access_level') -LinkAction.change_audience = LinkAction('change_audience') -LinkAction.remove_expiry = LinkAction('remove_expiry') -LinkAction.remove_password = LinkAction('remove_password') -LinkAction.set_expiry = LinkAction('set_expiry') -LinkAction.set_password = LinkAction('set_password') -LinkAction.other = LinkAction('other') - -LinkAudience._public_validator = bv.Void() -LinkAudience._team_validator = bv.Void() -LinkAudience._members_validator = bv.Void() -LinkAudience._other_validator = bv.Void() -LinkAudience._tagmap = { - 'public': LinkAudience._public_validator, - 'team': LinkAudience._team_validator, - 'members': LinkAudience._members_validator, - 'other': LinkAudience._other_validator, -} - -LinkAudience.public = LinkAudience('public') -LinkAudience.team = LinkAudience('team') -LinkAudience.members = LinkAudience('members') -LinkAudience.other = LinkAudience('other') - -LinkExpiry._remove_expiry_validator = bv.Void() -LinkExpiry._set_expiry_validator = common.DropboxTimestamp_validator -LinkExpiry._other_validator = bv.Void() -LinkExpiry._tagmap = { - 'remove_expiry': LinkExpiry._remove_expiry_validator, - 'set_expiry': LinkExpiry._set_expiry_validator, - 'other': LinkExpiry._other_validator, -} - -LinkExpiry.remove_expiry = LinkExpiry('remove_expiry') -LinkExpiry.other = LinkExpiry('other') - -LinkPassword._remove_password_validator = bv.Void() -LinkPassword._set_password_validator = bv.String() -LinkPassword._other_validator = bv.Void() -LinkPassword._tagmap = { - 'remove_password': LinkPassword._remove_password_validator, - 'set_password': LinkPassword._set_password_validator, - 'other': LinkPassword._other_validator, -} - -LinkPassword.remove_password = LinkPassword('remove_password') -LinkPassword.other = LinkPassword('other') - -LinkPermission._action_validator = LinkAction_validator -LinkPermission._allow_validator = bv.Boolean() -LinkPermission._reason_validator = bv.Nullable(PermissionDeniedReason_validator) -LinkPermission._all_field_names_ = set([ - 'action', - 'allow', - 'reason', -]) -LinkPermission._all_fields_ = [ - ('action', LinkPermission._action_validator), - ('allow', LinkPermission._allow_validator), - ('reason', LinkPermission._reason_validator), -] - -LinkPermissions._resolved_visibility_validator = bv.Nullable(ResolvedVisibility_validator) -LinkPermissions._requested_visibility_validator = bv.Nullable(RequestedVisibility_validator) -LinkPermissions._can_revoke_validator = bv.Boolean() -LinkPermissions._revoke_failure_reason_validator = bv.Nullable(SharedLinkAccessFailureReason_validator) -LinkPermissions._all_field_names_ = set([ - 'resolved_visibility', - 'requested_visibility', - 'can_revoke', - 'revoke_failure_reason', -]) -LinkPermissions._all_fields_ = [ - ('resolved_visibility', LinkPermissions._resolved_visibility_validator), - ('requested_visibility', LinkPermissions._requested_visibility_validator), - ('can_revoke', LinkPermissions._can_revoke_validator), - ('revoke_failure_reason', LinkPermissions._revoke_failure_reason_validator), -] - -LinkSettings._access_level_validator = bv.Nullable(AccessLevel_validator) -LinkSettings._audience_validator = bv.Nullable(LinkAudience_validator) -LinkSettings._expiry_validator = bv.Nullable(LinkExpiry_validator) -LinkSettings._password_validator = bv.Nullable(LinkPassword_validator) -LinkSettings._all_field_names_ = set([ - 'access_level', - 'audience', - 'expiry', - 'password', -]) -LinkSettings._all_fields_ = [ - ('access_level', LinkSettings._access_level_validator), - ('audience', LinkSettings._audience_validator), - ('expiry', LinkSettings._expiry_validator), - ('password', LinkSettings._password_validator), -] - -ListFileMembersArg._file_validator = PathOrId_validator -ListFileMembersArg._actions_validator = bv.Nullable(bv.List(MemberAction_validator)) -ListFileMembersArg._include_inherited_validator = bv.Boolean() -ListFileMembersArg._limit_validator = bv.UInt32(min_value=1, max_value=300) -ListFileMembersArg._all_field_names_ = set([ - 'file', - 'actions', - 'include_inherited', - 'limit', -]) -ListFileMembersArg._all_fields_ = [ - ('file', ListFileMembersArg._file_validator), - ('actions', ListFileMembersArg._actions_validator), - ('include_inherited', ListFileMembersArg._include_inherited_validator), - ('limit', ListFileMembersArg._limit_validator), -] - -ListFileMembersBatchArg._files_validator = bv.List(PathOrId_validator, max_items=100) -ListFileMembersBatchArg._limit_validator = bv.UInt32(max_value=20) -ListFileMembersBatchArg._all_field_names_ = set([ - 'files', - 'limit', -]) -ListFileMembersBatchArg._all_fields_ = [ - ('files', ListFileMembersBatchArg._files_validator), - ('limit', ListFileMembersBatchArg._limit_validator), -] - -ListFileMembersBatchResult._file_validator = PathOrId_validator -ListFileMembersBatchResult._result_validator = ListFileMembersIndividualResult_validator -ListFileMembersBatchResult._all_field_names_ = set([ - 'file', - 'result', -]) -ListFileMembersBatchResult._all_fields_ = [ - ('file', ListFileMembersBatchResult._file_validator), - ('result', ListFileMembersBatchResult._result_validator), -] - -ListFileMembersContinueArg._cursor_validator = bv.String() -ListFileMembersContinueArg._all_field_names_ = set(['cursor']) -ListFileMembersContinueArg._all_fields_ = [('cursor', ListFileMembersContinueArg._cursor_validator)] - -ListFileMembersContinueError._user_error_validator = SharingUserError_validator -ListFileMembersContinueError._access_error_validator = SharingFileAccessError_validator -ListFileMembersContinueError._invalid_cursor_validator = bv.Void() -ListFileMembersContinueError._other_validator = bv.Void() -ListFileMembersContinueError._tagmap = { - 'user_error': ListFileMembersContinueError._user_error_validator, - 'access_error': ListFileMembersContinueError._access_error_validator, - 'invalid_cursor': ListFileMembersContinueError._invalid_cursor_validator, - 'other': ListFileMembersContinueError._other_validator, -} - -ListFileMembersContinueError.invalid_cursor = ListFileMembersContinueError('invalid_cursor') -ListFileMembersContinueError.other = ListFileMembersContinueError('other') - -ListFileMembersCountResult._members_validator = SharedFileMembers_validator -ListFileMembersCountResult._member_count_validator = bv.UInt32() -ListFileMembersCountResult._all_field_names_ = set([ - 'members', - 'member_count', -]) -ListFileMembersCountResult._all_fields_ = [ - ('members', ListFileMembersCountResult._members_validator), - ('member_count', ListFileMembersCountResult._member_count_validator), -] - -ListFileMembersError._user_error_validator = SharingUserError_validator -ListFileMembersError._access_error_validator = SharingFileAccessError_validator -ListFileMembersError._other_validator = bv.Void() -ListFileMembersError._tagmap = { - 'user_error': ListFileMembersError._user_error_validator, - 'access_error': ListFileMembersError._access_error_validator, - 'other': ListFileMembersError._other_validator, -} - -ListFileMembersError.other = ListFileMembersError('other') - -ListFileMembersIndividualResult._result_validator = ListFileMembersCountResult_validator -ListFileMembersIndividualResult._access_error_validator = SharingFileAccessError_validator -ListFileMembersIndividualResult._other_validator = bv.Void() -ListFileMembersIndividualResult._tagmap = { - 'result': ListFileMembersIndividualResult._result_validator, - 'access_error': ListFileMembersIndividualResult._access_error_validator, - 'other': ListFileMembersIndividualResult._other_validator, -} - -ListFileMembersIndividualResult.other = ListFileMembersIndividualResult('other') - -ListFilesArg._limit_validator = bv.UInt32(min_value=1, max_value=300) -ListFilesArg._actions_validator = bv.Nullable(bv.List(FileAction_validator)) -ListFilesArg._all_field_names_ = set([ - 'limit', - 'actions', -]) -ListFilesArg._all_fields_ = [ - ('limit', ListFilesArg._limit_validator), - ('actions', ListFilesArg._actions_validator), -] - -ListFilesContinueArg._cursor_validator = bv.String() -ListFilesContinueArg._all_field_names_ = set(['cursor']) -ListFilesContinueArg._all_fields_ = [('cursor', ListFilesContinueArg._cursor_validator)] - -ListFilesContinueError._user_error_validator = SharingUserError_validator -ListFilesContinueError._invalid_cursor_validator = bv.Void() -ListFilesContinueError._other_validator = bv.Void() -ListFilesContinueError._tagmap = { - 'user_error': ListFilesContinueError._user_error_validator, - 'invalid_cursor': ListFilesContinueError._invalid_cursor_validator, - 'other': ListFilesContinueError._other_validator, -} - -ListFilesContinueError.invalid_cursor = ListFilesContinueError('invalid_cursor') -ListFilesContinueError.other = ListFilesContinueError('other') - -ListFilesResult._entries_validator = bv.List(SharedFileMetadata_validator) -ListFilesResult._cursor_validator = bv.Nullable(bv.String()) -ListFilesResult._all_field_names_ = set([ - 'entries', - 'cursor', -]) -ListFilesResult._all_fields_ = [ - ('entries', ListFilesResult._entries_validator), - ('cursor', ListFilesResult._cursor_validator), -] - -ListFolderMembersCursorArg._actions_validator = bv.Nullable(bv.List(MemberAction_validator)) -ListFolderMembersCursorArg._limit_validator = bv.UInt32(min_value=1, max_value=1000) -ListFolderMembersCursorArg._all_field_names_ = set([ - 'actions', - 'limit', -]) -ListFolderMembersCursorArg._all_fields_ = [ - ('actions', ListFolderMembersCursorArg._actions_validator), - ('limit', ListFolderMembersCursorArg._limit_validator), -] - -ListFolderMembersArgs._shared_folder_id_validator = common.SharedFolderId_validator -ListFolderMembersArgs._all_field_names_ = ListFolderMembersCursorArg._all_field_names_.union(set(['shared_folder_id'])) -ListFolderMembersArgs._all_fields_ = ListFolderMembersCursorArg._all_fields_ + [('shared_folder_id', ListFolderMembersArgs._shared_folder_id_validator)] - -ListFolderMembersContinueArg._cursor_validator = bv.String() -ListFolderMembersContinueArg._all_field_names_ = set(['cursor']) -ListFolderMembersContinueArg._all_fields_ = [('cursor', ListFolderMembersContinueArg._cursor_validator)] - -ListFolderMembersContinueError._access_error_validator = SharedFolderAccessError_validator -ListFolderMembersContinueError._invalid_cursor_validator = bv.Void() -ListFolderMembersContinueError._other_validator = bv.Void() -ListFolderMembersContinueError._tagmap = { - 'access_error': ListFolderMembersContinueError._access_error_validator, - 'invalid_cursor': ListFolderMembersContinueError._invalid_cursor_validator, - 'other': ListFolderMembersContinueError._other_validator, -} - -ListFolderMembersContinueError.invalid_cursor = ListFolderMembersContinueError('invalid_cursor') -ListFolderMembersContinueError.other = ListFolderMembersContinueError('other') - -ListFoldersArgs._limit_validator = bv.UInt32(min_value=1, max_value=1000) -ListFoldersArgs._actions_validator = bv.Nullable(bv.List(FolderAction_validator)) -ListFoldersArgs._all_field_names_ = set([ - 'limit', - 'actions', -]) -ListFoldersArgs._all_fields_ = [ - ('limit', ListFoldersArgs._limit_validator), - ('actions', ListFoldersArgs._actions_validator), -] - -ListFoldersContinueArg._cursor_validator = bv.String() -ListFoldersContinueArg._all_field_names_ = set(['cursor']) -ListFoldersContinueArg._all_fields_ = [('cursor', ListFoldersContinueArg._cursor_validator)] - -ListFoldersContinueError._invalid_cursor_validator = bv.Void() -ListFoldersContinueError._other_validator = bv.Void() -ListFoldersContinueError._tagmap = { - 'invalid_cursor': ListFoldersContinueError._invalid_cursor_validator, - 'other': ListFoldersContinueError._other_validator, -} - -ListFoldersContinueError.invalid_cursor = ListFoldersContinueError('invalid_cursor') -ListFoldersContinueError.other = ListFoldersContinueError('other') - -ListFoldersResult._entries_validator = bv.List(SharedFolderMetadata_validator) -ListFoldersResult._cursor_validator = bv.Nullable(bv.String()) -ListFoldersResult._all_field_names_ = set([ - 'entries', - 'cursor', -]) -ListFoldersResult._all_fields_ = [ - ('entries', ListFoldersResult._entries_validator), - ('cursor', ListFoldersResult._cursor_validator), -] - -ListSharedLinksArg._path_validator = bv.Nullable(ReadPath_validator) -ListSharedLinksArg._cursor_validator = bv.Nullable(bv.String()) -ListSharedLinksArg._direct_only_validator = bv.Nullable(bv.Boolean()) -ListSharedLinksArg._all_field_names_ = set([ - 'path', - 'cursor', - 'direct_only', -]) -ListSharedLinksArg._all_fields_ = [ - ('path', ListSharedLinksArg._path_validator), - ('cursor', ListSharedLinksArg._cursor_validator), - ('direct_only', ListSharedLinksArg._direct_only_validator), -] - -ListSharedLinksError._path_validator = files.LookupError_validator -ListSharedLinksError._reset_validator = bv.Void() -ListSharedLinksError._other_validator = bv.Void() -ListSharedLinksError._tagmap = { - 'path': ListSharedLinksError._path_validator, - 'reset': ListSharedLinksError._reset_validator, - 'other': ListSharedLinksError._other_validator, -} - -ListSharedLinksError.reset = ListSharedLinksError('reset') -ListSharedLinksError.other = ListSharedLinksError('other') - -ListSharedLinksResult._links_validator = bv.List(SharedLinkMetadata_validator) -ListSharedLinksResult._has_more_validator = bv.Boolean() -ListSharedLinksResult._cursor_validator = bv.Nullable(bv.String()) -ListSharedLinksResult._all_field_names_ = set([ - 'links', - 'has_more', - 'cursor', -]) -ListSharedLinksResult._all_fields_ = [ - ('links', ListSharedLinksResult._links_validator), - ('has_more', ListSharedLinksResult._has_more_validator), - ('cursor', ListSharedLinksResult._cursor_validator), -] - -MemberAccessLevelResult._access_level_validator = bv.Nullable(AccessLevel_validator) -MemberAccessLevelResult._warning_validator = bv.Nullable(bv.String()) -MemberAccessLevelResult._access_details_validator = bv.Nullable(bv.List(ParentFolderAccessInfo_validator)) -MemberAccessLevelResult._all_field_names_ = set([ - 'access_level', - 'warning', - 'access_details', -]) -MemberAccessLevelResult._all_fields_ = [ - ('access_level', MemberAccessLevelResult._access_level_validator), - ('warning', MemberAccessLevelResult._warning_validator), - ('access_details', MemberAccessLevelResult._access_details_validator), -] - -MemberAction._leave_a_copy_validator = bv.Void() -MemberAction._make_editor_validator = bv.Void() -MemberAction._make_owner_validator = bv.Void() -MemberAction._make_viewer_validator = bv.Void() -MemberAction._make_viewer_no_comment_validator = bv.Void() -MemberAction._remove_validator = bv.Void() -MemberAction._other_validator = bv.Void() -MemberAction._tagmap = { - 'leave_a_copy': MemberAction._leave_a_copy_validator, - 'make_editor': MemberAction._make_editor_validator, - 'make_owner': MemberAction._make_owner_validator, - 'make_viewer': MemberAction._make_viewer_validator, - 'make_viewer_no_comment': MemberAction._make_viewer_no_comment_validator, - 'remove': MemberAction._remove_validator, - 'other': MemberAction._other_validator, -} - -MemberAction.leave_a_copy = MemberAction('leave_a_copy') -MemberAction.make_editor = MemberAction('make_editor') -MemberAction.make_owner = MemberAction('make_owner') -MemberAction.make_viewer = MemberAction('make_viewer') -MemberAction.make_viewer_no_comment = MemberAction('make_viewer_no_comment') -MemberAction.remove = MemberAction('remove') -MemberAction.other = MemberAction('other') - -MemberPermission._action_validator = MemberAction_validator -MemberPermission._allow_validator = bv.Boolean() -MemberPermission._reason_validator = bv.Nullable(PermissionDeniedReason_validator) -MemberPermission._all_field_names_ = set([ - 'action', - 'allow', - 'reason', -]) -MemberPermission._all_fields_ = [ - ('action', MemberPermission._action_validator), - ('allow', MemberPermission._allow_validator), - ('reason', MemberPermission._reason_validator), -] - -MemberPolicy._team_validator = bv.Void() -MemberPolicy._anyone_validator = bv.Void() -MemberPolicy._other_validator = bv.Void() -MemberPolicy._tagmap = { - 'team': MemberPolicy._team_validator, - 'anyone': MemberPolicy._anyone_validator, - 'other': MemberPolicy._other_validator, -} - -MemberPolicy.team = MemberPolicy('team') -MemberPolicy.anyone = MemberPolicy('anyone') -MemberPolicy.other = MemberPolicy('other') - -MemberSelector._dropbox_id_validator = DropboxId_validator -MemberSelector._email_validator = common.EmailAddress_validator -MemberSelector._other_validator = bv.Void() -MemberSelector._tagmap = { - 'dropbox_id': MemberSelector._dropbox_id_validator, - 'email': MemberSelector._email_validator, - 'other': MemberSelector._other_validator, -} - -MemberSelector.other = MemberSelector('other') - -ModifySharedLinkSettingsArgs._url_validator = bv.String() -ModifySharedLinkSettingsArgs._settings_validator = SharedLinkSettings_validator -ModifySharedLinkSettingsArgs._remove_expiration_validator = bv.Boolean() -ModifySharedLinkSettingsArgs._all_field_names_ = set([ - 'url', - 'settings', - 'remove_expiration', -]) -ModifySharedLinkSettingsArgs._all_fields_ = [ - ('url', ModifySharedLinkSettingsArgs._url_validator), - ('settings', ModifySharedLinkSettingsArgs._settings_validator), - ('remove_expiration', ModifySharedLinkSettingsArgs._remove_expiration_validator), -] - -ModifySharedLinkSettingsError._settings_error_validator = SharedLinkSettingsError_validator -ModifySharedLinkSettingsError._email_not_verified_validator = bv.Void() -ModifySharedLinkSettingsError._tagmap = { - 'settings_error': ModifySharedLinkSettingsError._settings_error_validator, - 'email_not_verified': ModifySharedLinkSettingsError._email_not_verified_validator, -} -ModifySharedLinkSettingsError._tagmap.update(SharedLinkError._tagmap) - -ModifySharedLinkSettingsError.email_not_verified = ModifySharedLinkSettingsError('email_not_verified') - -MountFolderArg._shared_folder_id_validator = common.SharedFolderId_validator -MountFolderArg._all_field_names_ = set(['shared_folder_id']) -MountFolderArg._all_fields_ = [('shared_folder_id', MountFolderArg._shared_folder_id_validator)] - -MountFolderError._access_error_validator = SharedFolderAccessError_validator -MountFolderError._inside_shared_folder_validator = bv.Void() -MountFolderError._insufficient_quota_validator = InsufficientQuotaAmounts_validator -MountFolderError._already_mounted_validator = bv.Void() -MountFolderError._no_permission_validator = bv.Void() -MountFolderError._not_mountable_validator = bv.Void() -MountFolderError._other_validator = bv.Void() -MountFolderError._tagmap = { - 'access_error': MountFolderError._access_error_validator, - 'inside_shared_folder': MountFolderError._inside_shared_folder_validator, - 'insufficient_quota': MountFolderError._insufficient_quota_validator, - 'already_mounted': MountFolderError._already_mounted_validator, - 'no_permission': MountFolderError._no_permission_validator, - 'not_mountable': MountFolderError._not_mountable_validator, - 'other': MountFolderError._other_validator, -} - -MountFolderError.inside_shared_folder = MountFolderError('inside_shared_folder') -MountFolderError.already_mounted = MountFolderError('already_mounted') -MountFolderError.no_permission = MountFolderError('no_permission') -MountFolderError.not_mountable = MountFolderError('not_mountable') -MountFolderError.other = MountFolderError('other') - -ParentFolderAccessInfo._folder_name_validator = bv.String() -ParentFolderAccessInfo._shared_folder_id_validator = common.SharedFolderId_validator -ParentFolderAccessInfo._permissions_validator = bv.List(MemberPermission_validator) -ParentFolderAccessInfo._path_validator = bv.String() -ParentFolderAccessInfo._all_field_names_ = set([ - 'folder_name', - 'shared_folder_id', - 'permissions', - 'path', -]) -ParentFolderAccessInfo._all_fields_ = [ - ('folder_name', ParentFolderAccessInfo._folder_name_validator), - ('shared_folder_id', ParentFolderAccessInfo._shared_folder_id_validator), - ('permissions', ParentFolderAccessInfo._permissions_validator), - ('path', ParentFolderAccessInfo._path_validator), -] - -PathLinkMetadata._path_validator = bv.String() -PathLinkMetadata._field_names_ = set(['path']) -PathLinkMetadata._all_field_names_ = LinkMetadata._all_field_names_.union(PathLinkMetadata._field_names_) -PathLinkMetadata._fields_ = [('path', PathLinkMetadata._path_validator)] -PathLinkMetadata._all_fields_ = LinkMetadata._all_fields_ + PathLinkMetadata._fields_ - -PendingUploadMode._file_validator = bv.Void() -PendingUploadMode._folder_validator = bv.Void() -PendingUploadMode._tagmap = { - 'file': PendingUploadMode._file_validator, - 'folder': PendingUploadMode._folder_validator, -} - -PendingUploadMode.file = PendingUploadMode('file') -PendingUploadMode.folder = PendingUploadMode('folder') - -PermissionDeniedReason._user_not_same_team_as_owner_validator = bv.Void() -PermissionDeniedReason._user_not_allowed_by_owner_validator = bv.Void() -PermissionDeniedReason._target_is_indirect_member_validator = bv.Void() -PermissionDeniedReason._target_is_owner_validator = bv.Void() -PermissionDeniedReason._target_is_self_validator = bv.Void() -PermissionDeniedReason._target_not_active_validator = bv.Void() -PermissionDeniedReason._folder_is_limited_team_folder_validator = bv.Void() -PermissionDeniedReason._owner_not_on_team_validator = bv.Void() -PermissionDeniedReason._permission_denied_validator = bv.Void() -PermissionDeniedReason._restricted_by_team_validator = bv.Void() -PermissionDeniedReason._user_account_type_validator = bv.Void() -PermissionDeniedReason._user_not_on_team_validator = bv.Void() -PermissionDeniedReason._folder_is_inside_shared_folder_validator = bv.Void() -PermissionDeniedReason._restricted_by_parent_folder_validator = bv.Void() -PermissionDeniedReason._insufficient_plan_validator = InsufficientPlan_validator -PermissionDeniedReason._other_validator = bv.Void() -PermissionDeniedReason._tagmap = { - 'user_not_same_team_as_owner': PermissionDeniedReason._user_not_same_team_as_owner_validator, - 'user_not_allowed_by_owner': PermissionDeniedReason._user_not_allowed_by_owner_validator, - 'target_is_indirect_member': PermissionDeniedReason._target_is_indirect_member_validator, - 'target_is_owner': PermissionDeniedReason._target_is_owner_validator, - 'target_is_self': PermissionDeniedReason._target_is_self_validator, - 'target_not_active': PermissionDeniedReason._target_not_active_validator, - 'folder_is_limited_team_folder': PermissionDeniedReason._folder_is_limited_team_folder_validator, - 'owner_not_on_team': PermissionDeniedReason._owner_not_on_team_validator, - 'permission_denied': PermissionDeniedReason._permission_denied_validator, - 'restricted_by_team': PermissionDeniedReason._restricted_by_team_validator, - 'user_account_type': PermissionDeniedReason._user_account_type_validator, - 'user_not_on_team': PermissionDeniedReason._user_not_on_team_validator, - 'folder_is_inside_shared_folder': PermissionDeniedReason._folder_is_inside_shared_folder_validator, - 'restricted_by_parent_folder': PermissionDeniedReason._restricted_by_parent_folder_validator, - 'insufficient_plan': PermissionDeniedReason._insufficient_plan_validator, - 'other': PermissionDeniedReason._other_validator, -} - -PermissionDeniedReason.user_not_same_team_as_owner = PermissionDeniedReason('user_not_same_team_as_owner') -PermissionDeniedReason.user_not_allowed_by_owner = PermissionDeniedReason('user_not_allowed_by_owner') -PermissionDeniedReason.target_is_indirect_member = PermissionDeniedReason('target_is_indirect_member') -PermissionDeniedReason.target_is_owner = PermissionDeniedReason('target_is_owner') -PermissionDeniedReason.target_is_self = PermissionDeniedReason('target_is_self') -PermissionDeniedReason.target_not_active = PermissionDeniedReason('target_not_active') -PermissionDeniedReason.folder_is_limited_team_folder = PermissionDeniedReason('folder_is_limited_team_folder') -PermissionDeniedReason.owner_not_on_team = PermissionDeniedReason('owner_not_on_team') -PermissionDeniedReason.permission_denied = PermissionDeniedReason('permission_denied') -PermissionDeniedReason.restricted_by_team = PermissionDeniedReason('restricted_by_team') -PermissionDeniedReason.user_account_type = PermissionDeniedReason('user_account_type') -PermissionDeniedReason.user_not_on_team = PermissionDeniedReason('user_not_on_team') -PermissionDeniedReason.folder_is_inside_shared_folder = PermissionDeniedReason('folder_is_inside_shared_folder') -PermissionDeniedReason.restricted_by_parent_folder = PermissionDeniedReason('restricted_by_parent_folder') -PermissionDeniedReason.other = PermissionDeniedReason('other') - -RelinquishFileMembershipArg._file_validator = PathOrId_validator -RelinquishFileMembershipArg._all_field_names_ = set(['file']) -RelinquishFileMembershipArg._all_fields_ = [('file', RelinquishFileMembershipArg._file_validator)] - -RelinquishFileMembershipError._access_error_validator = SharingFileAccessError_validator -RelinquishFileMembershipError._group_access_validator = bv.Void() -RelinquishFileMembershipError._no_permission_validator = bv.Void() -RelinquishFileMembershipError._other_validator = bv.Void() -RelinquishFileMembershipError._tagmap = { - 'access_error': RelinquishFileMembershipError._access_error_validator, - 'group_access': RelinquishFileMembershipError._group_access_validator, - 'no_permission': RelinquishFileMembershipError._no_permission_validator, - 'other': RelinquishFileMembershipError._other_validator, -} - -RelinquishFileMembershipError.group_access = RelinquishFileMembershipError('group_access') -RelinquishFileMembershipError.no_permission = RelinquishFileMembershipError('no_permission') -RelinquishFileMembershipError.other = RelinquishFileMembershipError('other') - -RelinquishFolderMembershipArg._shared_folder_id_validator = common.SharedFolderId_validator -RelinquishFolderMembershipArg._leave_a_copy_validator = bv.Boolean() -RelinquishFolderMembershipArg._all_field_names_ = set([ - 'shared_folder_id', - 'leave_a_copy', -]) -RelinquishFolderMembershipArg._all_fields_ = [ - ('shared_folder_id', RelinquishFolderMembershipArg._shared_folder_id_validator), - ('leave_a_copy', RelinquishFolderMembershipArg._leave_a_copy_validator), -] - -RelinquishFolderMembershipError._access_error_validator = SharedFolderAccessError_validator -RelinquishFolderMembershipError._folder_owner_validator = bv.Void() -RelinquishFolderMembershipError._mounted_validator = bv.Void() -RelinquishFolderMembershipError._group_access_validator = bv.Void() -RelinquishFolderMembershipError._team_folder_validator = bv.Void() -RelinquishFolderMembershipError._no_permission_validator = bv.Void() -RelinquishFolderMembershipError._no_explicit_access_validator = bv.Void() -RelinquishFolderMembershipError._other_validator = bv.Void() -RelinquishFolderMembershipError._tagmap = { - 'access_error': RelinquishFolderMembershipError._access_error_validator, - 'folder_owner': RelinquishFolderMembershipError._folder_owner_validator, - 'mounted': RelinquishFolderMembershipError._mounted_validator, - 'group_access': RelinquishFolderMembershipError._group_access_validator, - 'team_folder': RelinquishFolderMembershipError._team_folder_validator, - 'no_permission': RelinquishFolderMembershipError._no_permission_validator, - 'no_explicit_access': RelinquishFolderMembershipError._no_explicit_access_validator, - 'other': RelinquishFolderMembershipError._other_validator, -} - -RelinquishFolderMembershipError.folder_owner = RelinquishFolderMembershipError('folder_owner') -RelinquishFolderMembershipError.mounted = RelinquishFolderMembershipError('mounted') -RelinquishFolderMembershipError.group_access = RelinquishFolderMembershipError('group_access') -RelinquishFolderMembershipError.team_folder = RelinquishFolderMembershipError('team_folder') -RelinquishFolderMembershipError.no_permission = RelinquishFolderMembershipError('no_permission') -RelinquishFolderMembershipError.no_explicit_access = RelinquishFolderMembershipError('no_explicit_access') -RelinquishFolderMembershipError.other = RelinquishFolderMembershipError('other') - -RemoveFileMemberArg._file_validator = PathOrId_validator -RemoveFileMemberArg._member_validator = MemberSelector_validator -RemoveFileMemberArg._all_field_names_ = set([ - 'file', - 'member', -]) -RemoveFileMemberArg._all_fields_ = [ - ('file', RemoveFileMemberArg._file_validator), - ('member', RemoveFileMemberArg._member_validator), -] - -RemoveFileMemberError._user_error_validator = SharingUserError_validator -RemoveFileMemberError._access_error_validator = SharingFileAccessError_validator -RemoveFileMemberError._no_explicit_access_validator = MemberAccessLevelResult_validator -RemoveFileMemberError._other_validator = bv.Void() -RemoveFileMemberError._tagmap = { - 'user_error': RemoveFileMemberError._user_error_validator, - 'access_error': RemoveFileMemberError._access_error_validator, - 'no_explicit_access': RemoveFileMemberError._no_explicit_access_validator, - 'other': RemoveFileMemberError._other_validator, -} - -RemoveFileMemberError.other = RemoveFileMemberError('other') - -RemoveFolderMemberArg._shared_folder_id_validator = common.SharedFolderId_validator -RemoveFolderMemberArg._member_validator = MemberSelector_validator -RemoveFolderMemberArg._leave_a_copy_validator = bv.Boolean() -RemoveFolderMemberArg._all_field_names_ = set([ - 'shared_folder_id', - 'member', - 'leave_a_copy', -]) -RemoveFolderMemberArg._all_fields_ = [ - ('shared_folder_id', RemoveFolderMemberArg._shared_folder_id_validator), - ('member', RemoveFolderMemberArg._member_validator), - ('leave_a_copy', RemoveFolderMemberArg._leave_a_copy_validator), -] - -RemoveFolderMemberError._access_error_validator = SharedFolderAccessError_validator -RemoveFolderMemberError._member_error_validator = SharedFolderMemberError_validator -RemoveFolderMemberError._folder_owner_validator = bv.Void() -RemoveFolderMemberError._group_access_validator = bv.Void() -RemoveFolderMemberError._team_folder_validator = bv.Void() -RemoveFolderMemberError._no_permission_validator = bv.Void() -RemoveFolderMemberError._other_validator = bv.Void() -RemoveFolderMemberError._tagmap = { - 'access_error': RemoveFolderMemberError._access_error_validator, - 'member_error': RemoveFolderMemberError._member_error_validator, - 'folder_owner': RemoveFolderMemberError._folder_owner_validator, - 'group_access': RemoveFolderMemberError._group_access_validator, - 'team_folder': RemoveFolderMemberError._team_folder_validator, - 'no_permission': RemoveFolderMemberError._no_permission_validator, - 'other': RemoveFolderMemberError._other_validator, -} - -RemoveFolderMemberError.folder_owner = RemoveFolderMemberError('folder_owner') -RemoveFolderMemberError.group_access = RemoveFolderMemberError('group_access') -RemoveFolderMemberError.team_folder = RemoveFolderMemberError('team_folder') -RemoveFolderMemberError.no_permission = RemoveFolderMemberError('no_permission') -RemoveFolderMemberError.other = RemoveFolderMemberError('other') - -RemoveMemberJobStatus._complete_validator = MemberAccessLevelResult_validator -RemoveMemberJobStatus._failed_validator = RemoveFolderMemberError_validator -RemoveMemberJobStatus._tagmap = { - 'complete': RemoveMemberJobStatus._complete_validator, - 'failed': RemoveMemberJobStatus._failed_validator, -} -RemoveMemberJobStatus._tagmap.update(async.PollResultBase._tagmap) - -RequestedVisibility._public_validator = bv.Void() -RequestedVisibility._team_only_validator = bv.Void() -RequestedVisibility._password_validator = bv.Void() -RequestedVisibility._tagmap = { - 'public': RequestedVisibility._public_validator, - 'team_only': RequestedVisibility._team_only_validator, - 'password': RequestedVisibility._password_validator, -} - -RequestedVisibility.public = RequestedVisibility('public') -RequestedVisibility.team_only = RequestedVisibility('team_only') -RequestedVisibility.password = RequestedVisibility('password') - -ResolvedVisibility._team_and_password_validator = bv.Void() -ResolvedVisibility._shared_folder_only_validator = bv.Void() -ResolvedVisibility._other_validator = bv.Void() -ResolvedVisibility._tagmap = { - 'team_and_password': ResolvedVisibility._team_and_password_validator, - 'shared_folder_only': ResolvedVisibility._shared_folder_only_validator, - 'other': ResolvedVisibility._other_validator, -} -ResolvedVisibility._tagmap.update(RequestedVisibility._tagmap) - -ResolvedVisibility.team_and_password = ResolvedVisibility('team_and_password') -ResolvedVisibility.shared_folder_only = ResolvedVisibility('shared_folder_only') -ResolvedVisibility.other = ResolvedVisibility('other') - -RevokeSharedLinkArg._url_validator = bv.String() -RevokeSharedLinkArg._all_field_names_ = set(['url']) -RevokeSharedLinkArg._all_fields_ = [('url', RevokeSharedLinkArg._url_validator)] - -RevokeSharedLinkError._shared_link_malformed_validator = bv.Void() -RevokeSharedLinkError._tagmap = { - 'shared_link_malformed': RevokeSharedLinkError._shared_link_malformed_validator, -} -RevokeSharedLinkError._tagmap.update(SharedLinkError._tagmap) - -RevokeSharedLinkError.shared_link_malformed = RevokeSharedLinkError('shared_link_malformed') - -ShareFolderArgBase._acl_update_policy_validator = bv.Nullable(AclUpdatePolicy_validator) -ShareFolderArgBase._force_async_validator = bv.Boolean() -ShareFolderArgBase._member_policy_validator = bv.Nullable(MemberPolicy_validator) -ShareFolderArgBase._path_validator = files.WritePath_validator -ShareFolderArgBase._shared_link_policy_validator = bv.Nullable(SharedLinkPolicy_validator) -ShareFolderArgBase._viewer_info_policy_validator = bv.Nullable(ViewerInfoPolicy_validator) -ShareFolderArgBase._all_field_names_ = set([ - 'acl_update_policy', - 'force_async', - 'member_policy', - 'path', - 'shared_link_policy', - 'viewer_info_policy', -]) -ShareFolderArgBase._all_fields_ = [ - ('acl_update_policy', ShareFolderArgBase._acl_update_policy_validator), - ('force_async', ShareFolderArgBase._force_async_validator), - ('member_policy', ShareFolderArgBase._member_policy_validator), - ('path', ShareFolderArgBase._path_validator), - ('shared_link_policy', ShareFolderArgBase._shared_link_policy_validator), - ('viewer_info_policy', ShareFolderArgBase._viewer_info_policy_validator), -] - -ShareFolderArg._actions_validator = bv.Nullable(bv.List(FolderAction_validator)) -ShareFolderArg._link_settings_validator = bv.Nullable(LinkSettings_validator) -ShareFolderArg._all_field_names_ = ShareFolderArgBase._all_field_names_.union(set([ - 'actions', - 'link_settings', -])) -ShareFolderArg._all_fields_ = ShareFolderArgBase._all_fields_ + [ - ('actions', ShareFolderArg._actions_validator), - ('link_settings', ShareFolderArg._link_settings_validator), -] - -ShareFolderErrorBase._email_unverified_validator = bv.Void() -ShareFolderErrorBase._bad_path_validator = SharePathError_validator -ShareFolderErrorBase._team_policy_disallows_member_policy_validator = bv.Void() -ShareFolderErrorBase._disallowed_shared_link_policy_validator = bv.Void() -ShareFolderErrorBase._other_validator = bv.Void() -ShareFolderErrorBase._tagmap = { - 'email_unverified': ShareFolderErrorBase._email_unverified_validator, - 'bad_path': ShareFolderErrorBase._bad_path_validator, - 'team_policy_disallows_member_policy': ShareFolderErrorBase._team_policy_disallows_member_policy_validator, - 'disallowed_shared_link_policy': ShareFolderErrorBase._disallowed_shared_link_policy_validator, - 'other': ShareFolderErrorBase._other_validator, -} - -ShareFolderErrorBase.email_unverified = ShareFolderErrorBase('email_unverified') -ShareFolderErrorBase.team_policy_disallows_member_policy = ShareFolderErrorBase('team_policy_disallows_member_policy') -ShareFolderErrorBase.disallowed_shared_link_policy = ShareFolderErrorBase('disallowed_shared_link_policy') -ShareFolderErrorBase.other = ShareFolderErrorBase('other') - -ShareFolderError._no_permission_validator = bv.Void() -ShareFolderError._tagmap = { - 'no_permission': ShareFolderError._no_permission_validator, -} -ShareFolderError._tagmap.update(ShareFolderErrorBase._tagmap) - -ShareFolderError.no_permission = ShareFolderError('no_permission') - -ShareFolderJobStatus._complete_validator = SharedFolderMetadata_validator -ShareFolderJobStatus._failed_validator = ShareFolderError_validator -ShareFolderJobStatus._tagmap = { - 'complete': ShareFolderJobStatus._complete_validator, - 'failed': ShareFolderJobStatus._failed_validator, -} -ShareFolderJobStatus._tagmap.update(async.PollResultBase._tagmap) - -ShareFolderLaunch._complete_validator = SharedFolderMetadata_validator -ShareFolderLaunch._tagmap = { - 'complete': ShareFolderLaunch._complete_validator, -} -ShareFolderLaunch._tagmap.update(async.LaunchResultBase._tagmap) - -SharePathError._is_file_validator = bv.Void() -SharePathError._inside_shared_folder_validator = bv.Void() -SharePathError._contains_shared_folder_validator = bv.Void() -SharePathError._contains_app_folder_validator = bv.Void() -SharePathError._contains_team_folder_validator = bv.Void() -SharePathError._is_app_folder_validator = bv.Void() -SharePathError._inside_app_folder_validator = bv.Void() -SharePathError._is_public_folder_validator = bv.Void() -SharePathError._inside_public_folder_validator = bv.Void() -SharePathError._already_shared_validator = SharedFolderMetadata_validator -SharePathError._invalid_path_validator = bv.Void() -SharePathError._is_osx_package_validator = bv.Void() -SharePathError._inside_osx_package_validator = bv.Void() -SharePathError._other_validator = bv.Void() -SharePathError._tagmap = { - 'is_file': SharePathError._is_file_validator, - 'inside_shared_folder': SharePathError._inside_shared_folder_validator, - 'contains_shared_folder': SharePathError._contains_shared_folder_validator, - 'contains_app_folder': SharePathError._contains_app_folder_validator, - 'contains_team_folder': SharePathError._contains_team_folder_validator, - 'is_app_folder': SharePathError._is_app_folder_validator, - 'inside_app_folder': SharePathError._inside_app_folder_validator, - 'is_public_folder': SharePathError._is_public_folder_validator, - 'inside_public_folder': SharePathError._inside_public_folder_validator, - 'already_shared': SharePathError._already_shared_validator, - 'invalid_path': SharePathError._invalid_path_validator, - 'is_osx_package': SharePathError._is_osx_package_validator, - 'inside_osx_package': SharePathError._inside_osx_package_validator, - 'other': SharePathError._other_validator, -} - -SharePathError.is_file = SharePathError('is_file') -SharePathError.inside_shared_folder = SharePathError('inside_shared_folder') -SharePathError.contains_shared_folder = SharePathError('contains_shared_folder') -SharePathError.contains_app_folder = SharePathError('contains_app_folder') -SharePathError.contains_team_folder = SharePathError('contains_team_folder') -SharePathError.is_app_folder = SharePathError('is_app_folder') -SharePathError.inside_app_folder = SharePathError('inside_app_folder') -SharePathError.is_public_folder = SharePathError('is_public_folder') -SharePathError.inside_public_folder = SharePathError('inside_public_folder') -SharePathError.invalid_path = SharePathError('invalid_path') -SharePathError.is_osx_package = SharePathError('is_osx_package') -SharePathError.inside_osx_package = SharePathError('inside_osx_package') -SharePathError.other = SharePathError('other') - -SharedContentLinkMetadata._audience_exceptions_validator = bv.Nullable(AudienceExceptions_validator) -SharedContentLinkMetadata._url_validator = bv.String() -SharedContentLinkMetadata._all_field_names_ = SharedContentLinkMetadataBase._all_field_names_.union(set([ - 'audience_exceptions', - 'url', -])) -SharedContentLinkMetadata._all_fields_ = SharedContentLinkMetadataBase._all_fields_ + [ - ('audience_exceptions', SharedContentLinkMetadata._audience_exceptions_validator), - ('url', SharedContentLinkMetadata._url_validator), -] - -SharedFileMembers._users_validator = bv.List(UserFileMembershipInfo_validator) -SharedFileMembers._groups_validator = bv.List(GroupMembershipInfo_validator) -SharedFileMembers._invitees_validator = bv.List(InviteeMembershipInfo_validator) -SharedFileMembers._cursor_validator = bv.Nullable(bv.String()) -SharedFileMembers._all_field_names_ = set([ - 'users', - 'groups', - 'invitees', - 'cursor', -]) -SharedFileMembers._all_fields_ = [ - ('users', SharedFileMembers._users_validator), - ('groups', SharedFileMembers._groups_validator), - ('invitees', SharedFileMembers._invitees_validator), - ('cursor', SharedFileMembers._cursor_validator), -] - -SharedFileMetadata._access_type_validator = bv.Nullable(AccessLevel_validator) -SharedFileMetadata._id_validator = FileId_validator -SharedFileMetadata._expected_link_metadata_validator = bv.Nullable(ExpectedSharedContentLinkMetadata_validator) -SharedFileMetadata._link_metadata_validator = bv.Nullable(SharedContentLinkMetadata_validator) -SharedFileMetadata._name_validator = bv.String() -SharedFileMetadata._owner_display_names_validator = bv.Nullable(bv.List(bv.String())) -SharedFileMetadata._owner_team_validator = bv.Nullable(users.Team_validator) -SharedFileMetadata._parent_shared_folder_id_validator = bv.Nullable(common.SharedFolderId_validator) -SharedFileMetadata._path_display_validator = bv.Nullable(bv.String()) -SharedFileMetadata._path_lower_validator = bv.Nullable(bv.String()) -SharedFileMetadata._permissions_validator = bv.Nullable(bv.List(FilePermission_validator)) -SharedFileMetadata._policy_validator = FolderPolicy_validator -SharedFileMetadata._preview_url_validator = bv.String() -SharedFileMetadata._time_invited_validator = bv.Nullable(common.DropboxTimestamp_validator) -SharedFileMetadata._all_field_names_ = set([ - 'access_type', - 'id', - 'expected_link_metadata', - 'link_metadata', - 'name', - 'owner_display_names', - 'owner_team', - 'parent_shared_folder_id', - 'path_display', - 'path_lower', - 'permissions', - 'policy', - 'preview_url', - 'time_invited', -]) -SharedFileMetadata._all_fields_ = [ - ('access_type', SharedFileMetadata._access_type_validator), - ('id', SharedFileMetadata._id_validator), - ('expected_link_metadata', SharedFileMetadata._expected_link_metadata_validator), - ('link_metadata', SharedFileMetadata._link_metadata_validator), - ('name', SharedFileMetadata._name_validator), - ('owner_display_names', SharedFileMetadata._owner_display_names_validator), - ('owner_team', SharedFileMetadata._owner_team_validator), - ('parent_shared_folder_id', SharedFileMetadata._parent_shared_folder_id_validator), - ('path_display', SharedFileMetadata._path_display_validator), - ('path_lower', SharedFileMetadata._path_lower_validator), - ('permissions', SharedFileMetadata._permissions_validator), - ('policy', SharedFileMetadata._policy_validator), - ('preview_url', SharedFileMetadata._preview_url_validator), - ('time_invited', SharedFileMetadata._time_invited_validator), -] - -SharedFolderAccessError._invalid_id_validator = bv.Void() -SharedFolderAccessError._not_a_member_validator = bv.Void() -SharedFolderAccessError._email_unverified_validator = bv.Void() -SharedFolderAccessError._unmounted_validator = bv.Void() -SharedFolderAccessError._other_validator = bv.Void() -SharedFolderAccessError._tagmap = { - 'invalid_id': SharedFolderAccessError._invalid_id_validator, - 'not_a_member': SharedFolderAccessError._not_a_member_validator, - 'email_unverified': SharedFolderAccessError._email_unverified_validator, - 'unmounted': SharedFolderAccessError._unmounted_validator, - 'other': SharedFolderAccessError._other_validator, -} - -SharedFolderAccessError.invalid_id = SharedFolderAccessError('invalid_id') -SharedFolderAccessError.not_a_member = SharedFolderAccessError('not_a_member') -SharedFolderAccessError.email_unverified = SharedFolderAccessError('email_unverified') -SharedFolderAccessError.unmounted = SharedFolderAccessError('unmounted') -SharedFolderAccessError.other = SharedFolderAccessError('other') - -SharedFolderMemberError._invalid_dropbox_id_validator = bv.Void() -SharedFolderMemberError._not_a_member_validator = bv.Void() -SharedFolderMemberError._no_explicit_access_validator = MemberAccessLevelResult_validator -SharedFolderMemberError._other_validator = bv.Void() -SharedFolderMemberError._tagmap = { - 'invalid_dropbox_id': SharedFolderMemberError._invalid_dropbox_id_validator, - 'not_a_member': SharedFolderMemberError._not_a_member_validator, - 'no_explicit_access': SharedFolderMemberError._no_explicit_access_validator, - 'other': SharedFolderMemberError._other_validator, -} - -SharedFolderMemberError.invalid_dropbox_id = SharedFolderMemberError('invalid_dropbox_id') -SharedFolderMemberError.not_a_member = SharedFolderMemberError('not_a_member') -SharedFolderMemberError.other = SharedFolderMemberError('other') - -SharedFolderMembers._users_validator = bv.List(UserMembershipInfo_validator) -SharedFolderMembers._groups_validator = bv.List(GroupMembershipInfo_validator) -SharedFolderMembers._invitees_validator = bv.List(InviteeMembershipInfo_validator) -SharedFolderMembers._cursor_validator = bv.Nullable(bv.String()) -SharedFolderMembers._all_field_names_ = set([ - 'users', - 'groups', - 'invitees', - 'cursor', -]) -SharedFolderMembers._all_fields_ = [ - ('users', SharedFolderMembers._users_validator), - ('groups', SharedFolderMembers._groups_validator), - ('invitees', SharedFolderMembers._invitees_validator), - ('cursor', SharedFolderMembers._cursor_validator), -] - -SharedFolderMetadataBase._access_type_validator = AccessLevel_validator -SharedFolderMetadataBase._is_inside_team_folder_validator = bv.Boolean() -SharedFolderMetadataBase._is_team_folder_validator = bv.Boolean() -SharedFolderMetadataBase._owner_display_names_validator = bv.Nullable(bv.List(bv.String())) -SharedFolderMetadataBase._owner_team_validator = bv.Nullable(users.Team_validator) -SharedFolderMetadataBase._parent_shared_folder_id_validator = bv.Nullable(common.SharedFolderId_validator) -SharedFolderMetadataBase._path_lower_validator = bv.Nullable(bv.String()) -SharedFolderMetadataBase._all_field_names_ = set([ - 'access_type', - 'is_inside_team_folder', - 'is_team_folder', - 'owner_display_names', - 'owner_team', - 'parent_shared_folder_id', - 'path_lower', -]) -SharedFolderMetadataBase._all_fields_ = [ - ('access_type', SharedFolderMetadataBase._access_type_validator), - ('is_inside_team_folder', SharedFolderMetadataBase._is_inside_team_folder_validator), - ('is_team_folder', SharedFolderMetadataBase._is_team_folder_validator), - ('owner_display_names', SharedFolderMetadataBase._owner_display_names_validator), - ('owner_team', SharedFolderMetadataBase._owner_team_validator), - ('parent_shared_folder_id', SharedFolderMetadataBase._parent_shared_folder_id_validator), - ('path_lower', SharedFolderMetadataBase._path_lower_validator), -] - -SharedFolderMetadata._link_metadata_validator = bv.Nullable(SharedContentLinkMetadata_validator) -SharedFolderMetadata._name_validator = bv.String() -SharedFolderMetadata._permissions_validator = bv.Nullable(bv.List(FolderPermission_validator)) -SharedFolderMetadata._policy_validator = FolderPolicy_validator -SharedFolderMetadata._preview_url_validator = bv.String() -SharedFolderMetadata._shared_folder_id_validator = common.SharedFolderId_validator -SharedFolderMetadata._time_invited_validator = common.DropboxTimestamp_validator -SharedFolderMetadata._all_field_names_ = SharedFolderMetadataBase._all_field_names_.union(set([ - 'link_metadata', - 'name', - 'permissions', - 'policy', - 'preview_url', - 'shared_folder_id', - 'time_invited', -])) -SharedFolderMetadata._all_fields_ = SharedFolderMetadataBase._all_fields_ + [ - ('link_metadata', SharedFolderMetadata._link_metadata_validator), - ('name', SharedFolderMetadata._name_validator), - ('permissions', SharedFolderMetadata._permissions_validator), - ('policy', SharedFolderMetadata._policy_validator), - ('preview_url', SharedFolderMetadata._preview_url_validator), - ('shared_folder_id', SharedFolderMetadata._shared_folder_id_validator), - ('time_invited', SharedFolderMetadata._time_invited_validator), -] - -SharedLinkAccessFailureReason._login_required_validator = bv.Void() -SharedLinkAccessFailureReason._email_verify_required_validator = bv.Void() -SharedLinkAccessFailureReason._password_required_validator = bv.Void() -SharedLinkAccessFailureReason._team_only_validator = bv.Void() -SharedLinkAccessFailureReason._owner_only_validator = bv.Void() -SharedLinkAccessFailureReason._other_validator = bv.Void() -SharedLinkAccessFailureReason._tagmap = { - 'login_required': SharedLinkAccessFailureReason._login_required_validator, - 'email_verify_required': SharedLinkAccessFailureReason._email_verify_required_validator, - 'password_required': SharedLinkAccessFailureReason._password_required_validator, - 'team_only': SharedLinkAccessFailureReason._team_only_validator, - 'owner_only': SharedLinkAccessFailureReason._owner_only_validator, - 'other': SharedLinkAccessFailureReason._other_validator, -} - -SharedLinkAccessFailureReason.login_required = SharedLinkAccessFailureReason('login_required') -SharedLinkAccessFailureReason.email_verify_required = SharedLinkAccessFailureReason('email_verify_required') -SharedLinkAccessFailureReason.password_required = SharedLinkAccessFailureReason('password_required') -SharedLinkAccessFailureReason.team_only = SharedLinkAccessFailureReason('team_only') -SharedLinkAccessFailureReason.owner_only = SharedLinkAccessFailureReason('owner_only') -SharedLinkAccessFailureReason.other = SharedLinkAccessFailureReason('other') - -SharedLinkPolicy._anyone_validator = bv.Void() -SharedLinkPolicy._team_validator = bv.Void() -SharedLinkPolicy._members_validator = bv.Void() -SharedLinkPolicy._other_validator = bv.Void() -SharedLinkPolicy._tagmap = { - 'anyone': SharedLinkPolicy._anyone_validator, - 'team': SharedLinkPolicy._team_validator, - 'members': SharedLinkPolicy._members_validator, - 'other': SharedLinkPolicy._other_validator, -} - -SharedLinkPolicy.anyone = SharedLinkPolicy('anyone') -SharedLinkPolicy.team = SharedLinkPolicy('team') -SharedLinkPolicy.members = SharedLinkPolicy('members') -SharedLinkPolicy.other = SharedLinkPolicy('other') - -SharedLinkSettings._requested_visibility_validator = bv.Nullable(RequestedVisibility_validator) -SharedLinkSettings._link_password_validator = bv.Nullable(bv.String()) -SharedLinkSettings._expires_validator = bv.Nullable(common.DropboxTimestamp_validator) -SharedLinkSettings._all_field_names_ = set([ - 'requested_visibility', - 'link_password', - 'expires', -]) -SharedLinkSettings._all_fields_ = [ - ('requested_visibility', SharedLinkSettings._requested_visibility_validator), - ('link_password', SharedLinkSettings._link_password_validator), - ('expires', SharedLinkSettings._expires_validator), -] - -SharedLinkSettingsError._invalid_settings_validator = bv.Void() -SharedLinkSettingsError._not_authorized_validator = bv.Void() -SharedLinkSettingsError._tagmap = { - 'invalid_settings': SharedLinkSettingsError._invalid_settings_validator, - 'not_authorized': SharedLinkSettingsError._not_authorized_validator, -} - -SharedLinkSettingsError.invalid_settings = SharedLinkSettingsError('invalid_settings') -SharedLinkSettingsError.not_authorized = SharedLinkSettingsError('not_authorized') - -SharingFileAccessError._no_permission_validator = bv.Void() -SharingFileAccessError._invalid_file_validator = bv.Void() -SharingFileAccessError._is_folder_validator = bv.Void() -SharingFileAccessError._inside_public_folder_validator = bv.Void() -SharingFileAccessError._inside_osx_package_validator = bv.Void() -SharingFileAccessError._other_validator = bv.Void() -SharingFileAccessError._tagmap = { - 'no_permission': SharingFileAccessError._no_permission_validator, - 'invalid_file': SharingFileAccessError._invalid_file_validator, - 'is_folder': SharingFileAccessError._is_folder_validator, - 'inside_public_folder': SharingFileAccessError._inside_public_folder_validator, - 'inside_osx_package': SharingFileAccessError._inside_osx_package_validator, - 'other': SharingFileAccessError._other_validator, -} - -SharingFileAccessError.no_permission = SharingFileAccessError('no_permission') -SharingFileAccessError.invalid_file = SharingFileAccessError('invalid_file') -SharingFileAccessError.is_folder = SharingFileAccessError('is_folder') -SharingFileAccessError.inside_public_folder = SharingFileAccessError('inside_public_folder') -SharingFileAccessError.inside_osx_package = SharingFileAccessError('inside_osx_package') -SharingFileAccessError.other = SharingFileAccessError('other') - -SharingUserError._email_unverified_validator = bv.Void() -SharingUserError._other_validator = bv.Void() -SharingUserError._tagmap = { - 'email_unverified': SharingUserError._email_unverified_validator, - 'other': SharingUserError._other_validator, -} - -SharingUserError.email_unverified = SharingUserError('email_unverified') -SharingUserError.other = SharingUserError('other') - -TeamMemberInfo._team_info_validator = TeamInfo_validator -TeamMemberInfo._display_name_validator = bv.String() -TeamMemberInfo._member_id_validator = bv.Nullable(bv.String()) -TeamMemberInfo._all_field_names_ = set([ - 'team_info', - 'display_name', - 'member_id', -]) -TeamMemberInfo._all_fields_ = [ - ('team_info', TeamMemberInfo._team_info_validator), - ('display_name', TeamMemberInfo._display_name_validator), - ('member_id', TeamMemberInfo._member_id_validator), -] - -TransferFolderArg._shared_folder_id_validator = common.SharedFolderId_validator -TransferFolderArg._to_dropbox_id_validator = DropboxId_validator -TransferFolderArg._all_field_names_ = set([ - 'shared_folder_id', - 'to_dropbox_id', -]) -TransferFolderArg._all_fields_ = [ - ('shared_folder_id', TransferFolderArg._shared_folder_id_validator), - ('to_dropbox_id', TransferFolderArg._to_dropbox_id_validator), -] - -TransferFolderError._access_error_validator = SharedFolderAccessError_validator -TransferFolderError._invalid_dropbox_id_validator = bv.Void() -TransferFolderError._new_owner_not_a_member_validator = bv.Void() -TransferFolderError._new_owner_unmounted_validator = bv.Void() -TransferFolderError._new_owner_email_unverified_validator = bv.Void() -TransferFolderError._team_folder_validator = bv.Void() -TransferFolderError._no_permission_validator = bv.Void() -TransferFolderError._other_validator = bv.Void() -TransferFolderError._tagmap = { - 'access_error': TransferFolderError._access_error_validator, - 'invalid_dropbox_id': TransferFolderError._invalid_dropbox_id_validator, - 'new_owner_not_a_member': TransferFolderError._new_owner_not_a_member_validator, - 'new_owner_unmounted': TransferFolderError._new_owner_unmounted_validator, - 'new_owner_email_unverified': TransferFolderError._new_owner_email_unverified_validator, - 'team_folder': TransferFolderError._team_folder_validator, - 'no_permission': TransferFolderError._no_permission_validator, - 'other': TransferFolderError._other_validator, -} - -TransferFolderError.invalid_dropbox_id = TransferFolderError('invalid_dropbox_id') -TransferFolderError.new_owner_not_a_member = TransferFolderError('new_owner_not_a_member') -TransferFolderError.new_owner_unmounted = TransferFolderError('new_owner_unmounted') -TransferFolderError.new_owner_email_unverified = TransferFolderError('new_owner_email_unverified') -TransferFolderError.team_folder = TransferFolderError('team_folder') -TransferFolderError.no_permission = TransferFolderError('no_permission') -TransferFolderError.other = TransferFolderError('other') - -UnmountFolderArg._shared_folder_id_validator = common.SharedFolderId_validator -UnmountFolderArg._all_field_names_ = set(['shared_folder_id']) -UnmountFolderArg._all_fields_ = [('shared_folder_id', UnmountFolderArg._shared_folder_id_validator)] - -UnmountFolderError._access_error_validator = SharedFolderAccessError_validator -UnmountFolderError._no_permission_validator = bv.Void() -UnmountFolderError._not_unmountable_validator = bv.Void() -UnmountFolderError._other_validator = bv.Void() -UnmountFolderError._tagmap = { - 'access_error': UnmountFolderError._access_error_validator, - 'no_permission': UnmountFolderError._no_permission_validator, - 'not_unmountable': UnmountFolderError._not_unmountable_validator, - 'other': UnmountFolderError._other_validator, -} - -UnmountFolderError.no_permission = UnmountFolderError('no_permission') -UnmountFolderError.not_unmountable = UnmountFolderError('not_unmountable') -UnmountFolderError.other = UnmountFolderError('other') - -UnshareFileArg._file_validator = PathOrId_validator -UnshareFileArg._all_field_names_ = set(['file']) -UnshareFileArg._all_fields_ = [('file', UnshareFileArg._file_validator)] - -UnshareFileError._user_error_validator = SharingUserError_validator -UnshareFileError._access_error_validator = SharingFileAccessError_validator -UnshareFileError._other_validator = bv.Void() -UnshareFileError._tagmap = { - 'user_error': UnshareFileError._user_error_validator, - 'access_error': UnshareFileError._access_error_validator, - 'other': UnshareFileError._other_validator, -} - -UnshareFileError.other = UnshareFileError('other') - -UnshareFolderArg._shared_folder_id_validator = common.SharedFolderId_validator -UnshareFolderArg._leave_a_copy_validator = bv.Boolean() -UnshareFolderArg._all_field_names_ = set([ - 'shared_folder_id', - 'leave_a_copy', -]) -UnshareFolderArg._all_fields_ = [ - ('shared_folder_id', UnshareFolderArg._shared_folder_id_validator), - ('leave_a_copy', UnshareFolderArg._leave_a_copy_validator), -] - -UnshareFolderError._access_error_validator = SharedFolderAccessError_validator -UnshareFolderError._team_folder_validator = bv.Void() -UnshareFolderError._no_permission_validator = bv.Void() -UnshareFolderError._too_many_files_validator = bv.Void() -UnshareFolderError._other_validator = bv.Void() -UnshareFolderError._tagmap = { - 'access_error': UnshareFolderError._access_error_validator, - 'team_folder': UnshareFolderError._team_folder_validator, - 'no_permission': UnshareFolderError._no_permission_validator, - 'too_many_files': UnshareFolderError._too_many_files_validator, - 'other': UnshareFolderError._other_validator, -} - -UnshareFolderError.team_folder = UnshareFolderError('team_folder') -UnshareFolderError.no_permission = UnshareFolderError('no_permission') -UnshareFolderError.too_many_files = UnshareFolderError('too_many_files') -UnshareFolderError.other = UnshareFolderError('other') - -UpdateFileMemberArgs._all_field_names_ = ChangeFileMemberAccessArgs._all_field_names_.union(set([])) -UpdateFileMemberArgs._all_fields_ = ChangeFileMemberAccessArgs._all_fields_ + [] - -UpdateFolderMemberArg._shared_folder_id_validator = common.SharedFolderId_validator -UpdateFolderMemberArg._member_validator = MemberSelector_validator -UpdateFolderMemberArg._access_level_validator = AccessLevel_validator -UpdateFolderMemberArg._all_field_names_ = set([ - 'shared_folder_id', - 'member', - 'access_level', -]) -UpdateFolderMemberArg._all_fields_ = [ - ('shared_folder_id', UpdateFolderMemberArg._shared_folder_id_validator), - ('member', UpdateFolderMemberArg._member_validator), - ('access_level', UpdateFolderMemberArg._access_level_validator), -] - -UpdateFolderMemberError._access_error_validator = SharedFolderAccessError_validator -UpdateFolderMemberError._member_error_validator = SharedFolderMemberError_validator -UpdateFolderMemberError._no_explicit_access_validator = AddFolderMemberError_validator -UpdateFolderMemberError._insufficient_plan_validator = bv.Void() -UpdateFolderMemberError._no_permission_validator = bv.Void() -UpdateFolderMemberError._other_validator = bv.Void() -UpdateFolderMemberError._tagmap = { - 'access_error': UpdateFolderMemberError._access_error_validator, - 'member_error': UpdateFolderMemberError._member_error_validator, - 'no_explicit_access': UpdateFolderMemberError._no_explicit_access_validator, - 'insufficient_plan': UpdateFolderMemberError._insufficient_plan_validator, - 'no_permission': UpdateFolderMemberError._no_permission_validator, - 'other': UpdateFolderMemberError._other_validator, -} - -UpdateFolderMemberError.insufficient_plan = UpdateFolderMemberError('insufficient_plan') -UpdateFolderMemberError.no_permission = UpdateFolderMemberError('no_permission') -UpdateFolderMemberError.other = UpdateFolderMemberError('other') - -UpdateFolderPolicyArg._shared_folder_id_validator = common.SharedFolderId_validator -UpdateFolderPolicyArg._member_policy_validator = bv.Nullable(MemberPolicy_validator) -UpdateFolderPolicyArg._acl_update_policy_validator = bv.Nullable(AclUpdatePolicy_validator) -UpdateFolderPolicyArg._viewer_info_policy_validator = bv.Nullable(ViewerInfoPolicy_validator) -UpdateFolderPolicyArg._shared_link_policy_validator = bv.Nullable(SharedLinkPolicy_validator) -UpdateFolderPolicyArg._link_settings_validator = bv.Nullable(LinkSettings_validator) -UpdateFolderPolicyArg._actions_validator = bv.Nullable(bv.List(FolderAction_validator)) -UpdateFolderPolicyArg._all_field_names_ = set([ - 'shared_folder_id', - 'member_policy', - 'acl_update_policy', - 'viewer_info_policy', - 'shared_link_policy', - 'link_settings', - 'actions', -]) -UpdateFolderPolicyArg._all_fields_ = [ - ('shared_folder_id', UpdateFolderPolicyArg._shared_folder_id_validator), - ('member_policy', UpdateFolderPolicyArg._member_policy_validator), - ('acl_update_policy', UpdateFolderPolicyArg._acl_update_policy_validator), - ('viewer_info_policy', UpdateFolderPolicyArg._viewer_info_policy_validator), - ('shared_link_policy', UpdateFolderPolicyArg._shared_link_policy_validator), - ('link_settings', UpdateFolderPolicyArg._link_settings_validator), - ('actions', UpdateFolderPolicyArg._actions_validator), -] - -UpdateFolderPolicyError._access_error_validator = SharedFolderAccessError_validator -UpdateFolderPolicyError._not_on_team_validator = bv.Void() -UpdateFolderPolicyError._team_policy_disallows_member_policy_validator = bv.Void() -UpdateFolderPolicyError._disallowed_shared_link_policy_validator = bv.Void() -UpdateFolderPolicyError._no_permission_validator = bv.Void() -UpdateFolderPolicyError._team_folder_validator = bv.Void() -UpdateFolderPolicyError._other_validator = bv.Void() -UpdateFolderPolicyError._tagmap = { - 'access_error': UpdateFolderPolicyError._access_error_validator, - 'not_on_team': UpdateFolderPolicyError._not_on_team_validator, - 'team_policy_disallows_member_policy': UpdateFolderPolicyError._team_policy_disallows_member_policy_validator, - 'disallowed_shared_link_policy': UpdateFolderPolicyError._disallowed_shared_link_policy_validator, - 'no_permission': UpdateFolderPolicyError._no_permission_validator, - 'team_folder': UpdateFolderPolicyError._team_folder_validator, - 'other': UpdateFolderPolicyError._other_validator, -} - -UpdateFolderPolicyError.not_on_team = UpdateFolderPolicyError('not_on_team') -UpdateFolderPolicyError.team_policy_disallows_member_policy = UpdateFolderPolicyError('team_policy_disallows_member_policy') -UpdateFolderPolicyError.disallowed_shared_link_policy = UpdateFolderPolicyError('disallowed_shared_link_policy') -UpdateFolderPolicyError.no_permission = UpdateFolderPolicyError('no_permission') -UpdateFolderPolicyError.team_folder = UpdateFolderPolicyError('team_folder') -UpdateFolderPolicyError.other = UpdateFolderPolicyError('other') - -UserMembershipInfo._user_validator = UserInfo_validator -UserMembershipInfo._all_field_names_ = MembershipInfo._all_field_names_.union(set(['user'])) -UserMembershipInfo._all_fields_ = MembershipInfo._all_fields_ + [('user', UserMembershipInfo._user_validator)] - -UserFileMembershipInfo._time_last_seen_validator = bv.Nullable(common.DropboxTimestamp_validator) -UserFileMembershipInfo._all_field_names_ = UserMembershipInfo._all_field_names_.union(set(['time_last_seen'])) -UserFileMembershipInfo._all_fields_ = UserMembershipInfo._all_fields_ + [('time_last_seen', UserFileMembershipInfo._time_last_seen_validator)] - -UserInfo._account_id_validator = users_common.AccountId_validator -UserInfo._same_team_validator = bv.Boolean() -UserInfo._team_member_id_validator = bv.Nullable(bv.String()) -UserInfo._all_field_names_ = set([ - 'account_id', - 'same_team', - 'team_member_id', -]) -UserInfo._all_fields_ = [ - ('account_id', UserInfo._account_id_validator), - ('same_team', UserInfo._same_team_validator), - ('team_member_id', UserInfo._team_member_id_validator), -] - -ViewerInfoPolicy._enabled_validator = bv.Void() -ViewerInfoPolicy._disabled_validator = bv.Void() -ViewerInfoPolicy._other_validator = bv.Void() -ViewerInfoPolicy._tagmap = { - 'enabled': ViewerInfoPolicy._enabled_validator, - 'disabled': ViewerInfoPolicy._disabled_validator, - 'other': ViewerInfoPolicy._other_validator, -} - -ViewerInfoPolicy.enabled = ViewerInfoPolicy('enabled') -ViewerInfoPolicy.disabled = ViewerInfoPolicy('disabled') -ViewerInfoPolicy.other = ViewerInfoPolicy('other') - -Visibility._public_validator = bv.Void() -Visibility._team_only_validator = bv.Void() -Visibility._password_validator = bv.Void() -Visibility._team_and_password_validator = bv.Void() -Visibility._shared_folder_only_validator = bv.Void() -Visibility._other_validator = bv.Void() -Visibility._tagmap = { - 'public': Visibility._public_validator, - 'team_only': Visibility._team_only_validator, - 'password': Visibility._password_validator, - 'team_and_password': Visibility._team_and_password_validator, - 'shared_folder_only': Visibility._shared_folder_only_validator, - 'other': Visibility._other_validator, -} - -Visibility.public = Visibility('public') -Visibility.team_only = Visibility('team_only') -Visibility.password = Visibility('password') -Visibility.team_and_password = Visibility('team_and_password') -Visibility.shared_folder_only = Visibility('shared_folder_only') -Visibility.other = Visibility('other') - -add_file_member = bb.Route( - 'add_file_member', - False, - AddFileMemberArgs_validator, - bv.List(FileMemberActionResult_validator), - AddFileMemberError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -add_folder_member = bb.Route( - 'add_folder_member', - False, - AddFolderMemberArg_validator, - bv.Void(), - AddFolderMemberError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -change_file_member_access = bb.Route( - 'change_file_member_access', - True, - ChangeFileMemberAccessArgs_validator, - FileMemberActionResult_validator, - FileMemberActionError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -check_job_status = bb.Route( - 'check_job_status', - False, - async.PollArg_validator, - JobStatus_validator, - async.PollError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -check_remove_member_job_status = bb.Route( - 'check_remove_member_job_status', - False, - async.PollArg_validator, - RemoveMemberJobStatus_validator, - async.PollError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -check_share_job_status = bb.Route( - 'check_share_job_status', - False, - async.PollArg_validator, - ShareFolderJobStatus_validator, - async.PollError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -create_shared_link = bb.Route( - 'create_shared_link', - True, - CreateSharedLinkArg_validator, - PathLinkMetadata_validator, - CreateSharedLinkError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -create_shared_link_with_settings = bb.Route( - 'create_shared_link_with_settings', - False, - CreateSharedLinkWithSettingsArg_validator, - SharedLinkMetadata_validator, - CreateSharedLinkWithSettingsError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -get_file_metadata = bb.Route( - 'get_file_metadata', - False, - GetFileMetadataArg_validator, - SharedFileMetadata_validator, - GetFileMetadataError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -get_file_metadata_batch = bb.Route( - 'get_file_metadata/batch', - False, - GetFileMetadataBatchArg_validator, - bv.List(GetFileMetadataBatchResult_validator), - SharingUserError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -get_folder_metadata = bb.Route( - 'get_folder_metadata', - False, - GetMetadataArgs_validator, - SharedFolderMetadata_validator, - SharedFolderAccessError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -get_shared_link_file = bb.Route( - 'get_shared_link_file', - False, - GetSharedLinkFileArg_validator, - SharedLinkMetadata_validator, - GetSharedLinkFileError_validator, - {'host': u'content', - 'style': u'download'}, -) -get_shared_link_metadata = bb.Route( - 'get_shared_link_metadata', - False, - GetSharedLinkMetadataArg_validator, - SharedLinkMetadata_validator, - SharedLinkError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -get_shared_links = bb.Route( - 'get_shared_links', - True, - GetSharedLinksArg_validator, - GetSharedLinksResult_validator, - GetSharedLinksError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -list_file_members = bb.Route( - 'list_file_members', - False, - ListFileMembersArg_validator, - SharedFileMembers_validator, - ListFileMembersError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -list_file_members_batch = bb.Route( - 'list_file_members/batch', - False, - ListFileMembersBatchArg_validator, - bv.List(ListFileMembersBatchResult_validator), - SharingUserError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -list_file_members_continue = bb.Route( - 'list_file_members/continue', - False, - ListFileMembersContinueArg_validator, - SharedFileMembers_validator, - ListFileMembersContinueError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -list_folder_members = bb.Route( - 'list_folder_members', - False, - ListFolderMembersArgs_validator, - SharedFolderMembers_validator, - SharedFolderAccessError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -list_folder_members_continue = bb.Route( - 'list_folder_members/continue', - False, - ListFolderMembersContinueArg_validator, - SharedFolderMembers_validator, - ListFolderMembersContinueError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -list_folders = bb.Route( - 'list_folders', - False, - ListFoldersArgs_validator, - ListFoldersResult_validator, - bv.Void(), - {'host': u'api', - 'style': u'rpc'}, -) -list_folders_continue = bb.Route( - 'list_folders/continue', - False, - ListFoldersContinueArg_validator, - ListFoldersResult_validator, - ListFoldersContinueError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -list_mountable_folders = bb.Route( - 'list_mountable_folders', - False, - ListFoldersArgs_validator, - ListFoldersResult_validator, - bv.Void(), - {'host': u'api', - 'style': u'rpc'}, -) -list_mountable_folders_continue = bb.Route( - 'list_mountable_folders/continue', - False, - ListFoldersContinueArg_validator, - ListFoldersResult_validator, - ListFoldersContinueError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -list_received_files = bb.Route( - 'list_received_files', - False, - ListFilesArg_validator, - ListFilesResult_validator, - SharingUserError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -list_received_files_continue = bb.Route( - 'list_received_files/continue', - False, - ListFilesContinueArg_validator, - ListFilesResult_validator, - ListFilesContinueError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -list_shared_links = bb.Route( - 'list_shared_links', - False, - ListSharedLinksArg_validator, - ListSharedLinksResult_validator, - ListSharedLinksError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -modify_shared_link_settings = bb.Route( - 'modify_shared_link_settings', - False, - ModifySharedLinkSettingsArgs_validator, - SharedLinkMetadata_validator, - ModifySharedLinkSettingsError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -mount_folder = bb.Route( - 'mount_folder', - False, - MountFolderArg_validator, - SharedFolderMetadata_validator, - MountFolderError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -relinquish_file_membership = bb.Route( - 'relinquish_file_membership', - False, - RelinquishFileMembershipArg_validator, - bv.Void(), - RelinquishFileMembershipError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -relinquish_folder_membership = bb.Route( - 'relinquish_folder_membership', - False, - RelinquishFolderMembershipArg_validator, - async.LaunchEmptyResult_validator, - RelinquishFolderMembershipError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -remove_file_member = bb.Route( - 'remove_file_member', - True, - RemoveFileMemberArg_validator, - FileMemberActionIndividualResult_validator, - RemoveFileMemberError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -remove_file_member_2 = bb.Route( - 'remove_file_member_2', - False, - RemoveFileMemberArg_validator, - FileMemberRemoveActionResult_validator, - RemoveFileMemberError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -remove_folder_member = bb.Route( - 'remove_folder_member', - False, - RemoveFolderMemberArg_validator, - async.LaunchResultBase_validator, - RemoveFolderMemberError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -revoke_shared_link = bb.Route( - 'revoke_shared_link', - False, - RevokeSharedLinkArg_validator, - bv.Void(), - RevokeSharedLinkError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -share_folder = bb.Route( - 'share_folder', - False, - ShareFolderArg_validator, - ShareFolderLaunch_validator, - ShareFolderError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -transfer_folder = bb.Route( - 'transfer_folder', - False, - TransferFolderArg_validator, - bv.Void(), - TransferFolderError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -unmount_folder = bb.Route( - 'unmount_folder', - False, - UnmountFolderArg_validator, - bv.Void(), - UnmountFolderError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -unshare_file = bb.Route( - 'unshare_file', - False, - UnshareFileArg_validator, - bv.Void(), - UnshareFileError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -unshare_folder = bb.Route( - 'unshare_folder', - False, - UnshareFolderArg_validator, - async.LaunchEmptyResult_validator, - UnshareFolderError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -update_file_member = bb.Route( - 'update_file_member', - False, - UpdateFileMemberArgs_validator, - MemberAccessLevelResult_validator, - FileMemberActionError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -update_folder_member = bb.Route( - 'update_folder_member', - False, - UpdateFolderMemberArg_validator, - MemberAccessLevelResult_validator, - UpdateFolderMemberError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -update_folder_policy = bb.Route( - 'update_folder_policy', - False, - UpdateFolderPolicyArg_validator, - SharedFolderMetadata_validator, - UpdateFolderPolicyError_validator, - {'host': u'api', - 'style': u'rpc'}, -) - -ROUTES = { - 'add_file_member': add_file_member, - 'add_folder_member': add_folder_member, - 'change_file_member_access': change_file_member_access, - 'check_job_status': check_job_status, - 'check_remove_member_job_status': check_remove_member_job_status, - 'check_share_job_status': check_share_job_status, - 'create_shared_link': create_shared_link, - 'create_shared_link_with_settings': create_shared_link_with_settings, - 'get_file_metadata': get_file_metadata, - 'get_file_metadata/batch': get_file_metadata_batch, - 'get_folder_metadata': get_folder_metadata, - 'get_shared_link_file': get_shared_link_file, - 'get_shared_link_metadata': get_shared_link_metadata, - 'get_shared_links': get_shared_links, - 'list_file_members': list_file_members, - 'list_file_members/batch': list_file_members_batch, - 'list_file_members/continue': list_file_members_continue, - 'list_folder_members': list_folder_members, - 'list_folder_members/continue': list_folder_members_continue, - 'list_folders': list_folders, - 'list_folders/continue': list_folders_continue, - 'list_mountable_folders': list_mountable_folders, - 'list_mountable_folders/continue': list_mountable_folders_continue, - 'list_received_files': list_received_files, - 'list_received_files/continue': list_received_files_continue, - 'list_shared_links': list_shared_links, - 'modify_shared_link_settings': modify_shared_link_settings, - 'mount_folder': mount_folder, - 'relinquish_file_membership': relinquish_file_membership, - 'relinquish_folder_membership': relinquish_folder_membership, - 'remove_file_member': remove_file_member, - 'remove_file_member_2': remove_file_member_2, - 'remove_folder_member': remove_folder_member, - 'revoke_shared_link': revoke_shared_link, - 'share_folder': share_folder, - 'transfer_folder': transfer_folder, - 'unmount_folder': unmount_folder, - 'unshare_file': unshare_file, - 'unshare_folder': unshare_folder, - 'update_file_member': update_file_member, - 'update_folder_member': update_folder_member, - 'update_folder_policy': update_folder_policy, -} - diff --git a/resources/lib/dropbox/stone_base.py b/resources/lib/dropbox/stone_base.py deleted file mode 100644 index 915a818..0000000 --- a/resources/lib/dropbox/stone_base.py +++ /dev/null @@ -1,75 +0,0 @@ -""" -Helpers for representing Stone data types in Python. - -This module should be dropped into a project that requires the use of Stone. In -the future, this could be imported from a pre-installed Python package, rather -than being added to a project. -""" - -from __future__ import absolute_import, unicode_literals - -try: - from . import stone_validators as bv -except (SystemError, ValueError): - # Catch errors raised when importing a relative module when not in a package. - # This makes testing this file directly (outside of a package) easier. - import stone_validators as bv # type: ignore - -_MYPY = False -if _MYPY: - import typing # noqa: F401 # pylint: disable=import-error,unused-import,useless-suppression - - -class Union(object): - # TODO(kelkabany): Possible optimization is to remove _value if a - # union is composed of only symbols. - __slots__ = ['_tag', '_value'] - _tagmap = {} # type: typing.Dict[typing.Text, bv.Validator] - - def __init__(self, tag, value=None): - # type: (typing.Text, typing.Optional[typing.Any]) -> None - assert tag in self._tagmap, 'Invalid tag %r.' % tag - validator = self._tagmap[tag] - if isinstance(validator, bv.Void): - assert value is None, 'Void type union member must have None value.' - elif isinstance(validator, (bv.Struct, bv.Union)): - validator.validate_type_only(value) - else: - validator.validate(value) - self._tag = tag - self._value = value - - def __eq__(self, other): - # Also need to check if one class is a subclass of another. If one union extends another, - # the common fields should be able to be compared to each other. - return ( - isinstance(other, Union) and - (isinstance(self, other.__class__) or isinstance(other, self.__class__)) and - self._tag == other._tag and self._value == other._value - ) - - def __ne__(self, other): - return not self == other - - def __hash__(self): - return hash((self._tag, self._value)) - -class Route(object): - - def __init__(self, name, deprecated, arg_type, result_type, error_type, attrs): - self.name = name - self.deprecated = deprecated - self.arg_type = arg_type - self.result_type = result_type - self.error_type = error_type - assert isinstance(attrs, dict), 'Expected dict, got %r' % attrs - self.attrs = attrs - - def __repr__(self): - return 'Route({!r}, {!r}, {!r}, {!r}, {!r}, {!r})'.format( - self.name, - self.deprecated, - self.arg_type, - self.result_type, - self.error_type, - self.attrs) diff --git a/resources/lib/dropbox/stone_serializers.py b/resources/lib/dropbox/stone_serializers.py deleted file mode 100644 index e4be3fa..0000000 --- a/resources/lib/dropbox/stone_serializers.py +++ /dev/null @@ -1,1011 +0,0 @@ -""" -Serializers for Stone data types. - -Currently, only JSON is officially supported, but there's an experimental -msgpack integration. If possible, serializers should be kept separate from the -RPC format. - -This module should be dropped into a project that requires the use of Stone. In -the future, this could be imported from a pre-installed Python package, rather -than being added to a project. -""" - -from __future__ import absolute_import, unicode_literals - -import base64 -import collections -import datetime -import functools -import json -import re -import six -import time - -try: - from . import stone_base as bb # noqa: F401 # pylint: disable=unused-import - from . import stone_validators as bv -except (SystemError, ValueError): - # Catch errors raised when importing a relative module when not in a package. - # This makes testing this file directly (outside of a package) easier. - import stone_validators as bb # type: ignore # noqa: F401 # pylint: disable=unused-import - import stone_validators as bv # type: ignore - -_MYPY = False -if _MYPY: - import typing # noqa: F401 # pylint: disable=import-error,unused-import,useless-suppression - - -# ------------------------------------------------------------------------ -class StoneEncoderInterface(object): - """ - Interface defining a stone object encoder. - """ - - def encode(self, validator, value): - # type: (bv.Validator, typing.Any) -> typing.Any - """ - Validate ``value`` using ``validator`` and return the encoding. - - Args: - validator: the ``stone_validators.Validator`` used to validate - ``value`` - value: the object to encode - - Returns: - The encoded object. This is implementation-defined. - - Raises: - stone_validators.ValidationError: Raised if ``value`` (or one - of its sub-values). - """ - raise NotImplementedError - -# ------------------------------------------------------------------------ -class StoneSerializerBase(StoneEncoderInterface): - - def __init__(self, alias_validators=None): - # type: (typing.Mapping[bv.Validator, typing.Callable[[typing.Any], None]]) -> None - """ - Constructor, `obviously - `. - - Args: - alias_validators (``typing.Mapping``, optional): A mapping of - custom validation callables in the format - ``{stone_validators.Validator: - typing.Callable[[typing.Any], None], ...}``. These callables must - raise a ``stone_validators.ValidationError`` on failure. - Defaults to ``None``. - """ - self._alias_validators = {} # type: typing.Dict[bv.Validator, typing.Callable[[typing.Any], None]] # noqa: E501 - - if alias_validators is not None: - self._alias_validators.update(alias_validators) - - @property - def alias_validators(self): - """ - A ``typing.Mapping`` of custom validation callables in the format - ``{stone_validators.Validator: typing.Callable[typing.Any], - ...}``. - """ - return self._alias_validators - - def encode(self, validator, value): - return self.encode_sub(validator, value) - - def encode_sub(self, validator, value): - # type: (bv.Validator, typing.Any) -> typing.Any - """ - Callback intended to be called by other ``encode`` methods to - delegate encoding of sub-values. Arguments have the same semantics - as with the ``encode`` method. - """ - if isinstance(validator, bv.List): - # Because Lists are mutable, we always validate them during - # serialization - validate_f = validator.validate - encode_f = self.encode_list - elif isinstance(validator, bv.Map): - # Also validate maps during serialization because they are also mutable - validate_f = validator.validate - encode_f = self.encode_map - elif isinstance(validator, bv.Nullable): - validate_f = validator.validate - encode_f = self.encode_nullable - elif isinstance(validator, bv.Primitive): - validate_f = validator.validate - encode_f = self.encode_primitive - elif isinstance(validator, bv.Struct): - if isinstance(validator, bv.StructTree): - validate_f = validator.validate - encode_f = self.encode_struct_tree - else: - # Fields are already validated on assignment - validate_f = validator.validate_type_only - encode_f = self.encode_struct - elif isinstance(validator, bv.Union): - # Fields are already validated on assignment - validate_f = validator.validate_type_only - encode_f = self.encode_union - else: - raise bv.ValidationError('Unsupported data type {}'.format(type(validator).__name__)) - - validate_f(value) - - return encode_f(validator, value) - - def encode_list(self, validator, value): - # type: (bv.List, typing.Any) -> typing.Any - """ - Callback for serializing a ``stone_validators.List``. Arguments - have the same semantics as with the ``encode`` method. - """ - raise NotImplementedError - - def encode_map(self, validator, value): - # type: (bv.Map, typing.Any) -> typing.Any - """ - Callback for serializing a ``stone_validators.Map``. Arguments - have the same semantics as with the ``encode`` method. - """ - raise NotImplementedError - - def encode_nullable(self, validator, value): - # type: (bv.Nullable, typing.Any) -> typing.Any - """ - Callback for serializing a ``stone_validators.Nullable``. - Arguments have the same semantics as with the ``encode`` method. - """ - raise NotImplementedError - - def encode_primitive(self, validator, value): - # type: (bv.Primitive, typing.Any) -> typing.Any - """ - Callback for serializing a ``stone_validators.Primitive``. - Arguments have the same semantics as with the ``encode`` method. - """ - raise NotImplementedError - - def encode_struct(self, validator, value): - # type: (bv.Struct, typing.Any) -> typing.Any - """ - Callback for serializing a ``stone_validators.Struct``. Arguments - have the same semantics as with the ``encode`` method. - """ - raise NotImplementedError - - def encode_struct_tree(self, validator, value): - # type: (bv.StructTree, typing.Any) -> typing.Any - """ - Callback for serializing a ``stone_validators.StructTree``. - Arguments have the same semantics as with the ``encode`` method. - """ - raise NotImplementedError - - def encode_union(self, validator, value): - # type: (bv.Union, bb.Union) -> typing.Any - """ - Callback for serializing a ``stone_validators.Union``. Arguments - have the same semantics as with the ``encode`` method. - """ - raise NotImplementedError - -# ------------------------------------------------------------------------ -class StoneToPythonPrimitiveSerializer(StoneSerializerBase): - - def __init__(self, alias_validators=None, for_msgpack=False, old_style=False): - # type: (typing.Mapping[bv.Validator, typing.Callable[[typing.Any], None]], bool, bool) -> None # noqa: E501 - """ - Args: - alias_validators (``typing.Mapping``, optional): Passed - to ``StoneSerializer.__init__``. Defaults to ``None``. - for_msgpack (bool, optional): See the like-named property. - Defaults to ``False``. - old_style (bool, optional): See the like-named property. - Defaults to ``False``. - """ - super(StoneToPythonPrimitiveSerializer, self).__init__(alias_validators=alias_validators) - self._for_msgpack = for_msgpack - self._old_style = old_style - - @property - def for_msgpack(self): - """ - EXPERIMENTAL: A flag associated with the serializer indicating - whether objects produced by the ``encode`` method should be - encoded for msgpack. - - """ - return self._for_msgpack - - @property - def old_style(self): - """ - A flag associated with the serializer indicating whether objects - produced by the ``encode`` method should be encoded according to - Dropbox's old or new API styles. - """ - return self._old_style - - def encode_list(self, validator, value): - validated_value = validator.validate(value) - - return [self.encode_sub(validator.item_validator, value_item) for value_item in - validated_value] - - def encode_map(self, validator, value): - validated_value = validator.validate(value) - - return { - self.encode_sub(validator.key_validator, key): - self.encode_sub(validator.value_validator, value) for - key, value in validated_value.items() - } - - def encode_nullable(self, validator, value): - if value is None: - return None - - return self.encode_sub(validator.validator, value) - - def encode_primitive(self, validator, value): - if validator in self.alias_validators: - self.alias_validators[validator](value) - - if isinstance(validator, bv.Void): - return None - elif isinstance(validator, bv.Timestamp): - return _strftime(value, validator.format) - elif isinstance(validator, bv.Bytes): - if self.for_msgpack: - return value - else: - return base64.b64encode(value).decode('ascii') - elif isinstance(validator, bv.Integer) \ - and isinstance(value, bool): - # bool is sub-class of int so it passes Integer validation, - # but we want the bool to be encoded as ``0`` or ``1``, rather - # than ``False`` or ``True``, respectively - return int(value) - else: - return value - - def encode_struct(self, validator, value): - # Skip validation of fields with primitive data types because - # they've already been validated on assignment - d = collections.OrderedDict() # type: typing.Dict[str, typing.Any] - - for field_name, field_validator in validator.definition._all_fields_: - try: - field_value = getattr(value, field_name) - except AttributeError as exc: - raise bv.ValidationError(exc.args[0]) - - presence_key = '_%s_present' % field_name - - if field_value is not None \ - and getattr(value, presence_key): - # Only serialize struct fields that have been explicitly - # set, even if there is a default - try: - d[field_name] = self.encode_sub(field_validator, field_value) - except bv.ValidationError as exc: - exc.add_parent(field_name) - - raise - return d - - def encode_struct_tree(self, validator, value): - assert type(value) in validator.definition._pytype_to_tag_and_subtype_, \ - '%r is not a serializable subtype of %r.' % (type(value), validator.definition) - - tags, subtype = validator.definition._pytype_to_tag_and_subtype_[type(value)] - - assert len(tags) == 1, tags - assert not isinstance(subtype, bv.StructTree), \ - 'Cannot serialize type %r because it enumerates subtypes.' % subtype.definition - - if self.old_style: - d = { - tags[0]: self.encode_struct(subtype, value), - } - else: - d = collections.OrderedDict() - d['.tag'] = tags[0] - d.update(self.encode_struct(subtype, value)) - - return d - - def encode_union(self, validator, value): - if value._tag is None: - raise bv.ValidationError('no tag set') - - field_validator = validator.definition._tagmap[value._tag] - is_none = isinstance(field_validator, bv.Void) \ - or (isinstance(field_validator, bv.Nullable) - and value._value is None) - - def encode_sub(sub_validator, sub_value, parent_tag): - try: - encoded_val = self.encode_sub(sub_validator, sub_value) - except bv.ValidationError as exc: - exc.add_parent(parent_tag) - - raise - else: - return encoded_val - - if self.old_style: - if field_validator is None: - return value._tag - elif is_none: - return value._tag - else: - encoded_val = encode_sub(field_validator, value._value, value._tag) - - return {value._tag: encoded_val} - elif is_none: - return {'.tag': value._tag} - else: - encoded_val = encode_sub(field_validator, value._value, value._tag) - - if isinstance(field_validator, bv.Nullable): - # We've already checked for the null case above, - # so now we're only interested in what the - # wrapped validator is - field_validator = field_validator.validator - - if isinstance(field_validator, bv.Struct) \ - and not isinstance(field_validator, bv.StructTree): - d = collections.OrderedDict() # type: typing.Dict[str, typing.Any] - d['.tag'] = value._tag - d.update(encoded_val) - - return d - else: - return collections.OrderedDict(( - ('.tag', value._tag), - (value._tag, encoded_val), - )) - -# ------------------------------------------------------------------------ -class StoneToJsonSerializer(StoneToPythonPrimitiveSerializer): - - def encode(self, validator, value): - return json.dumps(super(StoneToJsonSerializer, self).encode(validator, value)) - -# -------------------------------------------------------------- -# JSON Encoder -# -# These interfaces are preserved for backward compatibility and symmetry with deserialization -# functions. - -def json_encode(data_type, obj, alias_validators=None, old_style=False): - """Encodes an object into JSON based on its type. - - Args: - data_type (Validator): Validator for obj. - obj (object): Object to be serialized. - alias_validators (Optional[Mapping[bv.Validator, Callable[[], None]]]): - Custom validation functions. These must raise bv.ValidationError on - failure. - - Returns: - str: JSON-encoded object. - - This function will also do additional validation that wasn't done by the - objects themselves: - - 1. The passed in obj may not have been validated with data_type yet. - 2. If an object that should be a Struct was assigned to a field, its - type has been validated, but the presence of all required fields - hasn't been. - 3. If an object that should be a Union was assigned to a field, whether - or not a tag has been set has not been validated. - 4. A list may have passed validation initially, but been mutated since. - - Example of serializing a struct to JSON: - - struct FileRef - path String - rev String - - > fr = FileRef() - > fr.path = 'a/b/c' - > fr.rev = '1234' - > JsonEncoder.encode(fr) - "{'path': 'a/b/c', 'rev': '1234'}" - - Example of serializing a union to JSON: - - union UploadMode - add - overwrite - update FileRef - - > um = UploadMode() - > um.set_add() - > JsonEncoder.encode(um) - '"add"' - > um.update = fr - > JsonEncoder.encode(um) - "{'update': {'path': 'a/b/c', 'rev': '1234'}}" - """ - for_msgpack = False - serializer = StoneToJsonSerializer(alias_validators, for_msgpack, old_style) - return serializer.encode(data_type, obj) - -def json_compat_obj_encode( - data_type, obj, alias_validators=None, old_style=False, - for_msgpack=False): - """Encodes an object into a JSON-compatible dict based on its type. - - Args: - data_type (Validator): Validator for obj. - obj (object): Object to be serialized. - - Returns: - An object that when passed to json.dumps() will produce a string - giving the JSON-encoded object. - - See json_encode() for additional information about validation. - """ - serializer = StoneToPythonPrimitiveSerializer(alias_validators, for_msgpack, old_style) - return serializer.encode(data_type, obj) - -# -------------------------------------------------------------- -# JSON Decoder - -def json_decode( - data_type, serialized_obj, alias_validators=None, strict=True, - old_style=False): - """Performs the reverse operation of json_encode. - - Args: - data_type (Validator): Validator for serialized_obj. - serialized_obj (str): The JSON string to deserialize. - alias_validators (Optional[Mapping[bv.Validator, Callable[[], None]]]): - Custom validation functions. These must raise bv.ValidationError on - failure. - strict (bool): If strict, then unknown struct fields will raise an - error, and unknown union variants will raise an error even if a - catch all field is specified. strict should only be used by a - recipient of serialized JSON if it's guaranteed that its Stone - specs are at least as recent as the senders it receives messages - from. - - Returns: - The returned object depends on the input data_type. - - Boolean -> bool - - Bytes -> bytes - - Float -> float - - Integer -> long - - List -> list - - Map -> dict - - Nullable -> None or its wrapped type. - - String -> unicode (PY2) or str (PY3) - - Struct -> An instance of its definition attribute. - - Timestamp -> datetime.datetime - - Union -> An instance of its definition attribute. - """ - try: - deserialized_obj = json.loads(serialized_obj) - except ValueError: - raise bv.ValidationError('could not decode input as JSON') - else: - return json_compat_obj_decode( - data_type, deserialized_obj, alias_validators, strict, old_style) - - -def json_compat_obj_decode( - data_type, obj, alias_validators=None, strict=True, old_style=False, - for_msgpack=False): - """ - Decodes a JSON-compatible object based on its data type into a - representative Python object. - - Args: - data_type (Validator): Validator for serialized_obj. - obj: The JSON-compatible object to decode based on data_type. - strict (bool): If strict, then unknown struct fields will raise an - error, and unknown union variants will raise an error even if a - catch all field is specified. See json_decode() for more. - - Returns: - See json_decode(). - """ - if isinstance(data_type, bv.Primitive): - return _make_stone_friendly( - data_type, obj, alias_validators, strict, True, for_msgpack) - else: - return _json_compat_obj_decode_helper( - data_type, obj, alias_validators, strict, old_style, for_msgpack) - - -def _json_compat_obj_decode_helper( - data_type, obj, alias_validators, strict, old_style, for_msgpack): - """ - See json_compat_obj_decode() for argument descriptions. - """ - if isinstance(data_type, bv.StructTree): - return _decode_struct_tree( - data_type, obj, alias_validators, strict, for_msgpack) - elif isinstance(data_type, bv.Struct): - return _decode_struct( - data_type, obj, alias_validators, strict, old_style, for_msgpack) - elif isinstance(data_type, bv.Union): - if old_style: - return _decode_union_old( - data_type, obj, alias_validators, strict, for_msgpack) - else: - return _decode_union( - data_type, obj, alias_validators, strict, for_msgpack) - elif isinstance(data_type, bv.List): - return _decode_list( - data_type, obj, alias_validators, strict, old_style, for_msgpack) - elif isinstance(data_type, bv.Map): - return _decode_map( - data_type, obj, alias_validators, strict, old_style, for_msgpack) - elif isinstance(data_type, bv.Nullable): - return _decode_nullable( - data_type, obj, alias_validators, strict, old_style, for_msgpack) - elif isinstance(data_type, bv.Primitive): - # Set validate to false because validation will be done by the - # containing struct or union when the field is assigned. - return _make_stone_friendly( - data_type, obj, alias_validators, strict, False, for_msgpack) - else: - raise AssertionError('Cannot handle type %r.' % data_type) - - -def _decode_struct( - data_type, obj, alias_validators, strict, old_style, for_msgpack): - """ - The data_type argument must be a Struct. - See json_compat_obj_decode() for argument descriptions. - """ - if obj is None and data_type.has_default(): - return data_type.get_default() - elif not isinstance(obj, dict): - raise bv.ValidationError('expected object, got %s' % - bv.generic_type_name(obj)) - if strict: - for key in obj: - if (key not in data_type.definition._all_field_names_ and - not key.startswith('.tag')): - raise bv.ValidationError("unknown field '%s'" % key) - ins = data_type.definition() - _decode_struct_fields( - ins, data_type.definition._all_fields_, obj, alias_validators, strict, - old_style, for_msgpack) - # Check that all required fields have been set. - data_type.validate_fields_only(ins) - return ins - - -def _decode_struct_fields( - ins, fields, obj, alias_validators, strict, old_style, for_msgpack): - """ - Args: - ins: An instance of the class representing the data type being decoded. - The object will have its fields set. - fields: A tuple of (field_name: str, field_validator: Validator) - obj (dict): JSON-compatible dict that is being decoded. - strict (bool): See :func:`json_compat_obj_decode`. - - Returns: - None: `ins` has its fields set based on the contents of `obj`. - """ - for name, field_data_type in fields: - if name in obj: - try: - v = _json_compat_obj_decode_helper( - field_data_type, obj[name], alias_validators, strict, - old_style, for_msgpack) - setattr(ins, name, v) - except bv.ValidationError as e: - e.add_parent(name) - raise - elif field_data_type.has_default(): - setattr(ins, name, field_data_type.get_default()) - - -def _decode_union(data_type, obj, alias_validators, strict, for_msgpack): - """ - The data_type argument must be a Union. - See json_compat_obj_decode() for argument descriptions. - """ - val = None - if isinstance(obj, six.string_types): - # Handles the shorthand format where the union is serialized as only - # the string of the tag. - tag = obj - if tag in data_type.definition._tagmap: - val_data_type = data_type.definition._tagmap[tag] - if not isinstance(val_data_type, (bv.Void, bv.Nullable)): - raise bv.ValidationError( - "expected object for '%s', got symbol" % tag) - if tag == data_type.definition._catch_all: - raise bv.ValidationError( - "unexpected use of the catch-all tag '%s'" % tag) - else: - if not strict and data_type.definition._catch_all: - tag = data_type.definition._catch_all - else: - raise bv.ValidationError("unknown tag '%s'" % tag) - elif isinstance(obj, dict): - tag, val = _decode_union_dict( - data_type, obj, alias_validators, strict, for_msgpack) - else: - raise bv.ValidationError("expected string or object, got %s" % - bv.generic_type_name(obj)) - return data_type.definition(tag, val) - - -def _decode_union_dict(data_type, obj, alias_validators, strict, for_msgpack): - if '.tag' not in obj: - raise bv.ValidationError("missing '.tag' key") - tag = obj['.tag'] - if not isinstance(tag, six.string_types): - raise bv.ValidationError( - 'tag must be string, got %s' % bv.generic_type_name(tag)) - - if tag not in data_type.definition._tagmap: - if not strict and data_type.definition._catch_all: - return data_type.definition._catch_all, None - else: - raise bv.ValidationError("unknown tag '%s'" % tag) - if tag == data_type.definition._catch_all: - raise bv.ValidationError( - "unexpected use of the catch-all tag '%s'" % tag) - - val_data_type = data_type.definition._tagmap[tag] - if isinstance(val_data_type, bv.Nullable): - val_data_type = val_data_type.validator - nullable = True - else: - nullable = False - - if isinstance(val_data_type, bv.Void): - if strict: - # In strict mode, ensure there are no extraneous keys set. In - # non-strict mode, we accept that other keys may be set due to a - # change of the void type to another. - if tag in obj: - if obj[tag] is not None: - raise bv.ValidationError('expected null, got %s' % - bv.generic_type_name(obj[tag])) - for key in obj: - if key != tag and key != '.tag': - raise bv.ValidationError("unexpected key '%s'" % key) - val = None - elif isinstance(val_data_type, - (bv.Primitive, bv.List, bv.StructTree, bv.Union, bv.Map)): - if tag in obj: - raw_val = obj[tag] - try: - val = _json_compat_obj_decode_helper( - val_data_type, raw_val, alias_validators, strict, False, for_msgpack) - except bv.ValidationError as e: - e.add_parent(tag) - raise - else: - # Check no other keys - if nullable: - val = None - else: - raise bv.ValidationError("missing '%s' key" % tag) - for key in obj: - if key != tag and key != '.tag': - raise bv.ValidationError("unexpected key '%s'" % key) - elif isinstance(val_data_type, bv.Struct): - if nullable and len(obj) == 1: # only has a .tag key - val = None - else: - # assume it's not null - raw_val = obj - try: - val = _json_compat_obj_decode_helper( - val_data_type, raw_val, alias_validators, strict, False, - for_msgpack) - except bv.ValidationError as e: - e.add_parent(tag) - raise - else: - assert False, type(val_data_type) - return tag, val - - -def _decode_union_old(data_type, obj, alias_validators, strict, for_msgpack): - """ - The data_type argument must be a Union. - See json_compat_obj_decode() for argument descriptions. - """ - val = None - if isinstance(obj, six.string_types): - # Union member has no associated value - tag = obj - if tag in data_type.definition._tagmap: - val_data_type = data_type.definition._tagmap[tag] - if not isinstance(val_data_type, (bv.Void, bv.Nullable)): - raise bv.ValidationError( - "expected object for '%s', got symbol" % tag) - else: - if not strict and data_type.definition._catch_all: - tag = data_type.definition._catch_all - else: - raise bv.ValidationError("unknown tag '%s'" % tag) - elif isinstance(obj, dict): - # Union member has value - if len(obj) != 1: - raise bv.ValidationError('expected 1 key, got %s' % len(obj)) - tag = list(obj)[0] - raw_val = obj[tag] - if tag in data_type.definition._tagmap: - val_data_type = data_type.definition._tagmap[tag] - if isinstance(val_data_type, bv.Nullable) and raw_val is None: - val = None - elif isinstance(val_data_type, bv.Void): - if raw_val is None or not strict: - # If raw_val is None, then this is the more verbose - # representation of a void union member. If raw_val isn't - # None, then maybe the spec has changed, so check if we're - # in strict mode. - val = None - else: - raise bv.ValidationError('expected null, got %s' % - bv.generic_type_name(raw_val)) - else: - try: - val = _json_compat_obj_decode_helper( - val_data_type, raw_val, alias_validators, strict, True, - for_msgpack) - except bv.ValidationError as e: - e.add_parent(tag) - raise - else: - if not strict and data_type.definition._catch_all: - tag = data_type.definition._catch_all - else: - raise bv.ValidationError("unknown tag '%s'" % tag) - else: - raise bv.ValidationError("expected string or object, got %s" % - bv.generic_type_name(obj)) - return data_type.definition(tag, val) - - -def _decode_struct_tree(data_type, obj, alias_validators, strict, for_msgpack): - """ - The data_type argument must be a StructTree. - See json_compat_obj_decode() for argument descriptions. - """ - subtype = _determine_struct_tree_subtype(data_type, obj, strict) - return _decode_struct( - subtype, obj, alias_validators, strict, False, for_msgpack) - - -def _determine_struct_tree_subtype(data_type, obj, strict): - """ - Searches through the JSON-object-compatible dict using the data type - definition to determine which of the enumerated subtypes `obj` is. - """ - if '.tag' not in obj: - raise bv.ValidationError("missing '.tag' key") - if not isinstance(obj['.tag'], six.string_types): - raise bv.ValidationError('expected string, got %s' % - bv.generic_type_name(obj['.tag']), - parent='.tag') - - # Find the subtype the tags refer to - full_tags_tuple = (obj['.tag'],) - if full_tags_tuple in data_type.definition._tag_to_subtype_: - subtype = data_type.definition._tag_to_subtype_[full_tags_tuple] - if isinstance(subtype, bv.StructTree): - raise bv.ValidationError("tag '%s' refers to non-leaf subtype" % - ('.'.join(full_tags_tuple))) - return subtype - else: - if strict: - # In strict mode, the entirety of the tag hierarchy should - # point to a known subtype. - raise bv.ValidationError("unknown subtype '%s'" % - '.'.join(full_tags_tuple)) - else: - # If subtype was not found, use the base. - if data_type.definition._is_catch_all_: - return data_type - else: - raise bv.ValidationError( - "unknown subtype '%s' and '%s' is not a catch-all" % - ('.'.join(full_tags_tuple), data_type.definition.__name__)) - - -def _decode_list( - data_type, obj, alias_validators, strict, old_style, for_msgpack): - """ - The data_type argument must be a List. - See json_compat_obj_decode() for argument descriptions. - """ - if not isinstance(obj, list): - raise bv.ValidationError( - 'expected list, got %s' % bv.generic_type_name(obj)) - return [ - _json_compat_obj_decode_helper( - data_type.item_validator, item, alias_validators, strict, - old_style, for_msgpack) - for item in obj] - - -def _decode_map( - data_type, obj, alias_validators, strict, old_style, for_msgpack): - """ - The data_type argument must be a Map. - See json_compat_obj_decode() for argument descriptions. - """ - if not isinstance(obj, dict): - raise bv.ValidationError( - 'expected dict, got %s' % bv.generic_type_name(obj)) - return { - _json_compat_obj_decode_helper( - data_type.key_validator, key, alias_validators, strict, - old_style, for_msgpack): - _json_compat_obj_decode_helper( - data_type.value_validator, value, alias_validators, strict, - old_style, for_msgpack) - for key, value in obj.items() - } - - -def _decode_nullable( - data_type, obj, alias_validators, strict, old_style, for_msgpack): - """ - The data_type argument must be a Nullable. - See json_compat_obj_decode() for argument descriptions. - """ - if obj is not None: - return _json_compat_obj_decode_helper( - data_type.validator, obj, alias_validators, strict, old_style, - for_msgpack) - else: - return None - - -def _make_stone_friendly( - data_type, val, alias_validators, strict, validate, for_msgpack): - """ - Convert a Python object to a type that will pass validation by its - validator. - - Validation by ``alias_validators`` is performed even if ``validate`` is - false. - - fix found at: - https://www.dropboxforum.com/t5/API-support/Upload-Error-with-v2-migration-from-v1/td-p/244561 - """ - if isinstance(data_type, bv.Timestamp): - try: - ret = datetime.datetime.strptime(val, data_type.format) - except: - #print("datetime.datetime.strptime(val, data_type.format) returned NoneType. Trying alterntive") - pass - try: - ret = datetime.datetime(*(time.strptime(val, data_type.format)[0:6])) - except (TypeError, ValueError) as e: - raise bv.ValidationError(e.args[0]) - elif isinstance(data_type, bv.Bytes): - if for_msgpack: - if isinstance(val, six.text_type): - ret = val.encode('utf-8') - else: - ret = val - else: - try: - ret = base64.b64decode(val) - except TypeError: - raise bv.ValidationError('invalid base64-encoded bytes') - elif isinstance(data_type, bv.Void): - if strict and val is not None: - raise bv.ValidationError("expected null, got value") - return None - else: - if validate: - data_type.validate(val) - ret = val - if alias_validators is not None and data_type in alias_validators: - alias_validators[data_type](ret) - return ret - -# Adapted from: -# http://code.activestate.com/recipes/306860-proleptic-gregorian-dates-and-strftime-before-1900/ -# Remove the unsupposed "%s" command. But don't do it if there's an odd -# number of %s before the s because those are all escaped. Can't simply -# remove the s because the result of %sY should be %Y if %s isn't -# supported, not the 4 digit year. -_ILLEGAL_S = re.compile(r'((^|[^%])(%%)*%s)') - -def _findall(text, substr): - # Also finds overlaps - sites = [] - i = 0 - - while 1: - j = text.find(substr, i) - - if j == -1: - break - - sites.append(j) - i = j + 1 - - return sites - -# Every 28 years the calendar repeats, except through century leap years -# where it's 6 years. But only if you're using the Gregorian calendar. ;) -def _strftime(dt, fmt): - try: - return dt.strftime(fmt) - except ValueError: - if not six.PY2 or dt.year > 1900: - raise - - if _ILLEGAL_S.search(fmt): - raise TypeError("This strftime implementation does not handle %s") - - year = dt.year - - # For every non-leap year century, advance by 6 years to get into the - # 28-year repeat cycle - delta = 2000 - year - off = 6 * (delta // 100 + delta // 400) - year = year + off - - # Move to around the year 2000 - year = year + ((2000 - year) // 28) * 28 - timetuple = dt.timetuple() - s1 = time.strftime(fmt, (year,) + timetuple[1:]) - sites1 = _findall(s1, str(year)) - - s2 = time.strftime(fmt, (year + 28,) + timetuple[1:]) - sites2 = _findall(s2, str(year + 28)) - - sites = [] - - for site in sites1: - if site in sites2: - sites.append(site) - - s = s1 - syear = '%4d' % (dt.year,) - - for site in sites: - s = s[:site] + syear + s[site + 4:] - - return s - - -try: - import msgpack -except ImportError: - pass -else: - msgpack_compat_obj_encode = functools.partial(json_compat_obj_encode, - for_msgpack=True) - - def msgpack_encode(data_type, obj): - return msgpack.dumps( - msgpack_compat_obj_encode(data_type, obj), encoding='utf-8') - - msgpack_compat_obj_decode = functools.partial(json_compat_obj_decode, - for_msgpack=True) - - def msgpack_decode( - data_type, serialized_obj, alias_validators=None, strict=True): - # We decode everything as utf-8 because we want all object keys to be - # unicode. Otherwise, we need to do a lot more refactoring to make - # json/msgpack share the same code. We expect byte arrays to fail - # decoding, but when they don't, we have to convert them to bytes. - deserialized_obj = msgpack.loads( - serialized_obj, encoding='utf-8', unicode_errors='ignore') - return msgpack_compat_obj_decode( - data_type, deserialized_obj, alias_validators, strict) diff --git a/resources/lib/dropbox/stone_validators.py b/resources/lib/dropbox/stone_validators.py deleted file mode 100644 index f919dc7..0000000 --- a/resources/lib/dropbox/stone_validators.py +++ /dev/null @@ -1,592 +0,0 @@ -""" -Defines classes to represent each Stone type in Python. These classes should -be used to validate Python objects and normalize them for a given type. - -The data types defined here should not be specific to an RPC or serialization -format. - -This module should be dropped into a project that requires the use of Stone. In -the future, this could be imported from a pre-installed Python package, rather -than being added to a project. -""" - -from __future__ import absolute_import, unicode_literals - -from abc import ABCMeta, abstractmethod -import datetime -import math -import numbers -import re -import six - -_MYPY = False -if _MYPY: - import typing # noqa: F401 # pylint: disable=import-error,unused-import,useless-suppression - -# See -if six.PY3: - _binary_types = (bytes, memoryview) # noqa: E501,F821 # pylint: disable=undefined-variable,useless-suppression -else: - _binary_types = (bytes, buffer) # noqa: E501,F821 # pylint: disable=undefined-variable,useless-suppression - - -class ValidationError(Exception): - """Raised when a value doesn't pass validation by its validator.""" - - def __init__(self, message, parent=None): - """ - Args: - message (str): Error message detailing validation failure. - parent (str): Adds the parent as the closest reference point for - the error. Use :meth:`add_parent` to add more. - """ - super(ValidationError, self).__init__(message) - self.message = message - self._parents = [] - if parent: - self._parents.append(parent) - - def add_parent(self, parent): - """ - Args: - parent (str): Adds the parent to the top of the tree of references - that lead to the validator that failed. - """ - self._parents.append(parent) - - def __str__(self): - """ - Returns: - str: A descriptive message of the validation error that may also - include the path to the validator that failed. - """ - if self._parents: - return '{}: {}'.format('.'.join(self._parents[::-1]), self.message) - else: - return self.message - - def __repr__(self): - # Not a perfect repr, but includes the error location information. - return 'ValidationError(%r)' % six.text_type(self) - - -def generic_type_name(v): - """Return a descriptive type name that isn't Python specific. For example, - an int value will return 'integer' rather than 'int'.""" - if isinstance(v, numbers.Integral): - # Must come before real numbers check since integrals are reals too - return 'integer' - elif isinstance(v, numbers.Real): - return 'float' - elif isinstance(v, (tuple, list)): - return 'list' - elif isinstance(v, six.string_types): - return 'string' - elif v is None: - return 'null' - else: - return type(v).__name__ - - -class Validator(object): - """All primitive and composite data types should be a subclass of this.""" - __metaclass__ = ABCMeta - - @abstractmethod - def validate(self, val): - """Validates that val is of this data type. - - Returns: A normalized value if validation succeeds. - Raises: ValidationError - """ - pass - - def has_default(self): - return False - - def get_default(self): - raise AssertionError('No default available.') - - -class Primitive(Validator): - """A basic type that is defined by Stone.""" - # pylint: disable=abstract-method - pass - - -class Boolean(Primitive): - - def validate(self, val): - if not isinstance(val, bool): - raise ValidationError('%r is not a valid boolean' % val) - return val - - -class Integer(Primitive): - """ - Do not use this class directly. Extend it and specify a 'minimum' and - 'maximum' value as class variables for a more restrictive integer range. - """ - minimum = None # type: typing.Optional[int] - maximum = None # type: typing.Optional[int] - - def __init__(self, min_value=None, max_value=None): - """ - A more restrictive minimum or maximum value can be specified than the - range inherent to the defined type. - """ - if min_value is not None: - assert isinstance(min_value, numbers.Integral), \ - 'min_value must be an integral number' - assert min_value >= self.minimum, \ - 'min_value cannot be less than the minimum value for this ' \ - 'type (%d < %d)' % (min_value, self.minimum) - self.minimum = min_value - if max_value is not None: - assert isinstance(max_value, numbers.Integral), \ - 'max_value must be an integral number' - assert max_value <= self.maximum, \ - 'max_value cannot be greater than the maximum value for ' \ - 'this type (%d < %d)' % (max_value, self.maximum) - self.maximum = max_value - - def validate(self, val): - if not isinstance(val, numbers.Integral): - raise ValidationError('expected integer, got %s' - % generic_type_name(val)) - elif not (self.minimum <= val <= self.maximum): - raise ValidationError('%d is not within range [%d, %d]' - % (val, self.minimum, self.maximum)) - return val - - def __repr__(self): - return '%s()' % self.__class__.__name__ - - -class Int32(Integer): - minimum = -2**31 - maximum = 2**31 - 1 - - -class UInt32(Integer): - minimum = 0 - maximum = 2**32 - 1 - - -class Int64(Integer): - minimum = -2**63 - maximum = 2**63 - 1 - - -class UInt64(Integer): - minimum = 0 - maximum = 2**64 - 1 - - -class Real(Primitive): - """ - Do not use this class directly. Extend it and optionally set a 'minimum' - and 'maximum' value to enforce a range that's a subset of the Python float - implementation. Python floats are doubles. - """ - minimum = None # type: typing.Optional[float] - maximum = None # type: typing.Optional[float] - - def __init__(self, min_value=None, max_value=None): - """ - A more restrictive minimum or maximum value can be specified than the - range inherent to the defined type. - """ - if min_value is not None: - assert isinstance(min_value, numbers.Real), \ - 'min_value must be a real number' - if not isinstance(min_value, float): - try: - min_value = float(min_value) - except OverflowError: - raise AssertionError('min_value is too small for a float') - if self.minimum is not None and min_value < self.minimum: - raise AssertionError('min_value cannot be less than the ' - 'minimum value for this type (%f < %f)' % - (min_value, self.minimum)) - self.minimum = min_value - if max_value is not None: - assert isinstance(max_value, numbers.Real), \ - 'max_value must be a real number' - if not isinstance(max_value, float): - try: - max_value = float(max_value) - except OverflowError: - raise AssertionError('max_value is too large for a float') - if self.maximum is not None and max_value > self.maximum: - raise AssertionError('max_value cannot be greater than the ' - 'maximum value for this type (%f < %f)' % - (max_value, self.maximum)) - self.maximum = max_value - - def validate(self, val): - if not isinstance(val, numbers.Real): - raise ValidationError('expected real number, got %s' % - generic_type_name(val)) - if not isinstance(val, float): - # This checks for the case where a number is passed in with a - # magnitude larger than supported by float64. - try: - val = float(val) - except OverflowError: - raise ValidationError('too large for float') - if math.isnan(val) or math.isinf(val): - raise ValidationError('%f values are not supported' % val) - if self.minimum is not None and val < self.minimum: - raise ValidationError('%f is not greater than %f' % - (val, self.minimum)) - if self.maximum is not None and val > self.maximum: - raise ValidationError('%f is not less than %f' % - (val, self.maximum)) - return val - - def __repr__(self): - return '%s()' % self.__class__.__name__ - - -class Float32(Real): - # Maximum and minimums from the IEEE 754-1985 standard - minimum = -3.40282 * 10**38 - maximum = 3.40282 * 10**38 - - -class Float64(Real): - pass - - -class String(Primitive): - """Represents a unicode string.""" - - def __init__(self, min_length=None, max_length=None, pattern=None): - if min_length is not None: - assert isinstance(min_length, numbers.Integral), \ - 'min_length must be an integral number' - assert min_length >= 0, 'min_length must be >= 0' - if max_length is not None: - assert isinstance(max_length, numbers.Integral), \ - 'max_length must be an integral number' - assert max_length > 0, 'max_length must be > 0' - if min_length and max_length: - assert max_length >= min_length, 'max_length must be >= min_length' - if pattern is not None: - assert isinstance(pattern, six.string_types), \ - 'pattern must be a string' - - self.min_length = min_length - self.max_length = max_length - self.pattern = pattern - self.pattern_re = None - - if pattern: - try: - self.pattern_re = re.compile(r"\A(?:" + pattern + r")\Z") - except re.error as e: - raise AssertionError('Regex {!r} failed: {}'.format( - pattern, e.args[0])) - - def validate(self, val): - """ - A unicode string of the correct length and pattern will pass validation. - In PY2, we enforce that a str type must be valid utf-8, and a unicode - string will be returned. - """ - if not isinstance(val, six.string_types): - raise ValidationError("'%s' expected to be a string, got %s" - % (val, generic_type_name(val))) - if not six.PY3 and isinstance(val, str): - try: - val = val.decode('utf-8') - except UnicodeDecodeError: - raise ValidationError("'%s' was not valid utf-8") - - if self.max_length is not None and len(val) > self.max_length: - raise ValidationError("'%s' must be at most %d characters, got %d" - % (val, self.max_length, len(val))) - if self.min_length is not None and len(val) < self.min_length: - raise ValidationError("'%s' must be at least %d characters, got %d" - % (val, self.min_length, len(val))) - - if self.pattern and not self.pattern_re.match(val): - raise ValidationError("'%s' did not match pattern '%s'" - % (val, self.pattern)) - return val - - -class Bytes(Primitive): - - def __init__(self, min_length=None, max_length=None): - if min_length is not None: - assert isinstance(min_length, numbers.Integral), \ - 'min_length must be an integral number' - assert min_length >= 0, 'min_length must be >= 0' - if max_length is not None: - assert isinstance(max_length, numbers.Integral), \ - 'max_length must be an integral number' - assert max_length > 0, 'max_length must be > 0' - if min_length is not None and max_length is not None: - assert max_length >= min_length, 'max_length must be >= min_length' - - self.min_length = min_length - self.max_length = max_length - - def validate(self, val): - if not isinstance(val, _binary_types): - raise ValidationError("expected bytes type, got %s" - % generic_type_name(val)) - elif self.max_length is not None and len(val) > self.max_length: - raise ValidationError("'%s' must have at most %d bytes, got %d" - % (val, self.max_length, len(val))) - elif self.min_length is not None and len(val) < self.min_length: - raise ValidationError("'%s' has fewer than %d bytes, got %d" - % (val, self.min_length, len(val))) - return val - - -class Timestamp(Primitive): - """Note that while a format is specified, it isn't used in validation - since a native Python datetime object is preferred. The format, however, - can and should be used by serializers.""" - - def __init__(self, fmt): - """fmt must be composed of format codes that the C standard (1989) - supports, most notably in its strftime() function.""" - assert isinstance(fmt, six.text_type), 'format must be a string' - self.format = fmt - - def validate(self, val): - if not isinstance(val, datetime.datetime): - raise ValidationError('expected timestamp, got %s' - % generic_type_name(val)) - elif val.tzinfo is not None and \ - val.tzinfo.utcoffset(val).total_seconds() != 0: - raise ValidationError('timestamp should have either a UTC ' - 'timezone or none set at all') - return val - - -class Composite(Validator): - """Validator for a type that builds on other primitive and composite - types.""" - # pylint: disable=abstract-method - pass - - -class List(Composite): - """Assumes list contents are homogeneous with respect to types.""" - - def __init__(self, item_validator, min_items=None, max_items=None): - """Every list item will be validated with item_validator.""" - self.item_validator = item_validator - if min_items is not None: - assert isinstance(min_items, numbers.Integral), \ - 'min_items must be an integral number' - assert min_items >= 0, 'min_items must be >= 0' - if max_items is not None: - assert isinstance(max_items, numbers.Integral), \ - 'max_items must be an integral number' - assert max_items > 0, 'max_items must be > 0' - if min_items is not None and max_items is not None: - assert max_items >= min_items, 'max_items must be >= min_items' - - self.min_items = min_items - self.max_items = max_items - - def validate(self, val): - if not isinstance(val, (tuple, list)): - raise ValidationError('%r is not a valid list' % val) - elif self.max_items is not None and len(val) > self.max_items: - raise ValidationError('%r has more than %s items' - % (val, self.max_items)) - elif self.min_items is not None and len(val) < self.min_items: - raise ValidationError('%r has fewer than %s items' - % (val, self.min_items)) - return [self.item_validator.validate(item) for item in val] - - -class Map(Composite): - """Assumes map keys and values are homogeneous with respect to types.""" - - def __init__(self, key_validator, value_validator): - """ - Every Map key/value pair will be validated with item_validator. - key validators must be a subclass of a String validator - """ - self.key_validator = key_validator - self.value_validator = value_validator - - def validate(self, val): - if not isinstance(val, dict): - raise ValidationError('%r is not a valid dict' % val) - return { - self.key_validator.validate(key): - self.value_validator.validate(value) for key, value in val.items() - } - - -class Struct(Composite): - - def __init__(self, definition): - """ - Args: - definition (class): A generated class representing a Stone struct - from a spec. Must have a _fields_ attribute with the following - structure: - - _fields_ = [(field_name, validator), ...] - - where - field_name: Name of the field (str). - validator: Validator object. - """ - super(Struct, self).__init__() - self.definition = definition - - def validate(self, val): - """ - For a val to pass validation, val must be of the correct type and have - all required fields present. - """ - self.validate_type_only(val) - self.validate_fields_only(val) - return val - - def validate_fields_only(self, val): - """ - To pass field validation, no required field should be missing. - - This method assumes that the contents of each field have already been - validated on assignment, so it's merely a presence check. - - FIXME(kelkabany): Since the definition object does not maintain a list - of which fields are required, all fields are scanned. - """ - for field_name, _ in self.definition._all_fields_: - if not hasattr(val, field_name): - raise ValidationError("missing required field '%s'" % - field_name) - - def validate_type_only(self, val): - """ - Use this when you only want to validate that the type of an object - is correct, but not yet validate each field. - """ - # Since the definition maintains the list of fields for serialization, - # we're okay with a subclass that might have extra information. This - # makes it easier to return one subclass for two routes, one of which - # relies on the parent class. - if not isinstance(val, self.definition): - raise ValidationError('expected type %s, got %s' % - (self.definition.__name__, generic_type_name(val))) - - def has_default(self): - return not self.definition._has_required_fields - - def get_default(self): - assert not self.definition._has_required_fields, 'No default available.' - return self.definition() - - -class StructTree(Struct): - """Validator for structs with enumerated subtypes. - - NOTE: validate_fields_only() validates the fields known to this base - struct, but does not do any validation specific to the subtype. - """ - - # See PyCQA/pylint#1043 for why this is disabled; this should show up - # as a usless-suppression (and can be removed) once a fix is released - def __init__(self, definition): # pylint: disable=useless-super-delegation - super(StructTree, self).__init__(definition) - - -class Union(Composite): - - def __init__(self, definition): - """ - Args: - definition (class): A generated class representing a Stone union - from a spec. Must have a _tagmap attribute with the following - structure: - - _tagmap = {field_name: validator, ...} - - where - field_name (str): Tag name. - validator (Validator): Tag value validator. - """ - self.definition = definition - - def validate(self, val): - """ - For a val to pass validation, it must have a _tag set. This assumes - that the object validated that _tag is a valid tag, and that any - associated value has also been validated. - """ - self.validate_type_only(val) - if not hasattr(val, '_tag') or val._tag is None: - raise ValidationError('no tag set') - return val - - def validate_type_only(self, val): - """ - Use this when you only want to validate that the type of an object - is correct, but not yet validate each field. - - We check whether val is a Python parent class of the definition. This - is because Union subtyping works in the opposite direction of Python - inheritance. For example, if a union U2 extends U1 in Python, this - validator will accept U1 in places where U2 is expected. - """ - if not issubclass(self.definition, type(val)): - raise ValidationError('expected type %s or subtype, got %s' % - (self.definition.__name__, generic_type_name(val))) - - -class Void(Primitive): - - def validate(self, val): - if val is not None: - raise ValidationError('expected NoneType, got %s' % - generic_type_name(val)) - - def has_default(self): - return True - - def get_default(self): - return None - - -class Nullable(Validator): - - def __init__(self, validator): - assert isinstance(validator, (Primitive, Composite)), \ - 'validator must be for a primitive or composite type' - assert not isinstance(validator, Nullable), \ - 'nullables cannot be stacked' - assert not isinstance(validator, Void), \ - 'void cannot be made nullable' - self.validator = validator - - def validate(self, val): - if val is None: - return - else: - return self.validator.validate(val) - - def validate_type_only(self, val): - """Use this only if Nullable is wrapping a Composite.""" - if val is None: - return - else: - return self.validator.validate_type_only(val) - - def has_default(self): - return True - - def get_default(self): - return None diff --git a/resources/lib/dropbox/team.py b/resources/lib/dropbox/team.py deleted file mode 100644 index 4ce94a3..0000000 --- a/resources/lib/dropbox/team.py +++ /dev/null @@ -1,17082 +0,0 @@ -# -*- coding: utf-8 -*- -# Auto-generated by Stone, do not modify. -# flake8: noqa -# pylint: skip-file -try: - from . import stone_validators as bv - from . import stone_base as bb -except (SystemError, ValueError): - # Catch errors raised when importing a relative module when not in a package. - # This makes testing this file directly (outside of a package) easier. - import stone_validators as bv - import stone_base as bb - -try: - from . import ( - async, - common, - file_properties, - team_common, - team_policies, - users, - users_common, - ) -except (SystemError, ValueError): - import async - import common - import file_properties - import team_common - import team_policies - import users - import users_common - -class DeviceSession(object): - """ - :ivar session_id: The session id. - :ivar ip_address: The IP address of the last activity from this session. - :ivar country: The country from which the last activity from this session - was made. - :ivar created: The time this session was created. - :ivar updated: The time of the last activity from this session. - """ - - __slots__ = [ - '_session_id_value', - '_session_id_present', - '_ip_address_value', - '_ip_address_present', - '_country_value', - '_country_present', - '_created_value', - '_created_present', - '_updated_value', - '_updated_present', - ] - - _has_required_fields = True - - def __init__(self, - session_id=None, - ip_address=None, - country=None, - created=None, - updated=None): - self._session_id_value = None - self._session_id_present = False - self._ip_address_value = None - self._ip_address_present = False - self._country_value = None - self._country_present = False - self._created_value = None - self._created_present = False - self._updated_value = None - self._updated_present = False - if session_id is not None: - self.session_id = session_id - if ip_address is not None: - self.ip_address = ip_address - if country is not None: - self.country = country - if created is not None: - self.created = created - if updated is not None: - self.updated = updated - - @property - def session_id(self): - """ - The session id. - - :rtype: str - """ - if self._session_id_present: - return self._session_id_value - else: - raise AttributeError("missing required field 'session_id'") - - @session_id.setter - def session_id(self, val): - val = self._session_id_validator.validate(val) - self._session_id_value = val - self._session_id_present = True - - @session_id.deleter - def session_id(self): - self._session_id_value = None - self._session_id_present = False - - @property - def ip_address(self): - """ - The IP address of the last activity from this session. - - :rtype: str - """ - if self._ip_address_present: - return self._ip_address_value - else: - return None - - @ip_address.setter - def ip_address(self, val): - if val is None: - del self.ip_address - return - val = self._ip_address_validator.validate(val) - self._ip_address_value = val - self._ip_address_present = True - - @ip_address.deleter - def ip_address(self): - self._ip_address_value = None - self._ip_address_present = False - - @property - def country(self): - """ - The country from which the last activity from this session was made. - - :rtype: str - """ - if self._country_present: - return self._country_value - else: - return None - - @country.setter - def country(self, val): - if val is None: - del self.country - return - val = self._country_validator.validate(val) - self._country_value = val - self._country_present = True - - @country.deleter - def country(self): - self._country_value = None - self._country_present = False - - @property - def created(self): - """ - The time this session was created. - - :rtype: datetime.datetime - """ - if self._created_present: - return self._created_value - else: - return None - - @created.setter - def created(self, val): - if val is None: - del self.created - return - val = self._created_validator.validate(val) - self._created_value = val - self._created_present = True - - @created.deleter - def created(self): - self._created_value = None - self._created_present = False - - @property - def updated(self): - """ - The time of the last activity from this session. - - :rtype: datetime.datetime - """ - if self._updated_present: - return self._updated_value - else: - return None - - @updated.setter - def updated(self, val): - if val is None: - del self.updated - return - val = self._updated_validator.validate(val) - self._updated_value = val - self._updated_present = True - - @updated.deleter - def updated(self): - self._updated_value = None - self._updated_present = False - - def __repr__(self): - return 'DeviceSession(session_id={!r}, ip_address={!r}, country={!r}, created={!r}, updated={!r})'.format( - self._session_id_value, - self._ip_address_value, - self._country_value, - self._created_value, - self._updated_value, - ) - -DeviceSession_validator = bv.Struct(DeviceSession) - -class ActiveWebSession(DeviceSession): - """ - Information on active web sessions. - - :ivar user_agent: Information on the hosting device. - :ivar os: Information on the hosting operating system. - :ivar browser: Information on the browser used for this web session. - :ivar expires: The time this session expires. - """ - - __slots__ = [ - '_user_agent_value', - '_user_agent_present', - '_os_value', - '_os_present', - '_browser_value', - '_browser_present', - '_expires_value', - '_expires_present', - ] - - _has_required_fields = True - - def __init__(self, - session_id=None, - user_agent=None, - os=None, - browser=None, - ip_address=None, - country=None, - created=None, - updated=None, - expires=None): - super(ActiveWebSession, self).__init__(session_id, - ip_address, - country, - created, - updated) - self._user_agent_value = None - self._user_agent_present = False - self._os_value = None - self._os_present = False - self._browser_value = None - self._browser_present = False - self._expires_value = None - self._expires_present = False - if user_agent is not None: - self.user_agent = user_agent - if os is not None: - self.os = os - if browser is not None: - self.browser = browser - if expires is not None: - self.expires = expires - - @property - def user_agent(self): - """ - Information on the hosting device. - - :rtype: str - """ - if self._user_agent_present: - return self._user_agent_value - else: - raise AttributeError("missing required field 'user_agent'") - - @user_agent.setter - def user_agent(self, val): - val = self._user_agent_validator.validate(val) - self._user_agent_value = val - self._user_agent_present = True - - @user_agent.deleter - def user_agent(self): - self._user_agent_value = None - self._user_agent_present = False - - @property - def os(self): - """ - Information on the hosting operating system. - - :rtype: str - """ - if self._os_present: - return self._os_value - else: - raise AttributeError("missing required field 'os'") - - @os.setter - def os(self, val): - val = self._os_validator.validate(val) - self._os_value = val - self._os_present = True - - @os.deleter - def os(self): - self._os_value = None - self._os_present = False - - @property - def browser(self): - """ - Information on the browser used for this web session. - - :rtype: str - """ - if self._browser_present: - return self._browser_value - else: - raise AttributeError("missing required field 'browser'") - - @browser.setter - def browser(self, val): - val = self._browser_validator.validate(val) - self._browser_value = val - self._browser_present = True - - @browser.deleter - def browser(self): - self._browser_value = None - self._browser_present = False - - @property - def expires(self): - """ - The time this session expires. - - :rtype: datetime.datetime - """ - if self._expires_present: - return self._expires_value - else: - return None - - @expires.setter - def expires(self, val): - if val is None: - del self.expires - return - val = self._expires_validator.validate(val) - self._expires_value = val - self._expires_present = True - - @expires.deleter - def expires(self): - self._expires_value = None - self._expires_present = False - - def __repr__(self): - return 'ActiveWebSession(session_id={!r}, user_agent={!r}, os={!r}, browser={!r}, ip_address={!r}, country={!r}, created={!r}, updated={!r}, expires={!r})'.format( - self._session_id_value, - self._user_agent_value, - self._os_value, - self._browser_value, - self._ip_address_value, - self._country_value, - self._created_value, - self._updated_value, - self._expires_value, - ) - -ActiveWebSession_validator = bv.Struct(ActiveWebSession) - -class AdminTier(bb.Union): - """ - Describes which team-related admin permissions a user has. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar team_admin: User is an administrator of the team - has all - permissions. - :ivar user_management_admin: User can do most user provisioning, - de-provisioning and management. - :ivar support_admin: User can do a limited set of common support tasks for - existing users. - :ivar member_only: User is not an admin of the team. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - team_admin = None - # Attribute is overwritten below the class definition - user_management_admin = None - # Attribute is overwritten below the class definition - support_admin = None - # Attribute is overwritten below the class definition - member_only = None - - def is_team_admin(self): - """ - Check if the union tag is ``team_admin``. - - :rtype: bool - """ - return self._tag == 'team_admin' - - def is_user_management_admin(self): - """ - Check if the union tag is ``user_management_admin``. - - :rtype: bool - """ - return self._tag == 'user_management_admin' - - def is_support_admin(self): - """ - Check if the union tag is ``support_admin``. - - :rtype: bool - """ - return self._tag == 'support_admin' - - def is_member_only(self): - """ - Check if the union tag is ``member_only``. - - :rtype: bool - """ - return self._tag == 'member_only' - - def __repr__(self): - return 'AdminTier(%r, %r)' % (self._tag, self._value) - -AdminTier_validator = bv.Union(AdminTier) - -class ApiApp(object): - """ - Information on linked third party applications. - - :ivar app_id: The application unique id. - :ivar app_name: The application name. - :ivar publisher: The application publisher name. - :ivar publisher_url: The publisher's URL. - :ivar linked: The time this application was linked. - :ivar is_app_folder: Whether the linked application uses a dedicated folder. - """ - - __slots__ = [ - '_app_id_value', - '_app_id_present', - '_app_name_value', - '_app_name_present', - '_publisher_value', - '_publisher_present', - '_publisher_url_value', - '_publisher_url_present', - '_linked_value', - '_linked_present', - '_is_app_folder_value', - '_is_app_folder_present', - ] - - _has_required_fields = True - - def __init__(self, - app_id=None, - app_name=None, - is_app_folder=None, - publisher=None, - publisher_url=None, - linked=None): - self._app_id_value = None - self._app_id_present = False - self._app_name_value = None - self._app_name_present = False - self._publisher_value = None - self._publisher_present = False - self._publisher_url_value = None - self._publisher_url_present = False - self._linked_value = None - self._linked_present = False - self._is_app_folder_value = None - self._is_app_folder_present = False - if app_id is not None: - self.app_id = app_id - if app_name is not None: - self.app_name = app_name - if publisher is not None: - self.publisher = publisher - if publisher_url is not None: - self.publisher_url = publisher_url - if linked is not None: - self.linked = linked - if is_app_folder is not None: - self.is_app_folder = is_app_folder - - @property - def app_id(self): - """ - The application unique id. - - :rtype: str - """ - if self._app_id_present: - return self._app_id_value - else: - raise AttributeError("missing required field 'app_id'") - - @app_id.setter - def app_id(self, val): - val = self._app_id_validator.validate(val) - self._app_id_value = val - self._app_id_present = True - - @app_id.deleter - def app_id(self): - self._app_id_value = None - self._app_id_present = False - - @property - def app_name(self): - """ - The application name. - - :rtype: str - """ - if self._app_name_present: - return self._app_name_value - else: - raise AttributeError("missing required field 'app_name'") - - @app_name.setter - def app_name(self, val): - val = self._app_name_validator.validate(val) - self._app_name_value = val - self._app_name_present = True - - @app_name.deleter - def app_name(self): - self._app_name_value = None - self._app_name_present = False - - @property - def publisher(self): - """ - The application publisher name. - - :rtype: str - """ - if self._publisher_present: - return self._publisher_value - else: - return None - - @publisher.setter - def publisher(self, val): - if val is None: - del self.publisher - return - val = self._publisher_validator.validate(val) - self._publisher_value = val - self._publisher_present = True - - @publisher.deleter - def publisher(self): - self._publisher_value = None - self._publisher_present = False - - @property - def publisher_url(self): - """ - The publisher's URL. - - :rtype: str - """ - if self._publisher_url_present: - return self._publisher_url_value - else: - return None - - @publisher_url.setter - def publisher_url(self, val): - if val is None: - del self.publisher_url - return - val = self._publisher_url_validator.validate(val) - self._publisher_url_value = val - self._publisher_url_present = True - - @publisher_url.deleter - def publisher_url(self): - self._publisher_url_value = None - self._publisher_url_present = False - - @property - def linked(self): - """ - The time this application was linked. - - :rtype: datetime.datetime - """ - if self._linked_present: - return self._linked_value - else: - return None - - @linked.setter - def linked(self, val): - if val is None: - del self.linked - return - val = self._linked_validator.validate(val) - self._linked_value = val - self._linked_present = True - - @linked.deleter - def linked(self): - self._linked_value = None - self._linked_present = False - - @property - def is_app_folder(self): - """ - Whether the linked application uses a dedicated folder. - - :rtype: bool - """ - if self._is_app_folder_present: - return self._is_app_folder_value - else: - raise AttributeError("missing required field 'is_app_folder'") - - @is_app_folder.setter - def is_app_folder(self, val): - val = self._is_app_folder_validator.validate(val) - self._is_app_folder_value = val - self._is_app_folder_present = True - - @is_app_folder.deleter - def is_app_folder(self): - self._is_app_folder_value = None - self._is_app_folder_present = False - - def __repr__(self): - return 'ApiApp(app_id={!r}, app_name={!r}, is_app_folder={!r}, publisher={!r}, publisher_url={!r}, linked={!r})'.format( - self._app_id_value, - self._app_name_value, - self._is_app_folder_value, - self._publisher_value, - self._publisher_url_value, - self._linked_value, - ) - -ApiApp_validator = bv.Struct(ApiApp) - -class BaseDfbReport(object): - """ - Base report structure. - - :ivar start_date: First date present in the results as 'YYYY-MM-DD' or None. - """ - - __slots__ = [ - '_start_date_value', - '_start_date_present', - ] - - _has_required_fields = True - - def __init__(self, - start_date=None): - self._start_date_value = None - self._start_date_present = False - if start_date is not None: - self.start_date = start_date - - @property - def start_date(self): - """ - First date present in the results as 'YYYY-MM-DD' or None. - - :rtype: str - """ - if self._start_date_present: - return self._start_date_value - else: - raise AttributeError("missing required field 'start_date'") - - @start_date.setter - def start_date(self, val): - val = self._start_date_validator.validate(val) - self._start_date_value = val - self._start_date_present = True - - @start_date.deleter - def start_date(self): - self._start_date_value = None - self._start_date_present = False - - def __repr__(self): - return 'BaseDfbReport(start_date={!r})'.format( - self._start_date_value, - ) - -BaseDfbReport_validator = bv.Struct(BaseDfbReport) - -class BaseTeamFolderError(bb.Union): - """ - Base error that all errors for existing team folders should extend. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def access_error(cls, val): - """ - Create an instance of this class set to the ``access_error`` tag with - value ``val``. - - :param TeamFolderAccessError val: - :rtype: BaseTeamFolderError - """ - return cls('access_error', val) - - @classmethod - def status_error(cls, val): - """ - Create an instance of this class set to the ``status_error`` tag with - value ``val``. - - :param TeamFolderInvalidStatusError val: - :rtype: BaseTeamFolderError - """ - return cls('status_error', val) - - @classmethod - def team_shared_dropbox_error(cls, val): - """ - Create an instance of this class set to the - ``team_shared_dropbox_error`` tag with value ``val``. - - :param TeamFolderTeamSharedDropboxError val: - :rtype: BaseTeamFolderError - """ - return cls('team_shared_dropbox_error', val) - - def is_access_error(self): - """ - Check if the union tag is ``access_error``. - - :rtype: bool - """ - return self._tag == 'access_error' - - def is_status_error(self): - """ - Check if the union tag is ``status_error``. - - :rtype: bool - """ - return self._tag == 'status_error' - - def is_team_shared_dropbox_error(self): - """ - Check if the union tag is ``team_shared_dropbox_error``. - - :rtype: bool - """ - return self._tag == 'team_shared_dropbox_error' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_access_error(self): - """ - Only call this if :meth:`is_access_error` is true. - - :rtype: TeamFolderAccessError - """ - if not self.is_access_error(): - raise AttributeError("tag 'access_error' not set") - return self._value - - def get_status_error(self): - """ - Only call this if :meth:`is_status_error` is true. - - :rtype: TeamFolderInvalidStatusError - """ - if not self.is_status_error(): - raise AttributeError("tag 'status_error' not set") - return self._value - - def get_team_shared_dropbox_error(self): - """ - Only call this if :meth:`is_team_shared_dropbox_error` is true. - - :rtype: TeamFolderTeamSharedDropboxError - """ - if not self.is_team_shared_dropbox_error(): - raise AttributeError("tag 'team_shared_dropbox_error' not set") - return self._value - - def __repr__(self): - return 'BaseTeamFolderError(%r, %r)' % (self._tag, self._value) - -BaseTeamFolderError_validator = bv.Union(BaseTeamFolderError) - -class CustomQuotaError(bb.Union): - """ - Error returned by setting member custom quota. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar too_many_users: A maximum of 1000 users can be set for a single call. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - too_many_users = None - # Attribute is overwritten below the class definition - other = None - - def is_too_many_users(self): - """ - Check if the union tag is ``too_many_users``. - - :rtype: bool - """ - return self._tag == 'too_many_users' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'CustomQuotaError(%r, %r)' % (self._tag, self._value) - -CustomQuotaError_validator = bv.Union(CustomQuotaError) - -class CustomQuotaResult(bb.Union): - """ - User custom quota. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar UserCustomQuotaResult success: User's custom quota. - :ivar UserSelectorArg invalid_user: Invalid user (not in team). - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def success(cls, val): - """ - Create an instance of this class set to the ``success`` tag with value - ``val``. - - :param UserCustomQuotaResult val: - :rtype: CustomQuotaResult - """ - return cls('success', val) - - @classmethod - def invalid_user(cls, val): - """ - Create an instance of this class set to the ``invalid_user`` tag with - value ``val``. - - :param UserSelectorArg val: - :rtype: CustomQuotaResult - """ - return cls('invalid_user', val) - - def is_success(self): - """ - Check if the union tag is ``success``. - - :rtype: bool - """ - return self._tag == 'success' - - def is_invalid_user(self): - """ - Check if the union tag is ``invalid_user``. - - :rtype: bool - """ - return self._tag == 'invalid_user' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_success(self): - """ - User's custom quota. - - Only call this if :meth:`is_success` is true. - - :rtype: UserCustomQuotaResult - """ - if not self.is_success(): - raise AttributeError("tag 'success' not set") - return self._value - - def get_invalid_user(self): - """ - Invalid user (not in team). - - Only call this if :meth:`is_invalid_user` is true. - - :rtype: UserSelectorArg - """ - if not self.is_invalid_user(): - raise AttributeError("tag 'invalid_user' not set") - return self._value - - def __repr__(self): - return 'CustomQuotaResult(%r, %r)' % (self._tag, self._value) - -CustomQuotaResult_validator = bv.Union(CustomQuotaResult) - -class CustomQuotaUsersArg(object): - """ - :ivar users: List of users. - """ - - __slots__ = [ - '_users_value', - '_users_present', - ] - - _has_required_fields = True - - def __init__(self, - users=None): - self._users_value = None - self._users_present = False - if users is not None: - self.users = users - - @property - def users(self): - """ - List of users. - - :rtype: list of [UserSelectorArg] - """ - if self._users_present: - return self._users_value - else: - raise AttributeError("missing required field 'users'") - - @users.setter - def users(self, val): - val = self._users_validator.validate(val) - self._users_value = val - self._users_present = True - - @users.deleter - def users(self): - self._users_value = None - self._users_present = False - - def __repr__(self): - return 'CustomQuotaUsersArg(users={!r})'.format( - self._users_value, - ) - -CustomQuotaUsersArg_validator = bv.Struct(CustomQuotaUsersArg) - -class DateRange(object): - """ - Input arguments that can be provided for most reports. - - :ivar start_date: Optional starting date (inclusive). - :ivar end_date: Optional ending date (exclusive). - """ - - __slots__ = [ - '_start_date_value', - '_start_date_present', - '_end_date_value', - '_end_date_present', - ] - - _has_required_fields = False - - def __init__(self, - start_date=None, - end_date=None): - self._start_date_value = None - self._start_date_present = False - self._end_date_value = None - self._end_date_present = False - if start_date is not None: - self.start_date = start_date - if end_date is not None: - self.end_date = end_date - - @property - def start_date(self): - """ - Optional starting date (inclusive). - - :rtype: datetime.datetime - """ - if self._start_date_present: - return self._start_date_value - else: - return None - - @start_date.setter - def start_date(self, val): - if val is None: - del self.start_date - return - val = self._start_date_validator.validate(val) - self._start_date_value = val - self._start_date_present = True - - @start_date.deleter - def start_date(self): - self._start_date_value = None - self._start_date_present = False - - @property - def end_date(self): - """ - Optional ending date (exclusive). - - :rtype: datetime.datetime - """ - if self._end_date_present: - return self._end_date_value - else: - return None - - @end_date.setter - def end_date(self, val): - if val is None: - del self.end_date - return - val = self._end_date_validator.validate(val) - self._end_date_value = val - self._end_date_present = True - - @end_date.deleter - def end_date(self): - self._end_date_value = None - self._end_date_present = False - - def __repr__(self): - return 'DateRange(start_date={!r}, end_date={!r})'.format( - self._start_date_value, - self._end_date_value, - ) - -DateRange_validator = bv.Struct(DateRange) - -class DateRangeError(bb.Union): - """ - Errors that can originate from problems in input arguments to reports. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'DateRangeError(%r, %r)' % (self._tag, self._value) - -DateRangeError_validator = bv.Union(DateRangeError) - -class DesktopClientSession(DeviceSession): - """ - Information about linked Dropbox desktop client sessions. - - :ivar host_name: Name of the hosting desktop. - :ivar client_type: The Dropbox desktop client type. - :ivar client_version: The Dropbox client version. - :ivar platform: Information on the hosting platform. - :ivar is_delete_on_unlink_supported: Whether it's possible to delete all of - the account files upon unlinking. - """ - - __slots__ = [ - '_host_name_value', - '_host_name_present', - '_client_type_value', - '_client_type_present', - '_client_version_value', - '_client_version_present', - '_platform_value', - '_platform_present', - '_is_delete_on_unlink_supported_value', - '_is_delete_on_unlink_supported_present', - ] - - _has_required_fields = True - - def __init__(self, - session_id=None, - host_name=None, - client_type=None, - client_version=None, - platform=None, - is_delete_on_unlink_supported=None, - ip_address=None, - country=None, - created=None, - updated=None): - super(DesktopClientSession, self).__init__(session_id, - ip_address, - country, - created, - updated) - self._host_name_value = None - self._host_name_present = False - self._client_type_value = None - self._client_type_present = False - self._client_version_value = None - self._client_version_present = False - self._platform_value = None - self._platform_present = False - self._is_delete_on_unlink_supported_value = None - self._is_delete_on_unlink_supported_present = False - if host_name is not None: - self.host_name = host_name - if client_type is not None: - self.client_type = client_type - if client_version is not None: - self.client_version = client_version - if platform is not None: - self.platform = platform - if is_delete_on_unlink_supported is not None: - self.is_delete_on_unlink_supported = is_delete_on_unlink_supported - - @property - def host_name(self): - """ - Name of the hosting desktop. - - :rtype: str - """ - if self._host_name_present: - return self._host_name_value - else: - raise AttributeError("missing required field 'host_name'") - - @host_name.setter - def host_name(self, val): - val = self._host_name_validator.validate(val) - self._host_name_value = val - self._host_name_present = True - - @host_name.deleter - def host_name(self): - self._host_name_value = None - self._host_name_present = False - - @property - def client_type(self): - """ - The Dropbox desktop client type. - - :rtype: DesktopPlatform - """ - if self._client_type_present: - return self._client_type_value - else: - raise AttributeError("missing required field 'client_type'") - - @client_type.setter - def client_type(self, val): - self._client_type_validator.validate_type_only(val) - self._client_type_value = val - self._client_type_present = True - - @client_type.deleter - def client_type(self): - self._client_type_value = None - self._client_type_present = False - - @property - def client_version(self): - """ - The Dropbox client version. - - :rtype: str - """ - if self._client_version_present: - return self._client_version_value - else: - raise AttributeError("missing required field 'client_version'") - - @client_version.setter - def client_version(self, val): - val = self._client_version_validator.validate(val) - self._client_version_value = val - self._client_version_present = True - - @client_version.deleter - def client_version(self): - self._client_version_value = None - self._client_version_present = False - - @property - def platform(self): - """ - Information on the hosting platform. - - :rtype: str - """ - if self._platform_present: - return self._platform_value - else: - raise AttributeError("missing required field 'platform'") - - @platform.setter - def platform(self, val): - val = self._platform_validator.validate(val) - self._platform_value = val - self._platform_present = True - - @platform.deleter - def platform(self): - self._platform_value = None - self._platform_present = False - - @property - def is_delete_on_unlink_supported(self): - """ - Whether it's possible to delete all of the account files upon unlinking. - - :rtype: bool - """ - if self._is_delete_on_unlink_supported_present: - return self._is_delete_on_unlink_supported_value - else: - raise AttributeError("missing required field 'is_delete_on_unlink_supported'") - - @is_delete_on_unlink_supported.setter - def is_delete_on_unlink_supported(self, val): - val = self._is_delete_on_unlink_supported_validator.validate(val) - self._is_delete_on_unlink_supported_value = val - self._is_delete_on_unlink_supported_present = True - - @is_delete_on_unlink_supported.deleter - def is_delete_on_unlink_supported(self): - self._is_delete_on_unlink_supported_value = None - self._is_delete_on_unlink_supported_present = False - - def __repr__(self): - return 'DesktopClientSession(session_id={!r}, host_name={!r}, client_type={!r}, client_version={!r}, platform={!r}, is_delete_on_unlink_supported={!r}, ip_address={!r}, country={!r}, created={!r}, updated={!r})'.format( - self._session_id_value, - self._host_name_value, - self._client_type_value, - self._client_version_value, - self._platform_value, - self._is_delete_on_unlink_supported_value, - self._ip_address_value, - self._country_value, - self._created_value, - self._updated_value, - ) - -DesktopClientSession_validator = bv.Struct(DesktopClientSession) - -class DesktopPlatform(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar windows: Official Windows Dropbox desktop client. - :ivar mac: Official Mac Dropbox desktop client. - :ivar linux: Official Linux Dropbox desktop client. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - windows = None - # Attribute is overwritten below the class definition - mac = None - # Attribute is overwritten below the class definition - linux = None - # Attribute is overwritten below the class definition - other = None - - def is_windows(self): - """ - Check if the union tag is ``windows``. - - :rtype: bool - """ - return self._tag == 'windows' - - def is_mac(self): - """ - Check if the union tag is ``mac``. - - :rtype: bool - """ - return self._tag == 'mac' - - def is_linux(self): - """ - Check if the union tag is ``linux``. - - :rtype: bool - """ - return self._tag == 'linux' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'DesktopPlatform(%r, %r)' % (self._tag, self._value) - -DesktopPlatform_validator = bv.Union(DesktopPlatform) - -class DeviceSessionArg(object): - """ - :ivar session_id: The session id. - :ivar team_member_id: The unique id of the member owning the device. - """ - - __slots__ = [ - '_session_id_value', - '_session_id_present', - '_team_member_id_value', - '_team_member_id_present', - ] - - _has_required_fields = True - - def __init__(self, - session_id=None, - team_member_id=None): - self._session_id_value = None - self._session_id_present = False - self._team_member_id_value = None - self._team_member_id_present = False - if session_id is not None: - self.session_id = session_id - if team_member_id is not None: - self.team_member_id = team_member_id - - @property - def session_id(self): - """ - The session id. - - :rtype: str - """ - if self._session_id_present: - return self._session_id_value - else: - raise AttributeError("missing required field 'session_id'") - - @session_id.setter - def session_id(self, val): - val = self._session_id_validator.validate(val) - self._session_id_value = val - self._session_id_present = True - - @session_id.deleter - def session_id(self): - self._session_id_value = None - self._session_id_present = False - - @property - def team_member_id(self): - """ - The unique id of the member owning the device. - - :rtype: str - """ - if self._team_member_id_present: - return self._team_member_id_value - else: - raise AttributeError("missing required field 'team_member_id'") - - @team_member_id.setter - def team_member_id(self, val): - val = self._team_member_id_validator.validate(val) - self._team_member_id_value = val - self._team_member_id_present = True - - @team_member_id.deleter - def team_member_id(self): - self._team_member_id_value = None - self._team_member_id_present = False - - def __repr__(self): - return 'DeviceSessionArg(session_id={!r}, team_member_id={!r})'.format( - self._session_id_value, - self._team_member_id_value, - ) - -DeviceSessionArg_validator = bv.Struct(DeviceSessionArg) - -class DevicesActive(object): - """ - Each of the items is an array of values, one value per day. The value is the - number of devices active within a time window, ending with that day. If - there is no data for a day, then the value will be None. - - :ivar windows: Array of number of linked windows (desktop) clients with - activity. - :ivar macos: Array of number of linked mac (desktop) clients with activity. - :ivar linux: Array of number of linked linus (desktop) clients with - activity. - :ivar ios: Array of number of linked ios devices with activity. - :ivar android: Array of number of linked android devices with activity. - :ivar other: Array of number of other linked devices (blackberry, windows - phone, etc) with activity. - :ivar total: Array of total number of linked clients with activity. - """ - - __slots__ = [ - '_windows_value', - '_windows_present', - '_macos_value', - '_macos_present', - '_linux_value', - '_linux_present', - '_ios_value', - '_ios_present', - '_android_value', - '_android_present', - '_other_value', - '_other_present', - '_total_value', - '_total_present', - ] - - _has_required_fields = True - - def __init__(self, - windows=None, - macos=None, - linux=None, - ios=None, - android=None, - other=None, - total=None): - self._windows_value = None - self._windows_present = False - self._macos_value = None - self._macos_present = False - self._linux_value = None - self._linux_present = False - self._ios_value = None - self._ios_present = False - self._android_value = None - self._android_present = False - self._other_value = None - self._other_present = False - self._total_value = None - self._total_present = False - if windows is not None: - self.windows = windows - if macos is not None: - self.macos = macos - if linux is not None: - self.linux = linux - if ios is not None: - self.ios = ios - if android is not None: - self.android = android - if other is not None: - self.other = other - if total is not None: - self.total = total - - @property - def windows(self): - """ - Array of number of linked windows (desktop) clients with activity. - - :rtype: list of [Optional[long]] - """ - if self._windows_present: - return self._windows_value - else: - raise AttributeError("missing required field 'windows'") - - @windows.setter - def windows(self, val): - val = self._windows_validator.validate(val) - self._windows_value = val - self._windows_present = True - - @windows.deleter - def windows(self): - self._windows_value = None - self._windows_present = False - - @property - def macos(self): - """ - Array of number of linked mac (desktop) clients with activity. - - :rtype: list of [Optional[long]] - """ - if self._macos_present: - return self._macos_value - else: - raise AttributeError("missing required field 'macos'") - - @macos.setter - def macos(self, val): - val = self._macos_validator.validate(val) - self._macos_value = val - self._macos_present = True - - @macos.deleter - def macos(self): - self._macos_value = None - self._macos_present = False - - @property - def linux(self): - """ - Array of number of linked linus (desktop) clients with activity. - - :rtype: list of [Optional[long]] - """ - if self._linux_present: - return self._linux_value - else: - raise AttributeError("missing required field 'linux'") - - @linux.setter - def linux(self, val): - val = self._linux_validator.validate(val) - self._linux_value = val - self._linux_present = True - - @linux.deleter - def linux(self): - self._linux_value = None - self._linux_present = False - - @property - def ios(self): - """ - Array of number of linked ios devices with activity. - - :rtype: list of [Optional[long]] - """ - if self._ios_present: - return self._ios_value - else: - raise AttributeError("missing required field 'ios'") - - @ios.setter - def ios(self, val): - val = self._ios_validator.validate(val) - self._ios_value = val - self._ios_present = True - - @ios.deleter - def ios(self): - self._ios_value = None - self._ios_present = False - - @property - def android(self): - """ - Array of number of linked android devices with activity. - - :rtype: list of [Optional[long]] - """ - if self._android_present: - return self._android_value - else: - raise AttributeError("missing required field 'android'") - - @android.setter - def android(self, val): - val = self._android_validator.validate(val) - self._android_value = val - self._android_present = True - - @android.deleter - def android(self): - self._android_value = None - self._android_present = False - - @property - def other(self): - """ - Array of number of other linked devices (blackberry, windows phone, etc) - with activity. - - :rtype: list of [Optional[long]] - """ - if self._other_present: - return self._other_value - else: - raise AttributeError("missing required field 'other'") - - @other.setter - def other(self, val): - val = self._other_validator.validate(val) - self._other_value = val - self._other_present = True - - @other.deleter - def other(self): - self._other_value = None - self._other_present = False - - @property - def total(self): - """ - Array of total number of linked clients with activity. - - :rtype: list of [Optional[long]] - """ - if self._total_present: - return self._total_value - else: - raise AttributeError("missing required field 'total'") - - @total.setter - def total(self, val): - val = self._total_validator.validate(val) - self._total_value = val - self._total_present = True - - @total.deleter - def total(self): - self._total_value = None - self._total_present = False - - def __repr__(self): - return 'DevicesActive(windows={!r}, macos={!r}, linux={!r}, ios={!r}, android={!r}, other={!r}, total={!r})'.format( - self._windows_value, - self._macos_value, - self._linux_value, - self._ios_value, - self._android_value, - self._other_value, - self._total_value, - ) - -DevicesActive_validator = bv.Struct(DevicesActive) - -class Feature(bb.Union): - """ - A set of features that Dropbox for Business account support. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar upload_api_rate_limit: The number of upload API calls allowed per - month. - :ivar has_team_shared_dropbox: Does this team have a have a company shared - dropbox. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - upload_api_rate_limit = None - # Attribute is overwritten below the class definition - has_team_shared_dropbox = None - # Attribute is overwritten below the class definition - other = None - - def is_upload_api_rate_limit(self): - """ - Check if the union tag is ``upload_api_rate_limit``. - - :rtype: bool - """ - return self._tag == 'upload_api_rate_limit' - - def is_has_team_shared_dropbox(self): - """ - Check if the union tag is ``has_team_shared_dropbox``. - - :rtype: bool - """ - return self._tag == 'has_team_shared_dropbox' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'Feature(%r, %r)' % (self._tag, self._value) - -Feature_validator = bv.Union(Feature) - -class FeatureValue(bb.Union): - """ - The values correspond to entries in :class:`Feature`. You may get different - value according to your Dropbox for Business plan. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def upload_api_rate_limit(cls, val): - """ - Create an instance of this class set to the ``upload_api_rate_limit`` - tag with value ``val``. - - :param UploadApiRateLimitValue val: - :rtype: FeatureValue - """ - return cls('upload_api_rate_limit', val) - - @classmethod - def has_team_shared_dropbox(cls, val): - """ - Create an instance of this class set to the ``has_team_shared_dropbox`` - tag with value ``val``. - - :param HasTeamSharedDropboxValue val: - :rtype: FeatureValue - """ - return cls('has_team_shared_dropbox', val) - - def is_upload_api_rate_limit(self): - """ - Check if the union tag is ``upload_api_rate_limit``. - - :rtype: bool - """ - return self._tag == 'upload_api_rate_limit' - - def is_has_team_shared_dropbox(self): - """ - Check if the union tag is ``has_team_shared_dropbox``. - - :rtype: bool - """ - return self._tag == 'has_team_shared_dropbox' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_upload_api_rate_limit(self): - """ - Only call this if :meth:`is_upload_api_rate_limit` is true. - - :rtype: UploadApiRateLimitValue - """ - if not self.is_upload_api_rate_limit(): - raise AttributeError("tag 'upload_api_rate_limit' not set") - return self._value - - def get_has_team_shared_dropbox(self): - """ - Only call this if :meth:`is_has_team_shared_dropbox` is true. - - :rtype: HasTeamSharedDropboxValue - """ - if not self.is_has_team_shared_dropbox(): - raise AttributeError("tag 'has_team_shared_dropbox' not set") - return self._value - - def __repr__(self): - return 'FeatureValue(%r, %r)' % (self._tag, self._value) - -FeatureValue_validator = bv.Union(FeatureValue) - -class FeaturesGetValuesBatchArg(object): - """ - :ivar features: A list of features in :class:`Feature`. If the list is - empty, this route will return :class:`FeaturesGetValuesBatchError`. - """ - - __slots__ = [ - '_features_value', - '_features_present', - ] - - _has_required_fields = True - - def __init__(self, - features=None): - self._features_value = None - self._features_present = False - if features is not None: - self.features = features - - @property - def features(self): - """ - A list of features in :class:`Feature`. If the list is empty, this route - will return :class:`FeaturesGetValuesBatchError`. - - :rtype: list of [Feature] - """ - if self._features_present: - return self._features_value - else: - raise AttributeError("missing required field 'features'") - - @features.setter - def features(self, val): - val = self._features_validator.validate(val) - self._features_value = val - self._features_present = True - - @features.deleter - def features(self): - self._features_value = None - self._features_present = False - - def __repr__(self): - return 'FeaturesGetValuesBatchArg(features={!r})'.format( - self._features_value, - ) - -FeaturesGetValuesBatchArg_validator = bv.Struct(FeaturesGetValuesBatchArg) - -class FeaturesGetValuesBatchError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar empty_features_list: At least one :class:`Feature` must be included in - the :class:`FeaturesGetValuesBatchArg`.features list. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - empty_features_list = None - # Attribute is overwritten below the class definition - other = None - - def is_empty_features_list(self): - """ - Check if the union tag is ``empty_features_list``. - - :rtype: bool - """ - return self._tag == 'empty_features_list' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'FeaturesGetValuesBatchError(%r, %r)' % (self._tag, self._value) - -FeaturesGetValuesBatchError_validator = bv.Union(FeaturesGetValuesBatchError) - -class FeaturesGetValuesBatchResult(object): - - __slots__ = [ - '_values_value', - '_values_present', - ] - - _has_required_fields = True - - def __init__(self, - values=None): - self._values_value = None - self._values_present = False - if values is not None: - self.values = values - - @property - def values(self): - """ - :rtype: list of [FeatureValue] - """ - if self._values_present: - return self._values_value - else: - raise AttributeError("missing required field 'values'") - - @values.setter - def values(self, val): - val = self._values_validator.validate(val) - self._values_value = val - self._values_present = True - - @values.deleter - def values(self): - self._values_value = None - self._values_present = False - - def __repr__(self): - return 'FeaturesGetValuesBatchResult(values={!r})'.format( - self._values_value, - ) - -FeaturesGetValuesBatchResult_validator = bv.Struct(FeaturesGetValuesBatchResult) - -class GetActivityReport(BaseDfbReport): - """ - Activity Report Result. Each of the items in the storage report is an array - of values, one value per day. If there is no data for a day, then the value - will be None. - - :ivar adds: Array of total number of adds by team members. - :ivar edits: Array of number of edits by team members. If the same user - edits the same file multiple times this is counted as a single edit. - :ivar deletes: Array of total number of deletes by team members. - :ivar active_users_28_day: Array of the number of users who have been active - in the last 28 days. - :ivar active_users_7_day: Array of the number of users who have been active - in the last week. - :ivar active_users_1_day: Array of the number of users who have been active - in the last day. - :ivar active_shared_folders_28_day: Array of the number of shared folders - with some activity in the last 28 days. - :ivar active_shared_folders_7_day: Array of the number of shared folders - with some activity in the last week. - :ivar active_shared_folders_1_day: Array of the number of shared folders - with some activity in the last day. - :ivar shared_links_created: Array of the number of shared links created. - :ivar shared_links_viewed_by_team: Array of the number of views by team - users to shared links created by the team. - :ivar shared_links_viewed_by_outside_user: Array of the number of views by - users outside of the team to shared links created by the team. - :ivar shared_links_viewed_by_not_logged_in: Array of the number of views by - non-logged-in users to shared links created by the team. - :ivar shared_links_viewed_total: Array of the total number of views to - shared links created by the team. - """ - - __slots__ = [ - '_adds_value', - '_adds_present', - '_edits_value', - '_edits_present', - '_deletes_value', - '_deletes_present', - '_active_users_28_day_value', - '_active_users_28_day_present', - '_active_users_7_day_value', - '_active_users_7_day_present', - '_active_users_1_day_value', - '_active_users_1_day_present', - '_active_shared_folders_28_day_value', - '_active_shared_folders_28_day_present', - '_active_shared_folders_7_day_value', - '_active_shared_folders_7_day_present', - '_active_shared_folders_1_day_value', - '_active_shared_folders_1_day_present', - '_shared_links_created_value', - '_shared_links_created_present', - '_shared_links_viewed_by_team_value', - '_shared_links_viewed_by_team_present', - '_shared_links_viewed_by_outside_user_value', - '_shared_links_viewed_by_outside_user_present', - '_shared_links_viewed_by_not_logged_in_value', - '_shared_links_viewed_by_not_logged_in_present', - '_shared_links_viewed_total_value', - '_shared_links_viewed_total_present', - ] - - _has_required_fields = True - - def __init__(self, - start_date=None, - adds=None, - edits=None, - deletes=None, - active_users_28_day=None, - active_users_7_day=None, - active_users_1_day=None, - active_shared_folders_28_day=None, - active_shared_folders_7_day=None, - active_shared_folders_1_day=None, - shared_links_created=None, - shared_links_viewed_by_team=None, - shared_links_viewed_by_outside_user=None, - shared_links_viewed_by_not_logged_in=None, - shared_links_viewed_total=None): - super(GetActivityReport, self).__init__(start_date) - self._adds_value = None - self._adds_present = False - self._edits_value = None - self._edits_present = False - self._deletes_value = None - self._deletes_present = False - self._active_users_28_day_value = None - self._active_users_28_day_present = False - self._active_users_7_day_value = None - self._active_users_7_day_present = False - self._active_users_1_day_value = None - self._active_users_1_day_present = False - self._active_shared_folders_28_day_value = None - self._active_shared_folders_28_day_present = False - self._active_shared_folders_7_day_value = None - self._active_shared_folders_7_day_present = False - self._active_shared_folders_1_day_value = None - self._active_shared_folders_1_day_present = False - self._shared_links_created_value = None - self._shared_links_created_present = False - self._shared_links_viewed_by_team_value = None - self._shared_links_viewed_by_team_present = False - self._shared_links_viewed_by_outside_user_value = None - self._shared_links_viewed_by_outside_user_present = False - self._shared_links_viewed_by_not_logged_in_value = None - self._shared_links_viewed_by_not_logged_in_present = False - self._shared_links_viewed_total_value = None - self._shared_links_viewed_total_present = False - if adds is not None: - self.adds = adds - if edits is not None: - self.edits = edits - if deletes is not None: - self.deletes = deletes - if active_users_28_day is not None: - self.active_users_28_day = active_users_28_day - if active_users_7_day is not None: - self.active_users_7_day = active_users_7_day - if active_users_1_day is not None: - self.active_users_1_day = active_users_1_day - if active_shared_folders_28_day is not None: - self.active_shared_folders_28_day = active_shared_folders_28_day - if active_shared_folders_7_day is not None: - self.active_shared_folders_7_day = active_shared_folders_7_day - if active_shared_folders_1_day is not None: - self.active_shared_folders_1_day = active_shared_folders_1_day - if shared_links_created is not None: - self.shared_links_created = shared_links_created - if shared_links_viewed_by_team is not None: - self.shared_links_viewed_by_team = shared_links_viewed_by_team - if shared_links_viewed_by_outside_user is not None: - self.shared_links_viewed_by_outside_user = shared_links_viewed_by_outside_user - if shared_links_viewed_by_not_logged_in is not None: - self.shared_links_viewed_by_not_logged_in = shared_links_viewed_by_not_logged_in - if shared_links_viewed_total is not None: - self.shared_links_viewed_total = shared_links_viewed_total - - @property - def adds(self): - """ - Array of total number of adds by team members. - - :rtype: list of [Optional[long]] - """ - if self._adds_present: - return self._adds_value - else: - raise AttributeError("missing required field 'adds'") - - @adds.setter - def adds(self, val): - val = self._adds_validator.validate(val) - self._adds_value = val - self._adds_present = True - - @adds.deleter - def adds(self): - self._adds_value = None - self._adds_present = False - - @property - def edits(self): - """ - Array of number of edits by team members. If the same user edits the - same file multiple times this is counted as a single edit. - - :rtype: list of [Optional[long]] - """ - if self._edits_present: - return self._edits_value - else: - raise AttributeError("missing required field 'edits'") - - @edits.setter - def edits(self, val): - val = self._edits_validator.validate(val) - self._edits_value = val - self._edits_present = True - - @edits.deleter - def edits(self): - self._edits_value = None - self._edits_present = False - - @property - def deletes(self): - """ - Array of total number of deletes by team members. - - :rtype: list of [Optional[long]] - """ - if self._deletes_present: - return self._deletes_value - else: - raise AttributeError("missing required field 'deletes'") - - @deletes.setter - def deletes(self, val): - val = self._deletes_validator.validate(val) - self._deletes_value = val - self._deletes_present = True - - @deletes.deleter - def deletes(self): - self._deletes_value = None - self._deletes_present = False - - @property - def active_users_28_day(self): - """ - Array of the number of users who have been active in the last 28 days. - - :rtype: list of [Optional[long]] - """ - if self._active_users_28_day_present: - return self._active_users_28_day_value - else: - raise AttributeError("missing required field 'active_users_28_day'") - - @active_users_28_day.setter - def active_users_28_day(self, val): - val = self._active_users_28_day_validator.validate(val) - self._active_users_28_day_value = val - self._active_users_28_day_present = True - - @active_users_28_day.deleter - def active_users_28_day(self): - self._active_users_28_day_value = None - self._active_users_28_day_present = False - - @property - def active_users_7_day(self): - """ - Array of the number of users who have been active in the last week. - - :rtype: list of [Optional[long]] - """ - if self._active_users_7_day_present: - return self._active_users_7_day_value - else: - raise AttributeError("missing required field 'active_users_7_day'") - - @active_users_7_day.setter - def active_users_7_day(self, val): - val = self._active_users_7_day_validator.validate(val) - self._active_users_7_day_value = val - self._active_users_7_day_present = True - - @active_users_7_day.deleter - def active_users_7_day(self): - self._active_users_7_day_value = None - self._active_users_7_day_present = False - - @property - def active_users_1_day(self): - """ - Array of the number of users who have been active in the last day. - - :rtype: list of [Optional[long]] - """ - if self._active_users_1_day_present: - return self._active_users_1_day_value - else: - raise AttributeError("missing required field 'active_users_1_day'") - - @active_users_1_day.setter - def active_users_1_day(self, val): - val = self._active_users_1_day_validator.validate(val) - self._active_users_1_day_value = val - self._active_users_1_day_present = True - - @active_users_1_day.deleter - def active_users_1_day(self): - self._active_users_1_day_value = None - self._active_users_1_day_present = False - - @property - def active_shared_folders_28_day(self): - """ - Array of the number of shared folders with some activity in the last 28 - days. - - :rtype: list of [Optional[long]] - """ - if self._active_shared_folders_28_day_present: - return self._active_shared_folders_28_day_value - else: - raise AttributeError("missing required field 'active_shared_folders_28_day'") - - @active_shared_folders_28_day.setter - def active_shared_folders_28_day(self, val): - val = self._active_shared_folders_28_day_validator.validate(val) - self._active_shared_folders_28_day_value = val - self._active_shared_folders_28_day_present = True - - @active_shared_folders_28_day.deleter - def active_shared_folders_28_day(self): - self._active_shared_folders_28_day_value = None - self._active_shared_folders_28_day_present = False - - @property - def active_shared_folders_7_day(self): - """ - Array of the number of shared folders with some activity in the last - week. - - :rtype: list of [Optional[long]] - """ - if self._active_shared_folders_7_day_present: - return self._active_shared_folders_7_day_value - else: - raise AttributeError("missing required field 'active_shared_folders_7_day'") - - @active_shared_folders_7_day.setter - def active_shared_folders_7_day(self, val): - val = self._active_shared_folders_7_day_validator.validate(val) - self._active_shared_folders_7_day_value = val - self._active_shared_folders_7_day_present = True - - @active_shared_folders_7_day.deleter - def active_shared_folders_7_day(self): - self._active_shared_folders_7_day_value = None - self._active_shared_folders_7_day_present = False - - @property - def active_shared_folders_1_day(self): - """ - Array of the number of shared folders with some activity in the last - day. - - :rtype: list of [Optional[long]] - """ - if self._active_shared_folders_1_day_present: - return self._active_shared_folders_1_day_value - else: - raise AttributeError("missing required field 'active_shared_folders_1_day'") - - @active_shared_folders_1_day.setter - def active_shared_folders_1_day(self, val): - val = self._active_shared_folders_1_day_validator.validate(val) - self._active_shared_folders_1_day_value = val - self._active_shared_folders_1_day_present = True - - @active_shared_folders_1_day.deleter - def active_shared_folders_1_day(self): - self._active_shared_folders_1_day_value = None - self._active_shared_folders_1_day_present = False - - @property - def shared_links_created(self): - """ - Array of the number of shared links created. - - :rtype: list of [Optional[long]] - """ - if self._shared_links_created_present: - return self._shared_links_created_value - else: - raise AttributeError("missing required field 'shared_links_created'") - - @shared_links_created.setter - def shared_links_created(self, val): - val = self._shared_links_created_validator.validate(val) - self._shared_links_created_value = val - self._shared_links_created_present = True - - @shared_links_created.deleter - def shared_links_created(self): - self._shared_links_created_value = None - self._shared_links_created_present = False - - @property - def shared_links_viewed_by_team(self): - """ - Array of the number of views by team users to shared links created by - the team. - - :rtype: list of [Optional[long]] - """ - if self._shared_links_viewed_by_team_present: - return self._shared_links_viewed_by_team_value - else: - raise AttributeError("missing required field 'shared_links_viewed_by_team'") - - @shared_links_viewed_by_team.setter - def shared_links_viewed_by_team(self, val): - val = self._shared_links_viewed_by_team_validator.validate(val) - self._shared_links_viewed_by_team_value = val - self._shared_links_viewed_by_team_present = True - - @shared_links_viewed_by_team.deleter - def shared_links_viewed_by_team(self): - self._shared_links_viewed_by_team_value = None - self._shared_links_viewed_by_team_present = False - - @property - def shared_links_viewed_by_outside_user(self): - """ - Array of the number of views by users outside of the team to shared - links created by the team. - - :rtype: list of [Optional[long]] - """ - if self._shared_links_viewed_by_outside_user_present: - return self._shared_links_viewed_by_outside_user_value - else: - raise AttributeError("missing required field 'shared_links_viewed_by_outside_user'") - - @shared_links_viewed_by_outside_user.setter - def shared_links_viewed_by_outside_user(self, val): - val = self._shared_links_viewed_by_outside_user_validator.validate(val) - self._shared_links_viewed_by_outside_user_value = val - self._shared_links_viewed_by_outside_user_present = True - - @shared_links_viewed_by_outside_user.deleter - def shared_links_viewed_by_outside_user(self): - self._shared_links_viewed_by_outside_user_value = None - self._shared_links_viewed_by_outside_user_present = False - - @property - def shared_links_viewed_by_not_logged_in(self): - """ - Array of the number of views by non-logged-in users to shared links - created by the team. - - :rtype: list of [Optional[long]] - """ - if self._shared_links_viewed_by_not_logged_in_present: - return self._shared_links_viewed_by_not_logged_in_value - else: - raise AttributeError("missing required field 'shared_links_viewed_by_not_logged_in'") - - @shared_links_viewed_by_not_logged_in.setter - def shared_links_viewed_by_not_logged_in(self, val): - val = self._shared_links_viewed_by_not_logged_in_validator.validate(val) - self._shared_links_viewed_by_not_logged_in_value = val - self._shared_links_viewed_by_not_logged_in_present = True - - @shared_links_viewed_by_not_logged_in.deleter - def shared_links_viewed_by_not_logged_in(self): - self._shared_links_viewed_by_not_logged_in_value = None - self._shared_links_viewed_by_not_logged_in_present = False - - @property - def shared_links_viewed_total(self): - """ - Array of the total number of views to shared links created by the team. - - :rtype: list of [Optional[long]] - """ - if self._shared_links_viewed_total_present: - return self._shared_links_viewed_total_value - else: - raise AttributeError("missing required field 'shared_links_viewed_total'") - - @shared_links_viewed_total.setter - def shared_links_viewed_total(self, val): - val = self._shared_links_viewed_total_validator.validate(val) - self._shared_links_viewed_total_value = val - self._shared_links_viewed_total_present = True - - @shared_links_viewed_total.deleter - def shared_links_viewed_total(self): - self._shared_links_viewed_total_value = None - self._shared_links_viewed_total_present = False - - def __repr__(self): - return 'GetActivityReport(start_date={!r}, adds={!r}, edits={!r}, deletes={!r}, active_users_28_day={!r}, active_users_7_day={!r}, active_users_1_day={!r}, active_shared_folders_28_day={!r}, active_shared_folders_7_day={!r}, active_shared_folders_1_day={!r}, shared_links_created={!r}, shared_links_viewed_by_team={!r}, shared_links_viewed_by_outside_user={!r}, shared_links_viewed_by_not_logged_in={!r}, shared_links_viewed_total={!r})'.format( - self._start_date_value, - self._adds_value, - self._edits_value, - self._deletes_value, - self._active_users_28_day_value, - self._active_users_7_day_value, - self._active_users_1_day_value, - self._active_shared_folders_28_day_value, - self._active_shared_folders_7_day_value, - self._active_shared_folders_1_day_value, - self._shared_links_created_value, - self._shared_links_viewed_by_team_value, - self._shared_links_viewed_by_outside_user_value, - self._shared_links_viewed_by_not_logged_in_value, - self._shared_links_viewed_total_value, - ) - -GetActivityReport_validator = bv.Struct(GetActivityReport) - -class GetDevicesReport(BaseDfbReport): - """ - Devices Report Result. Contains subsections for different time ranges of - activity. Each of the items in each subsection of the storage report is an - array of values, one value per day. If there is no data for a day, then the - value will be None. - - :ivar active_1_day: Report of the number of devices active in the last day. - :ivar active_7_day: Report of the number of devices active in the last 7 - days. - :ivar active_28_day: Report of the number of devices active in the last 28 - days. - """ - - __slots__ = [ - '_active_1_day_value', - '_active_1_day_present', - '_active_7_day_value', - '_active_7_day_present', - '_active_28_day_value', - '_active_28_day_present', - ] - - _has_required_fields = True - - def __init__(self, - start_date=None, - active_1_day=None, - active_7_day=None, - active_28_day=None): - super(GetDevicesReport, self).__init__(start_date) - self._active_1_day_value = None - self._active_1_day_present = False - self._active_7_day_value = None - self._active_7_day_present = False - self._active_28_day_value = None - self._active_28_day_present = False - if active_1_day is not None: - self.active_1_day = active_1_day - if active_7_day is not None: - self.active_7_day = active_7_day - if active_28_day is not None: - self.active_28_day = active_28_day - - @property - def active_1_day(self): - """ - Report of the number of devices active in the last day. - - :rtype: DevicesActive - """ - if self._active_1_day_present: - return self._active_1_day_value - else: - raise AttributeError("missing required field 'active_1_day'") - - @active_1_day.setter - def active_1_day(self, val): - self._active_1_day_validator.validate_type_only(val) - self._active_1_day_value = val - self._active_1_day_present = True - - @active_1_day.deleter - def active_1_day(self): - self._active_1_day_value = None - self._active_1_day_present = False - - @property - def active_7_day(self): - """ - Report of the number of devices active in the last 7 days. - - :rtype: DevicesActive - """ - if self._active_7_day_present: - return self._active_7_day_value - else: - raise AttributeError("missing required field 'active_7_day'") - - @active_7_day.setter - def active_7_day(self, val): - self._active_7_day_validator.validate_type_only(val) - self._active_7_day_value = val - self._active_7_day_present = True - - @active_7_day.deleter - def active_7_day(self): - self._active_7_day_value = None - self._active_7_day_present = False - - @property - def active_28_day(self): - """ - Report of the number of devices active in the last 28 days. - - :rtype: DevicesActive - """ - if self._active_28_day_present: - return self._active_28_day_value - else: - raise AttributeError("missing required field 'active_28_day'") - - @active_28_day.setter - def active_28_day(self, val): - self._active_28_day_validator.validate_type_only(val) - self._active_28_day_value = val - self._active_28_day_present = True - - @active_28_day.deleter - def active_28_day(self): - self._active_28_day_value = None - self._active_28_day_present = False - - def __repr__(self): - return 'GetDevicesReport(start_date={!r}, active_1_day={!r}, active_7_day={!r}, active_28_day={!r})'.format( - self._start_date_value, - self._active_1_day_value, - self._active_7_day_value, - self._active_28_day_value, - ) - -GetDevicesReport_validator = bv.Struct(GetDevicesReport) - -class GetMembershipReport(BaseDfbReport): - """ - Membership Report Result. Each of the items in the storage report is an - array of values, one value per day. If there is no data for a day, then the - value will be None. - - :ivar team_size: Team size, for each day. - :ivar pending_invites: The number of pending invites to the team, for each - day. - :ivar members_joined: The number of members that joined the team, for each - day. - :ivar suspended_members: The number of suspended team members, for each day. - :ivar licenses: The total number of licenses the team has, for each day. - """ - - __slots__ = [ - '_team_size_value', - '_team_size_present', - '_pending_invites_value', - '_pending_invites_present', - '_members_joined_value', - '_members_joined_present', - '_suspended_members_value', - '_suspended_members_present', - '_licenses_value', - '_licenses_present', - ] - - _has_required_fields = True - - def __init__(self, - start_date=None, - team_size=None, - pending_invites=None, - members_joined=None, - suspended_members=None, - licenses=None): - super(GetMembershipReport, self).__init__(start_date) - self._team_size_value = None - self._team_size_present = False - self._pending_invites_value = None - self._pending_invites_present = False - self._members_joined_value = None - self._members_joined_present = False - self._suspended_members_value = None - self._suspended_members_present = False - self._licenses_value = None - self._licenses_present = False - if team_size is not None: - self.team_size = team_size - if pending_invites is not None: - self.pending_invites = pending_invites - if members_joined is not None: - self.members_joined = members_joined - if suspended_members is not None: - self.suspended_members = suspended_members - if licenses is not None: - self.licenses = licenses - - @property - def team_size(self): - """ - Team size, for each day. - - :rtype: list of [Optional[long]] - """ - if self._team_size_present: - return self._team_size_value - else: - raise AttributeError("missing required field 'team_size'") - - @team_size.setter - def team_size(self, val): - val = self._team_size_validator.validate(val) - self._team_size_value = val - self._team_size_present = True - - @team_size.deleter - def team_size(self): - self._team_size_value = None - self._team_size_present = False - - @property - def pending_invites(self): - """ - The number of pending invites to the team, for each day. - - :rtype: list of [Optional[long]] - """ - if self._pending_invites_present: - return self._pending_invites_value - else: - raise AttributeError("missing required field 'pending_invites'") - - @pending_invites.setter - def pending_invites(self, val): - val = self._pending_invites_validator.validate(val) - self._pending_invites_value = val - self._pending_invites_present = True - - @pending_invites.deleter - def pending_invites(self): - self._pending_invites_value = None - self._pending_invites_present = False - - @property - def members_joined(self): - """ - The number of members that joined the team, for each day. - - :rtype: list of [Optional[long]] - """ - if self._members_joined_present: - return self._members_joined_value - else: - raise AttributeError("missing required field 'members_joined'") - - @members_joined.setter - def members_joined(self, val): - val = self._members_joined_validator.validate(val) - self._members_joined_value = val - self._members_joined_present = True - - @members_joined.deleter - def members_joined(self): - self._members_joined_value = None - self._members_joined_present = False - - @property - def suspended_members(self): - """ - The number of suspended team members, for each day. - - :rtype: list of [Optional[long]] - """ - if self._suspended_members_present: - return self._suspended_members_value - else: - raise AttributeError("missing required field 'suspended_members'") - - @suspended_members.setter - def suspended_members(self, val): - val = self._suspended_members_validator.validate(val) - self._suspended_members_value = val - self._suspended_members_present = True - - @suspended_members.deleter - def suspended_members(self): - self._suspended_members_value = None - self._suspended_members_present = False - - @property - def licenses(self): - """ - The total number of licenses the team has, for each day. - - :rtype: list of [Optional[long]] - """ - if self._licenses_present: - return self._licenses_value - else: - raise AttributeError("missing required field 'licenses'") - - @licenses.setter - def licenses(self, val): - val = self._licenses_validator.validate(val) - self._licenses_value = val - self._licenses_present = True - - @licenses.deleter - def licenses(self): - self._licenses_value = None - self._licenses_present = False - - def __repr__(self): - return 'GetMembershipReport(start_date={!r}, team_size={!r}, pending_invites={!r}, members_joined={!r}, suspended_members={!r}, licenses={!r})'.format( - self._start_date_value, - self._team_size_value, - self._pending_invites_value, - self._members_joined_value, - self._suspended_members_value, - self._licenses_value, - ) - -GetMembershipReport_validator = bv.Struct(GetMembershipReport) - -class GetStorageReport(BaseDfbReport): - """ - Storage Report Result. Each of the items in the storage report is an array - of values, one value per day. If there is no data for a day, then the value - will be None. - - :ivar total_usage: Sum of the shared, unshared, and datastore usages, for - each day. - :ivar shared_usage: Array of the combined size (bytes) of team members' - shared folders, for each day. - :ivar unshared_usage: Array of the combined size (bytes) of team members' - root namespaces, for each day. - :ivar shared_folders: Array of the number of shared folders owned by team - members, for each day. - :ivar member_storage_map: Array of storage summaries of team members' - account sizes. Each storage summary is an array of key, value pairs, - where each pair describes a storage bucket. The key indicates the upper - bound of the bucket and the value is the number of users in that bucket. - There is one such summary per day. If there is no data for a day, the - storage summary will be empty. - """ - - __slots__ = [ - '_total_usage_value', - '_total_usage_present', - '_shared_usage_value', - '_shared_usage_present', - '_unshared_usage_value', - '_unshared_usage_present', - '_shared_folders_value', - '_shared_folders_present', - '_member_storage_map_value', - '_member_storage_map_present', - ] - - _has_required_fields = True - - def __init__(self, - start_date=None, - total_usage=None, - shared_usage=None, - unshared_usage=None, - shared_folders=None, - member_storage_map=None): - super(GetStorageReport, self).__init__(start_date) - self._total_usage_value = None - self._total_usage_present = False - self._shared_usage_value = None - self._shared_usage_present = False - self._unshared_usage_value = None - self._unshared_usage_present = False - self._shared_folders_value = None - self._shared_folders_present = False - self._member_storage_map_value = None - self._member_storage_map_present = False - if total_usage is not None: - self.total_usage = total_usage - if shared_usage is not None: - self.shared_usage = shared_usage - if unshared_usage is not None: - self.unshared_usage = unshared_usage - if shared_folders is not None: - self.shared_folders = shared_folders - if member_storage_map is not None: - self.member_storage_map = member_storage_map - - @property - def total_usage(self): - """ - Sum of the shared, unshared, and datastore usages, for each day. - - :rtype: list of [Optional[long]] - """ - if self._total_usage_present: - return self._total_usage_value - else: - raise AttributeError("missing required field 'total_usage'") - - @total_usage.setter - def total_usage(self, val): - val = self._total_usage_validator.validate(val) - self._total_usage_value = val - self._total_usage_present = True - - @total_usage.deleter - def total_usage(self): - self._total_usage_value = None - self._total_usage_present = False - - @property - def shared_usage(self): - """ - Array of the combined size (bytes) of team members' shared folders, for - each day. - - :rtype: list of [Optional[long]] - """ - if self._shared_usage_present: - return self._shared_usage_value - else: - raise AttributeError("missing required field 'shared_usage'") - - @shared_usage.setter - def shared_usage(self, val): - val = self._shared_usage_validator.validate(val) - self._shared_usage_value = val - self._shared_usage_present = True - - @shared_usage.deleter - def shared_usage(self): - self._shared_usage_value = None - self._shared_usage_present = False - - @property - def unshared_usage(self): - """ - Array of the combined size (bytes) of team members' root namespaces, for - each day. - - :rtype: list of [Optional[long]] - """ - if self._unshared_usage_present: - return self._unshared_usage_value - else: - raise AttributeError("missing required field 'unshared_usage'") - - @unshared_usage.setter - def unshared_usage(self, val): - val = self._unshared_usage_validator.validate(val) - self._unshared_usage_value = val - self._unshared_usage_present = True - - @unshared_usage.deleter - def unshared_usage(self): - self._unshared_usage_value = None - self._unshared_usage_present = False - - @property - def shared_folders(self): - """ - Array of the number of shared folders owned by team members, for each - day. - - :rtype: list of [Optional[long]] - """ - if self._shared_folders_present: - return self._shared_folders_value - else: - raise AttributeError("missing required field 'shared_folders'") - - @shared_folders.setter - def shared_folders(self, val): - val = self._shared_folders_validator.validate(val) - self._shared_folders_value = val - self._shared_folders_present = True - - @shared_folders.deleter - def shared_folders(self): - self._shared_folders_value = None - self._shared_folders_present = False - - @property - def member_storage_map(self): - """ - Array of storage summaries of team members' account sizes. Each storage - summary is an array of key, value pairs, where each pair describes a - storage bucket. The key indicates the upper bound of the bucket and the - value is the number of users in that bucket. There is one such summary - per day. If there is no data for a day, the storage summary will be - empty. - - :rtype: list of [list of [StorageBucket]] - """ - if self._member_storage_map_present: - return self._member_storage_map_value - else: - raise AttributeError("missing required field 'member_storage_map'") - - @member_storage_map.setter - def member_storage_map(self, val): - val = self._member_storage_map_validator.validate(val) - self._member_storage_map_value = val - self._member_storage_map_present = True - - @member_storage_map.deleter - def member_storage_map(self): - self._member_storage_map_value = None - self._member_storage_map_present = False - - def __repr__(self): - return 'GetStorageReport(start_date={!r}, total_usage={!r}, shared_usage={!r}, unshared_usage={!r}, shared_folders={!r}, member_storage_map={!r})'.format( - self._start_date_value, - self._total_usage_value, - self._shared_usage_value, - self._unshared_usage_value, - self._shared_folders_value, - self._member_storage_map_value, - ) - -GetStorageReport_validator = bv.Struct(GetStorageReport) - -class GroupAccessType(bb.Union): - """ - Role of a user in group. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar member: User is a member of the group, but has no special permissions. - :ivar owner: User can rename the group, and add/remove members. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - member = None - # Attribute is overwritten below the class definition - owner = None - - def is_member(self): - """ - Check if the union tag is ``member``. - - :rtype: bool - """ - return self._tag == 'member' - - def is_owner(self): - """ - Check if the union tag is ``owner``. - - :rtype: bool - """ - return self._tag == 'owner' - - def __repr__(self): - return 'GroupAccessType(%r, %r)' % (self._tag, self._value) - -GroupAccessType_validator = bv.Union(GroupAccessType) - -class GroupCreateArg(object): - """ - :ivar group_name: Group name. - :ivar group_external_id: The creator of a team can associate an arbitrary - external ID to the group. - :ivar group_management_type: Whether the team can be managed by selected - users, or only by team admins. - """ - - __slots__ = [ - '_group_name_value', - '_group_name_present', - '_group_external_id_value', - '_group_external_id_present', - '_group_management_type_value', - '_group_management_type_present', - ] - - _has_required_fields = True - - def __init__(self, - group_name=None, - group_external_id=None, - group_management_type=None): - self._group_name_value = None - self._group_name_present = False - self._group_external_id_value = None - self._group_external_id_present = False - self._group_management_type_value = None - self._group_management_type_present = False - if group_name is not None: - self.group_name = group_name - if group_external_id is not None: - self.group_external_id = group_external_id - if group_management_type is not None: - self.group_management_type = group_management_type - - @property - def group_name(self): - """ - Group name. - - :rtype: str - """ - if self._group_name_present: - return self._group_name_value - else: - raise AttributeError("missing required field 'group_name'") - - @group_name.setter - def group_name(self, val): - val = self._group_name_validator.validate(val) - self._group_name_value = val - self._group_name_present = True - - @group_name.deleter - def group_name(self): - self._group_name_value = None - self._group_name_present = False - - @property - def group_external_id(self): - """ - The creator of a team can associate an arbitrary external ID to the - group. - - :rtype: str - """ - if self._group_external_id_present: - return self._group_external_id_value - else: - return None - - @group_external_id.setter - def group_external_id(self, val): - if val is None: - del self.group_external_id - return - val = self._group_external_id_validator.validate(val) - self._group_external_id_value = val - self._group_external_id_present = True - - @group_external_id.deleter - def group_external_id(self): - self._group_external_id_value = None - self._group_external_id_present = False - - @property - def group_management_type(self): - """ - Whether the team can be managed by selected users, or only by team - admins. - - :rtype: team_common.GroupManagementType_validator - """ - if self._group_management_type_present: - return self._group_management_type_value - else: - return None - - @group_management_type.setter - def group_management_type(self, val): - if val is None: - del self.group_management_type - return - self._group_management_type_validator.validate_type_only(val) - self._group_management_type_value = val - self._group_management_type_present = True - - @group_management_type.deleter - def group_management_type(self): - self._group_management_type_value = None - self._group_management_type_present = False - - def __repr__(self): - return 'GroupCreateArg(group_name={!r}, group_external_id={!r}, group_management_type={!r})'.format( - self._group_name_value, - self._group_external_id_value, - self._group_management_type_value, - ) - -GroupCreateArg_validator = bv.Struct(GroupCreateArg) - -class GroupCreateError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar group_name_already_used: The requested group name is already being - used by another group. - :ivar group_name_invalid: Group name is empty or has invalid characters. - :ivar external_id_already_in_use: The requested external ID is already being - used by another group. - :ivar system_managed_group_disallowed: System-managed group cannot be - manually created. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - group_name_already_used = None - # Attribute is overwritten below the class definition - group_name_invalid = None - # Attribute is overwritten below the class definition - external_id_already_in_use = None - # Attribute is overwritten below the class definition - system_managed_group_disallowed = None - # Attribute is overwritten below the class definition - other = None - - def is_group_name_already_used(self): - """ - Check if the union tag is ``group_name_already_used``. - - :rtype: bool - """ - return self._tag == 'group_name_already_used' - - def is_group_name_invalid(self): - """ - Check if the union tag is ``group_name_invalid``. - - :rtype: bool - """ - return self._tag == 'group_name_invalid' - - def is_external_id_already_in_use(self): - """ - Check if the union tag is ``external_id_already_in_use``. - - :rtype: bool - """ - return self._tag == 'external_id_already_in_use' - - def is_system_managed_group_disallowed(self): - """ - Check if the union tag is ``system_managed_group_disallowed``. - - :rtype: bool - """ - return self._tag == 'system_managed_group_disallowed' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'GroupCreateError(%r, %r)' % (self._tag, self._value) - -GroupCreateError_validator = bv.Union(GroupCreateError) - -class GroupSelectorError(bb.Union): - """ - Error that can be raised when :class:`GroupSelector` is used. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar group_not_found: No matching group found. No groups match the - specified group ID. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - group_not_found = None - # Attribute is overwritten below the class definition - other = None - - def is_group_not_found(self): - """ - Check if the union tag is ``group_not_found``. - - :rtype: bool - """ - return self._tag == 'group_not_found' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'GroupSelectorError(%r, %r)' % (self._tag, self._value) - -GroupSelectorError_validator = bv.Union(GroupSelectorError) - -class GroupSelectorWithTeamGroupError(GroupSelectorError): - """ - Error that can be raised when :class:`GroupSelector` is used and team groups - are disallowed from being used. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar system_managed_group_disallowed: This operation is not supported on - system-managed groups. - """ - - # Attribute is overwritten below the class definition - system_managed_group_disallowed = None - - def is_system_managed_group_disallowed(self): - """ - Check if the union tag is ``system_managed_group_disallowed``. - - :rtype: bool - """ - return self._tag == 'system_managed_group_disallowed' - - def __repr__(self): - return 'GroupSelectorWithTeamGroupError(%r, %r)' % (self._tag, self._value) - -GroupSelectorWithTeamGroupError_validator = bv.Union(GroupSelectorWithTeamGroupError) - -class GroupDeleteError(GroupSelectorWithTeamGroupError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar group_already_deleted: This group has already been deleted. - """ - - # Attribute is overwritten below the class definition - group_already_deleted = None - - def is_group_already_deleted(self): - """ - Check if the union tag is ``group_already_deleted``. - - :rtype: bool - """ - return self._tag == 'group_already_deleted' - - def __repr__(self): - return 'GroupDeleteError(%r, %r)' % (self._tag, self._value) - -GroupDeleteError_validator = bv.Union(GroupDeleteError) - -class GroupFullInfo(team_common.GroupSummary): - """ - Full description of a group. - - :ivar members: List of group members. - :ivar created: The group creation time as a UTC timestamp in milliseconds - since the Unix epoch. - """ - - __slots__ = [ - '_members_value', - '_members_present', - '_created_value', - '_created_present', - ] - - _has_required_fields = True - - def __init__(self, - group_name=None, - group_id=None, - group_management_type=None, - created=None, - group_external_id=None, - member_count=None, - members=None): - super(GroupFullInfo, self).__init__(group_name, - group_id, - group_management_type, - group_external_id, - member_count) - self._members_value = None - self._members_present = False - self._created_value = None - self._created_present = False - if members is not None: - self.members = members - if created is not None: - self.created = created - - @property - def members(self): - """ - List of group members. - - :rtype: list of [GroupMemberInfo] - """ - if self._members_present: - return self._members_value - else: - return None - - @members.setter - def members(self, val): - if val is None: - del self.members - return - val = self._members_validator.validate(val) - self._members_value = val - self._members_present = True - - @members.deleter - def members(self): - self._members_value = None - self._members_present = False - - @property - def created(self): - """ - The group creation time as a UTC timestamp in milliseconds since the - Unix epoch. - - :rtype: long - """ - if self._created_present: - return self._created_value - else: - raise AttributeError("missing required field 'created'") - - @created.setter - def created(self, val): - val = self._created_validator.validate(val) - self._created_value = val - self._created_present = True - - @created.deleter - def created(self): - self._created_value = None - self._created_present = False - - def __repr__(self): - return 'GroupFullInfo(group_name={!r}, group_id={!r}, group_management_type={!r}, created={!r}, group_external_id={!r}, member_count={!r}, members={!r})'.format( - self._group_name_value, - self._group_id_value, - self._group_management_type_value, - self._created_value, - self._group_external_id_value, - self._member_count_value, - self._members_value, - ) - -GroupFullInfo_validator = bv.Struct(GroupFullInfo) - -class GroupMemberInfo(object): - """ - Profile of group member, and role in group. - - :ivar profile: Profile of group member. - :ivar access_type: The role that the user has in the group. - """ - - __slots__ = [ - '_profile_value', - '_profile_present', - '_access_type_value', - '_access_type_present', - ] - - _has_required_fields = True - - def __init__(self, - profile=None, - access_type=None): - self._profile_value = None - self._profile_present = False - self._access_type_value = None - self._access_type_present = False - if profile is not None: - self.profile = profile - if access_type is not None: - self.access_type = access_type - - @property - def profile(self): - """ - Profile of group member. - - :rtype: MemberProfile - """ - if self._profile_present: - return self._profile_value - else: - raise AttributeError("missing required field 'profile'") - - @profile.setter - def profile(self, val): - self._profile_validator.validate_type_only(val) - self._profile_value = val - self._profile_present = True - - @profile.deleter - def profile(self): - self._profile_value = None - self._profile_present = False - - @property - def access_type(self): - """ - The role that the user has in the group. - - :rtype: GroupAccessType - """ - if self._access_type_present: - return self._access_type_value - else: - raise AttributeError("missing required field 'access_type'") - - @access_type.setter - def access_type(self, val): - self._access_type_validator.validate_type_only(val) - self._access_type_value = val - self._access_type_present = True - - @access_type.deleter - def access_type(self): - self._access_type_value = None - self._access_type_present = False - - def __repr__(self): - return 'GroupMemberInfo(profile={!r}, access_type={!r})'.format( - self._profile_value, - self._access_type_value, - ) - -GroupMemberInfo_validator = bv.Struct(GroupMemberInfo) - -class GroupMemberSelector(object): - """ - Argument for selecting a group and a single user. - - :ivar group: Specify a group. - :ivar user: Identity of a user that is a member of ``group``. - """ - - __slots__ = [ - '_group_value', - '_group_present', - '_user_value', - '_user_present', - ] - - _has_required_fields = True - - def __init__(self, - group=None, - user=None): - self._group_value = None - self._group_present = False - self._user_value = None - self._user_present = False - if group is not None: - self.group = group - if user is not None: - self.user = user - - @property - def group(self): - """ - Specify a group. - - :rtype: GroupSelector - """ - if self._group_present: - return self._group_value - else: - raise AttributeError("missing required field 'group'") - - @group.setter - def group(self, val): - self._group_validator.validate_type_only(val) - self._group_value = val - self._group_present = True - - @group.deleter - def group(self): - self._group_value = None - self._group_present = False - - @property - def user(self): - """ - Identity of a user that is a member of ``group``. - - :rtype: UserSelectorArg - """ - if self._user_present: - return self._user_value - else: - raise AttributeError("missing required field 'user'") - - @user.setter - def user(self, val): - self._user_validator.validate_type_only(val) - self._user_value = val - self._user_present = True - - @user.deleter - def user(self): - self._user_value = None - self._user_present = False - - def __repr__(self): - return 'GroupMemberSelector(group={!r}, user={!r})'.format( - self._group_value, - self._user_value, - ) - -GroupMemberSelector_validator = bv.Struct(GroupMemberSelector) - -class GroupMemberSelectorError(GroupSelectorWithTeamGroupError): - """ - Error that can be raised when :class:`GroupMemberSelector` is used, and the - user is required to be a member of the specified group. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar member_not_in_group: The specified user is not a member of this group. - """ - - # Attribute is overwritten below the class definition - member_not_in_group = None - - def is_member_not_in_group(self): - """ - Check if the union tag is ``member_not_in_group``. - - :rtype: bool - """ - return self._tag == 'member_not_in_group' - - def __repr__(self): - return 'GroupMemberSelectorError(%r, %r)' % (self._tag, self._value) - -GroupMemberSelectorError_validator = bv.Union(GroupMemberSelectorError) - -class GroupMemberSetAccessTypeError(GroupMemberSelectorError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar user_cannot_be_manager_of_company_managed_group: A company managed - group cannot be managed by a user. - """ - - # Attribute is overwritten below the class definition - user_cannot_be_manager_of_company_managed_group = None - - def is_user_cannot_be_manager_of_company_managed_group(self): - """ - Check if the union tag is ``user_cannot_be_manager_of_company_managed_group``. - - :rtype: bool - """ - return self._tag == 'user_cannot_be_manager_of_company_managed_group' - - def __repr__(self): - return 'GroupMemberSetAccessTypeError(%r, %r)' % (self._tag, self._value) - -GroupMemberSetAccessTypeError_validator = bv.Union(GroupMemberSetAccessTypeError) - -class IncludeMembersArg(object): - """ - :ivar return_members: Whether to return the list of members in the group. - Note that the default value will cause all the group members to be - returned in the response. This may take a long time for large groups. - """ - - __slots__ = [ - '_return_members_value', - '_return_members_present', - ] - - _has_required_fields = False - - def __init__(self, - return_members=None): - self._return_members_value = None - self._return_members_present = False - if return_members is not None: - self.return_members = return_members - - @property - def return_members(self): - """ - Whether to return the list of members in the group. Note that the - default value will cause all the group members to be returned in the - response. This may take a long time for large groups. - - :rtype: bool - """ - if self._return_members_present: - return self._return_members_value - else: - return True - - @return_members.setter - def return_members(self, val): - val = self._return_members_validator.validate(val) - self._return_members_value = val - self._return_members_present = True - - @return_members.deleter - def return_members(self): - self._return_members_value = None - self._return_members_present = False - - def __repr__(self): - return 'IncludeMembersArg(return_members={!r})'.format( - self._return_members_value, - ) - -IncludeMembersArg_validator = bv.Struct(IncludeMembersArg) - -class GroupMembersAddArg(IncludeMembersArg): - """ - :ivar group: Group to which users will be added. - :ivar members: List of users to be added to the group. - """ - - __slots__ = [ - '_group_value', - '_group_present', - '_members_value', - '_members_present', - ] - - _has_required_fields = True - - def __init__(self, - group=None, - members=None, - return_members=None): - super(GroupMembersAddArg, self).__init__(return_members) - self._group_value = None - self._group_present = False - self._members_value = None - self._members_present = False - if group is not None: - self.group = group - if members is not None: - self.members = members - - @property - def group(self): - """ - Group to which users will be added. - - :rtype: GroupSelector - """ - if self._group_present: - return self._group_value - else: - raise AttributeError("missing required field 'group'") - - @group.setter - def group(self, val): - self._group_validator.validate_type_only(val) - self._group_value = val - self._group_present = True - - @group.deleter - def group(self): - self._group_value = None - self._group_present = False - - @property - def members(self): - """ - List of users to be added to the group. - - :rtype: list of [MemberAccess] - """ - if self._members_present: - return self._members_value - else: - raise AttributeError("missing required field 'members'") - - @members.setter - def members(self, val): - val = self._members_validator.validate(val) - self._members_value = val - self._members_present = True - - @members.deleter - def members(self): - self._members_value = None - self._members_present = False - - def __repr__(self): - return 'GroupMembersAddArg(group={!r}, members={!r}, return_members={!r})'.format( - self._group_value, - self._members_value, - self._return_members_value, - ) - -GroupMembersAddArg_validator = bv.Struct(GroupMembersAddArg) - -class GroupMembersAddError(GroupSelectorWithTeamGroupError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar duplicate_user: You cannot add duplicate users. One or more of the - members you are trying to add is already a member of the group. - :ivar group_not_in_team: Group is not in this team. You cannot add members - to a group that is outside of your team. - :ivar list of [str] members_not_in_team: These members are not part of your - team. Currently, you cannot add members to a group if they are not part - of your team, though this may change in a subsequent version. To add new - members to your Dropbox Business team, use the :route:`members/add` - endpoint. - :ivar list of [str] users_not_found: These users were not found in Dropbox. - :ivar user_must_be_active_to_be_owner: A suspended user cannot be added to a - group as ``GroupAccessType.owner``. - :ivar list of [str] user_cannot_be_manager_of_company_managed_group: A - company-managed group cannot be managed by a user. - """ - - # Attribute is overwritten below the class definition - duplicate_user = None - # Attribute is overwritten below the class definition - group_not_in_team = None - # Attribute is overwritten below the class definition - user_must_be_active_to_be_owner = None - - @classmethod - def members_not_in_team(cls, val): - """ - Create an instance of this class set to the ``members_not_in_team`` tag - with value ``val``. - - :param list of [str] val: - :rtype: GroupMembersAddError - """ - return cls('members_not_in_team', val) - - @classmethod - def users_not_found(cls, val): - """ - Create an instance of this class set to the ``users_not_found`` tag with - value ``val``. - - :param list of [str] val: - :rtype: GroupMembersAddError - """ - return cls('users_not_found', val) - - @classmethod - def user_cannot_be_manager_of_company_managed_group(cls, val): - """ - Create an instance of this class set to the - ``user_cannot_be_manager_of_company_managed_group`` tag with value - ``val``. - - :param list of [str] val: - :rtype: GroupMembersAddError - """ - return cls('user_cannot_be_manager_of_company_managed_group', val) - - def is_duplicate_user(self): - """ - Check if the union tag is ``duplicate_user``. - - :rtype: bool - """ - return self._tag == 'duplicate_user' - - def is_group_not_in_team(self): - """ - Check if the union tag is ``group_not_in_team``. - - :rtype: bool - """ - return self._tag == 'group_not_in_team' - - def is_members_not_in_team(self): - """ - Check if the union tag is ``members_not_in_team``. - - :rtype: bool - """ - return self._tag == 'members_not_in_team' - - def is_users_not_found(self): - """ - Check if the union tag is ``users_not_found``. - - :rtype: bool - """ - return self._tag == 'users_not_found' - - def is_user_must_be_active_to_be_owner(self): - """ - Check if the union tag is ``user_must_be_active_to_be_owner``. - - :rtype: bool - """ - return self._tag == 'user_must_be_active_to_be_owner' - - def is_user_cannot_be_manager_of_company_managed_group(self): - """ - Check if the union tag is ``user_cannot_be_manager_of_company_managed_group``. - - :rtype: bool - """ - return self._tag == 'user_cannot_be_manager_of_company_managed_group' - - def get_members_not_in_team(self): - """ - These members are not part of your team. Currently, you cannot add - members to a group if they are not part of your team, though this may - change in a subsequent version. To add new members to your Dropbox - Business team, use the :meth:`dropbox.dropbox.Dropbox.team_members_add` - endpoint. - - Only call this if :meth:`is_members_not_in_team` is true. - - :rtype: list of [str] - """ - if not self.is_members_not_in_team(): - raise AttributeError("tag 'members_not_in_team' not set") - return self._value - - def get_users_not_found(self): - """ - These users were not found in Dropbox. - - Only call this if :meth:`is_users_not_found` is true. - - :rtype: list of [str] - """ - if not self.is_users_not_found(): - raise AttributeError("tag 'users_not_found' not set") - return self._value - - def get_user_cannot_be_manager_of_company_managed_group(self): - """ - A company-managed group cannot be managed by a user. - - Only call this if :meth:`is_user_cannot_be_manager_of_company_managed_group` is true. - - :rtype: list of [str] - """ - if not self.is_user_cannot_be_manager_of_company_managed_group(): - raise AttributeError("tag 'user_cannot_be_manager_of_company_managed_group' not set") - return self._value - - def __repr__(self): - return 'GroupMembersAddError(%r, %r)' % (self._tag, self._value) - -GroupMembersAddError_validator = bv.Union(GroupMembersAddError) - -class GroupMembersChangeResult(object): - """ - Result returned by :meth:`dropbox.dropbox.Dropbox.team_groups_members_add` - and :meth:`dropbox.dropbox.Dropbox.team_groups_members_remove`. - - :ivar group_info: The group info after member change operation has been - performed. - :ivar async_job_id: An ID that can be used to obtain the status of - granting/revoking group-owned resources. - """ - - __slots__ = [ - '_group_info_value', - '_group_info_present', - '_async_job_id_value', - '_async_job_id_present', - ] - - _has_required_fields = True - - def __init__(self, - group_info=None, - async_job_id=None): - self._group_info_value = None - self._group_info_present = False - self._async_job_id_value = None - self._async_job_id_present = False - if group_info is not None: - self.group_info = group_info - if async_job_id is not None: - self.async_job_id = async_job_id - - @property - def group_info(self): - """ - The group info after member change operation has been performed. - - :rtype: GroupFullInfo - """ - if self._group_info_present: - return self._group_info_value - else: - raise AttributeError("missing required field 'group_info'") - - @group_info.setter - def group_info(self, val): - self._group_info_validator.validate_type_only(val) - self._group_info_value = val - self._group_info_present = True - - @group_info.deleter - def group_info(self): - self._group_info_value = None - self._group_info_present = False - - @property - def async_job_id(self): - """ - An ID that can be used to obtain the status of granting/revoking - group-owned resources. - - :rtype: str - """ - if self._async_job_id_present: - return self._async_job_id_value - else: - raise AttributeError("missing required field 'async_job_id'") - - @async_job_id.setter - def async_job_id(self, val): - val = self._async_job_id_validator.validate(val) - self._async_job_id_value = val - self._async_job_id_present = True - - @async_job_id.deleter - def async_job_id(self): - self._async_job_id_value = None - self._async_job_id_present = False - - def __repr__(self): - return 'GroupMembersChangeResult(group_info={!r}, async_job_id={!r})'.format( - self._group_info_value, - self._async_job_id_value, - ) - -GroupMembersChangeResult_validator = bv.Struct(GroupMembersChangeResult) - -class GroupMembersRemoveArg(IncludeMembersArg): - """ - :ivar group: Group from which users will be removed. - :ivar users: List of users to be removed from the group. - """ - - __slots__ = [ - '_group_value', - '_group_present', - '_users_value', - '_users_present', - ] - - _has_required_fields = True - - def __init__(self, - group=None, - users=None, - return_members=None): - super(GroupMembersRemoveArg, self).__init__(return_members) - self._group_value = None - self._group_present = False - self._users_value = None - self._users_present = False - if group is not None: - self.group = group - if users is not None: - self.users = users - - @property - def group(self): - """ - Group from which users will be removed. - - :rtype: GroupSelector - """ - if self._group_present: - return self._group_value - else: - raise AttributeError("missing required field 'group'") - - @group.setter - def group(self, val): - self._group_validator.validate_type_only(val) - self._group_value = val - self._group_present = True - - @group.deleter - def group(self): - self._group_value = None - self._group_present = False - - @property - def users(self): - """ - List of users to be removed from the group. - - :rtype: list of [UserSelectorArg] - """ - if self._users_present: - return self._users_value - else: - raise AttributeError("missing required field 'users'") - - @users.setter - def users(self, val): - val = self._users_validator.validate(val) - self._users_value = val - self._users_present = True - - @users.deleter - def users(self): - self._users_value = None - self._users_present = False - - def __repr__(self): - return 'GroupMembersRemoveArg(group={!r}, users={!r}, return_members={!r})'.format( - self._group_value, - self._users_value, - self._return_members_value, - ) - -GroupMembersRemoveArg_validator = bv.Struct(GroupMembersRemoveArg) - -class GroupMembersSelectorError(GroupSelectorWithTeamGroupError): - """ - Error that can be raised when :class:`GroupMembersSelector` is used, and the - users are required to be members of the specified group. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar member_not_in_group: At least one of the specified users is not a - member of the group. - """ - - # Attribute is overwritten below the class definition - member_not_in_group = None - - def is_member_not_in_group(self): - """ - Check if the union tag is ``member_not_in_group``. - - :rtype: bool - """ - return self._tag == 'member_not_in_group' - - def __repr__(self): - return 'GroupMembersSelectorError(%r, %r)' % (self._tag, self._value) - -GroupMembersSelectorError_validator = bv.Union(GroupMembersSelectorError) - -class GroupMembersRemoveError(GroupMembersSelectorError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar group_not_in_team: Group is not in this team. You cannot remove - members from a group that is outside of your team. - :ivar list of [str] members_not_in_team: These members are not part of your - team. - :ivar list of [str] users_not_found: These users were not found in Dropbox. - """ - - # Attribute is overwritten below the class definition - group_not_in_team = None - - @classmethod - def members_not_in_team(cls, val): - """ - Create an instance of this class set to the ``members_not_in_team`` tag - with value ``val``. - - :param list of [str] val: - :rtype: GroupMembersRemoveError - """ - return cls('members_not_in_team', val) - - @classmethod - def users_not_found(cls, val): - """ - Create an instance of this class set to the ``users_not_found`` tag with - value ``val``. - - :param list of [str] val: - :rtype: GroupMembersRemoveError - """ - return cls('users_not_found', val) - - def is_group_not_in_team(self): - """ - Check if the union tag is ``group_not_in_team``. - - :rtype: bool - """ - return self._tag == 'group_not_in_team' - - def is_members_not_in_team(self): - """ - Check if the union tag is ``members_not_in_team``. - - :rtype: bool - """ - return self._tag == 'members_not_in_team' - - def is_users_not_found(self): - """ - Check if the union tag is ``users_not_found``. - - :rtype: bool - """ - return self._tag == 'users_not_found' - - def get_members_not_in_team(self): - """ - These members are not part of your team. - - Only call this if :meth:`is_members_not_in_team` is true. - - :rtype: list of [str] - """ - if not self.is_members_not_in_team(): - raise AttributeError("tag 'members_not_in_team' not set") - return self._value - - def get_users_not_found(self): - """ - These users were not found in Dropbox. - - Only call this if :meth:`is_users_not_found` is true. - - :rtype: list of [str] - """ - if not self.is_users_not_found(): - raise AttributeError("tag 'users_not_found' not set") - return self._value - - def __repr__(self): - return 'GroupMembersRemoveError(%r, %r)' % (self._tag, self._value) - -GroupMembersRemoveError_validator = bv.Union(GroupMembersRemoveError) - -class GroupMembersSelector(object): - """ - Argument for selecting a group and a list of users. - - :ivar group: Specify a group. - :ivar users: A list of users that are members of ``group``. - """ - - __slots__ = [ - '_group_value', - '_group_present', - '_users_value', - '_users_present', - ] - - _has_required_fields = True - - def __init__(self, - group=None, - users=None): - self._group_value = None - self._group_present = False - self._users_value = None - self._users_present = False - if group is not None: - self.group = group - if users is not None: - self.users = users - - @property - def group(self): - """ - Specify a group. - - :rtype: GroupSelector - """ - if self._group_present: - return self._group_value - else: - raise AttributeError("missing required field 'group'") - - @group.setter - def group(self, val): - self._group_validator.validate_type_only(val) - self._group_value = val - self._group_present = True - - @group.deleter - def group(self): - self._group_value = None - self._group_present = False - - @property - def users(self): - """ - A list of users that are members of ``group``. - - :rtype: UsersSelectorArg - """ - if self._users_present: - return self._users_value - else: - raise AttributeError("missing required field 'users'") - - @users.setter - def users(self, val): - self._users_validator.validate_type_only(val) - self._users_value = val - self._users_present = True - - @users.deleter - def users(self): - self._users_value = None - self._users_present = False - - def __repr__(self): - return 'GroupMembersSelector(group={!r}, users={!r})'.format( - self._group_value, - self._users_value, - ) - -GroupMembersSelector_validator = bv.Struct(GroupMembersSelector) - -class GroupMembersSetAccessTypeArg(GroupMemberSelector): - """ - :ivar access_type: New group access type the user will have. - :ivar return_members: Whether to return the list of members in the group. - Note that the default value will cause all the group members to be - returned in the response. This may take a long time for large groups. - """ - - __slots__ = [ - '_access_type_value', - '_access_type_present', - '_return_members_value', - '_return_members_present', - ] - - _has_required_fields = True - - def __init__(self, - group=None, - user=None, - access_type=None, - return_members=None): - super(GroupMembersSetAccessTypeArg, self).__init__(group, - user) - self._access_type_value = None - self._access_type_present = False - self._return_members_value = None - self._return_members_present = False - if access_type is not None: - self.access_type = access_type - if return_members is not None: - self.return_members = return_members - - @property - def access_type(self): - """ - New group access type the user will have. - - :rtype: GroupAccessType - """ - if self._access_type_present: - return self._access_type_value - else: - raise AttributeError("missing required field 'access_type'") - - @access_type.setter - def access_type(self, val): - self._access_type_validator.validate_type_only(val) - self._access_type_value = val - self._access_type_present = True - - @access_type.deleter - def access_type(self): - self._access_type_value = None - self._access_type_present = False - - @property - def return_members(self): - """ - Whether to return the list of members in the group. Note that the - default value will cause all the group members to be returned in the - response. This may take a long time for large groups. - - :rtype: bool - """ - if self._return_members_present: - return self._return_members_value - else: - return True - - @return_members.setter - def return_members(self, val): - val = self._return_members_validator.validate(val) - self._return_members_value = val - self._return_members_present = True - - @return_members.deleter - def return_members(self): - self._return_members_value = None - self._return_members_present = False - - def __repr__(self): - return 'GroupMembersSetAccessTypeArg(group={!r}, user={!r}, access_type={!r}, return_members={!r})'.format( - self._group_value, - self._user_value, - self._access_type_value, - self._return_members_value, - ) - -GroupMembersSetAccessTypeArg_validator = bv.Struct(GroupMembersSetAccessTypeArg) - -class GroupSelector(bb.Union): - """ - Argument for selecting a single group, either by group_id or by external - group ID. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar str group_id: Group ID. - :ivar str group_external_id: External ID of the group. - """ - - _catch_all = None - - @classmethod - def group_id(cls, val): - """ - Create an instance of this class set to the ``group_id`` tag with value - ``val``. - - :param str val: - :rtype: GroupSelector - """ - return cls('group_id', val) - - @classmethod - def group_external_id(cls, val): - """ - Create an instance of this class set to the ``group_external_id`` tag - with value ``val``. - - :param str val: - :rtype: GroupSelector - """ - return cls('group_external_id', val) - - def is_group_id(self): - """ - Check if the union tag is ``group_id``. - - :rtype: bool - """ - return self._tag == 'group_id' - - def is_group_external_id(self): - """ - Check if the union tag is ``group_external_id``. - - :rtype: bool - """ - return self._tag == 'group_external_id' - - def get_group_id(self): - """ - Group ID. - - Only call this if :meth:`is_group_id` is true. - - :rtype: str - """ - if not self.is_group_id(): - raise AttributeError("tag 'group_id' not set") - return self._value - - def get_group_external_id(self): - """ - External ID of the group. - - Only call this if :meth:`is_group_external_id` is true. - - :rtype: str - """ - if not self.is_group_external_id(): - raise AttributeError("tag 'group_external_id' not set") - return self._value - - def __repr__(self): - return 'GroupSelector(%r, %r)' % (self._tag, self._value) - -GroupSelector_validator = bv.Union(GroupSelector) - -class GroupUpdateArgs(IncludeMembersArg): - """ - :ivar group: Specify a group. - :ivar new_group_name: Optional argument. Set group name to this if provided. - :ivar new_group_external_id: Optional argument. New group external ID. If - the argument is None, the group's external_id won't be updated. If the - argument is empty string, the group's external id will be cleared. - :ivar new_group_management_type: Set new group management type, if provided. - """ - - __slots__ = [ - '_group_value', - '_group_present', - '_new_group_name_value', - '_new_group_name_present', - '_new_group_external_id_value', - '_new_group_external_id_present', - '_new_group_management_type_value', - '_new_group_management_type_present', - ] - - _has_required_fields = True - - def __init__(self, - group=None, - return_members=None, - new_group_name=None, - new_group_external_id=None, - new_group_management_type=None): - super(GroupUpdateArgs, self).__init__(return_members) - self._group_value = None - self._group_present = False - self._new_group_name_value = None - self._new_group_name_present = False - self._new_group_external_id_value = None - self._new_group_external_id_present = False - self._new_group_management_type_value = None - self._new_group_management_type_present = False - if group is not None: - self.group = group - if new_group_name is not None: - self.new_group_name = new_group_name - if new_group_external_id is not None: - self.new_group_external_id = new_group_external_id - if new_group_management_type is not None: - self.new_group_management_type = new_group_management_type - - @property - def group(self): - """ - Specify a group. - - :rtype: GroupSelector - """ - if self._group_present: - return self._group_value - else: - raise AttributeError("missing required field 'group'") - - @group.setter - def group(self, val): - self._group_validator.validate_type_only(val) - self._group_value = val - self._group_present = True - - @group.deleter - def group(self): - self._group_value = None - self._group_present = False - - @property - def new_group_name(self): - """ - Optional argument. Set group name to this if provided. - - :rtype: str - """ - if self._new_group_name_present: - return self._new_group_name_value - else: - return None - - @new_group_name.setter - def new_group_name(self, val): - if val is None: - del self.new_group_name - return - val = self._new_group_name_validator.validate(val) - self._new_group_name_value = val - self._new_group_name_present = True - - @new_group_name.deleter - def new_group_name(self): - self._new_group_name_value = None - self._new_group_name_present = False - - @property - def new_group_external_id(self): - """ - Optional argument. New group external ID. If the argument is None, the - group's external_id won't be updated. If the argument is empty string, - the group's external id will be cleared. - - :rtype: str - """ - if self._new_group_external_id_present: - return self._new_group_external_id_value - else: - return None - - @new_group_external_id.setter - def new_group_external_id(self, val): - if val is None: - del self.new_group_external_id - return - val = self._new_group_external_id_validator.validate(val) - self._new_group_external_id_value = val - self._new_group_external_id_present = True - - @new_group_external_id.deleter - def new_group_external_id(self): - self._new_group_external_id_value = None - self._new_group_external_id_present = False - - @property - def new_group_management_type(self): - """ - Set new group management type, if provided. - - :rtype: team_common.GroupManagementType_validator - """ - if self._new_group_management_type_present: - return self._new_group_management_type_value - else: - return None - - @new_group_management_type.setter - def new_group_management_type(self, val): - if val is None: - del self.new_group_management_type - return - self._new_group_management_type_validator.validate_type_only(val) - self._new_group_management_type_value = val - self._new_group_management_type_present = True - - @new_group_management_type.deleter - def new_group_management_type(self): - self._new_group_management_type_value = None - self._new_group_management_type_present = False - - def __repr__(self): - return 'GroupUpdateArgs(group={!r}, return_members={!r}, new_group_name={!r}, new_group_external_id={!r}, new_group_management_type={!r})'.format( - self._group_value, - self._return_members_value, - self._new_group_name_value, - self._new_group_external_id_value, - self._new_group_management_type_value, - ) - -GroupUpdateArgs_validator = bv.Struct(GroupUpdateArgs) - -class GroupUpdateError(GroupSelectorWithTeamGroupError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar group_name_already_used: The requested group name is already being - used by another group. - :ivar group_name_invalid: Group name is empty or has invalid characters. - :ivar external_id_already_in_use: The requested external ID is already being - used by another group. - """ - - # Attribute is overwritten below the class definition - group_name_already_used = None - # Attribute is overwritten below the class definition - group_name_invalid = None - # Attribute is overwritten below the class definition - external_id_already_in_use = None - - def is_group_name_already_used(self): - """ - Check if the union tag is ``group_name_already_used``. - - :rtype: bool - """ - return self._tag == 'group_name_already_used' - - def is_group_name_invalid(self): - """ - Check if the union tag is ``group_name_invalid``. - - :rtype: bool - """ - return self._tag == 'group_name_invalid' - - def is_external_id_already_in_use(self): - """ - Check if the union tag is ``external_id_already_in_use``. - - :rtype: bool - """ - return self._tag == 'external_id_already_in_use' - - def __repr__(self): - return 'GroupUpdateError(%r, %r)' % (self._tag, self._value) - -GroupUpdateError_validator = bv.Union(GroupUpdateError) - -class GroupsGetInfoError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar group_not_on_team: The group is not on your team. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - group_not_on_team = None - # Attribute is overwritten below the class definition - other = None - - def is_group_not_on_team(self): - """ - Check if the union tag is ``group_not_on_team``. - - :rtype: bool - """ - return self._tag == 'group_not_on_team' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'GroupsGetInfoError(%r, %r)' % (self._tag, self._value) - -GroupsGetInfoError_validator = bv.Union(GroupsGetInfoError) - -class GroupsGetInfoItem(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar str id_not_found: An ID that was provided as a parameter to - :route:`groups/get_info`, and did not match a corresponding group. The - ID can be a group ID, or an external ID, depending on how the method was - called. - :ivar GroupFullInfo group_info: Info about a group. - """ - - _catch_all = None - - @classmethod - def id_not_found(cls, val): - """ - Create an instance of this class set to the ``id_not_found`` tag with - value ``val``. - - :param str val: - :rtype: GroupsGetInfoItem - """ - return cls('id_not_found', val) - - @classmethod - def group_info(cls, val): - """ - Create an instance of this class set to the ``group_info`` tag with - value ``val``. - - :param GroupFullInfo val: - :rtype: GroupsGetInfoItem - """ - return cls('group_info', val) - - def is_id_not_found(self): - """ - Check if the union tag is ``id_not_found``. - - :rtype: bool - """ - return self._tag == 'id_not_found' - - def is_group_info(self): - """ - Check if the union tag is ``group_info``. - - :rtype: bool - """ - return self._tag == 'group_info' - - def get_id_not_found(self): - """ - An ID that was provided as a parameter to - :meth:`dropbox.dropbox.Dropbox.team_groups_get_info`, and did not match - a corresponding group. The ID can be a group ID, or an external ID, - depending on how the method was called. - - Only call this if :meth:`is_id_not_found` is true. - - :rtype: str - """ - if not self.is_id_not_found(): - raise AttributeError("tag 'id_not_found' not set") - return self._value - - def get_group_info(self): - """ - Info about a group. - - Only call this if :meth:`is_group_info` is true. - - :rtype: GroupFullInfo - """ - if not self.is_group_info(): - raise AttributeError("tag 'group_info' not set") - return self._value - - def __repr__(self): - return 'GroupsGetInfoItem(%r, %r)' % (self._tag, self._value) - -GroupsGetInfoItem_validator = bv.Union(GroupsGetInfoItem) - -class GroupsListArg(object): - """ - :ivar limit: Number of results to return per call. - """ - - __slots__ = [ - '_limit_value', - '_limit_present', - ] - - _has_required_fields = False - - def __init__(self, - limit=None): - self._limit_value = None - self._limit_present = False - if limit is not None: - self.limit = limit - - @property - def limit(self): - """ - Number of results to return per call. - - :rtype: long - """ - if self._limit_present: - return self._limit_value - else: - return 1000 - - @limit.setter - def limit(self, val): - val = self._limit_validator.validate(val) - self._limit_value = val - self._limit_present = True - - @limit.deleter - def limit(self): - self._limit_value = None - self._limit_present = False - - def __repr__(self): - return 'GroupsListArg(limit={!r})'.format( - self._limit_value, - ) - -GroupsListArg_validator = bv.Struct(GroupsListArg) - -class GroupsListContinueArg(object): - """ - :ivar cursor: Indicates from what point to get the next set of groups. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - cursor=None): - self._cursor_value = None - self._cursor_present = False - if cursor is not None: - self.cursor = cursor - - @property - def cursor(self): - """ - Indicates from what point to get the next set of groups. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'GroupsListContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - -GroupsListContinueArg_validator = bv.Struct(GroupsListContinueArg) - -class GroupsListContinueError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar invalid_cursor: The cursor is invalid. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - invalid_cursor = None - # Attribute is overwritten below the class definition - other = None - - def is_invalid_cursor(self): - """ - Check if the union tag is ``invalid_cursor``. - - :rtype: bool - """ - return self._tag == 'invalid_cursor' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'GroupsListContinueError(%r, %r)' % (self._tag, self._value) - -GroupsListContinueError_validator = bv.Union(GroupsListContinueError) - -class GroupsListResult(object): - """ - :ivar cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_groups_list_continue` to obtain the - additional groups. - :ivar has_more: Is true if there are additional groups that have not been - returned yet. An additional call to - :meth:`dropbox.dropbox.Dropbox.team_groups_list_continue` can retrieve - them. - """ - - __slots__ = [ - '_groups_value', - '_groups_present', - '_cursor_value', - '_cursor_present', - '_has_more_value', - '_has_more_present', - ] - - _has_required_fields = True - - def __init__(self, - groups=None, - cursor=None, - has_more=None): - self._groups_value = None - self._groups_present = False - self._cursor_value = None - self._cursor_present = False - self._has_more_value = None - self._has_more_present = False - if groups is not None: - self.groups = groups - if cursor is not None: - self.cursor = cursor - if has_more is not None: - self.has_more = has_more - - @property - def groups(self): - """ - :rtype: list of [team_common.GroupSummary_validator] - """ - if self._groups_present: - return self._groups_value - else: - raise AttributeError("missing required field 'groups'") - - @groups.setter - def groups(self, val): - val = self._groups_validator.validate(val) - self._groups_value = val - self._groups_present = True - - @groups.deleter - def groups(self): - self._groups_value = None - self._groups_present = False - - @property - def cursor(self): - """ - Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_groups_list_continue` to obtain the - additional groups. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - @property - def has_more(self): - """ - Is true if there are additional groups that have not been returned yet. - An additional call to - :meth:`dropbox.dropbox.Dropbox.team_groups_list_continue` can retrieve - them. - - :rtype: bool - """ - if self._has_more_present: - return self._has_more_value - else: - raise AttributeError("missing required field 'has_more'") - - @has_more.setter - def has_more(self, val): - val = self._has_more_validator.validate(val) - self._has_more_value = val - self._has_more_present = True - - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False - - def __repr__(self): - return 'GroupsListResult(groups={!r}, cursor={!r}, has_more={!r})'.format( - self._groups_value, - self._cursor_value, - self._has_more_value, - ) - -GroupsListResult_validator = bv.Struct(GroupsListResult) - -class GroupsMembersListArg(object): - """ - :ivar group: The group whose members are to be listed. - :ivar limit: Number of results to return per call. - """ - - __slots__ = [ - '_group_value', - '_group_present', - '_limit_value', - '_limit_present', - ] - - _has_required_fields = True - - def __init__(self, - group=None, - limit=None): - self._group_value = None - self._group_present = False - self._limit_value = None - self._limit_present = False - if group is not None: - self.group = group - if limit is not None: - self.limit = limit - - @property - def group(self): - """ - The group whose members are to be listed. - - :rtype: GroupSelector - """ - if self._group_present: - return self._group_value - else: - raise AttributeError("missing required field 'group'") - - @group.setter - def group(self, val): - self._group_validator.validate_type_only(val) - self._group_value = val - self._group_present = True - - @group.deleter - def group(self): - self._group_value = None - self._group_present = False - - @property - def limit(self): - """ - Number of results to return per call. - - :rtype: long - """ - if self._limit_present: - return self._limit_value - else: - return 1000 - - @limit.setter - def limit(self, val): - val = self._limit_validator.validate(val) - self._limit_value = val - self._limit_present = True - - @limit.deleter - def limit(self): - self._limit_value = None - self._limit_present = False - - def __repr__(self): - return 'GroupsMembersListArg(group={!r}, limit={!r})'.format( - self._group_value, - self._limit_value, - ) - -GroupsMembersListArg_validator = bv.Struct(GroupsMembersListArg) - -class GroupsMembersListContinueArg(object): - """ - :ivar cursor: Indicates from what point to get the next set of groups. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - cursor=None): - self._cursor_value = None - self._cursor_present = False - if cursor is not None: - self.cursor = cursor - - @property - def cursor(self): - """ - Indicates from what point to get the next set of groups. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'GroupsMembersListContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - -GroupsMembersListContinueArg_validator = bv.Struct(GroupsMembersListContinueArg) - -class GroupsMembersListContinueError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar invalid_cursor: The cursor is invalid. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - invalid_cursor = None - # Attribute is overwritten below the class definition - other = None - - def is_invalid_cursor(self): - """ - Check if the union tag is ``invalid_cursor``. - - :rtype: bool - """ - return self._tag == 'invalid_cursor' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'GroupsMembersListContinueError(%r, %r)' % (self._tag, self._value) - -GroupsMembersListContinueError_validator = bv.Union(GroupsMembersListContinueError) - -class GroupsMembersListResult(object): - """ - :ivar cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_groups_members_list_continue` to - obtain additional group members. - :ivar has_more: Is true if there are additional group members that have not - been returned yet. An additional call to - :meth:`dropbox.dropbox.Dropbox.team_groups_members_list_continue` can - retrieve them. - """ - - __slots__ = [ - '_members_value', - '_members_present', - '_cursor_value', - '_cursor_present', - '_has_more_value', - '_has_more_present', - ] - - _has_required_fields = True - - def __init__(self, - members=None, - cursor=None, - has_more=None): - self._members_value = None - self._members_present = False - self._cursor_value = None - self._cursor_present = False - self._has_more_value = None - self._has_more_present = False - if members is not None: - self.members = members - if cursor is not None: - self.cursor = cursor - if has_more is not None: - self.has_more = has_more - - @property - def members(self): - """ - :rtype: list of [GroupMemberInfo] - """ - if self._members_present: - return self._members_value - else: - raise AttributeError("missing required field 'members'") - - @members.setter - def members(self, val): - val = self._members_validator.validate(val) - self._members_value = val - self._members_present = True - - @members.deleter - def members(self): - self._members_value = None - self._members_present = False - - @property - def cursor(self): - """ - Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_groups_members_list_continue` to - obtain additional group members. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - @property - def has_more(self): - """ - Is true if there are additional group members that have not been - returned yet. An additional call to - :meth:`dropbox.dropbox.Dropbox.team_groups_members_list_continue` can - retrieve them. - - :rtype: bool - """ - if self._has_more_present: - return self._has_more_value - else: - raise AttributeError("missing required field 'has_more'") - - @has_more.setter - def has_more(self, val): - val = self._has_more_validator.validate(val) - self._has_more_value = val - self._has_more_present = True - - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False - - def __repr__(self): - return 'GroupsMembersListResult(members={!r}, cursor={!r}, has_more={!r})'.format( - self._members_value, - self._cursor_value, - self._has_more_value, - ) - -GroupsMembersListResult_validator = bv.Struct(GroupsMembersListResult) - -class GroupsPollError(async.PollError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar access_denied: You are not allowed to poll this job. - """ - - # Attribute is overwritten below the class definition - access_denied = None - - def is_access_denied(self): - """ - Check if the union tag is ``access_denied``. - - :rtype: bool - """ - return self._tag == 'access_denied' - - def __repr__(self): - return 'GroupsPollError(%r, %r)' % (self._tag, self._value) - -GroupsPollError_validator = bv.Union(GroupsPollError) - -class GroupsSelector(bb.Union): - """ - Argument for selecting a list of groups, either by group_ids, or external - group IDs. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar list of [str] group_ids: List of group IDs. - :ivar list of [str] group_external_ids: List of external IDs of groups. - """ - - _catch_all = None - - @classmethod - def group_ids(cls, val): - """ - Create an instance of this class set to the ``group_ids`` tag with value - ``val``. - - :param list of [str] val: - :rtype: GroupsSelector - """ - return cls('group_ids', val) - - @classmethod - def group_external_ids(cls, val): - """ - Create an instance of this class set to the ``group_external_ids`` tag - with value ``val``. - - :param list of [str] val: - :rtype: GroupsSelector - """ - return cls('group_external_ids', val) - - def is_group_ids(self): - """ - Check if the union tag is ``group_ids``. - - :rtype: bool - """ - return self._tag == 'group_ids' - - def is_group_external_ids(self): - """ - Check if the union tag is ``group_external_ids``. - - :rtype: bool - """ - return self._tag == 'group_external_ids' - - def get_group_ids(self): - """ - List of group IDs. - - Only call this if :meth:`is_group_ids` is true. - - :rtype: list of [str] - """ - if not self.is_group_ids(): - raise AttributeError("tag 'group_ids' not set") - return self._value - - def get_group_external_ids(self): - """ - List of external IDs of groups. - - Only call this if :meth:`is_group_external_ids` is true. - - :rtype: list of [str] - """ - if not self.is_group_external_ids(): - raise AttributeError("tag 'group_external_ids' not set") - return self._value - - def __repr__(self): - return 'GroupsSelector(%r, %r)' % (self._tag, self._value) - -GroupsSelector_validator = bv.Union(GroupsSelector) - -class HasTeamSharedDropboxValue(bb.Union): - """ - The value for ``Feature.has_team_shared_dropbox``. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar bool has_team_shared_dropbox: Does this team have a team shared - dropbox. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def has_team_shared_dropbox(cls, val): - """ - Create an instance of this class set to the ``has_team_shared_dropbox`` - tag with value ``val``. - - :param bool val: - :rtype: HasTeamSharedDropboxValue - """ - return cls('has_team_shared_dropbox', val) - - def is_has_team_shared_dropbox(self): - """ - Check if the union tag is ``has_team_shared_dropbox``. - - :rtype: bool - """ - return self._tag == 'has_team_shared_dropbox' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_has_team_shared_dropbox(self): - """ - Does this team have a team shared dropbox. - - Only call this if :meth:`is_has_team_shared_dropbox` is true. - - :rtype: bool - """ - if not self.is_has_team_shared_dropbox(): - raise AttributeError("tag 'has_team_shared_dropbox' not set") - return self._value - - def __repr__(self): - return 'HasTeamSharedDropboxValue(%r, %r)' % (self._tag, self._value) - -HasTeamSharedDropboxValue_validator = bv.Union(HasTeamSharedDropboxValue) - -class ListMemberAppsArg(object): - """ - :ivar team_member_id: The team member id. - """ - - __slots__ = [ - '_team_member_id_value', - '_team_member_id_present', - ] - - _has_required_fields = True - - def __init__(self, - team_member_id=None): - self._team_member_id_value = None - self._team_member_id_present = False - if team_member_id is not None: - self.team_member_id = team_member_id - - @property - def team_member_id(self): - """ - The team member id. - - :rtype: str - """ - if self._team_member_id_present: - return self._team_member_id_value - else: - raise AttributeError("missing required field 'team_member_id'") - - @team_member_id.setter - def team_member_id(self, val): - val = self._team_member_id_validator.validate(val) - self._team_member_id_value = val - self._team_member_id_present = True - - @team_member_id.deleter - def team_member_id(self): - self._team_member_id_value = None - self._team_member_id_present = False - - def __repr__(self): - return 'ListMemberAppsArg(team_member_id={!r})'.format( - self._team_member_id_value, - ) - -ListMemberAppsArg_validator = bv.Struct(ListMemberAppsArg) - -class ListMemberAppsError(bb.Union): - """ - Error returned by - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_member_linked_apps`. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar member_not_found: Member not found. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - member_not_found = None - # Attribute is overwritten below the class definition - other = None - - def is_member_not_found(self): - """ - Check if the union tag is ``member_not_found``. - - :rtype: bool - """ - return self._tag == 'member_not_found' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'ListMemberAppsError(%r, %r)' % (self._tag, self._value) - -ListMemberAppsError_validator = bv.Union(ListMemberAppsError) - -class ListMemberAppsResult(object): - """ - :ivar linked_api_apps: List of third party applications linked by this team - member. - """ - - __slots__ = [ - '_linked_api_apps_value', - '_linked_api_apps_present', - ] - - _has_required_fields = True - - def __init__(self, - linked_api_apps=None): - self._linked_api_apps_value = None - self._linked_api_apps_present = False - if linked_api_apps is not None: - self.linked_api_apps = linked_api_apps - - @property - def linked_api_apps(self): - """ - List of third party applications linked by this team member. - - :rtype: list of [ApiApp] - """ - if self._linked_api_apps_present: - return self._linked_api_apps_value - else: - raise AttributeError("missing required field 'linked_api_apps'") - - @linked_api_apps.setter - def linked_api_apps(self, val): - val = self._linked_api_apps_validator.validate(val) - self._linked_api_apps_value = val - self._linked_api_apps_present = True - - @linked_api_apps.deleter - def linked_api_apps(self): - self._linked_api_apps_value = None - self._linked_api_apps_present = False - - def __repr__(self): - return 'ListMemberAppsResult(linked_api_apps={!r})'.format( - self._linked_api_apps_value, - ) - -ListMemberAppsResult_validator = bv.Struct(ListMemberAppsResult) - -class ListMemberDevicesArg(object): - """ - :ivar team_member_id: The team's member id. - :ivar include_web_sessions: Whether to list web sessions of the team's - member. - :ivar include_desktop_clients: Whether to list linked desktop devices of the - team's member. - :ivar include_mobile_clients: Whether to list linked mobile devices of the - team's member. - """ - - __slots__ = [ - '_team_member_id_value', - '_team_member_id_present', - '_include_web_sessions_value', - '_include_web_sessions_present', - '_include_desktop_clients_value', - '_include_desktop_clients_present', - '_include_mobile_clients_value', - '_include_mobile_clients_present', - ] - - _has_required_fields = True - - def __init__(self, - team_member_id=None, - include_web_sessions=None, - include_desktop_clients=None, - include_mobile_clients=None): - self._team_member_id_value = None - self._team_member_id_present = False - self._include_web_sessions_value = None - self._include_web_sessions_present = False - self._include_desktop_clients_value = None - self._include_desktop_clients_present = False - self._include_mobile_clients_value = None - self._include_mobile_clients_present = False - if team_member_id is not None: - self.team_member_id = team_member_id - if include_web_sessions is not None: - self.include_web_sessions = include_web_sessions - if include_desktop_clients is not None: - self.include_desktop_clients = include_desktop_clients - if include_mobile_clients is not None: - self.include_mobile_clients = include_mobile_clients - - @property - def team_member_id(self): - """ - The team's member id. - - :rtype: str - """ - if self._team_member_id_present: - return self._team_member_id_value - else: - raise AttributeError("missing required field 'team_member_id'") - - @team_member_id.setter - def team_member_id(self, val): - val = self._team_member_id_validator.validate(val) - self._team_member_id_value = val - self._team_member_id_present = True - - @team_member_id.deleter - def team_member_id(self): - self._team_member_id_value = None - self._team_member_id_present = False - - @property - def include_web_sessions(self): - """ - Whether to list web sessions of the team's member. - - :rtype: bool - """ - if self._include_web_sessions_present: - return self._include_web_sessions_value - else: - return True - - @include_web_sessions.setter - def include_web_sessions(self, val): - val = self._include_web_sessions_validator.validate(val) - self._include_web_sessions_value = val - self._include_web_sessions_present = True - - @include_web_sessions.deleter - def include_web_sessions(self): - self._include_web_sessions_value = None - self._include_web_sessions_present = False - - @property - def include_desktop_clients(self): - """ - Whether to list linked desktop devices of the team's member. - - :rtype: bool - """ - if self._include_desktop_clients_present: - return self._include_desktop_clients_value - else: - return True - - @include_desktop_clients.setter - def include_desktop_clients(self, val): - val = self._include_desktop_clients_validator.validate(val) - self._include_desktop_clients_value = val - self._include_desktop_clients_present = True - - @include_desktop_clients.deleter - def include_desktop_clients(self): - self._include_desktop_clients_value = None - self._include_desktop_clients_present = False - - @property - def include_mobile_clients(self): - """ - Whether to list linked mobile devices of the team's member. - - :rtype: bool - """ - if self._include_mobile_clients_present: - return self._include_mobile_clients_value - else: - return True - - @include_mobile_clients.setter - def include_mobile_clients(self, val): - val = self._include_mobile_clients_validator.validate(val) - self._include_mobile_clients_value = val - self._include_mobile_clients_present = True - - @include_mobile_clients.deleter - def include_mobile_clients(self): - self._include_mobile_clients_value = None - self._include_mobile_clients_present = False - - def __repr__(self): - return 'ListMemberDevicesArg(team_member_id={!r}, include_web_sessions={!r}, include_desktop_clients={!r}, include_mobile_clients={!r})'.format( - self._team_member_id_value, - self._include_web_sessions_value, - self._include_desktop_clients_value, - self._include_mobile_clients_value, - ) - -ListMemberDevicesArg_validator = bv.Struct(ListMemberDevicesArg) - -class ListMemberDevicesError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar member_not_found: Member not found. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - member_not_found = None - # Attribute is overwritten below the class definition - other = None - - def is_member_not_found(self): - """ - Check if the union tag is ``member_not_found``. - - :rtype: bool - """ - return self._tag == 'member_not_found' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'ListMemberDevicesError(%r, %r)' % (self._tag, self._value) - -ListMemberDevicesError_validator = bv.Union(ListMemberDevicesError) - -class ListMemberDevicesResult(object): - """ - :ivar active_web_sessions: List of web sessions made by this team member. - :ivar desktop_client_sessions: List of desktop clients used by this team - member. - :ivar mobile_client_sessions: List of mobile client used by this team - member. - """ - - __slots__ = [ - '_active_web_sessions_value', - '_active_web_sessions_present', - '_desktop_client_sessions_value', - '_desktop_client_sessions_present', - '_mobile_client_sessions_value', - '_mobile_client_sessions_present', - ] - - _has_required_fields = False - - def __init__(self, - active_web_sessions=None, - desktop_client_sessions=None, - mobile_client_sessions=None): - self._active_web_sessions_value = None - self._active_web_sessions_present = False - self._desktop_client_sessions_value = None - self._desktop_client_sessions_present = False - self._mobile_client_sessions_value = None - self._mobile_client_sessions_present = False - if active_web_sessions is not None: - self.active_web_sessions = active_web_sessions - if desktop_client_sessions is not None: - self.desktop_client_sessions = desktop_client_sessions - if mobile_client_sessions is not None: - self.mobile_client_sessions = mobile_client_sessions - - @property - def active_web_sessions(self): - """ - List of web sessions made by this team member. - - :rtype: list of [ActiveWebSession] - """ - if self._active_web_sessions_present: - return self._active_web_sessions_value - else: - return None - - @active_web_sessions.setter - def active_web_sessions(self, val): - if val is None: - del self.active_web_sessions - return - val = self._active_web_sessions_validator.validate(val) - self._active_web_sessions_value = val - self._active_web_sessions_present = True - - @active_web_sessions.deleter - def active_web_sessions(self): - self._active_web_sessions_value = None - self._active_web_sessions_present = False - - @property - def desktop_client_sessions(self): - """ - List of desktop clients used by this team member. - - :rtype: list of [DesktopClientSession] - """ - if self._desktop_client_sessions_present: - return self._desktop_client_sessions_value - else: - return None - - @desktop_client_sessions.setter - def desktop_client_sessions(self, val): - if val is None: - del self.desktop_client_sessions - return - val = self._desktop_client_sessions_validator.validate(val) - self._desktop_client_sessions_value = val - self._desktop_client_sessions_present = True - - @desktop_client_sessions.deleter - def desktop_client_sessions(self): - self._desktop_client_sessions_value = None - self._desktop_client_sessions_present = False - - @property - def mobile_client_sessions(self): - """ - List of mobile client used by this team member. - - :rtype: list of [MobileClientSession] - """ - if self._mobile_client_sessions_present: - return self._mobile_client_sessions_value - else: - return None - - @mobile_client_sessions.setter - def mobile_client_sessions(self, val): - if val is None: - del self.mobile_client_sessions - return - val = self._mobile_client_sessions_validator.validate(val) - self._mobile_client_sessions_value = val - self._mobile_client_sessions_present = True - - @mobile_client_sessions.deleter - def mobile_client_sessions(self): - self._mobile_client_sessions_value = None - self._mobile_client_sessions_present = False - - def __repr__(self): - return 'ListMemberDevicesResult(active_web_sessions={!r}, desktop_client_sessions={!r}, mobile_client_sessions={!r})'.format( - self._active_web_sessions_value, - self._desktop_client_sessions_value, - self._mobile_client_sessions_value, - ) - -ListMemberDevicesResult_validator = bv.Struct(ListMemberDevicesResult) - -class ListMembersAppsArg(object): - """ - Arguments for - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_members_linked_apps`. - - :ivar cursor: At the first call to the - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_members_linked_apps` - the cursor shouldn't be passed. Then, if the result of the call includes - a cursor, the following requests should include the received cursors in - order to receive the next sub list of the team applications. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = False - - def __init__(self, - cursor=None): - self._cursor_value = None - self._cursor_present = False - if cursor is not None: - self.cursor = cursor - - @property - def cursor(self): - """ - At the first call to the - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_members_linked_apps` - the cursor shouldn't be passed. Then, if the result of the call includes - a cursor, the following requests should include the received cursors in - order to receive the next sub list of the team applications. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - return None - - @cursor.setter - def cursor(self, val): - if val is None: - del self.cursor - return - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'ListMembersAppsArg(cursor={!r})'.format( - self._cursor_value, - ) - -ListMembersAppsArg_validator = bv.Struct(ListMembersAppsArg) - -class ListMembersAppsError(bb.Union): - """ - Error returned by - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_members_linked_apps`. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar reset: Indicates that the cursor has been invalidated. Call - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_members_linked_apps` - again with an empty cursor to obtain a new cursor. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - reset = None - # Attribute is overwritten below the class definition - other = None - - def is_reset(self): - """ - Check if the union tag is ``reset``. - - :rtype: bool - """ - return self._tag == 'reset' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'ListMembersAppsError(%r, %r)' % (self._tag, self._value) - -ListMembersAppsError_validator = bv.Union(ListMembersAppsError) - -class ListMembersAppsResult(object): - """ - Information returned by - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_members_linked_apps`. - - :ivar apps: The linked applications of each member of the team. - :ivar has_more: If true, then there are more apps available. Pass the cursor - to - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_members_linked_apps` - to retrieve the rest. - :ivar cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_members_linked_apps` - to receive the next sub list of team's applications. - """ - - __slots__ = [ - '_apps_value', - '_apps_present', - '_has_more_value', - '_has_more_present', - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - apps=None, - has_more=None, - cursor=None): - self._apps_value = None - self._apps_present = False - self._has_more_value = None - self._has_more_present = False - self._cursor_value = None - self._cursor_present = False - if apps is not None: - self.apps = apps - if has_more is not None: - self.has_more = has_more - if cursor is not None: - self.cursor = cursor - - @property - def apps(self): - """ - The linked applications of each member of the team. - - :rtype: list of [MemberLinkedApps] - """ - if self._apps_present: - return self._apps_value - else: - raise AttributeError("missing required field 'apps'") - - @apps.setter - def apps(self, val): - val = self._apps_validator.validate(val) - self._apps_value = val - self._apps_present = True - - @apps.deleter - def apps(self): - self._apps_value = None - self._apps_present = False - - @property - def has_more(self): - """ - If true, then there are more apps available. Pass the cursor to - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_members_linked_apps` - to retrieve the rest. - - :rtype: bool - """ - if self._has_more_present: - return self._has_more_value - else: - raise AttributeError("missing required field 'has_more'") - - @has_more.setter - def has_more(self, val): - val = self._has_more_validator.validate(val) - self._has_more_value = val - self._has_more_present = True - - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False - - @property - def cursor(self): - """ - Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_members_linked_apps` - to receive the next sub list of team's applications. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - return None - - @cursor.setter - def cursor(self, val): - if val is None: - del self.cursor - return - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'ListMembersAppsResult(apps={!r}, has_more={!r}, cursor={!r})'.format( - self._apps_value, - self._has_more_value, - self._cursor_value, - ) - -ListMembersAppsResult_validator = bv.Struct(ListMembersAppsResult) - -class ListMembersDevicesArg(object): - """ - :ivar cursor: At the first call to the - :meth:`dropbox.dropbox.Dropbox.team_devices_list_members_devices` the - cursor shouldn't be passed. Then, if the result of the call includes a - cursor, the following requests should include the received cursors in - order to receive the next sub list of team devices. - :ivar include_web_sessions: Whether to list web sessions of the team - members. - :ivar include_desktop_clients: Whether to list desktop clients of the team - members. - :ivar include_mobile_clients: Whether to list mobile clients of the team - members. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - '_include_web_sessions_value', - '_include_web_sessions_present', - '_include_desktop_clients_value', - '_include_desktop_clients_present', - '_include_mobile_clients_value', - '_include_mobile_clients_present', - ] - - _has_required_fields = False - - def __init__(self, - cursor=None, - include_web_sessions=None, - include_desktop_clients=None, - include_mobile_clients=None): - self._cursor_value = None - self._cursor_present = False - self._include_web_sessions_value = None - self._include_web_sessions_present = False - self._include_desktop_clients_value = None - self._include_desktop_clients_present = False - self._include_mobile_clients_value = None - self._include_mobile_clients_present = False - if cursor is not None: - self.cursor = cursor - if include_web_sessions is not None: - self.include_web_sessions = include_web_sessions - if include_desktop_clients is not None: - self.include_desktop_clients = include_desktop_clients - if include_mobile_clients is not None: - self.include_mobile_clients = include_mobile_clients - - @property - def cursor(self): - """ - At the first call to the - :meth:`dropbox.dropbox.Dropbox.team_devices_list_members_devices` the - cursor shouldn't be passed. Then, if the result of the call includes a - cursor, the following requests should include the received cursors in - order to receive the next sub list of team devices. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - return None - - @cursor.setter - def cursor(self, val): - if val is None: - del self.cursor - return - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - @property - def include_web_sessions(self): - """ - Whether to list web sessions of the team members. - - :rtype: bool - """ - if self._include_web_sessions_present: - return self._include_web_sessions_value - else: - return True - - @include_web_sessions.setter - def include_web_sessions(self, val): - val = self._include_web_sessions_validator.validate(val) - self._include_web_sessions_value = val - self._include_web_sessions_present = True - - @include_web_sessions.deleter - def include_web_sessions(self): - self._include_web_sessions_value = None - self._include_web_sessions_present = False - - @property - def include_desktop_clients(self): - """ - Whether to list desktop clients of the team members. - - :rtype: bool - """ - if self._include_desktop_clients_present: - return self._include_desktop_clients_value - else: - return True - - @include_desktop_clients.setter - def include_desktop_clients(self, val): - val = self._include_desktop_clients_validator.validate(val) - self._include_desktop_clients_value = val - self._include_desktop_clients_present = True - - @include_desktop_clients.deleter - def include_desktop_clients(self): - self._include_desktop_clients_value = None - self._include_desktop_clients_present = False - - @property - def include_mobile_clients(self): - """ - Whether to list mobile clients of the team members. - - :rtype: bool - """ - if self._include_mobile_clients_present: - return self._include_mobile_clients_value - else: - return True - - @include_mobile_clients.setter - def include_mobile_clients(self, val): - val = self._include_mobile_clients_validator.validate(val) - self._include_mobile_clients_value = val - self._include_mobile_clients_present = True - - @include_mobile_clients.deleter - def include_mobile_clients(self): - self._include_mobile_clients_value = None - self._include_mobile_clients_present = False - - def __repr__(self): - return 'ListMembersDevicesArg(cursor={!r}, include_web_sessions={!r}, include_desktop_clients={!r}, include_mobile_clients={!r})'.format( - self._cursor_value, - self._include_web_sessions_value, - self._include_desktop_clients_value, - self._include_mobile_clients_value, - ) - -ListMembersDevicesArg_validator = bv.Struct(ListMembersDevicesArg) - -class ListMembersDevicesError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar reset: Indicates that the cursor has been invalidated. Call - :meth:`dropbox.dropbox.Dropbox.team_devices_list_members_devices` again - with an empty cursor to obtain a new cursor. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - reset = None - # Attribute is overwritten below the class definition - other = None - - def is_reset(self): - """ - Check if the union tag is ``reset``. - - :rtype: bool - """ - return self._tag == 'reset' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'ListMembersDevicesError(%r, %r)' % (self._tag, self._value) - -ListMembersDevicesError_validator = bv.Union(ListMembersDevicesError) - -class ListMembersDevicesResult(object): - """ - :ivar devices: The devices of each member of the team. - :ivar has_more: If true, then there are more devices available. Pass the - cursor to - :meth:`dropbox.dropbox.Dropbox.team_devices_list_members_devices` to - retrieve the rest. - :ivar cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_devices_list_members_devices` to - receive the next sub list of team's devices. - """ - - __slots__ = [ - '_devices_value', - '_devices_present', - '_has_more_value', - '_has_more_present', - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - devices=None, - has_more=None, - cursor=None): - self._devices_value = None - self._devices_present = False - self._has_more_value = None - self._has_more_present = False - self._cursor_value = None - self._cursor_present = False - if devices is not None: - self.devices = devices - if has_more is not None: - self.has_more = has_more - if cursor is not None: - self.cursor = cursor - - @property - def devices(self): - """ - The devices of each member of the team. - - :rtype: list of [MemberDevices] - """ - if self._devices_present: - return self._devices_value - else: - raise AttributeError("missing required field 'devices'") - - @devices.setter - def devices(self, val): - val = self._devices_validator.validate(val) - self._devices_value = val - self._devices_present = True - - @devices.deleter - def devices(self): - self._devices_value = None - self._devices_present = False - - @property - def has_more(self): - """ - If true, then there are more devices available. Pass the cursor to - :meth:`dropbox.dropbox.Dropbox.team_devices_list_members_devices` to - retrieve the rest. - - :rtype: bool - """ - if self._has_more_present: - return self._has_more_value - else: - raise AttributeError("missing required field 'has_more'") - - @has_more.setter - def has_more(self, val): - val = self._has_more_validator.validate(val) - self._has_more_value = val - self._has_more_present = True - - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False - - @property - def cursor(self): - """ - Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_devices_list_members_devices` to - receive the next sub list of team's devices. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - return None - - @cursor.setter - def cursor(self, val): - if val is None: - del self.cursor - return - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'ListMembersDevicesResult(devices={!r}, has_more={!r}, cursor={!r})'.format( - self._devices_value, - self._has_more_value, - self._cursor_value, - ) - -ListMembersDevicesResult_validator = bv.Struct(ListMembersDevicesResult) - -class ListTeamAppsArg(object): - """ - Arguments for - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_team_linked_apps`. - - :ivar cursor: At the first call to the - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_team_linked_apps` - the cursor shouldn't be passed. Then, if the result of the call includes - a cursor, the following requests should include the received cursors in - order to receive the next sub list of the team applications. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = False - - def __init__(self, - cursor=None): - self._cursor_value = None - self._cursor_present = False - if cursor is not None: - self.cursor = cursor - - @property - def cursor(self): - """ - At the first call to the - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_team_linked_apps` - the cursor shouldn't be passed. Then, if the result of the call includes - a cursor, the following requests should include the received cursors in - order to receive the next sub list of the team applications. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - return None - - @cursor.setter - def cursor(self, val): - if val is None: - del self.cursor - return - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'ListTeamAppsArg(cursor={!r})'.format( - self._cursor_value, - ) - -ListTeamAppsArg_validator = bv.Struct(ListTeamAppsArg) - -class ListTeamAppsError(bb.Union): - """ - Error returned by - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_team_linked_apps`. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar reset: Indicates that the cursor has been invalidated. Call - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_team_linked_apps` - again with an empty cursor to obtain a new cursor. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - reset = None - # Attribute is overwritten below the class definition - other = None - - def is_reset(self): - """ - Check if the union tag is ``reset``. - - :rtype: bool - """ - return self._tag == 'reset' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'ListTeamAppsError(%r, %r)' % (self._tag, self._value) - -ListTeamAppsError_validator = bv.Union(ListTeamAppsError) - -class ListTeamAppsResult(object): - """ - Information returned by - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_team_linked_apps`. - - :ivar apps: The linked applications of each member of the team. - :ivar has_more: If true, then there are more apps available. Pass the cursor - to - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_team_linked_apps` - to retrieve the rest. - :ivar cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_team_linked_apps` - to receive the next sub list of team's applications. - """ - - __slots__ = [ - '_apps_value', - '_apps_present', - '_has_more_value', - '_has_more_present', - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - apps=None, - has_more=None, - cursor=None): - self._apps_value = None - self._apps_present = False - self._has_more_value = None - self._has_more_present = False - self._cursor_value = None - self._cursor_present = False - if apps is not None: - self.apps = apps - if has_more is not None: - self.has_more = has_more - if cursor is not None: - self.cursor = cursor - - @property - def apps(self): - """ - The linked applications of each member of the team. - - :rtype: list of [MemberLinkedApps] - """ - if self._apps_present: - return self._apps_value - else: - raise AttributeError("missing required field 'apps'") - - @apps.setter - def apps(self, val): - val = self._apps_validator.validate(val) - self._apps_value = val - self._apps_present = True - - @apps.deleter - def apps(self): - self._apps_value = None - self._apps_present = False - - @property - def has_more(self): - """ - If true, then there are more apps available. Pass the cursor to - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_team_linked_apps` - to retrieve the rest. - - :rtype: bool - """ - if self._has_more_present: - return self._has_more_value - else: - raise AttributeError("missing required field 'has_more'") - - @has_more.setter - def has_more(self, val): - val = self._has_more_validator.validate(val) - self._has_more_value = val - self._has_more_present = True - - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False - - @property - def cursor(self): - """ - Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_team_linked_apps` - to receive the next sub list of team's applications. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - return None - - @cursor.setter - def cursor(self, val): - if val is None: - del self.cursor - return - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'ListTeamAppsResult(apps={!r}, has_more={!r}, cursor={!r})'.format( - self._apps_value, - self._has_more_value, - self._cursor_value, - ) - -ListTeamAppsResult_validator = bv.Struct(ListTeamAppsResult) - -class ListTeamDevicesArg(object): - """ - :ivar cursor: At the first call to the - :meth:`dropbox.dropbox.Dropbox.team_devices_list_team_devices` the - cursor shouldn't be passed. Then, if the result of the call includes a - cursor, the following requests should include the received cursors in - order to receive the next sub list of team devices. - :ivar include_web_sessions: Whether to list web sessions of the team - members. - :ivar include_desktop_clients: Whether to list desktop clients of the team - members. - :ivar include_mobile_clients: Whether to list mobile clients of the team - members. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - '_include_web_sessions_value', - '_include_web_sessions_present', - '_include_desktop_clients_value', - '_include_desktop_clients_present', - '_include_mobile_clients_value', - '_include_mobile_clients_present', - ] - - _has_required_fields = False - - def __init__(self, - cursor=None, - include_web_sessions=None, - include_desktop_clients=None, - include_mobile_clients=None): - self._cursor_value = None - self._cursor_present = False - self._include_web_sessions_value = None - self._include_web_sessions_present = False - self._include_desktop_clients_value = None - self._include_desktop_clients_present = False - self._include_mobile_clients_value = None - self._include_mobile_clients_present = False - if cursor is not None: - self.cursor = cursor - if include_web_sessions is not None: - self.include_web_sessions = include_web_sessions - if include_desktop_clients is not None: - self.include_desktop_clients = include_desktop_clients - if include_mobile_clients is not None: - self.include_mobile_clients = include_mobile_clients - - @property - def cursor(self): - """ - At the first call to the - :meth:`dropbox.dropbox.Dropbox.team_devices_list_team_devices` the - cursor shouldn't be passed. Then, if the result of the call includes a - cursor, the following requests should include the received cursors in - order to receive the next sub list of team devices. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - return None - - @cursor.setter - def cursor(self, val): - if val is None: - del self.cursor - return - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - @property - def include_web_sessions(self): - """ - Whether to list web sessions of the team members. - - :rtype: bool - """ - if self._include_web_sessions_present: - return self._include_web_sessions_value - else: - return True - - @include_web_sessions.setter - def include_web_sessions(self, val): - val = self._include_web_sessions_validator.validate(val) - self._include_web_sessions_value = val - self._include_web_sessions_present = True - - @include_web_sessions.deleter - def include_web_sessions(self): - self._include_web_sessions_value = None - self._include_web_sessions_present = False - - @property - def include_desktop_clients(self): - """ - Whether to list desktop clients of the team members. - - :rtype: bool - """ - if self._include_desktop_clients_present: - return self._include_desktop_clients_value - else: - return True - - @include_desktop_clients.setter - def include_desktop_clients(self, val): - val = self._include_desktop_clients_validator.validate(val) - self._include_desktop_clients_value = val - self._include_desktop_clients_present = True - - @include_desktop_clients.deleter - def include_desktop_clients(self): - self._include_desktop_clients_value = None - self._include_desktop_clients_present = False - - @property - def include_mobile_clients(self): - """ - Whether to list mobile clients of the team members. - - :rtype: bool - """ - if self._include_mobile_clients_present: - return self._include_mobile_clients_value - else: - return True - - @include_mobile_clients.setter - def include_mobile_clients(self, val): - val = self._include_mobile_clients_validator.validate(val) - self._include_mobile_clients_value = val - self._include_mobile_clients_present = True - - @include_mobile_clients.deleter - def include_mobile_clients(self): - self._include_mobile_clients_value = None - self._include_mobile_clients_present = False - - def __repr__(self): - return 'ListTeamDevicesArg(cursor={!r}, include_web_sessions={!r}, include_desktop_clients={!r}, include_mobile_clients={!r})'.format( - self._cursor_value, - self._include_web_sessions_value, - self._include_desktop_clients_value, - self._include_mobile_clients_value, - ) - -ListTeamDevicesArg_validator = bv.Struct(ListTeamDevicesArg) - -class ListTeamDevicesError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar reset: Indicates that the cursor has been invalidated. Call - :meth:`dropbox.dropbox.Dropbox.team_devices_list_team_devices` again - with an empty cursor to obtain a new cursor. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - reset = None - # Attribute is overwritten below the class definition - other = None - - def is_reset(self): - """ - Check if the union tag is ``reset``. - - :rtype: bool - """ - return self._tag == 'reset' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'ListTeamDevicesError(%r, %r)' % (self._tag, self._value) - -ListTeamDevicesError_validator = bv.Union(ListTeamDevicesError) - -class ListTeamDevicesResult(object): - """ - :ivar devices: The devices of each member of the team. - :ivar has_more: If true, then there are more devices available. Pass the - cursor to :meth:`dropbox.dropbox.Dropbox.team_devices_list_team_devices` - to retrieve the rest. - :ivar cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_devices_list_team_devices` to - receive the next sub list of team's devices. - """ - - __slots__ = [ - '_devices_value', - '_devices_present', - '_has_more_value', - '_has_more_present', - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - devices=None, - has_more=None, - cursor=None): - self._devices_value = None - self._devices_present = False - self._has_more_value = None - self._has_more_present = False - self._cursor_value = None - self._cursor_present = False - if devices is not None: - self.devices = devices - if has_more is not None: - self.has_more = has_more - if cursor is not None: - self.cursor = cursor - - @property - def devices(self): - """ - The devices of each member of the team. - - :rtype: list of [MemberDevices] - """ - if self._devices_present: - return self._devices_value - else: - raise AttributeError("missing required field 'devices'") - - @devices.setter - def devices(self, val): - val = self._devices_validator.validate(val) - self._devices_value = val - self._devices_present = True - - @devices.deleter - def devices(self): - self._devices_value = None - self._devices_present = False - - @property - def has_more(self): - """ - If true, then there are more devices available. Pass the cursor to - :meth:`dropbox.dropbox.Dropbox.team_devices_list_team_devices` to - retrieve the rest. - - :rtype: bool - """ - if self._has_more_present: - return self._has_more_value - else: - raise AttributeError("missing required field 'has_more'") - - @has_more.setter - def has_more(self, val): - val = self._has_more_validator.validate(val) - self._has_more_value = val - self._has_more_present = True - - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False - - @property - def cursor(self): - """ - Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_devices_list_team_devices` to - receive the next sub list of team's devices. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - return None - - @cursor.setter - def cursor(self, val): - if val is None: - del self.cursor - return - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'ListTeamDevicesResult(devices={!r}, has_more={!r}, cursor={!r})'.format( - self._devices_value, - self._has_more_value, - self._cursor_value, - ) - -ListTeamDevicesResult_validator = bv.Struct(ListTeamDevicesResult) - -class MemberAccess(object): - """ - Specify access type a member should have when joined to a group. - - :ivar user: Identity of a user. - :ivar access_type: Access type. - """ - - __slots__ = [ - '_user_value', - '_user_present', - '_access_type_value', - '_access_type_present', - ] - - _has_required_fields = True - - def __init__(self, - user=None, - access_type=None): - self._user_value = None - self._user_present = False - self._access_type_value = None - self._access_type_present = False - if user is not None: - self.user = user - if access_type is not None: - self.access_type = access_type - - @property - def user(self): - """ - Identity of a user. - - :rtype: UserSelectorArg - """ - if self._user_present: - return self._user_value - else: - raise AttributeError("missing required field 'user'") - - @user.setter - def user(self, val): - self._user_validator.validate_type_only(val) - self._user_value = val - self._user_present = True - - @user.deleter - def user(self): - self._user_value = None - self._user_present = False - - @property - def access_type(self): - """ - Access type. - - :rtype: GroupAccessType - """ - if self._access_type_present: - return self._access_type_value - else: - raise AttributeError("missing required field 'access_type'") - - @access_type.setter - def access_type(self, val): - self._access_type_validator.validate_type_only(val) - self._access_type_value = val - self._access_type_present = True - - @access_type.deleter - def access_type(self): - self._access_type_value = None - self._access_type_present = False - - def __repr__(self): - return 'MemberAccess(user={!r}, access_type={!r})'.format( - self._user_value, - self._access_type_value, - ) - -MemberAccess_validator = bv.Struct(MemberAccess) - -class MemberAddArg(object): - """ - :ivar member_given_name: Member's first name. - :ivar member_surname: Member's last name. - :ivar member_external_id: External ID for member. - :ivar member_persistent_id: Persistent ID for member. This field is only - available to teams using persistent ID SAML configuration. - :ivar send_welcome_email: Whether to send a welcome email to the member. If - send_welcome_email is false, no email invitation will be sent to the - user. This may be useful for apps using single sign-on (SSO) flows for - onboarding that want to handle announcements themselves. - """ - - __slots__ = [ - '_member_email_value', - '_member_email_present', - '_member_given_name_value', - '_member_given_name_present', - '_member_surname_value', - '_member_surname_present', - '_member_external_id_value', - '_member_external_id_present', - '_member_persistent_id_value', - '_member_persistent_id_present', - '_send_welcome_email_value', - '_send_welcome_email_present', - '_role_value', - '_role_present', - ] - - _has_required_fields = True - - def __init__(self, - member_email=None, - member_given_name=None, - member_surname=None, - member_external_id=None, - member_persistent_id=None, - send_welcome_email=None, - role=None): - self._member_email_value = None - self._member_email_present = False - self._member_given_name_value = None - self._member_given_name_present = False - self._member_surname_value = None - self._member_surname_present = False - self._member_external_id_value = None - self._member_external_id_present = False - self._member_persistent_id_value = None - self._member_persistent_id_present = False - self._send_welcome_email_value = None - self._send_welcome_email_present = False - self._role_value = None - self._role_present = False - if member_email is not None: - self.member_email = member_email - if member_given_name is not None: - self.member_given_name = member_given_name - if member_surname is not None: - self.member_surname = member_surname - if member_external_id is not None: - self.member_external_id = member_external_id - if member_persistent_id is not None: - self.member_persistent_id = member_persistent_id - if send_welcome_email is not None: - self.send_welcome_email = send_welcome_email - if role is not None: - self.role = role - - @property - def member_email(self): - """ - :rtype: str - """ - if self._member_email_present: - return self._member_email_value - else: - raise AttributeError("missing required field 'member_email'") - - @member_email.setter - def member_email(self, val): - val = self._member_email_validator.validate(val) - self._member_email_value = val - self._member_email_present = True - - @member_email.deleter - def member_email(self): - self._member_email_value = None - self._member_email_present = False - - @property - def member_given_name(self): - """ - Member's first name. - - :rtype: str - """ - if self._member_given_name_present: - return self._member_given_name_value - else: - return None - - @member_given_name.setter - def member_given_name(self, val): - if val is None: - del self.member_given_name - return - val = self._member_given_name_validator.validate(val) - self._member_given_name_value = val - self._member_given_name_present = True - - @member_given_name.deleter - def member_given_name(self): - self._member_given_name_value = None - self._member_given_name_present = False - - @property - def member_surname(self): - """ - Member's last name. - - :rtype: str - """ - if self._member_surname_present: - return self._member_surname_value - else: - return None - - @member_surname.setter - def member_surname(self, val): - if val is None: - del self.member_surname - return - val = self._member_surname_validator.validate(val) - self._member_surname_value = val - self._member_surname_present = True - - @member_surname.deleter - def member_surname(self): - self._member_surname_value = None - self._member_surname_present = False - - @property - def member_external_id(self): - """ - External ID for member. - - :rtype: str - """ - if self._member_external_id_present: - return self._member_external_id_value - else: - return None - - @member_external_id.setter - def member_external_id(self, val): - if val is None: - del self.member_external_id - return - val = self._member_external_id_validator.validate(val) - self._member_external_id_value = val - self._member_external_id_present = True - - @member_external_id.deleter - def member_external_id(self): - self._member_external_id_value = None - self._member_external_id_present = False - - @property - def member_persistent_id(self): - """ - Persistent ID for member. This field is only available to teams using - persistent ID SAML configuration. - - :rtype: str - """ - if self._member_persistent_id_present: - return self._member_persistent_id_value - else: - return None - - @member_persistent_id.setter - def member_persistent_id(self, val): - if val is None: - del self.member_persistent_id - return - val = self._member_persistent_id_validator.validate(val) - self._member_persistent_id_value = val - self._member_persistent_id_present = True - - @member_persistent_id.deleter - def member_persistent_id(self): - self._member_persistent_id_value = None - self._member_persistent_id_present = False - - @property - def send_welcome_email(self): - """ - Whether to send a welcome email to the member. If send_welcome_email is - false, no email invitation will be sent to the user. This may be useful - for apps using single sign-on (SSO) flows for onboarding that want to - handle announcements themselves. - - :rtype: bool - """ - if self._send_welcome_email_present: - return self._send_welcome_email_value - else: - return True - - @send_welcome_email.setter - def send_welcome_email(self, val): - val = self._send_welcome_email_validator.validate(val) - self._send_welcome_email_value = val - self._send_welcome_email_present = True - - @send_welcome_email.deleter - def send_welcome_email(self): - self._send_welcome_email_value = None - self._send_welcome_email_present = False - - @property - def role(self): - """ - :rtype: AdminTier - """ - if self._role_present: - return self._role_value - else: - return AdminTier.member_only - - @role.setter - def role(self, val): - self._role_validator.validate_type_only(val) - self._role_value = val - self._role_present = True - - @role.deleter - def role(self): - self._role_value = None - self._role_present = False - - def __repr__(self): - return 'MemberAddArg(member_email={!r}, member_given_name={!r}, member_surname={!r}, member_external_id={!r}, member_persistent_id={!r}, send_welcome_email={!r}, role={!r})'.format( - self._member_email_value, - self._member_given_name_value, - self._member_surname_value, - self._member_external_id_value, - self._member_persistent_id_value, - self._send_welcome_email_value, - self._role_value, - ) - -MemberAddArg_validator = bv.Struct(MemberAddArg) - -class MemberAddResult(bb.Union): - """ - Describes the result of attempting to add a single user to the team. - 'success' is the only value indicating that a user was indeed added to the - team - the other values explain the type of failure that occurred, and - include the email of the user for which the operation has failed. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar TeamMemberInfo success: Describes a user that was successfully added - to the team. - :ivar str team_license_limit: Team is already full. The organization has no - available licenses. - :ivar str free_team_member_limit_reached: Team is already full. The free - team member limit has been reached. - :ivar str user_already_on_team: User is already on this team. The provided - email address is associated with a user who is already a member of - (including in recoverable state) or invited to the team. - :ivar str user_on_another_team: User is already on another team. The - provided email address is associated with a user that is already a - member or invited to another team. - :ivar str user_already_paired: User is already paired. - :ivar str user_migration_failed: User migration has failed. - :ivar str duplicate_external_member_id: A user with the given external - member ID already exists on the team (including in recoverable state). - :ivar str duplicate_member_persistent_id: A user with the given persistent - ID already exists on the team (including in recoverable state). - :ivar str persistent_id_disabled: Persistent ID is only available to teams - with persistent ID SAML configuration. Please contact Dropbox for more - information. - :ivar str user_creation_failed: User creation has failed. - """ - - _catch_all = None - - @classmethod - def success(cls, val): - """ - Create an instance of this class set to the ``success`` tag with value - ``val``. - - :param TeamMemberInfo val: - :rtype: MemberAddResult - """ - return cls('success', val) - - @classmethod - def team_license_limit(cls, val): - """ - Create an instance of this class set to the ``team_license_limit`` tag - with value ``val``. - - :param str val: - :rtype: MemberAddResult - """ - return cls('team_license_limit', val) - - @classmethod - def free_team_member_limit_reached(cls, val): - """ - Create an instance of this class set to the - ``free_team_member_limit_reached`` tag with value ``val``. - - :param str val: - :rtype: MemberAddResult - """ - return cls('free_team_member_limit_reached', val) - - @classmethod - def user_already_on_team(cls, val): - """ - Create an instance of this class set to the ``user_already_on_team`` tag - with value ``val``. - - :param str val: - :rtype: MemberAddResult - """ - return cls('user_already_on_team', val) - - @classmethod - def user_on_another_team(cls, val): - """ - Create an instance of this class set to the ``user_on_another_team`` tag - with value ``val``. - - :param str val: - :rtype: MemberAddResult - """ - return cls('user_on_another_team', val) - - @classmethod - def user_already_paired(cls, val): - """ - Create an instance of this class set to the ``user_already_paired`` tag - with value ``val``. - - :param str val: - :rtype: MemberAddResult - """ - return cls('user_already_paired', val) - - @classmethod - def user_migration_failed(cls, val): - """ - Create an instance of this class set to the ``user_migration_failed`` - tag with value ``val``. - - :param str val: - :rtype: MemberAddResult - """ - return cls('user_migration_failed', val) - - @classmethod - def duplicate_external_member_id(cls, val): - """ - Create an instance of this class set to the - ``duplicate_external_member_id`` tag with value ``val``. - - :param str val: - :rtype: MemberAddResult - """ - return cls('duplicate_external_member_id', val) - - @classmethod - def duplicate_member_persistent_id(cls, val): - """ - Create an instance of this class set to the - ``duplicate_member_persistent_id`` tag with value ``val``. - - :param str val: - :rtype: MemberAddResult - """ - return cls('duplicate_member_persistent_id', val) - - @classmethod - def persistent_id_disabled(cls, val): - """ - Create an instance of this class set to the ``persistent_id_disabled`` - tag with value ``val``. - - :param str val: - :rtype: MemberAddResult - """ - return cls('persistent_id_disabled', val) - - @classmethod - def user_creation_failed(cls, val): - """ - Create an instance of this class set to the ``user_creation_failed`` tag - with value ``val``. - - :param str val: - :rtype: MemberAddResult - """ - return cls('user_creation_failed', val) - - def is_success(self): - """ - Check if the union tag is ``success``. - - :rtype: bool - """ - return self._tag == 'success' - - def is_team_license_limit(self): - """ - Check if the union tag is ``team_license_limit``. - - :rtype: bool - """ - return self._tag == 'team_license_limit' - - def is_free_team_member_limit_reached(self): - """ - Check if the union tag is ``free_team_member_limit_reached``. - - :rtype: bool - """ - return self._tag == 'free_team_member_limit_reached' - - def is_user_already_on_team(self): - """ - Check if the union tag is ``user_already_on_team``. - - :rtype: bool - """ - return self._tag == 'user_already_on_team' - - def is_user_on_another_team(self): - """ - Check if the union tag is ``user_on_another_team``. - - :rtype: bool - """ - return self._tag == 'user_on_another_team' - - def is_user_already_paired(self): - """ - Check if the union tag is ``user_already_paired``. - - :rtype: bool - """ - return self._tag == 'user_already_paired' - - def is_user_migration_failed(self): - """ - Check if the union tag is ``user_migration_failed``. - - :rtype: bool - """ - return self._tag == 'user_migration_failed' - - def is_duplicate_external_member_id(self): - """ - Check if the union tag is ``duplicate_external_member_id``. - - :rtype: bool - """ - return self._tag == 'duplicate_external_member_id' - - def is_duplicate_member_persistent_id(self): - """ - Check if the union tag is ``duplicate_member_persistent_id``. - - :rtype: bool - """ - return self._tag == 'duplicate_member_persistent_id' - - def is_persistent_id_disabled(self): - """ - Check if the union tag is ``persistent_id_disabled``. - - :rtype: bool - """ - return self._tag == 'persistent_id_disabled' - - def is_user_creation_failed(self): - """ - Check if the union tag is ``user_creation_failed``. - - :rtype: bool - """ - return self._tag == 'user_creation_failed' - - def get_success(self): - """ - Describes a user that was successfully added to the team. - - Only call this if :meth:`is_success` is true. - - :rtype: TeamMemberInfo - """ - if not self.is_success(): - raise AttributeError("tag 'success' not set") - return self._value - - def get_team_license_limit(self): - """ - Team is already full. The organization has no available licenses. - - Only call this if :meth:`is_team_license_limit` is true. - - :rtype: str - """ - if not self.is_team_license_limit(): - raise AttributeError("tag 'team_license_limit' not set") - return self._value - - def get_free_team_member_limit_reached(self): - """ - Team is already full. The free team member limit has been reached. - - Only call this if :meth:`is_free_team_member_limit_reached` is true. - - :rtype: str - """ - if not self.is_free_team_member_limit_reached(): - raise AttributeError("tag 'free_team_member_limit_reached' not set") - return self._value - - def get_user_already_on_team(self): - """ - User is already on this team. The provided email address is associated - with a user who is already a member of (including in recoverable state) - or invited to the team. - - Only call this if :meth:`is_user_already_on_team` is true. - - :rtype: str - """ - if not self.is_user_already_on_team(): - raise AttributeError("tag 'user_already_on_team' not set") - return self._value - - def get_user_on_another_team(self): - """ - User is already on another team. The provided email address is - associated with a user that is already a member or invited to another - team. - - Only call this if :meth:`is_user_on_another_team` is true. - - :rtype: str - """ - if not self.is_user_on_another_team(): - raise AttributeError("tag 'user_on_another_team' not set") - return self._value - - def get_user_already_paired(self): - """ - User is already paired. - - Only call this if :meth:`is_user_already_paired` is true. - - :rtype: str - """ - if not self.is_user_already_paired(): - raise AttributeError("tag 'user_already_paired' not set") - return self._value - - def get_user_migration_failed(self): - """ - User migration has failed. - - Only call this if :meth:`is_user_migration_failed` is true. - - :rtype: str - """ - if not self.is_user_migration_failed(): - raise AttributeError("tag 'user_migration_failed' not set") - return self._value - - def get_duplicate_external_member_id(self): - """ - A user with the given external member ID already exists on the team - (including in recoverable state). - - Only call this if :meth:`is_duplicate_external_member_id` is true. - - :rtype: str - """ - if not self.is_duplicate_external_member_id(): - raise AttributeError("tag 'duplicate_external_member_id' not set") - return self._value - - def get_duplicate_member_persistent_id(self): - """ - A user with the given persistent ID already exists on the team - (including in recoverable state). - - Only call this if :meth:`is_duplicate_member_persistent_id` is true. - - :rtype: str - """ - if not self.is_duplicate_member_persistent_id(): - raise AttributeError("tag 'duplicate_member_persistent_id' not set") - return self._value - - def get_persistent_id_disabled(self): - """ - Persistent ID is only available to teams with persistent ID SAML - configuration. Please contact Dropbox for more information. - - Only call this if :meth:`is_persistent_id_disabled` is true. - - :rtype: str - """ - if not self.is_persistent_id_disabled(): - raise AttributeError("tag 'persistent_id_disabled' not set") - return self._value - - def get_user_creation_failed(self): - """ - User creation has failed. - - Only call this if :meth:`is_user_creation_failed` is true. - - :rtype: str - """ - if not self.is_user_creation_failed(): - raise AttributeError("tag 'user_creation_failed' not set") - return self._value - - def __repr__(self): - return 'MemberAddResult(%r, %r)' % (self._tag, self._value) - -MemberAddResult_validator = bv.Union(MemberAddResult) - -class MemberDevices(object): - """ - Information on devices of a team's member. - - :ivar team_member_id: The member unique Id. - :ivar web_sessions: List of web sessions made by this team member. - :ivar desktop_clients: List of desktop clients by this team member. - :ivar mobile_clients: List of mobile clients by this team member. - """ - - __slots__ = [ - '_team_member_id_value', - '_team_member_id_present', - '_web_sessions_value', - '_web_sessions_present', - '_desktop_clients_value', - '_desktop_clients_present', - '_mobile_clients_value', - '_mobile_clients_present', - ] - - _has_required_fields = True - - def __init__(self, - team_member_id=None, - web_sessions=None, - desktop_clients=None, - mobile_clients=None): - self._team_member_id_value = None - self._team_member_id_present = False - self._web_sessions_value = None - self._web_sessions_present = False - self._desktop_clients_value = None - self._desktop_clients_present = False - self._mobile_clients_value = None - self._mobile_clients_present = False - if team_member_id is not None: - self.team_member_id = team_member_id - if web_sessions is not None: - self.web_sessions = web_sessions - if desktop_clients is not None: - self.desktop_clients = desktop_clients - if mobile_clients is not None: - self.mobile_clients = mobile_clients - - @property - def team_member_id(self): - """ - The member unique Id. - - :rtype: str - """ - if self._team_member_id_present: - return self._team_member_id_value - else: - raise AttributeError("missing required field 'team_member_id'") - - @team_member_id.setter - def team_member_id(self, val): - val = self._team_member_id_validator.validate(val) - self._team_member_id_value = val - self._team_member_id_present = True - - @team_member_id.deleter - def team_member_id(self): - self._team_member_id_value = None - self._team_member_id_present = False - - @property - def web_sessions(self): - """ - List of web sessions made by this team member. - - :rtype: list of [ActiveWebSession] - """ - if self._web_sessions_present: - return self._web_sessions_value - else: - return None - - @web_sessions.setter - def web_sessions(self, val): - if val is None: - del self.web_sessions - return - val = self._web_sessions_validator.validate(val) - self._web_sessions_value = val - self._web_sessions_present = True - - @web_sessions.deleter - def web_sessions(self): - self._web_sessions_value = None - self._web_sessions_present = False - - @property - def desktop_clients(self): - """ - List of desktop clients by this team member. - - :rtype: list of [DesktopClientSession] - """ - if self._desktop_clients_present: - return self._desktop_clients_value - else: - return None - - @desktop_clients.setter - def desktop_clients(self, val): - if val is None: - del self.desktop_clients - return - val = self._desktop_clients_validator.validate(val) - self._desktop_clients_value = val - self._desktop_clients_present = True - - @desktop_clients.deleter - def desktop_clients(self): - self._desktop_clients_value = None - self._desktop_clients_present = False - - @property - def mobile_clients(self): - """ - List of mobile clients by this team member. - - :rtype: list of [MobileClientSession] - """ - if self._mobile_clients_present: - return self._mobile_clients_value - else: - return None - - @mobile_clients.setter - def mobile_clients(self, val): - if val is None: - del self.mobile_clients - return - val = self._mobile_clients_validator.validate(val) - self._mobile_clients_value = val - self._mobile_clients_present = True - - @mobile_clients.deleter - def mobile_clients(self): - self._mobile_clients_value = None - self._mobile_clients_present = False - - def __repr__(self): - return 'MemberDevices(team_member_id={!r}, web_sessions={!r}, desktop_clients={!r}, mobile_clients={!r})'.format( - self._team_member_id_value, - self._web_sessions_value, - self._desktop_clients_value, - self._mobile_clients_value, - ) - -MemberDevices_validator = bv.Struct(MemberDevices) - -class MemberLinkedApps(object): - """ - Information on linked applications of a team member. - - :ivar team_member_id: The member unique Id. - :ivar linked_api_apps: List of third party applications linked by this team - member. - """ - - __slots__ = [ - '_team_member_id_value', - '_team_member_id_present', - '_linked_api_apps_value', - '_linked_api_apps_present', - ] - - _has_required_fields = True - - def __init__(self, - team_member_id=None, - linked_api_apps=None): - self._team_member_id_value = None - self._team_member_id_present = False - self._linked_api_apps_value = None - self._linked_api_apps_present = False - if team_member_id is not None: - self.team_member_id = team_member_id - if linked_api_apps is not None: - self.linked_api_apps = linked_api_apps - - @property - def team_member_id(self): - """ - The member unique Id. - - :rtype: str - """ - if self._team_member_id_present: - return self._team_member_id_value - else: - raise AttributeError("missing required field 'team_member_id'") - - @team_member_id.setter - def team_member_id(self, val): - val = self._team_member_id_validator.validate(val) - self._team_member_id_value = val - self._team_member_id_present = True - - @team_member_id.deleter - def team_member_id(self): - self._team_member_id_value = None - self._team_member_id_present = False - - @property - def linked_api_apps(self): - """ - List of third party applications linked by this team member. - - :rtype: list of [ApiApp] - """ - if self._linked_api_apps_present: - return self._linked_api_apps_value - else: - raise AttributeError("missing required field 'linked_api_apps'") - - @linked_api_apps.setter - def linked_api_apps(self, val): - val = self._linked_api_apps_validator.validate(val) - self._linked_api_apps_value = val - self._linked_api_apps_present = True - - @linked_api_apps.deleter - def linked_api_apps(self): - self._linked_api_apps_value = None - self._linked_api_apps_present = False - - def __repr__(self): - return 'MemberLinkedApps(team_member_id={!r}, linked_api_apps={!r})'.format( - self._team_member_id_value, - self._linked_api_apps_value, - ) - -MemberLinkedApps_validator = bv.Struct(MemberLinkedApps) - -class MemberProfile(object): - """ - Basic member profile. - - :ivar team_member_id: ID of user as a member of a team. - :ivar external_id: External ID that a team can attach to the user. An - application using the API may find it easier to use their own IDs - instead of Dropbox IDs like account_id or team_member_id. - :ivar account_id: A user's account identifier. - :ivar email: Email address of user. - :ivar email_verified: Is true if the user's email is verified to be owned by - the user. - :ivar status: The user's status as a member of a specific team. - :ivar name: Representations for a person's name. - :ivar membership_type: The user's membership type: full (normal team member) - vs limited (does not use a license; no access to the team's shared - quota). - :ivar joined_on: The date and time the user joined as a member of a specific - team. - :ivar persistent_id: Persistent ID that a team can attach to the user. The - persistent ID is unique ID to be used for SAML authentication. - """ - - __slots__ = [ - '_team_member_id_value', - '_team_member_id_present', - '_external_id_value', - '_external_id_present', - '_account_id_value', - '_account_id_present', - '_email_value', - '_email_present', - '_email_verified_value', - '_email_verified_present', - '_status_value', - '_status_present', - '_name_value', - '_name_present', - '_membership_type_value', - '_membership_type_present', - '_joined_on_value', - '_joined_on_present', - '_persistent_id_value', - '_persistent_id_present', - ] - - _has_required_fields = True - - def __init__(self, - team_member_id=None, - email=None, - email_verified=None, - status=None, - name=None, - membership_type=None, - external_id=None, - account_id=None, - joined_on=None, - persistent_id=None): - self._team_member_id_value = None - self._team_member_id_present = False - self._external_id_value = None - self._external_id_present = False - self._account_id_value = None - self._account_id_present = False - self._email_value = None - self._email_present = False - self._email_verified_value = None - self._email_verified_present = False - self._status_value = None - self._status_present = False - self._name_value = None - self._name_present = False - self._membership_type_value = None - self._membership_type_present = False - self._joined_on_value = None - self._joined_on_present = False - self._persistent_id_value = None - self._persistent_id_present = False - if team_member_id is not None: - self.team_member_id = team_member_id - if external_id is not None: - self.external_id = external_id - if account_id is not None: - self.account_id = account_id - if email is not None: - self.email = email - if email_verified is not None: - self.email_verified = email_verified - if status is not None: - self.status = status - if name is not None: - self.name = name - if membership_type is not None: - self.membership_type = membership_type - if joined_on is not None: - self.joined_on = joined_on - if persistent_id is not None: - self.persistent_id = persistent_id - - @property - def team_member_id(self): - """ - ID of user as a member of a team. - - :rtype: str - """ - if self._team_member_id_present: - return self._team_member_id_value - else: - raise AttributeError("missing required field 'team_member_id'") - - @team_member_id.setter - def team_member_id(self, val): - val = self._team_member_id_validator.validate(val) - self._team_member_id_value = val - self._team_member_id_present = True - - @team_member_id.deleter - def team_member_id(self): - self._team_member_id_value = None - self._team_member_id_present = False - - @property - def external_id(self): - """ - External ID that a team can attach to the user. An application using the - API may find it easier to use their own IDs instead of Dropbox IDs like - account_id or team_member_id. - - :rtype: str - """ - if self._external_id_present: - return self._external_id_value - else: - return None - - @external_id.setter - def external_id(self, val): - if val is None: - del self.external_id - return - val = self._external_id_validator.validate(val) - self._external_id_value = val - self._external_id_present = True - - @external_id.deleter - def external_id(self): - self._external_id_value = None - self._external_id_present = False - - @property - def account_id(self): - """ - A user's account identifier. - - :rtype: str - """ - if self._account_id_present: - return self._account_id_value - else: - return None - - @account_id.setter - def account_id(self, val): - if val is None: - del self.account_id - return - val = self._account_id_validator.validate(val) - self._account_id_value = val - self._account_id_present = True - - @account_id.deleter - def account_id(self): - self._account_id_value = None - self._account_id_present = False - - @property - def email(self): - """ - Email address of user. - - :rtype: str - """ - if self._email_present: - return self._email_value - else: - raise AttributeError("missing required field 'email'") - - @email.setter - def email(self, val): - val = self._email_validator.validate(val) - self._email_value = val - self._email_present = True - - @email.deleter - def email(self): - self._email_value = None - self._email_present = False - - @property - def email_verified(self): - """ - Is true if the user's email is verified to be owned by the user. - - :rtype: bool - """ - if self._email_verified_present: - return self._email_verified_value - else: - raise AttributeError("missing required field 'email_verified'") - - @email_verified.setter - def email_verified(self, val): - val = self._email_verified_validator.validate(val) - self._email_verified_value = val - self._email_verified_present = True - - @email_verified.deleter - def email_verified(self): - self._email_verified_value = None - self._email_verified_present = False - - @property - def status(self): - """ - The user's status as a member of a specific team. - - :rtype: TeamMemberStatus - """ - if self._status_present: - return self._status_value - else: - raise AttributeError("missing required field 'status'") - - @status.setter - def status(self, val): - self._status_validator.validate_type_only(val) - self._status_value = val - self._status_present = True - - @status.deleter - def status(self): - self._status_value = None - self._status_present = False - - @property - def name(self): - """ - Representations for a person's name. - - :rtype: users.Name_validator - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") - - @name.setter - def name(self, val): - self._name_validator.validate_type_only(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - @property - def membership_type(self): - """ - The user's membership type: full (normal team member) vs limited (does - not use a license; no access to the team's shared quota). - - :rtype: TeamMembershipType - """ - if self._membership_type_present: - return self._membership_type_value - else: - raise AttributeError("missing required field 'membership_type'") - - @membership_type.setter - def membership_type(self, val): - self._membership_type_validator.validate_type_only(val) - self._membership_type_value = val - self._membership_type_present = True - - @membership_type.deleter - def membership_type(self): - self._membership_type_value = None - self._membership_type_present = False - - @property - def joined_on(self): - """ - The date and time the user joined as a member of a specific team. - - :rtype: datetime.datetime - """ - if self._joined_on_present: - return self._joined_on_value - else: - return None - - @joined_on.setter - def joined_on(self, val): - if val is None: - del self.joined_on - return - val = self._joined_on_validator.validate(val) - self._joined_on_value = val - self._joined_on_present = True - - @joined_on.deleter - def joined_on(self): - self._joined_on_value = None - self._joined_on_present = False - - @property - def persistent_id(self): - """ - Persistent ID that a team can attach to the user. The persistent ID is - unique ID to be used for SAML authentication. - - :rtype: str - """ - if self._persistent_id_present: - return self._persistent_id_value - else: - return None - - @persistent_id.setter - def persistent_id(self, val): - if val is None: - del self.persistent_id - return - val = self._persistent_id_validator.validate(val) - self._persistent_id_value = val - self._persistent_id_present = True - - @persistent_id.deleter - def persistent_id(self): - self._persistent_id_value = None - self._persistent_id_present = False - - def __repr__(self): - return 'MemberProfile(team_member_id={!r}, email={!r}, email_verified={!r}, status={!r}, name={!r}, membership_type={!r}, external_id={!r}, account_id={!r}, joined_on={!r}, persistent_id={!r})'.format( - self._team_member_id_value, - self._email_value, - self._email_verified_value, - self._status_value, - self._name_value, - self._membership_type_value, - self._external_id_value, - self._account_id_value, - self._joined_on_value, - self._persistent_id_value, - ) - -MemberProfile_validator = bv.Struct(MemberProfile) - -class UserSelectorError(bb.Union): - """ - Error that can be returned whenever a struct derived from - :class:`UserSelectorArg` is used. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar user_not_found: No matching user found. The provided team_member_id, - email, or external_id does not exist on this team. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - user_not_found = None - - def is_user_not_found(self): - """ - Check if the union tag is ``user_not_found``. - - :rtype: bool - """ - return self._tag == 'user_not_found' - - def __repr__(self): - return 'UserSelectorError(%r, %r)' % (self._tag, self._value) - -UserSelectorError_validator = bv.Union(UserSelectorError) - -class MemberSelectorError(UserSelectorError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar user_not_in_team: The user is not a member of the team. - """ - - # Attribute is overwritten below the class definition - user_not_in_team = None - - def is_user_not_in_team(self): - """ - Check if the union tag is ``user_not_in_team``. - - :rtype: bool - """ - return self._tag == 'user_not_in_team' - - def __repr__(self): - return 'MemberSelectorError(%r, %r)' % (self._tag, self._value) - -MemberSelectorError_validator = bv.Union(MemberSelectorError) - -class MembersAddArg(object): - """ - :ivar new_members: Details of new members to be added to the team. - :ivar force_async: Whether to force the add to happen asynchronously. - """ - - __slots__ = [ - '_new_members_value', - '_new_members_present', - '_force_async_value', - '_force_async_present', - ] - - _has_required_fields = True - - def __init__(self, - new_members=None, - force_async=None): - self._new_members_value = None - self._new_members_present = False - self._force_async_value = None - self._force_async_present = False - if new_members is not None: - self.new_members = new_members - if force_async is not None: - self.force_async = force_async - - @property - def new_members(self): - """ - Details of new members to be added to the team. - - :rtype: list of [MemberAddArg] - """ - if self._new_members_present: - return self._new_members_value - else: - raise AttributeError("missing required field 'new_members'") - - @new_members.setter - def new_members(self, val): - val = self._new_members_validator.validate(val) - self._new_members_value = val - self._new_members_present = True - - @new_members.deleter - def new_members(self): - self._new_members_value = None - self._new_members_present = False - - @property - def force_async(self): - """ - Whether to force the add to happen asynchronously. - - :rtype: bool - """ - if self._force_async_present: - return self._force_async_value - else: - return False - - @force_async.setter - def force_async(self, val): - val = self._force_async_validator.validate(val) - self._force_async_value = val - self._force_async_present = True - - @force_async.deleter - def force_async(self): - self._force_async_value = None - self._force_async_present = False - - def __repr__(self): - return 'MembersAddArg(new_members={!r}, force_async={!r})'.format( - self._new_members_value, - self._force_async_value, - ) - -MembersAddArg_validator = bv.Struct(MembersAddArg) - -class MembersAddJobStatus(async.PollResultBase): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar list of [MemberAddResult] complete: The asynchronous job has finished. - For each member that was specified in the parameter - :type:`MembersAddArg` that was provided to :route:`members/add`, a - corresponding item is returned in this list. - :ivar str failed: The asynchronous job returned an error. The string - contains an error message. - """ - - @classmethod - def complete(cls, val): - """ - Create an instance of this class set to the ``complete`` tag with value - ``val``. - - :param list of [MemberAddResult] val: - :rtype: MembersAddJobStatus - """ - return cls('complete', val) - - @classmethod - def failed(cls, val): - """ - Create an instance of this class set to the ``failed`` tag with value - ``val``. - - :param str val: - :rtype: MembersAddJobStatus - """ - return cls('failed', val) - - def is_complete(self): - """ - Check if the union tag is ``complete``. - - :rtype: bool - """ - return self._tag == 'complete' - - def is_failed(self): - """ - Check if the union tag is ``failed``. - - :rtype: bool - """ - return self._tag == 'failed' - - def get_complete(self): - """ - The asynchronous job has finished. For each member that was specified in - the parameter :class:`MembersAddArg` that was provided to - :meth:`dropbox.dropbox.Dropbox.team_members_add`, a corresponding item - is returned in this list. - - Only call this if :meth:`is_complete` is true. - - :rtype: list of [MemberAddResult] - """ - if not self.is_complete(): - raise AttributeError("tag 'complete' not set") - return self._value - - def get_failed(self): - """ - The asynchronous job returned an error. The string contains an error - message. - - Only call this if :meth:`is_failed` is true. - - :rtype: str - """ - if not self.is_failed(): - raise AttributeError("tag 'failed' not set") - return self._value - - def __repr__(self): - return 'MembersAddJobStatus(%r, %r)' % (self._tag, self._value) - -MembersAddJobStatus_validator = bv.Union(MembersAddJobStatus) - -class MembersAddLaunch(async.LaunchResultBase): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - @classmethod - def complete(cls, val): - """ - Create an instance of this class set to the ``complete`` tag with value - ``val``. - - :param list of [MemberAddResult] val: - :rtype: MembersAddLaunch - """ - return cls('complete', val) - - def is_complete(self): - """ - Check if the union tag is ``complete``. - - :rtype: bool - """ - return self._tag == 'complete' - - def get_complete(self): - """ - Only call this if :meth:`is_complete` is true. - - :rtype: list of [MemberAddResult] - """ - if not self.is_complete(): - raise AttributeError("tag 'complete' not set") - return self._value - - def __repr__(self): - return 'MembersAddLaunch(%r, %r)' % (self._tag, self._value) - -MembersAddLaunch_validator = bv.Union(MembersAddLaunch) - -class MembersDeactivateArg(object): - """ - Exactly one of team_member_id, email, or external_id must be provided to - identify the user account. - - :ivar user: Identity of user to remove/suspend. - :ivar wipe_data: If provided, controls if the user's data will be deleted on - their linked devices. - """ - - __slots__ = [ - '_user_value', - '_user_present', - '_wipe_data_value', - '_wipe_data_present', - ] - - _has_required_fields = True - - def __init__(self, - user=None, - wipe_data=None): - self._user_value = None - self._user_present = False - self._wipe_data_value = None - self._wipe_data_present = False - if user is not None: - self.user = user - if wipe_data is not None: - self.wipe_data = wipe_data - - @property - def user(self): - """ - Identity of user to remove/suspend. - - :rtype: UserSelectorArg - """ - if self._user_present: - return self._user_value - else: - raise AttributeError("missing required field 'user'") - - @user.setter - def user(self, val): - self._user_validator.validate_type_only(val) - self._user_value = val - self._user_present = True - - @user.deleter - def user(self): - self._user_value = None - self._user_present = False - - @property - def wipe_data(self): - """ - If provided, controls if the user's data will be deleted on their linked - devices. - - :rtype: bool - """ - if self._wipe_data_present: - return self._wipe_data_value - else: - return True - - @wipe_data.setter - def wipe_data(self, val): - val = self._wipe_data_validator.validate(val) - self._wipe_data_value = val - self._wipe_data_present = True - - @wipe_data.deleter - def wipe_data(self): - self._wipe_data_value = None - self._wipe_data_present = False - - def __repr__(self): - return 'MembersDeactivateArg(user={!r}, wipe_data={!r})'.format( - self._user_value, - self._wipe_data_value, - ) - -MembersDeactivateArg_validator = bv.Struct(MembersDeactivateArg) - -class MembersDeactivateError(UserSelectorError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar user_not_in_team: The user is not a member of the team. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - user_not_in_team = None - # Attribute is overwritten below the class definition - other = None - - def is_user_not_in_team(self): - """ - Check if the union tag is ``user_not_in_team``. - - :rtype: bool - """ - return self._tag == 'user_not_in_team' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'MembersDeactivateError(%r, %r)' % (self._tag, self._value) - -MembersDeactivateError_validator = bv.Union(MembersDeactivateError) - -class MembersGetInfoArgs(object): - """ - :ivar members: List of team members. - """ - - __slots__ = [ - '_members_value', - '_members_present', - ] - - _has_required_fields = True - - def __init__(self, - members=None): - self._members_value = None - self._members_present = False - if members is not None: - self.members = members - - @property - def members(self): - """ - List of team members. - - :rtype: list of [UserSelectorArg] - """ - if self._members_present: - return self._members_value - else: - raise AttributeError("missing required field 'members'") - - @members.setter - def members(self, val): - val = self._members_validator.validate(val) - self._members_value = val - self._members_present = True - - @members.deleter - def members(self): - self._members_value = None - self._members_present = False - - def __repr__(self): - return 'MembersGetInfoArgs(members={!r})'.format( - self._members_value, - ) - -MembersGetInfoArgs_validator = bv.Struct(MembersGetInfoArgs) - -class MembersGetInfoError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'MembersGetInfoError(%r, %r)' % (self._tag, self._value) - -MembersGetInfoError_validator = bv.Union(MembersGetInfoError) - -class MembersGetInfoItem(bb.Union): - """ - Describes a result obtained for a single user whose id was specified in the - parameter of :meth:`dropbox.dropbox.Dropbox.team_members_get_info`. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar str id_not_found: An ID that was provided as a parameter to - :route:`members/get_info`, and did not match a corresponding user. This - might be a team_member_id, an email, or an external ID, depending on how - the method was called. - :ivar TeamMemberInfo member_info: Info about a team member. - """ - - _catch_all = None - - @classmethod - def id_not_found(cls, val): - """ - Create an instance of this class set to the ``id_not_found`` tag with - value ``val``. - - :param str val: - :rtype: MembersGetInfoItem - """ - return cls('id_not_found', val) - - @classmethod - def member_info(cls, val): - """ - Create an instance of this class set to the ``member_info`` tag with - value ``val``. - - :param TeamMemberInfo val: - :rtype: MembersGetInfoItem - """ - return cls('member_info', val) - - def is_id_not_found(self): - """ - Check if the union tag is ``id_not_found``. - - :rtype: bool - """ - return self._tag == 'id_not_found' - - def is_member_info(self): - """ - Check if the union tag is ``member_info``. - - :rtype: bool - """ - return self._tag == 'member_info' - - def get_id_not_found(self): - """ - An ID that was provided as a parameter to - :meth:`dropbox.dropbox.Dropbox.team_members_get_info`, and did not match - a corresponding user. This might be a team_member_id, an email, or an - external ID, depending on how the method was called. - - Only call this if :meth:`is_id_not_found` is true. - - :rtype: str - """ - if not self.is_id_not_found(): - raise AttributeError("tag 'id_not_found' not set") - return self._value - - def get_member_info(self): - """ - Info about a team member. - - Only call this if :meth:`is_member_info` is true. - - :rtype: TeamMemberInfo - """ - if not self.is_member_info(): - raise AttributeError("tag 'member_info' not set") - return self._value - - def __repr__(self): - return 'MembersGetInfoItem(%r, %r)' % (self._tag, self._value) - -MembersGetInfoItem_validator = bv.Union(MembersGetInfoItem) - -class MembersListArg(object): - """ - :ivar limit: Number of results to return per call. - :ivar include_removed: Whether to return removed members. - """ - - __slots__ = [ - '_limit_value', - '_limit_present', - '_include_removed_value', - '_include_removed_present', - ] - - _has_required_fields = False - - def __init__(self, - limit=None, - include_removed=None): - self._limit_value = None - self._limit_present = False - self._include_removed_value = None - self._include_removed_present = False - if limit is not None: - self.limit = limit - if include_removed is not None: - self.include_removed = include_removed - - @property - def limit(self): - """ - Number of results to return per call. - - :rtype: long - """ - if self._limit_present: - return self._limit_value - else: - return 1000 - - @limit.setter - def limit(self, val): - val = self._limit_validator.validate(val) - self._limit_value = val - self._limit_present = True - - @limit.deleter - def limit(self): - self._limit_value = None - self._limit_present = False - - @property - def include_removed(self): - """ - Whether to return removed members. - - :rtype: bool - """ - if self._include_removed_present: - return self._include_removed_value - else: - return False - - @include_removed.setter - def include_removed(self, val): - val = self._include_removed_validator.validate(val) - self._include_removed_value = val - self._include_removed_present = True - - @include_removed.deleter - def include_removed(self): - self._include_removed_value = None - self._include_removed_present = False - - def __repr__(self): - return 'MembersListArg(limit={!r}, include_removed={!r})'.format( - self._limit_value, - self._include_removed_value, - ) - -MembersListArg_validator = bv.Struct(MembersListArg) - -class MembersListContinueArg(object): - """ - :ivar cursor: Indicates from what point to get the next set of members. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - cursor=None): - self._cursor_value = None - self._cursor_present = False - if cursor is not None: - self.cursor = cursor - - @property - def cursor(self): - """ - Indicates from what point to get the next set of members. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'MembersListContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - -MembersListContinueArg_validator = bv.Struct(MembersListContinueArg) - -class MembersListContinueError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar invalid_cursor: The cursor is invalid. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - invalid_cursor = None - # Attribute is overwritten below the class definition - other = None - - def is_invalid_cursor(self): - """ - Check if the union tag is ``invalid_cursor``. - - :rtype: bool - """ - return self._tag == 'invalid_cursor' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'MembersListContinueError(%r, %r)' % (self._tag, self._value) - -MembersListContinueError_validator = bv.Union(MembersListContinueError) - -class MembersListError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'MembersListError(%r, %r)' % (self._tag, self._value) - -MembersListError_validator = bv.Union(MembersListError) - -class MembersListResult(object): - """ - :ivar members: List of team members. - :ivar cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_members_list_continue` to obtain the - additional members. - :ivar has_more: Is true if there are additional team members that have not - been returned yet. An additional call to - :meth:`dropbox.dropbox.Dropbox.team_members_list_continue` can retrieve - them. - """ - - __slots__ = [ - '_members_value', - '_members_present', - '_cursor_value', - '_cursor_present', - '_has_more_value', - '_has_more_present', - ] - - _has_required_fields = True - - def __init__(self, - members=None, - cursor=None, - has_more=None): - self._members_value = None - self._members_present = False - self._cursor_value = None - self._cursor_present = False - self._has_more_value = None - self._has_more_present = False - if members is not None: - self.members = members - if cursor is not None: - self.cursor = cursor - if has_more is not None: - self.has_more = has_more - - @property - def members(self): - """ - List of team members. - - :rtype: list of [TeamMemberInfo] - """ - if self._members_present: - return self._members_value - else: - raise AttributeError("missing required field 'members'") - - @members.setter - def members(self, val): - val = self._members_validator.validate(val) - self._members_value = val - self._members_present = True - - @members.deleter - def members(self): - self._members_value = None - self._members_present = False - - @property - def cursor(self): - """ - Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_members_list_continue` to obtain the - additional members. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - @property - def has_more(self): - """ - Is true if there are additional team members that have not been returned - yet. An additional call to - :meth:`dropbox.dropbox.Dropbox.team_members_list_continue` can retrieve - them. - - :rtype: bool - """ - if self._has_more_present: - return self._has_more_value - else: - raise AttributeError("missing required field 'has_more'") - - @has_more.setter - def has_more(self, val): - val = self._has_more_validator.validate(val) - self._has_more_value = val - self._has_more_present = True - - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False - - def __repr__(self): - return 'MembersListResult(members={!r}, cursor={!r}, has_more={!r})'.format( - self._members_value, - self._cursor_value, - self._has_more_value, - ) - -MembersListResult_validator = bv.Struct(MembersListResult) - -class MembersRecoverArg(object): - """ - Exactly one of team_member_id, email, or external_id must be provided to - identify the user account. - - :ivar user: Identity of user to recover. - """ - - __slots__ = [ - '_user_value', - '_user_present', - ] - - _has_required_fields = True - - def __init__(self, - user=None): - self._user_value = None - self._user_present = False - if user is not None: - self.user = user - - @property - def user(self): - """ - Identity of user to recover. - - :rtype: UserSelectorArg - """ - if self._user_present: - return self._user_value - else: - raise AttributeError("missing required field 'user'") - - @user.setter - def user(self, val): - self._user_validator.validate_type_only(val) - self._user_value = val - self._user_present = True - - @user.deleter - def user(self): - self._user_value = None - self._user_present = False - - def __repr__(self): - return 'MembersRecoverArg(user={!r})'.format( - self._user_value, - ) - -MembersRecoverArg_validator = bv.Struct(MembersRecoverArg) - -class MembersRecoverError(UserSelectorError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar user_unrecoverable: The user is not recoverable. - :ivar user_not_in_team: The user is not a member of the team. - :ivar team_license_limit: Team is full. The organization has no available - licenses. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - user_unrecoverable = None - # Attribute is overwritten below the class definition - user_not_in_team = None - # Attribute is overwritten below the class definition - team_license_limit = None - # Attribute is overwritten below the class definition - other = None - - def is_user_unrecoverable(self): - """ - Check if the union tag is ``user_unrecoverable``. - - :rtype: bool - """ - return self._tag == 'user_unrecoverable' - - def is_user_not_in_team(self): - """ - Check if the union tag is ``user_not_in_team``. - - :rtype: bool - """ - return self._tag == 'user_not_in_team' - - def is_team_license_limit(self): - """ - Check if the union tag is ``team_license_limit``. - - :rtype: bool - """ - return self._tag == 'team_license_limit' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'MembersRecoverError(%r, %r)' % (self._tag, self._value) - -MembersRecoverError_validator = bv.Union(MembersRecoverError) - -class MembersRemoveArg(MembersDeactivateArg): - """ - :ivar transfer_dest_id: If provided, files from the deleted member account - will be transferred to this user. - :ivar transfer_admin_id: If provided, errors during the transfer process - will be sent via email to this user. If the transfer_dest_id argument - was provided, then this argument must be provided as well. - :ivar keep_account: Downgrade the member to a Basic account. The user will - retain the email address associated with their Dropbox account and data - in their account that is not restricted to team members. In order to - keep the account the argument wipe_data should be set to False. - """ - - __slots__ = [ - '_transfer_dest_id_value', - '_transfer_dest_id_present', - '_transfer_admin_id_value', - '_transfer_admin_id_present', - '_keep_account_value', - '_keep_account_present', - ] - - _has_required_fields = True - - def __init__(self, - user=None, - wipe_data=None, - transfer_dest_id=None, - transfer_admin_id=None, - keep_account=None): - super(MembersRemoveArg, self).__init__(user, - wipe_data) - self._transfer_dest_id_value = None - self._transfer_dest_id_present = False - self._transfer_admin_id_value = None - self._transfer_admin_id_present = False - self._keep_account_value = None - self._keep_account_present = False - if transfer_dest_id is not None: - self.transfer_dest_id = transfer_dest_id - if transfer_admin_id is not None: - self.transfer_admin_id = transfer_admin_id - if keep_account is not None: - self.keep_account = keep_account - - @property - def transfer_dest_id(self): - """ - If provided, files from the deleted member account will be transferred - to this user. - - :rtype: UserSelectorArg - """ - if self._transfer_dest_id_present: - return self._transfer_dest_id_value - else: - return None - - @transfer_dest_id.setter - def transfer_dest_id(self, val): - if val is None: - del self.transfer_dest_id - return - self._transfer_dest_id_validator.validate_type_only(val) - self._transfer_dest_id_value = val - self._transfer_dest_id_present = True - - @transfer_dest_id.deleter - def transfer_dest_id(self): - self._transfer_dest_id_value = None - self._transfer_dest_id_present = False - - @property - def transfer_admin_id(self): - """ - If provided, errors during the transfer process will be sent via email - to this user. If the transfer_dest_id argument was provided, then this - argument must be provided as well. - - :rtype: UserSelectorArg - """ - if self._transfer_admin_id_present: - return self._transfer_admin_id_value - else: - return None - - @transfer_admin_id.setter - def transfer_admin_id(self, val): - if val is None: - del self.transfer_admin_id - return - self._transfer_admin_id_validator.validate_type_only(val) - self._transfer_admin_id_value = val - self._transfer_admin_id_present = True - - @transfer_admin_id.deleter - def transfer_admin_id(self): - self._transfer_admin_id_value = None - self._transfer_admin_id_present = False - - @property - def keep_account(self): - """ - Downgrade the member to a Basic account. The user will retain the email - address associated with their Dropbox account and data in their account - that is not restricted to team members. In order to keep the account the - argument wipe_data should be set to False. - - :rtype: bool - """ - if self._keep_account_present: - return self._keep_account_value - else: - return False - - @keep_account.setter - def keep_account(self, val): - val = self._keep_account_validator.validate(val) - self._keep_account_value = val - self._keep_account_present = True - - @keep_account.deleter - def keep_account(self): - self._keep_account_value = None - self._keep_account_present = False - - def __repr__(self): - return 'MembersRemoveArg(user={!r}, wipe_data={!r}, transfer_dest_id={!r}, transfer_admin_id={!r}, keep_account={!r})'.format( - self._user_value, - self._wipe_data_value, - self._transfer_dest_id_value, - self._transfer_admin_id_value, - self._keep_account_value, - ) - -MembersRemoveArg_validator = bv.Struct(MembersRemoveArg) - -class MembersRemoveError(MembersDeactivateError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar remove_last_admin: The user is the last admin of the team, so it - cannot be removed from it. - :ivar removed_and_transfer_dest_should_differ: Expected removed user and - transfer_dest user to be different. - :ivar removed_and_transfer_admin_should_differ: Expected removed user and - transfer_admin user to be different. - :ivar transfer_dest_user_not_found: No matching user found for the argument - transfer_dest_id. - :ivar transfer_dest_user_not_in_team: The provided transfer_dest_id does not - exist on this team. - :ivar transfer_admin_user_not_found: No matching user found for the argument - transfer_admin_id. - :ivar transfer_admin_user_not_in_team: The provided transfer_admin_id does - not exist on this team. - :ivar unspecified_transfer_admin_id: The transfer_admin_id argument must be - provided when file transfer is requested. - :ivar transfer_admin_is_not_admin: Specified transfer_admin user is not a - team admin. - :ivar cannot_keep_account_and_transfer: Cannot keep account and transfer the - data to another user at the same time. - :ivar cannot_keep_account_and_delete_data: Cannot keep account and delete - the data at the same time. To keep the account the argument wipe_data - should be set to False. - :ivar email_address_too_long_to_be_disabled: The email address of the user - is too long to be disabled. - """ - - # Attribute is overwritten below the class definition - remove_last_admin = None - # Attribute is overwritten below the class definition - removed_and_transfer_dest_should_differ = None - # Attribute is overwritten below the class definition - removed_and_transfer_admin_should_differ = None - # Attribute is overwritten below the class definition - transfer_dest_user_not_found = None - # Attribute is overwritten below the class definition - transfer_dest_user_not_in_team = None - # Attribute is overwritten below the class definition - transfer_admin_user_not_found = None - # Attribute is overwritten below the class definition - transfer_admin_user_not_in_team = None - # Attribute is overwritten below the class definition - unspecified_transfer_admin_id = None - # Attribute is overwritten below the class definition - transfer_admin_is_not_admin = None - # Attribute is overwritten below the class definition - cannot_keep_account_and_transfer = None - # Attribute is overwritten below the class definition - cannot_keep_account_and_delete_data = None - # Attribute is overwritten below the class definition - email_address_too_long_to_be_disabled = None - - def is_remove_last_admin(self): - """ - Check if the union tag is ``remove_last_admin``. - - :rtype: bool - """ - return self._tag == 'remove_last_admin' - - def is_removed_and_transfer_dest_should_differ(self): - """ - Check if the union tag is ``removed_and_transfer_dest_should_differ``. - - :rtype: bool - """ - return self._tag == 'removed_and_transfer_dest_should_differ' - - def is_removed_and_transfer_admin_should_differ(self): - """ - Check if the union tag is ``removed_and_transfer_admin_should_differ``. - - :rtype: bool - """ - return self._tag == 'removed_and_transfer_admin_should_differ' - - def is_transfer_dest_user_not_found(self): - """ - Check if the union tag is ``transfer_dest_user_not_found``. - - :rtype: bool - """ - return self._tag == 'transfer_dest_user_not_found' - - def is_transfer_dest_user_not_in_team(self): - """ - Check if the union tag is ``transfer_dest_user_not_in_team``. - - :rtype: bool - """ - return self._tag == 'transfer_dest_user_not_in_team' - - def is_transfer_admin_user_not_found(self): - """ - Check if the union tag is ``transfer_admin_user_not_found``. - - :rtype: bool - """ - return self._tag == 'transfer_admin_user_not_found' - - def is_transfer_admin_user_not_in_team(self): - """ - Check if the union tag is ``transfer_admin_user_not_in_team``. - - :rtype: bool - """ - return self._tag == 'transfer_admin_user_not_in_team' - - def is_unspecified_transfer_admin_id(self): - """ - Check if the union tag is ``unspecified_transfer_admin_id``. - - :rtype: bool - """ - return self._tag == 'unspecified_transfer_admin_id' - - def is_transfer_admin_is_not_admin(self): - """ - Check if the union tag is ``transfer_admin_is_not_admin``. - - :rtype: bool - """ - return self._tag == 'transfer_admin_is_not_admin' - - def is_cannot_keep_account_and_transfer(self): - """ - Check if the union tag is ``cannot_keep_account_and_transfer``. - - :rtype: bool - """ - return self._tag == 'cannot_keep_account_and_transfer' - - def is_cannot_keep_account_and_delete_data(self): - """ - Check if the union tag is ``cannot_keep_account_and_delete_data``. - - :rtype: bool - """ - return self._tag == 'cannot_keep_account_and_delete_data' - - def is_email_address_too_long_to_be_disabled(self): - """ - Check if the union tag is ``email_address_too_long_to_be_disabled``. - - :rtype: bool - """ - return self._tag == 'email_address_too_long_to_be_disabled' - - def __repr__(self): - return 'MembersRemoveError(%r, %r)' % (self._tag, self._value) - -MembersRemoveError_validator = bv.Union(MembersRemoveError) - -class MembersSendWelcomeError(MemberSelectorError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'MembersSendWelcomeError(%r, %r)' % (self._tag, self._value) - -MembersSendWelcomeError_validator = bv.Union(MembersSendWelcomeError) - -class MembersSetPermissionsArg(object): - """ - Exactly one of team_member_id, email, or external_id must be provided to - identify the user account. - - :ivar user: Identity of user whose role will be set. - :ivar new_role: The new role of the member. - """ - - __slots__ = [ - '_user_value', - '_user_present', - '_new_role_value', - '_new_role_present', - ] - - _has_required_fields = True - - def __init__(self, - user=None, - new_role=None): - self._user_value = None - self._user_present = False - self._new_role_value = None - self._new_role_present = False - if user is not None: - self.user = user - if new_role is not None: - self.new_role = new_role - - @property - def user(self): - """ - Identity of user whose role will be set. - - :rtype: UserSelectorArg - """ - if self._user_present: - return self._user_value - else: - raise AttributeError("missing required field 'user'") - - @user.setter - def user(self, val): - self._user_validator.validate_type_only(val) - self._user_value = val - self._user_present = True - - @user.deleter - def user(self): - self._user_value = None - self._user_present = False - - @property - def new_role(self): - """ - The new role of the member. - - :rtype: AdminTier - """ - if self._new_role_present: - return self._new_role_value - else: - raise AttributeError("missing required field 'new_role'") - - @new_role.setter - def new_role(self, val): - self._new_role_validator.validate_type_only(val) - self._new_role_value = val - self._new_role_present = True - - @new_role.deleter - def new_role(self): - self._new_role_value = None - self._new_role_present = False - - def __repr__(self): - return 'MembersSetPermissionsArg(user={!r}, new_role={!r})'.format( - self._user_value, - self._new_role_value, - ) - -MembersSetPermissionsArg_validator = bv.Struct(MembersSetPermissionsArg) - -class MembersSetPermissionsError(UserSelectorError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar last_admin: Cannot remove the admin setting of the last admin. - :ivar user_not_in_team: The user is not a member of the team. - :ivar cannot_set_permissions: Cannot remove/grant permissions. - :ivar team_license_limit: Team is full. The organization has no available - licenses. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - last_admin = None - # Attribute is overwritten below the class definition - user_not_in_team = None - # Attribute is overwritten below the class definition - cannot_set_permissions = None - # Attribute is overwritten below the class definition - team_license_limit = None - # Attribute is overwritten below the class definition - other = None - - def is_last_admin(self): - """ - Check if the union tag is ``last_admin``. - - :rtype: bool - """ - return self._tag == 'last_admin' - - def is_user_not_in_team(self): - """ - Check if the union tag is ``user_not_in_team``. - - :rtype: bool - """ - return self._tag == 'user_not_in_team' - - def is_cannot_set_permissions(self): - """ - Check if the union tag is ``cannot_set_permissions``. - - :rtype: bool - """ - return self._tag == 'cannot_set_permissions' - - def is_team_license_limit(self): - """ - Check if the union tag is ``team_license_limit``. - - :rtype: bool - """ - return self._tag == 'team_license_limit' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'MembersSetPermissionsError(%r, %r)' % (self._tag, self._value) - -MembersSetPermissionsError_validator = bv.Union(MembersSetPermissionsError) - -class MembersSetPermissionsResult(object): - """ - :ivar team_member_id: The member ID of the user to which the change was - applied. - :ivar role: The role after the change. - """ - - __slots__ = [ - '_team_member_id_value', - '_team_member_id_present', - '_role_value', - '_role_present', - ] - - _has_required_fields = True - - def __init__(self, - team_member_id=None, - role=None): - self._team_member_id_value = None - self._team_member_id_present = False - self._role_value = None - self._role_present = False - if team_member_id is not None: - self.team_member_id = team_member_id - if role is not None: - self.role = role - - @property - def team_member_id(self): - """ - The member ID of the user to which the change was applied. - - :rtype: str - """ - if self._team_member_id_present: - return self._team_member_id_value - else: - raise AttributeError("missing required field 'team_member_id'") - - @team_member_id.setter - def team_member_id(self, val): - val = self._team_member_id_validator.validate(val) - self._team_member_id_value = val - self._team_member_id_present = True - - @team_member_id.deleter - def team_member_id(self): - self._team_member_id_value = None - self._team_member_id_present = False - - @property - def role(self): - """ - The role after the change. - - :rtype: AdminTier - """ - if self._role_present: - return self._role_value - else: - raise AttributeError("missing required field 'role'") - - @role.setter - def role(self, val): - self._role_validator.validate_type_only(val) - self._role_value = val - self._role_present = True - - @role.deleter - def role(self): - self._role_value = None - self._role_present = False - - def __repr__(self): - return 'MembersSetPermissionsResult(team_member_id={!r}, role={!r})'.format( - self._team_member_id_value, - self._role_value, - ) - -MembersSetPermissionsResult_validator = bv.Struct(MembersSetPermissionsResult) - -class MembersSetProfileArg(object): - """ - Exactly one of team_member_id, email, or external_id must be provided to - identify the user account. At least one of new_email, new_external_id, - new_given_name, and/or new_surname must be provided. - - :ivar user: Identity of user whose profile will be set. - :ivar new_email: New email for member. - :ivar new_external_id: New external ID for member. - :ivar new_given_name: New given name for member. - :ivar new_surname: New surname for member. - :ivar new_persistent_id: New persistent ID. This field only available to - teams using persistent ID SAML configuration. - """ - - __slots__ = [ - '_user_value', - '_user_present', - '_new_email_value', - '_new_email_present', - '_new_external_id_value', - '_new_external_id_present', - '_new_given_name_value', - '_new_given_name_present', - '_new_surname_value', - '_new_surname_present', - '_new_persistent_id_value', - '_new_persistent_id_present', - ] - - _has_required_fields = True - - def __init__(self, - user=None, - new_email=None, - new_external_id=None, - new_given_name=None, - new_surname=None, - new_persistent_id=None): - self._user_value = None - self._user_present = False - self._new_email_value = None - self._new_email_present = False - self._new_external_id_value = None - self._new_external_id_present = False - self._new_given_name_value = None - self._new_given_name_present = False - self._new_surname_value = None - self._new_surname_present = False - self._new_persistent_id_value = None - self._new_persistent_id_present = False - if user is not None: - self.user = user - if new_email is not None: - self.new_email = new_email - if new_external_id is not None: - self.new_external_id = new_external_id - if new_given_name is not None: - self.new_given_name = new_given_name - if new_surname is not None: - self.new_surname = new_surname - if new_persistent_id is not None: - self.new_persistent_id = new_persistent_id - - @property - def user(self): - """ - Identity of user whose profile will be set. - - :rtype: UserSelectorArg - """ - if self._user_present: - return self._user_value - else: - raise AttributeError("missing required field 'user'") - - @user.setter - def user(self, val): - self._user_validator.validate_type_only(val) - self._user_value = val - self._user_present = True - - @user.deleter - def user(self): - self._user_value = None - self._user_present = False - - @property - def new_email(self): - """ - New email for member. - - :rtype: str - """ - if self._new_email_present: - return self._new_email_value - else: - return None - - @new_email.setter - def new_email(self, val): - if val is None: - del self.new_email - return - val = self._new_email_validator.validate(val) - self._new_email_value = val - self._new_email_present = True - - @new_email.deleter - def new_email(self): - self._new_email_value = None - self._new_email_present = False - - @property - def new_external_id(self): - """ - New external ID for member. - - :rtype: str - """ - if self._new_external_id_present: - return self._new_external_id_value - else: - return None - - @new_external_id.setter - def new_external_id(self, val): - if val is None: - del self.new_external_id - return - val = self._new_external_id_validator.validate(val) - self._new_external_id_value = val - self._new_external_id_present = True - - @new_external_id.deleter - def new_external_id(self): - self._new_external_id_value = None - self._new_external_id_present = False - - @property - def new_given_name(self): - """ - New given name for member. - - :rtype: str - """ - if self._new_given_name_present: - return self._new_given_name_value - else: - return None - - @new_given_name.setter - def new_given_name(self, val): - if val is None: - del self.new_given_name - return - val = self._new_given_name_validator.validate(val) - self._new_given_name_value = val - self._new_given_name_present = True - - @new_given_name.deleter - def new_given_name(self): - self._new_given_name_value = None - self._new_given_name_present = False - - @property - def new_surname(self): - """ - New surname for member. - - :rtype: str - """ - if self._new_surname_present: - return self._new_surname_value - else: - return None - - @new_surname.setter - def new_surname(self, val): - if val is None: - del self.new_surname - return - val = self._new_surname_validator.validate(val) - self._new_surname_value = val - self._new_surname_present = True - - @new_surname.deleter - def new_surname(self): - self._new_surname_value = None - self._new_surname_present = False - - @property - def new_persistent_id(self): - """ - New persistent ID. This field only available to teams using persistent - ID SAML configuration. - - :rtype: str - """ - if self._new_persistent_id_present: - return self._new_persistent_id_value - else: - return None - - @new_persistent_id.setter - def new_persistent_id(self, val): - if val is None: - del self.new_persistent_id - return - val = self._new_persistent_id_validator.validate(val) - self._new_persistent_id_value = val - self._new_persistent_id_present = True - - @new_persistent_id.deleter - def new_persistent_id(self): - self._new_persistent_id_value = None - self._new_persistent_id_present = False - - def __repr__(self): - return 'MembersSetProfileArg(user={!r}, new_email={!r}, new_external_id={!r}, new_given_name={!r}, new_surname={!r}, new_persistent_id={!r})'.format( - self._user_value, - self._new_email_value, - self._new_external_id_value, - self._new_given_name_value, - self._new_surname_value, - self._new_persistent_id_value, - ) - -MembersSetProfileArg_validator = bv.Struct(MembersSetProfileArg) - -class MembersSetProfileError(MemberSelectorError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar external_id_and_new_external_id_unsafe: It is unsafe to use both - external_id and new_external_id. - :ivar no_new_data_specified: None of new_email, new_given_name, new_surname, - or new_external_id are specified. - :ivar email_reserved_for_other_user: Email is already reserved for another - user. - :ivar external_id_used_by_other_user: The external ID is already in use by - another team member. - :ivar set_profile_disallowed: Modifying deleted users is not allowed. - :ivar param_cannot_be_empty: Parameter new_email cannot be empty. - :ivar persistent_id_disabled: Persistent ID is only available to teams with - persistent ID SAML configuration. Please contact Dropbox for more - information. - :ivar persistent_id_used_by_other_user: The persistent ID is already in use - by another team member. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - external_id_and_new_external_id_unsafe = None - # Attribute is overwritten below the class definition - no_new_data_specified = None - # Attribute is overwritten below the class definition - email_reserved_for_other_user = None - # Attribute is overwritten below the class definition - external_id_used_by_other_user = None - # Attribute is overwritten below the class definition - set_profile_disallowed = None - # Attribute is overwritten below the class definition - param_cannot_be_empty = None - # Attribute is overwritten below the class definition - persistent_id_disabled = None - # Attribute is overwritten below the class definition - persistent_id_used_by_other_user = None - # Attribute is overwritten below the class definition - other = None - - def is_external_id_and_new_external_id_unsafe(self): - """ - Check if the union tag is ``external_id_and_new_external_id_unsafe``. - - :rtype: bool - """ - return self._tag == 'external_id_and_new_external_id_unsafe' - - def is_no_new_data_specified(self): - """ - Check if the union tag is ``no_new_data_specified``. - - :rtype: bool - """ - return self._tag == 'no_new_data_specified' - - def is_email_reserved_for_other_user(self): - """ - Check if the union tag is ``email_reserved_for_other_user``. - - :rtype: bool - """ - return self._tag == 'email_reserved_for_other_user' - - def is_external_id_used_by_other_user(self): - """ - Check if the union tag is ``external_id_used_by_other_user``. - - :rtype: bool - """ - return self._tag == 'external_id_used_by_other_user' - - def is_set_profile_disallowed(self): - """ - Check if the union tag is ``set_profile_disallowed``. - - :rtype: bool - """ - return self._tag == 'set_profile_disallowed' - - def is_param_cannot_be_empty(self): - """ - Check if the union tag is ``param_cannot_be_empty``. - - :rtype: bool - """ - return self._tag == 'param_cannot_be_empty' - - def is_persistent_id_disabled(self): - """ - Check if the union tag is ``persistent_id_disabled``. - - :rtype: bool - """ - return self._tag == 'persistent_id_disabled' - - def is_persistent_id_used_by_other_user(self): - """ - Check if the union tag is ``persistent_id_used_by_other_user``. - - :rtype: bool - """ - return self._tag == 'persistent_id_used_by_other_user' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'MembersSetProfileError(%r, %r)' % (self._tag, self._value) - -MembersSetProfileError_validator = bv.Union(MembersSetProfileError) - -class MembersSuspendError(MembersDeactivateError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar suspend_inactive_user: The user is not active, so it cannot be - suspended. - :ivar suspend_last_admin: The user is the last admin of the team, so it - cannot be suspended. - :ivar team_license_limit: Team is full. The organization has no available - licenses. - """ - - # Attribute is overwritten below the class definition - suspend_inactive_user = None - # Attribute is overwritten below the class definition - suspend_last_admin = None - # Attribute is overwritten below the class definition - team_license_limit = None - - def is_suspend_inactive_user(self): - """ - Check if the union tag is ``suspend_inactive_user``. - - :rtype: bool - """ - return self._tag == 'suspend_inactive_user' - - def is_suspend_last_admin(self): - """ - Check if the union tag is ``suspend_last_admin``. - - :rtype: bool - """ - return self._tag == 'suspend_last_admin' - - def is_team_license_limit(self): - """ - Check if the union tag is ``team_license_limit``. - - :rtype: bool - """ - return self._tag == 'team_license_limit' - - def __repr__(self): - return 'MembersSuspendError(%r, %r)' % (self._tag, self._value) - -MembersSuspendError_validator = bv.Union(MembersSuspendError) - -class MembersUnsuspendArg(object): - """ - Exactly one of team_member_id, email, or external_id must be provided to - identify the user account. - - :ivar user: Identity of user to unsuspend. - """ - - __slots__ = [ - '_user_value', - '_user_present', - ] - - _has_required_fields = True - - def __init__(self, - user=None): - self._user_value = None - self._user_present = False - if user is not None: - self.user = user - - @property - def user(self): - """ - Identity of user to unsuspend. - - :rtype: UserSelectorArg - """ - if self._user_present: - return self._user_value - else: - raise AttributeError("missing required field 'user'") - - @user.setter - def user(self, val): - self._user_validator.validate_type_only(val) - self._user_value = val - self._user_present = True - - @user.deleter - def user(self): - self._user_value = None - self._user_present = False - - def __repr__(self): - return 'MembersUnsuspendArg(user={!r})'.format( - self._user_value, - ) - -MembersUnsuspendArg_validator = bv.Struct(MembersUnsuspendArg) - -class MembersUnsuspendError(MembersDeactivateError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar unsuspend_non_suspended_member: The user is unsuspended, so it cannot - be unsuspended again. - :ivar team_license_limit: Team is full. The organization has no available - licenses. - """ - - # Attribute is overwritten below the class definition - unsuspend_non_suspended_member = None - # Attribute is overwritten below the class definition - team_license_limit = None - - def is_unsuspend_non_suspended_member(self): - """ - Check if the union tag is ``unsuspend_non_suspended_member``. - - :rtype: bool - """ - return self._tag == 'unsuspend_non_suspended_member' - - def is_team_license_limit(self): - """ - Check if the union tag is ``team_license_limit``. - - :rtype: bool - """ - return self._tag == 'team_license_limit' - - def __repr__(self): - return 'MembersUnsuspendError(%r, %r)' % (self._tag, self._value) - -MembersUnsuspendError_validator = bv.Union(MembersUnsuspendError) - -class MobileClientPlatform(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar iphone: Official Dropbox iPhone client. - :ivar ipad: Official Dropbox iPad client. - :ivar android: Official Dropbox Android client. - :ivar windows_phone: Official Dropbox Windows phone client. - :ivar blackberry: Official Dropbox Blackberry client. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - iphone = None - # Attribute is overwritten below the class definition - ipad = None - # Attribute is overwritten below the class definition - android = None - # Attribute is overwritten below the class definition - windows_phone = None - # Attribute is overwritten below the class definition - blackberry = None - # Attribute is overwritten below the class definition - other = None - - def is_iphone(self): - """ - Check if the union tag is ``iphone``. - - :rtype: bool - """ - return self._tag == 'iphone' - - def is_ipad(self): - """ - Check if the union tag is ``ipad``. - - :rtype: bool - """ - return self._tag == 'ipad' - - def is_android(self): - """ - Check if the union tag is ``android``. - - :rtype: bool - """ - return self._tag == 'android' - - def is_windows_phone(self): - """ - Check if the union tag is ``windows_phone``. - - :rtype: bool - """ - return self._tag == 'windows_phone' - - def is_blackberry(self): - """ - Check if the union tag is ``blackberry``. - - :rtype: bool - """ - return self._tag == 'blackberry' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'MobileClientPlatform(%r, %r)' % (self._tag, self._value) - -MobileClientPlatform_validator = bv.Union(MobileClientPlatform) - -class MobileClientSession(DeviceSession): - """ - Information about linked Dropbox mobile client sessions. - - :ivar device_name: The device name. - :ivar client_type: The mobile application type. - :ivar client_version: The dropbox client version. - :ivar os_version: The hosting OS version. - :ivar last_carrier: last carrier used by the device. - """ - - __slots__ = [ - '_device_name_value', - '_device_name_present', - '_client_type_value', - '_client_type_present', - '_client_version_value', - '_client_version_present', - '_os_version_value', - '_os_version_present', - '_last_carrier_value', - '_last_carrier_present', - ] - - _has_required_fields = True - - def __init__(self, - session_id=None, - device_name=None, - client_type=None, - ip_address=None, - country=None, - created=None, - updated=None, - client_version=None, - os_version=None, - last_carrier=None): - super(MobileClientSession, self).__init__(session_id, - ip_address, - country, - created, - updated) - self._device_name_value = None - self._device_name_present = False - self._client_type_value = None - self._client_type_present = False - self._client_version_value = None - self._client_version_present = False - self._os_version_value = None - self._os_version_present = False - self._last_carrier_value = None - self._last_carrier_present = False - if device_name is not None: - self.device_name = device_name - if client_type is not None: - self.client_type = client_type - if client_version is not None: - self.client_version = client_version - if os_version is not None: - self.os_version = os_version - if last_carrier is not None: - self.last_carrier = last_carrier - - @property - def device_name(self): - """ - The device name. - - :rtype: str - """ - if self._device_name_present: - return self._device_name_value - else: - raise AttributeError("missing required field 'device_name'") - - @device_name.setter - def device_name(self, val): - val = self._device_name_validator.validate(val) - self._device_name_value = val - self._device_name_present = True - - @device_name.deleter - def device_name(self): - self._device_name_value = None - self._device_name_present = False - - @property - def client_type(self): - """ - The mobile application type. - - :rtype: MobileClientPlatform - """ - if self._client_type_present: - return self._client_type_value - else: - raise AttributeError("missing required field 'client_type'") - - @client_type.setter - def client_type(self, val): - self._client_type_validator.validate_type_only(val) - self._client_type_value = val - self._client_type_present = True - - @client_type.deleter - def client_type(self): - self._client_type_value = None - self._client_type_present = False - - @property - def client_version(self): - """ - The dropbox client version. - - :rtype: str - """ - if self._client_version_present: - return self._client_version_value - else: - return None - - @client_version.setter - def client_version(self, val): - if val is None: - del self.client_version - return - val = self._client_version_validator.validate(val) - self._client_version_value = val - self._client_version_present = True - - @client_version.deleter - def client_version(self): - self._client_version_value = None - self._client_version_present = False - - @property - def os_version(self): - """ - The hosting OS version. - - :rtype: str - """ - if self._os_version_present: - return self._os_version_value - else: - return None - - @os_version.setter - def os_version(self, val): - if val is None: - del self.os_version - return - val = self._os_version_validator.validate(val) - self._os_version_value = val - self._os_version_present = True - - @os_version.deleter - def os_version(self): - self._os_version_value = None - self._os_version_present = False - - @property - def last_carrier(self): - """ - last carrier used by the device. - - :rtype: str - """ - if self._last_carrier_present: - return self._last_carrier_value - else: - return None - - @last_carrier.setter - def last_carrier(self, val): - if val is None: - del self.last_carrier - return - val = self._last_carrier_validator.validate(val) - self._last_carrier_value = val - self._last_carrier_present = True - - @last_carrier.deleter - def last_carrier(self): - self._last_carrier_value = None - self._last_carrier_present = False - - def __repr__(self): - return 'MobileClientSession(session_id={!r}, device_name={!r}, client_type={!r}, ip_address={!r}, country={!r}, created={!r}, updated={!r}, client_version={!r}, os_version={!r}, last_carrier={!r})'.format( - self._session_id_value, - self._device_name_value, - self._client_type_value, - self._ip_address_value, - self._country_value, - self._created_value, - self._updated_value, - self._client_version_value, - self._os_version_value, - self._last_carrier_value, - ) - -MobileClientSession_validator = bv.Struct(MobileClientSession) - -class NamespaceMetadata(object): - """ - Properties of a namespace. - - :ivar name: The name of this namespace. - :ivar namespace_id: The ID of this namespace. - :ivar namespace_type: The type of this namespace. - :ivar team_member_id: If this is a team member folder, the ID of the team - member. Otherwise, this field is not present. - """ - - __slots__ = [ - '_name_value', - '_name_present', - '_namespace_id_value', - '_namespace_id_present', - '_namespace_type_value', - '_namespace_type_present', - '_team_member_id_value', - '_team_member_id_present', - ] - - _has_required_fields = True - - def __init__(self, - name=None, - namespace_id=None, - namespace_type=None, - team_member_id=None): - self._name_value = None - self._name_present = False - self._namespace_id_value = None - self._namespace_id_present = False - self._namespace_type_value = None - self._namespace_type_present = False - self._team_member_id_value = None - self._team_member_id_present = False - if name is not None: - self.name = name - if namespace_id is not None: - self.namespace_id = namespace_id - if namespace_type is not None: - self.namespace_type = namespace_type - if team_member_id is not None: - self.team_member_id = team_member_id - - @property - def name(self): - """ - The name of this namespace. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") - - @name.setter - def name(self, val): - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - @property - def namespace_id(self): - """ - The ID of this namespace. - - :rtype: str - """ - if self._namespace_id_present: - return self._namespace_id_value - else: - raise AttributeError("missing required field 'namespace_id'") - - @namespace_id.setter - def namespace_id(self, val): - val = self._namespace_id_validator.validate(val) - self._namespace_id_value = val - self._namespace_id_present = True - - @namespace_id.deleter - def namespace_id(self): - self._namespace_id_value = None - self._namespace_id_present = False - - @property - def namespace_type(self): - """ - The type of this namespace. - - :rtype: NamespaceType - """ - if self._namespace_type_present: - return self._namespace_type_value - else: - raise AttributeError("missing required field 'namespace_type'") - - @namespace_type.setter - def namespace_type(self, val): - self._namespace_type_validator.validate_type_only(val) - self._namespace_type_value = val - self._namespace_type_present = True - - @namespace_type.deleter - def namespace_type(self): - self._namespace_type_value = None - self._namespace_type_present = False - - @property - def team_member_id(self): - """ - If this is a team member folder, the ID of the team member. Otherwise, - this field is not present. - - :rtype: str - """ - if self._team_member_id_present: - return self._team_member_id_value - else: - return None - - @team_member_id.setter - def team_member_id(self, val): - if val is None: - del self.team_member_id - return - val = self._team_member_id_validator.validate(val) - self._team_member_id_value = val - self._team_member_id_present = True - - @team_member_id.deleter - def team_member_id(self): - self._team_member_id_value = None - self._team_member_id_present = False - - def __repr__(self): - return 'NamespaceMetadata(name={!r}, namespace_id={!r}, namespace_type={!r}, team_member_id={!r})'.format( - self._name_value, - self._namespace_id_value, - self._namespace_type_value, - self._team_member_id_value, - ) - -NamespaceMetadata_validator = bv.Struct(NamespaceMetadata) - -class NamespaceType(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar app_folder: App sandbox folder. - :ivar shared_folder: Shared folder. - :ivar team_folder: Top-level team-owned folder. - :ivar team_member_folder: Team member's home folder. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - app_folder = None - # Attribute is overwritten below the class definition - shared_folder = None - # Attribute is overwritten below the class definition - team_folder = None - # Attribute is overwritten below the class definition - team_member_folder = None - # Attribute is overwritten below the class definition - other = None - - def is_app_folder(self): - """ - Check if the union tag is ``app_folder``. - - :rtype: bool - """ - return self._tag == 'app_folder' - - def is_shared_folder(self): - """ - Check if the union tag is ``shared_folder``. - - :rtype: bool - """ - return self._tag == 'shared_folder' - - def is_team_folder(self): - """ - Check if the union tag is ``team_folder``. - - :rtype: bool - """ - return self._tag == 'team_folder' - - def is_team_member_folder(self): - """ - Check if the union tag is ``team_member_folder``. - - :rtype: bool - """ - return self._tag == 'team_member_folder' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'NamespaceType(%r, %r)' % (self._tag, self._value) - -NamespaceType_validator = bv.Union(NamespaceType) - -class RemoveCustomQuotaResult(bb.Union): - """ - User result for setting member custom quota. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar UserSelectorArg success: Successfully removed user. - :ivar UserSelectorArg invalid_user: Invalid user (not in team). - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def success(cls, val): - """ - Create an instance of this class set to the ``success`` tag with value - ``val``. - - :param UserSelectorArg val: - :rtype: RemoveCustomQuotaResult - """ - return cls('success', val) - - @classmethod - def invalid_user(cls, val): - """ - Create an instance of this class set to the ``invalid_user`` tag with - value ``val``. - - :param UserSelectorArg val: - :rtype: RemoveCustomQuotaResult - """ - return cls('invalid_user', val) - - def is_success(self): - """ - Check if the union tag is ``success``. - - :rtype: bool - """ - return self._tag == 'success' - - def is_invalid_user(self): - """ - Check if the union tag is ``invalid_user``. - - :rtype: bool - """ - return self._tag == 'invalid_user' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_success(self): - """ - Successfully removed user. - - Only call this if :meth:`is_success` is true. - - :rtype: UserSelectorArg - """ - if not self.is_success(): - raise AttributeError("tag 'success' not set") - return self._value - - def get_invalid_user(self): - """ - Invalid user (not in team). - - Only call this if :meth:`is_invalid_user` is true. - - :rtype: UserSelectorArg - """ - if not self.is_invalid_user(): - raise AttributeError("tag 'invalid_user' not set") - return self._value - - def __repr__(self): - return 'RemoveCustomQuotaResult(%r, %r)' % (self._tag, self._value) - -RemoveCustomQuotaResult_validator = bv.Union(RemoveCustomQuotaResult) - -class RemovedStatus(object): - """ - :ivar is_recoverable: True if the removed team member is recoverable. - """ - - __slots__ = [ - '_is_recoverable_value', - '_is_recoverable_present', - ] - - _has_required_fields = True - - def __init__(self, - is_recoverable=None): - self._is_recoverable_value = None - self._is_recoverable_present = False - if is_recoverable is not None: - self.is_recoverable = is_recoverable - - @property - def is_recoverable(self): - """ - True if the removed team member is recoverable. - - :rtype: bool - """ - if self._is_recoverable_present: - return self._is_recoverable_value - else: - raise AttributeError("missing required field 'is_recoverable'") - - @is_recoverable.setter - def is_recoverable(self, val): - val = self._is_recoverable_validator.validate(val) - self._is_recoverable_value = val - self._is_recoverable_present = True - - @is_recoverable.deleter - def is_recoverable(self): - self._is_recoverable_value = None - self._is_recoverable_present = False - - def __repr__(self): - return 'RemovedStatus(is_recoverable={!r})'.format( - self._is_recoverable_value, - ) - -RemovedStatus_validator = bv.Struct(RemovedStatus) - -class RevokeDesktopClientArg(DeviceSessionArg): - """ - :ivar delete_on_unlink: Whether to delete all files of the account (this is - possible only if supported by the desktop client and will be made the - next time the client access the account). - """ - - __slots__ = [ - '_delete_on_unlink_value', - '_delete_on_unlink_present', - ] - - _has_required_fields = True - - def __init__(self, - session_id=None, - team_member_id=None, - delete_on_unlink=None): - super(RevokeDesktopClientArg, self).__init__(session_id, - team_member_id) - self._delete_on_unlink_value = None - self._delete_on_unlink_present = False - if delete_on_unlink is not None: - self.delete_on_unlink = delete_on_unlink - - @property - def delete_on_unlink(self): - """ - Whether to delete all files of the account (this is possible only if - supported by the desktop client and will be made the next time the - client access the account). - - :rtype: bool - """ - if self._delete_on_unlink_present: - return self._delete_on_unlink_value - else: - return False - - @delete_on_unlink.setter - def delete_on_unlink(self, val): - val = self._delete_on_unlink_validator.validate(val) - self._delete_on_unlink_value = val - self._delete_on_unlink_present = True - - @delete_on_unlink.deleter - def delete_on_unlink(self): - self._delete_on_unlink_value = None - self._delete_on_unlink_present = False - - def __repr__(self): - return 'RevokeDesktopClientArg(session_id={!r}, team_member_id={!r}, delete_on_unlink={!r})'.format( - self._session_id_value, - self._team_member_id_value, - self._delete_on_unlink_value, - ) - -RevokeDesktopClientArg_validator = bv.Struct(RevokeDesktopClientArg) - -class RevokeDeviceSessionArg(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar DeviceSessionArg web_session: End an active session. - :ivar RevokeDesktopClientArg desktop_client: Unlink a linked desktop device. - :ivar DeviceSessionArg mobile_client: Unlink a linked mobile device. - """ - - _catch_all = None - - @classmethod - def web_session(cls, val): - """ - Create an instance of this class set to the ``web_session`` tag with - value ``val``. - - :param DeviceSessionArg val: - :rtype: RevokeDeviceSessionArg - """ - return cls('web_session', val) - - @classmethod - def desktop_client(cls, val): - """ - Create an instance of this class set to the ``desktop_client`` tag with - value ``val``. - - :param RevokeDesktopClientArg val: - :rtype: RevokeDeviceSessionArg - """ - return cls('desktop_client', val) - - @classmethod - def mobile_client(cls, val): - """ - Create an instance of this class set to the ``mobile_client`` tag with - value ``val``. - - :param DeviceSessionArg val: - :rtype: RevokeDeviceSessionArg - """ - return cls('mobile_client', val) - - def is_web_session(self): - """ - Check if the union tag is ``web_session``. - - :rtype: bool - """ - return self._tag == 'web_session' - - def is_desktop_client(self): - """ - Check if the union tag is ``desktop_client``. - - :rtype: bool - """ - return self._tag == 'desktop_client' - - def is_mobile_client(self): - """ - Check if the union tag is ``mobile_client``. - - :rtype: bool - """ - return self._tag == 'mobile_client' - - def get_web_session(self): - """ - End an active session. - - Only call this if :meth:`is_web_session` is true. - - :rtype: DeviceSessionArg - """ - if not self.is_web_session(): - raise AttributeError("tag 'web_session' not set") - return self._value - - def get_desktop_client(self): - """ - Unlink a linked desktop device. - - Only call this if :meth:`is_desktop_client` is true. - - :rtype: RevokeDesktopClientArg - """ - if not self.is_desktop_client(): - raise AttributeError("tag 'desktop_client' not set") - return self._value - - def get_mobile_client(self): - """ - Unlink a linked mobile device. - - Only call this if :meth:`is_mobile_client` is true. - - :rtype: DeviceSessionArg - """ - if not self.is_mobile_client(): - raise AttributeError("tag 'mobile_client' not set") - return self._value - - def __repr__(self): - return 'RevokeDeviceSessionArg(%r, %r)' % (self._tag, self._value) - -RevokeDeviceSessionArg_validator = bv.Union(RevokeDeviceSessionArg) - -class RevokeDeviceSessionBatchArg(object): - - __slots__ = [ - '_revoke_devices_value', - '_revoke_devices_present', - ] - - _has_required_fields = True - - def __init__(self, - revoke_devices=None): - self._revoke_devices_value = None - self._revoke_devices_present = False - if revoke_devices is not None: - self.revoke_devices = revoke_devices - - @property - def revoke_devices(self): - """ - :rtype: list of [RevokeDeviceSessionArg] - """ - if self._revoke_devices_present: - return self._revoke_devices_value - else: - raise AttributeError("missing required field 'revoke_devices'") - - @revoke_devices.setter - def revoke_devices(self, val): - val = self._revoke_devices_validator.validate(val) - self._revoke_devices_value = val - self._revoke_devices_present = True - - @revoke_devices.deleter - def revoke_devices(self): - self._revoke_devices_value = None - self._revoke_devices_present = False - - def __repr__(self): - return 'RevokeDeviceSessionBatchArg(revoke_devices={!r})'.format( - self._revoke_devices_value, - ) - -RevokeDeviceSessionBatchArg_validator = bv.Struct(RevokeDeviceSessionBatchArg) - -class RevokeDeviceSessionBatchError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'RevokeDeviceSessionBatchError(%r, %r)' % (self._tag, self._value) - -RevokeDeviceSessionBatchError_validator = bv.Union(RevokeDeviceSessionBatchError) - -class RevokeDeviceSessionBatchResult(object): - - __slots__ = [ - '_revoke_devices_status_value', - '_revoke_devices_status_present', - ] - - _has_required_fields = True - - def __init__(self, - revoke_devices_status=None): - self._revoke_devices_status_value = None - self._revoke_devices_status_present = False - if revoke_devices_status is not None: - self.revoke_devices_status = revoke_devices_status - - @property - def revoke_devices_status(self): - """ - :rtype: list of [RevokeDeviceSessionStatus] - """ - if self._revoke_devices_status_present: - return self._revoke_devices_status_value - else: - raise AttributeError("missing required field 'revoke_devices_status'") - - @revoke_devices_status.setter - def revoke_devices_status(self, val): - val = self._revoke_devices_status_validator.validate(val) - self._revoke_devices_status_value = val - self._revoke_devices_status_present = True - - @revoke_devices_status.deleter - def revoke_devices_status(self): - self._revoke_devices_status_value = None - self._revoke_devices_status_present = False - - def __repr__(self): - return 'RevokeDeviceSessionBatchResult(revoke_devices_status={!r})'.format( - self._revoke_devices_status_value, - ) - -RevokeDeviceSessionBatchResult_validator = bv.Struct(RevokeDeviceSessionBatchResult) - -class RevokeDeviceSessionError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar device_session_not_found: Device session not found. - :ivar member_not_found: Member not found. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - device_session_not_found = None - # Attribute is overwritten below the class definition - member_not_found = None - # Attribute is overwritten below the class definition - other = None - - def is_device_session_not_found(self): - """ - Check if the union tag is ``device_session_not_found``. - - :rtype: bool - """ - return self._tag == 'device_session_not_found' - - def is_member_not_found(self): - """ - Check if the union tag is ``member_not_found``. - - :rtype: bool - """ - return self._tag == 'member_not_found' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'RevokeDeviceSessionError(%r, %r)' % (self._tag, self._value) - -RevokeDeviceSessionError_validator = bv.Union(RevokeDeviceSessionError) - -class RevokeDeviceSessionStatus(object): - """ - :ivar success: Result of the revoking request. - :ivar error_type: The error cause in case of a failure. - """ - - __slots__ = [ - '_success_value', - '_success_present', - '_error_type_value', - '_error_type_present', - ] - - _has_required_fields = True - - def __init__(self, - success=None, - error_type=None): - self._success_value = None - self._success_present = False - self._error_type_value = None - self._error_type_present = False - if success is not None: - self.success = success - if error_type is not None: - self.error_type = error_type - - @property - def success(self): - """ - Result of the revoking request. - - :rtype: bool - """ - if self._success_present: - return self._success_value - else: - raise AttributeError("missing required field 'success'") - - @success.setter - def success(self, val): - val = self._success_validator.validate(val) - self._success_value = val - self._success_present = True - - @success.deleter - def success(self): - self._success_value = None - self._success_present = False - - @property - def error_type(self): - """ - The error cause in case of a failure. - - :rtype: RevokeDeviceSessionError - """ - if self._error_type_present: - return self._error_type_value - else: - return None - - @error_type.setter - def error_type(self, val): - if val is None: - del self.error_type - return - self._error_type_validator.validate_type_only(val) - self._error_type_value = val - self._error_type_present = True - - @error_type.deleter - def error_type(self): - self._error_type_value = None - self._error_type_present = False - - def __repr__(self): - return 'RevokeDeviceSessionStatus(success={!r}, error_type={!r})'.format( - self._success_value, - self._error_type_value, - ) - -RevokeDeviceSessionStatus_validator = bv.Struct(RevokeDeviceSessionStatus) - -class RevokeLinkedApiAppArg(object): - """ - :ivar app_id: The application's unique id. - :ivar team_member_id: The unique id of the member owning the device. - :ivar keep_app_folder: Whether to keep the application dedicated folder (in - case the application uses one). - """ - - __slots__ = [ - '_app_id_value', - '_app_id_present', - '_team_member_id_value', - '_team_member_id_present', - '_keep_app_folder_value', - '_keep_app_folder_present', - ] - - _has_required_fields = True - - def __init__(self, - app_id=None, - team_member_id=None, - keep_app_folder=None): - self._app_id_value = None - self._app_id_present = False - self._team_member_id_value = None - self._team_member_id_present = False - self._keep_app_folder_value = None - self._keep_app_folder_present = False - if app_id is not None: - self.app_id = app_id - if team_member_id is not None: - self.team_member_id = team_member_id - if keep_app_folder is not None: - self.keep_app_folder = keep_app_folder - - @property - def app_id(self): - """ - The application's unique id. - - :rtype: str - """ - if self._app_id_present: - return self._app_id_value - else: - raise AttributeError("missing required field 'app_id'") - - @app_id.setter - def app_id(self, val): - val = self._app_id_validator.validate(val) - self._app_id_value = val - self._app_id_present = True - - @app_id.deleter - def app_id(self): - self._app_id_value = None - self._app_id_present = False - - @property - def team_member_id(self): - """ - The unique id of the member owning the device. - - :rtype: str - """ - if self._team_member_id_present: - return self._team_member_id_value - else: - raise AttributeError("missing required field 'team_member_id'") - - @team_member_id.setter - def team_member_id(self, val): - val = self._team_member_id_validator.validate(val) - self._team_member_id_value = val - self._team_member_id_present = True - - @team_member_id.deleter - def team_member_id(self): - self._team_member_id_value = None - self._team_member_id_present = False - - @property - def keep_app_folder(self): - """ - Whether to keep the application dedicated folder (in case the - application uses one). - - :rtype: bool - """ - if self._keep_app_folder_present: - return self._keep_app_folder_value - else: - return True - - @keep_app_folder.setter - def keep_app_folder(self, val): - val = self._keep_app_folder_validator.validate(val) - self._keep_app_folder_value = val - self._keep_app_folder_present = True - - @keep_app_folder.deleter - def keep_app_folder(self): - self._keep_app_folder_value = None - self._keep_app_folder_present = False - - def __repr__(self): - return 'RevokeLinkedApiAppArg(app_id={!r}, team_member_id={!r}, keep_app_folder={!r})'.format( - self._app_id_value, - self._team_member_id_value, - self._keep_app_folder_value, - ) - -RevokeLinkedApiAppArg_validator = bv.Struct(RevokeLinkedApiAppArg) - -class RevokeLinkedApiAppBatchArg(object): - - __slots__ = [ - '_revoke_linked_app_value', - '_revoke_linked_app_present', - ] - - _has_required_fields = True - - def __init__(self, - revoke_linked_app=None): - self._revoke_linked_app_value = None - self._revoke_linked_app_present = False - if revoke_linked_app is not None: - self.revoke_linked_app = revoke_linked_app - - @property - def revoke_linked_app(self): - """ - :rtype: list of [RevokeLinkedApiAppArg] - """ - if self._revoke_linked_app_present: - return self._revoke_linked_app_value - else: - raise AttributeError("missing required field 'revoke_linked_app'") - - @revoke_linked_app.setter - def revoke_linked_app(self, val): - val = self._revoke_linked_app_validator.validate(val) - self._revoke_linked_app_value = val - self._revoke_linked_app_present = True - - @revoke_linked_app.deleter - def revoke_linked_app(self): - self._revoke_linked_app_value = None - self._revoke_linked_app_present = False - - def __repr__(self): - return 'RevokeLinkedApiAppBatchArg(revoke_linked_app={!r})'.format( - self._revoke_linked_app_value, - ) - -RevokeLinkedApiAppBatchArg_validator = bv.Struct(RevokeLinkedApiAppBatchArg) - -class RevokeLinkedAppBatchError(bb.Union): - """ - Error returned by - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_revoke_linked_app_batch`. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'RevokeLinkedAppBatchError(%r, %r)' % (self._tag, self._value) - -RevokeLinkedAppBatchError_validator = bv.Union(RevokeLinkedAppBatchError) - -class RevokeLinkedAppBatchResult(object): - - __slots__ = [ - '_revoke_linked_app_status_value', - '_revoke_linked_app_status_present', - ] - - _has_required_fields = True - - def __init__(self, - revoke_linked_app_status=None): - self._revoke_linked_app_status_value = None - self._revoke_linked_app_status_present = False - if revoke_linked_app_status is not None: - self.revoke_linked_app_status = revoke_linked_app_status - - @property - def revoke_linked_app_status(self): - """ - :rtype: list of [RevokeLinkedAppStatus] - """ - if self._revoke_linked_app_status_present: - return self._revoke_linked_app_status_value - else: - raise AttributeError("missing required field 'revoke_linked_app_status'") - - @revoke_linked_app_status.setter - def revoke_linked_app_status(self, val): - val = self._revoke_linked_app_status_validator.validate(val) - self._revoke_linked_app_status_value = val - self._revoke_linked_app_status_present = True - - @revoke_linked_app_status.deleter - def revoke_linked_app_status(self): - self._revoke_linked_app_status_value = None - self._revoke_linked_app_status_present = False - - def __repr__(self): - return 'RevokeLinkedAppBatchResult(revoke_linked_app_status={!r})'.format( - self._revoke_linked_app_status_value, - ) - -RevokeLinkedAppBatchResult_validator = bv.Struct(RevokeLinkedAppBatchResult) - -class RevokeLinkedAppError(bb.Union): - """ - Error returned by - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_revoke_linked_app`. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar app_not_found: Application not found. - :ivar member_not_found: Member not found. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - app_not_found = None - # Attribute is overwritten below the class definition - member_not_found = None - # Attribute is overwritten below the class definition - other = None - - def is_app_not_found(self): - """ - Check if the union tag is ``app_not_found``. - - :rtype: bool - """ - return self._tag == 'app_not_found' - - def is_member_not_found(self): - """ - Check if the union tag is ``member_not_found``. - - :rtype: bool - """ - return self._tag == 'member_not_found' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'RevokeLinkedAppError(%r, %r)' % (self._tag, self._value) - -RevokeLinkedAppError_validator = bv.Union(RevokeLinkedAppError) - -class RevokeLinkedAppStatus(object): - """ - :ivar success: Result of the revoking request. - :ivar error_type: The error cause in case of a failure. - """ - - __slots__ = [ - '_success_value', - '_success_present', - '_error_type_value', - '_error_type_present', - ] - - _has_required_fields = True - - def __init__(self, - success=None, - error_type=None): - self._success_value = None - self._success_present = False - self._error_type_value = None - self._error_type_present = False - if success is not None: - self.success = success - if error_type is not None: - self.error_type = error_type - - @property - def success(self): - """ - Result of the revoking request. - - :rtype: bool - """ - if self._success_present: - return self._success_value - else: - raise AttributeError("missing required field 'success'") - - @success.setter - def success(self, val): - val = self._success_validator.validate(val) - self._success_value = val - self._success_present = True - - @success.deleter - def success(self): - self._success_value = None - self._success_present = False - - @property - def error_type(self): - """ - The error cause in case of a failure. - - :rtype: RevokeLinkedAppError - """ - if self._error_type_present: - return self._error_type_value - else: - return None - - @error_type.setter - def error_type(self, val): - if val is None: - del self.error_type - return - self._error_type_validator.validate_type_only(val) - self._error_type_value = val - self._error_type_present = True - - @error_type.deleter - def error_type(self): - self._error_type_value = None - self._error_type_present = False - - def __repr__(self): - return 'RevokeLinkedAppStatus(success={!r}, error_type={!r})'.format( - self._success_value, - self._error_type_value, - ) - -RevokeLinkedAppStatus_validator = bv.Struct(RevokeLinkedAppStatus) - -class SetCustomQuotaArg(object): - """ - :ivar users_and_quotas: List of users and their custom quotas. - """ - - __slots__ = [ - '_users_and_quotas_value', - '_users_and_quotas_present', - ] - - _has_required_fields = True - - def __init__(self, - users_and_quotas=None): - self._users_and_quotas_value = None - self._users_and_quotas_present = False - if users_and_quotas is not None: - self.users_and_quotas = users_and_quotas - - @property - def users_and_quotas(self): - """ - List of users and their custom quotas. - - :rtype: list of [UserCustomQuotaArg] - """ - if self._users_and_quotas_present: - return self._users_and_quotas_value - else: - raise AttributeError("missing required field 'users_and_quotas'") - - @users_and_quotas.setter - def users_and_quotas(self, val): - val = self._users_and_quotas_validator.validate(val) - self._users_and_quotas_value = val - self._users_and_quotas_present = True - - @users_and_quotas.deleter - def users_and_quotas(self): - self._users_and_quotas_value = None - self._users_and_quotas_present = False - - def __repr__(self): - return 'SetCustomQuotaArg(users_and_quotas={!r})'.format( - self._users_and_quotas_value, - ) - -SetCustomQuotaArg_validator = bv.Struct(SetCustomQuotaArg) - -class StorageBucket(object): - """ - Describes the number of users in a specific storage bucket. - - :ivar bucket: The name of the storage bucket. For example, '1G' is a bucket - of users with storage size up to 1 Giga. - :ivar users: The number of people whose storage is in the range of this - storage bucket. - """ - - __slots__ = [ - '_bucket_value', - '_bucket_present', - '_users_value', - '_users_present', - ] - - _has_required_fields = True - - def __init__(self, - bucket=None, - users=None): - self._bucket_value = None - self._bucket_present = False - self._users_value = None - self._users_present = False - if bucket is not None: - self.bucket = bucket - if users is not None: - self.users = users - - @property - def bucket(self): - """ - The name of the storage bucket. For example, '1G' is a bucket of users - with storage size up to 1 Giga. - - :rtype: str - """ - if self._bucket_present: - return self._bucket_value - else: - raise AttributeError("missing required field 'bucket'") - - @bucket.setter - def bucket(self, val): - val = self._bucket_validator.validate(val) - self._bucket_value = val - self._bucket_present = True - - @bucket.deleter - def bucket(self): - self._bucket_value = None - self._bucket_present = False - - @property - def users(self): - """ - The number of people whose storage is in the range of this storage - bucket. - - :rtype: long - """ - if self._users_present: - return self._users_value - else: - raise AttributeError("missing required field 'users'") - - @users.setter - def users(self, val): - val = self._users_validator.validate(val) - self._users_value = val - self._users_present = True - - @users.deleter - def users(self): - self._users_value = None - self._users_present = False - - def __repr__(self): - return 'StorageBucket(bucket={!r}, users={!r})'.format( - self._bucket_value, - self._users_value, - ) - -StorageBucket_validator = bv.Struct(StorageBucket) - -class TeamFolderAccessError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar invalid_team_folder_id: The team folder ID is invalid. - :ivar no_access: The authenticated app does not have permission to manage - that team folder. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - invalid_team_folder_id = None - # Attribute is overwritten below the class definition - no_access = None - # Attribute is overwritten below the class definition - other = None - - def is_invalid_team_folder_id(self): - """ - Check if the union tag is ``invalid_team_folder_id``. - - :rtype: bool - """ - return self._tag == 'invalid_team_folder_id' - - def is_no_access(self): - """ - Check if the union tag is ``no_access``. - - :rtype: bool - """ - return self._tag == 'no_access' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'TeamFolderAccessError(%r, %r)' % (self._tag, self._value) - -TeamFolderAccessError_validator = bv.Union(TeamFolderAccessError) - -class TeamFolderActivateError(BaseTeamFolderError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - def __repr__(self): - return 'TeamFolderActivateError(%r, %r)' % (self._tag, self._value) - -TeamFolderActivateError_validator = bv.Union(TeamFolderActivateError) - -class TeamFolderIdArg(object): - """ - :ivar team_folder_id: The ID of the team folder. - """ - - __slots__ = [ - '_team_folder_id_value', - '_team_folder_id_present', - ] - - _has_required_fields = True - - def __init__(self, - team_folder_id=None): - self._team_folder_id_value = None - self._team_folder_id_present = False - if team_folder_id is not None: - self.team_folder_id = team_folder_id - - @property - def team_folder_id(self): - """ - The ID of the team folder. - - :rtype: str - """ - if self._team_folder_id_present: - return self._team_folder_id_value - else: - raise AttributeError("missing required field 'team_folder_id'") - - @team_folder_id.setter - def team_folder_id(self, val): - val = self._team_folder_id_validator.validate(val) - self._team_folder_id_value = val - self._team_folder_id_present = True - - @team_folder_id.deleter - def team_folder_id(self): - self._team_folder_id_value = None - self._team_folder_id_present = False - - def __repr__(self): - return 'TeamFolderIdArg(team_folder_id={!r})'.format( - self._team_folder_id_value, - ) - -TeamFolderIdArg_validator = bv.Struct(TeamFolderIdArg) - -class TeamFolderArchiveArg(TeamFolderIdArg): - """ - :ivar force_async_off: Whether to force the archive to happen synchronously. - """ - - __slots__ = [ - '_force_async_off_value', - '_force_async_off_present', - ] - - _has_required_fields = True - - def __init__(self, - team_folder_id=None, - force_async_off=None): - super(TeamFolderArchiveArg, self).__init__(team_folder_id) - self._force_async_off_value = None - self._force_async_off_present = False - if force_async_off is not None: - self.force_async_off = force_async_off - - @property - def force_async_off(self): - """ - Whether to force the archive to happen synchronously. - - :rtype: bool - """ - if self._force_async_off_present: - return self._force_async_off_value - else: - return False - - @force_async_off.setter - def force_async_off(self, val): - val = self._force_async_off_validator.validate(val) - self._force_async_off_value = val - self._force_async_off_present = True - - @force_async_off.deleter - def force_async_off(self): - self._force_async_off_value = None - self._force_async_off_present = False - - def __repr__(self): - return 'TeamFolderArchiveArg(team_folder_id={!r}, force_async_off={!r})'.format( - self._team_folder_id_value, - self._force_async_off_value, - ) - -TeamFolderArchiveArg_validator = bv.Struct(TeamFolderArchiveArg) - -class TeamFolderArchiveError(BaseTeamFolderError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - def __repr__(self): - return 'TeamFolderArchiveError(%r, %r)' % (self._tag, self._value) - -TeamFolderArchiveError_validator = bv.Union(TeamFolderArchiveError) - -class TeamFolderArchiveJobStatus(async.PollResultBase): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar TeamFolderMetadata complete: The archive job has finished. The value - is the metadata for the resulting team folder. - :ivar TeamFolderArchiveError failed: Error occurred while performing an - asynchronous job from - :meth:`dropbox.dropbox.Dropbox.team_team_folder_archive`. - """ - - @classmethod - def complete(cls, val): - """ - Create an instance of this class set to the ``complete`` tag with value - ``val``. - - :param TeamFolderMetadata val: - :rtype: TeamFolderArchiveJobStatus - """ - return cls('complete', val) - - @classmethod - def failed(cls, val): - """ - Create an instance of this class set to the ``failed`` tag with value - ``val``. - - :param TeamFolderArchiveError val: - :rtype: TeamFolderArchiveJobStatus - """ - return cls('failed', val) - - def is_complete(self): - """ - Check if the union tag is ``complete``. - - :rtype: bool - """ - return self._tag == 'complete' - - def is_failed(self): - """ - Check if the union tag is ``failed``. - - :rtype: bool - """ - return self._tag == 'failed' - - def get_complete(self): - """ - The archive job has finished. The value is the metadata for the - resulting team folder. - - Only call this if :meth:`is_complete` is true. - - :rtype: TeamFolderMetadata - """ - if not self.is_complete(): - raise AttributeError("tag 'complete' not set") - return self._value - - def get_failed(self): - """ - Error occurred while performing an asynchronous job from - :meth:`dropbox.dropbox.Dropbox.team_team_folder_archive`. - - Only call this if :meth:`is_failed` is true. - - :rtype: TeamFolderArchiveError - """ - if not self.is_failed(): - raise AttributeError("tag 'failed' not set") - return self._value - - def __repr__(self): - return 'TeamFolderArchiveJobStatus(%r, %r)' % (self._tag, self._value) - -TeamFolderArchiveJobStatus_validator = bv.Union(TeamFolderArchiveJobStatus) - -class TeamFolderArchiveLaunch(async.LaunchResultBase): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - @classmethod - def complete(cls, val): - """ - Create an instance of this class set to the ``complete`` tag with value - ``val``. - - :param TeamFolderMetadata val: - :rtype: TeamFolderArchiveLaunch - """ - return cls('complete', val) - - def is_complete(self): - """ - Check if the union tag is ``complete``. - - :rtype: bool - """ - return self._tag == 'complete' - - def get_complete(self): - """ - Only call this if :meth:`is_complete` is true. - - :rtype: TeamFolderMetadata - """ - if not self.is_complete(): - raise AttributeError("tag 'complete' not set") - return self._value - - def __repr__(self): - return 'TeamFolderArchiveLaunch(%r, %r)' % (self._tag, self._value) - -TeamFolderArchiveLaunch_validator = bv.Union(TeamFolderArchiveLaunch) - -class TeamFolderCreateArg(object): - """ - :ivar name: Name for the new team folder. - """ - - __slots__ = [ - '_name_value', - '_name_present', - ] - - _has_required_fields = True - - def __init__(self, - name=None): - self._name_value = None - self._name_present = False - if name is not None: - self.name = name - - @property - def name(self): - """ - Name for the new team folder. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") - - @name.setter - def name(self, val): - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - def __repr__(self): - return 'TeamFolderCreateArg(name={!r})'.format( - self._name_value, - ) - -TeamFolderCreateArg_validator = bv.Struct(TeamFolderCreateArg) - -class TeamFolderCreateError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar invalid_folder_name: The provided name cannot be used. - :ivar folder_name_already_used: There is already a team folder with the - provided name. - :ivar folder_name_reserved: The provided name cannot be used because it is - reserved. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - invalid_folder_name = None - # Attribute is overwritten below the class definition - folder_name_already_used = None - # Attribute is overwritten below the class definition - folder_name_reserved = None - # Attribute is overwritten below the class definition - other = None - - def is_invalid_folder_name(self): - """ - Check if the union tag is ``invalid_folder_name``. - - :rtype: bool - """ - return self._tag == 'invalid_folder_name' - - def is_folder_name_already_used(self): - """ - Check if the union tag is ``folder_name_already_used``. - - :rtype: bool - """ - return self._tag == 'folder_name_already_used' - - def is_folder_name_reserved(self): - """ - Check if the union tag is ``folder_name_reserved``. - - :rtype: bool - """ - return self._tag == 'folder_name_reserved' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'TeamFolderCreateError(%r, %r)' % (self._tag, self._value) - -TeamFolderCreateError_validator = bv.Union(TeamFolderCreateError) - -class TeamFolderGetInfoItem(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar str id_not_found: An ID that was provided as a parameter to - :route:`team_folder/get_info` did not match any of the team's team - folders. - :ivar TeamFolderMetadata team_folder_metadata: Properties of a team folder. - """ - - _catch_all = None - - @classmethod - def id_not_found(cls, val): - """ - Create an instance of this class set to the ``id_not_found`` tag with - value ``val``. - - :param str val: - :rtype: TeamFolderGetInfoItem - """ - return cls('id_not_found', val) - - @classmethod - def team_folder_metadata(cls, val): - """ - Create an instance of this class set to the ``team_folder_metadata`` tag - with value ``val``. - - :param TeamFolderMetadata val: - :rtype: TeamFolderGetInfoItem - """ - return cls('team_folder_metadata', val) - - def is_id_not_found(self): - """ - Check if the union tag is ``id_not_found``. - - :rtype: bool - """ - return self._tag == 'id_not_found' - - def is_team_folder_metadata(self): - """ - Check if the union tag is ``team_folder_metadata``. - - :rtype: bool - """ - return self._tag == 'team_folder_metadata' - - def get_id_not_found(self): - """ - An ID that was provided as a parameter to - :meth:`dropbox.dropbox.Dropbox.team_team_folder_get_info` did not match - any of the team's team folders. - - Only call this if :meth:`is_id_not_found` is true. - - :rtype: str - """ - if not self.is_id_not_found(): - raise AttributeError("tag 'id_not_found' not set") - return self._value - - def get_team_folder_metadata(self): - """ - Properties of a team folder. - - Only call this if :meth:`is_team_folder_metadata` is true. - - :rtype: TeamFolderMetadata - """ - if not self.is_team_folder_metadata(): - raise AttributeError("tag 'team_folder_metadata' not set") - return self._value - - def __repr__(self): - return 'TeamFolderGetInfoItem(%r, %r)' % (self._tag, self._value) - -TeamFolderGetInfoItem_validator = bv.Union(TeamFolderGetInfoItem) - -class TeamFolderIdListArg(object): - """ - :ivar team_folder_ids: The list of team folder IDs. - """ - - __slots__ = [ - '_team_folder_ids_value', - '_team_folder_ids_present', - ] - - _has_required_fields = True - - def __init__(self, - team_folder_ids=None): - self._team_folder_ids_value = None - self._team_folder_ids_present = False - if team_folder_ids is not None: - self.team_folder_ids = team_folder_ids - - @property - def team_folder_ids(self): - """ - The list of team folder IDs. - - :rtype: list of [str] - """ - if self._team_folder_ids_present: - return self._team_folder_ids_value - else: - raise AttributeError("missing required field 'team_folder_ids'") - - @team_folder_ids.setter - def team_folder_ids(self, val): - val = self._team_folder_ids_validator.validate(val) - self._team_folder_ids_value = val - self._team_folder_ids_present = True - - @team_folder_ids.deleter - def team_folder_ids(self): - self._team_folder_ids_value = None - self._team_folder_ids_present = False - - def __repr__(self): - return 'TeamFolderIdListArg(team_folder_ids={!r})'.format( - self._team_folder_ids_value, - ) - -TeamFolderIdListArg_validator = bv.Struct(TeamFolderIdListArg) - -class TeamFolderInvalidStatusError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar active: The folder is active and the operation did not succeed. - :ivar archived: The folder is archived and the operation did not succeed. - :ivar archive_in_progress: The folder is being archived and the operation - did not succeed. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - active = None - # Attribute is overwritten below the class definition - archived = None - # Attribute is overwritten below the class definition - archive_in_progress = None - # Attribute is overwritten below the class definition - other = None - - def is_active(self): - """ - Check if the union tag is ``active``. - - :rtype: bool - """ - return self._tag == 'active' - - def is_archived(self): - """ - Check if the union tag is ``archived``. - - :rtype: bool - """ - return self._tag == 'archived' - - def is_archive_in_progress(self): - """ - Check if the union tag is ``archive_in_progress``. - - :rtype: bool - """ - return self._tag == 'archive_in_progress' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'TeamFolderInvalidStatusError(%r, %r)' % (self._tag, self._value) - -TeamFolderInvalidStatusError_validator = bv.Union(TeamFolderInvalidStatusError) - -class TeamFolderListArg(object): - """ - :ivar limit: The maximum number of results to return per request. - """ - - __slots__ = [ - '_limit_value', - '_limit_present', - ] - - _has_required_fields = False - - def __init__(self, - limit=None): - self._limit_value = None - self._limit_present = False - if limit is not None: - self.limit = limit - - @property - def limit(self): - """ - The maximum number of results to return per request. - - :rtype: long - """ - if self._limit_present: - return self._limit_value - else: - return 1000 - - @limit.setter - def limit(self, val): - val = self._limit_validator.validate(val) - self._limit_value = val - self._limit_present = True - - @limit.deleter - def limit(self): - self._limit_value = None - self._limit_present = False - - def __repr__(self): - return 'TeamFolderListArg(limit={!r})'.format( - self._limit_value, - ) - -TeamFolderListArg_validator = bv.Struct(TeamFolderListArg) - -class TeamFolderListContinueArg(object): - """ - :ivar cursor: Indicates from what point to get the next set of team folders. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - cursor=None): - self._cursor_value = None - self._cursor_present = False - if cursor is not None: - self.cursor = cursor - - @property - def cursor(self): - """ - Indicates from what point to get the next set of team folders. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'TeamFolderListContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - -TeamFolderListContinueArg_validator = bv.Struct(TeamFolderListContinueArg) - -class TeamFolderListContinueError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar invalid_cursor: The cursor is invalid. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - invalid_cursor = None - # Attribute is overwritten below the class definition - other = None - - def is_invalid_cursor(self): - """ - Check if the union tag is ``invalid_cursor``. - - :rtype: bool - """ - return self._tag == 'invalid_cursor' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'TeamFolderListContinueError(%r, %r)' % (self._tag, self._value) - -TeamFolderListContinueError_validator = bv.Union(TeamFolderListContinueError) - -class TeamFolderListError(object): - - __slots__ = [ - '_access_error_value', - '_access_error_present', - ] - - _has_required_fields = True - - def __init__(self, - access_error=None): - self._access_error_value = None - self._access_error_present = False - if access_error is not None: - self.access_error = access_error - - @property - def access_error(self): - """ - :rtype: TeamFolderAccessError - """ - if self._access_error_present: - return self._access_error_value - else: - raise AttributeError("missing required field 'access_error'") - - @access_error.setter - def access_error(self, val): - self._access_error_validator.validate_type_only(val) - self._access_error_value = val - self._access_error_present = True - - @access_error.deleter - def access_error(self): - self._access_error_value = None - self._access_error_present = False - - def __repr__(self): - return 'TeamFolderListError(access_error={!r})'.format( - self._access_error_value, - ) - -TeamFolderListError_validator = bv.Struct(TeamFolderListError) - -class TeamFolderListResult(object): - """ - Result for :meth:`dropbox.dropbox.Dropbox.team_team_folder_list` and - :meth:`dropbox.dropbox.Dropbox.team_team_folder_list_continue`. - - :ivar team_folders: List of all team folders in the authenticated team. - :ivar cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_team_folder_list_continue` to obtain - additional team folders. - :ivar has_more: Is true if there are additional team folders that have not - been returned yet. An additional call to - :meth:`dropbox.dropbox.Dropbox.team_team_folder_list_continue` can - retrieve them. - """ - - __slots__ = [ - '_team_folders_value', - '_team_folders_present', - '_cursor_value', - '_cursor_present', - '_has_more_value', - '_has_more_present', - ] - - _has_required_fields = True - - def __init__(self, - team_folders=None, - cursor=None, - has_more=None): - self._team_folders_value = None - self._team_folders_present = False - self._cursor_value = None - self._cursor_present = False - self._has_more_value = None - self._has_more_present = False - if team_folders is not None: - self.team_folders = team_folders - if cursor is not None: - self.cursor = cursor - if has_more is not None: - self.has_more = has_more - - @property - def team_folders(self): - """ - List of all team folders in the authenticated team. - - :rtype: list of [TeamFolderMetadata] - """ - if self._team_folders_present: - return self._team_folders_value - else: - raise AttributeError("missing required field 'team_folders'") - - @team_folders.setter - def team_folders(self, val): - val = self._team_folders_validator.validate(val) - self._team_folders_value = val - self._team_folders_present = True - - @team_folders.deleter - def team_folders(self): - self._team_folders_value = None - self._team_folders_present = False - - @property - def cursor(self): - """ - Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_team_folder_list_continue` to obtain - additional team folders. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - @property - def has_more(self): - """ - Is true if there are additional team folders that have not been returned - yet. An additional call to - :meth:`dropbox.dropbox.Dropbox.team_team_folder_list_continue` can - retrieve them. - - :rtype: bool - """ - if self._has_more_present: - return self._has_more_value - else: - raise AttributeError("missing required field 'has_more'") - - @has_more.setter - def has_more(self, val): - val = self._has_more_validator.validate(val) - self._has_more_value = val - self._has_more_present = True - - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False - - def __repr__(self): - return 'TeamFolderListResult(team_folders={!r}, cursor={!r}, has_more={!r})'.format( - self._team_folders_value, - self._cursor_value, - self._has_more_value, - ) - -TeamFolderListResult_validator = bv.Struct(TeamFolderListResult) - -class TeamFolderMetadata(object): - """ - Properties of a team folder. - - :ivar team_folder_id: The ID of the team folder. - :ivar name: The name of the team folder. - :ivar status: The status of the team folder. - :ivar is_team_shared_dropbox: True if this team folder is the team shared - dropbox. - """ - - __slots__ = [ - '_team_folder_id_value', - '_team_folder_id_present', - '_name_value', - '_name_present', - '_status_value', - '_status_present', - '_is_team_shared_dropbox_value', - '_is_team_shared_dropbox_present', - ] - - _has_required_fields = True - - def __init__(self, - team_folder_id=None, - name=None, - status=None, - is_team_shared_dropbox=None): - self._team_folder_id_value = None - self._team_folder_id_present = False - self._name_value = None - self._name_present = False - self._status_value = None - self._status_present = False - self._is_team_shared_dropbox_value = None - self._is_team_shared_dropbox_present = False - if team_folder_id is not None: - self.team_folder_id = team_folder_id - if name is not None: - self.name = name - if status is not None: - self.status = status - if is_team_shared_dropbox is not None: - self.is_team_shared_dropbox = is_team_shared_dropbox - - @property - def team_folder_id(self): - """ - The ID of the team folder. - - :rtype: str - """ - if self._team_folder_id_present: - return self._team_folder_id_value - else: - raise AttributeError("missing required field 'team_folder_id'") - - @team_folder_id.setter - def team_folder_id(self, val): - val = self._team_folder_id_validator.validate(val) - self._team_folder_id_value = val - self._team_folder_id_present = True - - @team_folder_id.deleter - def team_folder_id(self): - self._team_folder_id_value = None - self._team_folder_id_present = False - - @property - def name(self): - """ - The name of the team folder. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") - - @name.setter - def name(self, val): - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - @property - def status(self): - """ - The status of the team folder. - - :rtype: TeamFolderStatus - """ - if self._status_present: - return self._status_value - else: - raise AttributeError("missing required field 'status'") - - @status.setter - def status(self, val): - self._status_validator.validate_type_only(val) - self._status_value = val - self._status_present = True - - @status.deleter - def status(self): - self._status_value = None - self._status_present = False - - @property - def is_team_shared_dropbox(self): - """ - True if this team folder is the team shared dropbox. - - :rtype: bool - """ - if self._is_team_shared_dropbox_present: - return self._is_team_shared_dropbox_value - else: - raise AttributeError("missing required field 'is_team_shared_dropbox'") - - @is_team_shared_dropbox.setter - def is_team_shared_dropbox(self, val): - val = self._is_team_shared_dropbox_validator.validate(val) - self._is_team_shared_dropbox_value = val - self._is_team_shared_dropbox_present = True - - @is_team_shared_dropbox.deleter - def is_team_shared_dropbox(self): - self._is_team_shared_dropbox_value = None - self._is_team_shared_dropbox_present = False - - def __repr__(self): - return 'TeamFolderMetadata(team_folder_id={!r}, name={!r}, status={!r}, is_team_shared_dropbox={!r})'.format( - self._team_folder_id_value, - self._name_value, - self._status_value, - self._is_team_shared_dropbox_value, - ) - -TeamFolderMetadata_validator = bv.Struct(TeamFolderMetadata) - -class TeamFolderPermanentlyDeleteError(BaseTeamFolderError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - def __repr__(self): - return 'TeamFolderPermanentlyDeleteError(%r, %r)' % (self._tag, self._value) - -TeamFolderPermanentlyDeleteError_validator = bv.Union(TeamFolderPermanentlyDeleteError) - -class TeamFolderRenameArg(TeamFolderIdArg): - """ - :ivar name: New team folder name. - """ - - __slots__ = [ - '_name_value', - '_name_present', - ] - - _has_required_fields = True - - def __init__(self, - team_folder_id=None, - name=None): - super(TeamFolderRenameArg, self).__init__(team_folder_id) - self._name_value = None - self._name_present = False - if name is not None: - self.name = name - - @property - def name(self): - """ - New team folder name. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") - - @name.setter - def name(self, val): - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - def __repr__(self): - return 'TeamFolderRenameArg(team_folder_id={!r}, name={!r})'.format( - self._team_folder_id_value, - self._name_value, - ) - -TeamFolderRenameArg_validator = bv.Struct(TeamFolderRenameArg) - -class TeamFolderRenameError(BaseTeamFolderError): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar invalid_folder_name: The provided folder name cannot be used. - :ivar folder_name_already_used: There is already a team folder with the same - name. - :ivar folder_name_reserved: The provided name cannot be used because it is - reserved. - """ - - # Attribute is overwritten below the class definition - invalid_folder_name = None - # Attribute is overwritten below the class definition - folder_name_already_used = None - # Attribute is overwritten below the class definition - folder_name_reserved = None - - def is_invalid_folder_name(self): - """ - Check if the union tag is ``invalid_folder_name``. - - :rtype: bool - """ - return self._tag == 'invalid_folder_name' - - def is_folder_name_already_used(self): - """ - Check if the union tag is ``folder_name_already_used``. - - :rtype: bool - """ - return self._tag == 'folder_name_already_used' - - def is_folder_name_reserved(self): - """ - Check if the union tag is ``folder_name_reserved``. - - :rtype: bool - """ - return self._tag == 'folder_name_reserved' - - def __repr__(self): - return 'TeamFolderRenameError(%r, %r)' % (self._tag, self._value) - -TeamFolderRenameError_validator = bv.Union(TeamFolderRenameError) - -class TeamFolderStatus(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar active: The team folder and sub-folders are available to all members. - :ivar archived: The team folder is not accessible outside of the team folder - manager. - :ivar archive_in_progress: The team folder is not accessible outside of the - team folder manager. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - active = None - # Attribute is overwritten below the class definition - archived = None - # Attribute is overwritten below the class definition - archive_in_progress = None - # Attribute is overwritten below the class definition - other = None - - def is_active(self): - """ - Check if the union tag is ``active``. - - :rtype: bool - """ - return self._tag == 'active' - - def is_archived(self): - """ - Check if the union tag is ``archived``. - - :rtype: bool - """ - return self._tag == 'archived' - - def is_archive_in_progress(self): - """ - Check if the union tag is ``archive_in_progress``. - - :rtype: bool - """ - return self._tag == 'archive_in_progress' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'TeamFolderStatus(%r, %r)' % (self._tag, self._value) - -TeamFolderStatus_validator = bv.Union(TeamFolderStatus) - -class TeamFolderTeamSharedDropboxError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar disallowed: This action is not allowed for a team shared dropbox. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - disallowed = None - # Attribute is overwritten below the class definition - other = None - - def is_disallowed(self): - """ - Check if the union tag is ``disallowed``. - - :rtype: bool - """ - return self._tag == 'disallowed' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'TeamFolderTeamSharedDropboxError(%r, %r)' % (self._tag, self._value) - -TeamFolderTeamSharedDropboxError_validator = bv.Union(TeamFolderTeamSharedDropboxError) - -class TeamGetInfoResult(object): - """ - :ivar name: The name of the team. - :ivar team_id: The ID of the team. - :ivar num_licensed_users: The number of licenses available to the team. - :ivar num_provisioned_users: The number of accounts that have been invited - or are already active members of the team. - """ - - __slots__ = [ - '_name_value', - '_name_present', - '_team_id_value', - '_team_id_present', - '_num_licensed_users_value', - '_num_licensed_users_present', - '_num_provisioned_users_value', - '_num_provisioned_users_present', - '_policies_value', - '_policies_present', - ] - - _has_required_fields = True - - def __init__(self, - name=None, - team_id=None, - num_licensed_users=None, - num_provisioned_users=None, - policies=None): - self._name_value = None - self._name_present = False - self._team_id_value = None - self._team_id_present = False - self._num_licensed_users_value = None - self._num_licensed_users_present = False - self._num_provisioned_users_value = None - self._num_provisioned_users_present = False - self._policies_value = None - self._policies_present = False - if name is not None: - self.name = name - if team_id is not None: - self.team_id = team_id - if num_licensed_users is not None: - self.num_licensed_users = num_licensed_users - if num_provisioned_users is not None: - self.num_provisioned_users = num_provisioned_users - if policies is not None: - self.policies = policies - - @property - def name(self): - """ - The name of the team. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") - - @name.setter - def name(self, val): - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - @property - def team_id(self): - """ - The ID of the team. - - :rtype: str - """ - if self._team_id_present: - return self._team_id_value - else: - raise AttributeError("missing required field 'team_id'") - - @team_id.setter - def team_id(self, val): - val = self._team_id_validator.validate(val) - self._team_id_value = val - self._team_id_present = True - - @team_id.deleter - def team_id(self): - self._team_id_value = None - self._team_id_present = False - - @property - def num_licensed_users(self): - """ - The number of licenses available to the team. - - :rtype: long - """ - if self._num_licensed_users_present: - return self._num_licensed_users_value - else: - raise AttributeError("missing required field 'num_licensed_users'") - - @num_licensed_users.setter - def num_licensed_users(self, val): - val = self._num_licensed_users_validator.validate(val) - self._num_licensed_users_value = val - self._num_licensed_users_present = True - - @num_licensed_users.deleter - def num_licensed_users(self): - self._num_licensed_users_value = None - self._num_licensed_users_present = False - - @property - def num_provisioned_users(self): - """ - The number of accounts that have been invited or are already active - members of the team. - - :rtype: long - """ - if self._num_provisioned_users_present: - return self._num_provisioned_users_value - else: - raise AttributeError("missing required field 'num_provisioned_users'") - - @num_provisioned_users.setter - def num_provisioned_users(self, val): - val = self._num_provisioned_users_validator.validate(val) - self._num_provisioned_users_value = val - self._num_provisioned_users_present = True - - @num_provisioned_users.deleter - def num_provisioned_users(self): - self._num_provisioned_users_value = None - self._num_provisioned_users_present = False - - @property - def policies(self): - """ - :rtype: team_policies.TeamMemberPolicies_validator - """ - if self._policies_present: - return self._policies_value - else: - raise AttributeError("missing required field 'policies'") - - @policies.setter - def policies(self, val): - self._policies_validator.validate_type_only(val) - self._policies_value = val - self._policies_present = True - - @policies.deleter - def policies(self): - self._policies_value = None - self._policies_present = False - - def __repr__(self): - return 'TeamGetInfoResult(name={!r}, team_id={!r}, num_licensed_users={!r}, num_provisioned_users={!r}, policies={!r})'.format( - self._name_value, - self._team_id_value, - self._num_licensed_users_value, - self._num_provisioned_users_value, - self._policies_value, - ) - -TeamGetInfoResult_validator = bv.Struct(TeamGetInfoResult) - -class TeamMemberInfo(object): - """ - Information about a team member. - - :ivar profile: Profile of a user as a member of a team. - :ivar role: The user's role in the team. - """ - - __slots__ = [ - '_profile_value', - '_profile_present', - '_role_value', - '_role_present', - ] - - _has_required_fields = True - - def __init__(self, - profile=None, - role=None): - self._profile_value = None - self._profile_present = False - self._role_value = None - self._role_present = False - if profile is not None: - self.profile = profile - if role is not None: - self.role = role - - @property - def profile(self): - """ - Profile of a user as a member of a team. - - :rtype: TeamMemberProfile - """ - if self._profile_present: - return self._profile_value - else: - raise AttributeError("missing required field 'profile'") - - @profile.setter - def profile(self, val): - self._profile_validator.validate_type_only(val) - self._profile_value = val - self._profile_present = True - - @profile.deleter - def profile(self): - self._profile_value = None - self._profile_present = False - - @property - def role(self): - """ - The user's role in the team. - - :rtype: AdminTier - """ - if self._role_present: - return self._role_value - else: - raise AttributeError("missing required field 'role'") - - @role.setter - def role(self, val): - self._role_validator.validate_type_only(val) - self._role_value = val - self._role_present = True - - @role.deleter - def role(self): - self._role_value = None - self._role_present = False - - def __repr__(self): - return 'TeamMemberInfo(profile={!r}, role={!r})'.format( - self._profile_value, - self._role_value, - ) - -TeamMemberInfo_validator = bv.Struct(TeamMemberInfo) - -class TeamMemberProfile(MemberProfile): - """ - Profile of a user as a member of a team. - - :ivar groups: List of group IDs of groups that the user belongs to. - :ivar member_folder_id: The namespace id of the user's root folder. - """ - - __slots__ = [ - '_groups_value', - '_groups_present', - '_member_folder_id_value', - '_member_folder_id_present', - ] - - _has_required_fields = True - - def __init__(self, - team_member_id=None, - email=None, - email_verified=None, - status=None, - name=None, - membership_type=None, - groups=None, - member_folder_id=None, - external_id=None, - account_id=None, - joined_on=None, - persistent_id=None): - super(TeamMemberProfile, self).__init__(team_member_id, - email, - email_verified, - status, - name, - membership_type, - external_id, - account_id, - joined_on, - persistent_id) - self._groups_value = None - self._groups_present = False - self._member_folder_id_value = None - self._member_folder_id_present = False - if groups is not None: - self.groups = groups - if member_folder_id is not None: - self.member_folder_id = member_folder_id - - @property - def groups(self): - """ - List of group IDs of groups that the user belongs to. - - :rtype: list of [str] - """ - if self._groups_present: - return self._groups_value - else: - raise AttributeError("missing required field 'groups'") - - @groups.setter - def groups(self, val): - val = self._groups_validator.validate(val) - self._groups_value = val - self._groups_present = True - - @groups.deleter - def groups(self): - self._groups_value = None - self._groups_present = False - - @property - def member_folder_id(self): - """ - The namespace id of the user's root folder. - - :rtype: str - """ - if self._member_folder_id_present: - return self._member_folder_id_value - else: - raise AttributeError("missing required field 'member_folder_id'") - - @member_folder_id.setter - def member_folder_id(self, val): - val = self._member_folder_id_validator.validate(val) - self._member_folder_id_value = val - self._member_folder_id_present = True - - @member_folder_id.deleter - def member_folder_id(self): - self._member_folder_id_value = None - self._member_folder_id_present = False - - def __repr__(self): - return 'TeamMemberProfile(team_member_id={!r}, email={!r}, email_verified={!r}, status={!r}, name={!r}, membership_type={!r}, groups={!r}, member_folder_id={!r}, external_id={!r}, account_id={!r}, joined_on={!r}, persistent_id={!r})'.format( - self._team_member_id_value, - self._email_value, - self._email_verified_value, - self._status_value, - self._name_value, - self._membership_type_value, - self._groups_value, - self._member_folder_id_value, - self._external_id_value, - self._account_id_value, - self._joined_on_value, - self._persistent_id_value, - ) - -TeamMemberProfile_validator = bv.Struct(TeamMemberProfile) - -class TeamMemberStatus(bb.Union): - """ - The user's status as a member of a specific team. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar active: User has successfully joined the team. - :ivar invited: User has been invited to a team, but has not joined the team - yet. - :ivar suspended: User is no longer a member of the team, but the account can - be un-suspended, re-establishing the user as a team member. - :ivar RemovedStatus removed: User is no longer a member of the team. Removed - users are only listed when include_removed is true in members/list. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - active = None - # Attribute is overwritten below the class definition - invited = None - # Attribute is overwritten below the class definition - suspended = None - - @classmethod - def removed(cls, val): - """ - Create an instance of this class set to the ``removed`` tag with value - ``val``. - - :param RemovedStatus val: - :rtype: TeamMemberStatus - """ - return cls('removed', val) - - def is_active(self): - """ - Check if the union tag is ``active``. - - :rtype: bool - """ - return self._tag == 'active' - - def is_invited(self): - """ - Check if the union tag is ``invited``. - - :rtype: bool - """ - return self._tag == 'invited' - - def is_suspended(self): - """ - Check if the union tag is ``suspended``. - - :rtype: bool - """ - return self._tag == 'suspended' - - def is_removed(self): - """ - Check if the union tag is ``removed``. - - :rtype: bool - """ - return self._tag == 'removed' - - def get_removed(self): - """ - User is no longer a member of the team. Removed users are only listed - when include_removed is true in members/list. - - Only call this if :meth:`is_removed` is true. - - :rtype: RemovedStatus - """ - if not self.is_removed(): - raise AttributeError("tag 'removed' not set") - return self._value - - def __repr__(self): - return 'TeamMemberStatus(%r, %r)' % (self._tag, self._value) - -TeamMemberStatus_validator = bv.Union(TeamMemberStatus) - -class TeamMembershipType(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar full: User uses a license and has full access to team resources like - the shared quota. - :ivar limited: User does not have access to the shared quota and team admins - have restricted administrative control. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - full = None - # Attribute is overwritten below the class definition - limited = None - - def is_full(self): - """ - Check if the union tag is ``full``. - - :rtype: bool - """ - return self._tag == 'full' - - def is_limited(self): - """ - Check if the union tag is ``limited``. - - :rtype: bool - """ - return self._tag == 'limited' - - def __repr__(self): - return 'TeamMembershipType(%r, %r)' % (self._tag, self._value) - -TeamMembershipType_validator = bv.Union(TeamMembershipType) - -class TeamNamespacesListArg(object): - """ - :ivar limit: Specifying a value here has no effect. - """ - - __slots__ = [ - '_limit_value', - '_limit_present', - ] - - _has_required_fields = False - - def __init__(self, - limit=None): - self._limit_value = None - self._limit_present = False - if limit is not None: - self.limit = limit - - @property - def limit(self): - """ - Specifying a value here has no effect. - - :rtype: long - """ - if self._limit_present: - return self._limit_value - else: - return 1000 - - @limit.setter - def limit(self, val): - val = self._limit_validator.validate(val) - self._limit_value = val - self._limit_present = True - - @limit.deleter - def limit(self): - self._limit_value = None - self._limit_present = False - - def __repr__(self): - return 'TeamNamespacesListArg(limit={!r})'.format( - self._limit_value, - ) - -TeamNamespacesListArg_validator = bv.Struct(TeamNamespacesListArg) - -class TeamNamespacesListContinueArg(object): - """ - :ivar cursor: Indicates from what point to get the next set of - team-accessible namespaces. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - cursor=None): - self._cursor_value = None - self._cursor_present = False - if cursor is not None: - self.cursor = cursor - - @property - def cursor(self): - """ - Indicates from what point to get the next set of team-accessible - namespaces. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'TeamNamespacesListContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - -TeamNamespacesListContinueArg_validator = bv.Struct(TeamNamespacesListContinueArg) - -class TeamNamespacesListContinueError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar invalid_cursor: The cursor is invalid. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - invalid_cursor = None - # Attribute is overwritten below the class definition - other = None - - def is_invalid_cursor(self): - """ - Check if the union tag is ``invalid_cursor``. - - :rtype: bool - """ - return self._tag == 'invalid_cursor' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'TeamNamespacesListContinueError(%r, %r)' % (self._tag, self._value) - -TeamNamespacesListContinueError_validator = bv.Union(TeamNamespacesListContinueError) - -class TeamNamespacesListResult(object): - """ - Result for :meth:`dropbox.dropbox.Dropbox.team_namespaces_list`. - - :ivar namespaces: List of all namespaces the team can access. - :ivar cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_namespaces_list_continue` to obtain - additional namespaces. Note that duplicate namespaces may be returned. - :ivar has_more: Is true if there are additional namespaces that have not - been returned yet. - """ - - __slots__ = [ - '_namespaces_value', - '_namespaces_present', - '_cursor_value', - '_cursor_present', - '_has_more_value', - '_has_more_present', - ] - - _has_required_fields = True - - def __init__(self, - namespaces=None, - cursor=None, - has_more=None): - self._namespaces_value = None - self._namespaces_present = False - self._cursor_value = None - self._cursor_present = False - self._has_more_value = None - self._has_more_present = False - if namespaces is not None: - self.namespaces = namespaces - if cursor is not None: - self.cursor = cursor - if has_more is not None: - self.has_more = has_more - - @property - def namespaces(self): - """ - List of all namespaces the team can access. - - :rtype: list of [NamespaceMetadata] - """ - if self._namespaces_present: - return self._namespaces_value - else: - raise AttributeError("missing required field 'namespaces'") - - @namespaces.setter - def namespaces(self, val): - val = self._namespaces_validator.validate(val) - self._namespaces_value = val - self._namespaces_present = True - - @namespaces.deleter - def namespaces(self): - self._namespaces_value = None - self._namespaces_present = False - - @property - def cursor(self): - """ - Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_namespaces_list_continue` to obtain - additional namespaces. Note that duplicate namespaces may be returned. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - @property - def has_more(self): - """ - Is true if there are additional namespaces that have not been returned - yet. - - :rtype: bool - """ - if self._has_more_present: - return self._has_more_value - else: - raise AttributeError("missing required field 'has_more'") - - @has_more.setter - def has_more(self, val): - val = self._has_more_validator.validate(val) - self._has_more_value = val - self._has_more_present = True - - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False - - def __repr__(self): - return 'TeamNamespacesListResult(namespaces={!r}, cursor={!r}, has_more={!r})'.format( - self._namespaces_value, - self._cursor_value, - self._has_more_value, - ) - -TeamNamespacesListResult_validator = bv.Struct(TeamNamespacesListResult) - -class TokenGetAuthenticatedAdminError(bb.Union): - """ - Error returned by - :meth:`dropbox.dropbox.Dropbox.team_token_get_authenticated_admin`. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar mapping_not_found: The current token is not associated with a team - admin, because mappings were not recorded when the token was created. - Consider re-authorizing a new access token to record its authenticating - admin. - :ivar admin_not_active: Either the team admin that authorized this token is - no longer an active member of the team or no longer a team admin. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - mapping_not_found = None - # Attribute is overwritten below the class definition - admin_not_active = None - # Attribute is overwritten below the class definition - other = None - - def is_mapping_not_found(self): - """ - Check if the union tag is ``mapping_not_found``. - - :rtype: bool - """ - return self._tag == 'mapping_not_found' - - def is_admin_not_active(self): - """ - Check if the union tag is ``admin_not_active``. - - :rtype: bool - """ - return self._tag == 'admin_not_active' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'TokenGetAuthenticatedAdminError(%r, %r)' % (self._tag, self._value) - -TokenGetAuthenticatedAdminError_validator = bv.Union(TokenGetAuthenticatedAdminError) - -class TokenGetAuthenticatedAdminResult(object): - """ - Results for - :meth:`dropbox.dropbox.Dropbox.team_token_get_authenticated_admin`. - - :ivar admin_profile: The admin who authorized the token. - """ - - __slots__ = [ - '_admin_profile_value', - '_admin_profile_present', - ] - - _has_required_fields = True - - def __init__(self, - admin_profile=None): - self._admin_profile_value = None - self._admin_profile_present = False - if admin_profile is not None: - self.admin_profile = admin_profile - - @property - def admin_profile(self): - """ - The admin who authorized the token. - - :rtype: TeamMemberProfile - """ - if self._admin_profile_present: - return self._admin_profile_value - else: - raise AttributeError("missing required field 'admin_profile'") - - @admin_profile.setter - def admin_profile(self, val): - self._admin_profile_validator.validate_type_only(val) - self._admin_profile_value = val - self._admin_profile_present = True - - @admin_profile.deleter - def admin_profile(self): - self._admin_profile_value = None - self._admin_profile_present = False - - def __repr__(self): - return 'TokenGetAuthenticatedAdminResult(admin_profile={!r})'.format( - self._admin_profile_value, - ) - -TokenGetAuthenticatedAdminResult_validator = bv.Struct(TokenGetAuthenticatedAdminResult) - -class UploadApiRateLimitValue(bb.Union): - """ - The value for ``Feature.upload_api_rate_limit``. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar unlimited: This team has unlimited upload API quota. So far both - server version account and legacy account type have unlimited monthly - upload api quota. - :ivar long limit: The number of upload API calls allowed per month. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - unlimited = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def limit(cls, val): - """ - Create an instance of this class set to the ``limit`` tag with value - ``val``. - - :param long val: - :rtype: UploadApiRateLimitValue - """ - return cls('limit', val) - - def is_unlimited(self): - """ - Check if the union tag is ``unlimited``. - - :rtype: bool - """ - return self._tag == 'unlimited' - - def is_limit(self): - """ - Check if the union tag is ``limit``. - - :rtype: bool - """ - return self._tag == 'limit' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_limit(self): - """ - The number of upload API calls allowed per month. - - Only call this if :meth:`is_limit` is true. - - :rtype: long - """ - if not self.is_limit(): - raise AttributeError("tag 'limit' not set") - return self._value - - def __repr__(self): - return 'UploadApiRateLimitValue(%r, %r)' % (self._tag, self._value) - -UploadApiRateLimitValue_validator = bv.Union(UploadApiRateLimitValue) - -class UserCustomQuotaArg(object): - """ - User and their required custom quota in GB (1 TB = 1024 GB). - """ - - __slots__ = [ - '_user_value', - '_user_present', - '_quota_gb_value', - '_quota_gb_present', - ] - - _has_required_fields = True - - def __init__(self, - user=None, - quota_gb=None): - self._user_value = None - self._user_present = False - self._quota_gb_value = None - self._quota_gb_present = False - if user is not None: - self.user = user - if quota_gb is not None: - self.quota_gb = quota_gb - - @property - def user(self): - """ - :rtype: UserSelectorArg - """ - if self._user_present: - return self._user_value - else: - raise AttributeError("missing required field 'user'") - - @user.setter - def user(self, val): - self._user_validator.validate_type_only(val) - self._user_value = val - self._user_present = True - - @user.deleter - def user(self): - self._user_value = None - self._user_present = False - - @property - def quota_gb(self): - """ - :rtype: long - """ - if self._quota_gb_present: - return self._quota_gb_value - else: - raise AttributeError("missing required field 'quota_gb'") - - @quota_gb.setter - def quota_gb(self, val): - val = self._quota_gb_validator.validate(val) - self._quota_gb_value = val - self._quota_gb_present = True - - @quota_gb.deleter - def quota_gb(self): - self._quota_gb_value = None - self._quota_gb_present = False - - def __repr__(self): - return 'UserCustomQuotaArg(user={!r}, quota_gb={!r})'.format( - self._user_value, - self._quota_gb_value, - ) - -UserCustomQuotaArg_validator = bv.Struct(UserCustomQuotaArg) - -class UserCustomQuotaResult(object): - """ - User and their custom quota in GB (1 TB = 1024 GB). No quota returns if the - user has no custom quota set. - """ - - __slots__ = [ - '_user_value', - '_user_present', - '_quota_gb_value', - '_quota_gb_present', - ] - - _has_required_fields = True - - def __init__(self, - user=None, - quota_gb=None): - self._user_value = None - self._user_present = False - self._quota_gb_value = None - self._quota_gb_present = False - if user is not None: - self.user = user - if quota_gb is not None: - self.quota_gb = quota_gb - - @property - def user(self): - """ - :rtype: UserSelectorArg - """ - if self._user_present: - return self._user_value - else: - raise AttributeError("missing required field 'user'") - - @user.setter - def user(self, val): - self._user_validator.validate_type_only(val) - self._user_value = val - self._user_present = True - - @user.deleter - def user(self): - self._user_value = None - self._user_present = False - - @property - def quota_gb(self): - """ - :rtype: long - """ - if self._quota_gb_present: - return self._quota_gb_value - else: - return None - - @quota_gb.setter - def quota_gb(self, val): - if val is None: - del self.quota_gb - return - val = self._quota_gb_validator.validate(val) - self._quota_gb_value = val - self._quota_gb_present = True - - @quota_gb.deleter - def quota_gb(self): - self._quota_gb_value = None - self._quota_gb_present = False - - def __repr__(self): - return 'UserCustomQuotaResult(user={!r}, quota_gb={!r})'.format( - self._user_value, - self._quota_gb_value, - ) - -UserCustomQuotaResult_validator = bv.Struct(UserCustomQuotaResult) - -class UserSelectorArg(bb.Union): - """ - Argument for selecting a single user, either by team_member_id, external_id - or email. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = None - - @classmethod - def team_member_id(cls, val): - """ - Create an instance of this class set to the ``team_member_id`` tag with - value ``val``. - - :param str val: - :rtype: UserSelectorArg - """ - return cls('team_member_id', val) - - @classmethod - def external_id(cls, val): - """ - Create an instance of this class set to the ``external_id`` tag with - value ``val``. - - :param str val: - :rtype: UserSelectorArg - """ - return cls('external_id', val) - - @classmethod - def email(cls, val): - """ - Create an instance of this class set to the ``email`` tag with value - ``val``. - - :param str val: - :rtype: UserSelectorArg - """ - return cls('email', val) - - def is_team_member_id(self): - """ - Check if the union tag is ``team_member_id``. - - :rtype: bool - """ - return self._tag == 'team_member_id' - - def is_external_id(self): - """ - Check if the union tag is ``external_id``. - - :rtype: bool - """ - return self._tag == 'external_id' - - def is_email(self): - """ - Check if the union tag is ``email``. - - :rtype: bool - """ - return self._tag == 'email' - - def get_team_member_id(self): - """ - Only call this if :meth:`is_team_member_id` is true. - - :rtype: str - """ - if not self.is_team_member_id(): - raise AttributeError("tag 'team_member_id' not set") - return self._value - - def get_external_id(self): - """ - Only call this if :meth:`is_external_id` is true. - - :rtype: str - """ - if not self.is_external_id(): - raise AttributeError("tag 'external_id' not set") - return self._value - - def get_email(self): - """ - Only call this if :meth:`is_email` is true. - - :rtype: str - """ - if not self.is_email(): - raise AttributeError("tag 'email' not set") - return self._value - - def __repr__(self): - return 'UserSelectorArg(%r, %r)' % (self._tag, self._value) - -UserSelectorArg_validator = bv.Union(UserSelectorArg) - -class UsersSelectorArg(bb.Union): - """ - Argument for selecting a list of users, either by team_member_ids, - external_ids or emails. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar list of [str] team_member_ids: List of member IDs. - :ivar list of [str] external_ids: List of external user IDs. - :ivar list of [str] emails: List of email addresses. - """ - - _catch_all = None - - @classmethod - def team_member_ids(cls, val): - """ - Create an instance of this class set to the ``team_member_ids`` tag with - value ``val``. - - :param list of [str] val: - :rtype: UsersSelectorArg - """ - return cls('team_member_ids', val) - - @classmethod - def external_ids(cls, val): - """ - Create an instance of this class set to the ``external_ids`` tag with - value ``val``. - - :param list of [str] val: - :rtype: UsersSelectorArg - """ - return cls('external_ids', val) - - @classmethod - def emails(cls, val): - """ - Create an instance of this class set to the ``emails`` tag with value - ``val``. - - :param list of [str] val: - :rtype: UsersSelectorArg - """ - return cls('emails', val) - - def is_team_member_ids(self): - """ - Check if the union tag is ``team_member_ids``. - - :rtype: bool - """ - return self._tag == 'team_member_ids' - - def is_external_ids(self): - """ - Check if the union tag is ``external_ids``. - - :rtype: bool - """ - return self._tag == 'external_ids' - - def is_emails(self): - """ - Check if the union tag is ``emails``. - - :rtype: bool - """ - return self._tag == 'emails' - - def get_team_member_ids(self): - """ - List of member IDs. - - Only call this if :meth:`is_team_member_ids` is true. - - :rtype: list of [str] - """ - if not self.is_team_member_ids(): - raise AttributeError("tag 'team_member_ids' not set") - return self._value - - def get_external_ids(self): - """ - List of external user IDs. - - Only call this if :meth:`is_external_ids` is true. - - :rtype: list of [str] - """ - if not self.is_external_ids(): - raise AttributeError("tag 'external_ids' not set") - return self._value - - def get_emails(self): - """ - List of email addresses. - - Only call this if :meth:`is_emails` is true. - - :rtype: list of [str] - """ - if not self.is_emails(): - raise AttributeError("tag 'emails' not set") - return self._value - - def __repr__(self): - return 'UsersSelectorArg(%r, %r)' % (self._tag, self._value) - -UsersSelectorArg_validator = bv.Union(UsersSelectorArg) - -GroupsGetInfoResult_validator = bv.List(GroupsGetInfoItem_validator) -MembersGetInfoResult_validator = bv.List(MembersGetInfoItem_validator) -NumberPerDay_validator = bv.List(bv.Nullable(bv.UInt64())) -UserQuota_validator = bv.UInt32(min_value=25) -DeviceSession._session_id_validator = bv.String() -DeviceSession._ip_address_validator = bv.Nullable(bv.String()) -DeviceSession._country_validator = bv.Nullable(bv.String()) -DeviceSession._created_validator = bv.Nullable(common.DropboxTimestamp_validator) -DeviceSession._updated_validator = bv.Nullable(common.DropboxTimestamp_validator) -DeviceSession._all_field_names_ = set([ - 'session_id', - 'ip_address', - 'country', - 'created', - 'updated', -]) -DeviceSession._all_fields_ = [ - ('session_id', DeviceSession._session_id_validator), - ('ip_address', DeviceSession._ip_address_validator), - ('country', DeviceSession._country_validator), - ('created', DeviceSession._created_validator), - ('updated', DeviceSession._updated_validator), -] - -ActiveWebSession._user_agent_validator = bv.String() -ActiveWebSession._os_validator = bv.String() -ActiveWebSession._browser_validator = bv.String() -ActiveWebSession._expires_validator = bv.Nullable(common.DropboxTimestamp_validator) -ActiveWebSession._all_field_names_ = DeviceSession._all_field_names_.union(set([ - 'user_agent', - 'os', - 'browser', - 'expires', -])) -ActiveWebSession._all_fields_ = DeviceSession._all_fields_ + [ - ('user_agent', ActiveWebSession._user_agent_validator), - ('os', ActiveWebSession._os_validator), - ('browser', ActiveWebSession._browser_validator), - ('expires', ActiveWebSession._expires_validator), -] - -AdminTier._team_admin_validator = bv.Void() -AdminTier._user_management_admin_validator = bv.Void() -AdminTier._support_admin_validator = bv.Void() -AdminTier._member_only_validator = bv.Void() -AdminTier._tagmap = { - 'team_admin': AdminTier._team_admin_validator, - 'user_management_admin': AdminTier._user_management_admin_validator, - 'support_admin': AdminTier._support_admin_validator, - 'member_only': AdminTier._member_only_validator, -} - -AdminTier.team_admin = AdminTier('team_admin') -AdminTier.user_management_admin = AdminTier('user_management_admin') -AdminTier.support_admin = AdminTier('support_admin') -AdminTier.member_only = AdminTier('member_only') - -ApiApp._app_id_validator = bv.String() -ApiApp._app_name_validator = bv.String() -ApiApp._publisher_validator = bv.Nullable(bv.String()) -ApiApp._publisher_url_validator = bv.Nullable(bv.String()) -ApiApp._linked_validator = bv.Nullable(common.DropboxTimestamp_validator) -ApiApp._is_app_folder_validator = bv.Boolean() -ApiApp._all_field_names_ = set([ - 'app_id', - 'app_name', - 'publisher', - 'publisher_url', - 'linked', - 'is_app_folder', -]) -ApiApp._all_fields_ = [ - ('app_id', ApiApp._app_id_validator), - ('app_name', ApiApp._app_name_validator), - ('publisher', ApiApp._publisher_validator), - ('publisher_url', ApiApp._publisher_url_validator), - ('linked', ApiApp._linked_validator), - ('is_app_folder', ApiApp._is_app_folder_validator), -] - -BaseDfbReport._start_date_validator = bv.String() -BaseDfbReport._all_field_names_ = set(['start_date']) -BaseDfbReport._all_fields_ = [('start_date', BaseDfbReport._start_date_validator)] - -BaseTeamFolderError._access_error_validator = TeamFolderAccessError_validator -BaseTeamFolderError._status_error_validator = TeamFolderInvalidStatusError_validator -BaseTeamFolderError._team_shared_dropbox_error_validator = TeamFolderTeamSharedDropboxError_validator -BaseTeamFolderError._other_validator = bv.Void() -BaseTeamFolderError._tagmap = { - 'access_error': BaseTeamFolderError._access_error_validator, - 'status_error': BaseTeamFolderError._status_error_validator, - 'team_shared_dropbox_error': BaseTeamFolderError._team_shared_dropbox_error_validator, - 'other': BaseTeamFolderError._other_validator, -} - -BaseTeamFolderError.other = BaseTeamFolderError('other') - -CustomQuotaError._too_many_users_validator = bv.Void() -CustomQuotaError._other_validator = bv.Void() -CustomQuotaError._tagmap = { - 'too_many_users': CustomQuotaError._too_many_users_validator, - 'other': CustomQuotaError._other_validator, -} - -CustomQuotaError.too_many_users = CustomQuotaError('too_many_users') -CustomQuotaError.other = CustomQuotaError('other') - -CustomQuotaResult._success_validator = UserCustomQuotaResult_validator -CustomQuotaResult._invalid_user_validator = UserSelectorArg_validator -CustomQuotaResult._other_validator = bv.Void() -CustomQuotaResult._tagmap = { - 'success': CustomQuotaResult._success_validator, - 'invalid_user': CustomQuotaResult._invalid_user_validator, - 'other': CustomQuotaResult._other_validator, -} - -CustomQuotaResult.other = CustomQuotaResult('other') - -CustomQuotaUsersArg._users_validator = bv.List(UserSelectorArg_validator) -CustomQuotaUsersArg._all_field_names_ = set(['users']) -CustomQuotaUsersArg._all_fields_ = [('users', CustomQuotaUsersArg._users_validator)] - -DateRange._start_date_validator = bv.Nullable(common.Date_validator) -DateRange._end_date_validator = bv.Nullable(common.Date_validator) -DateRange._all_field_names_ = set([ - 'start_date', - 'end_date', -]) -DateRange._all_fields_ = [ - ('start_date', DateRange._start_date_validator), - ('end_date', DateRange._end_date_validator), -] - -DateRangeError._other_validator = bv.Void() -DateRangeError._tagmap = { - 'other': DateRangeError._other_validator, -} - -DateRangeError.other = DateRangeError('other') - -DesktopClientSession._host_name_validator = bv.String() -DesktopClientSession._client_type_validator = DesktopPlatform_validator -DesktopClientSession._client_version_validator = bv.String() -DesktopClientSession._platform_validator = bv.String() -DesktopClientSession._is_delete_on_unlink_supported_validator = bv.Boolean() -DesktopClientSession._all_field_names_ = DeviceSession._all_field_names_.union(set([ - 'host_name', - 'client_type', - 'client_version', - 'platform', - 'is_delete_on_unlink_supported', -])) -DesktopClientSession._all_fields_ = DeviceSession._all_fields_ + [ - ('host_name', DesktopClientSession._host_name_validator), - ('client_type', DesktopClientSession._client_type_validator), - ('client_version', DesktopClientSession._client_version_validator), - ('platform', DesktopClientSession._platform_validator), - ('is_delete_on_unlink_supported', DesktopClientSession._is_delete_on_unlink_supported_validator), -] - -DesktopPlatform._windows_validator = bv.Void() -DesktopPlatform._mac_validator = bv.Void() -DesktopPlatform._linux_validator = bv.Void() -DesktopPlatform._other_validator = bv.Void() -DesktopPlatform._tagmap = { - 'windows': DesktopPlatform._windows_validator, - 'mac': DesktopPlatform._mac_validator, - 'linux': DesktopPlatform._linux_validator, - 'other': DesktopPlatform._other_validator, -} - -DesktopPlatform.windows = DesktopPlatform('windows') -DesktopPlatform.mac = DesktopPlatform('mac') -DesktopPlatform.linux = DesktopPlatform('linux') -DesktopPlatform.other = DesktopPlatform('other') - -DeviceSessionArg._session_id_validator = bv.String() -DeviceSessionArg._team_member_id_validator = bv.String() -DeviceSessionArg._all_field_names_ = set([ - 'session_id', - 'team_member_id', -]) -DeviceSessionArg._all_fields_ = [ - ('session_id', DeviceSessionArg._session_id_validator), - ('team_member_id', DeviceSessionArg._team_member_id_validator), -] - -DevicesActive._windows_validator = NumberPerDay_validator -DevicesActive._macos_validator = NumberPerDay_validator -DevicesActive._linux_validator = NumberPerDay_validator -DevicesActive._ios_validator = NumberPerDay_validator -DevicesActive._android_validator = NumberPerDay_validator -DevicesActive._other_validator = NumberPerDay_validator -DevicesActive._total_validator = NumberPerDay_validator -DevicesActive._all_field_names_ = set([ - 'windows', - 'macos', - 'linux', - 'ios', - 'android', - 'other', - 'total', -]) -DevicesActive._all_fields_ = [ - ('windows', DevicesActive._windows_validator), - ('macos', DevicesActive._macos_validator), - ('linux', DevicesActive._linux_validator), - ('ios', DevicesActive._ios_validator), - ('android', DevicesActive._android_validator), - ('other', DevicesActive._other_validator), - ('total', DevicesActive._total_validator), -] - -Feature._upload_api_rate_limit_validator = bv.Void() -Feature._has_team_shared_dropbox_validator = bv.Void() -Feature._other_validator = bv.Void() -Feature._tagmap = { - 'upload_api_rate_limit': Feature._upload_api_rate_limit_validator, - 'has_team_shared_dropbox': Feature._has_team_shared_dropbox_validator, - 'other': Feature._other_validator, -} - -Feature.upload_api_rate_limit = Feature('upload_api_rate_limit') -Feature.has_team_shared_dropbox = Feature('has_team_shared_dropbox') -Feature.other = Feature('other') - -FeatureValue._upload_api_rate_limit_validator = UploadApiRateLimitValue_validator -FeatureValue._has_team_shared_dropbox_validator = HasTeamSharedDropboxValue_validator -FeatureValue._other_validator = bv.Void() -FeatureValue._tagmap = { - 'upload_api_rate_limit': FeatureValue._upload_api_rate_limit_validator, - 'has_team_shared_dropbox': FeatureValue._has_team_shared_dropbox_validator, - 'other': FeatureValue._other_validator, -} - -FeatureValue.other = FeatureValue('other') - -FeaturesGetValuesBatchArg._features_validator = bv.List(Feature_validator) -FeaturesGetValuesBatchArg._all_field_names_ = set(['features']) -FeaturesGetValuesBatchArg._all_fields_ = [('features', FeaturesGetValuesBatchArg._features_validator)] - -FeaturesGetValuesBatchError._empty_features_list_validator = bv.Void() -FeaturesGetValuesBatchError._other_validator = bv.Void() -FeaturesGetValuesBatchError._tagmap = { - 'empty_features_list': FeaturesGetValuesBatchError._empty_features_list_validator, - 'other': FeaturesGetValuesBatchError._other_validator, -} - -FeaturesGetValuesBatchError.empty_features_list = FeaturesGetValuesBatchError('empty_features_list') -FeaturesGetValuesBatchError.other = FeaturesGetValuesBatchError('other') - -FeaturesGetValuesBatchResult._values_validator = bv.List(FeatureValue_validator) -FeaturesGetValuesBatchResult._all_field_names_ = set(['values']) -FeaturesGetValuesBatchResult._all_fields_ = [('values', FeaturesGetValuesBatchResult._values_validator)] - -GetActivityReport._adds_validator = NumberPerDay_validator -GetActivityReport._edits_validator = NumberPerDay_validator -GetActivityReport._deletes_validator = NumberPerDay_validator -GetActivityReport._active_users_28_day_validator = NumberPerDay_validator -GetActivityReport._active_users_7_day_validator = NumberPerDay_validator -GetActivityReport._active_users_1_day_validator = NumberPerDay_validator -GetActivityReport._active_shared_folders_28_day_validator = NumberPerDay_validator -GetActivityReport._active_shared_folders_7_day_validator = NumberPerDay_validator -GetActivityReport._active_shared_folders_1_day_validator = NumberPerDay_validator -GetActivityReport._shared_links_created_validator = NumberPerDay_validator -GetActivityReport._shared_links_viewed_by_team_validator = NumberPerDay_validator -GetActivityReport._shared_links_viewed_by_outside_user_validator = NumberPerDay_validator -GetActivityReport._shared_links_viewed_by_not_logged_in_validator = NumberPerDay_validator -GetActivityReport._shared_links_viewed_total_validator = NumberPerDay_validator -GetActivityReport._all_field_names_ = BaseDfbReport._all_field_names_.union(set([ - 'adds', - 'edits', - 'deletes', - 'active_users_28_day', - 'active_users_7_day', - 'active_users_1_day', - 'active_shared_folders_28_day', - 'active_shared_folders_7_day', - 'active_shared_folders_1_day', - 'shared_links_created', - 'shared_links_viewed_by_team', - 'shared_links_viewed_by_outside_user', - 'shared_links_viewed_by_not_logged_in', - 'shared_links_viewed_total', -])) -GetActivityReport._all_fields_ = BaseDfbReport._all_fields_ + [ - ('adds', GetActivityReport._adds_validator), - ('edits', GetActivityReport._edits_validator), - ('deletes', GetActivityReport._deletes_validator), - ('active_users_28_day', GetActivityReport._active_users_28_day_validator), - ('active_users_7_day', GetActivityReport._active_users_7_day_validator), - ('active_users_1_day', GetActivityReport._active_users_1_day_validator), - ('active_shared_folders_28_day', GetActivityReport._active_shared_folders_28_day_validator), - ('active_shared_folders_7_day', GetActivityReport._active_shared_folders_7_day_validator), - ('active_shared_folders_1_day', GetActivityReport._active_shared_folders_1_day_validator), - ('shared_links_created', GetActivityReport._shared_links_created_validator), - ('shared_links_viewed_by_team', GetActivityReport._shared_links_viewed_by_team_validator), - ('shared_links_viewed_by_outside_user', GetActivityReport._shared_links_viewed_by_outside_user_validator), - ('shared_links_viewed_by_not_logged_in', GetActivityReport._shared_links_viewed_by_not_logged_in_validator), - ('shared_links_viewed_total', GetActivityReport._shared_links_viewed_total_validator), -] - -GetDevicesReport._active_1_day_validator = DevicesActive_validator -GetDevicesReport._active_7_day_validator = DevicesActive_validator -GetDevicesReport._active_28_day_validator = DevicesActive_validator -GetDevicesReport._all_field_names_ = BaseDfbReport._all_field_names_.union(set([ - 'active_1_day', - 'active_7_day', - 'active_28_day', -])) -GetDevicesReport._all_fields_ = BaseDfbReport._all_fields_ + [ - ('active_1_day', GetDevicesReport._active_1_day_validator), - ('active_7_day', GetDevicesReport._active_7_day_validator), - ('active_28_day', GetDevicesReport._active_28_day_validator), -] - -GetMembershipReport._team_size_validator = NumberPerDay_validator -GetMembershipReport._pending_invites_validator = NumberPerDay_validator -GetMembershipReport._members_joined_validator = NumberPerDay_validator -GetMembershipReport._suspended_members_validator = NumberPerDay_validator -GetMembershipReport._licenses_validator = NumberPerDay_validator -GetMembershipReport._all_field_names_ = BaseDfbReport._all_field_names_.union(set([ - 'team_size', - 'pending_invites', - 'members_joined', - 'suspended_members', - 'licenses', -])) -GetMembershipReport._all_fields_ = BaseDfbReport._all_fields_ + [ - ('team_size', GetMembershipReport._team_size_validator), - ('pending_invites', GetMembershipReport._pending_invites_validator), - ('members_joined', GetMembershipReport._members_joined_validator), - ('suspended_members', GetMembershipReport._suspended_members_validator), - ('licenses', GetMembershipReport._licenses_validator), -] - -GetStorageReport._total_usage_validator = NumberPerDay_validator -GetStorageReport._shared_usage_validator = NumberPerDay_validator -GetStorageReport._unshared_usage_validator = NumberPerDay_validator -GetStorageReport._shared_folders_validator = NumberPerDay_validator -GetStorageReport._member_storage_map_validator = bv.List(bv.List(StorageBucket_validator)) -GetStorageReport._all_field_names_ = BaseDfbReport._all_field_names_.union(set([ - 'total_usage', - 'shared_usage', - 'unshared_usage', - 'shared_folders', - 'member_storage_map', -])) -GetStorageReport._all_fields_ = BaseDfbReport._all_fields_ + [ - ('total_usage', GetStorageReport._total_usage_validator), - ('shared_usage', GetStorageReport._shared_usage_validator), - ('unshared_usage', GetStorageReport._unshared_usage_validator), - ('shared_folders', GetStorageReport._shared_folders_validator), - ('member_storage_map', GetStorageReport._member_storage_map_validator), -] - -GroupAccessType._member_validator = bv.Void() -GroupAccessType._owner_validator = bv.Void() -GroupAccessType._tagmap = { - 'member': GroupAccessType._member_validator, - 'owner': GroupAccessType._owner_validator, -} - -GroupAccessType.member = GroupAccessType('member') -GroupAccessType.owner = GroupAccessType('owner') - -GroupCreateArg._group_name_validator = bv.String() -GroupCreateArg._group_external_id_validator = bv.Nullable(team_common.GroupExternalId_validator) -GroupCreateArg._group_management_type_validator = bv.Nullable(team_common.GroupManagementType_validator) -GroupCreateArg._all_field_names_ = set([ - 'group_name', - 'group_external_id', - 'group_management_type', -]) -GroupCreateArg._all_fields_ = [ - ('group_name', GroupCreateArg._group_name_validator), - ('group_external_id', GroupCreateArg._group_external_id_validator), - ('group_management_type', GroupCreateArg._group_management_type_validator), -] - -GroupCreateError._group_name_already_used_validator = bv.Void() -GroupCreateError._group_name_invalid_validator = bv.Void() -GroupCreateError._external_id_already_in_use_validator = bv.Void() -GroupCreateError._system_managed_group_disallowed_validator = bv.Void() -GroupCreateError._other_validator = bv.Void() -GroupCreateError._tagmap = { - 'group_name_already_used': GroupCreateError._group_name_already_used_validator, - 'group_name_invalid': GroupCreateError._group_name_invalid_validator, - 'external_id_already_in_use': GroupCreateError._external_id_already_in_use_validator, - 'system_managed_group_disallowed': GroupCreateError._system_managed_group_disallowed_validator, - 'other': GroupCreateError._other_validator, -} - -GroupCreateError.group_name_already_used = GroupCreateError('group_name_already_used') -GroupCreateError.group_name_invalid = GroupCreateError('group_name_invalid') -GroupCreateError.external_id_already_in_use = GroupCreateError('external_id_already_in_use') -GroupCreateError.system_managed_group_disallowed = GroupCreateError('system_managed_group_disallowed') -GroupCreateError.other = GroupCreateError('other') - -GroupSelectorError._group_not_found_validator = bv.Void() -GroupSelectorError._other_validator = bv.Void() -GroupSelectorError._tagmap = { - 'group_not_found': GroupSelectorError._group_not_found_validator, - 'other': GroupSelectorError._other_validator, -} - -GroupSelectorError.group_not_found = GroupSelectorError('group_not_found') -GroupSelectorError.other = GroupSelectorError('other') - -GroupSelectorWithTeamGroupError._system_managed_group_disallowed_validator = bv.Void() -GroupSelectorWithTeamGroupError._tagmap = { - 'system_managed_group_disallowed': GroupSelectorWithTeamGroupError._system_managed_group_disallowed_validator, -} -GroupSelectorWithTeamGroupError._tagmap.update(GroupSelectorError._tagmap) - -GroupSelectorWithTeamGroupError.system_managed_group_disallowed = GroupSelectorWithTeamGroupError('system_managed_group_disallowed') - -GroupDeleteError._group_already_deleted_validator = bv.Void() -GroupDeleteError._tagmap = { - 'group_already_deleted': GroupDeleteError._group_already_deleted_validator, -} -GroupDeleteError._tagmap.update(GroupSelectorWithTeamGroupError._tagmap) - -GroupDeleteError.group_already_deleted = GroupDeleteError('group_already_deleted') - -GroupFullInfo._members_validator = bv.Nullable(bv.List(GroupMemberInfo_validator)) -GroupFullInfo._created_validator = bv.UInt64() -GroupFullInfo._all_field_names_ = team_common.GroupSummary._all_field_names_.union(set([ - 'members', - 'created', -])) -GroupFullInfo._all_fields_ = team_common.GroupSummary._all_fields_ + [ - ('members', GroupFullInfo._members_validator), - ('created', GroupFullInfo._created_validator), -] - -GroupMemberInfo._profile_validator = MemberProfile_validator -GroupMemberInfo._access_type_validator = GroupAccessType_validator -GroupMemberInfo._all_field_names_ = set([ - 'profile', - 'access_type', -]) -GroupMemberInfo._all_fields_ = [ - ('profile', GroupMemberInfo._profile_validator), - ('access_type', GroupMemberInfo._access_type_validator), -] - -GroupMemberSelector._group_validator = GroupSelector_validator -GroupMemberSelector._user_validator = UserSelectorArg_validator -GroupMemberSelector._all_field_names_ = set([ - 'group', - 'user', -]) -GroupMemberSelector._all_fields_ = [ - ('group', GroupMemberSelector._group_validator), - ('user', GroupMemberSelector._user_validator), -] - -GroupMemberSelectorError._member_not_in_group_validator = bv.Void() -GroupMemberSelectorError._tagmap = { - 'member_not_in_group': GroupMemberSelectorError._member_not_in_group_validator, -} -GroupMemberSelectorError._tagmap.update(GroupSelectorWithTeamGroupError._tagmap) - -GroupMemberSelectorError.member_not_in_group = GroupMemberSelectorError('member_not_in_group') - -GroupMemberSetAccessTypeError._user_cannot_be_manager_of_company_managed_group_validator = bv.Void() -GroupMemberSetAccessTypeError._tagmap = { - 'user_cannot_be_manager_of_company_managed_group': GroupMemberSetAccessTypeError._user_cannot_be_manager_of_company_managed_group_validator, -} -GroupMemberSetAccessTypeError._tagmap.update(GroupMemberSelectorError._tagmap) - -GroupMemberSetAccessTypeError.user_cannot_be_manager_of_company_managed_group = GroupMemberSetAccessTypeError('user_cannot_be_manager_of_company_managed_group') - -IncludeMembersArg._return_members_validator = bv.Boolean() -IncludeMembersArg._all_field_names_ = set(['return_members']) -IncludeMembersArg._all_fields_ = [('return_members', IncludeMembersArg._return_members_validator)] - -GroupMembersAddArg._group_validator = GroupSelector_validator -GroupMembersAddArg._members_validator = bv.List(MemberAccess_validator) -GroupMembersAddArg._all_field_names_ = IncludeMembersArg._all_field_names_.union(set([ - 'group', - 'members', -])) -GroupMembersAddArg._all_fields_ = IncludeMembersArg._all_fields_ + [ - ('group', GroupMembersAddArg._group_validator), - ('members', GroupMembersAddArg._members_validator), -] - -GroupMembersAddError._duplicate_user_validator = bv.Void() -GroupMembersAddError._group_not_in_team_validator = bv.Void() -GroupMembersAddError._members_not_in_team_validator = bv.List(bv.String()) -GroupMembersAddError._users_not_found_validator = bv.List(bv.String()) -GroupMembersAddError._user_must_be_active_to_be_owner_validator = bv.Void() -GroupMembersAddError._user_cannot_be_manager_of_company_managed_group_validator = bv.List(bv.String()) -GroupMembersAddError._tagmap = { - 'duplicate_user': GroupMembersAddError._duplicate_user_validator, - 'group_not_in_team': GroupMembersAddError._group_not_in_team_validator, - 'members_not_in_team': GroupMembersAddError._members_not_in_team_validator, - 'users_not_found': GroupMembersAddError._users_not_found_validator, - 'user_must_be_active_to_be_owner': GroupMembersAddError._user_must_be_active_to_be_owner_validator, - 'user_cannot_be_manager_of_company_managed_group': GroupMembersAddError._user_cannot_be_manager_of_company_managed_group_validator, -} -GroupMembersAddError._tagmap.update(GroupSelectorWithTeamGroupError._tagmap) - -GroupMembersAddError.duplicate_user = GroupMembersAddError('duplicate_user') -GroupMembersAddError.group_not_in_team = GroupMembersAddError('group_not_in_team') -GroupMembersAddError.user_must_be_active_to_be_owner = GroupMembersAddError('user_must_be_active_to_be_owner') - -GroupMembersChangeResult._group_info_validator = GroupFullInfo_validator -GroupMembersChangeResult._async_job_id_validator = async.AsyncJobId_validator -GroupMembersChangeResult._all_field_names_ = set([ - 'group_info', - 'async_job_id', -]) -GroupMembersChangeResult._all_fields_ = [ - ('group_info', GroupMembersChangeResult._group_info_validator), - ('async_job_id', GroupMembersChangeResult._async_job_id_validator), -] - -GroupMembersRemoveArg._group_validator = GroupSelector_validator -GroupMembersRemoveArg._users_validator = bv.List(UserSelectorArg_validator) -GroupMembersRemoveArg._all_field_names_ = IncludeMembersArg._all_field_names_.union(set([ - 'group', - 'users', -])) -GroupMembersRemoveArg._all_fields_ = IncludeMembersArg._all_fields_ + [ - ('group', GroupMembersRemoveArg._group_validator), - ('users', GroupMembersRemoveArg._users_validator), -] - -GroupMembersSelectorError._member_not_in_group_validator = bv.Void() -GroupMembersSelectorError._tagmap = { - 'member_not_in_group': GroupMembersSelectorError._member_not_in_group_validator, -} -GroupMembersSelectorError._tagmap.update(GroupSelectorWithTeamGroupError._tagmap) - -GroupMembersSelectorError.member_not_in_group = GroupMembersSelectorError('member_not_in_group') - -GroupMembersRemoveError._group_not_in_team_validator = bv.Void() -GroupMembersRemoveError._members_not_in_team_validator = bv.List(bv.String()) -GroupMembersRemoveError._users_not_found_validator = bv.List(bv.String()) -GroupMembersRemoveError._tagmap = { - 'group_not_in_team': GroupMembersRemoveError._group_not_in_team_validator, - 'members_not_in_team': GroupMembersRemoveError._members_not_in_team_validator, - 'users_not_found': GroupMembersRemoveError._users_not_found_validator, -} -GroupMembersRemoveError._tagmap.update(GroupMembersSelectorError._tagmap) - -GroupMembersRemoveError.group_not_in_team = GroupMembersRemoveError('group_not_in_team') - -GroupMembersSelector._group_validator = GroupSelector_validator -GroupMembersSelector._users_validator = UsersSelectorArg_validator -GroupMembersSelector._all_field_names_ = set([ - 'group', - 'users', -]) -GroupMembersSelector._all_fields_ = [ - ('group', GroupMembersSelector._group_validator), - ('users', GroupMembersSelector._users_validator), -] - -GroupMembersSetAccessTypeArg._access_type_validator = GroupAccessType_validator -GroupMembersSetAccessTypeArg._return_members_validator = bv.Boolean() -GroupMembersSetAccessTypeArg._all_field_names_ = GroupMemberSelector._all_field_names_.union(set([ - 'access_type', - 'return_members', -])) -GroupMembersSetAccessTypeArg._all_fields_ = GroupMemberSelector._all_fields_ + [ - ('access_type', GroupMembersSetAccessTypeArg._access_type_validator), - ('return_members', GroupMembersSetAccessTypeArg._return_members_validator), -] - -GroupSelector._group_id_validator = team_common.GroupId_validator -GroupSelector._group_external_id_validator = team_common.GroupExternalId_validator -GroupSelector._tagmap = { - 'group_id': GroupSelector._group_id_validator, - 'group_external_id': GroupSelector._group_external_id_validator, -} - -GroupUpdateArgs._group_validator = GroupSelector_validator -GroupUpdateArgs._new_group_name_validator = bv.Nullable(bv.String()) -GroupUpdateArgs._new_group_external_id_validator = bv.Nullable(team_common.GroupExternalId_validator) -GroupUpdateArgs._new_group_management_type_validator = bv.Nullable(team_common.GroupManagementType_validator) -GroupUpdateArgs._all_field_names_ = IncludeMembersArg._all_field_names_.union(set([ - 'group', - 'new_group_name', - 'new_group_external_id', - 'new_group_management_type', -])) -GroupUpdateArgs._all_fields_ = IncludeMembersArg._all_fields_ + [ - ('group', GroupUpdateArgs._group_validator), - ('new_group_name', GroupUpdateArgs._new_group_name_validator), - ('new_group_external_id', GroupUpdateArgs._new_group_external_id_validator), - ('new_group_management_type', GroupUpdateArgs._new_group_management_type_validator), -] - -GroupUpdateError._group_name_already_used_validator = bv.Void() -GroupUpdateError._group_name_invalid_validator = bv.Void() -GroupUpdateError._external_id_already_in_use_validator = bv.Void() -GroupUpdateError._tagmap = { - 'group_name_already_used': GroupUpdateError._group_name_already_used_validator, - 'group_name_invalid': GroupUpdateError._group_name_invalid_validator, - 'external_id_already_in_use': GroupUpdateError._external_id_already_in_use_validator, -} -GroupUpdateError._tagmap.update(GroupSelectorWithTeamGroupError._tagmap) - -GroupUpdateError.group_name_already_used = GroupUpdateError('group_name_already_used') -GroupUpdateError.group_name_invalid = GroupUpdateError('group_name_invalid') -GroupUpdateError.external_id_already_in_use = GroupUpdateError('external_id_already_in_use') - -GroupsGetInfoError._group_not_on_team_validator = bv.Void() -GroupsGetInfoError._other_validator = bv.Void() -GroupsGetInfoError._tagmap = { - 'group_not_on_team': GroupsGetInfoError._group_not_on_team_validator, - 'other': GroupsGetInfoError._other_validator, -} - -GroupsGetInfoError.group_not_on_team = GroupsGetInfoError('group_not_on_team') -GroupsGetInfoError.other = GroupsGetInfoError('other') - -GroupsGetInfoItem._id_not_found_validator = bv.String() -GroupsGetInfoItem._group_info_validator = GroupFullInfo_validator -GroupsGetInfoItem._tagmap = { - 'id_not_found': GroupsGetInfoItem._id_not_found_validator, - 'group_info': GroupsGetInfoItem._group_info_validator, -} - -GroupsListArg._limit_validator = bv.UInt32(min_value=1, max_value=1000) -GroupsListArg._all_field_names_ = set(['limit']) -GroupsListArg._all_fields_ = [('limit', GroupsListArg._limit_validator)] - -GroupsListContinueArg._cursor_validator = bv.String() -GroupsListContinueArg._all_field_names_ = set(['cursor']) -GroupsListContinueArg._all_fields_ = [('cursor', GroupsListContinueArg._cursor_validator)] - -GroupsListContinueError._invalid_cursor_validator = bv.Void() -GroupsListContinueError._other_validator = bv.Void() -GroupsListContinueError._tagmap = { - 'invalid_cursor': GroupsListContinueError._invalid_cursor_validator, - 'other': GroupsListContinueError._other_validator, -} - -GroupsListContinueError.invalid_cursor = GroupsListContinueError('invalid_cursor') -GroupsListContinueError.other = GroupsListContinueError('other') - -GroupsListResult._groups_validator = bv.List(team_common.GroupSummary_validator) -GroupsListResult._cursor_validator = bv.String() -GroupsListResult._has_more_validator = bv.Boolean() -GroupsListResult._all_field_names_ = set([ - 'groups', - 'cursor', - 'has_more', -]) -GroupsListResult._all_fields_ = [ - ('groups', GroupsListResult._groups_validator), - ('cursor', GroupsListResult._cursor_validator), - ('has_more', GroupsListResult._has_more_validator), -] - -GroupsMembersListArg._group_validator = GroupSelector_validator -GroupsMembersListArg._limit_validator = bv.UInt32(min_value=1, max_value=1000) -GroupsMembersListArg._all_field_names_ = set([ - 'group', - 'limit', -]) -GroupsMembersListArg._all_fields_ = [ - ('group', GroupsMembersListArg._group_validator), - ('limit', GroupsMembersListArg._limit_validator), -] - -GroupsMembersListContinueArg._cursor_validator = bv.String() -GroupsMembersListContinueArg._all_field_names_ = set(['cursor']) -GroupsMembersListContinueArg._all_fields_ = [('cursor', GroupsMembersListContinueArg._cursor_validator)] - -GroupsMembersListContinueError._invalid_cursor_validator = bv.Void() -GroupsMembersListContinueError._other_validator = bv.Void() -GroupsMembersListContinueError._tagmap = { - 'invalid_cursor': GroupsMembersListContinueError._invalid_cursor_validator, - 'other': GroupsMembersListContinueError._other_validator, -} - -GroupsMembersListContinueError.invalid_cursor = GroupsMembersListContinueError('invalid_cursor') -GroupsMembersListContinueError.other = GroupsMembersListContinueError('other') - -GroupsMembersListResult._members_validator = bv.List(GroupMemberInfo_validator) -GroupsMembersListResult._cursor_validator = bv.String() -GroupsMembersListResult._has_more_validator = bv.Boolean() -GroupsMembersListResult._all_field_names_ = set([ - 'members', - 'cursor', - 'has_more', -]) -GroupsMembersListResult._all_fields_ = [ - ('members', GroupsMembersListResult._members_validator), - ('cursor', GroupsMembersListResult._cursor_validator), - ('has_more', GroupsMembersListResult._has_more_validator), -] - -GroupsPollError._access_denied_validator = bv.Void() -GroupsPollError._tagmap = { - 'access_denied': GroupsPollError._access_denied_validator, -} -GroupsPollError._tagmap.update(async.PollError._tagmap) - -GroupsPollError.access_denied = GroupsPollError('access_denied') - -GroupsSelector._group_ids_validator = bv.List(team_common.GroupId_validator) -GroupsSelector._group_external_ids_validator = bv.List(bv.String()) -GroupsSelector._tagmap = { - 'group_ids': GroupsSelector._group_ids_validator, - 'group_external_ids': GroupsSelector._group_external_ids_validator, -} - -HasTeamSharedDropboxValue._has_team_shared_dropbox_validator = bv.Boolean() -HasTeamSharedDropboxValue._other_validator = bv.Void() -HasTeamSharedDropboxValue._tagmap = { - 'has_team_shared_dropbox': HasTeamSharedDropboxValue._has_team_shared_dropbox_validator, - 'other': HasTeamSharedDropboxValue._other_validator, -} - -HasTeamSharedDropboxValue.other = HasTeamSharedDropboxValue('other') - -ListMemberAppsArg._team_member_id_validator = bv.String() -ListMemberAppsArg._all_field_names_ = set(['team_member_id']) -ListMemberAppsArg._all_fields_ = [('team_member_id', ListMemberAppsArg._team_member_id_validator)] - -ListMemberAppsError._member_not_found_validator = bv.Void() -ListMemberAppsError._other_validator = bv.Void() -ListMemberAppsError._tagmap = { - 'member_not_found': ListMemberAppsError._member_not_found_validator, - 'other': ListMemberAppsError._other_validator, -} - -ListMemberAppsError.member_not_found = ListMemberAppsError('member_not_found') -ListMemberAppsError.other = ListMemberAppsError('other') - -ListMemberAppsResult._linked_api_apps_validator = bv.List(ApiApp_validator) -ListMemberAppsResult._all_field_names_ = set(['linked_api_apps']) -ListMemberAppsResult._all_fields_ = [('linked_api_apps', ListMemberAppsResult._linked_api_apps_validator)] - -ListMemberDevicesArg._team_member_id_validator = bv.String() -ListMemberDevicesArg._include_web_sessions_validator = bv.Boolean() -ListMemberDevicesArg._include_desktop_clients_validator = bv.Boolean() -ListMemberDevicesArg._include_mobile_clients_validator = bv.Boolean() -ListMemberDevicesArg._all_field_names_ = set([ - 'team_member_id', - 'include_web_sessions', - 'include_desktop_clients', - 'include_mobile_clients', -]) -ListMemberDevicesArg._all_fields_ = [ - ('team_member_id', ListMemberDevicesArg._team_member_id_validator), - ('include_web_sessions', ListMemberDevicesArg._include_web_sessions_validator), - ('include_desktop_clients', ListMemberDevicesArg._include_desktop_clients_validator), - ('include_mobile_clients', ListMemberDevicesArg._include_mobile_clients_validator), -] - -ListMemberDevicesError._member_not_found_validator = bv.Void() -ListMemberDevicesError._other_validator = bv.Void() -ListMemberDevicesError._tagmap = { - 'member_not_found': ListMemberDevicesError._member_not_found_validator, - 'other': ListMemberDevicesError._other_validator, -} - -ListMemberDevicesError.member_not_found = ListMemberDevicesError('member_not_found') -ListMemberDevicesError.other = ListMemberDevicesError('other') - -ListMemberDevicesResult._active_web_sessions_validator = bv.Nullable(bv.List(ActiveWebSession_validator)) -ListMemberDevicesResult._desktop_client_sessions_validator = bv.Nullable(bv.List(DesktopClientSession_validator)) -ListMemberDevicesResult._mobile_client_sessions_validator = bv.Nullable(bv.List(MobileClientSession_validator)) -ListMemberDevicesResult._all_field_names_ = set([ - 'active_web_sessions', - 'desktop_client_sessions', - 'mobile_client_sessions', -]) -ListMemberDevicesResult._all_fields_ = [ - ('active_web_sessions', ListMemberDevicesResult._active_web_sessions_validator), - ('desktop_client_sessions', ListMemberDevicesResult._desktop_client_sessions_validator), - ('mobile_client_sessions', ListMemberDevicesResult._mobile_client_sessions_validator), -] - -ListMembersAppsArg._cursor_validator = bv.Nullable(bv.String()) -ListMembersAppsArg._all_field_names_ = set(['cursor']) -ListMembersAppsArg._all_fields_ = [('cursor', ListMembersAppsArg._cursor_validator)] - -ListMembersAppsError._reset_validator = bv.Void() -ListMembersAppsError._other_validator = bv.Void() -ListMembersAppsError._tagmap = { - 'reset': ListMembersAppsError._reset_validator, - 'other': ListMembersAppsError._other_validator, -} - -ListMembersAppsError.reset = ListMembersAppsError('reset') -ListMembersAppsError.other = ListMembersAppsError('other') - -ListMembersAppsResult._apps_validator = bv.List(MemberLinkedApps_validator) -ListMembersAppsResult._has_more_validator = bv.Boolean() -ListMembersAppsResult._cursor_validator = bv.Nullable(bv.String()) -ListMembersAppsResult._all_field_names_ = set([ - 'apps', - 'has_more', - 'cursor', -]) -ListMembersAppsResult._all_fields_ = [ - ('apps', ListMembersAppsResult._apps_validator), - ('has_more', ListMembersAppsResult._has_more_validator), - ('cursor', ListMembersAppsResult._cursor_validator), -] - -ListMembersDevicesArg._cursor_validator = bv.Nullable(bv.String()) -ListMembersDevicesArg._include_web_sessions_validator = bv.Boolean() -ListMembersDevicesArg._include_desktop_clients_validator = bv.Boolean() -ListMembersDevicesArg._include_mobile_clients_validator = bv.Boolean() -ListMembersDevicesArg._all_field_names_ = set([ - 'cursor', - 'include_web_sessions', - 'include_desktop_clients', - 'include_mobile_clients', -]) -ListMembersDevicesArg._all_fields_ = [ - ('cursor', ListMembersDevicesArg._cursor_validator), - ('include_web_sessions', ListMembersDevicesArg._include_web_sessions_validator), - ('include_desktop_clients', ListMembersDevicesArg._include_desktop_clients_validator), - ('include_mobile_clients', ListMembersDevicesArg._include_mobile_clients_validator), -] - -ListMembersDevicesError._reset_validator = bv.Void() -ListMembersDevicesError._other_validator = bv.Void() -ListMembersDevicesError._tagmap = { - 'reset': ListMembersDevicesError._reset_validator, - 'other': ListMembersDevicesError._other_validator, -} - -ListMembersDevicesError.reset = ListMembersDevicesError('reset') -ListMembersDevicesError.other = ListMembersDevicesError('other') - -ListMembersDevicesResult._devices_validator = bv.List(MemberDevices_validator) -ListMembersDevicesResult._has_more_validator = bv.Boolean() -ListMembersDevicesResult._cursor_validator = bv.Nullable(bv.String()) -ListMembersDevicesResult._all_field_names_ = set([ - 'devices', - 'has_more', - 'cursor', -]) -ListMembersDevicesResult._all_fields_ = [ - ('devices', ListMembersDevicesResult._devices_validator), - ('has_more', ListMembersDevicesResult._has_more_validator), - ('cursor', ListMembersDevicesResult._cursor_validator), -] - -ListTeamAppsArg._cursor_validator = bv.Nullable(bv.String()) -ListTeamAppsArg._all_field_names_ = set(['cursor']) -ListTeamAppsArg._all_fields_ = [('cursor', ListTeamAppsArg._cursor_validator)] - -ListTeamAppsError._reset_validator = bv.Void() -ListTeamAppsError._other_validator = bv.Void() -ListTeamAppsError._tagmap = { - 'reset': ListTeamAppsError._reset_validator, - 'other': ListTeamAppsError._other_validator, -} - -ListTeamAppsError.reset = ListTeamAppsError('reset') -ListTeamAppsError.other = ListTeamAppsError('other') - -ListTeamAppsResult._apps_validator = bv.List(MemberLinkedApps_validator) -ListTeamAppsResult._has_more_validator = bv.Boolean() -ListTeamAppsResult._cursor_validator = bv.Nullable(bv.String()) -ListTeamAppsResult._all_field_names_ = set([ - 'apps', - 'has_more', - 'cursor', -]) -ListTeamAppsResult._all_fields_ = [ - ('apps', ListTeamAppsResult._apps_validator), - ('has_more', ListTeamAppsResult._has_more_validator), - ('cursor', ListTeamAppsResult._cursor_validator), -] - -ListTeamDevicesArg._cursor_validator = bv.Nullable(bv.String()) -ListTeamDevicesArg._include_web_sessions_validator = bv.Boolean() -ListTeamDevicesArg._include_desktop_clients_validator = bv.Boolean() -ListTeamDevicesArg._include_mobile_clients_validator = bv.Boolean() -ListTeamDevicesArg._all_field_names_ = set([ - 'cursor', - 'include_web_sessions', - 'include_desktop_clients', - 'include_mobile_clients', -]) -ListTeamDevicesArg._all_fields_ = [ - ('cursor', ListTeamDevicesArg._cursor_validator), - ('include_web_sessions', ListTeamDevicesArg._include_web_sessions_validator), - ('include_desktop_clients', ListTeamDevicesArg._include_desktop_clients_validator), - ('include_mobile_clients', ListTeamDevicesArg._include_mobile_clients_validator), -] - -ListTeamDevicesError._reset_validator = bv.Void() -ListTeamDevicesError._other_validator = bv.Void() -ListTeamDevicesError._tagmap = { - 'reset': ListTeamDevicesError._reset_validator, - 'other': ListTeamDevicesError._other_validator, -} - -ListTeamDevicesError.reset = ListTeamDevicesError('reset') -ListTeamDevicesError.other = ListTeamDevicesError('other') - -ListTeamDevicesResult._devices_validator = bv.List(MemberDevices_validator) -ListTeamDevicesResult._has_more_validator = bv.Boolean() -ListTeamDevicesResult._cursor_validator = bv.Nullable(bv.String()) -ListTeamDevicesResult._all_field_names_ = set([ - 'devices', - 'has_more', - 'cursor', -]) -ListTeamDevicesResult._all_fields_ = [ - ('devices', ListTeamDevicesResult._devices_validator), - ('has_more', ListTeamDevicesResult._has_more_validator), - ('cursor', ListTeamDevicesResult._cursor_validator), -] - -MemberAccess._user_validator = UserSelectorArg_validator -MemberAccess._access_type_validator = GroupAccessType_validator -MemberAccess._all_field_names_ = set([ - 'user', - 'access_type', -]) -MemberAccess._all_fields_ = [ - ('user', MemberAccess._user_validator), - ('access_type', MemberAccess._access_type_validator), -] - -MemberAddArg._member_email_validator = common.EmailAddress_validator -MemberAddArg._member_given_name_validator = bv.Nullable(common.OptionalNamePart_validator) -MemberAddArg._member_surname_validator = bv.Nullable(common.OptionalNamePart_validator) -MemberAddArg._member_external_id_validator = bv.Nullable(team_common.MemberExternalId_validator) -MemberAddArg._member_persistent_id_validator = bv.Nullable(bv.String()) -MemberAddArg._send_welcome_email_validator = bv.Boolean() -MemberAddArg._role_validator = AdminTier_validator -MemberAddArg._all_field_names_ = set([ - 'member_email', - 'member_given_name', - 'member_surname', - 'member_external_id', - 'member_persistent_id', - 'send_welcome_email', - 'role', -]) -MemberAddArg._all_fields_ = [ - ('member_email', MemberAddArg._member_email_validator), - ('member_given_name', MemberAddArg._member_given_name_validator), - ('member_surname', MemberAddArg._member_surname_validator), - ('member_external_id', MemberAddArg._member_external_id_validator), - ('member_persistent_id', MemberAddArg._member_persistent_id_validator), - ('send_welcome_email', MemberAddArg._send_welcome_email_validator), - ('role', MemberAddArg._role_validator), -] - -MemberAddResult._success_validator = TeamMemberInfo_validator -MemberAddResult._team_license_limit_validator = common.EmailAddress_validator -MemberAddResult._free_team_member_limit_reached_validator = common.EmailAddress_validator -MemberAddResult._user_already_on_team_validator = common.EmailAddress_validator -MemberAddResult._user_on_another_team_validator = common.EmailAddress_validator -MemberAddResult._user_already_paired_validator = common.EmailAddress_validator -MemberAddResult._user_migration_failed_validator = common.EmailAddress_validator -MemberAddResult._duplicate_external_member_id_validator = common.EmailAddress_validator -MemberAddResult._duplicate_member_persistent_id_validator = common.EmailAddress_validator -MemberAddResult._persistent_id_disabled_validator = common.EmailAddress_validator -MemberAddResult._user_creation_failed_validator = common.EmailAddress_validator -MemberAddResult._tagmap = { - 'success': MemberAddResult._success_validator, - 'team_license_limit': MemberAddResult._team_license_limit_validator, - 'free_team_member_limit_reached': MemberAddResult._free_team_member_limit_reached_validator, - 'user_already_on_team': MemberAddResult._user_already_on_team_validator, - 'user_on_another_team': MemberAddResult._user_on_another_team_validator, - 'user_already_paired': MemberAddResult._user_already_paired_validator, - 'user_migration_failed': MemberAddResult._user_migration_failed_validator, - 'duplicate_external_member_id': MemberAddResult._duplicate_external_member_id_validator, - 'duplicate_member_persistent_id': MemberAddResult._duplicate_member_persistent_id_validator, - 'persistent_id_disabled': MemberAddResult._persistent_id_disabled_validator, - 'user_creation_failed': MemberAddResult._user_creation_failed_validator, -} - -MemberDevices._team_member_id_validator = bv.String() -MemberDevices._web_sessions_validator = bv.Nullable(bv.List(ActiveWebSession_validator)) -MemberDevices._desktop_clients_validator = bv.Nullable(bv.List(DesktopClientSession_validator)) -MemberDevices._mobile_clients_validator = bv.Nullable(bv.List(MobileClientSession_validator)) -MemberDevices._all_field_names_ = set([ - 'team_member_id', - 'web_sessions', - 'desktop_clients', - 'mobile_clients', -]) -MemberDevices._all_fields_ = [ - ('team_member_id', MemberDevices._team_member_id_validator), - ('web_sessions', MemberDevices._web_sessions_validator), - ('desktop_clients', MemberDevices._desktop_clients_validator), - ('mobile_clients', MemberDevices._mobile_clients_validator), -] - -MemberLinkedApps._team_member_id_validator = bv.String() -MemberLinkedApps._linked_api_apps_validator = bv.List(ApiApp_validator) -MemberLinkedApps._all_field_names_ = set([ - 'team_member_id', - 'linked_api_apps', -]) -MemberLinkedApps._all_fields_ = [ - ('team_member_id', MemberLinkedApps._team_member_id_validator), - ('linked_api_apps', MemberLinkedApps._linked_api_apps_validator), -] - -MemberProfile._team_member_id_validator = team_common.TeamMemberId_validator -MemberProfile._external_id_validator = bv.Nullable(bv.String()) -MemberProfile._account_id_validator = bv.Nullable(users_common.AccountId_validator) -MemberProfile._email_validator = bv.String() -MemberProfile._email_verified_validator = bv.Boolean() -MemberProfile._status_validator = TeamMemberStatus_validator -MemberProfile._name_validator = users.Name_validator -MemberProfile._membership_type_validator = TeamMembershipType_validator -MemberProfile._joined_on_validator = bv.Nullable(common.DropboxTimestamp_validator) -MemberProfile._persistent_id_validator = bv.Nullable(bv.String()) -MemberProfile._all_field_names_ = set([ - 'team_member_id', - 'external_id', - 'account_id', - 'email', - 'email_verified', - 'status', - 'name', - 'membership_type', - 'joined_on', - 'persistent_id', -]) -MemberProfile._all_fields_ = [ - ('team_member_id', MemberProfile._team_member_id_validator), - ('external_id', MemberProfile._external_id_validator), - ('account_id', MemberProfile._account_id_validator), - ('email', MemberProfile._email_validator), - ('email_verified', MemberProfile._email_verified_validator), - ('status', MemberProfile._status_validator), - ('name', MemberProfile._name_validator), - ('membership_type', MemberProfile._membership_type_validator), - ('joined_on', MemberProfile._joined_on_validator), - ('persistent_id', MemberProfile._persistent_id_validator), -] - -UserSelectorError._user_not_found_validator = bv.Void() -UserSelectorError._tagmap = { - 'user_not_found': UserSelectorError._user_not_found_validator, -} - -UserSelectorError.user_not_found = UserSelectorError('user_not_found') - -MemberSelectorError._user_not_in_team_validator = bv.Void() -MemberSelectorError._tagmap = { - 'user_not_in_team': MemberSelectorError._user_not_in_team_validator, -} -MemberSelectorError._tagmap.update(UserSelectorError._tagmap) - -MemberSelectorError.user_not_in_team = MemberSelectorError('user_not_in_team') - -MembersAddArg._new_members_validator = bv.List(MemberAddArg_validator) -MembersAddArg._force_async_validator = bv.Boolean() -MembersAddArg._all_field_names_ = set([ - 'new_members', - 'force_async', -]) -MembersAddArg._all_fields_ = [ - ('new_members', MembersAddArg._new_members_validator), - ('force_async', MembersAddArg._force_async_validator), -] - -MembersAddJobStatus._complete_validator = bv.List(MemberAddResult_validator) -MembersAddJobStatus._failed_validator = bv.String() -MembersAddJobStatus._tagmap = { - 'complete': MembersAddJobStatus._complete_validator, - 'failed': MembersAddJobStatus._failed_validator, -} -MembersAddJobStatus._tagmap.update(async.PollResultBase._tagmap) - -MembersAddLaunch._complete_validator = bv.List(MemberAddResult_validator) -MembersAddLaunch._tagmap = { - 'complete': MembersAddLaunch._complete_validator, -} -MembersAddLaunch._tagmap.update(async.LaunchResultBase._tagmap) - -MembersDeactivateArg._user_validator = UserSelectorArg_validator -MembersDeactivateArg._wipe_data_validator = bv.Boolean() -MembersDeactivateArg._all_field_names_ = set([ - 'user', - 'wipe_data', -]) -MembersDeactivateArg._all_fields_ = [ - ('user', MembersDeactivateArg._user_validator), - ('wipe_data', MembersDeactivateArg._wipe_data_validator), -] - -MembersDeactivateError._user_not_in_team_validator = bv.Void() -MembersDeactivateError._other_validator = bv.Void() -MembersDeactivateError._tagmap = { - 'user_not_in_team': MembersDeactivateError._user_not_in_team_validator, - 'other': MembersDeactivateError._other_validator, -} -MembersDeactivateError._tagmap.update(UserSelectorError._tagmap) - -MembersDeactivateError.user_not_in_team = MembersDeactivateError('user_not_in_team') -MembersDeactivateError.other = MembersDeactivateError('other') - -MembersGetInfoArgs._members_validator = bv.List(UserSelectorArg_validator) -MembersGetInfoArgs._all_field_names_ = set(['members']) -MembersGetInfoArgs._all_fields_ = [('members', MembersGetInfoArgs._members_validator)] - -MembersGetInfoError._other_validator = bv.Void() -MembersGetInfoError._tagmap = { - 'other': MembersGetInfoError._other_validator, -} - -MembersGetInfoError.other = MembersGetInfoError('other') - -MembersGetInfoItem._id_not_found_validator = bv.String() -MembersGetInfoItem._member_info_validator = TeamMemberInfo_validator -MembersGetInfoItem._tagmap = { - 'id_not_found': MembersGetInfoItem._id_not_found_validator, - 'member_info': MembersGetInfoItem._member_info_validator, -} - -MembersListArg._limit_validator = bv.UInt32(min_value=1, max_value=1000) -MembersListArg._include_removed_validator = bv.Boolean() -MembersListArg._all_field_names_ = set([ - 'limit', - 'include_removed', -]) -MembersListArg._all_fields_ = [ - ('limit', MembersListArg._limit_validator), - ('include_removed', MembersListArg._include_removed_validator), -] - -MembersListContinueArg._cursor_validator = bv.String() -MembersListContinueArg._all_field_names_ = set(['cursor']) -MembersListContinueArg._all_fields_ = [('cursor', MembersListContinueArg._cursor_validator)] - -MembersListContinueError._invalid_cursor_validator = bv.Void() -MembersListContinueError._other_validator = bv.Void() -MembersListContinueError._tagmap = { - 'invalid_cursor': MembersListContinueError._invalid_cursor_validator, - 'other': MembersListContinueError._other_validator, -} - -MembersListContinueError.invalid_cursor = MembersListContinueError('invalid_cursor') -MembersListContinueError.other = MembersListContinueError('other') - -MembersListError._other_validator = bv.Void() -MembersListError._tagmap = { - 'other': MembersListError._other_validator, -} - -MembersListError.other = MembersListError('other') - -MembersListResult._members_validator = bv.List(TeamMemberInfo_validator) -MembersListResult._cursor_validator = bv.String() -MembersListResult._has_more_validator = bv.Boolean() -MembersListResult._all_field_names_ = set([ - 'members', - 'cursor', - 'has_more', -]) -MembersListResult._all_fields_ = [ - ('members', MembersListResult._members_validator), - ('cursor', MembersListResult._cursor_validator), - ('has_more', MembersListResult._has_more_validator), -] - -MembersRecoverArg._user_validator = UserSelectorArg_validator -MembersRecoverArg._all_field_names_ = set(['user']) -MembersRecoverArg._all_fields_ = [('user', MembersRecoverArg._user_validator)] - -MembersRecoverError._user_unrecoverable_validator = bv.Void() -MembersRecoverError._user_not_in_team_validator = bv.Void() -MembersRecoverError._team_license_limit_validator = bv.Void() -MembersRecoverError._other_validator = bv.Void() -MembersRecoverError._tagmap = { - 'user_unrecoverable': MembersRecoverError._user_unrecoverable_validator, - 'user_not_in_team': MembersRecoverError._user_not_in_team_validator, - 'team_license_limit': MembersRecoverError._team_license_limit_validator, - 'other': MembersRecoverError._other_validator, -} -MembersRecoverError._tagmap.update(UserSelectorError._tagmap) - -MembersRecoverError.user_unrecoverable = MembersRecoverError('user_unrecoverable') -MembersRecoverError.user_not_in_team = MembersRecoverError('user_not_in_team') -MembersRecoverError.team_license_limit = MembersRecoverError('team_license_limit') -MembersRecoverError.other = MembersRecoverError('other') - -MembersRemoveArg._transfer_dest_id_validator = bv.Nullable(UserSelectorArg_validator) -MembersRemoveArg._transfer_admin_id_validator = bv.Nullable(UserSelectorArg_validator) -MembersRemoveArg._keep_account_validator = bv.Boolean() -MembersRemoveArg._all_field_names_ = MembersDeactivateArg._all_field_names_.union(set([ - 'transfer_dest_id', - 'transfer_admin_id', - 'keep_account', -])) -MembersRemoveArg._all_fields_ = MembersDeactivateArg._all_fields_ + [ - ('transfer_dest_id', MembersRemoveArg._transfer_dest_id_validator), - ('transfer_admin_id', MembersRemoveArg._transfer_admin_id_validator), - ('keep_account', MembersRemoveArg._keep_account_validator), -] - -MembersRemoveError._remove_last_admin_validator = bv.Void() -MembersRemoveError._removed_and_transfer_dest_should_differ_validator = bv.Void() -MembersRemoveError._removed_and_transfer_admin_should_differ_validator = bv.Void() -MembersRemoveError._transfer_dest_user_not_found_validator = bv.Void() -MembersRemoveError._transfer_dest_user_not_in_team_validator = bv.Void() -MembersRemoveError._transfer_admin_user_not_found_validator = bv.Void() -MembersRemoveError._transfer_admin_user_not_in_team_validator = bv.Void() -MembersRemoveError._unspecified_transfer_admin_id_validator = bv.Void() -MembersRemoveError._transfer_admin_is_not_admin_validator = bv.Void() -MembersRemoveError._cannot_keep_account_and_transfer_validator = bv.Void() -MembersRemoveError._cannot_keep_account_and_delete_data_validator = bv.Void() -MembersRemoveError._email_address_too_long_to_be_disabled_validator = bv.Void() -MembersRemoveError._tagmap = { - 'remove_last_admin': MembersRemoveError._remove_last_admin_validator, - 'removed_and_transfer_dest_should_differ': MembersRemoveError._removed_and_transfer_dest_should_differ_validator, - 'removed_and_transfer_admin_should_differ': MembersRemoveError._removed_and_transfer_admin_should_differ_validator, - 'transfer_dest_user_not_found': MembersRemoveError._transfer_dest_user_not_found_validator, - 'transfer_dest_user_not_in_team': MembersRemoveError._transfer_dest_user_not_in_team_validator, - 'transfer_admin_user_not_found': MembersRemoveError._transfer_admin_user_not_found_validator, - 'transfer_admin_user_not_in_team': MembersRemoveError._transfer_admin_user_not_in_team_validator, - 'unspecified_transfer_admin_id': MembersRemoveError._unspecified_transfer_admin_id_validator, - 'transfer_admin_is_not_admin': MembersRemoveError._transfer_admin_is_not_admin_validator, - 'cannot_keep_account_and_transfer': MembersRemoveError._cannot_keep_account_and_transfer_validator, - 'cannot_keep_account_and_delete_data': MembersRemoveError._cannot_keep_account_and_delete_data_validator, - 'email_address_too_long_to_be_disabled': MembersRemoveError._email_address_too_long_to_be_disabled_validator, -} -MembersRemoveError._tagmap.update(MembersDeactivateError._tagmap) - -MembersRemoveError.remove_last_admin = MembersRemoveError('remove_last_admin') -MembersRemoveError.removed_and_transfer_dest_should_differ = MembersRemoveError('removed_and_transfer_dest_should_differ') -MembersRemoveError.removed_and_transfer_admin_should_differ = MembersRemoveError('removed_and_transfer_admin_should_differ') -MembersRemoveError.transfer_dest_user_not_found = MembersRemoveError('transfer_dest_user_not_found') -MembersRemoveError.transfer_dest_user_not_in_team = MembersRemoveError('transfer_dest_user_not_in_team') -MembersRemoveError.transfer_admin_user_not_found = MembersRemoveError('transfer_admin_user_not_found') -MembersRemoveError.transfer_admin_user_not_in_team = MembersRemoveError('transfer_admin_user_not_in_team') -MembersRemoveError.unspecified_transfer_admin_id = MembersRemoveError('unspecified_transfer_admin_id') -MembersRemoveError.transfer_admin_is_not_admin = MembersRemoveError('transfer_admin_is_not_admin') -MembersRemoveError.cannot_keep_account_and_transfer = MembersRemoveError('cannot_keep_account_and_transfer') -MembersRemoveError.cannot_keep_account_and_delete_data = MembersRemoveError('cannot_keep_account_and_delete_data') -MembersRemoveError.email_address_too_long_to_be_disabled = MembersRemoveError('email_address_too_long_to_be_disabled') - -MembersSendWelcomeError._other_validator = bv.Void() -MembersSendWelcomeError._tagmap = { - 'other': MembersSendWelcomeError._other_validator, -} -MembersSendWelcomeError._tagmap.update(MemberSelectorError._tagmap) - -MembersSendWelcomeError.other = MembersSendWelcomeError('other') - -MembersSetPermissionsArg._user_validator = UserSelectorArg_validator -MembersSetPermissionsArg._new_role_validator = AdminTier_validator -MembersSetPermissionsArg._all_field_names_ = set([ - 'user', - 'new_role', -]) -MembersSetPermissionsArg._all_fields_ = [ - ('user', MembersSetPermissionsArg._user_validator), - ('new_role', MembersSetPermissionsArg._new_role_validator), -] - -MembersSetPermissionsError._last_admin_validator = bv.Void() -MembersSetPermissionsError._user_not_in_team_validator = bv.Void() -MembersSetPermissionsError._cannot_set_permissions_validator = bv.Void() -MembersSetPermissionsError._team_license_limit_validator = bv.Void() -MembersSetPermissionsError._other_validator = bv.Void() -MembersSetPermissionsError._tagmap = { - 'last_admin': MembersSetPermissionsError._last_admin_validator, - 'user_not_in_team': MembersSetPermissionsError._user_not_in_team_validator, - 'cannot_set_permissions': MembersSetPermissionsError._cannot_set_permissions_validator, - 'team_license_limit': MembersSetPermissionsError._team_license_limit_validator, - 'other': MembersSetPermissionsError._other_validator, -} -MembersSetPermissionsError._tagmap.update(UserSelectorError._tagmap) - -MembersSetPermissionsError.last_admin = MembersSetPermissionsError('last_admin') -MembersSetPermissionsError.user_not_in_team = MembersSetPermissionsError('user_not_in_team') -MembersSetPermissionsError.cannot_set_permissions = MembersSetPermissionsError('cannot_set_permissions') -MembersSetPermissionsError.team_license_limit = MembersSetPermissionsError('team_license_limit') -MembersSetPermissionsError.other = MembersSetPermissionsError('other') - -MembersSetPermissionsResult._team_member_id_validator = team_common.TeamMemberId_validator -MembersSetPermissionsResult._role_validator = AdminTier_validator -MembersSetPermissionsResult._all_field_names_ = set([ - 'team_member_id', - 'role', -]) -MembersSetPermissionsResult._all_fields_ = [ - ('team_member_id', MembersSetPermissionsResult._team_member_id_validator), - ('role', MembersSetPermissionsResult._role_validator), -] - -MembersSetProfileArg._user_validator = UserSelectorArg_validator -MembersSetProfileArg._new_email_validator = bv.Nullable(common.EmailAddress_validator) -MembersSetProfileArg._new_external_id_validator = bv.Nullable(team_common.MemberExternalId_validator) -MembersSetProfileArg._new_given_name_validator = bv.Nullable(common.OptionalNamePart_validator) -MembersSetProfileArg._new_surname_validator = bv.Nullable(common.OptionalNamePart_validator) -MembersSetProfileArg._new_persistent_id_validator = bv.Nullable(bv.String()) -MembersSetProfileArg._all_field_names_ = set([ - 'user', - 'new_email', - 'new_external_id', - 'new_given_name', - 'new_surname', - 'new_persistent_id', -]) -MembersSetProfileArg._all_fields_ = [ - ('user', MembersSetProfileArg._user_validator), - ('new_email', MembersSetProfileArg._new_email_validator), - ('new_external_id', MembersSetProfileArg._new_external_id_validator), - ('new_given_name', MembersSetProfileArg._new_given_name_validator), - ('new_surname', MembersSetProfileArg._new_surname_validator), - ('new_persistent_id', MembersSetProfileArg._new_persistent_id_validator), -] - -MembersSetProfileError._external_id_and_new_external_id_unsafe_validator = bv.Void() -MembersSetProfileError._no_new_data_specified_validator = bv.Void() -MembersSetProfileError._email_reserved_for_other_user_validator = bv.Void() -MembersSetProfileError._external_id_used_by_other_user_validator = bv.Void() -MembersSetProfileError._set_profile_disallowed_validator = bv.Void() -MembersSetProfileError._param_cannot_be_empty_validator = bv.Void() -MembersSetProfileError._persistent_id_disabled_validator = bv.Void() -MembersSetProfileError._persistent_id_used_by_other_user_validator = bv.Void() -MembersSetProfileError._other_validator = bv.Void() -MembersSetProfileError._tagmap = { - 'external_id_and_new_external_id_unsafe': MembersSetProfileError._external_id_and_new_external_id_unsafe_validator, - 'no_new_data_specified': MembersSetProfileError._no_new_data_specified_validator, - 'email_reserved_for_other_user': MembersSetProfileError._email_reserved_for_other_user_validator, - 'external_id_used_by_other_user': MembersSetProfileError._external_id_used_by_other_user_validator, - 'set_profile_disallowed': MembersSetProfileError._set_profile_disallowed_validator, - 'param_cannot_be_empty': MembersSetProfileError._param_cannot_be_empty_validator, - 'persistent_id_disabled': MembersSetProfileError._persistent_id_disabled_validator, - 'persistent_id_used_by_other_user': MembersSetProfileError._persistent_id_used_by_other_user_validator, - 'other': MembersSetProfileError._other_validator, -} -MembersSetProfileError._tagmap.update(MemberSelectorError._tagmap) - -MembersSetProfileError.external_id_and_new_external_id_unsafe = MembersSetProfileError('external_id_and_new_external_id_unsafe') -MembersSetProfileError.no_new_data_specified = MembersSetProfileError('no_new_data_specified') -MembersSetProfileError.email_reserved_for_other_user = MembersSetProfileError('email_reserved_for_other_user') -MembersSetProfileError.external_id_used_by_other_user = MembersSetProfileError('external_id_used_by_other_user') -MembersSetProfileError.set_profile_disallowed = MembersSetProfileError('set_profile_disallowed') -MembersSetProfileError.param_cannot_be_empty = MembersSetProfileError('param_cannot_be_empty') -MembersSetProfileError.persistent_id_disabled = MembersSetProfileError('persistent_id_disabled') -MembersSetProfileError.persistent_id_used_by_other_user = MembersSetProfileError('persistent_id_used_by_other_user') -MembersSetProfileError.other = MembersSetProfileError('other') - -MembersSuspendError._suspend_inactive_user_validator = bv.Void() -MembersSuspendError._suspend_last_admin_validator = bv.Void() -MembersSuspendError._team_license_limit_validator = bv.Void() -MembersSuspendError._tagmap = { - 'suspend_inactive_user': MembersSuspendError._suspend_inactive_user_validator, - 'suspend_last_admin': MembersSuspendError._suspend_last_admin_validator, - 'team_license_limit': MembersSuspendError._team_license_limit_validator, -} -MembersSuspendError._tagmap.update(MembersDeactivateError._tagmap) - -MembersSuspendError.suspend_inactive_user = MembersSuspendError('suspend_inactive_user') -MembersSuspendError.suspend_last_admin = MembersSuspendError('suspend_last_admin') -MembersSuspendError.team_license_limit = MembersSuspendError('team_license_limit') - -MembersUnsuspendArg._user_validator = UserSelectorArg_validator -MembersUnsuspendArg._all_field_names_ = set(['user']) -MembersUnsuspendArg._all_fields_ = [('user', MembersUnsuspendArg._user_validator)] - -MembersUnsuspendError._unsuspend_non_suspended_member_validator = bv.Void() -MembersUnsuspendError._team_license_limit_validator = bv.Void() -MembersUnsuspendError._tagmap = { - 'unsuspend_non_suspended_member': MembersUnsuspendError._unsuspend_non_suspended_member_validator, - 'team_license_limit': MembersUnsuspendError._team_license_limit_validator, -} -MembersUnsuspendError._tagmap.update(MembersDeactivateError._tagmap) - -MembersUnsuspendError.unsuspend_non_suspended_member = MembersUnsuspendError('unsuspend_non_suspended_member') -MembersUnsuspendError.team_license_limit = MembersUnsuspendError('team_license_limit') - -MobileClientPlatform._iphone_validator = bv.Void() -MobileClientPlatform._ipad_validator = bv.Void() -MobileClientPlatform._android_validator = bv.Void() -MobileClientPlatform._windows_phone_validator = bv.Void() -MobileClientPlatform._blackberry_validator = bv.Void() -MobileClientPlatform._other_validator = bv.Void() -MobileClientPlatform._tagmap = { - 'iphone': MobileClientPlatform._iphone_validator, - 'ipad': MobileClientPlatform._ipad_validator, - 'android': MobileClientPlatform._android_validator, - 'windows_phone': MobileClientPlatform._windows_phone_validator, - 'blackberry': MobileClientPlatform._blackberry_validator, - 'other': MobileClientPlatform._other_validator, -} - -MobileClientPlatform.iphone = MobileClientPlatform('iphone') -MobileClientPlatform.ipad = MobileClientPlatform('ipad') -MobileClientPlatform.android = MobileClientPlatform('android') -MobileClientPlatform.windows_phone = MobileClientPlatform('windows_phone') -MobileClientPlatform.blackberry = MobileClientPlatform('blackberry') -MobileClientPlatform.other = MobileClientPlatform('other') - -MobileClientSession._device_name_validator = bv.String() -MobileClientSession._client_type_validator = MobileClientPlatform_validator -MobileClientSession._client_version_validator = bv.Nullable(bv.String()) -MobileClientSession._os_version_validator = bv.Nullable(bv.String()) -MobileClientSession._last_carrier_validator = bv.Nullable(bv.String()) -MobileClientSession._all_field_names_ = DeviceSession._all_field_names_.union(set([ - 'device_name', - 'client_type', - 'client_version', - 'os_version', - 'last_carrier', -])) -MobileClientSession._all_fields_ = DeviceSession._all_fields_ + [ - ('device_name', MobileClientSession._device_name_validator), - ('client_type', MobileClientSession._client_type_validator), - ('client_version', MobileClientSession._client_version_validator), - ('os_version', MobileClientSession._os_version_validator), - ('last_carrier', MobileClientSession._last_carrier_validator), -] - -NamespaceMetadata._name_validator = bv.String() -NamespaceMetadata._namespace_id_validator = common.SharedFolderId_validator -NamespaceMetadata._namespace_type_validator = NamespaceType_validator -NamespaceMetadata._team_member_id_validator = bv.Nullable(team_common.TeamMemberId_validator) -NamespaceMetadata._all_field_names_ = set([ - 'name', - 'namespace_id', - 'namespace_type', - 'team_member_id', -]) -NamespaceMetadata._all_fields_ = [ - ('name', NamespaceMetadata._name_validator), - ('namespace_id', NamespaceMetadata._namespace_id_validator), - ('namespace_type', NamespaceMetadata._namespace_type_validator), - ('team_member_id', NamespaceMetadata._team_member_id_validator), -] - -NamespaceType._app_folder_validator = bv.Void() -NamespaceType._shared_folder_validator = bv.Void() -NamespaceType._team_folder_validator = bv.Void() -NamespaceType._team_member_folder_validator = bv.Void() -NamespaceType._other_validator = bv.Void() -NamespaceType._tagmap = { - 'app_folder': NamespaceType._app_folder_validator, - 'shared_folder': NamespaceType._shared_folder_validator, - 'team_folder': NamespaceType._team_folder_validator, - 'team_member_folder': NamespaceType._team_member_folder_validator, - 'other': NamespaceType._other_validator, -} - -NamespaceType.app_folder = NamespaceType('app_folder') -NamespaceType.shared_folder = NamespaceType('shared_folder') -NamespaceType.team_folder = NamespaceType('team_folder') -NamespaceType.team_member_folder = NamespaceType('team_member_folder') -NamespaceType.other = NamespaceType('other') - -RemoveCustomQuotaResult._success_validator = UserSelectorArg_validator -RemoveCustomQuotaResult._invalid_user_validator = UserSelectorArg_validator -RemoveCustomQuotaResult._other_validator = bv.Void() -RemoveCustomQuotaResult._tagmap = { - 'success': RemoveCustomQuotaResult._success_validator, - 'invalid_user': RemoveCustomQuotaResult._invalid_user_validator, - 'other': RemoveCustomQuotaResult._other_validator, -} - -RemoveCustomQuotaResult.other = RemoveCustomQuotaResult('other') - -RemovedStatus._is_recoverable_validator = bv.Boolean() -RemovedStatus._all_field_names_ = set(['is_recoverable']) -RemovedStatus._all_fields_ = [('is_recoverable', RemovedStatus._is_recoverable_validator)] - -RevokeDesktopClientArg._delete_on_unlink_validator = bv.Boolean() -RevokeDesktopClientArg._all_field_names_ = DeviceSessionArg._all_field_names_.union(set(['delete_on_unlink'])) -RevokeDesktopClientArg._all_fields_ = DeviceSessionArg._all_fields_ + [('delete_on_unlink', RevokeDesktopClientArg._delete_on_unlink_validator)] - -RevokeDeviceSessionArg._web_session_validator = DeviceSessionArg_validator -RevokeDeviceSessionArg._desktop_client_validator = RevokeDesktopClientArg_validator -RevokeDeviceSessionArg._mobile_client_validator = DeviceSessionArg_validator -RevokeDeviceSessionArg._tagmap = { - 'web_session': RevokeDeviceSessionArg._web_session_validator, - 'desktop_client': RevokeDeviceSessionArg._desktop_client_validator, - 'mobile_client': RevokeDeviceSessionArg._mobile_client_validator, -} - -RevokeDeviceSessionBatchArg._revoke_devices_validator = bv.List(RevokeDeviceSessionArg_validator) -RevokeDeviceSessionBatchArg._all_field_names_ = set(['revoke_devices']) -RevokeDeviceSessionBatchArg._all_fields_ = [('revoke_devices', RevokeDeviceSessionBatchArg._revoke_devices_validator)] - -RevokeDeviceSessionBatchError._other_validator = bv.Void() -RevokeDeviceSessionBatchError._tagmap = { - 'other': RevokeDeviceSessionBatchError._other_validator, -} - -RevokeDeviceSessionBatchError.other = RevokeDeviceSessionBatchError('other') - -RevokeDeviceSessionBatchResult._revoke_devices_status_validator = bv.List(RevokeDeviceSessionStatus_validator) -RevokeDeviceSessionBatchResult._all_field_names_ = set(['revoke_devices_status']) -RevokeDeviceSessionBatchResult._all_fields_ = [('revoke_devices_status', RevokeDeviceSessionBatchResult._revoke_devices_status_validator)] - -RevokeDeviceSessionError._device_session_not_found_validator = bv.Void() -RevokeDeviceSessionError._member_not_found_validator = bv.Void() -RevokeDeviceSessionError._other_validator = bv.Void() -RevokeDeviceSessionError._tagmap = { - 'device_session_not_found': RevokeDeviceSessionError._device_session_not_found_validator, - 'member_not_found': RevokeDeviceSessionError._member_not_found_validator, - 'other': RevokeDeviceSessionError._other_validator, -} - -RevokeDeviceSessionError.device_session_not_found = RevokeDeviceSessionError('device_session_not_found') -RevokeDeviceSessionError.member_not_found = RevokeDeviceSessionError('member_not_found') -RevokeDeviceSessionError.other = RevokeDeviceSessionError('other') - -RevokeDeviceSessionStatus._success_validator = bv.Boolean() -RevokeDeviceSessionStatus._error_type_validator = bv.Nullable(RevokeDeviceSessionError_validator) -RevokeDeviceSessionStatus._all_field_names_ = set([ - 'success', - 'error_type', -]) -RevokeDeviceSessionStatus._all_fields_ = [ - ('success', RevokeDeviceSessionStatus._success_validator), - ('error_type', RevokeDeviceSessionStatus._error_type_validator), -] - -RevokeLinkedApiAppArg._app_id_validator = bv.String() -RevokeLinkedApiAppArg._team_member_id_validator = bv.String() -RevokeLinkedApiAppArg._keep_app_folder_validator = bv.Boolean() -RevokeLinkedApiAppArg._all_field_names_ = set([ - 'app_id', - 'team_member_id', - 'keep_app_folder', -]) -RevokeLinkedApiAppArg._all_fields_ = [ - ('app_id', RevokeLinkedApiAppArg._app_id_validator), - ('team_member_id', RevokeLinkedApiAppArg._team_member_id_validator), - ('keep_app_folder', RevokeLinkedApiAppArg._keep_app_folder_validator), -] - -RevokeLinkedApiAppBatchArg._revoke_linked_app_validator = bv.List(RevokeLinkedApiAppArg_validator) -RevokeLinkedApiAppBatchArg._all_field_names_ = set(['revoke_linked_app']) -RevokeLinkedApiAppBatchArg._all_fields_ = [('revoke_linked_app', RevokeLinkedApiAppBatchArg._revoke_linked_app_validator)] - -RevokeLinkedAppBatchError._other_validator = bv.Void() -RevokeLinkedAppBatchError._tagmap = { - 'other': RevokeLinkedAppBatchError._other_validator, -} - -RevokeLinkedAppBatchError.other = RevokeLinkedAppBatchError('other') - -RevokeLinkedAppBatchResult._revoke_linked_app_status_validator = bv.List(RevokeLinkedAppStatus_validator) -RevokeLinkedAppBatchResult._all_field_names_ = set(['revoke_linked_app_status']) -RevokeLinkedAppBatchResult._all_fields_ = [('revoke_linked_app_status', RevokeLinkedAppBatchResult._revoke_linked_app_status_validator)] - -RevokeLinkedAppError._app_not_found_validator = bv.Void() -RevokeLinkedAppError._member_not_found_validator = bv.Void() -RevokeLinkedAppError._other_validator = bv.Void() -RevokeLinkedAppError._tagmap = { - 'app_not_found': RevokeLinkedAppError._app_not_found_validator, - 'member_not_found': RevokeLinkedAppError._member_not_found_validator, - 'other': RevokeLinkedAppError._other_validator, -} - -RevokeLinkedAppError.app_not_found = RevokeLinkedAppError('app_not_found') -RevokeLinkedAppError.member_not_found = RevokeLinkedAppError('member_not_found') -RevokeLinkedAppError.other = RevokeLinkedAppError('other') - -RevokeLinkedAppStatus._success_validator = bv.Boolean() -RevokeLinkedAppStatus._error_type_validator = bv.Nullable(RevokeLinkedAppError_validator) -RevokeLinkedAppStatus._all_field_names_ = set([ - 'success', - 'error_type', -]) -RevokeLinkedAppStatus._all_fields_ = [ - ('success', RevokeLinkedAppStatus._success_validator), - ('error_type', RevokeLinkedAppStatus._error_type_validator), -] - -SetCustomQuotaArg._users_and_quotas_validator = bv.List(UserCustomQuotaArg_validator) -SetCustomQuotaArg._all_field_names_ = set(['users_and_quotas']) -SetCustomQuotaArg._all_fields_ = [('users_and_quotas', SetCustomQuotaArg._users_and_quotas_validator)] - -StorageBucket._bucket_validator = bv.String() -StorageBucket._users_validator = bv.UInt64() -StorageBucket._all_field_names_ = set([ - 'bucket', - 'users', -]) -StorageBucket._all_fields_ = [ - ('bucket', StorageBucket._bucket_validator), - ('users', StorageBucket._users_validator), -] - -TeamFolderAccessError._invalid_team_folder_id_validator = bv.Void() -TeamFolderAccessError._no_access_validator = bv.Void() -TeamFolderAccessError._other_validator = bv.Void() -TeamFolderAccessError._tagmap = { - 'invalid_team_folder_id': TeamFolderAccessError._invalid_team_folder_id_validator, - 'no_access': TeamFolderAccessError._no_access_validator, - 'other': TeamFolderAccessError._other_validator, -} - -TeamFolderAccessError.invalid_team_folder_id = TeamFolderAccessError('invalid_team_folder_id') -TeamFolderAccessError.no_access = TeamFolderAccessError('no_access') -TeamFolderAccessError.other = TeamFolderAccessError('other') - -TeamFolderActivateError._tagmap = { -} -TeamFolderActivateError._tagmap.update(BaseTeamFolderError._tagmap) - -TeamFolderIdArg._team_folder_id_validator = common.SharedFolderId_validator -TeamFolderIdArg._all_field_names_ = set(['team_folder_id']) -TeamFolderIdArg._all_fields_ = [('team_folder_id', TeamFolderIdArg._team_folder_id_validator)] - -TeamFolderArchiveArg._force_async_off_validator = bv.Boolean() -TeamFolderArchiveArg._all_field_names_ = TeamFolderIdArg._all_field_names_.union(set(['force_async_off'])) -TeamFolderArchiveArg._all_fields_ = TeamFolderIdArg._all_fields_ + [('force_async_off', TeamFolderArchiveArg._force_async_off_validator)] - -TeamFolderArchiveError._tagmap = { -} -TeamFolderArchiveError._tagmap.update(BaseTeamFolderError._tagmap) - -TeamFolderArchiveJobStatus._complete_validator = TeamFolderMetadata_validator -TeamFolderArchiveJobStatus._failed_validator = TeamFolderArchiveError_validator -TeamFolderArchiveJobStatus._tagmap = { - 'complete': TeamFolderArchiveJobStatus._complete_validator, - 'failed': TeamFolderArchiveJobStatus._failed_validator, -} -TeamFolderArchiveJobStatus._tagmap.update(async.PollResultBase._tagmap) - -TeamFolderArchiveLaunch._complete_validator = TeamFolderMetadata_validator -TeamFolderArchiveLaunch._tagmap = { - 'complete': TeamFolderArchiveLaunch._complete_validator, -} -TeamFolderArchiveLaunch._tagmap.update(async.LaunchResultBase._tagmap) - -TeamFolderCreateArg._name_validator = bv.String() -TeamFolderCreateArg._all_field_names_ = set(['name']) -TeamFolderCreateArg._all_fields_ = [('name', TeamFolderCreateArg._name_validator)] - -TeamFolderCreateError._invalid_folder_name_validator = bv.Void() -TeamFolderCreateError._folder_name_already_used_validator = bv.Void() -TeamFolderCreateError._folder_name_reserved_validator = bv.Void() -TeamFolderCreateError._other_validator = bv.Void() -TeamFolderCreateError._tagmap = { - 'invalid_folder_name': TeamFolderCreateError._invalid_folder_name_validator, - 'folder_name_already_used': TeamFolderCreateError._folder_name_already_used_validator, - 'folder_name_reserved': TeamFolderCreateError._folder_name_reserved_validator, - 'other': TeamFolderCreateError._other_validator, -} - -TeamFolderCreateError.invalid_folder_name = TeamFolderCreateError('invalid_folder_name') -TeamFolderCreateError.folder_name_already_used = TeamFolderCreateError('folder_name_already_used') -TeamFolderCreateError.folder_name_reserved = TeamFolderCreateError('folder_name_reserved') -TeamFolderCreateError.other = TeamFolderCreateError('other') - -TeamFolderGetInfoItem._id_not_found_validator = bv.String() -TeamFolderGetInfoItem._team_folder_metadata_validator = TeamFolderMetadata_validator -TeamFolderGetInfoItem._tagmap = { - 'id_not_found': TeamFolderGetInfoItem._id_not_found_validator, - 'team_folder_metadata': TeamFolderGetInfoItem._team_folder_metadata_validator, -} - -TeamFolderIdListArg._team_folder_ids_validator = bv.List(common.SharedFolderId_validator, min_items=1) -TeamFolderIdListArg._all_field_names_ = set(['team_folder_ids']) -TeamFolderIdListArg._all_fields_ = [('team_folder_ids', TeamFolderIdListArg._team_folder_ids_validator)] - -TeamFolderInvalidStatusError._active_validator = bv.Void() -TeamFolderInvalidStatusError._archived_validator = bv.Void() -TeamFolderInvalidStatusError._archive_in_progress_validator = bv.Void() -TeamFolderInvalidStatusError._other_validator = bv.Void() -TeamFolderInvalidStatusError._tagmap = { - 'active': TeamFolderInvalidStatusError._active_validator, - 'archived': TeamFolderInvalidStatusError._archived_validator, - 'archive_in_progress': TeamFolderInvalidStatusError._archive_in_progress_validator, - 'other': TeamFolderInvalidStatusError._other_validator, -} - -TeamFolderInvalidStatusError.active = TeamFolderInvalidStatusError('active') -TeamFolderInvalidStatusError.archived = TeamFolderInvalidStatusError('archived') -TeamFolderInvalidStatusError.archive_in_progress = TeamFolderInvalidStatusError('archive_in_progress') -TeamFolderInvalidStatusError.other = TeamFolderInvalidStatusError('other') - -TeamFolderListArg._limit_validator = bv.UInt32(min_value=1, max_value=1000) -TeamFolderListArg._all_field_names_ = set(['limit']) -TeamFolderListArg._all_fields_ = [('limit', TeamFolderListArg._limit_validator)] - -TeamFolderListContinueArg._cursor_validator = bv.String() -TeamFolderListContinueArg._all_field_names_ = set(['cursor']) -TeamFolderListContinueArg._all_fields_ = [('cursor', TeamFolderListContinueArg._cursor_validator)] - -TeamFolderListContinueError._invalid_cursor_validator = bv.Void() -TeamFolderListContinueError._other_validator = bv.Void() -TeamFolderListContinueError._tagmap = { - 'invalid_cursor': TeamFolderListContinueError._invalid_cursor_validator, - 'other': TeamFolderListContinueError._other_validator, -} - -TeamFolderListContinueError.invalid_cursor = TeamFolderListContinueError('invalid_cursor') -TeamFolderListContinueError.other = TeamFolderListContinueError('other') - -TeamFolderListError._access_error_validator = TeamFolderAccessError_validator -TeamFolderListError._all_field_names_ = set(['access_error']) -TeamFolderListError._all_fields_ = [('access_error', TeamFolderListError._access_error_validator)] - -TeamFolderListResult._team_folders_validator = bv.List(TeamFolderMetadata_validator) -TeamFolderListResult._cursor_validator = bv.String() -TeamFolderListResult._has_more_validator = bv.Boolean() -TeamFolderListResult._all_field_names_ = set([ - 'team_folders', - 'cursor', - 'has_more', -]) -TeamFolderListResult._all_fields_ = [ - ('team_folders', TeamFolderListResult._team_folders_validator), - ('cursor', TeamFolderListResult._cursor_validator), - ('has_more', TeamFolderListResult._has_more_validator), -] - -TeamFolderMetadata._team_folder_id_validator = common.SharedFolderId_validator -TeamFolderMetadata._name_validator = bv.String() -TeamFolderMetadata._status_validator = TeamFolderStatus_validator -TeamFolderMetadata._is_team_shared_dropbox_validator = bv.Boolean() -TeamFolderMetadata._all_field_names_ = set([ - 'team_folder_id', - 'name', - 'status', - 'is_team_shared_dropbox', -]) -TeamFolderMetadata._all_fields_ = [ - ('team_folder_id', TeamFolderMetadata._team_folder_id_validator), - ('name', TeamFolderMetadata._name_validator), - ('status', TeamFolderMetadata._status_validator), - ('is_team_shared_dropbox', TeamFolderMetadata._is_team_shared_dropbox_validator), -] - -TeamFolderPermanentlyDeleteError._tagmap = { -} -TeamFolderPermanentlyDeleteError._tagmap.update(BaseTeamFolderError._tagmap) - -TeamFolderRenameArg._name_validator = bv.String() -TeamFolderRenameArg._all_field_names_ = TeamFolderIdArg._all_field_names_.union(set(['name'])) -TeamFolderRenameArg._all_fields_ = TeamFolderIdArg._all_fields_ + [('name', TeamFolderRenameArg._name_validator)] - -TeamFolderRenameError._invalid_folder_name_validator = bv.Void() -TeamFolderRenameError._folder_name_already_used_validator = bv.Void() -TeamFolderRenameError._folder_name_reserved_validator = bv.Void() -TeamFolderRenameError._tagmap = { - 'invalid_folder_name': TeamFolderRenameError._invalid_folder_name_validator, - 'folder_name_already_used': TeamFolderRenameError._folder_name_already_used_validator, - 'folder_name_reserved': TeamFolderRenameError._folder_name_reserved_validator, -} -TeamFolderRenameError._tagmap.update(BaseTeamFolderError._tagmap) - -TeamFolderRenameError.invalid_folder_name = TeamFolderRenameError('invalid_folder_name') -TeamFolderRenameError.folder_name_already_used = TeamFolderRenameError('folder_name_already_used') -TeamFolderRenameError.folder_name_reserved = TeamFolderRenameError('folder_name_reserved') - -TeamFolderStatus._active_validator = bv.Void() -TeamFolderStatus._archived_validator = bv.Void() -TeamFolderStatus._archive_in_progress_validator = bv.Void() -TeamFolderStatus._other_validator = bv.Void() -TeamFolderStatus._tagmap = { - 'active': TeamFolderStatus._active_validator, - 'archived': TeamFolderStatus._archived_validator, - 'archive_in_progress': TeamFolderStatus._archive_in_progress_validator, - 'other': TeamFolderStatus._other_validator, -} - -TeamFolderStatus.active = TeamFolderStatus('active') -TeamFolderStatus.archived = TeamFolderStatus('archived') -TeamFolderStatus.archive_in_progress = TeamFolderStatus('archive_in_progress') -TeamFolderStatus.other = TeamFolderStatus('other') - -TeamFolderTeamSharedDropboxError._disallowed_validator = bv.Void() -TeamFolderTeamSharedDropboxError._other_validator = bv.Void() -TeamFolderTeamSharedDropboxError._tagmap = { - 'disallowed': TeamFolderTeamSharedDropboxError._disallowed_validator, - 'other': TeamFolderTeamSharedDropboxError._other_validator, -} - -TeamFolderTeamSharedDropboxError.disallowed = TeamFolderTeamSharedDropboxError('disallowed') -TeamFolderTeamSharedDropboxError.other = TeamFolderTeamSharedDropboxError('other') - -TeamGetInfoResult._name_validator = bv.String() -TeamGetInfoResult._team_id_validator = bv.String() -TeamGetInfoResult._num_licensed_users_validator = bv.UInt32() -TeamGetInfoResult._num_provisioned_users_validator = bv.UInt32() -TeamGetInfoResult._policies_validator = team_policies.TeamMemberPolicies_validator -TeamGetInfoResult._all_field_names_ = set([ - 'name', - 'team_id', - 'num_licensed_users', - 'num_provisioned_users', - '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), - ('policies', TeamGetInfoResult._policies_validator), -] - -TeamMemberInfo._profile_validator = TeamMemberProfile_validator -TeamMemberInfo._role_validator = AdminTier_validator -TeamMemberInfo._all_field_names_ = set([ - 'profile', - 'role', -]) -TeamMemberInfo._all_fields_ = [ - ('profile', TeamMemberInfo._profile_validator), - ('role', TeamMemberInfo._role_validator), -] - -TeamMemberProfile._groups_validator = bv.List(team_common.GroupId_validator) -TeamMemberProfile._member_folder_id_validator = common.NamespaceId_validator -TeamMemberProfile._all_field_names_ = MemberProfile._all_field_names_.union(set([ - 'groups', - 'member_folder_id', -])) -TeamMemberProfile._all_fields_ = MemberProfile._all_fields_ + [ - ('groups', TeamMemberProfile._groups_validator), - ('member_folder_id', TeamMemberProfile._member_folder_id_validator), -] - -TeamMemberStatus._active_validator = bv.Void() -TeamMemberStatus._invited_validator = bv.Void() -TeamMemberStatus._suspended_validator = bv.Void() -TeamMemberStatus._removed_validator = RemovedStatus_validator -TeamMemberStatus._tagmap = { - 'active': TeamMemberStatus._active_validator, - 'invited': TeamMemberStatus._invited_validator, - 'suspended': TeamMemberStatus._suspended_validator, - 'removed': TeamMemberStatus._removed_validator, -} - -TeamMemberStatus.active = TeamMemberStatus('active') -TeamMemberStatus.invited = TeamMemberStatus('invited') -TeamMemberStatus.suspended = TeamMemberStatus('suspended') - -TeamMembershipType._full_validator = bv.Void() -TeamMembershipType._limited_validator = bv.Void() -TeamMembershipType._tagmap = { - 'full': TeamMembershipType._full_validator, - 'limited': TeamMembershipType._limited_validator, -} - -TeamMembershipType.full = TeamMembershipType('full') -TeamMembershipType.limited = TeamMembershipType('limited') - -TeamNamespacesListArg._limit_validator = bv.UInt32(min_value=1, max_value=1000) -TeamNamespacesListArg._all_field_names_ = set(['limit']) -TeamNamespacesListArg._all_fields_ = [('limit', TeamNamespacesListArg._limit_validator)] - -TeamNamespacesListContinueArg._cursor_validator = bv.String() -TeamNamespacesListContinueArg._all_field_names_ = set(['cursor']) -TeamNamespacesListContinueArg._all_fields_ = [('cursor', TeamNamespacesListContinueArg._cursor_validator)] - -TeamNamespacesListContinueError._invalid_cursor_validator = bv.Void() -TeamNamespacesListContinueError._other_validator = bv.Void() -TeamNamespacesListContinueError._tagmap = { - 'invalid_cursor': TeamNamespacesListContinueError._invalid_cursor_validator, - 'other': TeamNamespacesListContinueError._other_validator, -} - -TeamNamespacesListContinueError.invalid_cursor = TeamNamespacesListContinueError('invalid_cursor') -TeamNamespacesListContinueError.other = TeamNamespacesListContinueError('other') - -TeamNamespacesListResult._namespaces_validator = bv.List(NamespaceMetadata_validator) -TeamNamespacesListResult._cursor_validator = bv.String() -TeamNamespacesListResult._has_more_validator = bv.Boolean() -TeamNamespacesListResult._all_field_names_ = set([ - 'namespaces', - 'cursor', - 'has_more', -]) -TeamNamespacesListResult._all_fields_ = [ - ('namespaces', TeamNamespacesListResult._namespaces_validator), - ('cursor', TeamNamespacesListResult._cursor_validator), - ('has_more', TeamNamespacesListResult._has_more_validator), -] - -TokenGetAuthenticatedAdminError._mapping_not_found_validator = bv.Void() -TokenGetAuthenticatedAdminError._admin_not_active_validator = bv.Void() -TokenGetAuthenticatedAdminError._other_validator = bv.Void() -TokenGetAuthenticatedAdminError._tagmap = { - 'mapping_not_found': TokenGetAuthenticatedAdminError._mapping_not_found_validator, - 'admin_not_active': TokenGetAuthenticatedAdminError._admin_not_active_validator, - 'other': TokenGetAuthenticatedAdminError._other_validator, -} - -TokenGetAuthenticatedAdminError.mapping_not_found = TokenGetAuthenticatedAdminError('mapping_not_found') -TokenGetAuthenticatedAdminError.admin_not_active = TokenGetAuthenticatedAdminError('admin_not_active') -TokenGetAuthenticatedAdminError.other = TokenGetAuthenticatedAdminError('other') - -TokenGetAuthenticatedAdminResult._admin_profile_validator = TeamMemberProfile_validator -TokenGetAuthenticatedAdminResult._all_field_names_ = set(['admin_profile']) -TokenGetAuthenticatedAdminResult._all_fields_ = [('admin_profile', TokenGetAuthenticatedAdminResult._admin_profile_validator)] - -UploadApiRateLimitValue._unlimited_validator = bv.Void() -UploadApiRateLimitValue._limit_validator = bv.UInt32() -UploadApiRateLimitValue._other_validator = bv.Void() -UploadApiRateLimitValue._tagmap = { - 'unlimited': UploadApiRateLimitValue._unlimited_validator, - 'limit': UploadApiRateLimitValue._limit_validator, - 'other': UploadApiRateLimitValue._other_validator, -} - -UploadApiRateLimitValue.unlimited = UploadApiRateLimitValue('unlimited') -UploadApiRateLimitValue.other = UploadApiRateLimitValue('other') - -UserCustomQuotaArg._user_validator = UserSelectorArg_validator -UserCustomQuotaArg._quota_gb_validator = UserQuota_validator -UserCustomQuotaArg._all_field_names_ = set([ - 'user', - 'quota_gb', -]) -UserCustomQuotaArg._all_fields_ = [ - ('user', UserCustomQuotaArg._user_validator), - ('quota_gb', UserCustomQuotaArg._quota_gb_validator), -] - -UserCustomQuotaResult._user_validator = UserSelectorArg_validator -UserCustomQuotaResult._quota_gb_validator = bv.Nullable(UserQuota_validator) -UserCustomQuotaResult._all_field_names_ = set([ - 'user', - 'quota_gb', -]) -UserCustomQuotaResult._all_fields_ = [ - ('user', UserCustomQuotaResult._user_validator), - ('quota_gb', UserCustomQuotaResult._quota_gb_validator), -] - -UserSelectorArg._team_member_id_validator = team_common.TeamMemberId_validator -UserSelectorArg._external_id_validator = team_common.MemberExternalId_validator -UserSelectorArg._email_validator = common.EmailAddress_validator -UserSelectorArg._tagmap = { - 'team_member_id': UserSelectorArg._team_member_id_validator, - 'external_id': UserSelectorArg._external_id_validator, - 'email': UserSelectorArg._email_validator, -} - -UsersSelectorArg._team_member_ids_validator = bv.List(team_common.TeamMemberId_validator) -UsersSelectorArg._external_ids_validator = bv.List(team_common.MemberExternalId_validator) -UsersSelectorArg._emails_validator = bv.List(common.EmailAddress_validator) -UsersSelectorArg._tagmap = { - 'team_member_ids': UsersSelectorArg._team_member_ids_validator, - 'external_ids': UsersSelectorArg._external_ids_validator, - 'emails': UsersSelectorArg._emails_validator, -} - -devices_list_member_devices = bb.Route( - 'devices/list_member_devices', - False, - ListMemberDevicesArg_validator, - ListMemberDevicesResult_validator, - ListMemberDevicesError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -devices_list_members_devices = bb.Route( - 'devices/list_members_devices', - False, - ListMembersDevicesArg_validator, - ListMembersDevicesResult_validator, - ListMembersDevicesError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -devices_list_team_devices = bb.Route( - 'devices/list_team_devices', - True, - ListTeamDevicesArg_validator, - ListTeamDevicesResult_validator, - ListTeamDevicesError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -devices_revoke_device_session = bb.Route( - 'devices/revoke_device_session', - False, - RevokeDeviceSessionArg_validator, - bv.Void(), - RevokeDeviceSessionError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -devices_revoke_device_session_batch = bb.Route( - 'devices/revoke_device_session_batch', - False, - RevokeDeviceSessionBatchArg_validator, - RevokeDeviceSessionBatchResult_validator, - RevokeDeviceSessionBatchError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -features_get_values = bb.Route( - 'features/get_values', - False, - FeaturesGetValuesBatchArg_validator, - FeaturesGetValuesBatchResult_validator, - FeaturesGetValuesBatchError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -get_info = bb.Route( - 'get_info', - False, - bv.Void(), - TeamGetInfoResult_validator, - bv.Void(), - {'host': u'api', - 'style': u'rpc'}, -) -groups_create = bb.Route( - 'groups/create', - False, - GroupCreateArg_validator, - GroupFullInfo_validator, - GroupCreateError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -groups_delete = bb.Route( - 'groups/delete', - False, - GroupSelector_validator, - async.LaunchEmptyResult_validator, - GroupDeleteError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -groups_get_info = bb.Route( - 'groups/get_info', - False, - GroupsSelector_validator, - GroupsGetInfoResult_validator, - GroupsGetInfoError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -groups_job_status_get = bb.Route( - 'groups/job_status/get', - False, - async.PollArg_validator, - async.PollEmptyResult_validator, - GroupsPollError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -groups_list = bb.Route( - 'groups/list', - False, - GroupsListArg_validator, - GroupsListResult_validator, - bv.Void(), - {'host': u'api', - 'style': u'rpc'}, -) -groups_list_continue = bb.Route( - 'groups/list/continue', - False, - GroupsListContinueArg_validator, - GroupsListResult_validator, - GroupsListContinueError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -groups_members_add = bb.Route( - 'groups/members/add', - False, - GroupMembersAddArg_validator, - GroupMembersChangeResult_validator, - GroupMembersAddError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -groups_members_list = bb.Route( - 'groups/members/list', - False, - GroupsMembersListArg_validator, - GroupsMembersListResult_validator, - GroupSelectorError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -groups_members_list_continue = bb.Route( - 'groups/members/list/continue', - False, - GroupsMembersListContinueArg_validator, - GroupsMembersListResult_validator, - GroupsMembersListContinueError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -groups_members_remove = bb.Route( - 'groups/members/remove', - False, - GroupMembersRemoveArg_validator, - GroupMembersChangeResult_validator, - GroupMembersRemoveError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -groups_members_set_access_type = bb.Route( - 'groups/members/set_access_type', - False, - GroupMembersSetAccessTypeArg_validator, - GroupsGetInfoResult_validator, - GroupMemberSetAccessTypeError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -groups_update = bb.Route( - 'groups/update', - False, - GroupUpdateArgs_validator, - GroupFullInfo_validator, - GroupUpdateError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -linked_apps_list_member_linked_apps = bb.Route( - 'linked_apps/list_member_linked_apps', - False, - ListMemberAppsArg_validator, - ListMemberAppsResult_validator, - ListMemberAppsError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -linked_apps_list_members_linked_apps = bb.Route( - 'linked_apps/list_members_linked_apps', - False, - ListMembersAppsArg_validator, - ListMembersAppsResult_validator, - ListMembersAppsError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -linked_apps_list_team_linked_apps = bb.Route( - 'linked_apps/list_team_linked_apps', - True, - ListTeamAppsArg_validator, - ListTeamAppsResult_validator, - ListTeamAppsError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -linked_apps_revoke_linked_app = bb.Route( - 'linked_apps/revoke_linked_app', - False, - RevokeLinkedApiAppArg_validator, - bv.Void(), - RevokeLinkedAppError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -linked_apps_revoke_linked_app_batch = bb.Route( - 'linked_apps/revoke_linked_app_batch', - False, - RevokeLinkedApiAppBatchArg_validator, - RevokeLinkedAppBatchResult_validator, - RevokeLinkedAppBatchError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -member_space_limits_get_custom_quota = bb.Route( - 'member_space_limits/get_custom_quota', - False, - CustomQuotaUsersArg_validator, - bv.List(CustomQuotaResult_validator), - CustomQuotaError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -member_space_limits_remove_custom_quota = bb.Route( - 'member_space_limits/remove_custom_quota', - False, - CustomQuotaUsersArg_validator, - bv.List(RemoveCustomQuotaResult_validator), - CustomQuotaError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -member_space_limits_set_custom_quota = bb.Route( - 'member_space_limits/set_custom_quota', - False, - SetCustomQuotaArg_validator, - bv.List(CustomQuotaResult_validator), - CustomQuotaError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -members_add = bb.Route( - 'members/add', - False, - MembersAddArg_validator, - MembersAddLaunch_validator, - bv.Void(), - {'host': u'api', - 'style': u'rpc'}, -) -members_add_job_status_get = bb.Route( - 'members/add/job_status/get', - False, - async.PollArg_validator, - MembersAddJobStatus_validator, - async.PollError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -members_get_info = bb.Route( - 'members/get_info', - False, - MembersGetInfoArgs_validator, - MembersGetInfoResult_validator, - MembersGetInfoError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -members_list = bb.Route( - 'members/list', - False, - MembersListArg_validator, - MembersListResult_validator, - MembersListError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -members_list_continue = bb.Route( - 'members/list/continue', - False, - MembersListContinueArg_validator, - MembersListResult_validator, - MembersListContinueError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -members_recover = bb.Route( - 'members/recover', - False, - MembersRecoverArg_validator, - bv.Void(), - MembersRecoverError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -members_remove = bb.Route( - 'members/remove', - False, - MembersRemoveArg_validator, - async.LaunchEmptyResult_validator, - MembersRemoveError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -members_remove_job_status_get = bb.Route( - 'members/remove/job_status/get', - False, - async.PollArg_validator, - async.PollEmptyResult_validator, - async.PollError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -members_send_welcome_email = bb.Route( - 'members/send_welcome_email', - False, - UserSelectorArg_validator, - bv.Void(), - MembersSendWelcomeError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -members_set_admin_permissions = bb.Route( - 'members/set_admin_permissions', - False, - MembersSetPermissionsArg_validator, - MembersSetPermissionsResult_validator, - MembersSetPermissionsError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -members_set_profile = bb.Route( - 'members/set_profile', - False, - MembersSetProfileArg_validator, - TeamMemberInfo_validator, - MembersSetProfileError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -members_suspend = bb.Route( - 'members/suspend', - False, - MembersDeactivateArg_validator, - bv.Void(), - MembersSuspendError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -members_unsuspend = bb.Route( - 'members/unsuspend', - False, - MembersUnsuspendArg_validator, - bv.Void(), - MembersUnsuspendError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -namespaces_list = bb.Route( - 'namespaces/list', - False, - TeamNamespacesListArg_validator, - TeamNamespacesListResult_validator, - bv.Void(), - {'host': u'api', - 'style': u'rpc'}, -) -namespaces_list_continue = bb.Route( - 'namespaces/list/continue', - False, - TeamNamespacesListContinueArg_validator, - TeamNamespacesListResult_validator, - TeamNamespacesListContinueError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -properties_template_add = bb.Route( - 'properties/template/add', - True, - file_properties.AddTemplateArg_validator, - file_properties.AddTemplateResult_validator, - file_properties.ModifyTemplateError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -properties_template_get = bb.Route( - 'properties/template/get', - True, - file_properties.GetTemplateArg_validator, - file_properties.GetTemplateResult_validator, - file_properties.TemplateError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -properties_template_list = bb.Route( - 'properties/template/list', - True, - bv.Void(), - file_properties.ListTemplateResult_validator, - file_properties.TemplateError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -properties_template_update = bb.Route( - 'properties/template/update', - True, - file_properties.UpdateTemplateArg_validator, - file_properties.UpdateTemplateResult_validator, - file_properties.ModifyTemplateError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -reports_get_activity = bb.Route( - 'reports/get_activity', - False, - DateRange_validator, - GetActivityReport_validator, - DateRangeError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -reports_get_devices = bb.Route( - 'reports/get_devices', - False, - DateRange_validator, - GetDevicesReport_validator, - DateRangeError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -reports_get_membership = bb.Route( - 'reports/get_membership', - False, - DateRange_validator, - GetMembershipReport_validator, - DateRangeError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -reports_get_storage = bb.Route( - 'reports/get_storage', - False, - DateRange_validator, - GetStorageReport_validator, - DateRangeError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -team_folder_activate = bb.Route( - 'team_folder/activate', - False, - TeamFolderIdArg_validator, - TeamFolderMetadata_validator, - TeamFolderActivateError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -team_folder_archive = bb.Route( - 'team_folder/archive', - False, - TeamFolderArchiveArg_validator, - TeamFolderArchiveLaunch_validator, - TeamFolderArchiveError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -team_folder_archive_check = bb.Route( - 'team_folder/archive/check', - False, - async.PollArg_validator, - TeamFolderArchiveJobStatus_validator, - async.PollError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -team_folder_create = bb.Route( - 'team_folder/create', - False, - TeamFolderCreateArg_validator, - TeamFolderMetadata_validator, - TeamFolderCreateError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -team_folder_get_info = bb.Route( - 'team_folder/get_info', - False, - TeamFolderIdListArg_validator, - bv.List(TeamFolderGetInfoItem_validator), - bv.Void(), - {'host': u'api', - 'style': u'rpc'}, -) -team_folder_list = bb.Route( - 'team_folder/list', - False, - TeamFolderListArg_validator, - TeamFolderListResult_validator, - TeamFolderListError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -team_folder_list_continue = bb.Route( - 'team_folder/list/continue', - False, - TeamFolderListContinueArg_validator, - TeamFolderListResult_validator, - TeamFolderListContinueError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -team_folder_permanently_delete = bb.Route( - 'team_folder/permanently_delete', - False, - TeamFolderIdArg_validator, - bv.Void(), - TeamFolderPermanentlyDeleteError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -team_folder_rename = bb.Route( - 'team_folder/rename', - False, - TeamFolderRenameArg_validator, - TeamFolderMetadata_validator, - TeamFolderRenameError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -token_get_authenticated_admin = bb.Route( - 'token/get_authenticated_admin', - False, - bv.Void(), - TokenGetAuthenticatedAdminResult_validator, - TokenGetAuthenticatedAdminError_validator, - {'host': u'api', - 'style': u'rpc'}, -) - -ROUTES = { - 'devices/list_member_devices': devices_list_member_devices, - 'devices/list_members_devices': devices_list_members_devices, - 'devices/list_team_devices': devices_list_team_devices, - 'devices/revoke_device_session': devices_revoke_device_session, - 'devices/revoke_device_session_batch': devices_revoke_device_session_batch, - 'features/get_values': features_get_values, - 'get_info': get_info, - 'groups/create': groups_create, - 'groups/delete': groups_delete, - 'groups/get_info': groups_get_info, - 'groups/job_status/get': groups_job_status_get, - 'groups/list': groups_list, - 'groups/list/continue': groups_list_continue, - 'groups/members/add': groups_members_add, - 'groups/members/list': groups_members_list, - 'groups/members/list/continue': groups_members_list_continue, - 'groups/members/remove': groups_members_remove, - 'groups/members/set_access_type': groups_members_set_access_type, - 'groups/update': groups_update, - 'linked_apps/list_member_linked_apps': linked_apps_list_member_linked_apps, - 'linked_apps/list_members_linked_apps': linked_apps_list_members_linked_apps, - 'linked_apps/list_team_linked_apps': linked_apps_list_team_linked_apps, - 'linked_apps/revoke_linked_app': linked_apps_revoke_linked_app, - 'linked_apps/revoke_linked_app_batch': linked_apps_revoke_linked_app_batch, - 'member_space_limits/get_custom_quota': member_space_limits_get_custom_quota, - 'member_space_limits/remove_custom_quota': member_space_limits_remove_custom_quota, - 'member_space_limits/set_custom_quota': member_space_limits_set_custom_quota, - 'members/add': members_add, - 'members/add/job_status/get': members_add_job_status_get, - 'members/get_info': members_get_info, - 'members/list': members_list, - 'members/list/continue': members_list_continue, - 'members/recover': members_recover, - 'members/remove': members_remove, - 'members/remove/job_status/get': members_remove_job_status_get, - 'members/send_welcome_email': members_send_welcome_email, - 'members/set_admin_permissions': members_set_admin_permissions, - 'members/set_profile': members_set_profile, - 'members/suspend': members_suspend, - 'members/unsuspend': members_unsuspend, - 'namespaces/list': namespaces_list, - 'namespaces/list/continue': namespaces_list_continue, - 'properties/template/add': properties_template_add, - 'properties/template/get': properties_template_get, - 'properties/template/list': properties_template_list, - 'properties/template/update': properties_template_update, - 'reports/get_activity': reports_get_activity, - 'reports/get_devices': reports_get_devices, - 'reports/get_membership': reports_get_membership, - 'reports/get_storage': reports_get_storage, - 'team_folder/activate': team_folder_activate, - 'team_folder/archive': team_folder_archive, - 'team_folder/archive/check': team_folder_archive_check, - 'team_folder/create': team_folder_create, - 'team_folder/get_info': team_folder_get_info, - 'team_folder/list': team_folder_list, - 'team_folder/list/continue': team_folder_list_continue, - 'team_folder/permanently_delete': team_folder_permanently_delete, - 'team_folder/rename': team_folder_rename, - 'token/get_authenticated_admin': token_get_authenticated_admin, -} - diff --git a/resources/lib/dropbox/team_common.py b/resources/lib/dropbox/team_common.py deleted file mode 100644 index f7b0937..0000000 --- a/resources/lib/dropbox/team_common.py +++ /dev/null @@ -1,468 +0,0 @@ -# -*- coding: utf-8 -*- -# Auto-generated by Stone, do not modify. -# flake8: noqa -# pylint: skip-file -try: - from . import stone_validators as bv - from . import stone_base as bb -except (SystemError, ValueError): - # Catch errors raised when importing a relative module when not in a package. - # This makes testing this file directly (outside of a package) easier. - import stone_validators as bv - import stone_base as bb - -try: - from . import ( - common, - ) -except (SystemError, ValueError): - import common - -class GroupManagementType(bb.Union): - """ - The group type determines how a group is managed. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar user_managed: A group which is managed by selected users. - :ivar company_managed: A group which is managed by team admins only. - :ivar system_managed: A group which is managed automatically by Dropbox. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - user_managed = None - # Attribute is overwritten below the class definition - company_managed = None - # Attribute is overwritten below the class definition - system_managed = None - # Attribute is overwritten below the class definition - other = None - - def is_user_managed(self): - """ - Check if the union tag is ``user_managed``. - - :rtype: bool - """ - return self._tag == 'user_managed' - - def is_company_managed(self): - """ - Check if the union tag is ``company_managed``. - - :rtype: bool - """ - return self._tag == 'company_managed' - - def is_system_managed(self): - """ - Check if the union tag is ``system_managed``. - - :rtype: bool - """ - return self._tag == 'system_managed' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'GroupManagementType(%r, %r)' % (self._tag, self._value) - -GroupManagementType_validator = bv.Union(GroupManagementType) - -class GroupSummary(object): - """ - Information about a group. - - :ivar group_external_id: External ID of group. This is an arbitrary ID that - an admin can attach to a group. - :ivar member_count: The number of members in the group. - :ivar group_management_type: Who is allowed to manage the group. - """ - - __slots__ = [ - '_group_name_value', - '_group_name_present', - '_group_id_value', - '_group_id_present', - '_group_external_id_value', - '_group_external_id_present', - '_member_count_value', - '_member_count_present', - '_group_management_type_value', - '_group_management_type_present', - ] - - _has_required_fields = True - - def __init__(self, - group_name=None, - group_id=None, - group_management_type=None, - group_external_id=None, - member_count=None): - self._group_name_value = None - self._group_name_present = False - self._group_id_value = None - self._group_id_present = False - self._group_external_id_value = None - self._group_external_id_present = False - self._member_count_value = None - self._member_count_present = False - self._group_management_type_value = None - self._group_management_type_present = False - if group_name is not None: - self.group_name = group_name - if group_id is not None: - self.group_id = group_id - if group_external_id is not None: - self.group_external_id = group_external_id - if member_count is not None: - self.member_count = member_count - if group_management_type is not None: - self.group_management_type = group_management_type - - @property - def group_name(self): - """ - :rtype: str - """ - if self._group_name_present: - return self._group_name_value - else: - raise AttributeError("missing required field 'group_name'") - - @group_name.setter - def group_name(self, val): - val = self._group_name_validator.validate(val) - self._group_name_value = val - self._group_name_present = True - - @group_name.deleter - def group_name(self): - self._group_name_value = None - self._group_name_present = False - - @property - def group_id(self): - """ - :rtype: str - """ - if self._group_id_present: - return self._group_id_value - else: - raise AttributeError("missing required field 'group_id'") - - @group_id.setter - def group_id(self, val): - val = self._group_id_validator.validate(val) - self._group_id_value = val - self._group_id_present = True - - @group_id.deleter - def group_id(self): - self._group_id_value = None - self._group_id_present = False - - @property - def group_external_id(self): - """ - External ID of group. This is an arbitrary ID that an admin can attach - to a group. - - :rtype: str - """ - if self._group_external_id_present: - return self._group_external_id_value - else: - return None - - @group_external_id.setter - def group_external_id(self, val): - if val is None: - del self.group_external_id - return - val = self._group_external_id_validator.validate(val) - self._group_external_id_value = val - self._group_external_id_present = True - - @group_external_id.deleter - def group_external_id(self): - self._group_external_id_value = None - self._group_external_id_present = False - - @property - def member_count(self): - """ - The number of members in the group. - - :rtype: long - """ - if self._member_count_present: - return self._member_count_value - else: - return None - - @member_count.setter - def member_count(self, val): - if val is None: - del self.member_count - return - val = self._member_count_validator.validate(val) - self._member_count_value = val - self._member_count_present = True - - @member_count.deleter - def member_count(self): - self._member_count_value = None - self._member_count_present = False - - @property - def group_management_type(self): - """ - Who is allowed to manage the group. - - :rtype: GroupManagementType - """ - if self._group_management_type_present: - return self._group_management_type_value - else: - raise AttributeError("missing required field 'group_management_type'") - - @group_management_type.setter - def group_management_type(self, val): - self._group_management_type_validator.validate_type_only(val) - self._group_management_type_value = val - self._group_management_type_present = True - - @group_management_type.deleter - def group_management_type(self): - self._group_management_type_value = None - self._group_management_type_present = False - - def __repr__(self): - return 'GroupSummary(group_name={!r}, group_id={!r}, group_management_type={!r}, group_external_id={!r}, member_count={!r})'.format( - self._group_name_value, - self._group_id_value, - self._group_management_type_value, - self._group_external_id_value, - self._member_count_value, - ) - -GroupSummary_validator = bv.Struct(GroupSummary) - -class GroupType(bb.Union): - """ - The group type determines how a group is created and managed. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar team: A group to which team members are automatically added. - Applicable to `team folders `_ only. - :ivar user_managed: A group is created and managed by a user. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - team = None - # Attribute is overwritten below the class definition - user_managed = None - # Attribute is overwritten below the class definition - other = None - - def is_team(self): - """ - Check if the union tag is ``team``. - - :rtype: bool - """ - return self._tag == 'team' - - def is_user_managed(self): - """ - Check if the union tag is ``user_managed``. - - :rtype: bool - """ - return self._tag == 'user_managed' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'GroupType(%r, %r)' % (self._tag, self._value) - -GroupType_validator = bv.Union(GroupType) - -class TimeRange(object): - """ - Time range. - - :ivar start_time: Optional starting time (inclusive). - :ivar end_time: Optional ending time (exclusive). - """ - - __slots__ = [ - '_start_time_value', - '_start_time_present', - '_end_time_value', - '_end_time_present', - ] - - _has_required_fields = False - - def __init__(self, - start_time=None, - end_time=None): - self._start_time_value = None - self._start_time_present = False - self._end_time_value = None - self._end_time_present = False - if start_time is not None: - self.start_time = start_time - if end_time is not None: - self.end_time = end_time - - @property - def start_time(self): - """ - Optional starting time (inclusive). - - :rtype: datetime.datetime - """ - if self._start_time_present: - return self._start_time_value - else: - return None - - @start_time.setter - def start_time(self, val): - if val is None: - del self.start_time - return - val = self._start_time_validator.validate(val) - self._start_time_value = val - self._start_time_present = True - - @start_time.deleter - def start_time(self): - self._start_time_value = None - self._start_time_present = False - - @property - def end_time(self): - """ - Optional ending time (exclusive). - - :rtype: datetime.datetime - """ - if self._end_time_present: - return self._end_time_value - else: - return None - - @end_time.setter - def end_time(self, val): - if val is None: - del self.end_time - return - val = self._end_time_validator.validate(val) - self._end_time_value = val - self._end_time_present = True - - @end_time.deleter - def end_time(self): - self._end_time_value = None - self._end_time_present = False - - def __repr__(self): - return 'TimeRange(start_time={!r}, end_time={!r})'.format( - self._start_time_value, - self._end_time_value, - ) - -TimeRange_validator = bv.Struct(TimeRange) - -GroupExternalId_validator = bv.String() -GroupId_validator = bv.String() -MemberExternalId_validator = bv.String(max_length=64) -ResellerId_validator = bv.String() -TeamMemberId_validator = bv.String() -GroupManagementType._user_managed_validator = bv.Void() -GroupManagementType._company_managed_validator = bv.Void() -GroupManagementType._system_managed_validator = bv.Void() -GroupManagementType._other_validator = bv.Void() -GroupManagementType._tagmap = { - 'user_managed': GroupManagementType._user_managed_validator, - 'company_managed': GroupManagementType._company_managed_validator, - 'system_managed': GroupManagementType._system_managed_validator, - 'other': GroupManagementType._other_validator, -} - -GroupManagementType.user_managed = GroupManagementType('user_managed') -GroupManagementType.company_managed = GroupManagementType('company_managed') -GroupManagementType.system_managed = GroupManagementType('system_managed') -GroupManagementType.other = GroupManagementType('other') - -GroupSummary._group_name_validator = bv.String() -GroupSummary._group_id_validator = GroupId_validator -GroupSummary._group_external_id_validator = bv.Nullable(GroupExternalId_validator) -GroupSummary._member_count_validator = bv.Nullable(bv.UInt32()) -GroupSummary._group_management_type_validator = GroupManagementType_validator -GroupSummary._all_field_names_ = set([ - 'group_name', - 'group_id', - 'group_external_id', - 'member_count', - 'group_management_type', -]) -GroupSummary._all_fields_ = [ - ('group_name', GroupSummary._group_name_validator), - ('group_id', GroupSummary._group_id_validator), - ('group_external_id', GroupSummary._group_external_id_validator), - ('member_count', GroupSummary._member_count_validator), - ('group_management_type', GroupSummary._group_management_type_validator), -] - -GroupType._team_validator = bv.Void() -GroupType._user_managed_validator = bv.Void() -GroupType._other_validator = bv.Void() -GroupType._tagmap = { - 'team': GroupType._team_validator, - 'user_managed': GroupType._user_managed_validator, - 'other': GroupType._other_validator, -} - -GroupType.team = GroupType('team') -GroupType.user_managed = GroupType('user_managed') -GroupType.other = GroupType('other') - -TimeRange._start_time_validator = bv.Nullable(common.DropboxTimestamp_validator) -TimeRange._end_time_validator = bv.Nullable(common.DropboxTimestamp_validator) -TimeRange._all_field_names_ = set([ - 'start_time', - 'end_time', -]) -TimeRange._all_fields_ = [ - ('start_time', TimeRange._start_time_validator), - ('end_time', TimeRange._end_time_validator), -] - -ROUTES = { -} - diff --git a/resources/lib/dropbox/team_log.py b/resources/lib/dropbox/team_log.py deleted file mode 100644 index 3b29014..0000000 --- a/resources/lib/dropbox/team_log.py +++ /dev/null @@ -1,41817 +0,0 @@ -# -*- coding: utf-8 -*- -# Auto-generated by Stone, do not modify. -# flake8: noqa -# pylint: skip-file -try: - from . import stone_validators as bv - from . import stone_base as bb -except (SystemError, ValueError): - # Catch errors raised when importing a relative module when not in a package. - # This makes testing this file directly (outside of a package) easier. - import stone_validators as bv - import stone_base as bb - -try: - from . import ( - common, - files, - team_common, - team_policies, - users_common, - ) -except (SystemError, ValueError): - import common - import files - import team_common - import team_policies - import users_common - -class AccessMethodLogInfo(bb.Union): - """ - Indicates the method in which the action was performed. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar SessionLogInfo end_user: End user session details. - :ivar WebSessionLogInfo sign_in_as: Sign in as session details. - :ivar WebSessionLogInfo content_manager: Content manager session details. - :ivar WebSessionLogInfo admin_console: Admin console session details. - :ivar ApiSessionLogInfo api: Api session details. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def end_user(cls, val): - """ - Create an instance of this class set to the ``end_user`` tag with value - ``val``. - - :param SessionLogInfo val: - :rtype: AccessMethodLogInfo - """ - return cls('end_user', val) - - @classmethod - def sign_in_as(cls, val): - """ - Create an instance of this class set to the ``sign_in_as`` tag with - value ``val``. - - :param WebSessionLogInfo val: - :rtype: AccessMethodLogInfo - """ - return cls('sign_in_as', val) - - @classmethod - def content_manager(cls, val): - """ - Create an instance of this class set to the ``content_manager`` tag with - value ``val``. - - :param WebSessionLogInfo val: - :rtype: AccessMethodLogInfo - """ - return cls('content_manager', val) - - @classmethod - def admin_console(cls, val): - """ - Create an instance of this class set to the ``admin_console`` tag with - value ``val``. - - :param WebSessionLogInfo val: - :rtype: AccessMethodLogInfo - """ - return cls('admin_console', val) - - @classmethod - def api(cls, val): - """ - Create an instance of this class set to the ``api`` tag with value - ``val``. - - :param ApiSessionLogInfo val: - :rtype: AccessMethodLogInfo - """ - return cls('api', val) - - def is_end_user(self): - """ - Check if the union tag is ``end_user``. - - :rtype: bool - """ - return self._tag == 'end_user' - - def is_sign_in_as(self): - """ - Check if the union tag is ``sign_in_as``. - - :rtype: bool - """ - return self._tag == 'sign_in_as' - - def is_content_manager(self): - """ - Check if the union tag is ``content_manager``. - - :rtype: bool - """ - return self._tag == 'content_manager' - - def is_admin_console(self): - """ - Check if the union tag is ``admin_console``. - - :rtype: bool - """ - return self._tag == 'admin_console' - - def is_api(self): - """ - Check if the union tag is ``api``. - - :rtype: bool - """ - return self._tag == 'api' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_end_user(self): - """ - End user session details. - - Only call this if :meth:`is_end_user` is true. - - :rtype: SessionLogInfo - """ - if not self.is_end_user(): - raise AttributeError("tag 'end_user' not set") - return self._value - - def get_sign_in_as(self): - """ - Sign in as session details. - - Only call this if :meth:`is_sign_in_as` is true. - - :rtype: WebSessionLogInfo - """ - if not self.is_sign_in_as(): - raise AttributeError("tag 'sign_in_as' not set") - return self._value - - def get_content_manager(self): - """ - Content manager session details. - - Only call this if :meth:`is_content_manager` is true. - - :rtype: WebSessionLogInfo - """ - if not self.is_content_manager(): - raise AttributeError("tag 'content_manager' not set") - return self._value - - def get_admin_console(self): - """ - Admin console session details. - - Only call this if :meth:`is_admin_console` is true. - - :rtype: WebSessionLogInfo - """ - if not self.is_admin_console(): - raise AttributeError("tag 'admin_console' not set") - return self._value - - def get_api(self): - """ - Api session details. - - Only call this if :meth:`is_api` is true. - - :rtype: ApiSessionLogInfo - """ - if not self.is_api(): - raise AttributeError("tag 'api' not set") - return self._value - - def __repr__(self): - return 'AccessMethodLogInfo(%r, %r)' % (self._tag, self._value) - -AccessMethodLogInfo_validator = bv.Union(AccessMethodLogInfo) - -class AccountCaptureAvailability(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - unavailable = None - # Attribute is overwritten below the class definition - available = None - # Attribute is overwritten below the class definition - other = None - - def is_unavailable(self): - """ - Check if the union tag is ``unavailable``. - - :rtype: bool - """ - return self._tag == 'unavailable' - - def is_available(self): - """ - Check if the union tag is ``available``. - - :rtype: bool - """ - return self._tag == 'available' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'AccountCaptureAvailability(%r, %r)' % (self._tag, self._value) - -AccountCaptureAvailability_validator = bv.Union(AccountCaptureAvailability) - -class AccountCaptureChangeAvailabilityDetails(object): - """ - Granted or revoked the option to enable account capture on domains belonging - to the team. - - :ivar new_value: New account capture availabilty value. - :ivar previous_value: Previous account capture availabilty value. Might be - missing due to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New account capture availabilty value. - - :rtype: AccountCaptureAvailability - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous account capture availabilty value. Might be missing due to - historical data gap. - - :rtype: AccountCaptureAvailability - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'AccountCaptureChangeAvailabilityDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -AccountCaptureChangeAvailabilityDetails_validator = bv.Struct(AccountCaptureChangeAvailabilityDetails) - -class AccountCaptureChangePolicyDetails(object): - """ - Changed the account capture policy on a domain belonging to the team. - - :ivar new_value: New account capture policy. - :ivar previous_value: Previous account capture policy. Might be missing due - to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New account capture policy. - - :rtype: AccountCapturePolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous account capture policy. Might be missing due to historical data - gap. - - :rtype: AccountCapturePolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'AccountCaptureChangePolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -AccountCaptureChangePolicyDetails_validator = bv.Struct(AccountCaptureChangePolicyDetails) - -class AccountCaptureMigrateAccountDetails(object): - """ - Account captured user migrated their account to the team. - - :ivar domain_name: Domain name. - """ - - __slots__ = [ - '_domain_name_value', - '_domain_name_present', - ] - - _has_required_fields = True - - def __init__(self, - domain_name=None): - self._domain_name_value = None - self._domain_name_present = False - if domain_name is not None: - self.domain_name = domain_name - - @property - def domain_name(self): - """ - Domain name. - - :rtype: str - """ - if self._domain_name_present: - return self._domain_name_value - else: - raise AttributeError("missing required field 'domain_name'") - - @domain_name.setter - def domain_name(self, val): - val = self._domain_name_validator.validate(val) - self._domain_name_value = val - self._domain_name_present = True - - @domain_name.deleter - def domain_name(self): - self._domain_name_value = None - self._domain_name_present = False - - def __repr__(self): - return 'AccountCaptureMigrateAccountDetails(domain_name={!r})'.format( - self._domain_name_value, - ) - -AccountCaptureMigrateAccountDetails_validator = bv.Struct(AccountCaptureMigrateAccountDetails) - -class AccountCapturePolicy(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - disabled = None - # Attribute is overwritten below the class definition - invited_users = None - # Attribute is overwritten below the class definition - all_users = None - # Attribute is overwritten below the class definition - other = None - - def is_disabled(self): - """ - Check if the union tag is ``disabled``. - - :rtype: bool - """ - return self._tag == 'disabled' - - def is_invited_users(self): - """ - Check if the union tag is ``invited_users``. - - :rtype: bool - """ - return self._tag == 'invited_users' - - def is_all_users(self): - """ - Check if the union tag is ``all_users``. - - :rtype: bool - """ - return self._tag == 'all_users' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'AccountCapturePolicy(%r, %r)' % (self._tag, self._value) - -AccountCapturePolicy_validator = bv.Union(AccountCapturePolicy) - -class AccountCaptureRelinquishAccountDetails(object): - """ - Account captured user relinquished their account by changing the email - address associated with it. - - :ivar domain_name: Domain name. - """ - - __slots__ = [ - '_domain_name_value', - '_domain_name_present', - ] - - _has_required_fields = True - - def __init__(self, - domain_name=None): - self._domain_name_value = None - self._domain_name_present = False - if domain_name is not None: - self.domain_name = domain_name - - @property - def domain_name(self): - """ - Domain name. - - :rtype: str - """ - if self._domain_name_present: - return self._domain_name_value - else: - raise AttributeError("missing required field 'domain_name'") - - @domain_name.setter - def domain_name(self, val): - val = self._domain_name_validator.validate(val) - self._domain_name_value = val - self._domain_name_present = True - - @domain_name.deleter - def domain_name(self): - self._domain_name_value = None - self._domain_name_present = False - - def __repr__(self): - return 'AccountCaptureRelinquishAccountDetails(domain_name={!r})'.format( - self._domain_name_value, - ) - -AccountCaptureRelinquishAccountDetails_validator = bv.Struct(AccountCaptureRelinquishAccountDetails) - -class ActorLogInfo(bb.Union): - """ - The entity who performed the action. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar UserLogInfo user: The user who did the action. - :ivar UserLogInfo admin: The admin who did the action. - :ivar AppLogInfo app: The application who did the action. - :ivar ResellerLogInfo reseller: Action done by reseller. - :ivar dropbox: Action done by Dropbox. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - dropbox = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def user(cls, val): - """ - Create an instance of this class set to the ``user`` tag with value - ``val``. - - :param UserLogInfo val: - :rtype: ActorLogInfo - """ - return cls('user', val) - - @classmethod - def admin(cls, val): - """ - Create an instance of this class set to the ``admin`` tag with value - ``val``. - - :param UserLogInfo val: - :rtype: ActorLogInfo - """ - return cls('admin', val) - - @classmethod - def app(cls, val): - """ - Create an instance of this class set to the ``app`` tag with value - ``val``. - - :param AppLogInfo val: - :rtype: ActorLogInfo - """ - return cls('app', val) - - @classmethod - def reseller(cls, val): - """ - Create an instance of this class set to the ``reseller`` tag with value - ``val``. - - :param ResellerLogInfo val: - :rtype: ActorLogInfo - """ - return cls('reseller', val) - - def is_user(self): - """ - Check if the union tag is ``user``. - - :rtype: bool - """ - return self._tag == 'user' - - def is_admin(self): - """ - Check if the union tag is ``admin``. - - :rtype: bool - """ - return self._tag == 'admin' - - def is_app(self): - """ - Check if the union tag is ``app``. - - :rtype: bool - """ - return self._tag == 'app' - - def is_reseller(self): - """ - Check if the union tag is ``reseller``. - - :rtype: bool - """ - return self._tag == 'reseller' - - def is_dropbox(self): - """ - Check if the union tag is ``dropbox``. - - :rtype: bool - """ - return self._tag == 'dropbox' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_user(self): - """ - The user who did the action. - - Only call this if :meth:`is_user` is true. - - :rtype: UserLogInfo - """ - if not self.is_user(): - raise AttributeError("tag 'user' not set") - return self._value - - def get_admin(self): - """ - The admin who did the action. - - Only call this if :meth:`is_admin` is true. - - :rtype: UserLogInfo - """ - if not self.is_admin(): - raise AttributeError("tag 'admin' not set") - return self._value - - def get_app(self): - """ - The application who did the action. - - Only call this if :meth:`is_app` is true. - - :rtype: AppLogInfo - """ - if not self.is_app(): - raise AttributeError("tag 'app' not set") - return self._value - - def get_reseller(self): - """ - Action done by reseller. - - Only call this if :meth:`is_reseller` is true. - - :rtype: ResellerLogInfo - """ - if not self.is_reseller(): - raise AttributeError("tag 'reseller' not set") - return self._value - - def __repr__(self): - return 'ActorLogInfo(%r, %r)' % (self._tag, self._value) - -ActorLogInfo_validator = bv.Union(ActorLogInfo) - -class AdminRole(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - user = None - # Attribute is overwritten below the class definition - limited_admin = None - # Attribute is overwritten below the class definition - support_admin = None - # Attribute is overwritten below the class definition - user_management_admin = None - # Attribute is overwritten below the class definition - team_admin = None - # Attribute is overwritten below the class definition - other = None - - def is_user(self): - """ - Check if the union tag is ``user``. - - :rtype: bool - """ - return self._tag == 'user' - - def is_limited_admin(self): - """ - Check if the union tag is ``limited_admin``. - - :rtype: bool - """ - return self._tag == 'limited_admin' - - def is_support_admin(self): - """ - Check if the union tag is ``support_admin``. - - :rtype: bool - """ - return self._tag == 'support_admin' - - def is_user_management_admin(self): - """ - Check if the union tag is ``user_management_admin``. - - :rtype: bool - """ - return self._tag == 'user_management_admin' - - def is_team_admin(self): - """ - Check if the union tag is ``team_admin``. - - :rtype: bool - """ - return self._tag == 'team_admin' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'AdminRole(%r, %r)' % (self._tag, self._value) - -AdminRole_validator = bv.Union(AdminRole) - -class AllowDownloadDisabledDetails(object): - """ - Disabled allow downloads. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'AllowDownloadDisabledDetails()' - -AllowDownloadDisabledDetails_validator = bv.Struct(AllowDownloadDisabledDetails) - -class AllowDownloadEnabledDetails(object): - """ - Enabled allow downloads. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'AllowDownloadEnabledDetails()' - -AllowDownloadEnabledDetails_validator = bv.Struct(AllowDownloadEnabledDetails) - -class ApiSessionLogInfo(object): - """ - Api session. - - :ivar request_id: Api request ID. - """ - - __slots__ = [ - '_request_id_value', - '_request_id_present', - ] - - _has_required_fields = True - - def __init__(self, - request_id=None): - self._request_id_value = None - self._request_id_present = False - if request_id is not None: - self.request_id = request_id - - @property - def request_id(self): - """ - Api request ID. - - :rtype: str - """ - if self._request_id_present: - return self._request_id_value - else: - raise AttributeError("missing required field 'request_id'") - - @request_id.setter - def request_id(self, val): - val = self._request_id_validator.validate(val) - self._request_id_value = val - self._request_id_present = True - - @request_id.deleter - def request_id(self): - self._request_id_value = None - self._request_id_present = False - - def __repr__(self): - return 'ApiSessionLogInfo(request_id={!r})'.format( - self._request_id_value, - ) - -ApiSessionLogInfo_validator = bv.Struct(ApiSessionLogInfo) - -class AppLinkTeamDetails(object): - """ - Linked an app for team. - - :ivar app_info: Relevant application details. - """ - - __slots__ = [ - '_app_info_value', - '_app_info_present', - ] - - _has_required_fields = True - - def __init__(self, - app_info=None): - self._app_info_value = None - self._app_info_present = False - if app_info is not None: - self.app_info = app_info - - @property - def app_info(self): - """ - Relevant application details. - - :rtype: AppLogInfo - """ - if self._app_info_present: - return self._app_info_value - else: - raise AttributeError("missing required field 'app_info'") - - @app_info.setter - def app_info(self, val): - self._app_info_validator.validate_type_only(val) - self._app_info_value = val - self._app_info_present = True - - @app_info.deleter - def app_info(self): - self._app_info_value = None - self._app_info_present = False - - def __repr__(self): - return 'AppLinkTeamDetails(app_info={!r})'.format( - self._app_info_value, - ) - -AppLinkTeamDetails_validator = bv.Struct(AppLinkTeamDetails) - -class AppLinkUserDetails(object): - """ - Linked an app for team member. - - :ivar app_info: Relevant application details. - """ - - __slots__ = [ - '_app_info_value', - '_app_info_present', - ] - - _has_required_fields = True - - def __init__(self, - app_info=None): - self._app_info_value = None - self._app_info_present = False - if app_info is not None: - self.app_info = app_info - - @property - def app_info(self): - """ - Relevant application details. - - :rtype: AppLogInfo - """ - if self._app_info_present: - return self._app_info_value - else: - raise AttributeError("missing required field 'app_info'") - - @app_info.setter - def app_info(self, val): - self._app_info_validator.validate_type_only(val) - self._app_info_value = val - self._app_info_present = True - - @app_info.deleter - def app_info(self): - self._app_info_value = None - self._app_info_present = False - - def __repr__(self): - return 'AppLinkUserDetails(app_info={!r})'.format( - self._app_info_value, - ) - -AppLinkUserDetails_validator = bv.Struct(AppLinkUserDetails) - -class AppLogInfo(object): - """ - App's logged information. - - :ivar app_id: App unique ID. Might be missing due to historical data gap. - :ivar display_name: App display name. Might be missing due to historical - data gap. - """ - - __slots__ = [ - '_app_id_value', - '_app_id_present', - '_display_name_value', - '_display_name_present', - ] - - _has_required_fields = False - - def __init__(self, - app_id=None, - display_name=None): - self._app_id_value = None - self._app_id_present = False - self._display_name_value = None - self._display_name_present = False - if app_id is not None: - self.app_id = app_id - if display_name is not None: - self.display_name = display_name - - @property - def app_id(self): - """ - App unique ID. Might be missing due to historical data gap. - - :rtype: str - """ - if self._app_id_present: - return self._app_id_value - else: - return None - - @app_id.setter - def app_id(self, val): - if val is None: - del self.app_id - return - val = self._app_id_validator.validate(val) - self._app_id_value = val - self._app_id_present = True - - @app_id.deleter - def app_id(self): - self._app_id_value = None - self._app_id_present = False - - @property - def display_name(self): - """ - App display name. Might be missing due to historical data gap. - - :rtype: str - """ - if self._display_name_present: - return self._display_name_value - else: - return None - - @display_name.setter - def display_name(self, val): - if val is None: - del self.display_name - return - val = self._display_name_validator.validate(val) - self._display_name_value = val - self._display_name_present = True - - @display_name.deleter - def display_name(self): - self._display_name_value = None - self._display_name_present = False - - def __repr__(self): - return 'AppLogInfo(app_id={!r}, display_name={!r})'.format( - self._app_id_value, - self._display_name_value, - ) - -AppLogInfo_validator = bv.StructTree(AppLogInfo) - -class AppUnlinkTeamDetails(object): - """ - Unlinked an app for team. - - :ivar app_info: Relevant application details. - """ - - __slots__ = [ - '_app_info_value', - '_app_info_present', - ] - - _has_required_fields = True - - def __init__(self, - app_info=None): - self._app_info_value = None - self._app_info_present = False - if app_info is not None: - self.app_info = app_info - - @property - def app_info(self): - """ - Relevant application details. - - :rtype: AppLogInfo - """ - if self._app_info_present: - return self._app_info_value - else: - raise AttributeError("missing required field 'app_info'") - - @app_info.setter - def app_info(self, val): - self._app_info_validator.validate_type_only(val) - self._app_info_value = val - self._app_info_present = True - - @app_info.deleter - def app_info(self): - self._app_info_value = None - self._app_info_present = False - - def __repr__(self): - return 'AppUnlinkTeamDetails(app_info={!r})'.format( - self._app_info_value, - ) - -AppUnlinkTeamDetails_validator = bv.Struct(AppUnlinkTeamDetails) - -class AppUnlinkUserDetails(object): - """ - Unlinked an app for team member. - - :ivar app_info: Relevant application details. - """ - - __slots__ = [ - '_app_info_value', - '_app_info_present', - ] - - _has_required_fields = True - - def __init__(self, - app_info=None): - self._app_info_value = None - self._app_info_present = False - if app_info is not None: - self.app_info = app_info - - @property - def app_info(self): - """ - Relevant application details. - - :rtype: AppLogInfo - """ - if self._app_info_present: - return self._app_info_value - else: - raise AttributeError("missing required field 'app_info'") - - @app_info.setter - def app_info(self, val): - self._app_info_validator.validate_type_only(val) - self._app_info_value = val - self._app_info_present = True - - @app_info.deleter - def app_info(self): - self._app_info_value = None - self._app_info_present = False - - def __repr__(self): - return 'AppUnlinkUserDetails(app_info={!r})'.format( - self._app_info_value, - ) - -AppUnlinkUserDetails_validator = bv.Struct(AppUnlinkUserDetails) - -class AssetLogInfo(bb.Union): - """ - Asset details. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar FileLogInfo file: File's details. - :ivar FolderLogInfo folder: Folder's details. - :ivar PaperDocumentLogInfo paper_document: Paper docuement's details. - :ivar PaperFolderLogInfo paper_folder: Paper folder's details. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def file(cls, val): - """ - Create an instance of this class set to the ``file`` tag with value - ``val``. - - :param FileLogInfo val: - :rtype: AssetLogInfo - """ - return cls('file', val) - - @classmethod - def folder(cls, val): - """ - Create an instance of this class set to the ``folder`` tag with value - ``val``. - - :param FolderLogInfo val: - :rtype: AssetLogInfo - """ - return cls('folder', val) - - @classmethod - def paper_document(cls, val): - """ - Create an instance of this class set to the ``paper_document`` tag with - value ``val``. - - :param PaperDocumentLogInfo val: - :rtype: AssetLogInfo - """ - return cls('paper_document', val) - - @classmethod - def paper_folder(cls, val): - """ - Create an instance of this class set to the ``paper_folder`` tag with - value ``val``. - - :param PaperFolderLogInfo val: - :rtype: AssetLogInfo - """ - return cls('paper_folder', val) - - def is_file(self): - """ - Check if the union tag is ``file``. - - :rtype: bool - """ - return self._tag == 'file' - - def is_folder(self): - """ - Check if the union tag is ``folder``. - - :rtype: bool - """ - return self._tag == 'folder' - - def is_paper_document(self): - """ - Check if the union tag is ``paper_document``. - - :rtype: bool - """ - return self._tag == 'paper_document' - - def is_paper_folder(self): - """ - Check if the union tag is ``paper_folder``. - - :rtype: bool - """ - return self._tag == 'paper_folder' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_file(self): - """ - File's details. - - Only call this if :meth:`is_file` is true. - - :rtype: FileLogInfo - """ - if not self.is_file(): - raise AttributeError("tag 'file' not set") - return self._value - - def get_folder(self): - """ - Folder's details. - - Only call this if :meth:`is_folder` is true. - - :rtype: FolderLogInfo - """ - if not self.is_folder(): - raise AttributeError("tag 'folder' not set") - return self._value - - def get_paper_document(self): - """ - Paper docuement's details. - - Only call this if :meth:`is_paper_document` is true. - - :rtype: PaperDocumentLogInfo - """ - if not self.is_paper_document(): - raise AttributeError("tag 'paper_document' not set") - return self._value - - def get_paper_folder(self): - """ - Paper folder's details. - - Only call this if :meth:`is_paper_folder` is true. - - :rtype: PaperFolderLogInfo - """ - if not self.is_paper_folder(): - raise AttributeError("tag 'paper_folder' not set") - return self._value - - def __repr__(self): - return 'AssetLogInfo(%r, %r)' % (self._tag, self._value) - -AssetLogInfo_validator = bv.Union(AssetLogInfo) - -class Certificate(object): - """ - Certificate details. - - :ivar subject: Certificate subject. - :ivar issuer: Certificate issuer. - :ivar issue_date: Certificate issue date. - :ivar expiration_date: Certificate expiration date. - :ivar serial_number: Certificate serial number. - :ivar sha1_fingerprint: Certificate sha1 fingerprint. - :ivar common_name: Certificate common name. - """ - - __slots__ = [ - '_subject_value', - '_subject_present', - '_issuer_value', - '_issuer_present', - '_issue_date_value', - '_issue_date_present', - '_expiration_date_value', - '_expiration_date_present', - '_serial_number_value', - '_serial_number_present', - '_sha1_fingerprint_value', - '_sha1_fingerprint_present', - '_common_name_value', - '_common_name_present', - ] - - _has_required_fields = True - - def __init__(self, - subject=None, - issuer=None, - issue_date=None, - expiration_date=None, - serial_number=None, - sha1_fingerprint=None, - common_name=None): - self._subject_value = None - self._subject_present = False - self._issuer_value = None - self._issuer_present = False - self._issue_date_value = None - self._issue_date_present = False - self._expiration_date_value = None - self._expiration_date_present = False - self._serial_number_value = None - self._serial_number_present = False - self._sha1_fingerprint_value = None - self._sha1_fingerprint_present = False - self._common_name_value = None - self._common_name_present = False - if subject is not None: - self.subject = subject - if issuer is not None: - self.issuer = issuer - if issue_date is not None: - self.issue_date = issue_date - if expiration_date is not None: - self.expiration_date = expiration_date - if serial_number is not None: - self.serial_number = serial_number - if sha1_fingerprint is not None: - self.sha1_fingerprint = sha1_fingerprint - if common_name is not None: - self.common_name = common_name - - @property - def subject(self): - """ - Certificate subject. - - :rtype: str - """ - if self._subject_present: - return self._subject_value - else: - raise AttributeError("missing required field 'subject'") - - @subject.setter - def subject(self, val): - val = self._subject_validator.validate(val) - self._subject_value = val - self._subject_present = True - - @subject.deleter - def subject(self): - self._subject_value = None - self._subject_present = False - - @property - def issuer(self): - """ - Certificate issuer. - - :rtype: str - """ - if self._issuer_present: - return self._issuer_value - else: - raise AttributeError("missing required field 'issuer'") - - @issuer.setter - def issuer(self, val): - val = self._issuer_validator.validate(val) - self._issuer_value = val - self._issuer_present = True - - @issuer.deleter - def issuer(self): - self._issuer_value = None - self._issuer_present = False - - @property - def issue_date(self): - """ - Certificate issue date. - - :rtype: str - """ - if self._issue_date_present: - return self._issue_date_value - else: - raise AttributeError("missing required field 'issue_date'") - - @issue_date.setter - def issue_date(self, val): - val = self._issue_date_validator.validate(val) - self._issue_date_value = val - self._issue_date_present = True - - @issue_date.deleter - def issue_date(self): - self._issue_date_value = None - self._issue_date_present = False - - @property - def expiration_date(self): - """ - Certificate expiration date. - - :rtype: str - """ - if self._expiration_date_present: - return self._expiration_date_value - else: - raise AttributeError("missing required field 'expiration_date'") - - @expiration_date.setter - def expiration_date(self, val): - val = self._expiration_date_validator.validate(val) - self._expiration_date_value = val - self._expiration_date_present = True - - @expiration_date.deleter - def expiration_date(self): - self._expiration_date_value = None - self._expiration_date_present = False - - @property - def serial_number(self): - """ - Certificate serial number. - - :rtype: str - """ - if self._serial_number_present: - return self._serial_number_value - else: - raise AttributeError("missing required field 'serial_number'") - - @serial_number.setter - def serial_number(self, val): - val = self._serial_number_validator.validate(val) - self._serial_number_value = val - self._serial_number_present = True - - @serial_number.deleter - def serial_number(self): - self._serial_number_value = None - self._serial_number_present = False - - @property - def sha1_fingerprint(self): - """ - Certificate sha1 fingerprint. - - :rtype: str - """ - if self._sha1_fingerprint_present: - return self._sha1_fingerprint_value - else: - raise AttributeError("missing required field 'sha1_fingerprint'") - - @sha1_fingerprint.setter - def sha1_fingerprint(self, val): - val = self._sha1_fingerprint_validator.validate(val) - self._sha1_fingerprint_value = val - self._sha1_fingerprint_present = True - - @sha1_fingerprint.deleter - def sha1_fingerprint(self): - self._sha1_fingerprint_value = None - self._sha1_fingerprint_present = False - - @property - def common_name(self): - """ - Certificate common name. - - :rtype: str - """ - if self._common_name_present: - return self._common_name_value - else: - raise AttributeError("missing required field 'common_name'") - - @common_name.setter - def common_name(self, val): - val = self._common_name_validator.validate(val) - self._common_name_value = val - self._common_name_present = True - - @common_name.deleter - def common_name(self): - self._common_name_value = None - self._common_name_present = False - - def __repr__(self): - return 'Certificate(subject={!r}, issuer={!r}, issue_date={!r}, expiration_date={!r}, serial_number={!r}, sha1_fingerprint={!r}, common_name={!r})'.format( - self._subject_value, - self._issuer_value, - self._issue_date_value, - self._expiration_date_value, - self._serial_number_value, - self._sha1_fingerprint_value, - self._common_name_value, - ) - -Certificate_validator = bv.Struct(Certificate) - -class CollectionShareDetails(object): - """ - Shared an album. - - :ivar album_name: Album name. - """ - - __slots__ = [ - '_album_name_value', - '_album_name_present', - ] - - _has_required_fields = True - - def __init__(self, - album_name=None): - self._album_name_value = None - self._album_name_present = False - if album_name is not None: - self.album_name = album_name - - @property - def album_name(self): - """ - Album name. - - :rtype: str - """ - if self._album_name_present: - return self._album_name_value - else: - raise AttributeError("missing required field 'album_name'") - - @album_name.setter - def album_name(self, val): - val = self._album_name_validator.validate(val) - self._album_name_value = val - self._album_name_present = True - - @album_name.deleter - def album_name(self): - self._album_name_value = None - self._album_name_present = False - - def __repr__(self): - return 'CollectionShareDetails(album_name={!r})'.format( - self._album_name_value, - ) - -CollectionShareDetails_validator = bv.Struct(CollectionShareDetails) - -class Confidentiality(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - confidential = None - # Attribute is overwritten below the class definition - non_confidential = None - # Attribute is overwritten below the class definition - other = None - - def is_confidential(self): - """ - Check if the union tag is ``confidential``. - - :rtype: bool - """ - return self._tag == 'confidential' - - def is_non_confidential(self): - """ - Check if the union tag is ``non_confidential``. - - :rtype: bool - """ - return self._tag == 'non_confidential' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'Confidentiality(%r, %r)' % (self._tag, self._value) - -Confidentiality_validator = bv.Union(Confidentiality) - -class ContentPermanentDeletePolicy(bb.Union): - """ - Policy for pemanent content deletion - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - disabled = None - # Attribute is overwritten below the class definition - enabled = None - # Attribute is overwritten below the class definition - other = None - - def is_disabled(self): - """ - Check if the union tag is ``disabled``. - - :rtype: bool - """ - return self._tag == 'disabled' - - def is_enabled(self): - """ - Check if the union tag is ``enabled``. - - :rtype: bool - """ - return self._tag == 'enabled' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'ContentPermanentDeletePolicy(%r, %r)' % (self._tag, self._value) - -ContentPermanentDeletePolicy_validator = bv.Union(ContentPermanentDeletePolicy) - -class ContextLogInfo(bb.Union): - """ - The primary entity on which the action was done. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar TeamMemberLogInfo team_member: Action was done on behalf of a team - member. - :ivar NonTeamMemberLogInfo non_team_member: Action was done on behalf of a - non team member. - :ivar team: Action was done on behalf of the team. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - team = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def team_member(cls, val): - """ - Create an instance of this class set to the ``team_member`` tag with - value ``val``. - - :param TeamMemberLogInfo val: - :rtype: ContextLogInfo - """ - return cls('team_member', val) - - @classmethod - def non_team_member(cls, val): - """ - Create an instance of this class set to the ``non_team_member`` tag with - value ``val``. - - :param NonTeamMemberLogInfo val: - :rtype: ContextLogInfo - """ - return cls('non_team_member', val) - - def is_team_member(self): - """ - Check if the union tag is ``team_member``. - - :rtype: bool - """ - return self._tag == 'team_member' - - def is_non_team_member(self): - """ - Check if the union tag is ``non_team_member``. - - :rtype: bool - """ - return self._tag == 'non_team_member' - - def is_team(self): - """ - Check if the union tag is ``team``. - - :rtype: bool - """ - return self._tag == 'team' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_team_member(self): - """ - Action was done on behalf of a team member. - - Only call this if :meth:`is_team_member` is true. - - :rtype: TeamMemberLogInfo - """ - if not self.is_team_member(): - raise AttributeError("tag 'team_member' not set") - return self._value - - def get_non_team_member(self): - """ - Action was done on behalf of a non team member. - - Only call this if :meth:`is_non_team_member` is true. - - :rtype: NonTeamMemberLogInfo - """ - if not self.is_non_team_member(): - raise AttributeError("tag 'non_team_member' not set") - return self._value - - def __repr__(self): - return 'ContextLogInfo(%r, %r)' % (self._tag, self._value) - -ContextLogInfo_validator = bv.Union(ContextLogInfo) - -class CreateFolderDetails(object): - """ - Created folders. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'CreateFolderDetails()' - -CreateFolderDetails_validator = bv.Struct(CreateFolderDetails) - -class DataPlacementRestrictionChangePolicyDetails(object): - """ - Set a restriction policy regarding the location of data centers where team - data resides. - - :ivar previous_value: Previous placement restriction. - :ivar new_value: New placement restriction. - """ - - __slots__ = [ - '_previous_value_value', - '_previous_value_present', - '_new_value_value', - '_new_value_present', - ] - - _has_required_fields = True - - def __init__(self, - previous_value=None, - new_value=None): - self._previous_value_value = None - self._previous_value_present = False - self._new_value_value = None - self._new_value_present = False - if previous_value is not None: - self.previous_value = previous_value - if new_value is not None: - self.new_value = new_value - - @property - def previous_value(self): - """ - Previous placement restriction. - - :rtype: PlacementRestriction - """ - if self._previous_value_present: - return self._previous_value_value - else: - raise AttributeError("missing required field 'previous_value'") - - @previous_value.setter - def previous_value(self, val): - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - @property - def new_value(self): - """ - New placement restriction. - - :rtype: PlacementRestriction - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - def __repr__(self): - return 'DataPlacementRestrictionChangePolicyDetails(previous_value={!r}, new_value={!r})'.format( - self._previous_value_value, - self._new_value_value, - ) - -DataPlacementRestrictionChangePolicyDetails_validator = bv.Struct(DataPlacementRestrictionChangePolicyDetails) - -class DataPlacementRestrictionSatisfyPolicyDetails(object): - """ - Satisfied a previously set restriction policy regarding the location of data - centers where team data resides (i.e. all data have been migrated according - to the restriction placed). - - :ivar placement_restriction: Placement restriction. - """ - - __slots__ = [ - '_placement_restriction_value', - '_placement_restriction_present', - ] - - _has_required_fields = True - - def __init__(self, - placement_restriction=None): - self._placement_restriction_value = None - self._placement_restriction_present = False - if placement_restriction is not None: - self.placement_restriction = placement_restriction - - @property - def placement_restriction(self): - """ - Placement restriction. - - :rtype: PlacementRestriction - """ - if self._placement_restriction_present: - return self._placement_restriction_value - else: - raise AttributeError("missing required field 'placement_restriction'") - - @placement_restriction.setter - def placement_restriction(self, val): - self._placement_restriction_validator.validate_type_only(val) - self._placement_restriction_value = val - self._placement_restriction_present = True - - @placement_restriction.deleter - def placement_restriction(self): - self._placement_restriction_value = None - self._placement_restriction_present = False - - def __repr__(self): - return 'DataPlacementRestrictionSatisfyPolicyDetails(placement_restriction={!r})'.format( - self._placement_restriction_value, - ) - -DataPlacementRestrictionSatisfyPolicyDetails_validator = bv.Struct(DataPlacementRestrictionSatisfyPolicyDetails) - -class SessionLogInfo(object): - """ - Session's logged information. - - :ivar session_id: Session ID. Might be missing due to historical data gap. - """ - - __slots__ = [ - '_session_id_value', - '_session_id_present', - ] - - _has_required_fields = False - - def __init__(self, - session_id=None): - self._session_id_value = None - self._session_id_present = False - if session_id is not None: - self.session_id = session_id - - @property - def session_id(self): - """ - Session ID. Might be missing due to historical data gap. - - :rtype: str - """ - if self._session_id_present: - return self._session_id_value - else: - return None - - @session_id.setter - def session_id(self, val): - if val is None: - del self.session_id - return - val = self._session_id_validator.validate(val) - self._session_id_value = val - self._session_id_present = True - - @session_id.deleter - def session_id(self): - self._session_id_value = None - self._session_id_present = False - - def __repr__(self): - return 'SessionLogInfo(session_id={!r})'.format( - self._session_id_value, - ) - -SessionLogInfo_validator = bv.StructTree(SessionLogInfo) - -class DesktopSessionLogInfo(SessionLogInfo): - """ - Desktop session. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self, - session_id=None): - super(DesktopSessionLogInfo, self).__init__(session_id) - - def __repr__(self): - return 'DesktopSessionLogInfo(session_id={!r})'.format( - self._session_id_value, - ) - -DesktopSessionLogInfo_validator = bv.Struct(DesktopSessionLogInfo) - -class DeviceApprovalsChangeDesktopPolicyDetails(object): - """ - Set or removed a limit on the number of computers each team member can link - to their work Dropbox account. - - :ivar new_value: New desktop device approvals policy. Might be missing due - to historical data gap. - :ivar previous_value: Previous desktop device approvals policy. Might be - missing due to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = False - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New desktop device approvals policy. Might be missing due to historical - data gap. - - :rtype: DeviceApprovalsPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - return None - - @new_value.setter - def new_value(self, val): - if val is None: - del self.new_value - return - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous desktop device approvals policy. Might be missing due to - historical data gap. - - :rtype: DeviceApprovalsPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'DeviceApprovalsChangeDesktopPolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -DeviceApprovalsChangeDesktopPolicyDetails_validator = bv.Struct(DeviceApprovalsChangeDesktopPolicyDetails) - -class DeviceApprovalsChangeMobilePolicyDetails(object): - """ - Set or removed a limit on the number of mobiles devices each team member can - link to their work Dropbox account. - - :ivar new_value: New mobile device approvals policy. Might be missing due to - historical data gap. - :ivar previous_value: Previous mobile device approvals policy. Might be - missing due to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = False - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New mobile device approvals policy. Might be missing due to historical - data gap. - - :rtype: DeviceApprovalsPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - return None - - @new_value.setter - def new_value(self, val): - if val is None: - del self.new_value - return - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous mobile device approvals policy. Might be missing due to - historical data gap. - - :rtype: DeviceApprovalsPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'DeviceApprovalsChangeMobilePolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -DeviceApprovalsChangeMobilePolicyDetails_validator = bv.Struct(DeviceApprovalsChangeMobilePolicyDetails) - -class DeviceApprovalsChangeOverageActionDetails(object): - """ - Changed the action taken when a team member is already over the limits (e.g - when they join the team, an admin lowers limits, etc.). - - :ivar new_value: New over the limits policy. Might be missing due to - historical data gap. - :ivar previous_value: Previous over the limit policy. Might be missing due - to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = False - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New over the limits policy. Might be missing due to historical data gap. - - :rtype: team_policies.RolloutMethod_validator - """ - if self._new_value_present: - return self._new_value_value - else: - return None - - @new_value.setter - def new_value(self, val): - if val is None: - del self.new_value - return - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous over the limit policy. Might be missing due to historical data - gap. - - :rtype: team_policies.RolloutMethod_validator - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'DeviceApprovalsChangeOverageActionDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -DeviceApprovalsChangeOverageActionDetails_validator = bv.Struct(DeviceApprovalsChangeOverageActionDetails) - -class DeviceApprovalsChangeUnlinkActionDetails(object): - """ - Changed the action taken with respect to approval limits when a team member - unlinks an approved device. - - :ivar new_value: New device unlink policy. Might be missing due to - historical data gap. - :ivar previous_value: Previous device unlink policy. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = False - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New device unlink policy. Might be missing due to historical data gap. - - :rtype: DeviceUnlinkPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - return None - - @new_value.setter - def new_value(self, val): - if val is None: - del self.new_value - return - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous device unlink policy. Might be missing due to historical data - gap. - - :rtype: DeviceUnlinkPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'DeviceApprovalsChangeUnlinkActionDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -DeviceApprovalsChangeUnlinkActionDetails_validator = bv.Struct(DeviceApprovalsChangeUnlinkActionDetails) - -class DeviceApprovalsPolicy(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - unlimited = None - # Attribute is overwritten below the class definition - limited = None - # Attribute is overwritten below the class definition - other = None - - def is_unlimited(self): - """ - Check if the union tag is ``unlimited``. - - :rtype: bool - """ - return self._tag == 'unlimited' - - def is_limited(self): - """ - Check if the union tag is ``limited``. - - :rtype: bool - """ - return self._tag == 'limited' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'DeviceApprovalsPolicy(%r, %r)' % (self._tag, self._value) - -DeviceApprovalsPolicy_validator = bv.Union(DeviceApprovalsPolicy) - -class DeviceChangeIpDesktopDetails(object): - """ - IP address associated with active desktop session changed. - - :ivar device_info: Device information. - """ - - __slots__ = [ - '_device_info_value', - '_device_info_present', - ] - - _has_required_fields = True - - def __init__(self, - device_info=None): - self._device_info_value = None - self._device_info_present = False - if device_info is not None: - self.device_info = device_info - - @property - def device_info(self): - """ - Device information. - - :rtype: DeviceLogInfo - """ - if self._device_info_present: - return self._device_info_value - else: - raise AttributeError("missing required field 'device_info'") - - @device_info.setter - def device_info(self, val): - self._device_info_validator.validate_type_only(val) - self._device_info_value = val - self._device_info_present = True - - @device_info.deleter - def device_info(self): - self._device_info_value = None - self._device_info_present = False - - def __repr__(self): - return 'DeviceChangeIpDesktopDetails(device_info={!r})'.format( - self._device_info_value, - ) - -DeviceChangeIpDesktopDetails_validator = bv.Struct(DeviceChangeIpDesktopDetails) - -class DeviceChangeIpMobileDetails(object): - """ - IP address associated with active mobile session changed. - - :ivar device_info: Device information. - """ - - __slots__ = [ - '_device_info_value', - '_device_info_present', - ] - - _has_required_fields = True - - def __init__(self, - device_info=None): - self._device_info_value = None - self._device_info_present = False - if device_info is not None: - self.device_info = device_info - - @property - def device_info(self): - """ - Device information. - - :rtype: DeviceLogInfo - """ - if self._device_info_present: - return self._device_info_value - else: - raise AttributeError("missing required field 'device_info'") - - @device_info.setter - def device_info(self, val): - self._device_info_validator.validate_type_only(val) - self._device_info_value = val - self._device_info_present = True - - @device_info.deleter - def device_info(self): - self._device_info_value = None - self._device_info_present = False - - def __repr__(self): - return 'DeviceChangeIpMobileDetails(device_info={!r})'.format( - self._device_info_value, - ) - -DeviceChangeIpMobileDetails_validator = bv.Struct(DeviceChangeIpMobileDetails) - -class DeviceChangeIpWebDetails(object): - """ - IP address associated with active Web session changed. - - :ivar device_info: Device information. Might be missing due to historical - data gap. - :ivar user_agent: Web browser name. - """ - - __slots__ = [ - '_device_info_value', - '_device_info_present', - '_user_agent_value', - '_user_agent_present', - ] - - _has_required_fields = True - - def __init__(self, - user_agent=None, - device_info=None): - self._device_info_value = None - self._device_info_present = False - self._user_agent_value = None - self._user_agent_present = False - if device_info is not None: - self.device_info = device_info - if user_agent is not None: - self.user_agent = user_agent - - @property - def device_info(self): - """ - Device information. Might be missing due to historical data gap. - - :rtype: DeviceLogInfo - """ - if self._device_info_present: - return self._device_info_value - else: - return None - - @device_info.setter - def device_info(self, val): - if val is None: - del self.device_info - return - self._device_info_validator.validate_type_only(val) - self._device_info_value = val - self._device_info_present = True - - @device_info.deleter - def device_info(self): - self._device_info_value = None - self._device_info_present = False - - @property - def user_agent(self): - """ - Web browser name. - - :rtype: str - """ - if self._user_agent_present: - return self._user_agent_value - else: - raise AttributeError("missing required field 'user_agent'") - - @user_agent.setter - def user_agent(self, val): - val = self._user_agent_validator.validate(val) - self._user_agent_value = val - self._user_agent_present = True - - @user_agent.deleter - def user_agent(self): - self._user_agent_value = None - self._user_agent_present = False - - def __repr__(self): - return 'DeviceChangeIpWebDetails(user_agent={!r}, device_info={!r})'.format( - self._user_agent_value, - self._device_info_value, - ) - -DeviceChangeIpWebDetails_validator = bv.Struct(DeviceChangeIpWebDetails) - -class DeviceDeleteOnUnlinkFailDetails(object): - """ - Failed to delete all files from an unlinked device. - - :ivar device_info: Device information. - :ivar num_failures: The number of times that remote file deletion failed. - """ - - __slots__ = [ - '_device_info_value', - '_device_info_present', - '_num_failures_value', - '_num_failures_present', - ] - - _has_required_fields = True - - def __init__(self, - device_info=None, - num_failures=None): - self._device_info_value = None - self._device_info_present = False - self._num_failures_value = None - self._num_failures_present = False - if device_info is not None: - self.device_info = device_info - if num_failures is not None: - self.num_failures = num_failures - - @property - def device_info(self): - """ - Device information. - - :rtype: DeviceLogInfo - """ - if self._device_info_present: - return self._device_info_value - else: - raise AttributeError("missing required field 'device_info'") - - @device_info.setter - def device_info(self, val): - self._device_info_validator.validate_type_only(val) - self._device_info_value = val - self._device_info_present = True - - @device_info.deleter - def device_info(self): - self._device_info_value = None - self._device_info_present = False - - @property - def num_failures(self): - """ - The number of times that remote file deletion failed. - - :rtype: long - """ - if self._num_failures_present: - return self._num_failures_value - else: - raise AttributeError("missing required field 'num_failures'") - - @num_failures.setter - def num_failures(self, val): - val = self._num_failures_validator.validate(val) - self._num_failures_value = val - self._num_failures_present = True - - @num_failures.deleter - def num_failures(self): - self._num_failures_value = None - self._num_failures_present = False - - def __repr__(self): - return 'DeviceDeleteOnUnlinkFailDetails(device_info={!r}, num_failures={!r})'.format( - self._device_info_value, - self._num_failures_value, - ) - -DeviceDeleteOnUnlinkFailDetails_validator = bv.Struct(DeviceDeleteOnUnlinkFailDetails) - -class DeviceDeleteOnUnlinkSuccessDetails(object): - """ - Deleted all files from an unlinked device. - - :ivar device_info: Device information. - """ - - __slots__ = [ - '_device_info_value', - '_device_info_present', - ] - - _has_required_fields = True - - def __init__(self, - device_info=None): - self._device_info_value = None - self._device_info_present = False - if device_info is not None: - self.device_info = device_info - - @property - def device_info(self): - """ - Device information. - - :rtype: DeviceLogInfo - """ - if self._device_info_present: - return self._device_info_value - else: - raise AttributeError("missing required field 'device_info'") - - @device_info.setter - def device_info(self, val): - self._device_info_validator.validate_type_only(val) - self._device_info_value = val - self._device_info_present = True - - @device_info.deleter - def device_info(self): - self._device_info_value = None - self._device_info_present = False - - def __repr__(self): - return 'DeviceDeleteOnUnlinkSuccessDetails(device_info={!r})'.format( - self._device_info_value, - ) - -DeviceDeleteOnUnlinkSuccessDetails_validator = bv.Struct(DeviceDeleteOnUnlinkSuccessDetails) - -class DeviceLinkFailDetails(object): - """ - Failed to link a device. - - :ivar device_info: Device information. Might be missing due to historical - data gap. - :ivar device_type: A description of the device used while user approval - blocked. - """ - - __slots__ = [ - '_device_info_value', - '_device_info_present', - '_device_type_value', - '_device_type_present', - ] - - _has_required_fields = True - - def __init__(self, - device_type=None, - device_info=None): - self._device_info_value = None - self._device_info_present = False - self._device_type_value = None - self._device_type_present = False - if device_info is not None: - self.device_info = device_info - if device_type is not None: - self.device_type = device_type - - @property - def device_info(self): - """ - Device information. Might be missing due to historical data gap. - - :rtype: DeviceLogInfo - """ - if self._device_info_present: - return self._device_info_value - else: - return None - - @device_info.setter - def device_info(self, val): - if val is None: - del self.device_info - return - self._device_info_validator.validate_type_only(val) - self._device_info_value = val - self._device_info_present = True - - @device_info.deleter - def device_info(self): - self._device_info_value = None - self._device_info_present = False - - @property - def device_type(self): - """ - A description of the device used while user approval blocked. - - :rtype: DeviceType - """ - if self._device_type_present: - return self._device_type_value - else: - raise AttributeError("missing required field 'device_type'") - - @device_type.setter - def device_type(self, val): - self._device_type_validator.validate_type_only(val) - self._device_type_value = val - self._device_type_present = True - - @device_type.deleter - def device_type(self): - self._device_type_value = None - self._device_type_present = False - - def __repr__(self): - return 'DeviceLinkFailDetails(device_type={!r}, device_info={!r})'.format( - self._device_type_value, - self._device_info_value, - ) - -DeviceLinkFailDetails_validator = bv.Struct(DeviceLinkFailDetails) - -class DeviceLinkSuccessDetails(object): - """ - Linked a device. - - :ivar device_info: Device information. - """ - - __slots__ = [ - '_device_info_value', - '_device_info_present', - ] - - _has_required_fields = True - - def __init__(self, - device_info=None): - self._device_info_value = None - self._device_info_present = False - if device_info is not None: - self.device_info = device_info - - @property - def device_info(self): - """ - Device information. - - :rtype: DeviceLogInfo - """ - if self._device_info_present: - return self._device_info_value - else: - raise AttributeError("missing required field 'device_info'") - - @device_info.setter - def device_info(self, val): - self._device_info_validator.validate_type_only(val) - self._device_info_value = val - self._device_info_present = True - - @device_info.deleter - def device_info(self): - self._device_info_value = None - self._device_info_present = False - - def __repr__(self): - return 'DeviceLinkSuccessDetails(device_info={!r})'.format( - self._device_info_value, - ) - -DeviceLinkSuccessDetails_validator = bv.Struct(DeviceLinkSuccessDetails) - -class DeviceLogInfo(object): - """ - Device's logged information. - - :ivar device_id: Device unique id. Might be missing due to historical data - gap. - :ivar display_name: Device display name. Might be missing due to historical - data gap. - :ivar is_emm_managed: True if this device is emm managed, false otherwise. - Might be missing due to historical data gap. - :ivar platform: Device platform name. Might be missing due to historical - data gap. - :ivar mac_address: Device mac address. Might be missing due to historical - data gap. - :ivar os_version: Device OS version. Might be missing due to historical data - gap. - :ivar device_type: Device type. Might be missing due to historical data gap. - :ivar ip_address: IP address. Might be missing due to historical data gap. - :ivar last_activity: Last activity. Might be missing due to historical data - gap. - :ivar app_version: Linking app version. Might be missing due to historical - data gap. - """ - - __slots__ = [ - '_device_id_value', - '_device_id_present', - '_display_name_value', - '_display_name_present', - '_is_emm_managed_value', - '_is_emm_managed_present', - '_platform_value', - '_platform_present', - '_mac_address_value', - '_mac_address_present', - '_os_version_value', - '_os_version_present', - '_device_type_value', - '_device_type_present', - '_ip_address_value', - '_ip_address_present', - '_last_activity_value', - '_last_activity_present', - '_app_version_value', - '_app_version_present', - ] - - _has_required_fields = False - - def __init__(self, - device_id=None, - display_name=None, - is_emm_managed=None, - platform=None, - mac_address=None, - os_version=None, - device_type=None, - ip_address=None, - last_activity=None, - app_version=None): - self._device_id_value = None - self._device_id_present = False - self._display_name_value = None - self._display_name_present = False - self._is_emm_managed_value = None - self._is_emm_managed_present = False - self._platform_value = None - self._platform_present = False - self._mac_address_value = None - self._mac_address_present = False - self._os_version_value = None - self._os_version_present = False - self._device_type_value = None - self._device_type_present = False - self._ip_address_value = None - self._ip_address_present = False - self._last_activity_value = None - self._last_activity_present = False - self._app_version_value = None - self._app_version_present = False - if device_id is not None: - self.device_id = device_id - if display_name is not None: - self.display_name = display_name - if is_emm_managed is not None: - self.is_emm_managed = is_emm_managed - if platform is not None: - self.platform = platform - if mac_address is not None: - self.mac_address = mac_address - if os_version is not None: - self.os_version = os_version - if device_type is not None: - self.device_type = device_type - if ip_address is not None: - self.ip_address = ip_address - if last_activity is not None: - self.last_activity = last_activity - if app_version is not None: - self.app_version = app_version - - @property - def device_id(self): - """ - Device unique id. Might be missing due to historical data gap. - - :rtype: str - """ - if self._device_id_present: - return self._device_id_value - else: - return None - - @device_id.setter - def device_id(self, val): - if val is None: - del self.device_id - return - val = self._device_id_validator.validate(val) - self._device_id_value = val - self._device_id_present = True - - @device_id.deleter - def device_id(self): - self._device_id_value = None - self._device_id_present = False - - @property - def display_name(self): - """ - Device display name. Might be missing due to historical data gap. - - :rtype: str - """ - if self._display_name_present: - return self._display_name_value - else: - return None - - @display_name.setter - def display_name(self, val): - if val is None: - del self.display_name - return - val = self._display_name_validator.validate(val) - self._display_name_value = val - self._display_name_present = True - - @display_name.deleter - def display_name(self): - self._display_name_value = None - self._display_name_present = False - - @property - def is_emm_managed(self): - """ - True if this device is emm managed, false otherwise. Might be missing - due to historical data gap. - - :rtype: bool - """ - if self._is_emm_managed_present: - return self._is_emm_managed_value - else: - return None - - @is_emm_managed.setter - def is_emm_managed(self, val): - if val is None: - del self.is_emm_managed - return - val = self._is_emm_managed_validator.validate(val) - self._is_emm_managed_value = val - self._is_emm_managed_present = True - - @is_emm_managed.deleter - def is_emm_managed(self): - self._is_emm_managed_value = None - self._is_emm_managed_present = False - - @property - def platform(self): - """ - Device platform name. Might be missing due to historical data gap. - - :rtype: str - """ - if self._platform_present: - return self._platform_value - else: - return None - - @platform.setter - def platform(self, val): - if val is None: - del self.platform - return - val = self._platform_validator.validate(val) - self._platform_value = val - self._platform_present = True - - @platform.deleter - def platform(self): - self._platform_value = None - self._platform_present = False - - @property - def mac_address(self): - """ - Device mac address. Might be missing due to historical data gap. - - :rtype: str - """ - if self._mac_address_present: - return self._mac_address_value - else: - return None - - @mac_address.setter - def mac_address(self, val): - if val is None: - del self.mac_address - return - val = self._mac_address_validator.validate(val) - self._mac_address_value = val - self._mac_address_present = True - - @mac_address.deleter - def mac_address(self): - self._mac_address_value = None - self._mac_address_present = False - - @property - def os_version(self): - """ - Device OS version. Might be missing due to historical data gap. - - :rtype: str - """ - if self._os_version_present: - return self._os_version_value - else: - return None - - @os_version.setter - def os_version(self, val): - if val is None: - del self.os_version - return - val = self._os_version_validator.validate(val) - self._os_version_value = val - self._os_version_present = True - - @os_version.deleter - def os_version(self): - self._os_version_value = None - self._os_version_present = False - - @property - def device_type(self): - """ - Device type. Might be missing due to historical data gap. - - :rtype: str - """ - if self._device_type_present: - return self._device_type_value - else: - return None - - @device_type.setter - def device_type(self, val): - if val is None: - del self.device_type - return - val = self._device_type_validator.validate(val) - self._device_type_value = val - self._device_type_present = True - - @device_type.deleter - def device_type(self): - self._device_type_value = None - self._device_type_present = False - - @property - def ip_address(self): - """ - IP address. Might be missing due to historical data gap. - - :rtype: str - """ - if self._ip_address_present: - return self._ip_address_value - else: - return None - - @ip_address.setter - def ip_address(self, val): - if val is None: - del self.ip_address - return - val = self._ip_address_validator.validate(val) - self._ip_address_value = val - self._ip_address_present = True - - @ip_address.deleter - def ip_address(self): - self._ip_address_value = None - self._ip_address_present = False - - @property - def last_activity(self): - """ - Last activity. Might be missing due to historical data gap. - - :rtype: str - """ - if self._last_activity_present: - return self._last_activity_value - else: - return None - - @last_activity.setter - def last_activity(self, val): - if val is None: - del self.last_activity - return - val = self._last_activity_validator.validate(val) - self._last_activity_value = val - self._last_activity_present = True - - @last_activity.deleter - def last_activity(self): - self._last_activity_value = None - self._last_activity_present = False - - @property - def app_version(self): - """ - Linking app version. Might be missing due to historical data gap. - - :rtype: str - """ - if self._app_version_present: - return self._app_version_value - else: - return None - - @app_version.setter - def app_version(self, val): - if val is None: - del self.app_version - return - val = self._app_version_validator.validate(val) - self._app_version_value = val - self._app_version_present = True - - @app_version.deleter - def app_version(self): - self._app_version_value = None - self._app_version_present = False - - def __repr__(self): - return 'DeviceLogInfo(device_id={!r}, display_name={!r}, is_emm_managed={!r}, platform={!r}, mac_address={!r}, os_version={!r}, device_type={!r}, ip_address={!r}, last_activity={!r}, app_version={!r})'.format( - self._device_id_value, - self._display_name_value, - self._is_emm_managed_value, - self._platform_value, - self._mac_address_value, - self._os_version_value, - self._device_type_value, - self._ip_address_value, - self._last_activity_value, - self._app_version_value, - ) - -DeviceLogInfo_validator = bv.Struct(DeviceLogInfo) - -class DeviceManagementDisabledDetails(object): - """ - Disable Device Management. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'DeviceManagementDisabledDetails()' - -DeviceManagementDisabledDetails_validator = bv.Struct(DeviceManagementDisabledDetails) - -class DeviceManagementEnabledDetails(object): - """ - Enable Device Management. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'DeviceManagementEnabledDetails()' - -DeviceManagementEnabledDetails_validator = bv.Struct(DeviceManagementEnabledDetails) - -class DeviceType(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - desktop = None - # Attribute is overwritten below the class definition - mobile = None - # Attribute is overwritten below the class definition - other = None - - def is_desktop(self): - """ - Check if the union tag is ``desktop``. - - :rtype: bool - """ - return self._tag == 'desktop' - - def is_mobile(self): - """ - Check if the union tag is ``mobile``. - - :rtype: bool - """ - return self._tag == 'mobile' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'DeviceType(%r, %r)' % (self._tag, self._value) - -DeviceType_validator = bv.Union(DeviceType) - -class DeviceUnlinkDetails(object): - """ - Disconnected a device. - - :ivar device_info: Device information. - :ivar delete_data: True if the user requested to delete data after device - unlink, false otherwise. - """ - - __slots__ = [ - '_device_info_value', - '_device_info_present', - '_delete_data_value', - '_delete_data_present', - ] - - _has_required_fields = True - - def __init__(self, - device_info=None, - delete_data=None): - self._device_info_value = None - self._device_info_present = False - self._delete_data_value = None - self._delete_data_present = False - if device_info is not None: - self.device_info = device_info - if delete_data is not None: - self.delete_data = delete_data - - @property - def device_info(self): - """ - Device information. - - :rtype: DeviceLogInfo - """ - if self._device_info_present: - return self._device_info_value - else: - raise AttributeError("missing required field 'device_info'") - - @device_info.setter - def device_info(self, val): - self._device_info_validator.validate_type_only(val) - self._device_info_value = val - self._device_info_present = True - - @device_info.deleter - def device_info(self): - self._device_info_value = None - self._device_info_present = False - - @property - def delete_data(self): - """ - True if the user requested to delete data after device unlink, false - otherwise. - - :rtype: bool - """ - if self._delete_data_present: - return self._delete_data_value - else: - raise AttributeError("missing required field 'delete_data'") - - @delete_data.setter - def delete_data(self, val): - val = self._delete_data_validator.validate(val) - self._delete_data_value = val - self._delete_data_present = True - - @delete_data.deleter - def delete_data(self): - self._delete_data_value = None - self._delete_data_present = False - - def __repr__(self): - return 'DeviceUnlinkDetails(device_info={!r}, delete_data={!r})'.format( - self._device_info_value, - self._delete_data_value, - ) - -DeviceUnlinkDetails_validator = bv.Struct(DeviceUnlinkDetails) - -class DeviceUnlinkPolicy(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - remove = None - # Attribute is overwritten below the class definition - keep = None - # Attribute is overwritten below the class definition - other = None - - def is_remove(self): - """ - Check if the union tag is ``remove``. - - :rtype: bool - """ - return self._tag == 'remove' - - def is_keep(self): - """ - Check if the union tag is ``keep``. - - :rtype: bool - """ - return self._tag == 'keep' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'DeviceUnlinkPolicy(%r, %r)' % (self._tag, self._value) - -DeviceUnlinkPolicy_validator = bv.Union(DeviceUnlinkPolicy) - -class DisabledDomainInvitesDetails(object): - """ - Disabled domain invites. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'DisabledDomainInvitesDetails()' - -DisabledDomainInvitesDetails_validator = bv.Struct(DisabledDomainInvitesDetails) - -class DomainInvitesApproveRequestToJoinTeamDetails(object): - """ - Approved a member's request to join the team. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'DomainInvitesApproveRequestToJoinTeamDetails()' - -DomainInvitesApproveRequestToJoinTeamDetails_validator = bv.Struct(DomainInvitesApproveRequestToJoinTeamDetails) - -class DomainInvitesDeclineRequestToJoinTeamDetails(object): - """ - Declined a user's request to join the team. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'DomainInvitesDeclineRequestToJoinTeamDetails()' - -DomainInvitesDeclineRequestToJoinTeamDetails_validator = bv.Struct(DomainInvitesDeclineRequestToJoinTeamDetails) - -class DomainInvitesEmailExistingUsersDetails(object): - """ - Sent domain invites to existing domain accounts. - - :ivar domain_name: Domain names. - :ivar num_recipients: Number of recipients. - """ - - __slots__ = [ - '_domain_name_value', - '_domain_name_present', - '_num_recipients_value', - '_num_recipients_present', - ] - - _has_required_fields = True - - def __init__(self, - domain_name=None, - num_recipients=None): - self._domain_name_value = None - self._domain_name_present = False - self._num_recipients_value = None - self._num_recipients_present = False - if domain_name is not None: - self.domain_name = domain_name - if num_recipients is not None: - self.num_recipients = num_recipients - - @property - def domain_name(self): - """ - Domain names. - - :rtype: list of [str] - """ - if self._domain_name_present: - return self._domain_name_value - else: - raise AttributeError("missing required field 'domain_name'") - - @domain_name.setter - def domain_name(self, val): - val = self._domain_name_validator.validate(val) - self._domain_name_value = val - self._domain_name_present = True - - @domain_name.deleter - def domain_name(self): - self._domain_name_value = None - self._domain_name_present = False - - @property - def num_recipients(self): - """ - Number of recipients. - - :rtype: long - """ - if self._num_recipients_present: - return self._num_recipients_value - else: - raise AttributeError("missing required field 'num_recipients'") - - @num_recipients.setter - def num_recipients(self, val): - val = self._num_recipients_validator.validate(val) - self._num_recipients_value = val - self._num_recipients_present = True - - @num_recipients.deleter - def num_recipients(self): - self._num_recipients_value = None - self._num_recipients_present = False - - def __repr__(self): - return 'DomainInvitesEmailExistingUsersDetails(domain_name={!r}, num_recipients={!r})'.format( - self._domain_name_value, - self._num_recipients_value, - ) - -DomainInvitesEmailExistingUsersDetails_validator = bv.Struct(DomainInvitesEmailExistingUsersDetails) - -class DomainInvitesRequestToJoinTeamDetails(object): - """ - Asked to join the team. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'DomainInvitesRequestToJoinTeamDetails()' - -DomainInvitesRequestToJoinTeamDetails_validator = bv.Struct(DomainInvitesRequestToJoinTeamDetails) - -class DomainInvitesSetInviteNewUserPrefToNoDetails(object): - """ - Turned off u201cAutomatically invite new usersu201d. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'DomainInvitesSetInviteNewUserPrefToNoDetails()' - -DomainInvitesSetInviteNewUserPrefToNoDetails_validator = bv.Struct(DomainInvitesSetInviteNewUserPrefToNoDetails) - -class DomainInvitesSetInviteNewUserPrefToYesDetails(object): - """ - Turned on u201cAutomatically invite new usersu201d. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'DomainInvitesSetInviteNewUserPrefToYesDetails()' - -DomainInvitesSetInviteNewUserPrefToYesDetails_validator = bv.Struct(DomainInvitesSetInviteNewUserPrefToYesDetails) - -class DomainVerificationAddDomainFailDetails(object): - """ - Failed to verify a domain belonging to the team. - - :ivar domain_name: Domain name. - :ivar verification_method: Domain name verification method. Might be missing - due to historical data gap. - """ - - __slots__ = [ - '_domain_name_value', - '_domain_name_present', - '_verification_method_value', - '_verification_method_present', - ] - - _has_required_fields = True - - def __init__(self, - domain_name=None, - verification_method=None): - self._domain_name_value = None - self._domain_name_present = False - self._verification_method_value = None - self._verification_method_present = False - if domain_name is not None: - self.domain_name = domain_name - if verification_method is not None: - self.verification_method = verification_method - - @property - def domain_name(self): - """ - Domain name. - - :rtype: str - """ - if self._domain_name_present: - return self._domain_name_value - else: - raise AttributeError("missing required field 'domain_name'") - - @domain_name.setter - def domain_name(self, val): - val = self._domain_name_validator.validate(val) - self._domain_name_value = val - self._domain_name_present = True - - @domain_name.deleter - def domain_name(self): - self._domain_name_value = None - self._domain_name_present = False - - @property - def verification_method(self): - """ - Domain name verification method. Might be missing due to historical data - gap. - - :rtype: str - """ - if self._verification_method_present: - return self._verification_method_value - else: - return None - - @verification_method.setter - def verification_method(self, val): - if val is None: - del self.verification_method - return - val = self._verification_method_validator.validate(val) - self._verification_method_value = val - self._verification_method_present = True - - @verification_method.deleter - def verification_method(self): - self._verification_method_value = None - self._verification_method_present = False - - def __repr__(self): - return 'DomainVerificationAddDomainFailDetails(domain_name={!r}, verification_method={!r})'.format( - self._domain_name_value, - self._verification_method_value, - ) - -DomainVerificationAddDomainFailDetails_validator = bv.Struct(DomainVerificationAddDomainFailDetails) - -class DomainVerificationAddDomainSuccessDetails(object): - """ - Verified a domain belonging to the team. - - :ivar domain_names: Domain names. - :ivar verification_method: Domain name verification method. Might be missing - due to historical data gap. - """ - - __slots__ = [ - '_domain_names_value', - '_domain_names_present', - '_verification_method_value', - '_verification_method_present', - ] - - _has_required_fields = True - - def __init__(self, - domain_names=None, - verification_method=None): - self._domain_names_value = None - self._domain_names_present = False - self._verification_method_value = None - self._verification_method_present = False - if domain_names is not None: - self.domain_names = domain_names - if verification_method is not None: - self.verification_method = verification_method - - @property - def domain_names(self): - """ - Domain names. - - :rtype: list of [str] - """ - if self._domain_names_present: - return self._domain_names_value - else: - raise AttributeError("missing required field 'domain_names'") - - @domain_names.setter - def domain_names(self, val): - val = self._domain_names_validator.validate(val) - self._domain_names_value = val - self._domain_names_present = True - - @domain_names.deleter - def domain_names(self): - self._domain_names_value = None - self._domain_names_present = False - - @property - def verification_method(self): - """ - Domain name verification method. Might be missing due to historical data - gap. - - :rtype: str - """ - if self._verification_method_present: - return self._verification_method_value - else: - return None - - @verification_method.setter - def verification_method(self, val): - if val is None: - del self.verification_method - return - val = self._verification_method_validator.validate(val) - self._verification_method_value = val - self._verification_method_present = True - - @verification_method.deleter - def verification_method(self): - self._verification_method_value = None - self._verification_method_present = False - - def __repr__(self): - return 'DomainVerificationAddDomainSuccessDetails(domain_names={!r}, verification_method={!r})'.format( - self._domain_names_value, - self._verification_method_value, - ) - -DomainVerificationAddDomainSuccessDetails_validator = bv.Struct(DomainVerificationAddDomainSuccessDetails) - -class DomainVerificationRemoveDomainDetails(object): - """ - Removed a domain from the list of verified domains belonging to the team. - - :ivar domain_names: Domain names. - """ - - __slots__ = [ - '_domain_names_value', - '_domain_names_present', - ] - - _has_required_fields = True - - def __init__(self, - domain_names=None): - self._domain_names_value = None - self._domain_names_present = False - if domain_names is not None: - self.domain_names = domain_names - - @property - def domain_names(self): - """ - Domain names. - - :rtype: list of [str] - """ - if self._domain_names_present: - return self._domain_names_value - else: - raise AttributeError("missing required field 'domain_names'") - - @domain_names.setter - def domain_names(self, val): - val = self._domain_names_validator.validate(val) - self._domain_names_value = val - self._domain_names_present = True - - @domain_names.deleter - def domain_names(self): - self._domain_names_value = None - self._domain_names_present = False - - def __repr__(self): - return 'DomainVerificationRemoveDomainDetails(domain_names={!r})'.format( - self._domain_names_value, - ) - -DomainVerificationRemoveDomainDetails_validator = bv.Struct(DomainVerificationRemoveDomainDetails) - -class DurationLogInfo(object): - """ - Represents a time duration: unit and amount - - :ivar unit: Time unit. - :ivar amount: Amount of time. - """ - - __slots__ = [ - '_unit_value', - '_unit_present', - '_amount_value', - '_amount_present', - ] - - _has_required_fields = True - - def __init__(self, - unit=None, - amount=None): - self._unit_value = None - self._unit_present = False - self._amount_value = None - self._amount_present = False - if unit is not None: - self.unit = unit - if amount is not None: - self.amount = amount - - @property - def unit(self): - """ - Time unit. - - :rtype: TimeUnit - """ - if self._unit_present: - return self._unit_value - else: - raise AttributeError("missing required field 'unit'") - - @unit.setter - def unit(self, val): - self._unit_validator.validate_type_only(val) - self._unit_value = val - self._unit_present = True - - @unit.deleter - def unit(self): - self._unit_value = None - self._unit_present = False - - @property - def amount(self): - """ - Amount of time. - - :rtype: long - """ - if self._amount_present: - return self._amount_value - else: - raise AttributeError("missing required field 'amount'") - - @amount.setter - def amount(self, val): - val = self._amount_validator.validate(val) - self._amount_value = val - self._amount_present = True - - @amount.deleter - def amount(self): - self._amount_value = None - self._amount_present = False - - def __repr__(self): - return 'DurationLogInfo(unit={!r}, amount={!r})'.format( - self._unit_value, - self._amount_value, - ) - -DurationLogInfo_validator = bv.Struct(DurationLogInfo) - -class EmmAddExceptionDetails(object): - """ - Added an exception for one or more team members to optionally use the - regular Dropbox app when EMM is enabled. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'EmmAddExceptionDetails()' - -EmmAddExceptionDetails_validator = bv.Struct(EmmAddExceptionDetails) - -class EmmChangePolicyDetails(object): - """ - Enabled or disabled enterprise mobility management for team members. - - :ivar new_value: New enterprise mobility management policy. - :ivar previous_value: Previous enterprise mobility management policy. Might - be missing due to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New enterprise mobility management policy. - - :rtype: team_policies.EmmState_validator - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous enterprise mobility management policy. Might be missing due to - historical data gap. - - :rtype: team_policies.EmmState_validator - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'EmmChangePolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -EmmChangePolicyDetails_validator = bv.Struct(EmmChangePolicyDetails) - -class EmmCreateExceptionsReportDetails(object): - """ - EMM excluded users report created. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'EmmCreateExceptionsReportDetails()' - -EmmCreateExceptionsReportDetails_validator = bv.Struct(EmmCreateExceptionsReportDetails) - -class EmmCreateUsageReportDetails(object): - """ - EMM mobile app usage report created. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'EmmCreateUsageReportDetails()' - -EmmCreateUsageReportDetails_validator = bv.Struct(EmmCreateUsageReportDetails) - -class EmmLoginSuccessDetails(object): - """ - Signed in using the Dropbox EMM app. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'EmmLoginSuccessDetails()' - -EmmLoginSuccessDetails_validator = bv.Struct(EmmLoginSuccessDetails) - -class EmmRefreshAuthTokenDetails(object): - """ - Refreshed the auth token used for setting up enterprise mobility management. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'EmmRefreshAuthTokenDetails()' - -EmmRefreshAuthTokenDetails_validator = bv.Struct(EmmRefreshAuthTokenDetails) - -class EmmRemoveExceptionDetails(object): - """ - Removed an exception for one or more team members to optionally use the - regular Dropbox app when EMM is enabled. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'EmmRemoveExceptionDetails()' - -EmmRemoveExceptionDetails_validator = bv.Struct(EmmRemoveExceptionDetails) - -class EnabledDomainInvitesDetails(object): - """ - Enabled domain invites. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'EnabledDomainInvitesDetails()' - -EnabledDomainInvitesDetails_validator = bv.Struct(EnabledDomainInvitesDetails) - -class EventCategory(bb.Union): - """ - Category of events in event audit log. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar account_capture: Events that have to do with account capture and - invite enforcement on team-owned domains. - :ivar administration: Events that relate to team and team member account - administration or team administration. Note that these actions are not - necessarily performed by team admins. They might also be performed by - Dropbox Support or System or by team members on their own accounts. - :ivar apps: Events that apply to management of linked apps. - :ivar authentication: Events that apply to user authentication in some way. - :ivar comments: Events that have to do with comments on files and Paper - documents. - :ivar content_access: Events that apply to changes how people can access - content on Dropbox as well as actions that represent actually accessing - content. - :ivar devices: Events that apply to linked devices on mobile, desktop and - Web platforms. - :ivar device_approvals: Events that concern device approvals and device - management. - :ivar domains: Events that involve domain management feature: domain - verification, invite enforcement and account capture. - :ivar emm: Events that involve enterprise mobility management and the - Dropbox EMM app. - :ivar errors: Events that mark some type of unexpected outcome. - :ivar files: Events that mark a user's interaction with files and folders on - Dropbox. - :ivar file_operations: Events that have to do with filesystem operations on - files and folders: copy, move, delete, etc. - :ivar file_requests: Events that apply to the file requests feature. - :ivar groups: Events that involve group management. - :ivar logins: Events that involve users signing in to or out of Dropbox. - :ivar members: Events that involve team member management. - :ivar paper: Events that apply to Dropbox Paper. - :ivar passwords: Events that involve using, changing or resetting passwords. - :ivar reports: Events that concern generation of admin reports, including - team activity and device usage. - :ivar sessions: Events that mark the beginning or end of sessions as well as - those that apply to an ongoing session. - :ivar shared_files: Events that specifically apply to shared files. - :ivar shared_folders: Events that specifically apply to shared folders. - :ivar shared_links: Events that specifically apply to link sharing. - :ivar sharing: Events that apply to all types of sharing and collaboration. - :ivar sharing_policies: Events that concern policies that affect sharing - - both at the team level and at the folder level. - :ivar sso: Events that involve using or configuring single sign-on as well - as administrative policies concerning single sign-on. - :ivar team_folders: Events that involve team folder management. - :ivar team_policies: Events that involve a change in team-wide policies. - :ivar team_profile: Events that involve a change in the team profile. - :ivar tfa: Events that involve using or configuring two factor - authentication as well as administrative policies concerning two factor - authentication. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - account_capture = None - # Attribute is overwritten below the class definition - administration = None - # Attribute is overwritten below the class definition - apps = None - # Attribute is overwritten below the class definition - authentication = None - # Attribute is overwritten below the class definition - comments = None - # Attribute is overwritten below the class definition - content_access = None - # Attribute is overwritten below the class definition - devices = None - # Attribute is overwritten below the class definition - device_approvals = None - # Attribute is overwritten below the class definition - domains = None - # Attribute is overwritten below the class definition - emm = None - # Attribute is overwritten below the class definition - errors = None - # Attribute is overwritten below the class definition - files = None - # Attribute is overwritten below the class definition - file_operations = None - # Attribute is overwritten below the class definition - file_requests = None - # Attribute is overwritten below the class definition - groups = None - # Attribute is overwritten below the class definition - logins = None - # Attribute is overwritten below the class definition - members = None - # Attribute is overwritten below the class definition - paper = None - # Attribute is overwritten below the class definition - passwords = None - # Attribute is overwritten below the class definition - reports = None - # Attribute is overwritten below the class definition - sessions = None - # Attribute is overwritten below the class definition - shared_files = None - # Attribute is overwritten below the class definition - shared_folders = None - # Attribute is overwritten below the class definition - shared_links = None - # Attribute is overwritten below the class definition - sharing = None - # Attribute is overwritten below the class definition - sharing_policies = None - # Attribute is overwritten below the class definition - sso = None - # Attribute is overwritten below the class definition - team_folders = None - # Attribute is overwritten below the class definition - team_policies = None - # Attribute is overwritten below the class definition - team_profile = None - # Attribute is overwritten below the class definition - tfa = None - # Attribute is overwritten below the class definition - other = None - - def is_account_capture(self): - """ - Check if the union tag is ``account_capture``. - - :rtype: bool - """ - return self._tag == 'account_capture' - - def is_administration(self): - """ - Check if the union tag is ``administration``. - - :rtype: bool - """ - return self._tag == 'administration' - - def is_apps(self): - """ - Check if the union tag is ``apps``. - - :rtype: bool - """ - return self._tag == 'apps' - - def is_authentication(self): - """ - Check if the union tag is ``authentication``. - - :rtype: bool - """ - return self._tag == 'authentication' - - def is_comments(self): - """ - Check if the union tag is ``comments``. - - :rtype: bool - """ - return self._tag == 'comments' - - def is_content_access(self): - """ - Check if the union tag is ``content_access``. - - :rtype: bool - """ - return self._tag == 'content_access' - - def is_devices(self): - """ - Check if the union tag is ``devices``. - - :rtype: bool - """ - return self._tag == 'devices' - - def is_device_approvals(self): - """ - Check if the union tag is ``device_approvals``. - - :rtype: bool - """ - return self._tag == 'device_approvals' - - def is_domains(self): - """ - Check if the union tag is ``domains``. - - :rtype: bool - """ - return self._tag == 'domains' - - def is_emm(self): - """ - Check if the union tag is ``emm``. - - :rtype: bool - """ - return self._tag == 'emm' - - def is_errors(self): - """ - Check if the union tag is ``errors``. - - :rtype: bool - """ - return self._tag == 'errors' - - def is_files(self): - """ - Check if the union tag is ``files``. - - :rtype: bool - """ - return self._tag == 'files' - - def is_file_operations(self): - """ - Check if the union tag is ``file_operations``. - - :rtype: bool - """ - return self._tag == 'file_operations' - - def is_file_requests(self): - """ - Check if the union tag is ``file_requests``. - - :rtype: bool - """ - return self._tag == 'file_requests' - - def is_groups(self): - """ - Check if the union tag is ``groups``. - - :rtype: bool - """ - return self._tag == 'groups' - - def is_logins(self): - """ - Check if the union tag is ``logins``. - - :rtype: bool - """ - return self._tag == 'logins' - - def is_members(self): - """ - Check if the union tag is ``members``. - - :rtype: bool - """ - return self._tag == 'members' - - def is_paper(self): - """ - Check if the union tag is ``paper``. - - :rtype: bool - """ - return self._tag == 'paper' - - def is_passwords(self): - """ - Check if the union tag is ``passwords``. - - :rtype: bool - """ - return self._tag == 'passwords' - - def is_reports(self): - """ - Check if the union tag is ``reports``. - - :rtype: bool - """ - return self._tag == 'reports' - - def is_sessions(self): - """ - Check if the union tag is ``sessions``. - - :rtype: bool - """ - return self._tag == 'sessions' - - def is_shared_files(self): - """ - Check if the union tag is ``shared_files``. - - :rtype: bool - """ - return self._tag == 'shared_files' - - def is_shared_folders(self): - """ - Check if the union tag is ``shared_folders``. - - :rtype: bool - """ - return self._tag == 'shared_folders' - - def is_shared_links(self): - """ - Check if the union tag is ``shared_links``. - - :rtype: bool - """ - return self._tag == 'shared_links' - - def is_sharing(self): - """ - Check if the union tag is ``sharing``. - - :rtype: bool - """ - return self._tag == 'sharing' - - def is_sharing_policies(self): - """ - Check if the union tag is ``sharing_policies``. - - :rtype: bool - """ - return self._tag == 'sharing_policies' - - def is_sso(self): - """ - Check if the union tag is ``sso``. - - :rtype: bool - """ - return self._tag == 'sso' - - def is_team_folders(self): - """ - Check if the union tag is ``team_folders``. - - :rtype: bool - """ - return self._tag == 'team_folders' - - def is_team_policies(self): - """ - Check if the union tag is ``team_policies``. - - :rtype: bool - """ - return self._tag == 'team_policies' - - def is_team_profile(self): - """ - Check if the union tag is ``team_profile``. - - :rtype: bool - """ - return self._tag == 'team_profile' - - def is_tfa(self): - """ - Check if the union tag is ``tfa``. - - :rtype: bool - """ - return self._tag == 'tfa' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'EventCategory(%r, %r)' % (self._tag, self._value) - -EventCategory_validator = bv.Union(EventCategory) - -class EventDetails(bb.Union): - """ - Additional fields depending on the event type. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar MemberChangeMembershipTypeDetails - member_change_membership_type_details: Changed the membership type - (limited vs full) for team member. - :ivar MemberPermanentlyDeleteAccountContentsDetails - member_permanently_delete_account_contents_details: Permanently deleted - contents of a removed team member account. - :ivar MemberSpaceLimitsChangeStatusDetails - member_space_limits_change_status_details: Changed the status with - respect to whether the team member is under or over storage quota - specified by policy. - :ivar MemberTransferAccountContentsDetails - member_transfer_account_contents_details: Transferred contents of a - removed team member account to another member. - :ivar PaperAdminExportStartDetails paper_admin_export_start_details: - Exported all Paper documents in the team. - :ivar PaperEnabledUsersGroupAdditionDetails - paper_enabled_users_group_addition_details: Users added to Paper enabled - users list. - :ivar PaperEnabledUsersGroupRemovalDetails - paper_enabled_users_group_removal_details: Users removed from Paper - enabled users list. - :ivar PaperExternalViewAllowDetails paper_external_view_allow_details: Paper - external sharing policy changed: anyone. - :ivar PaperExternalViewDefaultTeamDetails - paper_external_view_default_team_details: Paper external sharing policy - changed: default team. - :ivar PaperExternalViewForbidDetails paper_external_view_forbid_details: - Paper external sharing policy changed: team-only. - :ivar SfExternalInviteWarnDetails sf_external_invite_warn_details: Admin - settings: team members see a warning before sharing folders outside the - team (DEPRECATED FEATURE). - :ivar TeamMergeFromDetails team_merge_from_details: Merged another team into - this team. - :ivar TeamMergeToDetails team_merge_to_details: Merged this team into - another team. - :ivar AppLinkTeamDetails app_link_team_details: Linked an app for team. - :ivar AppLinkUserDetails app_link_user_details: Linked an app for team - member. - :ivar AppUnlinkTeamDetails app_unlink_team_details: Unlinked an app for - team. - :ivar AppUnlinkUserDetails app_unlink_user_details: Unlinked an app for team - member. - :ivar FileAddCommentDetails file_add_comment_details: Added a file comment. - :ivar FileChangeCommentSubscriptionDetails - file_change_comment_subscription_details: Subscribed to or unsubscribed - from comment notifications for file. - :ivar FileDeleteCommentDetails file_delete_comment_details: Deleted a file - comment. - :ivar FileLikeCommentDetails file_like_comment_details: Liked a file - comment. - :ivar FileResolveCommentDetails file_resolve_comment_details: Resolved a - file comment. - :ivar FileUnlikeCommentDetails file_unlike_comment_details: Unliked a file - comment. - :ivar FileUnresolveCommentDetails file_unresolve_comment_details: Unresolved - a file comment. - :ivar DeviceChangeIpDesktopDetails device_change_ip_desktop_details: IP - address associated with active desktop session changed. - :ivar DeviceChangeIpMobileDetails device_change_ip_mobile_details: IP - address associated with active mobile session changed. - :ivar DeviceChangeIpWebDetails device_change_ip_web_details: IP address - associated with active Web session changed. - :ivar DeviceDeleteOnUnlinkFailDetails device_delete_on_unlink_fail_details: - Failed to delete all files from an unlinked device. - :ivar DeviceDeleteOnUnlinkSuccessDetails - device_delete_on_unlink_success_details: Deleted all files from an - unlinked device. - :ivar DeviceLinkFailDetails device_link_fail_details: Failed to link a - device. - :ivar DeviceLinkSuccessDetails device_link_success_details: Linked a device. - :ivar DeviceManagementDisabledDetails device_management_disabled_details: - Disable Device Management. - :ivar DeviceManagementEnabledDetails device_management_enabled_details: - Enable Device Management. - :ivar DeviceUnlinkDetails device_unlink_details: Disconnected a device. - :ivar EmmRefreshAuthTokenDetails emm_refresh_auth_token_details: Refreshed - the auth token used for setting up enterprise mobility management. - :ivar AccountCaptureChangeAvailabilityDetails - account_capture_change_availability_details: Granted or revoked the - option to enable account capture on domains belonging to the team. - :ivar AccountCaptureMigrateAccountDetails - account_capture_migrate_account_details: Account captured user migrated - their account to the team. - :ivar AccountCaptureRelinquishAccountDetails - account_capture_relinquish_account_details: Account captured user - relinquished their account by changing the email address associated with - it. - :ivar DisabledDomainInvitesDetails disabled_domain_invites_details: Disabled - domain invites. - :ivar DomainInvitesApproveRequestToJoinTeamDetails - domain_invites_approve_request_to_join_team_details: Approved a member's - request to join the team. - :ivar DomainInvitesDeclineRequestToJoinTeamDetails - domain_invites_decline_request_to_join_team_details: Declined a user's - request to join the team. - :ivar DomainInvitesEmailExistingUsersDetails - domain_invites_email_existing_users_details: Sent domain invites to - existing domain accounts. - :ivar DomainInvitesRequestToJoinTeamDetails - domain_invites_request_to_join_team_details: Asked to join the team. - :ivar DomainInvitesSetInviteNewUserPrefToNoDetails - domain_invites_set_invite_new_user_pref_to_no_details: Turned off - u201cAutomatically invite new usersu201d. - :ivar DomainInvitesSetInviteNewUserPrefToYesDetails - domain_invites_set_invite_new_user_pref_to_yes_details: Turned on - u201cAutomatically invite new usersu201d. - :ivar DomainVerificationAddDomainFailDetails - domain_verification_add_domain_fail_details: Failed to verify a domain - belonging to the team. - :ivar DomainVerificationAddDomainSuccessDetails - domain_verification_add_domain_success_details: Verified a domain - belonging to the team. - :ivar DomainVerificationRemoveDomainDetails - domain_verification_remove_domain_details: Removed a domain from the - list of verified domains belonging to the team. - :ivar EnabledDomainInvitesDetails enabled_domain_invites_details: Enabled - domain invites. - :ivar CreateFolderDetails create_folder_details: Created folders. - :ivar FileAddDetails file_add_details: Added files and/or folders. - :ivar FileCopyDetails file_copy_details: Copied files and/or folders. - :ivar FileDeleteDetails file_delete_details: Deleted files and/or folders. - :ivar FileDownloadDetails file_download_details: Downloaded files and/or - folders. - :ivar FileEditDetails file_edit_details: Edited files. - :ivar FileGetCopyReferenceDetails file_get_copy_reference_details: Create a - copy reference to a file or folder. - :ivar FileMoveDetails file_move_details: Moved files and/or folders. - :ivar FilePermanentlyDeleteDetails file_permanently_delete_details: - Permanently deleted files and/or folders. - :ivar FilePreviewDetails file_preview_details: Previewed files and/or - folders. - :ivar FileRenameDetails file_rename_details: Renamed files and/or folders. - :ivar FileRestoreDetails file_restore_details: Restored deleted files and/or - folders. - :ivar FileRevertDetails file_revert_details: Reverted files to a previous - version. - :ivar FileRollbackChangesDetails file_rollback_changes_details: Rolled back - file change location changes. - :ivar FileSaveCopyReferenceDetails file_save_copy_reference_details: Save a - file or folder using a copy reference. - :ivar FileRequestAddDeadlineDetails file_request_add_deadline_details: Added - a deadline to a file request. - :ivar FileRequestChangeFolderDetails file_request_change_folder_details: - Changed the file request folder. - :ivar FileRequestChangeTitleDetails file_request_change_title_details: - Change the file request title. - :ivar FileRequestCloseDetails file_request_close_details: Closed a file - request. - :ivar FileRequestCreateDetails file_request_create_details: Created a file - request. - :ivar FileRequestReceiveFileDetails file_request_receive_file_details: - Received files for a file request. - :ivar FileRequestRemoveDeadlineDetails file_request_remove_deadline_details: - Removed the file request deadline. - :ivar FileRequestSendDetails file_request_send_details: Sent file request to - users via email. - :ivar GroupAddExternalIdDetails group_add_external_id_details: Added an - external ID for group. - :ivar GroupAddMemberDetails group_add_member_details: Added team members to - a group. - :ivar GroupChangeExternalIdDetails group_change_external_id_details: Changed - the external ID for group. - :ivar GroupChangeManagementTypeDetails group_change_management_type_details: - Changed group management type. - :ivar GroupChangeMemberRoleDetails group_change_member_role_details: Changed - the manager permissions belonging to a group member. - :ivar GroupCreateDetails group_create_details: Created a group. - :ivar GroupDeleteDetails group_delete_details: Deleted a group. - :ivar GroupMovedDetails group_moved_details: Moved a group. - :ivar GroupRemoveExternalIdDetails group_remove_external_id_details: Removed - the external ID for group. - :ivar GroupRemoveMemberDetails group_remove_member_details: Removed team - members from a group. - :ivar GroupRenameDetails group_rename_details: Renamed a group. - :ivar EmmLoginSuccessDetails emm_login_success_details: Signed in using the - Dropbox EMM app. - :ivar LogoutDetails logout_details: Signed out. - :ivar PasswordLoginFailDetails password_login_fail_details: Failed to sign - in using a password. - :ivar PasswordLoginSuccessDetails password_login_success_details: Signed in - using a password. - :ivar ResellerSupportSessionEndDetails reseller_support_session_end_details: - Ended reseller support session. - :ivar ResellerSupportSessionStartDetails - reseller_support_session_start_details: Started reseller support - session. - :ivar SignInAsSessionEndDetails sign_in_as_session_end_details: Ended admin - sign-in-as session. - :ivar SignInAsSessionStartDetails sign_in_as_session_start_details: Started - admin sign-in-as session. - :ivar SsoLoginFailDetails sso_login_fail_details: Failed to sign in using - SSO. - :ivar MemberAddNameDetails member_add_name_details: Set team member name - when joining team. - :ivar MemberChangeAdminRoleDetails member_change_admin_role_details: Change - the admin role belonging to team member. - :ivar MemberChangeEmailDetails member_change_email_details: Changed team - member email address. - :ivar MemberChangeNameDetails member_change_name_details: Changed team - member name. - :ivar MemberChangeStatusDetails member_change_status_details: Changed the - membership status of a team member. - :ivar MemberSuggestDetails member_suggest_details: Suggested a new team - member to be added to the team. - :ivar PaperContentAddMemberDetails paper_content_add_member_details: Added - users to the membership of a Paper doc or folder. - :ivar PaperContentAddToFolderDetails paper_content_add_to_folder_details: - Added Paper doc or folder to a folder. - :ivar PaperContentArchiveDetails paper_content_archive_details: Archived - Paper doc or folder. - :ivar PaperContentCreateDetails paper_content_create_details: Created a - Paper doc or folder. - :ivar PaperContentPermanentlyDeleteDetails - paper_content_permanently_delete_details: Permanently deleted a Paper - doc or folder. - :ivar PaperContentRemoveFromFolderDetails - paper_content_remove_from_folder_details: Removed Paper doc or folder - from a folder. - :ivar PaperContentRemoveMemberDetails paper_content_remove_member_details: - Removed a user from the membership of a Paper doc or folder. - :ivar PaperContentRenameDetails paper_content_rename_details: Renamed Paper - doc or folder. - :ivar PaperContentRestoreDetails paper_content_restore_details: Restored an - archived Paper doc or folder. - :ivar PaperDocAddCommentDetails paper_doc_add_comment_details: Added a Paper - doc comment. - :ivar PaperDocChangeMemberRoleDetails paper_doc_change_member_role_details: - Changed the access type of a Paper doc member. - :ivar PaperDocChangeSharingPolicyDetails - paper_doc_change_sharing_policy_details: Changed the sharing policy for - Paper doc. - :ivar PaperDocChangeSubscriptionDetails - paper_doc_change_subscription_details: Followed or unfollowed a Paper - doc. - :ivar PaperDocDeletedDetails paper_doc_deleted_details: Paper doc archived. - :ivar PaperDocDeleteCommentDetails paper_doc_delete_comment_details: Deleted - a Paper doc comment. - :ivar PaperDocDownloadDetails paper_doc_download_details: Downloaded a Paper - doc in a particular output format. - :ivar PaperDocEditDetails paper_doc_edit_details: Edited a Paper doc. - :ivar PaperDocEditCommentDetails paper_doc_edit_comment_details: Edited a - Paper doc comment. - :ivar PaperDocFollowedDetails paper_doc_followed_details: Followed a Paper - doc. - :ivar PaperDocMentionDetails paper_doc_mention_details: Mentioned a member - in a Paper doc. - :ivar PaperDocRequestAccessDetails paper_doc_request_access_details: - Requested to be a member on a Paper doc. - :ivar PaperDocResolveCommentDetails paper_doc_resolve_comment_details: Paper - doc comment resolved. - :ivar PaperDocRevertDetails paper_doc_revert_details: Restored a Paper doc - to previous revision. - :ivar PaperDocSlackShareDetails paper_doc_slack_share_details: Paper doc - link shared via slack. - :ivar PaperDocTeamInviteDetails paper_doc_team_invite_details: Paper doc - shared with team member. - :ivar PaperDocTrashedDetails paper_doc_trashed_details: Paper doc trashed. - :ivar PaperDocUnresolveCommentDetails paper_doc_unresolve_comment_details: - Unresolved a Paper doc comment. - :ivar PaperDocUntrashedDetails paper_doc_untrashed_details: Paper doc - untrashed. - :ivar PaperDocViewDetails paper_doc_view_details: Viewed Paper doc. - :ivar PaperFolderChangeSubscriptionDetails - paper_folder_change_subscription_details: Followed or unfollowed a Paper - folder. - :ivar PaperFolderDeletedDetails paper_folder_deleted_details: Paper folder - archived. - :ivar PaperFolderFollowedDetails paper_folder_followed_details: Followed a - Paper folder. - :ivar PaperFolderTeamInviteDetails paper_folder_team_invite_details: Paper - folder shared with team member. - :ivar PasswordChangeDetails password_change_details: Changed password. - :ivar PasswordResetDetails password_reset_details: Reset password. - :ivar PasswordResetAllDetails password_reset_all_details: Reset all team - member passwords. - :ivar EmmCreateExceptionsReportDetails emm_create_exceptions_report_details: - EMM excluded users report created. - :ivar EmmCreateUsageReportDetails emm_create_usage_report_details: EMM - mobile app usage report created. - :ivar SmartSyncCreateAdminPrivilegeReportDetails - smart_sync_create_admin_privilege_report_details: Smart Sync non-admin - devices report created. - :ivar TeamActivityCreateReportDetails team_activity_create_report_details: - Created a team activity report. - :ivar CollectionShareDetails collection_share_details: Shared an album. - :ivar NoteAclInviteOnlyDetails note_acl_invite_only_details: Changed a Paper - document to be invite-only. - :ivar NoteAclLinkDetails note_acl_link_details: Changed a Paper document to - be link accessible. - :ivar NoteAclTeamLinkDetails note_acl_team_link_details: Changed a Paper - document to be link accessible for the team. - :ivar NoteSharedDetails note_shared_details: Shared a Paper doc. - :ivar NoteShareReceiveDetails note_share_receive_details: Shared Paper - document received. - :ivar OpenNoteSharedDetails open_note_shared_details: Opened a shared Paper - doc. - :ivar SfAddGroupDetails sf_add_group_details: Added the team to a shared - folder. - :ivar SfAllowNonMembersToViewSharedLinksDetails - sf_allow_non_members_to_view_shared_links_details: Allowed non - collaborators to view links to files in a shared folder. - :ivar SfInviteGroupDetails sf_invite_group_details: Invited a group to a - shared folder. - :ivar SfNestDetails sf_nest_details: Changed parent of shared folder. - :ivar SfTeamDeclineDetails sf_team_decline_details: Declined a team member's - invitation to a shared folder. - :ivar SfTeamGrantAccessDetails sf_team_grant_access_details: Granted access - to a shared folder. - :ivar SfTeamInviteDetails sf_team_invite_details: Invited team members to a - shared folder. - :ivar SfTeamInviteChangeRoleDetails sf_team_invite_change_role_details: - Changed a team member's role in a shared folder. - :ivar SfTeamJoinDetails sf_team_join_details: Joined a team member's shared - folder. - :ivar SfTeamJoinFromOobLinkDetails sf_team_join_from_oob_link_details: - Joined a team member's shared folder from a link. - :ivar SfTeamUninviteDetails sf_team_uninvite_details: Unshared a folder with - a team member. - :ivar SharedContentAddInviteesDetails shared_content_add_invitees_details: - Sent an email invitation to the membership of a shared file or folder. - :ivar SharedContentAddLinkExpiryDetails - shared_content_add_link_expiry_details: Added an expiry to the link for - the shared file or folder. - :ivar SharedContentAddLinkPasswordDetails - shared_content_add_link_password_details: Added a password to the link - for the shared file or folder. - :ivar SharedContentAddMemberDetails shared_content_add_member_details: Added - users and/or groups to the membership of a shared file or folder. - :ivar SharedContentChangeDownloadsPolicyDetails - shared_content_change_downloads_policy_details: Changed whether members - can download the shared file or folder. - :ivar SharedContentChangeInviteeRoleDetails - shared_content_change_invitee_role_details: Changed the access type of - an invitee to a shared file or folder before the invitation was claimed. - :ivar SharedContentChangeLinkAudienceDetails - shared_content_change_link_audience_details: Changed the audience of the - link for a shared file or folder. - :ivar SharedContentChangeLinkExpiryDetails - shared_content_change_link_expiry_details: Changed the expiry of the - link for the shared file or folder. - :ivar SharedContentChangeLinkPasswordDetails - shared_content_change_link_password_details: Changed the password on the - link for the shared file or folder. - :ivar SharedContentChangeMemberRoleDetails - shared_content_change_member_role_details: Changed the access type of a - shared file or folder member. - :ivar SharedContentChangeViewerInfoPolicyDetails - shared_content_change_viewer_info_policy_details: Changed whether - members can see who viewed the shared file or folder. - :ivar SharedContentClaimInvitationDetails - shared_content_claim_invitation_details: Claimed membership to a team - member's shared folder. - :ivar SharedContentCopyDetails shared_content_copy_details: Copied the - shared file or folder to own Dropbox. - :ivar SharedContentDownloadDetails shared_content_download_details: - Downloaded the shared file or folder. - :ivar SharedContentRelinquishMembershipDetails - shared_content_relinquish_membership_details: Left the membership of a - shared file or folder. - :ivar SharedContentRemoveInviteeDetails - shared_content_remove_invitee_details: Removed an invitee from the - membership of a shared file or folder before it was claimed. - :ivar SharedContentRemoveLinkExpiryDetails - shared_content_remove_link_expiry_details: Removed the expiry of the - link for the shared file or folder. - :ivar SharedContentRemoveLinkPasswordDetails - shared_content_remove_link_password_details: Removed the password on the - link for the shared file or folder. - :ivar SharedContentRemoveMemberDetails shared_content_remove_member_details: - Removed a user or a group from the membership of a shared file or - folder. - :ivar SharedContentRequestAccessDetails - shared_content_request_access_details: Requested to be on the membership - of a shared file or folder. - :ivar SharedContentUnshareDetails shared_content_unshare_details: Unshared a - shared file or folder by clearing its membership and turning off its - link. - :ivar SharedContentViewDetails shared_content_view_details: Previewed the - shared file or folder. - :ivar SharedFolderChangeConfidentialityDetails - shared_folder_change_confidentiality_details: Set or unset the - confidential flag on a shared folder. - :ivar SharedFolderChangeLinkPolicyDetails - shared_folder_change_link_policy_details: Changed who can access the - shared folder via a link. - :ivar SharedFolderChangeMemberManagementPolicyDetails - shared_folder_change_member_management_policy_details: Changed who can - manage the membership of a shared folder. - :ivar SharedFolderChangeMemberPolicyDetails - shared_folder_change_member_policy_details: Changed who can become a - member of the shared folder. - :ivar SharedFolderCreateDetails shared_folder_create_details: Created a - shared folder. - :ivar SharedFolderMountDetails shared_folder_mount_details: Added a shared - folder to own Dropbox. - :ivar SharedFolderTransferOwnershipDetails - shared_folder_transfer_ownership_details: Transferred the ownership of a - shared folder to another member. - :ivar SharedFolderUnmountDetails shared_folder_unmount_details: Deleted a - shared folder from Dropbox. - :ivar SharedNoteOpenedDetails shared_note_opened_details: Shared Paper - document was opened. - :ivar ShmodelAppCreateDetails shmodel_app_create_details: Created a link to - a file using an app. - :ivar ShmodelCreateDetails shmodel_create_details: Created a new link. - :ivar ShmodelDisableDetails shmodel_disable_details: Removed a link. - :ivar ShmodelFbShareDetails shmodel_fb_share_details: Shared a link with - Facebook users. - :ivar ShmodelGroupShareDetails shmodel_group_share_details: Shared a link - with a group. - :ivar ShmodelRemoveExpirationDetails shmodel_remove_expiration_details: - Removed the expiration date from a link. - :ivar ShmodelSetExpirationDetails shmodel_set_expiration_details: Added an - expiration date to a link. - :ivar ShmodelTeamCopyDetails shmodel_team_copy_details: Added a team - member's file/folder to their Dropbox from a link. - :ivar ShmodelTeamDownloadDetails shmodel_team_download_details: Downloaded a - team member's file/folder from a link. - :ivar ShmodelTeamShareDetails shmodel_team_share_details: Shared a link with - team members. - :ivar ShmodelTeamViewDetails shmodel_team_view_details: Opened a team - member's link. - :ivar ShmodelVisibilityPasswordDetails shmodel_visibility_password_details: - Password-protected a link. - :ivar ShmodelVisibilityPublicDetails shmodel_visibility_public_details: Made - a file/folder visible to anyone with the link. - :ivar ShmodelVisibilityTeamOnlyDetails shmodel_visibility_team_only_details: - Made a file/folder visible only to team members with the link. - :ivar SsoAddCertDetails sso_add_cert_details: Added the X.509 certificate - for SSO. - :ivar SsoAddLoginUrlDetails sso_add_login_url_details: Added sign-in URL for - SSO. - :ivar SsoAddLogoutUrlDetails sso_add_logout_url_details: Added sign-out URL - for SSO. - :ivar SsoChangeCertDetails sso_change_cert_details: Changed the X.509 - certificate for SSO. - :ivar SsoChangeLoginUrlDetails sso_change_login_url_details: Changed the - sign-in URL for SSO. - :ivar SsoChangeLogoutUrlDetails sso_change_logout_url_details: Changed the - sign-out URL for SSO. - :ivar SsoChangeSamlIdentityModeDetails - sso_change_saml_identity_mode_details: Changed the SAML identity mode - for SSO. - :ivar SsoRemoveCertDetails sso_remove_cert_details: Removed the X.509 - certificate for SSO. - :ivar SsoRemoveLoginUrlDetails sso_remove_login_url_details: Removed the - sign-in URL for SSO. - :ivar SsoRemoveLogoutUrlDetails sso_remove_logout_url_details: Removed - single sign-on logout URL. - :ivar TeamFolderChangeStatusDetails team_folder_change_status_details: - Changed the archival status of a team folder. - :ivar TeamFolderCreateDetails team_folder_create_details: Created a new team - folder in active status. - :ivar TeamFolderDowngradeDetails team_folder_downgrade_details: Downgraded a - team folder to a regular shared folder. - :ivar TeamFolderPermanentlyDeleteDetails - team_folder_permanently_delete_details: Permanently deleted an archived - team folder. - :ivar TeamFolderRenameDetails team_folder_rename_details: Renamed an active - or archived team folder. - :ivar AccountCaptureChangePolicyDetails - account_capture_change_policy_details: Changed the account capture - policy on a domain belonging to the team. - :ivar AllowDownloadDisabledDetails allow_download_disabled_details: Disabled - allow downloads. - :ivar AllowDownloadEnabledDetails allow_download_enabled_details: Enabled - allow downloads. - :ivar DataPlacementRestrictionChangePolicyDetails - data_placement_restriction_change_policy_details: Set a restriction - policy regarding the location of data centers where team data resides. - :ivar DataPlacementRestrictionSatisfyPolicyDetails - data_placement_restriction_satisfy_policy_details: Satisfied a - previously set restriction policy regarding the location of data centers - where team data resides (i.e. all data have been migrated according to - the restriction placed). - :ivar DeviceApprovalsChangeDesktopPolicyDetails - device_approvals_change_desktop_policy_details: Set or removed a limit - on the number of computers each team member can link to their work - Dropbox account. - :ivar DeviceApprovalsChangeMobilePolicyDetails - device_approvals_change_mobile_policy_details: Set or removed a limit on - the number of mobiles devices each team member can link to their work - Dropbox account. - :ivar DeviceApprovalsChangeOverageActionDetails - device_approvals_change_overage_action_details: Changed the action taken - when a team member is already over the limits (e.g when they join the - team, an admin lowers limits, etc.). - :ivar DeviceApprovalsChangeUnlinkActionDetails - device_approvals_change_unlink_action_details: Changed the action taken - with respect to approval limits when a team member unlinks an approved - device. - :ivar EmmAddExceptionDetails emm_add_exception_details: Added an exception - for one or more team members to optionally use the regular Dropbox app - when EMM is enabled. - :ivar EmmChangePolicyDetails emm_change_policy_details: Enabled or disabled - enterprise mobility management for team members. - :ivar EmmRemoveExceptionDetails emm_remove_exception_details: Removed an - exception for one or more team members to optionally use the regular - Dropbox app when EMM is enabled. - :ivar ExtendedVersionHistoryChangePolicyDetails - extended_version_history_change_policy_details: Accepted or opted out of - extended version history. - :ivar FileCommentsChangePolicyDetails file_comments_change_policy_details: - Enabled or disabled commenting on team files. - :ivar FileRequestsChangePolicyDetails file_requests_change_policy_details: - Enabled or disabled file requests. - :ivar FileRequestsEmailsEnabledDetails file_requests_emails_enabled_details: - Enabled file request emails for everyone. - :ivar FileRequestsEmailsRestrictedToTeamOnlyDetails - file_requests_emails_restricted_to_team_only_details: Allowed file - request emails for the team. - :ivar GoogleSsoChangePolicyDetails google_sso_change_policy_details: Enabled - or disabled Google single sign-on for the team. - :ivar GroupUserManagementChangePolicyDetails - group_user_management_change_policy_details: Changed who can create - groups. - :ivar MemberRequestsChangePolicyDetails - member_requests_change_policy_details: Changed whether users can find - the team when not invited. - :ivar MemberSpaceLimitsAddExceptionDetails - member_space_limits_add_exception_details: Added an exception for one or - more team members to bypass space limits imposed by policy. - :ivar MemberSpaceLimitsChangePolicyDetails - member_space_limits_change_policy_details: Changed the storage limits - applied to team members by policy. - :ivar MemberSpaceLimitsRemoveExceptionDetails - member_space_limits_remove_exception_details: Removed an exception for - one or more team members to bypass space limits imposed by policy. - :ivar MemberSuggestionsChangePolicyDetails - member_suggestions_change_policy_details: Enabled or disabled the option - for team members to suggest new members to add to the team. - :ivar MicrosoftOfficeAddinChangePolicyDetails - microsoft_office_addin_change_policy_details: Enabled or disabled the - Microsoft Office add-in, which lets team members save files to Dropbox - directly from Microsoft Office. - :ivar NetworkControlChangePolicyDetails - network_control_change_policy_details: Enabled or disabled network - control. - :ivar PaperChangeDeploymentPolicyDetails - paper_change_deployment_policy_details: Changed whether Dropbox Paper, - when enabled, is deployed to all teams or to specific members of the - team. - :ivar PaperChangeMemberLinkPolicyDetails - paper_change_member_link_policy_details: Changed whether non team - members can view Paper documents using a link. - :ivar PaperChangeMemberPolicyDetails paper_change_member_policy_details: - Changed whether team members can share Paper documents externally (i.e. - outside the team), and if so, whether they should be accessible only by - team members or anyone by default. - :ivar PaperChangePolicyDetails paper_change_policy_details: Enabled or - disabled Dropbox Paper for the team. - :ivar PermanentDeleteChangePolicyDetails - permanent_delete_change_policy_details: Enabled or disabled the ability - of team members to permanently delete content. - :ivar SharingChangeFolderJoinPolicyDetails - sharing_change_folder_join_policy_details: Changed whether team members - can join shared folders owned externally (i.e. outside the team). - :ivar SharingChangeLinkPolicyDetails sharing_change_link_policy_details: - Changed whether team members can share links externally (i.e. outside - the team), and if so, whether links should be accessible only by team - members or anyone by default. - :ivar SharingChangeMemberPolicyDetails sharing_change_member_policy_details: - Changed whether team members can share files and folders externally - (i.e. outside the team). - :ivar SmartSyncChangePolicyDetails smart_sync_change_policy_details: Changed - the default Smart Sync policy for team members. - :ivar SmartSyncNotOptOutDetails smart_sync_not_opt_out_details: Opted team - into Smart Sync. - :ivar SmartSyncOptOutDetails smart_sync_opt_out_details: Opted team out of - Smart Sync. - :ivar SsoChangePolicyDetails sso_change_policy_details: Change the single - sign-on policy for the team. - :ivar TfaChangePolicyDetails tfa_change_policy_details: Change two-step - verification policy for the team. - :ivar TwoAccountChangePolicyDetails two_account_change_policy_details: - Enabled or disabled the option for team members to link a personal - Dropbox account in addition to their work account to the same computer. - :ivar WebSessionsChangeFixedLengthPolicyDetails - web_sessions_change_fixed_length_policy_details: Changed how long team - members can stay signed in to Dropbox on the web. - :ivar WebSessionsChangeIdleLengthPolicyDetails - web_sessions_change_idle_length_policy_details: Changed how long team - members can be idle while signed in to Dropbox on the web. - :ivar TeamProfileAddLogoDetails team_profile_add_logo_details: Added a team - logo to be displayed on shared link headers. - :ivar TeamProfileChangeDefaultLanguageDetails - team_profile_change_default_language_details: Changed the default - language for the team. - :ivar TeamProfileChangeLogoDetails team_profile_change_logo_details: Changed - the team logo to be displayed on shared link headers. - :ivar TeamProfileChangeNameDetails team_profile_change_name_details: Changed - the team name. - :ivar TeamProfileRemoveLogoDetails team_profile_remove_logo_details: Removed - the team logo to be displayed on shared link headers. - :ivar TfaAddBackupPhoneDetails tfa_add_backup_phone_details: Added a backup - phone for two-step verification. - :ivar TfaAddSecurityKeyDetails tfa_add_security_key_details: Added a - security key for two-step verification. - :ivar TfaChangeBackupPhoneDetails tfa_change_backup_phone_details: Changed - the backup phone for two-step verification. - :ivar TfaChangeStatusDetails tfa_change_status_details: Enabled, disabled or - changed the configuration for two-step verification. - :ivar TfaRemoveBackupPhoneDetails tfa_remove_backup_phone_details: Removed - the backup phone for two-step verification. - :ivar TfaRemoveSecurityKeyDetails tfa_remove_security_key_details: Removed a - security key for two-step verification. - :ivar TfaResetDetails tfa_reset_details: Reset two-step verification for - team member. - :ivar MissingDetails missing_details: Hints that this event was returned - with missing details due to an internal error. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def member_change_membership_type_details(cls, val): - """ - Create an instance of this class set to the - ``member_change_membership_type_details`` tag with value ``val``. - - :param MemberChangeMembershipTypeDetails val: - :rtype: EventDetails - """ - return cls('member_change_membership_type_details', val) - - @classmethod - def member_permanently_delete_account_contents_details(cls, val): - """ - Create an instance of this class set to the - ``member_permanently_delete_account_contents_details`` tag with value - ``val``. - - :param MemberPermanentlyDeleteAccountContentsDetails val: - :rtype: EventDetails - """ - return cls('member_permanently_delete_account_contents_details', val) - - @classmethod - def member_space_limits_change_status_details(cls, val): - """ - Create an instance of this class set to the - ``member_space_limits_change_status_details`` tag with value ``val``. - - :param MemberSpaceLimitsChangeStatusDetails val: - :rtype: EventDetails - """ - return cls('member_space_limits_change_status_details', val) - - @classmethod - def member_transfer_account_contents_details(cls, val): - """ - Create an instance of this class set to the - ``member_transfer_account_contents_details`` tag with value ``val``. - - :param MemberTransferAccountContentsDetails val: - :rtype: EventDetails - """ - return cls('member_transfer_account_contents_details', val) - - @classmethod - def paper_admin_export_start_details(cls, val): - """ - Create an instance of this class set to the - ``paper_admin_export_start_details`` tag with value ``val``. - - :param PaperAdminExportStartDetails val: - :rtype: EventDetails - """ - return cls('paper_admin_export_start_details', val) - - @classmethod - def paper_enabled_users_group_addition_details(cls, val): - """ - Create an instance of this class set to the - ``paper_enabled_users_group_addition_details`` tag with value ``val``. - - :param PaperEnabledUsersGroupAdditionDetails val: - :rtype: EventDetails - """ - return cls('paper_enabled_users_group_addition_details', val) - - @classmethod - def paper_enabled_users_group_removal_details(cls, val): - """ - Create an instance of this class set to the - ``paper_enabled_users_group_removal_details`` tag with value ``val``. - - :param PaperEnabledUsersGroupRemovalDetails val: - :rtype: EventDetails - """ - return cls('paper_enabled_users_group_removal_details', val) - - @classmethod - def paper_external_view_allow_details(cls, val): - """ - Create an instance of this class set to the - ``paper_external_view_allow_details`` tag with value ``val``. - - :param PaperExternalViewAllowDetails val: - :rtype: EventDetails - """ - return cls('paper_external_view_allow_details', val) - - @classmethod - def paper_external_view_default_team_details(cls, val): - """ - Create an instance of this class set to the - ``paper_external_view_default_team_details`` tag with value ``val``. - - :param PaperExternalViewDefaultTeamDetails val: - :rtype: EventDetails - """ - return cls('paper_external_view_default_team_details', val) - - @classmethod - def paper_external_view_forbid_details(cls, val): - """ - Create an instance of this class set to the - ``paper_external_view_forbid_details`` tag with value ``val``. - - :param PaperExternalViewForbidDetails val: - :rtype: EventDetails - """ - return cls('paper_external_view_forbid_details', val) - - @classmethod - def sf_external_invite_warn_details(cls, val): - """ - Create an instance of this class set to the - ``sf_external_invite_warn_details`` tag with value ``val``. - - :param SfExternalInviteWarnDetails val: - :rtype: EventDetails - """ - return cls('sf_external_invite_warn_details', val) - - @classmethod - def team_merge_from_details(cls, val): - """ - Create an instance of this class set to the ``team_merge_from_details`` - tag with value ``val``. - - :param TeamMergeFromDetails val: - :rtype: EventDetails - """ - return cls('team_merge_from_details', val) - - @classmethod - def team_merge_to_details(cls, val): - """ - Create an instance of this class set to the ``team_merge_to_details`` - tag with value ``val``. - - :param TeamMergeToDetails val: - :rtype: EventDetails - """ - return cls('team_merge_to_details', val) - - @classmethod - def app_link_team_details(cls, val): - """ - Create an instance of this class set to the ``app_link_team_details`` - tag with value ``val``. - - :param AppLinkTeamDetails val: - :rtype: EventDetails - """ - return cls('app_link_team_details', val) - - @classmethod - def app_link_user_details(cls, val): - """ - Create an instance of this class set to the ``app_link_user_details`` - tag with value ``val``. - - :param AppLinkUserDetails val: - :rtype: EventDetails - """ - return cls('app_link_user_details', val) - - @classmethod - def app_unlink_team_details(cls, val): - """ - Create an instance of this class set to the ``app_unlink_team_details`` - tag with value ``val``. - - :param AppUnlinkTeamDetails val: - :rtype: EventDetails - """ - return cls('app_unlink_team_details', val) - - @classmethod - def app_unlink_user_details(cls, val): - """ - Create an instance of this class set to the ``app_unlink_user_details`` - tag with value ``val``. - - :param AppUnlinkUserDetails val: - :rtype: EventDetails - """ - return cls('app_unlink_user_details', val) - - @classmethod - def file_add_comment_details(cls, val): - """ - Create an instance of this class set to the ``file_add_comment_details`` - tag with value ``val``. - - :param FileAddCommentDetails val: - :rtype: EventDetails - """ - return cls('file_add_comment_details', val) - - @classmethod - def file_change_comment_subscription_details(cls, val): - """ - Create an instance of this class set to the - ``file_change_comment_subscription_details`` tag with value ``val``. - - :param FileChangeCommentSubscriptionDetails val: - :rtype: EventDetails - """ - return cls('file_change_comment_subscription_details', val) - - @classmethod - def file_delete_comment_details(cls, val): - """ - Create an instance of this class set to the - ``file_delete_comment_details`` tag with value ``val``. - - :param FileDeleteCommentDetails val: - :rtype: EventDetails - """ - return cls('file_delete_comment_details', val) - - @classmethod - def file_like_comment_details(cls, val): - """ - Create an instance of this class set to the - ``file_like_comment_details`` tag with value ``val``. - - :param FileLikeCommentDetails val: - :rtype: EventDetails - """ - return cls('file_like_comment_details', val) - - @classmethod - def file_resolve_comment_details(cls, val): - """ - Create an instance of this class set to the - ``file_resolve_comment_details`` tag with value ``val``. - - :param FileResolveCommentDetails val: - :rtype: EventDetails - """ - return cls('file_resolve_comment_details', val) - - @classmethod - def file_unlike_comment_details(cls, val): - """ - Create an instance of this class set to the - ``file_unlike_comment_details`` tag with value ``val``. - - :param FileUnlikeCommentDetails val: - :rtype: EventDetails - """ - return cls('file_unlike_comment_details', val) - - @classmethod - def file_unresolve_comment_details(cls, val): - """ - Create an instance of this class set to the - ``file_unresolve_comment_details`` tag with value ``val``. - - :param FileUnresolveCommentDetails val: - :rtype: EventDetails - """ - return cls('file_unresolve_comment_details', val) - - @classmethod - def device_change_ip_desktop_details(cls, val): - """ - Create an instance of this class set to the - ``device_change_ip_desktop_details`` tag with value ``val``. - - :param DeviceChangeIpDesktopDetails val: - :rtype: EventDetails - """ - return cls('device_change_ip_desktop_details', val) - - @classmethod - def device_change_ip_mobile_details(cls, val): - """ - Create an instance of this class set to the - ``device_change_ip_mobile_details`` tag with value ``val``. - - :param DeviceChangeIpMobileDetails val: - :rtype: EventDetails - """ - return cls('device_change_ip_mobile_details', val) - - @classmethod - def device_change_ip_web_details(cls, val): - """ - Create an instance of this class set to the - ``device_change_ip_web_details`` tag with value ``val``. - - :param DeviceChangeIpWebDetails val: - :rtype: EventDetails - """ - return cls('device_change_ip_web_details', val) - - @classmethod - def device_delete_on_unlink_fail_details(cls, val): - """ - Create an instance of this class set to the - ``device_delete_on_unlink_fail_details`` tag with value ``val``. - - :param DeviceDeleteOnUnlinkFailDetails val: - :rtype: EventDetails - """ - return cls('device_delete_on_unlink_fail_details', val) - - @classmethod - def device_delete_on_unlink_success_details(cls, val): - """ - Create an instance of this class set to the - ``device_delete_on_unlink_success_details`` tag with value ``val``. - - :param DeviceDeleteOnUnlinkSuccessDetails val: - :rtype: EventDetails - """ - return cls('device_delete_on_unlink_success_details', val) - - @classmethod - def device_link_fail_details(cls, val): - """ - Create an instance of this class set to the ``device_link_fail_details`` - tag with value ``val``. - - :param DeviceLinkFailDetails val: - :rtype: EventDetails - """ - return cls('device_link_fail_details', val) - - @classmethod - def device_link_success_details(cls, val): - """ - Create an instance of this class set to the - ``device_link_success_details`` tag with value ``val``. - - :param DeviceLinkSuccessDetails val: - :rtype: EventDetails - """ - return cls('device_link_success_details', val) - - @classmethod - def device_management_disabled_details(cls, val): - """ - Create an instance of this class set to the - ``device_management_disabled_details`` tag with value ``val``. - - :param DeviceManagementDisabledDetails val: - :rtype: EventDetails - """ - return cls('device_management_disabled_details', val) - - @classmethod - def device_management_enabled_details(cls, val): - """ - Create an instance of this class set to the - ``device_management_enabled_details`` tag with value ``val``. - - :param DeviceManagementEnabledDetails val: - :rtype: EventDetails - """ - return cls('device_management_enabled_details', val) - - @classmethod - def device_unlink_details(cls, val): - """ - Create an instance of this class set to the ``device_unlink_details`` - tag with value ``val``. - - :param DeviceUnlinkDetails val: - :rtype: EventDetails - """ - return cls('device_unlink_details', val) - - @classmethod - def emm_refresh_auth_token_details(cls, val): - """ - Create an instance of this class set to the - ``emm_refresh_auth_token_details`` tag with value ``val``. - - :param EmmRefreshAuthTokenDetails val: - :rtype: EventDetails - """ - return cls('emm_refresh_auth_token_details', val) - - @classmethod - def account_capture_change_availability_details(cls, val): - """ - Create an instance of this class set to the - ``account_capture_change_availability_details`` tag with value ``val``. - - :param AccountCaptureChangeAvailabilityDetails val: - :rtype: EventDetails - """ - return cls('account_capture_change_availability_details', val) - - @classmethod - def account_capture_migrate_account_details(cls, val): - """ - Create an instance of this class set to the - ``account_capture_migrate_account_details`` tag with value ``val``. - - :param AccountCaptureMigrateAccountDetails val: - :rtype: EventDetails - """ - return cls('account_capture_migrate_account_details', val) - - @classmethod - def account_capture_relinquish_account_details(cls, val): - """ - Create an instance of this class set to the - ``account_capture_relinquish_account_details`` tag with value ``val``. - - :param AccountCaptureRelinquishAccountDetails val: - :rtype: EventDetails - """ - return cls('account_capture_relinquish_account_details', val) - - @classmethod - def disabled_domain_invites_details(cls, val): - """ - Create an instance of this class set to the - ``disabled_domain_invites_details`` tag with value ``val``. - - :param DisabledDomainInvitesDetails val: - :rtype: EventDetails - """ - return cls('disabled_domain_invites_details', val) - - @classmethod - def domain_invites_approve_request_to_join_team_details(cls, val): - """ - Create an instance of this class set to the - ``domain_invites_approve_request_to_join_team_details`` tag with value - ``val``. - - :param DomainInvitesApproveRequestToJoinTeamDetails val: - :rtype: EventDetails - """ - return cls('domain_invites_approve_request_to_join_team_details', val) - - @classmethod - def domain_invites_decline_request_to_join_team_details(cls, val): - """ - Create an instance of this class set to the - ``domain_invites_decline_request_to_join_team_details`` tag with value - ``val``. - - :param DomainInvitesDeclineRequestToJoinTeamDetails val: - :rtype: EventDetails - """ - return cls('domain_invites_decline_request_to_join_team_details', val) - - @classmethod - def domain_invites_email_existing_users_details(cls, val): - """ - Create an instance of this class set to the - ``domain_invites_email_existing_users_details`` tag with value ``val``. - - :param DomainInvitesEmailExistingUsersDetails val: - :rtype: EventDetails - """ - return cls('domain_invites_email_existing_users_details', val) - - @classmethod - def domain_invites_request_to_join_team_details(cls, val): - """ - Create an instance of this class set to the - ``domain_invites_request_to_join_team_details`` tag with value ``val``. - - :param DomainInvitesRequestToJoinTeamDetails val: - :rtype: EventDetails - """ - return cls('domain_invites_request_to_join_team_details', val) - - @classmethod - def domain_invites_set_invite_new_user_pref_to_no_details(cls, val): - """ - Create an instance of this class set to the - ``domain_invites_set_invite_new_user_pref_to_no_details`` tag with value - ``val``. - - :param DomainInvitesSetInviteNewUserPrefToNoDetails val: - :rtype: EventDetails - """ - return cls('domain_invites_set_invite_new_user_pref_to_no_details', val) - - @classmethod - def domain_invites_set_invite_new_user_pref_to_yes_details(cls, val): - """ - Create an instance of this class set to the - ``domain_invites_set_invite_new_user_pref_to_yes_details`` tag with - value ``val``. - - :param DomainInvitesSetInviteNewUserPrefToYesDetails val: - :rtype: EventDetails - """ - return cls('domain_invites_set_invite_new_user_pref_to_yes_details', val) - - @classmethod - def domain_verification_add_domain_fail_details(cls, val): - """ - Create an instance of this class set to the - ``domain_verification_add_domain_fail_details`` tag with value ``val``. - - :param DomainVerificationAddDomainFailDetails val: - :rtype: EventDetails - """ - return cls('domain_verification_add_domain_fail_details', val) - - @classmethod - def domain_verification_add_domain_success_details(cls, val): - """ - Create an instance of this class set to the - ``domain_verification_add_domain_success_details`` tag with value - ``val``. - - :param DomainVerificationAddDomainSuccessDetails val: - :rtype: EventDetails - """ - return cls('domain_verification_add_domain_success_details', val) - - @classmethod - def domain_verification_remove_domain_details(cls, val): - """ - Create an instance of this class set to the - ``domain_verification_remove_domain_details`` tag with value ``val``. - - :param DomainVerificationRemoveDomainDetails val: - :rtype: EventDetails - """ - return cls('domain_verification_remove_domain_details', val) - - @classmethod - def enabled_domain_invites_details(cls, val): - """ - Create an instance of this class set to the - ``enabled_domain_invites_details`` tag with value ``val``. - - :param EnabledDomainInvitesDetails val: - :rtype: EventDetails - """ - return cls('enabled_domain_invites_details', val) - - @classmethod - def create_folder_details(cls, val): - """ - Create an instance of this class set to the ``create_folder_details`` - tag with value ``val``. - - :param CreateFolderDetails val: - :rtype: EventDetails - """ - return cls('create_folder_details', val) - - @classmethod - def file_add_details(cls, val): - """ - Create an instance of this class set to the ``file_add_details`` tag - with value ``val``. - - :param FileAddDetails val: - :rtype: EventDetails - """ - return cls('file_add_details', val) - - @classmethod - def file_copy_details(cls, val): - """ - Create an instance of this class set to the ``file_copy_details`` tag - with value ``val``. - - :param FileCopyDetails val: - :rtype: EventDetails - """ - return cls('file_copy_details', val) - - @classmethod - def file_delete_details(cls, val): - """ - Create an instance of this class set to the ``file_delete_details`` tag - with value ``val``. - - :param FileDeleteDetails val: - :rtype: EventDetails - """ - return cls('file_delete_details', val) - - @classmethod - def file_download_details(cls, val): - """ - Create an instance of this class set to the ``file_download_details`` - tag with value ``val``. - - :param FileDownloadDetails val: - :rtype: EventDetails - """ - return cls('file_download_details', val) - - @classmethod - def file_edit_details(cls, val): - """ - Create an instance of this class set to the ``file_edit_details`` tag - with value ``val``. - - :param FileEditDetails val: - :rtype: EventDetails - """ - return cls('file_edit_details', val) - - @classmethod - def file_get_copy_reference_details(cls, val): - """ - Create an instance of this class set to the - ``file_get_copy_reference_details`` tag with value ``val``. - - :param FileGetCopyReferenceDetails val: - :rtype: EventDetails - """ - return cls('file_get_copy_reference_details', val) - - @classmethod - def file_move_details(cls, val): - """ - Create an instance of this class set to the ``file_move_details`` tag - with value ``val``. - - :param FileMoveDetails val: - :rtype: EventDetails - """ - return cls('file_move_details', val) - - @classmethod - def file_permanently_delete_details(cls, val): - """ - Create an instance of this class set to the - ``file_permanently_delete_details`` tag with value ``val``. - - :param FilePermanentlyDeleteDetails val: - :rtype: EventDetails - """ - return cls('file_permanently_delete_details', val) - - @classmethod - def file_preview_details(cls, val): - """ - Create an instance of this class set to the ``file_preview_details`` tag - with value ``val``. - - :param FilePreviewDetails val: - :rtype: EventDetails - """ - return cls('file_preview_details', val) - - @classmethod - def file_rename_details(cls, val): - """ - Create an instance of this class set to the ``file_rename_details`` tag - with value ``val``. - - :param FileRenameDetails val: - :rtype: EventDetails - """ - return cls('file_rename_details', val) - - @classmethod - def file_restore_details(cls, val): - """ - Create an instance of this class set to the ``file_restore_details`` tag - with value ``val``. - - :param FileRestoreDetails val: - :rtype: EventDetails - """ - return cls('file_restore_details', val) - - @classmethod - def file_revert_details(cls, val): - """ - Create an instance of this class set to the ``file_revert_details`` tag - with value ``val``. - - :param FileRevertDetails val: - :rtype: EventDetails - """ - return cls('file_revert_details', val) - - @classmethod - def file_rollback_changes_details(cls, val): - """ - Create an instance of this class set to the - ``file_rollback_changes_details`` tag with value ``val``. - - :param FileRollbackChangesDetails val: - :rtype: EventDetails - """ - return cls('file_rollback_changes_details', val) - - @classmethod - def file_save_copy_reference_details(cls, val): - """ - Create an instance of this class set to the - ``file_save_copy_reference_details`` tag with value ``val``. - - :param FileSaveCopyReferenceDetails val: - :rtype: EventDetails - """ - return cls('file_save_copy_reference_details', val) - - @classmethod - def file_request_add_deadline_details(cls, val): - """ - Create an instance of this class set to the - ``file_request_add_deadline_details`` tag with value ``val``. - - :param FileRequestAddDeadlineDetails val: - :rtype: EventDetails - """ - return cls('file_request_add_deadline_details', val) - - @classmethod - def file_request_change_folder_details(cls, val): - """ - Create an instance of this class set to the - ``file_request_change_folder_details`` tag with value ``val``. - - :param FileRequestChangeFolderDetails val: - :rtype: EventDetails - """ - return cls('file_request_change_folder_details', val) - - @classmethod - def file_request_change_title_details(cls, val): - """ - Create an instance of this class set to the - ``file_request_change_title_details`` tag with value ``val``. - - :param FileRequestChangeTitleDetails val: - :rtype: EventDetails - """ - return cls('file_request_change_title_details', val) - - @classmethod - def file_request_close_details(cls, val): - """ - Create an instance of this class set to the - ``file_request_close_details`` tag with value ``val``. - - :param FileRequestCloseDetails val: - :rtype: EventDetails - """ - return cls('file_request_close_details', val) - - @classmethod - def file_request_create_details(cls, val): - """ - Create an instance of this class set to the - ``file_request_create_details`` tag with value ``val``. - - :param FileRequestCreateDetails val: - :rtype: EventDetails - """ - return cls('file_request_create_details', val) - - @classmethod - def file_request_receive_file_details(cls, val): - """ - Create an instance of this class set to the - ``file_request_receive_file_details`` tag with value ``val``. - - :param FileRequestReceiveFileDetails val: - :rtype: EventDetails - """ - return cls('file_request_receive_file_details', val) - - @classmethod - def file_request_remove_deadline_details(cls, val): - """ - Create an instance of this class set to the - ``file_request_remove_deadline_details`` tag with value ``val``. - - :param FileRequestRemoveDeadlineDetails val: - :rtype: EventDetails - """ - return cls('file_request_remove_deadline_details', val) - - @classmethod - def file_request_send_details(cls, val): - """ - Create an instance of this class set to the - ``file_request_send_details`` tag with value ``val``. - - :param FileRequestSendDetails val: - :rtype: EventDetails - """ - return cls('file_request_send_details', val) - - @classmethod - def group_add_external_id_details(cls, val): - """ - Create an instance of this class set to the - ``group_add_external_id_details`` tag with value ``val``. - - :param GroupAddExternalIdDetails val: - :rtype: EventDetails - """ - return cls('group_add_external_id_details', val) - - @classmethod - def group_add_member_details(cls, val): - """ - Create an instance of this class set to the ``group_add_member_details`` - tag with value ``val``. - - :param GroupAddMemberDetails val: - :rtype: EventDetails - """ - return cls('group_add_member_details', val) - - @classmethod - def group_change_external_id_details(cls, val): - """ - Create an instance of this class set to the - ``group_change_external_id_details`` tag with value ``val``. - - :param GroupChangeExternalIdDetails val: - :rtype: EventDetails - """ - return cls('group_change_external_id_details', val) - - @classmethod - def group_change_management_type_details(cls, val): - """ - Create an instance of this class set to the - ``group_change_management_type_details`` tag with value ``val``. - - :param GroupChangeManagementTypeDetails val: - :rtype: EventDetails - """ - return cls('group_change_management_type_details', val) - - @classmethod - def group_change_member_role_details(cls, val): - """ - Create an instance of this class set to the - ``group_change_member_role_details`` tag with value ``val``. - - :param GroupChangeMemberRoleDetails val: - :rtype: EventDetails - """ - return cls('group_change_member_role_details', val) - - @classmethod - def group_create_details(cls, val): - """ - Create an instance of this class set to the ``group_create_details`` tag - with value ``val``. - - :param GroupCreateDetails val: - :rtype: EventDetails - """ - return cls('group_create_details', val) - - @classmethod - def group_delete_details(cls, val): - """ - Create an instance of this class set to the ``group_delete_details`` tag - with value ``val``. - - :param GroupDeleteDetails val: - :rtype: EventDetails - """ - return cls('group_delete_details', val) - - @classmethod - def group_moved_details(cls, val): - """ - Create an instance of this class set to the ``group_moved_details`` tag - with value ``val``. - - :param GroupMovedDetails val: - :rtype: EventDetails - """ - return cls('group_moved_details', val) - - @classmethod - def group_remove_external_id_details(cls, val): - """ - Create an instance of this class set to the - ``group_remove_external_id_details`` tag with value ``val``. - - :param GroupRemoveExternalIdDetails val: - :rtype: EventDetails - """ - return cls('group_remove_external_id_details', val) - - @classmethod - def group_remove_member_details(cls, val): - """ - Create an instance of this class set to the - ``group_remove_member_details`` tag with value ``val``. - - :param GroupRemoveMemberDetails val: - :rtype: EventDetails - """ - return cls('group_remove_member_details', val) - - @classmethod - def group_rename_details(cls, val): - """ - Create an instance of this class set to the ``group_rename_details`` tag - with value ``val``. - - :param GroupRenameDetails val: - :rtype: EventDetails - """ - return cls('group_rename_details', val) - - @classmethod - def emm_login_success_details(cls, val): - """ - Create an instance of this class set to the - ``emm_login_success_details`` tag with value ``val``. - - :param EmmLoginSuccessDetails val: - :rtype: EventDetails - """ - return cls('emm_login_success_details', val) - - @classmethod - def logout_details(cls, val): - """ - Create an instance of this class set to the ``logout_details`` tag with - value ``val``. - - :param LogoutDetails val: - :rtype: EventDetails - """ - return cls('logout_details', val) - - @classmethod - def password_login_fail_details(cls, val): - """ - Create an instance of this class set to the - ``password_login_fail_details`` tag with value ``val``. - - :param PasswordLoginFailDetails val: - :rtype: EventDetails - """ - return cls('password_login_fail_details', val) - - @classmethod - def password_login_success_details(cls, val): - """ - Create an instance of this class set to the - ``password_login_success_details`` tag with value ``val``. - - :param PasswordLoginSuccessDetails val: - :rtype: EventDetails - """ - return cls('password_login_success_details', val) - - @classmethod - def reseller_support_session_end_details(cls, val): - """ - Create an instance of this class set to the - ``reseller_support_session_end_details`` tag with value ``val``. - - :param ResellerSupportSessionEndDetails val: - :rtype: EventDetails - """ - return cls('reseller_support_session_end_details', val) - - @classmethod - def reseller_support_session_start_details(cls, val): - """ - Create an instance of this class set to the - ``reseller_support_session_start_details`` tag with value ``val``. - - :param ResellerSupportSessionStartDetails val: - :rtype: EventDetails - """ - return cls('reseller_support_session_start_details', val) - - @classmethod - def sign_in_as_session_end_details(cls, val): - """ - Create an instance of this class set to the - ``sign_in_as_session_end_details`` tag with value ``val``. - - :param SignInAsSessionEndDetails val: - :rtype: EventDetails - """ - return cls('sign_in_as_session_end_details', val) - - @classmethod - def sign_in_as_session_start_details(cls, val): - """ - Create an instance of this class set to the - ``sign_in_as_session_start_details`` tag with value ``val``. - - :param SignInAsSessionStartDetails val: - :rtype: EventDetails - """ - return cls('sign_in_as_session_start_details', val) - - @classmethod - def sso_login_fail_details(cls, val): - """ - Create an instance of this class set to the ``sso_login_fail_details`` - tag with value ``val``. - - :param SsoLoginFailDetails val: - :rtype: EventDetails - """ - return cls('sso_login_fail_details', val) - - @classmethod - def member_add_name_details(cls, val): - """ - Create an instance of this class set to the ``member_add_name_details`` - tag with value ``val``. - - :param MemberAddNameDetails val: - :rtype: EventDetails - """ - return cls('member_add_name_details', val) - - @classmethod - def member_change_admin_role_details(cls, val): - """ - Create an instance of this class set to the - ``member_change_admin_role_details`` tag with value ``val``. - - :param MemberChangeAdminRoleDetails val: - :rtype: EventDetails - """ - return cls('member_change_admin_role_details', val) - - @classmethod - def member_change_email_details(cls, val): - """ - Create an instance of this class set to the - ``member_change_email_details`` tag with value ``val``. - - :param MemberChangeEmailDetails val: - :rtype: EventDetails - """ - return cls('member_change_email_details', val) - - @classmethod - def member_change_name_details(cls, val): - """ - Create an instance of this class set to the - ``member_change_name_details`` tag with value ``val``. - - :param MemberChangeNameDetails val: - :rtype: EventDetails - """ - return cls('member_change_name_details', val) - - @classmethod - def member_change_status_details(cls, val): - """ - Create an instance of this class set to the - ``member_change_status_details`` tag with value ``val``. - - :param MemberChangeStatusDetails val: - :rtype: EventDetails - """ - return cls('member_change_status_details', val) - - @classmethod - def member_suggest_details(cls, val): - """ - Create an instance of this class set to the ``member_suggest_details`` - tag with value ``val``. - - :param MemberSuggestDetails val: - :rtype: EventDetails - """ - return cls('member_suggest_details', val) - - @classmethod - def paper_content_add_member_details(cls, val): - """ - Create an instance of this class set to the - ``paper_content_add_member_details`` tag with value ``val``. - - :param PaperContentAddMemberDetails val: - :rtype: EventDetails - """ - return cls('paper_content_add_member_details', val) - - @classmethod - def paper_content_add_to_folder_details(cls, val): - """ - Create an instance of this class set to the - ``paper_content_add_to_folder_details`` tag with value ``val``. - - :param PaperContentAddToFolderDetails val: - :rtype: EventDetails - """ - return cls('paper_content_add_to_folder_details', val) - - @classmethod - def paper_content_archive_details(cls, val): - """ - Create an instance of this class set to the - ``paper_content_archive_details`` tag with value ``val``. - - :param PaperContentArchiveDetails val: - :rtype: EventDetails - """ - return cls('paper_content_archive_details', val) - - @classmethod - def paper_content_create_details(cls, val): - """ - Create an instance of this class set to the - ``paper_content_create_details`` tag with value ``val``. - - :param PaperContentCreateDetails val: - :rtype: EventDetails - """ - return cls('paper_content_create_details', val) - - @classmethod - def paper_content_permanently_delete_details(cls, val): - """ - Create an instance of this class set to the - ``paper_content_permanently_delete_details`` tag with value ``val``. - - :param PaperContentPermanentlyDeleteDetails val: - :rtype: EventDetails - """ - return cls('paper_content_permanently_delete_details', val) - - @classmethod - def paper_content_remove_from_folder_details(cls, val): - """ - Create an instance of this class set to the - ``paper_content_remove_from_folder_details`` tag with value ``val``. - - :param PaperContentRemoveFromFolderDetails val: - :rtype: EventDetails - """ - return cls('paper_content_remove_from_folder_details', val) - - @classmethod - def paper_content_remove_member_details(cls, val): - """ - Create an instance of this class set to the - ``paper_content_remove_member_details`` tag with value ``val``. - - :param PaperContentRemoveMemberDetails val: - :rtype: EventDetails - """ - return cls('paper_content_remove_member_details', val) - - @classmethod - def paper_content_rename_details(cls, val): - """ - Create an instance of this class set to the - ``paper_content_rename_details`` tag with value ``val``. - - :param PaperContentRenameDetails val: - :rtype: EventDetails - """ - return cls('paper_content_rename_details', val) - - @classmethod - def paper_content_restore_details(cls, val): - """ - Create an instance of this class set to the - ``paper_content_restore_details`` tag with value ``val``. - - :param PaperContentRestoreDetails val: - :rtype: EventDetails - """ - return cls('paper_content_restore_details', val) - - @classmethod - def paper_doc_add_comment_details(cls, val): - """ - Create an instance of this class set to the - ``paper_doc_add_comment_details`` tag with value ``val``. - - :param PaperDocAddCommentDetails val: - :rtype: EventDetails - """ - return cls('paper_doc_add_comment_details', val) - - @classmethod - def paper_doc_change_member_role_details(cls, val): - """ - Create an instance of this class set to the - ``paper_doc_change_member_role_details`` tag with value ``val``. - - :param PaperDocChangeMemberRoleDetails val: - :rtype: EventDetails - """ - return cls('paper_doc_change_member_role_details', val) - - @classmethod - def paper_doc_change_sharing_policy_details(cls, val): - """ - Create an instance of this class set to the - ``paper_doc_change_sharing_policy_details`` tag with value ``val``. - - :param PaperDocChangeSharingPolicyDetails val: - :rtype: EventDetails - """ - return cls('paper_doc_change_sharing_policy_details', val) - - @classmethod - def paper_doc_change_subscription_details(cls, val): - """ - Create an instance of this class set to the - ``paper_doc_change_subscription_details`` tag with value ``val``. - - :param PaperDocChangeSubscriptionDetails val: - :rtype: EventDetails - """ - return cls('paper_doc_change_subscription_details', val) - - @classmethod - def paper_doc_deleted_details(cls, val): - """ - Create an instance of this class set to the - ``paper_doc_deleted_details`` tag with value ``val``. - - :param PaperDocDeletedDetails val: - :rtype: EventDetails - """ - return cls('paper_doc_deleted_details', val) - - @classmethod - def paper_doc_delete_comment_details(cls, val): - """ - Create an instance of this class set to the - ``paper_doc_delete_comment_details`` tag with value ``val``. - - :param PaperDocDeleteCommentDetails val: - :rtype: EventDetails - """ - return cls('paper_doc_delete_comment_details', val) - - @classmethod - def paper_doc_download_details(cls, val): - """ - Create an instance of this class set to the - ``paper_doc_download_details`` tag with value ``val``. - - :param PaperDocDownloadDetails val: - :rtype: EventDetails - """ - return cls('paper_doc_download_details', val) - - @classmethod - def paper_doc_edit_details(cls, val): - """ - Create an instance of this class set to the ``paper_doc_edit_details`` - tag with value ``val``. - - :param PaperDocEditDetails val: - :rtype: EventDetails - """ - return cls('paper_doc_edit_details', val) - - @classmethod - def paper_doc_edit_comment_details(cls, val): - """ - Create an instance of this class set to the - ``paper_doc_edit_comment_details`` tag with value ``val``. - - :param PaperDocEditCommentDetails val: - :rtype: EventDetails - """ - return cls('paper_doc_edit_comment_details', val) - - @classmethod - def paper_doc_followed_details(cls, val): - """ - Create an instance of this class set to the - ``paper_doc_followed_details`` tag with value ``val``. - - :param PaperDocFollowedDetails val: - :rtype: EventDetails - """ - return cls('paper_doc_followed_details', val) - - @classmethod - def paper_doc_mention_details(cls, val): - """ - Create an instance of this class set to the - ``paper_doc_mention_details`` tag with value ``val``. - - :param PaperDocMentionDetails val: - :rtype: EventDetails - """ - return cls('paper_doc_mention_details', val) - - @classmethod - def paper_doc_request_access_details(cls, val): - """ - Create an instance of this class set to the - ``paper_doc_request_access_details`` tag with value ``val``. - - :param PaperDocRequestAccessDetails val: - :rtype: EventDetails - """ - return cls('paper_doc_request_access_details', val) - - @classmethod - def paper_doc_resolve_comment_details(cls, val): - """ - Create an instance of this class set to the - ``paper_doc_resolve_comment_details`` tag with value ``val``. - - :param PaperDocResolveCommentDetails val: - :rtype: EventDetails - """ - return cls('paper_doc_resolve_comment_details', val) - - @classmethod - def paper_doc_revert_details(cls, val): - """ - Create an instance of this class set to the ``paper_doc_revert_details`` - tag with value ``val``. - - :param PaperDocRevertDetails val: - :rtype: EventDetails - """ - return cls('paper_doc_revert_details', val) - - @classmethod - def paper_doc_slack_share_details(cls, val): - """ - Create an instance of this class set to the - ``paper_doc_slack_share_details`` tag with value ``val``. - - :param PaperDocSlackShareDetails val: - :rtype: EventDetails - """ - return cls('paper_doc_slack_share_details', val) - - @classmethod - def paper_doc_team_invite_details(cls, val): - """ - Create an instance of this class set to the - ``paper_doc_team_invite_details`` tag with value ``val``. - - :param PaperDocTeamInviteDetails val: - :rtype: EventDetails - """ - return cls('paper_doc_team_invite_details', val) - - @classmethod - def paper_doc_trashed_details(cls, val): - """ - Create an instance of this class set to the - ``paper_doc_trashed_details`` tag with value ``val``. - - :param PaperDocTrashedDetails val: - :rtype: EventDetails - """ - return cls('paper_doc_trashed_details', val) - - @classmethod - def paper_doc_unresolve_comment_details(cls, val): - """ - Create an instance of this class set to the - ``paper_doc_unresolve_comment_details`` tag with value ``val``. - - :param PaperDocUnresolveCommentDetails val: - :rtype: EventDetails - """ - return cls('paper_doc_unresolve_comment_details', val) - - @classmethod - def paper_doc_untrashed_details(cls, val): - """ - Create an instance of this class set to the - ``paper_doc_untrashed_details`` tag with value ``val``. - - :param PaperDocUntrashedDetails val: - :rtype: EventDetails - """ - return cls('paper_doc_untrashed_details', val) - - @classmethod - def paper_doc_view_details(cls, val): - """ - Create an instance of this class set to the ``paper_doc_view_details`` - tag with value ``val``. - - :param PaperDocViewDetails val: - :rtype: EventDetails - """ - return cls('paper_doc_view_details', val) - - @classmethod - def paper_folder_change_subscription_details(cls, val): - """ - Create an instance of this class set to the - ``paper_folder_change_subscription_details`` tag with value ``val``. - - :param PaperFolderChangeSubscriptionDetails val: - :rtype: EventDetails - """ - return cls('paper_folder_change_subscription_details', val) - - @classmethod - def paper_folder_deleted_details(cls, val): - """ - Create an instance of this class set to the - ``paper_folder_deleted_details`` tag with value ``val``. - - :param PaperFolderDeletedDetails val: - :rtype: EventDetails - """ - return cls('paper_folder_deleted_details', val) - - @classmethod - def paper_folder_followed_details(cls, val): - """ - Create an instance of this class set to the - ``paper_folder_followed_details`` tag with value ``val``. - - :param PaperFolderFollowedDetails val: - :rtype: EventDetails - """ - return cls('paper_folder_followed_details', val) - - @classmethod - def paper_folder_team_invite_details(cls, val): - """ - Create an instance of this class set to the - ``paper_folder_team_invite_details`` tag with value ``val``. - - :param PaperFolderTeamInviteDetails val: - :rtype: EventDetails - """ - return cls('paper_folder_team_invite_details', val) - - @classmethod - def password_change_details(cls, val): - """ - Create an instance of this class set to the ``password_change_details`` - tag with value ``val``. - - :param PasswordChangeDetails val: - :rtype: EventDetails - """ - return cls('password_change_details', val) - - @classmethod - def password_reset_details(cls, val): - """ - Create an instance of this class set to the ``password_reset_details`` - tag with value ``val``. - - :param PasswordResetDetails val: - :rtype: EventDetails - """ - return cls('password_reset_details', val) - - @classmethod - def password_reset_all_details(cls, val): - """ - Create an instance of this class set to the - ``password_reset_all_details`` tag with value ``val``. - - :param PasswordResetAllDetails val: - :rtype: EventDetails - """ - return cls('password_reset_all_details', val) - - @classmethod - def emm_create_exceptions_report_details(cls, val): - """ - Create an instance of this class set to the - ``emm_create_exceptions_report_details`` tag with value ``val``. - - :param EmmCreateExceptionsReportDetails val: - :rtype: EventDetails - """ - return cls('emm_create_exceptions_report_details', val) - - @classmethod - def emm_create_usage_report_details(cls, val): - """ - Create an instance of this class set to the - ``emm_create_usage_report_details`` tag with value ``val``. - - :param EmmCreateUsageReportDetails val: - :rtype: EventDetails - """ - return cls('emm_create_usage_report_details', val) - - @classmethod - def smart_sync_create_admin_privilege_report_details(cls, val): - """ - Create an instance of this class set to the - ``smart_sync_create_admin_privilege_report_details`` tag with value - ``val``. - - :param SmartSyncCreateAdminPrivilegeReportDetails val: - :rtype: EventDetails - """ - return cls('smart_sync_create_admin_privilege_report_details', val) - - @classmethod - def team_activity_create_report_details(cls, val): - """ - Create an instance of this class set to the - ``team_activity_create_report_details`` tag with value ``val``. - - :param TeamActivityCreateReportDetails val: - :rtype: EventDetails - """ - return cls('team_activity_create_report_details', val) - - @classmethod - def collection_share_details(cls, val): - """ - Create an instance of this class set to the ``collection_share_details`` - tag with value ``val``. - - :param CollectionShareDetails val: - :rtype: EventDetails - """ - return cls('collection_share_details', val) - - @classmethod - def note_acl_invite_only_details(cls, val): - """ - Create an instance of this class set to the - ``note_acl_invite_only_details`` tag with value ``val``. - - :param NoteAclInviteOnlyDetails val: - :rtype: EventDetails - """ - return cls('note_acl_invite_only_details', val) - - @classmethod - def note_acl_link_details(cls, val): - """ - Create an instance of this class set to the ``note_acl_link_details`` - tag with value ``val``. - - :param NoteAclLinkDetails val: - :rtype: EventDetails - """ - return cls('note_acl_link_details', val) - - @classmethod - def note_acl_team_link_details(cls, val): - """ - Create an instance of this class set to the - ``note_acl_team_link_details`` tag with value ``val``. - - :param NoteAclTeamLinkDetails val: - :rtype: EventDetails - """ - return cls('note_acl_team_link_details', val) - - @classmethod - def note_shared_details(cls, val): - """ - Create an instance of this class set to the ``note_shared_details`` tag - with value ``val``. - - :param NoteSharedDetails val: - :rtype: EventDetails - """ - return cls('note_shared_details', val) - - @classmethod - def note_share_receive_details(cls, val): - """ - Create an instance of this class set to the - ``note_share_receive_details`` tag with value ``val``. - - :param NoteShareReceiveDetails val: - :rtype: EventDetails - """ - return cls('note_share_receive_details', val) - - @classmethod - def open_note_shared_details(cls, val): - """ - Create an instance of this class set to the ``open_note_shared_details`` - tag with value ``val``. - - :param OpenNoteSharedDetails val: - :rtype: EventDetails - """ - return cls('open_note_shared_details', val) - - @classmethod - def sf_add_group_details(cls, val): - """ - Create an instance of this class set to the ``sf_add_group_details`` tag - with value ``val``. - - :param SfAddGroupDetails val: - :rtype: EventDetails - """ - return cls('sf_add_group_details', val) - - @classmethod - def sf_allow_non_members_to_view_shared_links_details(cls, val): - """ - Create an instance of this class set to the - ``sf_allow_non_members_to_view_shared_links_details`` tag with value - ``val``. - - :param SfAllowNonMembersToViewSharedLinksDetails val: - :rtype: EventDetails - """ - return cls('sf_allow_non_members_to_view_shared_links_details', val) - - @classmethod - def sf_invite_group_details(cls, val): - """ - Create an instance of this class set to the ``sf_invite_group_details`` - tag with value ``val``. - - :param SfInviteGroupDetails val: - :rtype: EventDetails - """ - return cls('sf_invite_group_details', val) - - @classmethod - def sf_nest_details(cls, val): - """ - Create an instance of this class set to the ``sf_nest_details`` tag with - value ``val``. - - :param SfNestDetails val: - :rtype: EventDetails - """ - return cls('sf_nest_details', val) - - @classmethod - def sf_team_decline_details(cls, val): - """ - Create an instance of this class set to the ``sf_team_decline_details`` - tag with value ``val``. - - :param SfTeamDeclineDetails val: - :rtype: EventDetails - """ - return cls('sf_team_decline_details', val) - - @classmethod - def sf_team_grant_access_details(cls, val): - """ - Create an instance of this class set to the - ``sf_team_grant_access_details`` tag with value ``val``. - - :param SfTeamGrantAccessDetails val: - :rtype: EventDetails - """ - return cls('sf_team_grant_access_details', val) - - @classmethod - def sf_team_invite_details(cls, val): - """ - Create an instance of this class set to the ``sf_team_invite_details`` - tag with value ``val``. - - :param SfTeamInviteDetails val: - :rtype: EventDetails - """ - return cls('sf_team_invite_details', val) - - @classmethod - def sf_team_invite_change_role_details(cls, val): - """ - Create an instance of this class set to the - ``sf_team_invite_change_role_details`` tag with value ``val``. - - :param SfTeamInviteChangeRoleDetails val: - :rtype: EventDetails - """ - return cls('sf_team_invite_change_role_details', val) - - @classmethod - def sf_team_join_details(cls, val): - """ - Create an instance of this class set to the ``sf_team_join_details`` tag - with value ``val``. - - :param SfTeamJoinDetails val: - :rtype: EventDetails - """ - return cls('sf_team_join_details', val) - - @classmethod - def sf_team_join_from_oob_link_details(cls, val): - """ - Create an instance of this class set to the - ``sf_team_join_from_oob_link_details`` tag with value ``val``. - - :param SfTeamJoinFromOobLinkDetails val: - :rtype: EventDetails - """ - return cls('sf_team_join_from_oob_link_details', val) - - @classmethod - def sf_team_uninvite_details(cls, val): - """ - Create an instance of this class set to the ``sf_team_uninvite_details`` - tag with value ``val``. - - :param SfTeamUninviteDetails val: - :rtype: EventDetails - """ - return cls('sf_team_uninvite_details', val) - - @classmethod - def shared_content_add_invitees_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_add_invitees_details`` tag with value ``val``. - - :param SharedContentAddInviteesDetails val: - :rtype: EventDetails - """ - return cls('shared_content_add_invitees_details', val) - - @classmethod - def shared_content_add_link_expiry_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_add_link_expiry_details`` tag with value ``val``. - - :param SharedContentAddLinkExpiryDetails val: - :rtype: EventDetails - """ - return cls('shared_content_add_link_expiry_details', val) - - @classmethod - def shared_content_add_link_password_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_add_link_password_details`` tag with value ``val``. - - :param SharedContentAddLinkPasswordDetails val: - :rtype: EventDetails - """ - return cls('shared_content_add_link_password_details', val) - - @classmethod - def shared_content_add_member_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_add_member_details`` tag with value ``val``. - - :param SharedContentAddMemberDetails val: - :rtype: EventDetails - """ - return cls('shared_content_add_member_details', val) - - @classmethod - def shared_content_change_downloads_policy_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_change_downloads_policy_details`` tag with value - ``val``. - - :param SharedContentChangeDownloadsPolicyDetails val: - :rtype: EventDetails - """ - return cls('shared_content_change_downloads_policy_details', val) - - @classmethod - def shared_content_change_invitee_role_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_change_invitee_role_details`` tag with value ``val``. - - :param SharedContentChangeInviteeRoleDetails val: - :rtype: EventDetails - """ - return cls('shared_content_change_invitee_role_details', val) - - @classmethod - def shared_content_change_link_audience_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_change_link_audience_details`` tag with value ``val``. - - :param SharedContentChangeLinkAudienceDetails val: - :rtype: EventDetails - """ - return cls('shared_content_change_link_audience_details', val) - - @classmethod - def shared_content_change_link_expiry_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_change_link_expiry_details`` tag with value ``val``. - - :param SharedContentChangeLinkExpiryDetails val: - :rtype: EventDetails - """ - return cls('shared_content_change_link_expiry_details', val) - - @classmethod - def shared_content_change_link_password_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_change_link_password_details`` tag with value ``val``. - - :param SharedContentChangeLinkPasswordDetails val: - :rtype: EventDetails - """ - return cls('shared_content_change_link_password_details', val) - - @classmethod - def shared_content_change_member_role_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_change_member_role_details`` tag with value ``val``. - - :param SharedContentChangeMemberRoleDetails val: - :rtype: EventDetails - """ - return cls('shared_content_change_member_role_details', val) - - @classmethod - def shared_content_change_viewer_info_policy_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_change_viewer_info_policy_details`` tag with value - ``val``. - - :param SharedContentChangeViewerInfoPolicyDetails val: - :rtype: EventDetails - """ - return cls('shared_content_change_viewer_info_policy_details', val) - - @classmethod - def shared_content_claim_invitation_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_claim_invitation_details`` tag with value ``val``. - - :param SharedContentClaimInvitationDetails val: - :rtype: EventDetails - """ - return cls('shared_content_claim_invitation_details', val) - - @classmethod - def shared_content_copy_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_copy_details`` tag with value ``val``. - - :param SharedContentCopyDetails val: - :rtype: EventDetails - """ - return cls('shared_content_copy_details', val) - - @classmethod - def shared_content_download_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_download_details`` tag with value ``val``. - - :param SharedContentDownloadDetails val: - :rtype: EventDetails - """ - return cls('shared_content_download_details', val) - - @classmethod - def shared_content_relinquish_membership_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_relinquish_membership_details`` tag with value ``val``. - - :param SharedContentRelinquishMembershipDetails val: - :rtype: EventDetails - """ - return cls('shared_content_relinquish_membership_details', val) - - @classmethod - def shared_content_remove_invitee_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_remove_invitee_details`` tag with value ``val``. - - :param SharedContentRemoveInviteeDetails val: - :rtype: EventDetails - """ - return cls('shared_content_remove_invitee_details', val) - - @classmethod - def shared_content_remove_link_expiry_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_remove_link_expiry_details`` tag with value ``val``. - - :param SharedContentRemoveLinkExpiryDetails val: - :rtype: EventDetails - """ - return cls('shared_content_remove_link_expiry_details', val) - - @classmethod - def shared_content_remove_link_password_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_remove_link_password_details`` tag with value ``val``. - - :param SharedContentRemoveLinkPasswordDetails val: - :rtype: EventDetails - """ - return cls('shared_content_remove_link_password_details', val) - - @classmethod - def shared_content_remove_member_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_remove_member_details`` tag with value ``val``. - - :param SharedContentRemoveMemberDetails val: - :rtype: EventDetails - """ - return cls('shared_content_remove_member_details', val) - - @classmethod - def shared_content_request_access_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_request_access_details`` tag with value ``val``. - - :param SharedContentRequestAccessDetails val: - :rtype: EventDetails - """ - return cls('shared_content_request_access_details', val) - - @classmethod - def shared_content_unshare_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_unshare_details`` tag with value ``val``. - - :param SharedContentUnshareDetails val: - :rtype: EventDetails - """ - return cls('shared_content_unshare_details', val) - - @classmethod - def shared_content_view_details(cls, val): - """ - Create an instance of this class set to the - ``shared_content_view_details`` tag with value ``val``. - - :param SharedContentViewDetails val: - :rtype: EventDetails - """ - return cls('shared_content_view_details', val) - - @classmethod - def shared_folder_change_confidentiality_details(cls, val): - """ - Create an instance of this class set to the - ``shared_folder_change_confidentiality_details`` tag with value ``val``. - - :param SharedFolderChangeConfidentialityDetails val: - :rtype: EventDetails - """ - return cls('shared_folder_change_confidentiality_details', val) - - @classmethod - def shared_folder_change_link_policy_details(cls, val): - """ - Create an instance of this class set to the - ``shared_folder_change_link_policy_details`` tag with value ``val``. - - :param SharedFolderChangeLinkPolicyDetails val: - :rtype: EventDetails - """ - return cls('shared_folder_change_link_policy_details', val) - - @classmethod - def shared_folder_change_member_management_policy_details(cls, val): - """ - Create an instance of this class set to the - ``shared_folder_change_member_management_policy_details`` tag with value - ``val``. - - :param SharedFolderChangeMemberManagementPolicyDetails val: - :rtype: EventDetails - """ - return cls('shared_folder_change_member_management_policy_details', val) - - @classmethod - def shared_folder_change_member_policy_details(cls, val): - """ - Create an instance of this class set to the - ``shared_folder_change_member_policy_details`` tag with value ``val``. - - :param SharedFolderChangeMemberPolicyDetails val: - :rtype: EventDetails - """ - return cls('shared_folder_change_member_policy_details', val) - - @classmethod - def shared_folder_create_details(cls, val): - """ - Create an instance of this class set to the - ``shared_folder_create_details`` tag with value ``val``. - - :param SharedFolderCreateDetails val: - :rtype: EventDetails - """ - return cls('shared_folder_create_details', val) - - @classmethod - def shared_folder_mount_details(cls, val): - """ - Create an instance of this class set to the - ``shared_folder_mount_details`` tag with value ``val``. - - :param SharedFolderMountDetails val: - :rtype: EventDetails - """ - return cls('shared_folder_mount_details', val) - - @classmethod - def shared_folder_transfer_ownership_details(cls, val): - """ - Create an instance of this class set to the - ``shared_folder_transfer_ownership_details`` tag with value ``val``. - - :param SharedFolderTransferOwnershipDetails val: - :rtype: EventDetails - """ - return cls('shared_folder_transfer_ownership_details', val) - - @classmethod - def shared_folder_unmount_details(cls, val): - """ - Create an instance of this class set to the - ``shared_folder_unmount_details`` tag with value ``val``. - - :param SharedFolderUnmountDetails val: - :rtype: EventDetails - """ - return cls('shared_folder_unmount_details', val) - - @classmethod - def shared_note_opened_details(cls, val): - """ - Create an instance of this class set to the - ``shared_note_opened_details`` tag with value ``val``. - - :param SharedNoteOpenedDetails val: - :rtype: EventDetails - """ - return cls('shared_note_opened_details', val) - - @classmethod - def shmodel_app_create_details(cls, val): - """ - Create an instance of this class set to the - ``shmodel_app_create_details`` tag with value ``val``. - - :param ShmodelAppCreateDetails val: - :rtype: EventDetails - """ - return cls('shmodel_app_create_details', val) - - @classmethod - def shmodel_create_details(cls, val): - """ - Create an instance of this class set to the ``shmodel_create_details`` - tag with value ``val``. - - :param ShmodelCreateDetails val: - :rtype: EventDetails - """ - return cls('shmodel_create_details', val) - - @classmethod - def shmodel_disable_details(cls, val): - """ - Create an instance of this class set to the ``shmodel_disable_details`` - tag with value ``val``. - - :param ShmodelDisableDetails val: - :rtype: EventDetails - """ - return cls('shmodel_disable_details', val) - - @classmethod - def shmodel_fb_share_details(cls, val): - """ - Create an instance of this class set to the ``shmodel_fb_share_details`` - tag with value ``val``. - - :param ShmodelFbShareDetails val: - :rtype: EventDetails - """ - return cls('shmodel_fb_share_details', val) - - @classmethod - def shmodel_group_share_details(cls, val): - """ - Create an instance of this class set to the - ``shmodel_group_share_details`` tag with value ``val``. - - :param ShmodelGroupShareDetails val: - :rtype: EventDetails - """ - return cls('shmodel_group_share_details', val) - - @classmethod - def shmodel_remove_expiration_details(cls, val): - """ - Create an instance of this class set to the - ``shmodel_remove_expiration_details`` tag with value ``val``. - - :param ShmodelRemoveExpirationDetails val: - :rtype: EventDetails - """ - return cls('shmodel_remove_expiration_details', val) - - @classmethod - def shmodel_set_expiration_details(cls, val): - """ - Create an instance of this class set to the - ``shmodel_set_expiration_details`` tag with value ``val``. - - :param ShmodelSetExpirationDetails val: - :rtype: EventDetails - """ - return cls('shmodel_set_expiration_details', val) - - @classmethod - def shmodel_team_copy_details(cls, val): - """ - Create an instance of this class set to the - ``shmodel_team_copy_details`` tag with value ``val``. - - :param ShmodelTeamCopyDetails val: - :rtype: EventDetails - """ - return cls('shmodel_team_copy_details', val) - - @classmethod - def shmodel_team_download_details(cls, val): - """ - Create an instance of this class set to the - ``shmodel_team_download_details`` tag with value ``val``. - - :param ShmodelTeamDownloadDetails val: - :rtype: EventDetails - """ - return cls('shmodel_team_download_details', val) - - @classmethod - def shmodel_team_share_details(cls, val): - """ - Create an instance of this class set to the - ``shmodel_team_share_details`` tag with value ``val``. - - :param ShmodelTeamShareDetails val: - :rtype: EventDetails - """ - return cls('shmodel_team_share_details', val) - - @classmethod - def shmodel_team_view_details(cls, val): - """ - Create an instance of this class set to the - ``shmodel_team_view_details`` tag with value ``val``. - - :param ShmodelTeamViewDetails val: - :rtype: EventDetails - """ - return cls('shmodel_team_view_details', val) - - @classmethod - def shmodel_visibility_password_details(cls, val): - """ - Create an instance of this class set to the - ``shmodel_visibility_password_details`` tag with value ``val``. - - :param ShmodelVisibilityPasswordDetails val: - :rtype: EventDetails - """ - return cls('shmodel_visibility_password_details', val) - - @classmethod - def shmodel_visibility_public_details(cls, val): - """ - Create an instance of this class set to the - ``shmodel_visibility_public_details`` tag with value ``val``. - - :param ShmodelVisibilityPublicDetails val: - :rtype: EventDetails - """ - return cls('shmodel_visibility_public_details', val) - - @classmethod - def shmodel_visibility_team_only_details(cls, val): - """ - Create an instance of this class set to the - ``shmodel_visibility_team_only_details`` tag with value ``val``. - - :param ShmodelVisibilityTeamOnlyDetails val: - :rtype: EventDetails - """ - return cls('shmodel_visibility_team_only_details', val) - - @classmethod - def sso_add_cert_details(cls, val): - """ - Create an instance of this class set to the ``sso_add_cert_details`` tag - with value ``val``. - - :param SsoAddCertDetails val: - :rtype: EventDetails - """ - return cls('sso_add_cert_details', val) - - @classmethod - def sso_add_login_url_details(cls, val): - """ - Create an instance of this class set to the - ``sso_add_login_url_details`` tag with value ``val``. - - :param SsoAddLoginUrlDetails val: - :rtype: EventDetails - """ - return cls('sso_add_login_url_details', val) - - @classmethod - def sso_add_logout_url_details(cls, val): - """ - Create an instance of this class set to the - ``sso_add_logout_url_details`` tag with value ``val``. - - :param SsoAddLogoutUrlDetails val: - :rtype: EventDetails - """ - return cls('sso_add_logout_url_details', val) - - @classmethod - def sso_change_cert_details(cls, val): - """ - Create an instance of this class set to the ``sso_change_cert_details`` - tag with value ``val``. - - :param SsoChangeCertDetails val: - :rtype: EventDetails - """ - return cls('sso_change_cert_details', val) - - @classmethod - def sso_change_login_url_details(cls, val): - """ - Create an instance of this class set to the - ``sso_change_login_url_details`` tag with value ``val``. - - :param SsoChangeLoginUrlDetails val: - :rtype: EventDetails - """ - return cls('sso_change_login_url_details', val) - - @classmethod - def sso_change_logout_url_details(cls, val): - """ - Create an instance of this class set to the - ``sso_change_logout_url_details`` tag with value ``val``. - - :param SsoChangeLogoutUrlDetails val: - :rtype: EventDetails - """ - return cls('sso_change_logout_url_details', val) - - @classmethod - def sso_change_saml_identity_mode_details(cls, val): - """ - Create an instance of this class set to the - ``sso_change_saml_identity_mode_details`` tag with value ``val``. - - :param SsoChangeSamlIdentityModeDetails val: - :rtype: EventDetails - """ - return cls('sso_change_saml_identity_mode_details', val) - - @classmethod - def sso_remove_cert_details(cls, val): - """ - Create an instance of this class set to the ``sso_remove_cert_details`` - tag with value ``val``. - - :param SsoRemoveCertDetails val: - :rtype: EventDetails - """ - return cls('sso_remove_cert_details', val) - - @classmethod - def sso_remove_login_url_details(cls, val): - """ - Create an instance of this class set to the - ``sso_remove_login_url_details`` tag with value ``val``. - - :param SsoRemoveLoginUrlDetails val: - :rtype: EventDetails - """ - return cls('sso_remove_login_url_details', val) - - @classmethod - def sso_remove_logout_url_details(cls, val): - """ - Create an instance of this class set to the - ``sso_remove_logout_url_details`` tag with value ``val``. - - :param SsoRemoveLogoutUrlDetails val: - :rtype: EventDetails - """ - return cls('sso_remove_logout_url_details', val) - - @classmethod - def team_folder_change_status_details(cls, val): - """ - Create an instance of this class set to the - ``team_folder_change_status_details`` tag with value ``val``. - - :param TeamFolderChangeStatusDetails val: - :rtype: EventDetails - """ - return cls('team_folder_change_status_details', val) - - @classmethod - def team_folder_create_details(cls, val): - """ - Create an instance of this class set to the - ``team_folder_create_details`` tag with value ``val``. - - :param TeamFolderCreateDetails val: - :rtype: EventDetails - """ - return cls('team_folder_create_details', val) - - @classmethod - def team_folder_downgrade_details(cls, val): - """ - Create an instance of this class set to the - ``team_folder_downgrade_details`` tag with value ``val``. - - :param TeamFolderDowngradeDetails val: - :rtype: EventDetails - """ - return cls('team_folder_downgrade_details', val) - - @classmethod - def team_folder_permanently_delete_details(cls, val): - """ - Create an instance of this class set to the - ``team_folder_permanently_delete_details`` tag with value ``val``. - - :param TeamFolderPermanentlyDeleteDetails val: - :rtype: EventDetails - """ - return cls('team_folder_permanently_delete_details', val) - - @classmethod - def team_folder_rename_details(cls, val): - """ - Create an instance of this class set to the - ``team_folder_rename_details`` tag with value ``val``. - - :param TeamFolderRenameDetails val: - :rtype: EventDetails - """ - return cls('team_folder_rename_details', val) - - @classmethod - def account_capture_change_policy_details(cls, val): - """ - Create an instance of this class set to the - ``account_capture_change_policy_details`` tag with value ``val``. - - :param AccountCaptureChangePolicyDetails val: - :rtype: EventDetails - """ - return cls('account_capture_change_policy_details', val) - - @classmethod - def allow_download_disabled_details(cls, val): - """ - Create an instance of this class set to the - ``allow_download_disabled_details`` tag with value ``val``. - - :param AllowDownloadDisabledDetails val: - :rtype: EventDetails - """ - return cls('allow_download_disabled_details', val) - - @classmethod - def allow_download_enabled_details(cls, val): - """ - Create an instance of this class set to the - ``allow_download_enabled_details`` tag with value ``val``. - - :param AllowDownloadEnabledDetails val: - :rtype: EventDetails - """ - return cls('allow_download_enabled_details', val) - - @classmethod - def data_placement_restriction_change_policy_details(cls, val): - """ - Create an instance of this class set to the - ``data_placement_restriction_change_policy_details`` tag with value - ``val``. - - :param DataPlacementRestrictionChangePolicyDetails val: - :rtype: EventDetails - """ - return cls('data_placement_restriction_change_policy_details', val) - - @classmethod - def data_placement_restriction_satisfy_policy_details(cls, val): - """ - Create an instance of this class set to the - ``data_placement_restriction_satisfy_policy_details`` tag with value - ``val``. - - :param DataPlacementRestrictionSatisfyPolicyDetails val: - :rtype: EventDetails - """ - return cls('data_placement_restriction_satisfy_policy_details', val) - - @classmethod - def device_approvals_change_desktop_policy_details(cls, val): - """ - Create an instance of this class set to the - ``device_approvals_change_desktop_policy_details`` tag with value - ``val``. - - :param DeviceApprovalsChangeDesktopPolicyDetails val: - :rtype: EventDetails - """ - return cls('device_approvals_change_desktop_policy_details', val) - - @classmethod - def device_approvals_change_mobile_policy_details(cls, val): - """ - Create an instance of this class set to the - ``device_approvals_change_mobile_policy_details`` tag with value - ``val``. - - :param DeviceApprovalsChangeMobilePolicyDetails val: - :rtype: EventDetails - """ - return cls('device_approvals_change_mobile_policy_details', val) - - @classmethod - def device_approvals_change_overage_action_details(cls, val): - """ - Create an instance of this class set to the - ``device_approvals_change_overage_action_details`` tag with value - ``val``. - - :param DeviceApprovalsChangeOverageActionDetails val: - :rtype: EventDetails - """ - return cls('device_approvals_change_overage_action_details', val) - - @classmethod - def device_approvals_change_unlink_action_details(cls, val): - """ - Create an instance of this class set to the - ``device_approvals_change_unlink_action_details`` tag with value - ``val``. - - :param DeviceApprovalsChangeUnlinkActionDetails val: - :rtype: EventDetails - """ - return cls('device_approvals_change_unlink_action_details', val) - - @classmethod - def emm_add_exception_details(cls, val): - """ - Create an instance of this class set to the - ``emm_add_exception_details`` tag with value ``val``. - - :param EmmAddExceptionDetails val: - :rtype: EventDetails - """ - return cls('emm_add_exception_details', val) - - @classmethod - def emm_change_policy_details(cls, val): - """ - Create an instance of this class set to the - ``emm_change_policy_details`` tag with value ``val``. - - :param EmmChangePolicyDetails val: - :rtype: EventDetails - """ - return cls('emm_change_policy_details', val) - - @classmethod - def emm_remove_exception_details(cls, val): - """ - Create an instance of this class set to the - ``emm_remove_exception_details`` tag with value ``val``. - - :param EmmRemoveExceptionDetails val: - :rtype: EventDetails - """ - return cls('emm_remove_exception_details', val) - - @classmethod - def extended_version_history_change_policy_details(cls, val): - """ - Create an instance of this class set to the - ``extended_version_history_change_policy_details`` tag with value - ``val``. - - :param ExtendedVersionHistoryChangePolicyDetails val: - :rtype: EventDetails - """ - return cls('extended_version_history_change_policy_details', val) - - @classmethod - def file_comments_change_policy_details(cls, val): - """ - Create an instance of this class set to the - ``file_comments_change_policy_details`` tag with value ``val``. - - :param FileCommentsChangePolicyDetails val: - :rtype: EventDetails - """ - return cls('file_comments_change_policy_details', val) - - @classmethod - def file_requests_change_policy_details(cls, val): - """ - Create an instance of this class set to the - ``file_requests_change_policy_details`` tag with value ``val``. - - :param FileRequestsChangePolicyDetails val: - :rtype: EventDetails - """ - return cls('file_requests_change_policy_details', val) - - @classmethod - def file_requests_emails_enabled_details(cls, val): - """ - Create an instance of this class set to the - ``file_requests_emails_enabled_details`` tag with value ``val``. - - :param FileRequestsEmailsEnabledDetails val: - :rtype: EventDetails - """ - return cls('file_requests_emails_enabled_details', val) - - @classmethod - def file_requests_emails_restricted_to_team_only_details(cls, val): - """ - Create an instance of this class set to the - ``file_requests_emails_restricted_to_team_only_details`` tag with value - ``val``. - - :param FileRequestsEmailsRestrictedToTeamOnlyDetails val: - :rtype: EventDetails - """ - return cls('file_requests_emails_restricted_to_team_only_details', val) - - @classmethod - def google_sso_change_policy_details(cls, val): - """ - Create an instance of this class set to the - ``google_sso_change_policy_details`` tag with value ``val``. - - :param GoogleSsoChangePolicyDetails val: - :rtype: EventDetails - """ - return cls('google_sso_change_policy_details', val) - - @classmethod - def group_user_management_change_policy_details(cls, val): - """ - Create an instance of this class set to the - ``group_user_management_change_policy_details`` tag with value ``val``. - - :param GroupUserManagementChangePolicyDetails val: - :rtype: EventDetails - """ - return cls('group_user_management_change_policy_details', val) - - @classmethod - def member_requests_change_policy_details(cls, val): - """ - Create an instance of this class set to the - ``member_requests_change_policy_details`` tag with value ``val``. - - :param MemberRequestsChangePolicyDetails val: - :rtype: EventDetails - """ - return cls('member_requests_change_policy_details', val) - - @classmethod - def member_space_limits_add_exception_details(cls, val): - """ - Create an instance of this class set to the - ``member_space_limits_add_exception_details`` tag with value ``val``. - - :param MemberSpaceLimitsAddExceptionDetails val: - :rtype: EventDetails - """ - return cls('member_space_limits_add_exception_details', val) - - @classmethod - def member_space_limits_change_policy_details(cls, val): - """ - Create an instance of this class set to the - ``member_space_limits_change_policy_details`` tag with value ``val``. - - :param MemberSpaceLimitsChangePolicyDetails val: - :rtype: EventDetails - """ - return cls('member_space_limits_change_policy_details', val) - - @classmethod - def member_space_limits_remove_exception_details(cls, val): - """ - Create an instance of this class set to the - ``member_space_limits_remove_exception_details`` tag with value ``val``. - - :param MemberSpaceLimitsRemoveExceptionDetails val: - :rtype: EventDetails - """ - return cls('member_space_limits_remove_exception_details', val) - - @classmethod - def member_suggestions_change_policy_details(cls, val): - """ - Create an instance of this class set to the - ``member_suggestions_change_policy_details`` tag with value ``val``. - - :param MemberSuggestionsChangePolicyDetails val: - :rtype: EventDetails - """ - return cls('member_suggestions_change_policy_details', val) - - @classmethod - def microsoft_office_addin_change_policy_details(cls, val): - """ - Create an instance of this class set to the - ``microsoft_office_addin_change_policy_details`` tag with value ``val``. - - :param MicrosoftOfficeAddinChangePolicyDetails val: - :rtype: EventDetails - """ - return cls('microsoft_office_addin_change_policy_details', val) - - @classmethod - def network_control_change_policy_details(cls, val): - """ - Create an instance of this class set to the - ``network_control_change_policy_details`` tag with value ``val``. - - :param NetworkControlChangePolicyDetails val: - :rtype: EventDetails - """ - return cls('network_control_change_policy_details', val) - - @classmethod - def paper_change_deployment_policy_details(cls, val): - """ - Create an instance of this class set to the - ``paper_change_deployment_policy_details`` tag with value ``val``. - - :param PaperChangeDeploymentPolicyDetails val: - :rtype: EventDetails - """ - return cls('paper_change_deployment_policy_details', val) - - @classmethod - def paper_change_member_link_policy_details(cls, val): - """ - Create an instance of this class set to the - ``paper_change_member_link_policy_details`` tag with value ``val``. - - :param PaperChangeMemberLinkPolicyDetails val: - :rtype: EventDetails - """ - return cls('paper_change_member_link_policy_details', val) - - @classmethod - def paper_change_member_policy_details(cls, val): - """ - Create an instance of this class set to the - ``paper_change_member_policy_details`` tag with value ``val``. - - :param PaperChangeMemberPolicyDetails val: - :rtype: EventDetails - """ - return cls('paper_change_member_policy_details', val) - - @classmethod - def paper_change_policy_details(cls, val): - """ - Create an instance of this class set to the - ``paper_change_policy_details`` tag with value ``val``. - - :param PaperChangePolicyDetails val: - :rtype: EventDetails - """ - return cls('paper_change_policy_details', val) - - @classmethod - def permanent_delete_change_policy_details(cls, val): - """ - Create an instance of this class set to the - ``permanent_delete_change_policy_details`` tag with value ``val``. - - :param PermanentDeleteChangePolicyDetails val: - :rtype: EventDetails - """ - return cls('permanent_delete_change_policy_details', val) - - @classmethod - def sharing_change_folder_join_policy_details(cls, val): - """ - Create an instance of this class set to the - ``sharing_change_folder_join_policy_details`` tag with value ``val``. - - :param SharingChangeFolderJoinPolicyDetails val: - :rtype: EventDetails - """ - return cls('sharing_change_folder_join_policy_details', val) - - @classmethod - def sharing_change_link_policy_details(cls, val): - """ - Create an instance of this class set to the - ``sharing_change_link_policy_details`` tag with value ``val``. - - :param SharingChangeLinkPolicyDetails val: - :rtype: EventDetails - """ - return cls('sharing_change_link_policy_details', val) - - @classmethod - def sharing_change_member_policy_details(cls, val): - """ - Create an instance of this class set to the - ``sharing_change_member_policy_details`` tag with value ``val``. - - :param SharingChangeMemberPolicyDetails val: - :rtype: EventDetails - """ - return cls('sharing_change_member_policy_details', val) - - @classmethod - def smart_sync_change_policy_details(cls, val): - """ - Create an instance of this class set to the - ``smart_sync_change_policy_details`` tag with value ``val``. - - :param SmartSyncChangePolicyDetails val: - :rtype: EventDetails - """ - return cls('smart_sync_change_policy_details', val) - - @classmethod - def smart_sync_not_opt_out_details(cls, val): - """ - Create an instance of this class set to the - ``smart_sync_not_opt_out_details`` tag with value ``val``. - - :param SmartSyncNotOptOutDetails val: - :rtype: EventDetails - """ - return cls('smart_sync_not_opt_out_details', val) - - @classmethod - def smart_sync_opt_out_details(cls, val): - """ - Create an instance of this class set to the - ``smart_sync_opt_out_details`` tag with value ``val``. - - :param SmartSyncOptOutDetails val: - :rtype: EventDetails - """ - return cls('smart_sync_opt_out_details', val) - - @classmethod - def sso_change_policy_details(cls, val): - """ - Create an instance of this class set to the - ``sso_change_policy_details`` tag with value ``val``. - - :param SsoChangePolicyDetails val: - :rtype: EventDetails - """ - return cls('sso_change_policy_details', val) - - @classmethod - def tfa_change_policy_details(cls, val): - """ - Create an instance of this class set to the - ``tfa_change_policy_details`` tag with value ``val``. - - :param TfaChangePolicyDetails val: - :rtype: EventDetails - """ - return cls('tfa_change_policy_details', val) - - @classmethod - def two_account_change_policy_details(cls, val): - """ - Create an instance of this class set to the - ``two_account_change_policy_details`` tag with value ``val``. - - :param TwoAccountChangePolicyDetails val: - :rtype: EventDetails - """ - return cls('two_account_change_policy_details', val) - - @classmethod - def web_sessions_change_fixed_length_policy_details(cls, val): - """ - Create an instance of this class set to the - ``web_sessions_change_fixed_length_policy_details`` tag with value - ``val``. - - :param WebSessionsChangeFixedLengthPolicyDetails val: - :rtype: EventDetails - """ - return cls('web_sessions_change_fixed_length_policy_details', val) - - @classmethod - def web_sessions_change_idle_length_policy_details(cls, val): - """ - Create an instance of this class set to the - ``web_sessions_change_idle_length_policy_details`` tag with value - ``val``. - - :param WebSessionsChangeIdleLengthPolicyDetails val: - :rtype: EventDetails - """ - return cls('web_sessions_change_idle_length_policy_details', val) - - @classmethod - def team_profile_add_logo_details(cls, val): - """ - Create an instance of this class set to the - ``team_profile_add_logo_details`` tag with value ``val``. - - :param TeamProfileAddLogoDetails val: - :rtype: EventDetails - """ - return cls('team_profile_add_logo_details', val) - - @classmethod - def team_profile_change_default_language_details(cls, val): - """ - Create an instance of this class set to the - ``team_profile_change_default_language_details`` tag with value ``val``. - - :param TeamProfileChangeDefaultLanguageDetails val: - :rtype: EventDetails - """ - return cls('team_profile_change_default_language_details', val) - - @classmethod - def team_profile_change_logo_details(cls, val): - """ - Create an instance of this class set to the - ``team_profile_change_logo_details`` tag with value ``val``. - - :param TeamProfileChangeLogoDetails val: - :rtype: EventDetails - """ - return cls('team_profile_change_logo_details', val) - - @classmethod - def team_profile_change_name_details(cls, val): - """ - Create an instance of this class set to the - ``team_profile_change_name_details`` tag with value ``val``. - - :param TeamProfileChangeNameDetails val: - :rtype: EventDetails - """ - return cls('team_profile_change_name_details', val) - - @classmethod - def team_profile_remove_logo_details(cls, val): - """ - Create an instance of this class set to the - ``team_profile_remove_logo_details`` tag with value ``val``. - - :param TeamProfileRemoveLogoDetails val: - :rtype: EventDetails - """ - return cls('team_profile_remove_logo_details', val) - - @classmethod - def tfa_add_backup_phone_details(cls, val): - """ - Create an instance of this class set to the - ``tfa_add_backup_phone_details`` tag with value ``val``. - - :param TfaAddBackupPhoneDetails val: - :rtype: EventDetails - """ - return cls('tfa_add_backup_phone_details', val) - - @classmethod - def tfa_add_security_key_details(cls, val): - """ - Create an instance of this class set to the - ``tfa_add_security_key_details`` tag with value ``val``. - - :param TfaAddSecurityKeyDetails val: - :rtype: EventDetails - """ - return cls('tfa_add_security_key_details', val) - - @classmethod - def tfa_change_backup_phone_details(cls, val): - """ - Create an instance of this class set to the - ``tfa_change_backup_phone_details`` tag with value ``val``. - - :param TfaChangeBackupPhoneDetails val: - :rtype: EventDetails - """ - return cls('tfa_change_backup_phone_details', val) - - @classmethod - def tfa_change_status_details(cls, val): - """ - Create an instance of this class set to the - ``tfa_change_status_details`` tag with value ``val``. - - :param TfaChangeStatusDetails val: - :rtype: EventDetails - """ - return cls('tfa_change_status_details', val) - - @classmethod - def tfa_remove_backup_phone_details(cls, val): - """ - Create an instance of this class set to the - ``tfa_remove_backup_phone_details`` tag with value ``val``. - - :param TfaRemoveBackupPhoneDetails val: - :rtype: EventDetails - """ - return cls('tfa_remove_backup_phone_details', val) - - @classmethod - def tfa_remove_security_key_details(cls, val): - """ - Create an instance of this class set to the - ``tfa_remove_security_key_details`` tag with value ``val``. - - :param TfaRemoveSecurityKeyDetails val: - :rtype: EventDetails - """ - return cls('tfa_remove_security_key_details', val) - - @classmethod - def tfa_reset_details(cls, val): - """ - Create an instance of this class set to the ``tfa_reset_details`` tag - with value ``val``. - - :param TfaResetDetails val: - :rtype: EventDetails - """ - return cls('tfa_reset_details', val) - - @classmethod - def missing_details(cls, val): - """ - Create an instance of this class set to the ``missing_details`` tag with - value ``val``. - - :param MissingDetails val: - :rtype: EventDetails - """ - return cls('missing_details', val) - - def is_member_change_membership_type_details(self): - """ - Check if the union tag is ``member_change_membership_type_details``. - - :rtype: bool - """ - return self._tag == 'member_change_membership_type_details' - - def is_member_permanently_delete_account_contents_details(self): - """ - Check if the union tag is ``member_permanently_delete_account_contents_details``. - - :rtype: bool - """ - return self._tag == 'member_permanently_delete_account_contents_details' - - def is_member_space_limits_change_status_details(self): - """ - Check if the union tag is ``member_space_limits_change_status_details``. - - :rtype: bool - """ - return self._tag == 'member_space_limits_change_status_details' - - def is_member_transfer_account_contents_details(self): - """ - Check if the union tag is ``member_transfer_account_contents_details``. - - :rtype: bool - """ - return self._tag == 'member_transfer_account_contents_details' - - def is_paper_admin_export_start_details(self): - """ - Check if the union tag is ``paper_admin_export_start_details``. - - :rtype: bool - """ - return self._tag == 'paper_admin_export_start_details' - - def is_paper_enabled_users_group_addition_details(self): - """ - Check if the union tag is ``paper_enabled_users_group_addition_details``. - - :rtype: bool - """ - return self._tag == 'paper_enabled_users_group_addition_details' - - def is_paper_enabled_users_group_removal_details(self): - """ - Check if the union tag is ``paper_enabled_users_group_removal_details``. - - :rtype: bool - """ - return self._tag == 'paper_enabled_users_group_removal_details' - - def is_paper_external_view_allow_details(self): - """ - Check if the union tag is ``paper_external_view_allow_details``. - - :rtype: bool - """ - return self._tag == 'paper_external_view_allow_details' - - def is_paper_external_view_default_team_details(self): - """ - Check if the union tag is ``paper_external_view_default_team_details``. - - :rtype: bool - """ - return self._tag == 'paper_external_view_default_team_details' - - def is_paper_external_view_forbid_details(self): - """ - Check if the union tag is ``paper_external_view_forbid_details``. - - :rtype: bool - """ - return self._tag == 'paper_external_view_forbid_details' - - def is_sf_external_invite_warn_details(self): - """ - Check if the union tag is ``sf_external_invite_warn_details``. - - :rtype: bool - """ - return self._tag == 'sf_external_invite_warn_details' - - def is_team_merge_from_details(self): - """ - Check if the union tag is ``team_merge_from_details``. - - :rtype: bool - """ - return self._tag == 'team_merge_from_details' - - def is_team_merge_to_details(self): - """ - Check if the union tag is ``team_merge_to_details``. - - :rtype: bool - """ - return self._tag == 'team_merge_to_details' - - def is_app_link_team_details(self): - """ - Check if the union tag is ``app_link_team_details``. - - :rtype: bool - """ - return self._tag == 'app_link_team_details' - - def is_app_link_user_details(self): - """ - Check if the union tag is ``app_link_user_details``. - - :rtype: bool - """ - return self._tag == 'app_link_user_details' - - def is_app_unlink_team_details(self): - """ - Check if the union tag is ``app_unlink_team_details``. - - :rtype: bool - """ - return self._tag == 'app_unlink_team_details' - - def is_app_unlink_user_details(self): - """ - Check if the union tag is ``app_unlink_user_details``. - - :rtype: bool - """ - return self._tag == 'app_unlink_user_details' - - def is_file_add_comment_details(self): - """ - Check if the union tag is ``file_add_comment_details``. - - :rtype: bool - """ - return self._tag == 'file_add_comment_details' - - def is_file_change_comment_subscription_details(self): - """ - Check if the union tag is ``file_change_comment_subscription_details``. - - :rtype: bool - """ - return self._tag == 'file_change_comment_subscription_details' - - def is_file_delete_comment_details(self): - """ - Check if the union tag is ``file_delete_comment_details``. - - :rtype: bool - """ - return self._tag == 'file_delete_comment_details' - - def is_file_like_comment_details(self): - """ - Check if the union tag is ``file_like_comment_details``. - - :rtype: bool - """ - return self._tag == 'file_like_comment_details' - - def is_file_resolve_comment_details(self): - """ - Check if the union tag is ``file_resolve_comment_details``. - - :rtype: bool - """ - return self._tag == 'file_resolve_comment_details' - - def is_file_unlike_comment_details(self): - """ - Check if the union tag is ``file_unlike_comment_details``. - - :rtype: bool - """ - return self._tag == 'file_unlike_comment_details' - - def is_file_unresolve_comment_details(self): - """ - Check if the union tag is ``file_unresolve_comment_details``. - - :rtype: bool - """ - return self._tag == 'file_unresolve_comment_details' - - def is_device_change_ip_desktop_details(self): - """ - Check if the union tag is ``device_change_ip_desktop_details``. - - :rtype: bool - """ - return self._tag == 'device_change_ip_desktop_details' - - def is_device_change_ip_mobile_details(self): - """ - Check if the union tag is ``device_change_ip_mobile_details``. - - :rtype: bool - """ - return self._tag == 'device_change_ip_mobile_details' - - def is_device_change_ip_web_details(self): - """ - Check if the union tag is ``device_change_ip_web_details``. - - :rtype: bool - """ - return self._tag == 'device_change_ip_web_details' - - def is_device_delete_on_unlink_fail_details(self): - """ - Check if the union tag is ``device_delete_on_unlink_fail_details``. - - :rtype: bool - """ - return self._tag == 'device_delete_on_unlink_fail_details' - - def is_device_delete_on_unlink_success_details(self): - """ - Check if the union tag is ``device_delete_on_unlink_success_details``. - - :rtype: bool - """ - return self._tag == 'device_delete_on_unlink_success_details' - - def is_device_link_fail_details(self): - """ - Check if the union tag is ``device_link_fail_details``. - - :rtype: bool - """ - return self._tag == 'device_link_fail_details' - - def is_device_link_success_details(self): - """ - Check if the union tag is ``device_link_success_details``. - - :rtype: bool - """ - return self._tag == 'device_link_success_details' - - def is_device_management_disabled_details(self): - """ - Check if the union tag is ``device_management_disabled_details``. - - :rtype: bool - """ - return self._tag == 'device_management_disabled_details' - - def is_device_management_enabled_details(self): - """ - Check if the union tag is ``device_management_enabled_details``. - - :rtype: bool - """ - return self._tag == 'device_management_enabled_details' - - def is_device_unlink_details(self): - """ - Check if the union tag is ``device_unlink_details``. - - :rtype: bool - """ - return self._tag == 'device_unlink_details' - - def is_emm_refresh_auth_token_details(self): - """ - Check if the union tag is ``emm_refresh_auth_token_details``. - - :rtype: bool - """ - return self._tag == 'emm_refresh_auth_token_details' - - def is_account_capture_change_availability_details(self): - """ - Check if the union tag is ``account_capture_change_availability_details``. - - :rtype: bool - """ - return self._tag == 'account_capture_change_availability_details' - - def is_account_capture_migrate_account_details(self): - """ - Check if the union tag is ``account_capture_migrate_account_details``. - - :rtype: bool - """ - return self._tag == 'account_capture_migrate_account_details' - - def is_account_capture_relinquish_account_details(self): - """ - Check if the union tag is ``account_capture_relinquish_account_details``. - - :rtype: bool - """ - return self._tag == 'account_capture_relinquish_account_details' - - def is_disabled_domain_invites_details(self): - """ - Check if the union tag is ``disabled_domain_invites_details``. - - :rtype: bool - """ - return self._tag == 'disabled_domain_invites_details' - - def is_domain_invites_approve_request_to_join_team_details(self): - """ - Check if the union tag is ``domain_invites_approve_request_to_join_team_details``. - - :rtype: bool - """ - return self._tag == 'domain_invites_approve_request_to_join_team_details' - - def is_domain_invites_decline_request_to_join_team_details(self): - """ - Check if the union tag is ``domain_invites_decline_request_to_join_team_details``. - - :rtype: bool - """ - return self._tag == 'domain_invites_decline_request_to_join_team_details' - - def is_domain_invites_email_existing_users_details(self): - """ - Check if the union tag is ``domain_invites_email_existing_users_details``. - - :rtype: bool - """ - return self._tag == 'domain_invites_email_existing_users_details' - - def is_domain_invites_request_to_join_team_details(self): - """ - Check if the union tag is ``domain_invites_request_to_join_team_details``. - - :rtype: bool - """ - return self._tag == 'domain_invites_request_to_join_team_details' - - def is_domain_invites_set_invite_new_user_pref_to_no_details(self): - """ - Check if the union tag is ``domain_invites_set_invite_new_user_pref_to_no_details``. - - :rtype: bool - """ - return self._tag == 'domain_invites_set_invite_new_user_pref_to_no_details' - - def is_domain_invites_set_invite_new_user_pref_to_yes_details(self): - """ - Check if the union tag is ``domain_invites_set_invite_new_user_pref_to_yes_details``. - - :rtype: bool - """ - return self._tag == 'domain_invites_set_invite_new_user_pref_to_yes_details' - - def is_domain_verification_add_domain_fail_details(self): - """ - Check if the union tag is ``domain_verification_add_domain_fail_details``. - - :rtype: bool - """ - return self._tag == 'domain_verification_add_domain_fail_details' - - def is_domain_verification_add_domain_success_details(self): - """ - Check if the union tag is ``domain_verification_add_domain_success_details``. - - :rtype: bool - """ - return self._tag == 'domain_verification_add_domain_success_details' - - def is_domain_verification_remove_domain_details(self): - """ - Check if the union tag is ``domain_verification_remove_domain_details``. - - :rtype: bool - """ - return self._tag == 'domain_verification_remove_domain_details' - - def is_enabled_domain_invites_details(self): - """ - Check if the union tag is ``enabled_domain_invites_details``. - - :rtype: bool - """ - return self._tag == 'enabled_domain_invites_details' - - def is_create_folder_details(self): - """ - Check if the union tag is ``create_folder_details``. - - :rtype: bool - """ - return self._tag == 'create_folder_details' - - def is_file_add_details(self): - """ - Check if the union tag is ``file_add_details``. - - :rtype: bool - """ - return self._tag == 'file_add_details' - - def is_file_copy_details(self): - """ - Check if the union tag is ``file_copy_details``. - - :rtype: bool - """ - return self._tag == 'file_copy_details' - - def is_file_delete_details(self): - """ - Check if the union tag is ``file_delete_details``. - - :rtype: bool - """ - return self._tag == 'file_delete_details' - - def is_file_download_details(self): - """ - Check if the union tag is ``file_download_details``. - - :rtype: bool - """ - return self._tag == 'file_download_details' - - def is_file_edit_details(self): - """ - Check if the union tag is ``file_edit_details``. - - :rtype: bool - """ - return self._tag == 'file_edit_details' - - def is_file_get_copy_reference_details(self): - """ - Check if the union tag is ``file_get_copy_reference_details``. - - :rtype: bool - """ - return self._tag == 'file_get_copy_reference_details' - - def is_file_move_details(self): - """ - Check if the union tag is ``file_move_details``. - - :rtype: bool - """ - return self._tag == 'file_move_details' - - def is_file_permanently_delete_details(self): - """ - Check if the union tag is ``file_permanently_delete_details``. - - :rtype: bool - """ - return self._tag == 'file_permanently_delete_details' - - def is_file_preview_details(self): - """ - Check if the union tag is ``file_preview_details``. - - :rtype: bool - """ - return self._tag == 'file_preview_details' - - def is_file_rename_details(self): - """ - Check if the union tag is ``file_rename_details``. - - :rtype: bool - """ - return self._tag == 'file_rename_details' - - def is_file_restore_details(self): - """ - Check if the union tag is ``file_restore_details``. - - :rtype: bool - """ - return self._tag == 'file_restore_details' - - def is_file_revert_details(self): - """ - Check if the union tag is ``file_revert_details``. - - :rtype: bool - """ - return self._tag == 'file_revert_details' - - def is_file_rollback_changes_details(self): - """ - Check if the union tag is ``file_rollback_changes_details``. - - :rtype: bool - """ - return self._tag == 'file_rollback_changes_details' - - def is_file_save_copy_reference_details(self): - """ - Check if the union tag is ``file_save_copy_reference_details``. - - :rtype: bool - """ - return self._tag == 'file_save_copy_reference_details' - - def is_file_request_add_deadline_details(self): - """ - Check if the union tag is ``file_request_add_deadline_details``. - - :rtype: bool - """ - return self._tag == 'file_request_add_deadline_details' - - def is_file_request_change_folder_details(self): - """ - Check if the union tag is ``file_request_change_folder_details``. - - :rtype: bool - """ - return self._tag == 'file_request_change_folder_details' - - def is_file_request_change_title_details(self): - """ - Check if the union tag is ``file_request_change_title_details``. - - :rtype: bool - """ - return self._tag == 'file_request_change_title_details' - - def is_file_request_close_details(self): - """ - Check if the union tag is ``file_request_close_details``. - - :rtype: bool - """ - return self._tag == 'file_request_close_details' - - def is_file_request_create_details(self): - """ - Check if the union tag is ``file_request_create_details``. - - :rtype: bool - """ - return self._tag == 'file_request_create_details' - - def is_file_request_receive_file_details(self): - """ - Check if the union tag is ``file_request_receive_file_details``. - - :rtype: bool - """ - return self._tag == 'file_request_receive_file_details' - - def is_file_request_remove_deadline_details(self): - """ - Check if the union tag is ``file_request_remove_deadline_details``. - - :rtype: bool - """ - return self._tag == 'file_request_remove_deadline_details' - - def is_file_request_send_details(self): - """ - Check if the union tag is ``file_request_send_details``. - - :rtype: bool - """ - return self._tag == 'file_request_send_details' - - def is_group_add_external_id_details(self): - """ - Check if the union tag is ``group_add_external_id_details``. - - :rtype: bool - """ - return self._tag == 'group_add_external_id_details' - - def is_group_add_member_details(self): - """ - Check if the union tag is ``group_add_member_details``. - - :rtype: bool - """ - return self._tag == 'group_add_member_details' - - def is_group_change_external_id_details(self): - """ - Check if the union tag is ``group_change_external_id_details``. - - :rtype: bool - """ - return self._tag == 'group_change_external_id_details' - - def is_group_change_management_type_details(self): - """ - Check if the union tag is ``group_change_management_type_details``. - - :rtype: bool - """ - return self._tag == 'group_change_management_type_details' - - def is_group_change_member_role_details(self): - """ - Check if the union tag is ``group_change_member_role_details``. - - :rtype: bool - """ - return self._tag == 'group_change_member_role_details' - - def is_group_create_details(self): - """ - Check if the union tag is ``group_create_details``. - - :rtype: bool - """ - return self._tag == 'group_create_details' - - def is_group_delete_details(self): - """ - Check if the union tag is ``group_delete_details``. - - :rtype: bool - """ - return self._tag == 'group_delete_details' - - def is_group_moved_details(self): - """ - Check if the union tag is ``group_moved_details``. - - :rtype: bool - """ - return self._tag == 'group_moved_details' - - def is_group_remove_external_id_details(self): - """ - Check if the union tag is ``group_remove_external_id_details``. - - :rtype: bool - """ - return self._tag == 'group_remove_external_id_details' - - def is_group_remove_member_details(self): - """ - Check if the union tag is ``group_remove_member_details``. - - :rtype: bool - """ - return self._tag == 'group_remove_member_details' - - def is_group_rename_details(self): - """ - Check if the union tag is ``group_rename_details``. - - :rtype: bool - """ - return self._tag == 'group_rename_details' - - def is_emm_login_success_details(self): - """ - Check if the union tag is ``emm_login_success_details``. - - :rtype: bool - """ - return self._tag == 'emm_login_success_details' - - def is_logout_details(self): - """ - Check if the union tag is ``logout_details``. - - :rtype: bool - """ - return self._tag == 'logout_details' - - def is_password_login_fail_details(self): - """ - Check if the union tag is ``password_login_fail_details``. - - :rtype: bool - """ - return self._tag == 'password_login_fail_details' - - def is_password_login_success_details(self): - """ - Check if the union tag is ``password_login_success_details``. - - :rtype: bool - """ - return self._tag == 'password_login_success_details' - - def is_reseller_support_session_end_details(self): - """ - Check if the union tag is ``reseller_support_session_end_details``. - - :rtype: bool - """ - return self._tag == 'reseller_support_session_end_details' - - def is_reseller_support_session_start_details(self): - """ - Check if the union tag is ``reseller_support_session_start_details``. - - :rtype: bool - """ - return self._tag == 'reseller_support_session_start_details' - - def is_sign_in_as_session_end_details(self): - """ - Check if the union tag is ``sign_in_as_session_end_details``. - - :rtype: bool - """ - return self._tag == 'sign_in_as_session_end_details' - - def is_sign_in_as_session_start_details(self): - """ - Check if the union tag is ``sign_in_as_session_start_details``. - - :rtype: bool - """ - return self._tag == 'sign_in_as_session_start_details' - - def is_sso_login_fail_details(self): - """ - Check if the union tag is ``sso_login_fail_details``. - - :rtype: bool - """ - return self._tag == 'sso_login_fail_details' - - def is_member_add_name_details(self): - """ - Check if the union tag is ``member_add_name_details``. - - :rtype: bool - """ - return self._tag == 'member_add_name_details' - - def is_member_change_admin_role_details(self): - """ - Check if the union tag is ``member_change_admin_role_details``. - - :rtype: bool - """ - return self._tag == 'member_change_admin_role_details' - - def is_member_change_email_details(self): - """ - Check if the union tag is ``member_change_email_details``. - - :rtype: bool - """ - return self._tag == 'member_change_email_details' - - def is_member_change_name_details(self): - """ - Check if the union tag is ``member_change_name_details``. - - :rtype: bool - """ - return self._tag == 'member_change_name_details' - - def is_member_change_status_details(self): - """ - Check if the union tag is ``member_change_status_details``. - - :rtype: bool - """ - return self._tag == 'member_change_status_details' - - def is_member_suggest_details(self): - """ - Check if the union tag is ``member_suggest_details``. - - :rtype: bool - """ - return self._tag == 'member_suggest_details' - - def is_paper_content_add_member_details(self): - """ - Check if the union tag is ``paper_content_add_member_details``. - - :rtype: bool - """ - return self._tag == 'paper_content_add_member_details' - - def is_paper_content_add_to_folder_details(self): - """ - Check if the union tag is ``paper_content_add_to_folder_details``. - - :rtype: bool - """ - return self._tag == 'paper_content_add_to_folder_details' - - def is_paper_content_archive_details(self): - """ - Check if the union tag is ``paper_content_archive_details``. - - :rtype: bool - """ - return self._tag == 'paper_content_archive_details' - - def is_paper_content_create_details(self): - """ - Check if the union tag is ``paper_content_create_details``. - - :rtype: bool - """ - return self._tag == 'paper_content_create_details' - - def is_paper_content_permanently_delete_details(self): - """ - Check if the union tag is ``paper_content_permanently_delete_details``. - - :rtype: bool - """ - return self._tag == 'paper_content_permanently_delete_details' - - def is_paper_content_remove_from_folder_details(self): - """ - Check if the union tag is ``paper_content_remove_from_folder_details``. - - :rtype: bool - """ - return self._tag == 'paper_content_remove_from_folder_details' - - def is_paper_content_remove_member_details(self): - """ - Check if the union tag is ``paper_content_remove_member_details``. - - :rtype: bool - """ - return self._tag == 'paper_content_remove_member_details' - - def is_paper_content_rename_details(self): - """ - Check if the union tag is ``paper_content_rename_details``. - - :rtype: bool - """ - return self._tag == 'paper_content_rename_details' - - def is_paper_content_restore_details(self): - """ - Check if the union tag is ``paper_content_restore_details``. - - :rtype: bool - """ - return self._tag == 'paper_content_restore_details' - - def is_paper_doc_add_comment_details(self): - """ - Check if the union tag is ``paper_doc_add_comment_details``. - - :rtype: bool - """ - return self._tag == 'paper_doc_add_comment_details' - - def is_paper_doc_change_member_role_details(self): - """ - Check if the union tag is ``paper_doc_change_member_role_details``. - - :rtype: bool - """ - return self._tag == 'paper_doc_change_member_role_details' - - def is_paper_doc_change_sharing_policy_details(self): - """ - Check if the union tag is ``paper_doc_change_sharing_policy_details``. - - :rtype: bool - """ - return self._tag == 'paper_doc_change_sharing_policy_details' - - def is_paper_doc_change_subscription_details(self): - """ - Check if the union tag is ``paper_doc_change_subscription_details``. - - :rtype: bool - """ - return self._tag == 'paper_doc_change_subscription_details' - - def is_paper_doc_deleted_details(self): - """ - Check if the union tag is ``paper_doc_deleted_details``. - - :rtype: bool - """ - return self._tag == 'paper_doc_deleted_details' - - def is_paper_doc_delete_comment_details(self): - """ - Check if the union tag is ``paper_doc_delete_comment_details``. - - :rtype: bool - """ - return self._tag == 'paper_doc_delete_comment_details' - - def is_paper_doc_download_details(self): - """ - Check if the union tag is ``paper_doc_download_details``. - - :rtype: bool - """ - return self._tag == 'paper_doc_download_details' - - def is_paper_doc_edit_details(self): - """ - Check if the union tag is ``paper_doc_edit_details``. - - :rtype: bool - """ - return self._tag == 'paper_doc_edit_details' - - def is_paper_doc_edit_comment_details(self): - """ - Check if the union tag is ``paper_doc_edit_comment_details``. - - :rtype: bool - """ - return self._tag == 'paper_doc_edit_comment_details' - - def is_paper_doc_followed_details(self): - """ - Check if the union tag is ``paper_doc_followed_details``. - - :rtype: bool - """ - return self._tag == 'paper_doc_followed_details' - - def is_paper_doc_mention_details(self): - """ - Check if the union tag is ``paper_doc_mention_details``. - - :rtype: bool - """ - return self._tag == 'paper_doc_mention_details' - - def is_paper_doc_request_access_details(self): - """ - Check if the union tag is ``paper_doc_request_access_details``. - - :rtype: bool - """ - return self._tag == 'paper_doc_request_access_details' - - def is_paper_doc_resolve_comment_details(self): - """ - Check if the union tag is ``paper_doc_resolve_comment_details``. - - :rtype: bool - """ - return self._tag == 'paper_doc_resolve_comment_details' - - def is_paper_doc_revert_details(self): - """ - Check if the union tag is ``paper_doc_revert_details``. - - :rtype: bool - """ - return self._tag == 'paper_doc_revert_details' - - def is_paper_doc_slack_share_details(self): - """ - Check if the union tag is ``paper_doc_slack_share_details``. - - :rtype: bool - """ - return self._tag == 'paper_doc_slack_share_details' - - def is_paper_doc_team_invite_details(self): - """ - Check if the union tag is ``paper_doc_team_invite_details``. - - :rtype: bool - """ - return self._tag == 'paper_doc_team_invite_details' - - def is_paper_doc_trashed_details(self): - """ - Check if the union tag is ``paper_doc_trashed_details``. - - :rtype: bool - """ - return self._tag == 'paper_doc_trashed_details' - - def is_paper_doc_unresolve_comment_details(self): - """ - Check if the union tag is ``paper_doc_unresolve_comment_details``. - - :rtype: bool - """ - return self._tag == 'paper_doc_unresolve_comment_details' - - def is_paper_doc_untrashed_details(self): - """ - Check if the union tag is ``paper_doc_untrashed_details``. - - :rtype: bool - """ - return self._tag == 'paper_doc_untrashed_details' - - def is_paper_doc_view_details(self): - """ - Check if the union tag is ``paper_doc_view_details``. - - :rtype: bool - """ - return self._tag == 'paper_doc_view_details' - - def is_paper_folder_change_subscription_details(self): - """ - Check if the union tag is ``paper_folder_change_subscription_details``. - - :rtype: bool - """ - return self._tag == 'paper_folder_change_subscription_details' - - def is_paper_folder_deleted_details(self): - """ - Check if the union tag is ``paper_folder_deleted_details``. - - :rtype: bool - """ - return self._tag == 'paper_folder_deleted_details' - - def is_paper_folder_followed_details(self): - """ - Check if the union tag is ``paper_folder_followed_details``. - - :rtype: bool - """ - return self._tag == 'paper_folder_followed_details' - - def is_paper_folder_team_invite_details(self): - """ - Check if the union tag is ``paper_folder_team_invite_details``. - - :rtype: bool - """ - return self._tag == 'paper_folder_team_invite_details' - - def is_password_change_details(self): - """ - Check if the union tag is ``password_change_details``. - - :rtype: bool - """ - return self._tag == 'password_change_details' - - def is_password_reset_details(self): - """ - Check if the union tag is ``password_reset_details``. - - :rtype: bool - """ - return self._tag == 'password_reset_details' - - def is_password_reset_all_details(self): - """ - Check if the union tag is ``password_reset_all_details``. - - :rtype: bool - """ - return self._tag == 'password_reset_all_details' - - def is_emm_create_exceptions_report_details(self): - """ - Check if the union tag is ``emm_create_exceptions_report_details``. - - :rtype: bool - """ - return self._tag == 'emm_create_exceptions_report_details' - - def is_emm_create_usage_report_details(self): - """ - Check if the union tag is ``emm_create_usage_report_details``. - - :rtype: bool - """ - return self._tag == 'emm_create_usage_report_details' - - def is_smart_sync_create_admin_privilege_report_details(self): - """ - Check if the union tag is ``smart_sync_create_admin_privilege_report_details``. - - :rtype: bool - """ - return self._tag == 'smart_sync_create_admin_privilege_report_details' - - def is_team_activity_create_report_details(self): - """ - Check if the union tag is ``team_activity_create_report_details``. - - :rtype: bool - """ - return self._tag == 'team_activity_create_report_details' - - def is_collection_share_details(self): - """ - Check if the union tag is ``collection_share_details``. - - :rtype: bool - """ - return self._tag == 'collection_share_details' - - def is_note_acl_invite_only_details(self): - """ - Check if the union tag is ``note_acl_invite_only_details``. - - :rtype: bool - """ - return self._tag == 'note_acl_invite_only_details' - - def is_note_acl_link_details(self): - """ - Check if the union tag is ``note_acl_link_details``. - - :rtype: bool - """ - return self._tag == 'note_acl_link_details' - - def is_note_acl_team_link_details(self): - """ - Check if the union tag is ``note_acl_team_link_details``. - - :rtype: bool - """ - return self._tag == 'note_acl_team_link_details' - - def is_note_shared_details(self): - """ - Check if the union tag is ``note_shared_details``. - - :rtype: bool - """ - return self._tag == 'note_shared_details' - - def is_note_share_receive_details(self): - """ - Check if the union tag is ``note_share_receive_details``. - - :rtype: bool - """ - return self._tag == 'note_share_receive_details' - - def is_open_note_shared_details(self): - """ - Check if the union tag is ``open_note_shared_details``. - - :rtype: bool - """ - return self._tag == 'open_note_shared_details' - - def is_sf_add_group_details(self): - """ - Check if the union tag is ``sf_add_group_details``. - - :rtype: bool - """ - return self._tag == 'sf_add_group_details' - - def is_sf_allow_non_members_to_view_shared_links_details(self): - """ - Check if the union tag is ``sf_allow_non_members_to_view_shared_links_details``. - - :rtype: bool - """ - return self._tag == 'sf_allow_non_members_to_view_shared_links_details' - - def is_sf_invite_group_details(self): - """ - Check if the union tag is ``sf_invite_group_details``. - - :rtype: bool - """ - return self._tag == 'sf_invite_group_details' - - def is_sf_nest_details(self): - """ - Check if the union tag is ``sf_nest_details``. - - :rtype: bool - """ - return self._tag == 'sf_nest_details' - - def is_sf_team_decline_details(self): - """ - Check if the union tag is ``sf_team_decline_details``. - - :rtype: bool - """ - return self._tag == 'sf_team_decline_details' - - def is_sf_team_grant_access_details(self): - """ - Check if the union tag is ``sf_team_grant_access_details``. - - :rtype: bool - """ - return self._tag == 'sf_team_grant_access_details' - - def is_sf_team_invite_details(self): - """ - Check if the union tag is ``sf_team_invite_details``. - - :rtype: bool - """ - return self._tag == 'sf_team_invite_details' - - def is_sf_team_invite_change_role_details(self): - """ - Check if the union tag is ``sf_team_invite_change_role_details``. - - :rtype: bool - """ - return self._tag == 'sf_team_invite_change_role_details' - - def is_sf_team_join_details(self): - """ - Check if the union tag is ``sf_team_join_details``. - - :rtype: bool - """ - return self._tag == 'sf_team_join_details' - - def is_sf_team_join_from_oob_link_details(self): - """ - Check if the union tag is ``sf_team_join_from_oob_link_details``. - - :rtype: bool - """ - return self._tag == 'sf_team_join_from_oob_link_details' - - def is_sf_team_uninvite_details(self): - """ - Check if the union tag is ``sf_team_uninvite_details``. - - :rtype: bool - """ - return self._tag == 'sf_team_uninvite_details' - - def is_shared_content_add_invitees_details(self): - """ - Check if the union tag is ``shared_content_add_invitees_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_add_invitees_details' - - def is_shared_content_add_link_expiry_details(self): - """ - Check if the union tag is ``shared_content_add_link_expiry_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_add_link_expiry_details' - - def is_shared_content_add_link_password_details(self): - """ - Check if the union tag is ``shared_content_add_link_password_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_add_link_password_details' - - def is_shared_content_add_member_details(self): - """ - Check if the union tag is ``shared_content_add_member_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_add_member_details' - - def is_shared_content_change_downloads_policy_details(self): - """ - Check if the union tag is ``shared_content_change_downloads_policy_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_change_downloads_policy_details' - - def is_shared_content_change_invitee_role_details(self): - """ - Check if the union tag is ``shared_content_change_invitee_role_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_change_invitee_role_details' - - def is_shared_content_change_link_audience_details(self): - """ - Check if the union tag is ``shared_content_change_link_audience_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_change_link_audience_details' - - def is_shared_content_change_link_expiry_details(self): - """ - Check if the union tag is ``shared_content_change_link_expiry_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_change_link_expiry_details' - - def is_shared_content_change_link_password_details(self): - """ - Check if the union tag is ``shared_content_change_link_password_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_change_link_password_details' - - def is_shared_content_change_member_role_details(self): - """ - Check if the union tag is ``shared_content_change_member_role_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_change_member_role_details' - - def is_shared_content_change_viewer_info_policy_details(self): - """ - Check if the union tag is ``shared_content_change_viewer_info_policy_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_change_viewer_info_policy_details' - - def is_shared_content_claim_invitation_details(self): - """ - Check if the union tag is ``shared_content_claim_invitation_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_claim_invitation_details' - - def is_shared_content_copy_details(self): - """ - Check if the union tag is ``shared_content_copy_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_copy_details' - - def is_shared_content_download_details(self): - """ - Check if the union tag is ``shared_content_download_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_download_details' - - def is_shared_content_relinquish_membership_details(self): - """ - Check if the union tag is ``shared_content_relinquish_membership_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_relinquish_membership_details' - - def is_shared_content_remove_invitee_details(self): - """ - Check if the union tag is ``shared_content_remove_invitee_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_remove_invitee_details' - - def is_shared_content_remove_link_expiry_details(self): - """ - Check if the union tag is ``shared_content_remove_link_expiry_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_remove_link_expiry_details' - - def is_shared_content_remove_link_password_details(self): - """ - Check if the union tag is ``shared_content_remove_link_password_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_remove_link_password_details' - - def is_shared_content_remove_member_details(self): - """ - Check if the union tag is ``shared_content_remove_member_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_remove_member_details' - - def is_shared_content_request_access_details(self): - """ - Check if the union tag is ``shared_content_request_access_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_request_access_details' - - def is_shared_content_unshare_details(self): - """ - Check if the union tag is ``shared_content_unshare_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_unshare_details' - - def is_shared_content_view_details(self): - """ - Check if the union tag is ``shared_content_view_details``. - - :rtype: bool - """ - return self._tag == 'shared_content_view_details' - - def is_shared_folder_change_confidentiality_details(self): - """ - Check if the union tag is ``shared_folder_change_confidentiality_details``. - - :rtype: bool - """ - return self._tag == 'shared_folder_change_confidentiality_details' - - def is_shared_folder_change_link_policy_details(self): - """ - Check if the union tag is ``shared_folder_change_link_policy_details``. - - :rtype: bool - """ - return self._tag == 'shared_folder_change_link_policy_details' - - def is_shared_folder_change_member_management_policy_details(self): - """ - Check if the union tag is ``shared_folder_change_member_management_policy_details``. - - :rtype: bool - """ - return self._tag == 'shared_folder_change_member_management_policy_details' - - def is_shared_folder_change_member_policy_details(self): - """ - Check if the union tag is ``shared_folder_change_member_policy_details``. - - :rtype: bool - """ - return self._tag == 'shared_folder_change_member_policy_details' - - def is_shared_folder_create_details(self): - """ - Check if the union tag is ``shared_folder_create_details``. - - :rtype: bool - """ - return self._tag == 'shared_folder_create_details' - - def is_shared_folder_mount_details(self): - """ - Check if the union tag is ``shared_folder_mount_details``. - - :rtype: bool - """ - return self._tag == 'shared_folder_mount_details' - - def is_shared_folder_transfer_ownership_details(self): - """ - Check if the union tag is ``shared_folder_transfer_ownership_details``. - - :rtype: bool - """ - return self._tag == 'shared_folder_transfer_ownership_details' - - def is_shared_folder_unmount_details(self): - """ - Check if the union tag is ``shared_folder_unmount_details``. - - :rtype: bool - """ - return self._tag == 'shared_folder_unmount_details' - - def is_shared_note_opened_details(self): - """ - Check if the union tag is ``shared_note_opened_details``. - - :rtype: bool - """ - return self._tag == 'shared_note_opened_details' - - def is_shmodel_app_create_details(self): - """ - Check if the union tag is ``shmodel_app_create_details``. - - :rtype: bool - """ - return self._tag == 'shmodel_app_create_details' - - def is_shmodel_create_details(self): - """ - Check if the union tag is ``shmodel_create_details``. - - :rtype: bool - """ - return self._tag == 'shmodel_create_details' - - def is_shmodel_disable_details(self): - """ - Check if the union tag is ``shmodel_disable_details``. - - :rtype: bool - """ - return self._tag == 'shmodel_disable_details' - - def is_shmodel_fb_share_details(self): - """ - Check if the union tag is ``shmodel_fb_share_details``. - - :rtype: bool - """ - return self._tag == 'shmodel_fb_share_details' - - def is_shmodel_group_share_details(self): - """ - Check if the union tag is ``shmodel_group_share_details``. - - :rtype: bool - """ - return self._tag == 'shmodel_group_share_details' - - def is_shmodel_remove_expiration_details(self): - """ - Check if the union tag is ``shmodel_remove_expiration_details``. - - :rtype: bool - """ - return self._tag == 'shmodel_remove_expiration_details' - - def is_shmodel_set_expiration_details(self): - """ - Check if the union tag is ``shmodel_set_expiration_details``. - - :rtype: bool - """ - return self._tag == 'shmodel_set_expiration_details' - - def is_shmodel_team_copy_details(self): - """ - Check if the union tag is ``shmodel_team_copy_details``. - - :rtype: bool - """ - return self._tag == 'shmodel_team_copy_details' - - def is_shmodel_team_download_details(self): - """ - Check if the union tag is ``shmodel_team_download_details``. - - :rtype: bool - """ - return self._tag == 'shmodel_team_download_details' - - def is_shmodel_team_share_details(self): - """ - Check if the union tag is ``shmodel_team_share_details``. - - :rtype: bool - """ - return self._tag == 'shmodel_team_share_details' - - def is_shmodel_team_view_details(self): - """ - Check if the union tag is ``shmodel_team_view_details``. - - :rtype: bool - """ - return self._tag == 'shmodel_team_view_details' - - def is_shmodel_visibility_password_details(self): - """ - Check if the union tag is ``shmodel_visibility_password_details``. - - :rtype: bool - """ - return self._tag == 'shmodel_visibility_password_details' - - def is_shmodel_visibility_public_details(self): - """ - Check if the union tag is ``shmodel_visibility_public_details``. - - :rtype: bool - """ - return self._tag == 'shmodel_visibility_public_details' - - def is_shmodel_visibility_team_only_details(self): - """ - Check if the union tag is ``shmodel_visibility_team_only_details``. - - :rtype: bool - """ - return self._tag == 'shmodel_visibility_team_only_details' - - def is_sso_add_cert_details(self): - """ - Check if the union tag is ``sso_add_cert_details``. - - :rtype: bool - """ - return self._tag == 'sso_add_cert_details' - - def is_sso_add_login_url_details(self): - """ - Check if the union tag is ``sso_add_login_url_details``. - - :rtype: bool - """ - return self._tag == 'sso_add_login_url_details' - - def is_sso_add_logout_url_details(self): - """ - Check if the union tag is ``sso_add_logout_url_details``. - - :rtype: bool - """ - return self._tag == 'sso_add_logout_url_details' - - def is_sso_change_cert_details(self): - """ - Check if the union tag is ``sso_change_cert_details``. - - :rtype: bool - """ - return self._tag == 'sso_change_cert_details' - - def is_sso_change_login_url_details(self): - """ - Check if the union tag is ``sso_change_login_url_details``. - - :rtype: bool - """ - return self._tag == 'sso_change_login_url_details' - - def is_sso_change_logout_url_details(self): - """ - Check if the union tag is ``sso_change_logout_url_details``. - - :rtype: bool - """ - return self._tag == 'sso_change_logout_url_details' - - def is_sso_change_saml_identity_mode_details(self): - """ - Check if the union tag is ``sso_change_saml_identity_mode_details``. - - :rtype: bool - """ - return self._tag == 'sso_change_saml_identity_mode_details' - - def is_sso_remove_cert_details(self): - """ - Check if the union tag is ``sso_remove_cert_details``. - - :rtype: bool - """ - return self._tag == 'sso_remove_cert_details' - - def is_sso_remove_login_url_details(self): - """ - Check if the union tag is ``sso_remove_login_url_details``. - - :rtype: bool - """ - return self._tag == 'sso_remove_login_url_details' - - def is_sso_remove_logout_url_details(self): - """ - Check if the union tag is ``sso_remove_logout_url_details``. - - :rtype: bool - """ - return self._tag == 'sso_remove_logout_url_details' - - def is_team_folder_change_status_details(self): - """ - Check if the union tag is ``team_folder_change_status_details``. - - :rtype: bool - """ - return self._tag == 'team_folder_change_status_details' - - def is_team_folder_create_details(self): - """ - Check if the union tag is ``team_folder_create_details``. - - :rtype: bool - """ - return self._tag == 'team_folder_create_details' - - def is_team_folder_downgrade_details(self): - """ - Check if the union tag is ``team_folder_downgrade_details``. - - :rtype: bool - """ - return self._tag == 'team_folder_downgrade_details' - - def is_team_folder_permanently_delete_details(self): - """ - Check if the union tag is ``team_folder_permanently_delete_details``. - - :rtype: bool - """ - return self._tag == 'team_folder_permanently_delete_details' - - def is_team_folder_rename_details(self): - """ - Check if the union tag is ``team_folder_rename_details``. - - :rtype: bool - """ - return self._tag == 'team_folder_rename_details' - - def is_account_capture_change_policy_details(self): - """ - Check if the union tag is ``account_capture_change_policy_details``. - - :rtype: bool - """ - return self._tag == 'account_capture_change_policy_details' - - def is_allow_download_disabled_details(self): - """ - Check if the union tag is ``allow_download_disabled_details``. - - :rtype: bool - """ - return self._tag == 'allow_download_disabled_details' - - def is_allow_download_enabled_details(self): - """ - Check if the union tag is ``allow_download_enabled_details``. - - :rtype: bool - """ - return self._tag == 'allow_download_enabled_details' - - def is_data_placement_restriction_change_policy_details(self): - """ - Check if the union tag is ``data_placement_restriction_change_policy_details``. - - :rtype: bool - """ - return self._tag == 'data_placement_restriction_change_policy_details' - - def is_data_placement_restriction_satisfy_policy_details(self): - """ - Check if the union tag is ``data_placement_restriction_satisfy_policy_details``. - - :rtype: bool - """ - return self._tag == 'data_placement_restriction_satisfy_policy_details' - - def is_device_approvals_change_desktop_policy_details(self): - """ - Check if the union tag is ``device_approvals_change_desktop_policy_details``. - - :rtype: bool - """ - return self._tag == 'device_approvals_change_desktop_policy_details' - - def is_device_approvals_change_mobile_policy_details(self): - """ - Check if the union tag is ``device_approvals_change_mobile_policy_details``. - - :rtype: bool - """ - return self._tag == 'device_approvals_change_mobile_policy_details' - - def is_device_approvals_change_overage_action_details(self): - """ - Check if the union tag is ``device_approvals_change_overage_action_details``. - - :rtype: bool - """ - return self._tag == 'device_approvals_change_overage_action_details' - - def is_device_approvals_change_unlink_action_details(self): - """ - Check if the union tag is ``device_approvals_change_unlink_action_details``. - - :rtype: bool - """ - return self._tag == 'device_approvals_change_unlink_action_details' - - def is_emm_add_exception_details(self): - """ - Check if the union tag is ``emm_add_exception_details``. - - :rtype: bool - """ - return self._tag == 'emm_add_exception_details' - - def is_emm_change_policy_details(self): - """ - Check if the union tag is ``emm_change_policy_details``. - - :rtype: bool - """ - return self._tag == 'emm_change_policy_details' - - def is_emm_remove_exception_details(self): - """ - Check if the union tag is ``emm_remove_exception_details``. - - :rtype: bool - """ - return self._tag == 'emm_remove_exception_details' - - def is_extended_version_history_change_policy_details(self): - """ - Check if the union tag is ``extended_version_history_change_policy_details``. - - :rtype: bool - """ - return self._tag == 'extended_version_history_change_policy_details' - - def is_file_comments_change_policy_details(self): - """ - Check if the union tag is ``file_comments_change_policy_details``. - - :rtype: bool - """ - return self._tag == 'file_comments_change_policy_details' - - def is_file_requests_change_policy_details(self): - """ - Check if the union tag is ``file_requests_change_policy_details``. - - :rtype: bool - """ - return self._tag == 'file_requests_change_policy_details' - - def is_file_requests_emails_enabled_details(self): - """ - Check if the union tag is ``file_requests_emails_enabled_details``. - - :rtype: bool - """ - return self._tag == 'file_requests_emails_enabled_details' - - def is_file_requests_emails_restricted_to_team_only_details(self): - """ - Check if the union tag is ``file_requests_emails_restricted_to_team_only_details``. - - :rtype: bool - """ - return self._tag == 'file_requests_emails_restricted_to_team_only_details' - - def is_google_sso_change_policy_details(self): - """ - Check if the union tag is ``google_sso_change_policy_details``. - - :rtype: bool - """ - return self._tag == 'google_sso_change_policy_details' - - def is_group_user_management_change_policy_details(self): - """ - Check if the union tag is ``group_user_management_change_policy_details``. - - :rtype: bool - """ - return self._tag == 'group_user_management_change_policy_details' - - def is_member_requests_change_policy_details(self): - """ - Check if the union tag is ``member_requests_change_policy_details``. - - :rtype: bool - """ - return self._tag == 'member_requests_change_policy_details' - - def is_member_space_limits_add_exception_details(self): - """ - Check if the union tag is ``member_space_limits_add_exception_details``. - - :rtype: bool - """ - return self._tag == 'member_space_limits_add_exception_details' - - def is_member_space_limits_change_policy_details(self): - """ - Check if the union tag is ``member_space_limits_change_policy_details``. - - :rtype: bool - """ - return self._tag == 'member_space_limits_change_policy_details' - - def is_member_space_limits_remove_exception_details(self): - """ - Check if the union tag is ``member_space_limits_remove_exception_details``. - - :rtype: bool - """ - return self._tag == 'member_space_limits_remove_exception_details' - - def is_member_suggestions_change_policy_details(self): - """ - Check if the union tag is ``member_suggestions_change_policy_details``. - - :rtype: bool - """ - return self._tag == 'member_suggestions_change_policy_details' - - def is_microsoft_office_addin_change_policy_details(self): - """ - Check if the union tag is ``microsoft_office_addin_change_policy_details``. - - :rtype: bool - """ - return self._tag == 'microsoft_office_addin_change_policy_details' - - def is_network_control_change_policy_details(self): - """ - Check if the union tag is ``network_control_change_policy_details``. - - :rtype: bool - """ - return self._tag == 'network_control_change_policy_details' - - def is_paper_change_deployment_policy_details(self): - """ - Check if the union tag is ``paper_change_deployment_policy_details``. - - :rtype: bool - """ - return self._tag == 'paper_change_deployment_policy_details' - - def is_paper_change_member_link_policy_details(self): - """ - Check if the union tag is ``paper_change_member_link_policy_details``. - - :rtype: bool - """ - return self._tag == 'paper_change_member_link_policy_details' - - def is_paper_change_member_policy_details(self): - """ - Check if the union tag is ``paper_change_member_policy_details``. - - :rtype: bool - """ - return self._tag == 'paper_change_member_policy_details' - - def is_paper_change_policy_details(self): - """ - Check if the union tag is ``paper_change_policy_details``. - - :rtype: bool - """ - return self._tag == 'paper_change_policy_details' - - def is_permanent_delete_change_policy_details(self): - """ - Check if the union tag is ``permanent_delete_change_policy_details``. - - :rtype: bool - """ - return self._tag == 'permanent_delete_change_policy_details' - - def is_sharing_change_folder_join_policy_details(self): - """ - Check if the union tag is ``sharing_change_folder_join_policy_details``. - - :rtype: bool - """ - return self._tag == 'sharing_change_folder_join_policy_details' - - def is_sharing_change_link_policy_details(self): - """ - Check if the union tag is ``sharing_change_link_policy_details``. - - :rtype: bool - """ - return self._tag == 'sharing_change_link_policy_details' - - def is_sharing_change_member_policy_details(self): - """ - Check if the union tag is ``sharing_change_member_policy_details``. - - :rtype: bool - """ - return self._tag == 'sharing_change_member_policy_details' - - def is_smart_sync_change_policy_details(self): - """ - Check if the union tag is ``smart_sync_change_policy_details``. - - :rtype: bool - """ - return self._tag == 'smart_sync_change_policy_details' - - def is_smart_sync_not_opt_out_details(self): - """ - Check if the union tag is ``smart_sync_not_opt_out_details``. - - :rtype: bool - """ - return self._tag == 'smart_sync_not_opt_out_details' - - def is_smart_sync_opt_out_details(self): - """ - Check if the union tag is ``smart_sync_opt_out_details``. - - :rtype: bool - """ - return self._tag == 'smart_sync_opt_out_details' - - def is_sso_change_policy_details(self): - """ - Check if the union tag is ``sso_change_policy_details``. - - :rtype: bool - """ - return self._tag == 'sso_change_policy_details' - - def is_tfa_change_policy_details(self): - """ - Check if the union tag is ``tfa_change_policy_details``. - - :rtype: bool - """ - return self._tag == 'tfa_change_policy_details' - - def is_two_account_change_policy_details(self): - """ - Check if the union tag is ``two_account_change_policy_details``. - - :rtype: bool - """ - return self._tag == 'two_account_change_policy_details' - - def is_web_sessions_change_fixed_length_policy_details(self): - """ - Check if the union tag is ``web_sessions_change_fixed_length_policy_details``. - - :rtype: bool - """ - return self._tag == 'web_sessions_change_fixed_length_policy_details' - - def is_web_sessions_change_idle_length_policy_details(self): - """ - Check if the union tag is ``web_sessions_change_idle_length_policy_details``. - - :rtype: bool - """ - return self._tag == 'web_sessions_change_idle_length_policy_details' - - def is_team_profile_add_logo_details(self): - """ - Check if the union tag is ``team_profile_add_logo_details``. - - :rtype: bool - """ - return self._tag == 'team_profile_add_logo_details' - - def is_team_profile_change_default_language_details(self): - """ - Check if the union tag is ``team_profile_change_default_language_details``. - - :rtype: bool - """ - return self._tag == 'team_profile_change_default_language_details' - - def is_team_profile_change_logo_details(self): - """ - Check if the union tag is ``team_profile_change_logo_details``. - - :rtype: bool - """ - return self._tag == 'team_profile_change_logo_details' - - def is_team_profile_change_name_details(self): - """ - Check if the union tag is ``team_profile_change_name_details``. - - :rtype: bool - """ - return self._tag == 'team_profile_change_name_details' - - def is_team_profile_remove_logo_details(self): - """ - Check if the union tag is ``team_profile_remove_logo_details``. - - :rtype: bool - """ - return self._tag == 'team_profile_remove_logo_details' - - def is_tfa_add_backup_phone_details(self): - """ - Check if the union tag is ``tfa_add_backup_phone_details``. - - :rtype: bool - """ - return self._tag == 'tfa_add_backup_phone_details' - - def is_tfa_add_security_key_details(self): - """ - Check if the union tag is ``tfa_add_security_key_details``. - - :rtype: bool - """ - return self._tag == 'tfa_add_security_key_details' - - def is_tfa_change_backup_phone_details(self): - """ - Check if the union tag is ``tfa_change_backup_phone_details``. - - :rtype: bool - """ - return self._tag == 'tfa_change_backup_phone_details' - - def is_tfa_change_status_details(self): - """ - Check if the union tag is ``tfa_change_status_details``. - - :rtype: bool - """ - return self._tag == 'tfa_change_status_details' - - def is_tfa_remove_backup_phone_details(self): - """ - Check if the union tag is ``tfa_remove_backup_phone_details``. - - :rtype: bool - """ - return self._tag == 'tfa_remove_backup_phone_details' - - def is_tfa_remove_security_key_details(self): - """ - Check if the union tag is ``tfa_remove_security_key_details``. - - :rtype: bool - """ - return self._tag == 'tfa_remove_security_key_details' - - def is_tfa_reset_details(self): - """ - Check if the union tag is ``tfa_reset_details``. - - :rtype: bool - """ - return self._tag == 'tfa_reset_details' - - def is_missing_details(self): - """ - Check if the union tag is ``missing_details``. - - :rtype: bool - """ - return self._tag == 'missing_details' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_member_change_membership_type_details(self): - """ - Changed the membership type (limited vs full) for team member. - - Only call this if :meth:`is_member_change_membership_type_details` is true. - - :rtype: MemberChangeMembershipTypeDetails - """ - if not self.is_member_change_membership_type_details(): - raise AttributeError("tag 'member_change_membership_type_details' not set") - return self._value - - def get_member_permanently_delete_account_contents_details(self): - """ - Permanently deleted contents of a removed team member account. - - Only call this if :meth:`is_member_permanently_delete_account_contents_details` is true. - - :rtype: MemberPermanentlyDeleteAccountContentsDetails - """ - if not self.is_member_permanently_delete_account_contents_details(): - raise AttributeError("tag 'member_permanently_delete_account_contents_details' not set") - return self._value - - def get_member_space_limits_change_status_details(self): - """ - Changed the status with respect to whether the team member is under or - over storage quota specified by policy. - - Only call this if :meth:`is_member_space_limits_change_status_details` is true. - - :rtype: MemberSpaceLimitsChangeStatusDetails - """ - if not self.is_member_space_limits_change_status_details(): - raise AttributeError("tag 'member_space_limits_change_status_details' not set") - return self._value - - def get_member_transfer_account_contents_details(self): - """ - Transferred contents of a removed team member account to another member. - - Only call this if :meth:`is_member_transfer_account_contents_details` is true. - - :rtype: MemberTransferAccountContentsDetails - """ - if not self.is_member_transfer_account_contents_details(): - raise AttributeError("tag 'member_transfer_account_contents_details' not set") - return self._value - - def get_paper_admin_export_start_details(self): - """ - Exported all Paper documents in the team. - - Only call this if :meth:`is_paper_admin_export_start_details` is true. - - :rtype: PaperAdminExportStartDetails - """ - if not self.is_paper_admin_export_start_details(): - raise AttributeError("tag 'paper_admin_export_start_details' not set") - return self._value - - def get_paper_enabled_users_group_addition_details(self): - """ - Users added to Paper enabled users list. - - Only call this if :meth:`is_paper_enabled_users_group_addition_details` is true. - - :rtype: PaperEnabledUsersGroupAdditionDetails - """ - if not self.is_paper_enabled_users_group_addition_details(): - raise AttributeError("tag 'paper_enabled_users_group_addition_details' not set") - return self._value - - def get_paper_enabled_users_group_removal_details(self): - """ - Users removed from Paper enabled users list. - - Only call this if :meth:`is_paper_enabled_users_group_removal_details` is true. - - :rtype: PaperEnabledUsersGroupRemovalDetails - """ - if not self.is_paper_enabled_users_group_removal_details(): - raise AttributeError("tag 'paper_enabled_users_group_removal_details' not set") - return self._value - - def get_paper_external_view_allow_details(self): - """ - Paper external sharing policy changed: anyone. - - Only call this if :meth:`is_paper_external_view_allow_details` is true. - - :rtype: PaperExternalViewAllowDetails - """ - if not self.is_paper_external_view_allow_details(): - raise AttributeError("tag 'paper_external_view_allow_details' not set") - return self._value - - def get_paper_external_view_default_team_details(self): - """ - Paper external sharing policy changed: default team. - - Only call this if :meth:`is_paper_external_view_default_team_details` is true. - - :rtype: PaperExternalViewDefaultTeamDetails - """ - if not self.is_paper_external_view_default_team_details(): - raise AttributeError("tag 'paper_external_view_default_team_details' not set") - return self._value - - def get_paper_external_view_forbid_details(self): - """ - Paper external sharing policy changed: team-only. - - Only call this if :meth:`is_paper_external_view_forbid_details` is true. - - :rtype: PaperExternalViewForbidDetails - """ - if not self.is_paper_external_view_forbid_details(): - raise AttributeError("tag 'paper_external_view_forbid_details' not set") - return self._value - - def get_sf_external_invite_warn_details(self): - """ - Admin settings: team members see a warning before sharing folders - outside the team (DEPRECATED FEATURE). - - Only call this if :meth:`is_sf_external_invite_warn_details` is true. - - :rtype: SfExternalInviteWarnDetails - """ - if not self.is_sf_external_invite_warn_details(): - raise AttributeError("tag 'sf_external_invite_warn_details' not set") - return self._value - - def get_team_merge_from_details(self): - """ - Merged another team into this team. - - Only call this if :meth:`is_team_merge_from_details` is true. - - :rtype: TeamMergeFromDetails - """ - if not self.is_team_merge_from_details(): - raise AttributeError("tag 'team_merge_from_details' not set") - return self._value - - def get_team_merge_to_details(self): - """ - Merged this team into another team. - - Only call this if :meth:`is_team_merge_to_details` is true. - - :rtype: TeamMergeToDetails - """ - if not self.is_team_merge_to_details(): - raise AttributeError("tag 'team_merge_to_details' not set") - return self._value - - def get_app_link_team_details(self): - """ - Linked an app for team. - - Only call this if :meth:`is_app_link_team_details` is true. - - :rtype: AppLinkTeamDetails - """ - if not self.is_app_link_team_details(): - raise AttributeError("tag 'app_link_team_details' not set") - return self._value - - def get_app_link_user_details(self): - """ - Linked an app for team member. - - Only call this if :meth:`is_app_link_user_details` is true. - - :rtype: AppLinkUserDetails - """ - if not self.is_app_link_user_details(): - raise AttributeError("tag 'app_link_user_details' not set") - return self._value - - def get_app_unlink_team_details(self): - """ - Unlinked an app for team. - - Only call this if :meth:`is_app_unlink_team_details` is true. - - :rtype: AppUnlinkTeamDetails - """ - if not self.is_app_unlink_team_details(): - raise AttributeError("tag 'app_unlink_team_details' not set") - return self._value - - def get_app_unlink_user_details(self): - """ - Unlinked an app for team member. - - Only call this if :meth:`is_app_unlink_user_details` is true. - - :rtype: AppUnlinkUserDetails - """ - if not self.is_app_unlink_user_details(): - raise AttributeError("tag 'app_unlink_user_details' not set") - return self._value - - def get_file_add_comment_details(self): - """ - Added a file comment. - - Only call this if :meth:`is_file_add_comment_details` is true. - - :rtype: FileAddCommentDetails - """ - if not self.is_file_add_comment_details(): - raise AttributeError("tag 'file_add_comment_details' not set") - return self._value - - def get_file_change_comment_subscription_details(self): - """ - Subscribed to or unsubscribed from comment notifications for file. - - Only call this if :meth:`is_file_change_comment_subscription_details` is true. - - :rtype: FileChangeCommentSubscriptionDetails - """ - if not self.is_file_change_comment_subscription_details(): - raise AttributeError("tag 'file_change_comment_subscription_details' not set") - return self._value - - def get_file_delete_comment_details(self): - """ - Deleted a file comment. - - Only call this if :meth:`is_file_delete_comment_details` is true. - - :rtype: FileDeleteCommentDetails - """ - if not self.is_file_delete_comment_details(): - raise AttributeError("tag 'file_delete_comment_details' not set") - return self._value - - def get_file_like_comment_details(self): - """ - Liked a file comment. - - Only call this if :meth:`is_file_like_comment_details` is true. - - :rtype: FileLikeCommentDetails - """ - if not self.is_file_like_comment_details(): - raise AttributeError("tag 'file_like_comment_details' not set") - return self._value - - def get_file_resolve_comment_details(self): - """ - Resolved a file comment. - - Only call this if :meth:`is_file_resolve_comment_details` is true. - - :rtype: FileResolveCommentDetails - """ - if not self.is_file_resolve_comment_details(): - raise AttributeError("tag 'file_resolve_comment_details' not set") - return self._value - - def get_file_unlike_comment_details(self): - """ - Unliked a file comment. - - Only call this if :meth:`is_file_unlike_comment_details` is true. - - :rtype: FileUnlikeCommentDetails - """ - if not self.is_file_unlike_comment_details(): - raise AttributeError("tag 'file_unlike_comment_details' not set") - return self._value - - def get_file_unresolve_comment_details(self): - """ - Unresolved a file comment. - - Only call this if :meth:`is_file_unresolve_comment_details` is true. - - :rtype: FileUnresolveCommentDetails - """ - if not self.is_file_unresolve_comment_details(): - raise AttributeError("tag 'file_unresolve_comment_details' not set") - return self._value - - def get_device_change_ip_desktop_details(self): - """ - IP address associated with active desktop session changed. - - Only call this if :meth:`is_device_change_ip_desktop_details` is true. - - :rtype: DeviceChangeIpDesktopDetails - """ - if not self.is_device_change_ip_desktop_details(): - raise AttributeError("tag 'device_change_ip_desktop_details' not set") - return self._value - - def get_device_change_ip_mobile_details(self): - """ - IP address associated with active mobile session changed. - - Only call this if :meth:`is_device_change_ip_mobile_details` is true. - - :rtype: DeviceChangeIpMobileDetails - """ - if not self.is_device_change_ip_mobile_details(): - raise AttributeError("tag 'device_change_ip_mobile_details' not set") - return self._value - - def get_device_change_ip_web_details(self): - """ - IP address associated with active Web session changed. - - Only call this if :meth:`is_device_change_ip_web_details` is true. - - :rtype: DeviceChangeIpWebDetails - """ - if not self.is_device_change_ip_web_details(): - raise AttributeError("tag 'device_change_ip_web_details' not set") - return self._value - - def get_device_delete_on_unlink_fail_details(self): - """ - Failed to delete all files from an unlinked device. - - Only call this if :meth:`is_device_delete_on_unlink_fail_details` is true. - - :rtype: DeviceDeleteOnUnlinkFailDetails - """ - if not self.is_device_delete_on_unlink_fail_details(): - raise AttributeError("tag 'device_delete_on_unlink_fail_details' not set") - return self._value - - def get_device_delete_on_unlink_success_details(self): - """ - Deleted all files from an unlinked device. - - Only call this if :meth:`is_device_delete_on_unlink_success_details` is true. - - :rtype: DeviceDeleteOnUnlinkSuccessDetails - """ - if not self.is_device_delete_on_unlink_success_details(): - raise AttributeError("tag 'device_delete_on_unlink_success_details' not set") - return self._value - - def get_device_link_fail_details(self): - """ - Failed to link a device. - - Only call this if :meth:`is_device_link_fail_details` is true. - - :rtype: DeviceLinkFailDetails - """ - if not self.is_device_link_fail_details(): - raise AttributeError("tag 'device_link_fail_details' not set") - return self._value - - def get_device_link_success_details(self): - """ - Linked a device. - - Only call this if :meth:`is_device_link_success_details` is true. - - :rtype: DeviceLinkSuccessDetails - """ - if not self.is_device_link_success_details(): - raise AttributeError("tag 'device_link_success_details' not set") - return self._value - - def get_device_management_disabled_details(self): - """ - Disable Device Management. - - Only call this if :meth:`is_device_management_disabled_details` is true. - - :rtype: DeviceManagementDisabledDetails - """ - if not self.is_device_management_disabled_details(): - raise AttributeError("tag 'device_management_disabled_details' not set") - return self._value - - def get_device_management_enabled_details(self): - """ - Enable Device Management. - - Only call this if :meth:`is_device_management_enabled_details` is true. - - :rtype: DeviceManagementEnabledDetails - """ - if not self.is_device_management_enabled_details(): - raise AttributeError("tag 'device_management_enabled_details' not set") - return self._value - - def get_device_unlink_details(self): - """ - Disconnected a device. - - Only call this if :meth:`is_device_unlink_details` is true. - - :rtype: DeviceUnlinkDetails - """ - if not self.is_device_unlink_details(): - raise AttributeError("tag 'device_unlink_details' not set") - return self._value - - def get_emm_refresh_auth_token_details(self): - """ - Refreshed the auth token used for setting up enterprise mobility - management. - - Only call this if :meth:`is_emm_refresh_auth_token_details` is true. - - :rtype: EmmRefreshAuthTokenDetails - """ - if not self.is_emm_refresh_auth_token_details(): - raise AttributeError("tag 'emm_refresh_auth_token_details' not set") - return self._value - - def get_account_capture_change_availability_details(self): - """ - Granted or revoked the option to enable account capture on domains - belonging to the team. - - Only call this if :meth:`is_account_capture_change_availability_details` is true. - - :rtype: AccountCaptureChangeAvailabilityDetails - """ - if not self.is_account_capture_change_availability_details(): - raise AttributeError("tag 'account_capture_change_availability_details' not set") - return self._value - - def get_account_capture_migrate_account_details(self): - """ - Account captured user migrated their account to the team. - - Only call this if :meth:`is_account_capture_migrate_account_details` is true. - - :rtype: AccountCaptureMigrateAccountDetails - """ - if not self.is_account_capture_migrate_account_details(): - raise AttributeError("tag 'account_capture_migrate_account_details' not set") - return self._value - - def get_account_capture_relinquish_account_details(self): - """ - Account captured user relinquished their account by changing the email - address associated with it. - - Only call this if :meth:`is_account_capture_relinquish_account_details` is true. - - :rtype: AccountCaptureRelinquishAccountDetails - """ - if not self.is_account_capture_relinquish_account_details(): - raise AttributeError("tag 'account_capture_relinquish_account_details' not set") - return self._value - - def get_disabled_domain_invites_details(self): - """ - Disabled domain invites. - - Only call this if :meth:`is_disabled_domain_invites_details` is true. - - :rtype: DisabledDomainInvitesDetails - """ - if not self.is_disabled_domain_invites_details(): - raise AttributeError("tag 'disabled_domain_invites_details' not set") - return self._value - - def get_domain_invites_approve_request_to_join_team_details(self): - """ - Approved a member's request to join the team. - - Only call this if :meth:`is_domain_invites_approve_request_to_join_team_details` is true. - - :rtype: DomainInvitesApproveRequestToJoinTeamDetails - """ - if not self.is_domain_invites_approve_request_to_join_team_details(): - raise AttributeError("tag 'domain_invites_approve_request_to_join_team_details' not set") - return self._value - - def get_domain_invites_decline_request_to_join_team_details(self): - """ - Declined a user's request to join the team. - - Only call this if :meth:`is_domain_invites_decline_request_to_join_team_details` is true. - - :rtype: DomainInvitesDeclineRequestToJoinTeamDetails - """ - if not self.is_domain_invites_decline_request_to_join_team_details(): - raise AttributeError("tag 'domain_invites_decline_request_to_join_team_details' not set") - return self._value - - def get_domain_invites_email_existing_users_details(self): - """ - Sent domain invites to existing domain accounts. - - Only call this if :meth:`is_domain_invites_email_existing_users_details` is true. - - :rtype: DomainInvitesEmailExistingUsersDetails - """ - if not self.is_domain_invites_email_existing_users_details(): - raise AttributeError("tag 'domain_invites_email_existing_users_details' not set") - return self._value - - def get_domain_invites_request_to_join_team_details(self): - """ - Asked to join the team. - - Only call this if :meth:`is_domain_invites_request_to_join_team_details` is true. - - :rtype: DomainInvitesRequestToJoinTeamDetails - """ - if not self.is_domain_invites_request_to_join_team_details(): - raise AttributeError("tag 'domain_invites_request_to_join_team_details' not set") - return self._value - - def get_domain_invites_set_invite_new_user_pref_to_no_details(self): - """ - Turned off u201cAutomatically invite new usersu201d. - - Only call this if :meth:`is_domain_invites_set_invite_new_user_pref_to_no_details` is true. - - :rtype: DomainInvitesSetInviteNewUserPrefToNoDetails - """ - if not self.is_domain_invites_set_invite_new_user_pref_to_no_details(): - raise AttributeError("tag 'domain_invites_set_invite_new_user_pref_to_no_details' not set") - return self._value - - def get_domain_invites_set_invite_new_user_pref_to_yes_details(self): - """ - Turned on u201cAutomatically invite new usersu201d. - - Only call this if :meth:`is_domain_invites_set_invite_new_user_pref_to_yes_details` is true. - - :rtype: DomainInvitesSetInviteNewUserPrefToYesDetails - """ - if not self.is_domain_invites_set_invite_new_user_pref_to_yes_details(): - raise AttributeError("tag 'domain_invites_set_invite_new_user_pref_to_yes_details' not set") - return self._value - - def get_domain_verification_add_domain_fail_details(self): - """ - Failed to verify a domain belonging to the team. - - Only call this if :meth:`is_domain_verification_add_domain_fail_details` is true. - - :rtype: DomainVerificationAddDomainFailDetails - """ - if not self.is_domain_verification_add_domain_fail_details(): - raise AttributeError("tag 'domain_verification_add_domain_fail_details' not set") - return self._value - - def get_domain_verification_add_domain_success_details(self): - """ - Verified a domain belonging to the team. - - Only call this if :meth:`is_domain_verification_add_domain_success_details` is true. - - :rtype: DomainVerificationAddDomainSuccessDetails - """ - if not self.is_domain_verification_add_domain_success_details(): - raise AttributeError("tag 'domain_verification_add_domain_success_details' not set") - return self._value - - def get_domain_verification_remove_domain_details(self): - """ - Removed a domain from the list of verified domains belonging to the - team. - - Only call this if :meth:`is_domain_verification_remove_domain_details` is true. - - :rtype: DomainVerificationRemoveDomainDetails - """ - if not self.is_domain_verification_remove_domain_details(): - raise AttributeError("tag 'domain_verification_remove_domain_details' not set") - return self._value - - def get_enabled_domain_invites_details(self): - """ - Enabled domain invites. - - Only call this if :meth:`is_enabled_domain_invites_details` is true. - - :rtype: EnabledDomainInvitesDetails - """ - if not self.is_enabled_domain_invites_details(): - raise AttributeError("tag 'enabled_domain_invites_details' not set") - return self._value - - def get_create_folder_details(self): - """ - Created folders. - - Only call this if :meth:`is_create_folder_details` is true. - - :rtype: CreateFolderDetails - """ - if not self.is_create_folder_details(): - raise AttributeError("tag 'create_folder_details' not set") - return self._value - - def get_file_add_details(self): - """ - Added files and/or folders. - - Only call this if :meth:`is_file_add_details` is true. - - :rtype: FileAddDetails - """ - if not self.is_file_add_details(): - raise AttributeError("tag 'file_add_details' not set") - return self._value - - def get_file_copy_details(self): - """ - Copied files and/or folders. - - Only call this if :meth:`is_file_copy_details` is true. - - :rtype: FileCopyDetails - """ - if not self.is_file_copy_details(): - raise AttributeError("tag 'file_copy_details' not set") - return self._value - - def get_file_delete_details(self): - """ - Deleted files and/or folders. - - Only call this if :meth:`is_file_delete_details` is true. - - :rtype: FileDeleteDetails - """ - if not self.is_file_delete_details(): - raise AttributeError("tag 'file_delete_details' not set") - return self._value - - def get_file_download_details(self): - """ - Downloaded files and/or folders. - - Only call this if :meth:`is_file_download_details` is true. - - :rtype: FileDownloadDetails - """ - if not self.is_file_download_details(): - raise AttributeError("tag 'file_download_details' not set") - return self._value - - def get_file_edit_details(self): - """ - Edited files. - - Only call this if :meth:`is_file_edit_details` is true. - - :rtype: FileEditDetails - """ - if not self.is_file_edit_details(): - raise AttributeError("tag 'file_edit_details' not set") - return self._value - - def get_file_get_copy_reference_details(self): - """ - Create a copy reference to a file or folder. - - Only call this if :meth:`is_file_get_copy_reference_details` is true. - - :rtype: FileGetCopyReferenceDetails - """ - if not self.is_file_get_copy_reference_details(): - raise AttributeError("tag 'file_get_copy_reference_details' not set") - return self._value - - def get_file_move_details(self): - """ - Moved files and/or folders. - - Only call this if :meth:`is_file_move_details` is true. - - :rtype: FileMoveDetails - """ - if not self.is_file_move_details(): - raise AttributeError("tag 'file_move_details' not set") - return self._value - - def get_file_permanently_delete_details(self): - """ - Permanently deleted files and/or folders. - - Only call this if :meth:`is_file_permanently_delete_details` is true. - - :rtype: FilePermanentlyDeleteDetails - """ - if not self.is_file_permanently_delete_details(): - raise AttributeError("tag 'file_permanently_delete_details' not set") - return self._value - - def get_file_preview_details(self): - """ - Previewed files and/or folders. - - Only call this if :meth:`is_file_preview_details` is true. - - :rtype: FilePreviewDetails - """ - if not self.is_file_preview_details(): - raise AttributeError("tag 'file_preview_details' not set") - return self._value - - def get_file_rename_details(self): - """ - Renamed files and/or folders. - - Only call this if :meth:`is_file_rename_details` is true. - - :rtype: FileRenameDetails - """ - if not self.is_file_rename_details(): - raise AttributeError("tag 'file_rename_details' not set") - return self._value - - def get_file_restore_details(self): - """ - Restored deleted files and/or folders. - - Only call this if :meth:`is_file_restore_details` is true. - - :rtype: FileRestoreDetails - """ - if not self.is_file_restore_details(): - raise AttributeError("tag 'file_restore_details' not set") - return self._value - - def get_file_revert_details(self): - """ - Reverted files to a previous version. - - Only call this if :meth:`is_file_revert_details` is true. - - :rtype: FileRevertDetails - """ - if not self.is_file_revert_details(): - raise AttributeError("tag 'file_revert_details' not set") - return self._value - - def get_file_rollback_changes_details(self): - """ - Rolled back file change location changes. - - Only call this if :meth:`is_file_rollback_changes_details` is true. - - :rtype: FileRollbackChangesDetails - """ - if not self.is_file_rollback_changes_details(): - raise AttributeError("tag 'file_rollback_changes_details' not set") - return self._value - - def get_file_save_copy_reference_details(self): - """ - Save a file or folder using a copy reference. - - Only call this if :meth:`is_file_save_copy_reference_details` is true. - - :rtype: FileSaveCopyReferenceDetails - """ - if not self.is_file_save_copy_reference_details(): - raise AttributeError("tag 'file_save_copy_reference_details' not set") - return self._value - - def get_file_request_add_deadline_details(self): - """ - Added a deadline to a file request. - - Only call this if :meth:`is_file_request_add_deadline_details` is true. - - :rtype: FileRequestAddDeadlineDetails - """ - if not self.is_file_request_add_deadline_details(): - raise AttributeError("tag 'file_request_add_deadline_details' not set") - return self._value - - def get_file_request_change_folder_details(self): - """ - Changed the file request folder. - - Only call this if :meth:`is_file_request_change_folder_details` is true. - - :rtype: FileRequestChangeFolderDetails - """ - if not self.is_file_request_change_folder_details(): - raise AttributeError("tag 'file_request_change_folder_details' not set") - return self._value - - def get_file_request_change_title_details(self): - """ - Change the file request title. - - Only call this if :meth:`is_file_request_change_title_details` is true. - - :rtype: FileRequestChangeTitleDetails - """ - if not self.is_file_request_change_title_details(): - raise AttributeError("tag 'file_request_change_title_details' not set") - return self._value - - def get_file_request_close_details(self): - """ - Closed a file request. - - Only call this if :meth:`is_file_request_close_details` is true. - - :rtype: FileRequestCloseDetails - """ - if not self.is_file_request_close_details(): - raise AttributeError("tag 'file_request_close_details' not set") - return self._value - - def get_file_request_create_details(self): - """ - Created a file request. - - Only call this if :meth:`is_file_request_create_details` is true. - - :rtype: FileRequestCreateDetails - """ - if not self.is_file_request_create_details(): - raise AttributeError("tag 'file_request_create_details' not set") - return self._value - - def get_file_request_receive_file_details(self): - """ - Received files for a file request. - - Only call this if :meth:`is_file_request_receive_file_details` is true. - - :rtype: FileRequestReceiveFileDetails - """ - if not self.is_file_request_receive_file_details(): - raise AttributeError("tag 'file_request_receive_file_details' not set") - return self._value - - def get_file_request_remove_deadline_details(self): - """ - Removed the file request deadline. - - Only call this if :meth:`is_file_request_remove_deadline_details` is true. - - :rtype: FileRequestRemoveDeadlineDetails - """ - if not self.is_file_request_remove_deadline_details(): - raise AttributeError("tag 'file_request_remove_deadline_details' not set") - return self._value - - def get_file_request_send_details(self): - """ - Sent file request to users via email. - - Only call this if :meth:`is_file_request_send_details` is true. - - :rtype: FileRequestSendDetails - """ - if not self.is_file_request_send_details(): - raise AttributeError("tag 'file_request_send_details' not set") - return self._value - - def get_group_add_external_id_details(self): - """ - Added an external ID for group. - - Only call this if :meth:`is_group_add_external_id_details` is true. - - :rtype: GroupAddExternalIdDetails - """ - if not self.is_group_add_external_id_details(): - raise AttributeError("tag 'group_add_external_id_details' not set") - return self._value - - def get_group_add_member_details(self): - """ - Added team members to a group. - - Only call this if :meth:`is_group_add_member_details` is true. - - :rtype: GroupAddMemberDetails - """ - if not self.is_group_add_member_details(): - raise AttributeError("tag 'group_add_member_details' not set") - return self._value - - def get_group_change_external_id_details(self): - """ - Changed the external ID for group. - - Only call this if :meth:`is_group_change_external_id_details` is true. - - :rtype: GroupChangeExternalIdDetails - """ - if not self.is_group_change_external_id_details(): - raise AttributeError("tag 'group_change_external_id_details' not set") - return self._value - - def get_group_change_management_type_details(self): - """ - Changed group management type. - - Only call this if :meth:`is_group_change_management_type_details` is true. - - :rtype: GroupChangeManagementTypeDetails - """ - if not self.is_group_change_management_type_details(): - raise AttributeError("tag 'group_change_management_type_details' not set") - return self._value - - def get_group_change_member_role_details(self): - """ - Changed the manager permissions belonging to a group member. - - Only call this if :meth:`is_group_change_member_role_details` is true. - - :rtype: GroupChangeMemberRoleDetails - """ - if not self.is_group_change_member_role_details(): - raise AttributeError("tag 'group_change_member_role_details' not set") - return self._value - - def get_group_create_details(self): - """ - Created a group. - - Only call this if :meth:`is_group_create_details` is true. - - :rtype: GroupCreateDetails - """ - if not self.is_group_create_details(): - raise AttributeError("tag 'group_create_details' not set") - return self._value - - def get_group_delete_details(self): - """ - Deleted a group. - - Only call this if :meth:`is_group_delete_details` is true. - - :rtype: GroupDeleteDetails - """ - if not self.is_group_delete_details(): - raise AttributeError("tag 'group_delete_details' not set") - return self._value - - def get_group_moved_details(self): - """ - Moved a group. - - Only call this if :meth:`is_group_moved_details` is true. - - :rtype: GroupMovedDetails - """ - if not self.is_group_moved_details(): - raise AttributeError("tag 'group_moved_details' not set") - return self._value - - def get_group_remove_external_id_details(self): - """ - Removed the external ID for group. - - Only call this if :meth:`is_group_remove_external_id_details` is true. - - :rtype: GroupRemoveExternalIdDetails - """ - if not self.is_group_remove_external_id_details(): - raise AttributeError("tag 'group_remove_external_id_details' not set") - return self._value - - def get_group_remove_member_details(self): - """ - Removed team members from a group. - - Only call this if :meth:`is_group_remove_member_details` is true. - - :rtype: GroupRemoveMemberDetails - """ - if not self.is_group_remove_member_details(): - raise AttributeError("tag 'group_remove_member_details' not set") - return self._value - - def get_group_rename_details(self): - """ - Renamed a group. - - Only call this if :meth:`is_group_rename_details` is true. - - :rtype: GroupRenameDetails - """ - if not self.is_group_rename_details(): - raise AttributeError("tag 'group_rename_details' not set") - return self._value - - def get_emm_login_success_details(self): - """ - Signed in using the Dropbox EMM app. - - Only call this if :meth:`is_emm_login_success_details` is true. - - :rtype: EmmLoginSuccessDetails - """ - if not self.is_emm_login_success_details(): - raise AttributeError("tag 'emm_login_success_details' not set") - return self._value - - def get_logout_details(self): - """ - Signed out. - - Only call this if :meth:`is_logout_details` is true. - - :rtype: LogoutDetails - """ - if not self.is_logout_details(): - raise AttributeError("tag 'logout_details' not set") - return self._value - - def get_password_login_fail_details(self): - """ - Failed to sign in using a password. - - Only call this if :meth:`is_password_login_fail_details` is true. - - :rtype: PasswordLoginFailDetails - """ - if not self.is_password_login_fail_details(): - raise AttributeError("tag 'password_login_fail_details' not set") - return self._value - - def get_password_login_success_details(self): - """ - Signed in using a password. - - Only call this if :meth:`is_password_login_success_details` is true. - - :rtype: PasswordLoginSuccessDetails - """ - if not self.is_password_login_success_details(): - raise AttributeError("tag 'password_login_success_details' not set") - return self._value - - def get_reseller_support_session_end_details(self): - """ - Ended reseller support session. - - Only call this if :meth:`is_reseller_support_session_end_details` is true. - - :rtype: ResellerSupportSessionEndDetails - """ - if not self.is_reseller_support_session_end_details(): - raise AttributeError("tag 'reseller_support_session_end_details' not set") - return self._value - - def get_reseller_support_session_start_details(self): - """ - Started reseller support session. - - Only call this if :meth:`is_reseller_support_session_start_details` is true. - - :rtype: ResellerSupportSessionStartDetails - """ - if not self.is_reseller_support_session_start_details(): - raise AttributeError("tag 'reseller_support_session_start_details' not set") - return self._value - - def get_sign_in_as_session_end_details(self): - """ - Ended admin sign-in-as session. - - Only call this if :meth:`is_sign_in_as_session_end_details` is true. - - :rtype: SignInAsSessionEndDetails - """ - if not self.is_sign_in_as_session_end_details(): - raise AttributeError("tag 'sign_in_as_session_end_details' not set") - return self._value - - def get_sign_in_as_session_start_details(self): - """ - Started admin sign-in-as session. - - Only call this if :meth:`is_sign_in_as_session_start_details` is true. - - :rtype: SignInAsSessionStartDetails - """ - if not self.is_sign_in_as_session_start_details(): - raise AttributeError("tag 'sign_in_as_session_start_details' not set") - return self._value - - def get_sso_login_fail_details(self): - """ - Failed to sign in using SSO. - - Only call this if :meth:`is_sso_login_fail_details` is true. - - :rtype: SsoLoginFailDetails - """ - if not self.is_sso_login_fail_details(): - raise AttributeError("tag 'sso_login_fail_details' not set") - return self._value - - def get_member_add_name_details(self): - """ - Set team member name when joining team. - - Only call this if :meth:`is_member_add_name_details` is true. - - :rtype: MemberAddNameDetails - """ - if not self.is_member_add_name_details(): - raise AttributeError("tag 'member_add_name_details' not set") - return self._value - - def get_member_change_admin_role_details(self): - """ - Change the admin role belonging to team member. - - Only call this if :meth:`is_member_change_admin_role_details` is true. - - :rtype: MemberChangeAdminRoleDetails - """ - if not self.is_member_change_admin_role_details(): - raise AttributeError("tag 'member_change_admin_role_details' not set") - return self._value - - def get_member_change_email_details(self): - """ - Changed team member email address. - - Only call this if :meth:`is_member_change_email_details` is true. - - :rtype: MemberChangeEmailDetails - """ - if not self.is_member_change_email_details(): - raise AttributeError("tag 'member_change_email_details' not set") - return self._value - - def get_member_change_name_details(self): - """ - Changed team member name. - - Only call this if :meth:`is_member_change_name_details` is true. - - :rtype: MemberChangeNameDetails - """ - if not self.is_member_change_name_details(): - raise AttributeError("tag 'member_change_name_details' not set") - return self._value - - def get_member_change_status_details(self): - """ - Changed the membership status of a team member. - - Only call this if :meth:`is_member_change_status_details` is true. - - :rtype: MemberChangeStatusDetails - """ - if not self.is_member_change_status_details(): - raise AttributeError("tag 'member_change_status_details' not set") - return self._value - - def get_member_suggest_details(self): - """ - Suggested a new team member to be added to the team. - - Only call this if :meth:`is_member_suggest_details` is true. - - :rtype: MemberSuggestDetails - """ - if not self.is_member_suggest_details(): - raise AttributeError("tag 'member_suggest_details' not set") - return self._value - - def get_paper_content_add_member_details(self): - """ - Added users to the membership of a Paper doc or folder. - - Only call this if :meth:`is_paper_content_add_member_details` is true. - - :rtype: PaperContentAddMemberDetails - """ - if not self.is_paper_content_add_member_details(): - raise AttributeError("tag 'paper_content_add_member_details' not set") - return self._value - - def get_paper_content_add_to_folder_details(self): - """ - Added Paper doc or folder to a folder. - - Only call this if :meth:`is_paper_content_add_to_folder_details` is true. - - :rtype: PaperContentAddToFolderDetails - """ - if not self.is_paper_content_add_to_folder_details(): - raise AttributeError("tag 'paper_content_add_to_folder_details' not set") - return self._value - - def get_paper_content_archive_details(self): - """ - Archived Paper doc or folder. - - Only call this if :meth:`is_paper_content_archive_details` is true. - - :rtype: PaperContentArchiveDetails - """ - if not self.is_paper_content_archive_details(): - raise AttributeError("tag 'paper_content_archive_details' not set") - return self._value - - def get_paper_content_create_details(self): - """ - Created a Paper doc or folder. - - Only call this if :meth:`is_paper_content_create_details` is true. - - :rtype: PaperContentCreateDetails - """ - if not self.is_paper_content_create_details(): - raise AttributeError("tag 'paper_content_create_details' not set") - return self._value - - def get_paper_content_permanently_delete_details(self): - """ - Permanently deleted a Paper doc or folder. - - Only call this if :meth:`is_paper_content_permanently_delete_details` is true. - - :rtype: PaperContentPermanentlyDeleteDetails - """ - if not self.is_paper_content_permanently_delete_details(): - raise AttributeError("tag 'paper_content_permanently_delete_details' not set") - return self._value - - def get_paper_content_remove_from_folder_details(self): - """ - Removed Paper doc or folder from a folder. - - Only call this if :meth:`is_paper_content_remove_from_folder_details` is true. - - :rtype: PaperContentRemoveFromFolderDetails - """ - if not self.is_paper_content_remove_from_folder_details(): - raise AttributeError("tag 'paper_content_remove_from_folder_details' not set") - return self._value - - def get_paper_content_remove_member_details(self): - """ - Removed a user from the membership of a Paper doc or folder. - - Only call this if :meth:`is_paper_content_remove_member_details` is true. - - :rtype: PaperContentRemoveMemberDetails - """ - if not self.is_paper_content_remove_member_details(): - raise AttributeError("tag 'paper_content_remove_member_details' not set") - return self._value - - def get_paper_content_rename_details(self): - """ - Renamed Paper doc or folder. - - Only call this if :meth:`is_paper_content_rename_details` is true. - - :rtype: PaperContentRenameDetails - """ - if not self.is_paper_content_rename_details(): - raise AttributeError("tag 'paper_content_rename_details' not set") - return self._value - - def get_paper_content_restore_details(self): - """ - Restored an archived Paper doc or folder. - - Only call this if :meth:`is_paper_content_restore_details` is true. - - :rtype: PaperContentRestoreDetails - """ - if not self.is_paper_content_restore_details(): - raise AttributeError("tag 'paper_content_restore_details' not set") - return self._value - - def get_paper_doc_add_comment_details(self): - """ - Added a Paper doc comment. - - Only call this if :meth:`is_paper_doc_add_comment_details` is true. - - :rtype: PaperDocAddCommentDetails - """ - if not self.is_paper_doc_add_comment_details(): - raise AttributeError("tag 'paper_doc_add_comment_details' not set") - return self._value - - def get_paper_doc_change_member_role_details(self): - """ - Changed the access type of a Paper doc member. - - Only call this if :meth:`is_paper_doc_change_member_role_details` is true. - - :rtype: PaperDocChangeMemberRoleDetails - """ - if not self.is_paper_doc_change_member_role_details(): - raise AttributeError("tag 'paper_doc_change_member_role_details' not set") - return self._value - - def get_paper_doc_change_sharing_policy_details(self): - """ - Changed the sharing policy for Paper doc. - - Only call this if :meth:`is_paper_doc_change_sharing_policy_details` is true. - - :rtype: PaperDocChangeSharingPolicyDetails - """ - if not self.is_paper_doc_change_sharing_policy_details(): - raise AttributeError("tag 'paper_doc_change_sharing_policy_details' not set") - return self._value - - def get_paper_doc_change_subscription_details(self): - """ - Followed or unfollowed a Paper doc. - - Only call this if :meth:`is_paper_doc_change_subscription_details` is true. - - :rtype: PaperDocChangeSubscriptionDetails - """ - if not self.is_paper_doc_change_subscription_details(): - raise AttributeError("tag 'paper_doc_change_subscription_details' not set") - return self._value - - def get_paper_doc_deleted_details(self): - """ - Paper doc archived. - - Only call this if :meth:`is_paper_doc_deleted_details` is true. - - :rtype: PaperDocDeletedDetails - """ - if not self.is_paper_doc_deleted_details(): - raise AttributeError("tag 'paper_doc_deleted_details' not set") - return self._value - - def get_paper_doc_delete_comment_details(self): - """ - Deleted a Paper doc comment. - - Only call this if :meth:`is_paper_doc_delete_comment_details` is true. - - :rtype: PaperDocDeleteCommentDetails - """ - if not self.is_paper_doc_delete_comment_details(): - raise AttributeError("tag 'paper_doc_delete_comment_details' not set") - return self._value - - def get_paper_doc_download_details(self): - """ - Downloaded a Paper doc in a particular output format. - - Only call this if :meth:`is_paper_doc_download_details` is true. - - :rtype: PaperDocDownloadDetails - """ - if not self.is_paper_doc_download_details(): - raise AttributeError("tag 'paper_doc_download_details' not set") - return self._value - - def get_paper_doc_edit_details(self): - """ - Edited a Paper doc. - - Only call this if :meth:`is_paper_doc_edit_details` is true. - - :rtype: PaperDocEditDetails - """ - if not self.is_paper_doc_edit_details(): - raise AttributeError("tag 'paper_doc_edit_details' not set") - return self._value - - def get_paper_doc_edit_comment_details(self): - """ - Edited a Paper doc comment. - - Only call this if :meth:`is_paper_doc_edit_comment_details` is true. - - :rtype: PaperDocEditCommentDetails - """ - if not self.is_paper_doc_edit_comment_details(): - raise AttributeError("tag 'paper_doc_edit_comment_details' not set") - return self._value - - def get_paper_doc_followed_details(self): - """ - Followed a Paper doc. - - Only call this if :meth:`is_paper_doc_followed_details` is true. - - :rtype: PaperDocFollowedDetails - """ - if not self.is_paper_doc_followed_details(): - raise AttributeError("tag 'paper_doc_followed_details' not set") - return self._value - - def get_paper_doc_mention_details(self): - """ - Mentioned a member in a Paper doc. - - Only call this if :meth:`is_paper_doc_mention_details` is true. - - :rtype: PaperDocMentionDetails - """ - if not self.is_paper_doc_mention_details(): - raise AttributeError("tag 'paper_doc_mention_details' not set") - return self._value - - def get_paper_doc_request_access_details(self): - """ - Requested to be a member on a Paper doc. - - Only call this if :meth:`is_paper_doc_request_access_details` is true. - - :rtype: PaperDocRequestAccessDetails - """ - if not self.is_paper_doc_request_access_details(): - raise AttributeError("tag 'paper_doc_request_access_details' not set") - return self._value - - def get_paper_doc_resolve_comment_details(self): - """ - Paper doc comment resolved. - - Only call this if :meth:`is_paper_doc_resolve_comment_details` is true. - - :rtype: PaperDocResolveCommentDetails - """ - if not self.is_paper_doc_resolve_comment_details(): - raise AttributeError("tag 'paper_doc_resolve_comment_details' not set") - return self._value - - def get_paper_doc_revert_details(self): - """ - Restored a Paper doc to previous revision. - - Only call this if :meth:`is_paper_doc_revert_details` is true. - - :rtype: PaperDocRevertDetails - """ - if not self.is_paper_doc_revert_details(): - raise AttributeError("tag 'paper_doc_revert_details' not set") - return self._value - - def get_paper_doc_slack_share_details(self): - """ - Paper doc link shared via slack. - - Only call this if :meth:`is_paper_doc_slack_share_details` is true. - - :rtype: PaperDocSlackShareDetails - """ - if not self.is_paper_doc_slack_share_details(): - raise AttributeError("tag 'paper_doc_slack_share_details' not set") - return self._value - - def get_paper_doc_team_invite_details(self): - """ - Paper doc shared with team member. - - Only call this if :meth:`is_paper_doc_team_invite_details` is true. - - :rtype: PaperDocTeamInviteDetails - """ - if not self.is_paper_doc_team_invite_details(): - raise AttributeError("tag 'paper_doc_team_invite_details' not set") - return self._value - - def get_paper_doc_trashed_details(self): - """ - Paper doc trashed. - - Only call this if :meth:`is_paper_doc_trashed_details` is true. - - :rtype: PaperDocTrashedDetails - """ - if not self.is_paper_doc_trashed_details(): - raise AttributeError("tag 'paper_doc_trashed_details' not set") - return self._value - - def get_paper_doc_unresolve_comment_details(self): - """ - Unresolved a Paper doc comment. - - Only call this if :meth:`is_paper_doc_unresolve_comment_details` is true. - - :rtype: PaperDocUnresolveCommentDetails - """ - if not self.is_paper_doc_unresolve_comment_details(): - raise AttributeError("tag 'paper_doc_unresolve_comment_details' not set") - return self._value - - def get_paper_doc_untrashed_details(self): - """ - Paper doc untrashed. - - Only call this if :meth:`is_paper_doc_untrashed_details` is true. - - :rtype: PaperDocUntrashedDetails - """ - if not self.is_paper_doc_untrashed_details(): - raise AttributeError("tag 'paper_doc_untrashed_details' not set") - return self._value - - def get_paper_doc_view_details(self): - """ - Viewed Paper doc. - - Only call this if :meth:`is_paper_doc_view_details` is true. - - :rtype: PaperDocViewDetails - """ - if not self.is_paper_doc_view_details(): - raise AttributeError("tag 'paper_doc_view_details' not set") - return self._value - - def get_paper_folder_change_subscription_details(self): - """ - Followed or unfollowed a Paper folder. - - Only call this if :meth:`is_paper_folder_change_subscription_details` is true. - - :rtype: PaperFolderChangeSubscriptionDetails - """ - if not self.is_paper_folder_change_subscription_details(): - raise AttributeError("tag 'paper_folder_change_subscription_details' not set") - return self._value - - def get_paper_folder_deleted_details(self): - """ - Paper folder archived. - - Only call this if :meth:`is_paper_folder_deleted_details` is true. - - :rtype: PaperFolderDeletedDetails - """ - if not self.is_paper_folder_deleted_details(): - raise AttributeError("tag 'paper_folder_deleted_details' not set") - return self._value - - def get_paper_folder_followed_details(self): - """ - Followed a Paper folder. - - Only call this if :meth:`is_paper_folder_followed_details` is true. - - :rtype: PaperFolderFollowedDetails - """ - if not self.is_paper_folder_followed_details(): - raise AttributeError("tag 'paper_folder_followed_details' not set") - return self._value - - def get_paper_folder_team_invite_details(self): - """ - Paper folder shared with team member. - - Only call this if :meth:`is_paper_folder_team_invite_details` is true. - - :rtype: PaperFolderTeamInviteDetails - """ - if not self.is_paper_folder_team_invite_details(): - raise AttributeError("tag 'paper_folder_team_invite_details' not set") - return self._value - - def get_password_change_details(self): - """ - Changed password. - - Only call this if :meth:`is_password_change_details` is true. - - :rtype: PasswordChangeDetails - """ - if not self.is_password_change_details(): - raise AttributeError("tag 'password_change_details' not set") - return self._value - - def get_password_reset_details(self): - """ - Reset password. - - Only call this if :meth:`is_password_reset_details` is true. - - :rtype: PasswordResetDetails - """ - if not self.is_password_reset_details(): - raise AttributeError("tag 'password_reset_details' not set") - return self._value - - def get_password_reset_all_details(self): - """ - Reset all team member passwords. - - Only call this if :meth:`is_password_reset_all_details` is true. - - :rtype: PasswordResetAllDetails - """ - if not self.is_password_reset_all_details(): - raise AttributeError("tag 'password_reset_all_details' not set") - return self._value - - def get_emm_create_exceptions_report_details(self): - """ - EMM excluded users report created. - - Only call this if :meth:`is_emm_create_exceptions_report_details` is true. - - :rtype: EmmCreateExceptionsReportDetails - """ - if not self.is_emm_create_exceptions_report_details(): - raise AttributeError("tag 'emm_create_exceptions_report_details' not set") - return self._value - - def get_emm_create_usage_report_details(self): - """ - EMM mobile app usage report created. - - Only call this if :meth:`is_emm_create_usage_report_details` is true. - - :rtype: EmmCreateUsageReportDetails - """ - if not self.is_emm_create_usage_report_details(): - raise AttributeError("tag 'emm_create_usage_report_details' not set") - return self._value - - def get_smart_sync_create_admin_privilege_report_details(self): - """ - Smart Sync non-admin devices report created. - - Only call this if :meth:`is_smart_sync_create_admin_privilege_report_details` is true. - - :rtype: SmartSyncCreateAdminPrivilegeReportDetails - """ - if not self.is_smart_sync_create_admin_privilege_report_details(): - raise AttributeError("tag 'smart_sync_create_admin_privilege_report_details' not set") - return self._value - - def get_team_activity_create_report_details(self): - """ - Created a team activity report. - - Only call this if :meth:`is_team_activity_create_report_details` is true. - - :rtype: TeamActivityCreateReportDetails - """ - if not self.is_team_activity_create_report_details(): - raise AttributeError("tag 'team_activity_create_report_details' not set") - return self._value - - def get_collection_share_details(self): - """ - Shared an album. - - Only call this if :meth:`is_collection_share_details` is true. - - :rtype: CollectionShareDetails - """ - if not self.is_collection_share_details(): - raise AttributeError("tag 'collection_share_details' not set") - return self._value - - def get_note_acl_invite_only_details(self): - """ - Changed a Paper document to be invite-only. - - Only call this if :meth:`is_note_acl_invite_only_details` is true. - - :rtype: NoteAclInviteOnlyDetails - """ - if not self.is_note_acl_invite_only_details(): - raise AttributeError("tag 'note_acl_invite_only_details' not set") - return self._value - - def get_note_acl_link_details(self): - """ - Changed a Paper document to be link accessible. - - Only call this if :meth:`is_note_acl_link_details` is true. - - :rtype: NoteAclLinkDetails - """ - if not self.is_note_acl_link_details(): - raise AttributeError("tag 'note_acl_link_details' not set") - return self._value - - def get_note_acl_team_link_details(self): - """ - Changed a Paper document to be link accessible for the team. - - Only call this if :meth:`is_note_acl_team_link_details` is true. - - :rtype: NoteAclTeamLinkDetails - """ - if not self.is_note_acl_team_link_details(): - raise AttributeError("tag 'note_acl_team_link_details' not set") - return self._value - - def get_note_shared_details(self): - """ - Shared a Paper doc. - - Only call this if :meth:`is_note_shared_details` is true. - - :rtype: NoteSharedDetails - """ - if not self.is_note_shared_details(): - raise AttributeError("tag 'note_shared_details' not set") - return self._value - - def get_note_share_receive_details(self): - """ - Shared Paper document received. - - Only call this if :meth:`is_note_share_receive_details` is true. - - :rtype: NoteShareReceiveDetails - """ - if not self.is_note_share_receive_details(): - raise AttributeError("tag 'note_share_receive_details' not set") - return self._value - - def get_open_note_shared_details(self): - """ - Opened a shared Paper doc. - - Only call this if :meth:`is_open_note_shared_details` is true. - - :rtype: OpenNoteSharedDetails - """ - if not self.is_open_note_shared_details(): - raise AttributeError("tag 'open_note_shared_details' not set") - return self._value - - def get_sf_add_group_details(self): - """ - Added the team to a shared folder. - - Only call this if :meth:`is_sf_add_group_details` is true. - - :rtype: SfAddGroupDetails - """ - if not self.is_sf_add_group_details(): - raise AttributeError("tag 'sf_add_group_details' not set") - return self._value - - def get_sf_allow_non_members_to_view_shared_links_details(self): - """ - Allowed non collaborators to view links to files in a shared folder. - - Only call this if :meth:`is_sf_allow_non_members_to_view_shared_links_details` is true. - - :rtype: SfAllowNonMembersToViewSharedLinksDetails - """ - if not self.is_sf_allow_non_members_to_view_shared_links_details(): - raise AttributeError("tag 'sf_allow_non_members_to_view_shared_links_details' not set") - return self._value - - def get_sf_invite_group_details(self): - """ - Invited a group to a shared folder. - - Only call this if :meth:`is_sf_invite_group_details` is true. - - :rtype: SfInviteGroupDetails - """ - if not self.is_sf_invite_group_details(): - raise AttributeError("tag 'sf_invite_group_details' not set") - return self._value - - def get_sf_nest_details(self): - """ - Changed parent of shared folder. - - Only call this if :meth:`is_sf_nest_details` is true. - - :rtype: SfNestDetails - """ - if not self.is_sf_nest_details(): - raise AttributeError("tag 'sf_nest_details' not set") - return self._value - - def get_sf_team_decline_details(self): - """ - Declined a team member's invitation to a shared folder. - - Only call this if :meth:`is_sf_team_decline_details` is true. - - :rtype: SfTeamDeclineDetails - """ - if not self.is_sf_team_decline_details(): - raise AttributeError("tag 'sf_team_decline_details' not set") - return self._value - - def get_sf_team_grant_access_details(self): - """ - Granted access to a shared folder. - - Only call this if :meth:`is_sf_team_grant_access_details` is true. - - :rtype: SfTeamGrantAccessDetails - """ - if not self.is_sf_team_grant_access_details(): - raise AttributeError("tag 'sf_team_grant_access_details' not set") - return self._value - - def get_sf_team_invite_details(self): - """ - Invited team members to a shared folder. - - Only call this if :meth:`is_sf_team_invite_details` is true. - - :rtype: SfTeamInviteDetails - """ - if not self.is_sf_team_invite_details(): - raise AttributeError("tag 'sf_team_invite_details' not set") - return self._value - - def get_sf_team_invite_change_role_details(self): - """ - Changed a team member's role in a shared folder. - - Only call this if :meth:`is_sf_team_invite_change_role_details` is true. - - :rtype: SfTeamInviteChangeRoleDetails - """ - if not self.is_sf_team_invite_change_role_details(): - raise AttributeError("tag 'sf_team_invite_change_role_details' not set") - return self._value - - def get_sf_team_join_details(self): - """ - Joined a team member's shared folder. - - Only call this if :meth:`is_sf_team_join_details` is true. - - :rtype: SfTeamJoinDetails - """ - if not self.is_sf_team_join_details(): - raise AttributeError("tag 'sf_team_join_details' not set") - return self._value - - def get_sf_team_join_from_oob_link_details(self): - """ - Joined a team member's shared folder from a link. - - Only call this if :meth:`is_sf_team_join_from_oob_link_details` is true. - - :rtype: SfTeamJoinFromOobLinkDetails - """ - if not self.is_sf_team_join_from_oob_link_details(): - raise AttributeError("tag 'sf_team_join_from_oob_link_details' not set") - return self._value - - def get_sf_team_uninvite_details(self): - """ - Unshared a folder with a team member. - - Only call this if :meth:`is_sf_team_uninvite_details` is true. - - :rtype: SfTeamUninviteDetails - """ - if not self.is_sf_team_uninvite_details(): - raise AttributeError("tag 'sf_team_uninvite_details' not set") - return self._value - - def get_shared_content_add_invitees_details(self): - """ - Sent an email invitation to the membership of a shared file or folder. - - Only call this if :meth:`is_shared_content_add_invitees_details` is true. - - :rtype: SharedContentAddInviteesDetails - """ - if not self.is_shared_content_add_invitees_details(): - raise AttributeError("tag 'shared_content_add_invitees_details' not set") - return self._value - - def get_shared_content_add_link_expiry_details(self): - """ - Added an expiry to the link for the shared file or folder. - - Only call this if :meth:`is_shared_content_add_link_expiry_details` is true. - - :rtype: SharedContentAddLinkExpiryDetails - """ - if not self.is_shared_content_add_link_expiry_details(): - raise AttributeError("tag 'shared_content_add_link_expiry_details' not set") - return self._value - - def get_shared_content_add_link_password_details(self): - """ - Added a password to the link for the shared file or folder. - - Only call this if :meth:`is_shared_content_add_link_password_details` is true. - - :rtype: SharedContentAddLinkPasswordDetails - """ - if not self.is_shared_content_add_link_password_details(): - raise AttributeError("tag 'shared_content_add_link_password_details' not set") - return self._value - - def get_shared_content_add_member_details(self): - """ - Added users and/or groups to the membership of a shared file or folder. - - Only call this if :meth:`is_shared_content_add_member_details` is true. - - :rtype: SharedContentAddMemberDetails - """ - if not self.is_shared_content_add_member_details(): - raise AttributeError("tag 'shared_content_add_member_details' not set") - return self._value - - def get_shared_content_change_downloads_policy_details(self): - """ - Changed whether members can download the shared file or folder. - - Only call this if :meth:`is_shared_content_change_downloads_policy_details` is true. - - :rtype: SharedContentChangeDownloadsPolicyDetails - """ - if not self.is_shared_content_change_downloads_policy_details(): - raise AttributeError("tag 'shared_content_change_downloads_policy_details' not set") - return self._value - - def get_shared_content_change_invitee_role_details(self): - """ - Changed the access type of an invitee to a shared file or folder before - the invitation was claimed. - - Only call this if :meth:`is_shared_content_change_invitee_role_details` is true. - - :rtype: SharedContentChangeInviteeRoleDetails - """ - if not self.is_shared_content_change_invitee_role_details(): - raise AttributeError("tag 'shared_content_change_invitee_role_details' not set") - return self._value - - def get_shared_content_change_link_audience_details(self): - """ - Changed the audience of the link for a shared file or folder. - - Only call this if :meth:`is_shared_content_change_link_audience_details` is true. - - :rtype: SharedContentChangeLinkAudienceDetails - """ - if not self.is_shared_content_change_link_audience_details(): - raise AttributeError("tag 'shared_content_change_link_audience_details' not set") - return self._value - - def get_shared_content_change_link_expiry_details(self): - """ - Changed the expiry of the link for the shared file or folder. - - Only call this if :meth:`is_shared_content_change_link_expiry_details` is true. - - :rtype: SharedContentChangeLinkExpiryDetails - """ - if not self.is_shared_content_change_link_expiry_details(): - raise AttributeError("tag 'shared_content_change_link_expiry_details' not set") - return self._value - - def get_shared_content_change_link_password_details(self): - """ - Changed the password on the link for the shared file or folder. - - Only call this if :meth:`is_shared_content_change_link_password_details` is true. - - :rtype: SharedContentChangeLinkPasswordDetails - """ - if not self.is_shared_content_change_link_password_details(): - raise AttributeError("tag 'shared_content_change_link_password_details' not set") - return self._value - - def get_shared_content_change_member_role_details(self): - """ - Changed the access type of a shared file or folder member. - - Only call this if :meth:`is_shared_content_change_member_role_details` is true. - - :rtype: SharedContentChangeMemberRoleDetails - """ - if not self.is_shared_content_change_member_role_details(): - raise AttributeError("tag 'shared_content_change_member_role_details' not set") - return self._value - - def get_shared_content_change_viewer_info_policy_details(self): - """ - Changed whether members can see who viewed the shared file or folder. - - Only call this if :meth:`is_shared_content_change_viewer_info_policy_details` is true. - - :rtype: SharedContentChangeViewerInfoPolicyDetails - """ - if not self.is_shared_content_change_viewer_info_policy_details(): - raise AttributeError("tag 'shared_content_change_viewer_info_policy_details' not set") - return self._value - - def get_shared_content_claim_invitation_details(self): - """ - Claimed membership to a team member's shared folder. - - Only call this if :meth:`is_shared_content_claim_invitation_details` is true. - - :rtype: SharedContentClaimInvitationDetails - """ - if not self.is_shared_content_claim_invitation_details(): - raise AttributeError("tag 'shared_content_claim_invitation_details' not set") - return self._value - - def get_shared_content_copy_details(self): - """ - Copied the shared file or folder to own Dropbox. - - Only call this if :meth:`is_shared_content_copy_details` is true. - - :rtype: SharedContentCopyDetails - """ - if not self.is_shared_content_copy_details(): - raise AttributeError("tag 'shared_content_copy_details' not set") - return self._value - - def get_shared_content_download_details(self): - """ - Downloaded the shared file or folder. - - Only call this if :meth:`is_shared_content_download_details` is true. - - :rtype: SharedContentDownloadDetails - """ - if not self.is_shared_content_download_details(): - raise AttributeError("tag 'shared_content_download_details' not set") - return self._value - - def get_shared_content_relinquish_membership_details(self): - """ - Left the membership of a shared file or folder. - - Only call this if :meth:`is_shared_content_relinquish_membership_details` is true. - - :rtype: SharedContentRelinquishMembershipDetails - """ - if not self.is_shared_content_relinquish_membership_details(): - raise AttributeError("tag 'shared_content_relinquish_membership_details' not set") - return self._value - - def get_shared_content_remove_invitee_details(self): - """ - Removed an invitee from the membership of a shared file or folder before - it was claimed. - - Only call this if :meth:`is_shared_content_remove_invitee_details` is true. - - :rtype: SharedContentRemoveInviteeDetails - """ - if not self.is_shared_content_remove_invitee_details(): - raise AttributeError("tag 'shared_content_remove_invitee_details' not set") - return self._value - - def get_shared_content_remove_link_expiry_details(self): - """ - Removed the expiry of the link for the shared file or folder. - - Only call this if :meth:`is_shared_content_remove_link_expiry_details` is true. - - :rtype: SharedContentRemoveLinkExpiryDetails - """ - if not self.is_shared_content_remove_link_expiry_details(): - raise AttributeError("tag 'shared_content_remove_link_expiry_details' not set") - return self._value - - def get_shared_content_remove_link_password_details(self): - """ - Removed the password on the link for the shared file or folder. - - Only call this if :meth:`is_shared_content_remove_link_password_details` is true. - - :rtype: SharedContentRemoveLinkPasswordDetails - """ - if not self.is_shared_content_remove_link_password_details(): - raise AttributeError("tag 'shared_content_remove_link_password_details' not set") - return self._value - - def get_shared_content_remove_member_details(self): - """ - Removed a user or a group from the membership of a shared file or - folder. - - Only call this if :meth:`is_shared_content_remove_member_details` is true. - - :rtype: SharedContentRemoveMemberDetails - """ - if not self.is_shared_content_remove_member_details(): - raise AttributeError("tag 'shared_content_remove_member_details' not set") - return self._value - - def get_shared_content_request_access_details(self): - """ - Requested to be on the membership of a shared file or folder. - - Only call this if :meth:`is_shared_content_request_access_details` is true. - - :rtype: SharedContentRequestAccessDetails - """ - if not self.is_shared_content_request_access_details(): - raise AttributeError("tag 'shared_content_request_access_details' not set") - return self._value - - def get_shared_content_unshare_details(self): - """ - Unshared a shared file or folder by clearing its membership and turning - off its link. - - Only call this if :meth:`is_shared_content_unshare_details` is true. - - :rtype: SharedContentUnshareDetails - """ - if not self.is_shared_content_unshare_details(): - raise AttributeError("tag 'shared_content_unshare_details' not set") - return self._value - - def get_shared_content_view_details(self): - """ - Previewed the shared file or folder. - - Only call this if :meth:`is_shared_content_view_details` is true. - - :rtype: SharedContentViewDetails - """ - if not self.is_shared_content_view_details(): - raise AttributeError("tag 'shared_content_view_details' not set") - return self._value - - def get_shared_folder_change_confidentiality_details(self): - """ - Set or unset the confidential flag on a shared folder. - - Only call this if :meth:`is_shared_folder_change_confidentiality_details` is true. - - :rtype: SharedFolderChangeConfidentialityDetails - """ - if not self.is_shared_folder_change_confidentiality_details(): - raise AttributeError("tag 'shared_folder_change_confidentiality_details' not set") - return self._value - - def get_shared_folder_change_link_policy_details(self): - """ - Changed who can access the shared folder via a link. - - Only call this if :meth:`is_shared_folder_change_link_policy_details` is true. - - :rtype: SharedFolderChangeLinkPolicyDetails - """ - if not self.is_shared_folder_change_link_policy_details(): - raise AttributeError("tag 'shared_folder_change_link_policy_details' not set") - return self._value - - def get_shared_folder_change_member_management_policy_details(self): - """ - Changed who can manage the membership of a shared folder. - - Only call this if :meth:`is_shared_folder_change_member_management_policy_details` is true. - - :rtype: SharedFolderChangeMemberManagementPolicyDetails - """ - if not self.is_shared_folder_change_member_management_policy_details(): - raise AttributeError("tag 'shared_folder_change_member_management_policy_details' not set") - return self._value - - def get_shared_folder_change_member_policy_details(self): - """ - Changed who can become a member of the shared folder. - - Only call this if :meth:`is_shared_folder_change_member_policy_details` is true. - - :rtype: SharedFolderChangeMemberPolicyDetails - """ - if not self.is_shared_folder_change_member_policy_details(): - raise AttributeError("tag 'shared_folder_change_member_policy_details' not set") - return self._value - - def get_shared_folder_create_details(self): - """ - Created a shared folder. - - Only call this if :meth:`is_shared_folder_create_details` is true. - - :rtype: SharedFolderCreateDetails - """ - if not self.is_shared_folder_create_details(): - raise AttributeError("tag 'shared_folder_create_details' not set") - return self._value - - def get_shared_folder_mount_details(self): - """ - Added a shared folder to own Dropbox. - - Only call this if :meth:`is_shared_folder_mount_details` is true. - - :rtype: SharedFolderMountDetails - """ - if not self.is_shared_folder_mount_details(): - raise AttributeError("tag 'shared_folder_mount_details' not set") - return self._value - - def get_shared_folder_transfer_ownership_details(self): - """ - Transferred the ownership of a shared folder to another member. - - Only call this if :meth:`is_shared_folder_transfer_ownership_details` is true. - - :rtype: SharedFolderTransferOwnershipDetails - """ - if not self.is_shared_folder_transfer_ownership_details(): - raise AttributeError("tag 'shared_folder_transfer_ownership_details' not set") - return self._value - - def get_shared_folder_unmount_details(self): - """ - Deleted a shared folder from Dropbox. - - Only call this if :meth:`is_shared_folder_unmount_details` is true. - - :rtype: SharedFolderUnmountDetails - """ - if not self.is_shared_folder_unmount_details(): - raise AttributeError("tag 'shared_folder_unmount_details' not set") - return self._value - - def get_shared_note_opened_details(self): - """ - Shared Paper document was opened. - - Only call this if :meth:`is_shared_note_opened_details` is true. - - :rtype: SharedNoteOpenedDetails - """ - if not self.is_shared_note_opened_details(): - raise AttributeError("tag 'shared_note_opened_details' not set") - return self._value - - def get_shmodel_app_create_details(self): - """ - Created a link to a file using an app. - - Only call this if :meth:`is_shmodel_app_create_details` is true. - - :rtype: ShmodelAppCreateDetails - """ - if not self.is_shmodel_app_create_details(): - raise AttributeError("tag 'shmodel_app_create_details' not set") - return self._value - - def get_shmodel_create_details(self): - """ - Created a new link. - - Only call this if :meth:`is_shmodel_create_details` is true. - - :rtype: ShmodelCreateDetails - """ - if not self.is_shmodel_create_details(): - raise AttributeError("tag 'shmodel_create_details' not set") - return self._value - - def get_shmodel_disable_details(self): - """ - Removed a link. - - Only call this if :meth:`is_shmodel_disable_details` is true. - - :rtype: ShmodelDisableDetails - """ - if not self.is_shmodel_disable_details(): - raise AttributeError("tag 'shmodel_disable_details' not set") - return self._value - - def get_shmodel_fb_share_details(self): - """ - Shared a link with Facebook users. - - Only call this if :meth:`is_shmodel_fb_share_details` is true. - - :rtype: ShmodelFbShareDetails - """ - if not self.is_shmodel_fb_share_details(): - raise AttributeError("tag 'shmodel_fb_share_details' not set") - return self._value - - def get_shmodel_group_share_details(self): - """ - Shared a link with a group. - - Only call this if :meth:`is_shmodel_group_share_details` is true. - - :rtype: ShmodelGroupShareDetails - """ - if not self.is_shmodel_group_share_details(): - raise AttributeError("tag 'shmodel_group_share_details' not set") - return self._value - - def get_shmodel_remove_expiration_details(self): - """ - Removed the expiration date from a link. - - Only call this if :meth:`is_shmodel_remove_expiration_details` is true. - - :rtype: ShmodelRemoveExpirationDetails - """ - if not self.is_shmodel_remove_expiration_details(): - raise AttributeError("tag 'shmodel_remove_expiration_details' not set") - return self._value - - def get_shmodel_set_expiration_details(self): - """ - Added an expiration date to a link. - - Only call this if :meth:`is_shmodel_set_expiration_details` is true. - - :rtype: ShmodelSetExpirationDetails - """ - if not self.is_shmodel_set_expiration_details(): - raise AttributeError("tag 'shmodel_set_expiration_details' not set") - return self._value - - def get_shmodel_team_copy_details(self): - """ - Added a team member's file/folder to their Dropbox from a link. - - Only call this if :meth:`is_shmodel_team_copy_details` is true. - - :rtype: ShmodelTeamCopyDetails - """ - if not self.is_shmodel_team_copy_details(): - raise AttributeError("tag 'shmodel_team_copy_details' not set") - return self._value - - def get_shmodel_team_download_details(self): - """ - Downloaded a team member's file/folder from a link. - - Only call this if :meth:`is_shmodel_team_download_details` is true. - - :rtype: ShmodelTeamDownloadDetails - """ - if not self.is_shmodel_team_download_details(): - raise AttributeError("tag 'shmodel_team_download_details' not set") - return self._value - - def get_shmodel_team_share_details(self): - """ - Shared a link with team members. - - Only call this if :meth:`is_shmodel_team_share_details` is true. - - :rtype: ShmodelTeamShareDetails - """ - if not self.is_shmodel_team_share_details(): - raise AttributeError("tag 'shmodel_team_share_details' not set") - return self._value - - def get_shmodel_team_view_details(self): - """ - Opened a team member's link. - - Only call this if :meth:`is_shmodel_team_view_details` is true. - - :rtype: ShmodelTeamViewDetails - """ - if not self.is_shmodel_team_view_details(): - raise AttributeError("tag 'shmodel_team_view_details' not set") - return self._value - - def get_shmodel_visibility_password_details(self): - """ - Password-protected a link. - - Only call this if :meth:`is_shmodel_visibility_password_details` is true. - - :rtype: ShmodelVisibilityPasswordDetails - """ - if not self.is_shmodel_visibility_password_details(): - raise AttributeError("tag 'shmodel_visibility_password_details' not set") - return self._value - - def get_shmodel_visibility_public_details(self): - """ - Made a file/folder visible to anyone with the link. - - Only call this if :meth:`is_shmodel_visibility_public_details` is true. - - :rtype: ShmodelVisibilityPublicDetails - """ - if not self.is_shmodel_visibility_public_details(): - raise AttributeError("tag 'shmodel_visibility_public_details' not set") - return self._value - - def get_shmodel_visibility_team_only_details(self): - """ - Made a file/folder visible only to team members with the link. - - Only call this if :meth:`is_shmodel_visibility_team_only_details` is true. - - :rtype: ShmodelVisibilityTeamOnlyDetails - """ - if not self.is_shmodel_visibility_team_only_details(): - raise AttributeError("tag 'shmodel_visibility_team_only_details' not set") - return self._value - - def get_sso_add_cert_details(self): - """ - Added the X.509 certificate for SSO. - - Only call this if :meth:`is_sso_add_cert_details` is true. - - :rtype: SsoAddCertDetails - """ - if not self.is_sso_add_cert_details(): - raise AttributeError("tag 'sso_add_cert_details' not set") - return self._value - - def get_sso_add_login_url_details(self): - """ - Added sign-in URL for SSO. - - Only call this if :meth:`is_sso_add_login_url_details` is true. - - :rtype: SsoAddLoginUrlDetails - """ - if not self.is_sso_add_login_url_details(): - raise AttributeError("tag 'sso_add_login_url_details' not set") - return self._value - - def get_sso_add_logout_url_details(self): - """ - Added sign-out URL for SSO. - - Only call this if :meth:`is_sso_add_logout_url_details` is true. - - :rtype: SsoAddLogoutUrlDetails - """ - if not self.is_sso_add_logout_url_details(): - raise AttributeError("tag 'sso_add_logout_url_details' not set") - return self._value - - def get_sso_change_cert_details(self): - """ - Changed the X.509 certificate for SSO. - - Only call this if :meth:`is_sso_change_cert_details` is true. - - :rtype: SsoChangeCertDetails - """ - if not self.is_sso_change_cert_details(): - raise AttributeError("tag 'sso_change_cert_details' not set") - return self._value - - def get_sso_change_login_url_details(self): - """ - Changed the sign-in URL for SSO. - - Only call this if :meth:`is_sso_change_login_url_details` is true. - - :rtype: SsoChangeLoginUrlDetails - """ - if not self.is_sso_change_login_url_details(): - raise AttributeError("tag 'sso_change_login_url_details' not set") - return self._value - - def get_sso_change_logout_url_details(self): - """ - Changed the sign-out URL for SSO. - - Only call this if :meth:`is_sso_change_logout_url_details` is true. - - :rtype: SsoChangeLogoutUrlDetails - """ - if not self.is_sso_change_logout_url_details(): - raise AttributeError("tag 'sso_change_logout_url_details' not set") - return self._value - - def get_sso_change_saml_identity_mode_details(self): - """ - Changed the SAML identity mode for SSO. - - Only call this if :meth:`is_sso_change_saml_identity_mode_details` is true. - - :rtype: SsoChangeSamlIdentityModeDetails - """ - if not self.is_sso_change_saml_identity_mode_details(): - raise AttributeError("tag 'sso_change_saml_identity_mode_details' not set") - return self._value - - def get_sso_remove_cert_details(self): - """ - Removed the X.509 certificate for SSO. - - Only call this if :meth:`is_sso_remove_cert_details` is true. - - :rtype: SsoRemoveCertDetails - """ - if not self.is_sso_remove_cert_details(): - raise AttributeError("tag 'sso_remove_cert_details' not set") - return self._value - - def get_sso_remove_login_url_details(self): - """ - Removed the sign-in URL for SSO. - - Only call this if :meth:`is_sso_remove_login_url_details` is true. - - :rtype: SsoRemoveLoginUrlDetails - """ - if not self.is_sso_remove_login_url_details(): - raise AttributeError("tag 'sso_remove_login_url_details' not set") - return self._value - - def get_sso_remove_logout_url_details(self): - """ - Removed single sign-on logout URL. - - Only call this if :meth:`is_sso_remove_logout_url_details` is true. - - :rtype: SsoRemoveLogoutUrlDetails - """ - if not self.is_sso_remove_logout_url_details(): - raise AttributeError("tag 'sso_remove_logout_url_details' not set") - return self._value - - def get_team_folder_change_status_details(self): - """ - Changed the archival status of a team folder. - - Only call this if :meth:`is_team_folder_change_status_details` is true. - - :rtype: TeamFolderChangeStatusDetails - """ - if not self.is_team_folder_change_status_details(): - raise AttributeError("tag 'team_folder_change_status_details' not set") - return self._value - - def get_team_folder_create_details(self): - """ - Created a new team folder in active status. - - Only call this if :meth:`is_team_folder_create_details` is true. - - :rtype: TeamFolderCreateDetails - """ - if not self.is_team_folder_create_details(): - raise AttributeError("tag 'team_folder_create_details' not set") - return self._value - - def get_team_folder_downgrade_details(self): - """ - Downgraded a team folder to a regular shared folder. - - Only call this if :meth:`is_team_folder_downgrade_details` is true. - - :rtype: TeamFolderDowngradeDetails - """ - if not self.is_team_folder_downgrade_details(): - raise AttributeError("tag 'team_folder_downgrade_details' not set") - return self._value - - def get_team_folder_permanently_delete_details(self): - """ - Permanently deleted an archived team folder. - - Only call this if :meth:`is_team_folder_permanently_delete_details` is true. - - :rtype: TeamFolderPermanentlyDeleteDetails - """ - if not self.is_team_folder_permanently_delete_details(): - raise AttributeError("tag 'team_folder_permanently_delete_details' not set") - return self._value - - def get_team_folder_rename_details(self): - """ - Renamed an active or archived team folder. - - Only call this if :meth:`is_team_folder_rename_details` is true. - - :rtype: TeamFolderRenameDetails - """ - if not self.is_team_folder_rename_details(): - raise AttributeError("tag 'team_folder_rename_details' not set") - return self._value - - def get_account_capture_change_policy_details(self): - """ - Changed the account capture policy on a domain belonging to the team. - - Only call this if :meth:`is_account_capture_change_policy_details` is true. - - :rtype: AccountCaptureChangePolicyDetails - """ - if not self.is_account_capture_change_policy_details(): - raise AttributeError("tag 'account_capture_change_policy_details' not set") - return self._value - - def get_allow_download_disabled_details(self): - """ - Disabled allow downloads. - - Only call this if :meth:`is_allow_download_disabled_details` is true. - - :rtype: AllowDownloadDisabledDetails - """ - if not self.is_allow_download_disabled_details(): - raise AttributeError("tag 'allow_download_disabled_details' not set") - return self._value - - def get_allow_download_enabled_details(self): - """ - Enabled allow downloads. - - Only call this if :meth:`is_allow_download_enabled_details` is true. - - :rtype: AllowDownloadEnabledDetails - """ - if not self.is_allow_download_enabled_details(): - raise AttributeError("tag 'allow_download_enabled_details' not set") - return self._value - - def get_data_placement_restriction_change_policy_details(self): - """ - Set a restriction policy regarding the location of data centers where - team data resides. - - Only call this if :meth:`is_data_placement_restriction_change_policy_details` is true. - - :rtype: DataPlacementRestrictionChangePolicyDetails - """ - if not self.is_data_placement_restriction_change_policy_details(): - raise AttributeError("tag 'data_placement_restriction_change_policy_details' not set") - return self._value - - def get_data_placement_restriction_satisfy_policy_details(self): - """ - Satisfied a previously set restriction policy regarding the location of - data centers where team data resides (i.e. all data have been migrated - according to the restriction placed). - - Only call this if :meth:`is_data_placement_restriction_satisfy_policy_details` is true. - - :rtype: DataPlacementRestrictionSatisfyPolicyDetails - """ - if not self.is_data_placement_restriction_satisfy_policy_details(): - raise AttributeError("tag 'data_placement_restriction_satisfy_policy_details' not set") - return self._value - - def get_device_approvals_change_desktop_policy_details(self): - """ - Set or removed a limit on the number of computers each team member can - link to their work Dropbox account. - - Only call this if :meth:`is_device_approvals_change_desktop_policy_details` is true. - - :rtype: DeviceApprovalsChangeDesktopPolicyDetails - """ - if not self.is_device_approvals_change_desktop_policy_details(): - raise AttributeError("tag 'device_approvals_change_desktop_policy_details' not set") - return self._value - - def get_device_approvals_change_mobile_policy_details(self): - """ - Set or removed a limit on the number of mobiles devices each team member - can link to their work Dropbox account. - - Only call this if :meth:`is_device_approvals_change_mobile_policy_details` is true. - - :rtype: DeviceApprovalsChangeMobilePolicyDetails - """ - if not self.is_device_approvals_change_mobile_policy_details(): - raise AttributeError("tag 'device_approvals_change_mobile_policy_details' not set") - return self._value - - def get_device_approvals_change_overage_action_details(self): - """ - Changed the action taken when a team member is already over the limits - (e.g when they join the team, an admin lowers limits, etc.). - - Only call this if :meth:`is_device_approvals_change_overage_action_details` is true. - - :rtype: DeviceApprovalsChangeOverageActionDetails - """ - if not self.is_device_approvals_change_overage_action_details(): - raise AttributeError("tag 'device_approvals_change_overage_action_details' not set") - return self._value - - def get_device_approvals_change_unlink_action_details(self): - """ - Changed the action taken with respect to approval limits when a team - member unlinks an approved device. - - Only call this if :meth:`is_device_approvals_change_unlink_action_details` is true. - - :rtype: DeviceApprovalsChangeUnlinkActionDetails - """ - if not self.is_device_approvals_change_unlink_action_details(): - raise AttributeError("tag 'device_approvals_change_unlink_action_details' not set") - return self._value - - def get_emm_add_exception_details(self): - """ - Added an exception for one or more team members to optionally use the - regular Dropbox app when EMM is enabled. - - Only call this if :meth:`is_emm_add_exception_details` is true. - - :rtype: EmmAddExceptionDetails - """ - if not self.is_emm_add_exception_details(): - raise AttributeError("tag 'emm_add_exception_details' not set") - return self._value - - def get_emm_change_policy_details(self): - """ - Enabled or disabled enterprise mobility management for team members. - - Only call this if :meth:`is_emm_change_policy_details` is true. - - :rtype: EmmChangePolicyDetails - """ - if not self.is_emm_change_policy_details(): - raise AttributeError("tag 'emm_change_policy_details' not set") - return self._value - - def get_emm_remove_exception_details(self): - """ - Removed an exception for one or more team members to optionally use the - regular Dropbox app when EMM is enabled. - - Only call this if :meth:`is_emm_remove_exception_details` is true. - - :rtype: EmmRemoveExceptionDetails - """ - if not self.is_emm_remove_exception_details(): - raise AttributeError("tag 'emm_remove_exception_details' not set") - return self._value - - def get_extended_version_history_change_policy_details(self): - """ - Accepted or opted out of extended version history. - - Only call this if :meth:`is_extended_version_history_change_policy_details` is true. - - :rtype: ExtendedVersionHistoryChangePolicyDetails - """ - if not self.is_extended_version_history_change_policy_details(): - raise AttributeError("tag 'extended_version_history_change_policy_details' not set") - return self._value - - def get_file_comments_change_policy_details(self): - """ - Enabled or disabled commenting on team files. - - Only call this if :meth:`is_file_comments_change_policy_details` is true. - - :rtype: FileCommentsChangePolicyDetails - """ - if not self.is_file_comments_change_policy_details(): - raise AttributeError("tag 'file_comments_change_policy_details' not set") - return self._value - - def get_file_requests_change_policy_details(self): - """ - Enabled or disabled file requests. - - Only call this if :meth:`is_file_requests_change_policy_details` is true. - - :rtype: FileRequestsChangePolicyDetails - """ - if not self.is_file_requests_change_policy_details(): - raise AttributeError("tag 'file_requests_change_policy_details' not set") - return self._value - - def get_file_requests_emails_enabled_details(self): - """ - Enabled file request emails for everyone. - - Only call this if :meth:`is_file_requests_emails_enabled_details` is true. - - :rtype: FileRequestsEmailsEnabledDetails - """ - if not self.is_file_requests_emails_enabled_details(): - raise AttributeError("tag 'file_requests_emails_enabled_details' not set") - return self._value - - def get_file_requests_emails_restricted_to_team_only_details(self): - """ - Allowed file request emails for the team. - - Only call this if :meth:`is_file_requests_emails_restricted_to_team_only_details` is true. - - :rtype: FileRequestsEmailsRestrictedToTeamOnlyDetails - """ - if not self.is_file_requests_emails_restricted_to_team_only_details(): - raise AttributeError("tag 'file_requests_emails_restricted_to_team_only_details' not set") - return self._value - - def get_google_sso_change_policy_details(self): - """ - Enabled or disabled Google single sign-on for the team. - - Only call this if :meth:`is_google_sso_change_policy_details` is true. - - :rtype: GoogleSsoChangePolicyDetails - """ - if not self.is_google_sso_change_policy_details(): - raise AttributeError("tag 'google_sso_change_policy_details' not set") - return self._value - - def get_group_user_management_change_policy_details(self): - """ - Changed who can create groups. - - Only call this if :meth:`is_group_user_management_change_policy_details` is true. - - :rtype: GroupUserManagementChangePolicyDetails - """ - if not self.is_group_user_management_change_policy_details(): - raise AttributeError("tag 'group_user_management_change_policy_details' not set") - return self._value - - def get_member_requests_change_policy_details(self): - """ - Changed whether users can find the team when not invited. - - Only call this if :meth:`is_member_requests_change_policy_details` is true. - - :rtype: MemberRequestsChangePolicyDetails - """ - if not self.is_member_requests_change_policy_details(): - raise AttributeError("tag 'member_requests_change_policy_details' not set") - return self._value - - def get_member_space_limits_add_exception_details(self): - """ - Added an exception for one or more team members to bypass space limits - imposed by policy. - - Only call this if :meth:`is_member_space_limits_add_exception_details` is true. - - :rtype: MemberSpaceLimitsAddExceptionDetails - """ - if not self.is_member_space_limits_add_exception_details(): - raise AttributeError("tag 'member_space_limits_add_exception_details' not set") - return self._value - - def get_member_space_limits_change_policy_details(self): - """ - Changed the storage limits applied to team members by policy. - - Only call this if :meth:`is_member_space_limits_change_policy_details` is true. - - :rtype: MemberSpaceLimitsChangePolicyDetails - """ - if not self.is_member_space_limits_change_policy_details(): - raise AttributeError("tag 'member_space_limits_change_policy_details' not set") - return self._value - - def get_member_space_limits_remove_exception_details(self): - """ - Removed an exception for one or more team members to bypass space limits - imposed by policy. - - Only call this if :meth:`is_member_space_limits_remove_exception_details` is true. - - :rtype: MemberSpaceLimitsRemoveExceptionDetails - """ - if not self.is_member_space_limits_remove_exception_details(): - raise AttributeError("tag 'member_space_limits_remove_exception_details' not set") - return self._value - - def get_member_suggestions_change_policy_details(self): - """ - Enabled or disabled the option for team members to suggest new members - to add to the team. - - Only call this if :meth:`is_member_suggestions_change_policy_details` is true. - - :rtype: MemberSuggestionsChangePolicyDetails - """ - if not self.is_member_suggestions_change_policy_details(): - raise AttributeError("tag 'member_suggestions_change_policy_details' not set") - return self._value - - def get_microsoft_office_addin_change_policy_details(self): - """ - Enabled or disabled the Microsoft Office add-in, which lets team members - save files to Dropbox directly from Microsoft Office. - - Only call this if :meth:`is_microsoft_office_addin_change_policy_details` is true. - - :rtype: MicrosoftOfficeAddinChangePolicyDetails - """ - if not self.is_microsoft_office_addin_change_policy_details(): - raise AttributeError("tag 'microsoft_office_addin_change_policy_details' not set") - return self._value - - def get_network_control_change_policy_details(self): - """ - Enabled or disabled network control. - - Only call this if :meth:`is_network_control_change_policy_details` is true. - - :rtype: NetworkControlChangePolicyDetails - """ - if not self.is_network_control_change_policy_details(): - raise AttributeError("tag 'network_control_change_policy_details' not set") - return self._value - - def get_paper_change_deployment_policy_details(self): - """ - Changed whether Dropbox Paper, when enabled, is deployed to all teams or - to specific members of the team. - - Only call this if :meth:`is_paper_change_deployment_policy_details` is true. - - :rtype: PaperChangeDeploymentPolicyDetails - """ - if not self.is_paper_change_deployment_policy_details(): - raise AttributeError("tag 'paper_change_deployment_policy_details' not set") - return self._value - - def get_paper_change_member_link_policy_details(self): - """ - Changed whether non team members can view Paper documents using a link. - - Only call this if :meth:`is_paper_change_member_link_policy_details` is true. - - :rtype: PaperChangeMemberLinkPolicyDetails - """ - if not self.is_paper_change_member_link_policy_details(): - raise AttributeError("tag 'paper_change_member_link_policy_details' not set") - return self._value - - def get_paper_change_member_policy_details(self): - """ - Changed whether team members can share Paper documents externally (i.e. - outside the team), and if so, whether they should be accessible only by - team members or anyone by default. - - Only call this if :meth:`is_paper_change_member_policy_details` is true. - - :rtype: PaperChangeMemberPolicyDetails - """ - if not self.is_paper_change_member_policy_details(): - raise AttributeError("tag 'paper_change_member_policy_details' not set") - return self._value - - def get_paper_change_policy_details(self): - """ - Enabled or disabled Dropbox Paper for the team. - - Only call this if :meth:`is_paper_change_policy_details` is true. - - :rtype: PaperChangePolicyDetails - """ - if not self.is_paper_change_policy_details(): - raise AttributeError("tag 'paper_change_policy_details' not set") - return self._value - - def get_permanent_delete_change_policy_details(self): - """ - Enabled or disabled the ability of team members to permanently delete - content. - - Only call this if :meth:`is_permanent_delete_change_policy_details` is true. - - :rtype: PermanentDeleteChangePolicyDetails - """ - if not self.is_permanent_delete_change_policy_details(): - raise AttributeError("tag 'permanent_delete_change_policy_details' not set") - return self._value - - def get_sharing_change_folder_join_policy_details(self): - """ - Changed whether team members can join shared folders owned externally - (i.e. outside the team). - - Only call this if :meth:`is_sharing_change_folder_join_policy_details` is true. - - :rtype: SharingChangeFolderJoinPolicyDetails - """ - if not self.is_sharing_change_folder_join_policy_details(): - raise AttributeError("tag 'sharing_change_folder_join_policy_details' not set") - return self._value - - def get_sharing_change_link_policy_details(self): - """ - Changed whether team members can share links externally (i.e. outside - the team), and if so, whether links should be accessible only by team - members or anyone by default. - - Only call this if :meth:`is_sharing_change_link_policy_details` is true. - - :rtype: SharingChangeLinkPolicyDetails - """ - if not self.is_sharing_change_link_policy_details(): - raise AttributeError("tag 'sharing_change_link_policy_details' not set") - return self._value - - def get_sharing_change_member_policy_details(self): - """ - Changed whether team members can share files and folders externally - (i.e. outside the team). - - Only call this if :meth:`is_sharing_change_member_policy_details` is true. - - :rtype: SharingChangeMemberPolicyDetails - """ - if not self.is_sharing_change_member_policy_details(): - raise AttributeError("tag 'sharing_change_member_policy_details' not set") - return self._value - - def get_smart_sync_change_policy_details(self): - """ - Changed the default Smart Sync policy for team members. - - Only call this if :meth:`is_smart_sync_change_policy_details` is true. - - :rtype: SmartSyncChangePolicyDetails - """ - if not self.is_smart_sync_change_policy_details(): - raise AttributeError("tag 'smart_sync_change_policy_details' not set") - return self._value - - def get_smart_sync_not_opt_out_details(self): - """ - Opted team into Smart Sync. - - Only call this if :meth:`is_smart_sync_not_opt_out_details` is true. - - :rtype: SmartSyncNotOptOutDetails - """ - if not self.is_smart_sync_not_opt_out_details(): - raise AttributeError("tag 'smart_sync_not_opt_out_details' not set") - return self._value - - def get_smart_sync_opt_out_details(self): - """ - Opted team out of Smart Sync. - - Only call this if :meth:`is_smart_sync_opt_out_details` is true. - - :rtype: SmartSyncOptOutDetails - """ - if not self.is_smart_sync_opt_out_details(): - raise AttributeError("tag 'smart_sync_opt_out_details' not set") - return self._value - - def get_sso_change_policy_details(self): - """ - Change the single sign-on policy for the team. - - Only call this if :meth:`is_sso_change_policy_details` is true. - - :rtype: SsoChangePolicyDetails - """ - if not self.is_sso_change_policy_details(): - raise AttributeError("tag 'sso_change_policy_details' not set") - return self._value - - def get_tfa_change_policy_details(self): - """ - Change two-step verification policy for the team. - - Only call this if :meth:`is_tfa_change_policy_details` is true. - - :rtype: TfaChangePolicyDetails - """ - if not self.is_tfa_change_policy_details(): - raise AttributeError("tag 'tfa_change_policy_details' not set") - return self._value - - def get_two_account_change_policy_details(self): - """ - Enabled or disabled the option for team members to link a personal - Dropbox account in addition to their work account to the same computer. - - Only call this if :meth:`is_two_account_change_policy_details` is true. - - :rtype: TwoAccountChangePolicyDetails - """ - if not self.is_two_account_change_policy_details(): - raise AttributeError("tag 'two_account_change_policy_details' not set") - return self._value - - def get_web_sessions_change_fixed_length_policy_details(self): - """ - Changed how long team members can stay signed in to Dropbox on the web. - - Only call this if :meth:`is_web_sessions_change_fixed_length_policy_details` is true. - - :rtype: WebSessionsChangeFixedLengthPolicyDetails - """ - if not self.is_web_sessions_change_fixed_length_policy_details(): - raise AttributeError("tag 'web_sessions_change_fixed_length_policy_details' not set") - return self._value - - def get_web_sessions_change_idle_length_policy_details(self): - """ - Changed how long team members can be idle while signed in to Dropbox on - the web. - - Only call this if :meth:`is_web_sessions_change_idle_length_policy_details` is true. - - :rtype: WebSessionsChangeIdleLengthPolicyDetails - """ - if not self.is_web_sessions_change_idle_length_policy_details(): - raise AttributeError("tag 'web_sessions_change_idle_length_policy_details' not set") - return self._value - - def get_team_profile_add_logo_details(self): - """ - Added a team logo to be displayed on shared link headers. - - Only call this if :meth:`is_team_profile_add_logo_details` is true. - - :rtype: TeamProfileAddLogoDetails - """ - if not self.is_team_profile_add_logo_details(): - raise AttributeError("tag 'team_profile_add_logo_details' not set") - return self._value - - def get_team_profile_change_default_language_details(self): - """ - Changed the default language for the team. - - Only call this if :meth:`is_team_profile_change_default_language_details` is true. - - :rtype: TeamProfileChangeDefaultLanguageDetails - """ - if not self.is_team_profile_change_default_language_details(): - raise AttributeError("tag 'team_profile_change_default_language_details' not set") - return self._value - - def get_team_profile_change_logo_details(self): - """ - Changed the team logo to be displayed on shared link headers. - - Only call this if :meth:`is_team_profile_change_logo_details` is true. - - :rtype: TeamProfileChangeLogoDetails - """ - if not self.is_team_profile_change_logo_details(): - raise AttributeError("tag 'team_profile_change_logo_details' not set") - return self._value - - def get_team_profile_change_name_details(self): - """ - Changed the team name. - - Only call this if :meth:`is_team_profile_change_name_details` is true. - - :rtype: TeamProfileChangeNameDetails - """ - if not self.is_team_profile_change_name_details(): - raise AttributeError("tag 'team_profile_change_name_details' not set") - return self._value - - def get_team_profile_remove_logo_details(self): - """ - Removed the team logo to be displayed on shared link headers. - - Only call this if :meth:`is_team_profile_remove_logo_details` is true. - - :rtype: TeamProfileRemoveLogoDetails - """ - if not self.is_team_profile_remove_logo_details(): - raise AttributeError("tag 'team_profile_remove_logo_details' not set") - return self._value - - def get_tfa_add_backup_phone_details(self): - """ - Added a backup phone for two-step verification. - - Only call this if :meth:`is_tfa_add_backup_phone_details` is true. - - :rtype: TfaAddBackupPhoneDetails - """ - if not self.is_tfa_add_backup_phone_details(): - raise AttributeError("tag 'tfa_add_backup_phone_details' not set") - return self._value - - def get_tfa_add_security_key_details(self): - """ - Added a security key for two-step verification. - - Only call this if :meth:`is_tfa_add_security_key_details` is true. - - :rtype: TfaAddSecurityKeyDetails - """ - if not self.is_tfa_add_security_key_details(): - raise AttributeError("tag 'tfa_add_security_key_details' not set") - return self._value - - def get_tfa_change_backup_phone_details(self): - """ - Changed the backup phone for two-step verification. - - Only call this if :meth:`is_tfa_change_backup_phone_details` is true. - - :rtype: TfaChangeBackupPhoneDetails - """ - if not self.is_tfa_change_backup_phone_details(): - raise AttributeError("tag 'tfa_change_backup_phone_details' not set") - return self._value - - def get_tfa_change_status_details(self): - """ - Enabled, disabled or changed the configuration for two-step - verification. - - Only call this if :meth:`is_tfa_change_status_details` is true. - - :rtype: TfaChangeStatusDetails - """ - if not self.is_tfa_change_status_details(): - raise AttributeError("tag 'tfa_change_status_details' not set") - return self._value - - def get_tfa_remove_backup_phone_details(self): - """ - Removed the backup phone for two-step verification. - - Only call this if :meth:`is_tfa_remove_backup_phone_details` is true. - - :rtype: TfaRemoveBackupPhoneDetails - """ - if not self.is_tfa_remove_backup_phone_details(): - raise AttributeError("tag 'tfa_remove_backup_phone_details' not set") - return self._value - - def get_tfa_remove_security_key_details(self): - """ - Removed a security key for two-step verification. - - Only call this if :meth:`is_tfa_remove_security_key_details` is true. - - :rtype: TfaRemoveSecurityKeyDetails - """ - if not self.is_tfa_remove_security_key_details(): - raise AttributeError("tag 'tfa_remove_security_key_details' not set") - return self._value - - def get_tfa_reset_details(self): - """ - Reset two-step verification for team member. - - Only call this if :meth:`is_tfa_reset_details` is true. - - :rtype: TfaResetDetails - """ - if not self.is_tfa_reset_details(): - raise AttributeError("tag 'tfa_reset_details' not set") - return self._value - - def get_missing_details(self): - """ - Hints that this event was returned with missing details due to an - internal error. - - Only call this if :meth:`is_missing_details` is true. - - :rtype: MissingDetails - """ - if not self.is_missing_details(): - raise AttributeError("tag 'missing_details' not set") - return self._value - - def __repr__(self): - return 'EventDetails(%r, %r)' % (self._tag, self._value) - -EventDetails_validator = bv.Union(EventDetails) - -class EventType(bb.Union): - """ - The type of the event. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar member_change_membership_type: Changed the membership type (limited vs - full) for team member. - :ivar member_permanently_delete_account_contents: Permanently deleted - contents of a removed team member account. - :ivar member_space_limits_change_status: Changed the status with respect to - whether the team member is under or over storage quota specified by - policy. - :ivar member_transfer_account_contents: Transferred contents of a removed - team member account to another member. - :ivar paper_admin_export_start: Exported all Paper documents in the team. - :ivar paper_enabled_users_group_addition: Users added to Paper enabled users - list. - :ivar paper_enabled_users_group_removal: Users removed from Paper enabled - users list. - :ivar paper_external_view_allow: Paper external sharing policy changed: - anyone. This event is deprecated and will not be logged going forward as - the associated product functionality no longer exists. - :ivar paper_external_view_default_team: Paper external sharing policy - changed: default team. This event is deprecated and will not be logged - going forward as the associated product functionality no longer exists. - :ivar paper_external_view_forbid: Paper external sharing policy changed: - team-only. This event is deprecated and will not be logged going forward - as the associated product functionality no longer exists. - :ivar sf_external_invite_warn: Admin settings: team members see a warning - before sharing folders outside the team (DEPRECATED FEATURE). This event - is deprecated and will not be logged going forward as the associated - product functionality no longer exists. - :ivar team_merge_from: Merged another team into this team. - :ivar team_merge_to: Merged this team into another team. - :ivar app_link_team: Linked an app for team. - :ivar app_link_user: Linked an app for team member. - :ivar app_unlink_team: Unlinked an app for team. - :ivar app_unlink_user: Unlinked an app for team member. - :ivar file_add_comment: Added a file comment. - :ivar file_change_comment_subscription: Subscribed to or unsubscribed from - comment notifications for file. - :ivar file_delete_comment: Deleted a file comment. - :ivar file_like_comment: Liked a file comment. This event is deprecated and - will not be logged going forward as the associated product functionality - no longer exists. - :ivar file_resolve_comment: Resolved a file comment. - :ivar file_unlike_comment: Unliked a file comment. This event is deprecated - and will not be logged going forward as the associated product - functionality no longer exists. - :ivar file_unresolve_comment: Unresolved a file comment. - :ivar device_change_ip_desktop: IP address associated with active desktop - session changed. - :ivar device_change_ip_mobile: IP address associated with active mobile - session changed. - :ivar device_change_ip_web: IP address associated with active Web session - changed. - :ivar device_delete_on_unlink_fail: Failed to delete all files from an - unlinked device. - :ivar device_delete_on_unlink_success: Deleted all files from an unlinked - device. - :ivar device_link_fail: Failed to link a device. - :ivar device_link_success: Linked a device. - :ivar device_management_disabled: Disable Device Management. This event is - deprecated and will not be logged going forward as the associated - product functionality no longer exists. - :ivar device_management_enabled: Enable Device Management. This event is - deprecated and will not be logged going forward as the associated - product functionality no longer exists. - :ivar device_unlink: Disconnected a device. - :ivar emm_refresh_auth_token: Refreshed the auth token used for setting up - enterprise mobility management. - :ivar account_capture_change_availability: Granted or revoked the option to - enable account capture on domains belonging to the team. - :ivar account_capture_migrate_account: Account captured user migrated their - account to the team. - :ivar account_capture_relinquish_account: Account captured user relinquished - their account by changing the email address associated with it. - :ivar disabled_domain_invites: Disabled domain invites. This event is - deprecated and will not be logged going forward as the associated - product functionality no longer exists. - :ivar domain_invites_approve_request_to_join_team: Approved a member's - request to join the team. - :ivar domain_invites_decline_request_to_join_team: Declined a user's request - to join the team. - :ivar domain_invites_email_existing_users: Sent domain invites to existing - domain accounts. - :ivar domain_invites_request_to_join_team: Asked to join the team. - :ivar domain_invites_set_invite_new_user_pref_to_no: Turned off - u201cAutomatically invite new usersu201d. This event is deprecated and - will not be logged going forward as the associated product functionality - no longer exists. - :ivar domain_invites_set_invite_new_user_pref_to_yes: Turned on - u201cAutomatically invite new usersu201d. This event is deprecated and - will not be logged going forward as the associated product functionality - no longer exists. - :ivar domain_verification_add_domain_fail: Failed to verify a domain - belonging to the team. - :ivar domain_verification_add_domain_success: Verified a domain belonging to - the team. - :ivar domain_verification_remove_domain: Removed a domain from the list of - verified domains belonging to the team. - :ivar enabled_domain_invites: Enabled domain invites. This event is - deprecated and will not be logged going forward as the associated - product functionality no longer exists. - :ivar create_folder: Created folders. This event is deprecated and will not - be logged going forward as the associated product functionality no - longer exists. - :ivar file_add: Added files and/or folders. - :ivar file_copy: Copied files and/or folders. - :ivar file_delete: Deleted files and/or folders. - :ivar file_download: Downloaded files and/or folders. - :ivar file_edit: Edited files. - :ivar file_get_copy_reference: Create a copy reference to a file or folder. - :ivar file_move: Moved files and/or folders. - :ivar file_permanently_delete: Permanently deleted files and/or folders. - :ivar file_preview: Previewed files and/or folders. - :ivar file_rename: Renamed files and/or folders. - :ivar file_restore: Restored deleted files and/or folders. - :ivar file_revert: Reverted files to a previous version. - :ivar file_rollback_changes: Rolled back file change location changes. - :ivar file_save_copy_reference: Save a file or folder using a copy - reference. - :ivar file_request_add_deadline: Added a deadline to a file request. - :ivar file_request_change_folder: Changed the file request folder. - :ivar file_request_change_title: Change the file request title. - :ivar file_request_close: Closed a file request. - :ivar file_request_create: Created a file request. - :ivar file_request_receive_file: Received files for a file request. - :ivar file_request_remove_deadline: Removed the file request deadline. - :ivar file_request_send: Sent file request to users via email. - :ivar group_add_external_id: Added an external ID for group. - :ivar group_add_member: Added team members to a group. - :ivar group_change_external_id: Changed the external ID for group. - :ivar group_change_management_type: Changed group management type. - :ivar group_change_member_role: Changed the manager permissions belonging to - a group member. - :ivar group_create: Created a group. - :ivar group_delete: Deleted a group. - :ivar group_moved: Moved a group. This event is deprecated and will not be - logged going forward as the associated product functionality no longer - exists. - :ivar group_remove_external_id: Removed the external ID for group. - :ivar group_remove_member: Removed team members from a group. - :ivar group_rename: Renamed a group. - :ivar emm_login_success: Signed in using the Dropbox EMM app. - :ivar logout: Signed out. - :ivar password_login_fail: Failed to sign in using a password. - :ivar password_login_success: Signed in using a password. - :ivar reseller_support_session_end: Ended reseller support session. - :ivar reseller_support_session_start: Started reseller support session. - :ivar sign_in_as_session_end: Ended admin sign-in-as session. - :ivar sign_in_as_session_start: Started admin sign-in-as session. - :ivar sso_login_fail: Failed to sign in using SSO. - :ivar member_add_name: Set team member name when joining team. - :ivar member_change_admin_role: Change the admin role belonging to team - member. - :ivar member_change_email: Changed team member email address. - :ivar member_change_name: Changed team member name. - :ivar member_change_status: Changed the membership status of a team member. - :ivar member_suggest: Suggested a new team member to be added to the team. - :ivar paper_content_add_member: Added users to the membership of a Paper doc - or folder. - :ivar paper_content_add_to_folder: Added Paper doc or folder to a folder. - :ivar paper_content_archive: Archived Paper doc or folder. - :ivar paper_content_create: Created a Paper doc or folder. - :ivar paper_content_permanently_delete: Permanently deleted a Paper doc or - folder. - :ivar paper_content_remove_from_folder: Removed Paper doc or folder from a - folder. - :ivar paper_content_remove_member: Removed a user from the membership of a - Paper doc or folder. - :ivar paper_content_rename: Renamed Paper doc or folder. - :ivar paper_content_restore: Restored an archived Paper doc or folder. - :ivar paper_doc_add_comment: Added a Paper doc comment. - :ivar paper_doc_change_member_role: Changed the access type of a Paper doc - member. - :ivar paper_doc_change_sharing_policy: Changed the sharing policy for Paper - doc. - :ivar paper_doc_change_subscription: Followed or unfollowed a Paper doc. - :ivar paper_doc_deleted: Paper doc archived. This event is deprecated and - will not be logged going forward as the associated product functionality - no longer exists. - :ivar paper_doc_delete_comment: Deleted a Paper doc comment. - :ivar paper_doc_download: Downloaded a Paper doc in a particular output - format. - :ivar paper_doc_edit: Edited a Paper doc. - :ivar paper_doc_edit_comment: Edited a Paper doc comment. - :ivar paper_doc_followed: Followed a Paper doc. This event is replaced by - paper_doc_change_subscription and will not be logged going forward. - :ivar paper_doc_mention: Mentioned a member in a Paper doc. - :ivar paper_doc_request_access: Requested to be a member on a Paper doc. - :ivar paper_doc_resolve_comment: Paper doc comment resolved. - :ivar paper_doc_revert: Restored a Paper doc to previous revision. - :ivar paper_doc_slack_share: Paper doc link shared via slack. - :ivar paper_doc_team_invite: Paper doc shared with team member. This event - is deprecated and will not be logged going forward as the associated - product functionality no longer exists. - :ivar paper_doc_trashed: Paper doc trashed. - :ivar paper_doc_unresolve_comment: Unresolved a Paper doc comment. - :ivar paper_doc_untrashed: Paper doc untrashed. - :ivar paper_doc_view: Viewed Paper doc. - :ivar paper_folder_change_subscription: Followed or unfollowed a Paper - folder. - :ivar paper_folder_deleted: Paper folder archived. This event is deprecated - and will not be logged going forward as the associated product - functionality no longer exists. - :ivar paper_folder_followed: Followed a Paper folder. This event is replaced - by paper_folder_change_subscription and will not be logged going - forward. - :ivar paper_folder_team_invite: Paper folder shared with team member. This - event is deprecated and will not be logged going forward as the - associated product functionality no longer exists. - :ivar password_change: Changed password. - :ivar password_reset: Reset password. - :ivar password_reset_all: Reset all team member passwords. - :ivar emm_create_exceptions_report: EMM excluded users report created. - :ivar emm_create_usage_report: EMM mobile app usage report created. - :ivar smart_sync_create_admin_privilege_report: Smart Sync non-admin devices - report created. - :ivar team_activity_create_report: Created a team activity report. - :ivar collection_share: Shared an album. - :ivar note_acl_invite_only: Changed a Paper document to be invite-only. This - event is deprecated and will not be logged going forward as the - associated product functionality no longer exists. - :ivar note_acl_link: Changed a Paper document to be link accessible. This - event is deprecated and will not be logged going forward as the - associated product functionality no longer exists. - :ivar note_acl_team_link: Changed a Paper document to be link accessible for - the team. This event is deprecated and will not be logged going forward - as the associated product functionality no longer exists. - :ivar note_shared: Shared a Paper doc. This event is deprecated and will not - be logged going forward as the associated product functionality no - longer exists. - :ivar note_share_receive: Shared Paper document received. This event is - deprecated and will not be logged going forward as the associated - product functionality no longer exists. - :ivar open_note_shared: Opened a shared Paper doc. This event is deprecated - and will not be logged going forward as the associated product - functionality no longer exists. - :ivar sf_add_group: Added the team to a shared folder. - :ivar sf_allow_non_members_to_view_shared_links: Allowed non collaborators - to view links to files in a shared folder. This event is deprecated and - will not be logged going forward as the associated product functionality - no longer exists. - :ivar sf_invite_group: Invited a group to a shared folder. This event is - deprecated and will not be logged going forward as the associated - product functionality no longer exists. - :ivar sf_nest: Changed parent of shared folder. - :ivar sf_team_decline: Declined a team member's invitation to a shared - folder. - :ivar sf_team_grant_access: Granted access to a shared folder. This event is - deprecated and will not be logged going forward as the associated - product functionality no longer exists. - :ivar sf_team_invite: Invited team members to a shared folder. This event is - deprecated and will not be logged going forward as the associated - product functionality no longer exists. - :ivar sf_team_invite_change_role: Changed a team member's role in a shared - folder. This event is deprecated and will not be logged going forward as - the associated product functionality no longer exists. - :ivar sf_team_join: Joined a team member's shared folder. This event is - deprecated and will not be logged going forward as the associated - product functionality no longer exists. - :ivar sf_team_join_from_oob_link: Joined a team member's shared folder from - a link. This event is deprecated and will not be logged going forward as - the associated product functionality no longer exists. - :ivar sf_team_uninvite: Unshared a folder with a team member. This event is - deprecated and will not be logged going forward as the associated - product functionality no longer exists. - :ivar shared_content_add_invitees: Sent an email invitation to the - membership of a shared file or folder. - :ivar shared_content_add_link_expiry: Added an expiry to the link for the - shared file or folder. - :ivar shared_content_add_link_password: Added a password to the link for the - shared file or folder. - :ivar shared_content_add_member: Added users and/or groups to the membership - of a shared file or folder. - :ivar shared_content_change_downloads_policy: Changed whether members can - download the shared file or folder. - :ivar shared_content_change_invitee_role: Changed the access type of an - invitee to a shared file or folder before the invitation was claimed. - :ivar shared_content_change_link_audience: Changed the audience of the link - for a shared file or folder. - :ivar shared_content_change_link_expiry: Changed the expiry of the link for - the shared file or folder. - :ivar shared_content_change_link_password: Changed the password on the link - for the shared file or folder. - :ivar shared_content_change_member_role: Changed the access type of a shared - file or folder member. - :ivar shared_content_change_viewer_info_policy: Changed whether members can - see who viewed the shared file or folder. - :ivar shared_content_claim_invitation: Claimed membership to a team member's - shared folder. - :ivar shared_content_copy: Copied the shared file or folder to own Dropbox. - :ivar shared_content_download: Downloaded the shared file or folder. - :ivar shared_content_relinquish_membership: Left the membership of a shared - file or folder. - :ivar shared_content_remove_invitee: Removed an invitee from the membership - of a shared file or folder before it was claimed. - :ivar shared_content_remove_link_expiry: Removed the expiry of the link for - the shared file or folder. - :ivar shared_content_remove_link_password: Removed the password on the link - for the shared file or folder. - :ivar shared_content_remove_member: Removed a user or a group from the - membership of a shared file or folder. - :ivar shared_content_request_access: Requested to be on the membership of a - shared file or folder. - :ivar shared_content_unshare: Unshared a shared file or folder by clearing - its membership and turning off its link. - :ivar shared_content_view: Previewed the shared file or folder. - :ivar shared_folder_change_confidentiality: Set or unset the confidential - flag on a shared folder. - :ivar shared_folder_change_link_policy: Changed who can access the shared - folder via a link. - :ivar shared_folder_change_member_management_policy: Changed who can manage - the membership of a shared folder. - :ivar shared_folder_change_member_policy: Changed who can become a member of - the shared folder. - :ivar shared_folder_create: Created a shared folder. - :ivar shared_folder_mount: Added a shared folder to own Dropbox. - :ivar shared_folder_transfer_ownership: Transferred the ownership of a - shared folder to another member. - :ivar shared_folder_unmount: Deleted a shared folder from Dropbox. - :ivar shared_note_opened: Shared Paper document was opened. This event is - deprecated and will not be logged going forward as the associated - product functionality no longer exists. - :ivar shmodel_app_create: Created a link to a file using an app. - :ivar shmodel_create: Created a new link. - :ivar shmodel_disable: Removed a link. - :ivar shmodel_fb_share: Shared a link with Facebook users. - :ivar shmodel_group_share: Shared a link with a group. This event is - deprecated and will not be logged going forward as the associated - product functionality no longer exists. - :ivar shmodel_remove_expiration: Removed the expiration date from a link. - :ivar shmodel_set_expiration: Added an expiration date to a link. - :ivar shmodel_team_copy: Added a team member's file/folder to their Dropbox - from a link. - :ivar shmodel_team_download: Downloaded a team member's file/folder from a - link. - :ivar shmodel_team_share: Shared a link with team members. - :ivar shmodel_team_view: Opened a team member's link. - :ivar shmodel_visibility_password: Password-protected a link. - :ivar shmodel_visibility_public: Made a file/folder visible to anyone with - the link. - :ivar shmodel_visibility_team_only: Made a file/folder visible only to team - members with the link. - :ivar sso_add_cert: Added the X.509 certificate for SSO. - :ivar sso_add_login_url: Added sign-in URL for SSO. - :ivar sso_add_logout_url: Added sign-out URL for SSO. - :ivar sso_change_cert: Changed the X.509 certificate for SSO. - :ivar sso_change_login_url: Changed the sign-in URL for SSO. - :ivar sso_change_logout_url: Changed the sign-out URL for SSO. - :ivar sso_change_saml_identity_mode: Changed the SAML identity mode for SSO. - :ivar sso_remove_cert: Removed the X.509 certificate for SSO. - :ivar sso_remove_login_url: Removed the sign-in URL for SSO. - :ivar sso_remove_logout_url: Removed single sign-on logout URL. - :ivar team_folder_change_status: Changed the archival status of a team - folder. - :ivar team_folder_create: Created a new team folder in active status. - :ivar team_folder_downgrade: Downgraded a team folder to a regular shared - folder. - :ivar team_folder_permanently_delete: Permanently deleted an archived team - folder. - :ivar team_folder_rename: Renamed an active or archived team folder. - :ivar account_capture_change_policy: Changed the account capture policy on a - domain belonging to the team. - :ivar allow_download_disabled: Disabled allow downloads. This event is - deprecated and will not be logged going forward as the associated - product functionality no longer exists. - :ivar allow_download_enabled: Enabled allow downloads. This event is - deprecated and will not be logged going forward as the associated - product functionality no longer exists. - :ivar data_placement_restriction_change_policy: Set a restriction policy - regarding the location of data centers where team data resides. - :ivar data_placement_restriction_satisfy_policy: Satisfied a previously set - restriction policy regarding the location of data centers where team - data resides (i.e. all data have been migrated according to the - restriction placed). - :ivar device_approvals_change_desktop_policy: Set or removed a limit on the - number of computers each team member can link to their work Dropbox - account. - :ivar device_approvals_change_mobile_policy: Set or removed a limit on the - number of mobiles devices each team member can link to their work - Dropbox account. - :ivar device_approvals_change_overage_action: Changed the action taken when - a team member is already over the limits (e.g when they join the team, - an admin lowers limits, etc.). - :ivar device_approvals_change_unlink_action: Changed the action taken with - respect to approval limits when a team member unlinks an approved - device. - :ivar emm_add_exception: Added an exception for one or more team members to - optionally use the regular Dropbox app when EMM is enabled. - :ivar emm_change_policy: Enabled or disabled enterprise mobility management - for team members. - :ivar emm_remove_exception: Removed an exception for one or more team - members to optionally use the regular Dropbox app when EMM is enabled. - :ivar extended_version_history_change_policy: Accepted or opted out of - extended version history. - :ivar file_comments_change_policy: Enabled or disabled commenting on team - files. - :ivar file_requests_change_policy: Enabled or disabled file requests. - :ivar file_requests_emails_enabled: Enabled file request emails for - everyone. This event is deprecated and will not be logged going forward - as the associated product functionality no longer exists. - :ivar file_requests_emails_restricted_to_team_only: Allowed file request - emails for the team. This event is deprecated and will not be logged - going forward as the associated product functionality no longer exists. - :ivar google_sso_change_policy: Enabled or disabled Google single sign-on - for the team. - :ivar group_user_management_change_policy: Changed who can create groups. - :ivar member_requests_change_policy: Changed whether users can find the team - when not invited. - :ivar member_space_limits_add_exception: Added an exception for one or more - team members to bypass space limits imposed by policy. - :ivar member_space_limits_change_policy: Changed the storage limits applied - to team members by policy. - :ivar member_space_limits_remove_exception: Removed an exception for one or - more team members to bypass space limits imposed by policy. - :ivar member_suggestions_change_policy: Enabled or disabled the option for - team members to suggest new members to add to the team. - :ivar microsoft_office_addin_change_policy: Enabled or disabled the - Microsoft Office add-in, which lets team members save files to Dropbox - directly from Microsoft Office. - :ivar network_control_change_policy: Enabled or disabled network control. - :ivar paper_change_deployment_policy: Changed whether Dropbox Paper, when - enabled, is deployed to all teams or to specific members of the team. - :ivar paper_change_member_link_policy: Changed whether non team members can - view Paper documents using a link. This event is deprecated and will not - be logged going forward as the associated product functionality no - longer exists. - :ivar paper_change_member_policy: Changed whether team members can share - Paper documents externally (i.e. outside the team), and if so, whether - they should be accessible only by team members or anyone by default. - :ivar paper_change_policy: Enabled or disabled Dropbox Paper for the team. - :ivar permanent_delete_change_policy: Enabled or disabled the ability of - team members to permanently delete content. - :ivar sharing_change_folder_join_policy: Changed whether team members can - join shared folders owned externally (i.e. outside the team). - :ivar sharing_change_link_policy: Changed whether team members can share - links externally (i.e. outside the team), and if so, whether links - should be accessible only by team members or anyone by default. - :ivar sharing_change_member_policy: Changed whether team members can share - files and folders externally (i.e. outside the team). - :ivar smart_sync_change_policy: Changed the default Smart Sync policy for - team members. - :ivar smart_sync_not_opt_out: Opted team into Smart Sync. - :ivar smart_sync_opt_out: Opted team out of Smart Sync. - :ivar sso_change_policy: Change the single sign-on policy for the team. - :ivar tfa_change_policy: Change two-step verification policy for the team. - :ivar two_account_change_policy: Enabled or disabled the option for team - members to link a personal Dropbox account in addition to their work - account to the same computer. - :ivar web_sessions_change_fixed_length_policy: Changed how long team members - can stay signed in to Dropbox on the web. - :ivar web_sessions_change_idle_length_policy: Changed how long team members - can be idle while signed in to Dropbox on the web. - :ivar team_profile_add_logo: Added a team logo to be displayed on shared - link headers. - :ivar team_profile_change_default_language: Changed the default language for - the team. - :ivar team_profile_change_logo: Changed the team logo to be displayed on - shared link headers. - :ivar team_profile_change_name: Changed the team name. - :ivar team_profile_remove_logo: Removed the team logo to be displayed on - shared link headers. - :ivar tfa_add_backup_phone: Added a backup phone for two-step verification. - :ivar tfa_add_security_key: Added a security key for two-step verification. - :ivar tfa_change_backup_phone: Changed the backup phone for two-step - verification. - :ivar tfa_change_status: Enabled, disabled or changed the configuration for - two-step verification. - :ivar tfa_remove_backup_phone: Removed the backup phone for two-step - verification. - :ivar tfa_remove_security_key: Removed a security key for two-step - verification. - :ivar tfa_reset: Reset two-step verification for team member. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - member_change_membership_type = None - # Attribute is overwritten below the class definition - member_permanently_delete_account_contents = None - # Attribute is overwritten below the class definition - member_space_limits_change_status = None - # Attribute is overwritten below the class definition - member_transfer_account_contents = None - # Attribute is overwritten below the class definition - paper_admin_export_start = None - # Attribute is overwritten below the class definition - paper_enabled_users_group_addition = None - # Attribute is overwritten below the class definition - paper_enabled_users_group_removal = None - # Attribute is overwritten below the class definition - paper_external_view_allow = None - # Attribute is overwritten below the class definition - paper_external_view_default_team = None - # Attribute is overwritten below the class definition - paper_external_view_forbid = None - # Attribute is overwritten below the class definition - sf_external_invite_warn = None - # Attribute is overwritten below the class definition - team_merge_from = None - # Attribute is overwritten below the class definition - team_merge_to = None - # Attribute is overwritten below the class definition - app_link_team = None - # Attribute is overwritten below the class definition - app_link_user = None - # Attribute is overwritten below the class definition - app_unlink_team = None - # Attribute is overwritten below the class definition - app_unlink_user = None - # Attribute is overwritten below the class definition - file_add_comment = None - # Attribute is overwritten below the class definition - file_change_comment_subscription = None - # Attribute is overwritten below the class definition - file_delete_comment = None - # Attribute is overwritten below the class definition - file_like_comment = None - # Attribute is overwritten below the class definition - file_resolve_comment = None - # Attribute is overwritten below the class definition - file_unlike_comment = None - # Attribute is overwritten below the class definition - file_unresolve_comment = None - # Attribute is overwritten below the class definition - device_change_ip_desktop = None - # Attribute is overwritten below the class definition - device_change_ip_mobile = None - # Attribute is overwritten below the class definition - device_change_ip_web = None - # Attribute is overwritten below the class definition - device_delete_on_unlink_fail = None - # Attribute is overwritten below the class definition - device_delete_on_unlink_success = None - # Attribute is overwritten below the class definition - device_link_fail = None - # Attribute is overwritten below the class definition - device_link_success = None - # Attribute is overwritten below the class definition - device_management_disabled = None - # Attribute is overwritten below the class definition - device_management_enabled = None - # Attribute is overwritten below the class definition - device_unlink = None - # Attribute is overwritten below the class definition - emm_refresh_auth_token = None - # Attribute is overwritten below the class definition - account_capture_change_availability = None - # Attribute is overwritten below the class definition - account_capture_migrate_account = None - # Attribute is overwritten below the class definition - account_capture_relinquish_account = None - # Attribute is overwritten below the class definition - disabled_domain_invites = None - # Attribute is overwritten below the class definition - domain_invites_approve_request_to_join_team = None - # Attribute is overwritten below the class definition - domain_invites_decline_request_to_join_team = None - # Attribute is overwritten below the class definition - domain_invites_email_existing_users = None - # Attribute is overwritten below the class definition - domain_invites_request_to_join_team = None - # Attribute is overwritten below the class definition - domain_invites_set_invite_new_user_pref_to_no = None - # Attribute is overwritten below the class definition - domain_invites_set_invite_new_user_pref_to_yes = None - # Attribute is overwritten below the class definition - domain_verification_add_domain_fail = None - # Attribute is overwritten below the class definition - domain_verification_add_domain_success = None - # Attribute is overwritten below the class definition - domain_verification_remove_domain = None - # Attribute is overwritten below the class definition - enabled_domain_invites = None - # Attribute is overwritten below the class definition - create_folder = None - # Attribute is overwritten below the class definition - file_add = None - # Attribute is overwritten below the class definition - file_copy = None - # Attribute is overwritten below the class definition - file_delete = None - # Attribute is overwritten below the class definition - file_download = None - # Attribute is overwritten below the class definition - file_edit = None - # Attribute is overwritten below the class definition - file_get_copy_reference = None - # Attribute is overwritten below the class definition - file_move = None - # Attribute is overwritten below the class definition - file_permanently_delete = None - # Attribute is overwritten below the class definition - file_preview = None - # Attribute is overwritten below the class definition - file_rename = None - # Attribute is overwritten below the class definition - file_restore = None - # Attribute is overwritten below the class definition - file_revert = None - # Attribute is overwritten below the class definition - file_rollback_changes = None - # Attribute is overwritten below the class definition - file_save_copy_reference = None - # Attribute is overwritten below the class definition - file_request_add_deadline = None - # Attribute is overwritten below the class definition - file_request_change_folder = None - # Attribute is overwritten below the class definition - file_request_change_title = None - # Attribute is overwritten below the class definition - file_request_close = None - # Attribute is overwritten below the class definition - file_request_create = None - # Attribute is overwritten below the class definition - file_request_receive_file = None - # Attribute is overwritten below the class definition - file_request_remove_deadline = None - # Attribute is overwritten below the class definition - file_request_send = None - # Attribute is overwritten below the class definition - group_add_external_id = None - # Attribute is overwritten below the class definition - group_add_member = None - # Attribute is overwritten below the class definition - group_change_external_id = None - # Attribute is overwritten below the class definition - group_change_management_type = None - # Attribute is overwritten below the class definition - group_change_member_role = None - # Attribute is overwritten below the class definition - group_create = None - # Attribute is overwritten below the class definition - group_delete = None - # Attribute is overwritten below the class definition - group_moved = None - # Attribute is overwritten below the class definition - group_remove_external_id = None - # Attribute is overwritten below the class definition - group_remove_member = None - # Attribute is overwritten below the class definition - group_rename = None - # Attribute is overwritten below the class definition - emm_login_success = None - # Attribute is overwritten below the class definition - logout = None - # Attribute is overwritten below the class definition - password_login_fail = None - # Attribute is overwritten below the class definition - password_login_success = None - # Attribute is overwritten below the class definition - reseller_support_session_end = None - # Attribute is overwritten below the class definition - reseller_support_session_start = None - # Attribute is overwritten below the class definition - sign_in_as_session_end = None - # Attribute is overwritten below the class definition - sign_in_as_session_start = None - # Attribute is overwritten below the class definition - sso_login_fail = None - # Attribute is overwritten below the class definition - member_add_name = None - # Attribute is overwritten below the class definition - member_change_admin_role = None - # Attribute is overwritten below the class definition - member_change_email = None - # Attribute is overwritten below the class definition - member_change_name = None - # Attribute is overwritten below the class definition - member_change_status = None - # Attribute is overwritten below the class definition - member_suggest = None - # Attribute is overwritten below the class definition - paper_content_add_member = None - # Attribute is overwritten below the class definition - paper_content_add_to_folder = None - # Attribute is overwritten below the class definition - paper_content_archive = None - # Attribute is overwritten below the class definition - paper_content_create = None - # Attribute is overwritten below the class definition - paper_content_permanently_delete = None - # Attribute is overwritten below the class definition - paper_content_remove_from_folder = None - # Attribute is overwritten below the class definition - paper_content_remove_member = None - # Attribute is overwritten below the class definition - paper_content_rename = None - # Attribute is overwritten below the class definition - paper_content_restore = None - # Attribute is overwritten below the class definition - paper_doc_add_comment = None - # Attribute is overwritten below the class definition - paper_doc_change_member_role = None - # Attribute is overwritten below the class definition - paper_doc_change_sharing_policy = None - # Attribute is overwritten below the class definition - paper_doc_change_subscription = None - # Attribute is overwritten below the class definition - paper_doc_deleted = None - # Attribute is overwritten below the class definition - paper_doc_delete_comment = None - # Attribute is overwritten below the class definition - paper_doc_download = None - # Attribute is overwritten below the class definition - paper_doc_edit = None - # Attribute is overwritten below the class definition - paper_doc_edit_comment = None - # Attribute is overwritten below the class definition - paper_doc_followed = None - # Attribute is overwritten below the class definition - paper_doc_mention = None - # Attribute is overwritten below the class definition - paper_doc_request_access = None - # Attribute is overwritten below the class definition - paper_doc_resolve_comment = None - # Attribute is overwritten below the class definition - paper_doc_revert = None - # Attribute is overwritten below the class definition - paper_doc_slack_share = None - # Attribute is overwritten below the class definition - paper_doc_team_invite = None - # Attribute is overwritten below the class definition - paper_doc_trashed = None - # Attribute is overwritten below the class definition - paper_doc_unresolve_comment = None - # Attribute is overwritten below the class definition - paper_doc_untrashed = None - # Attribute is overwritten below the class definition - paper_doc_view = None - # Attribute is overwritten below the class definition - paper_folder_change_subscription = None - # Attribute is overwritten below the class definition - paper_folder_deleted = None - # Attribute is overwritten below the class definition - paper_folder_followed = None - # Attribute is overwritten below the class definition - paper_folder_team_invite = None - # Attribute is overwritten below the class definition - password_change = None - # Attribute is overwritten below the class definition - password_reset = None - # Attribute is overwritten below the class definition - password_reset_all = None - # Attribute is overwritten below the class definition - emm_create_exceptions_report = None - # Attribute is overwritten below the class definition - emm_create_usage_report = None - # Attribute is overwritten below the class definition - smart_sync_create_admin_privilege_report = None - # Attribute is overwritten below the class definition - team_activity_create_report = None - # Attribute is overwritten below the class definition - collection_share = None - # Attribute is overwritten below the class definition - note_acl_invite_only = None - # Attribute is overwritten below the class definition - note_acl_link = None - # Attribute is overwritten below the class definition - note_acl_team_link = None - # Attribute is overwritten below the class definition - note_shared = None - # Attribute is overwritten below the class definition - note_share_receive = None - # Attribute is overwritten below the class definition - open_note_shared = None - # Attribute is overwritten below the class definition - sf_add_group = None - # Attribute is overwritten below the class definition - sf_allow_non_members_to_view_shared_links = None - # Attribute is overwritten below the class definition - sf_invite_group = None - # Attribute is overwritten below the class definition - sf_nest = None - # Attribute is overwritten below the class definition - sf_team_decline = None - # Attribute is overwritten below the class definition - sf_team_grant_access = None - # Attribute is overwritten below the class definition - sf_team_invite = None - # Attribute is overwritten below the class definition - sf_team_invite_change_role = None - # Attribute is overwritten below the class definition - sf_team_join = None - # Attribute is overwritten below the class definition - sf_team_join_from_oob_link = None - # Attribute is overwritten below the class definition - sf_team_uninvite = None - # Attribute is overwritten below the class definition - shared_content_add_invitees = None - # Attribute is overwritten below the class definition - shared_content_add_link_expiry = None - # Attribute is overwritten below the class definition - shared_content_add_link_password = None - # Attribute is overwritten below the class definition - shared_content_add_member = None - # Attribute is overwritten below the class definition - shared_content_change_downloads_policy = None - # Attribute is overwritten below the class definition - shared_content_change_invitee_role = None - # Attribute is overwritten below the class definition - shared_content_change_link_audience = None - # Attribute is overwritten below the class definition - shared_content_change_link_expiry = None - # Attribute is overwritten below the class definition - shared_content_change_link_password = None - # Attribute is overwritten below the class definition - shared_content_change_member_role = None - # Attribute is overwritten below the class definition - shared_content_change_viewer_info_policy = None - # Attribute is overwritten below the class definition - shared_content_claim_invitation = None - # Attribute is overwritten below the class definition - shared_content_copy = None - # Attribute is overwritten below the class definition - shared_content_download = None - # Attribute is overwritten below the class definition - shared_content_relinquish_membership = None - # Attribute is overwritten below the class definition - shared_content_remove_invitee = None - # Attribute is overwritten below the class definition - shared_content_remove_link_expiry = None - # Attribute is overwritten below the class definition - shared_content_remove_link_password = None - # Attribute is overwritten below the class definition - shared_content_remove_member = None - # Attribute is overwritten below the class definition - shared_content_request_access = None - # Attribute is overwritten below the class definition - shared_content_unshare = None - # Attribute is overwritten below the class definition - shared_content_view = None - # Attribute is overwritten below the class definition - shared_folder_change_confidentiality = None - # Attribute is overwritten below the class definition - shared_folder_change_link_policy = None - # Attribute is overwritten below the class definition - shared_folder_change_member_management_policy = None - # Attribute is overwritten below the class definition - shared_folder_change_member_policy = None - # Attribute is overwritten below the class definition - shared_folder_create = None - # Attribute is overwritten below the class definition - shared_folder_mount = None - # Attribute is overwritten below the class definition - shared_folder_transfer_ownership = None - # Attribute is overwritten below the class definition - shared_folder_unmount = None - # Attribute is overwritten below the class definition - shared_note_opened = None - # Attribute is overwritten below the class definition - shmodel_app_create = None - # Attribute is overwritten below the class definition - shmodel_create = None - # Attribute is overwritten below the class definition - shmodel_disable = None - # Attribute is overwritten below the class definition - shmodel_fb_share = None - # Attribute is overwritten below the class definition - shmodel_group_share = None - # Attribute is overwritten below the class definition - shmodel_remove_expiration = None - # Attribute is overwritten below the class definition - shmodel_set_expiration = None - # Attribute is overwritten below the class definition - shmodel_team_copy = None - # Attribute is overwritten below the class definition - shmodel_team_download = None - # Attribute is overwritten below the class definition - shmodel_team_share = None - # Attribute is overwritten below the class definition - shmodel_team_view = None - # Attribute is overwritten below the class definition - shmodel_visibility_password = None - # Attribute is overwritten below the class definition - shmodel_visibility_public = None - # Attribute is overwritten below the class definition - shmodel_visibility_team_only = None - # Attribute is overwritten below the class definition - sso_add_cert = None - # Attribute is overwritten below the class definition - sso_add_login_url = None - # Attribute is overwritten below the class definition - sso_add_logout_url = None - # Attribute is overwritten below the class definition - sso_change_cert = None - # Attribute is overwritten below the class definition - sso_change_login_url = None - # Attribute is overwritten below the class definition - sso_change_logout_url = None - # Attribute is overwritten below the class definition - sso_change_saml_identity_mode = None - # Attribute is overwritten below the class definition - sso_remove_cert = None - # Attribute is overwritten below the class definition - sso_remove_login_url = None - # Attribute is overwritten below the class definition - sso_remove_logout_url = None - # Attribute is overwritten below the class definition - team_folder_change_status = None - # Attribute is overwritten below the class definition - team_folder_create = None - # Attribute is overwritten below the class definition - team_folder_downgrade = None - # Attribute is overwritten below the class definition - team_folder_permanently_delete = None - # Attribute is overwritten below the class definition - team_folder_rename = None - # Attribute is overwritten below the class definition - account_capture_change_policy = None - # Attribute is overwritten below the class definition - allow_download_disabled = None - # Attribute is overwritten below the class definition - allow_download_enabled = None - # Attribute is overwritten below the class definition - data_placement_restriction_change_policy = None - # Attribute is overwritten below the class definition - data_placement_restriction_satisfy_policy = None - # Attribute is overwritten below the class definition - device_approvals_change_desktop_policy = None - # Attribute is overwritten below the class definition - device_approvals_change_mobile_policy = None - # Attribute is overwritten below the class definition - device_approvals_change_overage_action = None - # Attribute is overwritten below the class definition - device_approvals_change_unlink_action = None - # Attribute is overwritten below the class definition - emm_add_exception = None - # Attribute is overwritten below the class definition - emm_change_policy = None - # Attribute is overwritten below the class definition - emm_remove_exception = None - # Attribute is overwritten below the class definition - extended_version_history_change_policy = None - # Attribute is overwritten below the class definition - file_comments_change_policy = None - # Attribute is overwritten below the class definition - file_requests_change_policy = None - # Attribute is overwritten below the class definition - file_requests_emails_enabled = None - # Attribute is overwritten below the class definition - file_requests_emails_restricted_to_team_only = None - # Attribute is overwritten below the class definition - google_sso_change_policy = None - # Attribute is overwritten below the class definition - group_user_management_change_policy = None - # Attribute is overwritten below the class definition - member_requests_change_policy = None - # Attribute is overwritten below the class definition - member_space_limits_add_exception = None - # Attribute is overwritten below the class definition - member_space_limits_change_policy = None - # Attribute is overwritten below the class definition - member_space_limits_remove_exception = None - # Attribute is overwritten below the class definition - member_suggestions_change_policy = None - # Attribute is overwritten below the class definition - microsoft_office_addin_change_policy = None - # Attribute is overwritten below the class definition - network_control_change_policy = None - # Attribute is overwritten below the class definition - paper_change_deployment_policy = None - # Attribute is overwritten below the class definition - paper_change_member_link_policy = None - # Attribute is overwritten below the class definition - paper_change_member_policy = None - # Attribute is overwritten below the class definition - paper_change_policy = None - # Attribute is overwritten below the class definition - permanent_delete_change_policy = None - # Attribute is overwritten below the class definition - sharing_change_folder_join_policy = None - # Attribute is overwritten below the class definition - sharing_change_link_policy = None - # Attribute is overwritten below the class definition - sharing_change_member_policy = None - # Attribute is overwritten below the class definition - smart_sync_change_policy = None - # Attribute is overwritten below the class definition - smart_sync_not_opt_out = None - # Attribute is overwritten below the class definition - smart_sync_opt_out = None - # Attribute is overwritten below the class definition - sso_change_policy = None - # Attribute is overwritten below the class definition - tfa_change_policy = None - # Attribute is overwritten below the class definition - two_account_change_policy = None - # Attribute is overwritten below the class definition - web_sessions_change_fixed_length_policy = None - # Attribute is overwritten below the class definition - web_sessions_change_idle_length_policy = None - # Attribute is overwritten below the class definition - team_profile_add_logo = None - # Attribute is overwritten below the class definition - team_profile_change_default_language = None - # Attribute is overwritten below the class definition - team_profile_change_logo = None - # Attribute is overwritten below the class definition - team_profile_change_name = None - # Attribute is overwritten below the class definition - team_profile_remove_logo = None - # Attribute is overwritten below the class definition - tfa_add_backup_phone = None - # Attribute is overwritten below the class definition - tfa_add_security_key = None - # Attribute is overwritten below the class definition - tfa_change_backup_phone = None - # Attribute is overwritten below the class definition - tfa_change_status = None - # Attribute is overwritten below the class definition - tfa_remove_backup_phone = None - # Attribute is overwritten below the class definition - tfa_remove_security_key = None - # Attribute is overwritten below the class definition - tfa_reset = None - # Attribute is overwritten below the class definition - other = None - - def is_member_change_membership_type(self): - """ - Check if the union tag is ``member_change_membership_type``. - - :rtype: bool - """ - return self._tag == 'member_change_membership_type' - - def is_member_permanently_delete_account_contents(self): - """ - Check if the union tag is ``member_permanently_delete_account_contents``. - - :rtype: bool - """ - return self._tag == 'member_permanently_delete_account_contents' - - def is_member_space_limits_change_status(self): - """ - Check if the union tag is ``member_space_limits_change_status``. - - :rtype: bool - """ - return self._tag == 'member_space_limits_change_status' - - def is_member_transfer_account_contents(self): - """ - Check if the union tag is ``member_transfer_account_contents``. - - :rtype: bool - """ - return self._tag == 'member_transfer_account_contents' - - def is_paper_admin_export_start(self): - """ - Check if the union tag is ``paper_admin_export_start``. - - :rtype: bool - """ - return self._tag == 'paper_admin_export_start' - - def is_paper_enabled_users_group_addition(self): - """ - Check if the union tag is ``paper_enabled_users_group_addition``. - - :rtype: bool - """ - return self._tag == 'paper_enabled_users_group_addition' - - def is_paper_enabled_users_group_removal(self): - """ - Check if the union tag is ``paper_enabled_users_group_removal``. - - :rtype: bool - """ - return self._tag == 'paper_enabled_users_group_removal' - - def is_paper_external_view_allow(self): - """ - Check if the union tag is ``paper_external_view_allow``. - - :rtype: bool - """ - return self._tag == 'paper_external_view_allow' - - def is_paper_external_view_default_team(self): - """ - Check if the union tag is ``paper_external_view_default_team``. - - :rtype: bool - """ - return self._tag == 'paper_external_view_default_team' - - def is_paper_external_view_forbid(self): - """ - Check if the union tag is ``paper_external_view_forbid``. - - :rtype: bool - """ - return self._tag == 'paper_external_view_forbid' - - def is_sf_external_invite_warn(self): - """ - Check if the union tag is ``sf_external_invite_warn``. - - :rtype: bool - """ - return self._tag == 'sf_external_invite_warn' - - def is_team_merge_from(self): - """ - Check if the union tag is ``team_merge_from``. - - :rtype: bool - """ - return self._tag == 'team_merge_from' - - def is_team_merge_to(self): - """ - Check if the union tag is ``team_merge_to``. - - :rtype: bool - """ - return self._tag == 'team_merge_to' - - def is_app_link_team(self): - """ - Check if the union tag is ``app_link_team``. - - :rtype: bool - """ - return self._tag == 'app_link_team' - - def is_app_link_user(self): - """ - Check if the union tag is ``app_link_user``. - - :rtype: bool - """ - return self._tag == 'app_link_user' - - def is_app_unlink_team(self): - """ - Check if the union tag is ``app_unlink_team``. - - :rtype: bool - """ - return self._tag == 'app_unlink_team' - - def is_app_unlink_user(self): - """ - Check if the union tag is ``app_unlink_user``. - - :rtype: bool - """ - return self._tag == 'app_unlink_user' - - def is_file_add_comment(self): - """ - Check if the union tag is ``file_add_comment``. - - :rtype: bool - """ - return self._tag == 'file_add_comment' - - def is_file_change_comment_subscription(self): - """ - Check if the union tag is ``file_change_comment_subscription``. - - :rtype: bool - """ - return self._tag == 'file_change_comment_subscription' - - def is_file_delete_comment(self): - """ - Check if the union tag is ``file_delete_comment``. - - :rtype: bool - """ - return self._tag == 'file_delete_comment' - - def is_file_like_comment(self): - """ - Check if the union tag is ``file_like_comment``. - - :rtype: bool - """ - return self._tag == 'file_like_comment' - - def is_file_resolve_comment(self): - """ - Check if the union tag is ``file_resolve_comment``. - - :rtype: bool - """ - return self._tag == 'file_resolve_comment' - - def is_file_unlike_comment(self): - """ - Check if the union tag is ``file_unlike_comment``. - - :rtype: bool - """ - return self._tag == 'file_unlike_comment' - - def is_file_unresolve_comment(self): - """ - Check if the union tag is ``file_unresolve_comment``. - - :rtype: bool - """ - return self._tag == 'file_unresolve_comment' - - def is_device_change_ip_desktop(self): - """ - Check if the union tag is ``device_change_ip_desktop``. - - :rtype: bool - """ - return self._tag == 'device_change_ip_desktop' - - def is_device_change_ip_mobile(self): - """ - Check if the union tag is ``device_change_ip_mobile``. - - :rtype: bool - """ - return self._tag == 'device_change_ip_mobile' - - def is_device_change_ip_web(self): - """ - Check if the union tag is ``device_change_ip_web``. - - :rtype: bool - """ - return self._tag == 'device_change_ip_web' - - def is_device_delete_on_unlink_fail(self): - """ - Check if the union tag is ``device_delete_on_unlink_fail``. - - :rtype: bool - """ - return self._tag == 'device_delete_on_unlink_fail' - - def is_device_delete_on_unlink_success(self): - """ - Check if the union tag is ``device_delete_on_unlink_success``. - - :rtype: bool - """ - return self._tag == 'device_delete_on_unlink_success' - - def is_device_link_fail(self): - """ - Check if the union tag is ``device_link_fail``. - - :rtype: bool - """ - return self._tag == 'device_link_fail' - - def is_device_link_success(self): - """ - Check if the union tag is ``device_link_success``. - - :rtype: bool - """ - return self._tag == 'device_link_success' - - def is_device_management_disabled(self): - """ - Check if the union tag is ``device_management_disabled``. - - :rtype: bool - """ - return self._tag == 'device_management_disabled' - - def is_device_management_enabled(self): - """ - Check if the union tag is ``device_management_enabled``. - - :rtype: bool - """ - return self._tag == 'device_management_enabled' - - def is_device_unlink(self): - """ - Check if the union tag is ``device_unlink``. - - :rtype: bool - """ - return self._tag == 'device_unlink' - - def is_emm_refresh_auth_token(self): - """ - Check if the union tag is ``emm_refresh_auth_token``. - - :rtype: bool - """ - return self._tag == 'emm_refresh_auth_token' - - def is_account_capture_change_availability(self): - """ - Check if the union tag is ``account_capture_change_availability``. - - :rtype: bool - """ - return self._tag == 'account_capture_change_availability' - - def is_account_capture_migrate_account(self): - """ - Check if the union tag is ``account_capture_migrate_account``. - - :rtype: bool - """ - return self._tag == 'account_capture_migrate_account' - - def is_account_capture_relinquish_account(self): - """ - Check if the union tag is ``account_capture_relinquish_account``. - - :rtype: bool - """ - return self._tag == 'account_capture_relinquish_account' - - def is_disabled_domain_invites(self): - """ - Check if the union tag is ``disabled_domain_invites``. - - :rtype: bool - """ - return self._tag == 'disabled_domain_invites' - - def is_domain_invites_approve_request_to_join_team(self): - """ - Check if the union tag is ``domain_invites_approve_request_to_join_team``. - - :rtype: bool - """ - return self._tag == 'domain_invites_approve_request_to_join_team' - - def is_domain_invites_decline_request_to_join_team(self): - """ - Check if the union tag is ``domain_invites_decline_request_to_join_team``. - - :rtype: bool - """ - return self._tag == 'domain_invites_decline_request_to_join_team' - - def is_domain_invites_email_existing_users(self): - """ - Check if the union tag is ``domain_invites_email_existing_users``. - - :rtype: bool - """ - return self._tag == 'domain_invites_email_existing_users' - - def is_domain_invites_request_to_join_team(self): - """ - Check if the union tag is ``domain_invites_request_to_join_team``. - - :rtype: bool - """ - return self._tag == 'domain_invites_request_to_join_team' - - def is_domain_invites_set_invite_new_user_pref_to_no(self): - """ - Check if the union tag is ``domain_invites_set_invite_new_user_pref_to_no``. - - :rtype: bool - """ - return self._tag == 'domain_invites_set_invite_new_user_pref_to_no' - - def is_domain_invites_set_invite_new_user_pref_to_yes(self): - """ - Check if the union tag is ``domain_invites_set_invite_new_user_pref_to_yes``. - - :rtype: bool - """ - return self._tag == 'domain_invites_set_invite_new_user_pref_to_yes' - - def is_domain_verification_add_domain_fail(self): - """ - Check if the union tag is ``domain_verification_add_domain_fail``. - - :rtype: bool - """ - return self._tag == 'domain_verification_add_domain_fail' - - def is_domain_verification_add_domain_success(self): - """ - Check if the union tag is ``domain_verification_add_domain_success``. - - :rtype: bool - """ - return self._tag == 'domain_verification_add_domain_success' - - def is_domain_verification_remove_domain(self): - """ - Check if the union tag is ``domain_verification_remove_domain``. - - :rtype: bool - """ - return self._tag == 'domain_verification_remove_domain' - - def is_enabled_domain_invites(self): - """ - Check if the union tag is ``enabled_domain_invites``. - - :rtype: bool - """ - return self._tag == 'enabled_domain_invites' - - def is_create_folder(self): - """ - Check if the union tag is ``create_folder``. - - :rtype: bool - """ - return self._tag == 'create_folder' - - def is_file_add(self): - """ - Check if the union tag is ``file_add``. - - :rtype: bool - """ - return self._tag == 'file_add' - - def is_file_copy(self): - """ - Check if the union tag is ``file_copy``. - - :rtype: bool - """ - return self._tag == 'file_copy' - - def is_file_delete(self): - """ - Check if the union tag is ``file_delete``. - - :rtype: bool - """ - return self._tag == 'file_delete' - - def is_file_download(self): - """ - Check if the union tag is ``file_download``. - - :rtype: bool - """ - return self._tag == 'file_download' - - def is_file_edit(self): - """ - Check if the union tag is ``file_edit``. - - :rtype: bool - """ - return self._tag == 'file_edit' - - def is_file_get_copy_reference(self): - """ - Check if the union tag is ``file_get_copy_reference``. - - :rtype: bool - """ - return self._tag == 'file_get_copy_reference' - - def is_file_move(self): - """ - Check if the union tag is ``file_move``. - - :rtype: bool - """ - return self._tag == 'file_move' - - def is_file_permanently_delete(self): - """ - Check if the union tag is ``file_permanently_delete``. - - :rtype: bool - """ - return self._tag == 'file_permanently_delete' - - def is_file_preview(self): - """ - Check if the union tag is ``file_preview``. - - :rtype: bool - """ - return self._tag == 'file_preview' - - def is_file_rename(self): - """ - Check if the union tag is ``file_rename``. - - :rtype: bool - """ - return self._tag == 'file_rename' - - def is_file_restore(self): - """ - Check if the union tag is ``file_restore``. - - :rtype: bool - """ - return self._tag == 'file_restore' - - def is_file_revert(self): - """ - Check if the union tag is ``file_revert``. - - :rtype: bool - """ - return self._tag == 'file_revert' - - def is_file_rollback_changes(self): - """ - Check if the union tag is ``file_rollback_changes``. - - :rtype: bool - """ - return self._tag == 'file_rollback_changes' - - def is_file_save_copy_reference(self): - """ - Check if the union tag is ``file_save_copy_reference``. - - :rtype: bool - """ - return self._tag == 'file_save_copy_reference' - - def is_file_request_add_deadline(self): - """ - Check if the union tag is ``file_request_add_deadline``. - - :rtype: bool - """ - return self._tag == 'file_request_add_deadline' - - def is_file_request_change_folder(self): - """ - Check if the union tag is ``file_request_change_folder``. - - :rtype: bool - """ - return self._tag == 'file_request_change_folder' - - def is_file_request_change_title(self): - """ - Check if the union tag is ``file_request_change_title``. - - :rtype: bool - """ - return self._tag == 'file_request_change_title' - - def is_file_request_close(self): - """ - Check if the union tag is ``file_request_close``. - - :rtype: bool - """ - return self._tag == 'file_request_close' - - def is_file_request_create(self): - """ - Check if the union tag is ``file_request_create``. - - :rtype: bool - """ - return self._tag == 'file_request_create' - - def is_file_request_receive_file(self): - """ - Check if the union tag is ``file_request_receive_file``. - - :rtype: bool - """ - return self._tag == 'file_request_receive_file' - - def is_file_request_remove_deadline(self): - """ - Check if the union tag is ``file_request_remove_deadline``. - - :rtype: bool - """ - return self._tag == 'file_request_remove_deadline' - - def is_file_request_send(self): - """ - Check if the union tag is ``file_request_send``. - - :rtype: bool - """ - return self._tag == 'file_request_send' - - def is_group_add_external_id(self): - """ - Check if the union tag is ``group_add_external_id``. - - :rtype: bool - """ - return self._tag == 'group_add_external_id' - - def is_group_add_member(self): - """ - Check if the union tag is ``group_add_member``. - - :rtype: bool - """ - return self._tag == 'group_add_member' - - def is_group_change_external_id(self): - """ - Check if the union tag is ``group_change_external_id``. - - :rtype: bool - """ - return self._tag == 'group_change_external_id' - - def is_group_change_management_type(self): - """ - Check if the union tag is ``group_change_management_type``. - - :rtype: bool - """ - return self._tag == 'group_change_management_type' - - def is_group_change_member_role(self): - """ - Check if the union tag is ``group_change_member_role``. - - :rtype: bool - """ - return self._tag == 'group_change_member_role' - - def is_group_create(self): - """ - Check if the union tag is ``group_create``. - - :rtype: bool - """ - return self._tag == 'group_create' - - def is_group_delete(self): - """ - Check if the union tag is ``group_delete``. - - :rtype: bool - """ - return self._tag == 'group_delete' - - def is_group_moved(self): - """ - Check if the union tag is ``group_moved``. - - :rtype: bool - """ - return self._tag == 'group_moved' - - def is_group_remove_external_id(self): - """ - Check if the union tag is ``group_remove_external_id``. - - :rtype: bool - """ - return self._tag == 'group_remove_external_id' - - def is_group_remove_member(self): - """ - Check if the union tag is ``group_remove_member``. - - :rtype: bool - """ - return self._tag == 'group_remove_member' - - def is_group_rename(self): - """ - Check if the union tag is ``group_rename``. - - :rtype: bool - """ - return self._tag == 'group_rename' - - def is_emm_login_success(self): - """ - Check if the union tag is ``emm_login_success``. - - :rtype: bool - """ - return self._tag == 'emm_login_success' - - def is_logout(self): - """ - Check if the union tag is ``logout``. - - :rtype: bool - """ - return self._tag == 'logout' - - def is_password_login_fail(self): - """ - Check if the union tag is ``password_login_fail``. - - :rtype: bool - """ - return self._tag == 'password_login_fail' - - def is_password_login_success(self): - """ - Check if the union tag is ``password_login_success``. - - :rtype: bool - """ - return self._tag == 'password_login_success' - - def is_reseller_support_session_end(self): - """ - Check if the union tag is ``reseller_support_session_end``. - - :rtype: bool - """ - return self._tag == 'reseller_support_session_end' - - def is_reseller_support_session_start(self): - """ - Check if the union tag is ``reseller_support_session_start``. - - :rtype: bool - """ - return self._tag == 'reseller_support_session_start' - - def is_sign_in_as_session_end(self): - """ - Check if the union tag is ``sign_in_as_session_end``. - - :rtype: bool - """ - return self._tag == 'sign_in_as_session_end' - - def is_sign_in_as_session_start(self): - """ - Check if the union tag is ``sign_in_as_session_start``. - - :rtype: bool - """ - return self._tag == 'sign_in_as_session_start' - - def is_sso_login_fail(self): - """ - Check if the union tag is ``sso_login_fail``. - - :rtype: bool - """ - return self._tag == 'sso_login_fail' - - def is_member_add_name(self): - """ - Check if the union tag is ``member_add_name``. - - :rtype: bool - """ - return self._tag == 'member_add_name' - - def is_member_change_admin_role(self): - """ - Check if the union tag is ``member_change_admin_role``. - - :rtype: bool - """ - return self._tag == 'member_change_admin_role' - - def is_member_change_email(self): - """ - Check if the union tag is ``member_change_email``. - - :rtype: bool - """ - return self._tag == 'member_change_email' - - def is_member_change_name(self): - """ - Check if the union tag is ``member_change_name``. - - :rtype: bool - """ - return self._tag == 'member_change_name' - - def is_member_change_status(self): - """ - Check if the union tag is ``member_change_status``. - - :rtype: bool - """ - return self._tag == 'member_change_status' - - def is_member_suggest(self): - """ - Check if the union tag is ``member_suggest``. - - :rtype: bool - """ - return self._tag == 'member_suggest' - - def is_paper_content_add_member(self): - """ - Check if the union tag is ``paper_content_add_member``. - - :rtype: bool - """ - return self._tag == 'paper_content_add_member' - - def is_paper_content_add_to_folder(self): - """ - Check if the union tag is ``paper_content_add_to_folder``. - - :rtype: bool - """ - return self._tag == 'paper_content_add_to_folder' - - def is_paper_content_archive(self): - """ - Check if the union tag is ``paper_content_archive``. - - :rtype: bool - """ - return self._tag == 'paper_content_archive' - - def is_paper_content_create(self): - """ - Check if the union tag is ``paper_content_create``. - - :rtype: bool - """ - return self._tag == 'paper_content_create' - - def is_paper_content_permanently_delete(self): - """ - Check if the union tag is ``paper_content_permanently_delete``. - - :rtype: bool - """ - return self._tag == 'paper_content_permanently_delete' - - def is_paper_content_remove_from_folder(self): - """ - Check if the union tag is ``paper_content_remove_from_folder``. - - :rtype: bool - """ - return self._tag == 'paper_content_remove_from_folder' - - def is_paper_content_remove_member(self): - """ - Check if the union tag is ``paper_content_remove_member``. - - :rtype: bool - """ - return self._tag == 'paper_content_remove_member' - - def is_paper_content_rename(self): - """ - Check if the union tag is ``paper_content_rename``. - - :rtype: bool - """ - return self._tag == 'paper_content_rename' - - def is_paper_content_restore(self): - """ - Check if the union tag is ``paper_content_restore``. - - :rtype: bool - """ - return self._tag == 'paper_content_restore' - - def is_paper_doc_add_comment(self): - """ - Check if the union tag is ``paper_doc_add_comment``. - - :rtype: bool - """ - return self._tag == 'paper_doc_add_comment' - - def is_paper_doc_change_member_role(self): - """ - Check if the union tag is ``paper_doc_change_member_role``. - - :rtype: bool - """ - return self._tag == 'paper_doc_change_member_role' - - def is_paper_doc_change_sharing_policy(self): - """ - Check if the union tag is ``paper_doc_change_sharing_policy``. - - :rtype: bool - """ - return self._tag == 'paper_doc_change_sharing_policy' - - def is_paper_doc_change_subscription(self): - """ - Check if the union tag is ``paper_doc_change_subscription``. - - :rtype: bool - """ - return self._tag == 'paper_doc_change_subscription' - - def is_paper_doc_deleted(self): - """ - Check if the union tag is ``paper_doc_deleted``. - - :rtype: bool - """ - return self._tag == 'paper_doc_deleted' - - def is_paper_doc_delete_comment(self): - """ - Check if the union tag is ``paper_doc_delete_comment``. - - :rtype: bool - """ - return self._tag == 'paper_doc_delete_comment' - - def is_paper_doc_download(self): - """ - Check if the union tag is ``paper_doc_download``. - - :rtype: bool - """ - return self._tag == 'paper_doc_download' - - def is_paper_doc_edit(self): - """ - Check if the union tag is ``paper_doc_edit``. - - :rtype: bool - """ - return self._tag == 'paper_doc_edit' - - def is_paper_doc_edit_comment(self): - """ - Check if the union tag is ``paper_doc_edit_comment``. - - :rtype: bool - """ - return self._tag == 'paper_doc_edit_comment' - - def is_paper_doc_followed(self): - """ - Check if the union tag is ``paper_doc_followed``. - - :rtype: bool - """ - return self._tag == 'paper_doc_followed' - - def is_paper_doc_mention(self): - """ - Check if the union tag is ``paper_doc_mention``. - - :rtype: bool - """ - return self._tag == 'paper_doc_mention' - - def is_paper_doc_request_access(self): - """ - Check if the union tag is ``paper_doc_request_access``. - - :rtype: bool - """ - return self._tag == 'paper_doc_request_access' - - def is_paper_doc_resolve_comment(self): - """ - Check if the union tag is ``paper_doc_resolve_comment``. - - :rtype: bool - """ - return self._tag == 'paper_doc_resolve_comment' - - def is_paper_doc_revert(self): - """ - Check if the union tag is ``paper_doc_revert``. - - :rtype: bool - """ - return self._tag == 'paper_doc_revert' - - def is_paper_doc_slack_share(self): - """ - Check if the union tag is ``paper_doc_slack_share``. - - :rtype: bool - """ - return self._tag == 'paper_doc_slack_share' - - def is_paper_doc_team_invite(self): - """ - Check if the union tag is ``paper_doc_team_invite``. - - :rtype: bool - """ - return self._tag == 'paper_doc_team_invite' - - def is_paper_doc_trashed(self): - """ - Check if the union tag is ``paper_doc_trashed``. - - :rtype: bool - """ - return self._tag == 'paper_doc_trashed' - - def is_paper_doc_unresolve_comment(self): - """ - Check if the union tag is ``paper_doc_unresolve_comment``. - - :rtype: bool - """ - return self._tag == 'paper_doc_unresolve_comment' - - def is_paper_doc_untrashed(self): - """ - Check if the union tag is ``paper_doc_untrashed``. - - :rtype: bool - """ - return self._tag == 'paper_doc_untrashed' - - def is_paper_doc_view(self): - """ - Check if the union tag is ``paper_doc_view``. - - :rtype: bool - """ - return self._tag == 'paper_doc_view' - - def is_paper_folder_change_subscription(self): - """ - Check if the union tag is ``paper_folder_change_subscription``. - - :rtype: bool - """ - return self._tag == 'paper_folder_change_subscription' - - def is_paper_folder_deleted(self): - """ - Check if the union tag is ``paper_folder_deleted``. - - :rtype: bool - """ - return self._tag == 'paper_folder_deleted' - - def is_paper_folder_followed(self): - """ - Check if the union tag is ``paper_folder_followed``. - - :rtype: bool - """ - return self._tag == 'paper_folder_followed' - - def is_paper_folder_team_invite(self): - """ - Check if the union tag is ``paper_folder_team_invite``. - - :rtype: bool - """ - return self._tag == 'paper_folder_team_invite' - - def is_password_change(self): - """ - Check if the union tag is ``password_change``. - - :rtype: bool - """ - return self._tag == 'password_change' - - def is_password_reset(self): - """ - Check if the union tag is ``password_reset``. - - :rtype: bool - """ - return self._tag == 'password_reset' - - def is_password_reset_all(self): - """ - Check if the union tag is ``password_reset_all``. - - :rtype: bool - """ - return self._tag == 'password_reset_all' - - def is_emm_create_exceptions_report(self): - """ - Check if the union tag is ``emm_create_exceptions_report``. - - :rtype: bool - """ - return self._tag == 'emm_create_exceptions_report' - - def is_emm_create_usage_report(self): - """ - Check if the union tag is ``emm_create_usage_report``. - - :rtype: bool - """ - return self._tag == 'emm_create_usage_report' - - def is_smart_sync_create_admin_privilege_report(self): - """ - Check if the union tag is ``smart_sync_create_admin_privilege_report``. - - :rtype: bool - """ - return self._tag == 'smart_sync_create_admin_privilege_report' - - def is_team_activity_create_report(self): - """ - Check if the union tag is ``team_activity_create_report``. - - :rtype: bool - """ - return self._tag == 'team_activity_create_report' - - def is_collection_share(self): - """ - Check if the union tag is ``collection_share``. - - :rtype: bool - """ - return self._tag == 'collection_share' - - def is_note_acl_invite_only(self): - """ - Check if the union tag is ``note_acl_invite_only``. - - :rtype: bool - """ - return self._tag == 'note_acl_invite_only' - - def is_note_acl_link(self): - """ - Check if the union tag is ``note_acl_link``. - - :rtype: bool - """ - return self._tag == 'note_acl_link' - - def is_note_acl_team_link(self): - """ - Check if the union tag is ``note_acl_team_link``. - - :rtype: bool - """ - return self._tag == 'note_acl_team_link' - - def is_note_shared(self): - """ - Check if the union tag is ``note_shared``. - - :rtype: bool - """ - return self._tag == 'note_shared' - - def is_note_share_receive(self): - """ - Check if the union tag is ``note_share_receive``. - - :rtype: bool - """ - return self._tag == 'note_share_receive' - - def is_open_note_shared(self): - """ - Check if the union tag is ``open_note_shared``. - - :rtype: bool - """ - return self._tag == 'open_note_shared' - - def is_sf_add_group(self): - """ - Check if the union tag is ``sf_add_group``. - - :rtype: bool - """ - return self._tag == 'sf_add_group' - - def is_sf_allow_non_members_to_view_shared_links(self): - """ - Check if the union tag is ``sf_allow_non_members_to_view_shared_links``. - - :rtype: bool - """ - return self._tag == 'sf_allow_non_members_to_view_shared_links' - - def is_sf_invite_group(self): - """ - Check if the union tag is ``sf_invite_group``. - - :rtype: bool - """ - return self._tag == 'sf_invite_group' - - def is_sf_nest(self): - """ - Check if the union tag is ``sf_nest``. - - :rtype: bool - """ - return self._tag == 'sf_nest' - - def is_sf_team_decline(self): - """ - Check if the union tag is ``sf_team_decline``. - - :rtype: bool - """ - return self._tag == 'sf_team_decline' - - def is_sf_team_grant_access(self): - """ - Check if the union tag is ``sf_team_grant_access``. - - :rtype: bool - """ - return self._tag == 'sf_team_grant_access' - - def is_sf_team_invite(self): - """ - Check if the union tag is ``sf_team_invite``. - - :rtype: bool - """ - return self._tag == 'sf_team_invite' - - def is_sf_team_invite_change_role(self): - """ - Check if the union tag is ``sf_team_invite_change_role``. - - :rtype: bool - """ - return self._tag == 'sf_team_invite_change_role' - - def is_sf_team_join(self): - """ - Check if the union tag is ``sf_team_join``. - - :rtype: bool - """ - return self._tag == 'sf_team_join' - - def is_sf_team_join_from_oob_link(self): - """ - Check if the union tag is ``sf_team_join_from_oob_link``. - - :rtype: bool - """ - return self._tag == 'sf_team_join_from_oob_link' - - def is_sf_team_uninvite(self): - """ - Check if the union tag is ``sf_team_uninvite``. - - :rtype: bool - """ - return self._tag == 'sf_team_uninvite' - - def is_shared_content_add_invitees(self): - """ - Check if the union tag is ``shared_content_add_invitees``. - - :rtype: bool - """ - return self._tag == 'shared_content_add_invitees' - - def is_shared_content_add_link_expiry(self): - """ - Check if the union tag is ``shared_content_add_link_expiry``. - - :rtype: bool - """ - return self._tag == 'shared_content_add_link_expiry' - - def is_shared_content_add_link_password(self): - """ - Check if the union tag is ``shared_content_add_link_password``. - - :rtype: bool - """ - return self._tag == 'shared_content_add_link_password' - - def is_shared_content_add_member(self): - """ - Check if the union tag is ``shared_content_add_member``. - - :rtype: bool - """ - return self._tag == 'shared_content_add_member' - - def is_shared_content_change_downloads_policy(self): - """ - Check if the union tag is ``shared_content_change_downloads_policy``. - - :rtype: bool - """ - return self._tag == 'shared_content_change_downloads_policy' - - def is_shared_content_change_invitee_role(self): - """ - Check if the union tag is ``shared_content_change_invitee_role``. - - :rtype: bool - """ - return self._tag == 'shared_content_change_invitee_role' - - def is_shared_content_change_link_audience(self): - """ - Check if the union tag is ``shared_content_change_link_audience``. - - :rtype: bool - """ - return self._tag == 'shared_content_change_link_audience' - - def is_shared_content_change_link_expiry(self): - """ - Check if the union tag is ``shared_content_change_link_expiry``. - - :rtype: bool - """ - return self._tag == 'shared_content_change_link_expiry' - - def is_shared_content_change_link_password(self): - """ - Check if the union tag is ``shared_content_change_link_password``. - - :rtype: bool - """ - return self._tag == 'shared_content_change_link_password' - - def is_shared_content_change_member_role(self): - """ - Check if the union tag is ``shared_content_change_member_role``. - - :rtype: bool - """ - return self._tag == 'shared_content_change_member_role' - - def is_shared_content_change_viewer_info_policy(self): - """ - Check if the union tag is ``shared_content_change_viewer_info_policy``. - - :rtype: bool - """ - return self._tag == 'shared_content_change_viewer_info_policy' - - def is_shared_content_claim_invitation(self): - """ - Check if the union tag is ``shared_content_claim_invitation``. - - :rtype: bool - """ - return self._tag == 'shared_content_claim_invitation' - - def is_shared_content_copy(self): - """ - Check if the union tag is ``shared_content_copy``. - - :rtype: bool - """ - return self._tag == 'shared_content_copy' - - def is_shared_content_download(self): - """ - Check if the union tag is ``shared_content_download``. - - :rtype: bool - """ - return self._tag == 'shared_content_download' - - def is_shared_content_relinquish_membership(self): - """ - Check if the union tag is ``shared_content_relinquish_membership``. - - :rtype: bool - """ - return self._tag == 'shared_content_relinquish_membership' - - def is_shared_content_remove_invitee(self): - """ - Check if the union tag is ``shared_content_remove_invitee``. - - :rtype: bool - """ - return self._tag == 'shared_content_remove_invitee' - - def is_shared_content_remove_link_expiry(self): - """ - Check if the union tag is ``shared_content_remove_link_expiry``. - - :rtype: bool - """ - return self._tag == 'shared_content_remove_link_expiry' - - def is_shared_content_remove_link_password(self): - """ - Check if the union tag is ``shared_content_remove_link_password``. - - :rtype: bool - """ - return self._tag == 'shared_content_remove_link_password' - - def is_shared_content_remove_member(self): - """ - Check if the union tag is ``shared_content_remove_member``. - - :rtype: bool - """ - return self._tag == 'shared_content_remove_member' - - def is_shared_content_request_access(self): - """ - Check if the union tag is ``shared_content_request_access``. - - :rtype: bool - """ - return self._tag == 'shared_content_request_access' - - def is_shared_content_unshare(self): - """ - Check if the union tag is ``shared_content_unshare``. - - :rtype: bool - """ - return self._tag == 'shared_content_unshare' - - def is_shared_content_view(self): - """ - Check if the union tag is ``shared_content_view``. - - :rtype: bool - """ - return self._tag == 'shared_content_view' - - def is_shared_folder_change_confidentiality(self): - """ - Check if the union tag is ``shared_folder_change_confidentiality``. - - :rtype: bool - """ - return self._tag == 'shared_folder_change_confidentiality' - - def is_shared_folder_change_link_policy(self): - """ - Check if the union tag is ``shared_folder_change_link_policy``. - - :rtype: bool - """ - return self._tag == 'shared_folder_change_link_policy' - - def is_shared_folder_change_member_management_policy(self): - """ - Check if the union tag is ``shared_folder_change_member_management_policy``. - - :rtype: bool - """ - return self._tag == 'shared_folder_change_member_management_policy' - - def is_shared_folder_change_member_policy(self): - """ - Check if the union tag is ``shared_folder_change_member_policy``. - - :rtype: bool - """ - return self._tag == 'shared_folder_change_member_policy' - - def is_shared_folder_create(self): - """ - Check if the union tag is ``shared_folder_create``. - - :rtype: bool - """ - return self._tag == 'shared_folder_create' - - def is_shared_folder_mount(self): - """ - Check if the union tag is ``shared_folder_mount``. - - :rtype: bool - """ - return self._tag == 'shared_folder_mount' - - def is_shared_folder_transfer_ownership(self): - """ - Check if the union tag is ``shared_folder_transfer_ownership``. - - :rtype: bool - """ - return self._tag == 'shared_folder_transfer_ownership' - - def is_shared_folder_unmount(self): - """ - Check if the union tag is ``shared_folder_unmount``. - - :rtype: bool - """ - return self._tag == 'shared_folder_unmount' - - def is_shared_note_opened(self): - """ - Check if the union tag is ``shared_note_opened``. - - :rtype: bool - """ - return self._tag == 'shared_note_opened' - - def is_shmodel_app_create(self): - """ - Check if the union tag is ``shmodel_app_create``. - - :rtype: bool - """ - return self._tag == 'shmodel_app_create' - - def is_shmodel_create(self): - """ - Check if the union tag is ``shmodel_create``. - - :rtype: bool - """ - return self._tag == 'shmodel_create' - - def is_shmodel_disable(self): - """ - Check if the union tag is ``shmodel_disable``. - - :rtype: bool - """ - return self._tag == 'shmodel_disable' - - def is_shmodel_fb_share(self): - """ - Check if the union tag is ``shmodel_fb_share``. - - :rtype: bool - """ - return self._tag == 'shmodel_fb_share' - - def is_shmodel_group_share(self): - """ - Check if the union tag is ``shmodel_group_share``. - - :rtype: bool - """ - return self._tag == 'shmodel_group_share' - - def is_shmodel_remove_expiration(self): - """ - Check if the union tag is ``shmodel_remove_expiration``. - - :rtype: bool - """ - return self._tag == 'shmodel_remove_expiration' - - def is_shmodel_set_expiration(self): - """ - Check if the union tag is ``shmodel_set_expiration``. - - :rtype: bool - """ - return self._tag == 'shmodel_set_expiration' - - def is_shmodel_team_copy(self): - """ - Check if the union tag is ``shmodel_team_copy``. - - :rtype: bool - """ - return self._tag == 'shmodel_team_copy' - - def is_shmodel_team_download(self): - """ - Check if the union tag is ``shmodel_team_download``. - - :rtype: bool - """ - return self._tag == 'shmodel_team_download' - - def is_shmodel_team_share(self): - """ - Check if the union tag is ``shmodel_team_share``. - - :rtype: bool - """ - return self._tag == 'shmodel_team_share' - - def is_shmodel_team_view(self): - """ - Check if the union tag is ``shmodel_team_view``. - - :rtype: bool - """ - return self._tag == 'shmodel_team_view' - - def is_shmodel_visibility_password(self): - """ - Check if the union tag is ``shmodel_visibility_password``. - - :rtype: bool - """ - return self._tag == 'shmodel_visibility_password' - - def is_shmodel_visibility_public(self): - """ - Check if the union tag is ``shmodel_visibility_public``. - - :rtype: bool - """ - return self._tag == 'shmodel_visibility_public' - - def is_shmodel_visibility_team_only(self): - """ - Check if the union tag is ``shmodel_visibility_team_only``. - - :rtype: bool - """ - return self._tag == 'shmodel_visibility_team_only' - - def is_sso_add_cert(self): - """ - Check if the union tag is ``sso_add_cert``. - - :rtype: bool - """ - return self._tag == 'sso_add_cert' - - def is_sso_add_login_url(self): - """ - Check if the union tag is ``sso_add_login_url``. - - :rtype: bool - """ - return self._tag == 'sso_add_login_url' - - def is_sso_add_logout_url(self): - """ - Check if the union tag is ``sso_add_logout_url``. - - :rtype: bool - """ - return self._tag == 'sso_add_logout_url' - - def is_sso_change_cert(self): - """ - Check if the union tag is ``sso_change_cert``. - - :rtype: bool - """ - return self._tag == 'sso_change_cert' - - def is_sso_change_login_url(self): - """ - Check if the union tag is ``sso_change_login_url``. - - :rtype: bool - """ - return self._tag == 'sso_change_login_url' - - def is_sso_change_logout_url(self): - """ - Check if the union tag is ``sso_change_logout_url``. - - :rtype: bool - """ - return self._tag == 'sso_change_logout_url' - - def is_sso_change_saml_identity_mode(self): - """ - Check if the union tag is ``sso_change_saml_identity_mode``. - - :rtype: bool - """ - return self._tag == 'sso_change_saml_identity_mode' - - def is_sso_remove_cert(self): - """ - Check if the union tag is ``sso_remove_cert``. - - :rtype: bool - """ - return self._tag == 'sso_remove_cert' - - def is_sso_remove_login_url(self): - """ - Check if the union tag is ``sso_remove_login_url``. - - :rtype: bool - """ - return self._tag == 'sso_remove_login_url' - - def is_sso_remove_logout_url(self): - """ - Check if the union tag is ``sso_remove_logout_url``. - - :rtype: bool - """ - return self._tag == 'sso_remove_logout_url' - - def is_team_folder_change_status(self): - """ - Check if the union tag is ``team_folder_change_status``. - - :rtype: bool - """ - return self._tag == 'team_folder_change_status' - - def is_team_folder_create(self): - """ - Check if the union tag is ``team_folder_create``. - - :rtype: bool - """ - return self._tag == 'team_folder_create' - - def is_team_folder_downgrade(self): - """ - Check if the union tag is ``team_folder_downgrade``. - - :rtype: bool - """ - return self._tag == 'team_folder_downgrade' - - def is_team_folder_permanently_delete(self): - """ - Check if the union tag is ``team_folder_permanently_delete``. - - :rtype: bool - """ - return self._tag == 'team_folder_permanently_delete' - - def is_team_folder_rename(self): - """ - Check if the union tag is ``team_folder_rename``. - - :rtype: bool - """ - return self._tag == 'team_folder_rename' - - def is_account_capture_change_policy(self): - """ - Check if the union tag is ``account_capture_change_policy``. - - :rtype: bool - """ - return self._tag == 'account_capture_change_policy' - - def is_allow_download_disabled(self): - """ - Check if the union tag is ``allow_download_disabled``. - - :rtype: bool - """ - return self._tag == 'allow_download_disabled' - - def is_allow_download_enabled(self): - """ - Check if the union tag is ``allow_download_enabled``. - - :rtype: bool - """ - return self._tag == 'allow_download_enabled' - - def is_data_placement_restriction_change_policy(self): - """ - Check if the union tag is ``data_placement_restriction_change_policy``. - - :rtype: bool - """ - return self._tag == 'data_placement_restriction_change_policy' - - def is_data_placement_restriction_satisfy_policy(self): - """ - Check if the union tag is ``data_placement_restriction_satisfy_policy``. - - :rtype: bool - """ - return self._tag == 'data_placement_restriction_satisfy_policy' - - def is_device_approvals_change_desktop_policy(self): - """ - Check if the union tag is ``device_approvals_change_desktop_policy``. - - :rtype: bool - """ - return self._tag == 'device_approvals_change_desktop_policy' - - def is_device_approvals_change_mobile_policy(self): - """ - Check if the union tag is ``device_approvals_change_mobile_policy``. - - :rtype: bool - """ - return self._tag == 'device_approvals_change_mobile_policy' - - def is_device_approvals_change_overage_action(self): - """ - Check if the union tag is ``device_approvals_change_overage_action``. - - :rtype: bool - """ - return self._tag == 'device_approvals_change_overage_action' - - def is_device_approvals_change_unlink_action(self): - """ - Check if the union tag is ``device_approvals_change_unlink_action``. - - :rtype: bool - """ - return self._tag == 'device_approvals_change_unlink_action' - - def is_emm_add_exception(self): - """ - Check if the union tag is ``emm_add_exception``. - - :rtype: bool - """ - return self._tag == 'emm_add_exception' - - def is_emm_change_policy(self): - """ - Check if the union tag is ``emm_change_policy``. - - :rtype: bool - """ - return self._tag == 'emm_change_policy' - - def is_emm_remove_exception(self): - """ - Check if the union tag is ``emm_remove_exception``. - - :rtype: bool - """ - return self._tag == 'emm_remove_exception' - - def is_extended_version_history_change_policy(self): - """ - Check if the union tag is ``extended_version_history_change_policy``. - - :rtype: bool - """ - return self._tag == 'extended_version_history_change_policy' - - def is_file_comments_change_policy(self): - """ - Check if the union tag is ``file_comments_change_policy``. - - :rtype: bool - """ - return self._tag == 'file_comments_change_policy' - - def is_file_requests_change_policy(self): - """ - Check if the union tag is ``file_requests_change_policy``. - - :rtype: bool - """ - return self._tag == 'file_requests_change_policy' - - def is_file_requests_emails_enabled(self): - """ - Check if the union tag is ``file_requests_emails_enabled``. - - :rtype: bool - """ - return self._tag == 'file_requests_emails_enabled' - - def is_file_requests_emails_restricted_to_team_only(self): - """ - Check if the union tag is ``file_requests_emails_restricted_to_team_only``. - - :rtype: bool - """ - return self._tag == 'file_requests_emails_restricted_to_team_only' - - def is_google_sso_change_policy(self): - """ - Check if the union tag is ``google_sso_change_policy``. - - :rtype: bool - """ - return self._tag == 'google_sso_change_policy' - - def is_group_user_management_change_policy(self): - """ - Check if the union tag is ``group_user_management_change_policy``. - - :rtype: bool - """ - return self._tag == 'group_user_management_change_policy' - - def is_member_requests_change_policy(self): - """ - Check if the union tag is ``member_requests_change_policy``. - - :rtype: bool - """ - return self._tag == 'member_requests_change_policy' - - def is_member_space_limits_add_exception(self): - """ - Check if the union tag is ``member_space_limits_add_exception``. - - :rtype: bool - """ - return self._tag == 'member_space_limits_add_exception' - - def is_member_space_limits_change_policy(self): - """ - Check if the union tag is ``member_space_limits_change_policy``. - - :rtype: bool - """ - return self._tag == 'member_space_limits_change_policy' - - def is_member_space_limits_remove_exception(self): - """ - Check if the union tag is ``member_space_limits_remove_exception``. - - :rtype: bool - """ - return self._tag == 'member_space_limits_remove_exception' - - def is_member_suggestions_change_policy(self): - """ - Check if the union tag is ``member_suggestions_change_policy``. - - :rtype: bool - """ - return self._tag == 'member_suggestions_change_policy' - - def is_microsoft_office_addin_change_policy(self): - """ - Check if the union tag is ``microsoft_office_addin_change_policy``. - - :rtype: bool - """ - return self._tag == 'microsoft_office_addin_change_policy' - - def is_network_control_change_policy(self): - """ - Check if the union tag is ``network_control_change_policy``. - - :rtype: bool - """ - return self._tag == 'network_control_change_policy' - - def is_paper_change_deployment_policy(self): - """ - Check if the union tag is ``paper_change_deployment_policy``. - - :rtype: bool - """ - return self._tag == 'paper_change_deployment_policy' - - def is_paper_change_member_link_policy(self): - """ - Check if the union tag is ``paper_change_member_link_policy``. - - :rtype: bool - """ - return self._tag == 'paper_change_member_link_policy' - - def is_paper_change_member_policy(self): - """ - Check if the union tag is ``paper_change_member_policy``. - - :rtype: bool - """ - return self._tag == 'paper_change_member_policy' - - def is_paper_change_policy(self): - """ - Check if the union tag is ``paper_change_policy``. - - :rtype: bool - """ - return self._tag == 'paper_change_policy' - - def is_permanent_delete_change_policy(self): - """ - Check if the union tag is ``permanent_delete_change_policy``. - - :rtype: bool - """ - return self._tag == 'permanent_delete_change_policy' - - def is_sharing_change_folder_join_policy(self): - """ - Check if the union tag is ``sharing_change_folder_join_policy``. - - :rtype: bool - """ - return self._tag == 'sharing_change_folder_join_policy' - - def is_sharing_change_link_policy(self): - """ - Check if the union tag is ``sharing_change_link_policy``. - - :rtype: bool - """ - return self._tag == 'sharing_change_link_policy' - - def is_sharing_change_member_policy(self): - """ - Check if the union tag is ``sharing_change_member_policy``. - - :rtype: bool - """ - return self._tag == 'sharing_change_member_policy' - - def is_smart_sync_change_policy(self): - """ - Check if the union tag is ``smart_sync_change_policy``. - - :rtype: bool - """ - return self._tag == 'smart_sync_change_policy' - - def is_smart_sync_not_opt_out(self): - """ - Check if the union tag is ``smart_sync_not_opt_out``. - - :rtype: bool - """ - return self._tag == 'smart_sync_not_opt_out' - - def is_smart_sync_opt_out(self): - """ - Check if the union tag is ``smart_sync_opt_out``. - - :rtype: bool - """ - return self._tag == 'smart_sync_opt_out' - - def is_sso_change_policy(self): - """ - Check if the union tag is ``sso_change_policy``. - - :rtype: bool - """ - return self._tag == 'sso_change_policy' - - def is_tfa_change_policy(self): - """ - Check if the union tag is ``tfa_change_policy``. - - :rtype: bool - """ - return self._tag == 'tfa_change_policy' - - def is_two_account_change_policy(self): - """ - Check if the union tag is ``two_account_change_policy``. - - :rtype: bool - """ - return self._tag == 'two_account_change_policy' - - def is_web_sessions_change_fixed_length_policy(self): - """ - Check if the union tag is ``web_sessions_change_fixed_length_policy``. - - :rtype: bool - """ - return self._tag == 'web_sessions_change_fixed_length_policy' - - def is_web_sessions_change_idle_length_policy(self): - """ - Check if the union tag is ``web_sessions_change_idle_length_policy``. - - :rtype: bool - """ - return self._tag == 'web_sessions_change_idle_length_policy' - - def is_team_profile_add_logo(self): - """ - Check if the union tag is ``team_profile_add_logo``. - - :rtype: bool - """ - return self._tag == 'team_profile_add_logo' - - def is_team_profile_change_default_language(self): - """ - Check if the union tag is ``team_profile_change_default_language``. - - :rtype: bool - """ - return self._tag == 'team_profile_change_default_language' - - def is_team_profile_change_logo(self): - """ - Check if the union tag is ``team_profile_change_logo``. - - :rtype: bool - """ - return self._tag == 'team_profile_change_logo' - - def is_team_profile_change_name(self): - """ - Check if the union tag is ``team_profile_change_name``. - - :rtype: bool - """ - return self._tag == 'team_profile_change_name' - - def is_team_profile_remove_logo(self): - """ - Check if the union tag is ``team_profile_remove_logo``. - - :rtype: bool - """ - return self._tag == 'team_profile_remove_logo' - - def is_tfa_add_backup_phone(self): - """ - Check if the union tag is ``tfa_add_backup_phone``. - - :rtype: bool - """ - return self._tag == 'tfa_add_backup_phone' - - def is_tfa_add_security_key(self): - """ - Check if the union tag is ``tfa_add_security_key``. - - :rtype: bool - """ - return self._tag == 'tfa_add_security_key' - - def is_tfa_change_backup_phone(self): - """ - Check if the union tag is ``tfa_change_backup_phone``. - - :rtype: bool - """ - return self._tag == 'tfa_change_backup_phone' - - def is_tfa_change_status(self): - """ - Check if the union tag is ``tfa_change_status``. - - :rtype: bool - """ - return self._tag == 'tfa_change_status' - - def is_tfa_remove_backup_phone(self): - """ - Check if the union tag is ``tfa_remove_backup_phone``. - - :rtype: bool - """ - return self._tag == 'tfa_remove_backup_phone' - - def is_tfa_remove_security_key(self): - """ - Check if the union tag is ``tfa_remove_security_key``. - - :rtype: bool - """ - return self._tag == 'tfa_remove_security_key' - - def is_tfa_reset(self): - """ - Check if the union tag is ``tfa_reset``. - - :rtype: bool - """ - return self._tag == 'tfa_reset' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'EventType(%r, %r)' % (self._tag, self._value) - -EventType_validator = bv.Union(EventType) - -class ExtendedVersionHistoryChangePolicyDetails(object): - """ - Accepted or opted out of extended version history. - - :ivar new_value: New extended version history policy. - :ivar previous_value: Previous extended version history policy. Might be - missing due to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New extended version history policy. - - :rtype: ExtendedVersionHistoryPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous extended version history policy. Might be missing due to - historical data gap. - - :rtype: ExtendedVersionHistoryPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'ExtendedVersionHistoryChangePolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -ExtendedVersionHistoryChangePolicyDetails_validator = bv.Struct(ExtendedVersionHistoryChangePolicyDetails) - -class ExtendedVersionHistoryPolicy(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - explicitly_limited = None - # Attribute is overwritten below the class definition - explicitly_unlimited = None - # Attribute is overwritten below the class definition - implicitly_limited = None - # Attribute is overwritten below the class definition - other = None - - def is_explicitly_limited(self): - """ - Check if the union tag is ``explicitly_limited``. - - :rtype: bool - """ - return self._tag == 'explicitly_limited' - - def is_explicitly_unlimited(self): - """ - Check if the union tag is ``explicitly_unlimited``. - - :rtype: bool - """ - return self._tag == 'explicitly_unlimited' - - def is_implicitly_limited(self): - """ - Check if the union tag is ``implicitly_limited``. - - :rtype: bool - """ - return self._tag == 'implicitly_limited' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'ExtendedVersionHistoryPolicy(%r, %r)' % (self._tag, self._value) - -ExtendedVersionHistoryPolicy_validator = bv.Union(ExtendedVersionHistoryPolicy) - -class FailureDetailsLogInfo(object): - """ - Provides details about a failure - - :ivar user_friendly_message: A user friendly explanation of the error. Might - be missing due to historical data gap. - :ivar technical_error_message: A technical explanation of the error. This is - relevant for some errors. - """ - - __slots__ = [ - '_user_friendly_message_value', - '_user_friendly_message_present', - '_technical_error_message_value', - '_technical_error_message_present', - ] - - _has_required_fields = False - - def __init__(self, - user_friendly_message=None, - technical_error_message=None): - self._user_friendly_message_value = None - self._user_friendly_message_present = False - self._technical_error_message_value = None - self._technical_error_message_present = False - if user_friendly_message is not None: - self.user_friendly_message = user_friendly_message - if technical_error_message is not None: - self.technical_error_message = technical_error_message - - @property - def user_friendly_message(self): - """ - A user friendly explanation of the error. Might be missing due to - historical data gap. - - :rtype: str - """ - if self._user_friendly_message_present: - return self._user_friendly_message_value - else: - return None - - @user_friendly_message.setter - def user_friendly_message(self, val): - if val is None: - del self.user_friendly_message - return - val = self._user_friendly_message_validator.validate(val) - self._user_friendly_message_value = val - self._user_friendly_message_present = True - - @user_friendly_message.deleter - def user_friendly_message(self): - self._user_friendly_message_value = None - self._user_friendly_message_present = False - - @property - def technical_error_message(self): - """ - A technical explanation of the error. This is relevant for some errors. - - :rtype: str - """ - if self._technical_error_message_present: - return self._technical_error_message_value - else: - return None - - @technical_error_message.setter - def technical_error_message(self, val): - if val is None: - del self.technical_error_message - return - val = self._technical_error_message_validator.validate(val) - self._technical_error_message_value = val - self._technical_error_message_present = True - - @technical_error_message.deleter - def technical_error_message(self): - self._technical_error_message_value = None - self._technical_error_message_present = False - - def __repr__(self): - return 'FailureDetailsLogInfo(user_friendly_message={!r}, technical_error_message={!r})'.format( - self._user_friendly_message_value, - self._technical_error_message_value, - ) - -FailureDetailsLogInfo_validator = bv.Struct(FailureDetailsLogInfo) - -class FileAddCommentDetails(object): - """ - Added a file comment. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar comment_text: Comment text. Might be missing due to historical data - gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_comment_text_value', - '_comment_text_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - comment_text=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._comment_text_value = None - self._comment_text_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if comment_text is not None: - self.comment_text = comment_text - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def comment_text(self): - """ - Comment text. Might be missing due to historical data gap. - - :rtype: str - """ - if self._comment_text_present: - return self._comment_text_value - else: - return None - - @comment_text.setter - def comment_text(self, val): - if val is None: - del self.comment_text - return - val = self._comment_text_validator.validate(val) - self._comment_text_value = val - self._comment_text_present = True - - @comment_text.deleter - def comment_text(self): - self._comment_text_value = None - self._comment_text_present = False - - def __repr__(self): - return 'FileAddCommentDetails(target_asset_index={!r}, comment_text={!r})'.format( - self._target_asset_index_value, - self._comment_text_value, - ) - -FileAddCommentDetails_validator = bv.Struct(FileAddCommentDetails) - -class FileAddDetails(object): - """ - Added files and/or folders. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'FileAddDetails()' - -FileAddDetails_validator = bv.Struct(FileAddDetails) - -class FileChangeCommentSubscriptionDetails(object): - """ - Subscribed to or unsubscribed from comment notifications for file. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar new_value: New file comment subscription. - :ivar previous_value: Previous file comment subscription. Might be missing - due to historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - new_value=None, - previous_value=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def new_value(self): - """ - New file comment subscription. - - :rtype: FileCommentNotificationPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous file comment subscription. Might be missing due to historical - data gap. - - :rtype: FileCommentNotificationPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'FileChangeCommentSubscriptionDetails(target_asset_index={!r}, new_value={!r}, previous_value={!r})'.format( - self._target_asset_index_value, - self._new_value_value, - self._previous_value_value, - ) - -FileChangeCommentSubscriptionDetails_validator = bv.Struct(FileChangeCommentSubscriptionDetails) - -class FileCommentNotificationPolicy(bb.Union): - """ - Enable or disable file comments notifications - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - disabled = None - # Attribute is overwritten below the class definition - enabled = None - # Attribute is overwritten below the class definition - other = None - - def is_disabled(self): - """ - Check if the union tag is ``disabled``. - - :rtype: bool - """ - return self._tag == 'disabled' - - def is_enabled(self): - """ - Check if the union tag is ``enabled``. - - :rtype: bool - """ - return self._tag == 'enabled' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'FileCommentNotificationPolicy(%r, %r)' % (self._tag, self._value) - -FileCommentNotificationPolicy_validator = bv.Union(FileCommentNotificationPolicy) - -class FileCommentsChangePolicyDetails(object): - """ - Enabled or disabled commenting on team files. - - :ivar new_value: New commenting on team files policy. - :ivar previous_value: Previous commenting on team files policy. Might be - missing due to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New commenting on team files policy. - - :rtype: FileCommentsPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous commenting on team files policy. Might be missing due to - historical data gap. - - :rtype: FileCommentsPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'FileCommentsChangePolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -FileCommentsChangePolicyDetails_validator = bv.Struct(FileCommentsChangePolicyDetails) - -class FileCommentsPolicy(bb.Union): - """ - File comments policy - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - disabled = None - # Attribute is overwritten below the class definition - enabled = None - # Attribute is overwritten below the class definition - other = None - - def is_disabled(self): - """ - Check if the union tag is ``disabled``. - - :rtype: bool - """ - return self._tag == 'disabled' - - def is_enabled(self): - """ - Check if the union tag is ``enabled``. - - :rtype: bool - """ - return self._tag == 'enabled' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'FileCommentsPolicy(%r, %r)' % (self._tag, self._value) - -FileCommentsPolicy_validator = bv.Union(FileCommentsPolicy) - -class FileCopyDetails(object): - """ - Copied files and/or folders. - - :ivar relocate_action_details: Relocate action details. - """ - - __slots__ = [ - '_relocate_action_details_value', - '_relocate_action_details_present', - ] - - _has_required_fields = True - - def __init__(self, - relocate_action_details=None): - self._relocate_action_details_value = None - self._relocate_action_details_present = False - if relocate_action_details is not None: - self.relocate_action_details = relocate_action_details - - @property - def relocate_action_details(self): - """ - Relocate action details. - - :rtype: list of [RelocateAssetReferencesLogInfo] - """ - if self._relocate_action_details_present: - return self._relocate_action_details_value - else: - raise AttributeError("missing required field 'relocate_action_details'") - - @relocate_action_details.setter - def relocate_action_details(self, val): - val = self._relocate_action_details_validator.validate(val) - self._relocate_action_details_value = val - self._relocate_action_details_present = True - - @relocate_action_details.deleter - def relocate_action_details(self): - self._relocate_action_details_value = None - self._relocate_action_details_present = False - - def __repr__(self): - return 'FileCopyDetails(relocate_action_details={!r})'.format( - self._relocate_action_details_value, - ) - -FileCopyDetails_validator = bv.Struct(FileCopyDetails) - -class FileDeleteCommentDetails(object): - """ - Deleted a file comment. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar comment_text: Comment text. Might be missing due to historical data - gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_comment_text_value', - '_comment_text_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - comment_text=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._comment_text_value = None - self._comment_text_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if comment_text is not None: - self.comment_text = comment_text - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def comment_text(self): - """ - Comment text. Might be missing due to historical data gap. - - :rtype: str - """ - if self._comment_text_present: - return self._comment_text_value - else: - return None - - @comment_text.setter - def comment_text(self, val): - if val is None: - del self.comment_text - return - val = self._comment_text_validator.validate(val) - self._comment_text_value = val - self._comment_text_present = True - - @comment_text.deleter - def comment_text(self): - self._comment_text_value = None - self._comment_text_present = False - - def __repr__(self): - return 'FileDeleteCommentDetails(target_asset_index={!r}, comment_text={!r})'.format( - self._target_asset_index_value, - self._comment_text_value, - ) - -FileDeleteCommentDetails_validator = bv.Struct(FileDeleteCommentDetails) - -class FileDeleteDetails(object): - """ - Deleted files and/or folders. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'FileDeleteDetails()' - -FileDeleteDetails_validator = bv.Struct(FileDeleteDetails) - -class FileDownloadDetails(object): - """ - Downloaded files and/or folders. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'FileDownloadDetails()' - -FileDownloadDetails_validator = bv.Struct(FileDownloadDetails) - -class FileEditDetails(object): - """ - Edited files. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'FileEditDetails()' - -FileEditDetails_validator = bv.Struct(FileEditDetails) - -class FileGetCopyReferenceDetails(object): - """ - Create a copy reference to a file or folder. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'FileGetCopyReferenceDetails()' - -FileGetCopyReferenceDetails_validator = bv.Struct(FileGetCopyReferenceDetails) - -class FileLikeCommentDetails(object): - """ - Liked a file comment. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar comment_text: Comment text. Might be missing due to historical data - gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_comment_text_value', - '_comment_text_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - comment_text=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._comment_text_value = None - self._comment_text_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if comment_text is not None: - self.comment_text = comment_text - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def comment_text(self): - """ - Comment text. Might be missing due to historical data gap. - - :rtype: str - """ - if self._comment_text_present: - return self._comment_text_value - else: - return None - - @comment_text.setter - def comment_text(self, val): - if val is None: - del self.comment_text - return - val = self._comment_text_validator.validate(val) - self._comment_text_value = val - self._comment_text_present = True - - @comment_text.deleter - def comment_text(self): - self._comment_text_value = None - self._comment_text_present = False - - def __repr__(self): - return 'FileLikeCommentDetails(target_asset_index={!r}, comment_text={!r})'.format( - self._target_asset_index_value, - self._comment_text_value, - ) - -FileLikeCommentDetails_validator = bv.Struct(FileLikeCommentDetails) - -class FileOrFolderLogInfo(object): - """ - Generic information relevant both for files and folders - - :ivar path: Path relative to event context. - :ivar display_name: Display name. Might be missing due to historical data - gap. - :ivar file_id: Unique ID. Might be missing due to historical data gap. - """ - - __slots__ = [ - '_path_value', - '_path_present', - '_display_name_value', - '_display_name_present', - '_file_id_value', - '_file_id_present', - ] - - _has_required_fields = True - - def __init__(self, - path=None, - display_name=None, - file_id=None): - self._path_value = None - self._path_present = False - self._display_name_value = None - self._display_name_present = False - self._file_id_value = None - self._file_id_present = False - if path is not None: - self.path = path - if display_name is not None: - self.display_name = display_name - if file_id is not None: - self.file_id = file_id - - @property - def path(self): - """ - Path relative to event context. - - :rtype: PathLogInfo - """ - if self._path_present: - return self._path_value - else: - raise AttributeError("missing required field 'path'") - - @path.setter - def path(self, val): - self._path_validator.validate_type_only(val) - self._path_value = val - self._path_present = True - - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def display_name(self): - """ - Display name. Might be missing due to historical data gap. - - :rtype: str - """ - if self._display_name_present: - return self._display_name_value - else: - return None - - @display_name.setter - def display_name(self, val): - if val is None: - del self.display_name - return - val = self._display_name_validator.validate(val) - self._display_name_value = val - self._display_name_present = True - - @display_name.deleter - def display_name(self): - self._display_name_value = None - self._display_name_present = False - - @property - def file_id(self): - """ - Unique ID. Might be missing due to historical data gap. - - :rtype: str - """ - if self._file_id_present: - return self._file_id_value - else: - return None - - @file_id.setter - def file_id(self, val): - if val is None: - del self.file_id - return - val = self._file_id_validator.validate(val) - self._file_id_value = val - self._file_id_present = True - - @file_id.deleter - def file_id(self): - self._file_id_value = None - self._file_id_present = False - - def __repr__(self): - return 'FileOrFolderLogInfo(path={!r}, display_name={!r}, file_id={!r})'.format( - self._path_value, - self._display_name_value, - self._file_id_value, - ) - -FileOrFolderLogInfo_validator = bv.Struct(FileOrFolderLogInfo) - -class FileLogInfo(FileOrFolderLogInfo): - """ - File's logged information. - """ - - __slots__ = [ - ] - - _has_required_fields = True - - def __init__(self, - path=None, - display_name=None, - file_id=None): - super(FileLogInfo, self).__init__(path, - display_name, - file_id) - - def __repr__(self): - return 'FileLogInfo(path={!r}, display_name={!r}, file_id={!r})'.format( - self._path_value, - self._display_name_value, - self._file_id_value, - ) - -FileLogInfo_validator = bv.Struct(FileLogInfo) - -class FileMoveDetails(object): - """ - Moved files and/or folders. - - :ivar relocate_action_details: Relocate action details. - """ - - __slots__ = [ - '_relocate_action_details_value', - '_relocate_action_details_present', - ] - - _has_required_fields = True - - def __init__(self, - relocate_action_details=None): - self._relocate_action_details_value = None - self._relocate_action_details_present = False - if relocate_action_details is not None: - self.relocate_action_details = relocate_action_details - - @property - def relocate_action_details(self): - """ - Relocate action details. - - :rtype: list of [RelocateAssetReferencesLogInfo] - """ - if self._relocate_action_details_present: - return self._relocate_action_details_value - else: - raise AttributeError("missing required field 'relocate_action_details'") - - @relocate_action_details.setter - def relocate_action_details(self, val): - val = self._relocate_action_details_validator.validate(val) - self._relocate_action_details_value = val - self._relocate_action_details_present = True - - @relocate_action_details.deleter - def relocate_action_details(self): - self._relocate_action_details_value = None - self._relocate_action_details_present = False - - def __repr__(self): - return 'FileMoveDetails(relocate_action_details={!r})'.format( - self._relocate_action_details_value, - ) - -FileMoveDetails_validator = bv.Struct(FileMoveDetails) - -class FilePermanentlyDeleteDetails(object): - """ - Permanently deleted files and/or folders. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'FilePermanentlyDeleteDetails()' - -FilePermanentlyDeleteDetails_validator = bv.Struct(FilePermanentlyDeleteDetails) - -class FilePreviewDetails(object): - """ - Previewed files and/or folders. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'FilePreviewDetails()' - -FilePreviewDetails_validator = bv.Struct(FilePreviewDetails) - -class FileRenameDetails(object): - """ - Renamed files and/or folders. - - :ivar relocate_action_details: Relocate action details. - """ - - __slots__ = [ - '_relocate_action_details_value', - '_relocate_action_details_present', - ] - - _has_required_fields = True - - def __init__(self, - relocate_action_details=None): - self._relocate_action_details_value = None - self._relocate_action_details_present = False - if relocate_action_details is not None: - self.relocate_action_details = relocate_action_details - - @property - def relocate_action_details(self): - """ - Relocate action details. - - :rtype: list of [RelocateAssetReferencesLogInfo] - """ - if self._relocate_action_details_present: - return self._relocate_action_details_value - else: - raise AttributeError("missing required field 'relocate_action_details'") - - @relocate_action_details.setter - def relocate_action_details(self, val): - val = self._relocate_action_details_validator.validate(val) - self._relocate_action_details_value = val - self._relocate_action_details_present = True - - @relocate_action_details.deleter - def relocate_action_details(self): - self._relocate_action_details_value = None - self._relocate_action_details_present = False - - def __repr__(self): - return 'FileRenameDetails(relocate_action_details={!r})'.format( - self._relocate_action_details_value, - ) - -FileRenameDetails_validator = bv.Struct(FileRenameDetails) - -class FileRequestAddDeadlineDetails(object): - """ - Added a deadline to a file request. - - :ivar request_title: File request title. - """ - - __slots__ = [ - '_request_title_value', - '_request_title_present', - ] - - _has_required_fields = False - - def __init__(self, - request_title=None): - self._request_title_value = None - self._request_title_present = False - if request_title is not None: - self.request_title = request_title - - @property - def request_title(self): - """ - File request title. - - :rtype: str - """ - if self._request_title_present: - return self._request_title_value - else: - return None - - @request_title.setter - def request_title(self, val): - if val is None: - del self.request_title - return - val = self._request_title_validator.validate(val) - self._request_title_value = val - self._request_title_present = True - - @request_title.deleter - def request_title(self): - self._request_title_value = None - self._request_title_present = False - - def __repr__(self): - return 'FileRequestAddDeadlineDetails(request_title={!r})'.format( - self._request_title_value, - ) - -FileRequestAddDeadlineDetails_validator = bv.Struct(FileRequestAddDeadlineDetails) - -class FileRequestChangeFolderDetails(object): - """ - Changed the file request folder. - - :ivar request_title: File request title. - """ - - __slots__ = [ - '_request_title_value', - '_request_title_present', - ] - - _has_required_fields = False - - def __init__(self, - request_title=None): - self._request_title_value = None - self._request_title_present = False - if request_title is not None: - self.request_title = request_title - - @property - def request_title(self): - """ - File request title. - - :rtype: str - """ - if self._request_title_present: - return self._request_title_value - else: - return None - - @request_title.setter - def request_title(self, val): - if val is None: - del self.request_title - return - val = self._request_title_validator.validate(val) - self._request_title_value = val - self._request_title_present = True - - @request_title.deleter - def request_title(self): - self._request_title_value = None - self._request_title_present = False - - def __repr__(self): - return 'FileRequestChangeFolderDetails(request_title={!r})'.format( - self._request_title_value, - ) - -FileRequestChangeFolderDetails_validator = bv.Struct(FileRequestChangeFolderDetails) - -class FileRequestChangeTitleDetails(object): - """ - Change the file request title. - - :ivar request_title: File request title. - """ - - __slots__ = [ - '_request_title_value', - '_request_title_present', - ] - - _has_required_fields = False - - def __init__(self, - request_title=None): - self._request_title_value = None - self._request_title_present = False - if request_title is not None: - self.request_title = request_title - - @property - def request_title(self): - """ - File request title. - - :rtype: str - """ - if self._request_title_present: - return self._request_title_value - else: - return None - - @request_title.setter - def request_title(self, val): - if val is None: - del self.request_title - return - val = self._request_title_validator.validate(val) - self._request_title_value = val - self._request_title_present = True - - @request_title.deleter - def request_title(self): - self._request_title_value = None - self._request_title_present = False - - def __repr__(self): - return 'FileRequestChangeTitleDetails(request_title={!r})'.format( - self._request_title_value, - ) - -FileRequestChangeTitleDetails_validator = bv.Struct(FileRequestChangeTitleDetails) - -class FileRequestCloseDetails(object): - """ - Closed a file request. - - :ivar request_title: File request title. - """ - - __slots__ = [ - '_request_title_value', - '_request_title_present', - ] - - _has_required_fields = False - - def __init__(self, - request_title=None): - self._request_title_value = None - self._request_title_present = False - if request_title is not None: - self.request_title = request_title - - @property - def request_title(self): - """ - File request title. - - :rtype: str - """ - if self._request_title_present: - return self._request_title_value - else: - return None - - @request_title.setter - def request_title(self, val): - if val is None: - del self.request_title - return - val = self._request_title_validator.validate(val) - self._request_title_value = val - self._request_title_present = True - - @request_title.deleter - def request_title(self): - self._request_title_value = None - self._request_title_present = False - - def __repr__(self): - return 'FileRequestCloseDetails(request_title={!r})'.format( - self._request_title_value, - ) - -FileRequestCloseDetails_validator = bv.Struct(FileRequestCloseDetails) - -class FileRequestCreateDetails(object): - """ - Created a file request. - - :ivar request_title: File request title. - """ - - __slots__ = [ - '_request_title_value', - '_request_title_present', - ] - - _has_required_fields = False - - def __init__(self, - request_title=None): - self._request_title_value = None - self._request_title_present = False - if request_title is not None: - self.request_title = request_title - - @property - def request_title(self): - """ - File request title. - - :rtype: str - """ - if self._request_title_present: - return self._request_title_value - else: - return None - - @request_title.setter - def request_title(self, val): - if val is None: - del self.request_title - return - val = self._request_title_validator.validate(val) - self._request_title_value = val - self._request_title_present = True - - @request_title.deleter - def request_title(self): - self._request_title_value = None - self._request_title_present = False - - def __repr__(self): - return 'FileRequestCreateDetails(request_title={!r})'.format( - self._request_title_value, - ) - -FileRequestCreateDetails_validator = bv.Struct(FileRequestCreateDetails) - -class FileRequestReceiveFileDetails(object): - """ - Received files for a file request. - - :ivar request_title: File request title. - :ivar submitted_file_names: Submitted file names. - """ - - __slots__ = [ - '_request_title_value', - '_request_title_present', - '_submitted_file_names_value', - '_submitted_file_names_present', - ] - - _has_required_fields = True - - def __init__(self, - submitted_file_names=None, - request_title=None): - self._request_title_value = None - self._request_title_present = False - self._submitted_file_names_value = None - self._submitted_file_names_present = False - if request_title is not None: - self.request_title = request_title - if submitted_file_names is not None: - self.submitted_file_names = submitted_file_names - - @property - def request_title(self): - """ - File request title. - - :rtype: str - """ - if self._request_title_present: - return self._request_title_value - else: - return None - - @request_title.setter - def request_title(self, val): - if val is None: - del self.request_title - return - val = self._request_title_validator.validate(val) - self._request_title_value = val - self._request_title_present = True - - @request_title.deleter - def request_title(self): - self._request_title_value = None - self._request_title_present = False - - @property - def submitted_file_names(self): - """ - Submitted file names. - - :rtype: list of [str] - """ - if self._submitted_file_names_present: - return self._submitted_file_names_value - else: - raise AttributeError("missing required field 'submitted_file_names'") - - @submitted_file_names.setter - def submitted_file_names(self, val): - val = self._submitted_file_names_validator.validate(val) - self._submitted_file_names_value = val - self._submitted_file_names_present = True - - @submitted_file_names.deleter - def submitted_file_names(self): - self._submitted_file_names_value = None - self._submitted_file_names_present = False - - def __repr__(self): - return 'FileRequestReceiveFileDetails(submitted_file_names={!r}, request_title={!r})'.format( - self._submitted_file_names_value, - self._request_title_value, - ) - -FileRequestReceiveFileDetails_validator = bv.Struct(FileRequestReceiveFileDetails) - -class FileRequestRemoveDeadlineDetails(object): - """ - Removed the file request deadline. - - :ivar request_title: File request title. - """ - - __slots__ = [ - '_request_title_value', - '_request_title_present', - ] - - _has_required_fields = False - - def __init__(self, - request_title=None): - self._request_title_value = None - self._request_title_present = False - if request_title is not None: - self.request_title = request_title - - @property - def request_title(self): - """ - File request title. - - :rtype: str - """ - if self._request_title_present: - return self._request_title_value - else: - return None - - @request_title.setter - def request_title(self, val): - if val is None: - del self.request_title - return - val = self._request_title_validator.validate(val) - self._request_title_value = val - self._request_title_present = True - - @request_title.deleter - def request_title(self): - self._request_title_value = None - self._request_title_present = False - - def __repr__(self): - return 'FileRequestRemoveDeadlineDetails(request_title={!r})'.format( - self._request_title_value, - ) - -FileRequestRemoveDeadlineDetails_validator = bv.Struct(FileRequestRemoveDeadlineDetails) - -class FileRequestSendDetails(object): - """ - Sent file request to users via email. - - :ivar request_title: File request title. - """ - - __slots__ = [ - '_request_title_value', - '_request_title_present', - ] - - _has_required_fields = False - - def __init__(self, - request_title=None): - self._request_title_value = None - self._request_title_present = False - if request_title is not None: - self.request_title = request_title - - @property - def request_title(self): - """ - File request title. - - :rtype: str - """ - if self._request_title_present: - return self._request_title_value - else: - return None - - @request_title.setter - def request_title(self, val): - if val is None: - del self.request_title - return - val = self._request_title_validator.validate(val) - self._request_title_value = val - self._request_title_present = True - - @request_title.deleter - def request_title(self): - self._request_title_value = None - self._request_title_present = False - - def __repr__(self): - return 'FileRequestSendDetails(request_title={!r})'.format( - self._request_title_value, - ) - -FileRequestSendDetails_validator = bv.Struct(FileRequestSendDetails) - -class FileRequestsChangePolicyDetails(object): - """ - Enabled or disabled file requests. - - :ivar new_value: New file requests policy. - :ivar previous_value: Previous file requests policy. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New file requests policy. - - :rtype: FileRequestsPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous file requests policy. Might be missing due to historical data - gap. - - :rtype: FileRequestsPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'FileRequestsChangePolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -FileRequestsChangePolicyDetails_validator = bv.Struct(FileRequestsChangePolicyDetails) - -class FileRequestsEmailsEnabledDetails(object): - """ - Enabled file request emails for everyone. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'FileRequestsEmailsEnabledDetails()' - -FileRequestsEmailsEnabledDetails_validator = bv.Struct(FileRequestsEmailsEnabledDetails) - -class FileRequestsEmailsRestrictedToTeamOnlyDetails(object): - """ - Allowed file request emails for the team. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'FileRequestsEmailsRestrictedToTeamOnlyDetails()' - -FileRequestsEmailsRestrictedToTeamOnlyDetails_validator = bv.Struct(FileRequestsEmailsRestrictedToTeamOnlyDetails) - -class FileRequestsPolicy(bb.Union): - """ - File requests policy - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - disabled = None - # Attribute is overwritten below the class definition - enabled = None - # Attribute is overwritten below the class definition - other = None - - def is_disabled(self): - """ - Check if the union tag is ``disabled``. - - :rtype: bool - """ - return self._tag == 'disabled' - - def is_enabled(self): - """ - Check if the union tag is ``enabled``. - - :rtype: bool - """ - return self._tag == 'enabled' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'FileRequestsPolicy(%r, %r)' % (self._tag, self._value) - -FileRequestsPolicy_validator = bv.Union(FileRequestsPolicy) - -class FileResolveCommentDetails(object): - """ - Resolved a file comment. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar comment_text: Comment text. Might be missing due to historical data - gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_comment_text_value', - '_comment_text_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - comment_text=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._comment_text_value = None - self._comment_text_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if comment_text is not None: - self.comment_text = comment_text - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def comment_text(self): - """ - Comment text. Might be missing due to historical data gap. - - :rtype: str - """ - if self._comment_text_present: - return self._comment_text_value - else: - return None - - @comment_text.setter - def comment_text(self, val): - if val is None: - del self.comment_text - return - val = self._comment_text_validator.validate(val) - self._comment_text_value = val - self._comment_text_present = True - - @comment_text.deleter - def comment_text(self): - self._comment_text_value = None - self._comment_text_present = False - - def __repr__(self): - return 'FileResolveCommentDetails(target_asset_index={!r}, comment_text={!r})'.format( - self._target_asset_index_value, - self._comment_text_value, - ) - -FileResolveCommentDetails_validator = bv.Struct(FileResolveCommentDetails) - -class FileRestoreDetails(object): - """ - Restored deleted files and/or folders. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'FileRestoreDetails()' - -FileRestoreDetails_validator = bv.Struct(FileRestoreDetails) - -class FileRevertDetails(object): - """ - Reverted files to a previous version. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'FileRevertDetails()' - -FileRevertDetails_validator = bv.Struct(FileRevertDetails) - -class FileRollbackChangesDetails(object): - """ - Rolled back file change location changes. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'FileRollbackChangesDetails()' - -FileRollbackChangesDetails_validator = bv.Struct(FileRollbackChangesDetails) - -class FileSaveCopyReferenceDetails(object): - """ - Save a file or folder using a copy reference. - - :ivar relocate_action_details: Relocate action details. - """ - - __slots__ = [ - '_relocate_action_details_value', - '_relocate_action_details_present', - ] - - _has_required_fields = True - - def __init__(self, - relocate_action_details=None): - self._relocate_action_details_value = None - self._relocate_action_details_present = False - if relocate_action_details is not None: - self.relocate_action_details = relocate_action_details - - @property - def relocate_action_details(self): - """ - Relocate action details. - - :rtype: list of [RelocateAssetReferencesLogInfo] - """ - if self._relocate_action_details_present: - return self._relocate_action_details_value - else: - raise AttributeError("missing required field 'relocate_action_details'") - - @relocate_action_details.setter - def relocate_action_details(self, val): - val = self._relocate_action_details_validator.validate(val) - self._relocate_action_details_value = val - self._relocate_action_details_present = True - - @relocate_action_details.deleter - def relocate_action_details(self): - self._relocate_action_details_value = None - self._relocate_action_details_present = False - - def __repr__(self): - return 'FileSaveCopyReferenceDetails(relocate_action_details={!r})'.format( - self._relocate_action_details_value, - ) - -FileSaveCopyReferenceDetails_validator = bv.Struct(FileSaveCopyReferenceDetails) - -class FileUnlikeCommentDetails(object): - """ - Unliked a file comment. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar comment_text: Comment text. Might be missing due to historical data - gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_comment_text_value', - '_comment_text_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - comment_text=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._comment_text_value = None - self._comment_text_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if comment_text is not None: - self.comment_text = comment_text - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def comment_text(self): - """ - Comment text. Might be missing due to historical data gap. - - :rtype: str - """ - if self._comment_text_present: - return self._comment_text_value - else: - return None - - @comment_text.setter - def comment_text(self, val): - if val is None: - del self.comment_text - return - val = self._comment_text_validator.validate(val) - self._comment_text_value = val - self._comment_text_present = True - - @comment_text.deleter - def comment_text(self): - self._comment_text_value = None - self._comment_text_present = False - - def __repr__(self): - return 'FileUnlikeCommentDetails(target_asset_index={!r}, comment_text={!r})'.format( - self._target_asset_index_value, - self._comment_text_value, - ) - -FileUnlikeCommentDetails_validator = bv.Struct(FileUnlikeCommentDetails) - -class FileUnresolveCommentDetails(object): - """ - Unresolved a file comment. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar comment_text: Comment text. Might be missing due to historical data - gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_comment_text_value', - '_comment_text_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - comment_text=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._comment_text_value = None - self._comment_text_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if comment_text is not None: - self.comment_text = comment_text - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def comment_text(self): - """ - Comment text. Might be missing due to historical data gap. - - :rtype: str - """ - if self._comment_text_present: - return self._comment_text_value - else: - return None - - @comment_text.setter - def comment_text(self, val): - if val is None: - del self.comment_text - return - val = self._comment_text_validator.validate(val) - self._comment_text_value = val - self._comment_text_present = True - - @comment_text.deleter - def comment_text(self): - self._comment_text_value = None - self._comment_text_present = False - - def __repr__(self): - return 'FileUnresolveCommentDetails(target_asset_index={!r}, comment_text={!r})'.format( - self._target_asset_index_value, - self._comment_text_value, - ) - -FileUnresolveCommentDetails_validator = bv.Struct(FileUnresolveCommentDetails) - -class FolderLogInfo(FileOrFolderLogInfo): - """ - Folder's logged information. - """ - - __slots__ = [ - ] - - _has_required_fields = True - - def __init__(self, - path=None, - display_name=None, - file_id=None): - super(FolderLogInfo, self).__init__(path, - display_name, - file_id) - - def __repr__(self): - return 'FolderLogInfo(path={!r}, display_name={!r}, file_id={!r})'.format( - self._path_value, - self._display_name_value, - self._file_id_value, - ) - -FolderLogInfo_validator = bv.Struct(FolderLogInfo) - -class GeoLocationLogInfo(object): - """ - Geographic location details. - - :ivar city: City name. - :ivar region: Region name. - :ivar country: Country code. - :ivar ip_address: IP address. - """ - - __slots__ = [ - '_city_value', - '_city_present', - '_region_value', - '_region_present', - '_country_value', - '_country_present', - '_ip_address_value', - '_ip_address_present', - ] - - _has_required_fields = True - - def __init__(self, - ip_address=None, - city=None, - region=None, - country=None): - self._city_value = None - self._city_present = False - self._region_value = None - self._region_present = False - self._country_value = None - self._country_present = False - self._ip_address_value = None - self._ip_address_present = False - if city is not None: - self.city = city - if region is not None: - self.region = region - if country is not None: - self.country = country - if ip_address is not None: - self.ip_address = ip_address - - @property - def city(self): - """ - City name. - - :rtype: str - """ - if self._city_present: - return self._city_value - else: - return None - - @city.setter - def city(self, val): - if val is None: - del self.city - return - val = self._city_validator.validate(val) - self._city_value = val - self._city_present = True - - @city.deleter - def city(self): - self._city_value = None - self._city_present = False - - @property - def region(self): - """ - Region name. - - :rtype: str - """ - if self._region_present: - return self._region_value - else: - return None - - @region.setter - def region(self, val): - if val is None: - del self.region - return - val = self._region_validator.validate(val) - self._region_value = val - self._region_present = True - - @region.deleter - def region(self): - self._region_value = None - self._region_present = False - - @property - def country(self): - """ - Country code. - - :rtype: str - """ - if self._country_present: - return self._country_value - else: - return None - - @country.setter - def country(self, val): - if val is None: - del self.country - return - val = self._country_validator.validate(val) - self._country_value = val - self._country_present = True - - @country.deleter - def country(self): - self._country_value = None - self._country_present = False - - @property - def ip_address(self): - """ - IP address. - - :rtype: str - """ - if self._ip_address_present: - return self._ip_address_value - else: - raise AttributeError("missing required field 'ip_address'") - - @ip_address.setter - def ip_address(self, val): - val = self._ip_address_validator.validate(val) - self._ip_address_value = val - self._ip_address_present = True - - @ip_address.deleter - def ip_address(self): - self._ip_address_value = None - self._ip_address_present = False - - def __repr__(self): - return 'GeoLocationLogInfo(ip_address={!r}, city={!r}, region={!r}, country={!r})'.format( - self._ip_address_value, - self._city_value, - self._region_value, - self._country_value, - ) - -GeoLocationLogInfo_validator = bv.Struct(GeoLocationLogInfo) - -class GetTeamEventsArg(object): - """ - :ivar limit: Number of results to return per call. - :ivar account_id: Filter the events by account ID. Return ony events with - this account_id as either Actor, Context, or Participants. - :ivar time: Filter by time range. - :ivar category: Filter the returned events to a single category. - """ - - __slots__ = [ - '_limit_value', - '_limit_present', - '_account_id_value', - '_account_id_present', - '_time_value', - '_time_present', - '_category_value', - '_category_present', - ] - - _has_required_fields = False - - def __init__(self, - limit=None, - account_id=None, - time=None, - category=None): - self._limit_value = None - self._limit_present = False - self._account_id_value = None - self._account_id_present = False - self._time_value = None - self._time_present = False - self._category_value = None - self._category_present = False - if limit is not None: - self.limit = limit - if account_id is not None: - self.account_id = account_id - if time is not None: - self.time = time - if category is not None: - self.category = category - - @property - def limit(self): - """ - Number of results to return per call. - - :rtype: long - """ - if self._limit_present: - return self._limit_value - else: - return 1000 - - @limit.setter - def limit(self, val): - val = self._limit_validator.validate(val) - self._limit_value = val - self._limit_present = True - - @limit.deleter - def limit(self): - self._limit_value = None - self._limit_present = False - - @property - def account_id(self): - """ - Filter the events by account ID. Return ony events with this account_id - as either Actor, Context, or Participants. - - :rtype: str - """ - if self._account_id_present: - return self._account_id_value - else: - return None - - @account_id.setter - def account_id(self, val): - if val is None: - del self.account_id - return - val = self._account_id_validator.validate(val) - self._account_id_value = val - self._account_id_present = True - - @account_id.deleter - def account_id(self): - self._account_id_value = None - self._account_id_present = False - - @property - def time(self): - """ - Filter by time range. - - :rtype: team_common.TimeRange_validator - """ - if self._time_present: - return self._time_value - else: - return None - - @time.setter - def time(self, val): - if val is None: - del self.time - return - self._time_validator.validate_type_only(val) - self._time_value = val - self._time_present = True - - @time.deleter - def time(self): - self._time_value = None - self._time_present = False - - @property - def category(self): - """ - Filter the returned events to a single category. - - :rtype: EventCategory - """ - if self._category_present: - return self._category_value - else: - return None - - @category.setter - def category(self, val): - if val is None: - del self.category - return - self._category_validator.validate_type_only(val) - self._category_value = val - self._category_present = True - - @category.deleter - def category(self): - self._category_value = None - self._category_present = False - - def __repr__(self): - return 'GetTeamEventsArg(limit={!r}, account_id={!r}, time={!r}, category={!r})'.format( - self._limit_value, - self._account_id_value, - self._time_value, - self._category_value, - ) - -GetTeamEventsArg_validator = bv.Struct(GetTeamEventsArg) - -class GetTeamEventsContinueArg(object): - """ - :ivar cursor: Indicates from what point to get the next set of events. - """ - - __slots__ = [ - '_cursor_value', - '_cursor_present', - ] - - _has_required_fields = True - - def __init__(self, - cursor=None): - self._cursor_value = None - self._cursor_present = False - if cursor is not None: - self.cursor = cursor - - @property - def cursor(self): - """ - Indicates from what point to get the next set of events. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - def __repr__(self): - return 'GetTeamEventsContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - -GetTeamEventsContinueArg_validator = bv.Struct(GetTeamEventsContinueArg) - -class GetTeamEventsContinueError(bb.Union): - """ - Errors that can be raised when calling - :meth:`dropbox.dropbox.Dropbox.team_log_get_events_continue`. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar bad_cursor: Bad cursor. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - bad_cursor = None - # Attribute is overwritten below the class definition - other = None - - def is_bad_cursor(self): - """ - Check if the union tag is ``bad_cursor``. - - :rtype: bool - """ - return self._tag == 'bad_cursor' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'GetTeamEventsContinueError(%r, %r)' % (self._tag, self._value) - -GetTeamEventsContinueError_validator = bv.Union(GetTeamEventsContinueError) - -class GetTeamEventsError(bb.Union): - """ - Errors that can be raised when calling - :meth:`dropbox.dropbox.Dropbox.team_log_get_events`. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar account_id_not_found: No user found matching the provided account_id. - :ivar invalid_time_range: Invalid time range. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - account_id_not_found = None - # Attribute is overwritten below the class definition - invalid_time_range = None - # Attribute is overwritten below the class definition - other = None - - def is_account_id_not_found(self): - """ - Check if the union tag is ``account_id_not_found``. - - :rtype: bool - """ - return self._tag == 'account_id_not_found' - - def is_invalid_time_range(self): - """ - Check if the union tag is ``invalid_time_range``. - - :rtype: bool - """ - return self._tag == 'invalid_time_range' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'GetTeamEventsError(%r, %r)' % (self._tag, self._value) - -GetTeamEventsError_validator = bv.Union(GetTeamEventsError) - -class GetTeamEventsResult(object): - """ - :ivar events: List of events. - :ivar cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_log_get_events_continue` to obtain - additional events. - :ivar has_more: Is true if there are additional events that have not been - returned yet. An additional call to - :meth:`dropbox.dropbox.Dropbox.team_log_get_events_continue` can - retrieve them. - """ - - __slots__ = [ - '_events_value', - '_events_present', - '_cursor_value', - '_cursor_present', - '_has_more_value', - '_has_more_present', - ] - - _has_required_fields = True - - def __init__(self, - events=None, - cursor=None, - has_more=None): - self._events_value = None - self._events_present = False - self._cursor_value = None - self._cursor_present = False - self._has_more_value = None - self._has_more_present = False - if events is not None: - self.events = events - if cursor is not None: - self.cursor = cursor - if has_more is not None: - self.has_more = has_more - - @property - def events(self): - """ - List of events. - - :rtype: list of [TeamEvent] - """ - if self._events_present: - return self._events_value - else: - raise AttributeError("missing required field 'events'") - - @events.setter - def events(self, val): - val = self._events_validator.validate(val) - self._events_value = val - self._events_present = True - - @events.deleter - def events(self): - self._events_value = None - self._events_present = False - - @property - def cursor(self): - """ - Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_log_get_events_continue` to obtain - additional events. - - :rtype: str - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") - - @cursor.setter - def cursor(self, val): - val = self._cursor_validator.validate(val) - self._cursor_value = val - self._cursor_present = True - - @cursor.deleter - def cursor(self): - self._cursor_value = None - self._cursor_present = False - - @property - def has_more(self): - """ - Is true if there are additional events that have not been returned yet. - An additional call to - :meth:`dropbox.dropbox.Dropbox.team_log_get_events_continue` can - retrieve them. - - :rtype: bool - """ - if self._has_more_present: - return self._has_more_value - else: - raise AttributeError("missing required field 'has_more'") - - @has_more.setter - def has_more(self, val): - val = self._has_more_validator.validate(val) - self._has_more_value = val - self._has_more_present = True - - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False - - def __repr__(self): - return 'GetTeamEventsResult(events={!r}, cursor={!r}, has_more={!r})'.format( - self._events_value, - self._cursor_value, - self._has_more_value, - ) - -GetTeamEventsResult_validator = bv.Struct(GetTeamEventsResult) - -class GoogleSsoChangePolicyDetails(object): - """ - Enabled or disabled Google single sign-on for the team. - - :ivar new_value: New Google single sign-on policy. - :ivar previous_value: Previous Google single sign-on policy. Might be - missing due to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New Google single sign-on policy. - - :rtype: GoogleSsoPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous Google single sign-on policy. Might be missing due to - historical data gap. - - :rtype: GoogleSsoPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'GoogleSsoChangePolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -GoogleSsoChangePolicyDetails_validator = bv.Struct(GoogleSsoChangePolicyDetails) - -class GoogleSsoPolicy(bb.Union): - """ - Google SSO policy - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - disabled = None - # Attribute is overwritten below the class definition - enabled = None - # Attribute is overwritten below the class definition - other = None - - def is_disabled(self): - """ - Check if the union tag is ``disabled``. - - :rtype: bool - """ - return self._tag == 'disabled' - - def is_enabled(self): - """ - Check if the union tag is ``enabled``. - - :rtype: bool - """ - return self._tag == 'enabled' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'GoogleSsoPolicy(%r, %r)' % (self._tag, self._value) - -GoogleSsoPolicy_validator = bv.Union(GoogleSsoPolicy) - -class GroupAddExternalIdDetails(object): - """ - Added an external ID for group. - - :ivar new_value: Current external id. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None): - self._new_value_value = None - self._new_value_present = False - if new_value is not None: - self.new_value = new_value - - @property - def new_value(self): - """ - Current external id. - - :rtype: str - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - val = self._new_value_validator.validate(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - def __repr__(self): - return 'GroupAddExternalIdDetails(new_value={!r})'.format( - self._new_value_value, - ) - -GroupAddExternalIdDetails_validator = bv.Struct(GroupAddExternalIdDetails) - -class GroupAddMemberDetails(object): - """ - Added team members to a group. - - :ivar is_group_owner: Is group owner. - """ - - __slots__ = [ - '_is_group_owner_value', - '_is_group_owner_present', - ] - - _has_required_fields = True - - def __init__(self, - is_group_owner=None): - self._is_group_owner_value = None - self._is_group_owner_present = False - if is_group_owner is not None: - self.is_group_owner = is_group_owner - - @property - def is_group_owner(self): - """ - Is group owner. - - :rtype: bool - """ - if self._is_group_owner_present: - return self._is_group_owner_value - else: - raise AttributeError("missing required field 'is_group_owner'") - - @is_group_owner.setter - def is_group_owner(self, val): - val = self._is_group_owner_validator.validate(val) - self._is_group_owner_value = val - self._is_group_owner_present = True - - @is_group_owner.deleter - def is_group_owner(self): - self._is_group_owner_value = None - self._is_group_owner_present = False - - def __repr__(self): - return 'GroupAddMemberDetails(is_group_owner={!r})'.format( - self._is_group_owner_value, - ) - -GroupAddMemberDetails_validator = bv.Struct(GroupAddMemberDetails) - -class GroupChangeExternalIdDetails(object): - """ - Changed the external ID for group. - - :ivar new_value: Current external id. - :ivar previous_value: Old external id. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - Current external id. - - :rtype: str - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - val = self._new_value_validator.validate(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Old external id. - - :rtype: str - """ - if self._previous_value_present: - return self._previous_value_value - else: - raise AttributeError("missing required field 'previous_value'") - - @previous_value.setter - def previous_value(self, val): - val = self._previous_value_validator.validate(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'GroupChangeExternalIdDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -GroupChangeExternalIdDetails_validator = bv.Struct(GroupChangeExternalIdDetails) - -class GroupChangeManagementTypeDetails(object): - """ - Changed group management type. - - :ivar new_value: New group management type. - :ivar previous_value: Previous group management type. Might be missing due - to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New group management type. - - :rtype: team_common.GroupManagementType_validator - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous group management type. Might be missing due to historical data - gap. - - :rtype: team_common.GroupManagementType_validator - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'GroupChangeManagementTypeDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -GroupChangeManagementTypeDetails_validator = bv.Struct(GroupChangeManagementTypeDetails) - -class GroupChangeMemberRoleDetails(object): - """ - Changed the manager permissions belonging to a group member. - - :ivar is_group_owner: Is group owner. - """ - - __slots__ = [ - '_is_group_owner_value', - '_is_group_owner_present', - ] - - _has_required_fields = True - - def __init__(self, - is_group_owner=None): - self._is_group_owner_value = None - self._is_group_owner_present = False - if is_group_owner is not None: - self.is_group_owner = is_group_owner - - @property - def is_group_owner(self): - """ - Is group owner. - - :rtype: bool - """ - if self._is_group_owner_present: - return self._is_group_owner_value - else: - raise AttributeError("missing required field 'is_group_owner'") - - @is_group_owner.setter - def is_group_owner(self, val): - val = self._is_group_owner_validator.validate(val) - self._is_group_owner_value = val - self._is_group_owner_present = True - - @is_group_owner.deleter - def is_group_owner(self): - self._is_group_owner_value = None - self._is_group_owner_present = False - - def __repr__(self): - return 'GroupChangeMemberRoleDetails(is_group_owner={!r})'.format( - self._is_group_owner_value, - ) - -GroupChangeMemberRoleDetails_validator = bv.Struct(GroupChangeMemberRoleDetails) - -class GroupCreateDetails(object): - """ - Created a group. - - :ivar is_company_managed: Is company managed group. Might be missing due to - historical data gap. - :ivar join_policy: Group join policy. - """ - - __slots__ = [ - '_is_company_managed_value', - '_is_company_managed_present', - '_join_policy_value', - '_join_policy_present', - ] - - _has_required_fields = True - - def __init__(self, - join_policy=None, - is_company_managed=None): - self._is_company_managed_value = None - self._is_company_managed_present = False - self._join_policy_value = None - self._join_policy_present = False - if is_company_managed is not None: - self.is_company_managed = is_company_managed - if join_policy is not None: - self.join_policy = join_policy - - @property - def is_company_managed(self): - """ - Is company managed group. Might be missing due to historical data gap. - - :rtype: bool - """ - if self._is_company_managed_present: - return self._is_company_managed_value - else: - return None - - @is_company_managed.setter - def is_company_managed(self, val): - if val is None: - del self.is_company_managed - return - val = self._is_company_managed_validator.validate(val) - self._is_company_managed_value = val - self._is_company_managed_present = True - - @is_company_managed.deleter - def is_company_managed(self): - self._is_company_managed_value = None - self._is_company_managed_present = False - - @property - def join_policy(self): - """ - Group join policy. - - :rtype: GroupJoinPolicy - """ - if self._join_policy_present: - return self._join_policy_value - else: - raise AttributeError("missing required field 'join_policy'") - - @join_policy.setter - def join_policy(self, val): - self._join_policy_validator.validate_type_only(val) - self._join_policy_value = val - self._join_policy_present = True - - @join_policy.deleter - def join_policy(self): - self._join_policy_value = None - self._join_policy_present = False - - def __repr__(self): - return 'GroupCreateDetails(join_policy={!r}, is_company_managed={!r})'.format( - self._join_policy_value, - self._is_company_managed_value, - ) - -GroupCreateDetails_validator = bv.Struct(GroupCreateDetails) - -class GroupDeleteDetails(object): - """ - Deleted a group. - - :ivar is_company_managed: Is company managed group. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_is_company_managed_value', - '_is_company_managed_present', - ] - - _has_required_fields = False - - def __init__(self, - is_company_managed=None): - self._is_company_managed_value = None - self._is_company_managed_present = False - if is_company_managed is not None: - self.is_company_managed = is_company_managed - - @property - def is_company_managed(self): - """ - Is company managed group. Might be missing due to historical data gap. - - :rtype: bool - """ - if self._is_company_managed_present: - return self._is_company_managed_value - else: - return None - - @is_company_managed.setter - def is_company_managed(self, val): - if val is None: - del self.is_company_managed - return - val = self._is_company_managed_validator.validate(val) - self._is_company_managed_value = val - self._is_company_managed_present = True - - @is_company_managed.deleter - def is_company_managed(self): - self._is_company_managed_value = None - self._is_company_managed_present = False - - def __repr__(self): - return 'GroupDeleteDetails(is_company_managed={!r})'.format( - self._is_company_managed_value, - ) - -GroupDeleteDetails_validator = bv.Struct(GroupDeleteDetails) - -class GroupJoinPolicy(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - open = None - # Attribute is overwritten below the class definition - request_to_join = None - # Attribute is overwritten below the class definition - other = None - - def is_open(self): - """ - Check if the union tag is ``open``. - - :rtype: bool - """ - return self._tag == 'open' - - def is_request_to_join(self): - """ - Check if the union tag is ``request_to_join``. - - :rtype: bool - """ - return self._tag == 'request_to_join' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'GroupJoinPolicy(%r, %r)' % (self._tag, self._value) - -GroupJoinPolicy_validator = bv.Union(GroupJoinPolicy) - -class GroupLogInfo(object): - """ - Group's logged information. - - :ivar group_id: The unique id of this group. Might be missing due to - historical data gap. - :ivar display_name: The name of this group. - :ivar external_id: External group ID. Might be missing due to historical - data gap. - """ - - __slots__ = [ - '_group_id_value', - '_group_id_present', - '_display_name_value', - '_display_name_present', - '_external_id_value', - '_external_id_present', - ] - - _has_required_fields = True - - def __init__(self, - display_name=None, - group_id=None, - external_id=None): - self._group_id_value = None - self._group_id_present = False - self._display_name_value = None - self._display_name_present = False - self._external_id_value = None - self._external_id_present = False - if group_id is not None: - self.group_id = group_id - if display_name is not None: - self.display_name = display_name - if external_id is not None: - self.external_id = external_id - - @property - def group_id(self): - """ - The unique id of this group. Might be missing due to historical data - gap. - - :rtype: str - """ - if self._group_id_present: - return self._group_id_value - else: - return None - - @group_id.setter - def group_id(self, val): - if val is None: - del self.group_id - return - val = self._group_id_validator.validate(val) - self._group_id_value = val - self._group_id_present = True - - @group_id.deleter - def group_id(self): - self._group_id_value = None - self._group_id_present = False - - @property - def display_name(self): - """ - The name of this group. - - :rtype: str - """ - if self._display_name_present: - return self._display_name_value - else: - raise AttributeError("missing required field 'display_name'") - - @display_name.setter - def display_name(self, val): - val = self._display_name_validator.validate(val) - self._display_name_value = val - self._display_name_present = True - - @display_name.deleter - def display_name(self): - self._display_name_value = None - self._display_name_present = False - - @property - def external_id(self): - """ - External group ID. Might be missing due to historical data gap. - - :rtype: str - """ - if self._external_id_present: - return self._external_id_value - else: - return None - - @external_id.setter - def external_id(self, val): - if val is None: - del self.external_id - return - val = self._external_id_validator.validate(val) - self._external_id_value = val - self._external_id_present = True - - @external_id.deleter - def external_id(self): - self._external_id_value = None - self._external_id_present = False - - def __repr__(self): - return 'GroupLogInfo(display_name={!r}, group_id={!r}, external_id={!r})'.format( - self._display_name_value, - self._group_id_value, - self._external_id_value, - ) - -GroupLogInfo_validator = bv.Struct(GroupLogInfo) - -class GroupMovedDetails(object): - """ - Moved a group. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'GroupMovedDetails()' - -GroupMovedDetails_validator = bv.Struct(GroupMovedDetails) - -class GroupRemoveExternalIdDetails(object): - """ - Removed the external ID for group. - - :ivar previous_value: Old external id. - """ - - __slots__ = [ - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - previous_value=None): - self._previous_value_value = None - self._previous_value_present = False - if previous_value is not None: - self.previous_value = previous_value - - @property - def previous_value(self): - """ - Old external id. - - :rtype: str - """ - if self._previous_value_present: - return self._previous_value_value - else: - raise AttributeError("missing required field 'previous_value'") - - @previous_value.setter - def previous_value(self, val): - val = self._previous_value_validator.validate(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'GroupRemoveExternalIdDetails(previous_value={!r})'.format( - self._previous_value_value, - ) - -GroupRemoveExternalIdDetails_validator = bv.Struct(GroupRemoveExternalIdDetails) - -class GroupRemoveMemberDetails(object): - """ - Removed team members from a group. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'GroupRemoveMemberDetails()' - -GroupRemoveMemberDetails_validator = bv.Struct(GroupRemoveMemberDetails) - -class GroupRenameDetails(object): - """ - Renamed a group. - - :ivar previous_value: Previous display name. - :ivar new_value: New display name. - """ - - __slots__ = [ - '_previous_value_value', - '_previous_value_present', - '_new_value_value', - '_new_value_present', - ] - - _has_required_fields = True - - def __init__(self, - previous_value=None, - new_value=None): - self._previous_value_value = None - self._previous_value_present = False - self._new_value_value = None - self._new_value_present = False - if previous_value is not None: - self.previous_value = previous_value - if new_value is not None: - self.new_value = new_value - - @property - def previous_value(self): - """ - Previous display name. - - :rtype: str - """ - if self._previous_value_present: - return self._previous_value_value - else: - raise AttributeError("missing required field 'previous_value'") - - @previous_value.setter - def previous_value(self, val): - val = self._previous_value_validator.validate(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - @property - def new_value(self): - """ - New display name. - - :rtype: str - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - val = self._new_value_validator.validate(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - def __repr__(self): - return 'GroupRenameDetails(previous_value={!r}, new_value={!r})'.format( - self._previous_value_value, - self._new_value_value, - ) - -GroupRenameDetails_validator = bv.Struct(GroupRenameDetails) - -class GroupUserManagementChangePolicyDetails(object): - """ - Changed who can create groups. - - :ivar new_value: New group users management policy. - :ivar previous_value: Previous group users management policy. Might be - missing due to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New group users management policy. - - :rtype: GroupUserManagementPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous group users management policy. Might be missing due to - historical data gap. - - :rtype: GroupUserManagementPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'GroupUserManagementChangePolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -GroupUserManagementChangePolicyDetails_validator = bv.Struct(GroupUserManagementChangePolicyDetails) - -class GroupUserManagementPolicy(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - admins_only = None - # Attribute is overwritten below the class definition - all_users = None - # Attribute is overwritten below the class definition - other = None - - def is_admins_only(self): - """ - Check if the union tag is ``admins_only``. - - :rtype: bool - """ - return self._tag == 'admins_only' - - def is_all_users(self): - """ - Check if the union tag is ``all_users``. - - :rtype: bool - """ - return self._tag == 'all_users' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'GroupUserManagementPolicy(%r, %r)' % (self._tag, self._value) - -GroupUserManagementPolicy_validator = bv.Union(GroupUserManagementPolicy) - -class HostLogInfo(object): - """ - Host details. - - :ivar host_id: Host ID. Might be missing due to historical data gap. - :ivar host_name: Host name. Might be missing due to historical data gap. - """ - - __slots__ = [ - '_host_id_value', - '_host_id_present', - '_host_name_value', - '_host_name_present', - ] - - _has_required_fields = False - - def __init__(self, - host_id=None, - host_name=None): - self._host_id_value = None - self._host_id_present = False - self._host_name_value = None - self._host_name_present = False - if host_id is not None: - self.host_id = host_id - if host_name is not None: - self.host_name = host_name - - @property - def host_id(self): - """ - Host ID. Might be missing due to historical data gap. - - :rtype: long - """ - if self._host_id_present: - return self._host_id_value - else: - return None - - @host_id.setter - def host_id(self, val): - if val is None: - del self.host_id - return - val = self._host_id_validator.validate(val) - self._host_id_value = val - self._host_id_present = True - - @host_id.deleter - def host_id(self): - self._host_id_value = None - self._host_id_present = False - - @property - def host_name(self): - """ - Host name. Might be missing due to historical data gap. - - :rtype: str - """ - if self._host_name_present: - return self._host_name_value - else: - return None - - @host_name.setter - def host_name(self, val): - if val is None: - del self.host_name - return - val = self._host_name_validator.validate(val) - self._host_name_value = val - self._host_name_present = True - - @host_name.deleter - def host_name(self): - self._host_name_value = None - self._host_name_present = False - - def __repr__(self): - return 'HostLogInfo(host_id={!r}, host_name={!r})'.format( - self._host_id_value, - self._host_name_value, - ) - -HostLogInfo_validator = bv.Struct(HostLogInfo) - -class JoinTeamDetails(object): - """ - Additional information relevant when a new member joins the team. - - :ivar linked_apps: Linked applications. - :ivar linked_devices: Linked devices. - :ivar linked_shared_folders: Linked shared folders. - """ - - __slots__ = [ - '_linked_apps_value', - '_linked_apps_present', - '_linked_devices_value', - '_linked_devices_present', - '_linked_shared_folders_value', - '_linked_shared_folders_present', - ] - - _has_required_fields = True - - def __init__(self, - linked_apps=None, - linked_devices=None, - linked_shared_folders=None): - self._linked_apps_value = None - self._linked_apps_present = False - self._linked_devices_value = None - self._linked_devices_present = False - self._linked_shared_folders_value = None - self._linked_shared_folders_present = False - if linked_apps is not None: - self.linked_apps = linked_apps - if linked_devices is not None: - self.linked_devices = linked_devices - if linked_shared_folders is not None: - self.linked_shared_folders = linked_shared_folders - - @property - def linked_apps(self): - """ - Linked applications. - - :rtype: list of [AppLogInfo] - """ - if self._linked_apps_present: - return self._linked_apps_value - else: - raise AttributeError("missing required field 'linked_apps'") - - @linked_apps.setter - def linked_apps(self, val): - val = self._linked_apps_validator.validate(val) - self._linked_apps_value = val - self._linked_apps_present = True - - @linked_apps.deleter - def linked_apps(self): - self._linked_apps_value = None - self._linked_apps_present = False - - @property - def linked_devices(self): - """ - Linked devices. - - :rtype: list of [DeviceLogInfo] - """ - if self._linked_devices_present: - return self._linked_devices_value - else: - raise AttributeError("missing required field 'linked_devices'") - - @linked_devices.setter - def linked_devices(self, val): - val = self._linked_devices_validator.validate(val) - self._linked_devices_value = val - self._linked_devices_present = True - - @linked_devices.deleter - def linked_devices(self): - self._linked_devices_value = None - self._linked_devices_present = False - - @property - def linked_shared_folders(self): - """ - Linked shared folders. - - :rtype: list of [FolderLogInfo] - """ - if self._linked_shared_folders_present: - return self._linked_shared_folders_value - else: - raise AttributeError("missing required field 'linked_shared_folders'") - - @linked_shared_folders.setter - def linked_shared_folders(self, val): - val = self._linked_shared_folders_validator.validate(val) - self._linked_shared_folders_value = val - self._linked_shared_folders_present = True - - @linked_shared_folders.deleter - def linked_shared_folders(self): - self._linked_shared_folders_value = None - self._linked_shared_folders_present = False - - def __repr__(self): - return 'JoinTeamDetails(linked_apps={!r}, linked_devices={!r}, linked_shared_folders={!r})'.format( - self._linked_apps_value, - self._linked_devices_value, - self._linked_shared_folders_value, - ) - -JoinTeamDetails_validator = bv.Struct(JoinTeamDetails) - -class LinkAudience(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - public = None - # Attribute is overwritten below the class definition - team = None - # Attribute is overwritten below the class definition - members = None - # Attribute is overwritten below the class definition - other = None - - def is_public(self): - """ - Check if the union tag is ``public``. - - :rtype: bool - """ - return self._tag == 'public' - - def is_team(self): - """ - Check if the union tag is ``team``. - - :rtype: bool - """ - return self._tag == 'team' - - def is_members(self): - """ - Check if the union tag is ``members``. - - :rtype: bool - """ - return self._tag == 'members' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'LinkAudience(%r, %r)' % (self._tag, self._value) - -LinkAudience_validator = bv.Union(LinkAudience) - -class LogoutDetails(object): - """ - Signed out. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'LogoutDetails()' - -LogoutDetails_validator = bv.Struct(LogoutDetails) - -class MemberAddNameDetails(object): - """ - Set team member name when joining team. - - :ivar value: User's name. - """ - - __slots__ = [ - '_value_value', - '_value_present', - ] - - _has_required_fields = True - - def __init__(self, - value=None): - self._value_value = None - self._value_present = False - if value is not None: - self.value = value - - @property - def value(self): - """ - User's name. - - :rtype: UserNameLogInfo - """ - if self._value_present: - return self._value_value - else: - raise AttributeError("missing required field 'value'") - - @value.setter - def value(self, val): - self._value_validator.validate_type_only(val) - self._value_value = val - self._value_present = True - - @value.deleter - def value(self): - self._value_value = None - self._value_present = False - - def __repr__(self): - return 'MemberAddNameDetails(value={!r})'.format( - self._value_value, - ) - -MemberAddNameDetails_validator = bv.Struct(MemberAddNameDetails) - -class MemberChangeAdminRoleDetails(object): - """ - Change the admin role belonging to team member. - - :ivar new_value: New admin role. This field is relevant when the admin role - is changed or whenthe user role changes from no admin rights to with - admin rights. - :ivar previous_value: Previous admin role. This field is relevant when the - admin role is changed or when the admin role is removed. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = False - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New admin role. This field is relevant when the admin role is changed or - whenthe user role changes from no admin rights to with admin rights. - - :rtype: AdminRole - """ - if self._new_value_present: - return self._new_value_value - else: - return None - - @new_value.setter - def new_value(self, val): - if val is None: - del self.new_value - return - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous admin role. This field is relevant when the admin role is - changed or when the admin role is removed. - - :rtype: AdminRole - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'MemberChangeAdminRoleDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -MemberChangeAdminRoleDetails_validator = bv.Struct(MemberChangeAdminRoleDetails) - -class MemberChangeEmailDetails(object): - """ - Changed team member email address. - - :ivar new_value: New email. - :ivar previous_value: Previous email. Might be missing due to historical - data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New email. - - :rtype: str - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - val = self._new_value_validator.validate(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous email. Might be missing due to historical data gap. - - :rtype: str - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - val = self._previous_value_validator.validate(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'MemberChangeEmailDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -MemberChangeEmailDetails_validator = bv.Struct(MemberChangeEmailDetails) - -class MemberChangeMembershipTypeDetails(object): - """ - Changed the membership type (limited vs full) for team member. - - :ivar prev_value: Previous membership type. - :ivar new_value: New membership type. - """ - - __slots__ = [ - '_prev_value_value', - '_prev_value_present', - '_new_value_value', - '_new_value_present', - ] - - _has_required_fields = True - - def __init__(self, - prev_value=None, - new_value=None): - self._prev_value_value = None - self._prev_value_present = False - self._new_value_value = None - self._new_value_present = False - if prev_value is not None: - self.prev_value = prev_value - if new_value is not None: - self.new_value = new_value - - @property - def prev_value(self): - """ - Previous membership type. - - :rtype: TeamMembershipType - """ - if self._prev_value_present: - return self._prev_value_value - else: - raise AttributeError("missing required field 'prev_value'") - - @prev_value.setter - def prev_value(self, val): - self._prev_value_validator.validate_type_only(val) - self._prev_value_value = val - self._prev_value_present = True - - @prev_value.deleter - def prev_value(self): - self._prev_value_value = None - self._prev_value_present = False - - @property - def new_value(self): - """ - New membership type. - - :rtype: TeamMembershipType - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - def __repr__(self): - return 'MemberChangeMembershipTypeDetails(prev_value={!r}, new_value={!r})'.format( - self._prev_value_value, - self._new_value_value, - ) - -MemberChangeMembershipTypeDetails_validator = bv.Struct(MemberChangeMembershipTypeDetails) - -class MemberChangeNameDetails(object): - """ - Changed team member name. - - :ivar new_value: New user's name. - :ivar previous_value: Previous user's name. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New user's name. - - :rtype: UserNameLogInfo - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous user's name. Might be missing due to historical data gap. - - :rtype: UserNameLogInfo - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'MemberChangeNameDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -MemberChangeNameDetails_validator = bv.Struct(MemberChangeNameDetails) - -class MemberChangeStatusDetails(object): - """ - Changed the membership status of a team member. - - :ivar previous_value: Previous member status. Might be missing due to - historical data gap. - :ivar new_value: New member status. - :ivar team_join_details: Additional information relevant when a new member - joins the team. - """ - - __slots__ = [ - '_previous_value_value', - '_previous_value_present', - '_new_value_value', - '_new_value_present', - '_team_join_details_value', - '_team_join_details_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None, - team_join_details=None): - self._previous_value_value = None - self._previous_value_present = False - self._new_value_value = None - self._new_value_present = False - self._team_join_details_value = None - self._team_join_details_present = False - if previous_value is not None: - self.previous_value = previous_value - if new_value is not None: - self.new_value = new_value - if team_join_details is not None: - self.team_join_details = team_join_details - - @property - def previous_value(self): - """ - Previous member status. Might be missing due to historical data gap. - - :rtype: MemberStatus - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - @property - def new_value(self): - """ - New member status. - - :rtype: MemberStatus - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def team_join_details(self): - """ - Additional information relevant when a new member joins the team. - - :rtype: JoinTeamDetails - """ - if self._team_join_details_present: - return self._team_join_details_value - else: - return None - - @team_join_details.setter - def team_join_details(self, val): - if val is None: - del self.team_join_details - return - self._team_join_details_validator.validate_type_only(val) - self._team_join_details_value = val - self._team_join_details_present = True - - @team_join_details.deleter - def team_join_details(self): - self._team_join_details_value = None - self._team_join_details_present = False - - def __repr__(self): - return 'MemberChangeStatusDetails(new_value={!r}, previous_value={!r}, team_join_details={!r})'.format( - self._new_value_value, - self._previous_value_value, - self._team_join_details_value, - ) - -MemberChangeStatusDetails_validator = bv.Struct(MemberChangeStatusDetails) - -class MemberPermanentlyDeleteAccountContentsDetails(object): - """ - Permanently deleted contents of a removed team member account. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'MemberPermanentlyDeleteAccountContentsDetails()' - -MemberPermanentlyDeleteAccountContentsDetails_validator = bv.Struct(MemberPermanentlyDeleteAccountContentsDetails) - -class MemberRequestsChangePolicyDetails(object): - """ - Changed whether users can find the team when not invited. - - :ivar new_value: New member change requests policy. - :ivar previous_value: Previous member change requests policy. Might be - missing due to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New member change requests policy. - - :rtype: MemberRequestsPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous member change requests policy. Might be missing due to - historical data gap. - - :rtype: MemberRequestsPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'MemberRequestsChangePolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -MemberRequestsChangePolicyDetails_validator = bv.Struct(MemberRequestsChangePolicyDetails) - -class MemberRequestsPolicy(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - auto_accept = None - # Attribute is overwritten below the class definition - disabled = None - # Attribute is overwritten below the class definition - require_approval = None - # Attribute is overwritten below the class definition - other = None - - def is_auto_accept(self): - """ - Check if the union tag is ``auto_accept``. - - :rtype: bool - """ - return self._tag == 'auto_accept' - - def is_disabled(self): - """ - Check if the union tag is ``disabled``. - - :rtype: bool - """ - return self._tag == 'disabled' - - def is_require_approval(self): - """ - Check if the union tag is ``require_approval``. - - :rtype: bool - """ - return self._tag == 'require_approval' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'MemberRequestsPolicy(%r, %r)' % (self._tag, self._value) - -MemberRequestsPolicy_validator = bv.Union(MemberRequestsPolicy) - -class MemberSpaceLimitsAddExceptionDetails(object): - """ - Added an exception for one or more team members to bypass space limits - imposed by policy. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'MemberSpaceLimitsAddExceptionDetails()' - -MemberSpaceLimitsAddExceptionDetails_validator = bv.Struct(MemberSpaceLimitsAddExceptionDetails) - -class MemberSpaceLimitsChangePolicyDetails(object): - """ - Changed the storage limits applied to team members by policy. - - :ivar previous_value: Previous storage limits policy. - :ivar new_value: New storage limits policy. - """ - - __slots__ = [ - '_previous_value_value', - '_previous_value_present', - '_new_value_value', - '_new_value_present', - ] - - _has_required_fields = True - - def __init__(self, - previous_value=None, - new_value=None): - self._previous_value_value = None - self._previous_value_present = False - self._new_value_value = None - self._new_value_present = False - if previous_value is not None: - self.previous_value = previous_value - if new_value is not None: - self.new_value = new_value - - @property - def previous_value(self): - """ - Previous storage limits policy. - - :rtype: SpaceLimitsLevel - """ - if self._previous_value_present: - return self._previous_value_value - else: - raise AttributeError("missing required field 'previous_value'") - - @previous_value.setter - def previous_value(self, val): - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - @property - def new_value(self): - """ - New storage limits policy. - - :rtype: SpaceLimitsLevel - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - def __repr__(self): - return 'MemberSpaceLimitsChangePolicyDetails(previous_value={!r}, new_value={!r})'.format( - self._previous_value_value, - self._new_value_value, - ) - -MemberSpaceLimitsChangePolicyDetails_validator = bv.Struct(MemberSpaceLimitsChangePolicyDetails) - -class MemberSpaceLimitsChangeStatusDetails(object): - """ - Changed the status with respect to whether the team member is under or over - storage quota specified by policy. - - :ivar previous_value: Previous storage quota status. - :ivar new_value: New storage quota status. - """ - - __slots__ = [ - '_previous_value_value', - '_previous_value_present', - '_new_value_value', - '_new_value_present', - ] - - _has_required_fields = True - - def __init__(self, - previous_value=None, - new_value=None): - self._previous_value_value = None - self._previous_value_present = False - self._new_value_value = None - self._new_value_present = False - if previous_value is not None: - self.previous_value = previous_value - if new_value is not None: - self.new_value = new_value - - @property - def previous_value(self): - """ - Previous storage quota status. - - :rtype: SpaceLimitsStatus - """ - if self._previous_value_present: - return self._previous_value_value - else: - raise AttributeError("missing required field 'previous_value'") - - @previous_value.setter - def previous_value(self, val): - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - @property - def new_value(self): - """ - New storage quota status. - - :rtype: SpaceLimitsStatus - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - def __repr__(self): - return 'MemberSpaceLimitsChangeStatusDetails(previous_value={!r}, new_value={!r})'.format( - self._previous_value_value, - self._new_value_value, - ) - -MemberSpaceLimitsChangeStatusDetails_validator = bv.Struct(MemberSpaceLimitsChangeStatusDetails) - -class MemberSpaceLimitsRemoveExceptionDetails(object): - """ - Removed an exception for one or more team members to bypass space limits - imposed by policy. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'MemberSpaceLimitsRemoveExceptionDetails()' - -MemberSpaceLimitsRemoveExceptionDetails_validator = bv.Struct(MemberSpaceLimitsRemoveExceptionDetails) - -class MemberStatus(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - not_joined = None - # Attribute is overwritten below the class definition - invited = None - # Attribute is overwritten below the class definition - active = None - # Attribute is overwritten below the class definition - suspended = None - # Attribute is overwritten below the class definition - removed = None - # Attribute is overwritten below the class definition - other = None - - def is_not_joined(self): - """ - Check if the union tag is ``not_joined``. - - :rtype: bool - """ - return self._tag == 'not_joined' - - def is_invited(self): - """ - Check if the union tag is ``invited``. - - :rtype: bool - """ - return self._tag == 'invited' - - def is_active(self): - """ - Check if the union tag is ``active``. - - :rtype: bool - """ - return self._tag == 'active' - - def is_suspended(self): - """ - Check if the union tag is ``suspended``. - - :rtype: bool - """ - return self._tag == 'suspended' - - def is_removed(self): - """ - Check if the union tag is ``removed``. - - :rtype: bool - """ - return self._tag == 'removed' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'MemberStatus(%r, %r)' % (self._tag, self._value) - -MemberStatus_validator = bv.Union(MemberStatus) - -class MemberSuggestDetails(object): - """ - Suggested a new team member to be added to the team. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'MemberSuggestDetails()' - -MemberSuggestDetails_validator = bv.Struct(MemberSuggestDetails) - -class MemberSuggestionsChangePolicyDetails(object): - """ - Enabled or disabled the option for team members to suggest new members to - add to the team. - - :ivar new_value: New team member suggestions policy. - :ivar previous_value: Previous team member suggestions policy. Might be - missing due to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New team member suggestions policy. - - :rtype: MemberSuggestionsPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous team member suggestions policy. Might be missing due to - historical data gap. - - :rtype: MemberSuggestionsPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'MemberSuggestionsChangePolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -MemberSuggestionsChangePolicyDetails_validator = bv.Struct(MemberSuggestionsChangePolicyDetails) - -class MemberSuggestionsPolicy(bb.Union): - """ - Member suggestions policy - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - disabled = None - # Attribute is overwritten below the class definition - enabled = None - # Attribute is overwritten below the class definition - other = None - - def is_disabled(self): - """ - Check if the union tag is ``disabled``. - - :rtype: bool - """ - return self._tag == 'disabled' - - def is_enabled(self): - """ - Check if the union tag is ``enabled``. - - :rtype: bool - """ - return self._tag == 'enabled' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'MemberSuggestionsPolicy(%r, %r)' % (self._tag, self._value) - -MemberSuggestionsPolicy_validator = bv.Union(MemberSuggestionsPolicy) - -class MemberTransferAccountContentsDetails(object): - """ - Transferred contents of a removed team member account to another member. - - :ivar src_participant_index: Source participant position in the Participants - list. - :ivar dest_participant_index: Destination participant position in the - Participants list. - """ - - __slots__ = [ - '_src_participant_index_value', - '_src_participant_index_present', - '_dest_participant_index_value', - '_dest_participant_index_present', - ] - - _has_required_fields = True - - def __init__(self, - src_participant_index=None, - dest_participant_index=None): - self._src_participant_index_value = None - self._src_participant_index_present = False - self._dest_participant_index_value = None - self._dest_participant_index_present = False - if src_participant_index is not None: - self.src_participant_index = src_participant_index - if dest_participant_index is not None: - self.dest_participant_index = dest_participant_index - - @property - def src_participant_index(self): - """ - Source participant position in the Participants list. - - :rtype: long - """ - if self._src_participant_index_present: - return self._src_participant_index_value - else: - raise AttributeError("missing required field 'src_participant_index'") - - @src_participant_index.setter - def src_participant_index(self, val): - val = self._src_participant_index_validator.validate(val) - self._src_participant_index_value = val - self._src_participant_index_present = True - - @src_participant_index.deleter - def src_participant_index(self): - self._src_participant_index_value = None - self._src_participant_index_present = False - - @property - def dest_participant_index(self): - """ - Destination participant position in the Participants list. - - :rtype: long - """ - if self._dest_participant_index_present: - return self._dest_participant_index_value - else: - raise AttributeError("missing required field 'dest_participant_index'") - - @dest_participant_index.setter - def dest_participant_index(self, val): - val = self._dest_participant_index_validator.validate(val) - self._dest_participant_index_value = val - self._dest_participant_index_present = True - - @dest_participant_index.deleter - def dest_participant_index(self): - self._dest_participant_index_value = None - self._dest_participant_index_present = False - - def __repr__(self): - return 'MemberTransferAccountContentsDetails(src_participant_index={!r}, dest_participant_index={!r})'.format( - self._src_participant_index_value, - self._dest_participant_index_value, - ) - -MemberTransferAccountContentsDetails_validator = bv.Struct(MemberTransferAccountContentsDetails) - -class MicrosoftOfficeAddinChangePolicyDetails(object): - """ - Enabled or disabled the Microsoft Office add-in, which lets team members - save files to Dropbox directly from Microsoft Office. - - :ivar new_value: New Microsoft Office addin policy. - :ivar previous_value: Previous Microsoft Office addin policy. Might be - missing due to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New Microsoft Office addin policy. - - :rtype: MicrosoftOfficeAddinPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous Microsoft Office addin policy. Might be missing due to - historical data gap. - - :rtype: MicrosoftOfficeAddinPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'MicrosoftOfficeAddinChangePolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -MicrosoftOfficeAddinChangePolicyDetails_validator = bv.Struct(MicrosoftOfficeAddinChangePolicyDetails) - -class MicrosoftOfficeAddinPolicy(bb.Union): - """ - Microsoft Office addin policy - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - disabled = None - # Attribute is overwritten below the class definition - enabled = None - # Attribute is overwritten below the class definition - other = None - - def is_disabled(self): - """ - Check if the union tag is ``disabled``. - - :rtype: bool - """ - return self._tag == 'disabled' - - def is_enabled(self): - """ - Check if the union tag is ``enabled``. - - :rtype: bool - """ - return self._tag == 'enabled' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'MicrosoftOfficeAddinPolicy(%r, %r)' % (self._tag, self._value) - -MicrosoftOfficeAddinPolicy_validator = bv.Union(MicrosoftOfficeAddinPolicy) - -class MissingDetails(object): - """ - An indication that an event was returned with missing details - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'MissingDetails()' - -MissingDetails_validator = bv.Struct(MissingDetails) - -class MobileSessionLogInfo(SessionLogInfo): - """ - Mobile session. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self, - session_id=None): - super(MobileSessionLogInfo, self).__init__(session_id) - - def __repr__(self): - return 'MobileSessionLogInfo(session_id={!r})'.format( - self._session_id_value, - ) - -MobileSessionLogInfo_validator = bv.Struct(MobileSessionLogInfo) - -class NamespaceRelativePathLogInfo(object): - """ - Namespace relative path details. - - :ivar ns_id: Namespace ID. Might be missing due to historical data gap. - :ivar relative_path: A path relative to the specified namespace ID. Might be - missing due to historical data gap. - """ - - __slots__ = [ - '_ns_id_value', - '_ns_id_present', - '_relative_path_value', - '_relative_path_present', - ] - - _has_required_fields = False - - def __init__(self, - ns_id=None, - relative_path=None): - self._ns_id_value = None - self._ns_id_present = False - self._relative_path_value = None - self._relative_path_present = False - if ns_id is not None: - self.ns_id = ns_id - if relative_path is not None: - self.relative_path = relative_path - - @property - def ns_id(self): - """ - Namespace ID. Might be missing due to historical data gap. - - :rtype: str - """ - if self._ns_id_present: - return self._ns_id_value - else: - return None - - @ns_id.setter - def ns_id(self, val): - if val is None: - del self.ns_id - return - val = self._ns_id_validator.validate(val) - self._ns_id_value = val - self._ns_id_present = True - - @ns_id.deleter - def ns_id(self): - self._ns_id_value = None - self._ns_id_present = False - - @property - def relative_path(self): - """ - A path relative to the specified namespace ID. Might be missing due to - historical data gap. - - :rtype: str - """ - if self._relative_path_present: - return self._relative_path_value - else: - return None - - @relative_path.setter - def relative_path(self, val): - if val is None: - del self.relative_path - return - val = self._relative_path_validator.validate(val) - self._relative_path_value = val - self._relative_path_present = True - - @relative_path.deleter - def relative_path(self): - self._relative_path_value = None - self._relative_path_present = False - - def __repr__(self): - return 'NamespaceRelativePathLogInfo(ns_id={!r}, relative_path={!r})'.format( - self._ns_id_value, - self._relative_path_value, - ) - -NamespaceRelativePathLogInfo_validator = bv.Struct(NamespaceRelativePathLogInfo) - -class NetworkControlChangePolicyDetails(object): - """ - Enabled or disabled network control. - - :ivar new_value: New network control policy. - :ivar previous_value: Previous network control policy. Might be missing due - to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New network control policy. - - :rtype: NetworkControlPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous network control policy. Might be missing due to historical data - gap. - - :rtype: NetworkControlPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'NetworkControlChangePolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -NetworkControlChangePolicyDetails_validator = bv.Struct(NetworkControlChangePolicyDetails) - -class NetworkControlPolicy(bb.Union): - """ - Network control policy - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - disabled = None - # Attribute is overwritten below the class definition - enabled = None - # Attribute is overwritten below the class definition - other = None - - def is_disabled(self): - """ - Check if the union tag is ``disabled``. - - :rtype: bool - """ - return self._tag == 'disabled' - - def is_enabled(self): - """ - Check if the union tag is ``enabled``. - - :rtype: bool - """ - return self._tag == 'enabled' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'NetworkControlPolicy(%r, %r)' % (self._tag, self._value) - -NetworkControlPolicy_validator = bv.Union(NetworkControlPolicy) - -class UserLogInfo(object): - """ - User's logged information. - - :ivar account_id: User unique ID. Might be missing due to historical data - gap. - :ivar display_name: User display name. Might be missing due to historical - data gap. - :ivar email: User email address. Might be missing due to historical data - gap. - """ - - __slots__ = [ - '_account_id_value', - '_account_id_present', - '_display_name_value', - '_display_name_present', - '_email_value', - '_email_present', - ] - - _has_required_fields = False - - def __init__(self, - account_id=None, - display_name=None, - email=None): - self._account_id_value = None - self._account_id_present = False - self._display_name_value = None - self._display_name_present = False - self._email_value = None - self._email_present = False - if account_id is not None: - self.account_id = account_id - if display_name is not None: - self.display_name = display_name - if email is not None: - self.email = email - - @property - def account_id(self): - """ - User unique ID. Might be missing due to historical data gap. - - :rtype: str - """ - if self._account_id_present: - return self._account_id_value - else: - return None - - @account_id.setter - def account_id(self, val): - if val is None: - del self.account_id - return - val = self._account_id_validator.validate(val) - self._account_id_value = val - self._account_id_present = True - - @account_id.deleter - def account_id(self): - self._account_id_value = None - self._account_id_present = False - - @property - def display_name(self): - """ - User display name. Might be missing due to historical data gap. - - :rtype: str - """ - if self._display_name_present: - return self._display_name_value - else: - return None - - @display_name.setter - def display_name(self, val): - if val is None: - del self.display_name - return - val = self._display_name_validator.validate(val) - self._display_name_value = val - self._display_name_present = True - - @display_name.deleter - def display_name(self): - self._display_name_value = None - self._display_name_present = False - - @property - def email(self): - """ - User email address. Might be missing due to historical data gap. - - :rtype: str - """ - if self._email_present: - return self._email_value - else: - return None - - @email.setter - def email(self, val): - if val is None: - del self.email - return - val = self._email_validator.validate(val) - self._email_value = val - self._email_present = True - - @email.deleter - def email(self): - self._email_value = None - self._email_present = False - - def __repr__(self): - return 'UserLogInfo(account_id={!r}, display_name={!r}, email={!r})'.format( - self._account_id_value, - self._display_name_value, - self._email_value, - ) - -UserLogInfo_validator = bv.StructTree(UserLogInfo) - -class NonTeamMemberLogInfo(UserLogInfo): - """ - Non team member's logged information. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self, - account_id=None, - display_name=None, - email=None): - super(NonTeamMemberLogInfo, self).__init__(account_id, - display_name, - email) - - def __repr__(self): - return 'NonTeamMemberLogInfo(account_id={!r}, display_name={!r}, email={!r})'.format( - self._account_id_value, - self._display_name_value, - self._email_value, - ) - -NonTeamMemberLogInfo_validator = bv.Struct(NonTeamMemberLogInfo) - -class NoteAclInviteOnlyDetails(object): - """ - Changed a Paper document to be invite-only. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'NoteAclInviteOnlyDetails()' - -NoteAclInviteOnlyDetails_validator = bv.Struct(NoteAclInviteOnlyDetails) - -class NoteAclLinkDetails(object): - """ - Changed a Paper document to be link accessible. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'NoteAclLinkDetails()' - -NoteAclLinkDetails_validator = bv.Struct(NoteAclLinkDetails) - -class NoteAclTeamLinkDetails(object): - """ - Changed a Paper document to be link accessible for the team. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'NoteAclTeamLinkDetails()' - -NoteAclTeamLinkDetails_validator = bv.Struct(NoteAclTeamLinkDetails) - -class NoteShareReceiveDetails(object): - """ - Shared Paper document received. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'NoteShareReceiveDetails()' - -NoteShareReceiveDetails_validator = bv.Struct(NoteShareReceiveDetails) - -class NoteSharedDetails(object): - """ - Shared a Paper doc. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'NoteSharedDetails()' - -NoteSharedDetails_validator = bv.Struct(NoteSharedDetails) - -class OpenNoteSharedDetails(object): - """ - Opened a shared Paper doc. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'OpenNoteSharedDetails()' - -OpenNoteSharedDetails_validator = bv.Struct(OpenNoteSharedDetails) - -class OriginLogInfo(object): - """ - The origin from which the actor performed the action. - - :ivar geo_location: Geographic location details. - :ivar host: Host details. - :ivar access_method: The method that was used to perform the action. - """ - - __slots__ = [ - '_geo_location_value', - '_geo_location_present', - '_host_value', - '_host_present', - '_access_method_value', - '_access_method_present', - ] - - _has_required_fields = True - - def __init__(self, - access_method=None, - geo_location=None, - host=None): - self._geo_location_value = None - self._geo_location_present = False - self._host_value = None - self._host_present = False - self._access_method_value = None - self._access_method_present = False - if geo_location is not None: - self.geo_location = geo_location - if host is not None: - self.host = host - if access_method is not None: - self.access_method = access_method - - @property - def geo_location(self): - """ - Geographic location details. - - :rtype: GeoLocationLogInfo - """ - if self._geo_location_present: - return self._geo_location_value - else: - return None - - @geo_location.setter - def geo_location(self, val): - if val is None: - del self.geo_location - return - self._geo_location_validator.validate_type_only(val) - self._geo_location_value = val - self._geo_location_present = True - - @geo_location.deleter - def geo_location(self): - self._geo_location_value = None - self._geo_location_present = False - - @property - def host(self): - """ - Host details. - - :rtype: HostLogInfo - """ - if self._host_present: - return self._host_value - else: - return None - - @host.setter - def host(self, val): - if val is None: - del self.host - return - self._host_validator.validate_type_only(val) - self._host_value = val - self._host_present = True - - @host.deleter - def host(self): - self._host_value = None - self._host_present = False - - @property - def access_method(self): - """ - The method that was used to perform the action. - - :rtype: AccessMethodLogInfo - """ - if self._access_method_present: - return self._access_method_value - else: - raise AttributeError("missing required field 'access_method'") - - @access_method.setter - def access_method(self, val): - self._access_method_validator.validate_type_only(val) - self._access_method_value = val - self._access_method_present = True - - @access_method.deleter - def access_method(self): - self._access_method_value = None - self._access_method_present = False - - def __repr__(self): - return 'OriginLogInfo(access_method={!r}, geo_location={!r}, host={!r})'.format( - self._access_method_value, - self._geo_location_value, - self._host_value, - ) - -OriginLogInfo_validator = bv.Struct(OriginLogInfo) - -class PaperAccessType(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - viewer = None - # Attribute is overwritten below the class definition - commenter = None - # Attribute is overwritten below the class definition - editor = None - # Attribute is overwritten below the class definition - other = None - - def is_viewer(self): - """ - Check if the union tag is ``viewer``. - - :rtype: bool - """ - return self._tag == 'viewer' - - def is_commenter(self): - """ - Check if the union tag is ``commenter``. - - :rtype: bool - """ - return self._tag == 'commenter' - - def is_editor(self): - """ - Check if the union tag is ``editor``. - - :rtype: bool - """ - return self._tag == 'editor' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'PaperAccessType(%r, %r)' % (self._tag, self._value) - -PaperAccessType_validator = bv.Union(PaperAccessType) - -class PaperAdminExportStartDetails(object): - """ - Exported all Paper documents in the team. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'PaperAdminExportStartDetails()' - -PaperAdminExportStartDetails_validator = bv.Struct(PaperAdminExportStartDetails) - -class PaperChangeDeploymentPolicyDetails(object): - """ - Changed whether Dropbox Paper, when enabled, is deployed to all teams or to - specific members of the team. - - :ivar new_value: New Dropbox Paper deployment policy. - :ivar previous_value: Previous Dropbox Paper deployment policy. Might be - missing due to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New Dropbox Paper deployment policy. - - :rtype: team_policies.PaperDeploymentPolicy_validator - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous Dropbox Paper deployment policy. Might be missing due to - historical data gap. - - :rtype: team_policies.PaperDeploymentPolicy_validator - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'PaperChangeDeploymentPolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -PaperChangeDeploymentPolicyDetails_validator = bv.Struct(PaperChangeDeploymentPolicyDetails) - -class PaperChangeMemberLinkPolicyDetails(object): - """ - Changed whether non team members can view Paper documents using a link. - - :ivar new_value: New paper external link accessibility policy. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None): - self._new_value_value = None - self._new_value_present = False - if new_value is not None: - self.new_value = new_value - - @property - def new_value(self): - """ - New paper external link accessibility policy. - - :rtype: PaperMemberPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - def __repr__(self): - return 'PaperChangeMemberLinkPolicyDetails(new_value={!r})'.format( - self._new_value_value, - ) - -PaperChangeMemberLinkPolicyDetails_validator = bv.Struct(PaperChangeMemberLinkPolicyDetails) - -class PaperChangeMemberPolicyDetails(object): - """ - Changed whether team members can share Paper documents externally (i.e. - outside the team), and if so, whether they should be accessible only by team - members or anyone by default. - - :ivar new_value: New paper external accessibility policy. - :ivar previous_value: Previous paper external accessibility policy. Might be - missing due to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New paper external accessibility policy. - - :rtype: PaperMemberPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous paper external accessibility policy. Might be missing due to - historical data gap. - - :rtype: PaperMemberPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'PaperChangeMemberPolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -PaperChangeMemberPolicyDetails_validator = bv.Struct(PaperChangeMemberPolicyDetails) - -class PaperChangePolicyDetails(object): - """ - Enabled or disabled Dropbox Paper for the team. - - :ivar new_value: New Dropbox Paper policy. - :ivar previous_value: Previous Dropbox Paper policy. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New Dropbox Paper policy. - - :rtype: team_policies.PaperEnabledPolicy_validator - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous Dropbox Paper policy. Might be missing due to historical data - gap. - - :rtype: team_policies.PaperEnabledPolicy_validator - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'PaperChangePolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -PaperChangePolicyDetails_validator = bv.Struct(PaperChangePolicyDetails) - -class PaperContentAddMemberDetails(object): - """ - Added users to the membership of a Paper doc or folder. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperContentAddMemberDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperContentAddMemberDetails_validator = bv.Struct(PaperContentAddMemberDetails) - -class PaperContentAddToFolderDetails(object): - """ - Added Paper doc or folder to a folder. - - :ivar event_uuid: Event unique identifier. - :ivar target_asset_index: Target asset position in the Assets list. - :ivar parent_asset_index: Parent asset position in the Assets list. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - '_target_asset_index_value', - '_target_asset_index_present', - '_parent_asset_index_value', - '_parent_asset_index_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None, - target_asset_index=None, - parent_asset_index=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._target_asset_index_value = None - self._target_asset_index_present = False - self._parent_asset_index_value = None - self._parent_asset_index_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if parent_asset_index is not None: - self.parent_asset_index = parent_asset_index - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def parent_asset_index(self): - """ - Parent asset position in the Assets list. - - :rtype: long - """ - if self._parent_asset_index_present: - return self._parent_asset_index_value - else: - raise AttributeError("missing required field 'parent_asset_index'") - - @parent_asset_index.setter - def parent_asset_index(self, val): - val = self._parent_asset_index_validator.validate(val) - self._parent_asset_index_value = val - self._parent_asset_index_present = True - - @parent_asset_index.deleter - def parent_asset_index(self): - self._parent_asset_index_value = None - self._parent_asset_index_present = False - - def __repr__(self): - return 'PaperContentAddToFolderDetails(event_uuid={!r}, target_asset_index={!r}, parent_asset_index={!r})'.format( - self._event_uuid_value, - self._target_asset_index_value, - self._parent_asset_index_value, - ) - -PaperContentAddToFolderDetails_validator = bv.Struct(PaperContentAddToFolderDetails) - -class PaperContentArchiveDetails(object): - """ - Archived Paper doc or folder. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperContentArchiveDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperContentArchiveDetails_validator = bv.Struct(PaperContentArchiveDetails) - -class PaperContentCreateDetails(object): - """ - Created a Paper doc or folder. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperContentCreateDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperContentCreateDetails_validator = bv.Struct(PaperContentCreateDetails) - -class PaperContentPermanentlyDeleteDetails(object): - """ - Permanently deleted a Paper doc or folder. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperContentPermanentlyDeleteDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperContentPermanentlyDeleteDetails_validator = bv.Struct(PaperContentPermanentlyDeleteDetails) - -class PaperContentRemoveFromFolderDetails(object): - """ - Removed Paper doc or folder from a folder. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperContentRemoveFromFolderDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperContentRemoveFromFolderDetails_validator = bv.Struct(PaperContentRemoveFromFolderDetails) - -class PaperContentRemoveMemberDetails(object): - """ - Removed a user from the membership of a Paper doc or folder. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperContentRemoveMemberDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperContentRemoveMemberDetails_validator = bv.Struct(PaperContentRemoveMemberDetails) - -class PaperContentRenameDetails(object): - """ - Renamed Paper doc or folder. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperContentRenameDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperContentRenameDetails_validator = bv.Struct(PaperContentRenameDetails) - -class PaperContentRestoreDetails(object): - """ - Restored an archived Paper doc or folder. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperContentRestoreDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperContentRestoreDetails_validator = bv.Struct(PaperContentRestoreDetails) - -class PaperDocAddCommentDetails(object): - """ - Added a Paper doc comment. - - :ivar event_uuid: Event unique identifier. - :ivar comment_text: Comment text. Might be missing due to historical data - gap. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - '_comment_text_value', - '_comment_text_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None, - comment_text=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._comment_text_value = None - self._comment_text_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - if comment_text is not None: - self.comment_text = comment_text - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - @property - def comment_text(self): - """ - Comment text. Might be missing due to historical data gap. - - :rtype: str - """ - if self._comment_text_present: - return self._comment_text_value - else: - return None - - @comment_text.setter - def comment_text(self, val): - if val is None: - del self.comment_text - return - val = self._comment_text_validator.validate(val) - self._comment_text_value = val - self._comment_text_present = True - - @comment_text.deleter - def comment_text(self): - self._comment_text_value = None - self._comment_text_present = False - - def __repr__(self): - return 'PaperDocAddCommentDetails(event_uuid={!r}, comment_text={!r})'.format( - self._event_uuid_value, - self._comment_text_value, - ) - -PaperDocAddCommentDetails_validator = bv.Struct(PaperDocAddCommentDetails) - -class PaperDocChangeMemberRoleDetails(object): - """ - Changed the access type of a Paper doc member. - - :ivar event_uuid: Event unique identifier. - :ivar access_type: Paper doc access type. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - '_access_type_value', - '_access_type_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None, - access_type=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._access_type_value = None - self._access_type_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - if access_type is not None: - self.access_type = access_type - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - @property - def access_type(self): - """ - Paper doc access type. - - :rtype: PaperAccessType - """ - if self._access_type_present: - return self._access_type_value - else: - raise AttributeError("missing required field 'access_type'") - - @access_type.setter - def access_type(self, val): - self._access_type_validator.validate_type_only(val) - self._access_type_value = val - self._access_type_present = True - - @access_type.deleter - def access_type(self): - self._access_type_value = None - self._access_type_present = False - - def __repr__(self): - return 'PaperDocChangeMemberRoleDetails(event_uuid={!r}, access_type={!r})'.format( - self._event_uuid_value, - self._access_type_value, - ) - -PaperDocChangeMemberRoleDetails_validator = bv.Struct(PaperDocChangeMemberRoleDetails) - -class PaperDocChangeSharingPolicyDetails(object): - """ - Changed the sharing policy for Paper doc. - - :ivar event_uuid: Event unique identifier. - :ivar public_sharing_policy: Sharing policy with external users. Might be - missing due to historical data gap. - :ivar team_sharing_policy: Sharing policy with team. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - '_public_sharing_policy_value', - '_public_sharing_policy_present', - '_team_sharing_policy_value', - '_team_sharing_policy_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None, - public_sharing_policy=None, - team_sharing_policy=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._public_sharing_policy_value = None - self._public_sharing_policy_present = False - self._team_sharing_policy_value = None - self._team_sharing_policy_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - if public_sharing_policy is not None: - self.public_sharing_policy = public_sharing_policy - if team_sharing_policy is not None: - self.team_sharing_policy = team_sharing_policy - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - @property - def public_sharing_policy(self): - """ - Sharing policy with external users. Might be missing due to historical - data gap. - - :rtype: str - """ - if self._public_sharing_policy_present: - return self._public_sharing_policy_value - else: - return None - - @public_sharing_policy.setter - def public_sharing_policy(self, val): - if val is None: - del self.public_sharing_policy - return - val = self._public_sharing_policy_validator.validate(val) - self._public_sharing_policy_value = val - self._public_sharing_policy_present = True - - @public_sharing_policy.deleter - def public_sharing_policy(self): - self._public_sharing_policy_value = None - self._public_sharing_policy_present = False - - @property - def team_sharing_policy(self): - """ - Sharing policy with team. Might be missing due to historical data gap. - - :rtype: str - """ - if self._team_sharing_policy_present: - return self._team_sharing_policy_value - else: - return None - - @team_sharing_policy.setter - def team_sharing_policy(self, val): - if val is None: - del self.team_sharing_policy - return - val = self._team_sharing_policy_validator.validate(val) - self._team_sharing_policy_value = val - self._team_sharing_policy_present = True - - @team_sharing_policy.deleter - def team_sharing_policy(self): - self._team_sharing_policy_value = None - self._team_sharing_policy_present = False - - def __repr__(self): - return 'PaperDocChangeSharingPolicyDetails(event_uuid={!r}, public_sharing_policy={!r}, team_sharing_policy={!r})'.format( - self._event_uuid_value, - self._public_sharing_policy_value, - self._team_sharing_policy_value, - ) - -PaperDocChangeSharingPolicyDetails_validator = bv.Struct(PaperDocChangeSharingPolicyDetails) - -class PaperDocChangeSubscriptionDetails(object): - """ - Followed or unfollowed a Paper doc. - - :ivar event_uuid: Event unique identifier. - :ivar new_subscription_level: New doc subscription level. - :ivar previous_subscription_level: Previous doc subscription level. Might be - missing due to historical data gap. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - '_new_subscription_level_value', - '_new_subscription_level_present', - '_previous_subscription_level_value', - '_previous_subscription_level_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None, - new_subscription_level=None, - previous_subscription_level=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._new_subscription_level_value = None - self._new_subscription_level_present = False - self._previous_subscription_level_value = None - self._previous_subscription_level_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - if new_subscription_level is not None: - self.new_subscription_level = new_subscription_level - if previous_subscription_level is not None: - self.previous_subscription_level = previous_subscription_level - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - @property - def new_subscription_level(self): - """ - New doc subscription level. - - :rtype: str - """ - if self._new_subscription_level_present: - return self._new_subscription_level_value - else: - raise AttributeError("missing required field 'new_subscription_level'") - - @new_subscription_level.setter - def new_subscription_level(self, val): - val = self._new_subscription_level_validator.validate(val) - self._new_subscription_level_value = val - self._new_subscription_level_present = True - - @new_subscription_level.deleter - def new_subscription_level(self): - self._new_subscription_level_value = None - self._new_subscription_level_present = False - - @property - def previous_subscription_level(self): - """ - Previous doc subscription level. Might be missing due to historical data - gap. - - :rtype: str - """ - if self._previous_subscription_level_present: - return self._previous_subscription_level_value - else: - return None - - @previous_subscription_level.setter - def previous_subscription_level(self, val): - if val is None: - del self.previous_subscription_level - return - val = self._previous_subscription_level_validator.validate(val) - self._previous_subscription_level_value = val - self._previous_subscription_level_present = True - - @previous_subscription_level.deleter - def previous_subscription_level(self): - self._previous_subscription_level_value = None - self._previous_subscription_level_present = False - - def __repr__(self): - return 'PaperDocChangeSubscriptionDetails(event_uuid={!r}, new_subscription_level={!r}, previous_subscription_level={!r})'.format( - self._event_uuid_value, - self._new_subscription_level_value, - self._previous_subscription_level_value, - ) - -PaperDocChangeSubscriptionDetails_validator = bv.Struct(PaperDocChangeSubscriptionDetails) - -class PaperDocDeleteCommentDetails(object): - """ - Deleted a Paper doc comment. - - :ivar event_uuid: Event unique identifier. - :ivar comment_text: Comment text. Might be missing due to historical data - gap. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - '_comment_text_value', - '_comment_text_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None, - comment_text=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._comment_text_value = None - self._comment_text_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - if comment_text is not None: - self.comment_text = comment_text - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - @property - def comment_text(self): - """ - Comment text. Might be missing due to historical data gap. - - :rtype: str - """ - if self._comment_text_present: - return self._comment_text_value - else: - return None - - @comment_text.setter - def comment_text(self, val): - if val is None: - del self.comment_text - return - val = self._comment_text_validator.validate(val) - self._comment_text_value = val - self._comment_text_present = True - - @comment_text.deleter - def comment_text(self): - self._comment_text_value = None - self._comment_text_present = False - - def __repr__(self): - return 'PaperDocDeleteCommentDetails(event_uuid={!r}, comment_text={!r})'.format( - self._event_uuid_value, - self._comment_text_value, - ) - -PaperDocDeleteCommentDetails_validator = bv.Struct(PaperDocDeleteCommentDetails) - -class PaperDocDeletedDetails(object): - """ - Paper doc archived. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperDocDeletedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperDocDeletedDetails_validator = bv.Struct(PaperDocDeletedDetails) - -class PaperDocDownloadDetails(object): - """ - Downloaded a Paper doc in a particular output format. - - :ivar event_uuid: Event unique identifier. - :ivar export_file_format: Export file format. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - '_export_file_format_value', - '_export_file_format_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None, - export_file_format=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._export_file_format_value = None - self._export_file_format_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - if export_file_format is not None: - self.export_file_format = export_file_format - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - @property - def export_file_format(self): - """ - Export file format. - - :rtype: PaperDownloadFormat - """ - if self._export_file_format_present: - return self._export_file_format_value - else: - raise AttributeError("missing required field 'export_file_format'") - - @export_file_format.setter - def export_file_format(self, val): - self._export_file_format_validator.validate_type_only(val) - self._export_file_format_value = val - self._export_file_format_present = True - - @export_file_format.deleter - def export_file_format(self): - self._export_file_format_value = None - self._export_file_format_present = False - - def __repr__(self): - return 'PaperDocDownloadDetails(event_uuid={!r}, export_file_format={!r})'.format( - self._event_uuid_value, - self._export_file_format_value, - ) - -PaperDocDownloadDetails_validator = bv.Struct(PaperDocDownloadDetails) - -class PaperDocEditCommentDetails(object): - """ - Edited a Paper doc comment. - - :ivar event_uuid: Event unique identifier. - :ivar comment_text: Comment text. Might be missing due to historical data - gap. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - '_comment_text_value', - '_comment_text_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None, - comment_text=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._comment_text_value = None - self._comment_text_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - if comment_text is not None: - self.comment_text = comment_text - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - @property - def comment_text(self): - """ - Comment text. Might be missing due to historical data gap. - - :rtype: str - """ - if self._comment_text_present: - return self._comment_text_value - else: - return None - - @comment_text.setter - def comment_text(self, val): - if val is None: - del self.comment_text - return - val = self._comment_text_validator.validate(val) - self._comment_text_value = val - self._comment_text_present = True - - @comment_text.deleter - def comment_text(self): - self._comment_text_value = None - self._comment_text_present = False - - def __repr__(self): - return 'PaperDocEditCommentDetails(event_uuid={!r}, comment_text={!r})'.format( - self._event_uuid_value, - self._comment_text_value, - ) - -PaperDocEditCommentDetails_validator = bv.Struct(PaperDocEditCommentDetails) - -class PaperDocEditDetails(object): - """ - Edited a Paper doc. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperDocEditDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperDocEditDetails_validator = bv.Struct(PaperDocEditDetails) - -class PaperDocFollowedDetails(object): - """ - Followed a Paper doc. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperDocFollowedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperDocFollowedDetails_validator = bv.Struct(PaperDocFollowedDetails) - -class PaperDocMentionDetails(object): - """ - Mentioned a member in a Paper doc. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperDocMentionDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperDocMentionDetails_validator = bv.Struct(PaperDocMentionDetails) - -class PaperDocRequestAccessDetails(object): - """ - Requested to be a member on a Paper doc. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperDocRequestAccessDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperDocRequestAccessDetails_validator = bv.Struct(PaperDocRequestAccessDetails) - -class PaperDocResolveCommentDetails(object): - """ - Paper doc comment resolved. - - :ivar event_uuid: Event unique identifier. - :ivar comment_text: Comment text. Might be missing due to historical data - gap. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - '_comment_text_value', - '_comment_text_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None, - comment_text=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._comment_text_value = None - self._comment_text_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - if comment_text is not None: - self.comment_text = comment_text - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - @property - def comment_text(self): - """ - Comment text. Might be missing due to historical data gap. - - :rtype: str - """ - if self._comment_text_present: - return self._comment_text_value - else: - return None - - @comment_text.setter - def comment_text(self, val): - if val is None: - del self.comment_text - return - val = self._comment_text_validator.validate(val) - self._comment_text_value = val - self._comment_text_present = True - - @comment_text.deleter - def comment_text(self): - self._comment_text_value = None - self._comment_text_present = False - - def __repr__(self): - return 'PaperDocResolveCommentDetails(event_uuid={!r}, comment_text={!r})'.format( - self._event_uuid_value, - self._comment_text_value, - ) - -PaperDocResolveCommentDetails_validator = bv.Struct(PaperDocResolveCommentDetails) - -class PaperDocRevertDetails(object): - """ - Restored a Paper doc to previous revision. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperDocRevertDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperDocRevertDetails_validator = bv.Struct(PaperDocRevertDetails) - -class PaperDocSlackShareDetails(object): - """ - Paper doc link shared via slack. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperDocSlackShareDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperDocSlackShareDetails_validator = bv.Struct(PaperDocSlackShareDetails) - -class PaperDocTeamInviteDetails(object): - """ - Paper doc shared with team member. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperDocTeamInviteDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperDocTeamInviteDetails_validator = bv.Struct(PaperDocTeamInviteDetails) - -class PaperDocTrashedDetails(object): - """ - Paper doc trashed. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperDocTrashedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperDocTrashedDetails_validator = bv.Struct(PaperDocTrashedDetails) - -class PaperDocUnresolveCommentDetails(object): - """ - Unresolved a Paper doc comment. - - :ivar event_uuid: Event unique identifier. - :ivar comment_text: Comment text. Might be missing due to historical data - gap. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - '_comment_text_value', - '_comment_text_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None, - comment_text=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._comment_text_value = None - self._comment_text_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - if comment_text is not None: - self.comment_text = comment_text - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - @property - def comment_text(self): - """ - Comment text. Might be missing due to historical data gap. - - :rtype: str - """ - if self._comment_text_present: - return self._comment_text_value - else: - return None - - @comment_text.setter - def comment_text(self, val): - if val is None: - del self.comment_text - return - val = self._comment_text_validator.validate(val) - self._comment_text_value = val - self._comment_text_present = True - - @comment_text.deleter - def comment_text(self): - self._comment_text_value = None - self._comment_text_present = False - - def __repr__(self): - return 'PaperDocUnresolveCommentDetails(event_uuid={!r}, comment_text={!r})'.format( - self._event_uuid_value, - self._comment_text_value, - ) - -PaperDocUnresolveCommentDetails_validator = bv.Struct(PaperDocUnresolveCommentDetails) - -class PaperDocUntrashedDetails(object): - """ - Paper doc untrashed. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperDocUntrashedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperDocUntrashedDetails_validator = bv.Struct(PaperDocUntrashedDetails) - -class PaperDocViewDetails(object): - """ - Viewed Paper doc. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperDocViewDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperDocViewDetails_validator = bv.Struct(PaperDocViewDetails) - -class PaperDocumentLogInfo(object): - """ - Paper document's logged information. - - :ivar doc_id: Papers document Id. - :ivar doc_title: Paper document title. - """ - - __slots__ = [ - '_doc_id_value', - '_doc_id_present', - '_doc_title_value', - '_doc_title_present', - ] - - _has_required_fields = True - - def __init__(self, - doc_id=None, - doc_title=None): - self._doc_id_value = None - self._doc_id_present = False - self._doc_title_value = None - self._doc_title_present = False - if doc_id is not None: - self.doc_id = doc_id - if doc_title is not None: - self.doc_title = doc_title - - @property - def doc_id(self): - """ - Papers document Id. - - :rtype: str - """ - if self._doc_id_present: - return self._doc_id_value - else: - raise AttributeError("missing required field 'doc_id'") - - @doc_id.setter - def doc_id(self, val): - val = self._doc_id_validator.validate(val) - self._doc_id_value = val - self._doc_id_present = True - - @doc_id.deleter - def doc_id(self): - self._doc_id_value = None - self._doc_id_present = False - - @property - def doc_title(self): - """ - Paper document title. - - :rtype: str - """ - if self._doc_title_present: - return self._doc_title_value - else: - raise AttributeError("missing required field 'doc_title'") - - @doc_title.setter - def doc_title(self, val): - val = self._doc_title_validator.validate(val) - self._doc_title_value = val - self._doc_title_present = True - - @doc_title.deleter - def doc_title(self): - self._doc_title_value = None - self._doc_title_present = False - - def __repr__(self): - return 'PaperDocumentLogInfo(doc_id={!r}, doc_title={!r})'.format( - self._doc_id_value, - self._doc_title_value, - ) - -PaperDocumentLogInfo_validator = bv.Struct(PaperDocumentLogInfo) - -class PaperDownloadFormat(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - docx = None - # Attribute is overwritten below the class definition - html = None - # Attribute is overwritten below the class definition - markdown = None - # Attribute is overwritten below the class definition - other = None - - def is_docx(self): - """ - Check if the union tag is ``docx``. - - :rtype: bool - """ - return self._tag == 'docx' - - def is_html(self): - """ - Check if the union tag is ``html``. - - :rtype: bool - """ - return self._tag == 'html' - - def is_markdown(self): - """ - Check if the union tag is ``markdown``. - - :rtype: bool - """ - return self._tag == 'markdown' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'PaperDownloadFormat(%r, %r)' % (self._tag, self._value) - -PaperDownloadFormat_validator = bv.Union(PaperDownloadFormat) - -class PaperEnabledUsersGroupAdditionDetails(object): - """ - Users added to Paper enabled users list. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'PaperEnabledUsersGroupAdditionDetails()' - -PaperEnabledUsersGroupAdditionDetails_validator = bv.Struct(PaperEnabledUsersGroupAdditionDetails) - -class PaperEnabledUsersGroupRemovalDetails(object): - """ - Users removed from Paper enabled users list. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'PaperEnabledUsersGroupRemovalDetails()' - -PaperEnabledUsersGroupRemovalDetails_validator = bv.Struct(PaperEnabledUsersGroupRemovalDetails) - -class PaperExternalViewAllowDetails(object): - """ - Paper external sharing policy changed: anyone. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'PaperExternalViewAllowDetails()' - -PaperExternalViewAllowDetails_validator = bv.Struct(PaperExternalViewAllowDetails) - -class PaperExternalViewDefaultTeamDetails(object): - """ - Paper external sharing policy changed: default team. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'PaperExternalViewDefaultTeamDetails()' - -PaperExternalViewDefaultTeamDetails_validator = bv.Struct(PaperExternalViewDefaultTeamDetails) - -class PaperExternalViewForbidDetails(object): - """ - Paper external sharing policy changed: team-only. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'PaperExternalViewForbidDetails()' - -PaperExternalViewForbidDetails_validator = bv.Struct(PaperExternalViewForbidDetails) - -class PaperFolderChangeSubscriptionDetails(object): - """ - Followed or unfollowed a Paper folder. - - :ivar event_uuid: Event unique identifier. - :ivar new_subscription_level: New folder subscription level. - :ivar previous_subscription_level: Previous folder subscription level. Might - be missing due to historical data gap. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - '_new_subscription_level_value', - '_new_subscription_level_present', - '_previous_subscription_level_value', - '_previous_subscription_level_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None, - new_subscription_level=None, - previous_subscription_level=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._new_subscription_level_value = None - self._new_subscription_level_present = False - self._previous_subscription_level_value = None - self._previous_subscription_level_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - if new_subscription_level is not None: - self.new_subscription_level = new_subscription_level - if previous_subscription_level is not None: - self.previous_subscription_level = previous_subscription_level - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - @property - def new_subscription_level(self): - """ - New folder subscription level. - - :rtype: str - """ - if self._new_subscription_level_present: - return self._new_subscription_level_value - else: - raise AttributeError("missing required field 'new_subscription_level'") - - @new_subscription_level.setter - def new_subscription_level(self, val): - val = self._new_subscription_level_validator.validate(val) - self._new_subscription_level_value = val - self._new_subscription_level_present = True - - @new_subscription_level.deleter - def new_subscription_level(self): - self._new_subscription_level_value = None - self._new_subscription_level_present = False - - @property - def previous_subscription_level(self): - """ - Previous folder subscription level. Might be missing due to historical - data gap. - - :rtype: str - """ - if self._previous_subscription_level_present: - return self._previous_subscription_level_value - else: - return None - - @previous_subscription_level.setter - def previous_subscription_level(self, val): - if val is None: - del self.previous_subscription_level - return - val = self._previous_subscription_level_validator.validate(val) - self._previous_subscription_level_value = val - self._previous_subscription_level_present = True - - @previous_subscription_level.deleter - def previous_subscription_level(self): - self._previous_subscription_level_value = None - self._previous_subscription_level_present = False - - def __repr__(self): - return 'PaperFolderChangeSubscriptionDetails(event_uuid={!r}, new_subscription_level={!r}, previous_subscription_level={!r})'.format( - self._event_uuid_value, - self._new_subscription_level_value, - self._previous_subscription_level_value, - ) - -PaperFolderChangeSubscriptionDetails_validator = bv.Struct(PaperFolderChangeSubscriptionDetails) - -class PaperFolderDeletedDetails(object): - """ - Paper folder archived. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperFolderDeletedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperFolderDeletedDetails_validator = bv.Struct(PaperFolderDeletedDetails) - -class PaperFolderFollowedDetails(object): - """ - Followed a Paper folder. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperFolderFollowedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperFolderFollowedDetails_validator = bv.Struct(PaperFolderFollowedDetails) - -class PaperFolderLogInfo(object): - """ - Paper folder's logged information. - - :ivar folder_id: Papers folder Id. - :ivar folder_name: Paper folder name. - """ - - __slots__ = [ - '_folder_id_value', - '_folder_id_present', - '_folder_name_value', - '_folder_name_present', - ] - - _has_required_fields = True - - def __init__(self, - folder_id=None, - folder_name=None): - self._folder_id_value = None - self._folder_id_present = False - self._folder_name_value = None - self._folder_name_present = False - if folder_id is not None: - self.folder_id = folder_id - if folder_name is not None: - self.folder_name = folder_name - - @property - def folder_id(self): - """ - Papers folder Id. - - :rtype: str - """ - if self._folder_id_present: - return self._folder_id_value - else: - raise AttributeError("missing required field 'folder_id'") - - @folder_id.setter - def folder_id(self, val): - val = self._folder_id_validator.validate(val) - self._folder_id_value = val - self._folder_id_present = True - - @folder_id.deleter - def folder_id(self): - self._folder_id_value = None - self._folder_id_present = False - - @property - def folder_name(self): - """ - Paper folder name. - - :rtype: str - """ - if self._folder_name_present: - return self._folder_name_value - else: - raise AttributeError("missing required field 'folder_name'") - - @folder_name.setter - def folder_name(self, val): - val = self._folder_name_validator.validate(val) - self._folder_name_value = val - self._folder_name_present = True - - @folder_name.deleter - def folder_name(self): - self._folder_name_value = None - self._folder_name_present = False - - def __repr__(self): - return 'PaperFolderLogInfo(folder_id={!r}, folder_name={!r})'.format( - self._folder_id_value, - self._folder_name_value, - ) - -PaperFolderLogInfo_validator = bv.Struct(PaperFolderLogInfo) - -class PaperFolderTeamInviteDetails(object): - """ - Paper folder shared with team member. - - :ivar event_uuid: Event unique identifier. - """ - - __slots__ = [ - '_event_uuid_value', - '_event_uuid_present', - ] - - _has_required_fields = True - - def __init__(self, - event_uuid=None): - self._event_uuid_value = None - self._event_uuid_present = False - if event_uuid is not None: - self.event_uuid = event_uuid - - @property - def event_uuid(self): - """ - Event unique identifier. - - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") - - @event_uuid.setter - def event_uuid(self, val): - val = self._event_uuid_validator.validate(val) - self._event_uuid_value = val - self._event_uuid_present = True - - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - def __repr__(self): - return 'PaperFolderTeamInviteDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - -PaperFolderTeamInviteDetails_validator = bv.Struct(PaperFolderTeamInviteDetails) - -class PaperMemberPolicy(bb.Union): - """ - Policy for controlling if team members can share Paper documents externally. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - anyone_with_link = None - # Attribute is overwritten below the class definition - only_team = None - # Attribute is overwritten below the class definition - team_and_explicitly_shared = None - # Attribute is overwritten below the class definition - other = None - - def is_anyone_with_link(self): - """ - Check if the union tag is ``anyone_with_link``. - - :rtype: bool - """ - return self._tag == 'anyone_with_link' - - def is_only_team(self): - """ - Check if the union tag is ``only_team``. - - :rtype: bool - """ - return self._tag == 'only_team' - - def is_team_and_explicitly_shared(self): - """ - Check if the union tag is ``team_and_explicitly_shared``. - - :rtype: bool - """ - return self._tag == 'team_and_explicitly_shared' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'PaperMemberPolicy(%r, %r)' % (self._tag, self._value) - -PaperMemberPolicy_validator = bv.Union(PaperMemberPolicy) - -class ParticipantLogInfo(bb.Union): - """ - A user or group - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar UserLogInfo user: User details. - :ivar GroupLogInfo group: Group details. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def user(cls, val): - """ - Create an instance of this class set to the ``user`` tag with value - ``val``. - - :param UserLogInfo val: - :rtype: ParticipantLogInfo - """ - return cls('user', val) - - @classmethod - def group(cls, val): - """ - Create an instance of this class set to the ``group`` tag with value - ``val``. - - :param GroupLogInfo val: - :rtype: ParticipantLogInfo - """ - return cls('group', val) - - def is_user(self): - """ - Check if the union tag is ``user``. - - :rtype: bool - """ - return self._tag == 'user' - - def is_group(self): - """ - Check if the union tag is ``group``. - - :rtype: bool - """ - return self._tag == 'group' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_user(self): - """ - User details. - - Only call this if :meth:`is_user` is true. - - :rtype: UserLogInfo - """ - if not self.is_user(): - raise AttributeError("tag 'user' not set") - return self._value - - def get_group(self): - """ - Group details. - - Only call this if :meth:`is_group` is true. - - :rtype: GroupLogInfo - """ - if not self.is_group(): - raise AttributeError("tag 'group' not set") - return self._value - - def __repr__(self): - return 'ParticipantLogInfo(%r, %r)' % (self._tag, self._value) - -ParticipantLogInfo_validator = bv.Union(ParticipantLogInfo) - -class PasswordChangeDetails(object): - """ - Changed password. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'PasswordChangeDetails()' - -PasswordChangeDetails_validator = bv.Struct(PasswordChangeDetails) - -class PasswordLoginFailDetails(object): - """ - Failed to sign in using a password. - - :ivar error_details: Login failure details. - """ - - __slots__ = [ - '_error_details_value', - '_error_details_present', - ] - - _has_required_fields = True - - def __init__(self, - error_details=None): - self._error_details_value = None - self._error_details_present = False - if error_details is not None: - self.error_details = error_details - - @property - def error_details(self): - """ - Login failure details. - - :rtype: FailureDetailsLogInfo - """ - if self._error_details_present: - return self._error_details_value - else: - raise AttributeError("missing required field 'error_details'") - - @error_details.setter - def error_details(self, val): - self._error_details_validator.validate_type_only(val) - self._error_details_value = val - self._error_details_present = True - - @error_details.deleter - def error_details(self): - self._error_details_value = None - self._error_details_present = False - - def __repr__(self): - return 'PasswordLoginFailDetails(error_details={!r})'.format( - self._error_details_value, - ) - -PasswordLoginFailDetails_validator = bv.Struct(PasswordLoginFailDetails) - -class PasswordLoginSuccessDetails(object): - """ - Signed in using a password. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'PasswordLoginSuccessDetails()' - -PasswordLoginSuccessDetails_validator = bv.Struct(PasswordLoginSuccessDetails) - -class PasswordResetAllDetails(object): - """ - Reset all team member passwords. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'PasswordResetAllDetails()' - -PasswordResetAllDetails_validator = bv.Struct(PasswordResetAllDetails) - -class PasswordResetDetails(object): - """ - Reset password. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'PasswordResetDetails()' - -PasswordResetDetails_validator = bv.Struct(PasswordResetDetails) - -class PathLogInfo(object): - """ - Path's details. - - :ivar contextual: Fully qualified path relative to event's context. Might be - missing due to historical data gap. - :ivar namespace_relative: Path relative to the namespace containing the - content. - """ - - __slots__ = [ - '_contextual_value', - '_contextual_present', - '_namespace_relative_value', - '_namespace_relative_present', - ] - - _has_required_fields = True - - def __init__(self, - namespace_relative=None, - contextual=None): - self._contextual_value = None - self._contextual_present = False - self._namespace_relative_value = None - self._namespace_relative_present = False - if contextual is not None: - self.contextual = contextual - if namespace_relative is not None: - self.namespace_relative = namespace_relative - - @property - def contextual(self): - """ - Fully qualified path relative to event's context. Might be missing due - to historical data gap. - - :rtype: str - """ - if self._contextual_present: - return self._contextual_value - else: - return None - - @contextual.setter - def contextual(self, val): - if val is None: - del self.contextual - return - val = self._contextual_validator.validate(val) - self._contextual_value = val - self._contextual_present = True - - @contextual.deleter - def contextual(self): - self._contextual_value = None - self._contextual_present = False - - @property - def namespace_relative(self): - """ - Path relative to the namespace containing the content. - - :rtype: NamespaceRelativePathLogInfo - """ - if self._namespace_relative_present: - return self._namespace_relative_value - else: - raise AttributeError("missing required field 'namespace_relative'") - - @namespace_relative.setter - def namespace_relative(self, val): - self._namespace_relative_validator.validate_type_only(val) - self._namespace_relative_value = val - self._namespace_relative_present = True - - @namespace_relative.deleter - def namespace_relative(self): - self._namespace_relative_value = None - self._namespace_relative_present = False - - def __repr__(self): - return 'PathLogInfo(namespace_relative={!r}, contextual={!r})'.format( - self._namespace_relative_value, - self._contextual_value, - ) - -PathLogInfo_validator = bv.Struct(PathLogInfo) - -class PermanentDeleteChangePolicyDetails(object): - """ - Enabled or disabled the ability of team members to permanently delete - content. - - :ivar new_value: New permanent delete content policy. - :ivar previous_value: Previous permanent delete content policy. Might be - missing due to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New permanent delete content policy. - - :rtype: ContentPermanentDeletePolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous permanent delete content policy. Might be missing due to - historical data gap. - - :rtype: ContentPermanentDeletePolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'PermanentDeleteChangePolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -PermanentDeleteChangePolicyDetails_validator = bv.Struct(PermanentDeleteChangePolicyDetails) - -class PlacementRestriction(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - europe_only = None - # Attribute is overwritten below the class definition - none = None - # Attribute is overwritten below the class definition - other = None - - def is_europe_only(self): - """ - Check if the union tag is ``europe_only``. - - :rtype: bool - """ - return self._tag == 'europe_only' - - def is_none(self): - """ - Check if the union tag is ``none``. - - :rtype: bool - """ - return self._tag == 'none' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'PlacementRestriction(%r, %r)' % (self._tag, self._value) - -PlacementRestriction_validator = bv.Union(PlacementRestriction) - -class RelocateAssetReferencesLogInfo(object): - """ - Provides the indices of the source asset and the destination asset for a - relocate action. - - :ivar src_asset_index: Source asset position in the Assets list. - :ivar dest_asset_index: Destination asset position in the Assets list. - """ - - __slots__ = [ - '_src_asset_index_value', - '_src_asset_index_present', - '_dest_asset_index_value', - '_dest_asset_index_present', - ] - - _has_required_fields = True - - def __init__(self, - src_asset_index=None, - dest_asset_index=None): - self._src_asset_index_value = None - self._src_asset_index_present = False - self._dest_asset_index_value = None - self._dest_asset_index_present = False - if src_asset_index is not None: - self.src_asset_index = src_asset_index - if dest_asset_index is not None: - self.dest_asset_index = dest_asset_index - - @property - def src_asset_index(self): - """ - Source asset position in the Assets list. - - :rtype: long - """ - if self._src_asset_index_present: - return self._src_asset_index_value - else: - raise AttributeError("missing required field 'src_asset_index'") - - @src_asset_index.setter - def src_asset_index(self, val): - val = self._src_asset_index_validator.validate(val) - self._src_asset_index_value = val - self._src_asset_index_present = True - - @src_asset_index.deleter - def src_asset_index(self): - self._src_asset_index_value = None - self._src_asset_index_present = False - - @property - def dest_asset_index(self): - """ - Destination asset position in the Assets list. - - :rtype: long - """ - if self._dest_asset_index_present: - return self._dest_asset_index_value - else: - raise AttributeError("missing required field 'dest_asset_index'") - - @dest_asset_index.setter - def dest_asset_index(self, val): - val = self._dest_asset_index_validator.validate(val) - self._dest_asset_index_value = val - self._dest_asset_index_present = True - - @dest_asset_index.deleter - def dest_asset_index(self): - self._dest_asset_index_value = None - self._dest_asset_index_present = False - - def __repr__(self): - return 'RelocateAssetReferencesLogInfo(src_asset_index={!r}, dest_asset_index={!r})'.format( - self._src_asset_index_value, - self._dest_asset_index_value, - ) - -RelocateAssetReferencesLogInfo_validator = bv.Struct(RelocateAssetReferencesLogInfo) - -class ResellerLogInfo(object): - """ - Reseller information. - - :ivar reseller_name: Reseller name. - :ivar reseller_id: Reseller ID. - """ - - __slots__ = [ - '_reseller_name_value', - '_reseller_name_present', - '_reseller_id_value', - '_reseller_id_present', - ] - - _has_required_fields = True - - def __init__(self, - reseller_name=None, - reseller_id=None): - self._reseller_name_value = None - self._reseller_name_present = False - self._reseller_id_value = None - self._reseller_id_present = False - if reseller_name is not None: - self.reseller_name = reseller_name - if reseller_id is not None: - self.reseller_id = reseller_id - - @property - def reseller_name(self): - """ - Reseller name. - - :rtype: str - """ - if self._reseller_name_present: - return self._reseller_name_value - else: - raise AttributeError("missing required field 'reseller_name'") - - @reseller_name.setter - def reseller_name(self, val): - val = self._reseller_name_validator.validate(val) - self._reseller_name_value = val - self._reseller_name_present = True - - @reseller_name.deleter - def reseller_name(self): - self._reseller_name_value = None - self._reseller_name_present = False - - @property - def reseller_id(self): - """ - Reseller ID. - - :rtype: str - """ - if self._reseller_id_present: - return self._reseller_id_value - else: - raise AttributeError("missing required field 'reseller_id'") - - @reseller_id.setter - def reseller_id(self, val): - val = self._reseller_id_validator.validate(val) - self._reseller_id_value = val - self._reseller_id_present = True - - @reseller_id.deleter - def reseller_id(self): - self._reseller_id_value = None - self._reseller_id_present = False - - def __repr__(self): - return 'ResellerLogInfo(reseller_name={!r}, reseller_id={!r})'.format( - self._reseller_name_value, - self._reseller_id_value, - ) - -ResellerLogInfo_validator = bv.Struct(ResellerLogInfo) - -class ResellerSupportSessionEndDetails(object): - """ - Ended reseller support session. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'ResellerSupportSessionEndDetails()' - -ResellerSupportSessionEndDetails_validator = bv.Struct(ResellerSupportSessionEndDetails) - -class ResellerSupportSessionStartDetails(object): - """ - Started reseller support session. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'ResellerSupportSessionStartDetails()' - -ResellerSupportSessionStartDetails_validator = bv.Struct(ResellerSupportSessionStartDetails) - -class SfAddGroupDetails(object): - """ - Added the team to a shared folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar sharing_permission: Sharing permission. Might be missing due to - historical data gap. - :ivar team_name: Team name. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_sharing_permission_value', - '_sharing_permission_present', - '_team_name_value', - '_team_name_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None, - team_name=None, - sharing_permission=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._sharing_permission_value = None - self._sharing_permission_present = False - self._team_name_value = None - self._team_name_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if sharing_permission is not None: - self.sharing_permission = sharing_permission - if team_name is not None: - self.team_name = team_name - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - raise AttributeError("missing required field 'original_folder_name'") - - @original_folder_name.setter - def original_folder_name(self, val): - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def sharing_permission(self): - """ - Sharing permission. Might be missing due to historical data gap. - - :rtype: str - """ - if self._sharing_permission_present: - return self._sharing_permission_value - else: - return None - - @sharing_permission.setter - def sharing_permission(self, val): - if val is None: - del self.sharing_permission - return - val = self._sharing_permission_validator.validate(val) - self._sharing_permission_value = val - self._sharing_permission_present = True - - @sharing_permission.deleter - def sharing_permission(self): - self._sharing_permission_value = None - self._sharing_permission_present = False - - @property - def team_name(self): - """ - Team name. - - :rtype: str - """ - if self._team_name_present: - return self._team_name_value - else: - raise AttributeError("missing required field 'team_name'") - - @team_name.setter - def team_name(self, val): - val = self._team_name_validator.validate(val) - self._team_name_value = val - self._team_name_present = True - - @team_name.deleter - def team_name(self): - self._team_name_value = None - self._team_name_present = False - - def __repr__(self): - return 'SfAddGroupDetails(target_asset_index={!r}, original_folder_name={!r}, team_name={!r}, sharing_permission={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._team_name_value, - self._sharing_permission_value, - ) - -SfAddGroupDetails_validator = bv.Struct(SfAddGroupDetails) - -class SfAllowNonMembersToViewSharedLinksDetails(object): - """ - Allowed non collaborators to view links to files in a shared folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar shared_folder_type: Shared folder type. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_shared_folder_type_value', - '_shared_folder_type_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None, - shared_folder_type=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._shared_folder_type_value = None - self._shared_folder_type_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if shared_folder_type is not None: - self.shared_folder_type = shared_folder_type - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - raise AttributeError("missing required field 'original_folder_name'") - - @original_folder_name.setter - def original_folder_name(self, val): - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def shared_folder_type(self): - """ - Shared folder type. Might be missing due to historical data gap. - - :rtype: str - """ - if self._shared_folder_type_present: - return self._shared_folder_type_value - else: - return None - - @shared_folder_type.setter - def shared_folder_type(self, val): - if val is None: - del self.shared_folder_type - return - val = self._shared_folder_type_validator.validate(val) - self._shared_folder_type_value = val - self._shared_folder_type_present = True - - @shared_folder_type.deleter - def shared_folder_type(self): - self._shared_folder_type_value = None - self._shared_folder_type_present = False - - def __repr__(self): - return 'SfAllowNonMembersToViewSharedLinksDetails(target_asset_index={!r}, original_folder_name={!r}, shared_folder_type={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._shared_folder_type_value, - ) - -SfAllowNonMembersToViewSharedLinksDetails_validator = bv.Struct(SfAllowNonMembersToViewSharedLinksDetails) - -class SfExternalInviteWarnDetails(object): - """ - Admin settings: team members see a warning before sharing folders outside - the team (DEPRECATED FEATURE). - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'SfExternalInviteWarnDetails()' - -SfExternalInviteWarnDetails_validator = bv.Struct(SfExternalInviteWarnDetails) - -class SfInviteGroupDetails(object): - """ - Invited a group to a shared folder. - - :ivar target_asset_index: Target asset position in the Assets list. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - def __repr__(self): - return 'SfInviteGroupDetails(target_asset_index={!r})'.format( - self._target_asset_index_value, - ) - -SfInviteGroupDetails_validator = bv.Struct(SfInviteGroupDetails) - -class SfNestDetails(object): - """ - Changed parent of shared folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar prev_parent_ns_id: Previous parent namespace ID. Might be missing due - to historical data gap. - :ivar new_parent_ns_id: New parent namespace ID. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_prev_parent_ns_id_value', - '_prev_parent_ns_id_present', - '_new_parent_ns_id_value', - '_new_parent_ns_id_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None, - prev_parent_ns_id=None, - new_parent_ns_id=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._prev_parent_ns_id_value = None - self._prev_parent_ns_id_present = False - self._new_parent_ns_id_value = None - self._new_parent_ns_id_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if prev_parent_ns_id is not None: - self.prev_parent_ns_id = prev_parent_ns_id - if new_parent_ns_id is not None: - self.new_parent_ns_id = new_parent_ns_id - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - raise AttributeError("missing required field 'original_folder_name'") - - @original_folder_name.setter - def original_folder_name(self, val): - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def prev_parent_ns_id(self): - """ - Previous parent namespace ID. Might be missing due to historical data - gap. - - :rtype: str - """ - if self._prev_parent_ns_id_present: - return self._prev_parent_ns_id_value - else: - return None - - @prev_parent_ns_id.setter - def prev_parent_ns_id(self, val): - if val is None: - del self.prev_parent_ns_id - return - val = self._prev_parent_ns_id_validator.validate(val) - self._prev_parent_ns_id_value = val - self._prev_parent_ns_id_present = True - - @prev_parent_ns_id.deleter - def prev_parent_ns_id(self): - self._prev_parent_ns_id_value = None - self._prev_parent_ns_id_present = False - - @property - def new_parent_ns_id(self): - """ - New parent namespace ID. Might be missing due to historical data gap. - - :rtype: str - """ - if self._new_parent_ns_id_present: - return self._new_parent_ns_id_value - else: - return None - - @new_parent_ns_id.setter - def new_parent_ns_id(self, val): - if val is None: - del self.new_parent_ns_id - return - val = self._new_parent_ns_id_validator.validate(val) - self._new_parent_ns_id_value = val - self._new_parent_ns_id_present = True - - @new_parent_ns_id.deleter - def new_parent_ns_id(self): - self._new_parent_ns_id_value = None - self._new_parent_ns_id_present = False - - def __repr__(self): - return 'SfNestDetails(target_asset_index={!r}, original_folder_name={!r}, prev_parent_ns_id={!r}, new_parent_ns_id={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._prev_parent_ns_id_value, - self._new_parent_ns_id_value, - ) - -SfNestDetails_validator = bv.Struct(SfNestDetails) - -class SfTeamDeclineDetails(object): - """ - Declined a team member's invitation to a shared folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - raise AttributeError("missing required field 'original_folder_name'") - - @original_folder_name.setter - def original_folder_name(self, val): - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - def __repr__(self): - return 'SfTeamDeclineDetails(target_asset_index={!r}, original_folder_name={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - ) - -SfTeamDeclineDetails_validator = bv.Struct(SfTeamDeclineDetails) - -class SfTeamGrantAccessDetails(object): - """ - Granted access to a shared folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - raise AttributeError("missing required field 'original_folder_name'") - - @original_folder_name.setter - def original_folder_name(self, val): - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - def __repr__(self): - return 'SfTeamGrantAccessDetails(target_asset_index={!r}, original_folder_name={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - ) - -SfTeamGrantAccessDetails_validator = bv.Struct(SfTeamGrantAccessDetails) - -class SfTeamInviteChangeRoleDetails(object): - """ - Changed a team member's role in a shared folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar new_sharing_permission: New sharing permission. Might be missing due - to historical data gap. - :ivar previous_sharing_permission: Previous sharing permission. Might be - missing due to historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_new_sharing_permission_value', - '_new_sharing_permission_present', - '_previous_sharing_permission_value', - '_previous_sharing_permission_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None, - new_sharing_permission=None, - previous_sharing_permission=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._new_sharing_permission_value = None - self._new_sharing_permission_present = False - self._previous_sharing_permission_value = None - self._previous_sharing_permission_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if new_sharing_permission is not None: - self.new_sharing_permission = new_sharing_permission - if previous_sharing_permission is not None: - self.previous_sharing_permission = previous_sharing_permission - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - raise AttributeError("missing required field 'original_folder_name'") - - @original_folder_name.setter - def original_folder_name(self, val): - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def new_sharing_permission(self): - """ - New sharing permission. Might be missing due to historical data gap. - - :rtype: str - """ - if self._new_sharing_permission_present: - return self._new_sharing_permission_value - else: - return None - - @new_sharing_permission.setter - def new_sharing_permission(self, val): - if val is None: - del self.new_sharing_permission - return - val = self._new_sharing_permission_validator.validate(val) - self._new_sharing_permission_value = val - self._new_sharing_permission_present = True - - @new_sharing_permission.deleter - def new_sharing_permission(self): - self._new_sharing_permission_value = None - self._new_sharing_permission_present = False - - @property - def previous_sharing_permission(self): - """ - Previous sharing permission. Might be missing due to historical data - gap. - - :rtype: str - """ - if self._previous_sharing_permission_present: - return self._previous_sharing_permission_value - else: - return None - - @previous_sharing_permission.setter - def previous_sharing_permission(self, val): - if val is None: - del self.previous_sharing_permission - return - val = self._previous_sharing_permission_validator.validate(val) - self._previous_sharing_permission_value = val - self._previous_sharing_permission_present = True - - @previous_sharing_permission.deleter - def previous_sharing_permission(self): - self._previous_sharing_permission_value = None - self._previous_sharing_permission_present = False - - def __repr__(self): - return 'SfTeamInviteChangeRoleDetails(target_asset_index={!r}, original_folder_name={!r}, new_sharing_permission={!r}, previous_sharing_permission={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._new_sharing_permission_value, - self._previous_sharing_permission_value, - ) - -SfTeamInviteChangeRoleDetails_validator = bv.Struct(SfTeamInviteChangeRoleDetails) - -class SfTeamInviteDetails(object): - """ - Invited team members to a shared folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar sharing_permission: Sharing permission. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_sharing_permission_value', - '_sharing_permission_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None, - sharing_permission=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._sharing_permission_value = None - self._sharing_permission_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if sharing_permission is not None: - self.sharing_permission = sharing_permission - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - raise AttributeError("missing required field 'original_folder_name'") - - @original_folder_name.setter - def original_folder_name(self, val): - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def sharing_permission(self): - """ - Sharing permission. Might be missing due to historical data gap. - - :rtype: str - """ - if self._sharing_permission_present: - return self._sharing_permission_value - else: - return None - - @sharing_permission.setter - def sharing_permission(self, val): - if val is None: - del self.sharing_permission - return - val = self._sharing_permission_validator.validate(val) - self._sharing_permission_value = val - self._sharing_permission_present = True - - @sharing_permission.deleter - def sharing_permission(self): - self._sharing_permission_value = None - self._sharing_permission_present = False - - def __repr__(self): - return 'SfTeamInviteDetails(target_asset_index={!r}, original_folder_name={!r}, sharing_permission={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._sharing_permission_value, - ) - -SfTeamInviteDetails_validator = bv.Struct(SfTeamInviteDetails) - -class SfTeamJoinDetails(object): - """ - Joined a team member's shared folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - raise AttributeError("missing required field 'original_folder_name'") - - @original_folder_name.setter - def original_folder_name(self, val): - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - def __repr__(self): - return 'SfTeamJoinDetails(target_asset_index={!r}, original_folder_name={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - ) - -SfTeamJoinDetails_validator = bv.Struct(SfTeamJoinDetails) - -class SfTeamJoinFromOobLinkDetails(object): - """ - Joined a team member's shared folder from a link. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar token_key: Shared link token key. - :ivar sharing_permission: Sharing permission. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_token_key_value', - '_token_key_present', - '_sharing_permission_value', - '_sharing_permission_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None, - token_key=None, - sharing_permission=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._token_key_value = None - self._token_key_present = False - self._sharing_permission_value = None - self._sharing_permission_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if token_key is not None: - self.token_key = token_key - if sharing_permission is not None: - self.sharing_permission = sharing_permission - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - raise AttributeError("missing required field 'original_folder_name'") - - @original_folder_name.setter - def original_folder_name(self, val): - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def token_key(self): - """ - Shared link token key. - - :rtype: str - """ - if self._token_key_present: - return self._token_key_value - else: - return None - - @token_key.setter - def token_key(self, val): - if val is None: - del self.token_key - return - val = self._token_key_validator.validate(val) - self._token_key_value = val - self._token_key_present = True - - @token_key.deleter - def token_key(self): - self._token_key_value = None - self._token_key_present = False - - @property - def sharing_permission(self): - """ - Sharing permission. Might be missing due to historical data gap. - - :rtype: str - """ - if self._sharing_permission_present: - return self._sharing_permission_value - else: - return None - - @sharing_permission.setter - def sharing_permission(self, val): - if val is None: - del self.sharing_permission - return - val = self._sharing_permission_validator.validate(val) - self._sharing_permission_value = val - self._sharing_permission_present = True - - @sharing_permission.deleter - def sharing_permission(self): - self._sharing_permission_value = None - self._sharing_permission_present = False - - def __repr__(self): - return 'SfTeamJoinFromOobLinkDetails(target_asset_index={!r}, original_folder_name={!r}, token_key={!r}, sharing_permission={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._token_key_value, - self._sharing_permission_value, - ) - -SfTeamJoinFromOobLinkDetails_validator = bv.Struct(SfTeamJoinFromOobLinkDetails) - -class SfTeamUninviteDetails(object): - """ - Unshared a folder with a team member. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - raise AttributeError("missing required field 'original_folder_name'") - - @original_folder_name.setter - def original_folder_name(self, val): - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - def __repr__(self): - return 'SfTeamUninviteDetails(target_asset_index={!r}, original_folder_name={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - ) - -SfTeamUninviteDetails_validator = bv.Struct(SfTeamUninviteDetails) - -class SharedContentAddInviteesDetails(object): - """ - Sent an email invitation to the membership of a shared file or folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar sharing_permission: Sharing permission. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_sharing_permission_value', - '_sharing_permission_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None, - sharing_permission=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._sharing_permission_value = None - self._sharing_permission_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if sharing_permission is not None: - self.sharing_permission = sharing_permission - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - return None - - @original_folder_name.setter - def original_folder_name(self, val): - if val is None: - del self.original_folder_name - return - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def sharing_permission(self): - """ - Sharing permission. Might be missing due to historical data gap. - - :rtype: str - """ - if self._sharing_permission_present: - return self._sharing_permission_value - else: - return None - - @sharing_permission.setter - def sharing_permission(self, val): - if val is None: - del self.sharing_permission - return - val = self._sharing_permission_validator.validate(val) - self._sharing_permission_value = val - self._sharing_permission_present = True - - @sharing_permission.deleter - def sharing_permission(self): - self._sharing_permission_value = None - self._sharing_permission_present = False - - def __repr__(self): - return 'SharedContentAddInviteesDetails(target_asset_index={!r}, original_folder_name={!r}, sharing_permission={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._sharing_permission_value, - ) - -SharedContentAddInviteesDetails_validator = bv.Struct(SharedContentAddInviteesDetails) - -class SharedContentAddLinkExpiryDetails(object): - """ - Added an expiry to the link for the shared file or folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar shared_folder_type: Shared folder type. Might be missing due to - historical data gap. - :ivar expiration_start_date: Expiration starting date. - :ivar expiration_days: The number of days from the starting expiration date - after which the link will expire. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_shared_folder_type_value', - '_shared_folder_type_present', - '_expiration_start_date_value', - '_expiration_start_date_present', - '_expiration_days_value', - '_expiration_days_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - expiration_start_date=None, - expiration_days=None, - original_folder_name=None, - shared_folder_type=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._shared_folder_type_value = None - self._shared_folder_type_present = False - self._expiration_start_date_value = None - self._expiration_start_date_present = False - self._expiration_days_value = None - self._expiration_days_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if shared_folder_type is not None: - self.shared_folder_type = shared_folder_type - if expiration_start_date is not None: - self.expiration_start_date = expiration_start_date - if expiration_days is not None: - self.expiration_days = expiration_days - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - return None - - @original_folder_name.setter - def original_folder_name(self, val): - if val is None: - del self.original_folder_name - return - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def shared_folder_type(self): - """ - Shared folder type. Might be missing due to historical data gap. - - :rtype: str - """ - if self._shared_folder_type_present: - return self._shared_folder_type_value - else: - return None - - @shared_folder_type.setter - def shared_folder_type(self, val): - if val is None: - del self.shared_folder_type - return - val = self._shared_folder_type_validator.validate(val) - self._shared_folder_type_value = val - self._shared_folder_type_present = True - - @shared_folder_type.deleter - def shared_folder_type(self): - self._shared_folder_type_value = None - self._shared_folder_type_present = False - - @property - def expiration_start_date(self): - """ - Expiration starting date. - - :rtype: str - """ - if self._expiration_start_date_present: - return self._expiration_start_date_value - else: - raise AttributeError("missing required field 'expiration_start_date'") - - @expiration_start_date.setter - def expiration_start_date(self, val): - val = self._expiration_start_date_validator.validate(val) - self._expiration_start_date_value = val - self._expiration_start_date_present = True - - @expiration_start_date.deleter - def expiration_start_date(self): - self._expiration_start_date_value = None - self._expiration_start_date_present = False - - @property - def expiration_days(self): - """ - The number of days from the starting expiration date after which the - link will expire. - - :rtype: long - """ - if self._expiration_days_present: - return self._expiration_days_value - else: - raise AttributeError("missing required field 'expiration_days'") - - @expiration_days.setter - def expiration_days(self, val): - val = self._expiration_days_validator.validate(val) - self._expiration_days_value = val - self._expiration_days_present = True - - @expiration_days.deleter - def expiration_days(self): - self._expiration_days_value = None - self._expiration_days_present = False - - def __repr__(self): - return 'SharedContentAddLinkExpiryDetails(target_asset_index={!r}, expiration_start_date={!r}, expiration_days={!r}, original_folder_name={!r}, shared_folder_type={!r})'.format( - self._target_asset_index_value, - self._expiration_start_date_value, - self._expiration_days_value, - self._original_folder_name_value, - self._shared_folder_type_value, - ) - -SharedContentAddLinkExpiryDetails_validator = bv.Struct(SharedContentAddLinkExpiryDetails) - -class SharedContentAddLinkPasswordDetails(object): - """ - Added a password to the link for the shared file or folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar shared_folder_type: Shared folder type. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_shared_folder_type_value', - '_shared_folder_type_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None, - shared_folder_type=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._shared_folder_type_value = None - self._shared_folder_type_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if shared_folder_type is not None: - self.shared_folder_type = shared_folder_type - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - return None - - @original_folder_name.setter - def original_folder_name(self, val): - if val is None: - del self.original_folder_name - return - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def shared_folder_type(self): - """ - Shared folder type. Might be missing due to historical data gap. - - :rtype: str - """ - if self._shared_folder_type_present: - return self._shared_folder_type_value - else: - return None - - @shared_folder_type.setter - def shared_folder_type(self, val): - if val is None: - del self.shared_folder_type - return - val = self._shared_folder_type_validator.validate(val) - self._shared_folder_type_value = val - self._shared_folder_type_present = True - - @shared_folder_type.deleter - def shared_folder_type(self): - self._shared_folder_type_value = None - self._shared_folder_type_present = False - - def __repr__(self): - return 'SharedContentAddLinkPasswordDetails(target_asset_index={!r}, original_folder_name={!r}, shared_folder_type={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._shared_folder_type_value, - ) - -SharedContentAddLinkPasswordDetails_validator = bv.Struct(SharedContentAddLinkPasswordDetails) - -class SharedContentAddMemberDetails(object): - """ - Added users and/or groups to the membership of a shared file or folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar sharing_permission: Sharing permission. Might be missing due to - historical data gap. - :ivar shared_folder_type: Shared folder type. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_sharing_permission_value', - '_sharing_permission_present', - '_shared_folder_type_value', - '_shared_folder_type_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None, - sharing_permission=None, - shared_folder_type=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._sharing_permission_value = None - self._sharing_permission_present = False - self._shared_folder_type_value = None - self._shared_folder_type_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if sharing_permission is not None: - self.sharing_permission = sharing_permission - if shared_folder_type is not None: - self.shared_folder_type = shared_folder_type - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - return None - - @original_folder_name.setter - def original_folder_name(self, val): - if val is None: - del self.original_folder_name - return - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def sharing_permission(self): - """ - Sharing permission. Might be missing due to historical data gap. - - :rtype: str - """ - if self._sharing_permission_present: - return self._sharing_permission_value - else: - return None - - @sharing_permission.setter - def sharing_permission(self, val): - if val is None: - del self.sharing_permission - return - val = self._sharing_permission_validator.validate(val) - self._sharing_permission_value = val - self._sharing_permission_present = True - - @sharing_permission.deleter - def sharing_permission(self): - self._sharing_permission_value = None - self._sharing_permission_present = False - - @property - def shared_folder_type(self): - """ - Shared folder type. Might be missing due to historical data gap. - - :rtype: str - """ - if self._shared_folder_type_present: - return self._shared_folder_type_value - else: - return None - - @shared_folder_type.setter - def shared_folder_type(self, val): - if val is None: - del self.shared_folder_type - return - val = self._shared_folder_type_validator.validate(val) - self._shared_folder_type_value = val - self._shared_folder_type_present = True - - @shared_folder_type.deleter - def shared_folder_type(self): - self._shared_folder_type_value = None - self._shared_folder_type_present = False - - def __repr__(self): - return 'SharedContentAddMemberDetails(target_asset_index={!r}, original_folder_name={!r}, sharing_permission={!r}, shared_folder_type={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._sharing_permission_value, - self._shared_folder_type_value, - ) - -SharedContentAddMemberDetails_validator = bv.Struct(SharedContentAddMemberDetails) - -class SharedContentChangeDownloadsPolicyDetails(object): - """ - Changed whether members can download the shared file or folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar shared_folder_type: Shared folder type. Might be missing due to - historical data gap. - :ivar new_value: New downlaod policy. - :ivar previous_value: Previous downlaod policy. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_shared_folder_type_value', - '_shared_folder_type_present', - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - new_value=None, - original_folder_name=None, - shared_folder_type=None, - previous_value=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._shared_folder_type_value = None - self._shared_folder_type_present = False - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if shared_folder_type is not None: - self.shared_folder_type = shared_folder_type - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - return None - - @original_folder_name.setter - def original_folder_name(self, val): - if val is None: - del self.original_folder_name - return - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def shared_folder_type(self): - """ - Shared folder type. Might be missing due to historical data gap. - - :rtype: str - """ - if self._shared_folder_type_present: - return self._shared_folder_type_value - else: - return None - - @shared_folder_type.setter - def shared_folder_type(self, val): - if val is None: - del self.shared_folder_type - return - val = self._shared_folder_type_validator.validate(val) - self._shared_folder_type_value = val - self._shared_folder_type_present = True - - @shared_folder_type.deleter - def shared_folder_type(self): - self._shared_folder_type_value = None - self._shared_folder_type_present = False - - @property - def new_value(self): - """ - New downlaod policy. - - :rtype: SharedContentDownloadsPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous downlaod policy. Might be missing due to historical data gap. - - :rtype: SharedContentDownloadsPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'SharedContentChangeDownloadsPolicyDetails(target_asset_index={!r}, new_value={!r}, original_folder_name={!r}, shared_folder_type={!r}, previous_value={!r})'.format( - self._target_asset_index_value, - self._new_value_value, - self._original_folder_name_value, - self._shared_folder_type_value, - self._previous_value_value, - ) - -SharedContentChangeDownloadsPolicyDetails_validator = bv.Struct(SharedContentChangeDownloadsPolicyDetails) - -class SharedContentChangeInviteeRoleDetails(object): - """ - Changed the access type of an invitee to a shared file or folder before the - invitation was claimed. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar new_sharing_permission: New sharing permission. Might be missing due - to historical data gap. - :ivar previous_sharing_permission: Previous sharing permission. Might be - missing due to historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_new_sharing_permission_value', - '_new_sharing_permission_present', - '_previous_sharing_permission_value', - '_previous_sharing_permission_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None, - new_sharing_permission=None, - previous_sharing_permission=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._new_sharing_permission_value = None - self._new_sharing_permission_present = False - self._previous_sharing_permission_value = None - self._previous_sharing_permission_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if new_sharing_permission is not None: - self.new_sharing_permission = new_sharing_permission - if previous_sharing_permission is not None: - self.previous_sharing_permission = previous_sharing_permission - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - raise AttributeError("missing required field 'original_folder_name'") - - @original_folder_name.setter - def original_folder_name(self, val): - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def new_sharing_permission(self): - """ - New sharing permission. Might be missing due to historical data gap. - - :rtype: str - """ - if self._new_sharing_permission_present: - return self._new_sharing_permission_value - else: - return None - - @new_sharing_permission.setter - def new_sharing_permission(self, val): - if val is None: - del self.new_sharing_permission - return - val = self._new_sharing_permission_validator.validate(val) - self._new_sharing_permission_value = val - self._new_sharing_permission_present = True - - @new_sharing_permission.deleter - def new_sharing_permission(self): - self._new_sharing_permission_value = None - self._new_sharing_permission_present = False - - @property - def previous_sharing_permission(self): - """ - Previous sharing permission. Might be missing due to historical data - gap. - - :rtype: str - """ - if self._previous_sharing_permission_present: - return self._previous_sharing_permission_value - else: - return None - - @previous_sharing_permission.setter - def previous_sharing_permission(self, val): - if val is None: - del self.previous_sharing_permission - return - val = self._previous_sharing_permission_validator.validate(val) - self._previous_sharing_permission_value = val - self._previous_sharing_permission_present = True - - @previous_sharing_permission.deleter - def previous_sharing_permission(self): - self._previous_sharing_permission_value = None - self._previous_sharing_permission_present = False - - def __repr__(self): - return 'SharedContentChangeInviteeRoleDetails(target_asset_index={!r}, original_folder_name={!r}, new_sharing_permission={!r}, previous_sharing_permission={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._new_sharing_permission_value, - self._previous_sharing_permission_value, - ) - -SharedContentChangeInviteeRoleDetails_validator = bv.Struct(SharedContentChangeInviteeRoleDetails) - -class SharedContentChangeLinkAudienceDetails(object): - """ - Changed the audience of the link for a shared file or folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar shared_folder_type: Shared folder type. Might be missing due to - historical data gap. - :ivar new_value: New link audience value. - :ivar previous_value: Previous link audience value. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_shared_folder_type_value', - '_shared_folder_type_present', - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - new_value=None, - original_folder_name=None, - shared_folder_type=None, - previous_value=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._shared_folder_type_value = None - self._shared_folder_type_present = False - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if shared_folder_type is not None: - self.shared_folder_type = shared_folder_type - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - return None - - @original_folder_name.setter - def original_folder_name(self, val): - if val is None: - del self.original_folder_name - return - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def shared_folder_type(self): - """ - Shared folder type. Might be missing due to historical data gap. - - :rtype: str - """ - if self._shared_folder_type_present: - return self._shared_folder_type_value - else: - return None - - @shared_folder_type.setter - def shared_folder_type(self, val): - if val is None: - del self.shared_folder_type - return - val = self._shared_folder_type_validator.validate(val) - self._shared_folder_type_value = val - self._shared_folder_type_present = True - - @shared_folder_type.deleter - def shared_folder_type(self): - self._shared_folder_type_value = None - self._shared_folder_type_present = False - - @property - def new_value(self): - """ - New link audience value. - - :rtype: LinkAudience - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous link audience value. Might be missing due to historical data - gap. - - :rtype: LinkAudience - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'SharedContentChangeLinkAudienceDetails(target_asset_index={!r}, new_value={!r}, original_folder_name={!r}, shared_folder_type={!r}, previous_value={!r})'.format( - self._target_asset_index_value, - self._new_value_value, - self._original_folder_name_value, - self._shared_folder_type_value, - self._previous_value_value, - ) - -SharedContentChangeLinkAudienceDetails_validator = bv.Struct(SharedContentChangeLinkAudienceDetails) - -class SharedContentChangeLinkExpiryDetails(object): - """ - Changed the expiry of the link for the shared file or folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar shared_folder_type: Shared folder type. Might be missing due to - historical data gap. - :ivar expiration_start_date: Expiration starting date. - :ivar expiration_days: The number of days from the starting expiration date - after which the link will expire. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_shared_folder_type_value', - '_shared_folder_type_present', - '_expiration_start_date_value', - '_expiration_start_date_present', - '_expiration_days_value', - '_expiration_days_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - expiration_start_date=None, - expiration_days=None, - original_folder_name=None, - shared_folder_type=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._shared_folder_type_value = None - self._shared_folder_type_present = False - self._expiration_start_date_value = None - self._expiration_start_date_present = False - self._expiration_days_value = None - self._expiration_days_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if shared_folder_type is not None: - self.shared_folder_type = shared_folder_type - if expiration_start_date is not None: - self.expiration_start_date = expiration_start_date - if expiration_days is not None: - self.expiration_days = expiration_days - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - return None - - @original_folder_name.setter - def original_folder_name(self, val): - if val is None: - del self.original_folder_name - return - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def shared_folder_type(self): - """ - Shared folder type. Might be missing due to historical data gap. - - :rtype: str - """ - if self._shared_folder_type_present: - return self._shared_folder_type_value - else: - return None - - @shared_folder_type.setter - def shared_folder_type(self, val): - if val is None: - del self.shared_folder_type - return - val = self._shared_folder_type_validator.validate(val) - self._shared_folder_type_value = val - self._shared_folder_type_present = True - - @shared_folder_type.deleter - def shared_folder_type(self): - self._shared_folder_type_value = None - self._shared_folder_type_present = False - - @property - def expiration_start_date(self): - """ - Expiration starting date. - - :rtype: str - """ - if self._expiration_start_date_present: - return self._expiration_start_date_value - else: - raise AttributeError("missing required field 'expiration_start_date'") - - @expiration_start_date.setter - def expiration_start_date(self, val): - val = self._expiration_start_date_validator.validate(val) - self._expiration_start_date_value = val - self._expiration_start_date_present = True - - @expiration_start_date.deleter - def expiration_start_date(self): - self._expiration_start_date_value = None - self._expiration_start_date_present = False - - @property - def expiration_days(self): - """ - The number of days from the starting expiration date after which the - link will expire. - - :rtype: long - """ - if self._expiration_days_present: - return self._expiration_days_value - else: - raise AttributeError("missing required field 'expiration_days'") - - @expiration_days.setter - def expiration_days(self, val): - val = self._expiration_days_validator.validate(val) - self._expiration_days_value = val - self._expiration_days_present = True - - @expiration_days.deleter - def expiration_days(self): - self._expiration_days_value = None - self._expiration_days_present = False - - def __repr__(self): - return 'SharedContentChangeLinkExpiryDetails(target_asset_index={!r}, expiration_start_date={!r}, expiration_days={!r}, original_folder_name={!r}, shared_folder_type={!r})'.format( - self._target_asset_index_value, - self._expiration_start_date_value, - self._expiration_days_value, - self._original_folder_name_value, - self._shared_folder_type_value, - ) - -SharedContentChangeLinkExpiryDetails_validator = bv.Struct(SharedContentChangeLinkExpiryDetails) - -class SharedContentChangeLinkPasswordDetails(object): - """ - Changed the password on the link for the shared file or folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar shared_folder_type: Shared folder type. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_shared_folder_type_value', - '_shared_folder_type_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None, - shared_folder_type=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._shared_folder_type_value = None - self._shared_folder_type_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if shared_folder_type is not None: - self.shared_folder_type = shared_folder_type - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - return None - - @original_folder_name.setter - def original_folder_name(self, val): - if val is None: - del self.original_folder_name - return - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def shared_folder_type(self): - """ - Shared folder type. Might be missing due to historical data gap. - - :rtype: str - """ - if self._shared_folder_type_present: - return self._shared_folder_type_value - else: - return None - - @shared_folder_type.setter - def shared_folder_type(self, val): - if val is None: - del self.shared_folder_type - return - val = self._shared_folder_type_validator.validate(val) - self._shared_folder_type_value = val - self._shared_folder_type_present = True - - @shared_folder_type.deleter - def shared_folder_type(self): - self._shared_folder_type_value = None - self._shared_folder_type_present = False - - def __repr__(self): - return 'SharedContentChangeLinkPasswordDetails(target_asset_index={!r}, original_folder_name={!r}, shared_folder_type={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._shared_folder_type_value, - ) - -SharedContentChangeLinkPasswordDetails_validator = bv.Struct(SharedContentChangeLinkPasswordDetails) - -class SharedContentChangeMemberRoleDetails(object): - """ - Changed the access type of a shared file or folder member. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar new_sharing_permission: New sharing permission. Might be missing due - to historical data gap. - :ivar previous_sharing_permission: Previous sharing permission. Might be - missing due to historical data gap. - :ivar shared_folder_type: Shared folder type. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_new_sharing_permission_value', - '_new_sharing_permission_present', - '_previous_sharing_permission_value', - '_previous_sharing_permission_present', - '_shared_folder_type_value', - '_shared_folder_type_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None, - new_sharing_permission=None, - previous_sharing_permission=None, - shared_folder_type=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._new_sharing_permission_value = None - self._new_sharing_permission_present = False - self._previous_sharing_permission_value = None - self._previous_sharing_permission_present = False - self._shared_folder_type_value = None - self._shared_folder_type_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if new_sharing_permission is not None: - self.new_sharing_permission = new_sharing_permission - if previous_sharing_permission is not None: - self.previous_sharing_permission = previous_sharing_permission - if shared_folder_type is not None: - self.shared_folder_type = shared_folder_type - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - return None - - @original_folder_name.setter - def original_folder_name(self, val): - if val is None: - del self.original_folder_name - return - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def new_sharing_permission(self): - """ - New sharing permission. Might be missing due to historical data gap. - - :rtype: str - """ - if self._new_sharing_permission_present: - return self._new_sharing_permission_value - else: - return None - - @new_sharing_permission.setter - def new_sharing_permission(self, val): - if val is None: - del self.new_sharing_permission - return - val = self._new_sharing_permission_validator.validate(val) - self._new_sharing_permission_value = val - self._new_sharing_permission_present = True - - @new_sharing_permission.deleter - def new_sharing_permission(self): - self._new_sharing_permission_value = None - self._new_sharing_permission_present = False - - @property - def previous_sharing_permission(self): - """ - Previous sharing permission. Might be missing due to historical data - gap. - - :rtype: str - """ - if self._previous_sharing_permission_present: - return self._previous_sharing_permission_value - else: - return None - - @previous_sharing_permission.setter - def previous_sharing_permission(self, val): - if val is None: - del self.previous_sharing_permission - return - val = self._previous_sharing_permission_validator.validate(val) - self._previous_sharing_permission_value = val - self._previous_sharing_permission_present = True - - @previous_sharing_permission.deleter - def previous_sharing_permission(self): - self._previous_sharing_permission_value = None - self._previous_sharing_permission_present = False - - @property - def shared_folder_type(self): - """ - Shared folder type. Might be missing due to historical data gap. - - :rtype: str - """ - if self._shared_folder_type_present: - return self._shared_folder_type_value - else: - return None - - @shared_folder_type.setter - def shared_folder_type(self, val): - if val is None: - del self.shared_folder_type - return - val = self._shared_folder_type_validator.validate(val) - self._shared_folder_type_value = val - self._shared_folder_type_present = True - - @shared_folder_type.deleter - def shared_folder_type(self): - self._shared_folder_type_value = None - self._shared_folder_type_present = False - - def __repr__(self): - return 'SharedContentChangeMemberRoleDetails(target_asset_index={!r}, original_folder_name={!r}, new_sharing_permission={!r}, previous_sharing_permission={!r}, shared_folder_type={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._new_sharing_permission_value, - self._previous_sharing_permission_value, - self._shared_folder_type_value, - ) - -SharedContentChangeMemberRoleDetails_validator = bv.Struct(SharedContentChangeMemberRoleDetails) - -class SharedContentChangeViewerInfoPolicyDetails(object): - """ - Changed whether members can see who viewed the shared file or folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar shared_folder_type: Shared folder type. Might be missing due to - historical data gap. - :ivar new_value: New viewer info policy. - :ivar previous_value: Previous view info policy. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_shared_folder_type_value', - '_shared_folder_type_present', - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - new_value=None, - original_folder_name=None, - shared_folder_type=None, - previous_value=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._shared_folder_type_value = None - self._shared_folder_type_present = False - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if shared_folder_type is not None: - self.shared_folder_type = shared_folder_type - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - return None - - @original_folder_name.setter - def original_folder_name(self, val): - if val is None: - del self.original_folder_name - return - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def shared_folder_type(self): - """ - Shared folder type. Might be missing due to historical data gap. - - :rtype: str - """ - if self._shared_folder_type_present: - return self._shared_folder_type_value - else: - return None - - @shared_folder_type.setter - def shared_folder_type(self, val): - if val is None: - del self.shared_folder_type - return - val = self._shared_folder_type_validator.validate(val) - self._shared_folder_type_value = val - self._shared_folder_type_present = True - - @shared_folder_type.deleter - def shared_folder_type(self): - self._shared_folder_type_value = None - self._shared_folder_type_present = False - - @property - def new_value(self): - """ - New viewer info policy. - - :rtype: SharedContentViewerInfoPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous view info policy. Might be missing due to historical data gap. - - :rtype: SharedContentViewerInfoPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'SharedContentChangeViewerInfoPolicyDetails(target_asset_index={!r}, new_value={!r}, original_folder_name={!r}, shared_folder_type={!r}, previous_value={!r})'.format( - self._target_asset_index_value, - self._new_value_value, - self._original_folder_name_value, - self._shared_folder_type_value, - self._previous_value_value, - ) - -SharedContentChangeViewerInfoPolicyDetails_validator = bv.Struct(SharedContentChangeViewerInfoPolicyDetails) - -class SharedContentClaimInvitationDetails(object): - """ - Claimed membership to a team member's shared folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar shared_content_link: Shared content link. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_shared_content_link_value', - '_shared_content_link_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None, - shared_content_link=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._shared_content_link_value = None - self._shared_content_link_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if shared_content_link is not None: - self.shared_content_link = shared_content_link - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - return None - - @original_folder_name.setter - def original_folder_name(self, val): - if val is None: - del self.original_folder_name - return - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def shared_content_link(self): - """ - Shared content link. - - :rtype: str - """ - if self._shared_content_link_present: - return self._shared_content_link_value - else: - return None - - @shared_content_link.setter - def shared_content_link(self, val): - if val is None: - del self.shared_content_link - return - val = self._shared_content_link_validator.validate(val) - self._shared_content_link_value = val - self._shared_content_link_present = True - - @shared_content_link.deleter - def shared_content_link(self): - self._shared_content_link_value = None - self._shared_content_link_present = False - - def __repr__(self): - return 'SharedContentClaimInvitationDetails(target_asset_index={!r}, original_folder_name={!r}, shared_content_link={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._shared_content_link_value, - ) - -SharedContentClaimInvitationDetails_validator = bv.Struct(SharedContentClaimInvitationDetails) - -class SharedContentCopyDetails(object): - """ - Copied the shared file or folder to own Dropbox. - - :ivar shared_content_link: Shared content link. - :ivar sharing_permission: Sharing permission. Might be missing due to - historical data gap. - :ivar target_asset_index: Target asset position in the Assets list. - :ivar relocate_action_details: Specifies the source and destination indices - in the assets list. - """ - - __slots__ = [ - '_shared_content_link_value', - '_shared_content_link_present', - '_sharing_permission_value', - '_sharing_permission_present', - '_target_asset_index_value', - '_target_asset_index_present', - '_relocate_action_details_value', - '_relocate_action_details_present', - ] - - _has_required_fields = True - - def __init__(self, - shared_content_link=None, - target_asset_index=None, - relocate_action_details=None, - sharing_permission=None): - self._shared_content_link_value = None - self._shared_content_link_present = False - self._sharing_permission_value = None - self._sharing_permission_present = False - self._target_asset_index_value = None - self._target_asset_index_present = False - self._relocate_action_details_value = None - self._relocate_action_details_present = False - if shared_content_link is not None: - self.shared_content_link = shared_content_link - if sharing_permission is not None: - self.sharing_permission = sharing_permission - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if relocate_action_details is not None: - self.relocate_action_details = relocate_action_details - - @property - def shared_content_link(self): - """ - Shared content link. - - :rtype: str - """ - if self._shared_content_link_present: - return self._shared_content_link_value - else: - raise AttributeError("missing required field 'shared_content_link'") - - @shared_content_link.setter - def shared_content_link(self, val): - val = self._shared_content_link_validator.validate(val) - self._shared_content_link_value = val - self._shared_content_link_present = True - - @shared_content_link.deleter - def shared_content_link(self): - self._shared_content_link_value = None - self._shared_content_link_present = False - - @property - def sharing_permission(self): - """ - Sharing permission. Might be missing due to historical data gap. - - :rtype: str - """ - if self._sharing_permission_present: - return self._sharing_permission_value - else: - return None - - @sharing_permission.setter - def sharing_permission(self, val): - if val is None: - del self.sharing_permission - return - val = self._sharing_permission_validator.validate(val) - self._sharing_permission_value = val - self._sharing_permission_present = True - - @sharing_permission.deleter - def sharing_permission(self): - self._sharing_permission_value = None - self._sharing_permission_present = False - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def relocate_action_details(self): - """ - Specifies the source and destination indices in the assets list. - - :rtype: RelocateAssetReferencesLogInfo - """ - if self._relocate_action_details_present: - return self._relocate_action_details_value - else: - raise AttributeError("missing required field 'relocate_action_details'") - - @relocate_action_details.setter - def relocate_action_details(self, val): - self._relocate_action_details_validator.validate_type_only(val) - self._relocate_action_details_value = val - self._relocate_action_details_present = True - - @relocate_action_details.deleter - def relocate_action_details(self): - self._relocate_action_details_value = None - self._relocate_action_details_present = False - - def __repr__(self): - return 'SharedContentCopyDetails(shared_content_link={!r}, target_asset_index={!r}, relocate_action_details={!r}, sharing_permission={!r})'.format( - self._shared_content_link_value, - self._target_asset_index_value, - self._relocate_action_details_value, - self._sharing_permission_value, - ) - -SharedContentCopyDetails_validator = bv.Struct(SharedContentCopyDetails) - -class SharedContentDownloadDetails(object): - """ - Downloaded the shared file or folder. - - :ivar shared_content_link: Shared content link. - :ivar sharing_permission: Sharing permission. Might be missing due to - historical data gap. - :ivar target_asset_index: Target asset position in the Assets list. - """ - - __slots__ = [ - '_shared_content_link_value', - '_shared_content_link_present', - '_sharing_permission_value', - '_sharing_permission_present', - '_target_asset_index_value', - '_target_asset_index_present', - ] - - _has_required_fields = True - - def __init__(self, - shared_content_link=None, - target_asset_index=None, - sharing_permission=None): - self._shared_content_link_value = None - self._shared_content_link_present = False - self._sharing_permission_value = None - self._sharing_permission_present = False - self._target_asset_index_value = None - self._target_asset_index_present = False - if shared_content_link is not None: - self.shared_content_link = shared_content_link - if sharing_permission is not None: - self.sharing_permission = sharing_permission - if target_asset_index is not None: - self.target_asset_index = target_asset_index - - @property - def shared_content_link(self): - """ - Shared content link. - - :rtype: str - """ - if self._shared_content_link_present: - return self._shared_content_link_value - else: - raise AttributeError("missing required field 'shared_content_link'") - - @shared_content_link.setter - def shared_content_link(self, val): - val = self._shared_content_link_validator.validate(val) - self._shared_content_link_value = val - self._shared_content_link_present = True - - @shared_content_link.deleter - def shared_content_link(self): - self._shared_content_link_value = None - self._shared_content_link_present = False - - @property - def sharing_permission(self): - """ - Sharing permission. Might be missing due to historical data gap. - - :rtype: str - """ - if self._sharing_permission_present: - return self._sharing_permission_value - else: - return None - - @sharing_permission.setter - def sharing_permission(self, val): - if val is None: - del self.sharing_permission - return - val = self._sharing_permission_validator.validate(val) - self._sharing_permission_value = val - self._sharing_permission_present = True - - @sharing_permission.deleter - def sharing_permission(self): - self._sharing_permission_value = None - self._sharing_permission_present = False - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - def __repr__(self): - return 'SharedContentDownloadDetails(shared_content_link={!r}, target_asset_index={!r}, sharing_permission={!r})'.format( - self._shared_content_link_value, - self._target_asset_index_value, - self._sharing_permission_value, - ) - -SharedContentDownloadDetails_validator = bv.Struct(SharedContentDownloadDetails) - -class SharedContentDownloadsPolicy(bb.Union): - """ - Shared content downloads policy - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - disabled = None - # Attribute is overwritten below the class definition - enabled = None - # Attribute is overwritten below the class definition - other = None - - def is_disabled(self): - """ - Check if the union tag is ``disabled``. - - :rtype: bool - """ - return self._tag == 'disabled' - - def is_enabled(self): - """ - Check if the union tag is ``enabled``. - - :rtype: bool - """ - return self._tag == 'enabled' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SharedContentDownloadsPolicy(%r, %r)' % (self._tag, self._value) - -SharedContentDownloadsPolicy_validator = bv.Union(SharedContentDownloadsPolicy) - -class SharedContentRelinquishMembershipDetails(object): - """ - Left the membership of a shared file or folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - raise AttributeError("missing required field 'original_folder_name'") - - @original_folder_name.setter - def original_folder_name(self, val): - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - def __repr__(self): - return 'SharedContentRelinquishMembershipDetails(target_asset_index={!r}, original_folder_name={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - ) - -SharedContentRelinquishMembershipDetails_validator = bv.Struct(SharedContentRelinquishMembershipDetails) - -class SharedContentRemoveInviteeDetails(object): - """ - Removed an invitee from the membership of a shared file or folder before it - was claimed. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - raise AttributeError("missing required field 'original_folder_name'") - - @original_folder_name.setter - def original_folder_name(self, val): - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - def __repr__(self): - return 'SharedContentRemoveInviteeDetails(target_asset_index={!r}, original_folder_name={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - ) - -SharedContentRemoveInviteeDetails_validator = bv.Struct(SharedContentRemoveInviteeDetails) - -class SharedContentRemoveLinkExpiryDetails(object): - """ - Removed the expiry of the link for the shared file or folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar shared_folder_type: Shared folder type. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_shared_folder_type_value', - '_shared_folder_type_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None, - shared_folder_type=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._shared_folder_type_value = None - self._shared_folder_type_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if shared_folder_type is not None: - self.shared_folder_type = shared_folder_type - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - return None - - @original_folder_name.setter - def original_folder_name(self, val): - if val is None: - del self.original_folder_name - return - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def shared_folder_type(self): - """ - Shared folder type. Might be missing due to historical data gap. - - :rtype: str - """ - if self._shared_folder_type_present: - return self._shared_folder_type_value - else: - return None - - @shared_folder_type.setter - def shared_folder_type(self, val): - if val is None: - del self.shared_folder_type - return - val = self._shared_folder_type_validator.validate(val) - self._shared_folder_type_value = val - self._shared_folder_type_present = True - - @shared_folder_type.deleter - def shared_folder_type(self): - self._shared_folder_type_value = None - self._shared_folder_type_present = False - - def __repr__(self): - return 'SharedContentRemoveLinkExpiryDetails(target_asset_index={!r}, original_folder_name={!r}, shared_folder_type={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._shared_folder_type_value, - ) - -SharedContentRemoveLinkExpiryDetails_validator = bv.Struct(SharedContentRemoveLinkExpiryDetails) - -class SharedContentRemoveLinkPasswordDetails(object): - """ - Removed the password on the link for the shared file or folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar shared_folder_type: Shared folder type. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_shared_folder_type_value', - '_shared_folder_type_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None, - shared_folder_type=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._shared_folder_type_value = None - self._shared_folder_type_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if shared_folder_type is not None: - self.shared_folder_type = shared_folder_type - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - return None - - @original_folder_name.setter - def original_folder_name(self, val): - if val is None: - del self.original_folder_name - return - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def shared_folder_type(self): - """ - Shared folder type. Might be missing due to historical data gap. - - :rtype: str - """ - if self._shared_folder_type_present: - return self._shared_folder_type_value - else: - return None - - @shared_folder_type.setter - def shared_folder_type(self, val): - if val is None: - del self.shared_folder_type - return - val = self._shared_folder_type_validator.validate(val) - self._shared_folder_type_value = val - self._shared_folder_type_present = True - - @shared_folder_type.deleter - def shared_folder_type(self): - self._shared_folder_type_value = None - self._shared_folder_type_present = False - - def __repr__(self): - return 'SharedContentRemoveLinkPasswordDetails(target_asset_index={!r}, original_folder_name={!r}, shared_folder_type={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._shared_folder_type_value, - ) - -SharedContentRemoveLinkPasswordDetails_validator = bv.Struct(SharedContentRemoveLinkPasswordDetails) - -class SharedContentRemoveMemberDetails(object): - """ - Removed a user or a group from the membership of a shared file or folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar sharing_permission: Sharing permission. Might be missing due to - historical data gap. - :ivar shared_folder_type: Shared folder type. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_sharing_permission_value', - '_sharing_permission_present', - '_shared_folder_type_value', - '_shared_folder_type_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None, - sharing_permission=None, - shared_folder_type=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._sharing_permission_value = None - self._sharing_permission_present = False - self._shared_folder_type_value = None - self._shared_folder_type_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if sharing_permission is not None: - self.sharing_permission = sharing_permission - if shared_folder_type is not None: - self.shared_folder_type = shared_folder_type - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - return None - - @original_folder_name.setter - def original_folder_name(self, val): - if val is None: - del self.original_folder_name - return - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def sharing_permission(self): - """ - Sharing permission. Might be missing due to historical data gap. - - :rtype: str - """ - if self._sharing_permission_present: - return self._sharing_permission_value - else: - return None - - @sharing_permission.setter - def sharing_permission(self, val): - if val is None: - del self.sharing_permission - return - val = self._sharing_permission_validator.validate(val) - self._sharing_permission_value = val - self._sharing_permission_present = True - - @sharing_permission.deleter - def sharing_permission(self): - self._sharing_permission_value = None - self._sharing_permission_present = False - - @property - def shared_folder_type(self): - """ - Shared folder type. Might be missing due to historical data gap. - - :rtype: str - """ - if self._shared_folder_type_present: - return self._shared_folder_type_value - else: - return None - - @shared_folder_type.setter - def shared_folder_type(self, val): - if val is None: - del self.shared_folder_type - return - val = self._shared_folder_type_validator.validate(val) - self._shared_folder_type_value = val - self._shared_folder_type_present = True - - @shared_folder_type.deleter - def shared_folder_type(self): - self._shared_folder_type_value = None - self._shared_folder_type_present = False - - def __repr__(self): - return 'SharedContentRemoveMemberDetails(target_asset_index={!r}, original_folder_name={!r}, sharing_permission={!r}, shared_folder_type={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._sharing_permission_value, - self._shared_folder_type_value, - ) - -SharedContentRemoveMemberDetails_validator = bv.Struct(SharedContentRemoveMemberDetails) - -class SharedContentRequestAccessDetails(object): - """ - Requested to be on the membership of a shared file or folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar shared_content_link: Shared content link. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_shared_content_link_value', - '_shared_content_link_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None, - shared_content_link=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._shared_content_link_value = None - self._shared_content_link_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if shared_content_link is not None: - self.shared_content_link = shared_content_link - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - return None - - @original_folder_name.setter - def original_folder_name(self, val): - if val is None: - del self.original_folder_name - return - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def shared_content_link(self): - """ - Shared content link. - - :rtype: str - """ - if self._shared_content_link_present: - return self._shared_content_link_value - else: - return None - - @shared_content_link.setter - def shared_content_link(self, val): - if val is None: - del self.shared_content_link - return - val = self._shared_content_link_validator.validate(val) - self._shared_content_link_value = val - self._shared_content_link_present = True - - @shared_content_link.deleter - def shared_content_link(self): - self._shared_content_link_value = None - self._shared_content_link_present = False - - def __repr__(self): - return 'SharedContentRequestAccessDetails(target_asset_index={!r}, original_folder_name={!r}, shared_content_link={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._shared_content_link_value, - ) - -SharedContentRequestAccessDetails_validator = bv.Struct(SharedContentRequestAccessDetails) - -class SharedContentUnshareDetails(object): - """ - Unshared a shared file or folder by clearing its membership and turning off - its link. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - return None - - @original_folder_name.setter - def original_folder_name(self, val): - if val is None: - del self.original_folder_name - return - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - def __repr__(self): - return 'SharedContentUnshareDetails(target_asset_index={!r}, original_folder_name={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - ) - -SharedContentUnshareDetails_validator = bv.Struct(SharedContentUnshareDetails) - -class SharedContentViewDetails(object): - """ - Previewed the shared file or folder. - - :ivar shared_content_link: Shared content link. - :ivar sharing_permission: Sharing permission. Might be missing due to - historical data gap. - :ivar target_asset_index: Target asset position in the Assets list. - """ - - __slots__ = [ - '_shared_content_link_value', - '_shared_content_link_present', - '_sharing_permission_value', - '_sharing_permission_present', - '_target_asset_index_value', - '_target_asset_index_present', - ] - - _has_required_fields = True - - def __init__(self, - shared_content_link=None, - target_asset_index=None, - sharing_permission=None): - self._shared_content_link_value = None - self._shared_content_link_present = False - self._sharing_permission_value = None - self._sharing_permission_present = False - self._target_asset_index_value = None - self._target_asset_index_present = False - if shared_content_link is not None: - self.shared_content_link = shared_content_link - if sharing_permission is not None: - self.sharing_permission = sharing_permission - if target_asset_index is not None: - self.target_asset_index = target_asset_index - - @property - def shared_content_link(self): - """ - Shared content link. - - :rtype: str - """ - if self._shared_content_link_present: - return self._shared_content_link_value - else: - raise AttributeError("missing required field 'shared_content_link'") - - @shared_content_link.setter - def shared_content_link(self, val): - val = self._shared_content_link_validator.validate(val) - self._shared_content_link_value = val - self._shared_content_link_present = True - - @shared_content_link.deleter - def shared_content_link(self): - self._shared_content_link_value = None - self._shared_content_link_present = False - - @property - def sharing_permission(self): - """ - Sharing permission. Might be missing due to historical data gap. - - :rtype: str - """ - if self._sharing_permission_present: - return self._sharing_permission_value - else: - return None - - @sharing_permission.setter - def sharing_permission(self, val): - if val is None: - del self.sharing_permission - return - val = self._sharing_permission_validator.validate(val) - self._sharing_permission_value = val - self._sharing_permission_present = True - - @sharing_permission.deleter - def sharing_permission(self): - self._sharing_permission_value = None - self._sharing_permission_present = False - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - def __repr__(self): - return 'SharedContentViewDetails(shared_content_link={!r}, target_asset_index={!r}, sharing_permission={!r})'.format( - self._shared_content_link_value, - self._target_asset_index_value, - self._sharing_permission_value, - ) - -SharedContentViewDetails_validator = bv.Struct(SharedContentViewDetails) - -class SharedContentViewerInfoPolicy(bb.Union): - """ - Shared content viewer info policy - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - disabled = None - # Attribute is overwritten below the class definition - enabled = None - # Attribute is overwritten below the class definition - other = None - - def is_disabled(self): - """ - Check if the union tag is ``disabled``. - - :rtype: bool - """ - return self._tag == 'disabled' - - def is_enabled(self): - """ - Check if the union tag is ``enabled``. - - :rtype: bool - """ - return self._tag == 'enabled' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SharedContentViewerInfoPolicy(%r, %r)' % (self._tag, self._value) - -SharedContentViewerInfoPolicy_validator = bv.Union(SharedContentViewerInfoPolicy) - -class SharedFolderChangeConfidentialityDetails(object): - """ - Set or unset the confidential flag on a shared folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar new_value: New confidentiality value. - :ivar previous_value: Previous confidentiality value. Might be missing due - to historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None, - new_value=None, - previous_value=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - raise AttributeError("missing required field 'original_folder_name'") - - @original_folder_name.setter - def original_folder_name(self, val): - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def new_value(self): - """ - New confidentiality value. - - :rtype: Confidentiality - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous confidentiality value. Might be missing due to historical data - gap. - - :rtype: Confidentiality - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'SharedFolderChangeConfidentialityDetails(target_asset_index={!r}, original_folder_name={!r}, new_value={!r}, previous_value={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._new_value_value, - self._previous_value_value, - ) - -SharedFolderChangeConfidentialityDetails_validator = bv.Struct(SharedFolderChangeConfidentialityDetails) - -class SharedFolderChangeLinkPolicyDetails(object): - """ - Changed who can access the shared folder via a link. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar shared_folder_type: Shared folder type. Might be missing due to - historical data gap. - :ivar new_value: New shared folder link policy. - :ivar previous_value: Previous shared folder link policy. Might be missing - due to historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_shared_folder_type_value', - '_shared_folder_type_present', - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None, - new_value=None, - shared_folder_type=None, - previous_value=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._shared_folder_type_value = None - self._shared_folder_type_present = False - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if shared_folder_type is not None: - self.shared_folder_type = shared_folder_type - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - raise AttributeError("missing required field 'original_folder_name'") - - @original_folder_name.setter - def original_folder_name(self, val): - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def shared_folder_type(self): - """ - Shared folder type. Might be missing due to historical data gap. - - :rtype: str - """ - if self._shared_folder_type_present: - return self._shared_folder_type_value - else: - return None - - @shared_folder_type.setter - def shared_folder_type(self, val): - if val is None: - del self.shared_folder_type - return - val = self._shared_folder_type_validator.validate(val) - self._shared_folder_type_value = val - self._shared_folder_type_present = True - - @shared_folder_type.deleter - def shared_folder_type(self): - self._shared_folder_type_value = None - self._shared_folder_type_present = False - - @property - def new_value(self): - """ - New shared folder link policy. - - :rtype: SharedFolderLinkPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous shared folder link policy. Might be missing due to historical - data gap. - - :rtype: SharedFolderLinkPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'SharedFolderChangeLinkPolicyDetails(target_asset_index={!r}, original_folder_name={!r}, new_value={!r}, shared_folder_type={!r}, previous_value={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._new_value_value, - self._shared_folder_type_value, - self._previous_value_value, - ) - -SharedFolderChangeLinkPolicyDetails_validator = bv.Struct(SharedFolderChangeLinkPolicyDetails) - -class SharedFolderChangeMemberManagementPolicyDetails(object): - """ - Changed who can manage the membership of a shared folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar shared_folder_type: Shared folder type. Might be missing due to - historical data gap. - :ivar new_value: New membership management policy. - :ivar previous_value: Previous membership management policy. Might be - missing due to historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_shared_folder_type_value', - '_shared_folder_type_present', - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None, - new_value=None, - shared_folder_type=None, - previous_value=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._shared_folder_type_value = None - self._shared_folder_type_present = False - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if shared_folder_type is not None: - self.shared_folder_type = shared_folder_type - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - raise AttributeError("missing required field 'original_folder_name'") - - @original_folder_name.setter - def original_folder_name(self, val): - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def shared_folder_type(self): - """ - Shared folder type. Might be missing due to historical data gap. - - :rtype: str - """ - if self._shared_folder_type_present: - return self._shared_folder_type_value - else: - return None - - @shared_folder_type.setter - def shared_folder_type(self, val): - if val is None: - del self.shared_folder_type - return - val = self._shared_folder_type_validator.validate(val) - self._shared_folder_type_value = val - self._shared_folder_type_present = True - - @shared_folder_type.deleter - def shared_folder_type(self): - self._shared_folder_type_value = None - self._shared_folder_type_present = False - - @property - def new_value(self): - """ - New membership management policy. - - :rtype: SharedFolderMembershipManagementPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous membership management policy. Might be missing due to - historical data gap. - - :rtype: SharedFolderMembershipManagementPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'SharedFolderChangeMemberManagementPolicyDetails(target_asset_index={!r}, original_folder_name={!r}, new_value={!r}, shared_folder_type={!r}, previous_value={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._new_value_value, - self._shared_folder_type_value, - self._previous_value_value, - ) - -SharedFolderChangeMemberManagementPolicyDetails_validator = bv.Struct(SharedFolderChangeMemberManagementPolicyDetails) - -class SharedFolderChangeMemberPolicyDetails(object): - """ - Changed who can become a member of the shared folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - :ivar shared_folder_type: Shared folder type. Might be missing due to - historical data gap. - :ivar new_value: New external invite policy. - :ivar previous_value: Previous external invite policy. Might be missing due - to historical data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - '_shared_folder_type_value', - '_shared_folder_type_present', - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None, - new_value=None, - shared_folder_type=None, - previous_value=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - self._shared_folder_type_value = None - self._shared_folder_type_present = False - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - if shared_folder_type is not None: - self.shared_folder_type = shared_folder_type - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - raise AttributeError("missing required field 'original_folder_name'") - - @original_folder_name.setter - def original_folder_name(self, val): - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - @property - def shared_folder_type(self): - """ - Shared folder type. Might be missing due to historical data gap. - - :rtype: str - """ - if self._shared_folder_type_present: - return self._shared_folder_type_value - else: - return None - - @shared_folder_type.setter - def shared_folder_type(self, val): - if val is None: - del self.shared_folder_type - return - val = self._shared_folder_type_validator.validate(val) - self._shared_folder_type_value = val - self._shared_folder_type_present = True - - @shared_folder_type.deleter - def shared_folder_type(self): - self._shared_folder_type_value = None - self._shared_folder_type_present = False - - @property - def new_value(self): - """ - New external invite policy. - - :rtype: SharedFolderMemberPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous external invite policy. Might be missing due to historical data - gap. - - :rtype: SharedFolderMemberPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'SharedFolderChangeMemberPolicyDetails(target_asset_index={!r}, original_folder_name={!r}, new_value={!r}, shared_folder_type={!r}, previous_value={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._new_value_value, - self._shared_folder_type_value, - self._previous_value_value, - ) - -SharedFolderChangeMemberPolicyDetails_validator = bv.Struct(SharedFolderChangeMemberPolicyDetails) - -class SharedFolderCreateDetails(object): - """ - Created a shared folder. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar parent_ns_id: Parent namespace ID. Might be missing due to historical - data gap. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_parent_ns_id_value', - '_parent_ns_id_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - parent_ns_id=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._parent_ns_id_value = None - self._parent_ns_id_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if parent_ns_id is not None: - self.parent_ns_id = parent_ns_id - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def parent_ns_id(self): - """ - Parent namespace ID. Might be missing due to historical data gap. - - :rtype: str - """ - if self._parent_ns_id_present: - return self._parent_ns_id_value - else: - return None - - @parent_ns_id.setter - def parent_ns_id(self, val): - if val is None: - del self.parent_ns_id - return - val = self._parent_ns_id_validator.validate(val) - self._parent_ns_id_value = val - self._parent_ns_id_present = True - - @parent_ns_id.deleter - def parent_ns_id(self): - self._parent_ns_id_value = None - self._parent_ns_id_present = False - - def __repr__(self): - return 'SharedFolderCreateDetails(target_asset_index={!r}, parent_ns_id={!r})'.format( - self._target_asset_index_value, - self._parent_ns_id_value, - ) - -SharedFolderCreateDetails_validator = bv.Struct(SharedFolderCreateDetails) - -class SharedFolderLinkPolicy(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - members_only = None - # Attribute is overwritten below the class definition - members_and_team = None - # Attribute is overwritten below the class definition - anyone = None - # Attribute is overwritten below the class definition - other = None - - def is_members_only(self): - """ - Check if the union tag is ``members_only``. - - :rtype: bool - """ - return self._tag == 'members_only' - - def is_members_and_team(self): - """ - Check if the union tag is ``members_and_team``. - - :rtype: bool - """ - return self._tag == 'members_and_team' - - def is_anyone(self): - """ - Check if the union tag is ``anyone``. - - :rtype: bool - """ - return self._tag == 'anyone' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SharedFolderLinkPolicy(%r, %r)' % (self._tag, self._value) - -SharedFolderLinkPolicy_validator = bv.Union(SharedFolderLinkPolicy) - -class SharedFolderMemberPolicy(bb.Union): - """ - Policy for controlling who can become a member of a shared folder - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - team_only = None - # Attribute is overwritten below the class definition - anyone = None - # Attribute is overwritten below the class definition - other = None - - def is_team_only(self): - """ - Check if the union tag is ``team_only``. - - :rtype: bool - """ - return self._tag == 'team_only' - - def is_anyone(self): - """ - Check if the union tag is ``anyone``. - - :rtype: bool - """ - return self._tag == 'anyone' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SharedFolderMemberPolicy(%r, %r)' % (self._tag, self._value) - -SharedFolderMemberPolicy_validator = bv.Union(SharedFolderMemberPolicy) - -class SharedFolderMembershipManagementPolicy(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - owner = None - # Attribute is overwritten below the class definition - editors = None - # Attribute is overwritten below the class definition - other = None - - def is_owner(self): - """ - Check if the union tag is ``owner``. - - :rtype: bool - """ - return self._tag == 'owner' - - def is_editors(self): - """ - Check if the union tag is ``editors``. - - :rtype: bool - """ - return self._tag == 'editors' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SharedFolderMembershipManagementPolicy(%r, %r)' % (self._tag, self._value) - -SharedFolderMembershipManagementPolicy_validator = bv.Union(SharedFolderMembershipManagementPolicy) - -class SharedFolderMountDetails(object): - """ - Added a shared folder to own Dropbox. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - raise AttributeError("missing required field 'original_folder_name'") - - @original_folder_name.setter - def original_folder_name(self, val): - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - def __repr__(self): - return 'SharedFolderMountDetails(target_asset_index={!r}, original_folder_name={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - ) - -SharedFolderMountDetails_validator = bv.Struct(SharedFolderMountDetails) - -class SharedFolderTransferOwnershipDetails(object): - """ - Transferred the ownership of a shared folder to another member. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - raise AttributeError("missing required field 'original_folder_name'") - - @original_folder_name.setter - def original_folder_name(self, val): - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - def __repr__(self): - return 'SharedFolderTransferOwnershipDetails(target_asset_index={!r}, original_folder_name={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - ) - -SharedFolderTransferOwnershipDetails_validator = bv.Struct(SharedFolderTransferOwnershipDetails) - -class SharedFolderUnmountDetails(object): - """ - Deleted a shared folder from Dropbox. - - :ivar target_asset_index: Target asset position in the Assets list. - :ivar original_folder_name: Original shared folder name. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - '_original_folder_name_value', - '_original_folder_name_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None, - original_folder_name=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - self._original_folder_name_value = None - self._original_folder_name_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - if original_folder_name is not None: - self.original_folder_name = original_folder_name - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - @property - def original_folder_name(self): - """ - Original shared folder name. - - :rtype: str - """ - if self._original_folder_name_present: - return self._original_folder_name_value - else: - raise AttributeError("missing required field 'original_folder_name'") - - @original_folder_name.setter - def original_folder_name(self, val): - val = self._original_folder_name_validator.validate(val) - self._original_folder_name_value = val - self._original_folder_name_present = True - - @original_folder_name.deleter - def original_folder_name(self): - self._original_folder_name_value = None - self._original_folder_name_present = False - - def __repr__(self): - return 'SharedFolderUnmountDetails(target_asset_index={!r}, original_folder_name={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - ) - -SharedFolderUnmountDetails_validator = bv.Struct(SharedFolderUnmountDetails) - -class SharedNoteOpenedDetails(object): - """ - Shared Paper document was opened. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'SharedNoteOpenedDetails()' - -SharedNoteOpenedDetails_validator = bv.Struct(SharedNoteOpenedDetails) - -class SharingChangeFolderJoinPolicyDetails(object): - """ - Changed whether team members can join shared folders owned externally (i.e. - outside the team). - - :ivar new_value: New external join policy. - :ivar previous_value: Previous external join policy. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New external join policy. - - :rtype: SharingFolderJoinPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous external join policy. Might be missing due to historical data - gap. - - :rtype: SharingFolderJoinPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'SharingChangeFolderJoinPolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -SharingChangeFolderJoinPolicyDetails_validator = bv.Struct(SharingChangeFolderJoinPolicyDetails) - -class SharingChangeLinkPolicyDetails(object): - """ - Changed whether team members can share links externally (i.e. outside the - team), and if so, whether links should be accessible only by team members or - anyone by default. - - :ivar new_value: New external link accessibility policy. - :ivar previous_value: Previous external link accessibility policy. Might be - missing due to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New external link accessibility policy. - - :rtype: SharingLinkPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous external link accessibility policy. Might be missing due to - historical data gap. - - :rtype: SharingLinkPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'SharingChangeLinkPolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -SharingChangeLinkPolicyDetails_validator = bv.Struct(SharingChangeLinkPolicyDetails) - -class SharingChangeMemberPolicyDetails(object): - """ - Changed whether team members can share files and folders externally (i.e. - outside the team). - - :ivar new_value: New external invite policy. - :ivar previous_value: Previous external invite policy. Might be missing due - to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New external invite policy. - - :rtype: SharingMemberPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous external invite policy. Might be missing due to historical data - gap. - - :rtype: SharingMemberPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'SharingChangeMemberPolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -SharingChangeMemberPolicyDetails_validator = bv.Struct(SharingChangeMemberPolicyDetails) - -class SharingFolderJoinPolicy(bb.Union): - """ - Policy for controlling if team members can join shared folders owned by non - team members. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - from_anyone = None - # Attribute is overwritten below the class definition - from_team_only = None - # Attribute is overwritten below the class definition - other = None - - def is_from_anyone(self): - """ - Check if the union tag is ``from_anyone``. - - :rtype: bool - """ - return self._tag == 'from_anyone' - - def is_from_team_only(self): - """ - Check if the union tag is ``from_team_only``. - - :rtype: bool - """ - return self._tag == 'from_team_only' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SharingFolderJoinPolicy(%r, %r)' % (self._tag, self._value) - -SharingFolderJoinPolicy_validator = bv.Union(SharingFolderJoinPolicy) - -class SharingLinkPolicy(bb.Union): - """ - Policy for controlling if team members can share links externally - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - default_private = None - # Attribute is overwritten below the class definition - default_public = None - # Attribute is overwritten below the class definition - only_private = None - # Attribute is overwritten below the class definition - other = None - - def is_default_private(self): - """ - Check if the union tag is ``default_private``. - - :rtype: bool - """ - return self._tag == 'default_private' - - def is_default_public(self): - """ - Check if the union tag is ``default_public``. - - :rtype: bool - """ - return self._tag == 'default_public' - - def is_only_private(self): - """ - Check if the union tag is ``only_private``. - - :rtype: bool - """ - return self._tag == 'only_private' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SharingLinkPolicy(%r, %r)' % (self._tag, self._value) - -SharingLinkPolicy_validator = bv.Union(SharingLinkPolicy) - -class SharingMemberPolicy(bb.Union): - """ - External sharing policy - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - allow = None - # Attribute is overwritten below the class definition - forbid = None - # Attribute is overwritten below the class definition - other = None - - def is_allow(self): - """ - Check if the union tag is ``allow``. - - :rtype: bool - """ - return self._tag == 'allow' - - def is_forbid(self): - """ - Check if the union tag is ``forbid``. - - :rtype: bool - """ - return self._tag == 'forbid' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SharingMemberPolicy(%r, %r)' % (self._tag, self._value) - -SharingMemberPolicy_validator = bv.Union(SharingMemberPolicy) - -class ShmodelAppCreateDetails(object): - """ - Created a link to a file using an app. - - :ivar sharing_permission: Sharing permission. Might be missing due to - historical data gap. - :ivar token_key: Shared link token key. - """ - - __slots__ = [ - '_sharing_permission_value', - '_sharing_permission_present', - '_token_key_value', - '_token_key_present', - ] - - _has_required_fields = False - - def __init__(self, - sharing_permission=None, - token_key=None): - self._sharing_permission_value = None - self._sharing_permission_present = False - self._token_key_value = None - self._token_key_present = False - if sharing_permission is not None: - self.sharing_permission = sharing_permission - if token_key is not None: - self.token_key = token_key - - @property - def sharing_permission(self): - """ - Sharing permission. Might be missing due to historical data gap. - - :rtype: str - """ - if self._sharing_permission_present: - return self._sharing_permission_value - else: - return None - - @sharing_permission.setter - def sharing_permission(self, val): - if val is None: - del self.sharing_permission - return - val = self._sharing_permission_validator.validate(val) - self._sharing_permission_value = val - self._sharing_permission_present = True - - @sharing_permission.deleter - def sharing_permission(self): - self._sharing_permission_value = None - self._sharing_permission_present = False - - @property - def token_key(self): - """ - Shared link token key. - - :rtype: str - """ - if self._token_key_present: - return self._token_key_value - else: - return None - - @token_key.setter - def token_key(self, val): - if val is None: - del self.token_key - return - val = self._token_key_validator.validate(val) - self._token_key_value = val - self._token_key_present = True - - @token_key.deleter - def token_key(self): - self._token_key_value = None - self._token_key_present = False - - def __repr__(self): - return 'ShmodelAppCreateDetails(sharing_permission={!r}, token_key={!r})'.format( - self._sharing_permission_value, - self._token_key_value, - ) - -ShmodelAppCreateDetails_validator = bv.Struct(ShmodelAppCreateDetails) - -class ShmodelCreateDetails(object): - """ - Created a new link. - - :ivar sharing_permission: Sharing permission. Might be missing due to - historical data gap. - :ivar token_key: Shared link token key. - """ - - __slots__ = [ - '_sharing_permission_value', - '_sharing_permission_present', - '_token_key_value', - '_token_key_present', - ] - - _has_required_fields = False - - def __init__(self, - sharing_permission=None, - token_key=None): - self._sharing_permission_value = None - self._sharing_permission_present = False - self._token_key_value = None - self._token_key_present = False - if sharing_permission is not None: - self.sharing_permission = sharing_permission - if token_key is not None: - self.token_key = token_key - - @property - def sharing_permission(self): - """ - Sharing permission. Might be missing due to historical data gap. - - :rtype: str - """ - if self._sharing_permission_present: - return self._sharing_permission_value - else: - return None - - @sharing_permission.setter - def sharing_permission(self, val): - if val is None: - del self.sharing_permission - return - val = self._sharing_permission_validator.validate(val) - self._sharing_permission_value = val - self._sharing_permission_present = True - - @sharing_permission.deleter - def sharing_permission(self): - self._sharing_permission_value = None - self._sharing_permission_present = False - - @property - def token_key(self): - """ - Shared link token key. - - :rtype: str - """ - if self._token_key_present: - return self._token_key_value - else: - return None - - @token_key.setter - def token_key(self, val): - if val is None: - del self.token_key - return - val = self._token_key_validator.validate(val) - self._token_key_value = val - self._token_key_present = True - - @token_key.deleter - def token_key(self): - self._token_key_value = None - self._token_key_present = False - - def __repr__(self): - return 'ShmodelCreateDetails(sharing_permission={!r}, token_key={!r})'.format( - self._sharing_permission_value, - self._token_key_value, - ) - -ShmodelCreateDetails_validator = bv.Struct(ShmodelCreateDetails) - -class ShmodelDisableDetails(object): - """ - Removed a link. - - :ivar sharing_permission: Sharing permission. Might be missing due to - historical data gap. - :ivar token_key: Shared link token key. - """ - - __slots__ = [ - '_sharing_permission_value', - '_sharing_permission_present', - '_token_key_value', - '_token_key_present', - ] - - _has_required_fields = False - - def __init__(self, - sharing_permission=None, - token_key=None): - self._sharing_permission_value = None - self._sharing_permission_present = False - self._token_key_value = None - self._token_key_present = False - if sharing_permission is not None: - self.sharing_permission = sharing_permission - if token_key is not None: - self.token_key = token_key - - @property - def sharing_permission(self): - """ - Sharing permission. Might be missing due to historical data gap. - - :rtype: str - """ - if self._sharing_permission_present: - return self._sharing_permission_value - else: - return None - - @sharing_permission.setter - def sharing_permission(self, val): - if val is None: - del self.sharing_permission - return - val = self._sharing_permission_validator.validate(val) - self._sharing_permission_value = val - self._sharing_permission_present = True - - @sharing_permission.deleter - def sharing_permission(self): - self._sharing_permission_value = None - self._sharing_permission_present = False - - @property - def token_key(self): - """ - Shared link token key. - - :rtype: str - """ - if self._token_key_present: - return self._token_key_value - else: - return None - - @token_key.setter - def token_key(self, val): - if val is None: - del self.token_key - return - val = self._token_key_validator.validate(val) - self._token_key_value = val - self._token_key_present = True - - @token_key.deleter - def token_key(self): - self._token_key_value = None - self._token_key_present = False - - def __repr__(self): - return 'ShmodelDisableDetails(sharing_permission={!r}, token_key={!r})'.format( - self._sharing_permission_value, - self._token_key_value, - ) - -ShmodelDisableDetails_validator = bv.Struct(ShmodelDisableDetails) - -class ShmodelFbShareDetails(object): - """ - Shared a link with Facebook users. - - :ivar sharing_non_member_recipients: Sharing non member recipients. - """ - - __slots__ = [ - '_sharing_non_member_recipients_value', - '_sharing_non_member_recipients_present', - ] - - _has_required_fields = True - - def __init__(self, - sharing_non_member_recipients=None): - self._sharing_non_member_recipients_value = None - self._sharing_non_member_recipients_present = False - if sharing_non_member_recipients is not None: - self.sharing_non_member_recipients = sharing_non_member_recipients - - @property - def sharing_non_member_recipients(self): - """ - Sharing non member recipients. - - :rtype: list of [NonTeamMemberLogInfo] - """ - if self._sharing_non_member_recipients_present: - return self._sharing_non_member_recipients_value - else: - raise AttributeError("missing required field 'sharing_non_member_recipients'") - - @sharing_non_member_recipients.setter - def sharing_non_member_recipients(self, val): - val = self._sharing_non_member_recipients_validator.validate(val) - self._sharing_non_member_recipients_value = val - self._sharing_non_member_recipients_present = True - - @sharing_non_member_recipients.deleter - def sharing_non_member_recipients(self): - self._sharing_non_member_recipients_value = None - self._sharing_non_member_recipients_present = False - - def __repr__(self): - return 'ShmodelFbShareDetails(sharing_non_member_recipients={!r})'.format( - self._sharing_non_member_recipients_value, - ) - -ShmodelFbShareDetails_validator = bv.Struct(ShmodelFbShareDetails) - -class ShmodelGroupShareDetails(object): - """ - Shared a link with a group. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'ShmodelGroupShareDetails()' - -ShmodelGroupShareDetails_validator = bv.Struct(ShmodelGroupShareDetails) - -class ShmodelRemoveExpirationDetails(object): - """ - Removed the expiration date from a link. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'ShmodelRemoveExpirationDetails()' - -ShmodelRemoveExpirationDetails_validator = bv.Struct(ShmodelRemoveExpirationDetails) - -class ShmodelSetExpirationDetails(object): - """ - Added an expiration date to a link. - - :ivar expiration_start_date: Expiration starting date. - :ivar expiration_days: The number of days from the starting expiration date - after which the link will expire. - """ - - __slots__ = [ - '_expiration_start_date_value', - '_expiration_start_date_present', - '_expiration_days_value', - '_expiration_days_present', - ] - - _has_required_fields = True - - def __init__(self, - expiration_start_date=None, - expiration_days=None): - self._expiration_start_date_value = None - self._expiration_start_date_present = False - self._expiration_days_value = None - self._expiration_days_present = False - if expiration_start_date is not None: - self.expiration_start_date = expiration_start_date - if expiration_days is not None: - self.expiration_days = expiration_days - - @property - def expiration_start_date(self): - """ - Expiration starting date. - - :rtype: str - """ - if self._expiration_start_date_present: - return self._expiration_start_date_value - else: - raise AttributeError("missing required field 'expiration_start_date'") - - @expiration_start_date.setter - def expiration_start_date(self, val): - val = self._expiration_start_date_validator.validate(val) - self._expiration_start_date_value = val - self._expiration_start_date_present = True - - @expiration_start_date.deleter - def expiration_start_date(self): - self._expiration_start_date_value = None - self._expiration_start_date_present = False - - @property - def expiration_days(self): - """ - The number of days from the starting expiration date after which the - link will expire. - - :rtype: long - """ - if self._expiration_days_present: - return self._expiration_days_value - else: - raise AttributeError("missing required field 'expiration_days'") - - @expiration_days.setter - def expiration_days(self, val): - val = self._expiration_days_validator.validate(val) - self._expiration_days_value = val - self._expiration_days_present = True - - @expiration_days.deleter - def expiration_days(self): - self._expiration_days_value = None - self._expiration_days_present = False - - def __repr__(self): - return 'ShmodelSetExpirationDetails(expiration_start_date={!r}, expiration_days={!r})'.format( - self._expiration_start_date_value, - self._expiration_days_value, - ) - -ShmodelSetExpirationDetails_validator = bv.Struct(ShmodelSetExpirationDetails) - -class ShmodelTeamCopyDetails(object): - """ - Added a team member's file/folder to their Dropbox from a link. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'ShmodelTeamCopyDetails()' - -ShmodelTeamCopyDetails_validator = bv.Struct(ShmodelTeamCopyDetails) - -class ShmodelTeamDownloadDetails(object): - """ - Downloaded a team member's file/folder from a link. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'ShmodelTeamDownloadDetails()' - -ShmodelTeamDownloadDetails_validator = bv.Struct(ShmodelTeamDownloadDetails) - -class ShmodelTeamShareDetails(object): - """ - Shared a link with team members. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'ShmodelTeamShareDetails()' - -ShmodelTeamShareDetails_validator = bv.Struct(ShmodelTeamShareDetails) - -class ShmodelTeamViewDetails(object): - """ - Opened a team member's link. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'ShmodelTeamViewDetails()' - -ShmodelTeamViewDetails_validator = bv.Struct(ShmodelTeamViewDetails) - -class ShmodelVisibilityPasswordDetails(object): - """ - Password-protected a link. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'ShmodelVisibilityPasswordDetails()' - -ShmodelVisibilityPasswordDetails_validator = bv.Struct(ShmodelVisibilityPasswordDetails) - -class ShmodelVisibilityPublicDetails(object): - """ - Made a file/folder visible to anyone with the link. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'ShmodelVisibilityPublicDetails()' - -ShmodelVisibilityPublicDetails_validator = bv.Struct(ShmodelVisibilityPublicDetails) - -class ShmodelVisibilityTeamOnlyDetails(object): - """ - Made a file/folder visible only to team members with the link. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'ShmodelVisibilityTeamOnlyDetails()' - -ShmodelVisibilityTeamOnlyDetails_validator = bv.Struct(ShmodelVisibilityTeamOnlyDetails) - -class SignInAsSessionEndDetails(object): - """ - Ended admin sign-in-as session. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'SignInAsSessionEndDetails()' - -SignInAsSessionEndDetails_validator = bv.Struct(SignInAsSessionEndDetails) - -class SignInAsSessionStartDetails(object): - """ - Started admin sign-in-as session. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'SignInAsSessionStartDetails()' - -SignInAsSessionStartDetails_validator = bv.Struct(SignInAsSessionStartDetails) - -class SmartSyncChangePolicyDetails(object): - """ - Changed the default Smart Sync policy for team members. - - :ivar new_value: New smart sync policy. - :ivar previous_value: Previous smart sync policy. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New smart sync policy. - - :rtype: SmartSyncPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous smart sync policy. Might be missing due to historical data gap. - - :rtype: SmartSyncPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'SmartSyncChangePolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -SmartSyncChangePolicyDetails_validator = bv.Struct(SmartSyncChangePolicyDetails) - -class SmartSyncCreateAdminPrivilegeReportDetails(object): - """ - Smart Sync non-admin devices report created. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'SmartSyncCreateAdminPrivilegeReportDetails()' - -SmartSyncCreateAdminPrivilegeReportDetails_validator = bv.Struct(SmartSyncCreateAdminPrivilegeReportDetails) - -class SmartSyncNotOptOutDetails(object): - """ - Opted team into Smart Sync. - - :ivar previous_value: Previous Smart Sync opt out policy. - :ivar new_value: New Smart Sync opt out policy. - """ - - __slots__ = [ - '_previous_value_value', - '_previous_value_present', - '_new_value_value', - '_new_value_present', - ] - - _has_required_fields = True - - def __init__(self, - previous_value=None, - new_value=None): - self._previous_value_value = None - self._previous_value_present = False - self._new_value_value = None - self._new_value_present = False - if previous_value is not None: - self.previous_value = previous_value - if new_value is not None: - self.new_value = new_value - - @property - def previous_value(self): - """ - Previous Smart Sync opt out policy. - - :rtype: SmartSyncOptOutPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - raise AttributeError("missing required field 'previous_value'") - - @previous_value.setter - def previous_value(self, val): - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - @property - def new_value(self): - """ - New Smart Sync opt out policy. - - :rtype: SmartSyncOptOutPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - def __repr__(self): - return 'SmartSyncNotOptOutDetails(previous_value={!r}, new_value={!r})'.format( - self._previous_value_value, - self._new_value_value, - ) - -SmartSyncNotOptOutDetails_validator = bv.Struct(SmartSyncNotOptOutDetails) - -class SmartSyncOptOutDetails(object): - """ - Opted team out of Smart Sync. - - :ivar previous_value: Previous Smart Sync opt out policy. - :ivar new_value: New Smart Sync opt out policy. - """ - - __slots__ = [ - '_previous_value_value', - '_previous_value_present', - '_new_value_value', - '_new_value_present', - ] - - _has_required_fields = True - - def __init__(self, - previous_value=None, - new_value=None): - self._previous_value_value = None - self._previous_value_present = False - self._new_value_value = None - self._new_value_present = False - if previous_value is not None: - self.previous_value = previous_value - if new_value is not None: - self.new_value = new_value - - @property - def previous_value(self): - """ - Previous Smart Sync opt out policy. - - :rtype: SmartSyncOptOutPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - raise AttributeError("missing required field 'previous_value'") - - @previous_value.setter - def previous_value(self, val): - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - @property - def new_value(self): - """ - New Smart Sync opt out policy. - - :rtype: SmartSyncOptOutPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - def __repr__(self): - return 'SmartSyncOptOutDetails(previous_value={!r}, new_value={!r})'.format( - self._previous_value_value, - self._new_value_value, - ) - -SmartSyncOptOutDetails_validator = bv.Struct(SmartSyncOptOutDetails) - -class SmartSyncOptOutPolicy(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - default = None - # Attribute is overwritten below the class definition - opted_out = None - # Attribute is overwritten below the class definition - other = None - - def is_default(self): - """ - Check if the union tag is ``default``. - - :rtype: bool - """ - return self._tag == 'default' - - def is_opted_out(self): - """ - Check if the union tag is ``opted_out``. - - :rtype: bool - """ - return self._tag == 'opted_out' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SmartSyncOptOutPolicy(%r, %r)' % (self._tag, self._value) - -SmartSyncOptOutPolicy_validator = bv.Union(SmartSyncOptOutPolicy) - -class SmartSyncPolicy(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - local_only = None - # Attribute is overwritten below the class definition - synced = None - # Attribute is overwritten below the class definition - other = None - - def is_local_only(self): - """ - Check if the union tag is ``local_only``. - - :rtype: bool - """ - return self._tag == 'local_only' - - def is_synced(self): - """ - Check if the union tag is ``synced``. - - :rtype: bool - """ - return self._tag == 'synced' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SmartSyncPolicy(%r, %r)' % (self._tag, self._value) - -SmartSyncPolicy_validator = bv.Union(SmartSyncPolicy) - -class SpaceLimitsLevel(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - generous = None - # Attribute is overwritten below the class definition - moderate = None - # Attribute is overwritten below the class definition - no_limit = None - # Attribute is overwritten below the class definition - strict = None - # Attribute is overwritten below the class definition - other = None - - def is_generous(self): - """ - Check if the union tag is ``generous``. - - :rtype: bool - """ - return self._tag == 'generous' - - def is_moderate(self): - """ - Check if the union tag is ``moderate``. - - :rtype: bool - """ - return self._tag == 'moderate' - - def is_no_limit(self): - """ - Check if the union tag is ``no_limit``. - - :rtype: bool - """ - return self._tag == 'no_limit' - - def is_strict(self): - """ - Check if the union tag is ``strict``. - - :rtype: bool - """ - return self._tag == 'strict' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SpaceLimitsLevel(%r, %r)' % (self._tag, self._value) - -SpaceLimitsLevel_validator = bv.Union(SpaceLimitsLevel) - -class SpaceLimitsStatus(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - within_quota = None - # Attribute is overwritten below the class definition - near_quota = None - # Attribute is overwritten below the class definition - over_quota = None - # Attribute is overwritten below the class definition - other = None - - def is_within_quota(self): - """ - Check if the union tag is ``within_quota``. - - :rtype: bool - """ - return self._tag == 'within_quota' - - def is_near_quota(self): - """ - Check if the union tag is ``near_quota``. - - :rtype: bool - """ - return self._tag == 'near_quota' - - def is_over_quota(self): - """ - Check if the union tag is ``over_quota``. - - :rtype: bool - """ - return self._tag == 'over_quota' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SpaceLimitsStatus(%r, %r)' % (self._tag, self._value) - -SpaceLimitsStatus_validator = bv.Union(SpaceLimitsStatus) - -class SsoAddCertDetails(object): - """ - Added the X.509 certificate for SSO. - - :ivar certificate_details: SSO certificate details. - """ - - __slots__ = [ - '_certificate_details_value', - '_certificate_details_present', - ] - - _has_required_fields = True - - def __init__(self, - certificate_details=None): - self._certificate_details_value = None - self._certificate_details_present = False - if certificate_details is not None: - self.certificate_details = certificate_details - - @property - def certificate_details(self): - """ - SSO certificate details. - - :rtype: Certificate - """ - if self._certificate_details_present: - return self._certificate_details_value - else: - raise AttributeError("missing required field 'certificate_details'") - - @certificate_details.setter - def certificate_details(self, val): - self._certificate_details_validator.validate_type_only(val) - self._certificate_details_value = val - self._certificate_details_present = True - - @certificate_details.deleter - def certificate_details(self): - self._certificate_details_value = None - self._certificate_details_present = False - - def __repr__(self): - return 'SsoAddCertDetails(certificate_details={!r})'.format( - self._certificate_details_value, - ) - -SsoAddCertDetails_validator = bv.Struct(SsoAddCertDetails) - -class SsoAddLoginUrlDetails(object): - """ - Added sign-in URL for SSO. - - :ivar new_value: New single sign-on login URL. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None): - self._new_value_value = None - self._new_value_present = False - if new_value is not None: - self.new_value = new_value - - @property - def new_value(self): - """ - New single sign-on login URL. - - :rtype: str - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - val = self._new_value_validator.validate(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - def __repr__(self): - return 'SsoAddLoginUrlDetails(new_value={!r})'.format( - self._new_value_value, - ) - -SsoAddLoginUrlDetails_validator = bv.Struct(SsoAddLoginUrlDetails) - -class SsoAddLogoutUrlDetails(object): - """ - Added sign-out URL for SSO. - - :ivar new_value: New single sign-on logout URL. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - ] - - _has_required_fields = False - - def __init__(self, - new_value=None): - self._new_value_value = None - self._new_value_present = False - if new_value is not None: - self.new_value = new_value - - @property - def new_value(self): - """ - New single sign-on logout URL. Might be missing due to historical data - gap. - - :rtype: str - """ - if self._new_value_present: - return self._new_value_value - else: - return None - - @new_value.setter - def new_value(self, val): - if val is None: - del self.new_value - return - val = self._new_value_validator.validate(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - def __repr__(self): - return 'SsoAddLogoutUrlDetails(new_value={!r})'.format( - self._new_value_value, - ) - -SsoAddLogoutUrlDetails_validator = bv.Struct(SsoAddLogoutUrlDetails) - -class SsoChangeCertDetails(object): - """ - Changed the X.509 certificate for SSO. - - :ivar previous_certificate_details: Previous SSO certificate details. - :ivar new_certificate_details: New SSO certificate details. - """ - - __slots__ = [ - '_previous_certificate_details_value', - '_previous_certificate_details_present', - '_new_certificate_details_value', - '_new_certificate_details_present', - ] - - _has_required_fields = True - - def __init__(self, - new_certificate_details=None, - previous_certificate_details=None): - self._previous_certificate_details_value = None - self._previous_certificate_details_present = False - self._new_certificate_details_value = None - self._new_certificate_details_present = False - if previous_certificate_details is not None: - self.previous_certificate_details = previous_certificate_details - if new_certificate_details is not None: - self.new_certificate_details = new_certificate_details - - @property - def previous_certificate_details(self): - """ - Previous SSO certificate details. - - :rtype: Certificate - """ - if self._previous_certificate_details_present: - return self._previous_certificate_details_value - else: - return None - - @previous_certificate_details.setter - def previous_certificate_details(self, val): - if val is None: - del self.previous_certificate_details - return - self._previous_certificate_details_validator.validate_type_only(val) - self._previous_certificate_details_value = val - self._previous_certificate_details_present = True - - @previous_certificate_details.deleter - def previous_certificate_details(self): - self._previous_certificate_details_value = None - self._previous_certificate_details_present = False - - @property - def new_certificate_details(self): - """ - New SSO certificate details. - - :rtype: Certificate - """ - if self._new_certificate_details_present: - return self._new_certificate_details_value - else: - raise AttributeError("missing required field 'new_certificate_details'") - - @new_certificate_details.setter - def new_certificate_details(self, val): - self._new_certificate_details_validator.validate_type_only(val) - self._new_certificate_details_value = val - self._new_certificate_details_present = True - - @new_certificate_details.deleter - def new_certificate_details(self): - self._new_certificate_details_value = None - self._new_certificate_details_present = False - - def __repr__(self): - return 'SsoChangeCertDetails(new_certificate_details={!r}, previous_certificate_details={!r})'.format( - self._new_certificate_details_value, - self._previous_certificate_details_value, - ) - -SsoChangeCertDetails_validator = bv.Struct(SsoChangeCertDetails) - -class SsoChangeLoginUrlDetails(object): - """ - Changed the sign-in URL for SSO. - - :ivar previous_value: Previous single sign-on login URL. - :ivar new_value: New single sign-on login URL. - """ - - __slots__ = [ - '_previous_value_value', - '_previous_value_present', - '_new_value_value', - '_new_value_present', - ] - - _has_required_fields = True - - def __init__(self, - previous_value=None, - new_value=None): - self._previous_value_value = None - self._previous_value_present = False - self._new_value_value = None - self._new_value_present = False - if previous_value is not None: - self.previous_value = previous_value - if new_value is not None: - self.new_value = new_value - - @property - def previous_value(self): - """ - Previous single sign-on login URL. - - :rtype: str - """ - if self._previous_value_present: - return self._previous_value_value - else: - raise AttributeError("missing required field 'previous_value'") - - @previous_value.setter - def previous_value(self, val): - val = self._previous_value_validator.validate(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - @property - def new_value(self): - """ - New single sign-on login URL. - - :rtype: str - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - val = self._new_value_validator.validate(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - def __repr__(self): - return 'SsoChangeLoginUrlDetails(previous_value={!r}, new_value={!r})'.format( - self._previous_value_value, - self._new_value_value, - ) - -SsoChangeLoginUrlDetails_validator = bv.Struct(SsoChangeLoginUrlDetails) - -class SsoChangeLogoutUrlDetails(object): - """ - Changed the sign-out URL for SSO. - - :ivar previous_value: Previous single sign-on logout URL. Might be missing - due to historical data gap. - :ivar new_value: New single sign-on logout URL. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_previous_value_value', - '_previous_value_present', - '_new_value_value', - '_new_value_present', - ] - - _has_required_fields = False - - def __init__(self, - previous_value=None, - new_value=None): - self._previous_value_value = None - self._previous_value_present = False - self._new_value_value = None - self._new_value_present = False - if previous_value is not None: - self.previous_value = previous_value - if new_value is not None: - self.new_value = new_value - - @property - def previous_value(self): - """ - Previous single sign-on logout URL. Might be missing due to historical - data gap. - - :rtype: str - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - val = self._previous_value_validator.validate(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - @property - def new_value(self): - """ - New single sign-on logout URL. Might be missing due to historical data - gap. - - :rtype: str - """ - if self._new_value_present: - return self._new_value_value - else: - return None - - @new_value.setter - def new_value(self, val): - if val is None: - del self.new_value - return - val = self._new_value_validator.validate(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - def __repr__(self): - return 'SsoChangeLogoutUrlDetails(previous_value={!r}, new_value={!r})'.format( - self._previous_value_value, - self._new_value_value, - ) - -SsoChangeLogoutUrlDetails_validator = bv.Struct(SsoChangeLogoutUrlDetails) - -class SsoChangePolicyDetails(object): - """ - Change the single sign-on policy for the team. - - :ivar new_value: New single sign-on policy. - :ivar previous_value: Previous single sign-on policy. Might be missing due - to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New single sign-on policy. - - :rtype: team_policies.SsoPolicy_validator - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous single sign-on policy. Might be missing due to historical data - gap. - - :rtype: team_policies.SsoPolicy_validator - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'SsoChangePolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -SsoChangePolicyDetails_validator = bv.Struct(SsoChangePolicyDetails) - -class SsoChangeSamlIdentityModeDetails(object): - """ - Changed the SAML identity mode for SSO. - - :ivar previous_value: Previous single sign-on identity mode. - :ivar new_value: New single sign-on identity mode. - """ - - __slots__ = [ - '_previous_value_value', - '_previous_value_present', - '_new_value_value', - '_new_value_present', - ] - - _has_required_fields = True - - def __init__(self, - previous_value=None, - new_value=None): - self._previous_value_value = None - self._previous_value_present = False - self._new_value_value = None - self._new_value_present = False - if previous_value is not None: - self.previous_value = previous_value - if new_value is not None: - self.new_value = new_value - - @property - def previous_value(self): - """ - Previous single sign-on identity mode. - - :rtype: long - """ - if self._previous_value_present: - return self._previous_value_value - else: - raise AttributeError("missing required field 'previous_value'") - - @previous_value.setter - def previous_value(self, val): - val = self._previous_value_validator.validate(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - @property - def new_value(self): - """ - New single sign-on identity mode. - - :rtype: long - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - val = self._new_value_validator.validate(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - def __repr__(self): - return 'SsoChangeSamlIdentityModeDetails(previous_value={!r}, new_value={!r})'.format( - self._previous_value_value, - self._new_value_value, - ) - -SsoChangeSamlIdentityModeDetails_validator = bv.Struct(SsoChangeSamlIdentityModeDetails) - -class SsoLoginFailDetails(object): - """ - Failed to sign in using SSO. - - :ivar error_details: Login failure details. - """ - - __slots__ = [ - '_error_details_value', - '_error_details_present', - ] - - _has_required_fields = True - - def __init__(self, - error_details=None): - self._error_details_value = None - self._error_details_present = False - if error_details is not None: - self.error_details = error_details - - @property - def error_details(self): - """ - Login failure details. - - :rtype: FailureDetailsLogInfo - """ - if self._error_details_present: - return self._error_details_value - else: - raise AttributeError("missing required field 'error_details'") - - @error_details.setter - def error_details(self, val): - self._error_details_validator.validate_type_only(val) - self._error_details_value = val - self._error_details_present = True - - @error_details.deleter - def error_details(self): - self._error_details_value = None - self._error_details_present = False - - def __repr__(self): - return 'SsoLoginFailDetails(error_details={!r})'.format( - self._error_details_value, - ) - -SsoLoginFailDetails_validator = bv.Struct(SsoLoginFailDetails) - -class SsoRemoveCertDetails(object): - """ - Removed the X.509 certificate for SSO. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'SsoRemoveCertDetails()' - -SsoRemoveCertDetails_validator = bv.Struct(SsoRemoveCertDetails) - -class SsoRemoveLoginUrlDetails(object): - """ - Removed the sign-in URL for SSO. - - :ivar previous_value: Previous single sign-on login URL. - """ - - __slots__ = [ - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - previous_value=None): - self._previous_value_value = None - self._previous_value_present = False - if previous_value is not None: - self.previous_value = previous_value - - @property - def previous_value(self): - """ - Previous single sign-on login URL. - - :rtype: str - """ - if self._previous_value_present: - return self._previous_value_value - else: - raise AttributeError("missing required field 'previous_value'") - - @previous_value.setter - def previous_value(self, val): - val = self._previous_value_validator.validate(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'SsoRemoveLoginUrlDetails(previous_value={!r})'.format( - self._previous_value_value, - ) - -SsoRemoveLoginUrlDetails_validator = bv.Struct(SsoRemoveLoginUrlDetails) - -class SsoRemoveLogoutUrlDetails(object): - """ - Removed single sign-on logout URL. - - :ivar previous_value: Previous single sign-on logout URL. - """ - - __slots__ = [ - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - previous_value=None): - self._previous_value_value = None - self._previous_value_present = False - if previous_value is not None: - self.previous_value = previous_value - - @property - def previous_value(self): - """ - Previous single sign-on logout URL. - - :rtype: str - """ - if self._previous_value_present: - return self._previous_value_value - else: - raise AttributeError("missing required field 'previous_value'") - - @previous_value.setter - def previous_value(self, val): - val = self._previous_value_validator.validate(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'SsoRemoveLogoutUrlDetails(previous_value={!r})'.format( - self._previous_value_value, - ) - -SsoRemoveLogoutUrlDetails_validator = bv.Struct(SsoRemoveLogoutUrlDetails) - -class TeamActivityCreateReportDetails(object): - """ - Created a team activity report. - - :ivar start_date: Report start date. - :ivar end_date: Report end date. - """ - - __slots__ = [ - '_start_date_value', - '_start_date_present', - '_end_date_value', - '_end_date_present', - ] - - _has_required_fields = True - - def __init__(self, - start_date=None, - end_date=None): - self._start_date_value = None - self._start_date_present = False - self._end_date_value = None - self._end_date_present = False - if start_date is not None: - self.start_date = start_date - if end_date is not None: - self.end_date = end_date - - @property - def start_date(self): - """ - Report start date. - - :rtype: datetime.datetime - """ - if self._start_date_present: - return self._start_date_value - else: - raise AttributeError("missing required field 'start_date'") - - @start_date.setter - def start_date(self, val): - val = self._start_date_validator.validate(val) - self._start_date_value = val - self._start_date_present = True - - @start_date.deleter - def start_date(self): - self._start_date_value = None - self._start_date_present = False - - @property - def end_date(self): - """ - Report end date. - - :rtype: datetime.datetime - """ - if self._end_date_present: - return self._end_date_value - else: - raise AttributeError("missing required field 'end_date'") - - @end_date.setter - def end_date(self, val): - val = self._end_date_validator.validate(val) - self._end_date_value = val - self._end_date_present = True - - @end_date.deleter - def end_date(self): - self._end_date_value = None - self._end_date_present = False - - def __repr__(self): - return 'TeamActivityCreateReportDetails(start_date={!r}, end_date={!r})'.format( - self._start_date_value, - self._end_date_value, - ) - -TeamActivityCreateReportDetails_validator = bv.Struct(TeamActivityCreateReportDetails) - -class TeamEvent(object): - """ - An audit log event. - - :ivar timestamp: The Dropbox timestamp representing when the action was - taken. - :ivar event_category: The category that this type of action belongs to. - :ivar actor: The entity who actually performed the action. - :ivar origin: The origin from which the actor performed the action including - information about host, ip address, location, session, etc. If the - action was performed programmatically via the API the origin represents - the API client. - :ivar involve_non_team_member: True if the action involved a non team member - either as the actor or as one of the affected users. - :ivar context: The user or team on whose behalf the actor performed the - action. - :ivar participants: Zero or more users and/or groups that are affected by - the action. Note that this list doesn't include any actors or users in - context. - :ivar assets: Zero or more content assets involved in the action. Currently - these include Dropbox files and folders but in the future we might add - other asset types such as Paper documents, folders, projects, etc. - :ivar event_type: The particular type of action taken. - :ivar details: The variable event schema applicable to this type of action, - instantiated with respect to this particular action. - """ - - __slots__ = [ - '_timestamp_value', - '_timestamp_present', - '_event_category_value', - '_event_category_present', - '_actor_value', - '_actor_present', - '_origin_value', - '_origin_present', - '_involve_non_team_member_value', - '_involve_non_team_member_present', - '_context_value', - '_context_present', - '_participants_value', - '_participants_present', - '_assets_value', - '_assets_present', - '_event_type_value', - '_event_type_present', - '_details_value', - '_details_present', - ] - - _has_required_fields = True - - def __init__(self, - timestamp=None, - event_category=None, - actor=None, - involve_non_team_member=None, - context=None, - event_type=None, - details=None, - origin=None, - participants=None, - assets=None): - self._timestamp_value = None - self._timestamp_present = False - self._event_category_value = None - self._event_category_present = False - self._actor_value = None - self._actor_present = False - self._origin_value = None - self._origin_present = False - self._involve_non_team_member_value = None - self._involve_non_team_member_present = False - self._context_value = None - self._context_present = False - self._participants_value = None - self._participants_present = False - self._assets_value = None - self._assets_present = False - self._event_type_value = None - self._event_type_present = False - self._details_value = None - self._details_present = False - if timestamp is not None: - self.timestamp = timestamp - if event_category is not None: - self.event_category = event_category - if actor is not None: - self.actor = actor - if origin is not None: - self.origin = origin - if involve_non_team_member is not None: - self.involve_non_team_member = involve_non_team_member - if context is not None: - self.context = context - if participants is not None: - self.participants = participants - if assets is not None: - self.assets = assets - if event_type is not None: - self.event_type = event_type - if details is not None: - self.details = details - - @property - def timestamp(self): - """ - The Dropbox timestamp representing when the action was taken. - - :rtype: datetime.datetime - """ - if self._timestamp_present: - return self._timestamp_value - else: - raise AttributeError("missing required field 'timestamp'") - - @timestamp.setter - def timestamp(self, val): - val = self._timestamp_validator.validate(val) - self._timestamp_value = val - self._timestamp_present = True - - @timestamp.deleter - def timestamp(self): - self._timestamp_value = None - self._timestamp_present = False - - @property - def event_category(self): - """ - The category that this type of action belongs to. - - :rtype: EventCategory - """ - if self._event_category_present: - return self._event_category_value - else: - raise AttributeError("missing required field 'event_category'") - - @event_category.setter - def event_category(self, val): - self._event_category_validator.validate_type_only(val) - self._event_category_value = val - self._event_category_present = True - - @event_category.deleter - def event_category(self): - self._event_category_value = None - self._event_category_present = False - - @property - def actor(self): - """ - The entity who actually performed the action. - - :rtype: ActorLogInfo - """ - if self._actor_present: - return self._actor_value - else: - raise AttributeError("missing required field 'actor'") - - @actor.setter - def actor(self, val): - self._actor_validator.validate_type_only(val) - self._actor_value = val - self._actor_present = True - - @actor.deleter - def actor(self): - self._actor_value = None - self._actor_present = False - - @property - def origin(self): - """ - The origin from which the actor performed the action including - information about host, ip address, location, session, etc. If the - action was performed programmatically via the API the origin represents - the API client. - - :rtype: OriginLogInfo - """ - if self._origin_present: - return self._origin_value - else: - return None - - @origin.setter - def origin(self, val): - if val is None: - del self.origin - return - self._origin_validator.validate_type_only(val) - self._origin_value = val - self._origin_present = True - - @origin.deleter - def origin(self): - self._origin_value = None - self._origin_present = False - - @property - def involve_non_team_member(self): - """ - True if the action involved a non team member either as the actor or as - one of the affected users. - - :rtype: bool - """ - if self._involve_non_team_member_present: - return self._involve_non_team_member_value - else: - raise AttributeError("missing required field 'involve_non_team_member'") - - @involve_non_team_member.setter - def involve_non_team_member(self, val): - val = self._involve_non_team_member_validator.validate(val) - self._involve_non_team_member_value = val - self._involve_non_team_member_present = True - - @involve_non_team_member.deleter - def involve_non_team_member(self): - self._involve_non_team_member_value = None - self._involve_non_team_member_present = False - - @property - def context(self): - """ - The user or team on whose behalf the actor performed the action. - - :rtype: ContextLogInfo - """ - if self._context_present: - return self._context_value - else: - raise AttributeError("missing required field 'context'") - - @context.setter - def context(self, val): - self._context_validator.validate_type_only(val) - self._context_value = val - self._context_present = True - - @context.deleter - def context(self): - self._context_value = None - self._context_present = False - - @property - def participants(self): - """ - Zero or more users and/or groups that are affected by the action. Note - that this list doesn't include any actors or users in context. - - :rtype: list of [ParticipantLogInfo] - """ - if self._participants_present: - return self._participants_value - else: - return None - - @participants.setter - def participants(self, val): - if val is None: - del self.participants - return - val = self._participants_validator.validate(val) - self._participants_value = val - self._participants_present = True - - @participants.deleter - def participants(self): - self._participants_value = None - self._participants_present = False - - @property - def assets(self): - """ - Zero or more content assets involved in the action. Currently these - include Dropbox files and folders but in the future we might add other - asset types such as Paper documents, folders, projects, etc. - - :rtype: list of [AssetLogInfo] - """ - if self._assets_present: - return self._assets_value - else: - return None - - @assets.setter - def assets(self, val): - if val is None: - del self.assets - return - val = self._assets_validator.validate(val) - self._assets_value = val - self._assets_present = True - - @assets.deleter - def assets(self): - self._assets_value = None - self._assets_present = False - - @property - def event_type(self): - """ - The particular type of action taken. - - :rtype: EventType - """ - if self._event_type_present: - return self._event_type_value - else: - raise AttributeError("missing required field 'event_type'") - - @event_type.setter - def event_type(self, val): - self._event_type_validator.validate_type_only(val) - self._event_type_value = val - self._event_type_present = True - - @event_type.deleter - def event_type(self): - self._event_type_value = None - self._event_type_present = False - - @property - def details(self): - """ - The variable event schema applicable to this type of action, - instantiated with respect to this particular action. - - :rtype: EventDetails - """ - if self._details_present: - return self._details_value - else: - raise AttributeError("missing required field 'details'") - - @details.setter - def details(self, val): - self._details_validator.validate_type_only(val) - self._details_value = val - self._details_present = True - - @details.deleter - def details(self): - self._details_value = None - self._details_present = False - - def __repr__(self): - return 'TeamEvent(timestamp={!r}, event_category={!r}, actor={!r}, involve_non_team_member={!r}, context={!r}, event_type={!r}, details={!r}, origin={!r}, participants={!r}, assets={!r})'.format( - self._timestamp_value, - self._event_category_value, - self._actor_value, - self._involve_non_team_member_value, - self._context_value, - self._event_type_value, - self._details_value, - self._origin_value, - self._participants_value, - self._assets_value, - ) - -TeamEvent_validator = bv.Struct(TeamEvent) - -class TeamFolderChangeStatusDetails(object): - """ - Changed the archival status of a team folder. - - :ivar new_value: New team folder status. - :ivar previous_value: Previous team folder status. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New team folder status. - - :rtype: TeamFolderStatus - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous team folder status. Might be missing due to historical data - gap. - - :rtype: TeamFolderStatus - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'TeamFolderChangeStatusDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -TeamFolderChangeStatusDetails_validator = bv.Struct(TeamFolderChangeStatusDetails) - -class TeamFolderCreateDetails(object): - """ - Created a new team folder in active status. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'TeamFolderCreateDetails()' - -TeamFolderCreateDetails_validator = bv.Struct(TeamFolderCreateDetails) - -class TeamFolderDowngradeDetails(object): - """ - Downgraded a team folder to a regular shared folder. - - :ivar target_asset_index: Target asset position in the Assets list. - """ - - __slots__ = [ - '_target_asset_index_value', - '_target_asset_index_present', - ] - - _has_required_fields = True - - def __init__(self, - target_asset_index=None): - self._target_asset_index_value = None - self._target_asset_index_present = False - if target_asset_index is not None: - self.target_asset_index = target_asset_index - - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. - - :rtype: long - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") - - @target_asset_index.setter - def target_asset_index(self, val): - val = self._target_asset_index_validator.validate(val) - self._target_asset_index_value = val - self._target_asset_index_present = True - - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False - - def __repr__(self): - return 'TeamFolderDowngradeDetails(target_asset_index={!r})'.format( - self._target_asset_index_value, - ) - -TeamFolderDowngradeDetails_validator = bv.Struct(TeamFolderDowngradeDetails) - -class TeamFolderPermanentlyDeleteDetails(object): - """ - Permanently deleted an archived team folder. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'TeamFolderPermanentlyDeleteDetails()' - -TeamFolderPermanentlyDeleteDetails_validator = bv.Struct(TeamFolderPermanentlyDeleteDetails) - -class TeamFolderRenameDetails(object): - """ - Renamed an active or archived team folder. - - :ivar relocate_action_details: Specifies the source and destination indices - in the assets list. - """ - - __slots__ = [ - '_relocate_action_details_value', - '_relocate_action_details_present', - ] - - _has_required_fields = True - - def __init__(self, - relocate_action_details=None): - self._relocate_action_details_value = None - self._relocate_action_details_present = False - if relocate_action_details is not None: - self.relocate_action_details = relocate_action_details - - @property - def relocate_action_details(self): - """ - Specifies the source and destination indices in the assets list. - - :rtype: RelocateAssetReferencesLogInfo - """ - if self._relocate_action_details_present: - return self._relocate_action_details_value - else: - raise AttributeError("missing required field 'relocate_action_details'") - - @relocate_action_details.setter - def relocate_action_details(self, val): - self._relocate_action_details_validator.validate_type_only(val) - self._relocate_action_details_value = val - self._relocate_action_details_present = True - - @relocate_action_details.deleter - def relocate_action_details(self): - self._relocate_action_details_value = None - self._relocate_action_details_present = False - - def __repr__(self): - return 'TeamFolderRenameDetails(relocate_action_details={!r})'.format( - self._relocate_action_details_value, - ) - -TeamFolderRenameDetails_validator = bv.Struct(TeamFolderRenameDetails) - -class TeamFolderStatus(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - archive = None - # Attribute is overwritten below the class definition - unarchive = None - # Attribute is overwritten below the class definition - other = None - - def is_archive(self): - """ - Check if the union tag is ``archive``. - - :rtype: bool - """ - return self._tag == 'archive' - - def is_unarchive(self): - """ - Check if the union tag is ``unarchive``. - - :rtype: bool - """ - return self._tag == 'unarchive' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'TeamFolderStatus(%r, %r)' % (self._tag, self._value) - -TeamFolderStatus_validator = bv.Union(TeamFolderStatus) - -class TeamLinkedAppLogInfo(AppLogInfo): - """ - Team linked app - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self, - app_id=None, - display_name=None): - super(TeamLinkedAppLogInfo, self).__init__(app_id, - display_name) - - def __repr__(self): - return 'TeamLinkedAppLogInfo(app_id={!r}, display_name={!r})'.format( - self._app_id_value, - self._display_name_value, - ) - -TeamLinkedAppLogInfo_validator = bv.Struct(TeamLinkedAppLogInfo) - -class TeamMemberLogInfo(UserLogInfo): - """ - Team member's logged information. - - :ivar team_member_id: Team member ID. Might be missing due to historical - data gap. - :ivar member_external_id: Team member external ID. - """ - - __slots__ = [ - '_team_member_id_value', - '_team_member_id_present', - '_member_external_id_value', - '_member_external_id_present', - ] - - _has_required_fields = False - - def __init__(self, - account_id=None, - display_name=None, - email=None, - team_member_id=None, - member_external_id=None): - super(TeamMemberLogInfo, self).__init__(account_id, - display_name, - email) - self._team_member_id_value = None - self._team_member_id_present = False - self._member_external_id_value = None - self._member_external_id_present = False - if team_member_id is not None: - self.team_member_id = team_member_id - if member_external_id is not None: - self.member_external_id = member_external_id - - @property - def team_member_id(self): - """ - Team member ID. Might be missing due to historical data gap. - - :rtype: str - """ - if self._team_member_id_present: - return self._team_member_id_value - else: - return None - - @team_member_id.setter - def team_member_id(self, val): - if val is None: - del self.team_member_id - return - val = self._team_member_id_validator.validate(val) - self._team_member_id_value = val - self._team_member_id_present = True - - @team_member_id.deleter - def team_member_id(self): - self._team_member_id_value = None - self._team_member_id_present = False - - @property - def member_external_id(self): - """ - Team member external ID. - - :rtype: str - """ - if self._member_external_id_present: - return self._member_external_id_value - else: - return None - - @member_external_id.setter - def member_external_id(self, val): - if val is None: - del self.member_external_id - return - val = self._member_external_id_validator.validate(val) - self._member_external_id_value = val - self._member_external_id_present = True - - @member_external_id.deleter - def member_external_id(self): - self._member_external_id_value = None - self._member_external_id_present = False - - def __repr__(self): - return 'TeamMemberLogInfo(account_id={!r}, display_name={!r}, email={!r}, team_member_id={!r}, member_external_id={!r})'.format( - self._account_id_value, - self._display_name_value, - self._email_value, - self._team_member_id_value, - self._member_external_id_value, - ) - -TeamMemberLogInfo_validator = bv.Struct(TeamMemberLogInfo) - -class TeamMembershipType(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - free = None - # Attribute is overwritten below the class definition - full = None - # Attribute is overwritten below the class definition - other = None - - def is_free(self): - """ - Check if the union tag is ``free``. - - :rtype: bool - """ - return self._tag == 'free' - - def is_full(self): - """ - Check if the union tag is ``full``. - - :rtype: bool - """ - return self._tag == 'full' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'TeamMembershipType(%r, %r)' % (self._tag, self._value) - -TeamMembershipType_validator = bv.Union(TeamMembershipType) - -class TeamMergeFromDetails(object): - """ - Merged another team into this team. - - :ivar team_name: The name of the team that was merged into this team. - """ - - __slots__ = [ - '_team_name_value', - '_team_name_present', - ] - - _has_required_fields = True - - def __init__(self, - team_name=None): - self._team_name_value = None - self._team_name_present = False - if team_name is not None: - self.team_name = team_name - - @property - def team_name(self): - """ - The name of the team that was merged into this team. - - :rtype: str - """ - if self._team_name_present: - return self._team_name_value - else: - raise AttributeError("missing required field 'team_name'") - - @team_name.setter - def team_name(self, val): - val = self._team_name_validator.validate(val) - self._team_name_value = val - self._team_name_present = True - - @team_name.deleter - def team_name(self): - self._team_name_value = None - self._team_name_present = False - - def __repr__(self): - return 'TeamMergeFromDetails(team_name={!r})'.format( - self._team_name_value, - ) - -TeamMergeFromDetails_validator = bv.Struct(TeamMergeFromDetails) - -class TeamMergeToDetails(object): - """ - Merged this team into another team. - - :ivar team_name: The name of the team that this team was merged into. - """ - - __slots__ = [ - '_team_name_value', - '_team_name_present', - ] - - _has_required_fields = True - - def __init__(self, - team_name=None): - self._team_name_value = None - self._team_name_present = False - if team_name is not None: - self.team_name = team_name - - @property - def team_name(self): - """ - The name of the team that this team was merged into. - - :rtype: str - """ - if self._team_name_present: - return self._team_name_value - else: - raise AttributeError("missing required field 'team_name'") - - @team_name.setter - def team_name(self, val): - val = self._team_name_validator.validate(val) - self._team_name_value = val - self._team_name_present = True - - @team_name.deleter - def team_name(self): - self._team_name_value = None - self._team_name_present = False - - def __repr__(self): - return 'TeamMergeToDetails(team_name={!r})'.format( - self._team_name_value, - ) - -TeamMergeToDetails_validator = bv.Struct(TeamMergeToDetails) - -class TeamName(object): - """ - Team name details - - :ivar team_display_name: Team's display name. - :ivar team_legal_name: Team's legal name. - """ - - __slots__ = [ - '_team_display_name_value', - '_team_display_name_present', - '_team_legal_name_value', - '_team_legal_name_present', - ] - - _has_required_fields = True - - def __init__(self, - team_display_name=None, - team_legal_name=None): - self._team_display_name_value = None - self._team_display_name_present = False - self._team_legal_name_value = None - self._team_legal_name_present = False - if team_display_name is not None: - self.team_display_name = team_display_name - if team_legal_name is not None: - self.team_legal_name = team_legal_name - - @property - def team_display_name(self): - """ - Team's display name. - - :rtype: str - """ - if self._team_display_name_present: - return self._team_display_name_value - else: - raise AttributeError("missing required field 'team_display_name'") - - @team_display_name.setter - def team_display_name(self, val): - val = self._team_display_name_validator.validate(val) - self._team_display_name_value = val - self._team_display_name_present = True - - @team_display_name.deleter - def team_display_name(self): - self._team_display_name_value = None - self._team_display_name_present = False - - @property - def team_legal_name(self): - """ - Team's legal name. - - :rtype: str - """ - if self._team_legal_name_present: - return self._team_legal_name_value - else: - raise AttributeError("missing required field 'team_legal_name'") - - @team_legal_name.setter - def team_legal_name(self, val): - val = self._team_legal_name_validator.validate(val) - self._team_legal_name_value = val - self._team_legal_name_present = True - - @team_legal_name.deleter - def team_legal_name(self): - self._team_legal_name_value = None - self._team_legal_name_present = False - - def __repr__(self): - return 'TeamName(team_display_name={!r}, team_legal_name={!r})'.format( - self._team_display_name_value, - self._team_legal_name_value, - ) - -TeamName_validator = bv.Struct(TeamName) - -class TeamProfileAddLogoDetails(object): - """ - Added a team logo to be displayed on shared link headers. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'TeamProfileAddLogoDetails()' - -TeamProfileAddLogoDetails_validator = bv.Struct(TeamProfileAddLogoDetails) - -class TeamProfileChangeDefaultLanguageDetails(object): - """ - Changed the default language for the team. - - :ivar new_value: New team's default language. - :ivar previous_value: Previous team's default language. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New team's default language. - - :rtype: str - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - val = self._new_value_validator.validate(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous team's default language. - - :rtype: str - """ - if self._previous_value_present: - return self._previous_value_value - else: - raise AttributeError("missing required field 'previous_value'") - - @previous_value.setter - def previous_value(self, val): - val = self._previous_value_validator.validate(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'TeamProfileChangeDefaultLanguageDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -TeamProfileChangeDefaultLanguageDetails_validator = bv.Struct(TeamProfileChangeDefaultLanguageDetails) - -class TeamProfileChangeLogoDetails(object): - """ - Changed the team logo to be displayed on shared link headers. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'TeamProfileChangeLogoDetails()' - -TeamProfileChangeLogoDetails_validator = bv.Struct(TeamProfileChangeLogoDetails) - -class TeamProfileChangeNameDetails(object): - """ - Changed the team name. - - :ivar previous_value: Previous teams name. Might be missing due to - historical data gap. - :ivar new_value: New team name. - """ - - __slots__ = [ - '_previous_value_value', - '_previous_value_present', - '_new_value_value', - '_new_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._previous_value_value = None - self._previous_value_present = False - self._new_value_value = None - self._new_value_present = False - if previous_value is not None: - self.previous_value = previous_value - if new_value is not None: - self.new_value = new_value - - @property - def previous_value(self): - """ - Previous teams name. Might be missing due to historical data gap. - - :rtype: TeamName - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - @property - def new_value(self): - """ - New team name. - - :rtype: TeamName - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - def __repr__(self): - return 'TeamProfileChangeNameDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -TeamProfileChangeNameDetails_validator = bv.Struct(TeamProfileChangeNameDetails) - -class TeamProfileRemoveLogoDetails(object): - """ - Removed the team logo to be displayed on shared link headers. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'TeamProfileRemoveLogoDetails()' - -TeamProfileRemoveLogoDetails_validator = bv.Struct(TeamProfileRemoveLogoDetails) - -class TfaAddBackupPhoneDetails(object): - """ - Added a backup phone for two-step verification. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'TfaAddBackupPhoneDetails()' - -TfaAddBackupPhoneDetails_validator = bv.Struct(TfaAddBackupPhoneDetails) - -class TfaAddSecurityKeyDetails(object): - """ - Added a security key for two-step verification. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'TfaAddSecurityKeyDetails()' - -TfaAddSecurityKeyDetails_validator = bv.Struct(TfaAddSecurityKeyDetails) - -class TfaChangeBackupPhoneDetails(object): - """ - Changed the backup phone for two-step verification. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'TfaChangeBackupPhoneDetails()' - -TfaChangeBackupPhoneDetails_validator = bv.Struct(TfaChangeBackupPhoneDetails) - -class TfaChangePolicyDetails(object): - """ - Change two-step verification policy for the team. - - :ivar new_value: New change policy. - :ivar previous_value: Previous change policy. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New change policy. - - :rtype: team_policies.TwoStepVerificationPolicy_validator - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous change policy. Might be missing due to historical data gap. - - :rtype: team_policies.TwoStepVerificationPolicy_validator - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'TfaChangePolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -TfaChangePolicyDetails_validator = bv.Struct(TfaChangePolicyDetails) - -class TfaChangeStatusDetails(object): - """ - Enabled, disabled or changed the configuration for two-step verification. - - :ivar new_value: The new two factor authentication configuration. - :ivar previous_value: The previous two factor authentication configuration. - Might be missing due to historical data gap. - :ivar used_rescue_code: Used two factor authentication rescue code. This - flag is relevant when the two factor authentication configuration is - disabled. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - '_used_rescue_code_value', - '_used_rescue_code_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None, - used_rescue_code=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - self._used_rescue_code_value = None - self._used_rescue_code_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - if used_rescue_code is not None: - self.used_rescue_code = used_rescue_code - - @property - def new_value(self): - """ - The new two factor authentication configuration. - - :rtype: TfaConfiguration - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - The previous two factor authentication configuration. Might be missing - due to historical data gap. - - :rtype: TfaConfiguration - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - @property - def used_rescue_code(self): - """ - Used two factor authentication rescue code. This flag is relevant when - the two factor authentication configuration is disabled. - - :rtype: bool - """ - if self._used_rescue_code_present: - return self._used_rescue_code_value - else: - return None - - @used_rescue_code.setter - def used_rescue_code(self, val): - if val is None: - del self.used_rescue_code - return - val = self._used_rescue_code_validator.validate(val) - self._used_rescue_code_value = val - self._used_rescue_code_present = True - - @used_rescue_code.deleter - def used_rescue_code(self): - self._used_rescue_code_value = None - self._used_rescue_code_present = False - - def __repr__(self): - return 'TfaChangeStatusDetails(new_value={!r}, previous_value={!r}, used_rescue_code={!r})'.format( - self._new_value_value, - self._previous_value_value, - self._used_rescue_code_value, - ) - -TfaChangeStatusDetails_validator = bv.Struct(TfaChangeStatusDetails) - -class TfaConfiguration(bb.Union): - """ - Two factor authentication configuration. Note: the enabled option is - deprecated. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - disabled = None - # Attribute is overwritten below the class definition - enabled = None - # Attribute is overwritten below the class definition - sms = None - # Attribute is overwritten below the class definition - authenticator = None - # Attribute is overwritten below the class definition - other = None - - def is_disabled(self): - """ - Check if the union tag is ``disabled``. - - :rtype: bool - """ - return self._tag == 'disabled' - - def is_enabled(self): - """ - Check if the union tag is ``enabled``. - - :rtype: bool - """ - return self._tag == 'enabled' - - def is_sms(self): - """ - Check if the union tag is ``sms``. - - :rtype: bool - """ - return self._tag == 'sms' - - def is_authenticator(self): - """ - Check if the union tag is ``authenticator``. - - :rtype: bool - """ - return self._tag == 'authenticator' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'TfaConfiguration(%r, %r)' % (self._tag, self._value) - -TfaConfiguration_validator = bv.Union(TfaConfiguration) - -class TfaRemoveBackupPhoneDetails(object): - """ - Removed the backup phone for two-step verification. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'TfaRemoveBackupPhoneDetails()' - -TfaRemoveBackupPhoneDetails_validator = bv.Struct(TfaRemoveBackupPhoneDetails) - -class TfaRemoveSecurityKeyDetails(object): - """ - Removed a security key for two-step verification. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'TfaRemoveSecurityKeyDetails()' - -TfaRemoveSecurityKeyDetails_validator = bv.Struct(TfaRemoveSecurityKeyDetails) - -class TfaResetDetails(object): - """ - Reset two-step verification for team member. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def __repr__(self): - return 'TfaResetDetails()' - -TfaResetDetails_validator = bv.Struct(TfaResetDetails) - -class TimeUnit(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - milliseconds = None - # Attribute is overwritten below the class definition - seconds = None - # Attribute is overwritten below the class definition - minutes = None - # Attribute is overwritten below the class definition - hours = None - # Attribute is overwritten below the class definition - days = None - # Attribute is overwritten below the class definition - weeks = None - # Attribute is overwritten below the class definition - months = None - # Attribute is overwritten below the class definition - years = None - # Attribute is overwritten below the class definition - other = None - - def is_milliseconds(self): - """ - Check if the union tag is ``milliseconds``. - - :rtype: bool - """ - return self._tag == 'milliseconds' - - def is_seconds(self): - """ - Check if the union tag is ``seconds``. - - :rtype: bool - """ - return self._tag == 'seconds' - - def is_minutes(self): - """ - Check if the union tag is ``minutes``. - - :rtype: bool - """ - return self._tag == 'minutes' - - def is_hours(self): - """ - Check if the union tag is ``hours``. - - :rtype: bool - """ - return self._tag == 'hours' - - def is_days(self): - """ - Check if the union tag is ``days``. - - :rtype: bool - """ - return self._tag == 'days' - - def is_weeks(self): - """ - Check if the union tag is ``weeks``. - - :rtype: bool - """ - return self._tag == 'weeks' - - def is_months(self): - """ - Check if the union tag is ``months``. - - :rtype: bool - """ - return self._tag == 'months' - - def is_years(self): - """ - Check if the union tag is ``years``. - - :rtype: bool - """ - return self._tag == 'years' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'TimeUnit(%r, %r)' % (self._tag, self._value) - -TimeUnit_validator = bv.Union(TimeUnit) - -class TwoAccountChangePolicyDetails(object): - """ - Enabled or disabled the option for team members to link a personal Dropbox - account in addition to their work account to the same computer. - - :ivar new_value: New two account policy. - :ivar previous_value: Previous two account policy. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = True - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New two account policy. - - :rtype: TwoAccountPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") - - @new_value.setter - def new_value(self, val): - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous two account policy. Might be missing due to historical data - gap. - - :rtype: TwoAccountPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'TwoAccountChangePolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -TwoAccountChangePolicyDetails_validator = bv.Struct(TwoAccountChangePolicyDetails) - -class TwoAccountPolicy(bb.Union): - """ - Policy for pairing personal account to work account - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - disabled = None - # Attribute is overwritten below the class definition - enabled = None - # Attribute is overwritten below the class definition - other = None - - def is_disabled(self): - """ - Check if the union tag is ``disabled``. - - :rtype: bool - """ - return self._tag == 'disabled' - - def is_enabled(self): - """ - Check if the union tag is ``enabled``. - - :rtype: bool - """ - return self._tag == 'enabled' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'TwoAccountPolicy(%r, %r)' % (self._tag, self._value) - -TwoAccountPolicy_validator = bv.Union(TwoAccountPolicy) - -class UserLinkedAppLogInfo(AppLogInfo): - """ - User linked app - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self, - app_id=None, - display_name=None): - super(UserLinkedAppLogInfo, self).__init__(app_id, - display_name) - - def __repr__(self): - return 'UserLinkedAppLogInfo(app_id={!r}, display_name={!r})'.format( - self._app_id_value, - self._display_name_value, - ) - -UserLinkedAppLogInfo_validator = bv.Struct(UserLinkedAppLogInfo) - -class UserNameLogInfo(object): - """ - User's name logged information - - :ivar given_name: Given name. - :ivar surname: Surname. - :ivar locale: Locale. Might be missing due to historical data gap. - """ - - __slots__ = [ - '_given_name_value', - '_given_name_present', - '_surname_value', - '_surname_present', - '_locale_value', - '_locale_present', - ] - - _has_required_fields = True - - def __init__(self, - given_name=None, - surname=None, - locale=None): - self._given_name_value = None - self._given_name_present = False - self._surname_value = None - self._surname_present = False - self._locale_value = None - self._locale_present = False - if given_name is not None: - self.given_name = given_name - if surname is not None: - self.surname = surname - if locale is not None: - self.locale = locale - - @property - def given_name(self): - """ - Given name. - - :rtype: str - """ - if self._given_name_present: - return self._given_name_value - else: - raise AttributeError("missing required field 'given_name'") - - @given_name.setter - def given_name(self, val): - val = self._given_name_validator.validate(val) - self._given_name_value = val - self._given_name_present = True - - @given_name.deleter - def given_name(self): - self._given_name_value = None - self._given_name_present = False - - @property - def surname(self): - """ - Surname. - - :rtype: str - """ - if self._surname_present: - return self._surname_value - else: - raise AttributeError("missing required field 'surname'") - - @surname.setter - def surname(self, val): - val = self._surname_validator.validate(val) - self._surname_value = val - self._surname_present = True - - @surname.deleter - def surname(self): - self._surname_value = None - self._surname_present = False - - @property - def locale(self): - """ - Locale. Might be missing due to historical data gap. - - :rtype: str - """ - if self._locale_present: - return self._locale_value - else: - return None - - @locale.setter - def locale(self, val): - if val is None: - del self.locale - return - val = self._locale_validator.validate(val) - self._locale_value = val - self._locale_present = True - - @locale.deleter - def locale(self): - self._locale_value = None - self._locale_present = False - - def __repr__(self): - return 'UserNameLogInfo(given_name={!r}, surname={!r}, locale={!r})'.format( - self._given_name_value, - self._surname_value, - self._locale_value, - ) - -UserNameLogInfo_validator = bv.Struct(UserNameLogInfo) - -class UserOrTeamLinkedAppLogInfo(AppLogInfo): - """ - User or team linked app. Used when linked type is missing due to historical - data gap. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self, - app_id=None, - display_name=None): - super(UserOrTeamLinkedAppLogInfo, self).__init__(app_id, - display_name) - - def __repr__(self): - return 'UserOrTeamLinkedAppLogInfo(app_id={!r}, display_name={!r})'.format( - self._app_id_value, - self._display_name_value, - ) - -UserOrTeamLinkedAppLogInfo_validator = bv.Struct(UserOrTeamLinkedAppLogInfo) - -class WebSessionLogInfo(SessionLogInfo): - """ - Web session. - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self, - session_id=None): - super(WebSessionLogInfo, self).__init__(session_id) - - def __repr__(self): - return 'WebSessionLogInfo(session_id={!r})'.format( - self._session_id_value, - ) - -WebSessionLogInfo_validator = bv.Struct(WebSessionLogInfo) - -class WebSessionsChangeFixedLengthPolicyDetails(object): - """ - Changed how long team members can stay signed in to Dropbox on the web. - - :ivar new_value: New session length policy. Might be missing due to - historical data gap. - :ivar previous_value: Previous session length policy. Might be missing due - to historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = False - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New session length policy. Might be missing due to historical data gap. - - :rtype: WebSessionsFixedLengthPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - return None - - @new_value.setter - def new_value(self, val): - if val is None: - del self.new_value - return - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous session length policy. Might be missing due to historical data - gap. - - :rtype: WebSessionsFixedLengthPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'WebSessionsChangeFixedLengthPolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -WebSessionsChangeFixedLengthPolicyDetails_validator = bv.Struct(WebSessionsChangeFixedLengthPolicyDetails) - -class WebSessionsChangeIdleLengthPolicyDetails(object): - """ - Changed how long team members can be idle while signed in to Dropbox on the - web. - - :ivar new_value: New idle length policy. Might be missing due to historical - data gap. - :ivar previous_value: Previous idle length policy. Might be missing due to - historical data gap. - """ - - __slots__ = [ - '_new_value_value', - '_new_value_present', - '_previous_value_value', - '_previous_value_present', - ] - - _has_required_fields = False - - def __init__(self, - new_value=None, - previous_value=None): - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False - if new_value is not None: - self.new_value = new_value - if previous_value is not None: - self.previous_value = previous_value - - @property - def new_value(self): - """ - New idle length policy. Might be missing due to historical data gap. - - :rtype: WebSessionsIdleLengthPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - return None - - @new_value.setter - def new_value(self, val): - if val is None: - del self.new_value - return - self._new_value_validator.validate_type_only(val) - self._new_value_value = val - self._new_value_present = True - - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous idle length policy. Might be missing due to historical data - gap. - - :rtype: WebSessionsIdleLengthPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None - - @previous_value.setter - def previous_value(self, val): - if val is None: - del self.previous_value - return - self._previous_value_validator.validate_type_only(val) - self._previous_value_value = val - self._previous_value_present = True - - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - def __repr__(self): - return 'WebSessionsChangeIdleLengthPolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - -WebSessionsChangeIdleLengthPolicyDetails_validator = bv.Struct(WebSessionsChangeIdleLengthPolicyDetails) - -class WebSessionsFixedLengthPolicy(bb.Union): - """ - Web sessions fixed length policy. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar DurationLogInfo defined: Defined fixed session length. - :ivar undefined: Undefined fixed session length. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - undefined = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def defined(cls, val): - """ - Create an instance of this class set to the ``defined`` tag with value - ``val``. - - :param DurationLogInfo val: - :rtype: WebSessionsFixedLengthPolicy - """ - return cls('defined', val) - - def is_defined(self): - """ - Check if the union tag is ``defined``. - - :rtype: bool - """ - return self._tag == 'defined' - - def is_undefined(self): - """ - Check if the union tag is ``undefined``. - - :rtype: bool - """ - return self._tag == 'undefined' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_defined(self): - """ - Defined fixed session length. - - Only call this if :meth:`is_defined` is true. - - :rtype: DurationLogInfo - """ - if not self.is_defined(): - raise AttributeError("tag 'defined' not set") - return self._value - - def __repr__(self): - return 'WebSessionsFixedLengthPolicy(%r, %r)' % (self._tag, self._value) - -WebSessionsFixedLengthPolicy_validator = bv.Union(WebSessionsFixedLengthPolicy) - -class WebSessionsIdleLengthPolicy(bb.Union): - """ - Web sessions idle length policy. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar DurationLogInfo defined: Defined idle session length. - :ivar undefined: Undefined idle session length. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - undefined = None - # Attribute is overwritten below the class definition - other = None - - @classmethod - def defined(cls, val): - """ - Create an instance of this class set to the ``defined`` tag with value - ``val``. - - :param DurationLogInfo val: - :rtype: WebSessionsIdleLengthPolicy - """ - return cls('defined', val) - - def is_defined(self): - """ - Check if the union tag is ``defined``. - - :rtype: bool - """ - return self._tag == 'defined' - - def is_undefined(self): - """ - Check if the union tag is ``undefined``. - - :rtype: bool - """ - return self._tag == 'undefined' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_defined(self): - """ - Defined idle session length. - - Only call this if :meth:`is_defined` is true. - - :rtype: DurationLogInfo - """ - if not self.is_defined(): - raise AttributeError("tag 'defined' not set") - return self._value - - def __repr__(self): - return 'WebSessionsIdleLengthPolicy(%r, %r)' % (self._tag, self._value) - -WebSessionsIdleLengthPolicy_validator = bv.Union(WebSessionsIdleLengthPolicy) - -AppId_validator = bv.String() -IpAddress_validator = bv.String() -RequestId_validator = bv.String() -TeamEventList_validator = bv.List(TeamEvent_validator) -AccessMethodLogInfo._end_user_validator = SessionLogInfo_validator -AccessMethodLogInfo._sign_in_as_validator = WebSessionLogInfo_validator -AccessMethodLogInfo._content_manager_validator = WebSessionLogInfo_validator -AccessMethodLogInfo._admin_console_validator = WebSessionLogInfo_validator -AccessMethodLogInfo._api_validator = ApiSessionLogInfo_validator -AccessMethodLogInfo._other_validator = bv.Void() -AccessMethodLogInfo._tagmap = { - 'end_user': AccessMethodLogInfo._end_user_validator, - 'sign_in_as': AccessMethodLogInfo._sign_in_as_validator, - 'content_manager': AccessMethodLogInfo._content_manager_validator, - 'admin_console': AccessMethodLogInfo._admin_console_validator, - 'api': AccessMethodLogInfo._api_validator, - 'other': AccessMethodLogInfo._other_validator, -} - -AccessMethodLogInfo.other = AccessMethodLogInfo('other') - -AccountCaptureAvailability._unavailable_validator = bv.Void() -AccountCaptureAvailability._available_validator = bv.Void() -AccountCaptureAvailability._other_validator = bv.Void() -AccountCaptureAvailability._tagmap = { - 'unavailable': AccountCaptureAvailability._unavailable_validator, - 'available': AccountCaptureAvailability._available_validator, - 'other': AccountCaptureAvailability._other_validator, -} - -AccountCaptureAvailability.unavailable = AccountCaptureAvailability('unavailable') -AccountCaptureAvailability.available = AccountCaptureAvailability('available') -AccountCaptureAvailability.other = AccountCaptureAvailability('other') - -AccountCaptureChangeAvailabilityDetails._new_value_validator = AccountCaptureAvailability_validator -AccountCaptureChangeAvailabilityDetails._previous_value_validator = bv.Nullable(AccountCaptureAvailability_validator) -AccountCaptureChangeAvailabilityDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -AccountCaptureChangeAvailabilityDetails._all_fields_ = [ - ('new_value', AccountCaptureChangeAvailabilityDetails._new_value_validator), - ('previous_value', AccountCaptureChangeAvailabilityDetails._previous_value_validator), -] - -AccountCaptureChangePolicyDetails._new_value_validator = AccountCapturePolicy_validator -AccountCaptureChangePolicyDetails._previous_value_validator = bv.Nullable(AccountCapturePolicy_validator) -AccountCaptureChangePolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -AccountCaptureChangePolicyDetails._all_fields_ = [ - ('new_value', AccountCaptureChangePolicyDetails._new_value_validator), - ('previous_value', AccountCaptureChangePolicyDetails._previous_value_validator), -] - -AccountCaptureMigrateAccountDetails._domain_name_validator = bv.String() -AccountCaptureMigrateAccountDetails._all_field_names_ = set(['domain_name']) -AccountCaptureMigrateAccountDetails._all_fields_ = [('domain_name', AccountCaptureMigrateAccountDetails._domain_name_validator)] - -AccountCapturePolicy._disabled_validator = bv.Void() -AccountCapturePolicy._invited_users_validator = bv.Void() -AccountCapturePolicy._all_users_validator = bv.Void() -AccountCapturePolicy._other_validator = bv.Void() -AccountCapturePolicy._tagmap = { - 'disabled': AccountCapturePolicy._disabled_validator, - 'invited_users': AccountCapturePolicy._invited_users_validator, - 'all_users': AccountCapturePolicy._all_users_validator, - 'other': AccountCapturePolicy._other_validator, -} - -AccountCapturePolicy.disabled = AccountCapturePolicy('disabled') -AccountCapturePolicy.invited_users = AccountCapturePolicy('invited_users') -AccountCapturePolicy.all_users = AccountCapturePolicy('all_users') -AccountCapturePolicy.other = AccountCapturePolicy('other') - -AccountCaptureRelinquishAccountDetails._domain_name_validator = bv.String() -AccountCaptureRelinquishAccountDetails._all_field_names_ = set(['domain_name']) -AccountCaptureRelinquishAccountDetails._all_fields_ = [('domain_name', AccountCaptureRelinquishAccountDetails._domain_name_validator)] - -ActorLogInfo._user_validator = UserLogInfo_validator -ActorLogInfo._admin_validator = UserLogInfo_validator -ActorLogInfo._app_validator = AppLogInfo_validator -ActorLogInfo._reseller_validator = ResellerLogInfo_validator -ActorLogInfo._dropbox_validator = bv.Void() -ActorLogInfo._other_validator = bv.Void() -ActorLogInfo._tagmap = { - 'user': ActorLogInfo._user_validator, - 'admin': ActorLogInfo._admin_validator, - 'app': ActorLogInfo._app_validator, - 'reseller': ActorLogInfo._reseller_validator, - 'dropbox': ActorLogInfo._dropbox_validator, - 'other': ActorLogInfo._other_validator, -} - -ActorLogInfo.dropbox = ActorLogInfo('dropbox') -ActorLogInfo.other = ActorLogInfo('other') - -AdminRole._user_validator = bv.Void() -AdminRole._limited_admin_validator = bv.Void() -AdminRole._support_admin_validator = bv.Void() -AdminRole._user_management_admin_validator = bv.Void() -AdminRole._team_admin_validator = bv.Void() -AdminRole._other_validator = bv.Void() -AdminRole._tagmap = { - 'user': AdminRole._user_validator, - 'limited_admin': AdminRole._limited_admin_validator, - 'support_admin': AdminRole._support_admin_validator, - 'user_management_admin': AdminRole._user_management_admin_validator, - 'team_admin': AdminRole._team_admin_validator, - 'other': AdminRole._other_validator, -} - -AdminRole.user = AdminRole('user') -AdminRole.limited_admin = AdminRole('limited_admin') -AdminRole.support_admin = AdminRole('support_admin') -AdminRole.user_management_admin = AdminRole('user_management_admin') -AdminRole.team_admin = AdminRole('team_admin') -AdminRole.other = AdminRole('other') - -AllowDownloadDisabledDetails._all_field_names_ = set([]) -AllowDownloadDisabledDetails._all_fields_ = [] - -AllowDownloadEnabledDetails._all_field_names_ = set([]) -AllowDownloadEnabledDetails._all_fields_ = [] - -ApiSessionLogInfo._request_id_validator = RequestId_validator -ApiSessionLogInfo._all_field_names_ = set(['request_id']) -ApiSessionLogInfo._all_fields_ = [('request_id', ApiSessionLogInfo._request_id_validator)] - -AppLinkTeamDetails._app_info_validator = AppLogInfo_validator -AppLinkTeamDetails._all_field_names_ = set(['app_info']) -AppLinkTeamDetails._all_fields_ = [('app_info', AppLinkTeamDetails._app_info_validator)] - -AppLinkUserDetails._app_info_validator = AppLogInfo_validator -AppLinkUserDetails._all_field_names_ = set(['app_info']) -AppLinkUserDetails._all_fields_ = [('app_info', AppLinkUserDetails._app_info_validator)] - -AppLogInfo._app_id_validator = bv.Nullable(AppId_validator) -AppLogInfo._display_name_validator = bv.Nullable(bv.String()) -AppLogInfo._field_names_ = set([ - 'app_id', - 'display_name', -]) -AppLogInfo._all_field_names_ = AppLogInfo._field_names_ -AppLogInfo._fields_ = [ - ('app_id', AppLogInfo._app_id_validator), - ('display_name', AppLogInfo._display_name_validator), -] -AppLogInfo._all_fields_ = AppLogInfo._fields_ - -AppLogInfo._tag_to_subtype_ = { - (u'user_or_team_linked_app',): UserOrTeamLinkedAppLogInfo_validator, - (u'user_linked_app',): UserLinkedAppLogInfo_validator, - (u'team_linked_app',): TeamLinkedAppLogInfo_validator, -} -AppLogInfo._pytype_to_tag_and_subtype_ = { - UserOrTeamLinkedAppLogInfo: ((u'user_or_team_linked_app',), UserOrTeamLinkedAppLogInfo_validator), - UserLinkedAppLogInfo: ((u'user_linked_app',), UserLinkedAppLogInfo_validator), - TeamLinkedAppLogInfo: ((u'team_linked_app',), TeamLinkedAppLogInfo_validator), -} -AppLogInfo._is_catch_all_ = True - -AppUnlinkTeamDetails._app_info_validator = AppLogInfo_validator -AppUnlinkTeamDetails._all_field_names_ = set(['app_info']) -AppUnlinkTeamDetails._all_fields_ = [('app_info', AppUnlinkTeamDetails._app_info_validator)] - -AppUnlinkUserDetails._app_info_validator = AppLogInfo_validator -AppUnlinkUserDetails._all_field_names_ = set(['app_info']) -AppUnlinkUserDetails._all_fields_ = [('app_info', AppUnlinkUserDetails._app_info_validator)] - -AssetLogInfo._file_validator = FileLogInfo_validator -AssetLogInfo._folder_validator = FolderLogInfo_validator -AssetLogInfo._paper_document_validator = PaperDocumentLogInfo_validator -AssetLogInfo._paper_folder_validator = PaperFolderLogInfo_validator -AssetLogInfo._other_validator = bv.Void() -AssetLogInfo._tagmap = { - 'file': AssetLogInfo._file_validator, - 'folder': AssetLogInfo._folder_validator, - 'paper_document': AssetLogInfo._paper_document_validator, - 'paper_folder': AssetLogInfo._paper_folder_validator, - 'other': AssetLogInfo._other_validator, -} - -AssetLogInfo.other = AssetLogInfo('other') - -Certificate._subject_validator = bv.String() -Certificate._issuer_validator = bv.String() -Certificate._issue_date_validator = bv.String() -Certificate._expiration_date_validator = bv.String() -Certificate._serial_number_validator = bv.String() -Certificate._sha1_fingerprint_validator = bv.String() -Certificate._common_name_validator = bv.String() -Certificate._all_field_names_ = set([ - 'subject', - 'issuer', - 'issue_date', - 'expiration_date', - 'serial_number', - 'sha1_fingerprint', - 'common_name', -]) -Certificate._all_fields_ = [ - ('subject', Certificate._subject_validator), - ('issuer', Certificate._issuer_validator), - ('issue_date', Certificate._issue_date_validator), - ('expiration_date', Certificate._expiration_date_validator), - ('serial_number', Certificate._serial_number_validator), - ('sha1_fingerprint', Certificate._sha1_fingerprint_validator), - ('common_name', Certificate._common_name_validator), -] - -CollectionShareDetails._album_name_validator = bv.String() -CollectionShareDetails._all_field_names_ = set(['album_name']) -CollectionShareDetails._all_fields_ = [('album_name', CollectionShareDetails._album_name_validator)] - -Confidentiality._confidential_validator = bv.Void() -Confidentiality._non_confidential_validator = bv.Void() -Confidentiality._other_validator = bv.Void() -Confidentiality._tagmap = { - 'confidential': Confidentiality._confidential_validator, - 'non_confidential': Confidentiality._non_confidential_validator, - 'other': Confidentiality._other_validator, -} - -Confidentiality.confidential = Confidentiality('confidential') -Confidentiality.non_confidential = Confidentiality('non_confidential') -Confidentiality.other = Confidentiality('other') - -ContentPermanentDeletePolicy._disabled_validator = bv.Void() -ContentPermanentDeletePolicy._enabled_validator = bv.Void() -ContentPermanentDeletePolicy._other_validator = bv.Void() -ContentPermanentDeletePolicy._tagmap = { - 'disabled': ContentPermanentDeletePolicy._disabled_validator, - 'enabled': ContentPermanentDeletePolicy._enabled_validator, - 'other': ContentPermanentDeletePolicy._other_validator, -} - -ContentPermanentDeletePolicy.disabled = ContentPermanentDeletePolicy('disabled') -ContentPermanentDeletePolicy.enabled = ContentPermanentDeletePolicy('enabled') -ContentPermanentDeletePolicy.other = ContentPermanentDeletePolicy('other') - -ContextLogInfo._team_member_validator = TeamMemberLogInfo_validator -ContextLogInfo._non_team_member_validator = NonTeamMemberLogInfo_validator -ContextLogInfo._team_validator = bv.Void() -ContextLogInfo._other_validator = bv.Void() -ContextLogInfo._tagmap = { - 'team_member': ContextLogInfo._team_member_validator, - 'non_team_member': ContextLogInfo._non_team_member_validator, - 'team': ContextLogInfo._team_validator, - 'other': ContextLogInfo._other_validator, -} - -ContextLogInfo.team = ContextLogInfo('team') -ContextLogInfo.other = ContextLogInfo('other') - -CreateFolderDetails._all_field_names_ = set([]) -CreateFolderDetails._all_fields_ = [] - -DataPlacementRestrictionChangePolicyDetails._previous_value_validator = PlacementRestriction_validator -DataPlacementRestrictionChangePolicyDetails._new_value_validator = PlacementRestriction_validator -DataPlacementRestrictionChangePolicyDetails._all_field_names_ = set([ - 'previous_value', - 'new_value', -]) -DataPlacementRestrictionChangePolicyDetails._all_fields_ = [ - ('previous_value', DataPlacementRestrictionChangePolicyDetails._previous_value_validator), - ('new_value', DataPlacementRestrictionChangePolicyDetails._new_value_validator), -] - -DataPlacementRestrictionSatisfyPolicyDetails._placement_restriction_validator = PlacementRestriction_validator -DataPlacementRestrictionSatisfyPolicyDetails._all_field_names_ = set(['placement_restriction']) -DataPlacementRestrictionSatisfyPolicyDetails._all_fields_ = [('placement_restriction', DataPlacementRestrictionSatisfyPolicyDetails._placement_restriction_validator)] - -SessionLogInfo._session_id_validator = bv.Nullable(common.SessionId_validator) -SessionLogInfo._field_names_ = set(['session_id']) -SessionLogInfo._all_field_names_ = SessionLogInfo._field_names_ -SessionLogInfo._fields_ = [('session_id', SessionLogInfo._session_id_validator)] -SessionLogInfo._all_fields_ = SessionLogInfo._fields_ - -SessionLogInfo._tag_to_subtype_ = { - (u'web',): WebSessionLogInfo_validator, - (u'desktop',): DesktopSessionLogInfo_validator, - (u'mobile',): MobileSessionLogInfo_validator, -} -SessionLogInfo._pytype_to_tag_and_subtype_ = { - WebSessionLogInfo: ((u'web',), WebSessionLogInfo_validator), - DesktopSessionLogInfo: ((u'desktop',), DesktopSessionLogInfo_validator), - MobileSessionLogInfo: ((u'mobile',), MobileSessionLogInfo_validator), -} -SessionLogInfo._is_catch_all_ = True - -DesktopSessionLogInfo._field_names_ = set([]) -DesktopSessionLogInfo._all_field_names_ = SessionLogInfo._all_field_names_.union(DesktopSessionLogInfo._field_names_) -DesktopSessionLogInfo._fields_ = [] -DesktopSessionLogInfo._all_fields_ = SessionLogInfo._all_fields_ + DesktopSessionLogInfo._fields_ - -DeviceApprovalsChangeDesktopPolicyDetails._new_value_validator = bv.Nullable(DeviceApprovalsPolicy_validator) -DeviceApprovalsChangeDesktopPolicyDetails._previous_value_validator = bv.Nullable(DeviceApprovalsPolicy_validator) -DeviceApprovalsChangeDesktopPolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -DeviceApprovalsChangeDesktopPolicyDetails._all_fields_ = [ - ('new_value', DeviceApprovalsChangeDesktopPolicyDetails._new_value_validator), - ('previous_value', DeviceApprovalsChangeDesktopPolicyDetails._previous_value_validator), -] - -DeviceApprovalsChangeMobilePolicyDetails._new_value_validator = bv.Nullable(DeviceApprovalsPolicy_validator) -DeviceApprovalsChangeMobilePolicyDetails._previous_value_validator = bv.Nullable(DeviceApprovalsPolicy_validator) -DeviceApprovalsChangeMobilePolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -DeviceApprovalsChangeMobilePolicyDetails._all_fields_ = [ - ('new_value', DeviceApprovalsChangeMobilePolicyDetails._new_value_validator), - ('previous_value', DeviceApprovalsChangeMobilePolicyDetails._previous_value_validator), -] - -DeviceApprovalsChangeOverageActionDetails._new_value_validator = bv.Nullable(team_policies.RolloutMethod_validator) -DeviceApprovalsChangeOverageActionDetails._previous_value_validator = bv.Nullable(team_policies.RolloutMethod_validator) -DeviceApprovalsChangeOverageActionDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -DeviceApprovalsChangeOverageActionDetails._all_fields_ = [ - ('new_value', DeviceApprovalsChangeOverageActionDetails._new_value_validator), - ('previous_value', DeviceApprovalsChangeOverageActionDetails._previous_value_validator), -] - -DeviceApprovalsChangeUnlinkActionDetails._new_value_validator = bv.Nullable(DeviceUnlinkPolicy_validator) -DeviceApprovalsChangeUnlinkActionDetails._previous_value_validator = bv.Nullable(DeviceUnlinkPolicy_validator) -DeviceApprovalsChangeUnlinkActionDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -DeviceApprovalsChangeUnlinkActionDetails._all_fields_ = [ - ('new_value', DeviceApprovalsChangeUnlinkActionDetails._new_value_validator), - ('previous_value', DeviceApprovalsChangeUnlinkActionDetails._previous_value_validator), -] - -DeviceApprovalsPolicy._unlimited_validator = bv.Void() -DeviceApprovalsPolicy._limited_validator = bv.Void() -DeviceApprovalsPolicy._other_validator = bv.Void() -DeviceApprovalsPolicy._tagmap = { - 'unlimited': DeviceApprovalsPolicy._unlimited_validator, - 'limited': DeviceApprovalsPolicy._limited_validator, - 'other': DeviceApprovalsPolicy._other_validator, -} - -DeviceApprovalsPolicy.unlimited = DeviceApprovalsPolicy('unlimited') -DeviceApprovalsPolicy.limited = DeviceApprovalsPolicy('limited') -DeviceApprovalsPolicy.other = DeviceApprovalsPolicy('other') - -DeviceChangeIpDesktopDetails._device_info_validator = DeviceLogInfo_validator -DeviceChangeIpDesktopDetails._all_field_names_ = set(['device_info']) -DeviceChangeIpDesktopDetails._all_fields_ = [('device_info', DeviceChangeIpDesktopDetails._device_info_validator)] - -DeviceChangeIpMobileDetails._device_info_validator = DeviceLogInfo_validator -DeviceChangeIpMobileDetails._all_field_names_ = set(['device_info']) -DeviceChangeIpMobileDetails._all_fields_ = [('device_info', DeviceChangeIpMobileDetails._device_info_validator)] - -DeviceChangeIpWebDetails._device_info_validator = bv.Nullable(DeviceLogInfo_validator) -DeviceChangeIpWebDetails._user_agent_validator = bv.String() -DeviceChangeIpWebDetails._all_field_names_ = set([ - 'device_info', - 'user_agent', -]) -DeviceChangeIpWebDetails._all_fields_ = [ - ('device_info', DeviceChangeIpWebDetails._device_info_validator), - ('user_agent', DeviceChangeIpWebDetails._user_agent_validator), -] - -DeviceDeleteOnUnlinkFailDetails._device_info_validator = DeviceLogInfo_validator -DeviceDeleteOnUnlinkFailDetails._num_failures_validator = bv.Int64() -DeviceDeleteOnUnlinkFailDetails._all_field_names_ = set([ - 'device_info', - 'num_failures', -]) -DeviceDeleteOnUnlinkFailDetails._all_fields_ = [ - ('device_info', DeviceDeleteOnUnlinkFailDetails._device_info_validator), - ('num_failures', DeviceDeleteOnUnlinkFailDetails._num_failures_validator), -] - -DeviceDeleteOnUnlinkSuccessDetails._device_info_validator = DeviceLogInfo_validator -DeviceDeleteOnUnlinkSuccessDetails._all_field_names_ = set(['device_info']) -DeviceDeleteOnUnlinkSuccessDetails._all_fields_ = [('device_info', DeviceDeleteOnUnlinkSuccessDetails._device_info_validator)] - -DeviceLinkFailDetails._device_info_validator = bv.Nullable(DeviceLogInfo_validator) -DeviceLinkFailDetails._device_type_validator = DeviceType_validator -DeviceLinkFailDetails._all_field_names_ = set([ - 'device_info', - 'device_type', -]) -DeviceLinkFailDetails._all_fields_ = [ - ('device_info', DeviceLinkFailDetails._device_info_validator), - ('device_type', DeviceLinkFailDetails._device_type_validator), -] - -DeviceLinkSuccessDetails._device_info_validator = DeviceLogInfo_validator -DeviceLinkSuccessDetails._all_field_names_ = set(['device_info']) -DeviceLinkSuccessDetails._all_fields_ = [('device_info', DeviceLinkSuccessDetails._device_info_validator)] - -DeviceLogInfo._device_id_validator = bv.Nullable(bv.String()) -DeviceLogInfo._display_name_validator = bv.Nullable(bv.String()) -DeviceLogInfo._is_emm_managed_validator = bv.Nullable(bv.Boolean()) -DeviceLogInfo._platform_validator = bv.Nullable(bv.String()) -DeviceLogInfo._mac_address_validator = bv.Nullable(bv.String()) -DeviceLogInfo._os_version_validator = bv.Nullable(bv.String()) -DeviceLogInfo._device_type_validator = bv.Nullable(bv.String()) -DeviceLogInfo._ip_address_validator = bv.Nullable(IpAddress_validator) -DeviceLogInfo._last_activity_validator = bv.Nullable(bv.String()) -DeviceLogInfo._app_version_validator = bv.Nullable(bv.String()) -DeviceLogInfo._all_field_names_ = set([ - 'device_id', - 'display_name', - 'is_emm_managed', - 'platform', - 'mac_address', - 'os_version', - 'device_type', - 'ip_address', - 'last_activity', - 'app_version', -]) -DeviceLogInfo._all_fields_ = [ - ('device_id', DeviceLogInfo._device_id_validator), - ('display_name', DeviceLogInfo._display_name_validator), - ('is_emm_managed', DeviceLogInfo._is_emm_managed_validator), - ('platform', DeviceLogInfo._platform_validator), - ('mac_address', DeviceLogInfo._mac_address_validator), - ('os_version', DeviceLogInfo._os_version_validator), - ('device_type', DeviceLogInfo._device_type_validator), - ('ip_address', DeviceLogInfo._ip_address_validator), - ('last_activity', DeviceLogInfo._last_activity_validator), - ('app_version', DeviceLogInfo._app_version_validator), -] - -DeviceManagementDisabledDetails._all_field_names_ = set([]) -DeviceManagementDisabledDetails._all_fields_ = [] - -DeviceManagementEnabledDetails._all_field_names_ = set([]) -DeviceManagementEnabledDetails._all_fields_ = [] - -DeviceType._desktop_validator = bv.Void() -DeviceType._mobile_validator = bv.Void() -DeviceType._other_validator = bv.Void() -DeviceType._tagmap = { - 'desktop': DeviceType._desktop_validator, - 'mobile': DeviceType._mobile_validator, - 'other': DeviceType._other_validator, -} - -DeviceType.desktop = DeviceType('desktop') -DeviceType.mobile = DeviceType('mobile') -DeviceType.other = DeviceType('other') - -DeviceUnlinkDetails._device_info_validator = DeviceLogInfo_validator -DeviceUnlinkDetails._delete_data_validator = bv.Boolean() -DeviceUnlinkDetails._all_field_names_ = set([ - 'device_info', - 'delete_data', -]) -DeviceUnlinkDetails._all_fields_ = [ - ('device_info', DeviceUnlinkDetails._device_info_validator), - ('delete_data', DeviceUnlinkDetails._delete_data_validator), -] - -DeviceUnlinkPolicy._remove_validator = bv.Void() -DeviceUnlinkPolicy._keep_validator = bv.Void() -DeviceUnlinkPolicy._other_validator = bv.Void() -DeviceUnlinkPolicy._tagmap = { - 'remove': DeviceUnlinkPolicy._remove_validator, - 'keep': DeviceUnlinkPolicy._keep_validator, - 'other': DeviceUnlinkPolicy._other_validator, -} - -DeviceUnlinkPolicy.remove = DeviceUnlinkPolicy('remove') -DeviceUnlinkPolicy.keep = DeviceUnlinkPolicy('keep') -DeviceUnlinkPolicy.other = DeviceUnlinkPolicy('other') - -DisabledDomainInvitesDetails._all_field_names_ = set([]) -DisabledDomainInvitesDetails._all_fields_ = [] - -DomainInvitesApproveRequestToJoinTeamDetails._all_field_names_ = set([]) -DomainInvitesApproveRequestToJoinTeamDetails._all_fields_ = [] - -DomainInvitesDeclineRequestToJoinTeamDetails._all_field_names_ = set([]) -DomainInvitesDeclineRequestToJoinTeamDetails._all_fields_ = [] - -DomainInvitesEmailExistingUsersDetails._domain_name_validator = bv.List(bv.String()) -DomainInvitesEmailExistingUsersDetails._num_recipients_validator = bv.UInt64() -DomainInvitesEmailExistingUsersDetails._all_field_names_ = set([ - 'domain_name', - 'num_recipients', -]) -DomainInvitesEmailExistingUsersDetails._all_fields_ = [ - ('domain_name', DomainInvitesEmailExistingUsersDetails._domain_name_validator), - ('num_recipients', DomainInvitesEmailExistingUsersDetails._num_recipients_validator), -] - -DomainInvitesRequestToJoinTeamDetails._all_field_names_ = set([]) -DomainInvitesRequestToJoinTeamDetails._all_fields_ = [] - -DomainInvitesSetInviteNewUserPrefToNoDetails._all_field_names_ = set([]) -DomainInvitesSetInviteNewUserPrefToNoDetails._all_fields_ = [] - -DomainInvitesSetInviteNewUserPrefToYesDetails._all_field_names_ = set([]) -DomainInvitesSetInviteNewUserPrefToYesDetails._all_fields_ = [] - -DomainVerificationAddDomainFailDetails._domain_name_validator = bv.String() -DomainVerificationAddDomainFailDetails._verification_method_validator = bv.Nullable(bv.String()) -DomainVerificationAddDomainFailDetails._all_field_names_ = set([ - 'domain_name', - 'verification_method', -]) -DomainVerificationAddDomainFailDetails._all_fields_ = [ - ('domain_name', DomainVerificationAddDomainFailDetails._domain_name_validator), - ('verification_method', DomainVerificationAddDomainFailDetails._verification_method_validator), -] - -DomainVerificationAddDomainSuccessDetails._domain_names_validator = bv.List(bv.String()) -DomainVerificationAddDomainSuccessDetails._verification_method_validator = bv.Nullable(bv.String()) -DomainVerificationAddDomainSuccessDetails._all_field_names_ = set([ - 'domain_names', - 'verification_method', -]) -DomainVerificationAddDomainSuccessDetails._all_fields_ = [ - ('domain_names', DomainVerificationAddDomainSuccessDetails._domain_names_validator), - ('verification_method', DomainVerificationAddDomainSuccessDetails._verification_method_validator), -] - -DomainVerificationRemoveDomainDetails._domain_names_validator = bv.List(bv.String()) -DomainVerificationRemoveDomainDetails._all_field_names_ = set(['domain_names']) -DomainVerificationRemoveDomainDetails._all_fields_ = [('domain_names', DomainVerificationRemoveDomainDetails._domain_names_validator)] - -DurationLogInfo._unit_validator = TimeUnit_validator -DurationLogInfo._amount_validator = bv.UInt64() -DurationLogInfo._all_field_names_ = set([ - 'unit', - 'amount', -]) -DurationLogInfo._all_fields_ = [ - ('unit', DurationLogInfo._unit_validator), - ('amount', DurationLogInfo._amount_validator), -] - -EmmAddExceptionDetails._all_field_names_ = set([]) -EmmAddExceptionDetails._all_fields_ = [] - -EmmChangePolicyDetails._new_value_validator = team_policies.EmmState_validator -EmmChangePolicyDetails._previous_value_validator = bv.Nullable(team_policies.EmmState_validator) -EmmChangePolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -EmmChangePolicyDetails._all_fields_ = [ - ('new_value', EmmChangePolicyDetails._new_value_validator), - ('previous_value', EmmChangePolicyDetails._previous_value_validator), -] - -EmmCreateExceptionsReportDetails._all_field_names_ = set([]) -EmmCreateExceptionsReportDetails._all_fields_ = [] - -EmmCreateUsageReportDetails._all_field_names_ = set([]) -EmmCreateUsageReportDetails._all_fields_ = [] - -EmmLoginSuccessDetails._all_field_names_ = set([]) -EmmLoginSuccessDetails._all_fields_ = [] - -EmmRefreshAuthTokenDetails._all_field_names_ = set([]) -EmmRefreshAuthTokenDetails._all_fields_ = [] - -EmmRemoveExceptionDetails._all_field_names_ = set([]) -EmmRemoveExceptionDetails._all_fields_ = [] - -EnabledDomainInvitesDetails._all_field_names_ = set([]) -EnabledDomainInvitesDetails._all_fields_ = [] - -EventCategory._account_capture_validator = bv.Void() -EventCategory._administration_validator = bv.Void() -EventCategory._apps_validator = bv.Void() -EventCategory._authentication_validator = bv.Void() -EventCategory._comments_validator = bv.Void() -EventCategory._content_access_validator = bv.Void() -EventCategory._devices_validator = bv.Void() -EventCategory._device_approvals_validator = bv.Void() -EventCategory._domains_validator = bv.Void() -EventCategory._emm_validator = bv.Void() -EventCategory._errors_validator = bv.Void() -EventCategory._files_validator = bv.Void() -EventCategory._file_operations_validator = bv.Void() -EventCategory._file_requests_validator = bv.Void() -EventCategory._groups_validator = bv.Void() -EventCategory._logins_validator = bv.Void() -EventCategory._members_validator = bv.Void() -EventCategory._paper_validator = bv.Void() -EventCategory._passwords_validator = bv.Void() -EventCategory._reports_validator = bv.Void() -EventCategory._sessions_validator = bv.Void() -EventCategory._shared_files_validator = bv.Void() -EventCategory._shared_folders_validator = bv.Void() -EventCategory._shared_links_validator = bv.Void() -EventCategory._sharing_validator = bv.Void() -EventCategory._sharing_policies_validator = bv.Void() -EventCategory._sso_validator = bv.Void() -EventCategory._team_folders_validator = bv.Void() -EventCategory._team_policies_validator = bv.Void() -EventCategory._team_profile_validator = bv.Void() -EventCategory._tfa_validator = bv.Void() -EventCategory._other_validator = bv.Void() -EventCategory._tagmap = { - 'account_capture': EventCategory._account_capture_validator, - 'administration': EventCategory._administration_validator, - 'apps': EventCategory._apps_validator, - 'authentication': EventCategory._authentication_validator, - 'comments': EventCategory._comments_validator, - 'content_access': EventCategory._content_access_validator, - 'devices': EventCategory._devices_validator, - 'device_approvals': EventCategory._device_approvals_validator, - 'domains': EventCategory._domains_validator, - 'emm': EventCategory._emm_validator, - 'errors': EventCategory._errors_validator, - 'files': EventCategory._files_validator, - 'file_operations': EventCategory._file_operations_validator, - 'file_requests': EventCategory._file_requests_validator, - 'groups': EventCategory._groups_validator, - 'logins': EventCategory._logins_validator, - 'members': EventCategory._members_validator, - 'paper': EventCategory._paper_validator, - 'passwords': EventCategory._passwords_validator, - 'reports': EventCategory._reports_validator, - 'sessions': EventCategory._sessions_validator, - 'shared_files': EventCategory._shared_files_validator, - 'shared_folders': EventCategory._shared_folders_validator, - 'shared_links': EventCategory._shared_links_validator, - 'sharing': EventCategory._sharing_validator, - 'sharing_policies': EventCategory._sharing_policies_validator, - 'sso': EventCategory._sso_validator, - 'team_folders': EventCategory._team_folders_validator, - 'team_policies': EventCategory._team_policies_validator, - 'team_profile': EventCategory._team_profile_validator, - 'tfa': EventCategory._tfa_validator, - 'other': EventCategory._other_validator, -} - -EventCategory.account_capture = EventCategory('account_capture') -EventCategory.administration = EventCategory('administration') -EventCategory.apps = EventCategory('apps') -EventCategory.authentication = EventCategory('authentication') -EventCategory.comments = EventCategory('comments') -EventCategory.content_access = EventCategory('content_access') -EventCategory.devices = EventCategory('devices') -EventCategory.device_approvals = EventCategory('device_approvals') -EventCategory.domains = EventCategory('domains') -EventCategory.emm = EventCategory('emm') -EventCategory.errors = EventCategory('errors') -EventCategory.files = EventCategory('files') -EventCategory.file_operations = EventCategory('file_operations') -EventCategory.file_requests = EventCategory('file_requests') -EventCategory.groups = EventCategory('groups') -EventCategory.logins = EventCategory('logins') -EventCategory.members = EventCategory('members') -EventCategory.paper = EventCategory('paper') -EventCategory.passwords = EventCategory('passwords') -EventCategory.reports = EventCategory('reports') -EventCategory.sessions = EventCategory('sessions') -EventCategory.shared_files = EventCategory('shared_files') -EventCategory.shared_folders = EventCategory('shared_folders') -EventCategory.shared_links = EventCategory('shared_links') -EventCategory.sharing = EventCategory('sharing') -EventCategory.sharing_policies = EventCategory('sharing_policies') -EventCategory.sso = EventCategory('sso') -EventCategory.team_folders = EventCategory('team_folders') -EventCategory.team_policies = EventCategory('team_policies') -EventCategory.team_profile = EventCategory('team_profile') -EventCategory.tfa = EventCategory('tfa') -EventCategory.other = EventCategory('other') - -EventDetails._member_change_membership_type_details_validator = MemberChangeMembershipTypeDetails_validator -EventDetails._member_permanently_delete_account_contents_details_validator = MemberPermanentlyDeleteAccountContentsDetails_validator -EventDetails._member_space_limits_change_status_details_validator = MemberSpaceLimitsChangeStatusDetails_validator -EventDetails._member_transfer_account_contents_details_validator = MemberTransferAccountContentsDetails_validator -EventDetails._paper_admin_export_start_details_validator = PaperAdminExportStartDetails_validator -EventDetails._paper_enabled_users_group_addition_details_validator = PaperEnabledUsersGroupAdditionDetails_validator -EventDetails._paper_enabled_users_group_removal_details_validator = PaperEnabledUsersGroupRemovalDetails_validator -EventDetails._paper_external_view_allow_details_validator = PaperExternalViewAllowDetails_validator -EventDetails._paper_external_view_default_team_details_validator = PaperExternalViewDefaultTeamDetails_validator -EventDetails._paper_external_view_forbid_details_validator = PaperExternalViewForbidDetails_validator -EventDetails._sf_external_invite_warn_details_validator = SfExternalInviteWarnDetails_validator -EventDetails._team_merge_from_details_validator = TeamMergeFromDetails_validator -EventDetails._team_merge_to_details_validator = TeamMergeToDetails_validator -EventDetails._app_link_team_details_validator = AppLinkTeamDetails_validator -EventDetails._app_link_user_details_validator = AppLinkUserDetails_validator -EventDetails._app_unlink_team_details_validator = AppUnlinkTeamDetails_validator -EventDetails._app_unlink_user_details_validator = AppUnlinkUserDetails_validator -EventDetails._file_add_comment_details_validator = FileAddCommentDetails_validator -EventDetails._file_change_comment_subscription_details_validator = FileChangeCommentSubscriptionDetails_validator -EventDetails._file_delete_comment_details_validator = FileDeleteCommentDetails_validator -EventDetails._file_like_comment_details_validator = FileLikeCommentDetails_validator -EventDetails._file_resolve_comment_details_validator = FileResolveCommentDetails_validator -EventDetails._file_unlike_comment_details_validator = FileUnlikeCommentDetails_validator -EventDetails._file_unresolve_comment_details_validator = FileUnresolveCommentDetails_validator -EventDetails._device_change_ip_desktop_details_validator = DeviceChangeIpDesktopDetails_validator -EventDetails._device_change_ip_mobile_details_validator = DeviceChangeIpMobileDetails_validator -EventDetails._device_change_ip_web_details_validator = DeviceChangeIpWebDetails_validator -EventDetails._device_delete_on_unlink_fail_details_validator = DeviceDeleteOnUnlinkFailDetails_validator -EventDetails._device_delete_on_unlink_success_details_validator = DeviceDeleteOnUnlinkSuccessDetails_validator -EventDetails._device_link_fail_details_validator = DeviceLinkFailDetails_validator -EventDetails._device_link_success_details_validator = DeviceLinkSuccessDetails_validator -EventDetails._device_management_disabled_details_validator = DeviceManagementDisabledDetails_validator -EventDetails._device_management_enabled_details_validator = DeviceManagementEnabledDetails_validator -EventDetails._device_unlink_details_validator = DeviceUnlinkDetails_validator -EventDetails._emm_refresh_auth_token_details_validator = EmmRefreshAuthTokenDetails_validator -EventDetails._account_capture_change_availability_details_validator = AccountCaptureChangeAvailabilityDetails_validator -EventDetails._account_capture_migrate_account_details_validator = AccountCaptureMigrateAccountDetails_validator -EventDetails._account_capture_relinquish_account_details_validator = AccountCaptureRelinquishAccountDetails_validator -EventDetails._disabled_domain_invites_details_validator = DisabledDomainInvitesDetails_validator -EventDetails._domain_invites_approve_request_to_join_team_details_validator = DomainInvitesApproveRequestToJoinTeamDetails_validator -EventDetails._domain_invites_decline_request_to_join_team_details_validator = DomainInvitesDeclineRequestToJoinTeamDetails_validator -EventDetails._domain_invites_email_existing_users_details_validator = DomainInvitesEmailExistingUsersDetails_validator -EventDetails._domain_invites_request_to_join_team_details_validator = DomainInvitesRequestToJoinTeamDetails_validator -EventDetails._domain_invites_set_invite_new_user_pref_to_no_details_validator = DomainInvitesSetInviteNewUserPrefToNoDetails_validator -EventDetails._domain_invites_set_invite_new_user_pref_to_yes_details_validator = DomainInvitesSetInviteNewUserPrefToYesDetails_validator -EventDetails._domain_verification_add_domain_fail_details_validator = DomainVerificationAddDomainFailDetails_validator -EventDetails._domain_verification_add_domain_success_details_validator = DomainVerificationAddDomainSuccessDetails_validator -EventDetails._domain_verification_remove_domain_details_validator = DomainVerificationRemoveDomainDetails_validator -EventDetails._enabled_domain_invites_details_validator = EnabledDomainInvitesDetails_validator -EventDetails._create_folder_details_validator = CreateFolderDetails_validator -EventDetails._file_add_details_validator = FileAddDetails_validator -EventDetails._file_copy_details_validator = FileCopyDetails_validator -EventDetails._file_delete_details_validator = FileDeleteDetails_validator -EventDetails._file_download_details_validator = FileDownloadDetails_validator -EventDetails._file_edit_details_validator = FileEditDetails_validator -EventDetails._file_get_copy_reference_details_validator = FileGetCopyReferenceDetails_validator -EventDetails._file_move_details_validator = FileMoveDetails_validator -EventDetails._file_permanently_delete_details_validator = FilePermanentlyDeleteDetails_validator -EventDetails._file_preview_details_validator = FilePreviewDetails_validator -EventDetails._file_rename_details_validator = FileRenameDetails_validator -EventDetails._file_restore_details_validator = FileRestoreDetails_validator -EventDetails._file_revert_details_validator = FileRevertDetails_validator -EventDetails._file_rollback_changes_details_validator = FileRollbackChangesDetails_validator -EventDetails._file_save_copy_reference_details_validator = FileSaveCopyReferenceDetails_validator -EventDetails._file_request_add_deadline_details_validator = FileRequestAddDeadlineDetails_validator -EventDetails._file_request_change_folder_details_validator = FileRequestChangeFolderDetails_validator -EventDetails._file_request_change_title_details_validator = FileRequestChangeTitleDetails_validator -EventDetails._file_request_close_details_validator = FileRequestCloseDetails_validator -EventDetails._file_request_create_details_validator = FileRequestCreateDetails_validator -EventDetails._file_request_receive_file_details_validator = FileRequestReceiveFileDetails_validator -EventDetails._file_request_remove_deadline_details_validator = FileRequestRemoveDeadlineDetails_validator -EventDetails._file_request_send_details_validator = FileRequestSendDetails_validator -EventDetails._group_add_external_id_details_validator = GroupAddExternalIdDetails_validator -EventDetails._group_add_member_details_validator = GroupAddMemberDetails_validator -EventDetails._group_change_external_id_details_validator = GroupChangeExternalIdDetails_validator -EventDetails._group_change_management_type_details_validator = GroupChangeManagementTypeDetails_validator -EventDetails._group_change_member_role_details_validator = GroupChangeMemberRoleDetails_validator -EventDetails._group_create_details_validator = GroupCreateDetails_validator -EventDetails._group_delete_details_validator = GroupDeleteDetails_validator -EventDetails._group_moved_details_validator = GroupMovedDetails_validator -EventDetails._group_remove_external_id_details_validator = GroupRemoveExternalIdDetails_validator -EventDetails._group_remove_member_details_validator = GroupRemoveMemberDetails_validator -EventDetails._group_rename_details_validator = GroupRenameDetails_validator -EventDetails._emm_login_success_details_validator = EmmLoginSuccessDetails_validator -EventDetails._logout_details_validator = LogoutDetails_validator -EventDetails._password_login_fail_details_validator = PasswordLoginFailDetails_validator -EventDetails._password_login_success_details_validator = PasswordLoginSuccessDetails_validator -EventDetails._reseller_support_session_end_details_validator = ResellerSupportSessionEndDetails_validator -EventDetails._reseller_support_session_start_details_validator = ResellerSupportSessionStartDetails_validator -EventDetails._sign_in_as_session_end_details_validator = SignInAsSessionEndDetails_validator -EventDetails._sign_in_as_session_start_details_validator = SignInAsSessionStartDetails_validator -EventDetails._sso_login_fail_details_validator = SsoLoginFailDetails_validator -EventDetails._member_add_name_details_validator = MemberAddNameDetails_validator -EventDetails._member_change_admin_role_details_validator = MemberChangeAdminRoleDetails_validator -EventDetails._member_change_email_details_validator = MemberChangeEmailDetails_validator -EventDetails._member_change_name_details_validator = MemberChangeNameDetails_validator -EventDetails._member_change_status_details_validator = MemberChangeStatusDetails_validator -EventDetails._member_suggest_details_validator = MemberSuggestDetails_validator -EventDetails._paper_content_add_member_details_validator = PaperContentAddMemberDetails_validator -EventDetails._paper_content_add_to_folder_details_validator = PaperContentAddToFolderDetails_validator -EventDetails._paper_content_archive_details_validator = PaperContentArchiveDetails_validator -EventDetails._paper_content_create_details_validator = PaperContentCreateDetails_validator -EventDetails._paper_content_permanently_delete_details_validator = PaperContentPermanentlyDeleteDetails_validator -EventDetails._paper_content_remove_from_folder_details_validator = PaperContentRemoveFromFolderDetails_validator -EventDetails._paper_content_remove_member_details_validator = PaperContentRemoveMemberDetails_validator -EventDetails._paper_content_rename_details_validator = PaperContentRenameDetails_validator -EventDetails._paper_content_restore_details_validator = PaperContentRestoreDetails_validator -EventDetails._paper_doc_add_comment_details_validator = PaperDocAddCommentDetails_validator -EventDetails._paper_doc_change_member_role_details_validator = PaperDocChangeMemberRoleDetails_validator -EventDetails._paper_doc_change_sharing_policy_details_validator = PaperDocChangeSharingPolicyDetails_validator -EventDetails._paper_doc_change_subscription_details_validator = PaperDocChangeSubscriptionDetails_validator -EventDetails._paper_doc_deleted_details_validator = PaperDocDeletedDetails_validator -EventDetails._paper_doc_delete_comment_details_validator = PaperDocDeleteCommentDetails_validator -EventDetails._paper_doc_download_details_validator = PaperDocDownloadDetails_validator -EventDetails._paper_doc_edit_details_validator = PaperDocEditDetails_validator -EventDetails._paper_doc_edit_comment_details_validator = PaperDocEditCommentDetails_validator -EventDetails._paper_doc_followed_details_validator = PaperDocFollowedDetails_validator -EventDetails._paper_doc_mention_details_validator = PaperDocMentionDetails_validator -EventDetails._paper_doc_request_access_details_validator = PaperDocRequestAccessDetails_validator -EventDetails._paper_doc_resolve_comment_details_validator = PaperDocResolveCommentDetails_validator -EventDetails._paper_doc_revert_details_validator = PaperDocRevertDetails_validator -EventDetails._paper_doc_slack_share_details_validator = PaperDocSlackShareDetails_validator -EventDetails._paper_doc_team_invite_details_validator = PaperDocTeamInviteDetails_validator -EventDetails._paper_doc_trashed_details_validator = PaperDocTrashedDetails_validator -EventDetails._paper_doc_unresolve_comment_details_validator = PaperDocUnresolveCommentDetails_validator -EventDetails._paper_doc_untrashed_details_validator = PaperDocUntrashedDetails_validator -EventDetails._paper_doc_view_details_validator = PaperDocViewDetails_validator -EventDetails._paper_folder_change_subscription_details_validator = PaperFolderChangeSubscriptionDetails_validator -EventDetails._paper_folder_deleted_details_validator = PaperFolderDeletedDetails_validator -EventDetails._paper_folder_followed_details_validator = PaperFolderFollowedDetails_validator -EventDetails._paper_folder_team_invite_details_validator = PaperFolderTeamInviteDetails_validator -EventDetails._password_change_details_validator = PasswordChangeDetails_validator -EventDetails._password_reset_details_validator = PasswordResetDetails_validator -EventDetails._password_reset_all_details_validator = PasswordResetAllDetails_validator -EventDetails._emm_create_exceptions_report_details_validator = EmmCreateExceptionsReportDetails_validator -EventDetails._emm_create_usage_report_details_validator = EmmCreateUsageReportDetails_validator -EventDetails._smart_sync_create_admin_privilege_report_details_validator = SmartSyncCreateAdminPrivilegeReportDetails_validator -EventDetails._team_activity_create_report_details_validator = TeamActivityCreateReportDetails_validator -EventDetails._collection_share_details_validator = CollectionShareDetails_validator -EventDetails._note_acl_invite_only_details_validator = NoteAclInviteOnlyDetails_validator -EventDetails._note_acl_link_details_validator = NoteAclLinkDetails_validator -EventDetails._note_acl_team_link_details_validator = NoteAclTeamLinkDetails_validator -EventDetails._note_shared_details_validator = NoteSharedDetails_validator -EventDetails._note_share_receive_details_validator = NoteShareReceiveDetails_validator -EventDetails._open_note_shared_details_validator = OpenNoteSharedDetails_validator -EventDetails._sf_add_group_details_validator = SfAddGroupDetails_validator -EventDetails._sf_allow_non_members_to_view_shared_links_details_validator = SfAllowNonMembersToViewSharedLinksDetails_validator -EventDetails._sf_invite_group_details_validator = SfInviteGroupDetails_validator -EventDetails._sf_nest_details_validator = SfNestDetails_validator -EventDetails._sf_team_decline_details_validator = SfTeamDeclineDetails_validator -EventDetails._sf_team_grant_access_details_validator = SfTeamGrantAccessDetails_validator -EventDetails._sf_team_invite_details_validator = SfTeamInviteDetails_validator -EventDetails._sf_team_invite_change_role_details_validator = SfTeamInviteChangeRoleDetails_validator -EventDetails._sf_team_join_details_validator = SfTeamJoinDetails_validator -EventDetails._sf_team_join_from_oob_link_details_validator = SfTeamJoinFromOobLinkDetails_validator -EventDetails._sf_team_uninvite_details_validator = SfTeamUninviteDetails_validator -EventDetails._shared_content_add_invitees_details_validator = SharedContentAddInviteesDetails_validator -EventDetails._shared_content_add_link_expiry_details_validator = SharedContentAddLinkExpiryDetails_validator -EventDetails._shared_content_add_link_password_details_validator = SharedContentAddLinkPasswordDetails_validator -EventDetails._shared_content_add_member_details_validator = SharedContentAddMemberDetails_validator -EventDetails._shared_content_change_downloads_policy_details_validator = SharedContentChangeDownloadsPolicyDetails_validator -EventDetails._shared_content_change_invitee_role_details_validator = SharedContentChangeInviteeRoleDetails_validator -EventDetails._shared_content_change_link_audience_details_validator = SharedContentChangeLinkAudienceDetails_validator -EventDetails._shared_content_change_link_expiry_details_validator = SharedContentChangeLinkExpiryDetails_validator -EventDetails._shared_content_change_link_password_details_validator = SharedContentChangeLinkPasswordDetails_validator -EventDetails._shared_content_change_member_role_details_validator = SharedContentChangeMemberRoleDetails_validator -EventDetails._shared_content_change_viewer_info_policy_details_validator = SharedContentChangeViewerInfoPolicyDetails_validator -EventDetails._shared_content_claim_invitation_details_validator = SharedContentClaimInvitationDetails_validator -EventDetails._shared_content_copy_details_validator = SharedContentCopyDetails_validator -EventDetails._shared_content_download_details_validator = SharedContentDownloadDetails_validator -EventDetails._shared_content_relinquish_membership_details_validator = SharedContentRelinquishMembershipDetails_validator -EventDetails._shared_content_remove_invitee_details_validator = SharedContentRemoveInviteeDetails_validator -EventDetails._shared_content_remove_link_expiry_details_validator = SharedContentRemoveLinkExpiryDetails_validator -EventDetails._shared_content_remove_link_password_details_validator = SharedContentRemoveLinkPasswordDetails_validator -EventDetails._shared_content_remove_member_details_validator = SharedContentRemoveMemberDetails_validator -EventDetails._shared_content_request_access_details_validator = SharedContentRequestAccessDetails_validator -EventDetails._shared_content_unshare_details_validator = SharedContentUnshareDetails_validator -EventDetails._shared_content_view_details_validator = SharedContentViewDetails_validator -EventDetails._shared_folder_change_confidentiality_details_validator = SharedFolderChangeConfidentialityDetails_validator -EventDetails._shared_folder_change_link_policy_details_validator = SharedFolderChangeLinkPolicyDetails_validator -EventDetails._shared_folder_change_member_management_policy_details_validator = SharedFolderChangeMemberManagementPolicyDetails_validator -EventDetails._shared_folder_change_member_policy_details_validator = SharedFolderChangeMemberPolicyDetails_validator -EventDetails._shared_folder_create_details_validator = SharedFolderCreateDetails_validator -EventDetails._shared_folder_mount_details_validator = SharedFolderMountDetails_validator -EventDetails._shared_folder_transfer_ownership_details_validator = SharedFolderTransferOwnershipDetails_validator -EventDetails._shared_folder_unmount_details_validator = SharedFolderUnmountDetails_validator -EventDetails._shared_note_opened_details_validator = SharedNoteOpenedDetails_validator -EventDetails._shmodel_app_create_details_validator = ShmodelAppCreateDetails_validator -EventDetails._shmodel_create_details_validator = ShmodelCreateDetails_validator -EventDetails._shmodel_disable_details_validator = ShmodelDisableDetails_validator -EventDetails._shmodel_fb_share_details_validator = ShmodelFbShareDetails_validator -EventDetails._shmodel_group_share_details_validator = ShmodelGroupShareDetails_validator -EventDetails._shmodel_remove_expiration_details_validator = ShmodelRemoveExpirationDetails_validator -EventDetails._shmodel_set_expiration_details_validator = ShmodelSetExpirationDetails_validator -EventDetails._shmodel_team_copy_details_validator = ShmodelTeamCopyDetails_validator -EventDetails._shmodel_team_download_details_validator = ShmodelTeamDownloadDetails_validator -EventDetails._shmodel_team_share_details_validator = ShmodelTeamShareDetails_validator -EventDetails._shmodel_team_view_details_validator = ShmodelTeamViewDetails_validator -EventDetails._shmodel_visibility_password_details_validator = ShmodelVisibilityPasswordDetails_validator -EventDetails._shmodel_visibility_public_details_validator = ShmodelVisibilityPublicDetails_validator -EventDetails._shmodel_visibility_team_only_details_validator = ShmodelVisibilityTeamOnlyDetails_validator -EventDetails._sso_add_cert_details_validator = SsoAddCertDetails_validator -EventDetails._sso_add_login_url_details_validator = SsoAddLoginUrlDetails_validator -EventDetails._sso_add_logout_url_details_validator = SsoAddLogoutUrlDetails_validator -EventDetails._sso_change_cert_details_validator = SsoChangeCertDetails_validator -EventDetails._sso_change_login_url_details_validator = SsoChangeLoginUrlDetails_validator -EventDetails._sso_change_logout_url_details_validator = SsoChangeLogoutUrlDetails_validator -EventDetails._sso_change_saml_identity_mode_details_validator = SsoChangeSamlIdentityModeDetails_validator -EventDetails._sso_remove_cert_details_validator = SsoRemoveCertDetails_validator -EventDetails._sso_remove_login_url_details_validator = SsoRemoveLoginUrlDetails_validator -EventDetails._sso_remove_logout_url_details_validator = SsoRemoveLogoutUrlDetails_validator -EventDetails._team_folder_change_status_details_validator = TeamFolderChangeStatusDetails_validator -EventDetails._team_folder_create_details_validator = TeamFolderCreateDetails_validator -EventDetails._team_folder_downgrade_details_validator = TeamFolderDowngradeDetails_validator -EventDetails._team_folder_permanently_delete_details_validator = TeamFolderPermanentlyDeleteDetails_validator -EventDetails._team_folder_rename_details_validator = TeamFolderRenameDetails_validator -EventDetails._account_capture_change_policy_details_validator = AccountCaptureChangePolicyDetails_validator -EventDetails._allow_download_disabled_details_validator = AllowDownloadDisabledDetails_validator -EventDetails._allow_download_enabled_details_validator = AllowDownloadEnabledDetails_validator -EventDetails._data_placement_restriction_change_policy_details_validator = DataPlacementRestrictionChangePolicyDetails_validator -EventDetails._data_placement_restriction_satisfy_policy_details_validator = DataPlacementRestrictionSatisfyPolicyDetails_validator -EventDetails._device_approvals_change_desktop_policy_details_validator = DeviceApprovalsChangeDesktopPolicyDetails_validator -EventDetails._device_approvals_change_mobile_policy_details_validator = DeviceApprovalsChangeMobilePolicyDetails_validator -EventDetails._device_approvals_change_overage_action_details_validator = DeviceApprovalsChangeOverageActionDetails_validator -EventDetails._device_approvals_change_unlink_action_details_validator = DeviceApprovalsChangeUnlinkActionDetails_validator -EventDetails._emm_add_exception_details_validator = EmmAddExceptionDetails_validator -EventDetails._emm_change_policy_details_validator = EmmChangePolicyDetails_validator -EventDetails._emm_remove_exception_details_validator = EmmRemoveExceptionDetails_validator -EventDetails._extended_version_history_change_policy_details_validator = ExtendedVersionHistoryChangePolicyDetails_validator -EventDetails._file_comments_change_policy_details_validator = FileCommentsChangePolicyDetails_validator -EventDetails._file_requests_change_policy_details_validator = FileRequestsChangePolicyDetails_validator -EventDetails._file_requests_emails_enabled_details_validator = FileRequestsEmailsEnabledDetails_validator -EventDetails._file_requests_emails_restricted_to_team_only_details_validator = FileRequestsEmailsRestrictedToTeamOnlyDetails_validator -EventDetails._google_sso_change_policy_details_validator = GoogleSsoChangePolicyDetails_validator -EventDetails._group_user_management_change_policy_details_validator = GroupUserManagementChangePolicyDetails_validator -EventDetails._member_requests_change_policy_details_validator = MemberRequestsChangePolicyDetails_validator -EventDetails._member_space_limits_add_exception_details_validator = MemberSpaceLimitsAddExceptionDetails_validator -EventDetails._member_space_limits_change_policy_details_validator = MemberSpaceLimitsChangePolicyDetails_validator -EventDetails._member_space_limits_remove_exception_details_validator = MemberSpaceLimitsRemoveExceptionDetails_validator -EventDetails._member_suggestions_change_policy_details_validator = MemberSuggestionsChangePolicyDetails_validator -EventDetails._microsoft_office_addin_change_policy_details_validator = MicrosoftOfficeAddinChangePolicyDetails_validator -EventDetails._network_control_change_policy_details_validator = NetworkControlChangePolicyDetails_validator -EventDetails._paper_change_deployment_policy_details_validator = PaperChangeDeploymentPolicyDetails_validator -EventDetails._paper_change_member_link_policy_details_validator = PaperChangeMemberLinkPolicyDetails_validator -EventDetails._paper_change_member_policy_details_validator = PaperChangeMemberPolicyDetails_validator -EventDetails._paper_change_policy_details_validator = PaperChangePolicyDetails_validator -EventDetails._permanent_delete_change_policy_details_validator = PermanentDeleteChangePolicyDetails_validator -EventDetails._sharing_change_folder_join_policy_details_validator = SharingChangeFolderJoinPolicyDetails_validator -EventDetails._sharing_change_link_policy_details_validator = SharingChangeLinkPolicyDetails_validator -EventDetails._sharing_change_member_policy_details_validator = SharingChangeMemberPolicyDetails_validator -EventDetails._smart_sync_change_policy_details_validator = SmartSyncChangePolicyDetails_validator -EventDetails._smart_sync_not_opt_out_details_validator = SmartSyncNotOptOutDetails_validator -EventDetails._smart_sync_opt_out_details_validator = SmartSyncOptOutDetails_validator -EventDetails._sso_change_policy_details_validator = SsoChangePolicyDetails_validator -EventDetails._tfa_change_policy_details_validator = TfaChangePolicyDetails_validator -EventDetails._two_account_change_policy_details_validator = TwoAccountChangePolicyDetails_validator -EventDetails._web_sessions_change_fixed_length_policy_details_validator = WebSessionsChangeFixedLengthPolicyDetails_validator -EventDetails._web_sessions_change_idle_length_policy_details_validator = WebSessionsChangeIdleLengthPolicyDetails_validator -EventDetails._team_profile_add_logo_details_validator = TeamProfileAddLogoDetails_validator -EventDetails._team_profile_change_default_language_details_validator = TeamProfileChangeDefaultLanguageDetails_validator -EventDetails._team_profile_change_logo_details_validator = TeamProfileChangeLogoDetails_validator -EventDetails._team_profile_change_name_details_validator = TeamProfileChangeNameDetails_validator -EventDetails._team_profile_remove_logo_details_validator = TeamProfileRemoveLogoDetails_validator -EventDetails._tfa_add_backup_phone_details_validator = TfaAddBackupPhoneDetails_validator -EventDetails._tfa_add_security_key_details_validator = TfaAddSecurityKeyDetails_validator -EventDetails._tfa_change_backup_phone_details_validator = TfaChangeBackupPhoneDetails_validator -EventDetails._tfa_change_status_details_validator = TfaChangeStatusDetails_validator -EventDetails._tfa_remove_backup_phone_details_validator = TfaRemoveBackupPhoneDetails_validator -EventDetails._tfa_remove_security_key_details_validator = TfaRemoveSecurityKeyDetails_validator -EventDetails._tfa_reset_details_validator = TfaResetDetails_validator -EventDetails._missing_details_validator = MissingDetails_validator -EventDetails._other_validator = bv.Void() -EventDetails._tagmap = { - 'member_change_membership_type_details': EventDetails._member_change_membership_type_details_validator, - 'member_permanently_delete_account_contents_details': EventDetails._member_permanently_delete_account_contents_details_validator, - 'member_space_limits_change_status_details': EventDetails._member_space_limits_change_status_details_validator, - 'member_transfer_account_contents_details': EventDetails._member_transfer_account_contents_details_validator, - 'paper_admin_export_start_details': EventDetails._paper_admin_export_start_details_validator, - 'paper_enabled_users_group_addition_details': EventDetails._paper_enabled_users_group_addition_details_validator, - 'paper_enabled_users_group_removal_details': EventDetails._paper_enabled_users_group_removal_details_validator, - 'paper_external_view_allow_details': EventDetails._paper_external_view_allow_details_validator, - 'paper_external_view_default_team_details': EventDetails._paper_external_view_default_team_details_validator, - 'paper_external_view_forbid_details': EventDetails._paper_external_view_forbid_details_validator, - 'sf_external_invite_warn_details': EventDetails._sf_external_invite_warn_details_validator, - 'team_merge_from_details': EventDetails._team_merge_from_details_validator, - 'team_merge_to_details': EventDetails._team_merge_to_details_validator, - 'app_link_team_details': EventDetails._app_link_team_details_validator, - 'app_link_user_details': EventDetails._app_link_user_details_validator, - 'app_unlink_team_details': EventDetails._app_unlink_team_details_validator, - 'app_unlink_user_details': EventDetails._app_unlink_user_details_validator, - 'file_add_comment_details': EventDetails._file_add_comment_details_validator, - 'file_change_comment_subscription_details': EventDetails._file_change_comment_subscription_details_validator, - 'file_delete_comment_details': EventDetails._file_delete_comment_details_validator, - 'file_like_comment_details': EventDetails._file_like_comment_details_validator, - 'file_resolve_comment_details': EventDetails._file_resolve_comment_details_validator, - 'file_unlike_comment_details': EventDetails._file_unlike_comment_details_validator, - 'file_unresolve_comment_details': EventDetails._file_unresolve_comment_details_validator, - 'device_change_ip_desktop_details': EventDetails._device_change_ip_desktop_details_validator, - 'device_change_ip_mobile_details': EventDetails._device_change_ip_mobile_details_validator, - 'device_change_ip_web_details': EventDetails._device_change_ip_web_details_validator, - 'device_delete_on_unlink_fail_details': EventDetails._device_delete_on_unlink_fail_details_validator, - 'device_delete_on_unlink_success_details': EventDetails._device_delete_on_unlink_success_details_validator, - 'device_link_fail_details': EventDetails._device_link_fail_details_validator, - 'device_link_success_details': EventDetails._device_link_success_details_validator, - 'device_management_disabled_details': EventDetails._device_management_disabled_details_validator, - 'device_management_enabled_details': EventDetails._device_management_enabled_details_validator, - 'device_unlink_details': EventDetails._device_unlink_details_validator, - 'emm_refresh_auth_token_details': EventDetails._emm_refresh_auth_token_details_validator, - 'account_capture_change_availability_details': EventDetails._account_capture_change_availability_details_validator, - 'account_capture_migrate_account_details': EventDetails._account_capture_migrate_account_details_validator, - 'account_capture_relinquish_account_details': EventDetails._account_capture_relinquish_account_details_validator, - 'disabled_domain_invites_details': EventDetails._disabled_domain_invites_details_validator, - 'domain_invites_approve_request_to_join_team_details': EventDetails._domain_invites_approve_request_to_join_team_details_validator, - 'domain_invites_decline_request_to_join_team_details': EventDetails._domain_invites_decline_request_to_join_team_details_validator, - 'domain_invites_email_existing_users_details': EventDetails._domain_invites_email_existing_users_details_validator, - 'domain_invites_request_to_join_team_details': EventDetails._domain_invites_request_to_join_team_details_validator, - 'domain_invites_set_invite_new_user_pref_to_no_details': EventDetails._domain_invites_set_invite_new_user_pref_to_no_details_validator, - 'domain_invites_set_invite_new_user_pref_to_yes_details': EventDetails._domain_invites_set_invite_new_user_pref_to_yes_details_validator, - 'domain_verification_add_domain_fail_details': EventDetails._domain_verification_add_domain_fail_details_validator, - 'domain_verification_add_domain_success_details': EventDetails._domain_verification_add_domain_success_details_validator, - 'domain_verification_remove_domain_details': EventDetails._domain_verification_remove_domain_details_validator, - 'enabled_domain_invites_details': EventDetails._enabled_domain_invites_details_validator, - 'create_folder_details': EventDetails._create_folder_details_validator, - 'file_add_details': EventDetails._file_add_details_validator, - 'file_copy_details': EventDetails._file_copy_details_validator, - 'file_delete_details': EventDetails._file_delete_details_validator, - 'file_download_details': EventDetails._file_download_details_validator, - 'file_edit_details': EventDetails._file_edit_details_validator, - 'file_get_copy_reference_details': EventDetails._file_get_copy_reference_details_validator, - 'file_move_details': EventDetails._file_move_details_validator, - 'file_permanently_delete_details': EventDetails._file_permanently_delete_details_validator, - 'file_preview_details': EventDetails._file_preview_details_validator, - 'file_rename_details': EventDetails._file_rename_details_validator, - 'file_restore_details': EventDetails._file_restore_details_validator, - 'file_revert_details': EventDetails._file_revert_details_validator, - 'file_rollback_changes_details': EventDetails._file_rollback_changes_details_validator, - 'file_save_copy_reference_details': EventDetails._file_save_copy_reference_details_validator, - 'file_request_add_deadline_details': EventDetails._file_request_add_deadline_details_validator, - 'file_request_change_folder_details': EventDetails._file_request_change_folder_details_validator, - 'file_request_change_title_details': EventDetails._file_request_change_title_details_validator, - 'file_request_close_details': EventDetails._file_request_close_details_validator, - 'file_request_create_details': EventDetails._file_request_create_details_validator, - 'file_request_receive_file_details': EventDetails._file_request_receive_file_details_validator, - 'file_request_remove_deadline_details': EventDetails._file_request_remove_deadline_details_validator, - 'file_request_send_details': EventDetails._file_request_send_details_validator, - 'group_add_external_id_details': EventDetails._group_add_external_id_details_validator, - 'group_add_member_details': EventDetails._group_add_member_details_validator, - 'group_change_external_id_details': EventDetails._group_change_external_id_details_validator, - 'group_change_management_type_details': EventDetails._group_change_management_type_details_validator, - 'group_change_member_role_details': EventDetails._group_change_member_role_details_validator, - 'group_create_details': EventDetails._group_create_details_validator, - 'group_delete_details': EventDetails._group_delete_details_validator, - 'group_moved_details': EventDetails._group_moved_details_validator, - 'group_remove_external_id_details': EventDetails._group_remove_external_id_details_validator, - 'group_remove_member_details': EventDetails._group_remove_member_details_validator, - 'group_rename_details': EventDetails._group_rename_details_validator, - 'emm_login_success_details': EventDetails._emm_login_success_details_validator, - 'logout_details': EventDetails._logout_details_validator, - 'password_login_fail_details': EventDetails._password_login_fail_details_validator, - 'password_login_success_details': EventDetails._password_login_success_details_validator, - 'reseller_support_session_end_details': EventDetails._reseller_support_session_end_details_validator, - 'reseller_support_session_start_details': EventDetails._reseller_support_session_start_details_validator, - 'sign_in_as_session_end_details': EventDetails._sign_in_as_session_end_details_validator, - 'sign_in_as_session_start_details': EventDetails._sign_in_as_session_start_details_validator, - 'sso_login_fail_details': EventDetails._sso_login_fail_details_validator, - 'member_add_name_details': EventDetails._member_add_name_details_validator, - 'member_change_admin_role_details': EventDetails._member_change_admin_role_details_validator, - 'member_change_email_details': EventDetails._member_change_email_details_validator, - 'member_change_name_details': EventDetails._member_change_name_details_validator, - 'member_change_status_details': EventDetails._member_change_status_details_validator, - 'member_suggest_details': EventDetails._member_suggest_details_validator, - 'paper_content_add_member_details': EventDetails._paper_content_add_member_details_validator, - 'paper_content_add_to_folder_details': EventDetails._paper_content_add_to_folder_details_validator, - 'paper_content_archive_details': EventDetails._paper_content_archive_details_validator, - 'paper_content_create_details': EventDetails._paper_content_create_details_validator, - 'paper_content_permanently_delete_details': EventDetails._paper_content_permanently_delete_details_validator, - 'paper_content_remove_from_folder_details': EventDetails._paper_content_remove_from_folder_details_validator, - 'paper_content_remove_member_details': EventDetails._paper_content_remove_member_details_validator, - 'paper_content_rename_details': EventDetails._paper_content_rename_details_validator, - 'paper_content_restore_details': EventDetails._paper_content_restore_details_validator, - 'paper_doc_add_comment_details': EventDetails._paper_doc_add_comment_details_validator, - 'paper_doc_change_member_role_details': EventDetails._paper_doc_change_member_role_details_validator, - 'paper_doc_change_sharing_policy_details': EventDetails._paper_doc_change_sharing_policy_details_validator, - 'paper_doc_change_subscription_details': EventDetails._paper_doc_change_subscription_details_validator, - 'paper_doc_deleted_details': EventDetails._paper_doc_deleted_details_validator, - 'paper_doc_delete_comment_details': EventDetails._paper_doc_delete_comment_details_validator, - 'paper_doc_download_details': EventDetails._paper_doc_download_details_validator, - 'paper_doc_edit_details': EventDetails._paper_doc_edit_details_validator, - 'paper_doc_edit_comment_details': EventDetails._paper_doc_edit_comment_details_validator, - 'paper_doc_followed_details': EventDetails._paper_doc_followed_details_validator, - 'paper_doc_mention_details': EventDetails._paper_doc_mention_details_validator, - 'paper_doc_request_access_details': EventDetails._paper_doc_request_access_details_validator, - 'paper_doc_resolve_comment_details': EventDetails._paper_doc_resolve_comment_details_validator, - 'paper_doc_revert_details': EventDetails._paper_doc_revert_details_validator, - 'paper_doc_slack_share_details': EventDetails._paper_doc_slack_share_details_validator, - 'paper_doc_team_invite_details': EventDetails._paper_doc_team_invite_details_validator, - 'paper_doc_trashed_details': EventDetails._paper_doc_trashed_details_validator, - 'paper_doc_unresolve_comment_details': EventDetails._paper_doc_unresolve_comment_details_validator, - 'paper_doc_untrashed_details': EventDetails._paper_doc_untrashed_details_validator, - 'paper_doc_view_details': EventDetails._paper_doc_view_details_validator, - 'paper_folder_change_subscription_details': EventDetails._paper_folder_change_subscription_details_validator, - 'paper_folder_deleted_details': EventDetails._paper_folder_deleted_details_validator, - 'paper_folder_followed_details': EventDetails._paper_folder_followed_details_validator, - 'paper_folder_team_invite_details': EventDetails._paper_folder_team_invite_details_validator, - 'password_change_details': EventDetails._password_change_details_validator, - 'password_reset_details': EventDetails._password_reset_details_validator, - 'password_reset_all_details': EventDetails._password_reset_all_details_validator, - 'emm_create_exceptions_report_details': EventDetails._emm_create_exceptions_report_details_validator, - 'emm_create_usage_report_details': EventDetails._emm_create_usage_report_details_validator, - 'smart_sync_create_admin_privilege_report_details': EventDetails._smart_sync_create_admin_privilege_report_details_validator, - 'team_activity_create_report_details': EventDetails._team_activity_create_report_details_validator, - 'collection_share_details': EventDetails._collection_share_details_validator, - 'note_acl_invite_only_details': EventDetails._note_acl_invite_only_details_validator, - 'note_acl_link_details': EventDetails._note_acl_link_details_validator, - 'note_acl_team_link_details': EventDetails._note_acl_team_link_details_validator, - 'note_shared_details': EventDetails._note_shared_details_validator, - 'note_share_receive_details': EventDetails._note_share_receive_details_validator, - 'open_note_shared_details': EventDetails._open_note_shared_details_validator, - 'sf_add_group_details': EventDetails._sf_add_group_details_validator, - 'sf_allow_non_members_to_view_shared_links_details': EventDetails._sf_allow_non_members_to_view_shared_links_details_validator, - 'sf_invite_group_details': EventDetails._sf_invite_group_details_validator, - 'sf_nest_details': EventDetails._sf_nest_details_validator, - 'sf_team_decline_details': EventDetails._sf_team_decline_details_validator, - 'sf_team_grant_access_details': EventDetails._sf_team_grant_access_details_validator, - 'sf_team_invite_details': EventDetails._sf_team_invite_details_validator, - 'sf_team_invite_change_role_details': EventDetails._sf_team_invite_change_role_details_validator, - 'sf_team_join_details': EventDetails._sf_team_join_details_validator, - 'sf_team_join_from_oob_link_details': EventDetails._sf_team_join_from_oob_link_details_validator, - 'sf_team_uninvite_details': EventDetails._sf_team_uninvite_details_validator, - 'shared_content_add_invitees_details': EventDetails._shared_content_add_invitees_details_validator, - 'shared_content_add_link_expiry_details': EventDetails._shared_content_add_link_expiry_details_validator, - 'shared_content_add_link_password_details': EventDetails._shared_content_add_link_password_details_validator, - 'shared_content_add_member_details': EventDetails._shared_content_add_member_details_validator, - 'shared_content_change_downloads_policy_details': EventDetails._shared_content_change_downloads_policy_details_validator, - 'shared_content_change_invitee_role_details': EventDetails._shared_content_change_invitee_role_details_validator, - 'shared_content_change_link_audience_details': EventDetails._shared_content_change_link_audience_details_validator, - 'shared_content_change_link_expiry_details': EventDetails._shared_content_change_link_expiry_details_validator, - 'shared_content_change_link_password_details': EventDetails._shared_content_change_link_password_details_validator, - 'shared_content_change_member_role_details': EventDetails._shared_content_change_member_role_details_validator, - 'shared_content_change_viewer_info_policy_details': EventDetails._shared_content_change_viewer_info_policy_details_validator, - 'shared_content_claim_invitation_details': EventDetails._shared_content_claim_invitation_details_validator, - 'shared_content_copy_details': EventDetails._shared_content_copy_details_validator, - 'shared_content_download_details': EventDetails._shared_content_download_details_validator, - 'shared_content_relinquish_membership_details': EventDetails._shared_content_relinquish_membership_details_validator, - 'shared_content_remove_invitee_details': EventDetails._shared_content_remove_invitee_details_validator, - 'shared_content_remove_link_expiry_details': EventDetails._shared_content_remove_link_expiry_details_validator, - 'shared_content_remove_link_password_details': EventDetails._shared_content_remove_link_password_details_validator, - 'shared_content_remove_member_details': EventDetails._shared_content_remove_member_details_validator, - 'shared_content_request_access_details': EventDetails._shared_content_request_access_details_validator, - 'shared_content_unshare_details': EventDetails._shared_content_unshare_details_validator, - 'shared_content_view_details': EventDetails._shared_content_view_details_validator, - 'shared_folder_change_confidentiality_details': EventDetails._shared_folder_change_confidentiality_details_validator, - 'shared_folder_change_link_policy_details': EventDetails._shared_folder_change_link_policy_details_validator, - 'shared_folder_change_member_management_policy_details': EventDetails._shared_folder_change_member_management_policy_details_validator, - 'shared_folder_change_member_policy_details': EventDetails._shared_folder_change_member_policy_details_validator, - 'shared_folder_create_details': EventDetails._shared_folder_create_details_validator, - 'shared_folder_mount_details': EventDetails._shared_folder_mount_details_validator, - 'shared_folder_transfer_ownership_details': EventDetails._shared_folder_transfer_ownership_details_validator, - 'shared_folder_unmount_details': EventDetails._shared_folder_unmount_details_validator, - 'shared_note_opened_details': EventDetails._shared_note_opened_details_validator, - 'shmodel_app_create_details': EventDetails._shmodel_app_create_details_validator, - 'shmodel_create_details': EventDetails._shmodel_create_details_validator, - 'shmodel_disable_details': EventDetails._shmodel_disable_details_validator, - 'shmodel_fb_share_details': EventDetails._shmodel_fb_share_details_validator, - 'shmodel_group_share_details': EventDetails._shmodel_group_share_details_validator, - 'shmodel_remove_expiration_details': EventDetails._shmodel_remove_expiration_details_validator, - 'shmodel_set_expiration_details': EventDetails._shmodel_set_expiration_details_validator, - 'shmodel_team_copy_details': EventDetails._shmodel_team_copy_details_validator, - 'shmodel_team_download_details': EventDetails._shmodel_team_download_details_validator, - 'shmodel_team_share_details': EventDetails._shmodel_team_share_details_validator, - 'shmodel_team_view_details': EventDetails._shmodel_team_view_details_validator, - 'shmodel_visibility_password_details': EventDetails._shmodel_visibility_password_details_validator, - 'shmodel_visibility_public_details': EventDetails._shmodel_visibility_public_details_validator, - 'shmodel_visibility_team_only_details': EventDetails._shmodel_visibility_team_only_details_validator, - 'sso_add_cert_details': EventDetails._sso_add_cert_details_validator, - 'sso_add_login_url_details': EventDetails._sso_add_login_url_details_validator, - 'sso_add_logout_url_details': EventDetails._sso_add_logout_url_details_validator, - 'sso_change_cert_details': EventDetails._sso_change_cert_details_validator, - 'sso_change_login_url_details': EventDetails._sso_change_login_url_details_validator, - 'sso_change_logout_url_details': EventDetails._sso_change_logout_url_details_validator, - 'sso_change_saml_identity_mode_details': EventDetails._sso_change_saml_identity_mode_details_validator, - 'sso_remove_cert_details': EventDetails._sso_remove_cert_details_validator, - 'sso_remove_login_url_details': EventDetails._sso_remove_login_url_details_validator, - 'sso_remove_logout_url_details': EventDetails._sso_remove_logout_url_details_validator, - 'team_folder_change_status_details': EventDetails._team_folder_change_status_details_validator, - 'team_folder_create_details': EventDetails._team_folder_create_details_validator, - 'team_folder_downgrade_details': EventDetails._team_folder_downgrade_details_validator, - 'team_folder_permanently_delete_details': EventDetails._team_folder_permanently_delete_details_validator, - 'team_folder_rename_details': EventDetails._team_folder_rename_details_validator, - 'account_capture_change_policy_details': EventDetails._account_capture_change_policy_details_validator, - 'allow_download_disabled_details': EventDetails._allow_download_disabled_details_validator, - 'allow_download_enabled_details': EventDetails._allow_download_enabled_details_validator, - 'data_placement_restriction_change_policy_details': EventDetails._data_placement_restriction_change_policy_details_validator, - 'data_placement_restriction_satisfy_policy_details': EventDetails._data_placement_restriction_satisfy_policy_details_validator, - 'device_approvals_change_desktop_policy_details': EventDetails._device_approvals_change_desktop_policy_details_validator, - 'device_approvals_change_mobile_policy_details': EventDetails._device_approvals_change_mobile_policy_details_validator, - 'device_approvals_change_overage_action_details': EventDetails._device_approvals_change_overage_action_details_validator, - 'device_approvals_change_unlink_action_details': EventDetails._device_approvals_change_unlink_action_details_validator, - 'emm_add_exception_details': EventDetails._emm_add_exception_details_validator, - 'emm_change_policy_details': EventDetails._emm_change_policy_details_validator, - 'emm_remove_exception_details': EventDetails._emm_remove_exception_details_validator, - 'extended_version_history_change_policy_details': EventDetails._extended_version_history_change_policy_details_validator, - 'file_comments_change_policy_details': EventDetails._file_comments_change_policy_details_validator, - 'file_requests_change_policy_details': EventDetails._file_requests_change_policy_details_validator, - 'file_requests_emails_enabled_details': EventDetails._file_requests_emails_enabled_details_validator, - 'file_requests_emails_restricted_to_team_only_details': EventDetails._file_requests_emails_restricted_to_team_only_details_validator, - 'google_sso_change_policy_details': EventDetails._google_sso_change_policy_details_validator, - 'group_user_management_change_policy_details': EventDetails._group_user_management_change_policy_details_validator, - 'member_requests_change_policy_details': EventDetails._member_requests_change_policy_details_validator, - 'member_space_limits_add_exception_details': EventDetails._member_space_limits_add_exception_details_validator, - 'member_space_limits_change_policy_details': EventDetails._member_space_limits_change_policy_details_validator, - 'member_space_limits_remove_exception_details': EventDetails._member_space_limits_remove_exception_details_validator, - 'member_suggestions_change_policy_details': EventDetails._member_suggestions_change_policy_details_validator, - 'microsoft_office_addin_change_policy_details': EventDetails._microsoft_office_addin_change_policy_details_validator, - 'network_control_change_policy_details': EventDetails._network_control_change_policy_details_validator, - 'paper_change_deployment_policy_details': EventDetails._paper_change_deployment_policy_details_validator, - 'paper_change_member_link_policy_details': EventDetails._paper_change_member_link_policy_details_validator, - 'paper_change_member_policy_details': EventDetails._paper_change_member_policy_details_validator, - 'paper_change_policy_details': EventDetails._paper_change_policy_details_validator, - 'permanent_delete_change_policy_details': EventDetails._permanent_delete_change_policy_details_validator, - 'sharing_change_folder_join_policy_details': EventDetails._sharing_change_folder_join_policy_details_validator, - 'sharing_change_link_policy_details': EventDetails._sharing_change_link_policy_details_validator, - 'sharing_change_member_policy_details': EventDetails._sharing_change_member_policy_details_validator, - 'smart_sync_change_policy_details': EventDetails._smart_sync_change_policy_details_validator, - 'smart_sync_not_opt_out_details': EventDetails._smart_sync_not_opt_out_details_validator, - 'smart_sync_opt_out_details': EventDetails._smart_sync_opt_out_details_validator, - 'sso_change_policy_details': EventDetails._sso_change_policy_details_validator, - 'tfa_change_policy_details': EventDetails._tfa_change_policy_details_validator, - 'two_account_change_policy_details': EventDetails._two_account_change_policy_details_validator, - 'web_sessions_change_fixed_length_policy_details': EventDetails._web_sessions_change_fixed_length_policy_details_validator, - 'web_sessions_change_idle_length_policy_details': EventDetails._web_sessions_change_idle_length_policy_details_validator, - 'team_profile_add_logo_details': EventDetails._team_profile_add_logo_details_validator, - 'team_profile_change_default_language_details': EventDetails._team_profile_change_default_language_details_validator, - 'team_profile_change_logo_details': EventDetails._team_profile_change_logo_details_validator, - 'team_profile_change_name_details': EventDetails._team_profile_change_name_details_validator, - 'team_profile_remove_logo_details': EventDetails._team_profile_remove_logo_details_validator, - 'tfa_add_backup_phone_details': EventDetails._tfa_add_backup_phone_details_validator, - 'tfa_add_security_key_details': EventDetails._tfa_add_security_key_details_validator, - 'tfa_change_backup_phone_details': EventDetails._tfa_change_backup_phone_details_validator, - 'tfa_change_status_details': EventDetails._tfa_change_status_details_validator, - 'tfa_remove_backup_phone_details': EventDetails._tfa_remove_backup_phone_details_validator, - 'tfa_remove_security_key_details': EventDetails._tfa_remove_security_key_details_validator, - 'tfa_reset_details': EventDetails._tfa_reset_details_validator, - 'missing_details': EventDetails._missing_details_validator, - 'other': EventDetails._other_validator, -} - -EventDetails.other = EventDetails('other') - -EventType._member_change_membership_type_validator = bv.Void() -EventType._member_permanently_delete_account_contents_validator = bv.Void() -EventType._member_space_limits_change_status_validator = bv.Void() -EventType._member_transfer_account_contents_validator = bv.Void() -EventType._paper_admin_export_start_validator = bv.Void() -EventType._paper_enabled_users_group_addition_validator = bv.Void() -EventType._paper_enabled_users_group_removal_validator = bv.Void() -EventType._paper_external_view_allow_validator = bv.Void() -EventType._paper_external_view_default_team_validator = bv.Void() -EventType._paper_external_view_forbid_validator = bv.Void() -EventType._sf_external_invite_warn_validator = bv.Void() -EventType._team_merge_from_validator = bv.Void() -EventType._team_merge_to_validator = bv.Void() -EventType._app_link_team_validator = bv.Void() -EventType._app_link_user_validator = bv.Void() -EventType._app_unlink_team_validator = bv.Void() -EventType._app_unlink_user_validator = bv.Void() -EventType._file_add_comment_validator = bv.Void() -EventType._file_change_comment_subscription_validator = bv.Void() -EventType._file_delete_comment_validator = bv.Void() -EventType._file_like_comment_validator = bv.Void() -EventType._file_resolve_comment_validator = bv.Void() -EventType._file_unlike_comment_validator = bv.Void() -EventType._file_unresolve_comment_validator = bv.Void() -EventType._device_change_ip_desktop_validator = bv.Void() -EventType._device_change_ip_mobile_validator = bv.Void() -EventType._device_change_ip_web_validator = bv.Void() -EventType._device_delete_on_unlink_fail_validator = bv.Void() -EventType._device_delete_on_unlink_success_validator = bv.Void() -EventType._device_link_fail_validator = bv.Void() -EventType._device_link_success_validator = bv.Void() -EventType._device_management_disabled_validator = bv.Void() -EventType._device_management_enabled_validator = bv.Void() -EventType._device_unlink_validator = bv.Void() -EventType._emm_refresh_auth_token_validator = bv.Void() -EventType._account_capture_change_availability_validator = bv.Void() -EventType._account_capture_migrate_account_validator = bv.Void() -EventType._account_capture_relinquish_account_validator = bv.Void() -EventType._disabled_domain_invites_validator = bv.Void() -EventType._domain_invites_approve_request_to_join_team_validator = bv.Void() -EventType._domain_invites_decline_request_to_join_team_validator = bv.Void() -EventType._domain_invites_email_existing_users_validator = bv.Void() -EventType._domain_invites_request_to_join_team_validator = bv.Void() -EventType._domain_invites_set_invite_new_user_pref_to_no_validator = bv.Void() -EventType._domain_invites_set_invite_new_user_pref_to_yes_validator = bv.Void() -EventType._domain_verification_add_domain_fail_validator = bv.Void() -EventType._domain_verification_add_domain_success_validator = bv.Void() -EventType._domain_verification_remove_domain_validator = bv.Void() -EventType._enabled_domain_invites_validator = bv.Void() -EventType._create_folder_validator = bv.Void() -EventType._file_add_validator = bv.Void() -EventType._file_copy_validator = bv.Void() -EventType._file_delete_validator = bv.Void() -EventType._file_download_validator = bv.Void() -EventType._file_edit_validator = bv.Void() -EventType._file_get_copy_reference_validator = bv.Void() -EventType._file_move_validator = bv.Void() -EventType._file_permanently_delete_validator = bv.Void() -EventType._file_preview_validator = bv.Void() -EventType._file_rename_validator = bv.Void() -EventType._file_restore_validator = bv.Void() -EventType._file_revert_validator = bv.Void() -EventType._file_rollback_changes_validator = bv.Void() -EventType._file_save_copy_reference_validator = bv.Void() -EventType._file_request_add_deadline_validator = bv.Void() -EventType._file_request_change_folder_validator = bv.Void() -EventType._file_request_change_title_validator = bv.Void() -EventType._file_request_close_validator = bv.Void() -EventType._file_request_create_validator = bv.Void() -EventType._file_request_receive_file_validator = bv.Void() -EventType._file_request_remove_deadline_validator = bv.Void() -EventType._file_request_send_validator = bv.Void() -EventType._group_add_external_id_validator = bv.Void() -EventType._group_add_member_validator = bv.Void() -EventType._group_change_external_id_validator = bv.Void() -EventType._group_change_management_type_validator = bv.Void() -EventType._group_change_member_role_validator = bv.Void() -EventType._group_create_validator = bv.Void() -EventType._group_delete_validator = bv.Void() -EventType._group_moved_validator = bv.Void() -EventType._group_remove_external_id_validator = bv.Void() -EventType._group_remove_member_validator = bv.Void() -EventType._group_rename_validator = bv.Void() -EventType._emm_login_success_validator = bv.Void() -EventType._logout_validator = bv.Void() -EventType._password_login_fail_validator = bv.Void() -EventType._password_login_success_validator = bv.Void() -EventType._reseller_support_session_end_validator = bv.Void() -EventType._reseller_support_session_start_validator = bv.Void() -EventType._sign_in_as_session_end_validator = bv.Void() -EventType._sign_in_as_session_start_validator = bv.Void() -EventType._sso_login_fail_validator = bv.Void() -EventType._member_add_name_validator = bv.Void() -EventType._member_change_admin_role_validator = bv.Void() -EventType._member_change_email_validator = bv.Void() -EventType._member_change_name_validator = bv.Void() -EventType._member_change_status_validator = bv.Void() -EventType._member_suggest_validator = bv.Void() -EventType._paper_content_add_member_validator = bv.Void() -EventType._paper_content_add_to_folder_validator = bv.Void() -EventType._paper_content_archive_validator = bv.Void() -EventType._paper_content_create_validator = bv.Void() -EventType._paper_content_permanently_delete_validator = bv.Void() -EventType._paper_content_remove_from_folder_validator = bv.Void() -EventType._paper_content_remove_member_validator = bv.Void() -EventType._paper_content_rename_validator = bv.Void() -EventType._paper_content_restore_validator = bv.Void() -EventType._paper_doc_add_comment_validator = bv.Void() -EventType._paper_doc_change_member_role_validator = bv.Void() -EventType._paper_doc_change_sharing_policy_validator = bv.Void() -EventType._paper_doc_change_subscription_validator = bv.Void() -EventType._paper_doc_deleted_validator = bv.Void() -EventType._paper_doc_delete_comment_validator = bv.Void() -EventType._paper_doc_download_validator = bv.Void() -EventType._paper_doc_edit_validator = bv.Void() -EventType._paper_doc_edit_comment_validator = bv.Void() -EventType._paper_doc_followed_validator = bv.Void() -EventType._paper_doc_mention_validator = bv.Void() -EventType._paper_doc_request_access_validator = bv.Void() -EventType._paper_doc_resolve_comment_validator = bv.Void() -EventType._paper_doc_revert_validator = bv.Void() -EventType._paper_doc_slack_share_validator = bv.Void() -EventType._paper_doc_team_invite_validator = bv.Void() -EventType._paper_doc_trashed_validator = bv.Void() -EventType._paper_doc_unresolve_comment_validator = bv.Void() -EventType._paper_doc_untrashed_validator = bv.Void() -EventType._paper_doc_view_validator = bv.Void() -EventType._paper_folder_change_subscription_validator = bv.Void() -EventType._paper_folder_deleted_validator = bv.Void() -EventType._paper_folder_followed_validator = bv.Void() -EventType._paper_folder_team_invite_validator = bv.Void() -EventType._password_change_validator = bv.Void() -EventType._password_reset_validator = bv.Void() -EventType._password_reset_all_validator = bv.Void() -EventType._emm_create_exceptions_report_validator = bv.Void() -EventType._emm_create_usage_report_validator = bv.Void() -EventType._smart_sync_create_admin_privilege_report_validator = bv.Void() -EventType._team_activity_create_report_validator = bv.Void() -EventType._collection_share_validator = bv.Void() -EventType._note_acl_invite_only_validator = bv.Void() -EventType._note_acl_link_validator = bv.Void() -EventType._note_acl_team_link_validator = bv.Void() -EventType._note_shared_validator = bv.Void() -EventType._note_share_receive_validator = bv.Void() -EventType._open_note_shared_validator = bv.Void() -EventType._sf_add_group_validator = bv.Void() -EventType._sf_allow_non_members_to_view_shared_links_validator = bv.Void() -EventType._sf_invite_group_validator = bv.Void() -EventType._sf_nest_validator = bv.Void() -EventType._sf_team_decline_validator = bv.Void() -EventType._sf_team_grant_access_validator = bv.Void() -EventType._sf_team_invite_validator = bv.Void() -EventType._sf_team_invite_change_role_validator = bv.Void() -EventType._sf_team_join_validator = bv.Void() -EventType._sf_team_join_from_oob_link_validator = bv.Void() -EventType._sf_team_uninvite_validator = bv.Void() -EventType._shared_content_add_invitees_validator = bv.Void() -EventType._shared_content_add_link_expiry_validator = bv.Void() -EventType._shared_content_add_link_password_validator = bv.Void() -EventType._shared_content_add_member_validator = bv.Void() -EventType._shared_content_change_downloads_policy_validator = bv.Void() -EventType._shared_content_change_invitee_role_validator = bv.Void() -EventType._shared_content_change_link_audience_validator = bv.Void() -EventType._shared_content_change_link_expiry_validator = bv.Void() -EventType._shared_content_change_link_password_validator = bv.Void() -EventType._shared_content_change_member_role_validator = bv.Void() -EventType._shared_content_change_viewer_info_policy_validator = bv.Void() -EventType._shared_content_claim_invitation_validator = bv.Void() -EventType._shared_content_copy_validator = bv.Void() -EventType._shared_content_download_validator = bv.Void() -EventType._shared_content_relinquish_membership_validator = bv.Void() -EventType._shared_content_remove_invitee_validator = bv.Void() -EventType._shared_content_remove_link_expiry_validator = bv.Void() -EventType._shared_content_remove_link_password_validator = bv.Void() -EventType._shared_content_remove_member_validator = bv.Void() -EventType._shared_content_request_access_validator = bv.Void() -EventType._shared_content_unshare_validator = bv.Void() -EventType._shared_content_view_validator = bv.Void() -EventType._shared_folder_change_confidentiality_validator = bv.Void() -EventType._shared_folder_change_link_policy_validator = bv.Void() -EventType._shared_folder_change_member_management_policy_validator = bv.Void() -EventType._shared_folder_change_member_policy_validator = bv.Void() -EventType._shared_folder_create_validator = bv.Void() -EventType._shared_folder_mount_validator = bv.Void() -EventType._shared_folder_transfer_ownership_validator = bv.Void() -EventType._shared_folder_unmount_validator = bv.Void() -EventType._shared_note_opened_validator = bv.Void() -EventType._shmodel_app_create_validator = bv.Void() -EventType._shmodel_create_validator = bv.Void() -EventType._shmodel_disable_validator = bv.Void() -EventType._shmodel_fb_share_validator = bv.Void() -EventType._shmodel_group_share_validator = bv.Void() -EventType._shmodel_remove_expiration_validator = bv.Void() -EventType._shmodel_set_expiration_validator = bv.Void() -EventType._shmodel_team_copy_validator = bv.Void() -EventType._shmodel_team_download_validator = bv.Void() -EventType._shmodel_team_share_validator = bv.Void() -EventType._shmodel_team_view_validator = bv.Void() -EventType._shmodel_visibility_password_validator = bv.Void() -EventType._shmodel_visibility_public_validator = bv.Void() -EventType._shmodel_visibility_team_only_validator = bv.Void() -EventType._sso_add_cert_validator = bv.Void() -EventType._sso_add_login_url_validator = bv.Void() -EventType._sso_add_logout_url_validator = bv.Void() -EventType._sso_change_cert_validator = bv.Void() -EventType._sso_change_login_url_validator = bv.Void() -EventType._sso_change_logout_url_validator = bv.Void() -EventType._sso_change_saml_identity_mode_validator = bv.Void() -EventType._sso_remove_cert_validator = bv.Void() -EventType._sso_remove_login_url_validator = bv.Void() -EventType._sso_remove_logout_url_validator = bv.Void() -EventType._team_folder_change_status_validator = bv.Void() -EventType._team_folder_create_validator = bv.Void() -EventType._team_folder_downgrade_validator = bv.Void() -EventType._team_folder_permanently_delete_validator = bv.Void() -EventType._team_folder_rename_validator = bv.Void() -EventType._account_capture_change_policy_validator = bv.Void() -EventType._allow_download_disabled_validator = bv.Void() -EventType._allow_download_enabled_validator = bv.Void() -EventType._data_placement_restriction_change_policy_validator = bv.Void() -EventType._data_placement_restriction_satisfy_policy_validator = bv.Void() -EventType._device_approvals_change_desktop_policy_validator = bv.Void() -EventType._device_approvals_change_mobile_policy_validator = bv.Void() -EventType._device_approvals_change_overage_action_validator = bv.Void() -EventType._device_approvals_change_unlink_action_validator = bv.Void() -EventType._emm_add_exception_validator = bv.Void() -EventType._emm_change_policy_validator = bv.Void() -EventType._emm_remove_exception_validator = bv.Void() -EventType._extended_version_history_change_policy_validator = bv.Void() -EventType._file_comments_change_policy_validator = bv.Void() -EventType._file_requests_change_policy_validator = bv.Void() -EventType._file_requests_emails_enabled_validator = bv.Void() -EventType._file_requests_emails_restricted_to_team_only_validator = bv.Void() -EventType._google_sso_change_policy_validator = bv.Void() -EventType._group_user_management_change_policy_validator = bv.Void() -EventType._member_requests_change_policy_validator = bv.Void() -EventType._member_space_limits_add_exception_validator = bv.Void() -EventType._member_space_limits_change_policy_validator = bv.Void() -EventType._member_space_limits_remove_exception_validator = bv.Void() -EventType._member_suggestions_change_policy_validator = bv.Void() -EventType._microsoft_office_addin_change_policy_validator = bv.Void() -EventType._network_control_change_policy_validator = bv.Void() -EventType._paper_change_deployment_policy_validator = bv.Void() -EventType._paper_change_member_link_policy_validator = bv.Void() -EventType._paper_change_member_policy_validator = bv.Void() -EventType._paper_change_policy_validator = bv.Void() -EventType._permanent_delete_change_policy_validator = bv.Void() -EventType._sharing_change_folder_join_policy_validator = bv.Void() -EventType._sharing_change_link_policy_validator = bv.Void() -EventType._sharing_change_member_policy_validator = bv.Void() -EventType._smart_sync_change_policy_validator = bv.Void() -EventType._smart_sync_not_opt_out_validator = bv.Void() -EventType._smart_sync_opt_out_validator = bv.Void() -EventType._sso_change_policy_validator = bv.Void() -EventType._tfa_change_policy_validator = bv.Void() -EventType._two_account_change_policy_validator = bv.Void() -EventType._web_sessions_change_fixed_length_policy_validator = bv.Void() -EventType._web_sessions_change_idle_length_policy_validator = bv.Void() -EventType._team_profile_add_logo_validator = bv.Void() -EventType._team_profile_change_default_language_validator = bv.Void() -EventType._team_profile_change_logo_validator = bv.Void() -EventType._team_profile_change_name_validator = bv.Void() -EventType._team_profile_remove_logo_validator = bv.Void() -EventType._tfa_add_backup_phone_validator = bv.Void() -EventType._tfa_add_security_key_validator = bv.Void() -EventType._tfa_change_backup_phone_validator = bv.Void() -EventType._tfa_change_status_validator = bv.Void() -EventType._tfa_remove_backup_phone_validator = bv.Void() -EventType._tfa_remove_security_key_validator = bv.Void() -EventType._tfa_reset_validator = bv.Void() -EventType._other_validator = bv.Void() -EventType._tagmap = { - 'member_change_membership_type': EventType._member_change_membership_type_validator, - 'member_permanently_delete_account_contents': EventType._member_permanently_delete_account_contents_validator, - 'member_space_limits_change_status': EventType._member_space_limits_change_status_validator, - 'member_transfer_account_contents': EventType._member_transfer_account_contents_validator, - 'paper_admin_export_start': EventType._paper_admin_export_start_validator, - 'paper_enabled_users_group_addition': EventType._paper_enabled_users_group_addition_validator, - 'paper_enabled_users_group_removal': EventType._paper_enabled_users_group_removal_validator, - 'paper_external_view_allow': EventType._paper_external_view_allow_validator, - 'paper_external_view_default_team': EventType._paper_external_view_default_team_validator, - 'paper_external_view_forbid': EventType._paper_external_view_forbid_validator, - 'sf_external_invite_warn': EventType._sf_external_invite_warn_validator, - 'team_merge_from': EventType._team_merge_from_validator, - 'team_merge_to': EventType._team_merge_to_validator, - 'app_link_team': EventType._app_link_team_validator, - 'app_link_user': EventType._app_link_user_validator, - 'app_unlink_team': EventType._app_unlink_team_validator, - 'app_unlink_user': EventType._app_unlink_user_validator, - 'file_add_comment': EventType._file_add_comment_validator, - 'file_change_comment_subscription': EventType._file_change_comment_subscription_validator, - 'file_delete_comment': EventType._file_delete_comment_validator, - 'file_like_comment': EventType._file_like_comment_validator, - 'file_resolve_comment': EventType._file_resolve_comment_validator, - 'file_unlike_comment': EventType._file_unlike_comment_validator, - 'file_unresolve_comment': EventType._file_unresolve_comment_validator, - 'device_change_ip_desktop': EventType._device_change_ip_desktop_validator, - 'device_change_ip_mobile': EventType._device_change_ip_mobile_validator, - 'device_change_ip_web': EventType._device_change_ip_web_validator, - 'device_delete_on_unlink_fail': EventType._device_delete_on_unlink_fail_validator, - 'device_delete_on_unlink_success': EventType._device_delete_on_unlink_success_validator, - 'device_link_fail': EventType._device_link_fail_validator, - 'device_link_success': EventType._device_link_success_validator, - 'device_management_disabled': EventType._device_management_disabled_validator, - 'device_management_enabled': EventType._device_management_enabled_validator, - 'device_unlink': EventType._device_unlink_validator, - 'emm_refresh_auth_token': EventType._emm_refresh_auth_token_validator, - 'account_capture_change_availability': EventType._account_capture_change_availability_validator, - 'account_capture_migrate_account': EventType._account_capture_migrate_account_validator, - 'account_capture_relinquish_account': EventType._account_capture_relinquish_account_validator, - 'disabled_domain_invites': EventType._disabled_domain_invites_validator, - 'domain_invites_approve_request_to_join_team': EventType._domain_invites_approve_request_to_join_team_validator, - 'domain_invites_decline_request_to_join_team': EventType._domain_invites_decline_request_to_join_team_validator, - 'domain_invites_email_existing_users': EventType._domain_invites_email_existing_users_validator, - 'domain_invites_request_to_join_team': EventType._domain_invites_request_to_join_team_validator, - 'domain_invites_set_invite_new_user_pref_to_no': EventType._domain_invites_set_invite_new_user_pref_to_no_validator, - 'domain_invites_set_invite_new_user_pref_to_yes': EventType._domain_invites_set_invite_new_user_pref_to_yes_validator, - 'domain_verification_add_domain_fail': EventType._domain_verification_add_domain_fail_validator, - 'domain_verification_add_domain_success': EventType._domain_verification_add_domain_success_validator, - 'domain_verification_remove_domain': EventType._domain_verification_remove_domain_validator, - 'enabled_domain_invites': EventType._enabled_domain_invites_validator, - 'create_folder': EventType._create_folder_validator, - 'file_add': EventType._file_add_validator, - 'file_copy': EventType._file_copy_validator, - 'file_delete': EventType._file_delete_validator, - 'file_download': EventType._file_download_validator, - 'file_edit': EventType._file_edit_validator, - 'file_get_copy_reference': EventType._file_get_copy_reference_validator, - 'file_move': EventType._file_move_validator, - 'file_permanently_delete': EventType._file_permanently_delete_validator, - 'file_preview': EventType._file_preview_validator, - 'file_rename': EventType._file_rename_validator, - 'file_restore': EventType._file_restore_validator, - 'file_revert': EventType._file_revert_validator, - 'file_rollback_changes': EventType._file_rollback_changes_validator, - 'file_save_copy_reference': EventType._file_save_copy_reference_validator, - 'file_request_add_deadline': EventType._file_request_add_deadline_validator, - 'file_request_change_folder': EventType._file_request_change_folder_validator, - 'file_request_change_title': EventType._file_request_change_title_validator, - 'file_request_close': EventType._file_request_close_validator, - 'file_request_create': EventType._file_request_create_validator, - 'file_request_receive_file': EventType._file_request_receive_file_validator, - 'file_request_remove_deadline': EventType._file_request_remove_deadline_validator, - 'file_request_send': EventType._file_request_send_validator, - 'group_add_external_id': EventType._group_add_external_id_validator, - 'group_add_member': EventType._group_add_member_validator, - 'group_change_external_id': EventType._group_change_external_id_validator, - 'group_change_management_type': EventType._group_change_management_type_validator, - 'group_change_member_role': EventType._group_change_member_role_validator, - 'group_create': EventType._group_create_validator, - 'group_delete': EventType._group_delete_validator, - 'group_moved': EventType._group_moved_validator, - 'group_remove_external_id': EventType._group_remove_external_id_validator, - 'group_remove_member': EventType._group_remove_member_validator, - 'group_rename': EventType._group_rename_validator, - 'emm_login_success': EventType._emm_login_success_validator, - 'logout': EventType._logout_validator, - 'password_login_fail': EventType._password_login_fail_validator, - 'password_login_success': EventType._password_login_success_validator, - 'reseller_support_session_end': EventType._reseller_support_session_end_validator, - 'reseller_support_session_start': EventType._reseller_support_session_start_validator, - 'sign_in_as_session_end': EventType._sign_in_as_session_end_validator, - 'sign_in_as_session_start': EventType._sign_in_as_session_start_validator, - 'sso_login_fail': EventType._sso_login_fail_validator, - 'member_add_name': EventType._member_add_name_validator, - 'member_change_admin_role': EventType._member_change_admin_role_validator, - 'member_change_email': EventType._member_change_email_validator, - 'member_change_name': EventType._member_change_name_validator, - 'member_change_status': EventType._member_change_status_validator, - 'member_suggest': EventType._member_suggest_validator, - 'paper_content_add_member': EventType._paper_content_add_member_validator, - 'paper_content_add_to_folder': EventType._paper_content_add_to_folder_validator, - 'paper_content_archive': EventType._paper_content_archive_validator, - 'paper_content_create': EventType._paper_content_create_validator, - 'paper_content_permanently_delete': EventType._paper_content_permanently_delete_validator, - 'paper_content_remove_from_folder': EventType._paper_content_remove_from_folder_validator, - 'paper_content_remove_member': EventType._paper_content_remove_member_validator, - 'paper_content_rename': EventType._paper_content_rename_validator, - 'paper_content_restore': EventType._paper_content_restore_validator, - 'paper_doc_add_comment': EventType._paper_doc_add_comment_validator, - 'paper_doc_change_member_role': EventType._paper_doc_change_member_role_validator, - 'paper_doc_change_sharing_policy': EventType._paper_doc_change_sharing_policy_validator, - 'paper_doc_change_subscription': EventType._paper_doc_change_subscription_validator, - 'paper_doc_deleted': EventType._paper_doc_deleted_validator, - 'paper_doc_delete_comment': EventType._paper_doc_delete_comment_validator, - 'paper_doc_download': EventType._paper_doc_download_validator, - 'paper_doc_edit': EventType._paper_doc_edit_validator, - 'paper_doc_edit_comment': EventType._paper_doc_edit_comment_validator, - 'paper_doc_followed': EventType._paper_doc_followed_validator, - 'paper_doc_mention': EventType._paper_doc_mention_validator, - 'paper_doc_request_access': EventType._paper_doc_request_access_validator, - 'paper_doc_resolve_comment': EventType._paper_doc_resolve_comment_validator, - 'paper_doc_revert': EventType._paper_doc_revert_validator, - 'paper_doc_slack_share': EventType._paper_doc_slack_share_validator, - 'paper_doc_team_invite': EventType._paper_doc_team_invite_validator, - 'paper_doc_trashed': EventType._paper_doc_trashed_validator, - 'paper_doc_unresolve_comment': EventType._paper_doc_unresolve_comment_validator, - 'paper_doc_untrashed': EventType._paper_doc_untrashed_validator, - 'paper_doc_view': EventType._paper_doc_view_validator, - 'paper_folder_change_subscription': EventType._paper_folder_change_subscription_validator, - 'paper_folder_deleted': EventType._paper_folder_deleted_validator, - 'paper_folder_followed': EventType._paper_folder_followed_validator, - 'paper_folder_team_invite': EventType._paper_folder_team_invite_validator, - 'password_change': EventType._password_change_validator, - 'password_reset': EventType._password_reset_validator, - 'password_reset_all': EventType._password_reset_all_validator, - 'emm_create_exceptions_report': EventType._emm_create_exceptions_report_validator, - 'emm_create_usage_report': EventType._emm_create_usage_report_validator, - 'smart_sync_create_admin_privilege_report': EventType._smart_sync_create_admin_privilege_report_validator, - 'team_activity_create_report': EventType._team_activity_create_report_validator, - 'collection_share': EventType._collection_share_validator, - 'note_acl_invite_only': EventType._note_acl_invite_only_validator, - 'note_acl_link': EventType._note_acl_link_validator, - 'note_acl_team_link': EventType._note_acl_team_link_validator, - 'note_shared': EventType._note_shared_validator, - 'note_share_receive': EventType._note_share_receive_validator, - 'open_note_shared': EventType._open_note_shared_validator, - 'sf_add_group': EventType._sf_add_group_validator, - 'sf_allow_non_members_to_view_shared_links': EventType._sf_allow_non_members_to_view_shared_links_validator, - 'sf_invite_group': EventType._sf_invite_group_validator, - 'sf_nest': EventType._sf_nest_validator, - 'sf_team_decline': EventType._sf_team_decline_validator, - 'sf_team_grant_access': EventType._sf_team_grant_access_validator, - 'sf_team_invite': EventType._sf_team_invite_validator, - 'sf_team_invite_change_role': EventType._sf_team_invite_change_role_validator, - 'sf_team_join': EventType._sf_team_join_validator, - 'sf_team_join_from_oob_link': EventType._sf_team_join_from_oob_link_validator, - 'sf_team_uninvite': EventType._sf_team_uninvite_validator, - 'shared_content_add_invitees': EventType._shared_content_add_invitees_validator, - 'shared_content_add_link_expiry': EventType._shared_content_add_link_expiry_validator, - 'shared_content_add_link_password': EventType._shared_content_add_link_password_validator, - 'shared_content_add_member': EventType._shared_content_add_member_validator, - 'shared_content_change_downloads_policy': EventType._shared_content_change_downloads_policy_validator, - 'shared_content_change_invitee_role': EventType._shared_content_change_invitee_role_validator, - 'shared_content_change_link_audience': EventType._shared_content_change_link_audience_validator, - 'shared_content_change_link_expiry': EventType._shared_content_change_link_expiry_validator, - 'shared_content_change_link_password': EventType._shared_content_change_link_password_validator, - 'shared_content_change_member_role': EventType._shared_content_change_member_role_validator, - 'shared_content_change_viewer_info_policy': EventType._shared_content_change_viewer_info_policy_validator, - 'shared_content_claim_invitation': EventType._shared_content_claim_invitation_validator, - 'shared_content_copy': EventType._shared_content_copy_validator, - 'shared_content_download': EventType._shared_content_download_validator, - 'shared_content_relinquish_membership': EventType._shared_content_relinquish_membership_validator, - 'shared_content_remove_invitee': EventType._shared_content_remove_invitee_validator, - 'shared_content_remove_link_expiry': EventType._shared_content_remove_link_expiry_validator, - 'shared_content_remove_link_password': EventType._shared_content_remove_link_password_validator, - 'shared_content_remove_member': EventType._shared_content_remove_member_validator, - 'shared_content_request_access': EventType._shared_content_request_access_validator, - 'shared_content_unshare': EventType._shared_content_unshare_validator, - 'shared_content_view': EventType._shared_content_view_validator, - 'shared_folder_change_confidentiality': EventType._shared_folder_change_confidentiality_validator, - 'shared_folder_change_link_policy': EventType._shared_folder_change_link_policy_validator, - 'shared_folder_change_member_management_policy': EventType._shared_folder_change_member_management_policy_validator, - 'shared_folder_change_member_policy': EventType._shared_folder_change_member_policy_validator, - 'shared_folder_create': EventType._shared_folder_create_validator, - 'shared_folder_mount': EventType._shared_folder_mount_validator, - 'shared_folder_transfer_ownership': EventType._shared_folder_transfer_ownership_validator, - 'shared_folder_unmount': EventType._shared_folder_unmount_validator, - 'shared_note_opened': EventType._shared_note_opened_validator, - 'shmodel_app_create': EventType._shmodel_app_create_validator, - 'shmodel_create': EventType._shmodel_create_validator, - 'shmodel_disable': EventType._shmodel_disable_validator, - 'shmodel_fb_share': EventType._shmodel_fb_share_validator, - 'shmodel_group_share': EventType._shmodel_group_share_validator, - 'shmodel_remove_expiration': EventType._shmodel_remove_expiration_validator, - 'shmodel_set_expiration': EventType._shmodel_set_expiration_validator, - 'shmodel_team_copy': EventType._shmodel_team_copy_validator, - 'shmodel_team_download': EventType._shmodel_team_download_validator, - 'shmodel_team_share': EventType._shmodel_team_share_validator, - 'shmodel_team_view': EventType._shmodel_team_view_validator, - 'shmodel_visibility_password': EventType._shmodel_visibility_password_validator, - 'shmodel_visibility_public': EventType._shmodel_visibility_public_validator, - 'shmodel_visibility_team_only': EventType._shmodel_visibility_team_only_validator, - 'sso_add_cert': EventType._sso_add_cert_validator, - 'sso_add_login_url': EventType._sso_add_login_url_validator, - 'sso_add_logout_url': EventType._sso_add_logout_url_validator, - 'sso_change_cert': EventType._sso_change_cert_validator, - 'sso_change_login_url': EventType._sso_change_login_url_validator, - 'sso_change_logout_url': EventType._sso_change_logout_url_validator, - 'sso_change_saml_identity_mode': EventType._sso_change_saml_identity_mode_validator, - 'sso_remove_cert': EventType._sso_remove_cert_validator, - 'sso_remove_login_url': EventType._sso_remove_login_url_validator, - 'sso_remove_logout_url': EventType._sso_remove_logout_url_validator, - 'team_folder_change_status': EventType._team_folder_change_status_validator, - 'team_folder_create': EventType._team_folder_create_validator, - 'team_folder_downgrade': EventType._team_folder_downgrade_validator, - 'team_folder_permanently_delete': EventType._team_folder_permanently_delete_validator, - 'team_folder_rename': EventType._team_folder_rename_validator, - 'account_capture_change_policy': EventType._account_capture_change_policy_validator, - 'allow_download_disabled': EventType._allow_download_disabled_validator, - 'allow_download_enabled': EventType._allow_download_enabled_validator, - 'data_placement_restriction_change_policy': EventType._data_placement_restriction_change_policy_validator, - 'data_placement_restriction_satisfy_policy': EventType._data_placement_restriction_satisfy_policy_validator, - 'device_approvals_change_desktop_policy': EventType._device_approvals_change_desktop_policy_validator, - 'device_approvals_change_mobile_policy': EventType._device_approvals_change_mobile_policy_validator, - 'device_approvals_change_overage_action': EventType._device_approvals_change_overage_action_validator, - 'device_approvals_change_unlink_action': EventType._device_approvals_change_unlink_action_validator, - 'emm_add_exception': EventType._emm_add_exception_validator, - 'emm_change_policy': EventType._emm_change_policy_validator, - 'emm_remove_exception': EventType._emm_remove_exception_validator, - 'extended_version_history_change_policy': EventType._extended_version_history_change_policy_validator, - 'file_comments_change_policy': EventType._file_comments_change_policy_validator, - 'file_requests_change_policy': EventType._file_requests_change_policy_validator, - 'file_requests_emails_enabled': EventType._file_requests_emails_enabled_validator, - 'file_requests_emails_restricted_to_team_only': EventType._file_requests_emails_restricted_to_team_only_validator, - 'google_sso_change_policy': EventType._google_sso_change_policy_validator, - 'group_user_management_change_policy': EventType._group_user_management_change_policy_validator, - 'member_requests_change_policy': EventType._member_requests_change_policy_validator, - 'member_space_limits_add_exception': EventType._member_space_limits_add_exception_validator, - 'member_space_limits_change_policy': EventType._member_space_limits_change_policy_validator, - 'member_space_limits_remove_exception': EventType._member_space_limits_remove_exception_validator, - 'member_suggestions_change_policy': EventType._member_suggestions_change_policy_validator, - 'microsoft_office_addin_change_policy': EventType._microsoft_office_addin_change_policy_validator, - 'network_control_change_policy': EventType._network_control_change_policy_validator, - 'paper_change_deployment_policy': EventType._paper_change_deployment_policy_validator, - 'paper_change_member_link_policy': EventType._paper_change_member_link_policy_validator, - 'paper_change_member_policy': EventType._paper_change_member_policy_validator, - 'paper_change_policy': EventType._paper_change_policy_validator, - 'permanent_delete_change_policy': EventType._permanent_delete_change_policy_validator, - 'sharing_change_folder_join_policy': EventType._sharing_change_folder_join_policy_validator, - 'sharing_change_link_policy': EventType._sharing_change_link_policy_validator, - 'sharing_change_member_policy': EventType._sharing_change_member_policy_validator, - 'smart_sync_change_policy': EventType._smart_sync_change_policy_validator, - 'smart_sync_not_opt_out': EventType._smart_sync_not_opt_out_validator, - 'smart_sync_opt_out': EventType._smart_sync_opt_out_validator, - 'sso_change_policy': EventType._sso_change_policy_validator, - 'tfa_change_policy': EventType._tfa_change_policy_validator, - 'two_account_change_policy': EventType._two_account_change_policy_validator, - 'web_sessions_change_fixed_length_policy': EventType._web_sessions_change_fixed_length_policy_validator, - 'web_sessions_change_idle_length_policy': EventType._web_sessions_change_idle_length_policy_validator, - 'team_profile_add_logo': EventType._team_profile_add_logo_validator, - 'team_profile_change_default_language': EventType._team_profile_change_default_language_validator, - 'team_profile_change_logo': EventType._team_profile_change_logo_validator, - 'team_profile_change_name': EventType._team_profile_change_name_validator, - 'team_profile_remove_logo': EventType._team_profile_remove_logo_validator, - 'tfa_add_backup_phone': EventType._tfa_add_backup_phone_validator, - 'tfa_add_security_key': EventType._tfa_add_security_key_validator, - 'tfa_change_backup_phone': EventType._tfa_change_backup_phone_validator, - 'tfa_change_status': EventType._tfa_change_status_validator, - 'tfa_remove_backup_phone': EventType._tfa_remove_backup_phone_validator, - 'tfa_remove_security_key': EventType._tfa_remove_security_key_validator, - 'tfa_reset': EventType._tfa_reset_validator, - 'other': EventType._other_validator, -} - -EventType.member_change_membership_type = EventType('member_change_membership_type') -EventType.member_permanently_delete_account_contents = EventType('member_permanently_delete_account_contents') -EventType.member_space_limits_change_status = EventType('member_space_limits_change_status') -EventType.member_transfer_account_contents = EventType('member_transfer_account_contents') -EventType.paper_admin_export_start = EventType('paper_admin_export_start') -EventType.paper_enabled_users_group_addition = EventType('paper_enabled_users_group_addition') -EventType.paper_enabled_users_group_removal = EventType('paper_enabled_users_group_removal') -EventType.paper_external_view_allow = EventType('paper_external_view_allow') -EventType.paper_external_view_default_team = EventType('paper_external_view_default_team') -EventType.paper_external_view_forbid = EventType('paper_external_view_forbid') -EventType.sf_external_invite_warn = EventType('sf_external_invite_warn') -EventType.team_merge_from = EventType('team_merge_from') -EventType.team_merge_to = EventType('team_merge_to') -EventType.app_link_team = EventType('app_link_team') -EventType.app_link_user = EventType('app_link_user') -EventType.app_unlink_team = EventType('app_unlink_team') -EventType.app_unlink_user = EventType('app_unlink_user') -EventType.file_add_comment = EventType('file_add_comment') -EventType.file_change_comment_subscription = EventType('file_change_comment_subscription') -EventType.file_delete_comment = EventType('file_delete_comment') -EventType.file_like_comment = EventType('file_like_comment') -EventType.file_resolve_comment = EventType('file_resolve_comment') -EventType.file_unlike_comment = EventType('file_unlike_comment') -EventType.file_unresolve_comment = EventType('file_unresolve_comment') -EventType.device_change_ip_desktop = EventType('device_change_ip_desktop') -EventType.device_change_ip_mobile = EventType('device_change_ip_mobile') -EventType.device_change_ip_web = EventType('device_change_ip_web') -EventType.device_delete_on_unlink_fail = EventType('device_delete_on_unlink_fail') -EventType.device_delete_on_unlink_success = EventType('device_delete_on_unlink_success') -EventType.device_link_fail = EventType('device_link_fail') -EventType.device_link_success = EventType('device_link_success') -EventType.device_management_disabled = EventType('device_management_disabled') -EventType.device_management_enabled = EventType('device_management_enabled') -EventType.device_unlink = EventType('device_unlink') -EventType.emm_refresh_auth_token = EventType('emm_refresh_auth_token') -EventType.account_capture_change_availability = EventType('account_capture_change_availability') -EventType.account_capture_migrate_account = EventType('account_capture_migrate_account') -EventType.account_capture_relinquish_account = EventType('account_capture_relinquish_account') -EventType.disabled_domain_invites = EventType('disabled_domain_invites') -EventType.domain_invites_approve_request_to_join_team = EventType('domain_invites_approve_request_to_join_team') -EventType.domain_invites_decline_request_to_join_team = EventType('domain_invites_decline_request_to_join_team') -EventType.domain_invites_email_existing_users = EventType('domain_invites_email_existing_users') -EventType.domain_invites_request_to_join_team = EventType('domain_invites_request_to_join_team') -EventType.domain_invites_set_invite_new_user_pref_to_no = EventType('domain_invites_set_invite_new_user_pref_to_no') -EventType.domain_invites_set_invite_new_user_pref_to_yes = EventType('domain_invites_set_invite_new_user_pref_to_yes') -EventType.domain_verification_add_domain_fail = EventType('domain_verification_add_domain_fail') -EventType.domain_verification_add_domain_success = EventType('domain_verification_add_domain_success') -EventType.domain_verification_remove_domain = EventType('domain_verification_remove_domain') -EventType.enabled_domain_invites = EventType('enabled_domain_invites') -EventType.create_folder = EventType('create_folder') -EventType.file_add = EventType('file_add') -EventType.file_copy = EventType('file_copy') -EventType.file_delete = EventType('file_delete') -EventType.file_download = EventType('file_download') -EventType.file_edit = EventType('file_edit') -EventType.file_get_copy_reference = EventType('file_get_copy_reference') -EventType.file_move = EventType('file_move') -EventType.file_permanently_delete = EventType('file_permanently_delete') -EventType.file_preview = EventType('file_preview') -EventType.file_rename = EventType('file_rename') -EventType.file_restore = EventType('file_restore') -EventType.file_revert = EventType('file_revert') -EventType.file_rollback_changes = EventType('file_rollback_changes') -EventType.file_save_copy_reference = EventType('file_save_copy_reference') -EventType.file_request_add_deadline = EventType('file_request_add_deadline') -EventType.file_request_change_folder = EventType('file_request_change_folder') -EventType.file_request_change_title = EventType('file_request_change_title') -EventType.file_request_close = EventType('file_request_close') -EventType.file_request_create = EventType('file_request_create') -EventType.file_request_receive_file = EventType('file_request_receive_file') -EventType.file_request_remove_deadline = EventType('file_request_remove_deadline') -EventType.file_request_send = EventType('file_request_send') -EventType.group_add_external_id = EventType('group_add_external_id') -EventType.group_add_member = EventType('group_add_member') -EventType.group_change_external_id = EventType('group_change_external_id') -EventType.group_change_management_type = EventType('group_change_management_type') -EventType.group_change_member_role = EventType('group_change_member_role') -EventType.group_create = EventType('group_create') -EventType.group_delete = EventType('group_delete') -EventType.group_moved = EventType('group_moved') -EventType.group_remove_external_id = EventType('group_remove_external_id') -EventType.group_remove_member = EventType('group_remove_member') -EventType.group_rename = EventType('group_rename') -EventType.emm_login_success = EventType('emm_login_success') -EventType.logout = EventType('logout') -EventType.password_login_fail = EventType('password_login_fail') -EventType.password_login_success = EventType('password_login_success') -EventType.reseller_support_session_end = EventType('reseller_support_session_end') -EventType.reseller_support_session_start = EventType('reseller_support_session_start') -EventType.sign_in_as_session_end = EventType('sign_in_as_session_end') -EventType.sign_in_as_session_start = EventType('sign_in_as_session_start') -EventType.sso_login_fail = EventType('sso_login_fail') -EventType.member_add_name = EventType('member_add_name') -EventType.member_change_admin_role = EventType('member_change_admin_role') -EventType.member_change_email = EventType('member_change_email') -EventType.member_change_name = EventType('member_change_name') -EventType.member_change_status = EventType('member_change_status') -EventType.member_suggest = EventType('member_suggest') -EventType.paper_content_add_member = EventType('paper_content_add_member') -EventType.paper_content_add_to_folder = EventType('paper_content_add_to_folder') -EventType.paper_content_archive = EventType('paper_content_archive') -EventType.paper_content_create = EventType('paper_content_create') -EventType.paper_content_permanently_delete = EventType('paper_content_permanently_delete') -EventType.paper_content_remove_from_folder = EventType('paper_content_remove_from_folder') -EventType.paper_content_remove_member = EventType('paper_content_remove_member') -EventType.paper_content_rename = EventType('paper_content_rename') -EventType.paper_content_restore = EventType('paper_content_restore') -EventType.paper_doc_add_comment = EventType('paper_doc_add_comment') -EventType.paper_doc_change_member_role = EventType('paper_doc_change_member_role') -EventType.paper_doc_change_sharing_policy = EventType('paper_doc_change_sharing_policy') -EventType.paper_doc_change_subscription = EventType('paper_doc_change_subscription') -EventType.paper_doc_deleted = EventType('paper_doc_deleted') -EventType.paper_doc_delete_comment = EventType('paper_doc_delete_comment') -EventType.paper_doc_download = EventType('paper_doc_download') -EventType.paper_doc_edit = EventType('paper_doc_edit') -EventType.paper_doc_edit_comment = EventType('paper_doc_edit_comment') -EventType.paper_doc_followed = EventType('paper_doc_followed') -EventType.paper_doc_mention = EventType('paper_doc_mention') -EventType.paper_doc_request_access = EventType('paper_doc_request_access') -EventType.paper_doc_resolve_comment = EventType('paper_doc_resolve_comment') -EventType.paper_doc_revert = EventType('paper_doc_revert') -EventType.paper_doc_slack_share = EventType('paper_doc_slack_share') -EventType.paper_doc_team_invite = EventType('paper_doc_team_invite') -EventType.paper_doc_trashed = EventType('paper_doc_trashed') -EventType.paper_doc_unresolve_comment = EventType('paper_doc_unresolve_comment') -EventType.paper_doc_untrashed = EventType('paper_doc_untrashed') -EventType.paper_doc_view = EventType('paper_doc_view') -EventType.paper_folder_change_subscription = EventType('paper_folder_change_subscription') -EventType.paper_folder_deleted = EventType('paper_folder_deleted') -EventType.paper_folder_followed = EventType('paper_folder_followed') -EventType.paper_folder_team_invite = EventType('paper_folder_team_invite') -EventType.password_change = EventType('password_change') -EventType.password_reset = EventType('password_reset') -EventType.password_reset_all = EventType('password_reset_all') -EventType.emm_create_exceptions_report = EventType('emm_create_exceptions_report') -EventType.emm_create_usage_report = EventType('emm_create_usage_report') -EventType.smart_sync_create_admin_privilege_report = EventType('smart_sync_create_admin_privilege_report') -EventType.team_activity_create_report = EventType('team_activity_create_report') -EventType.collection_share = EventType('collection_share') -EventType.note_acl_invite_only = EventType('note_acl_invite_only') -EventType.note_acl_link = EventType('note_acl_link') -EventType.note_acl_team_link = EventType('note_acl_team_link') -EventType.note_shared = EventType('note_shared') -EventType.note_share_receive = EventType('note_share_receive') -EventType.open_note_shared = EventType('open_note_shared') -EventType.sf_add_group = EventType('sf_add_group') -EventType.sf_allow_non_members_to_view_shared_links = EventType('sf_allow_non_members_to_view_shared_links') -EventType.sf_invite_group = EventType('sf_invite_group') -EventType.sf_nest = EventType('sf_nest') -EventType.sf_team_decline = EventType('sf_team_decline') -EventType.sf_team_grant_access = EventType('sf_team_grant_access') -EventType.sf_team_invite = EventType('sf_team_invite') -EventType.sf_team_invite_change_role = EventType('sf_team_invite_change_role') -EventType.sf_team_join = EventType('sf_team_join') -EventType.sf_team_join_from_oob_link = EventType('sf_team_join_from_oob_link') -EventType.sf_team_uninvite = EventType('sf_team_uninvite') -EventType.shared_content_add_invitees = EventType('shared_content_add_invitees') -EventType.shared_content_add_link_expiry = EventType('shared_content_add_link_expiry') -EventType.shared_content_add_link_password = EventType('shared_content_add_link_password') -EventType.shared_content_add_member = EventType('shared_content_add_member') -EventType.shared_content_change_downloads_policy = EventType('shared_content_change_downloads_policy') -EventType.shared_content_change_invitee_role = EventType('shared_content_change_invitee_role') -EventType.shared_content_change_link_audience = EventType('shared_content_change_link_audience') -EventType.shared_content_change_link_expiry = EventType('shared_content_change_link_expiry') -EventType.shared_content_change_link_password = EventType('shared_content_change_link_password') -EventType.shared_content_change_member_role = EventType('shared_content_change_member_role') -EventType.shared_content_change_viewer_info_policy = EventType('shared_content_change_viewer_info_policy') -EventType.shared_content_claim_invitation = EventType('shared_content_claim_invitation') -EventType.shared_content_copy = EventType('shared_content_copy') -EventType.shared_content_download = EventType('shared_content_download') -EventType.shared_content_relinquish_membership = EventType('shared_content_relinquish_membership') -EventType.shared_content_remove_invitee = EventType('shared_content_remove_invitee') -EventType.shared_content_remove_link_expiry = EventType('shared_content_remove_link_expiry') -EventType.shared_content_remove_link_password = EventType('shared_content_remove_link_password') -EventType.shared_content_remove_member = EventType('shared_content_remove_member') -EventType.shared_content_request_access = EventType('shared_content_request_access') -EventType.shared_content_unshare = EventType('shared_content_unshare') -EventType.shared_content_view = EventType('shared_content_view') -EventType.shared_folder_change_confidentiality = EventType('shared_folder_change_confidentiality') -EventType.shared_folder_change_link_policy = EventType('shared_folder_change_link_policy') -EventType.shared_folder_change_member_management_policy = EventType('shared_folder_change_member_management_policy') -EventType.shared_folder_change_member_policy = EventType('shared_folder_change_member_policy') -EventType.shared_folder_create = EventType('shared_folder_create') -EventType.shared_folder_mount = EventType('shared_folder_mount') -EventType.shared_folder_transfer_ownership = EventType('shared_folder_transfer_ownership') -EventType.shared_folder_unmount = EventType('shared_folder_unmount') -EventType.shared_note_opened = EventType('shared_note_opened') -EventType.shmodel_app_create = EventType('shmodel_app_create') -EventType.shmodel_create = EventType('shmodel_create') -EventType.shmodel_disable = EventType('shmodel_disable') -EventType.shmodel_fb_share = EventType('shmodel_fb_share') -EventType.shmodel_group_share = EventType('shmodel_group_share') -EventType.shmodel_remove_expiration = EventType('shmodel_remove_expiration') -EventType.shmodel_set_expiration = EventType('shmodel_set_expiration') -EventType.shmodel_team_copy = EventType('shmodel_team_copy') -EventType.shmodel_team_download = EventType('shmodel_team_download') -EventType.shmodel_team_share = EventType('shmodel_team_share') -EventType.shmodel_team_view = EventType('shmodel_team_view') -EventType.shmodel_visibility_password = EventType('shmodel_visibility_password') -EventType.shmodel_visibility_public = EventType('shmodel_visibility_public') -EventType.shmodel_visibility_team_only = EventType('shmodel_visibility_team_only') -EventType.sso_add_cert = EventType('sso_add_cert') -EventType.sso_add_login_url = EventType('sso_add_login_url') -EventType.sso_add_logout_url = EventType('sso_add_logout_url') -EventType.sso_change_cert = EventType('sso_change_cert') -EventType.sso_change_login_url = EventType('sso_change_login_url') -EventType.sso_change_logout_url = EventType('sso_change_logout_url') -EventType.sso_change_saml_identity_mode = EventType('sso_change_saml_identity_mode') -EventType.sso_remove_cert = EventType('sso_remove_cert') -EventType.sso_remove_login_url = EventType('sso_remove_login_url') -EventType.sso_remove_logout_url = EventType('sso_remove_logout_url') -EventType.team_folder_change_status = EventType('team_folder_change_status') -EventType.team_folder_create = EventType('team_folder_create') -EventType.team_folder_downgrade = EventType('team_folder_downgrade') -EventType.team_folder_permanently_delete = EventType('team_folder_permanently_delete') -EventType.team_folder_rename = EventType('team_folder_rename') -EventType.account_capture_change_policy = EventType('account_capture_change_policy') -EventType.allow_download_disabled = EventType('allow_download_disabled') -EventType.allow_download_enabled = EventType('allow_download_enabled') -EventType.data_placement_restriction_change_policy = EventType('data_placement_restriction_change_policy') -EventType.data_placement_restriction_satisfy_policy = EventType('data_placement_restriction_satisfy_policy') -EventType.device_approvals_change_desktop_policy = EventType('device_approvals_change_desktop_policy') -EventType.device_approvals_change_mobile_policy = EventType('device_approvals_change_mobile_policy') -EventType.device_approvals_change_overage_action = EventType('device_approvals_change_overage_action') -EventType.device_approvals_change_unlink_action = EventType('device_approvals_change_unlink_action') -EventType.emm_add_exception = EventType('emm_add_exception') -EventType.emm_change_policy = EventType('emm_change_policy') -EventType.emm_remove_exception = EventType('emm_remove_exception') -EventType.extended_version_history_change_policy = EventType('extended_version_history_change_policy') -EventType.file_comments_change_policy = EventType('file_comments_change_policy') -EventType.file_requests_change_policy = EventType('file_requests_change_policy') -EventType.file_requests_emails_enabled = EventType('file_requests_emails_enabled') -EventType.file_requests_emails_restricted_to_team_only = EventType('file_requests_emails_restricted_to_team_only') -EventType.google_sso_change_policy = EventType('google_sso_change_policy') -EventType.group_user_management_change_policy = EventType('group_user_management_change_policy') -EventType.member_requests_change_policy = EventType('member_requests_change_policy') -EventType.member_space_limits_add_exception = EventType('member_space_limits_add_exception') -EventType.member_space_limits_change_policy = EventType('member_space_limits_change_policy') -EventType.member_space_limits_remove_exception = EventType('member_space_limits_remove_exception') -EventType.member_suggestions_change_policy = EventType('member_suggestions_change_policy') -EventType.microsoft_office_addin_change_policy = EventType('microsoft_office_addin_change_policy') -EventType.network_control_change_policy = EventType('network_control_change_policy') -EventType.paper_change_deployment_policy = EventType('paper_change_deployment_policy') -EventType.paper_change_member_link_policy = EventType('paper_change_member_link_policy') -EventType.paper_change_member_policy = EventType('paper_change_member_policy') -EventType.paper_change_policy = EventType('paper_change_policy') -EventType.permanent_delete_change_policy = EventType('permanent_delete_change_policy') -EventType.sharing_change_folder_join_policy = EventType('sharing_change_folder_join_policy') -EventType.sharing_change_link_policy = EventType('sharing_change_link_policy') -EventType.sharing_change_member_policy = EventType('sharing_change_member_policy') -EventType.smart_sync_change_policy = EventType('smart_sync_change_policy') -EventType.smart_sync_not_opt_out = EventType('smart_sync_not_opt_out') -EventType.smart_sync_opt_out = EventType('smart_sync_opt_out') -EventType.sso_change_policy = EventType('sso_change_policy') -EventType.tfa_change_policy = EventType('tfa_change_policy') -EventType.two_account_change_policy = EventType('two_account_change_policy') -EventType.web_sessions_change_fixed_length_policy = EventType('web_sessions_change_fixed_length_policy') -EventType.web_sessions_change_idle_length_policy = EventType('web_sessions_change_idle_length_policy') -EventType.team_profile_add_logo = EventType('team_profile_add_logo') -EventType.team_profile_change_default_language = EventType('team_profile_change_default_language') -EventType.team_profile_change_logo = EventType('team_profile_change_logo') -EventType.team_profile_change_name = EventType('team_profile_change_name') -EventType.team_profile_remove_logo = EventType('team_profile_remove_logo') -EventType.tfa_add_backup_phone = EventType('tfa_add_backup_phone') -EventType.tfa_add_security_key = EventType('tfa_add_security_key') -EventType.tfa_change_backup_phone = EventType('tfa_change_backup_phone') -EventType.tfa_change_status = EventType('tfa_change_status') -EventType.tfa_remove_backup_phone = EventType('tfa_remove_backup_phone') -EventType.tfa_remove_security_key = EventType('tfa_remove_security_key') -EventType.tfa_reset = EventType('tfa_reset') -EventType.other = EventType('other') - -ExtendedVersionHistoryChangePolicyDetails._new_value_validator = ExtendedVersionHistoryPolicy_validator -ExtendedVersionHistoryChangePolicyDetails._previous_value_validator = bv.Nullable(ExtendedVersionHistoryPolicy_validator) -ExtendedVersionHistoryChangePolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -ExtendedVersionHistoryChangePolicyDetails._all_fields_ = [ - ('new_value', ExtendedVersionHistoryChangePolicyDetails._new_value_validator), - ('previous_value', ExtendedVersionHistoryChangePolicyDetails._previous_value_validator), -] - -ExtendedVersionHistoryPolicy._explicitly_limited_validator = bv.Void() -ExtendedVersionHistoryPolicy._explicitly_unlimited_validator = bv.Void() -ExtendedVersionHistoryPolicy._implicitly_limited_validator = bv.Void() -ExtendedVersionHistoryPolicy._other_validator = bv.Void() -ExtendedVersionHistoryPolicy._tagmap = { - 'explicitly_limited': ExtendedVersionHistoryPolicy._explicitly_limited_validator, - 'explicitly_unlimited': ExtendedVersionHistoryPolicy._explicitly_unlimited_validator, - 'implicitly_limited': ExtendedVersionHistoryPolicy._implicitly_limited_validator, - 'other': ExtendedVersionHistoryPolicy._other_validator, -} - -ExtendedVersionHistoryPolicy.explicitly_limited = ExtendedVersionHistoryPolicy('explicitly_limited') -ExtendedVersionHistoryPolicy.explicitly_unlimited = ExtendedVersionHistoryPolicy('explicitly_unlimited') -ExtendedVersionHistoryPolicy.implicitly_limited = ExtendedVersionHistoryPolicy('implicitly_limited') -ExtendedVersionHistoryPolicy.other = ExtendedVersionHistoryPolicy('other') - -FailureDetailsLogInfo._user_friendly_message_validator = bv.Nullable(bv.String()) -FailureDetailsLogInfo._technical_error_message_validator = bv.Nullable(bv.String()) -FailureDetailsLogInfo._all_field_names_ = set([ - 'user_friendly_message', - 'technical_error_message', -]) -FailureDetailsLogInfo._all_fields_ = [ - ('user_friendly_message', FailureDetailsLogInfo._user_friendly_message_validator), - ('technical_error_message', FailureDetailsLogInfo._technical_error_message_validator), -] - -FileAddCommentDetails._target_asset_index_validator = bv.UInt64() -FileAddCommentDetails._comment_text_validator = bv.Nullable(bv.String()) -FileAddCommentDetails._all_field_names_ = set([ - 'target_asset_index', - 'comment_text', -]) -FileAddCommentDetails._all_fields_ = [ - ('target_asset_index', FileAddCommentDetails._target_asset_index_validator), - ('comment_text', FileAddCommentDetails._comment_text_validator), -] - -FileAddDetails._all_field_names_ = set([]) -FileAddDetails._all_fields_ = [] - -FileChangeCommentSubscriptionDetails._target_asset_index_validator = bv.UInt64() -FileChangeCommentSubscriptionDetails._new_value_validator = FileCommentNotificationPolicy_validator -FileChangeCommentSubscriptionDetails._previous_value_validator = bv.Nullable(FileCommentNotificationPolicy_validator) -FileChangeCommentSubscriptionDetails._all_field_names_ = set([ - 'target_asset_index', - 'new_value', - 'previous_value', -]) -FileChangeCommentSubscriptionDetails._all_fields_ = [ - ('target_asset_index', FileChangeCommentSubscriptionDetails._target_asset_index_validator), - ('new_value', FileChangeCommentSubscriptionDetails._new_value_validator), - ('previous_value', FileChangeCommentSubscriptionDetails._previous_value_validator), -] - -FileCommentNotificationPolicy._disabled_validator = bv.Void() -FileCommentNotificationPolicy._enabled_validator = bv.Void() -FileCommentNotificationPolicy._other_validator = bv.Void() -FileCommentNotificationPolicy._tagmap = { - 'disabled': FileCommentNotificationPolicy._disabled_validator, - 'enabled': FileCommentNotificationPolicy._enabled_validator, - 'other': FileCommentNotificationPolicy._other_validator, -} - -FileCommentNotificationPolicy.disabled = FileCommentNotificationPolicy('disabled') -FileCommentNotificationPolicy.enabled = FileCommentNotificationPolicy('enabled') -FileCommentNotificationPolicy.other = FileCommentNotificationPolicy('other') - -FileCommentsChangePolicyDetails._new_value_validator = FileCommentsPolicy_validator -FileCommentsChangePolicyDetails._previous_value_validator = bv.Nullable(FileCommentsPolicy_validator) -FileCommentsChangePolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -FileCommentsChangePolicyDetails._all_fields_ = [ - ('new_value', FileCommentsChangePolicyDetails._new_value_validator), - ('previous_value', FileCommentsChangePolicyDetails._previous_value_validator), -] - -FileCommentsPolicy._disabled_validator = bv.Void() -FileCommentsPolicy._enabled_validator = bv.Void() -FileCommentsPolicy._other_validator = bv.Void() -FileCommentsPolicy._tagmap = { - 'disabled': FileCommentsPolicy._disabled_validator, - 'enabled': FileCommentsPolicy._enabled_validator, - 'other': FileCommentsPolicy._other_validator, -} - -FileCommentsPolicy.disabled = FileCommentsPolicy('disabled') -FileCommentsPolicy.enabled = FileCommentsPolicy('enabled') -FileCommentsPolicy.other = FileCommentsPolicy('other') - -FileCopyDetails._relocate_action_details_validator = bv.List(RelocateAssetReferencesLogInfo_validator) -FileCopyDetails._all_field_names_ = set(['relocate_action_details']) -FileCopyDetails._all_fields_ = [('relocate_action_details', FileCopyDetails._relocate_action_details_validator)] - -FileDeleteCommentDetails._target_asset_index_validator = bv.UInt64() -FileDeleteCommentDetails._comment_text_validator = bv.Nullable(bv.String()) -FileDeleteCommentDetails._all_field_names_ = set([ - 'target_asset_index', - 'comment_text', -]) -FileDeleteCommentDetails._all_fields_ = [ - ('target_asset_index', FileDeleteCommentDetails._target_asset_index_validator), - ('comment_text', FileDeleteCommentDetails._comment_text_validator), -] - -FileDeleteDetails._all_field_names_ = set([]) -FileDeleteDetails._all_fields_ = [] - -FileDownloadDetails._all_field_names_ = set([]) -FileDownloadDetails._all_fields_ = [] - -FileEditDetails._all_field_names_ = set([]) -FileEditDetails._all_fields_ = [] - -FileGetCopyReferenceDetails._all_field_names_ = set([]) -FileGetCopyReferenceDetails._all_fields_ = [] - -FileLikeCommentDetails._target_asset_index_validator = bv.UInt64() -FileLikeCommentDetails._comment_text_validator = bv.Nullable(bv.String()) -FileLikeCommentDetails._all_field_names_ = set([ - 'target_asset_index', - 'comment_text', -]) -FileLikeCommentDetails._all_fields_ = [ - ('target_asset_index', FileLikeCommentDetails._target_asset_index_validator), - ('comment_text', FileLikeCommentDetails._comment_text_validator), -] - -FileOrFolderLogInfo._path_validator = PathLogInfo_validator -FileOrFolderLogInfo._display_name_validator = bv.Nullable(bv.String()) -FileOrFolderLogInfo._file_id_validator = bv.Nullable(bv.String()) -FileOrFolderLogInfo._all_field_names_ = set([ - 'path', - 'display_name', - 'file_id', -]) -FileOrFolderLogInfo._all_fields_ = [ - ('path', FileOrFolderLogInfo._path_validator), - ('display_name', FileOrFolderLogInfo._display_name_validator), - ('file_id', FileOrFolderLogInfo._file_id_validator), -] - -FileLogInfo._all_field_names_ = FileOrFolderLogInfo._all_field_names_.union(set([])) -FileLogInfo._all_fields_ = FileOrFolderLogInfo._all_fields_ + [] - -FileMoveDetails._relocate_action_details_validator = bv.List(RelocateAssetReferencesLogInfo_validator) -FileMoveDetails._all_field_names_ = set(['relocate_action_details']) -FileMoveDetails._all_fields_ = [('relocate_action_details', FileMoveDetails._relocate_action_details_validator)] - -FilePermanentlyDeleteDetails._all_field_names_ = set([]) -FilePermanentlyDeleteDetails._all_fields_ = [] - -FilePreviewDetails._all_field_names_ = set([]) -FilePreviewDetails._all_fields_ = [] - -FileRenameDetails._relocate_action_details_validator = bv.List(RelocateAssetReferencesLogInfo_validator) -FileRenameDetails._all_field_names_ = set(['relocate_action_details']) -FileRenameDetails._all_fields_ = [('relocate_action_details', FileRenameDetails._relocate_action_details_validator)] - -FileRequestAddDeadlineDetails._request_title_validator = bv.Nullable(bv.String()) -FileRequestAddDeadlineDetails._all_field_names_ = set(['request_title']) -FileRequestAddDeadlineDetails._all_fields_ = [('request_title', FileRequestAddDeadlineDetails._request_title_validator)] - -FileRequestChangeFolderDetails._request_title_validator = bv.Nullable(bv.String()) -FileRequestChangeFolderDetails._all_field_names_ = set(['request_title']) -FileRequestChangeFolderDetails._all_fields_ = [('request_title', FileRequestChangeFolderDetails._request_title_validator)] - -FileRequestChangeTitleDetails._request_title_validator = bv.Nullable(bv.String()) -FileRequestChangeTitleDetails._all_field_names_ = set(['request_title']) -FileRequestChangeTitleDetails._all_fields_ = [('request_title', FileRequestChangeTitleDetails._request_title_validator)] - -FileRequestCloseDetails._request_title_validator = bv.Nullable(bv.String()) -FileRequestCloseDetails._all_field_names_ = set(['request_title']) -FileRequestCloseDetails._all_fields_ = [('request_title', FileRequestCloseDetails._request_title_validator)] - -FileRequestCreateDetails._request_title_validator = bv.Nullable(bv.String()) -FileRequestCreateDetails._all_field_names_ = set(['request_title']) -FileRequestCreateDetails._all_fields_ = [('request_title', FileRequestCreateDetails._request_title_validator)] - -FileRequestReceiveFileDetails._request_title_validator = bv.Nullable(bv.String()) -FileRequestReceiveFileDetails._submitted_file_names_validator = bv.List(bv.String()) -FileRequestReceiveFileDetails._all_field_names_ = set([ - 'request_title', - 'submitted_file_names', -]) -FileRequestReceiveFileDetails._all_fields_ = [ - ('request_title', FileRequestReceiveFileDetails._request_title_validator), - ('submitted_file_names', FileRequestReceiveFileDetails._submitted_file_names_validator), -] - -FileRequestRemoveDeadlineDetails._request_title_validator = bv.Nullable(bv.String()) -FileRequestRemoveDeadlineDetails._all_field_names_ = set(['request_title']) -FileRequestRemoveDeadlineDetails._all_fields_ = [('request_title', FileRequestRemoveDeadlineDetails._request_title_validator)] - -FileRequestSendDetails._request_title_validator = bv.Nullable(bv.String()) -FileRequestSendDetails._all_field_names_ = set(['request_title']) -FileRequestSendDetails._all_fields_ = [('request_title', FileRequestSendDetails._request_title_validator)] - -FileRequestsChangePolicyDetails._new_value_validator = FileRequestsPolicy_validator -FileRequestsChangePolicyDetails._previous_value_validator = bv.Nullable(FileRequestsPolicy_validator) -FileRequestsChangePolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -FileRequestsChangePolicyDetails._all_fields_ = [ - ('new_value', FileRequestsChangePolicyDetails._new_value_validator), - ('previous_value', FileRequestsChangePolicyDetails._previous_value_validator), -] - -FileRequestsEmailsEnabledDetails._all_field_names_ = set([]) -FileRequestsEmailsEnabledDetails._all_fields_ = [] - -FileRequestsEmailsRestrictedToTeamOnlyDetails._all_field_names_ = set([]) -FileRequestsEmailsRestrictedToTeamOnlyDetails._all_fields_ = [] - -FileRequestsPolicy._disabled_validator = bv.Void() -FileRequestsPolicy._enabled_validator = bv.Void() -FileRequestsPolicy._other_validator = bv.Void() -FileRequestsPolicy._tagmap = { - 'disabled': FileRequestsPolicy._disabled_validator, - 'enabled': FileRequestsPolicy._enabled_validator, - 'other': FileRequestsPolicy._other_validator, -} - -FileRequestsPolicy.disabled = FileRequestsPolicy('disabled') -FileRequestsPolicy.enabled = FileRequestsPolicy('enabled') -FileRequestsPolicy.other = FileRequestsPolicy('other') - -FileResolveCommentDetails._target_asset_index_validator = bv.UInt64() -FileResolveCommentDetails._comment_text_validator = bv.Nullable(bv.String()) -FileResolveCommentDetails._all_field_names_ = set([ - 'target_asset_index', - 'comment_text', -]) -FileResolveCommentDetails._all_fields_ = [ - ('target_asset_index', FileResolveCommentDetails._target_asset_index_validator), - ('comment_text', FileResolveCommentDetails._comment_text_validator), -] - -FileRestoreDetails._all_field_names_ = set([]) -FileRestoreDetails._all_fields_ = [] - -FileRevertDetails._all_field_names_ = set([]) -FileRevertDetails._all_fields_ = [] - -FileRollbackChangesDetails._all_field_names_ = set([]) -FileRollbackChangesDetails._all_fields_ = [] - -FileSaveCopyReferenceDetails._relocate_action_details_validator = bv.List(RelocateAssetReferencesLogInfo_validator) -FileSaveCopyReferenceDetails._all_field_names_ = set(['relocate_action_details']) -FileSaveCopyReferenceDetails._all_fields_ = [('relocate_action_details', FileSaveCopyReferenceDetails._relocate_action_details_validator)] - -FileUnlikeCommentDetails._target_asset_index_validator = bv.UInt64() -FileUnlikeCommentDetails._comment_text_validator = bv.Nullable(bv.String()) -FileUnlikeCommentDetails._all_field_names_ = set([ - 'target_asset_index', - 'comment_text', -]) -FileUnlikeCommentDetails._all_fields_ = [ - ('target_asset_index', FileUnlikeCommentDetails._target_asset_index_validator), - ('comment_text', FileUnlikeCommentDetails._comment_text_validator), -] - -FileUnresolveCommentDetails._target_asset_index_validator = bv.UInt64() -FileUnresolveCommentDetails._comment_text_validator = bv.Nullable(bv.String()) -FileUnresolveCommentDetails._all_field_names_ = set([ - 'target_asset_index', - 'comment_text', -]) -FileUnresolveCommentDetails._all_fields_ = [ - ('target_asset_index', FileUnresolveCommentDetails._target_asset_index_validator), - ('comment_text', FileUnresolveCommentDetails._comment_text_validator), -] - -FolderLogInfo._all_field_names_ = FileOrFolderLogInfo._all_field_names_.union(set([])) -FolderLogInfo._all_fields_ = FileOrFolderLogInfo._all_fields_ + [] - -GeoLocationLogInfo._city_validator = bv.Nullable(bv.String()) -GeoLocationLogInfo._region_validator = bv.Nullable(bv.String()) -GeoLocationLogInfo._country_validator = bv.Nullable(bv.String()) -GeoLocationLogInfo._ip_address_validator = IpAddress_validator -GeoLocationLogInfo._all_field_names_ = set([ - 'city', - 'region', - 'country', - 'ip_address', -]) -GeoLocationLogInfo._all_fields_ = [ - ('city', GeoLocationLogInfo._city_validator), - ('region', GeoLocationLogInfo._region_validator), - ('country', GeoLocationLogInfo._country_validator), - ('ip_address', GeoLocationLogInfo._ip_address_validator), -] - -GetTeamEventsArg._limit_validator = bv.UInt32(min_value=1, max_value=1000) -GetTeamEventsArg._account_id_validator = bv.Nullable(users_common.AccountId_validator) -GetTeamEventsArg._time_validator = bv.Nullable(team_common.TimeRange_validator) -GetTeamEventsArg._category_validator = bv.Nullable(EventCategory_validator) -GetTeamEventsArg._all_field_names_ = set([ - 'limit', - 'account_id', - 'time', - 'category', -]) -GetTeamEventsArg._all_fields_ = [ - ('limit', GetTeamEventsArg._limit_validator), - ('account_id', GetTeamEventsArg._account_id_validator), - ('time', GetTeamEventsArg._time_validator), - ('category', GetTeamEventsArg._category_validator), -] - -GetTeamEventsContinueArg._cursor_validator = bv.String() -GetTeamEventsContinueArg._all_field_names_ = set(['cursor']) -GetTeamEventsContinueArg._all_fields_ = [('cursor', GetTeamEventsContinueArg._cursor_validator)] - -GetTeamEventsContinueError._bad_cursor_validator = bv.Void() -GetTeamEventsContinueError._other_validator = bv.Void() -GetTeamEventsContinueError._tagmap = { - 'bad_cursor': GetTeamEventsContinueError._bad_cursor_validator, - 'other': GetTeamEventsContinueError._other_validator, -} - -GetTeamEventsContinueError.bad_cursor = GetTeamEventsContinueError('bad_cursor') -GetTeamEventsContinueError.other = GetTeamEventsContinueError('other') - -GetTeamEventsError._account_id_not_found_validator = bv.Void() -GetTeamEventsError._invalid_time_range_validator = bv.Void() -GetTeamEventsError._other_validator = bv.Void() -GetTeamEventsError._tagmap = { - 'account_id_not_found': GetTeamEventsError._account_id_not_found_validator, - 'invalid_time_range': GetTeamEventsError._invalid_time_range_validator, - 'other': GetTeamEventsError._other_validator, -} - -GetTeamEventsError.account_id_not_found = GetTeamEventsError('account_id_not_found') -GetTeamEventsError.invalid_time_range = GetTeamEventsError('invalid_time_range') -GetTeamEventsError.other = GetTeamEventsError('other') - -GetTeamEventsResult._events_validator = bv.List(TeamEvent_validator) -GetTeamEventsResult._cursor_validator = bv.String() -GetTeamEventsResult._has_more_validator = bv.Boolean() -GetTeamEventsResult._all_field_names_ = set([ - 'events', - 'cursor', - 'has_more', -]) -GetTeamEventsResult._all_fields_ = [ - ('events', GetTeamEventsResult._events_validator), - ('cursor', GetTeamEventsResult._cursor_validator), - ('has_more', GetTeamEventsResult._has_more_validator), -] - -GoogleSsoChangePolicyDetails._new_value_validator = GoogleSsoPolicy_validator -GoogleSsoChangePolicyDetails._previous_value_validator = bv.Nullable(GoogleSsoPolicy_validator) -GoogleSsoChangePolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -GoogleSsoChangePolicyDetails._all_fields_ = [ - ('new_value', GoogleSsoChangePolicyDetails._new_value_validator), - ('previous_value', GoogleSsoChangePolicyDetails._previous_value_validator), -] - -GoogleSsoPolicy._disabled_validator = bv.Void() -GoogleSsoPolicy._enabled_validator = bv.Void() -GoogleSsoPolicy._other_validator = bv.Void() -GoogleSsoPolicy._tagmap = { - 'disabled': GoogleSsoPolicy._disabled_validator, - 'enabled': GoogleSsoPolicy._enabled_validator, - 'other': GoogleSsoPolicy._other_validator, -} - -GoogleSsoPolicy.disabled = GoogleSsoPolicy('disabled') -GoogleSsoPolicy.enabled = GoogleSsoPolicy('enabled') -GoogleSsoPolicy.other = GoogleSsoPolicy('other') - -GroupAddExternalIdDetails._new_value_validator = team_common.GroupExternalId_validator -GroupAddExternalIdDetails._all_field_names_ = set(['new_value']) -GroupAddExternalIdDetails._all_fields_ = [('new_value', GroupAddExternalIdDetails._new_value_validator)] - -GroupAddMemberDetails._is_group_owner_validator = bv.Boolean() -GroupAddMemberDetails._all_field_names_ = set(['is_group_owner']) -GroupAddMemberDetails._all_fields_ = [('is_group_owner', GroupAddMemberDetails._is_group_owner_validator)] - -GroupChangeExternalIdDetails._new_value_validator = team_common.GroupExternalId_validator -GroupChangeExternalIdDetails._previous_value_validator = team_common.GroupExternalId_validator -GroupChangeExternalIdDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -GroupChangeExternalIdDetails._all_fields_ = [ - ('new_value', GroupChangeExternalIdDetails._new_value_validator), - ('previous_value', GroupChangeExternalIdDetails._previous_value_validator), -] - -GroupChangeManagementTypeDetails._new_value_validator = team_common.GroupManagementType_validator -GroupChangeManagementTypeDetails._previous_value_validator = bv.Nullable(team_common.GroupManagementType_validator) -GroupChangeManagementTypeDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -GroupChangeManagementTypeDetails._all_fields_ = [ - ('new_value', GroupChangeManagementTypeDetails._new_value_validator), - ('previous_value', GroupChangeManagementTypeDetails._previous_value_validator), -] - -GroupChangeMemberRoleDetails._is_group_owner_validator = bv.Boolean() -GroupChangeMemberRoleDetails._all_field_names_ = set(['is_group_owner']) -GroupChangeMemberRoleDetails._all_fields_ = [('is_group_owner', GroupChangeMemberRoleDetails._is_group_owner_validator)] - -GroupCreateDetails._is_company_managed_validator = bv.Nullable(bv.Boolean()) -GroupCreateDetails._join_policy_validator = GroupJoinPolicy_validator -GroupCreateDetails._all_field_names_ = set([ - 'is_company_managed', - 'join_policy', -]) -GroupCreateDetails._all_fields_ = [ - ('is_company_managed', GroupCreateDetails._is_company_managed_validator), - ('join_policy', GroupCreateDetails._join_policy_validator), -] - -GroupDeleteDetails._is_company_managed_validator = bv.Nullable(bv.Boolean()) -GroupDeleteDetails._all_field_names_ = set(['is_company_managed']) -GroupDeleteDetails._all_fields_ = [('is_company_managed', GroupDeleteDetails._is_company_managed_validator)] - -GroupJoinPolicy._open_validator = bv.Void() -GroupJoinPolicy._request_to_join_validator = bv.Void() -GroupJoinPolicy._other_validator = bv.Void() -GroupJoinPolicy._tagmap = { - 'open': GroupJoinPolicy._open_validator, - 'request_to_join': GroupJoinPolicy._request_to_join_validator, - 'other': GroupJoinPolicy._other_validator, -} - -GroupJoinPolicy.open = GroupJoinPolicy('open') -GroupJoinPolicy.request_to_join = GroupJoinPolicy('request_to_join') -GroupJoinPolicy.other = GroupJoinPolicy('other') - -GroupLogInfo._group_id_validator = bv.Nullable(team_common.GroupId_validator) -GroupLogInfo._display_name_validator = bv.String() -GroupLogInfo._external_id_validator = bv.Nullable(team_common.GroupExternalId_validator) -GroupLogInfo._all_field_names_ = set([ - 'group_id', - 'display_name', - 'external_id', -]) -GroupLogInfo._all_fields_ = [ - ('group_id', GroupLogInfo._group_id_validator), - ('display_name', GroupLogInfo._display_name_validator), - ('external_id', GroupLogInfo._external_id_validator), -] - -GroupMovedDetails._all_field_names_ = set([]) -GroupMovedDetails._all_fields_ = [] - -GroupRemoveExternalIdDetails._previous_value_validator = team_common.GroupExternalId_validator -GroupRemoveExternalIdDetails._all_field_names_ = set(['previous_value']) -GroupRemoveExternalIdDetails._all_fields_ = [('previous_value', GroupRemoveExternalIdDetails._previous_value_validator)] - -GroupRemoveMemberDetails._all_field_names_ = set([]) -GroupRemoveMemberDetails._all_fields_ = [] - -GroupRenameDetails._previous_value_validator = bv.String() -GroupRenameDetails._new_value_validator = bv.String() -GroupRenameDetails._all_field_names_ = set([ - 'previous_value', - 'new_value', -]) -GroupRenameDetails._all_fields_ = [ - ('previous_value', GroupRenameDetails._previous_value_validator), - ('new_value', GroupRenameDetails._new_value_validator), -] - -GroupUserManagementChangePolicyDetails._new_value_validator = GroupUserManagementPolicy_validator -GroupUserManagementChangePolicyDetails._previous_value_validator = bv.Nullable(GroupUserManagementPolicy_validator) -GroupUserManagementChangePolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -GroupUserManagementChangePolicyDetails._all_fields_ = [ - ('new_value', GroupUserManagementChangePolicyDetails._new_value_validator), - ('previous_value', GroupUserManagementChangePolicyDetails._previous_value_validator), -] - -GroupUserManagementPolicy._admins_only_validator = bv.Void() -GroupUserManagementPolicy._all_users_validator = bv.Void() -GroupUserManagementPolicy._other_validator = bv.Void() -GroupUserManagementPolicy._tagmap = { - 'admins_only': GroupUserManagementPolicy._admins_only_validator, - 'all_users': GroupUserManagementPolicy._all_users_validator, - 'other': GroupUserManagementPolicy._other_validator, -} - -GroupUserManagementPolicy.admins_only = GroupUserManagementPolicy('admins_only') -GroupUserManagementPolicy.all_users = GroupUserManagementPolicy('all_users') -GroupUserManagementPolicy.other = GroupUserManagementPolicy('other') - -HostLogInfo._host_id_validator = bv.Nullable(bv.UInt64()) -HostLogInfo._host_name_validator = bv.Nullable(bv.String()) -HostLogInfo._all_field_names_ = set([ - 'host_id', - 'host_name', -]) -HostLogInfo._all_fields_ = [ - ('host_id', HostLogInfo._host_id_validator), - ('host_name', HostLogInfo._host_name_validator), -] - -JoinTeamDetails._linked_apps_validator = bv.List(AppLogInfo_validator) -JoinTeamDetails._linked_devices_validator = bv.List(DeviceLogInfo_validator) -JoinTeamDetails._linked_shared_folders_validator = bv.List(FolderLogInfo_validator) -JoinTeamDetails._all_field_names_ = set([ - 'linked_apps', - 'linked_devices', - 'linked_shared_folders', -]) -JoinTeamDetails._all_fields_ = [ - ('linked_apps', JoinTeamDetails._linked_apps_validator), - ('linked_devices', JoinTeamDetails._linked_devices_validator), - ('linked_shared_folders', JoinTeamDetails._linked_shared_folders_validator), -] - -LinkAudience._public_validator = bv.Void() -LinkAudience._team_validator = bv.Void() -LinkAudience._members_validator = bv.Void() -LinkAudience._other_validator = bv.Void() -LinkAudience._tagmap = { - 'public': LinkAudience._public_validator, - 'team': LinkAudience._team_validator, - 'members': LinkAudience._members_validator, - 'other': LinkAudience._other_validator, -} - -LinkAudience.public = LinkAudience('public') -LinkAudience.team = LinkAudience('team') -LinkAudience.members = LinkAudience('members') -LinkAudience.other = LinkAudience('other') - -LogoutDetails._all_field_names_ = set([]) -LogoutDetails._all_fields_ = [] - -MemberAddNameDetails._value_validator = UserNameLogInfo_validator -MemberAddNameDetails._all_field_names_ = set(['value']) -MemberAddNameDetails._all_fields_ = [('value', MemberAddNameDetails._value_validator)] - -MemberChangeAdminRoleDetails._new_value_validator = bv.Nullable(AdminRole_validator) -MemberChangeAdminRoleDetails._previous_value_validator = bv.Nullable(AdminRole_validator) -MemberChangeAdminRoleDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -MemberChangeAdminRoleDetails._all_fields_ = [ - ('new_value', MemberChangeAdminRoleDetails._new_value_validator), - ('previous_value', MemberChangeAdminRoleDetails._previous_value_validator), -] - -MemberChangeEmailDetails._new_value_validator = common.EmailAddress_validator -MemberChangeEmailDetails._previous_value_validator = bv.Nullable(common.EmailAddress_validator) -MemberChangeEmailDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -MemberChangeEmailDetails._all_fields_ = [ - ('new_value', MemberChangeEmailDetails._new_value_validator), - ('previous_value', MemberChangeEmailDetails._previous_value_validator), -] - -MemberChangeMembershipTypeDetails._prev_value_validator = TeamMembershipType_validator -MemberChangeMembershipTypeDetails._new_value_validator = TeamMembershipType_validator -MemberChangeMembershipTypeDetails._all_field_names_ = set([ - 'prev_value', - 'new_value', -]) -MemberChangeMembershipTypeDetails._all_fields_ = [ - ('prev_value', MemberChangeMembershipTypeDetails._prev_value_validator), - ('new_value', MemberChangeMembershipTypeDetails._new_value_validator), -] - -MemberChangeNameDetails._new_value_validator = UserNameLogInfo_validator -MemberChangeNameDetails._previous_value_validator = bv.Nullable(UserNameLogInfo_validator) -MemberChangeNameDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -MemberChangeNameDetails._all_fields_ = [ - ('new_value', MemberChangeNameDetails._new_value_validator), - ('previous_value', MemberChangeNameDetails._previous_value_validator), -] - -MemberChangeStatusDetails._previous_value_validator = bv.Nullable(MemberStatus_validator) -MemberChangeStatusDetails._new_value_validator = MemberStatus_validator -MemberChangeStatusDetails._team_join_details_validator = bv.Nullable(JoinTeamDetails_validator) -MemberChangeStatusDetails._all_field_names_ = set([ - 'previous_value', - 'new_value', - 'team_join_details', -]) -MemberChangeStatusDetails._all_fields_ = [ - ('previous_value', MemberChangeStatusDetails._previous_value_validator), - ('new_value', MemberChangeStatusDetails._new_value_validator), - ('team_join_details', MemberChangeStatusDetails._team_join_details_validator), -] - -MemberPermanentlyDeleteAccountContentsDetails._all_field_names_ = set([]) -MemberPermanentlyDeleteAccountContentsDetails._all_fields_ = [] - -MemberRequestsChangePolicyDetails._new_value_validator = MemberRequestsPolicy_validator -MemberRequestsChangePolicyDetails._previous_value_validator = bv.Nullable(MemberRequestsPolicy_validator) -MemberRequestsChangePolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -MemberRequestsChangePolicyDetails._all_fields_ = [ - ('new_value', MemberRequestsChangePolicyDetails._new_value_validator), - ('previous_value', MemberRequestsChangePolicyDetails._previous_value_validator), -] - -MemberRequestsPolicy._auto_accept_validator = bv.Void() -MemberRequestsPolicy._disabled_validator = bv.Void() -MemberRequestsPolicy._require_approval_validator = bv.Void() -MemberRequestsPolicy._other_validator = bv.Void() -MemberRequestsPolicy._tagmap = { - 'auto_accept': MemberRequestsPolicy._auto_accept_validator, - 'disabled': MemberRequestsPolicy._disabled_validator, - 'require_approval': MemberRequestsPolicy._require_approval_validator, - 'other': MemberRequestsPolicy._other_validator, -} - -MemberRequestsPolicy.auto_accept = MemberRequestsPolicy('auto_accept') -MemberRequestsPolicy.disabled = MemberRequestsPolicy('disabled') -MemberRequestsPolicy.require_approval = MemberRequestsPolicy('require_approval') -MemberRequestsPolicy.other = MemberRequestsPolicy('other') - -MemberSpaceLimitsAddExceptionDetails._all_field_names_ = set([]) -MemberSpaceLimitsAddExceptionDetails._all_fields_ = [] - -MemberSpaceLimitsChangePolicyDetails._previous_value_validator = SpaceLimitsLevel_validator -MemberSpaceLimitsChangePolicyDetails._new_value_validator = SpaceLimitsLevel_validator -MemberSpaceLimitsChangePolicyDetails._all_field_names_ = set([ - 'previous_value', - 'new_value', -]) -MemberSpaceLimitsChangePolicyDetails._all_fields_ = [ - ('previous_value', MemberSpaceLimitsChangePolicyDetails._previous_value_validator), - ('new_value', MemberSpaceLimitsChangePolicyDetails._new_value_validator), -] - -MemberSpaceLimitsChangeStatusDetails._previous_value_validator = SpaceLimitsStatus_validator -MemberSpaceLimitsChangeStatusDetails._new_value_validator = SpaceLimitsStatus_validator -MemberSpaceLimitsChangeStatusDetails._all_field_names_ = set([ - 'previous_value', - 'new_value', -]) -MemberSpaceLimitsChangeStatusDetails._all_fields_ = [ - ('previous_value', MemberSpaceLimitsChangeStatusDetails._previous_value_validator), - ('new_value', MemberSpaceLimitsChangeStatusDetails._new_value_validator), -] - -MemberSpaceLimitsRemoveExceptionDetails._all_field_names_ = set([]) -MemberSpaceLimitsRemoveExceptionDetails._all_fields_ = [] - -MemberStatus._not_joined_validator = bv.Void() -MemberStatus._invited_validator = bv.Void() -MemberStatus._active_validator = bv.Void() -MemberStatus._suspended_validator = bv.Void() -MemberStatus._removed_validator = bv.Void() -MemberStatus._other_validator = bv.Void() -MemberStatus._tagmap = { - 'not_joined': MemberStatus._not_joined_validator, - 'invited': MemberStatus._invited_validator, - 'active': MemberStatus._active_validator, - 'suspended': MemberStatus._suspended_validator, - 'removed': MemberStatus._removed_validator, - 'other': MemberStatus._other_validator, -} - -MemberStatus.not_joined = MemberStatus('not_joined') -MemberStatus.invited = MemberStatus('invited') -MemberStatus.active = MemberStatus('active') -MemberStatus.suspended = MemberStatus('suspended') -MemberStatus.removed = MemberStatus('removed') -MemberStatus.other = MemberStatus('other') - -MemberSuggestDetails._all_field_names_ = set([]) -MemberSuggestDetails._all_fields_ = [] - -MemberSuggestionsChangePolicyDetails._new_value_validator = MemberSuggestionsPolicy_validator -MemberSuggestionsChangePolicyDetails._previous_value_validator = bv.Nullable(MemberSuggestionsPolicy_validator) -MemberSuggestionsChangePolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -MemberSuggestionsChangePolicyDetails._all_fields_ = [ - ('new_value', MemberSuggestionsChangePolicyDetails._new_value_validator), - ('previous_value', MemberSuggestionsChangePolicyDetails._previous_value_validator), -] - -MemberSuggestionsPolicy._disabled_validator = bv.Void() -MemberSuggestionsPolicy._enabled_validator = bv.Void() -MemberSuggestionsPolicy._other_validator = bv.Void() -MemberSuggestionsPolicy._tagmap = { - 'disabled': MemberSuggestionsPolicy._disabled_validator, - 'enabled': MemberSuggestionsPolicy._enabled_validator, - 'other': MemberSuggestionsPolicy._other_validator, -} - -MemberSuggestionsPolicy.disabled = MemberSuggestionsPolicy('disabled') -MemberSuggestionsPolicy.enabled = MemberSuggestionsPolicy('enabled') -MemberSuggestionsPolicy.other = MemberSuggestionsPolicy('other') - -MemberTransferAccountContentsDetails._src_participant_index_validator = bv.UInt64() -MemberTransferAccountContentsDetails._dest_participant_index_validator = bv.UInt64() -MemberTransferAccountContentsDetails._all_field_names_ = set([ - 'src_participant_index', - 'dest_participant_index', -]) -MemberTransferAccountContentsDetails._all_fields_ = [ - ('src_participant_index', MemberTransferAccountContentsDetails._src_participant_index_validator), - ('dest_participant_index', MemberTransferAccountContentsDetails._dest_participant_index_validator), -] - -MicrosoftOfficeAddinChangePolicyDetails._new_value_validator = MicrosoftOfficeAddinPolicy_validator -MicrosoftOfficeAddinChangePolicyDetails._previous_value_validator = bv.Nullable(MicrosoftOfficeAddinPolicy_validator) -MicrosoftOfficeAddinChangePolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -MicrosoftOfficeAddinChangePolicyDetails._all_fields_ = [ - ('new_value', MicrosoftOfficeAddinChangePolicyDetails._new_value_validator), - ('previous_value', MicrosoftOfficeAddinChangePolicyDetails._previous_value_validator), -] - -MicrosoftOfficeAddinPolicy._disabled_validator = bv.Void() -MicrosoftOfficeAddinPolicy._enabled_validator = bv.Void() -MicrosoftOfficeAddinPolicy._other_validator = bv.Void() -MicrosoftOfficeAddinPolicy._tagmap = { - 'disabled': MicrosoftOfficeAddinPolicy._disabled_validator, - 'enabled': MicrosoftOfficeAddinPolicy._enabled_validator, - 'other': MicrosoftOfficeAddinPolicy._other_validator, -} - -MicrosoftOfficeAddinPolicy.disabled = MicrosoftOfficeAddinPolicy('disabled') -MicrosoftOfficeAddinPolicy.enabled = MicrosoftOfficeAddinPolicy('enabled') -MicrosoftOfficeAddinPolicy.other = MicrosoftOfficeAddinPolicy('other') - -MissingDetails._all_field_names_ = set([]) -MissingDetails._all_fields_ = [] - -MobileSessionLogInfo._field_names_ = set([]) -MobileSessionLogInfo._all_field_names_ = SessionLogInfo._all_field_names_.union(MobileSessionLogInfo._field_names_) -MobileSessionLogInfo._fields_ = [] -MobileSessionLogInfo._all_fields_ = SessionLogInfo._all_fields_ + MobileSessionLogInfo._fields_ - -NamespaceRelativePathLogInfo._ns_id_validator = bv.Nullable(common.NamespaceId_validator) -NamespaceRelativePathLogInfo._relative_path_validator = bv.Nullable(files.Path_validator) -NamespaceRelativePathLogInfo._all_field_names_ = set([ - 'ns_id', - 'relative_path', -]) -NamespaceRelativePathLogInfo._all_fields_ = [ - ('ns_id', NamespaceRelativePathLogInfo._ns_id_validator), - ('relative_path', NamespaceRelativePathLogInfo._relative_path_validator), -] - -NetworkControlChangePolicyDetails._new_value_validator = NetworkControlPolicy_validator -NetworkControlChangePolicyDetails._previous_value_validator = bv.Nullable(NetworkControlPolicy_validator) -NetworkControlChangePolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -NetworkControlChangePolicyDetails._all_fields_ = [ - ('new_value', NetworkControlChangePolicyDetails._new_value_validator), - ('previous_value', NetworkControlChangePolicyDetails._previous_value_validator), -] - -NetworkControlPolicy._disabled_validator = bv.Void() -NetworkControlPolicy._enabled_validator = bv.Void() -NetworkControlPolicy._other_validator = bv.Void() -NetworkControlPolicy._tagmap = { - 'disabled': NetworkControlPolicy._disabled_validator, - 'enabled': NetworkControlPolicy._enabled_validator, - 'other': NetworkControlPolicy._other_validator, -} - -NetworkControlPolicy.disabled = NetworkControlPolicy('disabled') -NetworkControlPolicy.enabled = NetworkControlPolicy('enabled') -NetworkControlPolicy.other = NetworkControlPolicy('other') - -UserLogInfo._account_id_validator = bv.Nullable(users_common.AccountId_validator) -UserLogInfo._display_name_validator = bv.Nullable(common.DisplayNameLegacy_validator) -UserLogInfo._email_validator = bv.Nullable(common.EmailAddress_validator) -UserLogInfo._field_names_ = set([ - 'account_id', - 'display_name', - 'email', -]) -UserLogInfo._all_field_names_ = UserLogInfo._field_names_ -UserLogInfo._fields_ = [ - ('account_id', UserLogInfo._account_id_validator), - ('display_name', UserLogInfo._display_name_validator), - ('email', UserLogInfo._email_validator), -] -UserLogInfo._all_fields_ = UserLogInfo._fields_ - -UserLogInfo._tag_to_subtype_ = { - (u'team_member',): TeamMemberLogInfo_validator, - (u'non_team_member',): NonTeamMemberLogInfo_validator, -} -UserLogInfo._pytype_to_tag_and_subtype_ = { - TeamMemberLogInfo: ((u'team_member',), TeamMemberLogInfo_validator), - NonTeamMemberLogInfo: ((u'non_team_member',), NonTeamMemberLogInfo_validator), -} -UserLogInfo._is_catch_all_ = True - -NonTeamMemberLogInfo._field_names_ = set([]) -NonTeamMemberLogInfo._all_field_names_ = UserLogInfo._all_field_names_.union(NonTeamMemberLogInfo._field_names_) -NonTeamMemberLogInfo._fields_ = [] -NonTeamMemberLogInfo._all_fields_ = UserLogInfo._all_fields_ + NonTeamMemberLogInfo._fields_ - -NoteAclInviteOnlyDetails._all_field_names_ = set([]) -NoteAclInviteOnlyDetails._all_fields_ = [] - -NoteAclLinkDetails._all_field_names_ = set([]) -NoteAclLinkDetails._all_fields_ = [] - -NoteAclTeamLinkDetails._all_field_names_ = set([]) -NoteAclTeamLinkDetails._all_fields_ = [] - -NoteShareReceiveDetails._all_field_names_ = set([]) -NoteShareReceiveDetails._all_fields_ = [] - -NoteSharedDetails._all_field_names_ = set([]) -NoteSharedDetails._all_fields_ = [] - -OpenNoteSharedDetails._all_field_names_ = set([]) -OpenNoteSharedDetails._all_fields_ = [] - -OriginLogInfo._geo_location_validator = bv.Nullable(GeoLocationLogInfo_validator) -OriginLogInfo._host_validator = bv.Nullable(HostLogInfo_validator) -OriginLogInfo._access_method_validator = AccessMethodLogInfo_validator -OriginLogInfo._all_field_names_ = set([ - 'geo_location', - 'host', - 'access_method', -]) -OriginLogInfo._all_fields_ = [ - ('geo_location', OriginLogInfo._geo_location_validator), - ('host', OriginLogInfo._host_validator), - ('access_method', OriginLogInfo._access_method_validator), -] - -PaperAccessType._viewer_validator = bv.Void() -PaperAccessType._commenter_validator = bv.Void() -PaperAccessType._editor_validator = bv.Void() -PaperAccessType._other_validator = bv.Void() -PaperAccessType._tagmap = { - 'viewer': PaperAccessType._viewer_validator, - 'commenter': PaperAccessType._commenter_validator, - 'editor': PaperAccessType._editor_validator, - 'other': PaperAccessType._other_validator, -} - -PaperAccessType.viewer = PaperAccessType('viewer') -PaperAccessType.commenter = PaperAccessType('commenter') -PaperAccessType.editor = PaperAccessType('editor') -PaperAccessType.other = PaperAccessType('other') - -PaperAdminExportStartDetails._all_field_names_ = set([]) -PaperAdminExportStartDetails._all_fields_ = [] - -PaperChangeDeploymentPolicyDetails._new_value_validator = team_policies.PaperDeploymentPolicy_validator -PaperChangeDeploymentPolicyDetails._previous_value_validator = bv.Nullable(team_policies.PaperDeploymentPolicy_validator) -PaperChangeDeploymentPolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -PaperChangeDeploymentPolicyDetails._all_fields_ = [ - ('new_value', PaperChangeDeploymentPolicyDetails._new_value_validator), - ('previous_value', PaperChangeDeploymentPolicyDetails._previous_value_validator), -] - -PaperChangeMemberLinkPolicyDetails._new_value_validator = PaperMemberPolicy_validator -PaperChangeMemberLinkPolicyDetails._all_field_names_ = set(['new_value']) -PaperChangeMemberLinkPolicyDetails._all_fields_ = [('new_value', PaperChangeMemberLinkPolicyDetails._new_value_validator)] - -PaperChangeMemberPolicyDetails._new_value_validator = PaperMemberPolicy_validator -PaperChangeMemberPolicyDetails._previous_value_validator = bv.Nullable(PaperMemberPolicy_validator) -PaperChangeMemberPolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -PaperChangeMemberPolicyDetails._all_fields_ = [ - ('new_value', PaperChangeMemberPolicyDetails._new_value_validator), - ('previous_value', PaperChangeMemberPolicyDetails._previous_value_validator), -] - -PaperChangePolicyDetails._new_value_validator = team_policies.PaperEnabledPolicy_validator -PaperChangePolicyDetails._previous_value_validator = bv.Nullable(team_policies.PaperEnabledPolicy_validator) -PaperChangePolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -PaperChangePolicyDetails._all_fields_ = [ - ('new_value', PaperChangePolicyDetails._new_value_validator), - ('previous_value', PaperChangePolicyDetails._previous_value_validator), -] - -PaperContentAddMemberDetails._event_uuid_validator = bv.String() -PaperContentAddMemberDetails._all_field_names_ = set(['event_uuid']) -PaperContentAddMemberDetails._all_fields_ = [('event_uuid', PaperContentAddMemberDetails._event_uuid_validator)] - -PaperContentAddToFolderDetails._event_uuid_validator = bv.String() -PaperContentAddToFolderDetails._target_asset_index_validator = bv.UInt64() -PaperContentAddToFolderDetails._parent_asset_index_validator = bv.UInt64() -PaperContentAddToFolderDetails._all_field_names_ = set([ - 'event_uuid', - 'target_asset_index', - 'parent_asset_index', -]) -PaperContentAddToFolderDetails._all_fields_ = [ - ('event_uuid', PaperContentAddToFolderDetails._event_uuid_validator), - ('target_asset_index', PaperContentAddToFolderDetails._target_asset_index_validator), - ('parent_asset_index', PaperContentAddToFolderDetails._parent_asset_index_validator), -] - -PaperContentArchiveDetails._event_uuid_validator = bv.String() -PaperContentArchiveDetails._all_field_names_ = set(['event_uuid']) -PaperContentArchiveDetails._all_fields_ = [('event_uuid', PaperContentArchiveDetails._event_uuid_validator)] - -PaperContentCreateDetails._event_uuid_validator = bv.String() -PaperContentCreateDetails._all_field_names_ = set(['event_uuid']) -PaperContentCreateDetails._all_fields_ = [('event_uuid', PaperContentCreateDetails._event_uuid_validator)] - -PaperContentPermanentlyDeleteDetails._event_uuid_validator = bv.String() -PaperContentPermanentlyDeleteDetails._all_field_names_ = set(['event_uuid']) -PaperContentPermanentlyDeleteDetails._all_fields_ = [('event_uuid', PaperContentPermanentlyDeleteDetails._event_uuid_validator)] - -PaperContentRemoveFromFolderDetails._event_uuid_validator = bv.String() -PaperContentRemoveFromFolderDetails._all_field_names_ = set(['event_uuid']) -PaperContentRemoveFromFolderDetails._all_fields_ = [('event_uuid', PaperContentRemoveFromFolderDetails._event_uuid_validator)] - -PaperContentRemoveMemberDetails._event_uuid_validator = bv.String() -PaperContentRemoveMemberDetails._all_field_names_ = set(['event_uuid']) -PaperContentRemoveMemberDetails._all_fields_ = [('event_uuid', PaperContentRemoveMemberDetails._event_uuid_validator)] - -PaperContentRenameDetails._event_uuid_validator = bv.String() -PaperContentRenameDetails._all_field_names_ = set(['event_uuid']) -PaperContentRenameDetails._all_fields_ = [('event_uuid', PaperContentRenameDetails._event_uuid_validator)] - -PaperContentRestoreDetails._event_uuid_validator = bv.String() -PaperContentRestoreDetails._all_field_names_ = set(['event_uuid']) -PaperContentRestoreDetails._all_fields_ = [('event_uuid', PaperContentRestoreDetails._event_uuid_validator)] - -PaperDocAddCommentDetails._event_uuid_validator = bv.String() -PaperDocAddCommentDetails._comment_text_validator = bv.Nullable(bv.String()) -PaperDocAddCommentDetails._all_field_names_ = set([ - 'event_uuid', - 'comment_text', -]) -PaperDocAddCommentDetails._all_fields_ = [ - ('event_uuid', PaperDocAddCommentDetails._event_uuid_validator), - ('comment_text', PaperDocAddCommentDetails._comment_text_validator), -] - -PaperDocChangeMemberRoleDetails._event_uuid_validator = bv.String() -PaperDocChangeMemberRoleDetails._access_type_validator = PaperAccessType_validator -PaperDocChangeMemberRoleDetails._all_field_names_ = set([ - 'event_uuid', - 'access_type', -]) -PaperDocChangeMemberRoleDetails._all_fields_ = [ - ('event_uuid', PaperDocChangeMemberRoleDetails._event_uuid_validator), - ('access_type', PaperDocChangeMemberRoleDetails._access_type_validator), -] - -PaperDocChangeSharingPolicyDetails._event_uuid_validator = bv.String() -PaperDocChangeSharingPolicyDetails._public_sharing_policy_validator = bv.Nullable(bv.String()) -PaperDocChangeSharingPolicyDetails._team_sharing_policy_validator = bv.Nullable(bv.String()) -PaperDocChangeSharingPolicyDetails._all_field_names_ = set([ - 'event_uuid', - 'public_sharing_policy', - 'team_sharing_policy', -]) -PaperDocChangeSharingPolicyDetails._all_fields_ = [ - ('event_uuid', PaperDocChangeSharingPolicyDetails._event_uuid_validator), - ('public_sharing_policy', PaperDocChangeSharingPolicyDetails._public_sharing_policy_validator), - ('team_sharing_policy', PaperDocChangeSharingPolicyDetails._team_sharing_policy_validator), -] - -PaperDocChangeSubscriptionDetails._event_uuid_validator = bv.String() -PaperDocChangeSubscriptionDetails._new_subscription_level_validator = bv.String() -PaperDocChangeSubscriptionDetails._previous_subscription_level_validator = bv.Nullable(bv.String()) -PaperDocChangeSubscriptionDetails._all_field_names_ = set([ - 'event_uuid', - 'new_subscription_level', - 'previous_subscription_level', -]) -PaperDocChangeSubscriptionDetails._all_fields_ = [ - ('event_uuid', PaperDocChangeSubscriptionDetails._event_uuid_validator), - ('new_subscription_level', PaperDocChangeSubscriptionDetails._new_subscription_level_validator), - ('previous_subscription_level', PaperDocChangeSubscriptionDetails._previous_subscription_level_validator), -] - -PaperDocDeleteCommentDetails._event_uuid_validator = bv.String() -PaperDocDeleteCommentDetails._comment_text_validator = bv.Nullable(bv.String()) -PaperDocDeleteCommentDetails._all_field_names_ = set([ - 'event_uuid', - 'comment_text', -]) -PaperDocDeleteCommentDetails._all_fields_ = [ - ('event_uuid', PaperDocDeleteCommentDetails._event_uuid_validator), - ('comment_text', PaperDocDeleteCommentDetails._comment_text_validator), -] - -PaperDocDeletedDetails._event_uuid_validator = bv.String() -PaperDocDeletedDetails._all_field_names_ = set(['event_uuid']) -PaperDocDeletedDetails._all_fields_ = [('event_uuid', PaperDocDeletedDetails._event_uuid_validator)] - -PaperDocDownloadDetails._event_uuid_validator = bv.String() -PaperDocDownloadDetails._export_file_format_validator = PaperDownloadFormat_validator -PaperDocDownloadDetails._all_field_names_ = set([ - 'event_uuid', - 'export_file_format', -]) -PaperDocDownloadDetails._all_fields_ = [ - ('event_uuid', PaperDocDownloadDetails._event_uuid_validator), - ('export_file_format', PaperDocDownloadDetails._export_file_format_validator), -] - -PaperDocEditCommentDetails._event_uuid_validator = bv.String() -PaperDocEditCommentDetails._comment_text_validator = bv.Nullable(bv.String()) -PaperDocEditCommentDetails._all_field_names_ = set([ - 'event_uuid', - 'comment_text', -]) -PaperDocEditCommentDetails._all_fields_ = [ - ('event_uuid', PaperDocEditCommentDetails._event_uuid_validator), - ('comment_text', PaperDocEditCommentDetails._comment_text_validator), -] - -PaperDocEditDetails._event_uuid_validator = bv.String() -PaperDocEditDetails._all_field_names_ = set(['event_uuid']) -PaperDocEditDetails._all_fields_ = [('event_uuid', PaperDocEditDetails._event_uuid_validator)] - -PaperDocFollowedDetails._event_uuid_validator = bv.String() -PaperDocFollowedDetails._all_field_names_ = set(['event_uuid']) -PaperDocFollowedDetails._all_fields_ = [('event_uuid', PaperDocFollowedDetails._event_uuid_validator)] - -PaperDocMentionDetails._event_uuid_validator = bv.String() -PaperDocMentionDetails._all_field_names_ = set(['event_uuid']) -PaperDocMentionDetails._all_fields_ = [('event_uuid', PaperDocMentionDetails._event_uuid_validator)] - -PaperDocRequestAccessDetails._event_uuid_validator = bv.String() -PaperDocRequestAccessDetails._all_field_names_ = set(['event_uuid']) -PaperDocRequestAccessDetails._all_fields_ = [('event_uuid', PaperDocRequestAccessDetails._event_uuid_validator)] - -PaperDocResolveCommentDetails._event_uuid_validator = bv.String() -PaperDocResolveCommentDetails._comment_text_validator = bv.Nullable(bv.String()) -PaperDocResolveCommentDetails._all_field_names_ = set([ - 'event_uuid', - 'comment_text', -]) -PaperDocResolveCommentDetails._all_fields_ = [ - ('event_uuid', PaperDocResolveCommentDetails._event_uuid_validator), - ('comment_text', PaperDocResolveCommentDetails._comment_text_validator), -] - -PaperDocRevertDetails._event_uuid_validator = bv.String() -PaperDocRevertDetails._all_field_names_ = set(['event_uuid']) -PaperDocRevertDetails._all_fields_ = [('event_uuid', PaperDocRevertDetails._event_uuid_validator)] - -PaperDocSlackShareDetails._event_uuid_validator = bv.String() -PaperDocSlackShareDetails._all_field_names_ = set(['event_uuid']) -PaperDocSlackShareDetails._all_fields_ = [('event_uuid', PaperDocSlackShareDetails._event_uuid_validator)] - -PaperDocTeamInviteDetails._event_uuid_validator = bv.String() -PaperDocTeamInviteDetails._all_field_names_ = set(['event_uuid']) -PaperDocTeamInviteDetails._all_fields_ = [('event_uuid', PaperDocTeamInviteDetails._event_uuid_validator)] - -PaperDocTrashedDetails._event_uuid_validator = bv.String() -PaperDocTrashedDetails._all_field_names_ = set(['event_uuid']) -PaperDocTrashedDetails._all_fields_ = [('event_uuid', PaperDocTrashedDetails._event_uuid_validator)] - -PaperDocUnresolveCommentDetails._event_uuid_validator = bv.String() -PaperDocUnresolveCommentDetails._comment_text_validator = bv.Nullable(bv.String()) -PaperDocUnresolveCommentDetails._all_field_names_ = set([ - 'event_uuid', - 'comment_text', -]) -PaperDocUnresolveCommentDetails._all_fields_ = [ - ('event_uuid', PaperDocUnresolveCommentDetails._event_uuid_validator), - ('comment_text', PaperDocUnresolveCommentDetails._comment_text_validator), -] - -PaperDocUntrashedDetails._event_uuid_validator = bv.String() -PaperDocUntrashedDetails._all_field_names_ = set(['event_uuid']) -PaperDocUntrashedDetails._all_fields_ = [('event_uuid', PaperDocUntrashedDetails._event_uuid_validator)] - -PaperDocViewDetails._event_uuid_validator = bv.String() -PaperDocViewDetails._all_field_names_ = set(['event_uuid']) -PaperDocViewDetails._all_fields_ = [('event_uuid', PaperDocViewDetails._event_uuid_validator)] - -PaperDocumentLogInfo._doc_id_validator = bv.String() -PaperDocumentLogInfo._doc_title_validator = bv.String() -PaperDocumentLogInfo._all_field_names_ = set([ - 'doc_id', - 'doc_title', -]) -PaperDocumentLogInfo._all_fields_ = [ - ('doc_id', PaperDocumentLogInfo._doc_id_validator), - ('doc_title', PaperDocumentLogInfo._doc_title_validator), -] - -PaperDownloadFormat._docx_validator = bv.Void() -PaperDownloadFormat._html_validator = bv.Void() -PaperDownloadFormat._markdown_validator = bv.Void() -PaperDownloadFormat._other_validator = bv.Void() -PaperDownloadFormat._tagmap = { - 'docx': PaperDownloadFormat._docx_validator, - 'html': PaperDownloadFormat._html_validator, - 'markdown': PaperDownloadFormat._markdown_validator, - 'other': PaperDownloadFormat._other_validator, -} - -PaperDownloadFormat.docx = PaperDownloadFormat('docx') -PaperDownloadFormat.html = PaperDownloadFormat('html') -PaperDownloadFormat.markdown = PaperDownloadFormat('markdown') -PaperDownloadFormat.other = PaperDownloadFormat('other') - -PaperEnabledUsersGroupAdditionDetails._all_field_names_ = set([]) -PaperEnabledUsersGroupAdditionDetails._all_fields_ = [] - -PaperEnabledUsersGroupRemovalDetails._all_field_names_ = set([]) -PaperEnabledUsersGroupRemovalDetails._all_fields_ = [] - -PaperExternalViewAllowDetails._all_field_names_ = set([]) -PaperExternalViewAllowDetails._all_fields_ = [] - -PaperExternalViewDefaultTeamDetails._all_field_names_ = set([]) -PaperExternalViewDefaultTeamDetails._all_fields_ = [] - -PaperExternalViewForbidDetails._all_field_names_ = set([]) -PaperExternalViewForbidDetails._all_fields_ = [] - -PaperFolderChangeSubscriptionDetails._event_uuid_validator = bv.String() -PaperFolderChangeSubscriptionDetails._new_subscription_level_validator = bv.String() -PaperFolderChangeSubscriptionDetails._previous_subscription_level_validator = bv.Nullable(bv.String()) -PaperFolderChangeSubscriptionDetails._all_field_names_ = set([ - 'event_uuid', - 'new_subscription_level', - 'previous_subscription_level', -]) -PaperFolderChangeSubscriptionDetails._all_fields_ = [ - ('event_uuid', PaperFolderChangeSubscriptionDetails._event_uuid_validator), - ('new_subscription_level', PaperFolderChangeSubscriptionDetails._new_subscription_level_validator), - ('previous_subscription_level', PaperFolderChangeSubscriptionDetails._previous_subscription_level_validator), -] - -PaperFolderDeletedDetails._event_uuid_validator = bv.String() -PaperFolderDeletedDetails._all_field_names_ = set(['event_uuid']) -PaperFolderDeletedDetails._all_fields_ = [('event_uuid', PaperFolderDeletedDetails._event_uuid_validator)] - -PaperFolderFollowedDetails._event_uuid_validator = bv.String() -PaperFolderFollowedDetails._all_field_names_ = set(['event_uuid']) -PaperFolderFollowedDetails._all_fields_ = [('event_uuid', PaperFolderFollowedDetails._event_uuid_validator)] - -PaperFolderLogInfo._folder_id_validator = bv.String() -PaperFolderLogInfo._folder_name_validator = bv.String() -PaperFolderLogInfo._all_field_names_ = set([ - 'folder_id', - 'folder_name', -]) -PaperFolderLogInfo._all_fields_ = [ - ('folder_id', PaperFolderLogInfo._folder_id_validator), - ('folder_name', PaperFolderLogInfo._folder_name_validator), -] - -PaperFolderTeamInviteDetails._event_uuid_validator = bv.String() -PaperFolderTeamInviteDetails._all_field_names_ = set(['event_uuid']) -PaperFolderTeamInviteDetails._all_fields_ = [('event_uuid', PaperFolderTeamInviteDetails._event_uuid_validator)] - -PaperMemberPolicy._anyone_with_link_validator = bv.Void() -PaperMemberPolicy._only_team_validator = bv.Void() -PaperMemberPolicy._team_and_explicitly_shared_validator = bv.Void() -PaperMemberPolicy._other_validator = bv.Void() -PaperMemberPolicy._tagmap = { - 'anyone_with_link': PaperMemberPolicy._anyone_with_link_validator, - 'only_team': PaperMemberPolicy._only_team_validator, - 'team_and_explicitly_shared': PaperMemberPolicy._team_and_explicitly_shared_validator, - 'other': PaperMemberPolicy._other_validator, -} - -PaperMemberPolicy.anyone_with_link = PaperMemberPolicy('anyone_with_link') -PaperMemberPolicy.only_team = PaperMemberPolicy('only_team') -PaperMemberPolicy.team_and_explicitly_shared = PaperMemberPolicy('team_and_explicitly_shared') -PaperMemberPolicy.other = PaperMemberPolicy('other') - -ParticipantLogInfo._user_validator = UserLogInfo_validator -ParticipantLogInfo._group_validator = GroupLogInfo_validator -ParticipantLogInfo._other_validator = bv.Void() -ParticipantLogInfo._tagmap = { - 'user': ParticipantLogInfo._user_validator, - 'group': ParticipantLogInfo._group_validator, - 'other': ParticipantLogInfo._other_validator, -} - -ParticipantLogInfo.other = ParticipantLogInfo('other') - -PasswordChangeDetails._all_field_names_ = set([]) -PasswordChangeDetails._all_fields_ = [] - -PasswordLoginFailDetails._error_details_validator = FailureDetailsLogInfo_validator -PasswordLoginFailDetails._all_field_names_ = set(['error_details']) -PasswordLoginFailDetails._all_fields_ = [('error_details', PasswordLoginFailDetails._error_details_validator)] - -PasswordLoginSuccessDetails._all_field_names_ = set([]) -PasswordLoginSuccessDetails._all_fields_ = [] - -PasswordResetAllDetails._all_field_names_ = set([]) -PasswordResetAllDetails._all_fields_ = [] - -PasswordResetDetails._all_field_names_ = set([]) -PasswordResetDetails._all_fields_ = [] - -PathLogInfo._contextual_validator = bv.Nullable(files.Path_validator) -PathLogInfo._namespace_relative_validator = NamespaceRelativePathLogInfo_validator -PathLogInfo._all_field_names_ = set([ - 'contextual', - 'namespace_relative', -]) -PathLogInfo._all_fields_ = [ - ('contextual', PathLogInfo._contextual_validator), - ('namespace_relative', PathLogInfo._namespace_relative_validator), -] - -PermanentDeleteChangePolicyDetails._new_value_validator = ContentPermanentDeletePolicy_validator -PermanentDeleteChangePolicyDetails._previous_value_validator = bv.Nullable(ContentPermanentDeletePolicy_validator) -PermanentDeleteChangePolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -PermanentDeleteChangePolicyDetails._all_fields_ = [ - ('new_value', PermanentDeleteChangePolicyDetails._new_value_validator), - ('previous_value', PermanentDeleteChangePolicyDetails._previous_value_validator), -] - -PlacementRestriction._europe_only_validator = bv.Void() -PlacementRestriction._none_validator = bv.Void() -PlacementRestriction._other_validator = bv.Void() -PlacementRestriction._tagmap = { - 'europe_only': PlacementRestriction._europe_only_validator, - 'none': PlacementRestriction._none_validator, - 'other': PlacementRestriction._other_validator, -} - -PlacementRestriction.europe_only = PlacementRestriction('europe_only') -PlacementRestriction.none = PlacementRestriction('none') -PlacementRestriction.other = PlacementRestriction('other') - -RelocateAssetReferencesLogInfo._src_asset_index_validator = bv.UInt64() -RelocateAssetReferencesLogInfo._dest_asset_index_validator = bv.UInt64() -RelocateAssetReferencesLogInfo._all_field_names_ = set([ - 'src_asset_index', - 'dest_asset_index', -]) -RelocateAssetReferencesLogInfo._all_fields_ = [ - ('src_asset_index', RelocateAssetReferencesLogInfo._src_asset_index_validator), - ('dest_asset_index', RelocateAssetReferencesLogInfo._dest_asset_index_validator), -] - -ResellerLogInfo._reseller_name_validator = bv.String() -ResellerLogInfo._reseller_id_validator = team_common.ResellerId_validator -ResellerLogInfo._all_field_names_ = set([ - 'reseller_name', - 'reseller_id', -]) -ResellerLogInfo._all_fields_ = [ - ('reseller_name', ResellerLogInfo._reseller_name_validator), - ('reseller_id', ResellerLogInfo._reseller_id_validator), -] - -ResellerSupportSessionEndDetails._all_field_names_ = set([]) -ResellerSupportSessionEndDetails._all_fields_ = [] - -ResellerSupportSessionStartDetails._all_field_names_ = set([]) -ResellerSupportSessionStartDetails._all_fields_ = [] - -SfAddGroupDetails._target_asset_index_validator = bv.UInt64() -SfAddGroupDetails._original_folder_name_validator = bv.String() -SfAddGroupDetails._sharing_permission_validator = bv.Nullable(bv.String()) -SfAddGroupDetails._team_name_validator = bv.String() -SfAddGroupDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'sharing_permission', - 'team_name', -]) -SfAddGroupDetails._all_fields_ = [ - ('target_asset_index', SfAddGroupDetails._target_asset_index_validator), - ('original_folder_name', SfAddGroupDetails._original_folder_name_validator), - ('sharing_permission', SfAddGroupDetails._sharing_permission_validator), - ('team_name', SfAddGroupDetails._team_name_validator), -] - -SfAllowNonMembersToViewSharedLinksDetails._target_asset_index_validator = bv.UInt64() -SfAllowNonMembersToViewSharedLinksDetails._original_folder_name_validator = bv.String() -SfAllowNonMembersToViewSharedLinksDetails._shared_folder_type_validator = bv.Nullable(bv.String()) -SfAllowNonMembersToViewSharedLinksDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'shared_folder_type', -]) -SfAllowNonMembersToViewSharedLinksDetails._all_fields_ = [ - ('target_asset_index', SfAllowNonMembersToViewSharedLinksDetails._target_asset_index_validator), - ('original_folder_name', SfAllowNonMembersToViewSharedLinksDetails._original_folder_name_validator), - ('shared_folder_type', SfAllowNonMembersToViewSharedLinksDetails._shared_folder_type_validator), -] - -SfExternalInviteWarnDetails._all_field_names_ = set([]) -SfExternalInviteWarnDetails._all_fields_ = [] - -SfInviteGroupDetails._target_asset_index_validator = bv.UInt64() -SfInviteGroupDetails._all_field_names_ = set(['target_asset_index']) -SfInviteGroupDetails._all_fields_ = [('target_asset_index', SfInviteGroupDetails._target_asset_index_validator)] - -SfNestDetails._target_asset_index_validator = bv.UInt64() -SfNestDetails._original_folder_name_validator = bv.String() -SfNestDetails._prev_parent_ns_id_validator = bv.Nullable(common.NamespaceId_validator) -SfNestDetails._new_parent_ns_id_validator = bv.Nullable(common.NamespaceId_validator) -SfNestDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'prev_parent_ns_id', - 'new_parent_ns_id', -]) -SfNestDetails._all_fields_ = [ - ('target_asset_index', SfNestDetails._target_asset_index_validator), - ('original_folder_name', SfNestDetails._original_folder_name_validator), - ('prev_parent_ns_id', SfNestDetails._prev_parent_ns_id_validator), - ('new_parent_ns_id', SfNestDetails._new_parent_ns_id_validator), -] - -SfTeamDeclineDetails._target_asset_index_validator = bv.UInt64() -SfTeamDeclineDetails._original_folder_name_validator = bv.String() -SfTeamDeclineDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', -]) -SfTeamDeclineDetails._all_fields_ = [ - ('target_asset_index', SfTeamDeclineDetails._target_asset_index_validator), - ('original_folder_name', SfTeamDeclineDetails._original_folder_name_validator), -] - -SfTeamGrantAccessDetails._target_asset_index_validator = bv.UInt64() -SfTeamGrantAccessDetails._original_folder_name_validator = bv.String() -SfTeamGrantAccessDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', -]) -SfTeamGrantAccessDetails._all_fields_ = [ - ('target_asset_index', SfTeamGrantAccessDetails._target_asset_index_validator), - ('original_folder_name', SfTeamGrantAccessDetails._original_folder_name_validator), -] - -SfTeamInviteChangeRoleDetails._target_asset_index_validator = bv.UInt64() -SfTeamInviteChangeRoleDetails._original_folder_name_validator = bv.String() -SfTeamInviteChangeRoleDetails._new_sharing_permission_validator = bv.Nullable(bv.String()) -SfTeamInviteChangeRoleDetails._previous_sharing_permission_validator = bv.Nullable(bv.String()) -SfTeamInviteChangeRoleDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'new_sharing_permission', - 'previous_sharing_permission', -]) -SfTeamInviteChangeRoleDetails._all_fields_ = [ - ('target_asset_index', SfTeamInviteChangeRoleDetails._target_asset_index_validator), - ('original_folder_name', SfTeamInviteChangeRoleDetails._original_folder_name_validator), - ('new_sharing_permission', SfTeamInviteChangeRoleDetails._new_sharing_permission_validator), - ('previous_sharing_permission', SfTeamInviteChangeRoleDetails._previous_sharing_permission_validator), -] - -SfTeamInviteDetails._target_asset_index_validator = bv.UInt64() -SfTeamInviteDetails._original_folder_name_validator = bv.String() -SfTeamInviteDetails._sharing_permission_validator = bv.Nullable(bv.String()) -SfTeamInviteDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'sharing_permission', -]) -SfTeamInviteDetails._all_fields_ = [ - ('target_asset_index', SfTeamInviteDetails._target_asset_index_validator), - ('original_folder_name', SfTeamInviteDetails._original_folder_name_validator), - ('sharing_permission', SfTeamInviteDetails._sharing_permission_validator), -] - -SfTeamJoinDetails._target_asset_index_validator = bv.UInt64() -SfTeamJoinDetails._original_folder_name_validator = bv.String() -SfTeamJoinDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', -]) -SfTeamJoinDetails._all_fields_ = [ - ('target_asset_index', SfTeamJoinDetails._target_asset_index_validator), - ('original_folder_name', SfTeamJoinDetails._original_folder_name_validator), -] - -SfTeamJoinFromOobLinkDetails._target_asset_index_validator = bv.UInt64() -SfTeamJoinFromOobLinkDetails._original_folder_name_validator = bv.String() -SfTeamJoinFromOobLinkDetails._token_key_validator = bv.Nullable(bv.String()) -SfTeamJoinFromOobLinkDetails._sharing_permission_validator = bv.Nullable(bv.String()) -SfTeamJoinFromOobLinkDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'token_key', - 'sharing_permission', -]) -SfTeamJoinFromOobLinkDetails._all_fields_ = [ - ('target_asset_index', SfTeamJoinFromOobLinkDetails._target_asset_index_validator), - ('original_folder_name', SfTeamJoinFromOobLinkDetails._original_folder_name_validator), - ('token_key', SfTeamJoinFromOobLinkDetails._token_key_validator), - ('sharing_permission', SfTeamJoinFromOobLinkDetails._sharing_permission_validator), -] - -SfTeamUninviteDetails._target_asset_index_validator = bv.UInt64() -SfTeamUninviteDetails._original_folder_name_validator = bv.String() -SfTeamUninviteDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', -]) -SfTeamUninviteDetails._all_fields_ = [ - ('target_asset_index', SfTeamUninviteDetails._target_asset_index_validator), - ('original_folder_name', SfTeamUninviteDetails._original_folder_name_validator), -] - -SharedContentAddInviteesDetails._target_asset_index_validator = bv.UInt64() -SharedContentAddInviteesDetails._original_folder_name_validator = bv.Nullable(bv.String()) -SharedContentAddInviteesDetails._sharing_permission_validator = bv.Nullable(bv.String()) -SharedContentAddInviteesDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'sharing_permission', -]) -SharedContentAddInviteesDetails._all_fields_ = [ - ('target_asset_index', SharedContentAddInviteesDetails._target_asset_index_validator), - ('original_folder_name', SharedContentAddInviteesDetails._original_folder_name_validator), - ('sharing_permission', SharedContentAddInviteesDetails._sharing_permission_validator), -] - -SharedContentAddLinkExpiryDetails._target_asset_index_validator = bv.UInt64() -SharedContentAddLinkExpiryDetails._original_folder_name_validator = bv.Nullable(bv.String()) -SharedContentAddLinkExpiryDetails._shared_folder_type_validator = bv.Nullable(bv.String()) -SharedContentAddLinkExpiryDetails._expiration_start_date_validator = bv.String() -SharedContentAddLinkExpiryDetails._expiration_days_validator = bv.Int64() -SharedContentAddLinkExpiryDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'shared_folder_type', - 'expiration_start_date', - 'expiration_days', -]) -SharedContentAddLinkExpiryDetails._all_fields_ = [ - ('target_asset_index', SharedContentAddLinkExpiryDetails._target_asset_index_validator), - ('original_folder_name', SharedContentAddLinkExpiryDetails._original_folder_name_validator), - ('shared_folder_type', SharedContentAddLinkExpiryDetails._shared_folder_type_validator), - ('expiration_start_date', SharedContentAddLinkExpiryDetails._expiration_start_date_validator), - ('expiration_days', SharedContentAddLinkExpiryDetails._expiration_days_validator), -] - -SharedContentAddLinkPasswordDetails._target_asset_index_validator = bv.UInt64() -SharedContentAddLinkPasswordDetails._original_folder_name_validator = bv.Nullable(bv.String()) -SharedContentAddLinkPasswordDetails._shared_folder_type_validator = bv.Nullable(bv.String()) -SharedContentAddLinkPasswordDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'shared_folder_type', -]) -SharedContentAddLinkPasswordDetails._all_fields_ = [ - ('target_asset_index', SharedContentAddLinkPasswordDetails._target_asset_index_validator), - ('original_folder_name', SharedContentAddLinkPasswordDetails._original_folder_name_validator), - ('shared_folder_type', SharedContentAddLinkPasswordDetails._shared_folder_type_validator), -] - -SharedContentAddMemberDetails._target_asset_index_validator = bv.UInt64() -SharedContentAddMemberDetails._original_folder_name_validator = bv.Nullable(bv.String()) -SharedContentAddMemberDetails._sharing_permission_validator = bv.Nullable(bv.String()) -SharedContentAddMemberDetails._shared_folder_type_validator = bv.Nullable(bv.String()) -SharedContentAddMemberDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'sharing_permission', - 'shared_folder_type', -]) -SharedContentAddMemberDetails._all_fields_ = [ - ('target_asset_index', SharedContentAddMemberDetails._target_asset_index_validator), - ('original_folder_name', SharedContentAddMemberDetails._original_folder_name_validator), - ('sharing_permission', SharedContentAddMemberDetails._sharing_permission_validator), - ('shared_folder_type', SharedContentAddMemberDetails._shared_folder_type_validator), -] - -SharedContentChangeDownloadsPolicyDetails._target_asset_index_validator = bv.UInt64() -SharedContentChangeDownloadsPolicyDetails._original_folder_name_validator = bv.Nullable(bv.String()) -SharedContentChangeDownloadsPolicyDetails._shared_folder_type_validator = bv.Nullable(bv.String()) -SharedContentChangeDownloadsPolicyDetails._new_value_validator = SharedContentDownloadsPolicy_validator -SharedContentChangeDownloadsPolicyDetails._previous_value_validator = bv.Nullable(SharedContentDownloadsPolicy_validator) -SharedContentChangeDownloadsPolicyDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'shared_folder_type', - 'new_value', - 'previous_value', -]) -SharedContentChangeDownloadsPolicyDetails._all_fields_ = [ - ('target_asset_index', SharedContentChangeDownloadsPolicyDetails._target_asset_index_validator), - ('original_folder_name', SharedContentChangeDownloadsPolicyDetails._original_folder_name_validator), - ('shared_folder_type', SharedContentChangeDownloadsPolicyDetails._shared_folder_type_validator), - ('new_value', SharedContentChangeDownloadsPolicyDetails._new_value_validator), - ('previous_value', SharedContentChangeDownloadsPolicyDetails._previous_value_validator), -] - -SharedContentChangeInviteeRoleDetails._target_asset_index_validator = bv.UInt64() -SharedContentChangeInviteeRoleDetails._original_folder_name_validator = bv.String() -SharedContentChangeInviteeRoleDetails._new_sharing_permission_validator = bv.Nullable(bv.String()) -SharedContentChangeInviteeRoleDetails._previous_sharing_permission_validator = bv.Nullable(bv.String()) -SharedContentChangeInviteeRoleDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'new_sharing_permission', - 'previous_sharing_permission', -]) -SharedContentChangeInviteeRoleDetails._all_fields_ = [ - ('target_asset_index', SharedContentChangeInviteeRoleDetails._target_asset_index_validator), - ('original_folder_name', SharedContentChangeInviteeRoleDetails._original_folder_name_validator), - ('new_sharing_permission', SharedContentChangeInviteeRoleDetails._new_sharing_permission_validator), - ('previous_sharing_permission', SharedContentChangeInviteeRoleDetails._previous_sharing_permission_validator), -] - -SharedContentChangeLinkAudienceDetails._target_asset_index_validator = bv.UInt64() -SharedContentChangeLinkAudienceDetails._original_folder_name_validator = bv.Nullable(bv.String()) -SharedContentChangeLinkAudienceDetails._shared_folder_type_validator = bv.Nullable(bv.String()) -SharedContentChangeLinkAudienceDetails._new_value_validator = LinkAudience_validator -SharedContentChangeLinkAudienceDetails._previous_value_validator = bv.Nullable(LinkAudience_validator) -SharedContentChangeLinkAudienceDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'shared_folder_type', - 'new_value', - 'previous_value', -]) -SharedContentChangeLinkAudienceDetails._all_fields_ = [ - ('target_asset_index', SharedContentChangeLinkAudienceDetails._target_asset_index_validator), - ('original_folder_name', SharedContentChangeLinkAudienceDetails._original_folder_name_validator), - ('shared_folder_type', SharedContentChangeLinkAudienceDetails._shared_folder_type_validator), - ('new_value', SharedContentChangeLinkAudienceDetails._new_value_validator), - ('previous_value', SharedContentChangeLinkAudienceDetails._previous_value_validator), -] - -SharedContentChangeLinkExpiryDetails._target_asset_index_validator = bv.UInt64() -SharedContentChangeLinkExpiryDetails._original_folder_name_validator = bv.Nullable(bv.String()) -SharedContentChangeLinkExpiryDetails._shared_folder_type_validator = bv.Nullable(bv.String()) -SharedContentChangeLinkExpiryDetails._expiration_start_date_validator = bv.String() -SharedContentChangeLinkExpiryDetails._expiration_days_validator = bv.Int64() -SharedContentChangeLinkExpiryDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'shared_folder_type', - 'expiration_start_date', - 'expiration_days', -]) -SharedContentChangeLinkExpiryDetails._all_fields_ = [ - ('target_asset_index', SharedContentChangeLinkExpiryDetails._target_asset_index_validator), - ('original_folder_name', SharedContentChangeLinkExpiryDetails._original_folder_name_validator), - ('shared_folder_type', SharedContentChangeLinkExpiryDetails._shared_folder_type_validator), - ('expiration_start_date', SharedContentChangeLinkExpiryDetails._expiration_start_date_validator), - ('expiration_days', SharedContentChangeLinkExpiryDetails._expiration_days_validator), -] - -SharedContentChangeLinkPasswordDetails._target_asset_index_validator = bv.UInt64() -SharedContentChangeLinkPasswordDetails._original_folder_name_validator = bv.Nullable(bv.String()) -SharedContentChangeLinkPasswordDetails._shared_folder_type_validator = bv.Nullable(bv.String()) -SharedContentChangeLinkPasswordDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'shared_folder_type', -]) -SharedContentChangeLinkPasswordDetails._all_fields_ = [ - ('target_asset_index', SharedContentChangeLinkPasswordDetails._target_asset_index_validator), - ('original_folder_name', SharedContentChangeLinkPasswordDetails._original_folder_name_validator), - ('shared_folder_type', SharedContentChangeLinkPasswordDetails._shared_folder_type_validator), -] - -SharedContentChangeMemberRoleDetails._target_asset_index_validator = bv.UInt64() -SharedContentChangeMemberRoleDetails._original_folder_name_validator = bv.Nullable(bv.String()) -SharedContentChangeMemberRoleDetails._new_sharing_permission_validator = bv.Nullable(bv.String()) -SharedContentChangeMemberRoleDetails._previous_sharing_permission_validator = bv.Nullable(bv.String()) -SharedContentChangeMemberRoleDetails._shared_folder_type_validator = bv.Nullable(bv.String()) -SharedContentChangeMemberRoleDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'new_sharing_permission', - 'previous_sharing_permission', - 'shared_folder_type', -]) -SharedContentChangeMemberRoleDetails._all_fields_ = [ - ('target_asset_index', SharedContentChangeMemberRoleDetails._target_asset_index_validator), - ('original_folder_name', SharedContentChangeMemberRoleDetails._original_folder_name_validator), - ('new_sharing_permission', SharedContentChangeMemberRoleDetails._new_sharing_permission_validator), - ('previous_sharing_permission', SharedContentChangeMemberRoleDetails._previous_sharing_permission_validator), - ('shared_folder_type', SharedContentChangeMemberRoleDetails._shared_folder_type_validator), -] - -SharedContentChangeViewerInfoPolicyDetails._target_asset_index_validator = bv.UInt64() -SharedContentChangeViewerInfoPolicyDetails._original_folder_name_validator = bv.Nullable(bv.String()) -SharedContentChangeViewerInfoPolicyDetails._shared_folder_type_validator = bv.Nullable(bv.String()) -SharedContentChangeViewerInfoPolicyDetails._new_value_validator = SharedContentViewerInfoPolicy_validator -SharedContentChangeViewerInfoPolicyDetails._previous_value_validator = bv.Nullable(SharedContentViewerInfoPolicy_validator) -SharedContentChangeViewerInfoPolicyDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'shared_folder_type', - 'new_value', - 'previous_value', -]) -SharedContentChangeViewerInfoPolicyDetails._all_fields_ = [ - ('target_asset_index', SharedContentChangeViewerInfoPolicyDetails._target_asset_index_validator), - ('original_folder_name', SharedContentChangeViewerInfoPolicyDetails._original_folder_name_validator), - ('shared_folder_type', SharedContentChangeViewerInfoPolicyDetails._shared_folder_type_validator), - ('new_value', SharedContentChangeViewerInfoPolicyDetails._new_value_validator), - ('previous_value', SharedContentChangeViewerInfoPolicyDetails._previous_value_validator), -] - -SharedContentClaimInvitationDetails._target_asset_index_validator = bv.UInt64() -SharedContentClaimInvitationDetails._original_folder_name_validator = bv.Nullable(bv.String()) -SharedContentClaimInvitationDetails._shared_content_link_validator = bv.Nullable(bv.String()) -SharedContentClaimInvitationDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'shared_content_link', -]) -SharedContentClaimInvitationDetails._all_fields_ = [ - ('target_asset_index', SharedContentClaimInvitationDetails._target_asset_index_validator), - ('original_folder_name', SharedContentClaimInvitationDetails._original_folder_name_validator), - ('shared_content_link', SharedContentClaimInvitationDetails._shared_content_link_validator), -] - -SharedContentCopyDetails._shared_content_link_validator = bv.String() -SharedContentCopyDetails._sharing_permission_validator = bv.Nullable(bv.String()) -SharedContentCopyDetails._target_asset_index_validator = bv.UInt64() -SharedContentCopyDetails._relocate_action_details_validator = RelocateAssetReferencesLogInfo_validator -SharedContentCopyDetails._all_field_names_ = set([ - 'shared_content_link', - 'sharing_permission', - 'target_asset_index', - 'relocate_action_details', -]) -SharedContentCopyDetails._all_fields_ = [ - ('shared_content_link', SharedContentCopyDetails._shared_content_link_validator), - ('sharing_permission', SharedContentCopyDetails._sharing_permission_validator), - ('target_asset_index', SharedContentCopyDetails._target_asset_index_validator), - ('relocate_action_details', SharedContentCopyDetails._relocate_action_details_validator), -] - -SharedContentDownloadDetails._shared_content_link_validator = bv.String() -SharedContentDownloadDetails._sharing_permission_validator = bv.Nullable(bv.String()) -SharedContentDownloadDetails._target_asset_index_validator = bv.UInt64() -SharedContentDownloadDetails._all_field_names_ = set([ - 'shared_content_link', - 'sharing_permission', - 'target_asset_index', -]) -SharedContentDownloadDetails._all_fields_ = [ - ('shared_content_link', SharedContentDownloadDetails._shared_content_link_validator), - ('sharing_permission', SharedContentDownloadDetails._sharing_permission_validator), - ('target_asset_index', SharedContentDownloadDetails._target_asset_index_validator), -] - -SharedContentDownloadsPolicy._disabled_validator = bv.Void() -SharedContentDownloadsPolicy._enabled_validator = bv.Void() -SharedContentDownloadsPolicy._other_validator = bv.Void() -SharedContentDownloadsPolicy._tagmap = { - 'disabled': SharedContentDownloadsPolicy._disabled_validator, - 'enabled': SharedContentDownloadsPolicy._enabled_validator, - 'other': SharedContentDownloadsPolicy._other_validator, -} - -SharedContentDownloadsPolicy.disabled = SharedContentDownloadsPolicy('disabled') -SharedContentDownloadsPolicy.enabled = SharedContentDownloadsPolicy('enabled') -SharedContentDownloadsPolicy.other = SharedContentDownloadsPolicy('other') - -SharedContentRelinquishMembershipDetails._target_asset_index_validator = bv.UInt64() -SharedContentRelinquishMembershipDetails._original_folder_name_validator = bv.String() -SharedContentRelinquishMembershipDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', -]) -SharedContentRelinquishMembershipDetails._all_fields_ = [ - ('target_asset_index', SharedContentRelinquishMembershipDetails._target_asset_index_validator), - ('original_folder_name', SharedContentRelinquishMembershipDetails._original_folder_name_validator), -] - -SharedContentRemoveInviteeDetails._target_asset_index_validator = bv.UInt64() -SharedContentRemoveInviteeDetails._original_folder_name_validator = bv.String() -SharedContentRemoveInviteeDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', -]) -SharedContentRemoveInviteeDetails._all_fields_ = [ - ('target_asset_index', SharedContentRemoveInviteeDetails._target_asset_index_validator), - ('original_folder_name', SharedContentRemoveInviteeDetails._original_folder_name_validator), -] - -SharedContentRemoveLinkExpiryDetails._target_asset_index_validator = bv.UInt64() -SharedContentRemoveLinkExpiryDetails._original_folder_name_validator = bv.Nullable(bv.String()) -SharedContentRemoveLinkExpiryDetails._shared_folder_type_validator = bv.Nullable(bv.String()) -SharedContentRemoveLinkExpiryDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'shared_folder_type', -]) -SharedContentRemoveLinkExpiryDetails._all_fields_ = [ - ('target_asset_index', SharedContentRemoveLinkExpiryDetails._target_asset_index_validator), - ('original_folder_name', SharedContentRemoveLinkExpiryDetails._original_folder_name_validator), - ('shared_folder_type', SharedContentRemoveLinkExpiryDetails._shared_folder_type_validator), -] - -SharedContentRemoveLinkPasswordDetails._target_asset_index_validator = bv.UInt64() -SharedContentRemoveLinkPasswordDetails._original_folder_name_validator = bv.Nullable(bv.String()) -SharedContentRemoveLinkPasswordDetails._shared_folder_type_validator = bv.Nullable(bv.String()) -SharedContentRemoveLinkPasswordDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'shared_folder_type', -]) -SharedContentRemoveLinkPasswordDetails._all_fields_ = [ - ('target_asset_index', SharedContentRemoveLinkPasswordDetails._target_asset_index_validator), - ('original_folder_name', SharedContentRemoveLinkPasswordDetails._original_folder_name_validator), - ('shared_folder_type', SharedContentRemoveLinkPasswordDetails._shared_folder_type_validator), -] - -SharedContentRemoveMemberDetails._target_asset_index_validator = bv.UInt64() -SharedContentRemoveMemberDetails._original_folder_name_validator = bv.Nullable(bv.String()) -SharedContentRemoveMemberDetails._sharing_permission_validator = bv.Nullable(bv.String()) -SharedContentRemoveMemberDetails._shared_folder_type_validator = bv.Nullable(bv.String()) -SharedContentRemoveMemberDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'sharing_permission', - 'shared_folder_type', -]) -SharedContentRemoveMemberDetails._all_fields_ = [ - ('target_asset_index', SharedContentRemoveMemberDetails._target_asset_index_validator), - ('original_folder_name', SharedContentRemoveMemberDetails._original_folder_name_validator), - ('sharing_permission', SharedContentRemoveMemberDetails._sharing_permission_validator), - ('shared_folder_type', SharedContentRemoveMemberDetails._shared_folder_type_validator), -] - -SharedContentRequestAccessDetails._target_asset_index_validator = bv.UInt64() -SharedContentRequestAccessDetails._original_folder_name_validator = bv.Nullable(bv.String()) -SharedContentRequestAccessDetails._shared_content_link_validator = bv.Nullable(bv.String()) -SharedContentRequestAccessDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'shared_content_link', -]) -SharedContentRequestAccessDetails._all_fields_ = [ - ('target_asset_index', SharedContentRequestAccessDetails._target_asset_index_validator), - ('original_folder_name', SharedContentRequestAccessDetails._original_folder_name_validator), - ('shared_content_link', SharedContentRequestAccessDetails._shared_content_link_validator), -] - -SharedContentUnshareDetails._target_asset_index_validator = bv.UInt64() -SharedContentUnshareDetails._original_folder_name_validator = bv.Nullable(bv.String()) -SharedContentUnshareDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', -]) -SharedContentUnshareDetails._all_fields_ = [ - ('target_asset_index', SharedContentUnshareDetails._target_asset_index_validator), - ('original_folder_name', SharedContentUnshareDetails._original_folder_name_validator), -] - -SharedContentViewDetails._shared_content_link_validator = bv.String() -SharedContentViewDetails._sharing_permission_validator = bv.Nullable(bv.String()) -SharedContentViewDetails._target_asset_index_validator = bv.UInt64() -SharedContentViewDetails._all_field_names_ = set([ - 'shared_content_link', - 'sharing_permission', - 'target_asset_index', -]) -SharedContentViewDetails._all_fields_ = [ - ('shared_content_link', SharedContentViewDetails._shared_content_link_validator), - ('sharing_permission', SharedContentViewDetails._sharing_permission_validator), - ('target_asset_index', SharedContentViewDetails._target_asset_index_validator), -] - -SharedContentViewerInfoPolicy._disabled_validator = bv.Void() -SharedContentViewerInfoPolicy._enabled_validator = bv.Void() -SharedContentViewerInfoPolicy._other_validator = bv.Void() -SharedContentViewerInfoPolicy._tagmap = { - 'disabled': SharedContentViewerInfoPolicy._disabled_validator, - 'enabled': SharedContentViewerInfoPolicy._enabled_validator, - 'other': SharedContentViewerInfoPolicy._other_validator, -} - -SharedContentViewerInfoPolicy.disabled = SharedContentViewerInfoPolicy('disabled') -SharedContentViewerInfoPolicy.enabled = SharedContentViewerInfoPolicy('enabled') -SharedContentViewerInfoPolicy.other = SharedContentViewerInfoPolicy('other') - -SharedFolderChangeConfidentialityDetails._target_asset_index_validator = bv.UInt64() -SharedFolderChangeConfidentialityDetails._original_folder_name_validator = bv.String() -SharedFolderChangeConfidentialityDetails._new_value_validator = Confidentiality_validator -SharedFolderChangeConfidentialityDetails._previous_value_validator = bv.Nullable(Confidentiality_validator) -SharedFolderChangeConfidentialityDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'new_value', - 'previous_value', -]) -SharedFolderChangeConfidentialityDetails._all_fields_ = [ - ('target_asset_index', SharedFolderChangeConfidentialityDetails._target_asset_index_validator), - ('original_folder_name', SharedFolderChangeConfidentialityDetails._original_folder_name_validator), - ('new_value', SharedFolderChangeConfidentialityDetails._new_value_validator), - ('previous_value', SharedFolderChangeConfidentialityDetails._previous_value_validator), -] - -SharedFolderChangeLinkPolicyDetails._target_asset_index_validator = bv.UInt64() -SharedFolderChangeLinkPolicyDetails._original_folder_name_validator = bv.String() -SharedFolderChangeLinkPolicyDetails._shared_folder_type_validator = bv.Nullable(bv.String()) -SharedFolderChangeLinkPolicyDetails._new_value_validator = SharedFolderLinkPolicy_validator -SharedFolderChangeLinkPolicyDetails._previous_value_validator = bv.Nullable(SharedFolderLinkPolicy_validator) -SharedFolderChangeLinkPolicyDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'shared_folder_type', - 'new_value', - 'previous_value', -]) -SharedFolderChangeLinkPolicyDetails._all_fields_ = [ - ('target_asset_index', SharedFolderChangeLinkPolicyDetails._target_asset_index_validator), - ('original_folder_name', SharedFolderChangeLinkPolicyDetails._original_folder_name_validator), - ('shared_folder_type', SharedFolderChangeLinkPolicyDetails._shared_folder_type_validator), - ('new_value', SharedFolderChangeLinkPolicyDetails._new_value_validator), - ('previous_value', SharedFolderChangeLinkPolicyDetails._previous_value_validator), -] - -SharedFolderChangeMemberManagementPolicyDetails._target_asset_index_validator = bv.UInt64() -SharedFolderChangeMemberManagementPolicyDetails._original_folder_name_validator = bv.String() -SharedFolderChangeMemberManagementPolicyDetails._shared_folder_type_validator = bv.Nullable(bv.String()) -SharedFolderChangeMemberManagementPolicyDetails._new_value_validator = SharedFolderMembershipManagementPolicy_validator -SharedFolderChangeMemberManagementPolicyDetails._previous_value_validator = bv.Nullable(SharedFolderMembershipManagementPolicy_validator) -SharedFolderChangeMemberManagementPolicyDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'shared_folder_type', - 'new_value', - 'previous_value', -]) -SharedFolderChangeMemberManagementPolicyDetails._all_fields_ = [ - ('target_asset_index', SharedFolderChangeMemberManagementPolicyDetails._target_asset_index_validator), - ('original_folder_name', SharedFolderChangeMemberManagementPolicyDetails._original_folder_name_validator), - ('shared_folder_type', SharedFolderChangeMemberManagementPolicyDetails._shared_folder_type_validator), - ('new_value', SharedFolderChangeMemberManagementPolicyDetails._new_value_validator), - ('previous_value', SharedFolderChangeMemberManagementPolicyDetails._previous_value_validator), -] - -SharedFolderChangeMemberPolicyDetails._target_asset_index_validator = bv.UInt64() -SharedFolderChangeMemberPolicyDetails._original_folder_name_validator = bv.String() -SharedFolderChangeMemberPolicyDetails._shared_folder_type_validator = bv.Nullable(bv.String()) -SharedFolderChangeMemberPolicyDetails._new_value_validator = SharedFolderMemberPolicy_validator -SharedFolderChangeMemberPolicyDetails._previous_value_validator = bv.Nullable(SharedFolderMemberPolicy_validator) -SharedFolderChangeMemberPolicyDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', - 'shared_folder_type', - 'new_value', - 'previous_value', -]) -SharedFolderChangeMemberPolicyDetails._all_fields_ = [ - ('target_asset_index', SharedFolderChangeMemberPolicyDetails._target_asset_index_validator), - ('original_folder_name', SharedFolderChangeMemberPolicyDetails._original_folder_name_validator), - ('shared_folder_type', SharedFolderChangeMemberPolicyDetails._shared_folder_type_validator), - ('new_value', SharedFolderChangeMemberPolicyDetails._new_value_validator), - ('previous_value', SharedFolderChangeMemberPolicyDetails._previous_value_validator), -] - -SharedFolderCreateDetails._target_asset_index_validator = bv.UInt64() -SharedFolderCreateDetails._parent_ns_id_validator = bv.Nullable(common.NamespaceId_validator) -SharedFolderCreateDetails._all_field_names_ = set([ - 'target_asset_index', - 'parent_ns_id', -]) -SharedFolderCreateDetails._all_fields_ = [ - ('target_asset_index', SharedFolderCreateDetails._target_asset_index_validator), - ('parent_ns_id', SharedFolderCreateDetails._parent_ns_id_validator), -] - -SharedFolderLinkPolicy._members_only_validator = bv.Void() -SharedFolderLinkPolicy._members_and_team_validator = bv.Void() -SharedFolderLinkPolicy._anyone_validator = bv.Void() -SharedFolderLinkPolicy._other_validator = bv.Void() -SharedFolderLinkPolicy._tagmap = { - 'members_only': SharedFolderLinkPolicy._members_only_validator, - 'members_and_team': SharedFolderLinkPolicy._members_and_team_validator, - 'anyone': SharedFolderLinkPolicy._anyone_validator, - 'other': SharedFolderLinkPolicy._other_validator, -} - -SharedFolderLinkPolicy.members_only = SharedFolderLinkPolicy('members_only') -SharedFolderLinkPolicy.members_and_team = SharedFolderLinkPolicy('members_and_team') -SharedFolderLinkPolicy.anyone = SharedFolderLinkPolicy('anyone') -SharedFolderLinkPolicy.other = SharedFolderLinkPolicy('other') - -SharedFolderMemberPolicy._team_only_validator = bv.Void() -SharedFolderMemberPolicy._anyone_validator = bv.Void() -SharedFolderMemberPolicy._other_validator = bv.Void() -SharedFolderMemberPolicy._tagmap = { - 'team_only': SharedFolderMemberPolicy._team_only_validator, - 'anyone': SharedFolderMemberPolicy._anyone_validator, - 'other': SharedFolderMemberPolicy._other_validator, -} - -SharedFolderMemberPolicy.team_only = SharedFolderMemberPolicy('team_only') -SharedFolderMemberPolicy.anyone = SharedFolderMemberPolicy('anyone') -SharedFolderMemberPolicy.other = SharedFolderMemberPolicy('other') - -SharedFolderMembershipManagementPolicy._owner_validator = bv.Void() -SharedFolderMembershipManagementPolicy._editors_validator = bv.Void() -SharedFolderMembershipManagementPolicy._other_validator = bv.Void() -SharedFolderMembershipManagementPolicy._tagmap = { - 'owner': SharedFolderMembershipManagementPolicy._owner_validator, - 'editors': SharedFolderMembershipManagementPolicy._editors_validator, - 'other': SharedFolderMembershipManagementPolicy._other_validator, -} - -SharedFolderMembershipManagementPolicy.owner = SharedFolderMembershipManagementPolicy('owner') -SharedFolderMembershipManagementPolicy.editors = SharedFolderMembershipManagementPolicy('editors') -SharedFolderMembershipManagementPolicy.other = SharedFolderMembershipManagementPolicy('other') - -SharedFolderMountDetails._target_asset_index_validator = bv.UInt64() -SharedFolderMountDetails._original_folder_name_validator = bv.String() -SharedFolderMountDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', -]) -SharedFolderMountDetails._all_fields_ = [ - ('target_asset_index', SharedFolderMountDetails._target_asset_index_validator), - ('original_folder_name', SharedFolderMountDetails._original_folder_name_validator), -] - -SharedFolderTransferOwnershipDetails._target_asset_index_validator = bv.UInt64() -SharedFolderTransferOwnershipDetails._original_folder_name_validator = bv.String() -SharedFolderTransferOwnershipDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', -]) -SharedFolderTransferOwnershipDetails._all_fields_ = [ - ('target_asset_index', SharedFolderTransferOwnershipDetails._target_asset_index_validator), - ('original_folder_name', SharedFolderTransferOwnershipDetails._original_folder_name_validator), -] - -SharedFolderUnmountDetails._target_asset_index_validator = bv.UInt64() -SharedFolderUnmountDetails._original_folder_name_validator = bv.String() -SharedFolderUnmountDetails._all_field_names_ = set([ - 'target_asset_index', - 'original_folder_name', -]) -SharedFolderUnmountDetails._all_fields_ = [ - ('target_asset_index', SharedFolderUnmountDetails._target_asset_index_validator), - ('original_folder_name', SharedFolderUnmountDetails._original_folder_name_validator), -] - -SharedNoteOpenedDetails._all_field_names_ = set([]) -SharedNoteOpenedDetails._all_fields_ = [] - -SharingChangeFolderJoinPolicyDetails._new_value_validator = SharingFolderJoinPolicy_validator -SharingChangeFolderJoinPolicyDetails._previous_value_validator = bv.Nullable(SharingFolderJoinPolicy_validator) -SharingChangeFolderJoinPolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -SharingChangeFolderJoinPolicyDetails._all_fields_ = [ - ('new_value', SharingChangeFolderJoinPolicyDetails._new_value_validator), - ('previous_value', SharingChangeFolderJoinPolicyDetails._previous_value_validator), -] - -SharingChangeLinkPolicyDetails._new_value_validator = SharingLinkPolicy_validator -SharingChangeLinkPolicyDetails._previous_value_validator = bv.Nullable(SharingLinkPolicy_validator) -SharingChangeLinkPolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -SharingChangeLinkPolicyDetails._all_fields_ = [ - ('new_value', SharingChangeLinkPolicyDetails._new_value_validator), - ('previous_value', SharingChangeLinkPolicyDetails._previous_value_validator), -] - -SharingChangeMemberPolicyDetails._new_value_validator = SharingMemberPolicy_validator -SharingChangeMemberPolicyDetails._previous_value_validator = bv.Nullable(SharingMemberPolicy_validator) -SharingChangeMemberPolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -SharingChangeMemberPolicyDetails._all_fields_ = [ - ('new_value', SharingChangeMemberPolicyDetails._new_value_validator), - ('previous_value', SharingChangeMemberPolicyDetails._previous_value_validator), -] - -SharingFolderJoinPolicy._from_anyone_validator = bv.Void() -SharingFolderJoinPolicy._from_team_only_validator = bv.Void() -SharingFolderJoinPolicy._other_validator = bv.Void() -SharingFolderJoinPolicy._tagmap = { - 'from_anyone': SharingFolderJoinPolicy._from_anyone_validator, - 'from_team_only': SharingFolderJoinPolicy._from_team_only_validator, - 'other': SharingFolderJoinPolicy._other_validator, -} - -SharingFolderJoinPolicy.from_anyone = SharingFolderJoinPolicy('from_anyone') -SharingFolderJoinPolicy.from_team_only = SharingFolderJoinPolicy('from_team_only') -SharingFolderJoinPolicy.other = SharingFolderJoinPolicy('other') - -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_private': SharingLinkPolicy._default_private_validator, - 'default_public': SharingLinkPolicy._default_public_validator, - 'only_private': SharingLinkPolicy._only_private_validator, - 'other': SharingLinkPolicy._other_validator, -} - -SharingLinkPolicy.default_private = SharingLinkPolicy('default_private') -SharingLinkPolicy.default_public = SharingLinkPolicy('default_public') -SharingLinkPolicy.only_private = SharingLinkPolicy('only_private') -SharingLinkPolicy.other = SharingLinkPolicy('other') - -SharingMemberPolicy._allow_validator = bv.Void() -SharingMemberPolicy._forbid_validator = bv.Void() -SharingMemberPolicy._other_validator = bv.Void() -SharingMemberPolicy._tagmap = { - 'allow': SharingMemberPolicy._allow_validator, - 'forbid': SharingMemberPolicy._forbid_validator, - 'other': SharingMemberPolicy._other_validator, -} - -SharingMemberPolicy.allow = SharingMemberPolicy('allow') -SharingMemberPolicy.forbid = SharingMemberPolicy('forbid') -SharingMemberPolicy.other = SharingMemberPolicy('other') - -ShmodelAppCreateDetails._sharing_permission_validator = bv.Nullable(bv.String()) -ShmodelAppCreateDetails._token_key_validator = bv.Nullable(bv.String()) -ShmodelAppCreateDetails._all_field_names_ = set([ - 'sharing_permission', - 'token_key', -]) -ShmodelAppCreateDetails._all_fields_ = [ - ('sharing_permission', ShmodelAppCreateDetails._sharing_permission_validator), - ('token_key', ShmodelAppCreateDetails._token_key_validator), -] - -ShmodelCreateDetails._sharing_permission_validator = bv.Nullable(bv.String()) -ShmodelCreateDetails._token_key_validator = bv.Nullable(bv.String()) -ShmodelCreateDetails._all_field_names_ = set([ - 'sharing_permission', - 'token_key', -]) -ShmodelCreateDetails._all_fields_ = [ - ('sharing_permission', ShmodelCreateDetails._sharing_permission_validator), - ('token_key', ShmodelCreateDetails._token_key_validator), -] - -ShmodelDisableDetails._sharing_permission_validator = bv.Nullable(bv.String()) -ShmodelDisableDetails._token_key_validator = bv.Nullable(bv.String()) -ShmodelDisableDetails._all_field_names_ = set([ - 'sharing_permission', - 'token_key', -]) -ShmodelDisableDetails._all_fields_ = [ - ('sharing_permission', ShmodelDisableDetails._sharing_permission_validator), - ('token_key', ShmodelDisableDetails._token_key_validator), -] - -ShmodelFbShareDetails._sharing_non_member_recipients_validator = bv.List(NonTeamMemberLogInfo_validator) -ShmodelFbShareDetails._all_field_names_ = set(['sharing_non_member_recipients']) -ShmodelFbShareDetails._all_fields_ = [('sharing_non_member_recipients', ShmodelFbShareDetails._sharing_non_member_recipients_validator)] - -ShmodelGroupShareDetails._all_field_names_ = set([]) -ShmodelGroupShareDetails._all_fields_ = [] - -ShmodelRemoveExpirationDetails._all_field_names_ = set([]) -ShmodelRemoveExpirationDetails._all_fields_ = [] - -ShmodelSetExpirationDetails._expiration_start_date_validator = bv.String() -ShmodelSetExpirationDetails._expiration_days_validator = bv.Int64() -ShmodelSetExpirationDetails._all_field_names_ = set([ - 'expiration_start_date', - 'expiration_days', -]) -ShmodelSetExpirationDetails._all_fields_ = [ - ('expiration_start_date', ShmodelSetExpirationDetails._expiration_start_date_validator), - ('expiration_days', ShmodelSetExpirationDetails._expiration_days_validator), -] - -ShmodelTeamCopyDetails._all_field_names_ = set([]) -ShmodelTeamCopyDetails._all_fields_ = [] - -ShmodelTeamDownloadDetails._all_field_names_ = set([]) -ShmodelTeamDownloadDetails._all_fields_ = [] - -ShmodelTeamShareDetails._all_field_names_ = set([]) -ShmodelTeamShareDetails._all_fields_ = [] - -ShmodelTeamViewDetails._all_field_names_ = set([]) -ShmodelTeamViewDetails._all_fields_ = [] - -ShmodelVisibilityPasswordDetails._all_field_names_ = set([]) -ShmodelVisibilityPasswordDetails._all_fields_ = [] - -ShmodelVisibilityPublicDetails._all_field_names_ = set([]) -ShmodelVisibilityPublicDetails._all_fields_ = [] - -ShmodelVisibilityTeamOnlyDetails._all_field_names_ = set([]) -ShmodelVisibilityTeamOnlyDetails._all_fields_ = [] - -SignInAsSessionEndDetails._all_field_names_ = set([]) -SignInAsSessionEndDetails._all_fields_ = [] - -SignInAsSessionStartDetails._all_field_names_ = set([]) -SignInAsSessionStartDetails._all_fields_ = [] - -SmartSyncChangePolicyDetails._new_value_validator = SmartSyncPolicy_validator -SmartSyncChangePolicyDetails._previous_value_validator = bv.Nullable(SmartSyncPolicy_validator) -SmartSyncChangePolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -SmartSyncChangePolicyDetails._all_fields_ = [ - ('new_value', SmartSyncChangePolicyDetails._new_value_validator), - ('previous_value', SmartSyncChangePolicyDetails._previous_value_validator), -] - -SmartSyncCreateAdminPrivilegeReportDetails._all_field_names_ = set([]) -SmartSyncCreateAdminPrivilegeReportDetails._all_fields_ = [] - -SmartSyncNotOptOutDetails._previous_value_validator = SmartSyncOptOutPolicy_validator -SmartSyncNotOptOutDetails._new_value_validator = SmartSyncOptOutPolicy_validator -SmartSyncNotOptOutDetails._all_field_names_ = set([ - 'previous_value', - 'new_value', -]) -SmartSyncNotOptOutDetails._all_fields_ = [ - ('previous_value', SmartSyncNotOptOutDetails._previous_value_validator), - ('new_value', SmartSyncNotOptOutDetails._new_value_validator), -] - -SmartSyncOptOutDetails._previous_value_validator = SmartSyncOptOutPolicy_validator -SmartSyncOptOutDetails._new_value_validator = SmartSyncOptOutPolicy_validator -SmartSyncOptOutDetails._all_field_names_ = set([ - 'previous_value', - 'new_value', -]) -SmartSyncOptOutDetails._all_fields_ = [ - ('previous_value', SmartSyncOptOutDetails._previous_value_validator), - ('new_value', SmartSyncOptOutDetails._new_value_validator), -] - -SmartSyncOptOutPolicy._default_validator = bv.Void() -SmartSyncOptOutPolicy._opted_out_validator = bv.Void() -SmartSyncOptOutPolicy._other_validator = bv.Void() -SmartSyncOptOutPolicy._tagmap = { - 'default': SmartSyncOptOutPolicy._default_validator, - 'opted_out': SmartSyncOptOutPolicy._opted_out_validator, - 'other': SmartSyncOptOutPolicy._other_validator, -} - -SmartSyncOptOutPolicy.default = SmartSyncOptOutPolicy('default') -SmartSyncOptOutPolicy.opted_out = SmartSyncOptOutPolicy('opted_out') -SmartSyncOptOutPolicy.other = SmartSyncOptOutPolicy('other') - -SmartSyncPolicy._local_only_validator = bv.Void() -SmartSyncPolicy._synced_validator = bv.Void() -SmartSyncPolicy._other_validator = bv.Void() -SmartSyncPolicy._tagmap = { - 'local_only': SmartSyncPolicy._local_only_validator, - 'synced': SmartSyncPolicy._synced_validator, - 'other': SmartSyncPolicy._other_validator, -} - -SmartSyncPolicy.local_only = SmartSyncPolicy('local_only') -SmartSyncPolicy.synced = SmartSyncPolicy('synced') -SmartSyncPolicy.other = SmartSyncPolicy('other') - -SpaceLimitsLevel._generous_validator = bv.Void() -SpaceLimitsLevel._moderate_validator = bv.Void() -SpaceLimitsLevel._no_limit_validator = bv.Void() -SpaceLimitsLevel._strict_validator = bv.Void() -SpaceLimitsLevel._other_validator = bv.Void() -SpaceLimitsLevel._tagmap = { - 'generous': SpaceLimitsLevel._generous_validator, - 'moderate': SpaceLimitsLevel._moderate_validator, - 'no_limit': SpaceLimitsLevel._no_limit_validator, - 'strict': SpaceLimitsLevel._strict_validator, - 'other': SpaceLimitsLevel._other_validator, -} - -SpaceLimitsLevel.generous = SpaceLimitsLevel('generous') -SpaceLimitsLevel.moderate = SpaceLimitsLevel('moderate') -SpaceLimitsLevel.no_limit = SpaceLimitsLevel('no_limit') -SpaceLimitsLevel.strict = SpaceLimitsLevel('strict') -SpaceLimitsLevel.other = SpaceLimitsLevel('other') - -SpaceLimitsStatus._within_quota_validator = bv.Void() -SpaceLimitsStatus._near_quota_validator = bv.Void() -SpaceLimitsStatus._over_quota_validator = bv.Void() -SpaceLimitsStatus._other_validator = bv.Void() -SpaceLimitsStatus._tagmap = { - 'within_quota': SpaceLimitsStatus._within_quota_validator, - 'near_quota': SpaceLimitsStatus._near_quota_validator, - 'over_quota': SpaceLimitsStatus._over_quota_validator, - 'other': SpaceLimitsStatus._other_validator, -} - -SpaceLimitsStatus.within_quota = SpaceLimitsStatus('within_quota') -SpaceLimitsStatus.near_quota = SpaceLimitsStatus('near_quota') -SpaceLimitsStatus.over_quota = SpaceLimitsStatus('over_quota') -SpaceLimitsStatus.other = SpaceLimitsStatus('other') - -SsoAddCertDetails._certificate_details_validator = Certificate_validator -SsoAddCertDetails._all_field_names_ = set(['certificate_details']) -SsoAddCertDetails._all_fields_ = [('certificate_details', SsoAddCertDetails._certificate_details_validator)] - -SsoAddLoginUrlDetails._new_value_validator = bv.String() -SsoAddLoginUrlDetails._all_field_names_ = set(['new_value']) -SsoAddLoginUrlDetails._all_fields_ = [('new_value', SsoAddLoginUrlDetails._new_value_validator)] - -SsoAddLogoutUrlDetails._new_value_validator = bv.Nullable(bv.String()) -SsoAddLogoutUrlDetails._all_field_names_ = set(['new_value']) -SsoAddLogoutUrlDetails._all_fields_ = [('new_value', SsoAddLogoutUrlDetails._new_value_validator)] - -SsoChangeCertDetails._previous_certificate_details_validator = bv.Nullable(Certificate_validator) -SsoChangeCertDetails._new_certificate_details_validator = Certificate_validator -SsoChangeCertDetails._all_field_names_ = set([ - 'previous_certificate_details', - 'new_certificate_details', -]) -SsoChangeCertDetails._all_fields_ = [ - ('previous_certificate_details', SsoChangeCertDetails._previous_certificate_details_validator), - ('new_certificate_details', SsoChangeCertDetails._new_certificate_details_validator), -] - -SsoChangeLoginUrlDetails._previous_value_validator = bv.String() -SsoChangeLoginUrlDetails._new_value_validator = bv.String() -SsoChangeLoginUrlDetails._all_field_names_ = set([ - 'previous_value', - 'new_value', -]) -SsoChangeLoginUrlDetails._all_fields_ = [ - ('previous_value', SsoChangeLoginUrlDetails._previous_value_validator), - ('new_value', SsoChangeLoginUrlDetails._new_value_validator), -] - -SsoChangeLogoutUrlDetails._previous_value_validator = bv.Nullable(bv.String()) -SsoChangeLogoutUrlDetails._new_value_validator = bv.Nullable(bv.String()) -SsoChangeLogoutUrlDetails._all_field_names_ = set([ - 'previous_value', - 'new_value', -]) -SsoChangeLogoutUrlDetails._all_fields_ = [ - ('previous_value', SsoChangeLogoutUrlDetails._previous_value_validator), - ('new_value', SsoChangeLogoutUrlDetails._new_value_validator), -] - -SsoChangePolicyDetails._new_value_validator = team_policies.SsoPolicy_validator -SsoChangePolicyDetails._previous_value_validator = bv.Nullable(team_policies.SsoPolicy_validator) -SsoChangePolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -SsoChangePolicyDetails._all_fields_ = [ - ('new_value', SsoChangePolicyDetails._new_value_validator), - ('previous_value', SsoChangePolicyDetails._previous_value_validator), -] - -SsoChangeSamlIdentityModeDetails._previous_value_validator = bv.Int64() -SsoChangeSamlIdentityModeDetails._new_value_validator = bv.Int64() -SsoChangeSamlIdentityModeDetails._all_field_names_ = set([ - 'previous_value', - 'new_value', -]) -SsoChangeSamlIdentityModeDetails._all_fields_ = [ - ('previous_value', SsoChangeSamlIdentityModeDetails._previous_value_validator), - ('new_value', SsoChangeSamlIdentityModeDetails._new_value_validator), -] - -SsoLoginFailDetails._error_details_validator = FailureDetailsLogInfo_validator -SsoLoginFailDetails._all_field_names_ = set(['error_details']) -SsoLoginFailDetails._all_fields_ = [('error_details', SsoLoginFailDetails._error_details_validator)] - -SsoRemoveCertDetails._all_field_names_ = set([]) -SsoRemoveCertDetails._all_fields_ = [] - -SsoRemoveLoginUrlDetails._previous_value_validator = bv.String() -SsoRemoveLoginUrlDetails._all_field_names_ = set(['previous_value']) -SsoRemoveLoginUrlDetails._all_fields_ = [('previous_value', SsoRemoveLoginUrlDetails._previous_value_validator)] - -SsoRemoveLogoutUrlDetails._previous_value_validator = bv.String() -SsoRemoveLogoutUrlDetails._all_field_names_ = set(['previous_value']) -SsoRemoveLogoutUrlDetails._all_fields_ = [('previous_value', SsoRemoveLogoutUrlDetails._previous_value_validator)] - -TeamActivityCreateReportDetails._start_date_validator = common.DropboxTimestamp_validator -TeamActivityCreateReportDetails._end_date_validator = common.DropboxTimestamp_validator -TeamActivityCreateReportDetails._all_field_names_ = set([ - 'start_date', - 'end_date', -]) -TeamActivityCreateReportDetails._all_fields_ = [ - ('start_date', TeamActivityCreateReportDetails._start_date_validator), - ('end_date', TeamActivityCreateReportDetails._end_date_validator), -] - -TeamEvent._timestamp_validator = common.DropboxTimestamp_validator -TeamEvent._event_category_validator = EventCategory_validator -TeamEvent._actor_validator = ActorLogInfo_validator -TeamEvent._origin_validator = bv.Nullable(OriginLogInfo_validator) -TeamEvent._involve_non_team_member_validator = bv.Boolean() -TeamEvent._context_validator = ContextLogInfo_validator -TeamEvent._participants_validator = bv.Nullable(bv.List(ParticipantLogInfo_validator)) -TeamEvent._assets_validator = bv.Nullable(bv.List(AssetLogInfo_validator)) -TeamEvent._event_type_validator = EventType_validator -TeamEvent._details_validator = EventDetails_validator -TeamEvent._all_field_names_ = set([ - 'timestamp', - 'event_category', - 'actor', - 'origin', - 'involve_non_team_member', - 'context', - 'participants', - 'assets', - 'event_type', - 'details', -]) -TeamEvent._all_fields_ = [ - ('timestamp', TeamEvent._timestamp_validator), - ('event_category', TeamEvent._event_category_validator), - ('actor', TeamEvent._actor_validator), - ('origin', TeamEvent._origin_validator), - ('involve_non_team_member', TeamEvent._involve_non_team_member_validator), - ('context', TeamEvent._context_validator), - ('participants', TeamEvent._participants_validator), - ('assets', TeamEvent._assets_validator), - ('event_type', TeamEvent._event_type_validator), - ('details', TeamEvent._details_validator), -] - -TeamFolderChangeStatusDetails._new_value_validator = TeamFolderStatus_validator -TeamFolderChangeStatusDetails._previous_value_validator = bv.Nullable(TeamFolderStatus_validator) -TeamFolderChangeStatusDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -TeamFolderChangeStatusDetails._all_fields_ = [ - ('new_value', TeamFolderChangeStatusDetails._new_value_validator), - ('previous_value', TeamFolderChangeStatusDetails._previous_value_validator), -] - -TeamFolderCreateDetails._all_field_names_ = set([]) -TeamFolderCreateDetails._all_fields_ = [] - -TeamFolderDowngradeDetails._target_asset_index_validator = bv.UInt64() -TeamFolderDowngradeDetails._all_field_names_ = set(['target_asset_index']) -TeamFolderDowngradeDetails._all_fields_ = [('target_asset_index', TeamFolderDowngradeDetails._target_asset_index_validator)] - -TeamFolderPermanentlyDeleteDetails._all_field_names_ = set([]) -TeamFolderPermanentlyDeleteDetails._all_fields_ = [] - -TeamFolderRenameDetails._relocate_action_details_validator = RelocateAssetReferencesLogInfo_validator -TeamFolderRenameDetails._all_field_names_ = set(['relocate_action_details']) -TeamFolderRenameDetails._all_fields_ = [('relocate_action_details', TeamFolderRenameDetails._relocate_action_details_validator)] - -TeamFolderStatus._archive_validator = bv.Void() -TeamFolderStatus._unarchive_validator = bv.Void() -TeamFolderStatus._other_validator = bv.Void() -TeamFolderStatus._tagmap = { - 'archive': TeamFolderStatus._archive_validator, - 'unarchive': TeamFolderStatus._unarchive_validator, - 'other': TeamFolderStatus._other_validator, -} - -TeamFolderStatus.archive = TeamFolderStatus('archive') -TeamFolderStatus.unarchive = TeamFolderStatus('unarchive') -TeamFolderStatus.other = TeamFolderStatus('other') - -TeamLinkedAppLogInfo._field_names_ = set([]) -TeamLinkedAppLogInfo._all_field_names_ = AppLogInfo._all_field_names_.union(TeamLinkedAppLogInfo._field_names_) -TeamLinkedAppLogInfo._fields_ = [] -TeamLinkedAppLogInfo._all_fields_ = AppLogInfo._all_fields_ + TeamLinkedAppLogInfo._fields_ - -TeamMemberLogInfo._team_member_id_validator = bv.Nullable(team_common.TeamMemberId_validator) -TeamMemberLogInfo._member_external_id_validator = bv.Nullable(team_common.MemberExternalId_validator) -TeamMemberLogInfo._field_names_ = set([ - 'team_member_id', - 'member_external_id', -]) -TeamMemberLogInfo._all_field_names_ = UserLogInfo._all_field_names_.union(TeamMemberLogInfo._field_names_) -TeamMemberLogInfo._fields_ = [ - ('team_member_id', TeamMemberLogInfo._team_member_id_validator), - ('member_external_id', TeamMemberLogInfo._member_external_id_validator), -] -TeamMemberLogInfo._all_fields_ = UserLogInfo._all_fields_ + TeamMemberLogInfo._fields_ - -TeamMembershipType._free_validator = bv.Void() -TeamMembershipType._full_validator = bv.Void() -TeamMembershipType._other_validator = bv.Void() -TeamMembershipType._tagmap = { - 'free': TeamMembershipType._free_validator, - 'full': TeamMembershipType._full_validator, - 'other': TeamMembershipType._other_validator, -} - -TeamMembershipType.free = TeamMembershipType('free') -TeamMembershipType.full = TeamMembershipType('full') -TeamMembershipType.other = TeamMembershipType('other') - -TeamMergeFromDetails._team_name_validator = bv.String() -TeamMergeFromDetails._all_field_names_ = set(['team_name']) -TeamMergeFromDetails._all_fields_ = [('team_name', TeamMergeFromDetails._team_name_validator)] - -TeamMergeToDetails._team_name_validator = bv.String() -TeamMergeToDetails._all_field_names_ = set(['team_name']) -TeamMergeToDetails._all_fields_ = [('team_name', TeamMergeToDetails._team_name_validator)] - -TeamName._team_display_name_validator = bv.String() -TeamName._team_legal_name_validator = bv.String() -TeamName._all_field_names_ = set([ - 'team_display_name', - 'team_legal_name', -]) -TeamName._all_fields_ = [ - ('team_display_name', TeamName._team_display_name_validator), - ('team_legal_name', TeamName._team_legal_name_validator), -] - -TeamProfileAddLogoDetails._all_field_names_ = set([]) -TeamProfileAddLogoDetails._all_fields_ = [] - -TeamProfileChangeDefaultLanguageDetails._new_value_validator = common.LanguageCode_validator -TeamProfileChangeDefaultLanguageDetails._previous_value_validator = common.LanguageCode_validator -TeamProfileChangeDefaultLanguageDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -TeamProfileChangeDefaultLanguageDetails._all_fields_ = [ - ('new_value', TeamProfileChangeDefaultLanguageDetails._new_value_validator), - ('previous_value', TeamProfileChangeDefaultLanguageDetails._previous_value_validator), -] - -TeamProfileChangeLogoDetails._all_field_names_ = set([]) -TeamProfileChangeLogoDetails._all_fields_ = [] - -TeamProfileChangeNameDetails._previous_value_validator = bv.Nullable(TeamName_validator) -TeamProfileChangeNameDetails._new_value_validator = TeamName_validator -TeamProfileChangeNameDetails._all_field_names_ = set([ - 'previous_value', - 'new_value', -]) -TeamProfileChangeNameDetails._all_fields_ = [ - ('previous_value', TeamProfileChangeNameDetails._previous_value_validator), - ('new_value', TeamProfileChangeNameDetails._new_value_validator), -] - -TeamProfileRemoveLogoDetails._all_field_names_ = set([]) -TeamProfileRemoveLogoDetails._all_fields_ = [] - -TfaAddBackupPhoneDetails._all_field_names_ = set([]) -TfaAddBackupPhoneDetails._all_fields_ = [] - -TfaAddSecurityKeyDetails._all_field_names_ = set([]) -TfaAddSecurityKeyDetails._all_fields_ = [] - -TfaChangeBackupPhoneDetails._all_field_names_ = set([]) -TfaChangeBackupPhoneDetails._all_fields_ = [] - -TfaChangePolicyDetails._new_value_validator = team_policies.TwoStepVerificationPolicy_validator -TfaChangePolicyDetails._previous_value_validator = bv.Nullable(team_policies.TwoStepVerificationPolicy_validator) -TfaChangePolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -TfaChangePolicyDetails._all_fields_ = [ - ('new_value', TfaChangePolicyDetails._new_value_validator), - ('previous_value', TfaChangePolicyDetails._previous_value_validator), -] - -TfaChangeStatusDetails._new_value_validator = TfaConfiguration_validator -TfaChangeStatusDetails._previous_value_validator = bv.Nullable(TfaConfiguration_validator) -TfaChangeStatusDetails._used_rescue_code_validator = bv.Nullable(bv.Boolean()) -TfaChangeStatusDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', - 'used_rescue_code', -]) -TfaChangeStatusDetails._all_fields_ = [ - ('new_value', TfaChangeStatusDetails._new_value_validator), - ('previous_value', TfaChangeStatusDetails._previous_value_validator), - ('used_rescue_code', TfaChangeStatusDetails._used_rescue_code_validator), -] - -TfaConfiguration._disabled_validator = bv.Void() -TfaConfiguration._enabled_validator = bv.Void() -TfaConfiguration._sms_validator = bv.Void() -TfaConfiguration._authenticator_validator = bv.Void() -TfaConfiguration._other_validator = bv.Void() -TfaConfiguration._tagmap = { - 'disabled': TfaConfiguration._disabled_validator, - 'enabled': TfaConfiguration._enabled_validator, - 'sms': TfaConfiguration._sms_validator, - 'authenticator': TfaConfiguration._authenticator_validator, - 'other': TfaConfiguration._other_validator, -} - -TfaConfiguration.disabled = TfaConfiguration('disabled') -TfaConfiguration.enabled = TfaConfiguration('enabled') -TfaConfiguration.sms = TfaConfiguration('sms') -TfaConfiguration.authenticator = TfaConfiguration('authenticator') -TfaConfiguration.other = TfaConfiguration('other') - -TfaRemoveBackupPhoneDetails._all_field_names_ = set([]) -TfaRemoveBackupPhoneDetails._all_fields_ = [] - -TfaRemoveSecurityKeyDetails._all_field_names_ = set([]) -TfaRemoveSecurityKeyDetails._all_fields_ = [] - -TfaResetDetails._all_field_names_ = set([]) -TfaResetDetails._all_fields_ = [] - -TimeUnit._milliseconds_validator = bv.Void() -TimeUnit._seconds_validator = bv.Void() -TimeUnit._minutes_validator = bv.Void() -TimeUnit._hours_validator = bv.Void() -TimeUnit._days_validator = bv.Void() -TimeUnit._weeks_validator = bv.Void() -TimeUnit._months_validator = bv.Void() -TimeUnit._years_validator = bv.Void() -TimeUnit._other_validator = bv.Void() -TimeUnit._tagmap = { - 'milliseconds': TimeUnit._milliseconds_validator, - 'seconds': TimeUnit._seconds_validator, - 'minutes': TimeUnit._minutes_validator, - 'hours': TimeUnit._hours_validator, - 'days': TimeUnit._days_validator, - 'weeks': TimeUnit._weeks_validator, - 'months': TimeUnit._months_validator, - 'years': TimeUnit._years_validator, - 'other': TimeUnit._other_validator, -} - -TimeUnit.milliseconds = TimeUnit('milliseconds') -TimeUnit.seconds = TimeUnit('seconds') -TimeUnit.minutes = TimeUnit('minutes') -TimeUnit.hours = TimeUnit('hours') -TimeUnit.days = TimeUnit('days') -TimeUnit.weeks = TimeUnit('weeks') -TimeUnit.months = TimeUnit('months') -TimeUnit.years = TimeUnit('years') -TimeUnit.other = TimeUnit('other') - -TwoAccountChangePolicyDetails._new_value_validator = TwoAccountPolicy_validator -TwoAccountChangePolicyDetails._previous_value_validator = bv.Nullable(TwoAccountPolicy_validator) -TwoAccountChangePolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -TwoAccountChangePolicyDetails._all_fields_ = [ - ('new_value', TwoAccountChangePolicyDetails._new_value_validator), - ('previous_value', TwoAccountChangePolicyDetails._previous_value_validator), -] - -TwoAccountPolicy._disabled_validator = bv.Void() -TwoAccountPolicy._enabled_validator = bv.Void() -TwoAccountPolicy._other_validator = bv.Void() -TwoAccountPolicy._tagmap = { - 'disabled': TwoAccountPolicy._disabled_validator, - 'enabled': TwoAccountPolicy._enabled_validator, - 'other': TwoAccountPolicy._other_validator, -} - -TwoAccountPolicy.disabled = TwoAccountPolicy('disabled') -TwoAccountPolicy.enabled = TwoAccountPolicy('enabled') -TwoAccountPolicy.other = TwoAccountPolicy('other') - -UserLinkedAppLogInfo._field_names_ = set([]) -UserLinkedAppLogInfo._all_field_names_ = AppLogInfo._all_field_names_.union(UserLinkedAppLogInfo._field_names_) -UserLinkedAppLogInfo._fields_ = [] -UserLinkedAppLogInfo._all_fields_ = AppLogInfo._all_fields_ + UserLinkedAppLogInfo._fields_ - -UserNameLogInfo._given_name_validator = bv.String() -UserNameLogInfo._surname_validator = bv.String() -UserNameLogInfo._locale_validator = bv.Nullable(bv.String()) -UserNameLogInfo._all_field_names_ = set([ - 'given_name', - 'surname', - 'locale', -]) -UserNameLogInfo._all_fields_ = [ - ('given_name', UserNameLogInfo._given_name_validator), - ('surname', UserNameLogInfo._surname_validator), - ('locale', UserNameLogInfo._locale_validator), -] - -UserOrTeamLinkedAppLogInfo._field_names_ = set([]) -UserOrTeamLinkedAppLogInfo._all_field_names_ = AppLogInfo._all_field_names_.union(UserOrTeamLinkedAppLogInfo._field_names_) -UserOrTeamLinkedAppLogInfo._fields_ = [] -UserOrTeamLinkedAppLogInfo._all_fields_ = AppLogInfo._all_fields_ + UserOrTeamLinkedAppLogInfo._fields_ - -WebSessionLogInfo._field_names_ = set([]) -WebSessionLogInfo._all_field_names_ = SessionLogInfo._all_field_names_.union(WebSessionLogInfo._field_names_) -WebSessionLogInfo._fields_ = [] -WebSessionLogInfo._all_fields_ = SessionLogInfo._all_fields_ + WebSessionLogInfo._fields_ - -WebSessionsChangeFixedLengthPolicyDetails._new_value_validator = bv.Nullable(WebSessionsFixedLengthPolicy_validator) -WebSessionsChangeFixedLengthPolicyDetails._previous_value_validator = bv.Nullable(WebSessionsFixedLengthPolicy_validator) -WebSessionsChangeFixedLengthPolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -WebSessionsChangeFixedLengthPolicyDetails._all_fields_ = [ - ('new_value', WebSessionsChangeFixedLengthPolicyDetails._new_value_validator), - ('previous_value', WebSessionsChangeFixedLengthPolicyDetails._previous_value_validator), -] - -WebSessionsChangeIdleLengthPolicyDetails._new_value_validator = bv.Nullable(WebSessionsIdleLengthPolicy_validator) -WebSessionsChangeIdleLengthPolicyDetails._previous_value_validator = bv.Nullable(WebSessionsIdleLengthPolicy_validator) -WebSessionsChangeIdleLengthPolicyDetails._all_field_names_ = set([ - 'new_value', - 'previous_value', -]) -WebSessionsChangeIdleLengthPolicyDetails._all_fields_ = [ - ('new_value', WebSessionsChangeIdleLengthPolicyDetails._new_value_validator), - ('previous_value', WebSessionsChangeIdleLengthPolicyDetails._previous_value_validator), -] - -WebSessionsFixedLengthPolicy._defined_validator = DurationLogInfo_validator -WebSessionsFixedLengthPolicy._undefined_validator = bv.Void() -WebSessionsFixedLengthPolicy._other_validator = bv.Void() -WebSessionsFixedLengthPolicy._tagmap = { - 'defined': WebSessionsFixedLengthPolicy._defined_validator, - 'undefined': WebSessionsFixedLengthPolicy._undefined_validator, - 'other': WebSessionsFixedLengthPolicy._other_validator, -} - -WebSessionsFixedLengthPolicy.undefined = WebSessionsFixedLengthPolicy('undefined') -WebSessionsFixedLengthPolicy.other = WebSessionsFixedLengthPolicy('other') - -WebSessionsIdleLengthPolicy._defined_validator = DurationLogInfo_validator -WebSessionsIdleLengthPolicy._undefined_validator = bv.Void() -WebSessionsIdleLengthPolicy._other_validator = bv.Void() -WebSessionsIdleLengthPolicy._tagmap = { - 'defined': WebSessionsIdleLengthPolicy._defined_validator, - 'undefined': WebSessionsIdleLengthPolicy._undefined_validator, - 'other': WebSessionsIdleLengthPolicy._other_validator, -} - -WebSessionsIdleLengthPolicy.undefined = WebSessionsIdleLengthPolicy('undefined') -WebSessionsIdleLengthPolicy.other = WebSessionsIdleLengthPolicy('other') - -get_events = bb.Route( - 'get_events', - False, - GetTeamEventsArg_validator, - GetTeamEventsResult_validator, - GetTeamEventsError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -get_events_continue = bb.Route( - 'get_events/continue', - False, - GetTeamEventsContinueArg_validator, - GetTeamEventsResult_validator, - GetTeamEventsContinueError_validator, - {'host': u'api', - 'style': u'rpc'}, -) - -ROUTES = { - 'get_events': get_events, - 'get_events/continue': get_events_continue, -} - diff --git a/resources/lib/dropbox/team_policies.py b/resources/lib/dropbox/team_policies.py deleted file mode 100644 index 8fd4620..0000000 --- a/resources/lib/dropbox/team_policies.py +++ /dev/null @@ -1,1040 +0,0 @@ -# -*- coding: utf-8 -*- -# Auto-generated by Stone, do not modify. -# flake8: noqa -# pylint: skip-file -try: - from . import stone_validators as bv - from . import stone_base as bb -except (SystemError, ValueError): - # Catch errors raised when importing a relative module when not in a package. - # This makes testing this file directly (outside of a package) easier. - import stone_validators as bv - import stone_base as bb - -class EmmState(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar disabled: Emm token is disabled. - :ivar optional: Emm token is optional. - :ivar required: Emm token is required. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - disabled = None - # Attribute is overwritten below the class definition - optional = None - # Attribute is overwritten below the class definition - required = None - # Attribute is overwritten below the class definition - other = None - - def is_disabled(self): - """ - Check if the union tag is ``disabled``. - - :rtype: bool - """ - return self._tag == 'disabled' - - def is_optional(self): - """ - Check if the union tag is ``optional``. - - :rtype: bool - """ - return self._tag == 'optional' - - def is_required(self): - """ - Check if the union tag is ``required``. - - :rtype: bool - """ - return self._tag == 'required' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'EmmState(%r, %r)' % (self._tag, self._value) - -EmmState_validator = bv.Union(EmmState) - -class OfficeAddInPolicy(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar disabled: Office Add-In is disabled. - :ivar enabled: Office Add-In is enabled. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - disabled = None - # Attribute is overwritten below the class definition - enabled = None - # Attribute is overwritten below the class definition - other = None - - def is_disabled(self): - """ - Check if the union tag is ``disabled``. - - :rtype: bool - """ - return self._tag == 'disabled' - - def is_enabled(self): - """ - Check if the union tag is ``enabled``. - - :rtype: bool - """ - return self._tag == 'enabled' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'OfficeAddInPolicy(%r, %r)' % (self._tag, self._value) - -OfficeAddInPolicy_validator = bv.Union(OfficeAddInPolicy) - -class PaperDeploymentPolicy(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar full: All team members have access to Paper. - :ivar partial: Only whitelisted team members can access Paper. To see which - user is whitelisted, check 'is_paper_whitelisted' on 'account/info'. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - full = None - # Attribute is overwritten below the class definition - partial = None - # Attribute is overwritten below the class definition - other = None - - def is_full(self): - """ - Check if the union tag is ``full``. - - :rtype: bool - """ - return self._tag == 'full' - - def is_partial(self): - """ - Check if the union tag is ``partial``. - - :rtype: bool - """ - return self._tag == 'partial' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'PaperDeploymentPolicy(%r, %r)' % (self._tag, self._value) - -PaperDeploymentPolicy_validator = bv.Union(PaperDeploymentPolicy) - -class PaperEnabledPolicy(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar disabled: Paper is disabled. - :ivar enabled: Paper is enabled. - :ivar unspecified: Unspecified policy. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - disabled = None - # Attribute is overwritten below the class definition - enabled = None - # Attribute is overwritten below the class definition - unspecified = None - # Attribute is overwritten below the class definition - other = None - - def is_disabled(self): - """ - Check if the union tag is ``disabled``. - - :rtype: bool - """ - return self._tag == 'disabled' - - def is_enabled(self): - """ - Check if the union tag is ``enabled``. - - :rtype: bool - """ - return self._tag == 'enabled' - - def is_unspecified(self): - """ - Check if the union tag is ``unspecified``. - - :rtype: bool - """ - return self._tag == 'unspecified' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'PaperEnabledPolicy(%r, %r)' % (self._tag, self._value) - -PaperEnabledPolicy_validator = bv.Union(PaperEnabledPolicy) - -class PasswordStrengthPolicy(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar minimal_requirements: User passwords will adhere to the minimal - password strength policy. - :ivar moderate_password: User passwords will adhere to the moderate password - strength policy. - :ivar strong_password: User passwords will adhere to the very strong - password strength policy. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - minimal_requirements = None - # Attribute is overwritten below the class definition - moderate_password = None - # Attribute is overwritten below the class definition - strong_password = None - # Attribute is overwritten below the class definition - other = None - - def is_minimal_requirements(self): - """ - Check if the union tag is ``minimal_requirements``. - - :rtype: bool - """ - return self._tag == 'minimal_requirements' - - def is_moderate_password(self): - """ - Check if the union tag is ``moderate_password``. - - :rtype: bool - """ - return self._tag == 'moderate_password' - - def is_strong_password(self): - """ - Check if the union tag is ``strong_password``. - - :rtype: bool - """ - return self._tag == 'strong_password' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'PasswordStrengthPolicy(%r, %r)' % (self._tag, self._value) - -PasswordStrengthPolicy_validator = bv.Union(PasswordStrengthPolicy) - -class RolloutMethod(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar unlink_all: Unlink all. - :ivar unlink_most_inactive: Unlink devices with the most inactivity. - :ivar add_member_to_exceptions: Add member to Exceptions. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - unlink_all = None - # Attribute is overwritten below the class definition - unlink_most_inactive = None - # Attribute is overwritten below the class definition - add_member_to_exceptions = None - - def is_unlink_all(self): - """ - Check if the union tag is ``unlink_all``. - - :rtype: bool - """ - return self._tag == 'unlink_all' - - def is_unlink_most_inactive(self): - """ - Check if the union tag is ``unlink_most_inactive``. - - :rtype: bool - """ - return self._tag == 'unlink_most_inactive' - - def is_add_member_to_exceptions(self): - """ - Check if the union tag is ``add_member_to_exceptions``. - - :rtype: bool - """ - return self._tag == 'add_member_to_exceptions' - - def __repr__(self): - return 'RolloutMethod(%r, %r)' % (self._tag, self._value) - -RolloutMethod_validator = bv.Union(RolloutMethod) - -class SharedFolderJoinPolicy(bb.Union): - """ - Policy governing which shared folders a team member can join. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar from_team_only: Team members can only join folders shared by - teammates. - :ivar from_anyone: Team members can join any shared folder, including those - shared by users outside the team. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - from_team_only = None - # Attribute is overwritten below the class definition - from_anyone = None - # Attribute is overwritten below the class definition - other = None - - def is_from_team_only(self): - """ - Check if the union tag is ``from_team_only``. - - :rtype: bool - """ - return self._tag == 'from_team_only' - - def is_from_anyone(self): - """ - Check if the union tag is ``from_anyone``. - - :rtype: bool - """ - return self._tag == 'from_anyone' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SharedFolderJoinPolicy(%r, %r)' % (self._tag, self._value) - -SharedFolderJoinPolicy_validator = bv.Union(SharedFolderJoinPolicy) - -class SharedFolderMemberPolicy(bb.Union): - """ - Policy governing who can be a member of a folder shared by a team member. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar team: Only a teammate can be a member of a folder shared by a team - member. - :ivar anyone: Anyone can be a member of a folder shared by a team member. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - team = None - # Attribute is overwritten below the class definition - anyone = None - # Attribute is overwritten below the class definition - other = None - - def is_team(self): - """ - Check if the union tag is ``team``. - - :rtype: bool - """ - return self._tag == 'team' - - def is_anyone(self): - """ - Check if the union tag is ``anyone``. - - :rtype: bool - """ - return self._tag == 'anyone' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SharedFolderMemberPolicy(%r, %r)' % (self._tag, self._value) - -SharedFolderMemberPolicy_validator = bv.Union(SharedFolderMemberPolicy) - -class SharedLinkCreatePolicy(bb.Union): - """ - Policy governing the visibility of shared links. This policy can apply to - newly created shared links, or all shared links. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar default_public: By default, anyone can access newly created shared - links. No login will be required to access the shared links unless - overridden. - :ivar default_team_only: By default, only members of the same team can - access newly created shared links. Login will be required to access the - shared links unless overridden. - :ivar team_only: Only members of the same team can access all shared links. - Login will be required to access all shared links. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - default_public = None - # Attribute is overwritten below the class definition - default_team_only = None - # Attribute is overwritten below the class definition - team_only = None - # Attribute is overwritten below the class definition - other = None - - def is_default_public(self): - """ - Check if the union tag is ``default_public``. - - :rtype: bool - """ - return self._tag == 'default_public' - - def is_default_team_only(self): - """ - Check if the union tag is ``default_team_only``. - - :rtype: bool - """ - return self._tag == 'default_team_only' - - def is_team_only(self): - """ - Check if the union tag is ``team_only``. - - :rtype: bool - """ - return self._tag == 'team_only' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SharedLinkCreatePolicy(%r, %r)' % (self._tag, self._value) - -SharedLinkCreatePolicy_validator = bv.Union(SharedLinkCreatePolicy) - -class SsoPolicy(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar disabled: Users will be able to sign in with their Dropbox - credentials. - :ivar optional: Users will be able to sign in with either their Dropbox or - single sign-on credentials. - :ivar required: Users will be required to sign in with their single sign-on - credentials. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - disabled = None - # Attribute is overwritten below the class definition - optional = None - # Attribute is overwritten below the class definition - required = None - # Attribute is overwritten below the class definition - other = None - - def is_disabled(self): - """ - Check if the union tag is ``disabled``. - - :rtype: bool - """ - return self._tag == 'disabled' - - def is_optional(self): - """ - Check if the union tag is ``optional``. - - :rtype: bool - """ - return self._tag == 'optional' - - def is_required(self): - """ - Check if the union tag is ``required``. - - :rtype: bool - """ - return self._tag == 'required' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'SsoPolicy(%r, %r)' % (self._tag, self._value) - -SsoPolicy_validator = bv.Union(SsoPolicy) - -class TeamMemberPolicies(object): - """ - Policies governing team members. - - :ivar sharing: Policies governing sharing. - :ivar emm_state: This describes the Enterprise Mobility Management (EMM) - state for this team. This information can be used to understand if an - organization is integrating with a third-party EMM vendor to further - manage and apply restrictions upon the team's Dropbox usage on mobile - devices. This is a new feature and in the future we'll be adding more - new fields and additional documentation. - :ivar office_addin: The admin policy around the Dropbox Office Add-In for - this team. - """ - - __slots__ = [ - '_sharing_value', - '_sharing_present', - '_emm_state_value', - '_emm_state_present', - '_office_addin_value', - '_office_addin_present', - ] - - _has_required_fields = True - - def __init__(self, - sharing=None, - emm_state=None, - office_addin=None): - self._sharing_value = None - self._sharing_present = False - self._emm_state_value = None - self._emm_state_present = False - self._office_addin_value = None - self._office_addin_present = False - if sharing is not None: - self.sharing = sharing - if emm_state is not None: - self.emm_state = emm_state - if office_addin is not None: - self.office_addin = office_addin - - @property - def sharing(self): - """ - Policies governing sharing. - - :rtype: TeamSharingPolicies - """ - if self._sharing_present: - return self._sharing_value - else: - raise AttributeError("missing required field 'sharing'") - - @sharing.setter - def sharing(self, val): - self._sharing_validator.validate_type_only(val) - self._sharing_value = val - self._sharing_present = True - - @sharing.deleter - def sharing(self): - self._sharing_value = None - self._sharing_present = False - - @property - def emm_state(self): - """ - This describes the Enterprise Mobility Management (EMM) state for this - team. This information can be used to understand if an organization is - integrating with a third-party EMM vendor to further manage and apply - restrictions upon the team's Dropbox usage on mobile devices. This is a - new feature and in the future we'll be adding more new fields and - additional documentation. - - :rtype: EmmState - """ - if self._emm_state_present: - return self._emm_state_value - else: - raise AttributeError("missing required field 'emm_state'") - - @emm_state.setter - def emm_state(self, val): - self._emm_state_validator.validate_type_only(val) - self._emm_state_value = val - self._emm_state_present = True - - @emm_state.deleter - def emm_state(self): - self._emm_state_value = None - self._emm_state_present = False - - @property - def office_addin(self): - """ - The admin policy around the Dropbox Office Add-In for this team. - - :rtype: OfficeAddInPolicy - """ - if self._office_addin_present: - return self._office_addin_value - else: - raise AttributeError("missing required field 'office_addin'") - - @office_addin.setter - def office_addin(self, val): - self._office_addin_validator.validate_type_only(val) - self._office_addin_value = val - self._office_addin_present = True - - @office_addin.deleter - def office_addin(self): - self._office_addin_value = None - self._office_addin_present = False - - def __repr__(self): - return 'TeamMemberPolicies(sharing={!r}, emm_state={!r}, office_addin={!r})'.format( - self._sharing_value, - self._emm_state_value, - self._office_addin_value, - ) - -TeamMemberPolicies_validator = bv.Struct(TeamMemberPolicies) - -class TeamSharingPolicies(object): - """ - Policies governing sharing within and outside of the team. - - :ivar shared_folder_member_policy: Who can join folders shared by team - members. - :ivar shared_folder_join_policy: Which shared folders team members can join. - :ivar shared_link_create_policy: Who can view shared links owned by team - members. - """ - - __slots__ = [ - '_shared_folder_member_policy_value', - '_shared_folder_member_policy_present', - '_shared_folder_join_policy_value', - '_shared_folder_join_policy_present', - '_shared_link_create_policy_value', - '_shared_link_create_policy_present', - ] - - _has_required_fields = True - - def __init__(self, - shared_folder_member_policy=None, - shared_folder_join_policy=None, - shared_link_create_policy=None): - self._shared_folder_member_policy_value = None - self._shared_folder_member_policy_present = False - self._shared_folder_join_policy_value = None - self._shared_folder_join_policy_present = False - self._shared_link_create_policy_value = None - self._shared_link_create_policy_present = False - if shared_folder_member_policy is not None: - self.shared_folder_member_policy = shared_folder_member_policy - if shared_folder_join_policy is not None: - self.shared_folder_join_policy = shared_folder_join_policy - if shared_link_create_policy is not None: - self.shared_link_create_policy = shared_link_create_policy - - @property - def shared_folder_member_policy(self): - """ - Who can join folders shared by team members. - - :rtype: SharedFolderMemberPolicy - """ - if self._shared_folder_member_policy_present: - return self._shared_folder_member_policy_value - else: - raise AttributeError("missing required field 'shared_folder_member_policy'") - - @shared_folder_member_policy.setter - def shared_folder_member_policy(self, val): - self._shared_folder_member_policy_validator.validate_type_only(val) - self._shared_folder_member_policy_value = val - self._shared_folder_member_policy_present = True - - @shared_folder_member_policy.deleter - def shared_folder_member_policy(self): - self._shared_folder_member_policy_value = None - self._shared_folder_member_policy_present = False - - @property - def shared_folder_join_policy(self): - """ - Which shared folders team members can join. - - :rtype: SharedFolderJoinPolicy - """ - if self._shared_folder_join_policy_present: - return self._shared_folder_join_policy_value - else: - raise AttributeError("missing required field 'shared_folder_join_policy'") - - @shared_folder_join_policy.setter - def shared_folder_join_policy(self, val): - self._shared_folder_join_policy_validator.validate_type_only(val) - self._shared_folder_join_policy_value = val - self._shared_folder_join_policy_present = True - - @shared_folder_join_policy.deleter - def shared_folder_join_policy(self): - self._shared_folder_join_policy_value = None - self._shared_folder_join_policy_present = False - - @property - def shared_link_create_policy(self): - """ - Who can view shared links owned by team members. - - :rtype: SharedLinkCreatePolicy - """ - if self._shared_link_create_policy_present: - return self._shared_link_create_policy_value - else: - raise AttributeError("missing required field 'shared_link_create_policy'") - - @shared_link_create_policy.setter - def shared_link_create_policy(self, val): - self._shared_link_create_policy_validator.validate_type_only(val) - self._shared_link_create_policy_value = val - self._shared_link_create_policy_present = True - - @shared_link_create_policy.deleter - def shared_link_create_policy(self): - self._shared_link_create_policy_value = None - self._shared_link_create_policy_present = False - - def __repr__(self): - return 'TeamSharingPolicies(shared_folder_member_policy={!r}, shared_folder_join_policy={!r}, shared_link_create_policy={!r})'.format( - self._shared_folder_member_policy_value, - self._shared_folder_join_policy_value, - self._shared_link_create_policy_value, - ) - -TeamSharingPolicies_validator = bv.Struct(TeamSharingPolicies) - -class TwoStepVerificationPolicy(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar require_tfa_enable: Enabled require two factor authorization. - :ivar require_tfa_disable: Disabled require two factor authorization. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - require_tfa_enable = None - # Attribute is overwritten below the class definition - require_tfa_disable = None - # Attribute is overwritten below the class definition - other = None - - def is_require_tfa_enable(self): - """ - Check if the union tag is ``require_tfa_enable``. - - :rtype: bool - """ - return self._tag == 'require_tfa_enable' - - def is_require_tfa_disable(self): - """ - Check if the union tag is ``require_tfa_disable``. - - :rtype: bool - """ - return self._tag == 'require_tfa_disable' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'TwoStepVerificationPolicy(%r, %r)' % (self._tag, self._value) - -TwoStepVerificationPolicy_validator = bv.Union(TwoStepVerificationPolicy) - -EmmState._disabled_validator = bv.Void() -EmmState._optional_validator = bv.Void() -EmmState._required_validator = bv.Void() -EmmState._other_validator = bv.Void() -EmmState._tagmap = { - 'disabled': EmmState._disabled_validator, - 'optional': EmmState._optional_validator, - 'required': EmmState._required_validator, - 'other': EmmState._other_validator, -} - -EmmState.disabled = EmmState('disabled') -EmmState.optional = EmmState('optional') -EmmState.required = EmmState('required') -EmmState.other = EmmState('other') - -OfficeAddInPolicy._disabled_validator = bv.Void() -OfficeAddInPolicy._enabled_validator = bv.Void() -OfficeAddInPolicy._other_validator = bv.Void() -OfficeAddInPolicy._tagmap = { - 'disabled': OfficeAddInPolicy._disabled_validator, - 'enabled': OfficeAddInPolicy._enabled_validator, - 'other': OfficeAddInPolicy._other_validator, -} - -OfficeAddInPolicy.disabled = OfficeAddInPolicy('disabled') -OfficeAddInPolicy.enabled = OfficeAddInPolicy('enabled') -OfficeAddInPolicy.other = OfficeAddInPolicy('other') - -PaperDeploymentPolicy._full_validator = bv.Void() -PaperDeploymentPolicy._partial_validator = bv.Void() -PaperDeploymentPolicy._other_validator = bv.Void() -PaperDeploymentPolicy._tagmap = { - 'full': PaperDeploymentPolicy._full_validator, - 'partial': PaperDeploymentPolicy._partial_validator, - 'other': PaperDeploymentPolicy._other_validator, -} - -PaperDeploymentPolicy.full = PaperDeploymentPolicy('full') -PaperDeploymentPolicy.partial = PaperDeploymentPolicy('partial') -PaperDeploymentPolicy.other = PaperDeploymentPolicy('other') - -PaperEnabledPolicy._disabled_validator = bv.Void() -PaperEnabledPolicy._enabled_validator = bv.Void() -PaperEnabledPolicy._unspecified_validator = bv.Void() -PaperEnabledPolicy._other_validator = bv.Void() -PaperEnabledPolicy._tagmap = { - 'disabled': PaperEnabledPolicy._disabled_validator, - 'enabled': PaperEnabledPolicy._enabled_validator, - 'unspecified': PaperEnabledPolicy._unspecified_validator, - 'other': PaperEnabledPolicy._other_validator, -} - -PaperEnabledPolicy.disabled = PaperEnabledPolicy('disabled') -PaperEnabledPolicy.enabled = PaperEnabledPolicy('enabled') -PaperEnabledPolicy.unspecified = PaperEnabledPolicy('unspecified') -PaperEnabledPolicy.other = PaperEnabledPolicy('other') - -PasswordStrengthPolicy._minimal_requirements_validator = bv.Void() -PasswordStrengthPolicy._moderate_password_validator = bv.Void() -PasswordStrengthPolicy._strong_password_validator = bv.Void() -PasswordStrengthPolicy._other_validator = bv.Void() -PasswordStrengthPolicy._tagmap = { - 'minimal_requirements': PasswordStrengthPolicy._minimal_requirements_validator, - 'moderate_password': PasswordStrengthPolicy._moderate_password_validator, - 'strong_password': PasswordStrengthPolicy._strong_password_validator, - 'other': PasswordStrengthPolicy._other_validator, -} - -PasswordStrengthPolicy.minimal_requirements = PasswordStrengthPolicy('minimal_requirements') -PasswordStrengthPolicy.moderate_password = PasswordStrengthPolicy('moderate_password') -PasswordStrengthPolicy.strong_password = PasswordStrengthPolicy('strong_password') -PasswordStrengthPolicy.other = PasswordStrengthPolicy('other') - -RolloutMethod._unlink_all_validator = bv.Void() -RolloutMethod._unlink_most_inactive_validator = bv.Void() -RolloutMethod._add_member_to_exceptions_validator = bv.Void() -RolloutMethod._tagmap = { - 'unlink_all': RolloutMethod._unlink_all_validator, - 'unlink_most_inactive': RolloutMethod._unlink_most_inactive_validator, - 'add_member_to_exceptions': RolloutMethod._add_member_to_exceptions_validator, -} - -RolloutMethod.unlink_all = RolloutMethod('unlink_all') -RolloutMethod.unlink_most_inactive = RolloutMethod('unlink_most_inactive') -RolloutMethod.add_member_to_exceptions = RolloutMethod('add_member_to_exceptions') - -SharedFolderJoinPolicy._from_team_only_validator = bv.Void() -SharedFolderJoinPolicy._from_anyone_validator = bv.Void() -SharedFolderJoinPolicy._other_validator = bv.Void() -SharedFolderJoinPolicy._tagmap = { - 'from_team_only': SharedFolderJoinPolicy._from_team_only_validator, - 'from_anyone': SharedFolderJoinPolicy._from_anyone_validator, - 'other': SharedFolderJoinPolicy._other_validator, -} - -SharedFolderJoinPolicy.from_team_only = SharedFolderJoinPolicy('from_team_only') -SharedFolderJoinPolicy.from_anyone = SharedFolderJoinPolicy('from_anyone') -SharedFolderJoinPolicy.other = SharedFolderJoinPolicy('other') - -SharedFolderMemberPolicy._team_validator = bv.Void() -SharedFolderMemberPolicy._anyone_validator = bv.Void() -SharedFolderMemberPolicy._other_validator = bv.Void() -SharedFolderMemberPolicy._tagmap = { - 'team': SharedFolderMemberPolicy._team_validator, - 'anyone': SharedFolderMemberPolicy._anyone_validator, - 'other': SharedFolderMemberPolicy._other_validator, -} - -SharedFolderMemberPolicy.team = SharedFolderMemberPolicy('team') -SharedFolderMemberPolicy.anyone = SharedFolderMemberPolicy('anyone') -SharedFolderMemberPolicy.other = SharedFolderMemberPolicy('other') - -SharedLinkCreatePolicy._default_public_validator = bv.Void() -SharedLinkCreatePolicy._default_team_only_validator = bv.Void() -SharedLinkCreatePolicy._team_only_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, - '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.other = SharedLinkCreatePolicy('other') - -SsoPolicy._disabled_validator = bv.Void() -SsoPolicy._optional_validator = bv.Void() -SsoPolicy._required_validator = bv.Void() -SsoPolicy._other_validator = bv.Void() -SsoPolicy._tagmap = { - 'disabled': SsoPolicy._disabled_validator, - 'optional': SsoPolicy._optional_validator, - 'required': SsoPolicy._required_validator, - 'other': SsoPolicy._other_validator, -} - -SsoPolicy.disabled = SsoPolicy('disabled') -SsoPolicy.optional = SsoPolicy('optional') -SsoPolicy.required = SsoPolicy('required') -SsoPolicy.other = SsoPolicy('other') - -TeamMemberPolicies._sharing_validator = TeamSharingPolicies_validator -TeamMemberPolicies._emm_state_validator = EmmState_validator -TeamMemberPolicies._office_addin_validator = OfficeAddInPolicy_validator -TeamMemberPolicies._all_field_names_ = set([ - 'sharing', - 'emm_state', - 'office_addin', -]) -TeamMemberPolicies._all_fields_ = [ - ('sharing', TeamMemberPolicies._sharing_validator), - ('emm_state', TeamMemberPolicies._emm_state_validator), - ('office_addin', TeamMemberPolicies._office_addin_validator), -] - -TeamSharingPolicies._shared_folder_member_policy_validator = SharedFolderMemberPolicy_validator -TeamSharingPolicies._shared_folder_join_policy_validator = SharedFolderJoinPolicy_validator -TeamSharingPolicies._shared_link_create_policy_validator = SharedLinkCreatePolicy_validator -TeamSharingPolicies._all_field_names_ = set([ - 'shared_folder_member_policy', - 'shared_folder_join_policy', - 'shared_link_create_policy', -]) -TeamSharingPolicies._all_fields_ = [ - ('shared_folder_member_policy', TeamSharingPolicies._shared_folder_member_policy_validator), - ('shared_folder_join_policy', TeamSharingPolicies._shared_folder_join_policy_validator), - ('shared_link_create_policy', TeamSharingPolicies._shared_link_create_policy_validator), -] - -TwoStepVerificationPolicy._require_tfa_enable_validator = bv.Void() -TwoStepVerificationPolicy._require_tfa_disable_validator = bv.Void() -TwoStepVerificationPolicy._other_validator = bv.Void() -TwoStepVerificationPolicy._tagmap = { - 'require_tfa_enable': TwoStepVerificationPolicy._require_tfa_enable_validator, - 'require_tfa_disable': TwoStepVerificationPolicy._require_tfa_disable_validator, - 'other': TwoStepVerificationPolicy._other_validator, -} - -TwoStepVerificationPolicy.require_tfa_enable = TwoStepVerificationPolicy('require_tfa_enable') -TwoStepVerificationPolicy.require_tfa_disable = TwoStepVerificationPolicy('require_tfa_disable') -TwoStepVerificationPolicy.other = TwoStepVerificationPolicy('other') - -ROUTES = { -} - diff --git a/resources/lib/dropbox/trusted-certs.crt b/resources/lib/dropbox/trusted-certs.crt deleted file mode 100644 index 00c2f2e..0000000 --- a/resources/lib/dropbox/trusted-certs.crt +++ /dev/null @@ -1,1396 +0,0 @@ -# DigiCert Assured ID Root CA.pem -# Certificate: -# Data: -# Version: 3 (0x2) -# Serial Number: -# 0c:e7:e0:e5:17:d8:46:fe:8f:e5:60:fc:1b:f0:30:39 -# Signature Algorithm: sha1WithRSAEncryption -# Issuer: C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Assured ID Root CA -# Validity -# Not Before: Nov 10 00:00:00 2006 GMT -# Not After : Nov 10 00:00:00 2031 GMT -# Subject: C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Assured ID Root CA -# Subject Public Key Info: -# Public Key Algorithm: rsaEncryption -# Public-Key: (2048 bit) -# Modulus: -# 00:ad:0e:15:ce:e4:43:80:5c:b1:87:f3:b7:60:f9: -# 71:12:a5:ae:dc:26:94:88:aa:f4:ce:f5:20:39:28: -# 58:60:0c:f8:80:da:a9:15:95:32:61:3c:b5:b1:28: -# 84:8a:8a:dc:9f:0a:0c:83:17:7a:8f:90:ac:8a:e7: -# 79:53:5c:31:84:2a:f6:0f:98:32:36:76:cc:de:dd: -# 3c:a8:a2:ef:6a:fb:21:f2:52:61:df:9f:20:d7:1f: -# e2:b1:d9:fe:18:64:d2:12:5b:5f:f9:58:18:35:bc: -# 47:cd:a1:36:f9:6b:7f:d4:b0:38:3e:c1:1b:c3:8c: -# 33:d9:d8:2f:18:fe:28:0f:b3:a7:83:d6:c3:6e:44: -# c0:61:35:96:16:fe:59:9c:8b:76:6d:d7:f1:a2:4b: -# 0d:2b:ff:0b:72:da:9e:60:d0:8e:90:35:c6:78:55: -# 87:20:a1:cf:e5:6d:0a:c8:49:7c:31:98:33:6c:22: -# e9:87:d0:32:5a:a2:ba:13:82:11:ed:39:17:9d:99: -# 3a:72:a1:e6:fa:a4:d9:d5:17:31:75:ae:85:7d:22: -# ae:3f:01:46:86:f6:28:79:c8:b1:da:e4:57:17:c4: -# 7e:1c:0e:b0:b4:92:a6:56:b3:bd:b2:97:ed:aa:a7: -# f0:b7:c5:a8:3f:95:16:d0:ff:a1:96:eb:08:5f:18: -# 77:4f -# Exponent: 65537 (0x10001) -# X509v3 extensions: -# X509v3 Key Usage: critical -# Digital Signature, Certificate Sign, CRL Sign -# X509v3 Basic Constraints: critical -# CA:TRUE -# X509v3 Subject Key Identifier: -# 45:EB:A2:AF:F4:92:CB:82:31:2D:51:8B:A7:A7:21:9D:F3:6D:C8:0F -# X509v3 Authority Key Identifier: -# keyid:45:EB:A2:AF:F4:92:CB:82:31:2D:51:8B:A7:A7:21:9D:F3:6D:C8:0F -# -# Signature Algorithm: sha1WithRSAEncryption -# a2:0e:bc:df:e2:ed:f0:e3:72:73:7a:64:94:bf:f7:72:66:d8: -# 32:e4:42:75:62:ae:87:eb:f2:d5:d9:de:56:b3:9f:cc:ce:14: -# 28:b9:0d:97:60:5c:12:4c:58:e4:d3:3d:83:49:45:58:97:35: -# 69:1a:a8:47:ea:56:c6:79:ab:12:d8:67:81:84:df:7f:09:3c: -# 94:e6:b8:26:2c:20:bd:3d:b3:28:89:f7:5f:ff:22:e2:97:84: -# 1f:e9:65:ef:87:e0:df:c1:67:49:b3:5d:eb:b2:09:2a:eb:26: -# ed:78:be:7d:3f:2b:f3:b7:26:35:6d:5f:89:01:b6:49:5b:9f: -# 01:05:9b:ab:3d:25:c1:cc:b6:7f:c2:f1:6f:86:c6:fa:64:68: -# eb:81:2d:94:eb:42:b7:fa:8c:1e:dd:62:f1:be:50:67:b7:6c: -# bd:f3:f1:1f:6b:0c:36:07:16:7f:37:7c:a9:5b:6d:7a:f1:12: -# 46:60:83:d7:27:04:be:4b:ce:97:be:c3:67:2a:68:11:df:80: -# e7:0c:33:66:bf:13:0d:14:6e:f3:7f:1f:63:10:1e:fa:8d:1b: -# 25:6d:6c:8f:a5:b7:61:01:b1:d2:a3:26:a1:10:71:9d:ad:e2: -# c3:f9:c3:99:51:b7:2b:07:08:ce:2e:e6:50:b2:a7:fa:0a:45: -# 2f:a2:f0:f2 ------BEGIN CERTIFICATE----- -MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBl -MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 -d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJv -b3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzExMTEwMDAwMDAwWjBlMQswCQYDVQQG -EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNl -cnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwggEi -MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7c -JpSIqvTO9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYP -mDI2dsze3Tyoou9q+yHyUmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+ -wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4 -VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpyoeb6pNnVFzF1roV9Iq4/ -AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whfGHdPAgMB -AAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQW -BBRF66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYun -pyGd823IDzANBgkqhkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRC -dWKuh+vy1dneVrOfzM4UKLkNl2BcEkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTf -fwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38FnSbNd67IJKusm7Xi+fT8r87cm -NW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i8b5QZ7dsvfPx -H2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe -+o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g== ------END CERTIFICATE----- -# DigiCert Global Root CA.pem -# Certificate: -# Data: -# Version: 3 (0x2) -# Serial Number: -# 08:3b:e0:56:90:42:46:b1:a1:75:6a:c9:59:91:c7:4a -# Signature Algorithm: sha1WithRSAEncryption -# Issuer: C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Global Root CA -# Validity -# Not Before: Nov 10 00:00:00 2006 GMT -# Not After : Nov 10 00:00:00 2031 GMT -# Subject: C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Global Root CA -# Subject Public Key Info: -# Public Key Algorithm: rsaEncryption -# Public-Key: (2048 bit) -# Modulus: -# 00:e2:3b:e1:11:72:de:a8:a4:d3:a3:57:aa:50:a2: -# 8f:0b:77:90:c9:a2:a5:ee:12:ce:96:5b:01:09:20: -# cc:01:93:a7:4e:30:b7:53:f7:43:c4:69:00:57:9d: -# e2:8d:22:dd:87:06:40:00:81:09:ce:ce:1b:83:bf: -# df:cd:3b:71:46:e2:d6:66:c7:05:b3:76:27:16:8f: -# 7b:9e:1e:95:7d:ee:b7:48:a3:08:da:d6:af:7a:0c: -# 39:06:65:7f:4a:5d:1f:bc:17:f8:ab:be:ee:28:d7: -# 74:7f:7a:78:99:59:85:68:6e:5c:23:32:4b:bf:4e: -# c0:e8:5a:6d:e3:70:bf:77:10:bf:fc:01:f6:85:d9: -# a8:44:10:58:32:a9:75:18:d5:d1:a2:be:47:e2:27: -# 6a:f4:9a:33:f8:49:08:60:8b:d4:5f:b4:3a:84:bf: -# a1:aa:4a:4c:7d:3e:cf:4f:5f:6c:76:5e:a0:4b:37: -# 91:9e:dc:22:e6:6d:ce:14:1a:8e:6a:cb:fe:cd:b3: -# 14:64:17:c7:5b:29:9e:32:bf:f2:ee:fa:d3:0b:42: -# d4:ab:b7:41:32:da:0c:d4:ef:f8:81:d5:bb:8d:58: -# 3f:b5:1b:e8:49:28:a2:70:da:31:04:dd:f7:b2:16: -# f2:4c:0a:4e:07:a8:ed:4a:3d:5e:b5:7f:a3:90:c3: -# af:27 -# Exponent: 65537 (0x10001) -# X509v3 extensions: -# X509v3 Key Usage: critical -# Digital Signature, Certificate Sign, CRL Sign -# X509v3 Basic Constraints: critical -# CA:TRUE -# X509v3 Subject Key Identifier: -# 03:DE:50:35:56:D1:4C:BB:66:F0:A3:E2:1B:1B:C3:97:B2:3D:D1:55 -# X509v3 Authority Key Identifier: -# keyid:03:DE:50:35:56:D1:4C:BB:66:F0:A3:E2:1B:1B:C3:97:B2:3D:D1:55 -# -# Signature Algorithm: sha1WithRSAEncryption -# cb:9c:37:aa:48:13:12:0a:fa:dd:44:9c:4f:52:b0:f4:df:ae: -# 04:f5:79:79:08:a3:24:18:fc:4b:2b:84:c0:2d:b9:d5:c7:fe: -# f4:c1:1f:58:cb:b8:6d:9c:7a:74:e7:98:29:ab:11:b5:e3:70: -# a0:a1:cd:4c:88:99:93:8c:91:70:e2:ab:0f:1c:be:93:a9:ff: -# 63:d5:e4:07:60:d3:a3:bf:9d:5b:09:f1:d5:8e:e3:53:f4:8e: -# 63:fa:3f:a7:db:b4:66:df:62:66:d6:d1:6e:41:8d:f2:2d:b5: -# ea:77:4a:9f:9d:58:e2:2b:59:c0:40:23:ed:2d:28:82:45:3e: -# 79:54:92:26:98:e0:80:48:a8:37:ef:f0:d6:79:60:16:de:ac: -# e8:0e:cd:6e:ac:44:17:38:2f:49:da:e1:45:3e:2a:b9:36:53: -# cf:3a:50:06:f7:2e:e8:c4:57:49:6c:61:21:18:d5:04:ad:78: -# 3c:2c:3a:80:6b:a7:eb:af:15:14:e9:d8:89:c1:b9:38:6c:e2: -# 91:6c:8a:ff:64:b9:77:25:57:30:c0:1b:24:a3:e1:dc:e9:df: -# 47:7c:b5:b4:24:08:05:30:ec:2d:bd:0b:bf:45:bf:50:b9:a9: -# f3:eb:98:01:12:ad:c8:88:c6:98:34:5f:8d:0a:3c:c6:e9:d5: -# 95:95:6d:de ------BEGIN CERTIFICATE----- -MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh -MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 -d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD -QTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAwMDAwMDBaMGExCzAJBgNVBAYTAlVT -MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j -b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkqhkiG -9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsB -CSDMAZOnTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97 -nh6Vfe63SKMI2tavegw5BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt -43C/dxC//AH2hdmoRBBYMql1GNXRor5H4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7P -T19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y7vrTC0LUq7dBMtoM1O/4 -gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQABo2MwYTAO -BgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbR -TLtm8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUw -DQYJKoZIhvcNAQEFBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/Esr -hMAtudXH/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg -06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3Sp+dWOIrWcBAI+0tKIJF -PnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886UAb3LujEV0ls -YSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk -CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4= ------END CERTIFICATE----- -# DigiCert High Assurance EV Root CA.pem -# Certificate: -# Data: -# Version: 3 (0x2) -# Serial Number: -# 02:ac:5c:26:6a:0b:40:9b:8f:0b:79:f2:ae:46:25:77 -# Signature Algorithm: sha1WithRSAEncryption -# Issuer: C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert High Assurance EV Root CA -# Validity -# Not Before: Nov 10 00:00:00 2006 GMT -# Not After : Nov 10 00:00:00 2031 GMT -# Subject: C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert High Assurance EV Root CA -# Subject Public Key Info: -# Public Key Algorithm: rsaEncryption -# Public-Key: (2048 bit) -# Modulus: -# 00:c6:cc:e5:73:e6:fb:d4:bb:e5:2d:2d:32:a6:df: -# e5:81:3f:c9:cd:25:49:b6:71:2a:c3:d5:94:34:67: -# a2:0a:1c:b0:5f:69:a6:40:b1:c4:b7:b2:8f:d0:98: -# a4:a9:41:59:3a:d3:dc:94:d6:3c:db:74:38:a4:4a: -# cc:4d:25:82:f7:4a:a5:53:12:38:ee:f3:49:6d:71: -# 91:7e:63:b6:ab:a6:5f:c3:a4:84:f8:4f:62:51:be: -# f8:c5:ec:db:38:92:e3:06:e5:08:91:0c:c4:28:41: -# 55:fb:cb:5a:89:15:7e:71:e8:35:bf:4d:72:09:3d: -# be:3a:38:50:5b:77:31:1b:8d:b3:c7:24:45:9a:a7: -# ac:6d:00:14:5a:04:b7:ba:13:eb:51:0a:98:41:41: -# 22:4e:65:61:87:81:41:50:a6:79:5c:89:de:19:4a: -# 57:d5:2e:e6:5d:1c:53:2c:7e:98:cd:1a:06:16:a4: -# 68:73:d0:34:04:13:5c:a1:71:d3:5a:7c:55:db:5e: -# 64:e1:37:87:30:56:04:e5:11:b4:29:80:12:f1:79: -# 39:88:a2:02:11:7c:27:66:b7:88:b7:78:f2:ca:0a: -# a8:38:ab:0a:64:c2:bf:66:5d:95:84:c1:a1:25:1e: -# 87:5d:1a:50:0b:20:12:cc:41:bb:6e:0b:51:38:b8: -# 4b:cb -# Exponent: 65537 (0x10001) -# X509v3 extensions: -# X509v3 Key Usage: critical -# Digital Signature, Certificate Sign, CRL Sign -# X509v3 Basic Constraints: critical -# CA:TRUE -# X509v3 Subject Key Identifier: -# B1:3E:C3:69:03:F8:BF:47:01:D4:98:26:1A:08:02:EF:63:64:2B:C3 -# X509v3 Authority Key Identifier: -# keyid:B1:3E:C3:69:03:F8:BF:47:01:D4:98:26:1A:08:02:EF:63:64:2B:C3 -# -# Signature Algorithm: sha1WithRSAEncryption -# 1c:1a:06:97:dc:d7:9c:9f:3c:88:66:06:08:57:21:db:21:47: -# f8:2a:67:aa:bf:18:32:76:40:10:57:c1:8a:f3:7a:d9:11:65: -# 8e:35:fa:9e:fc:45:b5:9e:d9:4c:31:4b:b8:91:e8:43:2c:8e: -# b3:78:ce:db:e3:53:79:71:d6:e5:21:94:01:da:55:87:9a:24: -# 64:f6:8a:66:cc:de:9c:37:cd:a8:34:b1:69:9b:23:c8:9e:78: -# 22:2b:70:43:e3:55:47:31:61:19:ef:58:c5:85:2f:4e:30:f6: -# a0:31:16:23:c8:e7:e2:65:16:33:cb:bf:1a:1b:a0:3d:f8:ca: -# 5e:8b:31:8b:60:08:89:2d:0c:06:5c:52:b7:c4:f9:0a:98:d1: -# 15:5f:9f:12:be:7c:36:63:38:bd:44:a4:7f:e4:26:2b:0a:c4: -# 97:69:0d:e9:8c:e2:c0:10:57:b8:c8:76:12:91:55:f2:48:69: -# d8:bc:2a:02:5b:0f:44:d4:20:31:db:f4:ba:70:26:5d:90:60: -# 9e:bc:4b:17:09:2f:b4:cb:1e:43:68:c9:07:27:c1:d2:5c:f7: -# ea:21:b9:68:12:9c:3c:9c:bf:9e:fc:80:5c:9b:63:cd:ec:47: -# aa:25:27:67:a0:37:f3:00:82:7d:54:d7:a9:f8:e9:2e:13:a3: -# 77:e8:1f:4a ------BEGIN CERTIFICATE----- -MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs -MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 -d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j -ZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAwMFoXDTMxMTExMDAwMDAwMFowbDEL -MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3 -LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFuY2Ug -RVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm -+9S75S0tMqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTW -PNt0OKRKzE0lgvdKpVMSOO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEM -xChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFB -Ik5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQNAQTXKFx01p8VdteZOE3 -hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUeh10aUAsg -EsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQF -MAMBAf8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaA -FLE+w2kD+L9HAdSYJhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3Nec -nzyIZgYIVyHbIUf4KmeqvxgydkAQV8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6z -eM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFpmyPInngiK3BD41VHMWEZ71jF -hS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkKmNEVX58Svnw2 -Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe -vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep -+OkuE6N36B9K ------END CERTIFICATE----- -# Entrust Root Certification Authority - EC1.pem -# Certificate: -# Data: -# Version: 3 (0x2) -# Serial Number: -# a6:8b:79:29:00:00:00:00:50:d0:91:f9 -# Signature Algorithm: ecdsa-with-SHA384 -# Issuer: C=US, O=Entrust, Inc., OU=See www.entrust.net/legal-terms, OU=(c) 2012 Entrust, Inc. - for authorized use only, CN=Entrust Root Certification Authority - EC1 -# Validity -# Not Before: Dec 18 15:25:36 2012 GMT -# Not After : Dec 18 15:55:36 2037 GMT -# Subject: C=US, O=Entrust, Inc., OU=See www.entrust.net/legal-terms, OU=(c) 2012 Entrust, Inc. - for authorized use only, CN=Entrust Root Certification Authority - EC1 -# Subject Public Key Info: -# Public Key Algorithm: id-ecPublicKey -# Public-Key: (384 bit) -# pub: -# 04:84:13:c9:d0:ba:6d:41:7b:e2:6c:d0:eb:55:5f: -# 66:02:1a:24:f4:5b:89:69:47:e3:b8:c2:7d:f1:f2: -# 02:c5:9f:a0:f6:5b:d5:8b:06:19:86:4f:53:10:6d: -# 07:24:27:a1:a0:f8:d5:47:19:61:4c:7d:ca:93:27: -# ea:74:0c:ef:6f:96:09:fe:63:ec:70:5d:36:ad:67: -# 77:ae:c9:9d:7c:55:44:3a:a2:63:51:1f:f5:e3:62: -# d4:a9:47:07:3e:cc:20 -# ASN1 OID: secp384r1 -# X509v3 extensions: -# X509v3 Key Usage: critical -# Certificate Sign, CRL Sign -# X509v3 Basic Constraints: critical -# CA:TRUE -# X509v3 Subject Key Identifier: -# B7:63:E7:1A:DD:8D:E9:08:A6:55:83:A4:E0:6A:50:41:65:11:42:49 -# Signature Algorithm: ecdsa-with-SHA384 -# 30:64:02:30:61:79:d8:e5:42:47:df:1c:ae:53:99:17:b6:6f: -# 1c:7d:e1:bf:11:94:d1:03:88:75:e4:8d:89:a4:8a:77:46:de: -# 6d:61:ef:02:f5:fb:b5:df:cc:fe:4e:ff:fe:a9:e6:a7:02:30: -# 5b:99:d7:85:37:06:b5:7b:08:fd:eb:27:8b:4a:94:f9:e1:fa: -# a7:8e:26:08:e8:7c:92:68:6d:73:d8:6f:26:ac:21:02:b8:99: -# b7:26:41:5b:25:60:ae:d0:48:1a:ee:06 ------BEGIN CERTIFICATE----- -MIIC+TCCAoCgAwIBAgINAKaLeSkAAAAAUNCR+TAKBggqhkjOPQQDAzCBvzELMAkG -A1UEBhMCVVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3 -d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDEyIEVu -dHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25seTEzMDEGA1UEAxMq -RW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRUMxMB4XDTEy -MTIxODE1MjUzNloXDTM3MTIxODE1NTUzNlowgb8xCzAJBgNVBAYTAlVTMRYwFAYD -VQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0 -L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxMiBFbnRydXN0LCBJbmMuIC0g -Zm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxMzAxBgNVBAMTKkVudHJ1c3QgUm9vdCBD -ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEVDMTB2MBAGByqGSM49AgEGBSuBBAAi -A2IABIQTydC6bUF74mzQ61VfZgIaJPRbiWlH47jCffHyAsWfoPZb1YsGGYZPUxBt -ByQnoaD41UcZYUx9ypMn6nQM72+WCf5j7HBdNq1nd67JnXxVRDqiY1Ef9eNi1KlH -Bz7MIKNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O -BBYEFLdj5xrdjekIplWDpOBqUEFlEUJJMAoGCCqGSM49BAMDA2cAMGQCMGF52OVC -R98crlOZF7ZvHH3hvxGU0QOIdeSNiaSKd0bebWHvAvX7td/M/k7//qnmpwIwW5nX -hTcGtXsI/esni0qU+eH6p44mCOh8kmhtc9hvJqwhAriZtyZBWyVgrtBIGu4G ------END CERTIFICATE----- -# Entrust Root Certification Authority - G2.pem -# Certificate: -# Data: -# Version: 3 (0x2) -# Serial Number: 1246989352 (0x4a538c28) -# Signature Algorithm: sha256WithRSAEncryption -# Issuer: C=US, O=Entrust, Inc., OU=See www.entrust.net/legal-terms, OU=(c) 2009 Entrust, Inc. - for authorized use only, CN=Entrust Root Certification Authority - G2 -# Validity -# Not Before: Jul 7 17:25:54 2009 GMT -# Not After : Dec 7 17:55:54 2030 GMT -# Subject: C=US, O=Entrust, Inc., OU=See www.entrust.net/legal-terms, OU=(c) 2009 Entrust, Inc. - for authorized use only, CN=Entrust Root Certification Authority - G2 -# Subject Public Key Info: -# Public Key Algorithm: rsaEncryption -# Public-Key: (2048 bit) -# Modulus: -# 00:ba:84:b6:72:db:9e:0c:6b:e2:99:e9:30:01:a7: -# 76:ea:32:b8:95:41:1a:c9:da:61:4e:58:72:cf:fe: -# f6:82:79:bf:73:61:06:0a:a5:27:d8:b3:5f:d3:45: -# 4e:1c:72:d6:4e:32:f2:72:8a:0f:f7:83:19:d0:6a: -# 80:80:00:45:1e:b0:c7:e7:9a:bf:12:57:27:1c:a3: -# 68:2f:0a:87:bd:6a:6b:0e:5e:65:f3:1c:77:d5:d4: -# 85:8d:70:21:b4:b3:32:e7:8b:a2:d5:86:39:02:b1: -# b8:d2:47:ce:e4:c9:49:c4:3b:a7:de:fb:54:7d:57: -# be:f0:e8:6e:c2:79:b2:3a:0b:55:e2:50:98:16:32: -# 13:5c:2f:78:56:c1:c2:94:b3:f2:5a:e4:27:9a:9f: -# 24:d7:c6:ec:d0:9b:25:82:e3:cc:c2:c4:45:c5:8c: -# 97:7a:06:6b:2a:11:9f:a9:0a:6e:48:3b:6f:db:d4: -# 11:19:42:f7:8f:07:bf:f5:53:5f:9c:3e:f4:17:2c: -# e6:69:ac:4e:32:4c:62:77:ea:b7:e8:e5:bb:34:bc: -# 19:8b:ae:9c:51:e7:b7:7e:b5:53:b1:33:22:e5:6d: -# cf:70:3c:1a:fa:e2:9b:67:b6:83:f4:8d:a5:af:62: -# 4c:4d:e0:58:ac:64:34:12:03:f8:b6:8d:94:63:24: -# a4:71 -# Exponent: 65537 (0x10001) -# X509v3 extensions: -# X509v3 Key Usage: critical -# Certificate Sign, CRL Sign -# X509v3 Basic Constraints: critical -# CA:TRUE -# X509v3 Subject Key Identifier: -# 6A:72:26:7A:D0:1E:EF:7D:E7:3B:69:51:D4:6C:8D:9F:90:12:66:AB -# Signature Algorithm: sha256WithRSAEncryption -# 79:9f:1d:96:c6:b6:79:3f:22:8d:87:d3:87:03:04:60:6a:6b: -# 9a:2e:59:89:73:11:ac:43:d1:f5:13:ff:8d:39:2b:c0:f2:bd: -# 4f:70:8c:a9:2f:ea:17:c4:0b:54:9e:d4:1b:96:98:33:3c:a8: -# ad:62:a2:00:76:ab:59:69:6e:06:1d:7e:c4:b9:44:8d:98:af: -# 12:d4:61:db:0a:19:46:47:f3:eb:f7:63:c1:40:05:40:a5:d2: -# b7:f4:b5:9a:36:bf:a9:88:76:88:04:55:04:2b:9c:87:7f:1a: -# 37:3c:7e:2d:a5:1a:d8:d4:89:5e:ca:bd:ac:3d:6c:d8:6d:af: -# d5:f3:76:0f:cd:3b:88:38:22:9d:6c:93:9a:c4:3d:bf:82:1b: -# 65:3f:a6:0f:5d:aa:fc:e5:b2:15:ca:b5:ad:c6:bc:3d:d0:84: -# e8:ea:06:72:b0:4d:39:32:78:bf:3e:11:9c:0b:a4:9d:9a:21: -# f3:f0:9b:0b:30:78:db:c1:dc:87:43:fe:bc:63:9a:ca:c5:c2: -# 1c:c9:c7:8d:ff:3b:12:58:08:e6:b6:3d:ec:7a:2c:4e:fb:83: -# 96:ce:0c:3c:69:87:54:73:a4:73:c2:93:ff:51:10:ac:15:54: -# 01:d8:fc:05:b1:89:a1:7f:74:83:9a:49:d7:dc:4e:7b:8a:48: -# 6f:8b:45:f6 ------BEGIN CERTIFICATE----- -MIIEPjCCAyagAwIBAgIESlOMKDANBgkqhkiG9w0BAQsFADCBvjELMAkGA1UEBhMC -VVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50 -cnVzdC5uZXQvbGVnYWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3Qs -IEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25seTEyMDAGA1UEAxMpRW50cnVz -dCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIwHhcNMDkwNzA3MTcy -NTU0WhcNMzAxMjA3MTc1NTU0WjCBvjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUVu -dHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwt -dGVybXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0 -aG9yaXplZCB1c2Ugb25seTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmlj -YXRpb24gQXV0aG9yaXR5IC0gRzIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK -AoIBAQC6hLZy254Ma+KZ6TABp3bqMriVQRrJ2mFOWHLP/vaCeb9zYQYKpSfYs1/T -RU4cctZOMvJyig/3gxnQaoCAAEUesMfnmr8SVycco2gvCoe9amsOXmXzHHfV1IWN -cCG0szLni6LVhjkCsbjSR87kyUnEO6fe+1R9V77w6G7CebI6C1XiUJgWMhNcL3hW -wcKUs/Ja5CeanyTXxuzQmyWC48zCxEXFjJd6BmsqEZ+pCm5IO2/b1BEZQvePB7/1 -U1+cPvQXLOZprE4yTGJ36rfo5bs0vBmLrpxR57d+tVOxMyLlbc9wPBr64ptntoP0 -jaWvYkxN4FisZDQSA/i2jZRjJKRxAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAP -BgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqciZ60B7vfec7aVHUbI2fkBJmqzAN -BgkqhkiG9w0BAQsFAAOCAQEAeZ8dlsa2eT8ijYfThwMEYGprmi5ZiXMRrEPR9RP/ -jTkrwPK9T3CMqS/qF8QLVJ7UG5aYMzyorWKiAHarWWluBh1+xLlEjZivEtRh2woZ -Rkfz6/djwUAFQKXSt/S1mja/qYh2iARVBCuch38aNzx+LaUa2NSJXsq9rD1s2G2v -1fN2D807iDginWyTmsQ9v4IbZT+mD12q/OWyFcq1rca8PdCE6OoGcrBNOTJ4vz4R -nAuknZoh8/CbCzB428Hch0P+vGOaysXCHMnHjf87ElgI5rY97HosTvuDls4MPGmH -VHOkc8KT/1EQrBVUAdj8BbGJoX90g5pJ19xOe4pIb4tF9g== ------END CERTIFICATE----- -# Entrust Root Certification Authority.pem -# Certificate: -# Data: -# Version: 3 (0x2) -# Serial Number: 1164660820 (0x456b5054) -# Signature Algorithm: sha1WithRSAEncryption -# Issuer: C=US, O=Entrust, Inc., OU=www.entrust.net/CPS is incorporated by reference, OU=(c) 2006 Entrust, Inc., CN=Entrust Root Certification Authority -# Validity -# Not Before: Nov 27 20:23:42 2006 GMT -# Not After : Nov 27 20:53:42 2026 GMT -# Subject: C=US, O=Entrust, Inc., OU=www.entrust.net/CPS is incorporated by reference, OU=(c) 2006 Entrust, Inc., CN=Entrust Root Certification Authority -# Subject Public Key Info: -# Public Key Algorithm: rsaEncryption -# Public-Key: (2048 bit) -# Modulus: -# 00:b6:95:b6:43:42:fa:c6:6d:2a:6f:48:df:94:4c: -# 39:57:05:ee:c3:79:11:41:68:36:ed:ec:fe:9a:01: -# 8f:a1:38:28:fc:f7:10:46:66:2e:4d:1e:1a:b1:1a: -# 4e:c6:d1:c0:95:88:b0:c9:ff:31:8b:33:03:db:b7: -# 83:7b:3e:20:84:5e:ed:b2:56:28:a7:f8:e0:b9:40: -# 71:37:c5:cb:47:0e:97:2a:68:c0:22:95:62:15:db: -# 47:d9:f5:d0:2b:ff:82:4b:c9:ad:3e:de:4c:db:90: -# 80:50:3f:09:8a:84:00:ec:30:0a:3d:18:cd:fb:fd: -# 2a:59:9a:23:95:17:2c:45:9e:1f:6e:43:79:6d:0c: -# 5c:98:fe:48:a7:c5:23:47:5c:5e:fd:6e:e7:1e:b4: -# f6:68:45:d1:86:83:5b:a2:8a:8d:b1:e3:29:80:fe: -# 25:71:88:ad:be:bc:8f:ac:52:96:4b:aa:51:8d:e4: -# 13:31:19:e8:4e:4d:9f:db:ac:b3:6a:d5:bc:39:54: -# 71:ca:7a:7a:7f:90:dd:7d:1d:80:d9:81:bb:59:26: -# c2:11:fe:e6:93:e2:f7:80:e4:65:fb:34:37:0e:29: -# 80:70:4d:af:38:86:2e:9e:7f:57:af:9e:17:ae:eb: -# 1c:cb:28:21:5f:b6:1c:d8:e7:a2:04:22:f9:d3:da: -# d8:cb -# Exponent: 65537 (0x10001) -# X509v3 extensions: -# X509v3 Key Usage: critical -# Certificate Sign, CRL Sign -# X509v3 Basic Constraints: critical -# CA:TRUE -# X509v3 Private Key Usage Period: -# Not Before: Nov 27 20:23:42 2006 GMT, Not After: Nov 27 20:53:42 2026 GMT -# X509v3 Authority Key Identifier: -# keyid:68:90:E4:67:A4:A6:53:80:C7:86:66:A4:F1:F7:4B:43:FB:84:BD:6D -# -# X509v3 Subject Key Identifier: -# 68:90:E4:67:A4:A6:53:80:C7:86:66:A4:F1:F7:4B:43:FB:84:BD:6D -# 1.2.840.113533.7.65.0: -# 0...V7.1:4.0.... -# Signature Algorithm: sha1WithRSAEncryption -# 93:d4:30:b0:d7:03:20:2a:d0:f9:63:e8:91:0c:05:20:a9:5f: -# 19:ca:7b:72:4e:d4:b1:db:d0:96:fb:54:5a:19:2c:0c:08:f7: -# b2:bc:85:a8:9d:7f:6d:3b:52:b3:2a:db:e7:d4:84:8c:63:f6: -# 0f:cb:26:01:91:50:6c:f4:5f:14:e2:93:74:c0:13:9e:30:3a: -# 50:e3:b4:60:c5:1c:f0:22:44:8d:71:47:ac:c8:1a:c9:e9:9b: -# 9a:00:60:13:ff:70:7e:5f:11:4d:49:1b:b3:15:52:7b:c9:54: -# da:bf:9d:95:af:6b:9a:d8:9e:e9:f1:e4:43:8d:e2:11:44:3a: -# bf:af:bd:83:42:73:52:8b:aa:bb:a7:29:cf:f5:64:1c:0a:4d: -# d1:bc:aa:ac:9f:2a:d0:ff:7f:7f:da:7d:ea:b1:ed:30:25:c1: -# 84:da:34:d2:5b:78:83:56:ec:9c:36:c3:26:e2:11:f6:67:49: -# 1d:92:ab:8c:fb:eb:ff:7a:ee:85:4a:a7:50:80:f0:a7:5c:4a: -# 94:2e:5f:05:99:3c:52:41:e0:cd:b4:63:cf:01:43:ba:9c:83: -# dc:8f:60:3b:f3:5a:b4:b4:7b:ae:da:0b:90:38:75:ef:81:1d: -# 66:d2:f7:57:70:36:b3:bf:fc:28:af:71:25:85:5b:13:fe:1e: -# 7f:5a:b4:3c ------BEGIN CERTIFICATE----- -MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMC -VVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0 -Lm5ldC9DUFMgaXMgaW5jb3Jwb3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMW -KGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsGA1UEAxMkRW50cnVzdCBSb290IENl -cnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0MloXDTI2MTEyNzIw -NTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMTkw -NwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSBy -ZWZlcmVuY2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNV -BAMTJEVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJ -KoZIhvcNAQEBBQADggEPADCCAQoCggEBALaVtkNC+sZtKm9I35RMOVcF7sN5EUFo -Nu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYszA9u3g3s+IIRe7bJWKKf4 -4LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOwwCj0Yzfv9 -KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGI -rb68j6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi -94DkZfs0Nw4pgHBNrziGLp5/V6+eF67rHMsoIV+2HNjnogQi+dPa2MsCAwEAAaOB -sDCBrTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zArBgNVHRAEJDAi -gA8yMDA2MTEyNzIwMjM0MlqBDzIwMjYxMTI3MjA1MzQyWjAfBgNVHSMEGDAWgBRo -kORnpKZTgMeGZqTx90tD+4S9bTAdBgNVHQ4EFgQUaJDkZ6SmU4DHhmak8fdLQ/uE -vW0wHQYJKoZIhvZ9B0EABBAwDhsIVjcuMTo0LjADAgSQMA0GCSqGSIb3DQEBBQUA -A4IBAQCT1DCw1wMgKtD5Y+iRDAUgqV8ZyntyTtSx29CW+1RaGSwMCPeyvIWonX9t -O1KzKtvn1ISMY/YPyyYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6Zua -AGAT/3B+XxFNSRuzFVJ7yVTav52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP -9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTSW3iDVuycNsMm4hH2Z0kdkquM++v/ -eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0tHuu2guQOHXvgR1m -0vdXcDazv/wor3ElhVsT/h5/WrQ8 ------END CERTIFICATE----- -# Entrust.net Certification Authority (2048).pem -# Certificate: -# Data: -# Version: 3 (0x2) -# Serial Number: 946069240 (0x3863def8) -# Signature Algorithm: sha1WithRSAEncryption -# Issuer: O=Entrust.net, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Certification Authority (2048) -# Validity -# Not Before: Dec 24 17:50:51 1999 GMT -# Not After : Jul 24 14:15:12 2029 GMT -# Subject: O=Entrust.net, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Certification Authority (2048) -# Subject Public Key Info: -# Public Key Algorithm: rsaEncryption -# Public-Key: (2048 bit) -# Modulus: -# 00:ad:4d:4b:a9:12:86:b2:ea:a3:20:07:15:16:64: -# 2a:2b:4b:d1:bf:0b:4a:4d:8e:ed:80:76:a5:67:b7: -# 78:40:c0:73:42:c8:68:c0:db:53:2b:dd:5e:b8:76: -# 98:35:93:8b:1a:9d:7c:13:3a:0e:1f:5b:b7:1e:cf: -# e5:24:14:1e:b1:81:a9:8d:7d:b8:cc:6b:4b:03:f1: -# 02:0c:dc:ab:a5:40:24:00:7f:74:94:a1:9d:08:29: -# b3:88:0b:f5:87:77:9d:55:cd:e4:c3:7e:d7:6a:64: -# ab:85:14:86:95:5b:97:32:50:6f:3d:c8:ba:66:0c: -# e3:fc:bd:b8:49:c1:76:89:49:19:fd:c0:a8:bd:89: -# a3:67:2f:c6:9f:bc:71:19:60:b8:2d:e9:2c:c9:90: -# 76:66:7b:94:e2:af:78:d6:65:53:5d:3c:d6:9c:b2: -# cf:29:03:f9:2f:a4:50:b2:d4:48:ce:05:32:55:8a: -# fd:b2:64:4c:0e:e4:98:07:75:db:7f:df:b9:08:55: -# 60:85:30:29:f9:7b:48:a4:69:86:e3:35:3f:1e:86: -# 5d:7a:7a:15:bd:ef:00:8e:15:22:54:17:00:90:26: -# 93:bc:0e:49:68:91:bf:f8:47:d3:9d:95:42:c1:0e: -# 4d:df:6f:26:cf:c3:18:21:62:66:43:70:d6:d5:c0: -# 07:e1 -# Exponent: 65537 (0x10001) -# X509v3 extensions: -# X509v3 Key Usage: critical -# Certificate Sign, CRL Sign -# X509v3 Basic Constraints: critical -# CA:TRUE -# X509v3 Subject Key Identifier: -# 55:E4:81:D1:11:80:BE:D8:89:B9:08:A3:31:F9:A1:24:09:16:B9:70 -# Signature Algorithm: sha1WithRSAEncryption -# 3b:9b:8f:56:9b:30:e7:53:99:7c:7a:79:a7:4d:97:d7:19:95: -# 90:fb:06:1f:ca:33:7c:46:63:8f:96:66:24:fa:40:1b:21:27: -# ca:e6:72:73:f2:4f:fe:31:99:fd:c8:0c:4c:68:53:c6:80:82: -# 13:98:fa:b6:ad:da:5d:3d:f1:ce:6e:f6:15:11:94:82:0c:ee: -# 3f:95:af:11:ab:0f:d7:2f:de:1f:03:8f:57:2c:1e:c9:bb:9a: -# 1a:44:95:eb:18:4f:a6:1f:cd:7d:57:10:2f:9b:04:09:5a:84: -# b5:6e:d8:1d:3a:e1:d6:9e:d1:6c:79:5e:79:1c:14:c5:e3:d0: -# 4c:93:3b:65:3c:ed:df:3d:be:a6:e5:95:1a:c3:b5:19:c3:bd: -# 5e:5b:bb:ff:23:ef:68:19:cb:12:93:27:5c:03:2d:6f:30:d0: -# 1e:b6:1a:ac:de:5a:f7:d1:aa:a8:27:a6:fe:79:81:c4:79:99: -# 33:57:ba:12:b0:a9:e0:42:6c:93:ca:56:de:fe:6d:84:0b:08: -# 8b:7e:8d:ea:d7:98:21:c6:f3:e7:3c:79:2f:5e:9c:d1:4c:15: -# 8d:e1:ec:22:37:cc:9a:43:0b:97:dc:80:90:8d:b3:67:9b:6f: -# 48:08:15:56:cf:bf:f1:2b:7c:5e:9a:76:e9:59:90:c5:7c:83: -# 35:11:65:51 ------BEGIN CERTIFICATE----- -MIIEKjCCAxKgAwIBAgIEOGPe+DANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChML -RW50cnVzdC5uZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBp -bmNvcnAuIGJ5IHJlZi4gKGxpbWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5 -IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNVBAMTKkVudHJ1c3QubmV0IENlcnRp -ZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQxNzUwNTFaFw0yOTA3 -MjQxNDE1MTJaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3d3d3 -LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxp -YWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEG -A1UEAxMqRW50cnVzdC5uZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgp -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArU1LqRKGsuqjIAcVFmQq -K0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOLGp18EzoOH1u3Hs/lJBQe -sYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSrhRSGlVuX -MlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVT -XTzWnLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/ -HoZdenoVve8AjhUiVBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH -4QIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNV -HQ4EFgQUVeSB0RGAvtiJuQijMfmhJAkWuXAwDQYJKoZIhvcNAQEFBQADggEBADub -j1abMOdTmXx6eadNl9cZlZD7Bh/KM3xGY4+WZiT6QBshJ8rmcnPyT/4xmf3IDExo -U8aAghOY+rat2l098c5u9hURlIIM7j+VrxGrD9cv3h8Dj1csHsm7mhpElesYT6Yf -zX1XEC+bBAlahLVu2B064dae0Wx5XnkcFMXj0EyTO2U87d89vqbllRrDtRnDvV5b -u/8j72gZyxKTJ1wDLW8w0B62GqzeWvfRqqgnpv55gcR5mTNXuhKwqeBCbJPKVt7+ -bYQLCIt+jerXmCHG8+c8eS9enNFMFY3h7CI3zJpDC5fcgJCNs2ebb0gIFVbPv/Er -fF6adulZkMV8gzURZVE= ------END CERTIFICATE----- -# GeoTrust Global CA.pem -# Certificate: -# Data: -# Version: 3 (0x2) -# Serial Number: 144470 (0x23456) -# Signature Algorithm: sha1WithRSAEncryption -# Issuer: C=US, O=GeoTrust Inc., CN=GeoTrust Global CA -# Validity -# Not Before: May 21 04:00:00 2002 GMT -# Not After : May 21 04:00:00 2022 GMT -# Subject: C=US, O=GeoTrust Inc., CN=GeoTrust Global CA -# Subject Public Key Info: -# Public Key Algorithm: rsaEncryption -# Public-Key: (2048 bit) -# Modulus: -# 00:da:cc:18:63:30:fd:f4:17:23:1a:56:7e:5b:df: -# 3c:6c:38:e4:71:b7:78:91:d4:bc:a1:d8:4c:f8:a8: -# 43:b6:03:e9:4d:21:07:08:88:da:58:2f:66:39:29: -# bd:05:78:8b:9d:38:e8:05:b7:6a:7e:71:a4:e6:c4: -# 60:a6:b0:ef:80:e4:89:28:0f:9e:25:d6:ed:83:f3: -# ad:a6:91:c7:98:c9:42:18:35:14:9d:ad:98:46:92: -# 2e:4f:ca:f1:87:43:c1:16:95:57:2d:50:ef:89:2d: -# 80:7a:57:ad:f2:ee:5f:6b:d2:00:8d:b9:14:f8:14: -# 15:35:d9:c0:46:a3:7b:72:c8:91:bf:c9:55:2b:cd: -# d0:97:3e:9c:26:64:cc:df:ce:83:19:71:ca:4e:e6: -# d4:d5:7b:a9:19:cd:55:de:c8:ec:d2:5e:38:53:e5: -# 5c:4f:8c:2d:fe:50:23:36:fc:66:e6:cb:8e:a4:39: -# 19:00:b7:95:02:39:91:0b:0e:fe:38:2e:d1:1d:05: -# 9a:f6:4d:3e:6f:0f:07:1d:af:2c:1e:8f:60:39:e2: -# fa:36:53:13:39:d4:5e:26:2b:db:3d:a8:14:bd:32: -# eb:18:03:28:52:04:71:e5:ab:33:3d:e1:38:bb:07: -# 36:84:62:9c:79:ea:16:30:f4:5f:c0:2b:e8:71:6b: -# e4:f9 -# Exponent: 65537 (0x10001) -# X509v3 extensions: -# X509v3 Basic Constraints: critical -# CA:TRUE -# X509v3 Subject Key Identifier: -# C0:7A:98:68:8D:89:FB:AB:05:64:0C:11:7D:AA:7D:65:B8:CA:CC:4E -# X509v3 Authority Key Identifier: -# keyid:C0:7A:98:68:8D:89:FB:AB:05:64:0C:11:7D:AA:7D:65:B8:CA:CC:4E -# -# Signature Algorithm: sha1WithRSAEncryption -# 35:e3:29:6a:e5:2f:5d:54:8e:29:50:94:9f:99:1a:14:e4:8f: -# 78:2a:62:94:a2:27:67:9e:d0:cf:1a:5e:47:e9:c1:b2:a4:cf: -# dd:41:1a:05:4e:9b:4b:ee:4a:6f:55:52:b3:24:a1:37:0a:eb: -# 64:76:2a:2e:2c:f3:fd:3b:75:90:bf:fa:71:d8:c7:3d:37:d2: -# b5:05:95:62:b9:a6:de:89:3d:36:7b:38:77:48:97:ac:a6:20: -# 8f:2e:a6:c9:0c:c2:b2:99:45:00:c7:ce:11:51:22:22:e0:a5: -# ea:b6:15:48:09:64:ea:5e:4f:74:f7:05:3e:c7:8a:52:0c:db: -# 15:b4:bd:6d:9b:e5:c6:b1:54:68:a9:e3:69:90:b6:9a:a5:0f: -# b8:b9:3f:20:7d:ae:4a:b5:b8:9c:e4:1d:b6:ab:e6:94:a5:c1: -# c7:83:ad:db:f5:27:87:0e:04:6c:d5:ff:dd:a0:5d:ed:87:52: -# b7:2b:15:02:ae:39:a6:6a:74:e9:da:c4:e7:bc:4d:34:1e:a9: -# 5c:4d:33:5f:92:09:2f:88:66:5d:77:97:c7:1d:76:13:a9:d5: -# e5:f1:16:09:11:35:d5:ac:db:24:71:70:2c:98:56:0b:d9:17: -# b4:d1:e3:51:2b:5e:75:e8:d5:d0:dc:4f:34:ed:c2:05:66:80: -# a1:cb:e6:33 ------BEGIN CERTIFICATE----- -MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT -MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i -YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG -EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg -R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9 -9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq -fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv -iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU -1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+ -bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW -MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA -ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l -uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn -Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS -tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF -PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un -hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV -5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw== ------END CERTIFICATE----- -# GeoTrust Primary Certification Authority - G2.pem -# Certificate: -# Data: -# Version: 3 (0x2) -# Serial Number: -# 3c:b2:f4:48:0a:00:e2:fe:eb:24:3b:5e:60:3e:c3:6b -# Signature Algorithm: ecdsa-with-SHA384 -# Issuer: C=US, O=GeoTrust Inc., OU=(c) 2007 GeoTrust Inc. - For authorized use only, CN=GeoTrust Primary Certification Authority - G2 -# Validity -# Not Before: Nov 5 00:00:00 2007 GMT -# Not After : Jan 18 23:59:59 2038 GMT -# Subject: C=US, O=GeoTrust Inc., OU=(c) 2007 GeoTrust Inc. - For authorized use only, CN=GeoTrust Primary Certification Authority - G2 -# Subject Public Key Info: -# Public Key Algorithm: id-ecPublicKey -# Public-Key: (384 bit) -# pub: -# 04:15:b1:e8:fd:03:15:43:e5:ac:eb:87:37:11:62: -# ef:d2:83:36:52:7d:45:57:0b:4a:8d:7b:54:3b:3a: -# 6e:5f:15:02:c0:50:a6:cf:25:2f:7d:ca:48:b8:c7: -# 50:63:1c:2a:21:08:7c:9a:36:d8:0b:fe:d1:26:c5: -# 58:31:30:28:25:f3:5d:5d:a3:b8:b6:a5:b4:92:ed: -# 6c:2c:9f:eb:dd:43:89:a2:3c:4b:48:91:1d:50:ec: -# 26:df:d6:60:2e:bd:21 -# ASN1 OID: secp384r1 -# X509v3 extensions: -# X509v3 Basic Constraints: critical -# CA:TRUE -# X509v3 Key Usage: critical -# Certificate Sign, CRL Sign -# X509v3 Subject Key Identifier: -# 15:5F:35:57:51:55:FB:25:B2:AD:03:69:FC:01:A3:FA:BE:11:55:D5 -# Signature Algorithm: ecdsa-with-SHA384 -# 30:64:02:30:64:96:59:a6:e8:09:de:8b:ba:fa:5a:88:88:f0: -# 1f:91:d3:46:a8:f2:4a:4c:02:63:fb:6c:5f:38:db:2e:41:93: -# a9:0e:e6:9d:dc:31:1c:b2:a0:a7:18:1c:79:e1:c7:36:02:30: -# 3a:56:af:9a:74:6c:f6:fb:83:e0:33:d3:08:5f:a1:9c:c2:5b: -# 9f:46:d6:b6:cb:91:06:63:a2:06:e7:33:ac:3e:a8:81:12:d0: -# cb:ba:d0:92:0b:b6:9e:96:aa:04:0f:8a ------BEGIN CERTIFICATE----- -MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDEL -MAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChj -KSAyMDA3IEdlb1RydXN0IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2 -MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0 -eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1OVowgZgxCzAJBgNV -BAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykgMjAw -NyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNV -BAMTLUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBH -MjB2MBAGByqGSM49AgEGBSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcL -So17VDs6bl8VAsBQps8lL33KSLjHUGMcKiEIfJo22Av+0SbFWDEwKCXzXV2juLal -tJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAO -BgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+EVXVMAoG -CCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGT -qQ7mndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBucz -rD6ogRLQy7rQkgu2npaqBA+K ------END CERTIFICATE----- -# GeoTrust Primary Certification Authority - G3.pem -# Certificate: -# Data: -# Version: 3 (0x2) -# Serial Number: -# 15:ac:6e:94:19:b2:79:4b:41:f6:27:a9:c3:18:0f:1f -# Signature Algorithm: sha256WithRSAEncryption -# Issuer: C=US, O=GeoTrust Inc., OU=(c) 2008 GeoTrust Inc. - For authorized use only, CN=GeoTrust Primary Certification Authority - G3 -# Validity -# Not Before: Apr 2 00:00:00 2008 GMT -# Not After : Dec 1 23:59:59 2037 GMT -# Subject: C=US, O=GeoTrust Inc., OU=(c) 2008 GeoTrust Inc. - For authorized use only, CN=GeoTrust Primary Certification Authority - G3 -# Subject Public Key Info: -# Public Key Algorithm: rsaEncryption -# Public-Key: (2048 bit) -# Modulus: -# 00:dc:e2:5e:62:58:1d:33:57:39:32:33:fa:eb:cb: -# 87:8c:a7:d4:4a:dd:06:88:ea:64:8e:31:98:a5:38: -# 90:1e:98:cf:2e:63:2b:f0:46:bc:44:b2:89:a1:c0: -# 28:0c:49:70:21:95:9f:64:c0:a6:93:12:02:65:26: -# 86:c6:a5:89:f0:fa:d7:84:a0:70:af:4f:1a:97:3f: -# 06:44:d5:c9:eb:72:10:7d:e4:31:28:fb:1c:61:e6: -# 28:07:44:73:92:22:69:a7:03:88:6c:9d:63:c8:52: -# da:98:27:e7:08:4c:70:3e:b4:c9:12:c1:c5:67:83: -# 5d:33:f3:03:11:ec:6a:d0:53:e2:d1:ba:36:60:94: -# 80:bb:61:63:6c:5b:17:7e:df:40:94:1e:ab:0d:c2: -# 21:28:70:88:ff:d6:26:6c:6c:60:04:25:4e:55:7e: -# 7d:ef:bf:94:48:de:b7:1d:dd:70:8d:05:5f:88:a5: -# 9b:f2:c2:ee:ea:d1:40:41:6d:62:38:1d:56:06:c5: -# 03:47:51:20:19:fc:7b:10:0b:0e:62:ae:76:55:bf: -# 5f:77:be:3e:49:01:53:3d:98:25:03:76:24:5a:1d: -# b4:db:89:ea:79:e5:b6:b3:3b:3f:ba:4c:28:41:7f: -# 06:ac:6a:8e:c1:d0:f6:05:1d:7d:e6:42:86:e3:a5: -# d5:47 -# Exponent: 65537 (0x10001) -# X509v3 extensions: -# X509v3 Basic Constraints: critical -# CA:TRUE -# X509v3 Key Usage: critical -# Certificate Sign, CRL Sign -# X509v3 Subject Key Identifier: -# C4:79:CA:8E:A1:4E:03:1D:1C:DC:6B:DB:31:5B:94:3E:3F:30:7F:2D -# Signature Algorithm: sha256WithRSAEncryption -# 2d:c5:13:cf:56:80:7b:7a:78:bd:9f:ae:2c:99:e7:ef:da:df: -# 94:5e:09:69:a7:e7:6e:68:8c:bd:72:be:47:a9:0e:97:12:b8: -# 4a:f1:64:d3:39:df:25:34:d4:c1:cd:4e:81:f0:0f:04:c4:24: -# b3:34:96:c6:a6:aa:30:df:68:61:73:d7:f9:8e:85:89:ef:0e: -# 5e:95:28:4a:2a:27:8f:10:8e:2e:7c:86:c4:02:9e:da:0c:77: -# 65:0e:44:0d:92:fd:fd:b3:16:36:fa:11:0d:1d:8c:0e:07:89: -# 6a:29:56:f7:72:f4:dd:15:9c:77:35:66:57:ab:13:53:d8:8e: -# c1:40:c5:d7:13:16:5a:72:c7:b7:69:01:c4:7a:b1:83:01:68: -# 7d:8d:41:a1:94:18:c1:25:5c:fc:f0:fe:83:02:87:7c:0d:0d: -# cf:2e:08:5c:4a:40:0d:3e:ec:81:61:e6:24:db:ca:e0:0e:2d: -# 07:b2:3e:56:dc:8d:f5:41:85:07:48:9b:0c:0b:cb:49:3f:7d: -# ec:b7:fd:cb:8d:67:89:1a:ab:ed:bb:1e:a3:00:08:08:17:2a: -# 82:5c:31:5d:46:8a:2d:0f:86:9b:74:d9:45:fb:d4:40:b1:7a: -# aa:68:2d:86:b2:99:22:e1:c1:2b:c7:9c:f8:f3:5f:a8:82:12: -# eb:19:11:2d ------BEGIN CERTIFICATE----- -MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCB -mDELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsT -MChjKSAyMDA4IEdlb1RydXN0IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25s -eTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhv -cml0eSAtIEczMB4XDTA4MDQwMjAwMDAwMFoXDTM3MTIwMTIzNTk1OVowgZgxCzAJ -BgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg -MjAwOCBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0 -BgNVBAMTLUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg -LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANziXmJYHTNXOTIz -+uvLh4yn1ErdBojqZI4xmKU4kB6Yzy5jK/BGvESyiaHAKAxJcCGVn2TAppMSAmUm -hsalifD614SgcK9PGpc/BkTVyetyEH3kMSj7HGHmKAdEc5IiaacDiGydY8hS2pgn -5whMcD60yRLBxWeDXTPzAxHsatBT4tG6NmCUgLthY2xbF37fQJQeqw3CIShwiP/W -JmxsYAQlTlV+fe+/lEjetx3dcI0FX4ilm/LC7urRQEFtYjgdVgbFA0dRIBn8exAL -DmKudlW/X3e+PkkBUz2YJQN2JFodtNuJ6nnltrM7P7pMKEF/BqxqjsHQ9gUdfeZC -huOl1UcCAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYw -HQYDVR0OBBYEFMR5yo6hTgMdHNxr2zFblD4/MH8tMA0GCSqGSIb3DQEBCwUAA4IB -AQAtxRPPVoB7eni9n64smefv2t+UXglpp+duaIy9cr5HqQ6XErhK8WTTOd8lNNTB -zU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbEAp7aDHdlDkQN -kv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD -AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUH -SJsMC8tJP33st/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2G -spki4cErx5z481+oghLrGREt ------END CERTIFICATE----- -# GeoTrust Primary Certification Authority.pem -# Certificate: -# Data: -# Version: 3 (0x2) -# Serial Number: -# 18:ac:b5:6a:fd:69:b6:15:3a:63:6c:af:da:fa:c4:a1 -# Signature Algorithm: sha1WithRSAEncryption -# Issuer: C=US, O=GeoTrust Inc., CN=GeoTrust Primary Certification Authority -# Validity -# Not Before: Nov 27 00:00:00 2006 GMT -# Not After : Jul 16 23:59:59 2036 GMT -# Subject: C=US, O=GeoTrust Inc., CN=GeoTrust Primary Certification Authority -# Subject Public Key Info: -# Public Key Algorithm: rsaEncryption -# Public-Key: (2048 bit) -# Modulus: -# 00:be:b8:15:7b:ff:d4:7c:7d:67:ad:83:64:7b:c8: -# 42:53:2d:df:f6:84:08:20:61:d6:01:59:6a:9c:44: -# 11:af:ef:76:fd:95:7e:ce:61:30:bb:7a:83:5f:02: -# bd:01:66:ca:ee:15:8d:6f:a1:30:9c:bd:a1:85:9e: -# 94:3a:f3:56:88:00:31:cf:d8:ee:6a:96:02:d9:ed: -# 03:8c:fb:75:6d:e7:ea:b8:55:16:05:16:9a:f4:e0: -# 5e:b1:88:c0:64:85:5c:15:4d:88:c7:b7:ba:e0:75: -# e9:ad:05:3d:9d:c7:89:48:e0:bb:28:c8:03:e1:30: -# 93:64:5e:52:c0:59:70:22:35:57:88:8a:f1:95:0a: -# 83:d7:bc:31:73:01:34:ed:ef:46:71:e0:6b:02:a8: -# 35:72:6b:97:9b:66:e0:cb:1c:79:5f:d8:1a:04:68: -# 1e:47:02:e6:9d:60:e2:36:97:01:df:ce:35:92:df: -# be:67:c7:6d:77:59:3b:8f:9d:d6:90:15:94:bc:42: -# 34:10:c1:39:f9:b1:27:3e:7e:d6:8a:75:c5:b2:af: -# 96:d3:a2:de:9b:e4:98:be:7d:e1:e9:81:ad:b6:6f: -# fc:d7:0e:da:e0:34:b0:0d:1a:77:e7:e3:08:98:ef: -# 58:fa:9c:84:b7:36:af:c2:df:ac:d2:f4:10:06:70: -# 71:35 -# Exponent: 65537 (0x10001) -# X509v3 extensions: -# X509v3 Basic Constraints: critical -# CA:TRUE -# X509v3 Key Usage: critical -# Certificate Sign, CRL Sign -# X509v3 Subject Key Identifier: -# 2C:D5:50:41:97:15:8B:F0:8F:36:61:5B:4A:FB:6B:D9:99:C9:33:92 -# Signature Algorithm: sha1WithRSAEncryption -# 5a:70:7f:2c:dd:b7:34:4f:f5:86:51:a9:26:be:4b:b8:aa:f1: -# 71:0d:dc:61:c7:a0:ea:34:1e:7a:77:0f:04:35:e8:27:8f:6c: -# 90:bf:91:16:24:46:3e:4a:4e:ce:2b:16:d5:0b:52:1d:fc:1f: -# 67:a2:02:45:31:4f:ce:f3:fa:03:a7:79:9d:53:6a:d9:da:63: -# 3a:f8:80:d7:d3:99:e1:a5:e1:be:d4:55:71:98:35:3a:be:93: -# ea:ae:ad:42:b2:90:6f:e0:fc:21:4d:35:63:33:89:49:d6:9b: -# 4e:ca:c7:e7:4e:09:00:f7:da:c7:ef:99:62:99:77:b6:95:22: -# 5e:8a:a0:ab:f4:b8:78:98:ca:38:19:99:c9:72:9e:78:cd:4b: -# ac:af:19:a0:73:12:2d:fc:c2:41:ba:81:91:da:16:5a:31:b7: -# f9:b4:71:80:12:48:99:72:73:5a:59:53:c1:63:52:33:ed:a7: -# c9:d2:39:02:70:fa:e0:b1:42:66:29:aa:9b:51:ed:30:54:22: -# 14:5f:d9:ab:1d:c1:e4:94:f0:f8:f5:2b:f7:ea:ca:78:46:d6: -# b8:91:fd:a6:0d:2b:1a:14:01:3e:80:f0:42:a0:95:07:5e:6d: -# cd:cc:4b:a4:45:8d:ab:12:e8:b3:de:5a:e5:a0:7c:e8:0f:22: -# 1d:5a:e9:59 ------BEGIN CERTIFICATE----- -MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBY -MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMo -R2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjEx -MjcwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMFgxCzAJBgNVBAYTAlVTMRYwFAYDVQQK -Ew1HZW9UcnVzdCBJbmMuMTEwLwYDVQQDEyhHZW9UcnVzdCBQcmltYXJ5IENlcnRp -ZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC -AQEAvrgVe//UfH1nrYNke8hCUy3f9oQIIGHWAVlqnEQRr+92/ZV+zmEwu3qDXwK9 -AWbK7hWNb6EwnL2hhZ6UOvNWiAAxz9juapYC2e0DjPt1befquFUWBRaa9OBesYjA -ZIVcFU2Ix7e64HXprQU9nceJSOC7KMgD4TCTZF5SwFlwIjVXiIrxlQqD17wxcwE0 -7e9GceBrAqg1cmuXm2bgyxx5X9gaBGgeRwLmnWDiNpcB3841kt++Z8dtd1k7j53W -kBWUvEI0EME5+bEnPn7WinXFsq+W06Lem+SYvn3h6YGttm/81w7a4DSwDRp35+MI -mO9Y+pyEtzavwt+s0vQQBnBxNQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4G -A1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQULNVQQZcVi/CPNmFbSvtr2ZnJM5IwDQYJ -KoZIhvcNAQEFBQADggEBAFpwfyzdtzRP9YZRqSa+S7iq8XEN3GHHoOo0Hnp3DwQ1 -6CePbJC/kRYkRj5KTs4rFtULUh38H2eiAkUxT87z+gOneZ1TatnaYzr4gNfTmeGl -4b7UVXGYNTq+k+qurUKykG/g/CFNNWMziUnWm07Kx+dOCQD32sfvmWKZd7aVIl6K -oKv0uHiYyjgZmclynnjNS6yvGaBzEi38wkG6gZHaFloxt/m0cYASSJlyc1pZU8Fj -UjPtp8nSOQJw+uCxQmYpqptR7TBUIhRf2asdweSU8Pj1K/fqynhG1riR/aYNKxoU -AT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk= ------END CERTIFICATE----- -# Go Daddy Class 2 Certification Authority.pem -# Certificate: -# Data: -# Version: 3 (0x2) -# Serial Number: 0 (0x0) -# Signature Algorithm: sha1WithRSAEncryption -# Issuer: C=US, O=The Go Daddy Group, Inc., OU=Go Daddy Class 2 Certification Authority -# Validity -# Not Before: Jun 29 17:06:20 2004 GMT -# Not After : Jun 29 17:06:20 2034 GMT -# Subject: C=US, O=The Go Daddy Group, Inc., OU=Go Daddy Class 2 Certification Authority -# Subject Public Key Info: -# Public Key Algorithm: rsaEncryption -# Public-Key: (2048 bit) -# Modulus: -# 00:de:9d:d7:ea:57:18:49:a1:5b:eb:d7:5f:48:86: -# ea:be:dd:ff:e4:ef:67:1c:f4:65:68:b3:57:71:a0: -# 5e:77:bb:ed:9b:49:e9:70:80:3d:56:18:63:08:6f: -# da:f2:cc:d0:3f:7f:02:54:22:54:10:d8:b2:81:d4: -# c0:75:3d:4b:7f:c7:77:c3:3e:78:ab:1a:03:b5:20: -# 6b:2f:6a:2b:b1:c5:88:7e:c4:bb:1e:b0:c1:d8:45: -# 27:6f:aa:37:58:f7:87:26:d7:d8:2d:f6:a9:17:b7: -# 1f:72:36:4e:a6:17:3f:65:98:92:db:2a:6e:5d:a2: -# fe:88:e0:0b:de:7f:e5:8d:15:e1:eb:cb:3a:d5:e2: -# 12:a2:13:2d:d8:8e:af:5f:12:3d:a0:08:05:08:b6: -# 5c:a5:65:38:04:45:99:1e:a3:60:60:74:c5:41:a5: -# 72:62:1b:62:c5:1f:6f:5f:1a:42:be:02:51:65:a8: -# ae:23:18:6a:fc:78:03:a9:4d:7f:80:c3:fa:ab:5a: -# fc:a1:40:a4:ca:19:16:fe:b2:c8:ef:5e:73:0d:ee: -# 77:bd:9a:f6:79:98:bc:b1:07:67:a2:15:0d:dd:a0: -# 58:c6:44:7b:0a:3e:62:28:5f:ba:41:07:53:58:cf: -# 11:7e:38:74:c5:f8:ff:b5:69:90:8f:84:74:ea:97: -# 1b:af -# Exponent: 3 (0x3) -# X509v3 extensions: -# X509v3 Subject Key Identifier: -# D2:C4:B0:D2:91:D4:4C:11:71:B3:61:CB:3D:A1:FE:DD:A8:6A:D4:E3 -# X509v3 Authority Key Identifier: -# keyid:D2:C4:B0:D2:91:D4:4C:11:71:B3:61:CB:3D:A1:FE:DD:A8:6A:D4:E3 -# DirName:/C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority -# serial:00 -# -# X509v3 Basic Constraints: -# CA:TRUE -# Signature Algorithm: sha1WithRSAEncryption -# 32:4b:f3:b2:ca:3e:91:fc:12:c6:a1:07:8c:8e:77:a0:33:06: -# 14:5c:90:1e:18:f7:08:a6:3d:0a:19:f9:87:80:11:6e:69:e4: -# 96:17:30:ff:34:91:63:72:38:ee:cc:1c:01:a3:1d:94:28:a4: -# 31:f6:7a:c4:54:d7:f6:e5:31:58:03:a2:cc:ce:62:db:94:45: -# 73:b5:bf:45:c9:24:b5:d5:82:02:ad:23:79:69:8d:b8:b6:4d: -# ce:cf:4c:ca:33:23:e8:1c:88:aa:9d:8b:41:6e:16:c9:20:e5: -# 89:9e:cd:3b:da:70:f7:7e:99:26:20:14:54:25:ab:6e:73:85: -# e6:9b:21:9d:0a:6c:82:0e:a8:f8:c2:0c:fa:10:1e:6c:96:ef: -# 87:0d:c4:0f:61:8b:ad:ee:83:2b:95:f8:8e:92:84:72:39:eb: -# 20:ea:83:ed:83:cd:97:6e:08:bc:eb:4e:26:b6:73:2b:e4:d3: -# f6:4c:fe:26:71:e2:61:11:74:4a:ff:57:1a:87:0f:75:48:2e: -# cf:51:69:17:a0:02:12:61:95:d5:d1:40:b2:10:4c:ee:c4:ac: -# 10:43:a6:a5:9e:0a:d5:95:62:9a:0d:cf:88:82:c5:32:0c:e4: -# 2b:9f:45:e6:0d:9f:28:9c:b1:b9:2a:5a:57:ad:37:0f:af:1d: -# 7f:db:bd:9f ------BEGIN CERTIFICATE----- -MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEh -MB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBE -YWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3 -MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkGA1UEBhMCVVMxITAfBgNVBAoTGFRo -ZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28gRGFkZHkgQ2xhc3Mg -MiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQADggEN -ADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCA -PVYYYwhv2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6w -wdhFJ2+qN1j3hybX2C32qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXi -EqITLdiOr18SPaAIBQi2XKVlOARFmR6jYGB0xUGlcmIbYsUfb18aQr4CUWWoriMY -avx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmYvLEHZ6IVDd2gWMZEewo+ -YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0OBBYEFNLE -sNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h -/t2oatTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5 -IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmlj -YXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD -ggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wimPQoZ+YeAEW5p5JYXMP80kWNy -OO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKtI3lpjbi2Tc7P -TMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ -HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mER -dEr/VxqHD3VILs9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5Cuf -ReYNnyicsbkqWletNw+vHX/bvZ8= ------END CERTIFICATE----- -# Go Daddy Root Certificate Authority - G2.pem -# Certificate: -# Data: -# Version: 3 (0x2) -# Serial Number: 0 (0x0) -# Signature Algorithm: sha256WithRSAEncryption -# Issuer: C=US, ST=Arizona, L=Scottsdale, O=GoDaddy.com, Inc., CN=Go Daddy Root Certificate Authority - G2 -# Validity -# Not Before: Sep 1 00:00:00 2009 GMT -# Not After : Dec 31 23:59:59 2037 GMT -# Subject: C=US, ST=Arizona, L=Scottsdale, O=GoDaddy.com, Inc., CN=Go Daddy Root Certificate Authority - G2 -# Subject Public Key Info: -# Public Key Algorithm: rsaEncryption -# Public-Key: (2048 bit) -# Modulus: -# 00:bf:71:62:08:f1:fa:59:34:f7:1b:c9:18:a3:f7: -# 80:49:58:e9:22:83:13:a6:c5:20:43:01:3b:84:f1: -# e6:85:49:9f:27:ea:f6:84:1b:4e:a0:b4:db:70:98: -# c7:32:01:b1:05:3e:07:4e:ee:f4:fa:4f:2f:59:30: -# 22:e7:ab:19:56:6b:e2:80:07:fc:f3:16:75:80:39: -# 51:7b:e5:f9:35:b6:74:4e:a9:8d:82:13:e4:b6:3f: -# a9:03:83:fa:a2:be:8a:15:6a:7f:de:0b:c3:b6:19: -# 14:05:ca:ea:c3:a8:04:94:3b:46:7c:32:0d:f3:00: -# 66:22:c8:8d:69:6d:36:8c:11:18:b7:d3:b2:1c:60: -# b4:38:fa:02:8c:ce:d3:dd:46:07:de:0a:3e:eb:5d: -# 7c:c8:7c:fb:b0:2b:53:a4:92:62:69:51:25:05:61: -# 1a:44:81:8c:2c:a9:43:96:23:df:ac:3a:81:9a:0e: -# 29:c5:1c:a9:e9:5d:1e:b6:9e:9e:30:0a:39:ce:f1: -# 88:80:fb:4b:5d:cc:32:ec:85:62:43:25:34:02:56: -# 27:01:91:b4:3b:70:2a:3f:6e:b1:e8:9c:88:01:7d: -# 9f:d4:f9:db:53:6d:60:9d:bf:2c:e7:58:ab:b8:5f: -# 46:fc:ce:c4:1b:03:3c:09:eb:49:31:5c:69:46:b3: -# e0:47 -# Exponent: 65537 (0x10001) -# X509v3 extensions: -# X509v3 Basic Constraints: critical -# CA:TRUE -# X509v3 Key Usage: critical -# Certificate Sign, CRL Sign -# X509v3 Subject Key Identifier: -# 3A:9A:85:07:10:67:28:B6:EF:F6:BD:05:41:6E:20:C1:94:DA:0F:DE -# Signature Algorithm: sha256WithRSAEncryption -# 99:db:5d:79:d5:f9:97:59:67:03:61:f1:7e:3b:06:31:75:2d: -# a1:20:8e:4f:65:87:b4:f7:a6:9c:bc:d8:e9:2f:d0:db:5a:ee: -# cf:74:8c:73:b4:38:42:da:05:7b:f8:02:75:b8:fd:a5:b1:d7: -# ae:f6:d7:de:13:cb:53:10:7e:8a:46:d1:97:fa:b7:2e:2b:11: -# ab:90:b0:27:80:f9:e8:9f:5a:e9:37:9f:ab:e4:df:6c:b3:85: -# 17:9d:3d:d9:24:4f:79:91:35:d6:5f:04:eb:80:83:ab:9a:02: -# 2d:b5:10:f4:d8:90:c7:04:73:40:ed:72:25:a0:a9:9f:ec:9e: -# ab:68:12:99:57:c6:8f:12:3a:09:a4:bd:44:fd:06:15:37:c1: -# 9b:e4:32:a3:ed:38:e8:d8:64:f3:2c:7e:14:fc:02:ea:9f:cd: -# ff:07:68:17:db:22:90:38:2d:7a:8d:d1:54:f1:69:e3:5f:33: -# ca:7a:3d:7b:0a:e3:ca:7f:5f:39:e5:e2:75:ba:c5:76:18:33: -# ce:2c:f0:2f:4c:ad:f7:b1:e7:ce:4f:a8:c4:9b:4a:54:06:c5: -# 7f:7d:d5:08:0f:e2:1c:fe:7e:17:b8:ac:5e:f6:d4:16:b2:43: -# 09:0c:4d:f6:a7:6b:b4:99:84:65:ca:7a:88:e2:e2:44:be:5c: -# f7:ea:1c:f5 ------BEGIN CERTIFICATE----- -MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMx -EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoT -EUdvRGFkZHkuY29tLCBJbmMuMTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRp -ZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIz -NTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQH -EwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8GA1UE -AxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIw -DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKD -E6bFIEMBO4Tx5oVJnyfq9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH -/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD+qK+ihVqf94Lw7YZFAXK6sOoBJQ7Rnwy -DfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutdfMh8+7ArU6SSYmlRJQVh -GkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMlNAJWJwGR -tDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEA -AaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE -FDqahQcQZyi27/a9BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmX -WWcDYfF+OwYxdS2hII5PZYe096acvNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu -9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r5N9ss4UXnT3ZJE95kTXWXwTr -gIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYVN8Gb5DKj7Tjo -2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO -LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI -4uJEvlz36hz1 ------END CERTIFICATE----- -# Go Daddy Secure Certification Authority serialNumber=07969287.pem -# Certificate: -# Data: -# Version: 3 (0x2) -# Serial Number: 769 (0x301) -# Signature Algorithm: sha1WithRSAEncryption -# Issuer: C=US, O=The Go Daddy Group, Inc., OU=Go Daddy Class 2 Certification Authority -# Validity -# Not Before: Nov 16 01:54:37 2006 GMT -# Not After : Nov 16 01:54:37 2026 GMT -# Subject: C=US, ST=Arizona, L=Scottsdale, O=GoDaddy.com, Inc., OU=http://certificates.godaddy.com/repository, CN=Go Daddy Secure Certification Authority/serialNumber=07969287 -# Subject Public Key Info: -# Public Key Algorithm: rsaEncryption -# Public-Key: (2048 bit) -# Modulus: -# 00:c4:2d:d5:15:8c:9c:26:4c:ec:32:35:eb:5f:b8: -# 59:01:5a:a6:61:81:59:3b:70:63:ab:e3:dc:3d:c7: -# 2a:b8:c9:33:d3:79:e4:3a:ed:3c:30:23:84:8e:b3: -# 30:14:b6:b2:87:c3:3d:95:54:04:9e:df:99:dd:0b: -# 25:1e:21:de:65:29:7e:35:a8:a9:54:eb:f6:f7:32: -# 39:d4:26:55:95:ad:ef:fb:fe:58:86:d7:9e:f4:00: -# 8d:8c:2a:0c:bd:42:04:ce:a7:3f:04:f6:ee:80:f2: -# aa:ef:52:a1:69:66:da:be:1a:ad:5d:da:2c:66:ea: -# 1a:6b:bb:e5:1a:51:4a:00:2f:48:c7:98:75:d8:b9: -# 29:c8:ee:f8:66:6d:0a:9c:b3:f3:fc:78:7c:a2:f8: -# a3:f2:b5:c3:f3:b9:7a:91:c1:a7:e6:25:2e:9c:a8: -# ed:12:65:6e:6a:f6:12:44:53:70:30:95:c3:9c:2b: -# 58:2b:3d:08:74:4a:f2:be:51:b0:bf:87:d0:4c:27: -# 58:6b:b5:35:c5:9d:af:17:31:f8:0b:8f:ee:ad:81: -# 36:05:89:08:98:cf:3a:af:25:87:c0:49:ea:a7:fd: -# 67:f7:45:8e:97:cc:14:39:e2:36:85:b5:7e:1a:37: -# fd:16:f6:71:11:9a:74:30:16:fe:13:94:a3:3f:84: -# 0d:4f -# Exponent: 65537 (0x10001) -# X509v3 extensions: -# X509v3 Subject Key Identifier: -# FD:AC:61:32:93:6C:45:D6:E2:EE:85:5F:9A:BA:E7:76:99:68:CC:E7 -# X509v3 Authority Key Identifier: -# keyid:D2:C4:B0:D2:91:D4:4C:11:71:B3:61:CB:3D:A1:FE:DD:A8:6A:D4:E3 -# -# X509v3 Basic Constraints: critical -# CA:TRUE, pathlen:0 -# Authority Information Access: -# OCSP - URI:http://ocsp.godaddy.com -# -# X509v3 CRL Distribution Points: -# -# Full Name: -# URI:http://certificates.godaddy.com/repository/gdroot.crl -# -# X509v3 Certificate Policies: -# Policy: X509v3 Any Policy -# CPS: http://certificates.godaddy.com/repository -# -# X509v3 Key Usage: critical -# Certificate Sign, CRL Sign -# Signature Algorithm: sha1WithRSAEncryption -# d2:86:c0:ec:bd:f9:a1:b6:67:ee:66:0b:a2:06:3a:04:50:8e: -# 15:72:ac:4a:74:95:53:cb:37:cb:44:49:ef:07:90:6b:33:d9: -# 96:f0:94:56:a5:13:30:05:3c:85:32:21:7b:c9:c7:0a:a8:24: -# a4:90:de:46:d3:25:23:14:03:67:c2:10:d6:6f:0f:5d:7b:7a: -# cc:9f:c5:58:2a:c1:c4:9e:21:a8:5a:f3:ac:a4:46:f3:9e:e4: -# 63:cb:2f:90:a4:29:29:01:d9:72:2c:29:df:37:01:27:bc:4f: -# ee:68:d3:21:8f:c0:b3:e4:f5:09:ed:d2:10:aa:53:b4:be:f0: -# cc:59:0b:d6:3b:96:1c:95:24:49:df:ce:ec:fd:a7:48:91:14: -# 45:0e:3a:36:6f:da:45:b3:45:a2:41:c9:d4:d7:44:4e:3e:b9: -# 74:76:d5:a2:13:55:2c:c6:87:a3:b5:99:ac:06:84:87:7f:75: -# 06:fc:bf:14:4c:0e:cc:6e:c4:df:3d:b7:12:71:f4:e8:f1:51: -# 40:22:28:49:e0:1d:4b:87:a8:34:cc:06:a2:dd:12:5a:d1:86: -# 36:64:03:35:6f:6f:77:6e:eb:f2:85:50:98:5e:ab:03:53:ad: -# 91:23:63:1f:16:9c:cd:b9:b2:05:63:3a:e1:f4:68:1b:17:05: -# 35:95:53:ee ------BEGIN CERTIFICATE----- -MIIE3jCCA8agAwIBAgICAwEwDQYJKoZIhvcNAQEFBQAwYzELMAkGA1UEBhMCVVMx -ITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28g -RGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExMTYw -MTU0MzdaFw0yNjExMTYwMTU0MzdaMIHKMQswCQYDVQQGEwJVUzEQMA4GA1UECBMH -QXJpem9uYTETMBEGA1UEBxMKU2NvdHRzZGFsZTEaMBgGA1UEChMRR29EYWRkeS5j -b20sIEluYy4xMzAxBgNVBAsTKmh0dHA6Ly9jZXJ0aWZpY2F0ZXMuZ29kYWRkeS5j -b20vcmVwb3NpdG9yeTEwMC4GA1UEAxMnR28gRGFkZHkgU2VjdXJlIENlcnRpZmlj -YXRpb24gQXV0aG9yaXR5MREwDwYDVQQFEwgwNzk2OTI4NzCCASIwDQYJKoZIhvcN -AQEBBQADggEPADCCAQoCggEBAMQt1RWMnCZM7DI161+4WQFapmGBWTtwY6vj3D3H -KrjJM9N55DrtPDAjhI6zMBS2sofDPZVUBJ7fmd0LJR4h3mUpfjWoqVTr9vcyOdQm -VZWt7/v+WIbXnvQAjYwqDL1CBM6nPwT27oDyqu9SoWlm2r4arV3aLGbqGmu75RpR -SgAvSMeYddi5Kcju+GZtCpyz8/x4fKL4o/K1w/O5epHBp+YlLpyo7RJlbmr2EkRT -cDCVw5wrWCs9CHRK8r5RsL+H0EwnWGu1NcWdrxcx+AuP7q2BNgWJCJjPOq8lh8BJ -6qf9Z/dFjpfMFDniNoW1fho3/Rb2cRGadDAW/hOUoz+EDU8CAwEAAaOCATIwggEu -MB0GA1UdDgQWBBT9rGEyk2xF1uLuhV+auud2mWjM5zAfBgNVHSMEGDAWgBTSxLDS -kdRMEXGzYcs9of7dqGrU4zASBgNVHRMBAf8ECDAGAQH/AgEAMDMGCCsGAQUFBwEB -BCcwJTAjBggrBgEFBQcwAYYXaHR0cDovL29jc3AuZ29kYWRkeS5jb20wRgYDVR0f -BD8wPTA7oDmgN4Y1aHR0cDovL2NlcnRpZmljYXRlcy5nb2RhZGR5LmNvbS9yZXBv -c2l0b3J5L2dkcm9vdC5jcmwwSwYDVR0gBEQwQjBABgRVHSAAMDgwNgYIKwYBBQUH -AgEWKmh0dHA6Ly9jZXJ0aWZpY2F0ZXMuZ29kYWRkeS5jb20vcmVwb3NpdG9yeTAO -BgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQEFBQADggEBANKGwOy9+aG2Z+5mC6IG -OgRQjhVyrEp0lVPLN8tESe8HkGsz2ZbwlFalEzAFPIUyIXvJxwqoJKSQ3kbTJSMU -A2fCENZvD117esyfxVgqwcSeIaha86ykRvOe5GPLL5CkKSkB2XIsKd83ASe8T+5o -0yGPwLPk9Qnt0hCqU7S+8MxZC9Y7lhyVJEnfzuz9p0iRFEUOOjZv2kWzRaJBydTX -RE4+uXR21aITVSzGh6O1mawGhId/dQb8vxRMDsxuxN89txJx9OjxUUAiKEngHUuH -qDTMBqLdElrRhjZkAzVvb3du6/KFUJheqwNTrZEjYx8WnM25sgVjOuH0aBsXBTWV -U+4= ------END CERTIFICATE----- -# Thawte Premium Server CA.pem -# Certificate: -# Data: -# Version: 3 (0x2) -# Serial Number: 1 (0x1) -# Signature Algorithm: md5WithRSAEncryption -# Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Premium Server CA/emailAddress=premium-server@thawte.com -# Validity -# Not Before: Aug 1 00:00:00 1996 GMT -# Not After : Dec 31 23:59:59 2020 GMT -# Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Premium Server CA/emailAddress=premium-server@thawte.com -# Subject Public Key Info: -# Public Key Algorithm: rsaEncryption -# Public-Key: (1024 bit) -# Modulus: -# 00:d2:36:36:6a:8b:d7:c2:5b:9e:da:81:41:62:8f: -# 38:ee:49:04:55:d6:d0:ef:1c:1b:95:16:47:ef:18: -# 48:35:3a:52:f4:2b:6a:06:8f:3b:2f:ea:56:e3:af: -# 86:8d:9e:17:f7:9e:b4:65:75:02:4d:ef:cb:09:a2: -# 21:51:d8:9b:d0:67:d0:ba:0d:92:06:14:73:d4:93: -# cb:97:2a:00:9c:5c:4e:0c:bc:fa:15:52:fc:f2:44: -# 6e:da:11:4a:6e:08:9f:2f:2d:e3:f9:aa:3a:86:73: -# b6:46:53:58:c8:89:05:bd:83:11:b8:73:3f:aa:07: -# 8d:f4:42:4d:e7:40:9d:1c:37 -# Exponent: 65537 (0x10001) -# X509v3 extensions: -# X509v3 Basic Constraints: critical -# CA:TRUE -# Signature Algorithm: md5WithRSAEncryption -# 26:48:2c:16:c2:58:fa:e8:16:74:0c:aa:aa:5f:54:3f:f2:d7: -# c9:78:60:5e:5e:6e:37:63:22:77:36:7e:b2:17:c4:34:b9:f5: -# 08:85:fc:c9:01:38:ff:4d:be:f2:16:42:43:e7:bb:5a:46:fb: -# c1:c6:11:1f:f1:4a:b0:28:46:c9:c3:c4:42:7d:bc:fa:ab:59: -# 6e:d5:b7:51:88:11:e3:a4:85:19:6b:82:4c:a4:0c:12:ad:e9: -# a4:ae:3f:f1:c3:49:65:9a:8c:c5:c8:3e:25:b7:94:99:bb:92: -# 32:71:07:f0:86:5e:ed:50:27:a6:0d:a6:23:f9:bb:cb:a6:07: -# 14:42 ------BEGIN CERTIFICATE----- -MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx -FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD -VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv -biBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFByZW1pdW0gU2Vy -dmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZlckB0aGF3dGUuY29t -MB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYTAlpB -MRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsG -A1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRp -b24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNl -cnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNv -bTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2aovXwlue2oFBYo847kkE -VdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIhUdib0GfQ -ug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMR -uHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG -9w0BAQQFAAOBgQAmSCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUI -hfzJATj/Tb7yFkJD57taRvvBxhEf8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JM -pAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7tUCemDaYj+bvLpgcUQg== ------END CERTIFICATE----- -# Thawte Primary Root CA - G2.pem -# Certificate: -# Data: -# Version: 3 (0x2) -# Serial Number: -# 35:fc:26:5c:d9:84:4f:c9:3d:26:3d:57:9b:ae:d7:56 -# Signature Algorithm: ecdsa-with-SHA384 -# Issuer: C=US, O=thawte, Inc., OU=(c) 2007 thawte, Inc. - For authorized use only, CN=thawte Primary Root CA - G2 -# Validity -# Not Before: Nov 5 00:00:00 2007 GMT -# Not After : Jan 18 23:59:59 2038 GMT -# Subject: C=US, O=thawte, Inc., OU=(c) 2007 thawte, Inc. - For authorized use only, CN=thawte Primary Root CA - G2 -# Subject Public Key Info: -# Public Key Algorithm: id-ecPublicKey -# Public-Key: (384 bit) -# pub: -# 04:a2:d5:9c:82:7b:95:9d:f1:52:78:87:fe:8a:16: -# bf:05:e6:df:a3:02:4f:0d:07:c6:00:51:ba:0c:02: -# 52:2d:22:a4:42:39:c4:fe:8f:ea:c9:c1:be:d4:4d: -# ff:9f:7a:9e:e2:b1:7c:9a:ad:a7:86:09:73:87:d1: -# e7:9a:e3:7a:a5:aa:6e:fb:ba:b3:70:c0:67:88:a2: -# 35:d4:a3:9a:b1:fd:ad:c2:ef:31:fa:a8:b9:f3:fb: -# 08:c6:91:d1:fb:29:95 -# ASN1 OID: secp384r1 -# X509v3 extensions: -# X509v3 Basic Constraints: critical -# CA:TRUE -# X509v3 Key Usage: critical -# Certificate Sign, CRL Sign -# X509v3 Subject Key Identifier: -# 9A:D8:00:30:00:E7:6B:7F:85:18:EE:8B:B6:CE:8A:0C:F8:11:E1:BB -# Signature Algorithm: ecdsa-with-SHA384 -# 30:66:02:31:00:dd:f8:e0:57:47:5b:a7:e6:0a:c3:bd:f5:80: -# 8a:97:35:0d:1b:89:3c:54:86:77:28:ca:a1:f4:79:de:b5:e6: -# 38:b0:f0:65:70:8c:7f:02:54:c2:bf:ff:d8:a1:3e:d9:cf:02: -# 31:00:c4:8d:94:fc:dc:53:d2:dc:9d:78:16:1f:15:33:23:53: -# 52:e3:5a:31:5d:9d:ca:ae:bd:13:29:44:0d:27:5b:a8:e7:68: -# 9c:12:f7:58:3f:2e:72:02:57:a3:8f:a1:14:2e ------BEGIN CERTIFICATE----- -MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDEL -MAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMp -IDIwMDcgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAi -BgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMjAeFw0wNzExMDUwMDAw -MDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh -d3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBGb3Ig -YXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9v -dCBDQSAtIEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/ -BebfowJPDQfGAFG6DAJSLSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6 -papu+7qzcMBniKI11KOasf2twu8x+qi58/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8E -BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUmtgAMADna3+FGO6Lts6K -DPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUNG4k8VIZ3 -KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41ox -XZ3Krr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg== ------END CERTIFICATE----- -# Thawte Primary Root CA - G3.pem -# Certificate: -# Data: -# Version: 3 (0x2) -# Serial Number: -# 60:01:97:b7:46:a7:ea:b4:b4:9a:d6:4b:2f:f7:90:fb -# Signature Algorithm: sha256WithRSAEncryption -# Issuer: C=US, O=thawte, Inc., OU=Certification Services Division, OU=(c) 2008 thawte, Inc. - For authorized use only, CN=thawte Primary Root CA - G3 -# Validity -# Not Before: Apr 2 00:00:00 2008 GMT -# Not After : Dec 1 23:59:59 2037 GMT -# Subject: C=US, O=thawte, Inc., OU=Certification Services Division, OU=(c) 2008 thawte, Inc. - For authorized use only, CN=thawte Primary Root CA - G3 -# Subject Public Key Info: -# Public Key Algorithm: rsaEncryption -# Public-Key: (2048 bit) -# Modulus: -# 00:b2:bf:27:2c:fb:db:d8:5b:dd:78:7b:1b:9e:77: -# 66:81:cb:3e:bc:7c:ae:f3:a6:27:9a:34:a3:68:31: -# 71:38:33:62:e4:f3:71:66:79:b1:a9:65:a3:a5:8b: -# d5:8f:60:2d:3f:42:cc:aa:6b:32:c0:23:cb:2c:41: -# dd:e4:df:fc:61:9c:e2:73:b2:22:95:11:43:18:5f: -# c4:b6:1f:57:6c:0a:05:58:22:c8:36:4c:3a:7c:a5: -# d1:cf:86:af:88:a7:44:02:13:74:71:73:0a:42:59: -# 02:f8:1b:14:6b:42:df:6f:5f:ba:6b:82:a2:9d:5b: -# e7:4a:bd:1e:01:72:db:4b:74:e8:3b:7f:7f:7d:1f: -# 04:b4:26:9b:e0:b4:5a:ac:47:3d:55:b8:d7:b0:26: -# 52:28:01:31:40:66:d8:d9:24:bd:f6:2a:d8:ec:21: -# 49:5c:9b:f6:7a:e9:7f:55:35:7e:96:6b:8d:93:93: -# 27:cb:92:bb:ea:ac:40:c0:9f:c2:f8:80:cf:5d:f4: -# 5a:dc:ce:74:86:a6:3e:6c:0b:53:ca:bd:92:ce:19: -# 06:72:e6:0c:5c:38:69:c7:04:d6:bc:6c:ce:5b:f6: -# f7:68:9c:dc:25:15:48:88:a1:e9:a9:f8:98:9c:e0: -# f3:d5:31:28:61:11:6c:67:96:8d:39:99:cb:c2:45: -# 24:39 -# Exponent: 65537 (0x10001) -# X509v3 extensions: -# X509v3 Basic Constraints: critical -# CA:TRUE -# X509v3 Key Usage: critical -# Certificate Sign, CRL Sign -# X509v3 Subject Key Identifier: -# AD:6C:AA:94:60:9C:ED:E4:FF:FA:3E:0A:74:2B:63:03:F7:B6:59:BF -# Signature Algorithm: sha256WithRSAEncryption -# 1a:40:d8:95:65:ac:09:92:89:c6:39:f4:10:e5:a9:0e:66:53: -# 5d:78:de:fa:24:91:bb:e7:44:51:df:c6:16:34:0a:ef:6a:44: -# 51:ea:2b:07:8a:03:7a:c3:eb:3f:0a:2c:52:16:a0:2b:43:b9: -# 25:90:3f:70:a9:33:25:6d:45:1a:28:3b:27:cf:aa:c3:29:42: -# 1b:df:3b:4c:c0:33:34:5b:41:88:bf:6b:2b:65:af:28:ef:b2: -# f5:c3:aa:66:ce:7b:56:ee:b7:c8:cb:67:c1:c9:9c:1a:18:b8: -# c4:c3:49:03:f1:60:0e:50:cd:46:c5:f3:77:79:f7:b6:15:e0: -# 38:db:c7:2f:28:a0:0c:3f:77:26:74:d9:25:12:da:31:da:1a: -# 1e:dc:29:41:91:22:3c:69:a7:bb:02:f2:b6:5c:27:03:89:f4: -# 06:ea:9b:e4:72:82:e3:a1:09:c1:e9:00:19:d3:3e:d4:70:6b: -# ba:71:a6:aa:58:ae:f4:bb:e9:6c:b6:ef:87:cc:9b:bb:ff:39: -# e6:56:61:d3:0a:a7:c4:5c:4c:60:7b:05:77:26:7a:bf:d8:07: -# 52:2c:62:f7:70:63:d9:39:bc:6f:1c:c2:79:dc:76:29:af:ce: -# c5:2c:64:04:5e:88:36:6e:31:d4:40:1a:62:34:36:3f:35:01: -# ae:ac:63:a0 ------BEGIN CERTIFICATE----- -MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/eQ+zANBgkqhkiG9w0BAQsFADCB -rjELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMf -Q2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIw -MDggdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNV -BAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMzAeFw0wODA0MDIwMDAwMDBa -Fw0zNzEyMDEyMzU5NTlaMIGuMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhhd3Rl -LCBJbmMuMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9u -MTgwNgYDVQQLEy8oYykgMjAwOCB0aGF3dGUsIEluYy4gLSBGb3IgYXV0aG9yaXpl -ZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAtIEcz -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsr8nLPvb2FvdeHsbnndm -gcs+vHyu86YnmjSjaDFxODNi5PNxZnmxqWWjpYvVj2AtP0LMqmsywCPLLEHd5N/8 -YZzic7IilRFDGF/Eth9XbAoFWCLINkw6fKXRz4aviKdEAhN0cXMKQlkC+BsUa0Lf -b1+6a4KinVvnSr0eAXLbS3ToO39/fR8EtCab4LRarEc9VbjXsCZSKAExQGbY2SS9 -9irY7CFJXJv2eul/VTV+lmuNk5Mny5K76qxAwJ/C+IDPXfRa3M50hqY+bAtTyr2S -zhkGcuYMXDhpxwTWvGzOW/b3aJzcJRVIiKHpqfiYnODz1TEoYRFsZ5aNOZnLwkUk -OQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNV -HQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJKoZIhvcNAQELBQADggEBABpA -2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweKA3rD6z8KLFIW -oCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu -t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7c -KUGRIjxpp7sC8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fM -m7v/OeZWYdMKp8RcTGB7BXcmer/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZu -MdRAGmI0Nj81Aa6sY6A= ------END CERTIFICATE----- -# Thawte Primary Root CA.pem -# Certificate: -# Data: -# Version: 3 (0x2) -# Serial Number: -# 34:4e:d5:57:20:d5:ed:ec:49:f4:2f:ce:37:db:2b:6d -# Signature Algorithm: sha1WithRSAEncryption -# Issuer: C=US, O=thawte, Inc., OU=Certification Services Division, OU=(c) 2006 thawte, Inc. - For authorized use only, CN=thawte Primary Root CA -# Validity -# Not Before: Nov 17 00:00:00 2006 GMT -# Not After : Jul 16 23:59:59 2036 GMT -# Subject: C=US, O=thawte, Inc., OU=Certification Services Division, OU=(c) 2006 thawte, Inc. - For authorized use only, CN=thawte Primary Root CA -# Subject Public Key Info: -# Public Key Algorithm: rsaEncryption -# Public-Key: (2048 bit) -# Modulus: -# 00:ac:a0:f0:fb:80:59:d4:9c:c7:a4:cf:9d:a1:59: -# 73:09:10:45:0c:0d:2c:6e:68:f1:6c:5b:48:68:49: -# 59:37:fc:0b:33:19:c2:77:7f:cc:10:2d:95:34:1c: -# e6:eb:4d:09:a7:1c:d2:b8:c9:97:36:02:b7:89:d4: -# 24:5f:06:c0:cc:44:94:94:8d:02:62:6f:eb:5a:dd: -# 11:8d:28:9a:5c:84:90:10:7a:0d:bd:74:66:2f:6a: -# 38:a0:e2:d5:54:44:eb:1d:07:9f:07:ba:6f:ee:e9: -# fd:4e:0b:29:f5:3e:84:a0:01:f1:9c:ab:f8:1c:7e: -# 89:a4:e8:a1:d8:71:65:0d:a3:51:7b:ee:bc:d2:22: -# 60:0d:b9:5b:9d:df:ba:fc:51:5b:0b:af:98:b2:e9: -# 2e:e9:04:e8:62:87:de:2b:c8:d7:4e:c1:4c:64:1e: -# dd:cf:87:58:ba:4a:4f:ca:68:07:1d:1c:9d:4a:c6: -# d5:2f:91:cc:7c:71:72:1c:c5:c0:67:eb:32:fd:c9: -# 92:5c:94:da:85:c0:9b:bf:53:7d:2b:09:f4:8c:9d: -# 91:1f:97:6a:52:cb:de:09:36:a4:77:d8:7b:87:50: -# 44:d5:3e:6e:29:69:fb:39:49:26:1e:09:a5:80:7b: -# 40:2d:eb:e8:27:85:c9:fe:61:fd:7e:e6:7c:97:1d: -# d5:9d -# Exponent: 65537 (0x10001) -# X509v3 extensions: -# X509v3 Basic Constraints: critical -# CA:TRUE -# X509v3 Key Usage: critical -# Certificate Sign, CRL Sign -# X509v3 Subject Key Identifier: -# 7B:5B:45:CF:AF:CE:CB:7A:FD:31:92:1A:6A:B6:F3:46:EB:57:48:50 -# Signature Algorithm: sha1WithRSAEncryption -# 79:11:c0:4b:b3:91:b6:fc:f0:e9:67:d4:0d:6e:45:be:55:e8: -# 93:d2:ce:03:3f:ed:da:25:b0:1d:57:cb:1e:3a:76:a0:4c:ec: -# 50:76:e8:64:72:0c:a4:a9:f1:b8:8b:d6:d6:87:84:bb:32:e5: -# 41:11:c0:77:d9:b3:60:9d:eb:1b:d5:d1:6e:44:44:a9:a6:01: -# ec:55:62:1d:77:b8:5c:8e:48:49:7c:9c:3b:57:11:ac:ad:73: -# 37:8e:2f:78:5c:90:68:47:d9:60:60:e6:fc:07:3d:22:20:17: -# c4:f7:16:e9:c4:d8:72:f9:c8:73:7c:df:16:2f:15:a9:3e:fd: -# 6a:27:b6:a1:eb:5a:ba:98:1f:d5:e3:4d:64:0a:9d:13:c8:61: -# ba:f5:39:1c:87:ba:b8:bd:7b:22:7f:f6:fe:ac:40:79:e5:ac: -# 10:6f:3d:8f:1b:79:76:8b:c4:37:b3:21:18:84:e5:36:00:eb: -# 63:20:99:b9:e9:fe:33:04:bb:41:c8:c1:02:f9:44:63:20:9e: -# 81:ce:42:d3:d6:3f:2c:76:d3:63:9c:59:dd:8f:a6:e1:0e:a0: -# 2e:41:f7:2e:95:47:cf:bc:fd:33:f3:f6:0b:61:7e:7e:91:2b: -# 81:47:c2:27:30:ee:a7:10:5d:37:8f:5c:39:2b:e4:04:f0:7b: -# 8d:56:8c:68 ------BEGIN CERTIFICATE----- -MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCB -qTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMf -Q2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIw -MDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNV -BAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwHhcNMDYxMTE3MDAwMDAwWhcNMzYw -NzE2MjM1OTU5WjCBqTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5j -LjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYG -A1UECxMvKGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl -IG9ubHkxHzAdBgNVBAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwggEiMA0GCSqG -SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCsoPD7gFnUnMekz52hWXMJEEUMDSxuaPFs -W0hoSVk3/AszGcJ3f8wQLZU0HObrTQmnHNK4yZc2AreJ1CRfBsDMRJSUjQJib+ta -3RGNKJpchJAQeg29dGYvajig4tVUROsdB58Hum/u6f1OCyn1PoSgAfGcq/gcfomk -6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6 -Sk/KaAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94J -NqR32HuHUETVPm4pafs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBA -MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XP -r87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUFAAOCAQEAeRHAS7ORtvzw6WfU -DW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeEuzLlQRHAd9mz -YJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX -xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2 -/qxAeeWsEG89jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/ -LHbTY5xZ3Y+m4Q6gLkH3LpVHz7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7 -jVaMaA== ------END CERTIFICATE----- diff --git a/resources/lib/dropbox/users.py b/resources/lib/dropbox/users.py deleted file mode 100644 index dce00af..0000000 --- a/resources/lib/dropbox/users.py +++ /dev/null @@ -1,1710 +0,0 @@ -# -*- coding: utf-8 -*- -# Auto-generated by Stone, do not modify. -# flake8: noqa -# pylint: skip-file -""" -This namespace contains endpoints and data types for user management. -""" - -try: - from . import stone_validators as bv - from . import stone_base as bb -except (SystemError, ValueError): - # Catch errors raised when importing a relative module when not in a package. - # This makes testing this file directly (outside of a package) easier. - import stone_validators as bv - import stone_base as bb - -try: - from . import ( - team_policies, - users_common, - ) -except (SystemError, ValueError): - import team_policies - import users_common - -class Account(object): - """ - The amount of detail revealed about an account depends on the user being - queried and the user making the query. - - :ivar account_id: The user's unique Dropbox ID. - :ivar name: Details of a user's name. - :ivar email: The user's e-mail address. Do not rely on this without checking - the ``email_verified`` field. Even then, it's possible that the user has - since lost access to their e-mail. - :ivar email_verified: Whether the user has verified their e-mail address. - :ivar profile_photo_url: URL for the photo representing the user, if one is - set. - :ivar disabled: Whether the user has been disabled. - """ - - __slots__ = [ - '_account_id_value', - '_account_id_present', - '_name_value', - '_name_present', - '_email_value', - '_email_present', - '_email_verified_value', - '_email_verified_present', - '_profile_photo_url_value', - '_profile_photo_url_present', - '_disabled_value', - '_disabled_present', - ] - - _has_required_fields = True - - def __init__(self, - account_id=None, - name=None, - email=None, - email_verified=None, - disabled=None, - profile_photo_url=None): - self._account_id_value = None - self._account_id_present = False - self._name_value = None - self._name_present = False - self._email_value = None - self._email_present = False - self._email_verified_value = None - self._email_verified_present = False - self._profile_photo_url_value = None - self._profile_photo_url_present = False - self._disabled_value = None - self._disabled_present = False - if account_id is not None: - self.account_id = account_id - if name is not None: - self.name = name - if email is not None: - self.email = email - if email_verified is not None: - self.email_verified = email_verified - if profile_photo_url is not None: - self.profile_photo_url = profile_photo_url - if disabled is not None: - self.disabled = disabled - - @property - def account_id(self): - """ - The user's unique Dropbox ID. - - :rtype: str - """ - if self._account_id_present: - return self._account_id_value - else: - raise AttributeError("missing required field 'account_id'") - - @account_id.setter - def account_id(self, val): - val = self._account_id_validator.validate(val) - self._account_id_value = val - self._account_id_present = True - - @account_id.deleter - def account_id(self): - self._account_id_value = None - self._account_id_present = False - - @property - def name(self): - """ - Details of a user's name. - - :rtype: Name - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") - - @name.setter - def name(self, val): - self._name_validator.validate_type_only(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - @property - def email(self): - """ - The user's e-mail address. Do not rely on this without checking the - ``email_verified`` field. Even then, it's possible that the user has - since lost access to their e-mail. - - :rtype: str - """ - if self._email_present: - return self._email_value - else: - raise AttributeError("missing required field 'email'") - - @email.setter - def email(self, val): - val = self._email_validator.validate(val) - self._email_value = val - self._email_present = True - - @email.deleter - def email(self): - self._email_value = None - self._email_present = False - - @property - def email_verified(self): - """ - Whether the user has verified their e-mail address. - - :rtype: bool - """ - if self._email_verified_present: - return self._email_verified_value - else: - raise AttributeError("missing required field 'email_verified'") - - @email_verified.setter - def email_verified(self, val): - val = self._email_verified_validator.validate(val) - self._email_verified_value = val - self._email_verified_present = True - - @email_verified.deleter - def email_verified(self): - self._email_verified_value = None - self._email_verified_present = False - - @property - def profile_photo_url(self): - """ - URL for the photo representing the user, if one is set. - - :rtype: str - """ - if self._profile_photo_url_present: - return self._profile_photo_url_value - else: - return None - - @profile_photo_url.setter - def profile_photo_url(self, val): - if val is None: - del self.profile_photo_url - return - val = self._profile_photo_url_validator.validate(val) - self._profile_photo_url_value = val - self._profile_photo_url_present = True - - @profile_photo_url.deleter - def profile_photo_url(self): - self._profile_photo_url_value = None - self._profile_photo_url_present = False - - @property - def disabled(self): - """ - Whether the user has been disabled. - - :rtype: bool - """ - if self._disabled_present: - return self._disabled_value - else: - raise AttributeError("missing required field 'disabled'") - - @disabled.setter - def disabled(self, val): - val = self._disabled_validator.validate(val) - self._disabled_value = val - self._disabled_present = True - - @disabled.deleter - def disabled(self): - self._disabled_value = None - self._disabled_present = False - - def __repr__(self): - return 'Account(account_id={!r}, name={!r}, email={!r}, email_verified={!r}, disabled={!r}, profile_photo_url={!r})'.format( - self._account_id_value, - self._name_value, - self._email_value, - self._email_verified_value, - self._disabled_value, - self._profile_photo_url_value, - ) - -Account_validator = bv.Struct(Account) - -class BasicAccount(Account): - """ - Basic information about any account. - - :ivar is_teammate: Whether this user is a teammate of the current user. If - this account is the current user's account, then this will be ``True``. - :ivar team_member_id: The user's unique team member id. This field will only - be present if the user is part of a team and ``is_teammate`` is - ``True``. - """ - - __slots__ = [ - '_is_teammate_value', - '_is_teammate_present', - '_team_member_id_value', - '_team_member_id_present', - ] - - _has_required_fields = True - - def __init__(self, - account_id=None, - name=None, - email=None, - email_verified=None, - disabled=None, - is_teammate=None, - profile_photo_url=None, - team_member_id=None): - super(BasicAccount, self).__init__(account_id, - name, - email, - email_verified, - disabled, - profile_photo_url) - self._is_teammate_value = None - self._is_teammate_present = False - self._team_member_id_value = None - self._team_member_id_present = False - if is_teammate is not None: - self.is_teammate = is_teammate - if team_member_id is not None: - self.team_member_id = team_member_id - - @property - def is_teammate(self): - """ - Whether this user is a teammate of the current user. If this account is - the current user's account, then this will be ``True``. - - :rtype: bool - """ - if self._is_teammate_present: - return self._is_teammate_value - else: - raise AttributeError("missing required field 'is_teammate'") - - @is_teammate.setter - def is_teammate(self, val): - val = self._is_teammate_validator.validate(val) - self._is_teammate_value = val - self._is_teammate_present = True - - @is_teammate.deleter - def is_teammate(self): - self._is_teammate_value = None - self._is_teammate_present = False - - @property - def team_member_id(self): - """ - The user's unique team member id. This field will only be present if the - user is part of a team and ``is_teammate`` is ``True``. - - :rtype: str - """ - if self._team_member_id_present: - return self._team_member_id_value - else: - return None - - @team_member_id.setter - def team_member_id(self, val): - if val is None: - del self.team_member_id - return - val = self._team_member_id_validator.validate(val) - self._team_member_id_value = val - self._team_member_id_present = True - - @team_member_id.deleter - def team_member_id(self): - self._team_member_id_value = None - self._team_member_id_present = False - - def __repr__(self): - return 'BasicAccount(account_id={!r}, name={!r}, email={!r}, email_verified={!r}, disabled={!r}, is_teammate={!r}, profile_photo_url={!r}, team_member_id={!r})'.format( - self._account_id_value, - self._name_value, - self._email_value, - self._email_verified_value, - self._disabled_value, - self._is_teammate_value, - self._profile_photo_url_value, - self._team_member_id_value, - ) - -BasicAccount_validator = bv.Struct(BasicAccount) - -class FullAccount(Account): - """ - Detailed information about the current user's account. - - :ivar country: The user's two-letter country code, if available. Country - codes are based on `ISO 3166-1 - `_. - :ivar locale: The language that the user specified. Locale tags will be - `IETF language tags `_. - :ivar referral_link: The user's `referral link - `_. - :ivar team: If this account is a member of a team, information about that - team. - :ivar team_member_id: This account's unique team member id. This field will - only be present if ``team`` is present. - :ivar is_paired: Whether the user has a personal and work account. If the - current account is personal, then ``team`` will always be None, but - ``is_paired`` will indicate if a work account is linked. - :ivar account_type: What type of account this user has. - """ - - __slots__ = [ - '_country_value', - '_country_present', - '_locale_value', - '_locale_present', - '_referral_link_value', - '_referral_link_present', - '_team_value', - '_team_present', - '_team_member_id_value', - '_team_member_id_present', - '_is_paired_value', - '_is_paired_present', - '_account_type_value', - '_account_type_present', - ] - - _has_required_fields = True - - def __init__(self, - account_id=None, - name=None, - email=None, - email_verified=None, - disabled=None, - locale=None, - referral_link=None, - is_paired=None, - account_type=None, - profile_photo_url=None, - country=None, - team=None, - team_member_id=None): - super(FullAccount, self).__init__(account_id, - name, - email, - email_verified, - disabled, - profile_photo_url) - self._country_value = None - self._country_present = False - self._locale_value = None - self._locale_present = False - self._referral_link_value = None - self._referral_link_present = False - self._team_value = None - self._team_present = False - self._team_member_id_value = None - self._team_member_id_present = False - self._is_paired_value = None - self._is_paired_present = False - self._account_type_value = None - self._account_type_present = False - if country is not None: - self.country = country - if locale is not None: - self.locale = locale - if referral_link is not None: - self.referral_link = referral_link - if team is not None: - self.team = team - if team_member_id is not None: - self.team_member_id = team_member_id - if is_paired is not None: - self.is_paired = is_paired - if account_type is not None: - self.account_type = account_type - - @property - def country(self): - """ - The user's two-letter country code, if available. Country codes are - based on `ISO 3166-1 `_. - - :rtype: str - """ - if self._country_present: - return self._country_value - else: - return None - - @country.setter - def country(self, val): - if val is None: - del self.country - return - val = self._country_validator.validate(val) - self._country_value = val - self._country_present = True - - @country.deleter - def country(self): - self._country_value = None - self._country_present = False - - @property - def locale(self): - """ - The language that the user specified. Locale tags will be `IETF language - tags `_. - - :rtype: str - """ - if self._locale_present: - return self._locale_value - else: - raise AttributeError("missing required field 'locale'") - - @locale.setter - def locale(self, val): - val = self._locale_validator.validate(val) - self._locale_value = val - self._locale_present = True - - @locale.deleter - def locale(self): - self._locale_value = None - self._locale_present = False - - @property - def referral_link(self): - """ - The user's `referral link `_. - - :rtype: str - """ - if self._referral_link_present: - return self._referral_link_value - else: - raise AttributeError("missing required field 'referral_link'") - - @referral_link.setter - def referral_link(self, val): - val = self._referral_link_validator.validate(val) - self._referral_link_value = val - self._referral_link_present = True - - @referral_link.deleter - def referral_link(self): - self._referral_link_value = None - self._referral_link_present = False - - @property - def team(self): - """ - If this account is a member of a team, information about that team. - - :rtype: FullTeam - """ - if self._team_present: - return self._team_value - else: - return None - - @team.setter - def team(self, val): - if val is None: - del self.team - return - self._team_validator.validate_type_only(val) - self._team_value = val - self._team_present = True - - @team.deleter - def team(self): - self._team_value = None - self._team_present = False - - @property - def team_member_id(self): - """ - This account's unique team member id. This field will only be present if - ``team`` is present. - - :rtype: str - """ - if self._team_member_id_present: - return self._team_member_id_value - else: - return None - - @team_member_id.setter - def team_member_id(self, val): - if val is None: - del self.team_member_id - return - val = self._team_member_id_validator.validate(val) - self._team_member_id_value = val - self._team_member_id_present = True - - @team_member_id.deleter - def team_member_id(self): - self._team_member_id_value = None - self._team_member_id_present = False - - @property - def is_paired(self): - """ - Whether the user has a personal and work account. If the current account - is personal, then ``team`` will always be None, but ``is_paired`` will - indicate if a work account is linked. - - :rtype: bool - """ - if self._is_paired_present: - return self._is_paired_value - else: - raise AttributeError("missing required field 'is_paired'") - - @is_paired.setter - def is_paired(self, val): - val = self._is_paired_validator.validate(val) - self._is_paired_value = val - self._is_paired_present = True - - @is_paired.deleter - def is_paired(self): - self._is_paired_value = None - self._is_paired_present = False - - @property - def account_type(self): - """ - What type of account this user has. - - :rtype: users_common.AccountType_validator - """ - if self._account_type_present: - return self._account_type_value - else: - raise AttributeError("missing required field 'account_type'") - - @account_type.setter - def account_type(self, val): - self._account_type_validator.validate_type_only(val) - self._account_type_value = val - self._account_type_present = True - - @account_type.deleter - def account_type(self): - self._account_type_value = None - self._account_type_present = False - - def __repr__(self): - return 'FullAccount(account_id={!r}, name={!r}, email={!r}, email_verified={!r}, disabled={!r}, locale={!r}, referral_link={!r}, is_paired={!r}, account_type={!r}, profile_photo_url={!r}, country={!r}, team={!r}, team_member_id={!r})'.format( - self._account_id_value, - self._name_value, - self._email_value, - self._email_verified_value, - self._disabled_value, - self._locale_value, - self._referral_link_value, - self._is_paired_value, - self._account_type_value, - self._profile_photo_url_value, - self._country_value, - self._team_value, - self._team_member_id_value, - ) - -FullAccount_validator = bv.Struct(FullAccount) - -class Team(object): - """ - Information about a team. - - :ivar id: The team's unique ID. - :ivar name: The name of the team. - """ - - __slots__ = [ - '_id_value', - '_id_present', - '_name_value', - '_name_present', - ] - - _has_required_fields = True - - def __init__(self, - id=None, - name=None): - self._id_value = None - self._id_present = False - self._name_value = None - self._name_present = False - if id is not None: - self.id = id - if name is not None: - self.name = name - - @property - def id(self): - """ - The team's unique ID. - - :rtype: str - """ - if self._id_present: - return self._id_value - else: - raise AttributeError("missing required field 'id'") - - @id.setter - def id(self, val): - val = self._id_validator.validate(val) - self._id_value = val - self._id_present = True - - @id.deleter - def id(self): - self._id_value = None - self._id_present = False - - @property - def name(self): - """ - The name of the team. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") - - @name.setter - def name(self, val): - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True - - @name.deleter - def name(self): - self._name_value = None - self._name_present = False - - def __repr__(self): - return 'Team(id={!r}, name={!r})'.format( - self._id_value, - self._name_value, - ) - -Team_validator = bv.Struct(Team) - -class FullTeam(Team): - """ - Detailed information about a team. - - :ivar sharing_policies: Team policies governing sharing. - :ivar office_addin_policy: Team policy governing the use of the Office - Add-In. - """ - - __slots__ = [ - '_sharing_policies_value', - '_sharing_policies_present', - '_office_addin_policy_value', - '_office_addin_policy_present', - ] - - _has_required_fields = True - - def __init__(self, - id=None, - name=None, - sharing_policies=None, - office_addin_policy=None): - super(FullTeam, self).__init__(id, - name) - self._sharing_policies_value = None - self._sharing_policies_present = False - self._office_addin_policy_value = None - self._office_addin_policy_present = False - if sharing_policies is not None: - self.sharing_policies = sharing_policies - if office_addin_policy is not None: - self.office_addin_policy = office_addin_policy - - @property - def sharing_policies(self): - """ - Team policies governing sharing. - - :rtype: team_policies.TeamSharingPolicies_validator - """ - if self._sharing_policies_present: - return self._sharing_policies_value - else: - raise AttributeError("missing required field 'sharing_policies'") - - @sharing_policies.setter - def sharing_policies(self, val): - self._sharing_policies_validator.validate_type_only(val) - self._sharing_policies_value = val - self._sharing_policies_present = True - - @sharing_policies.deleter - def sharing_policies(self): - self._sharing_policies_value = None - self._sharing_policies_present = False - - @property - def office_addin_policy(self): - """ - Team policy governing the use of the Office Add-In. - - :rtype: team_policies.OfficeAddInPolicy_validator - """ - if self._office_addin_policy_present: - return self._office_addin_policy_value - else: - raise AttributeError("missing required field 'office_addin_policy'") - - @office_addin_policy.setter - def office_addin_policy(self, val): - self._office_addin_policy_validator.validate_type_only(val) - self._office_addin_policy_value = val - self._office_addin_policy_present = True - - @office_addin_policy.deleter - def office_addin_policy(self): - self._office_addin_policy_value = None - self._office_addin_policy_present = False - - def __repr__(self): - return 'FullTeam(id={!r}, name={!r}, sharing_policies={!r}, office_addin_policy={!r})'.format( - self._id_value, - self._name_value, - self._sharing_policies_value, - self._office_addin_policy_value, - ) - -FullTeam_validator = bv.Struct(FullTeam) - -class GetAccountArg(object): - """ - :ivar account_id: A user's account identifier. - """ - - __slots__ = [ - '_account_id_value', - '_account_id_present', - ] - - _has_required_fields = True - - def __init__(self, - account_id=None): - self._account_id_value = None - self._account_id_present = False - if account_id is not None: - self.account_id = account_id - - @property - def account_id(self): - """ - A user's account identifier. - - :rtype: str - """ - if self._account_id_present: - return self._account_id_value - else: - raise AttributeError("missing required field 'account_id'") - - @account_id.setter - def account_id(self, val): - val = self._account_id_validator.validate(val) - self._account_id_value = val - self._account_id_present = True - - @account_id.deleter - def account_id(self): - self._account_id_value = None - self._account_id_present = False - - def __repr__(self): - return 'GetAccountArg(account_id={!r})'.format( - self._account_id_value, - ) - -GetAccountArg_validator = bv.Struct(GetAccountArg) - -class GetAccountBatchArg(object): - """ - :ivar account_ids: List of user account identifiers. Should not contain any - duplicate account IDs. - """ - - __slots__ = [ - '_account_ids_value', - '_account_ids_present', - ] - - _has_required_fields = True - - def __init__(self, - account_ids=None): - self._account_ids_value = None - self._account_ids_present = False - if account_ids is not None: - self.account_ids = account_ids - - @property - def account_ids(self): - """ - List of user account identifiers. Should not contain any duplicate - account IDs. - - :rtype: list of [str] - """ - if self._account_ids_present: - return self._account_ids_value - else: - raise AttributeError("missing required field 'account_ids'") - - @account_ids.setter - def account_ids(self, val): - val = self._account_ids_validator.validate(val) - self._account_ids_value = val - self._account_ids_present = True - - @account_ids.deleter - def account_ids(self): - self._account_ids_value = None - self._account_ids_present = False - - def __repr__(self): - return 'GetAccountBatchArg(account_ids={!r})'.format( - self._account_ids_value, - ) - -GetAccountBatchArg_validator = bv.Struct(GetAccountBatchArg) - -class GetAccountBatchError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar str no_account: The value is an account ID specified in - :field:`GetAccountBatchArg.account_ids` that does not exist. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def no_account(cls, val): - """ - Create an instance of this class set to the ``no_account`` tag with - value ``val``. - - :param str val: - :rtype: GetAccountBatchError - """ - return cls('no_account', val) - - def is_no_account(self): - """ - Check if the union tag is ``no_account``. - - :rtype: bool - """ - return self._tag == 'no_account' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_no_account(self): - """ - The value is an account ID specified in - ``GetAccountBatchArg.account_ids`` that does not exist. - - Only call this if :meth:`is_no_account` is true. - - :rtype: str - """ - if not self.is_no_account(): - raise AttributeError("tag 'no_account' not set") - return self._value - - def __repr__(self): - return 'GetAccountBatchError(%r, %r)' % (self._tag, self._value) - -GetAccountBatchError_validator = bv.Union(GetAccountBatchError) - -class GetAccountError(bb.Union): - """ - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar no_account: The specified ``GetAccountArg.account_id`` does not exist. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - no_account = None - # Attribute is overwritten below the class definition - other = None - - def is_no_account(self): - """ - Check if the union tag is ``no_account``. - - :rtype: bool - """ - return self._tag == 'no_account' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def __repr__(self): - return 'GetAccountError(%r, %r)' % (self._tag, self._value) - -GetAccountError_validator = bv.Union(GetAccountError) - -class IndividualSpaceAllocation(object): - """ - :ivar allocated: The total space allocated to the user's account (bytes). - """ - - __slots__ = [ - '_allocated_value', - '_allocated_present', - ] - - _has_required_fields = True - - def __init__(self, - allocated=None): - self._allocated_value = None - self._allocated_present = False - if allocated is not None: - self.allocated = allocated - - @property - def allocated(self): - """ - The total space allocated to the user's account (bytes). - - :rtype: long - """ - if self._allocated_present: - return self._allocated_value - else: - raise AttributeError("missing required field 'allocated'") - - @allocated.setter - def allocated(self, val): - val = self._allocated_validator.validate(val) - self._allocated_value = val - self._allocated_present = True - - @allocated.deleter - def allocated(self): - self._allocated_value = None - self._allocated_present = False - - def __repr__(self): - return 'IndividualSpaceAllocation(allocated={!r})'.format( - self._allocated_value, - ) - -IndividualSpaceAllocation_validator = bv.Struct(IndividualSpaceAllocation) - -class Name(object): - """ - Representations for a person's name to assist with internationalization. - - :ivar given_name: Also known as a first name. - :ivar surname: Also known as a last name or family name. - :ivar familiar_name: Locale-dependent name. In the US, a person's familiar - name is their ``given_name``, but elsewhere, it could be any combination - of a person's ``given_name`` and ``surname``. - :ivar display_name: A name that can be used directly to represent the name - of a user's Dropbox account. - :ivar abbreviated_name: An abbreviated form of the person's name. Their - initials in most locales. - """ - - __slots__ = [ - '_given_name_value', - '_given_name_present', - '_surname_value', - '_surname_present', - '_familiar_name_value', - '_familiar_name_present', - '_display_name_value', - '_display_name_present', - '_abbreviated_name_value', - '_abbreviated_name_present', - ] - - _has_required_fields = True - - def __init__(self, - given_name=None, - surname=None, - familiar_name=None, - display_name=None, - abbreviated_name=None): - self._given_name_value = None - self._given_name_present = False - self._surname_value = None - self._surname_present = False - self._familiar_name_value = None - self._familiar_name_present = False - self._display_name_value = None - self._display_name_present = False - self._abbreviated_name_value = None - self._abbreviated_name_present = False - if given_name is not None: - self.given_name = given_name - if surname is not None: - self.surname = surname - if familiar_name is not None: - self.familiar_name = familiar_name - if display_name is not None: - self.display_name = display_name - if abbreviated_name is not None: - self.abbreviated_name = abbreviated_name - - @property - def given_name(self): - """ - Also known as a first name. - - :rtype: str - """ - if self._given_name_present: - return self._given_name_value - else: - raise AttributeError("missing required field 'given_name'") - - @given_name.setter - def given_name(self, val): - val = self._given_name_validator.validate(val) - self._given_name_value = val - self._given_name_present = True - - @given_name.deleter - def given_name(self): - self._given_name_value = None - self._given_name_present = False - - @property - def surname(self): - """ - Also known as a last name or family name. - - :rtype: str - """ - if self._surname_present: - return self._surname_value - else: - raise AttributeError("missing required field 'surname'") - - @surname.setter - def surname(self, val): - val = self._surname_validator.validate(val) - self._surname_value = val - self._surname_present = True - - @surname.deleter - def surname(self): - self._surname_value = None - self._surname_present = False - - @property - def familiar_name(self): - """ - Locale-dependent name. In the US, a person's familiar name is their - ``given_name``, but elsewhere, it could be any combination of a person's - ``given_name`` and ``surname``. - - :rtype: str - """ - if self._familiar_name_present: - return self._familiar_name_value - else: - raise AttributeError("missing required field 'familiar_name'") - - @familiar_name.setter - def familiar_name(self, val): - val = self._familiar_name_validator.validate(val) - self._familiar_name_value = val - self._familiar_name_present = True - - @familiar_name.deleter - def familiar_name(self): - self._familiar_name_value = None - self._familiar_name_present = False - - @property - def display_name(self): - """ - A name that can be used directly to represent the name of a user's - Dropbox account. - - :rtype: str - """ - if self._display_name_present: - return self._display_name_value - else: - raise AttributeError("missing required field 'display_name'") - - @display_name.setter - def display_name(self, val): - val = self._display_name_validator.validate(val) - self._display_name_value = val - self._display_name_present = True - - @display_name.deleter - def display_name(self): - self._display_name_value = None - self._display_name_present = False - - @property - def abbreviated_name(self): - """ - An abbreviated form of the person's name. Their initials in most - locales. - - :rtype: str - """ - if self._abbreviated_name_present: - return self._abbreviated_name_value - else: - raise AttributeError("missing required field 'abbreviated_name'") - - @abbreviated_name.setter - def abbreviated_name(self, val): - val = self._abbreviated_name_validator.validate(val) - self._abbreviated_name_value = val - self._abbreviated_name_present = True - - @abbreviated_name.deleter - def abbreviated_name(self): - self._abbreviated_name_value = None - self._abbreviated_name_present = False - - def __repr__(self): - return 'Name(given_name={!r}, surname={!r}, familiar_name={!r}, display_name={!r}, abbreviated_name={!r})'.format( - self._given_name_value, - self._surname_value, - self._familiar_name_value, - self._display_name_value, - self._abbreviated_name_value, - ) - -Name_validator = bv.Struct(Name) - -class SpaceAllocation(bb.Union): - """ - Space is allocated differently based on the type of account. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar IndividualSpaceAllocation individual: The user's space allocation - applies only to their individual account. - :ivar TeamSpaceAllocation team: The user shares space with other members of - their team. - """ - - _catch_all = 'other' - # Attribute is overwritten below the class definition - other = None - - @classmethod - def individual(cls, val): - """ - Create an instance of this class set to the ``individual`` tag with - value ``val``. - - :param IndividualSpaceAllocation val: - :rtype: SpaceAllocation - """ - return cls('individual', val) - - @classmethod - def team(cls, val): - """ - Create an instance of this class set to the ``team`` tag with value - ``val``. - - :param TeamSpaceAllocation val: - :rtype: SpaceAllocation - """ - return cls('team', val) - - def is_individual(self): - """ - Check if the union tag is ``individual``. - - :rtype: bool - """ - return self._tag == 'individual' - - def is_team(self): - """ - Check if the union tag is ``team``. - - :rtype: bool - """ - return self._tag == 'team' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_individual(self): - """ - The user's space allocation applies only to their individual account. - - Only call this if :meth:`is_individual` is true. - - :rtype: IndividualSpaceAllocation - """ - if not self.is_individual(): - raise AttributeError("tag 'individual' not set") - return self._value - - def get_team(self): - """ - The user shares space with other members of their team. - - Only call this if :meth:`is_team` is true. - - :rtype: TeamSpaceAllocation - """ - if not self.is_team(): - raise AttributeError("tag 'team' not set") - return self._value - - def __repr__(self): - return 'SpaceAllocation(%r, %r)' % (self._tag, self._value) - -SpaceAllocation_validator = bv.Union(SpaceAllocation) - -class SpaceUsage(object): - """ - Information about a user's space usage and quota. - - :ivar used: The user's total space usage (bytes). - :ivar allocation: The user's space allocation. - """ - - __slots__ = [ - '_used_value', - '_used_present', - '_allocation_value', - '_allocation_present', - ] - - _has_required_fields = True - - def __init__(self, - used=None, - allocation=None): - self._used_value = None - self._used_present = False - self._allocation_value = None - self._allocation_present = False - if used is not None: - self.used = used - if allocation is not None: - self.allocation = allocation - - @property - def used(self): - """ - The user's total space usage (bytes). - - :rtype: long - """ - if self._used_present: - return self._used_value - else: - raise AttributeError("missing required field 'used'") - - @used.setter - def used(self, val): - val = self._used_validator.validate(val) - self._used_value = val - self._used_present = True - - @used.deleter - def used(self): - self._used_value = None - self._used_present = False - - @property - def allocation(self): - """ - The user's space allocation. - - :rtype: SpaceAllocation - """ - if self._allocation_present: - return self._allocation_value - else: - raise AttributeError("missing required field 'allocation'") - - @allocation.setter - def allocation(self, val): - self._allocation_validator.validate_type_only(val) - self._allocation_value = val - self._allocation_present = True - - @allocation.deleter - def allocation(self): - self._allocation_value = None - self._allocation_present = False - - def __repr__(self): - return 'SpaceUsage(used={!r}, allocation={!r})'.format( - self._used_value, - self._allocation_value, - ) - -SpaceUsage_validator = bv.Struct(SpaceUsage) - -class TeamSpaceAllocation(object): - """ - :ivar used: The total space currently used by the user's team (bytes). - :ivar allocated: The total space allocated to the user's team (bytes). - """ - - __slots__ = [ - '_used_value', - '_used_present', - '_allocated_value', - '_allocated_present', - ] - - _has_required_fields = True - - def __init__(self, - used=None, - allocated=None): - self._used_value = None - self._used_present = False - self._allocated_value = None - self._allocated_present = False - if used is not None: - self.used = used - if allocated is not None: - self.allocated = allocated - - @property - def used(self): - """ - The total space currently used by the user's team (bytes). - - :rtype: long - """ - if self._used_present: - return self._used_value - else: - raise AttributeError("missing required field 'used'") - - @used.setter - def used(self, val): - val = self._used_validator.validate(val) - self._used_value = val - self._used_present = True - - @used.deleter - def used(self): - self._used_value = None - self._used_present = False - - @property - def allocated(self): - """ - The total space allocated to the user's team (bytes). - - :rtype: long - """ - if self._allocated_present: - return self._allocated_value - else: - raise AttributeError("missing required field 'allocated'") - - @allocated.setter - def allocated(self, val): - val = self._allocated_validator.validate(val) - self._allocated_value = val - self._allocated_present = True - - @allocated.deleter - def allocated(self): - self._allocated_value = None - self._allocated_present = False - - def __repr__(self): - return 'TeamSpaceAllocation(used={!r}, allocated={!r})'.format( - self._used_value, - self._allocated_value, - ) - -TeamSpaceAllocation_validator = bv.Struct(TeamSpaceAllocation) - -GetAccountBatchResult_validator = bv.List(BasicAccount_validator) -Account._account_id_validator = users_common.AccountId_validator -Account._name_validator = Name_validator -Account._email_validator = bv.String() -Account._email_verified_validator = bv.Boolean() -Account._profile_photo_url_validator = bv.Nullable(bv.String()) -Account._disabled_validator = bv.Boolean() -Account._all_field_names_ = set([ - 'account_id', - 'name', - 'email', - 'email_verified', - 'profile_photo_url', - 'disabled', -]) -Account._all_fields_ = [ - ('account_id', Account._account_id_validator), - ('name', Account._name_validator), - ('email', Account._email_validator), - ('email_verified', Account._email_verified_validator), - ('profile_photo_url', Account._profile_photo_url_validator), - ('disabled', Account._disabled_validator), -] - -BasicAccount._is_teammate_validator = bv.Boolean() -BasicAccount._team_member_id_validator = bv.Nullable(bv.String()) -BasicAccount._all_field_names_ = Account._all_field_names_.union(set([ - 'is_teammate', - 'team_member_id', -])) -BasicAccount._all_fields_ = Account._all_fields_ + [ - ('is_teammate', BasicAccount._is_teammate_validator), - ('team_member_id', BasicAccount._team_member_id_validator), -] - -FullAccount._country_validator = bv.Nullable(bv.String(min_length=2, max_length=2)) -FullAccount._locale_validator = bv.String(min_length=2) -FullAccount._referral_link_validator = bv.String() -FullAccount._team_validator = bv.Nullable(FullTeam_validator) -FullAccount._team_member_id_validator = bv.Nullable(bv.String()) -FullAccount._is_paired_validator = bv.Boolean() -FullAccount._account_type_validator = users_common.AccountType_validator -FullAccount._all_field_names_ = Account._all_field_names_.union(set([ - 'country', - 'locale', - 'referral_link', - 'team', - 'team_member_id', - 'is_paired', - 'account_type', -])) -FullAccount._all_fields_ = Account._all_fields_ + [ - ('country', FullAccount._country_validator), - ('locale', FullAccount._locale_validator), - ('referral_link', FullAccount._referral_link_validator), - ('team', FullAccount._team_validator), - ('team_member_id', FullAccount._team_member_id_validator), - ('is_paired', FullAccount._is_paired_validator), - ('account_type', FullAccount._account_type_validator), -] - -Team._id_validator = bv.String() -Team._name_validator = bv.String() -Team._all_field_names_ = set([ - 'id', - 'name', -]) -Team._all_fields_ = [ - ('id', Team._id_validator), - ('name', Team._name_validator), -] - -FullTeam._sharing_policies_validator = team_policies.TeamSharingPolicies_validator -FullTeam._office_addin_policy_validator = team_policies.OfficeAddInPolicy_validator -FullTeam._all_field_names_ = Team._all_field_names_.union(set([ - 'sharing_policies', - 'office_addin_policy', -])) -FullTeam._all_fields_ = Team._all_fields_ + [ - ('sharing_policies', FullTeam._sharing_policies_validator), - ('office_addin_policy', FullTeam._office_addin_policy_validator), -] - -GetAccountArg._account_id_validator = users_common.AccountId_validator -GetAccountArg._all_field_names_ = set(['account_id']) -GetAccountArg._all_fields_ = [('account_id', GetAccountArg._account_id_validator)] - -GetAccountBatchArg._account_ids_validator = bv.List(users_common.AccountId_validator, min_items=1) -GetAccountBatchArg._all_field_names_ = set(['account_ids']) -GetAccountBatchArg._all_fields_ = [('account_ids', GetAccountBatchArg._account_ids_validator)] - -GetAccountBatchError._no_account_validator = users_common.AccountId_validator -GetAccountBatchError._other_validator = bv.Void() -GetAccountBatchError._tagmap = { - 'no_account': GetAccountBatchError._no_account_validator, - 'other': GetAccountBatchError._other_validator, -} - -GetAccountBatchError.other = GetAccountBatchError('other') - -GetAccountError._no_account_validator = bv.Void() -GetAccountError._other_validator = bv.Void() -GetAccountError._tagmap = { - 'no_account': GetAccountError._no_account_validator, - 'other': GetAccountError._other_validator, -} - -GetAccountError.no_account = GetAccountError('no_account') -GetAccountError.other = GetAccountError('other') - -IndividualSpaceAllocation._allocated_validator = bv.UInt64() -IndividualSpaceAllocation._all_field_names_ = set(['allocated']) -IndividualSpaceAllocation._all_fields_ = [('allocated', IndividualSpaceAllocation._allocated_validator)] - -Name._given_name_validator = bv.String() -Name._surname_validator = bv.String() -Name._familiar_name_validator = bv.String() -Name._display_name_validator = bv.String() -Name._abbreviated_name_validator = bv.String() -Name._all_field_names_ = set([ - 'given_name', - 'surname', - 'familiar_name', - 'display_name', - 'abbreviated_name', -]) -Name._all_fields_ = [ - ('given_name', Name._given_name_validator), - ('surname', Name._surname_validator), - ('familiar_name', Name._familiar_name_validator), - ('display_name', Name._display_name_validator), - ('abbreviated_name', Name._abbreviated_name_validator), -] - -SpaceAllocation._individual_validator = IndividualSpaceAllocation_validator -SpaceAllocation._team_validator = TeamSpaceAllocation_validator -SpaceAllocation._other_validator = bv.Void() -SpaceAllocation._tagmap = { - 'individual': SpaceAllocation._individual_validator, - 'team': SpaceAllocation._team_validator, - 'other': SpaceAllocation._other_validator, -} - -SpaceAllocation.other = SpaceAllocation('other') - -SpaceUsage._used_validator = bv.UInt64() -SpaceUsage._allocation_validator = SpaceAllocation_validator -SpaceUsage._all_field_names_ = set([ - 'used', - 'allocation', -]) -SpaceUsage._all_fields_ = [ - ('used', SpaceUsage._used_validator), - ('allocation', SpaceUsage._allocation_validator), -] - -TeamSpaceAllocation._used_validator = bv.UInt64() -TeamSpaceAllocation._allocated_validator = bv.UInt64() -TeamSpaceAllocation._all_field_names_ = set([ - 'used', - 'allocated', -]) -TeamSpaceAllocation._all_fields_ = [ - ('used', TeamSpaceAllocation._used_validator), - ('allocated', TeamSpaceAllocation._allocated_validator), -] - -get_account = bb.Route( - 'get_account', - False, - GetAccountArg_validator, - BasicAccount_validator, - GetAccountError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -get_account_batch = bb.Route( - 'get_account_batch', - False, - GetAccountBatchArg_validator, - GetAccountBatchResult_validator, - GetAccountBatchError_validator, - {'host': u'api', - 'style': u'rpc'}, -) -get_current_account = bb.Route( - 'get_current_account', - False, - bv.Void(), - FullAccount_validator, - bv.Void(), - {'host': u'api', - 'style': u'rpc'}, -) -get_space_usage = bb.Route( - 'get_space_usage', - False, - bv.Void(), - SpaceUsage_validator, - bv.Void(), - {'host': u'api', - 'style': u'rpc'}, -) - -ROUTES = { - 'get_account': get_account, - 'get_account_batch': get_account_batch, - 'get_current_account': get_current_account, - 'get_space_usage': get_space_usage, -} - diff --git a/resources/lib/dropbox/users_common.py b/resources/lib/dropbox/users_common.py deleted file mode 100644 index 37f2f60..0000000 --- a/resources/lib/dropbox/users_common.py +++ /dev/null @@ -1,84 +0,0 @@ -# -*- coding: utf-8 -*- -# Auto-generated by Stone, do not modify. -# flake8: noqa -# pylint: skip-file -""" -This namespace contains common data types used within the users namespace. -""" - -try: - from . import stone_validators as bv - from . import stone_base as bb -except (SystemError, ValueError): - # Catch errors raised when importing a relative module when not in a package. - # This makes testing this file directly (outside of a package) easier. - import stone_validators as bv - import stone_base as bb - -class AccountType(bb.Union): - """ - What type of account this user has. - - This class acts as a tagged union. Only one of the ``is_*`` methods will - return true. To get the associated value of a tag (if one exists), use the - corresponding ``get_*`` method. - - :ivar basic: The basic account type. - :ivar pro: The Dropbox Pro account type. - :ivar business: The Dropbox Business account type. - """ - - _catch_all = None - # Attribute is overwritten below the class definition - basic = None - # Attribute is overwritten below the class definition - pro = None - # Attribute is overwritten below the class definition - business = None - - def is_basic(self): - """ - Check if the union tag is ``basic``. - - :rtype: bool - """ - return self._tag == 'basic' - - def is_pro(self): - """ - Check if the union tag is ``pro``. - - :rtype: bool - """ - return self._tag == 'pro' - - def is_business(self): - """ - Check if the union tag is ``business``. - - :rtype: bool - """ - return self._tag == 'business' - - def __repr__(self): - return 'AccountType(%r, %r)' % (self._tag, self._value) - -AccountType_validator = bv.Union(AccountType) - -AccountId_validator = bv.String(min_length=40, max_length=40) -AccountType._basic_validator = bv.Void() -AccountType._pro_validator = bv.Void() -AccountType._business_validator = bv.Void() -AccountType._tagmap = { - 'basic': AccountType._basic_validator, - 'pro': AccountType._pro_validator, - 'business': AccountType._business_validator, -} - -AccountType.basic = AccountType('basic') -AccountType.pro = AccountType('pro') -AccountType.business = AccountType('business') - -ROUTES = { -} -