From 063aea528d2a2aabf2e1a0ae07c017cf5e65a86d Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Tue, 3 Nov 2020 12:56:52 -0500 Subject: [PATCH 01/90] Migrate primary branch to `main` - Following the lead of GitHub per https://www.zdnet.com/article/github-to-replace-master-with-main-starting-next-month/ --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 9e221b0b..8275b3a2 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -2,7 +2,7 @@ name: Coverage on: push: branches: - - master + - main pull_request: schedule: - cron: 0 0 * * * From ef994be749c1c175ca7d1f9f580304fc68a6f519 Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Tue, 3 Nov 2020 13:50:52 -0500 Subject: [PATCH 02/90] Migrate references of master to main (#282) * Update release script * Migrate all references of master to main --- .github/workflows/spec_update.yml | 2 +- CONTRIBUTING.md | 4 ++-- README.rst | 18 +++++++++--------- dropbox/dropbox.py | 2 +- dropbox/oauth.py | 4 ++-- example/back-up-and-restore/README.md | 2 +- scripts/update_version.sh | 6 +++--- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/spec_update.yml b/.github/workflows/spec_update.yml index f1db9875..61481aca 100644 --- a/.github/workflows/spec_update.yml +++ b/.github/workflows/spec_update.yml @@ -65,7 +65,7 @@ jobs: title: 'Automated Spec Update' body: | ${{ steps.git-diff.outputs.commit}} - base: 'master' + base: 'main' team-reviewers: | owners maintainers diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a1c55dc3..1b224fc1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -70,6 +70,6 @@ The documentation will be built into `build/html`. [issues]: https://github.com/dropbox/dropbox-sdk-python/issues [pr]: https://github.com/dropbox/dropbox-sdk-python/pulls -[coc]: https://github.com/dropbox/dropbox-sdk-python/blob/master/CODE_OF_CONDUCT.md -[license]: https://github.com/dropbox/dropbox-sdk-python/blob/master/LICENSE +[coc]: https://github.com/dropbox/dropbox-sdk-python/blob/main/CODE_OF_CONDUCT.md +[license]: https://github.com/dropbox/dropbox-sdk-python/blob/main/LICENSE [cla]: https://opensource.dropbox.com/cla/ \ No newline at end of file diff --git a/README.rst b/README.rst index e8a3e916..5574a0d1 100644 --- a/README.rst +++ b/README.rst @@ -7,7 +7,7 @@ .. image:: https://img.shields.io/pypi/v/dropbox.svg :target: https://pypi.python.org/pypi/dropbox -.. image:: https://codecov.io/gh/dropbox/dropbox-sdk-python/branch/master/graph/badge.svg +.. image:: https://codecov.io/gh/dropbox/dropbox-sdk-python/branch/main/graph/badge.svg :target: https://codecov.io/gh/dropbox/dropbox-sdk-python The offical Dropbox SDK for Python. @@ -43,12 +43,12 @@ Examples We provide `Examples`_ to help get you started with a lot of the basic functionality in the SDK. - **OAuth** - - `Commandline OAuth Basic `_ - Shows a simple example of commandline oauth (no redirect). - - `Commandline OAuth Scopes `_ - Shows a simple example of commandline oauth using scopes. - - `Commandline OAuth PKCE `_ - Shows a simple example of commandline oauth using PKCE. + - `Commandline OAuth Basic `_ - Shows a simple example of commandline oauth (no redirect). + - `Commandline OAuth Scopes `_ - Shows a simple example of commandline oauth using scopes. + - `Commandline OAuth PKCE `_ - Shows a simple example of commandline oauth using PKCE. - **Other Examples** - - `Updown `_ - Sample application that uploads the contents of your ``Downloads`` folder to Dropbox. - - `Backup and Restore `_ - Sample application that shows how you can backup a file and restore previous versions if the file was modified/corrupted in any way. + - `Updown `_ - Sample application that uploads the contents of your ``Downloads`` folder to Dropbox. + - `Backup and Restore `_ - Sample application that shows how you can backup a file and restore previous versions if the file was modified/corrupted in any way. Getting Help ============ @@ -65,9 +65,9 @@ This SDK is distributed under the MIT license, please see `LICENSE`_ for more in .. _logo: {logo_link} .. _repo: https://github.com/dropbox/dropbox-sdk-python .. _`Read The Docs`: http://dropbox-sdk-python.readthedocs.org -.. _`Examples`: https://github.com/dropbox/dropbox-sdk-python/tree/master/example -.. _LICENSE: https://github.com/dropbox/dropbox-sdk-python/blob/master/LICENSE -.. _CONTRIBUTING.md: https://github.com/dropbox/dropbox-sdk-python/blob/master/CONTRIBUTING.md +.. _`Examples`: https://github.com/dropbox/dropbox-sdk-python/tree/main/example +.. _LICENSE: https://github.com/dropbox/dropbox-sdk-python/blob/main/LICENSE +.. _CONTRIBUTING.md: https://github.com/dropbox/dropbox-sdk-python/blob/main/CONTRIBUTING.md .. _Developer Console: https://dropbox.com/developers/apps .. _OAuth Guide: https://www.dropbox.com/lp/developers/reference/oauth-guide .. _`Dropbox Support`: https://www.dropbox.com/developers/contact \ No newline at end of file diff --git a/dropbox/dropbox.py b/dropbox/dropbox.py index d0a82006..63c47160 100644 --- a/dropbox/dropbox.py +++ b/dropbox/dropbox.py @@ -4,7 +4,7 @@ 'create_session', ] -# This should always be 0.0.0 in master. Only update this after tagging +# This should always be 0.0.0 in main. Only update this after tagging # before release. __version__ = '0.0.0' diff --git a/dropbox/oauth.py b/dropbox/oauth.py index ef0ca5d2..f874c1da 100644 --- a/dropbox/oauth.py +++ b/dropbox/oauth.py @@ -267,7 +267,7 @@ class DropboxOAuth2FlowNoRedirect(DropboxOAuth2FlowBase): OAuth 2 authorization helper for apps that can't provide a redirect URI (such as the command-line example apps). - See examples under `example/oauth `_ """ @@ -352,7 +352,7 @@ class DropboxOAuth2Flow(DropboxOAuth2FlowBase): 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. - See examples under `example/oauth `_ """ diff --git a/example/back-up-and-restore/README.md b/example/back-up-and-restore/README.md index 3569d766..c1fdb1dc 100644 --- a/example/back-up-and-restore/README.md +++ b/example/back-up-and-restore/README.md @@ -22,7 +22,7 @@ In this example, it contains a simple string of text (initially "original"). # API usage ## New v2 endpoints -This app uses the Dropbox API v2 endpoints files_upload, files_restore, files_download_to_file, and files_list_revisions. See more here: http://dropbox-sdk-python.readthedocs.org/en/master/ +This app uses the Dropbox API v2 endpoints files_upload, files_restore, files_download_to_file, and files_list_revisions. See more here: http://dropbox-sdk-python.readthedocs.org/en/main/ ## Error checking This example also shows you how to do specific error handling with the new API v2 exceptions. In the backup() function, you can see how to check for a specific kind of API Error. \ No newline at end of file diff --git a/scripts/update_version.sh b/scripts/update_version.sh index 978ef999..ea085f05 100755 --- a/scripts/update_version.sh +++ b/scripts/update_version.sh @@ -8,18 +8,18 @@ else set -ex NEW_VERSION=$1 - git checkout master + git checkout main git reset --hard HEAD git checkout -b "tmp-release-${NEW_VERSION}" perl -pi -e "s/^__version__ = .*$/__version__ = '$1'/g" dropbox/dropbox.py - perl -pi -e 's/(\?branch=)master$/\1\v'$1'/g ;' -e 's/(\?version=)latest$/\1\stable/g ;' -e 's/(\/en\/)latest(\/)$/\1\stable\2/g ;' -e 's/(\[Latest) (Documentation\])$/\1 Release \2/g ;' README.rst + perl -pi -e 's/(\?branch=)main$/\1\v'$1'/g ;' -e 's/(\?version=)latest$/\1\stable/g ;' -e 's/(\/en\/)latest(\/)$/\1\stable\2/g ;' -e 's/(\[Latest) (Documentation\])$/\1 Release \2/g ;' README.rst git add -u git commit -m "${NEW_VERSION} release" git tag "v${NEW_VERSION}" -m "${NEW_VERSION} release" - git checkout master + git checkout main git branch -D "tmp-release-${NEW_VERSION}" git push origin From 3d378fd2f545e14e3735445aa5cb0a8522f42908 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Tue, 10 Nov 2020 10:04:26 -0800 Subject: [PATCH 03/90] Automated Spec Update (#284) ed6e389b2d16d19b21e68413ae8f4743dd9b9223 Change Notes: File Namespace: - Add UploadSessionStartError union - Add UploadSessionType union - Update UploadSessionFinishError union to include concurrent_sessions_data_not_allowed, concurrent_session_not_closed, concurrent_session_missing_data - Update UploadSessionType struct to include session_type - Update upload_session/start to include UploadSessionStartError - Update Comments Team Log Namespace: - Add AdminAlertingAlertConfiguration, AdminAlertingChangedAlertConfigDetails, MemberChangeResellerRoleDetails, TeamProfileAddBackgroundDetails, TeamProfileChangeBackgroundDetails, TeamProfileRemoveBackgroundDetails, AdminAlertingChangedAlertConfigType, MemberChangeResellerRoleType, TeamProfileAddBackgroundType, TeamProfileChangeBackgroundType, TeamProfileRemoveBackgroundType structs - Add AdminAlertingAlertStatePolicy, ResellerRole unions - Update EventCategory union to include admin_alerting - Update GovernancePolicyRemoveFoldersDetails struct to include reason - Update EventDetails union to include admin_alerting_changed_alert_config_details, member_change_reseller_role_details, team_profile_add_background_details, team_profile_change_background_details, team_profile_remove_background_details - Update EventType union to include admin_alerting_changed_alert_config, member_change_reseller_role, team_profile_add_background, team_profile_change_background, team_profile_remove_background - Update EventTypeArg to include admin_alerting_changed_alert_config, member_change_reseller_role, team_profile_add_background, team_profile_change_background, team_profile_remove_background - Update Examples Co-authored-by: Brent Bumann de3a7718946ee79f1a0d5ca499b9d22b41cc7c84 Co-authored-by: DropboxBot --- dropbox/base.py | 30 +- dropbox/files.py | 262 ++++++++- dropbox/team_log.py | 1255 ++++++++++++++++++++++++++++++++++++++++++- spec | 2 +- 4 files changed, 1516 insertions(+), 33 deletions(-) diff --git a/dropbox/base.py b/dropbox/base.py index 6b67b6d2..a12a7cdb 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -2936,7 +2936,8 @@ def files_upload_session_finish_batch_check(self, def files_upload_session_start(self, f, - close=False): + close=False, + session_type=None): """ 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. @@ -2955,15 +2956,40 @@ def files_upload_session_start(self, allowed per month. For more information, see the `Data transport limit page `_. + By default, upload sessions require you to send content of the file in + sequential order via consecutive :meth:`files_upload_session_start`, + :meth:`files_upload_session_append_v2`, + :meth:`files_upload_session_finish` calls. For better performance, you + can instead optionally use a ``UploadSessionType.concurrent`` upload + session. To start a new concurrent session, set + ``UploadSessionStartArg.session_type`` to + ``UploadSessionType.concurrent``. After that, you can send file data in + concurrent :meth:`files_upload_session_append_v2` requests. Finally + finish the session with :meth:`files_upload_session_finish`. There are + couple of constraints with concurrent sessions to make them work. You + can not send data with :meth:`files_upload_session_start` or + :meth:`files_upload_session_finish` call, only with + :meth:`files_upload_session_append_v2` call. Also data uploaded in + :meth:`files_upload_session_append_v2` call must be multiple of 4194304 + bytes (except for last :meth:`files_upload_session_append_v2` with + ``UploadSessionStartArg.close`` to ``True``, that may contain any + remaining data). :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. + :param Nullable session_type: Type of upload session you want to start. + If not specified, default is ``UploadSessionType.sequential``. :rtype: :class:`dropbox.files.UploadSessionStartResult` + :raises: :class:`.exceptions.ApiError` + + If this raises, ApiError will contain: + :class:`dropbox.files.UploadSessionStartError` """ - arg = files.UploadSessionStartArg(close) + arg = files.UploadSessionStartArg(close, + session_type) r = self.request( files.upload_session_start, 'files', diff --git a/dropbox/files.py b/dropbox/files.py index baa9f85d..65b1ded5 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -14616,6 +14616,12 @@ class UploadSessionFinishError(bb.Union): :ivar files.UploadSessionFinishError.too_many_write_operations: There are too many write operations happening in the user's Dropbox. You should retry uploading this file. + :ivar files.UploadSessionFinishError.concurrent_session_data_not_allowed: + Uploading data not allowed when finishing concurrent upload session. + :ivar files.UploadSessionFinishError.concurrent_session_not_closed: + Concurrent upload sessions need to be closed before finishing. + :ivar files.UploadSessionFinishError.concurrent_session_missing_data: Not + all pieces of data were uploaded before trying to finish the session. """ _catch_all = 'other' @@ -14624,6 +14630,12 @@ class UploadSessionFinishError(bb.Union): # Attribute is overwritten below the class definition too_many_write_operations = None # Attribute is overwritten below the class definition + concurrent_session_data_not_allowed = None + # Attribute is overwritten below the class definition + concurrent_session_not_closed = None + # Attribute is overwritten below the class definition + concurrent_session_missing_data = None + # Attribute is overwritten below the class definition other = None @classmethod @@ -14699,6 +14711,30 @@ def is_too_many_write_operations(self): """ return self._tag == 'too_many_write_operations' + def is_concurrent_session_data_not_allowed(self): + """ + Check if the union tag is ``concurrent_session_data_not_allowed``. + + :rtype: bool + """ + return self._tag == 'concurrent_session_data_not_allowed' + + def is_concurrent_session_not_closed(self): + """ + Check if the union tag is ``concurrent_session_not_closed``. + + :rtype: bool + """ + return self._tag == 'concurrent_session_not_closed' + + def is_concurrent_session_missing_data(self): + """ + Check if the union tag is ``concurrent_session_missing_data``. + + :rtype: bool + """ + return self._tag == 'concurrent_session_missing_data' + def is_other(self): """ Check if the union tag is ``other``. @@ -14774,6 +14810,12 @@ class UploadSessionLookupError(bb.Union): :ivar files.UploadSessionLookupError.too_large: You can not append to the upload session because the size of a file should not reach the max file size limit (i.e. 350GB). + :ivar files.UploadSessionLookupError.concurrent_session_invalid_offset: For + concurrent upload sessions, offset needs to be multiple of 4194304 + bytes. + :ivar files.UploadSessionLookupError.concurrent_session_invalid_data_size: + For concurrent upload sessions, only chunks with size multiple of + 4194304 bytes can be uploaded. """ _catch_all = 'other' @@ -14786,6 +14828,10 @@ class UploadSessionLookupError(bb.Union): # Attribute is overwritten below the class definition too_large = None # Attribute is overwritten below the class definition + concurrent_session_invalid_offset = None + # Attribute is overwritten below the class definition + concurrent_session_invalid_data_size = None + # Attribute is overwritten below the class definition other = None @classmethod @@ -14839,6 +14885,22 @@ def is_too_large(self): """ return self._tag == 'too_large' + def is_concurrent_session_invalid_offset(self): + """ + Check if the union tag is ``concurrent_session_invalid_offset``. + + :rtype: bool + """ + return self._tag == 'concurrent_session_invalid_offset' + + def is_concurrent_session_invalid_data_size(self): + """ + Check if the union tag is ``concurrent_session_invalid_data_size``. + + :rtype: bool + """ + return self._tag == 'concurrent_session_invalid_data_size' + def is_other(self): """ Check if the union tag is ``other``. @@ -14929,21 +14991,31 @@ class UploadSessionStartArg(bb.Struct): be closed, at which point you won't be able to call :meth:`dropbox.dropbox.Dropbox.files_upload_session_append` anymore with the current session. + :ivar files.UploadSessionStartArg.session_type: Type of upload session you + want to start. If not specified, default is + ``UploadSessionType.sequential``. """ __slots__ = [ '_close_value', '_close_present', + '_session_type_value', + '_session_type_present', ] _has_required_fields = False def __init__(self, - close=None): + close=None, + session_type=None): self._close_value = None self._close_present = False + self._session_type_value = None + self._session_type_present = False if close is not None: self.close = close + if session_type is not None: + self.session_type = session_type @property def close(self): @@ -14970,16 +15042,96 @@ def close(self): self._close_value = None self._close_present = False + @property + def session_type(self): + """ + Type of upload session you want to start. If not specified, default is + ``UploadSessionType.sequential``. + + :rtype: UploadSessionType + """ + if self._session_type_present: + return self._session_type_value + else: + return None + + @session_type.setter + def session_type(self, val): + if val is None: + del self.session_type + return + self._session_type_validator.validate_type_only(val) + self._session_type_value = val + self._session_type_present = True + + @session_type.deleter + def session_type(self): + self._session_type_value = None + self._session_type_present = False + def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadSessionStartArg, self)._process_custom_annotations(annotation_type, field_path, processor) def __repr__(self): - return 'UploadSessionStartArg(close={!r})'.format( + return 'UploadSessionStartArg(close={!r}, session_type={!r})'.format( self._close_value, + self._session_type_value, ) UploadSessionStartArg_validator = bv.Struct(UploadSessionStartArg) +class UploadSessionStartError(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 files.UploadSessionStartError.concurrent_session_data_not_allowed: + Uploading data not allowed when starting concurrent upload session. + :ivar files.UploadSessionStartError.concurrent_session_close_not_allowed: + Can not start a closed concurrent upload session. + """ + + _catch_all = 'other' + # Attribute is overwritten below the class definition + concurrent_session_data_not_allowed = None + # Attribute is overwritten below the class definition + concurrent_session_close_not_allowed = None + # Attribute is overwritten below the class definition + other = None + + def is_concurrent_session_data_not_allowed(self): + """ + Check if the union tag is ``concurrent_session_data_not_allowed``. + + :rtype: bool + """ + return self._tag == 'concurrent_session_data_not_allowed' + + def is_concurrent_session_close_not_allowed(self): + """ + Check if the union tag is ``concurrent_session_close_not_allowed``. + + :rtype: bool + """ + return self._tag == 'concurrent_session_close_not_allowed' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(UploadSessionStartError, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'UploadSessionStartError(%r, %r)' % (self._tag, self._value) + +UploadSessionStartError_validator = bv.Union(UploadSessionStartError) + class UploadSessionStartResult(bb.Struct): """ :ivar files.UploadSessionStartResult.session_id: A unique identifier for the @@ -15037,6 +15189,58 @@ def __repr__(self): UploadSessionStartResult_validator = bv.Struct(UploadSessionStartResult) +class UploadSessionType(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 files.UploadSessionType.sequential: Pieces of content are uploaded + sequentially one after another. This is the default behavior. + :ivar files.UploadSessionType.concurrent: Pieces of data can be uploaded in + concurrent RPCs in any order. + """ + + _catch_all = 'other' + # Attribute is overwritten below the class definition + sequential = None + # Attribute is overwritten below the class definition + concurrent = None + # Attribute is overwritten below the class definition + other = None + + def is_sequential(self): + """ + Check if the union tag is ``sequential``. + + :rtype: bool + """ + return self._tag == 'sequential' + + def is_concurrent(self): + """ + Check if the union tag is ``concurrent``. + + :rtype: bool + """ + return self._tag == 'concurrent' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(UploadSessionType, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'UploadSessionType(%r, %r)' % (self._tag, self._value) + +UploadSessionType_validator = bv.Union(UploadSessionType) + class UploadWriteFailed(bb.Struct): """ :ivar files.UploadWriteFailed.reason: The reason why the file couldn't be @@ -17416,6 +17620,9 @@ def __repr__(self): UploadSessionFinishError._properties_error_validator = file_properties.InvalidPropertyGroupError_validator UploadSessionFinishError._too_many_shared_folder_targets_validator = bv.Void() UploadSessionFinishError._too_many_write_operations_validator = bv.Void() +UploadSessionFinishError._concurrent_session_data_not_allowed_validator = bv.Void() +UploadSessionFinishError._concurrent_session_not_closed_validator = bv.Void() +UploadSessionFinishError._concurrent_session_missing_data_validator = bv.Void() UploadSessionFinishError._other_validator = bv.Void() UploadSessionFinishError._tagmap = { 'lookup_failed': UploadSessionFinishError._lookup_failed_validator, @@ -17423,11 +17630,17 @@ def __repr__(self): 'properties_error': UploadSessionFinishError._properties_error_validator, 'too_many_shared_folder_targets': UploadSessionFinishError._too_many_shared_folder_targets_validator, 'too_many_write_operations': UploadSessionFinishError._too_many_write_operations_validator, + 'concurrent_session_data_not_allowed': UploadSessionFinishError._concurrent_session_data_not_allowed_validator, + 'concurrent_session_not_closed': UploadSessionFinishError._concurrent_session_not_closed_validator, + 'concurrent_session_missing_data': UploadSessionFinishError._concurrent_session_missing_data_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.concurrent_session_data_not_allowed = UploadSessionFinishError('concurrent_session_data_not_allowed') +UploadSessionFinishError.concurrent_session_not_closed = UploadSessionFinishError('concurrent_session_not_closed') +UploadSessionFinishError.concurrent_session_missing_data = UploadSessionFinishError('concurrent_session_missing_data') UploadSessionFinishError.other = UploadSessionFinishError('other') UploadSessionLookupError._not_found_validator = bv.Void() @@ -17435,6 +17648,8 @@ def __repr__(self): UploadSessionLookupError._closed_validator = bv.Void() UploadSessionLookupError._not_closed_validator = bv.Void() UploadSessionLookupError._too_large_validator = bv.Void() +UploadSessionLookupError._concurrent_session_invalid_offset_validator = bv.Void() +UploadSessionLookupError._concurrent_session_invalid_data_size_validator = bv.Void() UploadSessionLookupError._other_validator = bv.Void() UploadSessionLookupError._tagmap = { 'not_found': UploadSessionLookupError._not_found_validator, @@ -17442,6 +17657,8 @@ def __repr__(self): 'closed': UploadSessionLookupError._closed_validator, 'not_closed': UploadSessionLookupError._not_closed_validator, 'too_large': UploadSessionLookupError._too_large_validator, + 'concurrent_session_invalid_offset': UploadSessionLookupError._concurrent_session_invalid_offset_validator, + 'concurrent_session_invalid_data_size': UploadSessionLookupError._concurrent_session_invalid_data_size_validator, 'other': UploadSessionLookupError._other_validator, } @@ -17449,6 +17666,8 @@ def __repr__(self): UploadSessionLookupError.closed = UploadSessionLookupError('closed') UploadSessionLookupError.not_closed = UploadSessionLookupError('not_closed') UploadSessionLookupError.too_large = UploadSessionLookupError('too_large') +UploadSessionLookupError.concurrent_session_invalid_offset = UploadSessionLookupError('concurrent_session_invalid_offset') +UploadSessionLookupError.concurrent_session_invalid_data_size = UploadSessionLookupError('concurrent_session_invalid_data_size') UploadSessionLookupError.other = UploadSessionLookupError('other') UploadSessionOffsetError._correct_offset_validator = bv.UInt64() @@ -17456,13 +17675,46 @@ def __repr__(self): 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)] +UploadSessionStartArg._session_type_validator = bv.Nullable(UploadSessionType_validator) +UploadSessionStartArg._all_field_names_ = set([ + 'close', + 'session_type', +]) +UploadSessionStartArg._all_fields_ = [ + ('close', UploadSessionStartArg._close_validator), + ('session_type', UploadSessionStartArg._session_type_validator), +] + +UploadSessionStartError._concurrent_session_data_not_allowed_validator = bv.Void() +UploadSessionStartError._concurrent_session_close_not_allowed_validator = bv.Void() +UploadSessionStartError._other_validator = bv.Void() +UploadSessionStartError._tagmap = { + 'concurrent_session_data_not_allowed': UploadSessionStartError._concurrent_session_data_not_allowed_validator, + 'concurrent_session_close_not_allowed': UploadSessionStartError._concurrent_session_close_not_allowed_validator, + 'other': UploadSessionStartError._other_validator, +} + +UploadSessionStartError.concurrent_session_data_not_allowed = UploadSessionStartError('concurrent_session_data_not_allowed') +UploadSessionStartError.concurrent_session_close_not_allowed = UploadSessionStartError('concurrent_session_close_not_allowed') +UploadSessionStartError.other = UploadSessionStartError('other') UploadSessionStartResult._session_id_validator = bv.String() UploadSessionStartResult._all_field_names_ = set(['session_id']) UploadSessionStartResult._all_fields_ = [('session_id', UploadSessionStartResult._session_id_validator)] +UploadSessionType._sequential_validator = bv.Void() +UploadSessionType._concurrent_validator = bv.Void() +UploadSessionType._other_validator = bv.Void() +UploadSessionType._tagmap = { + 'sequential': UploadSessionType._sequential_validator, + 'concurrent': UploadSessionType._concurrent_validator, + 'other': UploadSessionType._other_validator, +} + +UploadSessionType.sequential = UploadSessionType('sequential') +UploadSessionType.concurrent = UploadSessionType('concurrent') +UploadSessionType.other = UploadSessionType('other') + UploadWriteFailed._reason_validator = WriteError_validator UploadWriteFailed._upload_session_id_validator = bv.String() UploadWriteFailed._all_field_names_ = set([ @@ -18153,7 +18405,7 @@ def __repr__(self): False, UploadSessionStartArg_validator, UploadSessionStartResult_validator, - bv.Void(), + UploadSessionStartError_validator, {'host': u'content', 'style': u'upload'}, ) diff --git a/dropbox/team_log.py b/dropbox/team_log.py index cf5cb07e..14848d66 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -1523,6 +1523,277 @@ def __repr__(self): ActorLogInfo_validator = bv.Union(ActorLogInfo) +class AdminAlertingAlertConfiguration(bb.Struct): + """ + Alert configurations + + :ivar team_log.AdminAlertingAlertConfiguration.alert_state: Alert state. + """ + + __slots__ = [ + '_alert_state_value', + '_alert_state_present', + ] + + _has_required_fields = True + + def __init__(self, + alert_state=None): + self._alert_state_value = None + self._alert_state_present = False + if alert_state is not None: + self.alert_state = alert_state + + @property + def alert_state(self): + """ + Alert state. + + :rtype: AdminAlertingAlertStatePolicy + """ + if self._alert_state_present: + return self._alert_state_value + else: + raise AttributeError("missing required field 'alert_state'") + + @alert_state.setter + def alert_state(self, val): + self._alert_state_validator.validate_type_only(val) + self._alert_state_value = val + self._alert_state_present = True + + @alert_state.deleter + def alert_state(self): + self._alert_state_value = None + self._alert_state_present = False + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AdminAlertingAlertConfiguration, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'AdminAlertingAlertConfiguration(alert_state={!r})'.format( + self._alert_state_value, + ) + +AdminAlertingAlertConfiguration_validator = bv.Struct(AdminAlertingAlertConfiguration) + +class AdminAlertingAlertStatePolicy(bb.Union): + """ + Policy for controlling whether an alert can be triggered or not + + This class acts as a tagged union. Only 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 + off = None + # Attribute is overwritten below the class definition + on = None + # Attribute is overwritten below the class definition + other = None + + def is_off(self): + """ + Check if the union tag is ``off``. + + :rtype: bool + """ + return self._tag == 'off' + + def is_on(self): + """ + Check if the union tag is ``on``. + + :rtype: bool + """ + return self._tag == 'on' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AdminAlertingAlertStatePolicy, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'AdminAlertingAlertStatePolicy(%r, %r)' % (self._tag, self._value) + +AdminAlertingAlertStatePolicy_validator = bv.Union(AdminAlertingAlertStatePolicy) + +class AdminAlertingChangedAlertConfigDetails(bb.Struct): + """ + Changed an alert setting. + + :ivar team_log.AdminAlertingChangedAlertConfigDetails.alert_name: Alert + Name. + :ivar team_log.AdminAlertingChangedAlertConfigDetails.previous_alert_config: + Previous alert configuration. + :ivar team_log.AdminAlertingChangedAlertConfigDetails.new_alert_config: New + alert configuration. + """ + + __slots__ = [ + '_alert_name_value', + '_alert_name_present', + '_previous_alert_config_value', + '_previous_alert_config_present', + '_new_alert_config_value', + '_new_alert_config_present', + ] + + _has_required_fields = True + + def __init__(self, + alert_name=None, + previous_alert_config=None, + new_alert_config=None): + self._alert_name_value = None + self._alert_name_present = False + self._previous_alert_config_value = None + self._previous_alert_config_present = False + self._new_alert_config_value = None + self._new_alert_config_present = False + if alert_name is not None: + self.alert_name = alert_name + if previous_alert_config is not None: + self.previous_alert_config = previous_alert_config + if new_alert_config is not None: + self.new_alert_config = new_alert_config + + @property + def alert_name(self): + """ + Alert Name. + + :rtype: str + """ + if self._alert_name_present: + return self._alert_name_value + else: + raise AttributeError("missing required field 'alert_name'") + + @alert_name.setter + def alert_name(self, val): + val = self._alert_name_validator.validate(val) + self._alert_name_value = val + self._alert_name_present = True + + @alert_name.deleter + def alert_name(self): + self._alert_name_value = None + self._alert_name_present = False + + @property + def previous_alert_config(self): + """ + Previous alert configuration. + + :rtype: AdminAlertingAlertConfiguration + """ + if self._previous_alert_config_present: + return self._previous_alert_config_value + else: + raise AttributeError("missing required field 'previous_alert_config'") + + @previous_alert_config.setter + def previous_alert_config(self, val): + self._previous_alert_config_validator.validate_type_only(val) + self._previous_alert_config_value = val + self._previous_alert_config_present = True + + @previous_alert_config.deleter + def previous_alert_config(self): + self._previous_alert_config_value = None + self._previous_alert_config_present = False + + @property + def new_alert_config(self): + """ + New alert configuration. + + :rtype: AdminAlertingAlertConfiguration + """ + if self._new_alert_config_present: + return self._new_alert_config_value + else: + raise AttributeError("missing required field 'new_alert_config'") + + @new_alert_config.setter + def new_alert_config(self, val): + self._new_alert_config_validator.validate_type_only(val) + self._new_alert_config_value = val + self._new_alert_config_present = True + + @new_alert_config.deleter + def new_alert_config(self): + self._new_alert_config_value = None + self._new_alert_config_present = False + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AdminAlertingChangedAlertConfigDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'AdminAlertingChangedAlertConfigDetails(alert_name={!r}, previous_alert_config={!r}, new_alert_config={!r})'.format( + self._alert_name_value, + self._previous_alert_config_value, + self._new_alert_config_value, + ) + +AdminAlertingChangedAlertConfigDetails_validator = bv.Struct(AdminAlertingChangedAlertConfigDetails) + +class AdminAlertingChangedAlertConfigType(bb.Struct): + + __slots__ = [ + '_description_value', + '_description_present', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = None + self._description_present = False + if description is not None: + self.description = description + + @property + def description(self): + """ + :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 + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AdminAlertingChangedAlertConfigType, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'AdminAlertingChangedAlertConfigType(description={!r})'.format( + self._description_value, + ) + +AdminAlertingChangedAlertConfigType_validator = bv.Struct(AdminAlertingChangedAlertConfigType) + class AdminRole(bb.Union): """ This class acts as a tagged union. Only one of the ``is_*`` methods will @@ -11369,6 +11640,8 @@ class EventCategory(bb.Union): return true. To get the associated value of a tag (if one exists), use the corresponding ``get_*`` method. + :ivar team_log.EventCategory.admin_alerting: Events that involve team + related alerts. :ivar team_log.EventCategory.apps: Events that apply to management of linked apps. :ivar team_log.EventCategory.comments: Events that have to do with comments @@ -11415,6 +11688,8 @@ class EventCategory(bb.Union): _catch_all = 'other' # Attribute is overwritten below the class definition + admin_alerting = None + # Attribute is overwritten below the class definition apps = None # Attribute is overwritten below the class definition comments = None @@ -11459,6 +11734,14 @@ class EventCategory(bb.Union): # Attribute is overwritten below the class definition other = None + def is_admin_alerting(self): + """ + Check if the union tag is ``admin_alerting``. + + :rtype: bool + """ + return self._tag == 'admin_alerting' + def is_apps(self): """ Check if the union tag is ``apps``. @@ -11659,6 +11942,17 @@ class EventDetails(bb.Union): # Attribute is overwritten below the class definition other = None + @classmethod + def admin_alerting_changed_alert_config_details(cls, val): + """ + Create an instance of this class set to the + ``admin_alerting_changed_alert_config_details`` tag with value ``val``. + + :param AdminAlertingChangedAlertConfigDetails val: + :rtype: EventDetails + """ + return cls('admin_alerting_changed_alert_config_details', val) + @classmethod def app_link_team_details(cls, val): """ @@ -12977,6 +13271,17 @@ def member_change_name_details(cls, val): """ return cls('member_change_name_details', val) + @classmethod + def member_change_reseller_role_details(cls, val): + """ + Create an instance of this class set to the + ``member_change_reseller_role_details`` tag with value ``val``. + + :param MemberChangeResellerRoleDetails val: + :rtype: EventDetails + """ + return cls('member_change_reseller_role_details', val) + @classmethod def member_change_status_details(cls, val): """ @@ -16154,6 +16459,17 @@ def team_merge_to_details(cls, val): """ return cls('team_merge_to_details', val) + @classmethod + def team_profile_add_background_details(cls, val): + """ + Create an instance of this class set to the + ``team_profile_add_background_details`` tag with value ``val``. + + :param TeamProfileAddBackgroundDetails val: + :rtype: EventDetails + """ + return cls('team_profile_add_background_details', val) + @classmethod def team_profile_add_logo_details(cls, val): """ @@ -16165,6 +16481,17 @@ def team_profile_add_logo_details(cls, val): """ return cls('team_profile_add_logo_details', val) + @classmethod + def team_profile_change_background_details(cls, val): + """ + Create an instance of this class set to the + ``team_profile_change_background_details`` tag with value ``val``. + + :param TeamProfileChangeBackgroundDetails val: + :rtype: EventDetails + """ + return cls('team_profile_change_background_details', val) + @classmethod def team_profile_change_default_language_details(cls, val): """ @@ -16198,6 +16525,17 @@ def team_profile_change_name_details(cls, val): """ return cls('team_profile_change_name_details', val) + @classmethod + def team_profile_remove_background_details(cls, val): + """ + Create an instance of this class set to the + ``team_profile_remove_background_details`` tag with value ``val``. + + :param TeamProfileRemoveBackgroundDetails val: + :rtype: EventDetails + """ + return cls('team_profile_remove_background_details', val) + @classmethod def team_profile_remove_logo_details(cls, val): """ @@ -16586,6 +16924,14 @@ def missing_details(cls, val): """ return cls('missing_details', val) + def is_admin_alerting_changed_alert_config_details(self): + """ + Check if the union tag is ``admin_alerting_changed_alert_config_details``. + + :rtype: bool + """ + return self._tag == 'admin_alerting_changed_alert_config_details' + def is_app_link_team_details(self): """ Check if the union tag is ``app_link_team_details``. @@ -17538,6 +17884,14 @@ def is_member_change_name_details(self): """ return self._tag == 'member_change_name_details' + def is_member_change_reseller_role_details(self): + """ + Check if the union tag is ``member_change_reseller_role_details``. + + :rtype: bool + """ + return self._tag == 'member_change_reseller_role_details' + def is_member_change_status_details(self): """ Check if the union tag is ``member_change_status_details``. @@ -19826,6 +20180,14 @@ def is_team_merge_to_details(self): """ return self._tag == 'team_merge_to_details' + def is_team_profile_add_background_details(self): + """ + Check if the union tag is ``team_profile_add_background_details``. + + :rtype: bool + """ + return self._tag == 'team_profile_add_background_details' + def is_team_profile_add_logo_details(self): """ Check if the union tag is ``team_profile_add_logo_details``. @@ -19834,6 +20196,14 @@ def is_team_profile_add_logo_details(self): """ return self._tag == 'team_profile_add_logo_details' + def is_team_profile_change_background_details(self): + """ + Check if the union tag is ``team_profile_change_background_details``. + + :rtype: bool + """ + return self._tag == 'team_profile_change_background_details' + def is_team_profile_change_default_language_details(self): """ Check if the union tag is ``team_profile_change_default_language_details``. @@ -19858,6 +20228,14 @@ def is_team_profile_change_name_details(self): """ return self._tag == 'team_profile_change_name_details' + def is_team_profile_remove_background_details(self): + """ + Check if the union tag is ``team_profile_remove_background_details``. + + :rtype: bool + """ + return self._tag == 'team_profile_remove_background_details' + def is_team_profile_remove_logo_details(self): """ Check if the union tag is ``team_profile_remove_logo_details``. @@ -20138,6 +20516,16 @@ def is_other(self): """ return self._tag == 'other' + def get_admin_alerting_changed_alert_config_details(self): + """ + Only call this if :meth:`is_admin_alerting_changed_alert_config_details` is true. + + :rtype: AdminAlertingChangedAlertConfigDetails + """ + if not self.is_admin_alerting_changed_alert_config_details(): + raise AttributeError("tag 'admin_alerting_changed_alert_config_details' not set") + return self._value + def get_app_link_team_details(self): """ Only call this if :meth:`is_app_link_team_details` is true. @@ -21328,6 +21716,16 @@ def get_member_change_name_details(self): raise AttributeError("tag 'member_change_name_details' not set") return self._value + def get_member_change_reseller_role_details(self): + """ + Only call this if :meth:`is_member_change_reseller_role_details` is true. + + :rtype: MemberChangeResellerRoleDetails + """ + if not self.is_member_change_reseller_role_details(): + raise AttributeError("tag 'member_change_reseller_role_details' not set") + return self._value + def get_member_change_status_details(self): """ Only call this if :meth:`is_member_change_status_details` is true. @@ -24188,6 +24586,16 @@ def get_team_merge_to_details(self): raise AttributeError("tag 'team_merge_to_details' not set") return self._value + def get_team_profile_add_background_details(self): + """ + Only call this if :meth:`is_team_profile_add_background_details` is true. + + :rtype: TeamProfileAddBackgroundDetails + """ + if not self.is_team_profile_add_background_details(): + raise AttributeError("tag 'team_profile_add_background_details' not set") + return self._value + def get_team_profile_add_logo_details(self): """ Only call this if :meth:`is_team_profile_add_logo_details` is true. @@ -24198,6 +24606,16 @@ def get_team_profile_add_logo_details(self): raise AttributeError("tag 'team_profile_add_logo_details' not set") return self._value + def get_team_profile_change_background_details(self): + """ + Only call this if :meth:`is_team_profile_change_background_details` is true. + + :rtype: TeamProfileChangeBackgroundDetails + """ + if not self.is_team_profile_change_background_details(): + raise AttributeError("tag 'team_profile_change_background_details' not set") + return self._value + def get_team_profile_change_default_language_details(self): """ Only call this if :meth:`is_team_profile_change_default_language_details` is true. @@ -24228,6 +24646,16 @@ def get_team_profile_change_name_details(self): raise AttributeError("tag 'team_profile_change_name_details' not set") return self._value + def get_team_profile_remove_background_details(self): + """ + Only call this if :meth:`is_team_profile_remove_background_details` is true. + + :rtype: TeamProfileRemoveBackgroundDetails + """ + if not self.is_team_profile_remove_background_details(): + raise AttributeError("tag 'team_profile_remove_background_details' not set") + return self._value + def get_team_profile_remove_logo_details(self): """ Only call this if :meth:`is_team_profile_remove_logo_details` is true. @@ -24587,6 +25015,9 @@ class EventType(bb.Union): return true. To get the associated value of a tag (if one exists), use the corresponding ``get_*`` method. + :ivar AdminAlertingChangedAlertConfigType + EventType.admin_alerting_changed_alert_config: (admin_alerting) Changed + an alert setting :ivar AppLinkTeamType EventType.app_link_team: (apps) Linked app for team :ivar AppLinkUserType EventType.app_link_user: (apps) Linked app for member :ivar AppUnlinkTeamType EventType.app_unlink_team: (apps) Unlinked app for @@ -24846,6 +25277,8 @@ class EventType(bb.Union): type (limited/full) of member (deprecated, no longer logged) :ivar MemberChangeNameType EventType.member_change_name: (members) Changed team member name + :ivar MemberChangeResellerRoleType EventType.member_change_reseller_role: + (members) Changed team member reseller role :ivar MemberChangeStatusType EventType.member_change_status: (members) Changed member status (invited, joined, suspended, etc.) :ivar MemberDeleteManualContactsType @@ -25550,8 +25983,13 @@ class EventType(bb.Union): another team into this team :ivar TeamMergeToType EventType.team_merge_to: (team_profile) Merged this team into another team + :ivar TeamProfileAddBackgroundType EventType.team_profile_add_background: + (team_profile) Added team background to display on shared link headers :ivar TeamProfileAddLogoType EventType.team_profile_add_logo: (team_profile) Added team logo to display on shared link headers + :ivar TeamProfileChangeBackgroundType + EventType.team_profile_change_background: (team_profile) Changed team + background displayed on shared link headers :ivar TeamProfileChangeDefaultLanguageType EventType.team_profile_change_default_language: (team_profile) Changed default language for team @@ -25559,6 +25997,9 @@ class EventType(bb.Union): (team_profile) Changed team logo displayed on shared link headers :ivar TeamProfileChangeNameType EventType.team_profile_change_name: (team_profile) Changed team name + :ivar TeamProfileRemoveBackgroundType + EventType.team_profile_remove_background: (team_profile) Removed team + background displayed on shared link headers :ivar TeamProfileRemoveLogoType EventType.team_profile_remove_logo: (team_profile) Removed team logo displayed on shared link headers :ivar TfaAddBackupPhoneType EventType.tfa_add_backup_phone: (tfa) Added @@ -25660,6 +26101,17 @@ class EventType(bb.Union): # Attribute is overwritten below the class definition other = None + @classmethod + def admin_alerting_changed_alert_config(cls, val): + """ + Create an instance of this class set to the + ``admin_alerting_changed_alert_config`` tag with value ``val``. + + :param AdminAlertingChangedAlertConfigType val: + :rtype: EventType + """ + return cls('admin_alerting_changed_alert_config', val) + @classmethod def app_link_team(cls, val): """ @@ -26971,6 +27423,17 @@ def member_change_name(cls, val): """ return cls('member_change_name', val) + @classmethod + def member_change_reseller_role(cls, val): + """ + Create an instance of this class set to the + ``member_change_reseller_role`` tag with value ``val``. + + :param MemberChangeResellerRoleType val: + :rtype: EventType + """ + return cls('member_change_reseller_role', val) + @classmethod def member_change_status(cls, val): """ @@ -30119,6 +30582,17 @@ def team_merge_to(cls, val): """ return cls('team_merge_to', val) + @classmethod + def team_profile_add_background(cls, val): + """ + Create an instance of this class set to the + ``team_profile_add_background`` tag with value ``val``. + + :param TeamProfileAddBackgroundType val: + :rtype: EventType + """ + return cls('team_profile_add_background', val) + @classmethod def team_profile_add_logo(cls, val): """ @@ -30130,6 +30604,17 @@ def team_profile_add_logo(cls, val): """ return cls('team_profile_add_logo', val) + @classmethod + def team_profile_change_background(cls, val): + """ + Create an instance of this class set to the + ``team_profile_change_background`` tag with value ``val``. + + :param TeamProfileChangeBackgroundType val: + :rtype: EventType + """ + return cls('team_profile_change_background', val) + @classmethod def team_profile_change_default_language(cls, val): """ @@ -30163,6 +30648,17 @@ def team_profile_change_name(cls, val): """ return cls('team_profile_change_name', val) + @classmethod + def team_profile_remove_background(cls, val): + """ + Create an instance of this class set to the + ``team_profile_remove_background`` tag with value ``val``. + + :param TeamProfileRemoveBackgroundType val: + :rtype: EventType + """ + return cls('team_profile_remove_background', val) + @classmethod def team_profile_remove_logo(cls, val): """ @@ -30538,6 +31034,14 @@ def team_merge_request_sent_shown_to_secondary_team(cls, val): """ return cls('team_merge_request_sent_shown_to_secondary_team', val) + def is_admin_alerting_changed_alert_config(self): + """ + Check if the union tag is ``admin_alerting_changed_alert_config``. + + :rtype: bool + """ + return self._tag == 'admin_alerting_changed_alert_config' + def is_app_link_team(self): """ Check if the union tag is ``app_link_team``. @@ -31490,6 +31994,14 @@ def is_member_change_name(self): """ return self._tag == 'member_change_name' + def is_member_change_reseller_role(self): + """ + Check if the union tag is ``member_change_reseller_role``. + + :rtype: bool + """ + return self._tag == 'member_change_reseller_role' + def is_member_change_status(self): """ Check if the union tag is ``member_change_status``. @@ -33778,6 +34290,14 @@ def is_team_merge_to(self): """ return self._tag == 'team_merge_to' + def is_team_profile_add_background(self): + """ + Check if the union tag is ``team_profile_add_background``. + + :rtype: bool + """ + return self._tag == 'team_profile_add_background' + def is_team_profile_add_logo(self): """ Check if the union tag is ``team_profile_add_logo``. @@ -33786,6 +34306,14 @@ def is_team_profile_add_logo(self): """ return self._tag == 'team_profile_add_logo' + def is_team_profile_change_background(self): + """ + Check if the union tag is ``team_profile_change_background``. + + :rtype: bool + """ + return self._tag == 'team_profile_change_background' + def is_team_profile_change_default_language(self): """ Check if the union tag is ``team_profile_change_default_language``. @@ -33810,6 +34338,14 @@ def is_team_profile_change_name(self): """ return self._tag == 'team_profile_change_name' + def is_team_profile_remove_background(self): + """ + Check if the union tag is ``team_profile_remove_background``. + + :rtype: bool + """ + return self._tag == 'team_profile_remove_background' + def is_team_profile_remove_logo(self): """ Check if the union tag is ``team_profile_remove_logo``. @@ -34082,6 +34618,18 @@ def is_other(self): """ return self._tag == 'other' + def get_admin_alerting_changed_alert_config(self): + """ + (admin_alerting) Changed an alert setting + + Only call this if :meth:`is_admin_alerting_changed_alert_config` is true. + + :rtype: AdminAlertingChangedAlertConfigType + """ + if not self.is_admin_alerting_changed_alert_config(): + raise AttributeError("tag 'admin_alerting_changed_alert_config' not set") + return self._value + def get_app_link_team(self): """ (apps) Linked app for team @@ -35518,6 +36066,18 @@ def get_member_change_name(self): raise AttributeError("tag 'member_change_name' not set") return self._value + def get_member_change_reseller_role(self): + """ + (members) Changed team member reseller role + + Only call this if :meth:`is_member_change_reseller_role` is true. + + :rtype: MemberChangeResellerRoleType + """ + if not self.is_member_change_reseller_role(): + raise AttributeError("tag 'member_change_reseller_role' not set") + return self._value + def get_member_change_status(self): """ (members) Changed member status (invited, joined, suspended, etc.) @@ -39011,6 +39571,18 @@ def get_team_merge_to(self): raise AttributeError("tag 'team_merge_to' not set") return self._value + def get_team_profile_add_background(self): + """ + (team_profile) Added team background to display on shared link headers + + Only call this if :meth:`is_team_profile_add_background` is true. + + :rtype: TeamProfileAddBackgroundType + """ + if not self.is_team_profile_add_background(): + raise AttributeError("tag 'team_profile_add_background' not set") + return self._value + def get_team_profile_add_logo(self): """ (team_profile) Added team logo to display on shared link headers @@ -39023,6 +39595,18 @@ def get_team_profile_add_logo(self): raise AttributeError("tag 'team_profile_add_logo' not set") return self._value + def get_team_profile_change_background(self): + """ + (team_profile) Changed team background displayed on shared link headers + + Only call this if :meth:`is_team_profile_change_background` is true. + + :rtype: TeamProfileChangeBackgroundType + """ + if not self.is_team_profile_change_background(): + raise AttributeError("tag 'team_profile_change_background' not set") + return self._value + def get_team_profile_change_default_language(self): """ (team_profile) Changed default language for team @@ -39059,6 +39643,18 @@ def get_team_profile_change_name(self): raise AttributeError("tag 'team_profile_change_name' not set") return self._value + def get_team_profile_remove_background(self): + """ + (team_profile) Removed team background displayed on shared link headers + + Only call this if :meth:`is_team_profile_remove_background` is true. + + :rtype: TeamProfileRemoveBackgroundType + """ + if not self.is_team_profile_remove_background(): + raise AttributeError("tag 'team_profile_remove_background' not set") + return self._value + def get_team_profile_remove_logo(self): """ (team_profile) Removed team logo displayed on shared link headers @@ -39482,6 +40078,8 @@ class EventTypeArg(bb.Union): return true. To get the associated value of a tag (if one exists), use the corresponding ``get_*`` method. + :ivar team_log.EventTypeArg.admin_alerting_changed_alert_config: + (admin_alerting) Changed an alert setting :ivar team_log.EventTypeArg.app_link_team: (apps) Linked app for team :ivar team_log.EventTypeArg.app_link_user: (apps) Linked app for member :ivar team_log.EventTypeArg.app_unlink_team: (apps) Unlinked app for team @@ -39709,6 +40307,8 @@ class EventTypeArg(bb.Union): membership type (limited/full) of member (deprecated, no longer logged) :ivar team_log.EventTypeArg.member_change_name: (members) Changed team member name + :ivar team_log.EventTypeArg.member_change_reseller_role: (members) Changed + team member reseller role :ivar team_log.EventTypeArg.member_change_status: (members) Changed member status (invited, joined, suspended, etc.) :ivar team_log.EventTypeArg.member_delete_manual_contacts: (members) Cleared @@ -40300,14 +40900,20 @@ class EventTypeArg(bb.Union): team into this team :ivar team_log.EventTypeArg.team_merge_to: (team_profile) Merged this team into another team + :ivar team_log.EventTypeArg.team_profile_add_background: (team_profile) + Added team background to display on shared link headers :ivar team_log.EventTypeArg.team_profile_add_logo: (team_profile) Added team logo to display on shared link headers + :ivar team_log.EventTypeArg.team_profile_change_background: (team_profile) + Changed team background displayed on shared link headers :ivar team_log.EventTypeArg.team_profile_change_default_language: (team_profile) Changed default language for team :ivar team_log.EventTypeArg.team_profile_change_logo: (team_profile) Changed team logo displayed on shared link headers :ivar team_log.EventTypeArg.team_profile_change_name: (team_profile) Changed team name + :ivar team_log.EventTypeArg.team_profile_remove_background: (team_profile) + Removed team background displayed on shared link headers :ivar team_log.EventTypeArg.team_profile_remove_logo: (team_profile) Removed team logo displayed on shared link headers :ivar team_log.EventTypeArg.tfa_add_backup_phone: (tfa) Added backup phone @@ -40399,6 +41005,8 @@ class EventTypeArg(bb.Union): _catch_all = 'other' # Attribute is overwritten below the class definition + admin_alerting_changed_alert_config = None + # Attribute is overwritten below the class definition app_link_team = None # Attribute is overwritten below the class definition app_link_user = None @@ -40637,6 +41245,8 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition member_change_name = None # Attribute is overwritten below the class definition + member_change_reseller_role = None + # Attribute is overwritten below the class definition member_change_status = None # Attribute is overwritten below the class definition member_delete_manual_contacts = None @@ -41209,14 +41819,20 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition team_merge_to = None # Attribute is overwritten below the class definition + team_profile_add_background = None + # Attribute is overwritten below the class definition team_profile_add_logo = None # Attribute is overwritten below the class definition + team_profile_change_background = 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_background = 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 @@ -41285,6 +41901,14 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition other = None + def is_admin_alerting_changed_alert_config(self): + """ + Check if the union tag is ``admin_alerting_changed_alert_config``. + + :rtype: bool + """ + return self._tag == 'admin_alerting_changed_alert_config' + def is_app_link_team(self): """ Check if the union tag is ``app_link_team``. @@ -42237,6 +42861,14 @@ def is_member_change_name(self): """ return self._tag == 'member_change_name' + def is_member_change_reseller_role(self): + """ + Check if the union tag is ``member_change_reseller_role``. + + :rtype: bool + """ + return self._tag == 'member_change_reseller_role' + def is_member_change_status(self): """ Check if the union tag is ``member_change_status``. @@ -44525,6 +45157,14 @@ def is_team_merge_to(self): """ return self._tag == 'team_merge_to' + def is_team_profile_add_background(self): + """ + Check if the union tag is ``team_profile_add_background``. + + :rtype: bool + """ + return self._tag == 'team_profile_add_background' + def is_team_profile_add_logo(self): """ Check if the union tag is ``team_profile_add_logo``. @@ -44533,6 +45173,14 @@ def is_team_profile_add_logo(self): """ return self._tag == 'team_profile_add_logo' + def is_team_profile_change_background(self): + """ + Check if the union tag is ``team_profile_change_background``. + + :rtype: bool + """ + return self._tag == 'team_profile_change_background' + def is_team_profile_change_default_language(self): """ Check if the union tag is ``team_profile_change_default_language``. @@ -44557,6 +45205,14 @@ def is_team_profile_change_name(self): """ return self._tag == 'team_profile_change_name' + def is_team_profile_remove_background(self): + """ + Check if the union tag is ``team_profile_remove_background``. + + :rtype: bool + """ + return self._tag == 'team_profile_remove_background' + def is_team_profile_remove_logo(self): """ Check if the union tag is ``team_profile_remove_logo``. @@ -53143,6 +53799,7 @@ class GovernancePolicyRemoveFoldersDetails(bb.Struct): :ivar team_log.GovernancePolicyRemoveFoldersDetails.policy_type: Policy type. :ivar team_log.GovernancePolicyRemoveFoldersDetails.folders: Folders. + :ivar team_log.GovernancePolicyRemoveFoldersDetails.reason: Reason. """ __slots__ = [ @@ -53154,6 +53811,8 @@ class GovernancePolicyRemoveFoldersDetails(bb.Struct): '_policy_type_present', '_folders_value', '_folders_present', + '_reason_value', + '_reason_present', ] _has_required_fields = True @@ -53162,7 +53821,8 @@ def __init__(self, governance_policy_id=None, name=None, policy_type=None, - folders=None): + folders=None, + reason=None): self._governance_policy_id_value = None self._governance_policy_id_present = False self._name_value = None @@ -53171,6 +53831,8 @@ def __init__(self, self._policy_type_present = False self._folders_value = None self._folders_present = False + self._reason_value = None + self._reason_present = False if governance_policy_id is not None: self.governance_policy_id = governance_policy_id if name is not None: @@ -53179,6 +53841,8 @@ def __init__(self, self.policy_type = policy_type if folders is not None: self.folders = folders + if reason is not None: + self.reason = reason @property def governance_policy_id(self): @@ -53278,15 +53942,42 @@ def folders(self): self._folders_value = None self._folders_present = False + @property + def reason(self): + """ + Reason. + + :rtype: str + """ + 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 + val = self._reason_validator.validate(val) + self._reason_value = val + self._reason_present = True + + @reason.deleter + def reason(self): + self._reason_value = None + self._reason_present = False + def _process_custom_annotations(self, annotation_type, field_path, processor): super(GovernancePolicyRemoveFoldersDetails, self)._process_custom_annotations(annotation_type, field_path, processor) def __repr__(self): - return 'GovernancePolicyRemoveFoldersDetails(governance_policy_id={!r}, name={!r}, policy_type={!r}, folders={!r})'.format( + return 'GovernancePolicyRemoveFoldersDetails(governance_policy_id={!r}, name={!r}, policy_type={!r}, folders={!r}, reason={!r})'.format( self._governance_policy_id_value, self._name_value, self._policy_type_value, self._folders_value, + self._reason_value, ) GovernancePolicyRemoveFoldersDetails_validator = bv.Struct(GovernancePolicyRemoveFoldersDetails) @@ -60150,22 +60841,161 @@ def description(self): self._description_present = False def _process_custom_annotations(self, annotation_type, field_path, processor): - super(MemberChangeMembershipTypeType, self)._process_custom_annotations(annotation_type, field_path, processor) + super(MemberChangeMembershipTypeType, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'MemberChangeMembershipTypeType(description={!r})'.format( + self._description_value, + ) + +MemberChangeMembershipTypeType_validator = bv.Struct(MemberChangeMembershipTypeType) + +class MemberChangeNameDetails(bb.Struct): + """ + Changed team member name. + + :ivar team_log.MemberChangeNameDetails.new_value: New user's name. + :ivar team_log.MemberChangeNameDetails.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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(MemberChangeNameDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + + 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 MemberChangeNameType(bb.Struct): + + __slots__ = [ + '_description_value', + '_description_present', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = None + self._description_present = False + if description is not None: + self.description = description + + @property + def description(self): + """ + :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 + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(MemberChangeNameType, self)._process_custom_annotations(annotation_type, field_path, processor) def __repr__(self): - return 'MemberChangeMembershipTypeType(description={!r})'.format( + return 'MemberChangeNameType(description={!r})'.format( self._description_value, ) -MemberChangeMembershipTypeType_validator = bv.Struct(MemberChangeMembershipTypeType) +MemberChangeNameType_validator = bv.Struct(MemberChangeNameType) -class MemberChangeNameDetails(bb.Struct): +class MemberChangeResellerRoleDetails(bb.Struct): """ - Changed team member name. + Changed team member reseller role. - :ivar team_log.MemberChangeNameDetails.new_value: New user's name. - :ivar team_log.MemberChangeNameDetails.previous_value: Previous user's name. - Might be missing due to historical data gap. + :ivar team_log.MemberChangeResellerRoleDetails.new_value: New reseller role. + This field is relevant when the reseller role is changed. + :ivar team_log.MemberChangeResellerRoleDetails.previous_value: Previous + reseller role. This field is relevant when the reseller role is changed + or when the reseller role is removed. """ __slots__ = [ @@ -60192,9 +61022,10 @@ def __init__(self, @property def new_value(self): """ - New user's name. + New reseller role. This field is relevant when the reseller role is + changed. - :rtype: UserNameLogInfo + :rtype: ResellerRole """ if self._new_value_present: return self._new_value_value @@ -60215,20 +61046,18 @@ def new_value(self): @property def previous_value(self): """ - Previous user's name. Might be missing due to historical data gap. + Previous reseller role. This field is relevant when the reseller role is + changed or when the reseller role is removed. - :rtype: UserNameLogInfo + :rtype: ResellerRole """ if self._previous_value_present: return self._previous_value_value else: - return None + raise AttributeError("missing required field 'previous_value'") @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 @@ -60239,17 +61068,17 @@ def previous_value(self): self._previous_value_present = False def _process_custom_annotations(self, annotation_type, field_path, processor): - super(MemberChangeNameDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + super(MemberChangeResellerRoleDetails, self)._process_custom_annotations(annotation_type, field_path, processor) def __repr__(self): - return 'MemberChangeNameDetails(new_value={!r}, previous_value={!r})'.format( + return 'MemberChangeResellerRoleDetails(new_value={!r}, previous_value={!r})'.format( self._new_value_value, self._previous_value_value, ) -MemberChangeNameDetails_validator = bv.Struct(MemberChangeNameDetails) +MemberChangeResellerRoleDetails_validator = bv.Struct(MemberChangeResellerRoleDetails) -class MemberChangeNameType(bb.Struct): +class MemberChangeResellerRoleType(bb.Struct): __slots__ = [ '_description_value', @@ -60287,14 +61116,14 @@ def description(self): self._description_present = False def _process_custom_annotations(self, annotation_type, field_path, processor): - super(MemberChangeNameType, self)._process_custom_annotations(annotation_type, field_path, processor) + super(MemberChangeResellerRoleType, self)._process_custom_annotations(annotation_type, field_path, processor) def __repr__(self): - return 'MemberChangeNameType(description={!r})'.format( + return 'MemberChangeResellerRoleType(description={!r})'.format( self._description_value, ) -MemberChangeNameType_validator = bv.Struct(MemberChangeNameType) +MemberChangeResellerRoleType_validator = bv.Struct(MemberChangeResellerRoleType) class MemberChangeStatusDetails(bb.Struct): """ @@ -73188,6 +74017,53 @@ def __repr__(self): ResellerLogInfo_validator = bv.Struct(ResellerLogInfo) +class ResellerRole(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_reseller = None + # Attribute is overwritten below the class definition + reseller_admin = None + # Attribute is overwritten below the class definition + other = None + + def is_not_reseller(self): + """ + Check if the union tag is ``not_reseller``. + + :rtype: bool + """ + return self._tag == 'not_reseller' + + def is_reseller_admin(self): + """ + Check if the union tag is ``reseller_admin``. + + :rtype: bool + """ + return self._tag == 'reseller_admin' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ResellerRole, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'ResellerRole(%r, %r)' % (self._tag, self._value) + +ResellerRole_validator = bv.Union(ResellerRole) + class ResellerSupportChangePolicyDetails(bb.Struct): """ Enabled/disabled reseller support. @@ -95048,6 +95924,74 @@ def __repr__(self): TeamName_validator = bv.Struct(TeamName) +class TeamProfileAddBackgroundDetails(bb.Struct): + """ + Added team background to display on shared link headers. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamProfileAddBackgroundDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'TeamProfileAddBackgroundDetails()' + +TeamProfileAddBackgroundDetails_validator = bv.Struct(TeamProfileAddBackgroundDetails) + +class TeamProfileAddBackgroundType(bb.Struct): + + __slots__ = [ + '_description_value', + '_description_present', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = None + self._description_present = False + if description is not None: + self.description = description + + @property + def description(self): + """ + :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 + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamProfileAddBackgroundType, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'TeamProfileAddBackgroundType(description={!r})'.format( + self._description_value, + ) + +TeamProfileAddBackgroundType_validator = bv.Struct(TeamProfileAddBackgroundType) + class TeamProfileAddLogoDetails(bb.Struct): """ Added team logo to display on shared link headers. @@ -95116,6 +96060,74 @@ def __repr__(self): TeamProfileAddLogoType_validator = bv.Struct(TeamProfileAddLogoType) +class TeamProfileChangeBackgroundDetails(bb.Struct): + """ + Changed team background displayed on shared link headers. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamProfileChangeBackgroundDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'TeamProfileChangeBackgroundDetails()' + +TeamProfileChangeBackgroundDetails_validator = bv.Struct(TeamProfileChangeBackgroundDetails) + +class TeamProfileChangeBackgroundType(bb.Struct): + + __slots__ = [ + '_description_value', + '_description_present', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = None + self._description_present = False + if description is not None: + self.description = description + + @property + def description(self): + """ + :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 + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamProfileChangeBackgroundType, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'TeamProfileChangeBackgroundType(description={!r})'.format( + self._description_value, + ) + +TeamProfileChangeBackgroundType_validator = bv.Struct(TeamProfileChangeBackgroundType) + class TeamProfileChangeDefaultLanguageDetails(bb.Struct): """ Changed default language for team. @@ -95456,6 +96468,74 @@ def __repr__(self): TeamProfileChangeNameType_validator = bv.Struct(TeamProfileChangeNameType) +class TeamProfileRemoveBackgroundDetails(bb.Struct): + """ + Removed team background displayed on shared link headers. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamProfileRemoveBackgroundDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'TeamProfileRemoveBackgroundDetails()' + +TeamProfileRemoveBackgroundDetails_validator = bv.Struct(TeamProfileRemoveBackgroundDetails) + +class TeamProfileRemoveBackgroundType(bb.Struct): + + __slots__ = [ + '_description_value', + '_description_present', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = None + self._description_present = False + if description is not None: + self.description = description + + @property + def description(self): + """ + :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 + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamProfileRemoveBackgroundType, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'TeamProfileRemoveBackgroundType(description={!r})'.format( + self._description_value, + ) + +TeamProfileRemoveBackgroundType_validator = bv.Struct(TeamProfileRemoveBackgroundType) + class TeamProfileRemoveLogoDetails(bb.Struct): """ Removed team logo displayed on shared link headers. @@ -98933,6 +100013,41 @@ def __repr__(self): ActorLogInfo.dropbox = ActorLogInfo('dropbox') ActorLogInfo.other = ActorLogInfo('other') +AdminAlertingAlertConfiguration._alert_state_validator = AdminAlertingAlertStatePolicy_validator +AdminAlertingAlertConfiguration._all_field_names_ = set(['alert_state']) +AdminAlertingAlertConfiguration._all_fields_ = [('alert_state', AdminAlertingAlertConfiguration._alert_state_validator)] + +AdminAlertingAlertStatePolicy._off_validator = bv.Void() +AdminAlertingAlertStatePolicy._on_validator = bv.Void() +AdminAlertingAlertStatePolicy._other_validator = bv.Void() +AdminAlertingAlertStatePolicy._tagmap = { + 'off': AdminAlertingAlertStatePolicy._off_validator, + 'on': AdminAlertingAlertStatePolicy._on_validator, + 'other': AdminAlertingAlertStatePolicy._other_validator, +} + +AdminAlertingAlertStatePolicy.off = AdminAlertingAlertStatePolicy('off') +AdminAlertingAlertStatePolicy.on = AdminAlertingAlertStatePolicy('on') +AdminAlertingAlertStatePolicy.other = AdminAlertingAlertStatePolicy('other') + +AdminAlertingChangedAlertConfigDetails._alert_name_validator = bv.String() +AdminAlertingChangedAlertConfigDetails._previous_alert_config_validator = AdminAlertingAlertConfiguration_validator +AdminAlertingChangedAlertConfigDetails._new_alert_config_validator = AdminAlertingAlertConfiguration_validator +AdminAlertingChangedAlertConfigDetails._all_field_names_ = set([ + 'alert_name', + 'previous_alert_config', + 'new_alert_config', +]) +AdminAlertingChangedAlertConfigDetails._all_fields_ = [ + ('alert_name', AdminAlertingChangedAlertConfigDetails._alert_name_validator), + ('previous_alert_config', AdminAlertingChangedAlertConfigDetails._previous_alert_config_validator), + ('new_alert_config', AdminAlertingChangedAlertConfigDetails._new_alert_config_validator), +] + +AdminAlertingChangedAlertConfigType._description_validator = bv.String() +AdminAlertingChangedAlertConfigType._all_field_names_ = set(['description']) +AdminAlertingChangedAlertConfigType._all_fields_ = [('description', AdminAlertingChangedAlertConfigType._description_validator)] + AdminRole._limited_admin_validator = bv.Void() AdminRole._member_only_validator = bv.Void() AdminRole._support_admin_validator = bv.Void() @@ -100067,6 +101182,7 @@ def __repr__(self): EnterpriseSettingsLockingType._all_field_names_ = set(['description']) EnterpriseSettingsLockingType._all_fields_ = [('description', EnterpriseSettingsLockingType._description_validator)] +EventCategory._admin_alerting_validator = bv.Void() EventCategory._apps_validator = bv.Void() EventCategory._comments_validator = bv.Void() EventCategory._data_governance_validator = bv.Void() @@ -100090,6 +101206,7 @@ def __repr__(self): EventCategory._trusted_teams_validator = bv.Void() EventCategory._other_validator = bv.Void() EventCategory._tagmap = { + 'admin_alerting': EventCategory._admin_alerting_validator, 'apps': EventCategory._apps_validator, 'comments': EventCategory._comments_validator, 'data_governance': EventCategory._data_governance_validator, @@ -100114,6 +101231,7 @@ def __repr__(self): 'other': EventCategory._other_validator, } +EventCategory.admin_alerting = EventCategory('admin_alerting') EventCategory.apps = EventCategory('apps') EventCategory.comments = EventCategory('comments') EventCategory.data_governance = EventCategory('data_governance') @@ -100137,6 +101255,7 @@ def __repr__(self): EventCategory.trusted_teams = EventCategory('trusted_teams') EventCategory.other = EventCategory('other') +EventDetails._admin_alerting_changed_alert_config_details_validator = AdminAlertingChangedAlertConfigDetails_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 @@ -100256,6 +101375,7 @@ def __repr__(self): EventDetails._member_change_external_id_details_validator = MemberChangeExternalIdDetails_validator EventDetails._member_change_membership_type_details_validator = MemberChangeMembershipTypeDetails_validator EventDetails._member_change_name_details_validator = MemberChangeNameDetails_validator +EventDetails._member_change_reseller_role_details_validator = MemberChangeResellerRoleDetails_validator EventDetails._member_change_status_details_validator = MemberChangeStatusDetails_validator EventDetails._member_delete_manual_contacts_details_validator = MemberDeleteManualContactsDetails_validator EventDetails._member_delete_profile_photo_details_validator = MemberDeleteProfilePhotoDetails_validator @@ -100542,10 +101662,13 @@ def __repr__(self): EventDetails._web_sessions_change_idle_length_policy_details_validator = WebSessionsChangeIdleLengthPolicyDetails_validator EventDetails._team_merge_from_details_validator = TeamMergeFromDetails_validator EventDetails._team_merge_to_details_validator = TeamMergeToDetails_validator +EventDetails._team_profile_add_background_details_validator = TeamProfileAddBackgroundDetails_validator EventDetails._team_profile_add_logo_details_validator = TeamProfileAddLogoDetails_validator +EventDetails._team_profile_change_background_details_validator = TeamProfileChangeBackgroundDetails_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_background_details_validator = TeamProfileRemoveBackgroundDetails_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 @@ -100582,6 +101705,7 @@ def __repr__(self): EventDetails._missing_details_validator = MissingDetails_validator EventDetails._other_validator = bv.Void() EventDetails._tagmap = { + 'admin_alerting_changed_alert_config_details': EventDetails._admin_alerting_changed_alert_config_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, @@ -100701,6 +101825,7 @@ def __repr__(self): 'member_change_external_id_details': EventDetails._member_change_external_id_details_validator, 'member_change_membership_type_details': EventDetails._member_change_membership_type_details_validator, 'member_change_name_details': EventDetails._member_change_name_details_validator, + 'member_change_reseller_role_details': EventDetails._member_change_reseller_role_details_validator, 'member_change_status_details': EventDetails._member_change_status_details_validator, 'member_delete_manual_contacts_details': EventDetails._member_delete_manual_contacts_details_validator, 'member_delete_profile_photo_details': EventDetails._member_delete_profile_photo_details_validator, @@ -100987,10 +102112,13 @@ def __repr__(self): 'web_sessions_change_idle_length_policy_details': EventDetails._web_sessions_change_idle_length_policy_details_validator, 'team_merge_from_details': EventDetails._team_merge_from_details_validator, 'team_merge_to_details': EventDetails._team_merge_to_details_validator, + 'team_profile_add_background_details': EventDetails._team_profile_add_background_details_validator, 'team_profile_add_logo_details': EventDetails._team_profile_add_logo_details_validator, + 'team_profile_change_background_details': EventDetails._team_profile_change_background_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_background_details': EventDetails._team_profile_remove_background_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, @@ -101030,6 +102158,7 @@ def __repr__(self): EventDetails.other = EventDetails('other') +EventType._admin_alerting_changed_alert_config_validator = AdminAlertingChangedAlertConfigType_validator EventType._app_link_team_validator = AppLinkTeamType_validator EventType._app_link_user_validator = AppLinkUserType_validator EventType._app_unlink_team_validator = AppUnlinkTeamType_validator @@ -101149,6 +102278,7 @@ def __repr__(self): EventType._member_change_external_id_validator = MemberChangeExternalIdType_validator EventType._member_change_membership_type_validator = MemberChangeMembershipTypeType_validator EventType._member_change_name_validator = MemberChangeNameType_validator +EventType._member_change_reseller_role_validator = MemberChangeResellerRoleType_validator EventType._member_change_status_validator = MemberChangeStatusType_validator EventType._member_delete_manual_contacts_validator = MemberDeleteManualContactsType_validator EventType._member_delete_profile_photo_validator = MemberDeleteProfilePhotoType_validator @@ -101435,10 +102565,13 @@ def __repr__(self): EventType._web_sessions_change_idle_length_policy_validator = WebSessionsChangeIdleLengthPolicyType_validator EventType._team_merge_from_validator = TeamMergeFromType_validator EventType._team_merge_to_validator = TeamMergeToType_validator +EventType._team_profile_add_background_validator = TeamProfileAddBackgroundType_validator EventType._team_profile_add_logo_validator = TeamProfileAddLogoType_validator +EventType._team_profile_change_background_validator = TeamProfileChangeBackgroundType_validator EventType._team_profile_change_default_language_validator = TeamProfileChangeDefaultLanguageType_validator EventType._team_profile_change_logo_validator = TeamProfileChangeLogoType_validator EventType._team_profile_change_name_validator = TeamProfileChangeNameType_validator +EventType._team_profile_remove_background_validator = TeamProfileRemoveBackgroundType_validator EventType._team_profile_remove_logo_validator = TeamProfileRemoveLogoType_validator EventType._tfa_add_backup_phone_validator = TfaAddBackupPhoneType_validator EventType._tfa_add_security_key_validator = TfaAddSecurityKeyType_validator @@ -101474,6 +102607,7 @@ def __repr__(self): EventType._team_merge_request_sent_shown_to_secondary_team_validator = TeamMergeRequestSentShownToSecondaryTeamType_validator EventType._other_validator = bv.Void() EventType._tagmap = { + 'admin_alerting_changed_alert_config': EventType._admin_alerting_changed_alert_config_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, @@ -101593,6 +102727,7 @@ def __repr__(self): 'member_change_external_id': EventType._member_change_external_id_validator, 'member_change_membership_type': EventType._member_change_membership_type_validator, 'member_change_name': EventType._member_change_name_validator, + 'member_change_reseller_role': EventType._member_change_reseller_role_validator, 'member_change_status': EventType._member_change_status_validator, 'member_delete_manual_contacts': EventType._member_delete_manual_contacts_validator, 'member_delete_profile_photo': EventType._member_delete_profile_photo_validator, @@ -101879,10 +103014,13 @@ def __repr__(self): 'web_sessions_change_idle_length_policy': EventType._web_sessions_change_idle_length_policy_validator, 'team_merge_from': EventType._team_merge_from_validator, 'team_merge_to': EventType._team_merge_to_validator, + 'team_profile_add_background': EventType._team_profile_add_background_validator, 'team_profile_add_logo': EventType._team_profile_add_logo_validator, + 'team_profile_change_background': EventType._team_profile_change_background_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_background': EventType._team_profile_remove_background_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, @@ -101921,6 +103059,7 @@ def __repr__(self): EventType.other = EventType('other') +EventTypeArg._admin_alerting_changed_alert_config_validator = bv.Void() EventTypeArg._app_link_team_validator = bv.Void() EventTypeArg._app_link_user_validator = bv.Void() EventTypeArg._app_unlink_team_validator = bv.Void() @@ -102040,6 +103179,7 @@ def __repr__(self): EventTypeArg._member_change_external_id_validator = bv.Void() EventTypeArg._member_change_membership_type_validator = bv.Void() EventTypeArg._member_change_name_validator = bv.Void() +EventTypeArg._member_change_reseller_role_validator = bv.Void() EventTypeArg._member_change_status_validator = bv.Void() EventTypeArg._member_delete_manual_contacts_validator = bv.Void() EventTypeArg._member_delete_profile_photo_validator = bv.Void() @@ -102326,10 +103466,13 @@ def __repr__(self): EventTypeArg._web_sessions_change_idle_length_policy_validator = bv.Void() EventTypeArg._team_merge_from_validator = bv.Void() EventTypeArg._team_merge_to_validator = bv.Void() +EventTypeArg._team_profile_add_background_validator = bv.Void() EventTypeArg._team_profile_add_logo_validator = bv.Void() +EventTypeArg._team_profile_change_background_validator = bv.Void() EventTypeArg._team_profile_change_default_language_validator = bv.Void() EventTypeArg._team_profile_change_logo_validator = bv.Void() EventTypeArg._team_profile_change_name_validator = bv.Void() +EventTypeArg._team_profile_remove_background_validator = bv.Void() EventTypeArg._team_profile_remove_logo_validator = bv.Void() EventTypeArg._tfa_add_backup_phone_validator = bv.Void() EventTypeArg._tfa_add_security_key_validator = bv.Void() @@ -102365,6 +103508,7 @@ def __repr__(self): EventTypeArg._team_merge_request_sent_shown_to_secondary_team_validator = bv.Void() EventTypeArg._other_validator = bv.Void() EventTypeArg._tagmap = { + 'admin_alerting_changed_alert_config': EventTypeArg._admin_alerting_changed_alert_config_validator, 'app_link_team': EventTypeArg._app_link_team_validator, 'app_link_user': EventTypeArg._app_link_user_validator, 'app_unlink_team': EventTypeArg._app_unlink_team_validator, @@ -102484,6 +103628,7 @@ def __repr__(self): 'member_change_external_id': EventTypeArg._member_change_external_id_validator, 'member_change_membership_type': EventTypeArg._member_change_membership_type_validator, 'member_change_name': EventTypeArg._member_change_name_validator, + 'member_change_reseller_role': EventTypeArg._member_change_reseller_role_validator, 'member_change_status': EventTypeArg._member_change_status_validator, 'member_delete_manual_contacts': EventTypeArg._member_delete_manual_contacts_validator, 'member_delete_profile_photo': EventTypeArg._member_delete_profile_photo_validator, @@ -102770,10 +103915,13 @@ def __repr__(self): 'web_sessions_change_idle_length_policy': EventTypeArg._web_sessions_change_idle_length_policy_validator, 'team_merge_from': EventTypeArg._team_merge_from_validator, 'team_merge_to': EventTypeArg._team_merge_to_validator, + 'team_profile_add_background': EventTypeArg._team_profile_add_background_validator, 'team_profile_add_logo': EventTypeArg._team_profile_add_logo_validator, + 'team_profile_change_background': EventTypeArg._team_profile_change_background_validator, 'team_profile_change_default_language': EventTypeArg._team_profile_change_default_language_validator, 'team_profile_change_logo': EventTypeArg._team_profile_change_logo_validator, 'team_profile_change_name': EventTypeArg._team_profile_change_name_validator, + 'team_profile_remove_background': EventTypeArg._team_profile_remove_background_validator, 'team_profile_remove_logo': EventTypeArg._team_profile_remove_logo_validator, 'tfa_add_backup_phone': EventTypeArg._tfa_add_backup_phone_validator, 'tfa_add_security_key': EventTypeArg._tfa_add_security_key_validator, @@ -102810,6 +103958,7 @@ def __repr__(self): 'other': EventTypeArg._other_validator, } +EventTypeArg.admin_alerting_changed_alert_config = EventTypeArg('admin_alerting_changed_alert_config') EventTypeArg.app_link_team = EventTypeArg('app_link_team') EventTypeArg.app_link_user = EventTypeArg('app_link_user') EventTypeArg.app_unlink_team = EventTypeArg('app_unlink_team') @@ -102929,6 +104078,7 @@ def __repr__(self): EventTypeArg.member_change_external_id = EventTypeArg('member_change_external_id') EventTypeArg.member_change_membership_type = EventTypeArg('member_change_membership_type') EventTypeArg.member_change_name = EventTypeArg('member_change_name') +EventTypeArg.member_change_reseller_role = EventTypeArg('member_change_reseller_role') EventTypeArg.member_change_status = EventTypeArg('member_change_status') EventTypeArg.member_delete_manual_contacts = EventTypeArg('member_delete_manual_contacts') EventTypeArg.member_delete_profile_photo = EventTypeArg('member_delete_profile_photo') @@ -103215,10 +104365,13 @@ def __repr__(self): EventTypeArg.web_sessions_change_idle_length_policy = EventTypeArg('web_sessions_change_idle_length_policy') EventTypeArg.team_merge_from = EventTypeArg('team_merge_from') EventTypeArg.team_merge_to = EventTypeArg('team_merge_to') +EventTypeArg.team_profile_add_background = EventTypeArg('team_profile_add_background') EventTypeArg.team_profile_add_logo = EventTypeArg('team_profile_add_logo') +EventTypeArg.team_profile_change_background = EventTypeArg('team_profile_change_background') EventTypeArg.team_profile_change_default_language = EventTypeArg('team_profile_change_default_language') EventTypeArg.team_profile_change_logo = EventTypeArg('team_profile_change_logo') EventTypeArg.team_profile_change_name = EventTypeArg('team_profile_change_name') +EventTypeArg.team_profile_remove_background = EventTypeArg('team_profile_remove_background') EventTypeArg.team_profile_remove_logo = EventTypeArg('team_profile_remove_logo') EventTypeArg.tfa_add_backup_phone = EventTypeArg('tfa_add_backup_phone') EventTypeArg.tfa_add_security_key = EventTypeArg('tfa_add_security_key') @@ -104163,17 +105316,20 @@ def __repr__(self): GovernancePolicyRemoveFoldersDetails._name_validator = bv.String() GovernancePolicyRemoveFoldersDetails._policy_type_validator = bv.Nullable(PolicyType_validator) GovernancePolicyRemoveFoldersDetails._folders_validator = bv.Nullable(bv.List(bv.String())) +GovernancePolicyRemoveFoldersDetails._reason_validator = bv.Nullable(bv.String()) GovernancePolicyRemoveFoldersDetails._all_field_names_ = set([ 'governance_policy_id', 'name', 'policy_type', 'folders', + 'reason', ]) GovernancePolicyRemoveFoldersDetails._all_fields_ = [ ('governance_policy_id', GovernancePolicyRemoveFoldersDetails._governance_policy_id_validator), ('name', GovernancePolicyRemoveFoldersDetails._name_validator), ('policy_type', GovernancePolicyRemoveFoldersDetails._policy_type_validator), ('folders', GovernancePolicyRemoveFoldersDetails._folders_validator), + ('reason', GovernancePolicyRemoveFoldersDetails._reason_validator), ] GovernancePolicyRemoveFoldersType._description_validator = bv.String() @@ -104949,6 +106105,21 @@ def __repr__(self): MemberChangeNameType._all_field_names_ = set(['description']) MemberChangeNameType._all_fields_ = [('description', MemberChangeNameType._description_validator)] +MemberChangeResellerRoleDetails._new_value_validator = ResellerRole_validator +MemberChangeResellerRoleDetails._previous_value_validator = ResellerRole_validator +MemberChangeResellerRoleDetails._all_field_names_ = set([ + 'new_value', + 'previous_value', +]) +MemberChangeResellerRoleDetails._all_fields_ = [ + ('new_value', MemberChangeResellerRoleDetails._new_value_validator), + ('previous_value', MemberChangeResellerRoleDetails._previous_value_validator), +] + +MemberChangeResellerRoleType._description_validator = bv.String() +MemberChangeResellerRoleType._all_field_names_ = set(['description']) +MemberChangeResellerRoleType._all_fields_ = [('description', MemberChangeResellerRoleType._description_validator)] + MemberChangeStatusDetails._previous_value_validator = bv.Nullable(MemberStatus_validator) MemberChangeStatusDetails._new_value_validator = MemberStatus_validator MemberChangeStatusDetails._action_validator = bv.Nullable(ActionDetails_validator) @@ -106408,6 +107579,19 @@ def __repr__(self): ('reseller_email', ResellerLogInfo._reseller_email_validator), ] +ResellerRole._not_reseller_validator = bv.Void() +ResellerRole._reseller_admin_validator = bv.Void() +ResellerRole._other_validator = bv.Void() +ResellerRole._tagmap = { + 'not_reseller': ResellerRole._not_reseller_validator, + 'reseller_admin': ResellerRole._reseller_admin_validator, + 'other': ResellerRole._other_validator, +} + +ResellerRole.not_reseller = ResellerRole('not_reseller') +ResellerRole.reseller_admin = ResellerRole('reseller_admin') +ResellerRole.other = ResellerRole('other') + ResellerSupportChangePolicyDetails._new_value_validator = ResellerSupportPolicy_validator ResellerSupportChangePolicyDetails._previous_value_validator = ResellerSupportPolicy_validator ResellerSupportChangePolicyDetails._all_field_names_ = set([ @@ -108724,6 +109908,13 @@ def __repr__(self): ('team_legal_name', TeamName._team_legal_name_validator), ] +TeamProfileAddBackgroundDetails._all_field_names_ = set([]) +TeamProfileAddBackgroundDetails._all_fields_ = [] + +TeamProfileAddBackgroundType._description_validator = bv.String() +TeamProfileAddBackgroundType._all_field_names_ = set(['description']) +TeamProfileAddBackgroundType._all_fields_ = [('description', TeamProfileAddBackgroundType._description_validator)] + TeamProfileAddLogoDetails._all_field_names_ = set([]) TeamProfileAddLogoDetails._all_fields_ = [] @@ -108731,6 +109922,13 @@ def __repr__(self): TeamProfileAddLogoType._all_field_names_ = set(['description']) TeamProfileAddLogoType._all_fields_ = [('description', TeamProfileAddLogoType._description_validator)] +TeamProfileChangeBackgroundDetails._all_field_names_ = set([]) +TeamProfileChangeBackgroundDetails._all_fields_ = [] + +TeamProfileChangeBackgroundType._description_validator = bv.String() +TeamProfileChangeBackgroundType._all_field_names_ = set(['description']) +TeamProfileChangeBackgroundType._all_fields_ = [('description', TeamProfileChangeBackgroundType._description_validator)] + TeamProfileChangeDefaultLanguageDetails._new_value_validator = common.LanguageCode_validator TeamProfileChangeDefaultLanguageDetails._previous_value_validator = common.LanguageCode_validator TeamProfileChangeDefaultLanguageDetails._all_field_names_ = set([ @@ -108768,6 +109966,13 @@ def __repr__(self): TeamProfileChangeNameType._all_field_names_ = set(['description']) TeamProfileChangeNameType._all_fields_ = [('description', TeamProfileChangeNameType._description_validator)] +TeamProfileRemoveBackgroundDetails._all_field_names_ = set([]) +TeamProfileRemoveBackgroundDetails._all_fields_ = [] + +TeamProfileRemoveBackgroundType._description_validator = bv.String() +TeamProfileRemoveBackgroundType._all_field_names_ = set(['description']) +TeamProfileRemoveBackgroundType._all_fields_ = [('description', TeamProfileRemoveBackgroundType._description_validator)] + TeamProfileRemoveLogoDetails._all_field_names_ = set([]) TeamProfileRemoveLogoDetails._all_fields_ = [] diff --git a/spec b/spec index a3171e4f..ed6e389b 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit a3171e4f2732b2d9179325eea9c1471f9e7632c3 +Subproject commit ed6e389b2d16d19b21e68413ae8f4743dd9b9223 From 86e77a8a848e18c581c84811ee1443547d6c3bf5 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Thu, 12 Nov 2020 16:00:53 -0800 Subject: [PATCH 04/90] Automated Spec Update (#288) f16378220aab09f7412206785b6bae0ab119a7c9 Change Notes: Common Namespace - DisplayName validation pattern is updated team_log_generated Namespace - Add ClassificationCreateReportDetails struct - Add ClassificationCreateReportFailDetails struct - Update EventDetails union to include ClassificationCreateReportDetails and ClassificationCreateReportFailDetails - Add ClassificationCreateReportType struct - Add ClassificationCreateReportFailType struct - Update EventType union to include ClassificationCreateReportType and ClassificationCreateReportFailType - Update EventTypeArg union to include classification_create_report and classification_create_report_fail Co-authored-by: DropboxBot --- dropbox/common.py | 2 +- dropbox/team_log.py | 348 ++++++++++++++++++++++++++++++++++++++++++++ spec | 2 +- 3 files changed, 350 insertions(+), 2 deletions(-) diff --git a/dropbox/common.py b/dropbox/common.py index dc31b9e0..922f29f4 100644 --- a/dropbox/common.py +++ b/dropbox/common.py @@ -382,7 +382,7 @@ def __repr__(self): UserRootInfo_validator = bv.Struct(UserRootInfo) Date_validator = bv.Timestamp(u'%Y-%m-%d') -DisplayName_validator = bv.String(min_length=1, pattern=u'[^/:?*<>"|]*') +DisplayName_validator = bv.String(pattern=u'[^/:?*<>"|]*') DisplayNameLegacy_validator = bv.String() 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}$") diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 14848d66..d8562615 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -5176,6 +5176,176 @@ def __repr__(self): ClassificationChangePolicyType_validator = bv.Struct(ClassificationChangePolicyType) +class ClassificationCreateReportDetails(bb.Struct): + """ + Created Classification report. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ClassificationCreateReportDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'ClassificationCreateReportDetails()' + +ClassificationCreateReportDetails_validator = bv.Struct(ClassificationCreateReportDetails) + +class ClassificationCreateReportFailDetails(bb.Struct): + """ + Couldn't create Classification report. + + :ivar team_log.ClassificationCreateReportFailDetails.failure_reason: Failure + reason. + """ + + __slots__ = [ + '_failure_reason_value', + '_failure_reason_present', + ] + + _has_required_fields = True + + def __init__(self, + failure_reason=None): + self._failure_reason_value = None + self._failure_reason_present = False + if failure_reason is not None: + self.failure_reason = failure_reason + + @property + def failure_reason(self): + """ + Failure reason. + + :rtype: team.TeamReportFailureReason + """ + if self._failure_reason_present: + return self._failure_reason_value + else: + raise AttributeError("missing required field 'failure_reason'") + + @failure_reason.setter + def failure_reason(self, val): + self._failure_reason_validator.validate_type_only(val) + self._failure_reason_value = val + self._failure_reason_present = True + + @failure_reason.deleter + def failure_reason(self): + self._failure_reason_value = None + self._failure_reason_present = False + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ClassificationCreateReportFailDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'ClassificationCreateReportFailDetails(failure_reason={!r})'.format( + self._failure_reason_value, + ) + +ClassificationCreateReportFailDetails_validator = bv.Struct(ClassificationCreateReportFailDetails) + +class ClassificationCreateReportFailType(bb.Struct): + + __slots__ = [ + '_description_value', + '_description_present', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = None + self._description_present = False + if description is not None: + self.description = description + + @property + def description(self): + """ + :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 + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ClassificationCreateReportFailType, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'ClassificationCreateReportFailType(description={!r})'.format( + self._description_value, + ) + +ClassificationCreateReportFailType_validator = bv.Struct(ClassificationCreateReportFailType) + +class ClassificationCreateReportType(bb.Struct): + + __slots__ = [ + '_description_value', + '_description_present', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = None + self._description_present = False + if description is not None: + self.description = description + + @property + def description(self): + """ + :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 + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ClassificationCreateReportType, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'ClassificationCreateReportType(description={!r})'.format( + self._description_value, + ) + +ClassificationCreateReportType_validator = bv.Struct(ClassificationCreateReportType) + class ClassificationPolicyEnumWrapper(bb.Union): """ Policy for controlling team access to the classification feature @@ -14034,6 +14204,28 @@ def password_reset_all_details(cls, val): """ return cls('password_reset_all_details', val) + @classmethod + def classification_create_report_details(cls, val): + """ + Create an instance of this class set to the + ``classification_create_report_details`` tag with value ``val``. + + :param ClassificationCreateReportDetails val: + :rtype: EventDetails + """ + return cls('classification_create_report_details', val) + + @classmethod + def classification_create_report_fail_details(cls, val): + """ + Create an instance of this class set to the + ``classification_create_report_fail_details`` tag with value ``val``. + + :param ClassificationCreateReportFailDetails val: + :rtype: EventDetails + """ + return cls('classification_create_report_fail_details', val) + @classmethod def emm_create_exceptions_report_details(cls, val): """ @@ -18436,6 +18628,22 @@ def is_password_reset_all_details(self): """ return self._tag == 'password_reset_all_details' + def is_classification_create_report_details(self): + """ + Check if the union tag is ``classification_create_report_details``. + + :rtype: bool + """ + return self._tag == 'classification_create_report_details' + + def is_classification_create_report_fail_details(self): + """ + Check if the union tag is ``classification_create_report_fail_details``. + + :rtype: bool + """ + return self._tag == 'classification_create_report_fail_details' + def is_emm_create_exceptions_report_details(self): """ Check if the union tag is ``emm_create_exceptions_report_details``. @@ -22406,6 +22614,26 @@ def get_password_reset_all_details(self): raise AttributeError("tag 'password_reset_all_details' not set") return self._value + def get_classification_create_report_details(self): + """ + Only call this if :meth:`is_classification_create_report_details` is true. + + :rtype: ClassificationCreateReportDetails + """ + if not self.is_classification_create_report_details(): + raise AttributeError("tag 'classification_create_report_details' not set") + return self._value + + def get_classification_create_report_fail_details(self): + """ + Only call this if :meth:`is_classification_create_report_fail_details` is true. + + :rtype: ClassificationCreateReportFailDetails + """ + if not self.is_classification_create_report_fail_details(): + raise AttributeError("tag 'classification_create_report_fail_details' not set") + return self._value + def get_emm_create_exceptions_report_details(self): """ Only call this if :meth:`is_emm_create_exceptions_report_details` is true. @@ -25432,6 +25660,11 @@ class EventType(bb.Union): :ivar PasswordResetType EventType.password_reset: (passwords) Reset password :ivar PasswordResetAllType EventType.password_reset_all: (passwords) Reset all team member passwords + :ivar ClassificationCreateReportType EventType.classification_create_report: + (reports) Created Classification report + :ivar ClassificationCreateReportFailType + EventType.classification_create_report_fail: (reports) Couldn't create + Classification report :ivar EmmCreateExceptionsReportType EventType.emm_create_exceptions_report: (reports) Created EMM-excluded users report :ivar EmmCreateUsageReportType EventType.emm_create_usage_report: (reports) @@ -28182,6 +28415,28 @@ def password_reset_all(cls, val): """ return cls('password_reset_all', val) + @classmethod + def classification_create_report(cls, val): + """ + Create an instance of this class set to the + ``classification_create_report`` tag with value ``val``. + + :param ClassificationCreateReportType val: + :rtype: EventType + """ + return cls('classification_create_report', val) + + @classmethod + def classification_create_report_fail(cls, val): + """ + Create an instance of this class set to the + ``classification_create_report_fail`` tag with value ``val``. + + :param ClassificationCreateReportFailType val: + :rtype: EventType + """ + return cls('classification_create_report_fail', val) + @classmethod def emm_create_exceptions_report(cls, val): """ @@ -32546,6 +32801,22 @@ def is_password_reset_all(self): """ return self._tag == 'password_reset_all' + def is_classification_create_report(self): + """ + Check if the union tag is ``classification_create_report``. + + :rtype: bool + """ + return self._tag == 'classification_create_report' + + def is_classification_create_report_fail(self): + """ + Check if the union tag is ``classification_create_report_fail``. + + :rtype: bool + """ + return self._tag == 'classification_create_report_fail' + def is_emm_create_exceptions_report(self): """ Check if the union tag is ``emm_create_exceptions_report``. @@ -36903,6 +37174,30 @@ def get_password_reset_all(self): raise AttributeError("tag 'password_reset_all' not set") return self._value + def get_classification_create_report(self): + """ + (reports) Created Classification report + + Only call this if :meth:`is_classification_create_report` is true. + + :rtype: ClassificationCreateReportType + """ + if not self.is_classification_create_report(): + raise AttributeError("tag 'classification_create_report' not set") + return self._value + + def get_classification_create_report_fail(self): + """ + (reports) Couldn't create Classification report + + Only call this if :meth:`is_classification_create_report_fail` is true. + + :rtype: ClassificationCreateReportFailType + """ + if not self.is_classification_create_report_fail(): + raise AttributeError("tag 'classification_create_report_fail' not set") + return self._value + def get_emm_create_exceptions_report(self): """ (reports) Created EMM-excluded users report @@ -40441,6 +40736,10 @@ class EventTypeArg(bb.Union): :ivar team_log.EventTypeArg.password_reset: (passwords) Reset password :ivar team_log.EventTypeArg.password_reset_all: (passwords) Reset all team member passwords + :ivar team_log.EventTypeArg.classification_create_report: (reports) Created + Classification report + :ivar team_log.EventTypeArg.classification_create_report_fail: (reports) + Couldn't create Classification report :ivar team_log.EventTypeArg.emm_create_exceptions_report: (reports) Created EMM-excluded users report :ivar team_log.EventTypeArg.emm_create_usage_report: (reports) Created EMM @@ -41383,6 +41682,10 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition password_reset_all = None # Attribute is overwritten below the class definition + classification_create_report = None + # Attribute is overwritten below the class definition + classification_create_report_fail = 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 @@ -43413,6 +43716,22 @@ def is_password_reset_all(self): """ return self._tag == 'password_reset_all' + def is_classification_create_report(self): + """ + Check if the union tag is ``classification_create_report``. + + :rtype: bool + """ + return self._tag == 'classification_create_report' + + def is_classification_create_report_fail(self): + """ + Check if the union tag is ``classification_create_report_fail``. + + :rtype: bool + """ + return self._tag == 'classification_create_report_fail' + def is_emm_create_exceptions_report(self): """ Check if the union tag is ``emm_create_exceptions_report``. @@ -100436,6 +100755,21 @@ def __repr__(self): ClassificationChangePolicyType._all_field_names_ = set(['description']) ClassificationChangePolicyType._all_fields_ = [('description', ClassificationChangePolicyType._description_validator)] +ClassificationCreateReportDetails._all_field_names_ = set([]) +ClassificationCreateReportDetails._all_fields_ = [] + +ClassificationCreateReportFailDetails._failure_reason_validator = team.TeamReportFailureReason_validator +ClassificationCreateReportFailDetails._all_field_names_ = set(['failure_reason']) +ClassificationCreateReportFailDetails._all_fields_ = [('failure_reason', ClassificationCreateReportFailDetails._failure_reason_validator)] + +ClassificationCreateReportFailType._description_validator = bv.String() +ClassificationCreateReportFailType._all_field_names_ = set(['description']) +ClassificationCreateReportFailType._all_fields_ = [('description', ClassificationCreateReportFailType._description_validator)] + +ClassificationCreateReportType._description_validator = bv.String() +ClassificationCreateReportType._all_field_names_ = set(['description']) +ClassificationCreateReportType._all_fields_ = [('description', ClassificationCreateReportType._description_validator)] + ClassificationPolicyEnumWrapper._disabled_validator = bv.Void() ClassificationPolicyEnumWrapper._enabled_validator = bv.Void() ClassificationPolicyEnumWrapper._other_validator = bv.Void() @@ -101444,6 +101778,8 @@ def __repr__(self): EventDetails._password_change_details_validator = PasswordChangeDetails_validator EventDetails._password_reset_details_validator = PasswordResetDetails_validator EventDetails._password_reset_all_details_validator = PasswordResetAllDetails_validator +EventDetails._classification_create_report_details_validator = ClassificationCreateReportDetails_validator +EventDetails._classification_create_report_fail_details_validator = ClassificationCreateReportFailDetails_validator EventDetails._emm_create_exceptions_report_details_validator = EmmCreateExceptionsReportDetails_validator EventDetails._emm_create_usage_report_details_validator = EmmCreateUsageReportDetails_validator EventDetails._export_members_report_details_validator = ExportMembersReportDetails_validator @@ -101894,6 +102230,8 @@ def __repr__(self): '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, + 'classification_create_report_details': EventDetails._classification_create_report_details_validator, + 'classification_create_report_fail_details': EventDetails._classification_create_report_fail_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, 'export_members_report_details': EventDetails._export_members_report_details_validator, @@ -102347,6 +102685,8 @@ def __repr__(self): EventType._password_change_validator = PasswordChangeType_validator EventType._password_reset_validator = PasswordResetType_validator EventType._password_reset_all_validator = PasswordResetAllType_validator +EventType._classification_create_report_validator = ClassificationCreateReportType_validator +EventType._classification_create_report_fail_validator = ClassificationCreateReportFailType_validator EventType._emm_create_exceptions_report_validator = EmmCreateExceptionsReportType_validator EventType._emm_create_usage_report_validator = EmmCreateUsageReportType_validator EventType._export_members_report_validator = ExportMembersReportType_validator @@ -102796,6 +103136,8 @@ def __repr__(self): 'password_change': EventType._password_change_validator, 'password_reset': EventType._password_reset_validator, 'password_reset_all': EventType._password_reset_all_validator, + 'classification_create_report': EventType._classification_create_report_validator, + 'classification_create_report_fail': EventType._classification_create_report_fail_validator, 'emm_create_exceptions_report': EventType._emm_create_exceptions_report_validator, 'emm_create_usage_report': EventType._emm_create_usage_report_validator, 'export_members_report': EventType._export_members_report_validator, @@ -103248,6 +103590,8 @@ def __repr__(self): EventTypeArg._password_change_validator = bv.Void() EventTypeArg._password_reset_validator = bv.Void() EventTypeArg._password_reset_all_validator = bv.Void() +EventTypeArg._classification_create_report_validator = bv.Void() +EventTypeArg._classification_create_report_fail_validator = bv.Void() EventTypeArg._emm_create_exceptions_report_validator = bv.Void() EventTypeArg._emm_create_usage_report_validator = bv.Void() EventTypeArg._export_members_report_validator = bv.Void() @@ -103697,6 +104041,8 @@ def __repr__(self): 'password_change': EventTypeArg._password_change_validator, 'password_reset': EventTypeArg._password_reset_validator, 'password_reset_all': EventTypeArg._password_reset_all_validator, + 'classification_create_report': EventTypeArg._classification_create_report_validator, + 'classification_create_report_fail': EventTypeArg._classification_create_report_fail_validator, 'emm_create_exceptions_report': EventTypeArg._emm_create_exceptions_report_validator, 'emm_create_usage_report': EventTypeArg._emm_create_usage_report_validator, 'export_members_report': EventTypeArg._export_members_report_validator, @@ -104147,6 +104493,8 @@ def __repr__(self): EventTypeArg.password_change = EventTypeArg('password_change') EventTypeArg.password_reset = EventTypeArg('password_reset') EventTypeArg.password_reset_all = EventTypeArg('password_reset_all') +EventTypeArg.classification_create_report = EventTypeArg('classification_create_report') +EventTypeArg.classification_create_report_fail = EventTypeArg('classification_create_report_fail') EventTypeArg.emm_create_exceptions_report = EventTypeArg('emm_create_exceptions_report') EventTypeArg.emm_create_usage_report = EventTypeArg('emm_create_usage_report') EventTypeArg.export_members_report = EventTypeArg('export_members_report') diff --git a/spec b/spec index ed6e389b..f1637822 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit ed6e389b2d16d19b21e68413ae8f4743dd9b9223 +Subproject commit f16378220aab09f7412206785b6bae0ab119a7c9 From ddad5dc66019fbc77a4f9fac01344652a178d8fc Mon Sep 17 00:00:00 2001 From: yuxiang-he Date: Tue, 17 Nov 2020 12:14:37 -0800 Subject: [PATCH 05/90] remove auto generated stone_fixtures.py (#292) --- dropbox/stone_fixtures.py | 139 -------------------------------------- 1 file changed, 139 deletions(-) delete mode 100644 dropbox/stone_fixtures.py diff --git a/dropbox/stone_fixtures.py b/dropbox/stone_fixtures.py deleted file mode 100644 index 9252e67d..00000000 --- a/dropbox/stone_fixtures.py +++ /dev/null @@ -1,139 +0,0 @@ -# -*- coding: utf-8 -*- -# Auto-generated by Stone, do not modify. -# @generated -# flake8: noqa -# pylint: skip-file -try: - from . import stone_validators as bv - from . import stone_base as bb -except (ImportError, 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 EmptyContainer(bb.Struct): - """ - This struct left intentionally empty - """ - - __slots__ = [ - ] - - _has_required_fields = False - - def __init__(self): - pass - - def _process_custom_annotations(self, annotation_type, field_path, processor): - super(EmptyContainer, self)._process_custom_annotations(annotation_type, field_path, processor) - - def __repr__(self): - return 'EmptyContainer()' - -EmptyContainer_validator = bv.Struct(EmptyContainer) - -class MixedInternalOnlyContainer(bb.Struct): - - __slots__ = [ - '_public_value_value', - '_public_value_present', - ] - - _has_required_fields = False - - def __init__(self, - public_value=None): - self._public_value_value = None - self._public_value_present = False - if public_value is not None: - self.public_value = public_value - - @property - def public_value(self): - """ - :rtype: int - """ - if self._public_value_present: - return self._public_value_value - else: - return 0 - - @public_value.setter - def public_value(self, val): - val = self._public_value_validator.validate(val) - self._public_value_value = val - self._public_value_present = True - - @public_value.deleter - def public_value(self): - self._public_value_value = None - self._public_value_present = False - - def _process_custom_annotations(self, annotation_type, field_path, processor): - super(MixedInternalOnlyContainer, self)._process_custom_annotations(annotation_type, field_path, processor) - - def __repr__(self): - return 'MixedInternalOnlyContainer(public_value={!r})'.format( - self._public_value_value, - ) - -MixedInternalOnlyContainer_validator = bv.Struct(MixedInternalOnlyContainer) - -class MixedInternalOnlyEnum(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 - other = None - - def is_public(self): - """ - Check if the union tag is ``public``. - - :rtype: bool - """ - return self._tag == 'public' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def _process_custom_annotations(self, annotation_type, field_path, processor): - super(MixedInternalOnlyEnum, self)._process_custom_annotations(annotation_type, field_path, processor) - - def __repr__(self): - return 'MixedInternalOnlyEnum(%r, %r)' % (self._tag, self._value) - -MixedInternalOnlyEnum_validator = bv.Union(MixedInternalOnlyEnum) - -EmptyContainer._all_field_names_ = set([]) -EmptyContainer._all_fields_ = [] - -MixedInternalOnlyContainer._public_value_validator = bv.Int32() -MixedInternalOnlyContainer._all_field_names_ = set(['public_value']) -MixedInternalOnlyContainer._all_fields_ = [('public_value', MixedInternalOnlyContainer._public_value_validator)] - -MixedInternalOnlyEnum._public_validator = bv.Void() -MixedInternalOnlyEnum._other_validator = bv.Void() -MixedInternalOnlyEnum._tagmap = { - 'public': MixedInternalOnlyEnum._public_validator, - 'other': MixedInternalOnlyEnum._other_validator, -} - -MixedInternalOnlyEnum.public = MixedInternalOnlyEnum('public') -MixedInternalOnlyEnum.other = MixedInternalOnlyEnum('other') - -ROUTES = { -} - From 50f1d999bcbb3fa2dfcea3b056551acafa3b0318 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Nov 2020 12:59:26 -0800 Subject: [PATCH 06/90] Bump codecov/codecov-action from v1.0.14 to v1.0.15 (#290) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.14 to v1.0.15. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Commits](https://github.com/codecov/codecov-action/compare/v1.0.14...239febf655bba88b16ff5dea1d3135ea8663a1f9) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Karandeep Johar --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 8275b3a2..9c3dc4e8 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -28,7 +28,7 @@ jobs: coverage run --rcfile=.coveragerc -m pytest test/test_dropbox_unit.py coverage xml - name: Publish Coverage - uses: codecov/codecov-action@v1.0.14 + uses: codecov/codecov-action@v1.0.15 with: flags: unit fail_ci_if_error: true \ No newline at end of file From 0f1ad586ea513a106768a430c667dfc814e71e10 Mon Sep 17 00:00:00 2001 From: yuxiang-he Date: Wed, 18 Nov 2020 11:56:05 -0800 Subject: [PATCH 07/90] Regenerate client using Stone 3.2.0 (#291) * update version requirement for Stone and regenerate client files * add UPGRADING.md --- UPGRADING.md | 13 + dropbox/__init__.py | 8 +- dropbox/account.py | 91 +- dropbox/async_.py | 64 +- dropbox/auth.py | 245 +- dropbox/base.py | 479 +- dropbox/base_team.py | 282 +- dropbox/check.py | 87 +- dropbox/common.py | 134 +- dropbox/contacts.py | 60 +- dropbox/{dropbox.py => dropbox_client.py} | 17 +- dropbox/file_properties.py | 1648 +- dropbox/file_requests.py | 1282 +- dropbox/files.py | 8643 +--- dropbox/paper.py | 2382 +- dropbox/secondary_emails.py | 89 +- dropbox/seen_state.py | 14 +- dropbox/sharing.py | 9259 +--- dropbox/stone_base.py | 177 +- dropbox/stone_serializers.py | 1077 +- dropbox/stone_validators.py | 670 +- dropbox/team.py | 11972 +---- dropbox/team_common.py | 279 +- dropbox/team_log.py | 45673 +++----------------- dropbox/team_policies.py | 331 +- dropbox/users.py | 1372 +- dropbox/users_common.py | 14 +- generate_base_client.py | 2 +- requirements.txt | 2 +- setup.py | 2 +- test/requirements.txt | 1 + test/test_dropbox_unit.py | 2 +- tox.ini | 4 + 33 files changed, 12297 insertions(+), 74078 deletions(-) create mode 100644 UPGRADING.md rename dropbox/{dropbox.py => dropbox_client.py} (98%) diff --git a/UPGRADING.md b/UPGRADING.md new file mode 100644 index 00000000..cbae53c4 --- /dev/null +++ b/UPGRADING.md @@ -0,0 +1,13 @@ +# Upgrading the Dropbox SDK + +This document is designed to show you how to upgrade to the latest version of the SDK accomodating any breaking changes introduced by major version updates. +If you find any issues with either this guide on upgrading or the changes introduced in the new version, please see [CONTRIBUTING.md](CONTRIBUTING.md) + +# Upgrading from v10.X.X to v11.0.0 +The major change that happened in this new version is that we regenerated the client files using Stone 3.2.0, +so relative imports are removed from the generated client files. +This created some issues with the imports in the non-generated files in `dropbox/`. +As a result, we renamed `dropbox.dropbox` to +`dropbox.dropbox_client`. If you used to do imports like `dropbox.dropbox.foo`, such imports need to be changed to `dropbox.dropbox_client.foo`. +However, we preserved the imports in `dropbox/__init__.py`, so imports like `from dropbox import DropboxOAuth2FlowNoRedirect`, +`from dropbox import Dropbox` will continue to work. diff --git a/dropbox/__init__.py b/dropbox/__init__.py index c830bc35..13686aec 100644 --- a/dropbox/__init__.py +++ b/dropbox/__init__.py @@ -1,4 +1,8 @@ from __future__ import absolute_import -from .dropbox import __version__, Dropbox, DropboxTeam, create_session # noqa: F401 -from .oauth import DropboxOAuth2Flow, DropboxOAuth2FlowNoRedirect # noqa: F401 +from dropbox.dropbox_client import ( # noqa: F401 # pylint: disable=unused-import + __version__, Dropbox, DropboxTeam, create_session +) +from dropbox.oauth import ( # noqa: F401 # pylint: disable=unused-import + DropboxOAuth2Flow, DropboxOAuth2FlowNoRedirect +) diff --git a/dropbox/account.py b/dropbox/account.py index 83aa7ae3..c37dc0e9 100644 --- a/dropbox/account.py +++ b/dropbox/account.py @@ -3,14 +3,9 @@ # @generated # flake8: noqa # pylint: skip-file -try: - from . import stone_validators as bv - from . import stone_base as bb -except (ImportError, 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 +from __future__ import unicode_literals +from stone.backends.python_rsrc import stone_base as bb +from stone.backends.python_rsrc import stone_validators as bv class PhotoSourceArg(bb.Union): """ @@ -68,9 +63,6 @@ def get_base64_data(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PhotoSourceArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PhotoSourceArg(%r, %r)' % (self._tag, self._value) - PhotoSourceArg_validator = bv.Union(PhotoSourceArg) class SetProfilePhotoArg(bb.Struct): @@ -81,49 +73,22 @@ class SetProfilePhotoArg(bb.Struct): __slots__ = [ '_photo_value', - '_photo_present', ] _has_required_fields = True def __init__(self, photo=None): - self._photo_value = None - self._photo_present = False + self._photo_value = bb.NOT_SET if photo is not None: self.photo = photo - @property - def photo(self): - """ - Image to set as the user's new profile photo. - - :rtype: PhotoSourceArg - """ - if self._photo_present: - return self._photo_value - else: - raise AttributeError("missing required field 'photo'") - - @photo.setter - def photo(self, val): - self._photo_validator.validate_type_only(val) - self._photo_value = val - self._photo_present = True - - @photo.deleter - def photo(self): - self._photo_value = None - self._photo_present = False + # Instance attribute type: PhotoSourceArg (validator is set below) + photo = bb.Attribute("photo", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SetProfilePhotoArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SetProfilePhotoArg(photo={!r})'.format( - self._photo_value, - ) - SetProfilePhotoArg_validator = bv.Struct(SetProfilePhotoArg) class SetProfilePhotoError(bb.Union): @@ -209,9 +174,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SetProfilePhotoError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SetProfilePhotoError(%r, %r)' % (self._tag, self._value) - SetProfilePhotoError_validator = bv.Union(SetProfilePhotoError) class SetProfilePhotoResult(bb.Struct): @@ -222,49 +184,22 @@ class SetProfilePhotoResult(bb.Struct): __slots__ = [ '_profile_photo_url_value', - '_profile_photo_url_present', ] _has_required_fields = True def __init__(self, profile_photo_url=None): - self._profile_photo_url_value = None - self._profile_photo_url_present = False + self._profile_photo_url_value = bb.NOT_SET if profile_photo_url is not None: self.profile_photo_url = profile_photo_url - @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: - raise AttributeError("missing required field 'profile_photo_url'") - - @profile_photo_url.setter - def profile_photo_url(self, val): - 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 + # Instance attribute type: str (validator is set below) + profile_photo_url = bb.Attribute("profile_photo_url") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SetProfilePhotoResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SetProfilePhotoResult(profile_photo_url={!r})'.format( - self._profile_photo_url_value, - ) - SetProfilePhotoResult_validator = bv.Struct(SetProfilePhotoResult) PhotoSourceArg._base64_data_validator = bv.String() @@ -276,9 +211,9 @@ def __repr__(self): PhotoSourceArg.other = PhotoSourceArg('other') -SetProfilePhotoArg._photo_validator = PhotoSourceArg_validator +SetProfilePhotoArg.photo.validator = PhotoSourceArg_validator SetProfilePhotoArg._all_field_names_ = set(['photo']) -SetProfilePhotoArg._all_fields_ = [('photo', SetProfilePhotoArg._photo_validator)] +SetProfilePhotoArg._all_fields_ = [('photo', SetProfilePhotoArg.photo.validator)] SetProfilePhotoError._file_type_error_validator = bv.Void() SetProfilePhotoError._file_size_error_validator = bv.Void() @@ -302,9 +237,9 @@ def __repr__(self): SetProfilePhotoError.transient_error = SetProfilePhotoError('transient_error') SetProfilePhotoError.other = SetProfilePhotoError('other') -SetProfilePhotoResult._profile_photo_url_validator = bv.String() +SetProfilePhotoResult.profile_photo_url.validator = bv.String() SetProfilePhotoResult._all_field_names_ = set(['profile_photo_url']) -SetProfilePhotoResult._all_fields_ = [('profile_photo_url', SetProfilePhotoResult._profile_photo_url_validator)] +SetProfilePhotoResult._all_fields_ = [('profile_photo_url', SetProfilePhotoResult.profile_photo_url.validator)] set_profile_photo = bb.Route( 'set_profile_photo', diff --git a/dropbox/async_.py b/dropbox/async_.py index cc262b33..bc239e0a 100644 --- a/dropbox/async_.py +++ b/dropbox/async_.py @@ -3,14 +3,9 @@ # @generated # flake8: noqa # pylint: skip-file -try: - from . import stone_validators as bv - from . import stone_base as bb -except (ImportError, 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 +from __future__ import unicode_literals +from stone.backends.python_rsrc import stone_base as bb +from stone.backends.python_rsrc import stone_validators as bv class LaunchResultBase(bb.Union): """ @@ -66,9 +61,6 @@ def get_async_job_id(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LaunchResultBase, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LaunchResultBase(%r, %r)' % (self._tag, self._value) - LaunchResultBase_validator = bv.Union(LaunchResultBase) class LaunchEmptyResult(LaunchResultBase): @@ -99,9 +91,6 @@ def is_complete(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LaunchEmptyResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LaunchEmptyResult(%r, %r)' % (self._tag, self._value) - LaunchEmptyResult_validator = bv.Union(LaunchEmptyResult) class PollArg(bb.Struct): @@ -114,50 +103,22 @@ class PollArg(bb.Struct): __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 + self._async_job_id_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + async_job_id = bb.Attribute("async_job_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PollArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PollArg(async_job_id={!r})'.format( - self._async_job_id_value, - ) - PollArg_validator = bv.Struct(PollArg) class PollResultBase(bb.Union): @@ -190,9 +151,6 @@ def is_in_progress(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PollResultBase, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PollResultBase(%r, %r)' % (self._tag, self._value) - PollResultBase_validator = bv.Union(PollResultBase) class PollEmptyResult(PollResultBase): @@ -222,9 +180,6 @@ def is_complete(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PollEmptyResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PollEmptyResult(%r, %r)' % (self._tag, self._value) - PollEmptyResult_validator = bv.Union(PollEmptyResult) class PollError(bb.Union): @@ -276,9 +231,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PollError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PollError(%r, %r)' % (self._tag, self._value) - PollError_validator = bv.Union(PollError) AsyncJobId_validator = bv.String(min_length=1) @@ -295,9 +247,9 @@ def __repr__(self): LaunchEmptyResult.complete = LaunchEmptyResult('complete') -PollArg._async_job_id_validator = AsyncJobId_validator +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)] +PollArg._all_fields_ = [('async_job_id', PollArg.async_job_id.validator)] PollResultBase._in_progress_validator = bv.Void() PollResultBase._tagmap = { diff --git a/dropbox/auth.py b/dropbox/auth.py index 83dac32a..505af356 100644 --- a/dropbox/auth.py +++ b/dropbox/auth.py @@ -3,14 +3,9 @@ # @generated # flake8: noqa # pylint: skip-file -try: - from . import stone_validators as bv - from . import stone_base as bb -except (ImportError, 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 +from __future__ import unicode_literals +from stone.backends.python_rsrc import stone_base as bb +from stone.backends.python_rsrc import stone_validators as bv class AccessError(bb.Union): """ @@ -104,9 +99,6 @@ def get_paper_access_denied(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccessError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AccessError(%r, %r)' % (self._tag, self._value) - AccessError_validator = bv.Union(AccessError) class AuthError(bb.Union): @@ -236,9 +228,6 @@ def get_missing_scope(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AuthError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AuthError(%r, %r)' % (self._tag, self._value) - AuthError_validator = bv.Union(AuthError) class InvalidAccountTypeError(bb.Union): @@ -288,9 +277,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(InvalidAccountTypeError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'InvalidAccountTypeError(%r, %r)' % (self._tag, self._value) - InvalidAccountTypeError_validator = bv.Union(InvalidAccountTypeError) class PaperAccessError(bb.Union): @@ -339,9 +325,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperAccessError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperAccessError(%r, %r)' % (self._tag, self._value) - PaperAccessError_validator = bv.Union(PaperAccessError) class RateLimitError(bb.Struct): @@ -356,9 +339,7 @@ class RateLimitError(bb.Struct): __slots__ = [ '_reason_value', - '_reason_present', '_retry_after_value', - '_retry_after_present', ] _has_required_fields = True @@ -366,71 +347,22 @@ class RateLimitError(bb.Struct): 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 + self._reason_value = bb.NOT_SET + self._retry_after_value = bb.NOT_SET 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: int - """ - if self._retry_after_present: - return self._retry_after_value - else: - return 1 + # Instance attribute type: RateLimitReason (validator is set below) + reason = bb.Attribute("reason", user_defined=True) - @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 + # Instance attribute type: int (validator is set below) + retry_after = bb.Attribute("retry_after") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RateLimitError, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -480,9 +412,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RateLimitReason, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RateLimitReason(%r, %r)' % (self._tag, self._value) - RateLimitReason_validator = bv.Union(RateLimitReason) class TokenFromOAuth1Arg(bb.Struct): @@ -495,9 +424,7 @@ class TokenFromOAuth1Arg(bb.Struct): __slots__ = [ '_oauth1_token_value', - '_oauth1_token_present', '_oauth1_token_secret_value', - '_oauth1_token_secret_present', ] _has_required_fields = True @@ -505,70 +432,22 @@ class TokenFromOAuth1Arg(bb.Struct): 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 + self._oauth1_token_value = bb.NOT_SET + self._oauth1_token_secret_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + oauth1_token = bb.Attribute("oauth1_token") - @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 + # Instance attribute type: str (validator is set below) + oauth1_token_secret = bb.Attribute("oauth1_token_secret") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TokenFromOAuth1Arg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -618,9 +497,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TokenFromOAuth1Error, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TokenFromOAuth1Error(%r, %r)' % (self._tag, self._value) - TokenFromOAuth1Error_validator = bv.Union(TokenFromOAuth1Error) class TokenFromOAuth1Result(bb.Struct): @@ -631,49 +507,22 @@ class TokenFromOAuth1Result(bb.Struct): __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 + self._oauth2_token_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + oauth2_token = bb.Attribute("oauth2_token") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TokenFromOAuth1Result, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TokenFromOAuth1Result(oauth2_token={!r})'.format( - self._oauth2_token_value, - ) - TokenFromOAuth1Result_validator = bv.Struct(TokenFromOAuth1Result) class TokenScopeError(bb.Struct): @@ -684,49 +533,22 @@ class TokenScopeError(bb.Struct): __slots__ = [ '_required_scope_value', - '_required_scope_present', ] _has_required_fields = True def __init__(self, required_scope=None): - self._required_scope_value = None - self._required_scope_present = False + self._required_scope_value = bb.NOT_SET if required_scope is not None: self.required_scope = required_scope - @property - def required_scope(self): - """ - The required scope to access the route. - - :rtype: str - """ - if self._required_scope_present: - return self._required_scope_value - else: - raise AttributeError("missing required field 'required_scope'") - - @required_scope.setter - def required_scope(self, val): - val = self._required_scope_validator.validate(val) - self._required_scope_value = val - self._required_scope_present = True - - @required_scope.deleter - def required_scope(self): - self._required_scope_value = None - self._required_scope_present = False + # Instance attribute type: str (validator is set below) + required_scope = bb.Attribute("required_scope") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TokenScopeError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TokenScopeError(required_scope={!r})'.format( - self._required_scope_value, - ) - TokenScopeError_validator = bv.Struct(TokenScopeError) AccessError._invalid_account_type_validator = InvalidAccountTypeError_validator @@ -793,15 +615,15 @@ def __repr__(self): PaperAccessError.not_paper_user = PaperAccessError('not_paper_user') PaperAccessError.other = PaperAccessError('other') -RateLimitError._reason_validator = RateLimitReason_validator -RateLimitError._retry_after_validator = bv.UInt64() +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), + ('reason', RateLimitError.reason.validator), + ('retry_after', RateLimitError.retry_after.validator), ] RateLimitReason._too_many_requests_validator = bv.Void() @@ -817,15 +639,15 @@ def __repr__(self): 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.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), + ('oauth1_token', TokenFromOAuth1Arg.oauth1_token.validator), + ('oauth1_token_secret', TokenFromOAuth1Arg.oauth1_token_secret.validator), ] TokenFromOAuth1Error._invalid_oauth1_token_info_validator = bv.Void() @@ -841,14 +663,15 @@ def __repr__(self): TokenFromOAuth1Error.app_id_mismatch = TokenFromOAuth1Error('app_id_mismatch') TokenFromOAuth1Error.other = TokenFromOAuth1Error('other') -TokenFromOAuth1Result._oauth2_token_validator = bv.String(min_length=1) +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)] +TokenFromOAuth1Result._all_fields_ = [('oauth2_token', TokenFromOAuth1Result.oauth2_token.validator)] -TokenScopeError._required_scope_validator = bv.String() +TokenScopeError.required_scope.validator = bv.String() TokenScopeError._all_field_names_ = set(['required_scope']) -TokenScopeError._all_fields_ = [('required_scope', TokenScopeError._required_scope_validator)] +TokenScopeError._all_fields_ = [('required_scope', TokenScopeError.required_scope.validator)] +RateLimitError.retry_after.default = 1 token_from_oauth1 = bb.Route( 'token/from_oauth1', 1, diff --git a/dropbox/base.py b/dropbox/base.py index a12a7cdb..74d956b4 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -6,27 +6,25 @@ from abc import ABCMeta, abstractmethod import warnings -from . import ( - account, - async_, - auth, - check, - common, - contacts, - file_properties, - file_requests, - files, - paper, - secondary_emails, - seen_state, - sharing, - team, - team_common, - team_log, - team_policies, - users, - users_common, -) +from dropbox import account +from dropbox import async_ +from dropbox import auth +from dropbox import check +from dropbox import common +from dropbox import contacts +from dropbox import file_properties +from dropbox import file_requests +from dropbox import files +from dropbox import paper +from dropbox import secondary_emails +from dropbox import seen_state +from dropbox import sharing +from dropbox import team +from dropbox import team_common +from dropbox import team_log +from dropbox import team_policies +from dropbox import users +from dropbox import users_common class DropboxBase(object): @@ -177,7 +175,7 @@ def contacts_delete_manual_contacts_batch(self, """ Removes manually added contacts from the given list. - :param list email_addresses: List of manually added contacts to be + :param List[str] email_addresses: List of manually added contacts to be deleted. :rtype: None :raises: :class:`.exceptions.ApiError` @@ -206,9 +204,10 @@ def file_properties_properties_add(self, :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. No two groups in the input should refer to the - same template. + :param List[:class:`dropbox.file_properties.PropertyGroup`] + property_groups: The property groups which are to be added to a + Dropbox file. No two groups in the input should refer to the same + template. :rtype: None :raises: :class:`.exceptions.ApiError` @@ -237,8 +236,9 @@ def file_properties_properties_overwrite(self, 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. No two groups in the input should refer to the same + :param List[:class:`dropbox.file_properties.PropertyGroup`] + property_groups: The property groups "snapshot" updates to force + apply. No two groups in the input should refer to the same template. :rtype: None :raises: :class:`.exceptions.ApiError` @@ -269,9 +269,9 @@ def file_properties_properties_remove(self, :meth:`file_properties_templates_remove_for_team`. :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`. + :param List[str] 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:`.exceptions.ApiError` @@ -294,7 +294,8 @@ def file_properties_properties_search(self, """ Search across property templates for particular property field values. - :param list queries: Queries to search. + :param List[:class:`dropbox.file_properties.PropertiesSearchQuery`] + 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` @@ -352,8 +353,9 @@ def file_properties_properties_update(self, 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. + :param List[:class:`dropbox.file_properties.PropertyGroupUpdate`] + update_property_groups: The property groups "delta" updates to + apply. :rtype: None :raises: :class:`.exceptions.ApiError` @@ -481,13 +483,14 @@ def file_properties_templates_update_for_user(self, :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. + :param Nullable[str] name: A display name for the template. template + names can be up to 256 bytes. + :param Nullable[str] description: Description for the new template. + Template descriptions can be up to 1024 bytes. + :param + Nullable[List[:class:`dropbox.file_properties.PropertyFieldTemplate`]] + 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:`.exceptions.ApiError` @@ -538,12 +541,13 @@ def file_requests_create(self, :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 Professional and Business accounts. + :param Nullable[:class:`dropbox.file_requests.FileRequestDeadline`] + deadline: The deadline for the file request. Deadlines can only be + set by Professional 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. - :param Nullable description: A description of the file request. + :param Nullable[str] description: A description of the file request. :rtype: :class:`dropbox.file_requests.FileRequest` :raises: :class:`.exceptions.ApiError` @@ -568,7 +572,7 @@ def file_requests_delete(self, """ Delete a batch of closed file requests. - :param list ids: List IDs of the file requests to delete. + :param List[str] ids: List IDs of the file requests to delete. :rtype: :class:`dropbox.file_requests.DeleteFileRequestsResult` :raises: :class:`.exceptions.ApiError` @@ -689,17 +693,17 @@ def file_requests_update(self, 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 Nullable[str] title: The new title of the file request. Must not + be empty. + :param Nullable[str] 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. Deadlines can only be set by Professional and Business accounts. :type deadline: :class:`dropbox.file_requests.UpdateFileRequestDeadline` - :param Nullable open: Whether to set this file request as open or + :param Nullable[bool] open: Whether to set this file request as open or closed. - :param Nullable description: The description of the file request. + :param Nullable[str] description: The description of the file request. :rtype: :class:`dropbox.file_requests.FileRequest` """ arg = file_requests.UpdateFileRequestArgs(id, @@ -731,9 +735,9 @@ def files_alpha_get_metadata(self, 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. + :param Nullable[List[str]] 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:`.exceptions.ApiError` @@ -882,8 +886,9 @@ def files_copy_batch_v2(self, copy job in background. Please use :meth:`files_copy_batch_check_v2` to check the job status. - :param list entries: List of entries to be moved or copied. Each entry - is :class:`dropbox.files.RelocationPath`. + :param List[:class:`dropbox.files.RelocationPath`] entries: List of + entries to be moved or copied. Each entry is + :class:`dropbox.files.RelocationPath`. :param bool autorename: If there's a conflict with any file, have the Dropbox server try to autorename that file to avoid the conflict. :rtype: :class:`dropbox.files.RelocationBatchV2Launch` @@ -1097,8 +1102,9 @@ def files_create_folder_batch(self, behaviour by using the ``CreateFolderBatchArg.force_async`` flag. Use :meth:`files_create_folder_batch_check` to check the job status. - :param list paths: List of paths to be created in the user's Dropbox. - Duplicate path arguments in the batch are considered only once. + :param List[str] paths: List of paths to be created in the user's + Dropbox. Duplicate path arguments in the batch are considered only + once. :param bool autorename: If there's a conflict, have the Dropbox server try to autorename the folder to avoid the conflict. :param bool force_async: Whether to force the create to happen @@ -1152,9 +1158,9 @@ def files_delete_v2(self, and not a :class:`dropbox.files.DeletedMetadata` object. :param str path: Path in the user's Dropbox to delete. - :param Nullable parent_rev: Perform delete if given "rev" matches the - existing file's latest "rev". This field does not support deleting a - folder. + :param Nullable[str] parent_rev: Perform delete if given "rev" matches + the existing file's latest "rev". This field does not support + deleting a folder. :rtype: :class:`dropbox.files.DeleteResult` :raises: :class:`.exceptions.ApiError` @@ -1183,9 +1189,9 @@ def files_delete(self, and not a :class:`dropbox.files.DeletedMetadata` object. :param str path: Path in the user's Dropbox to delete. - :param Nullable parent_rev: Perform delete if given "rev" matches the - existing file's latest "rev". This field does not support deleting a - folder. + :param Nullable[str] parent_rev: Perform delete if given "rev" matches + the existing file's latest "rev". This field does not support + deleting a folder. :rtype: :class:`dropbox.files.Metadata` :raises: :class:`.exceptions.ApiError` @@ -1213,7 +1219,7 @@ def files_delete_batch(self, 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 + :type entries: List[:class:`dropbox.files.DeleteArg`] :rtype: :class:`dropbox.files.DeleteBatchLaunch` """ arg = files.DeleteBatchArg(entries) @@ -1256,7 +1262,7 @@ def files_download(self, 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. + :param Nullable[str] rev: Please specify revision in ``path`` instead. :rtype: (:class:`dropbox.files.FileMetadata`, :class:`requests.models.Response`) :raises: :class:`.exceptions.ApiError` @@ -1289,7 +1295,7 @@ def files_download_to_file(self, :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. + :param Nullable[str] rev: Please specify revision in ``path`` instead. :rtype: :class:`dropbox.files.FileMetadata` :raises: :class:`.exceptions.ApiError` @@ -1426,9 +1432,10 @@ def files_get_file_lock_batch(self, """ Return the lock metadata for the given list of paths. - :param list entries: List of 'entries'. Each 'entry' contains a path of - the file which will be locked or queried. Duplicate path arguments - in the batch are considered only once. + :param List[:class:`dropbox.files.LockFileArg`] entries: List of + 'entries'. Each 'entry' contains a path of the file which will be + locked or queried. Duplicate path arguments in the batch are + considered only once. :rtype: :class:`dropbox.files.LockFileBatchResult` :raises: :class:`.exceptions.ApiError` @@ -1464,10 +1471,10 @@ def files_get_metadata(self, :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 Nullable include_property_groups: If set to a valid list of - template IDs, ``FileMetadata.property_groups`` is set if there - exists property data associated with the file and each of the listed - templates. + :param Nullable[:class:`dropbox.files.TemplateFilterBase`] + include_property_groups: If set to a valid list of template IDs, + ``FileMetadata.property_groups`` is set if there exists property + data associated with the file and each of the listed templates. :rtype: :class:`dropbox.files.Metadata` :raises: :class:`.exceptions.ApiError` @@ -1499,7 +1506,7 @@ def files_get_preview(self, return an unsupported extension error. :param str path: The path of the file to preview. - :param Nullable rev: Please specify revision in ``path`` instead. + :param Nullable[str] rev: Please specify revision in ``path`` instead. :rtype: (:class:`dropbox.files.FileMetadata`, :class:`requests.models.Response`) :raises: :class:`.exceptions.ApiError` @@ -1537,7 +1544,7 @@ def files_get_preview_to_file(self, :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. + :param Nullable[str] rev: Please specify revision in ``path`` instead. :rtype: :class:`dropbox.files.FileMetadata` :raises: :class:`.exceptions.ApiError` @@ -1817,7 +1824,8 @@ def files_get_thumbnail_batch(self, 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. + :param List[:class:`dropbox.files.ThumbnailArg`] entries: List of files + to get thumbnails. :rtype: :class:`dropbox.files.GetThumbnailBatchResult` :raises: :class:`.exceptions.ApiError` @@ -1885,18 +1893,18 @@ def files_list_folder(self, :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 + :param Nullable[int] 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. - :param Nullable include_property_groups: If set to a valid list of - template IDs, ``FileMetadata.property_groups`` is set if there - exists property data associated with the file and each of the listed - templates. + :param Nullable[:class:`dropbox.files.SharedLink`] 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. + :param Nullable[:class:`dropbox.files.TemplateFilterBase`] + include_property_groups: If set to a valid list of template IDs, + ``FileMetadata.property_groups`` is set if there exists property + data associated with the file and each of the listed templates. :param bool include_non_downloadable_files: If true, include files that are not downloadable, i.e. Google Docs. :rtype: :class:`dropbox.files.ListFolderResult` @@ -1980,18 +1988,18 @@ def files_list_folder_get_latest_cursor(self, :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 + :param Nullable[int] 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. - :param Nullable include_property_groups: If set to a valid list of - template IDs, ``FileMetadata.property_groups`` is set if there - exists property data associated with the file and each of the listed - templates. + :param Nullable[:class:`dropbox.files.SharedLink`] 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. + :param Nullable[:class:`dropbox.files.TemplateFilterBase`] + include_property_groups: If set to a valid list of template IDs, + ``FileMetadata.property_groups`` is set if there exists property + data associated with the file and each of the listed templates. :param bool include_non_downloadable_files: If true, include files that are not downloadable, i.e. Google Docs. :rtype: :class:`dropbox.files.ListFolderGetLatestCursorResult` @@ -2099,9 +2107,10 @@ def files_lock_file_batch(self, been locked. Returns a list of the locked file paths and their metadata after this operation. - :param list entries: List of 'entries'. Each 'entry' contains a path of - the file which will be locked or queried. Duplicate path arguments - in the batch are considered only once. + :param List[:class:`dropbox.files.LockFileArg`] entries: List of + 'entries'. Each 'entry' contains a path of the file which will be + locked or queried. Duplicate path arguments in the batch are + considered only once. :rtype: :class:`dropbox.files.LockFileBatchResult` :raises: :class:`.exceptions.ApiError` @@ -2316,9 +2325,9 @@ def files_permanently_delete(self, This endpoint is only available for Dropbox Business apps. :param str path: Path in the user's Dropbox to delete. - :param Nullable parent_rev: Perform delete if given "rev" matches the - existing file's latest "rev". This field does not support deleting a - folder. + :param Nullable[str] parent_rev: Perform delete if given "rev" matches + the existing file's latest "rev". This field does not support + deleting a folder. :rtype: None :raises: :class:`.exceptions.ApiError` @@ -2340,9 +2349,9 @@ def files_properties_add(self, 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. No two groups in the input should refer to the - same template. + :param List[:class:`dropbox.files.PropertyGroup`] property_groups: The + property groups which are to be added to a Dropbox file. No two + groups in the input should refer to the same template. :rtype: None :raises: :class:`.exceptions.ApiError` @@ -2368,9 +2377,9 @@ def files_properties_overwrite(self, 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. No two groups in the input should refer to the same - template. + :param List[:class:`dropbox.files.PropertyGroup`] property_groups: The + property groups "snapshot" updates to force apply. No two groups in + the input should refer to the same template. :rtype: None :raises: :class:`.exceptions.ApiError` @@ -2396,8 +2405,8 @@ def files_properties_remove(self, 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 + :param List[str] 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:`.exceptions.ApiError` @@ -2463,8 +2472,9 @@ def files_properties_update(self, 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. + :param List[:class:`dropbox.files.PropertyGroupUpdate`] + update_property_groups: The property groups "delta" updates to + apply. :rtype: None :raises: :class:`.exceptions.ApiError` @@ -2622,11 +2632,12 @@ def files_search_v2(self, :param str query: The string to search for. May match across multiple fields based on the request arguments. Query string may be rewritten to improve relevance of results. - :param Nullable options: Options for more targeted search results. - :param Nullable match_field_options: Options for search results match - fields. - :param Nullable include_highlights: Deprecated and moved this option to - SearchMatchFieldOptions. + :param Nullable[:class:`dropbox.files.SearchOptions`] options: Options + for more targeted search results. + :param Nullable[:class:`dropbox.files.SearchMatchFieldOptions`] + match_field_options: Options for search results match fields. + :param Nullable[bool] include_highlights: Deprecated and moved this + option to SearchMatchFieldOptions. :rtype: :class:`dropbox.files.SearchV2Result` :raises: :class:`.exceptions.ApiError` @@ -2680,9 +2691,10 @@ def files_unlock_file_batch(self, response indicates that the file has been unlocked. Returns a list of the unlocked file paths and their metadata after this operation. - :param list entries: List of 'entries'. Each 'entry' contains a path of - the file which will be unlocked. Duplicate path arguments in the - batch are considered only once. + :param List[:class:`dropbox.files.UnlockFileArg`] entries: List of + 'entries'. Each 'entry' contains a path of the file which will be + unlocked. Duplicate path arguments in the batch are considered only + once. :rtype: :class:`dropbox.files.LockFileBatchResult` :raises: :class:`.exceptions.ApiError` @@ -2723,7 +2735,7 @@ def files_upload(self, :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 + :param Nullable[datetime] 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 @@ -2733,8 +2745,8 @@ def files_upload(self, 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. - :param Nullable property_groups: List of custom properties to add to - file. + :param Nullable[List[:class:`dropbox.files.PropertyGroup`]] + property_groups: List of custom properties to add to file. :param bool strict_conflict: Be more strict about how each :class:`dropbox.files.WriteMode` detects conflict. For example, always return a conflict error when ``mode`` = ``WriteMode.update`` @@ -2898,7 +2910,8 @@ def files_upload_session_finish_batch(self, information, see the `Data transport limit page `_. - :param list entries: Commit information for each file in the batch. + :param List[:class:`dropbox.files.UploadSessionFinishArg`] entries: + Commit information for each file in the batch. :rtype: :class:`dropbox.files.UploadSessionFinishBatchLaunch` """ arg = files.UploadSessionFinishBatchArg(entries) @@ -2980,8 +2993,9 @@ def files_upload_session_start(self, point you won't be able to call :meth:`files_upload_session_append_v2` anymore with the current session. - :param Nullable session_type: Type of upload session you want to start. - If not specified, default is ``UploadSessionType.sequential``. + :param Nullable[:class:`dropbox.files.UploadSessionType`] session_type: + Type of upload session you want to start. If not specified, default + is ``UploadSessionType.sequential``. :rtype: :class:`dropbox.files.UploadSessionStartResult` :raises: :class:`.exceptions.ApiError` @@ -3049,9 +3063,9 @@ def paper_docs_create(self, for more information. :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 Nullable[str] 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` @@ -3513,13 +3527,14 @@ def paper_docs_users_add(self, `_ for migration information. - :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 List[:class:`dropbox.paper.AddMember`] members: User which should + be added to the Paper doc. Specify only email address or Dropbox + account ID. + :param Nullable[str] 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 + :rtype: List[:class:`dropbox.paper.AddPaperDocUserMemberResult`] :raises: :class:`.exceptions.ApiError` If this raises, ApiError will contain: @@ -3674,16 +3689,16 @@ def paper_folders_create(self, for migration information. :param str name: The name of the new Paper folder. - :param Nullable parent_folder_id: The encrypted Paper folder Id where - the new Paper folder should be created. The API user has to have - write access to this folder or error is thrown. If not supplied, the - new folder will be created at top level. - :param Nullable is_team_folder: Whether the folder to be created should - be a team folder. This value will be ignored if parent_folder_id is - supplied, as the new folder will inherit the type (private or team - folder) from its parent. We will by default create a top-level - private folder if both parent_folder_id and is_team_folder are not - supplied. + :param Nullable[str] parent_folder_id: The encrypted Paper folder Id + where the new Paper folder should be created. The API user has to + have write access to this folder or error is thrown. If not + supplied, the new folder will be created at top level. + :param Nullable[bool] is_team_folder: Whether the folder to be created + should be a team folder. This value will be ignored if + parent_folder_id is supplied, as the new folder will inherit the + type (private or team folder) from its parent. We will by default + create a top-level private folder if both parent_folder_id and + is_team_folder are not supplied. :rtype: :class:`dropbox.paper.PaperFolderCreateResult` :raises: :class:`.exceptions.ApiError` @@ -3719,10 +3734,11 @@ def sharing_add_file_member(self, 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 + :param List[:class:`dropbox.sharing.MemberSelector`] 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[str] 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. @@ -3731,7 +3747,7 @@ def sharing_add_file_member(self, :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 + :rtype: List[:class:`dropbox.sharing.FileMemberActionResult`] :raises: :class:`.exceptions.ApiError` If this raises, ApiError will contain: @@ -3763,12 +3779,13 @@ def sharing_add_folder_member(self, :meth:`sharing_mount_folder` on their behalf. :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 List[:class:`dropbox.sharing.AddMember`] 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. + :param Nullable[str] custom_message: Optional message to display to + added members in their invitation. :rtype: None :raises: :class:`.exceptions.ApiError` @@ -3903,8 +3920,9 @@ def sharing_create_shared_link(self, :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 + :param Nullable[:class:`dropbox.sharing.PendingUploadMode`] + 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` @@ -3938,8 +3956,8 @@ def sharing_create_shared_link_with_settings(self, 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. + :param Nullable[:class:`dropbox.sharing.SharedLinkSettings`] settings: + The requested settings for the newly created shared link. :rtype: :class:`dropbox.sharing.SharedLinkMetadata` :raises: :class:`.exceptions.ApiError` @@ -3963,10 +3981,11 @@ def sharing_get_file_metadata(self, 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. + :param Nullable[List[:class:`dropbox.sharing.FileAction`]] 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:`.exceptions.ApiError` @@ -3989,12 +4008,13 @@ def sharing_get_file_metadata_batch(self, """ 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 + :param List[str] files: The files to query. + :param Nullable[List[:class:`dropbox.sharing.FileAction`]] 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[:class:`dropbox.sharing.GetFileMetadataBatchResult`] :raises: :class:`.exceptions.ApiError` If this raises, ApiError will contain: @@ -4017,8 +4037,9 @@ def sharing_get_folder_metadata(self, Returns shared folder metadata by its folder ID. :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 + :param Nullable[List[:class:`dropbox.sharing.FolderAction`]] 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` @@ -4045,11 +4066,11 @@ def sharing_get_shared_link_file(self, 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. + :param Nullable[str] 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[str] 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:`.exceptions.ApiError` @@ -4084,11 +4105,11 @@ def sharing_get_shared_link_file_to_file(self, :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. + :param Nullable[str] 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[str] link_password: If the shared link has a password, + this parameter can be used. :rtype: :class:`dropbox.sharing.SharedLinkMetadata` :raises: :class:`.exceptions.ApiError` @@ -4115,11 +4136,11 @@ def sharing_get_shared_link_metadata(self, 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. + :param Nullable[str] 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[str] link_password: If the shared link has a password, + this parameter can be used. :rtype: :class:`dropbox.sharing.SharedLinkMetadata` :raises: :class:`.exceptions.ApiError` @@ -4148,7 +4169,8 @@ def sharing_get_shared_links(self, 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. + :param Nullable[str] path: See :meth:`sharing_get_shared_links` + description. :rtype: :class:`dropbox.sharing.GetSharedLinksResult` :raises: :class:`.exceptions.ApiError` @@ -4178,8 +4200,8 @@ def sharing_list_file_members(self, 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 Nullable[List[:class:`dropbox.sharing.MemberAction`]] 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 int limit: Number of members to return max per query. Defaults to @@ -4212,10 +4234,10 @@ def sharing_list_file_members_batch(self, 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 List[str] files: Files for which to return members. :param int limit: Number of members to return max per query. Defaults to 10 if no limit is specified. - :rtype: list + :rtype: List[:class:`dropbox.sharing.ListFileMembersBatchResult`] :raises: :class:`.exceptions.ApiError` If this raises, ApiError will contain: @@ -4314,8 +4336,9 @@ def sharing_list_folders(self, Return the list of all shared folders the current user has access to. :param int 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 + :param Nullable[List[:class:`dropbox.sharing.FolderAction`]] 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` @@ -4363,8 +4386,9 @@ def sharing_list_mountable_folders(self, unmount. :param int 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 + :param Nullable[List[:class:`dropbox.sharing.FolderAction`]] 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` @@ -4415,10 +4439,11 @@ def sharing_list_received_files(self, :param int 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. + :param Nullable[List[:class:`dropbox.sharing.FileAction`]] 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:`.exceptions.ApiError` @@ -4472,10 +4497,11 @@ def sharing_list_shared_links(self, 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 + :param Nullable[str] path: See :meth:`sharing_list_shared_links` + description. + :param Nullable[str] cursor: The cursor returned by your last call to :meth:`sharing_list_shared_links`. - :param Nullable direct_only: See :meth:`sharing_list_shared_links` + :param Nullable[bool] direct_only: See :meth:`sharing_list_shared_links` description. :rtype: :class:`dropbox.sharing.ListSharedLinksResult` :raises: :class:`.exceptions.ApiError` @@ -4771,11 +4797,13 @@ def sharing_share_folder(self, :meth:`sharing_check_share_job_status` until the action completes to get the metadata for the folder. - :param Nullable actions: A list of `FolderAction`s corresponding to - `FolderPermission`s that should appear in the response's + :param Nullable[List[:class:`dropbox.sharing.FolderAction`]] 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. + :param Nullable[:class:`dropbox.sharing.LinkSettings`] link_settings: + Settings on the link for this folder. :rtype: :class:`dropbox.sharing.ShareFolderLaunch` :raises: :class:`.exceptions.ApiError` @@ -4968,18 +4996,24 @@ def sharing_update_folder_policy(self, policies. :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 + :param Nullable[:class:`dropbox.sharing.MemberPolicy`] member_policy: + Who can be a member of this shared folder. Only applicable if the + current user is on a team. + :param Nullable[:class:`dropbox.sharing.AclUpdatePolicy`] + acl_update_policy: Who can add and remove members of this shared + folder. + :param Nullable[:class:`dropbox.sharing.ViewerInfoPolicy`] + viewer_info_policy: Who can enable/disable viewer info for this + shared folder. + :param Nullable[:class:`dropbox.sharing.SharedLinkPolicy`] + 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[:class:`dropbox.sharing.LinkSettings`] link_settings: + Settings on the link for this folder. + :param Nullable[List[:class:`dropbox.sharing.FolderAction`]] 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` @@ -5018,9 +5052,10 @@ def users_features_get_values(self, Get a list of feature values that may be configured for the current account. - :param list features: A list of features in - :class:`dropbox.users.UserFeature`. If the list is empty, this route - will return :class:`dropbox.users.UserFeaturesGetValuesBatchError`. + :param List[:class:`dropbox.users.UserFeature`] features: A list of + features in :class:`dropbox.users.UserFeature`. If the list is + empty, this route will return + :class:`dropbox.users.UserFeaturesGetValuesBatchError`. :rtype: :class:`dropbox.users.UserFeaturesGetValuesBatchResult` :raises: :class:`.exceptions.ApiError` @@ -5063,9 +5098,9 @@ def users_get_account_batch(self, 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 + :param List[str] account_ids: List of user account identifiers. Should + not contain any duplicate account IDs. + :rtype: List[:class:`dropbox.users.BasicAccount`] :raises: :class:`.exceptions.ApiError` If this raises, ApiError will contain: diff --git a/dropbox/base_team.py b/dropbox/base_team.py index 5effa782..f0704cc8 100644 --- a/dropbox/base_team.py +++ b/dropbox/base_team.py @@ -6,27 +6,25 @@ from abc import ABCMeta, abstractmethod import warnings -from . import ( - account, - async_, - auth, - check, - common, - contacts, - file_properties, - file_requests, - files, - paper, - secondary_emails, - seen_state, - sharing, - team, - team_common, - team_log, - team_policies, - users, - users_common, -) +from dropbox import account +from dropbox import async_ +from dropbox import auth +from dropbox import check +from dropbox import common +from dropbox import contacts +from dropbox import file_properties +from dropbox import file_requests +from dropbox import files +from dropbox import paper +from dropbox import secondary_emails +from dropbox import seen_state +from dropbox import sharing +from dropbox import team +from dropbox import team_common +from dropbox import team_log +from dropbox import team_policies +from dropbox import users +from dropbox import users_common class DropboxTeamBase(object): @@ -159,13 +157,14 @@ def file_properties_templates_update_for_team(self, :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. + :param Nullable[str] name: A display name for the template. template + names can be up to 256 bytes. + :param Nullable[str] description: Description for the new template. + Template descriptions can be up to 1024 bytes. + :param + Nullable[List[:class:`dropbox.file_properties.PropertyFieldTemplate`]] + 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:`.exceptions.ApiError` @@ -241,7 +240,7 @@ def team_devices_list_members_devices(self, List all device sessions of a team. Permission : Team member file access. - :param Nullable cursor: At the first call to the + :param Nullable[str] 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 @@ -279,7 +278,7 @@ def team_devices_list_team_devices(self, List all device sessions of a team. Permission : Team member file access. - :param Nullable cursor: At the first call to the + :param Nullable[str] 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 @@ -337,7 +336,7 @@ def team_devices_revoke_device_session_batch(self, """ Revoke a list of device sessions of team members. - :type revoke_devices: list + :type revoke_devices: List[:class:`dropbox.team.RevokeDeviceSessionArg`] :rtype: :class:`dropbox.team.RevokeDeviceSessionBatchResult` :raises: :class:`.exceptions.ApiError` @@ -360,9 +359,9 @@ def team_features_get_values(self, 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`. + :param List[:class:`dropbox.team.Feature`] 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:`.exceptions.ApiError` @@ -405,10 +404,11 @@ def team_groups_create(self, :param str group_name: Group name. :param bool add_creator_as_owner: Automatically add the creator of the group. - :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. + :param Nullable[str] group_external_id: The creator of a team can + associate an arbitrary external ID to the group. + :param Nullable[:class:`dropbox.team.GroupManagementType`] + group_management_type: Whether the team can be managed by selected + users, or only by team admins. :rtype: :class:`dropbox.team.GroupFullInfo` :raises: :class:`.exceptions.ApiError` @@ -462,7 +462,7 @@ def team_groups_get_info(self, :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 + :rtype: List[:class:`dropbox.team.GroupsGetInfoItem`] :raises: :class:`.exceptions.ApiError` If this raises, ApiError will contain: @@ -553,7 +553,8 @@ def team_groups_members_add(self, :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. + :param List[:class:`dropbox.team.MemberAccess`] members: List of users + to be added to the group. :rtype: :class:`dropbox.team.GroupMembersChangeResult` :raises: :class:`.exceptions.ApiError` @@ -634,7 +635,8 @@ def team_groups_members_remove(self, :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. + :param List[:class:`dropbox.team.UserSelectorArg`] users: List of users + to be removed from the group. :rtype: :class:`dropbox.team.GroupMembersChangeResult` :raises: :class:`.exceptions.ApiError` @@ -667,7 +669,7 @@ def team_groups_members_set_access_type(self, 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 + :rtype: List[:class:`dropbox.team.GroupsGetInfoItem`] :raises: :class:`.exceptions.ApiError` If this raises, ApiError will contain: @@ -697,14 +699,15 @@ def team_groups_update(self, :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 + :param Nullable[str] new_group_name: Optional argument. Set group name + to this if provided. + :param Nullable[str] 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. + :param Nullable[:class:`dropbox.team.GroupManagementType`] + new_group_management_type: Set new group management type, if + provided. :rtype: :class:`dropbox.team.GroupFullInfo` :raises: :class:`.exceptions.ApiError` @@ -735,10 +738,12 @@ def team_legal_holds_create_policy(self, all teams have the feature. Permission : Team member file access. :param str name: Policy name. - :param Nullable description: A description of the legal hold policy. - :param list members: List of team member IDs added to the hold. - :param Nullable start_date: start date of the legal hold policy. - :param Nullable end_date: end date of the legal hold policy. + :param Nullable[str] description: A description of the legal hold + policy. + :param List[str] members: List of team member IDs added to the hold. + :param Nullable[datetime] start_date: start date of the legal hold + policy. + :param Nullable[datetime] end_date: end date of the legal hold policy. :rtype: :class:`dropbox.team.LegalHoldPolicy` :raises: :class:`.exceptions.ApiError` @@ -812,9 +817,9 @@ def team_legal_holds_list_held_revisions_continue(self, Team member file access. :param str id: The legal hold Id. - :param Nullable cursor: The cursor idicates where to continue reading - file metadata entries for the next API call. When there are no more - entries, the cursor will return none. + :param Nullable[str] cursor: The cursor idicates where to continue + reading file metadata entries for the next API call. When there are + no more entries, the cursor will return none. :rtype: :class:`dropbox.team.LegalHoldsListHeldRevisionResult` :raises: :class:`.exceptions.ApiError` @@ -886,9 +891,10 @@ def team_legal_holds_update_policy(self, have the feature. Permission : Team member file access. :param str id: The legal hold Id. - :param Nullable name: Policy new name. - :param Nullable description: Policy new description. - :param Nullable members: List of team member IDs to apply the policy on. + :param Nullable[str] name: Policy new name. + :param Nullable[str] description: Policy new description. + :param Nullable[List[str]] members: List of team member IDs to apply the + policy on. :rtype: :class:`dropbox.team.LegalHoldPolicy` :raises: :class:`.exceptions.ApiError` @@ -935,7 +941,7 @@ def team_linked_apps_list_members_linked_apps(self, 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 + :param Nullable[str] 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 @@ -961,7 +967,7 @@ def team_linked_apps_list_team_linked_apps(self, 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 + :param Nullable[str] 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 @@ -1020,7 +1026,8 @@ def team_linked_apps_revoke_linked_app_batch(self, """ Revoke a list of linked applications of the team members. - :type revoke_linked_app: list + :type revoke_linked_app: + List[:class:`dropbox.team.RevokeLinkedApiAppArg`] :rtype: :class:`dropbox.team.RevokeLinkedAppBatchResult` :raises: :class:`.exceptions.ApiError` @@ -1041,7 +1048,8 @@ def team_member_space_limits_excluded_users_add(self, """ Add users to member space limits excluded users list. - :param Nullable users: List of users to be added/removed. + :param Nullable[List[:class:`dropbox.team.UserSelectorArg`]] users: List + of users to be added/removed. :rtype: :class:`dropbox.team.ExcludedUsersUpdateResult` :raises: :class:`.exceptions.ApiError` @@ -1105,7 +1113,8 @@ def team_member_space_limits_excluded_users_remove(self, """ Remove users from member space limits excluded users list. - :param Nullable users: List of users to be added/removed. + :param Nullable[List[:class:`dropbox.team.UserSelectorArg`]] users: List + of users to be added/removed. :rtype: :class:`dropbox.team.ExcludedUsersUpdateResult` :raises: :class:`.exceptions.ApiError` @@ -1127,8 +1136,8 @@ def team_member_space_limits_get_custom_quota(self, 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 + :param List[:class:`dropbox.team.UserSelectorArg`] users: List of users. + :rtype: List[:class:`dropbox.team.CustomQuotaResult`] :raises: :class:`.exceptions.ApiError` If this raises, ApiError will contain: @@ -1149,8 +1158,8 @@ def team_member_space_limits_remove_custom_quota(self, Remove users custom quota. A maximum of 1000 members can be specified in a single call. - :param list users: List of users. - :rtype: list + :param List[:class:`dropbox.team.UserSelectorArg`] users: List of users. + :rtype: List[:class:`dropbox.team.RemoveCustomQuotaResult`] :raises: :class:`.exceptions.ApiError` If this raises, ApiError will contain: @@ -1171,8 +1180,9 @@ def team_member_space_limits_set_custom_quota(self, Set users custom quota. Custom quota has to be at least 15GB. 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 + :param List[:class:`dropbox.team.UserCustomQuotaArg`] users_and_quotas: + List of users and their custom quotas. + :rtype: List[:class:`dropbox.team.CustomQuotaResult`] :raises: :class:`.exceptions.ApiError` If this raises, ApiError will contain: @@ -1203,7 +1213,8 @@ def team_members_add(self, 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 List[:class:`dropbox.team.MemberAddArg`] 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` @@ -1273,8 +1284,9 @@ def team_members_get_info(self, ``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 + :param List[:class:`dropbox.team.UserSelectorArg`] members: List of team + members. + :rtype: List[:class:`dropbox.team.MembersGetInfoItem`] :raises: :class:`.exceptions.ApiError` If this raises, ApiError will contain: @@ -1441,12 +1453,13 @@ def team_members_remove(self, 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 Nullable[:class:`dropbox.team.UserSelectorArg`] transfer_dest_id: + If provided, files from the deleted member account will be + transferred to this user. + :param Nullable[:class:`dropbox.team.UserSelectorArg`] + 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 @@ -1511,8 +1524,8 @@ def team_members_secondary_emails_add(self, each email address not on a verified domain a verification email will be sent. - :param list new_secondary_emails: List of users and secondary emails to - add. + :param List[:class:`dropbox.team.UserSecondaryEmailsArg`] + new_secondary_emails: List of users and secondary emails to add. :rtype: :class:`dropbox.team.AddSecondaryEmailsResult` :raises: :class:`.exceptions.ApiError` @@ -1535,8 +1548,9 @@ def team_members_secondary_emails_delete(self, Users will be notified of deletions of verified secondary emails at both the secondary email and their primary email. - :param list emails_to_delete: List of users and their secondary emails - to delete. + :param List[:class:`dropbox.team.UserSecondaryEmailsArg`] + emails_to_delete: List of users and their secondary emails to + delete. :rtype: :class:`dropbox.team.DeleteSecondaryEmailsResult` """ arg = team.DeleteSecondaryEmailsArg(emails_to_delete) @@ -1554,8 +1568,9 @@ def team_members_secondary_emails_resend_verification_emails(self, Resend secondary email verification emails. Permission : Team member management. - :param list emails_to_resend: List of users and secondary emails to - resend verification emails to. + :param List[:class:`dropbox.team.UserSecondaryEmailsArg`] + emails_to_resend: List of users and secondary emails to resend + verification emails to. :rtype: :class:`dropbox.team.ResendVerificationEmailResult` """ arg = team.ResendVerificationEmailArg(emails_to_resend) @@ -1632,14 +1647,14 @@ def team_members_set_profile(self, :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. - :param Nullable new_is_directory_restricted: New value for whether the - user is a directory restricted user. + :param Nullable[str] new_email: New email for member. + :param Nullable[str] new_external_id: New external ID for member. + :param Nullable[str] new_given_name: New given name for member. + :param Nullable[str] new_surname: New surname for member. + :param Nullable[str] new_persistent_id: New persistent ID. This field + only available to teams using persistent ID SAML configuration. + :param Nullable[bool] new_is_directory_restricted: New value for whether + the user is a directory restricted user. :rtype: :class:`dropbox.team.TeamMemberInfo` :raises: :class:`.exceptions.ApiError` @@ -1877,13 +1892,13 @@ def team_properties_template_update(self, :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. + :param Nullable[str] name: A display name for the template. template + names can be up to 256 bytes. + :param Nullable[str] description: Description for the new template. + Template descriptions can be up to 1024 bytes. + :param Nullable[List[:class:`dropbox.team.PropertyFieldTemplate`]] + 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:`.exceptions.ApiError` @@ -1912,10 +1927,10 @@ def team_reports_get_activity(self, """ Retrieves reporting data about a team's user activity. - :param Nullable start_date: Optional starting date (inclusive). If - start_date is None or too long ago, this field will be set to 6 - months ago. - :param Nullable end_date: Optional ending date (exclusive). + :param Nullable[datetime] start_date: Optional starting date + (inclusive). If start_date is None or too long ago, this field will + be set to 6 months ago. + :param Nullable[datetime] end_date: Optional ending date (exclusive). :rtype: :class:`dropbox.team.GetActivityReport` :raises: :class:`.exceptions.ApiError` @@ -1942,10 +1957,10 @@ def team_reports_get_devices(self, """ Retrieves reporting data about a team's linked devices. - :param Nullable start_date: Optional starting date (inclusive). If - start_date is None or too long ago, this field will be set to 6 - months ago. - :param Nullable end_date: Optional ending date (exclusive). + :param Nullable[datetime] start_date: Optional starting date + (inclusive). If start_date is None or too long ago, this field will + be set to 6 months ago. + :param Nullable[datetime] end_date: Optional ending date (exclusive). :rtype: :class:`dropbox.team.GetDevicesReport` :raises: :class:`.exceptions.ApiError` @@ -1972,10 +1987,10 @@ def team_reports_get_membership(self, """ Retrieves reporting data about a team's membership. - :param Nullable start_date: Optional starting date (inclusive). If - start_date is None or too long ago, this field will be set to 6 - months ago. - :param Nullable end_date: Optional ending date (exclusive). + :param Nullable[datetime] start_date: Optional starting date + (inclusive). If start_date is None or too long ago, this field will + be set to 6 months ago. + :param Nullable[datetime] end_date: Optional ending date (exclusive). :rtype: :class:`dropbox.team.GetMembershipReport` :raises: :class:`.exceptions.ApiError` @@ -2002,10 +2017,10 @@ def team_reports_get_storage(self, """ Retrieves reporting data about a team's storage usage. - :param Nullable start_date: Optional starting date (inclusive). If - start_date is None or too long ago, this field will be set to 6 - months ago. - :param Nullable end_date: Optional ending date (exclusive). + :param Nullable[datetime] start_date: Optional starting date + (inclusive). If start_date is None or too long ago, this field will + be set to 6 months ago. + :param Nullable[datetime] end_date: Optional ending date (exclusive). :rtype: :class:`dropbox.team.GetStorageReport` :raises: :class:`.exceptions.ApiError` @@ -2096,8 +2111,9 @@ def team_team_folder_create(self, member file access. :param str name: Name for the new team folder. - :param Nullable sync_setting: The sync setting to apply to this team - folder. Only permitted if the team has team selective sync enabled. + :param Nullable[:class:`dropbox.team.SyncSettingArg`] sync_setting: The + sync setting to apply to this team folder. Only permitted if the + team has team selective sync enabled. :rtype: :class:`dropbox.team.TeamFolderMetadata` :raises: :class:`.exceptions.ApiError` @@ -2120,8 +2136,8 @@ def team_team_folder_get_info(self, Retrieves metadata for team folders. Permission : Team member file access. - :param list team_folder_ids: The list of team folder IDs. - :rtype: list + :param List[str] team_folder_ids: The list of team folder IDs. + :rtype: List[:class:`dropbox.team.TeamFolderGetInfoItem`] """ arg = team.TeamFolderIdListArg(team_folder_ids) r = self.request( @@ -2227,11 +2243,12 @@ def team_team_folder_update_sync_settings(self, Updates the sync settings on a team folder or its contents. Use of this endpoint requires that the team has team selective sync enabled. - :param Nullable sync_setting: Sync setting to apply to the team folder - itself. Only meaningful if the team folder is not a shared team - root. - :param Nullable content_sync_settings: Sync settings to apply to - contents of this team folder. + :param Nullable[:class:`dropbox.team.SyncSettingArg`] sync_setting: Sync + setting to apply to the team folder itself. Only meaningful if the + team folder is not a shared team root. + :param Nullable[List[:class:`dropbox.team.ContentSyncSettingArg`]] + content_sync_settings: Sync settings to apply to contents of this + team folder. :rtype: :class:`dropbox.team.TeamFolderMetadata` :raises: :class:`.exceptions.ApiError` @@ -2296,16 +2313,17 @@ def team_log_get_events(self, even return no events, even with `has_more` set to true. In this case, callers should fetch again using :meth:`team_log_get_events_continue`. - :param Nullable account_id: Filter the events by account ID. Return only - events with this account_id as either Actor, Context, or + :param Nullable[str] account_id: Filter the events by account ID. Return + only 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. Note that category shouldn't be provided together with - event_type. - :param Nullable event_type: Filter the returned events to a single event - type. Note that event_type shouldn't be provided together with - category. + :param Nullable[:class:`dropbox.team_log.TimeRange`] time: Filter by + time range. + :param Nullable[:class:`dropbox.team_log.EventCategory`] category: + Filter the returned events to a single category. Note that category + shouldn't be provided together with event_type. + :param Nullable[:class:`dropbox.team_log.EventTypeArg`] event_type: + Filter the returned events to a single event type. Note that + event_type shouldn't be provided together with category. :rtype: :class:`dropbox.team_log.GetTeamEventsResult` :raises: :class:`.exceptions.ApiError` diff --git a/dropbox/check.py b/dropbox/check.py index 95465021..801fd88b 100644 --- a/dropbox/check.py +++ b/dropbox/check.py @@ -3,14 +3,9 @@ # @generated # flake8: noqa # pylint: skip-file -try: - from . import stone_validators as bv - from . import stone_base as bb -except (ImportError, 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 +from __future__ import unicode_literals +from stone.backends.python_rsrc import stone_base as bb +from stone.backends.python_rsrc import stone_validators as bv class EchoArg(bb.Struct): """ @@ -22,49 +17,22 @@ class EchoArg(bb.Struct): __slots__ = [ '_query_value', - '_query_present', ] _has_required_fields = False def __init__(self, query=None): - self._query_value = None - self._query_present = False + self._query_value = bb.NOT_SET if query is not None: self.query = query - @property - def query(self): - """ - The string that you'd like to be echoed back to you. - - :rtype: str - """ - if self._query_present: - return self._query_value - else: - return u'' - - @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 + # Instance attribute type: str (validator is set below) + query = bb.Attribute("query") def _process_custom_annotations(self, annotation_type, field_path, processor): super(EchoArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EchoArg(query={!r})'.format( - self._query_value, - ) - EchoArg_validator = bv.Struct(EchoArg) class EchoResult(bb.Struct): @@ -77,59 +45,34 @@ class EchoResult(bb.Struct): __slots__ = [ '_result_value', - '_result_present', ] _has_required_fields = False def __init__(self, result=None): - self._result_value = None - self._result_present = False + self._result_value = bb.NOT_SET if result is not None: self.result = result - @property - def result(self): - """ - If everything worked correctly, this would be the same as query. - - :rtype: str - """ - if self._result_present: - return self._result_value - else: - return u'' - - @result.setter - def result(self, val): - val = self._result_validator.validate(val) - self._result_value = val - self._result_present = True - - @result.deleter - def result(self): - self._result_value = None - self._result_present = False + # Instance attribute type: str (validator is set below) + result = bb.Attribute("result") def _process_custom_annotations(self, annotation_type, field_path, processor): super(EchoResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EchoResult(result={!r})'.format( - self._result_value, - ) - EchoResult_validator = bv.Struct(EchoResult) -EchoArg._query_validator = bv.String() +EchoArg.query.validator = bv.String() EchoArg._all_field_names_ = set(['query']) -EchoArg._all_fields_ = [('query', EchoArg._query_validator)] +EchoArg._all_fields_ = [('query', EchoArg.query.validator)] -EchoResult._result_validator = bv.String() +EchoResult.result.validator = bv.String() EchoResult._all_field_names_ = set(['result']) -EchoResult._all_fields_ = [('result', EchoResult._result_validator)] +EchoResult._all_fields_ = [('result', EchoResult.result.validator)] +EchoArg.query.default = u'' +EchoResult.result.default = u'' app = bb.Route( 'app', 1, diff --git a/dropbox/common.py b/dropbox/common.py index 922f29f4..6b9efcaf 100644 --- a/dropbox/common.py +++ b/dropbox/common.py @@ -3,14 +3,9 @@ # @generated # flake8: noqa # pylint: skip-file -try: - from . import stone_validators as bv - from . import stone_base as bb -except (ImportError, 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 +from __future__ import unicode_literals +from stone.backends.python_rsrc import stone_base as bb +from stone.backends.python_rsrc import stone_validators as bv class PathRoot(bb.Union): """ @@ -120,9 +115,6 @@ def get_namespace_id(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PathRoot, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PathRoot(%r, %r)' % (self._tag, self._value) - PathRoot_validator = bv.Union(PathRoot) class PathRootError(bb.Union): @@ -195,9 +187,6 @@ def get_invalid_root(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PathRootError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PathRootError(%r, %r)' % (self._tag, self._value) - PathRootError_validator = bv.Union(PathRootError) class RootInfo(bb.Struct): @@ -214,9 +203,7 @@ class RootInfo(bb.Struct): __slots__ = [ '_root_namespace_id_value', - '_root_namespace_id_present', '_home_namespace_id_value', - '_home_namespace_id_present', ] _has_required_fields = True @@ -224,72 +211,22 @@ class RootInfo(bb.Struct): def __init__(self, root_namespace_id=None, home_namespace_id=None): - self._root_namespace_id_value = None - self._root_namespace_id_present = False - self._home_namespace_id_value = None - self._home_namespace_id_present = False + self._root_namespace_id_value = bb.NOT_SET + self._home_namespace_id_value = bb.NOT_SET if root_namespace_id is not None: self.root_namespace_id = root_namespace_id if home_namespace_id is not None: self.home_namespace_id = home_namespace_id - @property - def root_namespace_id(self): - """ - The namespace ID for user's root namespace. It will be the namespace ID - of the shared team root if the user is member of a team with a separate - team root. Otherwise it will be same as ``RootInfo.home_namespace_id``. - - :rtype: str - """ - if self._root_namespace_id_present: - return self._root_namespace_id_value - else: - raise AttributeError("missing required field 'root_namespace_id'") - - @root_namespace_id.setter - def root_namespace_id(self, val): - val = self._root_namespace_id_validator.validate(val) - self._root_namespace_id_value = val - self._root_namespace_id_present = True - - @root_namespace_id.deleter - def root_namespace_id(self): - self._root_namespace_id_value = None - self._root_namespace_id_present = False - - @property - def home_namespace_id(self): - """ - The namespace ID for user's home namespace. + # Instance attribute type: str (validator is set below) + root_namespace_id = bb.Attribute("root_namespace_id") - :rtype: str - """ - if self._home_namespace_id_present: - return self._home_namespace_id_value - else: - raise AttributeError("missing required field 'home_namespace_id'") - - @home_namespace_id.setter - def home_namespace_id(self, val): - val = self._home_namespace_id_validator.validate(val) - self._home_namespace_id_value = val - self._home_namespace_id_present = True - - @home_namespace_id.deleter - def home_namespace_id(self): - self._home_namespace_id_value = None - self._home_namespace_id_present = False + # Instance attribute type: str (validator is set below) + home_namespace_id = bb.Attribute("home_namespace_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RootInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RootInfo(root_namespace_id={!r}, home_namespace_id={!r})'.format( - self._root_namespace_id_value, - self._home_namespace_id_value, - ) - RootInfo_validator = bv.StructTree(RootInfo) class TeamRootInfo(RootInfo): @@ -302,7 +239,6 @@ class TeamRootInfo(RootInfo): __slots__ = [ '_home_path_value', - '_home_path_present', ] _has_required_fields = True @@ -313,44 +249,16 @@ def __init__(self, home_path=None): super(TeamRootInfo, self).__init__(root_namespace_id, home_namespace_id) - self._home_path_value = None - self._home_path_present = False + self._home_path_value = bb.NOT_SET if home_path is not None: self.home_path = home_path - @property - def home_path(self): - """ - The path for user's home directory under the shared team root. - - :rtype: str - """ - if self._home_path_present: - return self._home_path_value - else: - raise AttributeError("missing required field 'home_path'") - - @home_path.setter - def home_path(self, val): - val = self._home_path_validator.validate(val) - self._home_path_value = val - self._home_path_present = True - - @home_path.deleter - def home_path(self): - self._home_path_value = None - self._home_path_present = False + # Instance attribute type: str (validator is set below) + home_path = bb.Attribute("home_path") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamRootInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamRootInfo(root_namespace_id={!r}, home_namespace_id={!r}, home_path={!r})'.format( - self._root_namespace_id_value, - self._home_namespace_id_value, - self._home_path_value, - ) - TeamRootInfo_validator = bv.Struct(TeamRootInfo) class UserRootInfo(RootInfo): @@ -373,12 +281,6 @@ def __init__(self, def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserRootInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UserRootInfo(root_namespace_id={!r}, home_namespace_id={!r})'.format( - self._root_namespace_id_value, - self._home_namespace_id_value, - ) - UserRootInfo_validator = bv.Struct(UserRootInfo) Date_validator = bv.Timestamp(u'%Y-%m-%d') @@ -419,16 +321,16 @@ def __repr__(self): PathRootError.no_permission = PathRootError('no_permission') PathRootError.other = PathRootError('other') -RootInfo._root_namespace_id_validator = NamespaceId_validator -RootInfo._home_namespace_id_validator = NamespaceId_validator +RootInfo.root_namespace_id.validator = NamespaceId_validator +RootInfo.home_namespace_id.validator = NamespaceId_validator RootInfo._field_names_ = set([ 'root_namespace_id', 'home_namespace_id', ]) RootInfo._all_field_names_ = RootInfo._field_names_ RootInfo._fields_ = [ - ('root_namespace_id', RootInfo._root_namespace_id_validator), - ('home_namespace_id', RootInfo._home_namespace_id_validator), + ('root_namespace_id', RootInfo.root_namespace_id.validator), + ('home_namespace_id', RootInfo.home_namespace_id.validator), ] RootInfo._all_fields_ = RootInfo._fields_ @@ -442,10 +344,10 @@ def __repr__(self): } RootInfo._is_catch_all_ = True -TeamRootInfo._home_path_validator = bv.String() +TeamRootInfo.home_path.validator = bv.String() TeamRootInfo._field_names_ = set(['home_path']) TeamRootInfo._all_field_names_ = RootInfo._all_field_names_.union(TeamRootInfo._field_names_) -TeamRootInfo._fields_ = [('home_path', TeamRootInfo._home_path_validator)] +TeamRootInfo._fields_ = [('home_path', TeamRootInfo.home_path.validator)] TeamRootInfo._all_fields_ = RootInfo._all_fields_ + TeamRootInfo._fields_ UserRootInfo._field_names_ = set([]) diff --git a/dropbox/contacts.py b/dropbox/contacts.py index e1f645dc..63b50e35 100644 --- a/dropbox/contacts.py +++ b/dropbox/contacts.py @@ -3,21 +3,11 @@ # @generated # flake8: noqa # pylint: skip-file -try: - from . import stone_validators as bv - from . import stone_base as bb -except (ImportError, 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 (ImportError, SystemError, ValueError): - import common +from __future__ import unicode_literals +from stone.backends.python_rsrc import stone_base as bb +from stone.backends.python_rsrc import stone_validators as bv + +from dropbox import common class DeleteManualContactsArg(bb.Struct): """ @@ -27,49 +17,22 @@ class DeleteManualContactsArg(bb.Struct): __slots__ = [ '_email_addresses_value', - '_email_addresses_present', ] _has_required_fields = True def __init__(self, email_addresses=None): - self._email_addresses_value = None - self._email_addresses_present = False + self._email_addresses_value = bb.NOT_SET if email_addresses is not None: self.email_addresses = email_addresses - @property - def email_addresses(self): - """ - List of manually added contacts to be deleted. - - :rtype: list of [str] - """ - if self._email_addresses_present: - return self._email_addresses_value - else: - raise AttributeError("missing required field 'email_addresses'") - - @email_addresses.setter - def email_addresses(self, val): - val = self._email_addresses_validator.validate(val) - self._email_addresses_value = val - self._email_addresses_present = True - - @email_addresses.deleter - def email_addresses(self): - self._email_addresses_value = None - self._email_addresses_present = False + # Instance attribute type: list of [str] (validator is set below) + email_addresses = bb.Attribute("email_addresses") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteManualContactsArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeleteManualContactsArg(email_addresses={!r})'.format( - self._email_addresses_value, - ) - DeleteManualContactsArg_validator = bv.Struct(DeleteManualContactsArg) class DeleteManualContactsError(bb.Union): @@ -130,14 +93,11 @@ def get_contacts_not_found(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteManualContactsError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeleteManualContactsError(%r, %r)' % (self._tag, self._value) - DeleteManualContactsError_validator = bv.Union(DeleteManualContactsError) -DeleteManualContactsArg._email_addresses_validator = bv.List(common.EmailAddress_validator) +DeleteManualContactsArg.email_addresses.validator = bv.List(common.EmailAddress_validator) DeleteManualContactsArg._all_field_names_ = set(['email_addresses']) -DeleteManualContactsArg._all_fields_ = [('email_addresses', DeleteManualContactsArg._email_addresses_validator)] +DeleteManualContactsArg._all_fields_ = [('email_addresses', DeleteManualContactsArg.email_addresses.validator)] DeleteManualContactsError._contacts_not_found_validator = bv.List(common.EmailAddress_validator) DeleteManualContactsError._other_validator = bv.Void() diff --git a/dropbox/dropbox.py b/dropbox/dropbox_client.py similarity index 98% rename from dropbox/dropbox.py rename to dropbox/dropbox_client.py index 63c47160..2f561a93 100644 --- a/dropbox/dropbox.py +++ b/dropbox/dropbox_client.py @@ -18,19 +18,19 @@ import six from datetime import datetime, timedelta -from . import files, stone_serializers -from .auth import ( +from dropbox.auth import ( AuthError_validator, RateLimitError_validator, ) -from .common import ( +from dropbox import files +from dropbox.common import ( PathRoot, PathRoot_validator, PathRootError_validator ) -from .base import DropboxBase -from .base_team import DropboxTeamBase -from .exceptions import ( +from dropbox.base import DropboxBase +from dropbox.base_team import DropboxTeamBase +from dropbox.exceptions import ( ApiError, AuthError, BadInputError, @@ -39,7 +39,7 @@ InternalServerError, RateLimitError, ) -from .session import ( +from dropbox.session import ( API_HOST, API_CONTENT_HOST, API_NOTIFICATION_HOST, @@ -49,6 +49,7 @@ pinned_session, DEFAULT_TIMEOUT ) +from stone.backends.python_rsrc import stone_serializers PATH_ROOT_HEADER = 'Dropbox-API-Path-Root' HTTP_STATUS_INVALID_PATH_ROOT = 422 @@ -276,7 +277,7 @@ def request(self, :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` + :type route: :class:`stone.backends.python_rsrc.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 diff --git a/dropbox/file_properties.py b/dropbox/file_properties.py index c03154e5..6d989d64 100644 --- a/dropbox/file_properties.py +++ b/dropbox/file_properties.py @@ -8,11 +8,11 @@ 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. +The most basic unit in this namespace is the :class:`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. +Fields are added to a Dropbox file using a :class:`PropertyGroup`. Property groups contain a reference to a Dropbox file and a :class:`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. +The :class:`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 :class:`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. @@ -23,14 +23,9 @@ Finally, properties can be accessed from a number of endpoints that return metadata, including `files/get_metadata`, and `files/list_folder`. Properties can also be added during upload, using `files/upload`. """ -try: - from . import stone_validators as bv - from . import stone_base as bb -except (ImportError, 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 +from __future__ import unicode_literals +from stone.backends.python_rsrc import stone_base as bb +from stone.backends.python_rsrc import stone_validators as bv class AddPropertiesArg(bb.Struct): """ @@ -43,9 +38,7 @@ class AddPropertiesArg(bb.Struct): __slots__ = [ '_path_value', - '_path_present', '_property_groups_value', - '_property_groups_present', ] _has_required_fields = True @@ -53,71 +46,22 @@ class AddPropertiesArg(bb.Struct): 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 + self._path_value = bb.NOT_SET + self._property_groups_value = bb.NOT_SET 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. No two - groups in the input should refer to the same template. - - :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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") - @property_groups.deleter - def property_groups(self): - self._property_groups_value = None - self._property_groups_present = False + # Instance attribute type: list of [PropertyGroup] (validator is set below) + property_groups = bb.Attribute("property_groups") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AddPropertiesArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -188,9 +132,6 @@ def get_template_not_found(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TemplateError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TemplateError(%r, %r)' % (self._tag, self._value) - TemplateError_validator = bv.Union(TemplateError) class PropertiesError(TemplateError): @@ -246,9 +187,6 @@ def get_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PropertiesError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PropertiesError(%r, %r)' % (self._tag, self._value) - PropertiesError_validator = bv.Union(PropertiesError) class InvalidPropertyGroupError(PropertiesError): @@ -301,9 +239,6 @@ def is_duplicate_property_groups(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(InvalidPropertyGroupError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'InvalidPropertyGroupError(%r, %r)' % (self._tag, self._value) - InvalidPropertyGroupError_validator = bv.Union(InvalidPropertyGroupError) class AddPropertiesError(InvalidPropertyGroupError): @@ -330,9 +265,6 @@ def is_property_group_already_exists(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AddPropertiesError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AddPropertiesError(%r, %r)' % (self._tag, self._value) - AddPropertiesError_validator = bv.Union(AddPropertiesError) class PropertyGroupTemplate(bb.Struct): @@ -350,11 +282,8 @@ class PropertyGroupTemplate(bb.Struct): __slots__ = [ '_name_value', - '_name_present', '_description_value', - '_description_present', '_fields_value', - '_fields_present', ] _has_required_fields = True @@ -363,12 +292,9 @@ 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 + self._name_value = bb.NOT_SET + self._description_value = bb.NOT_SET + self._fields_value = bb.NOT_SET if name is not None: self.name = name if description is not None: @@ -376,87 +302,18 @@ def __init__(self, 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. + # Instance attribute type: str (validator is set below) + name = bb.Attribute("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 - - @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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") - @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 + # Instance attribute type: list of [PropertyFieldTemplate] (validator is set below) + fields = bb.Attribute("fields") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PropertyGroupTemplate, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -477,131 +334,64 @@ def __init__(self, def _process_custom_annotations(self, annotation_type, field_path, processor): super(AddTemplateArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): """ :ivar file_properties.AddTemplateResult.template_id: An identifier for template added by See - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_user` + :meth:`dropbox.dropbox_client.Dropbox.file_properties_templates_add_for_user` or - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_team`. + :meth:`dropbox.dropbox_client.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 + self._template_id_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + template_id = bb.Attribute("template_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AddTemplateResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AddTemplateResult(template_id={!r})'.format( - self._template_id_value, - ) - AddTemplateResult_validator = bv.Struct(AddTemplateResult) class GetTemplateArg(bb.Struct): """ :ivar file_properties.GetTemplateArg.template_id: An identifier for template added by route See - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_user` + :meth:`dropbox.dropbox_client.Dropbox.file_properties_templates_add_for_user` or - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_team`. + :meth:`dropbox.dropbox_client.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 + self._template_id_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + template_id = bb.Attribute("template_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetTemplateArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetTemplateArg(template_id={!r})'.format( - self._template_id_value, - ) - GetTemplateArg_validator = bv.Struct(GetTemplateArg) class GetTemplateResult(PropertyGroupTemplate): @@ -622,72 +412,35 @@ def __init__(self, def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetTemplateResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): """ :ivar file_properties.ListTemplateResult.template_ids: List of identifiers for templates added by See - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_user` + :meth:`dropbox.dropbox_client.Dropbox.file_properties_templates_add_for_user` or - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_team`. + :meth:`dropbox.dropbox_client.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 + self._template_ids_value = bb.NOT_SET 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 + # Instance attribute type: list of [str] (validator is set below) + template_ids = bb.Attribute("template_ids") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListTemplateResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListTemplateResult(template_ids={!r})'.format( - self._template_ids_value, - ) - ListTemplateResult_validator = bv.Struct(ListTemplateResult) class LogicalOperator(bb.Union): @@ -727,9 +480,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LogicalOperator, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LogicalOperator(%r, %r)' % (self._tag, self._value) - LogicalOperator_validator = bv.Union(LogicalOperator) class LookUpPropertiesError(bb.Union): @@ -767,9 +517,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LookUpPropertiesError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LookUpPropertiesError(%r, %r)' % (self._tag, self._value) - LookUpPropertiesError_validator = bv.Union(LookUpPropertiesError) class LookupError(bb.Union): @@ -873,9 +620,6 @@ def get_malformed_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LookupError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LookupError(%r, %r)' % (self._tag, self._value) - LookupError_validator = bv.Union(LookupError) class ModifyTemplateError(TemplateError): @@ -940,9 +684,6 @@ def is_template_attribute_too_large(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ModifyTemplateError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ModifyTemplateError(%r, %r)' % (self._tag, self._value) - ModifyTemplateError_validator = bv.Union(ModifyTemplateError) class OverwritePropertyGroupArg(bb.Struct): @@ -956,9 +697,7 @@ class OverwritePropertyGroupArg(bb.Struct): __slots__ = [ '_path_value', - '_path_present', '_property_groups_value', - '_property_groups_present', ] _has_required_fields = True @@ -966,71 +705,22 @@ class OverwritePropertyGroupArg(bb.Struct): 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 + self._path_value = bb.NOT_SET + self._property_groups_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") - @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. No two groups in - the input should refer to the same template. - - :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 + # Instance attribute type: list of [PropertyGroup] (validator is set below) + property_groups = bb.Attribute("property_groups") def _process_custom_annotations(self, annotation_type, field_path, processor): super(OverwritePropertyGroupArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -1042,9 +732,7 @@ class PropertiesSearchArg(bb.Struct): __slots__ = [ '_queries_value', - '_queries_present', '_template_filter_value', - '_template_filter_present', ] _has_required_fields = True @@ -1052,128 +740,51 @@ class PropertiesSearchArg(bb.Struct): 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 + self._queries_value = bb.NOT_SET + self._template_filter_value = bb.NOT_SET 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 + # Instance attribute type: list of [PropertiesSearchQuery] (validator is set below) + queries = bb.Attribute("queries") - @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 + # Instance attribute type: TemplateFilter (validator is set below) + template_filter = bb.Attribute("template_filter", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PropertiesSearchArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PropertiesSearchArg(queries={!r}, template_filter={!r})'.format( - self._queries_value, - self._template_filter_value, - ) - PropertiesSearchArg_validator = bv.Struct(PropertiesSearchArg) class PropertiesSearchContinueArg(bb.Struct): """ :ivar file_properties.PropertiesSearchContinueArg.cursor: The cursor returned by your last call to - :meth:`dropbox.dropbox.Dropbox.file_properties_properties_search` or - :meth:`dropbox.dropbox.Dropbox.file_properties_properties_search_continue`. + :meth:`dropbox.dropbox_client.Dropbox.file_properties_properties_search` + or + :meth:`dropbox.dropbox_client.Dropbox.file_properties_properties_search_continue`. """ __slots__ = [ '_cursor_value', - '_cursor_present', ] _has_required_fields = True def __init__(self, cursor=None): - self._cursor_value = None - self._cursor_present = False + self._cursor_value = bb.NOT_SET if cursor is not None: self.cursor = cursor - @property - def cursor(self): - """ - The cursor returned by your last call to - :meth:`dropbox.dropbox.Dropbox.file_properties_properties_search` or - :meth:`dropbox.dropbox.Dropbox.file_properties_properties_search_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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PropertiesSearchContinueArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PropertiesSearchContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - PropertiesSearchContinueArg_validator = bv.Struct(PropertiesSearchContinueArg) class PropertiesSearchContinueError(bb.Union): @@ -1184,8 +795,8 @@ class PropertiesSearchContinueError(bb.Union): :ivar file_properties.PropertiesSearchContinueError.reset: Indicates that the cursor has been invalidated. Call - :meth:`dropbox.dropbox.Dropbox.file_properties_properties_search` to - obtain a new cursor. + :meth:`dropbox.dropbox_client.Dropbox.file_properties_properties_search` + to obtain a new cursor. """ _catch_all = 'other' @@ -1213,9 +824,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PropertiesSearchContinueError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PropertiesSearchContinueError(%r, %r)' % (self._tag, self._value) - PropertiesSearchContinueError_validator = bv.Union(PropertiesSearchContinueError) class PropertiesSearchError(bb.Union): @@ -1269,9 +877,6 @@ def get_property_group_lookup(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PropertiesSearchError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PropertiesSearchError(%r, %r)' % (self._tag, self._value) - PropertiesSearchError_validator = bv.Union(PropertiesSearchError) class PropertiesSearchMatch(bb.Struct): @@ -1288,13 +893,9 @@ class PropertiesSearchMatch(bb.Struct): __slots__ = [ '_id_value', - '_id_present', '_path_value', - '_path_present', '_is_deleted_value', - '_is_deleted_present', '_property_groups_value', - '_property_groups_present', ] _has_required_fields = True @@ -1304,14 +905,10 @@ def __init__(self, path=None, is_deleted=None, property_groups=None): - self._id_value = None - self._id_present = False - self._path_value = None - self._path_present = False - self._is_deleted_value = None - self._is_deleted_present = False - self._property_groups_value = None - self._property_groups_present = False + self._id_value = bb.NOT_SET + self._path_value = bb.NOT_SET + self._is_deleted_value = bb.NOT_SET + self._property_groups_value = bb.NOT_SET if id is not None: self.id = id if path is not None: @@ -1321,109 +918,21 @@ def __init__(self, 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'") + # Instance attribute type: str (validator is set below) + id = bb.Attribute("id") - @id.setter - def id(self, val): - val = self._id_validator.validate(val) - self._id_value = val - self._id_present = True + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") - @id.deleter - def id(self): - self._id_value = None - self._id_present = False + # Instance attribute type: bool (validator is set below) + is_deleted = bb.Attribute("is_deleted") - @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 is_deleted(self): - """ - Whether the file or folder is deleted. - - :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 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 + # Instance attribute type: list of [PropertyGroup] (validator is set below) + property_groups = bb.Attribute("property_groups") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PropertiesSearchMatch, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PropertiesSearchMatch(id={!r}, path={!r}, is_deleted={!r}, property_groups={!r})'.format( - self._id_value, - self._path_value, - self._is_deleted_value, - self._property_groups_value, - ) - PropertiesSearchMatch_validator = bv.Struct(PropertiesSearchMatch) class PropertiesSearchMode(bb.Union): @@ -1482,9 +991,6 @@ def get_field_name(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PropertiesSearchMode, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PropertiesSearchMode(%r, %r)' % (self._tag, self._value) - PropertiesSearchMode_validator = bv.Union(PropertiesSearchMode) class PropertiesSearchQuery(bb.Struct): @@ -1499,11 +1005,8 @@ class PropertiesSearchQuery(bb.Struct): __slots__ = [ '_query_value', - '_query_present', '_mode_value', - '_mode_present', '_logical_operator_value', - '_logical_operator_present', ] _has_required_fields = True @@ -1512,12 +1015,9 @@ 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 + self._query_value = bb.NOT_SET + self._mode_value = bb.NOT_SET + self._logical_operator_value = bb.NOT_SET if query is not None: self.query = query if mode is not None: @@ -1525,85 +1025,18 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + query = bb.Attribute("query") - @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 + # Instance attribute type: PropertiesSearchMode (validator is set below) + mode = bb.Attribute("mode", user_defined=True) - @logical_operator.deleter - def logical_operator(self): - self._logical_operator_value = None - self._logical_operator_present = False + # Instance attribute type: LogicalOperator (validator is set below) + logical_operator = bb.Attribute("logical_operator", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PropertiesSearchQuery, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -1611,16 +1044,14 @@ class PropertiesSearchResult(bb.Struct): :ivar file_properties.PropertiesSearchResult.matches: A list (possibly empty) of matches for the query. :ivar file_properties.PropertiesSearchResult.cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.file_properties_properties_search_continue` + :meth:`dropbox.dropbox_client.Dropbox.file_properties_properties_search_continue` to continue to receive search results. Cursor will be null when there are no more results. """ __slots__ = [ '_matches_value', - '_matches_present', '_cursor_value', - '_cursor_present', ] _has_required_fields = True @@ -1628,76 +1059,22 @@ class PropertiesSearchResult(bb.Struct): def __init__(self, matches=None, cursor=None): - self._matches_value = None - self._matches_present = False - self._cursor_value = None - self._cursor_present = False + self._matches_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET if matches is not None: self.matches = matches if cursor is not None: self.cursor = cursor - @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 - - @property - def cursor(self): - """ - Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.file_properties_properties_search_continue` - to continue to receive search results. Cursor will be null when there - are no more results. + # Instance attribute type: list of [PropertiesSearchMatch] (validator is set below) + matches = bb.Attribute("matches") - :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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PropertiesSearchResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PropertiesSearchResult(matches={!r}, cursor={!r})'.format( - self._matches_value, - self._cursor_value, - ) - PropertiesSearchResult_validator = bv.Struct(PropertiesSearchResult) class PropertyField(bb.Struct): @@ -1713,9 +1090,7 @@ class PropertyField(bb.Struct): __slots__ = [ '_name_value', - '_name_present', '_value_value', - '_value_present', ] _has_required_fields = True @@ -1723,72 +1098,22 @@ class PropertyField(bb.Struct): def __init__(self, name=None, value=None): - self._name_value = None - self._name_present = False - self._value_value = None - self._value_present = False + self._name_value = bb.NOT_SET + self._value_value = bb.NOT_SET 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'") + # Instance attribute type: str (validator is set below) + name = bb.Attribute("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 + # Instance attribute type: str (validator is set below) + value = bb.Attribute("value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PropertyField, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PropertyField(name={!r}, value={!r})'.format( - self._name_value, - self._value_value, - ) - PropertyField_validator = bv.Struct(PropertyField) class PropertyFieldTemplate(bb.Struct): @@ -1807,11 +1132,8 @@ class PropertyFieldTemplate(bb.Struct): __slots__ = [ '_name_value', - '_name_present', '_description_value', - '_description_present', '_type_value', - '_type_present', ] _has_required_fields = True @@ -1820,12 +1142,9 @@ 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 + self._name_value = bb.NOT_SET + self._description_value = bb.NOT_SET + self._type_value = bb.NOT_SET if name is not None: self.name = name if description is not None: @@ -1833,88 +1152,18 @@ def __init__(self, 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'") + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - @name.setter - def name(self, val): - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") - @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 + # Instance attribute type: PropertyType (validator is set below) + type = bb.Attribute("type", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PropertyFieldTemplate, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -1932,9 +1181,7 @@ class PropertyGroup(bb.Struct): __slots__ = [ '_template_id_value', - '_template_id_present', '_fields_value', - '_fields_present', ] _has_required_fields = True @@ -1942,71 +1189,22 @@ class PropertyGroup(bb.Struct): 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 + self._template_id_value = bb.NOT_SET + self._fields_value = bb.NOT_SET 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'") + # Instance attribute type: str (validator is set below) + template_id = bb.Attribute("template_id") - @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 + # Instance attribute type: list of [PropertyField] (validator is set below) + fields = bb.Attribute("fields") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PropertyGroup, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -2022,11 +1220,8 @@ class PropertyGroupUpdate(bb.Struct): __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 @@ -2035,12 +1230,9 @@ 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 + self._template_id_value = bb.NOT_SET + self._add_or_update_fields_value = bb.NOT_SET + self._remove_fields_value = bb.NOT_SET if template_id is not None: self.template_id = template_id if add_or_update_fields is not None: @@ -2048,93 +1240,18 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + template_id = bb.Attribute("template_id") - @property - def remove_fields(self): - """ - Property fields to remove (by name), provided they exist. + # Instance attribute type: list of [PropertyField] (validator is set below) + add_or_update_fields = bb.Attribute("add_or_update_fields", nullable=True) - :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 + # Instance attribute type: list of [str] (validator is set below) + remove_fields = bb.Attribute("remove_fields", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PropertyGroupUpdate, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -2174,9 +1291,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PropertyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PropertyType(%r, %r)' % (self._tag, self._value) - PropertyType_validator = bv.Union(PropertyType) class RemovePropertiesArg(bb.Struct): @@ -2185,16 +1299,14 @@ class RemovePropertiesArg(bb.Struct): file or folder. :ivar file_properties.RemovePropertiesArg.property_template_ids: A list of identifiers for a template created by - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_user` + :meth:`dropbox.dropbox_client.Dropbox.file_properties_templates_add_for_user` or - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_team`. + :meth:`dropbox.dropbox_client.Dropbox.file_properties_templates_add_for_team`. """ __slots__ = [ '_path_value', - '_path_present', '_property_template_ids_value', - '_property_template_ids_present', ] _has_required_fields = True @@ -2202,73 +1314,22 @@ class RemovePropertiesArg(bb.Struct): 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 + self._path_value = bb.NOT_SET + self._property_template_ids_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") - @property_template_ids.deleter - def property_template_ids(self): - self._property_template_ids_value = None - self._property_template_ids_present = False + # Instance attribute type: list of [str] (validator is set below) + property_template_ids = bb.Attribute("property_template_ids") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RemovePropertiesArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -2310,68 +1371,35 @@ def get_property_group_lookup(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RemovePropertiesError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RemovePropertiesError(%r, %r)' % (self._tag, self._value) - RemovePropertiesError_validator = bv.Union(RemovePropertiesError) class RemoveTemplateArg(bb.Struct): """ :ivar file_properties.RemoveTemplateArg.template_id: An identifier for a template created by - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_user` + :meth:`dropbox.dropbox_client.Dropbox.file_properties_templates_add_for_user` or - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_team`. + :meth:`dropbox.dropbox_client.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 + self._template_id_value = bb.NOT_SET if template_id is not None: self.template_id = template_id - @property - def template_id(self): - """ - An identifier 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: 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 + # Instance attribute type: str (validator is set below) + template_id = bb.Attribute("template_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RemoveTemplateArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RemoveTemplateArg(template_id={!r})'.format( - self._template_id_value, - ) - RemoveTemplateArg_validator = bv.Struct(RemoveTemplateArg) class TemplateFilterBase(bb.Union): @@ -2432,9 +1460,6 @@ def get_filter_some(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TemplateFilterBase, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TemplateFilterBase(%r, %r)' % (self._tag, self._value) - TemplateFilterBase_validator = bv.Union(TemplateFilterBase) class TemplateFilter(TemplateFilterBase): @@ -2461,9 +1486,6 @@ def is_filter_none(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TemplateFilter, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TemplateFilter(%r, %r)' % (self._tag, self._value) - TemplateFilter_validator = bv.Union(TemplateFilter) class TemplateOwnerType(bb.Union): @@ -2513,9 +1535,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TemplateOwnerType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TemplateOwnerType(%r, %r)' % (self._tag, self._value) - TemplateOwnerType_validator = bv.Union(TemplateOwnerType) class UpdatePropertiesArg(bb.Struct): @@ -2528,9 +1547,7 @@ class UpdatePropertiesArg(bb.Struct): __slots__ = [ '_path_value', - '_path_present', '_update_property_groups_value', - '_update_property_groups_present', ] _has_required_fields = True @@ -2538,70 +1555,22 @@ class UpdatePropertiesArg(bb.Struct): 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 + self._path_value = bb.NOT_SET + self._update_property_groups_value = bb.NOT_SET 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'") + # Instance attribute type: str (validator is set below) + path = bb.Attribute("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 + # Instance attribute type: list of [PropertyGroupUpdate] (validator is set below) + update_property_groups = bb.Attribute("update_property_groups") def _process_custom_annotations(self, annotation_type, field_path, processor): super(UpdatePropertiesArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -2643,18 +1612,15 @@ def get_property_group_lookup(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UpdatePropertiesError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UpdatePropertiesError(%r, %r)' % (self._tag, self._value) - UpdatePropertiesError_validator = bv.Union(UpdatePropertiesError) class UpdateTemplateArg(bb.Struct): """ :ivar file_properties.UpdateTemplateArg.template_id: An identifier for template added by See - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_user` + :meth:`dropbox.dropbox_client.Dropbox.file_properties_templates_add_for_user` or - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_team`. + :meth:`dropbox.dropbox_client.Dropbox.file_properties_templates_add_for_team`. :ivar file_properties.UpdateTemplateArg.name: A display name for the template. template names can be up to 256 bytes. :ivar file_properties.UpdateTemplateArg.description: Description for the new @@ -2666,13 +1632,9 @@ class UpdateTemplateArg(bb.Struct): __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 @@ -2682,14 +1644,10 @@ def __init__(self, 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 + self._template_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._description_value = bb.NOT_SET + self._add_fields_value = bb.NOT_SET if template_id is not None: self.template_id = template_id if name is not None: @@ -2699,197 +1657,65 @@ def __init__(self, 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. + # Instance attribute type: str (validator is set below) + template_id = bb.Attribute("template_id") - :rtype: str - """ - if self._name_present: - return self._name_value - else: - return None + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name", nullable=True) - @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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description", nullable=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 + # Instance attribute type: list of [PropertyFieldTemplate] (validator is set below) + add_fields = bb.Attribute("add_fields", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(UpdateTemplateArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): """ :ivar file_properties.UpdateTemplateResult.template_id: An identifier for template added by route See - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_user` + :meth:`dropbox.dropbox_client.Dropbox.file_properties_templates_add_for_user` or - :meth:`dropbox.dropbox.Dropbox.file_properties_templates_add_for_team`. + :meth:`dropbox.dropbox_client.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 + self._template_id_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + template_id = bb.Attribute("template_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(UpdateTemplateResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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]+(/.*)?)') PropertiesSearchCursor_validator = bv.String(min_length=1) TemplateId_validator = bv.String(min_length=1, pattern=u'(/|ptid:).*') -AddPropertiesArg._path_validator = PathOrId_validator -AddPropertiesArg._property_groups_validator = bv.List(PropertyGroup_validator) +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), + ('path', AddPropertiesArg.path.validator), + ('property_groups', AddPropertiesArg.property_groups.validator), ] TemplateError._template_not_found_validator = TemplateId_validator @@ -2936,37 +1762,37 @@ def __repr__(self): 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.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), + ('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.template_id.validator = TemplateId_validator AddTemplateResult._all_field_names_ = set(['template_id']) -AddTemplateResult._all_fields_ = [('template_id', AddTemplateResult._template_id_validator)] +AddTemplateResult._all_fields_ = [('template_id', AddTemplateResult.template_id.validator)] -GetTemplateArg._template_id_validator = TemplateId_validator +GetTemplateArg.template_id.validator = TemplateId_validator GetTemplateArg._all_field_names_ = set(['template_id']) -GetTemplateArg._all_fields_ = [('template_id', GetTemplateArg._template_id_validator)] +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.template_ids.validator = bv.List(TemplateId_validator) ListTemplateResult._all_field_names_ = set(['template_ids']) -ListTemplateResult._all_fields_ = [('template_ids', ListTemplateResult._template_ids_validator)] +ListTemplateResult._all_fields_ = [('template_ids', ListTemplateResult.template_ids.validator)] LogicalOperator._or_operator_validator = bv.Void() LogicalOperator._other_validator = bv.Void() @@ -3026,31 +1852,31 @@ def __repr__(self): 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.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), + ('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.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), + ('queries', PropertiesSearchArg.queries.validator), + ('template_filter', PropertiesSearchArg.template_filter.validator), ] -PropertiesSearchContinueArg._cursor_validator = PropertiesSearchCursor_validator +PropertiesSearchContinueArg.cursor.validator = PropertiesSearchCursor_validator PropertiesSearchContinueArg._all_field_names_ = set(['cursor']) -PropertiesSearchContinueArg._all_fields_ = [('cursor', PropertiesSearchContinueArg._cursor_validator)] +PropertiesSearchContinueArg._all_fields_ = [('cursor', PropertiesSearchContinueArg.cursor.validator)] PropertiesSearchContinueError._reset_validator = bv.Void() PropertiesSearchContinueError._other_validator = bv.Void() @@ -3071,10 +1897,10 @@ def __repr__(self): PropertiesSearchError.other = PropertiesSearchError('other') -PropertiesSearchMatch._id_validator = Id_validator -PropertiesSearchMatch._path_validator = bv.String() -PropertiesSearchMatch._is_deleted_validator = bv.Boolean() -PropertiesSearchMatch._property_groups_validator = bv.List(PropertyGroup_validator) +PropertiesSearchMatch.id.validator = Id_validator +PropertiesSearchMatch.path.validator = bv.String() +PropertiesSearchMatch.is_deleted.validator = bv.Boolean() +PropertiesSearchMatch.property_groups.validator = bv.List(PropertyGroup_validator) PropertiesSearchMatch._all_field_names_ = set([ 'id', 'path', @@ -3082,10 +1908,10 @@ def __repr__(self): 'property_groups', ]) PropertiesSearchMatch._all_fields_ = [ - ('id', PropertiesSearchMatch._id_validator), - ('path', PropertiesSearchMatch._path_validator), - ('is_deleted', PropertiesSearchMatch._is_deleted_validator), - ('property_groups', PropertiesSearchMatch._property_groups_validator), + ('id', PropertiesSearchMatch.id.validator), + ('path', PropertiesSearchMatch.path.validator), + ('is_deleted', PropertiesSearchMatch.is_deleted.validator), + ('property_groups', PropertiesSearchMatch.property_groups.validator), ] PropertiesSearchMode._field_name_validator = bv.String() @@ -3097,79 +1923,79 @@ def __repr__(self): PropertiesSearchMode.other = PropertiesSearchMode('other') -PropertiesSearchQuery._query_validator = bv.String() -PropertiesSearchQuery._mode_validator = PropertiesSearchMode_validator -PropertiesSearchQuery._logical_operator_validator = LogicalOperator_validator +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), + ('query', PropertiesSearchQuery.query.validator), + ('mode', PropertiesSearchQuery.mode.validator), + ('logical_operator', PropertiesSearchQuery.logical_operator.validator), ] -PropertiesSearchResult._matches_validator = bv.List(PropertiesSearchMatch_validator) -PropertiesSearchResult._cursor_validator = bv.Nullable(PropertiesSearchCursor_validator) +PropertiesSearchResult.matches.validator = bv.List(PropertiesSearchMatch_validator) +PropertiesSearchResult.cursor.validator = bv.Nullable(PropertiesSearchCursor_validator) PropertiesSearchResult._all_field_names_ = set([ 'matches', 'cursor', ]) PropertiesSearchResult._all_fields_ = [ - ('matches', PropertiesSearchResult._matches_validator), - ('cursor', PropertiesSearchResult._cursor_validator), + ('matches', PropertiesSearchResult.matches.validator), + ('cursor', PropertiesSearchResult.cursor.validator), ] -PropertyField._name_validator = bv.String() -PropertyField._value_validator = bv.String() +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), + ('name', PropertyField.name.validator), + ('value', PropertyField.value.validator), ] -PropertyFieldTemplate._name_validator = bv.String() -PropertyFieldTemplate._description_validator = bv.String() -PropertyFieldTemplate._type_validator = PropertyType_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), + ('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.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), + ('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.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), + ('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() @@ -3182,15 +2008,15 @@ def __repr__(self): PropertyType.string = PropertyType('string') PropertyType.other = PropertyType('other') -RemovePropertiesArg._path_validator = PathOrId_validator -RemovePropertiesArg._property_template_ids_validator = bv.List(TemplateId_validator) +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), + ('path', RemovePropertiesArg.path.validator), + ('property_template_ids', RemovePropertiesArg.property_template_ids.validator), ] RemovePropertiesError._property_group_lookup_validator = LookUpPropertiesError_validator @@ -3199,9 +2025,9 @@ def __repr__(self): } RemovePropertiesError._tagmap.update(PropertiesError._tagmap) -RemoveTemplateArg._template_id_validator = TemplateId_validator +RemoveTemplateArg.template_id.validator = TemplateId_validator RemoveTemplateArg._all_field_names_ = set(['template_id']) -RemoveTemplateArg._all_fields_ = [('template_id', RemoveTemplateArg._template_id_validator)] +RemoveTemplateArg._all_fields_ = [('template_id', RemoveTemplateArg.template_id.validator)] TemplateFilterBase._filter_some_validator = bv.List(TemplateId_validator, min_items=1) TemplateFilterBase._other_validator = bv.Void() @@ -3233,15 +2059,15 @@ def __repr__(self): TemplateOwnerType.team = TemplateOwnerType('team') TemplateOwnerType.other = TemplateOwnerType('other') -UpdatePropertiesArg._path_validator = PathOrId_validator -UpdatePropertiesArg._update_property_groups_validator = bv.List(PropertyGroupUpdate_validator) +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), + ('path', UpdatePropertiesArg.path.validator), + ('update_property_groups', UpdatePropertiesArg.update_property_groups.validator), ] UpdatePropertiesError._property_group_lookup_validator = LookUpPropertiesError_validator @@ -3250,10 +2076,10 @@ def __repr__(self): } 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.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', @@ -3261,16 +2087,18 @@ def __repr__(self): '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), + ('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.template_id.validator = TemplateId_validator UpdateTemplateResult._all_field_names_ = set(['template_id']) -UpdateTemplateResult._all_fields_ = [('template_id', UpdateTemplateResult._template_id_validator)] +UpdateTemplateResult._all_fields_ = [('template_id', UpdateTemplateResult.template_id.validator)] +PropertiesSearchArg.template_filter.default = TemplateFilter.filter_none +PropertiesSearchQuery.logical_operator.default = LogicalOperator.or_operator properties_add = bb.Route( 'properties/add', 1, diff --git a/dropbox/file_requests.py b/dropbox/file_requests.py index 125d7931..9f769558 100644 --- a/dropbox/file_requests.py +++ b/dropbox/file_requests.py @@ -7,23 +7,12 @@ 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 (ImportError, 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 (ImportError, SystemError, ValueError): - import common - import files +from __future__ import unicode_literals +from stone.backends.python_rsrc import stone_base as bb +from stone.backends.python_rsrc import stone_validators as bv + +from dropbox import common +from dropbox import files class GeneralFileRequestsError(bb.Union): """ @@ -62,9 +51,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GeneralFileRequestsError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GeneralFileRequestsError(%r, %r)' % (self._tag, self._value) - GeneralFileRequestsError_validator = bv.Union(GeneralFileRequestsError) class CountFileRequestsError(GeneralFileRequestsError): @@ -79,14 +65,11 @@ class CountFileRequestsError(GeneralFileRequestsError): def _process_custom_annotations(self, annotation_type, field_path, processor): super(CountFileRequestsError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CountFileRequestsError(%r, %r)' % (self._tag, self._value) - CountFileRequestsError_validator = bv.Union(CountFileRequestsError) class CountFileRequestsResult(bb.Struct): """ - Result for :meth:`dropbox.dropbox.Dropbox.file_requests_count`. + Result for :meth:`dropbox.dropbox_client.Dropbox.file_requests_count`. :ivar file_requests.CountFileRequestsResult.file_request_count: The number file requests owner by this user. @@ -94,54 +77,27 @@ class CountFileRequestsResult(bb.Struct): __slots__ = [ '_file_request_count_value', - '_file_request_count_present', ] _has_required_fields = True def __init__(self, file_request_count=None): - self._file_request_count_value = None - self._file_request_count_present = False + self._file_request_count_value = bb.NOT_SET if file_request_count is not None: self.file_request_count = file_request_count - @property - def file_request_count(self): - """ - The number file requests owner by this user. - - :rtype: int - """ - if self._file_request_count_present: - return self._file_request_count_value - else: - raise AttributeError("missing required field 'file_request_count'") - - @file_request_count.setter - def file_request_count(self, val): - val = self._file_request_count_validator.validate(val) - self._file_request_count_value = val - self._file_request_count_present = True - - @file_request_count.deleter - def file_request_count(self): - self._file_request_count_value = None - self._file_request_count_present = False + # Instance attribute type: int (validator is set below) + file_request_count = bb.Attribute("file_request_count") def _process_custom_annotations(self, annotation_type, field_path, processor): super(CountFileRequestsResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CountFileRequestsResult(file_request_count={!r})'.format( - self._file_request_count_value, - ) - CountFileRequestsResult_validator = bv.Struct(CountFileRequestsResult) class CreateFileRequestArgs(bb.Struct): """ - Arguments for :meth:`dropbox.dropbox.Dropbox.file_requests_create`. + Arguments for :meth:`dropbox.dropbox_client.Dropbox.file_requests_create`. :ivar file_requests.CreateFileRequestArgs.title: The title of the file request. Must not be empty. @@ -160,15 +116,10 @@ class CreateFileRequestArgs(bb.Struct): __slots__ = [ '_title_value', - '_title_present', '_destination_value', - '_destination_present', '_deadline_value', - '_deadline_present', '_open_value', - '_open_present', '_description_value', - '_description_present', ] _has_required_fields = True @@ -179,16 +130,11 @@ def __init__(self, deadline=None, open=None, description=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 - self._description_value = None - self._description_present = False + self._title_value = bb.NOT_SET + self._destination_value = bb.NOT_SET + self._deadline_value = bb.NOT_SET + self._open_value = bb.NOT_SET + self._description_value = bb.NOT_SET if title is not None: self.title = title if destination is not None: @@ -200,144 +146,24 @@ def __init__(self, if description is not None: self.description = description - @property - def title(self): - """ - The title of the file request. Must not be empty. + # Instance attribute type: str (validator is set below) + title = bb.Attribute("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 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. + # Instance attribute type: str (validator is set below) + destination = bb.Attribute("destination") - :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 - Professional 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. + # Instance attribute type: FileRequestDeadline (validator is set below) + deadline = bb.Attribute("deadline", nullable=True, user_defined=True) - :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 - - @property - def description(self): - """ - A description of the file request. + # Instance attribute type: bool (validator is set below) + open = bb.Attribute("open") - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(CreateFileRequestArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CreateFileRequestArgs(title={!r}, destination={!r}, deadline={!r}, open={!r}, description={!r})'.format( - self._title_value, - self._destination_value, - self._deadline_value, - self._open_value, - self._description_value, - ) - CreateFileRequestArgs_validator = bv.Struct(CreateFileRequestArgs) class FileRequestError(GeneralFileRequestsError): @@ -430,9 +256,6 @@ def is_validation_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequestError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRequestError(%r, %r)' % (self._tag, self._value) - FileRequestError_validator = bv.Union(FileRequestError) class CreateFileRequestError(FileRequestError): @@ -474,9 +297,6 @@ def is_rate_limit(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(CreateFileRequestError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CreateFileRequestError(%r, %r)' % (self._tag, self._value) - CreateFileRequestError_validator = bv.Union(CreateFileRequestError) class DeleteAllClosedFileRequestsError(FileRequestError): @@ -491,14 +311,12 @@ class DeleteAllClosedFileRequestsError(FileRequestError): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteAllClosedFileRequestsError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeleteAllClosedFileRequestsError(%r, %r)' % (self._tag, self._value) - DeleteAllClosedFileRequestsError_validator = bv.Union(DeleteAllClosedFileRequestsError) class DeleteAllClosedFileRequestsResult(bb.Struct): """ - Result for :meth:`dropbox.dropbox.Dropbox.file_requests_delete_all_closed`. + Result for + :meth:`dropbox.dropbox_client.Dropbox.file_requests_delete_all_closed`. :ivar file_requests.DeleteAllClosedFileRequestsResult.file_requests: The file requests deleted for this user. @@ -506,54 +324,27 @@ class DeleteAllClosedFileRequestsResult(bb.Struct): __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 + self._file_requests_value = bb.NOT_SET if file_requests is not None: self.file_requests = file_requests - @property - def file_requests(self): - """ - The file requests deleted for this user. - - :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 + # Instance attribute type: list of [FileRequest] (validator is set below) + file_requests = bb.Attribute("file_requests") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteAllClosedFileRequestsResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeleteAllClosedFileRequestsResult(file_requests={!r})'.format( - self._file_requests_value, - ) - DeleteAllClosedFileRequestsResult_validator = bv.Struct(DeleteAllClosedFileRequestsResult) class DeleteFileRequestArgs(bb.Struct): """ - Arguments for :meth:`dropbox.dropbox.Dropbox.file_requests_delete`. + Arguments for :meth:`dropbox.dropbox_client.Dropbox.file_requests_delete`. :ivar file_requests.DeleteFileRequestArgs.ids: List IDs of the file requests to delete. @@ -561,49 +352,22 @@ class DeleteFileRequestArgs(bb.Struct): __slots__ = [ '_ids_value', - '_ids_present', ] _has_required_fields = True def __init__(self, ids=None): - self._ids_value = None - self._ids_present = False + self._ids_value = bb.NOT_SET if ids is not None: self.ids = ids - @property - def ids(self): - """ - List IDs of the file requests to delete. - - :rtype: list of [str] - """ - if self._ids_present: - return self._ids_value - else: - raise AttributeError("missing required field 'ids'") - - @ids.setter - def ids(self, val): - val = self._ids_validator.validate(val) - self._ids_value = val - self._ids_present = True - - @ids.deleter - def ids(self): - self._ids_value = None - self._ids_present = False + # Instance attribute type: list of [str] (validator is set below) + ids = bb.Attribute("ids") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteFileRequestArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeleteFileRequestArgs(ids={!r})'.format( - self._ids_value, - ) - DeleteFileRequestArgs_validator = bv.Struct(DeleteFileRequestArgs) class DeleteFileRequestError(FileRequestError): @@ -632,14 +396,11 @@ def is_file_request_open(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteFileRequestError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeleteFileRequestError(%r, %r)' % (self._tag, self._value) - DeleteFileRequestError_validator = bv.Union(DeleteFileRequestError) class DeleteFileRequestsResult(bb.Struct): """ - Result for :meth:`dropbox.dropbox.Dropbox.file_requests_delete`. + Result for :meth:`dropbox.dropbox_client.Dropbox.file_requests_delete`. :ivar file_requests.DeleteFileRequestsResult.file_requests: The file requests deleted by the request. @@ -647,49 +408,22 @@ class DeleteFileRequestsResult(bb.Struct): __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 + self._file_requests_value = bb.NOT_SET if file_requests is not None: self.file_requests = file_requests - @property - def file_requests(self): - """ - The file requests deleted by the request. - - :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 + # Instance attribute type: list of [FileRequest] (validator is set below) + file_requests = bb.Attribute("file_requests") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteFileRequestsResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeleteFileRequestsResult(file_requests={!r})'.format( - self._file_requests_value, - ) - DeleteFileRequestsResult_validator = bv.Struct(DeleteFileRequestsResult) class FileRequest(bb.Struct): @@ -718,23 +452,14 @@ class FileRequest(bb.Struct): __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', '_description_value', - '_description_present', ] _has_required_fields = True @@ -749,24 +474,15 @@ def __init__(self, destination=None, deadline=None, description=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 - self._description_value = None - self._description_present = False + self._id_value = bb.NOT_SET + self._url_value = bb.NOT_SET + self._title_value = bb.NOT_SET + self._destination_value = bb.NOT_SET + self._created_value = bb.NOT_SET + self._deadline_value = bb.NOT_SET + self._is_open_value = bb.NOT_SET + self._file_count_value = bb.NOT_SET + self._description_value = bb.NOT_SET if id is not None: self.id = id if url is not None: @@ -786,242 +502,36 @@ def __init__(self, if description is not None: self.description = description - @property - def id(self): - """ - The ID of the file request. + # Instance attribute type: str (validator is set below) + id = bb.Attribute("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 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. + # Instance attribute type: str (validator is set below) + url = bb.Attribute("url") - :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. + # Instance attribute type: str (validator is set below) + title = bb.Attribute("title") - :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. + # Instance attribute type: str (validator is set below) + destination = bb.Attribute("destination", nullable=True) - :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. + # Instance attribute type: datetime.datetime (validator is set below) + created = bb.Attribute("created") - :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. + # Instance attribute type: FileRequestDeadline (validator is set below) + deadline = bb.Attribute("deadline", nullable=True, user_defined=True) - :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. + # Instance attribute type: bool (validator is set below) + is_open = bb.Attribute("is_open") - :rtype: int - """ - 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 - - @property - def description(self): - """ - A description of the file request. + # Instance attribute type: int (validator is set below) + file_count = bb.Attribute("file_count") - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequest, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRequest(id={!r}, url={!r}, title={!r}, created={!r}, is_open={!r}, file_count={!r}, destination={!r}, deadline={!r}, description={!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, - self._description_value, - ) - FileRequest_validator = bv.Struct(FileRequest) class FileRequestDeadline(bb.Struct): @@ -1035,9 +545,7 @@ class FileRequestDeadline(bb.Struct): __slots__ = [ '_deadline_value', - '_deadline_present', '_allow_late_uploads_value', - '_allow_late_uploads_present', ] _has_required_fields = True @@ -1045,79 +553,27 @@ class FileRequestDeadline(bb.Struct): 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 + self._deadline_value = bb.NOT_SET + self._allow_late_uploads_value = bb.NOT_SET 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. + # Instance attribute type: datetime.datetime (validator is set below) + deadline = bb.Attribute("deadline") - :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 + # Instance attribute type: GracePeriod (validator is set below) + allow_late_uploads = bb.Attribute("allow_late_uploads", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequestDeadline, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): """ - Arguments for :meth:`dropbox.dropbox.Dropbox.file_requests_get`. + Arguments for :meth:`dropbox.dropbox_client.Dropbox.file_requests_get`. :ivar file_requests.GetFileRequestArgs.id: The ID of the file request to retrieve. @@ -1125,49 +581,22 @@ class GetFileRequestArgs(bb.Struct): __slots__ = [ '_id_value', - '_id_present', ] _has_required_fields = True def __init__(self, id=None): - self._id_value = None - self._id_present = False + self._id_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + id = bb.Attribute("id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetFileRequestArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetFileRequestArgs(id={!r})'.format( - self._id_value, - ) - GetFileRequestArgs_validator = bv.Struct(GetFileRequestArgs) class GetFileRequestError(FileRequestError): @@ -1182,9 +611,6 @@ class GetFileRequestError(FileRequestError): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetFileRequestError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetFileRequestError(%r, %r)' % (self._tag, self._value) - GetFileRequestError_validator = bv.Union(GetFileRequestError) class GracePeriod(bb.Union): @@ -1259,14 +685,11 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GracePeriod, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GracePeriod(%r, %r)' % (self._tag, self._value) - GracePeriod_validator = bv.Union(GracePeriod) class ListFileRequestsArg(bb.Struct): """ - Arguments for :meth:`dropbox.dropbox.Dropbox.file_requests_list`. + Arguments for :meth:`dropbox.dropbox_client.Dropbox.file_requests_list`. :ivar file_requests.ListFileRequestsArg.limit: The maximum number of file requests that should be returned per request. @@ -1274,49 +697,22 @@ class ListFileRequestsArg(bb.Struct): __slots__ = [ '_limit_value', - '_limit_present', ] _has_required_fields = False def __init__(self, limit=None): - self._limit_value = None - self._limit_present = False + self._limit_value = bb.NOT_SET if limit is not None: self.limit = limit - @property - def limit(self): - """ - The maximum number of file requests that should be returned per request. - - :rtype: int - """ - 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 + # Instance attribute type: int (validator is set below) + limit = bb.Attribute("limit") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFileRequestsArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFileRequestsArg(limit={!r})'.format( - self._limit_value, - ) - ListFileRequestsArg_validator = bv.Struct(ListFileRequestsArg) class ListFileRequestsContinueArg(bb.Struct): @@ -1327,50 +723,22 @@ class ListFileRequestsContinueArg(bb.Struct): __slots__ = [ '_cursor_value', - '_cursor_present', ] _has_required_fields = True def __init__(self, cursor=None): - self._cursor_value = None - self._cursor_present = False + self._cursor_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFileRequestsContinueArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFileRequestsContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - ListFileRequestsContinueArg_validator = bv.Struct(ListFileRequestsContinueArg) class ListFileRequestsContinueError(GeneralFileRequestsError): @@ -1399,9 +767,6 @@ def is_invalid_cursor(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFileRequestsContinueError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFileRequestsContinueError(%r, %r)' % (self._tag, self._value) - ListFileRequestsContinueError_validator = bv.Union(ListFileRequestsContinueError) class ListFileRequestsError(GeneralFileRequestsError): @@ -1416,14 +781,11 @@ class ListFileRequestsError(GeneralFileRequestsError): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFileRequestsError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFileRequestsError(%r, %r)' % (self._tag, self._value) - ListFileRequestsError_validator = bv.Union(ListFileRequestsError) class ListFileRequestsResult(bb.Struct): """ - Result for :meth:`dropbox.dropbox.Dropbox.file_requests_list`. + Result for :meth:`dropbox.dropbox_client.Dropbox.file_requests_list`. :ivar file_requests.ListFileRequestsResult.file_requests: The file requests owned by this user. Apps with the app folder permission will only see @@ -1432,63 +794,35 @@ class ListFileRequestsResult(bb.Struct): __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 + self._file_requests_value = bb.NOT_SET 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 + # Instance attribute type: list of [FileRequest] (validator is set below) + file_requests = bb.Attribute("file_requests") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFileRequestsResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFileRequestsResult(file_requests={!r})'.format( - self._file_requests_value, - ) - ListFileRequestsResult_validator = bv.Struct(ListFileRequestsResult) class ListFileRequestsV2Result(bb.Struct): """ - Result for :meth:`dropbox.dropbox.Dropbox.file_requests_list` and - :meth:`dropbox.dropbox.Dropbox.file_requests_list_continue`. + Result for :meth:`dropbox.dropbox_client.Dropbox.file_requests_list` and + :meth:`dropbox.dropbox_client.Dropbox.file_requests_list_continue`. :ivar file_requests.ListFileRequestsV2Result.file_requests: The file requests owned by this user. Apps with the app folder permission will only see file requests in their app folder. :ivar file_requests.ListFileRequestsV2Result.cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.file_requests_list_continue` to obtain - additional file requests. + :meth:`dropbox.dropbox_client.Dropbox.file_requests_list_continue` to + obtain additional file requests. :ivar file_requests.ListFileRequestsV2Result.has_more: Is true if there are additional file requests that have not been returned yet. An additional call to :route:list/continue` can retrieve them. @@ -1496,11 +830,8 @@ class ListFileRequestsV2Result(bb.Struct): __slots__ = [ '_file_requests_value', - '_file_requests_present', '_cursor_value', - '_cursor_present', '_has_more_value', - '_has_more_present', ] _has_required_fields = True @@ -1509,12 +840,9 @@ def __init__(self, file_requests=None, cursor=None, has_more=None): - self._file_requests_value = None - self._file_requests_present = False - self._cursor_value = None - self._cursor_present = False - self._has_more_value = None - self._has_more_present = False + self._file_requests_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET + self._has_more_value = bb.NOT_SET if file_requests is not None: self.file_requests = file_requests if cursor is not None: @@ -1522,95 +850,23 @@ def __init__(self, if has_more is not None: self.has_more = has_more - @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. + # Instance attribute type: list of [FileRequest] (validator is set below) + file_requests = bb.Attribute("file_requests") - :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 - - @property - def cursor(self): - """ - Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.file_requests_list_continue` to obtain - additional file requests. - - :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 file requests that have not been - returned yet. An additional call to :route:list/continue` can retrieve - them. + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") - :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 + # Instance attribute type: bool (validator is set below) + has_more = bb.Attribute("has_more") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFileRequestsV2Result, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFileRequestsV2Result(file_requests={!r}, cursor={!r}, has_more={!r})'.format( - self._file_requests_value, - self._cursor_value, - self._has_more_value, - ) - ListFileRequestsV2Result_validator = bv.Struct(ListFileRequestsV2Result) class UpdateFileRequestArgs(bb.Struct): """ - Arguments for :meth:`dropbox.dropbox.Dropbox.file_requests_update`. + Arguments for :meth:`dropbox.dropbox_client.Dropbox.file_requests_update`. :ivar file_requests.UpdateFileRequestArgs.id: The ID of the file request to update. @@ -1630,17 +886,11 @@ class UpdateFileRequestArgs(bb.Struct): __slots__ = [ '_id_value', - '_id_present', '_title_value', - '_title_present', '_destination_value', - '_destination_present', '_deadline_value', - '_deadline_present', '_open_value', - '_open_present', '_description_value', - '_description_present', ] _has_required_fields = True @@ -1652,18 +902,12 @@ def __init__(self, deadline=None, open=None, description=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 - self._description_value = None - self._description_present = False + self._id_value = bb.NOT_SET + self._title_value = bb.NOT_SET + self._destination_value = bb.NOT_SET + self._deadline_value = bb.NOT_SET + self._open_value = bb.NOT_SET + self._description_value = bb.NOT_SET if id is not None: self.id = id if title is not None: @@ -1677,172 +921,27 @@ def __init__(self, if description is not None: self.description = description - @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. + # Instance attribute type: str (validator is set below) + id = bb.Attribute("id") - :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. + # Instance attribute type: str (validator is set below) + title = bb.Attribute("title", nullable=True) - :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. Deadlines can only be set by - Professional and Business accounts. + # Instance attribute type: str (validator is set below) + destination = bb.Attribute("destination", nullable=True) - :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. + # Instance attribute type: UpdateFileRequestDeadline (validator is set below) + deadline = bb.Attribute("deadline", user_defined=True) - :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 - - @property - def description(self): - """ - The description of the file request. + # Instance attribute type: bool (validator is set below) + open = bb.Attribute("open", nullable=True) - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(UpdateFileRequestArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UpdateFileRequestArgs(id={!r}, title={!r}, destination={!r}, deadline={!r}, open={!r}, description={!r})'.format( - self._id_value, - self._title_value, - self._destination_value, - self._deadline_value, - self._open_value, - self._description_value, - ) - UpdateFileRequestArgs_validator = bv.Struct(UpdateFileRequestArgs) class UpdateFileRequestDeadline(bb.Union): @@ -1914,9 +1013,6 @@ def get_update(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UpdateFileRequestDeadline, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UpdateFileRequestDeadline(%r, %r)' % (self._tag, self._value) - UpdateFileRequestDeadline_validator = bv.Union(UpdateFileRequestDeadline) class UpdateFileRequestError(FileRequestError): @@ -1931,9 +1027,6 @@ class UpdateFileRequestError(FileRequestError): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UpdateFileRequestError, self)._process_custom_annotations(annotation_type, field_path, processor) - 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]+') @@ -1952,15 +1045,15 @@ def __repr__(self): } CountFileRequestsError._tagmap.update(GeneralFileRequestsError._tagmap) -CountFileRequestsResult._file_request_count_validator = bv.UInt64() +CountFileRequestsResult.file_request_count.validator = bv.UInt64() CountFileRequestsResult._all_field_names_ = set(['file_request_count']) -CountFileRequestsResult._all_fields_ = [('file_request_count', CountFileRequestsResult._file_request_count_validator)] +CountFileRequestsResult._all_fields_ = [('file_request_count', CountFileRequestsResult.file_request_count.validator)] -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._description_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.description.validator = bv.Nullable(bv.String()) CreateFileRequestArgs._all_field_names_ = set([ 'title', 'destination', @@ -1969,11 +1062,11 @@ def __repr__(self): 'description', ]) CreateFileRequestArgs._all_fields_ = [ - ('title', CreateFileRequestArgs._title_validator), - ('destination', CreateFileRequestArgs._destination_validator), - ('deadline', CreateFileRequestArgs._deadline_validator), - ('open', CreateFileRequestArgs._open_validator), - ('description', CreateFileRequestArgs._description_validator), + ('title', CreateFileRequestArgs.title.validator), + ('destination', CreateFileRequestArgs.destination.validator), + ('deadline', CreateFileRequestArgs.deadline.validator), + ('open', CreateFileRequestArgs.open.validator), + ('description', CreateFileRequestArgs.description.validator), ] FileRequestError._not_found_validator = bv.Void() @@ -2014,13 +1107,13 @@ def __repr__(self): } DeleteAllClosedFileRequestsError._tagmap.update(FileRequestError._tagmap) -DeleteAllClosedFileRequestsResult._file_requests_validator = bv.List(FileRequest_validator) +DeleteAllClosedFileRequestsResult.file_requests.validator = bv.List(FileRequest_validator) DeleteAllClosedFileRequestsResult._all_field_names_ = set(['file_requests']) -DeleteAllClosedFileRequestsResult._all_fields_ = [('file_requests', DeleteAllClosedFileRequestsResult._file_requests_validator)] +DeleteAllClosedFileRequestsResult._all_fields_ = [('file_requests', DeleteAllClosedFileRequestsResult.file_requests.validator)] -DeleteFileRequestArgs._ids_validator = bv.List(FileRequestId_validator) +DeleteFileRequestArgs.ids.validator = bv.List(FileRequestId_validator) DeleteFileRequestArgs._all_field_names_ = set(['ids']) -DeleteFileRequestArgs._all_fields_ = [('ids', DeleteFileRequestArgs._ids_validator)] +DeleteFileRequestArgs._all_fields_ = [('ids', DeleteFileRequestArgs.ids.validator)] DeleteFileRequestError._file_request_open_validator = bv.Void() DeleteFileRequestError._tagmap = { @@ -2030,19 +1123,19 @@ def __repr__(self): DeleteFileRequestError.file_request_open = DeleteFileRequestError('file_request_open') -DeleteFileRequestsResult._file_requests_validator = bv.List(FileRequest_validator) +DeleteFileRequestsResult.file_requests.validator = bv.List(FileRequest_validator) DeleteFileRequestsResult._all_field_names_ = set(['file_requests']) -DeleteFileRequestsResult._all_fields_ = [('file_requests', DeleteFileRequestsResult._file_requests_validator)] - -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._description_validator = bv.Nullable(bv.String()) +DeleteFileRequestsResult._all_fields_ = [('file_requests', DeleteFileRequestsResult.file_requests.validator)] + +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.description.validator = bv.Nullable(bv.String()) FileRequest._all_field_names_ = set([ 'id', 'url', @@ -2055,31 +1148,31 @@ def __repr__(self): 'description', ]) 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), - ('description', FileRequest._description_validator), + ('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), + ('description', FileRequest.description.validator), ] -FileRequestDeadline._deadline_validator = common.DropboxTimestamp_validator -FileRequestDeadline._allow_late_uploads_validator = bv.Nullable(GracePeriod_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), + ('deadline', FileRequestDeadline.deadline.validator), + ('allow_late_uploads', FileRequestDeadline.allow_late_uploads.validator), ] -GetFileRequestArgs._id_validator = FileRequestId_validator +GetFileRequestArgs.id.validator = FileRequestId_validator GetFileRequestArgs._all_field_names_ = set(['id']) -GetFileRequestArgs._all_fields_ = [('id', GetFileRequestArgs._id_validator)] +GetFileRequestArgs._all_fields_ = [('id', GetFileRequestArgs.id.validator)] GetFileRequestError._tagmap = { } @@ -2107,13 +1200,13 @@ def __repr__(self): GracePeriod.always = GracePeriod('always') GracePeriod.other = GracePeriod('other') -ListFileRequestsArg._limit_validator = bv.UInt64() +ListFileRequestsArg.limit.validator = bv.UInt64() ListFileRequestsArg._all_field_names_ = set(['limit']) -ListFileRequestsArg._all_fields_ = [('limit', ListFileRequestsArg._limit_validator)] +ListFileRequestsArg._all_fields_ = [('limit', ListFileRequestsArg.limit.validator)] -ListFileRequestsContinueArg._cursor_validator = bv.String() +ListFileRequestsContinueArg.cursor.validator = bv.String() ListFileRequestsContinueArg._all_field_names_ = set(['cursor']) -ListFileRequestsContinueArg._all_fields_ = [('cursor', ListFileRequestsContinueArg._cursor_validator)] +ListFileRequestsContinueArg._all_fields_ = [('cursor', ListFileRequestsContinueArg.cursor.validator)] ListFileRequestsContinueError._invalid_cursor_validator = bv.Void() ListFileRequestsContinueError._tagmap = { @@ -2127,30 +1220,30 @@ def __repr__(self): } ListFileRequestsError._tagmap.update(GeneralFileRequestsError._tagmap) -ListFileRequestsResult._file_requests_validator = bv.List(FileRequest_validator) +ListFileRequestsResult.file_requests.validator = bv.List(FileRequest_validator) ListFileRequestsResult._all_field_names_ = set(['file_requests']) -ListFileRequestsResult._all_fields_ = [('file_requests', ListFileRequestsResult._file_requests_validator)] +ListFileRequestsResult._all_fields_ = [('file_requests', ListFileRequestsResult.file_requests.validator)] -ListFileRequestsV2Result._file_requests_validator = bv.List(FileRequest_validator) -ListFileRequestsV2Result._cursor_validator = bv.String() -ListFileRequestsV2Result._has_more_validator = bv.Boolean() +ListFileRequestsV2Result.file_requests.validator = bv.List(FileRequest_validator) +ListFileRequestsV2Result.cursor.validator = bv.String() +ListFileRequestsV2Result.has_more.validator = bv.Boolean() ListFileRequestsV2Result._all_field_names_ = set([ 'file_requests', 'cursor', 'has_more', ]) ListFileRequestsV2Result._all_fields_ = [ - ('file_requests', ListFileRequestsV2Result._file_requests_validator), - ('cursor', ListFileRequestsV2Result._cursor_validator), - ('has_more', ListFileRequestsV2Result._has_more_validator), + ('file_requests', ListFileRequestsV2Result.file_requests.validator), + ('cursor', ListFileRequestsV2Result.cursor.validator), + ('has_more', ListFileRequestsV2Result.has_more.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._description_validator = bv.Nullable(bv.String()) +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.description.validator = bv.Nullable(bv.String()) UpdateFileRequestArgs._all_field_names_ = set([ 'id', 'title', @@ -2160,12 +1253,12 @@ def __repr__(self): 'description', ]) UpdateFileRequestArgs._all_fields_ = [ - ('id', UpdateFileRequestArgs._id_validator), - ('title', UpdateFileRequestArgs._title_validator), - ('destination', UpdateFileRequestArgs._destination_validator), - ('deadline', UpdateFileRequestArgs._deadline_validator), - ('open', UpdateFileRequestArgs._open_validator), - ('description', UpdateFileRequestArgs._description_validator), + ('id', UpdateFileRequestArgs.id.validator), + ('title', UpdateFileRequestArgs.title.validator), + ('destination', UpdateFileRequestArgs.destination.validator), + ('deadline', UpdateFileRequestArgs.deadline.validator), + ('open', UpdateFileRequestArgs.open.validator), + ('description', UpdateFileRequestArgs.description.validator), ] UpdateFileRequestDeadline._no_update_validator = bv.Void() @@ -2184,6 +1277,9 @@ def __repr__(self): } UpdateFileRequestError._tagmap.update(FileRequestError._tagmap) +CreateFileRequestArgs.open.default = True +ListFileRequestsArg.limit.default = 1000 +UpdateFileRequestArgs.deadline.default = UpdateFileRequestDeadline.no_update count = bb.Route( 'count', 1, diff --git a/dropbox/files.py b/dropbox/files.py index 65b1ded5..4457b344 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -7,27 +7,14 @@ 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 (ImportError, 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 (ImportError, SystemError, ValueError): - import async_ - import common - import file_properties - import users_common +from __future__ import unicode_literals +from stone.backends.python_rsrc import stone_base as bb +from stone.backends.python_rsrc import stone_validators as bv + +from dropbox import async_ +from dropbox import common +from dropbox import file_properties +from dropbox import users_common class GetMetadataArg(bb.Struct): """ @@ -47,15 +34,10 @@ class GetMetadataArg(bb.Struct): __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', '_include_property_groups_value', - '_include_property_groups_present', ] _has_required_fields = True @@ -66,16 +48,11 @@ def __init__(self, include_deleted=None, include_has_explicit_shared_members=None, include_property_groups=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 - self._include_property_groups_value = None - self._include_property_groups_present = False + self._path_value = bb.NOT_SET + self._include_media_info_value = bb.NOT_SET + self._include_deleted_value = bb.NOT_SET + self._include_has_explicit_shared_members_value = bb.NOT_SET + self._include_property_groups_value = bb.NOT_SET if path is not None: self.path = path if include_media_info is not None: @@ -87,140 +64,24 @@ def __init__(self, if include_property_groups is not None: self.include_property_groups = include_property_groups - @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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") - @property - def include_property_groups(self): - """ - If set to a valid list of template IDs, ``FileMetadata.property_groups`` - is set if there exists property data associated with the file and each - of the listed templates. + # Instance attribute type: bool (validator is set below) + include_media_info = bb.Attribute("include_media_info") - :rtype: file_properties.TemplateFilterBase - """ - if self._include_property_groups_present: - return self._include_property_groups_value - else: - return None + # Instance attribute type: bool (validator is set below) + include_deleted = bb.Attribute("include_deleted") - @include_property_groups.setter - def include_property_groups(self, val): - if val is None: - del self.include_property_groups - return - self._include_property_groups_validator.validate_type_only(val) - self._include_property_groups_value = val - self._include_property_groups_present = True + # Instance attribute type: bool (validator is set below) + include_has_explicit_shared_members = bb.Attribute("include_has_explicit_shared_members") - @include_property_groups.deleter - def include_property_groups(self): - self._include_property_groups_value = None - self._include_property_groups_present = False + # Instance attribute type: file_properties.TemplateFilterBase (validator is set below) + include_property_groups = bb.Attribute("include_property_groups", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetMetadataArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetMetadataArg(path={!r}, include_media_info={!r}, include_deleted={!r}, include_has_explicit_shared_members={!r}, include_property_groups={!r})'.format( - self._path_value, - self._include_media_info_value, - self._include_deleted_value, - self._include_has_explicit_shared_members_value, - self._include_property_groups_value, - ) - GetMetadataArg_validator = bv.Struct(GetMetadataArg) class AlphaGetMetadataArg(GetMetadataArg): @@ -232,7 +93,6 @@ class AlphaGetMetadataArg(GetMetadataArg): __slots__ = [ '_include_property_templates_value', - '_include_property_templates_present', ] _has_required_fields = True @@ -249,51 +109,16 @@ def __init__(self, include_deleted, include_has_explicit_shared_members, include_property_groups) - self._include_property_templates_value = None - self._include_property_templates_present = False + self._include_property_templates_value = bb.NOT_SET 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 + # Instance attribute type: list of [str] (validator is set below) + include_property_templates = bb.Attribute("include_property_templates", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(AlphaGetMetadataArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AlphaGetMetadataArg(path={!r}, include_media_info={!r}, include_deleted={!r}, include_has_explicit_shared_members={!r}, include_property_groups={!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_groups_value, - self._include_property_templates_value, - ) - AlphaGetMetadataArg_validator = bv.Struct(AlphaGetMetadataArg) class GetMetadataError(bb.Union): @@ -337,9 +162,6 @@ def get_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetMetadataError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetMetadataError(%r, %r)' % (self._tag, self._value) - GetMetadataError_validator = bv.Union(GetMetadataError) class AlphaGetMetadataError(GetMetadataError): @@ -381,9 +203,6 @@ def get_properties_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AlphaGetMetadataError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AlphaGetMetadataError(%r, %r)' % (self._tag, self._value) - AlphaGetMetadataError_validator = bv.Union(AlphaGetMetadataError) class CommitInfo(bb.Struct): @@ -414,19 +233,12 @@ class CommitInfo(bb.Struct): __slots__ = [ '_path_value', - '_path_present', '_mode_value', - '_mode_present', '_autorename_value', - '_autorename_present', '_client_modified_value', - '_client_modified_present', '_mute_value', - '_mute_present', '_property_groups_value', - '_property_groups_present', '_strict_conflict_value', - '_strict_conflict_present', ] _has_required_fields = True @@ -439,20 +251,13 @@ def __init__(self, mute=None, property_groups=None, strict_conflict=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 - self._property_groups_value = None - self._property_groups_present = False - self._strict_conflict_value = None - self._strict_conflict_present = False + self._path_value = bb.NOT_SET + self._mode_value = bb.NOT_SET + self._autorename_value = bb.NOT_SET + self._client_modified_value = bb.NOT_SET + self._mute_value = bb.NOT_SET + self._property_groups_value = bb.NOT_SET + self._strict_conflict_value = bb.NOT_SET if path is not None: self.path = path if mode is not None: @@ -468,200 +273,30 @@ def __init__(self, if strict_conflict is not None: self.strict_conflict = strict_conflict - @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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") - @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 + # Instance attribute type: WriteMode (validator is set below) + mode = bb.Attribute("mode", user_defined=True) - @client_modified.deleter - def client_modified(self): - self._client_modified_value = None - self._client_modified_present = False + # Instance attribute type: bool (validator is set below) + autorename = bb.Attribute("autorename") - @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 - - @property - def property_groups(self): - """ - List of custom properties to add to file. - - :rtype: list of [file_properties.PropertyGroup] - """ - if self._property_groups_present: - return self._property_groups_value - else: - return None + # Instance attribute type: datetime.datetime (validator is set below) + client_modified = bb.Attribute("client_modified", nullable=True) - @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 + # Instance attribute type: bool (validator is set below) + mute = bb.Attribute("mute") - @property_groups.deleter - def property_groups(self): - self._property_groups_value = None - self._property_groups_present = False + # Instance attribute type: list of [file_properties.PropertyGroup] (validator is set below) + property_groups = bb.Attribute("property_groups", nullable=True) - @property - def strict_conflict(self): - """ - Be more strict about how each :class:`WriteMode` detects conflict. For - example, always return a conflict error when ``mode`` = - ``WriteMode.update`` and the given "rev" doesn't match the existing - file's "rev", even if the existing file has been deleted. This also - forces a conflict even when the target path refers to a file with - identical contents. - - :rtype: bool - """ - if self._strict_conflict_present: - return self._strict_conflict_value - else: - return False - - @strict_conflict.setter - def strict_conflict(self, val): - val = self._strict_conflict_validator.validate(val) - self._strict_conflict_value = val - self._strict_conflict_present = True - - @strict_conflict.deleter - def strict_conflict(self): - self._strict_conflict_value = None - self._strict_conflict_present = False + # Instance attribute type: bool (validator is set below) + strict_conflict = bb.Attribute("strict_conflict") def _process_custom_annotations(self, annotation_type, field_path, processor): super(CommitInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CommitInfo(path={!r}, mode={!r}, autorename={!r}, client_modified={!r}, mute={!r}, property_groups={!r}, strict_conflict={!r})'.format( - self._path_value, - self._mode_value, - self._autorename_value, - self._client_modified_value, - self._mute_value, - self._property_groups_value, - self._strict_conflict_value, - ) - CommitInfo_validator = bv.Struct(CommitInfo) class CommitInfoWithProperties(CommitInfo): @@ -690,17 +325,6 @@ def __init__(self, def _process_custom_annotations(self, annotation_type, field_path, processor): super(CommitInfoWithProperties, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CommitInfoWithProperties(path={!r}, mode={!r}, autorename={!r}, client_modified={!r}, mute={!r}, property_groups={!r}, strict_conflict={!r})'.format( - self._path_value, - self._mode_value, - self._autorename_value, - self._client_modified_value, - self._mute_value, - self._property_groups_value, - self._strict_conflict_value, - ) - CommitInfoWithProperties_validator = bv.Struct(CommitInfoWithProperties) class ContentSyncSetting(bb.Struct): @@ -712,9 +336,7 @@ class ContentSyncSetting(bb.Struct): __slots__ = [ '_id_value', - '_id_present', '_sync_setting_value', - '_sync_setting_present', ] _has_required_fields = True @@ -722,70 +344,22 @@ class ContentSyncSetting(bb.Struct): def __init__(self, id=None, sync_setting=None): - self._id_value = None - self._id_present = False - self._sync_setting_value = None - self._sync_setting_present = False + self._id_value = bb.NOT_SET + self._sync_setting_value = bb.NOT_SET if id is not None: self.id = id if sync_setting is not None: self.sync_setting = sync_setting - @property - def id(self): - """ - Id of the item this setting is applied to. - - :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 + # Instance attribute type: str (validator is set below) + id = bb.Attribute("id") - @property - def sync_setting(self): - """ - Setting for this item. - - :rtype: SyncSetting - """ - if self._sync_setting_present: - return self._sync_setting_value - else: - raise AttributeError("missing required field 'sync_setting'") - - @sync_setting.setter - def sync_setting(self, val): - self._sync_setting_validator.validate_type_only(val) - self._sync_setting_value = val - self._sync_setting_present = True - - @sync_setting.deleter - def sync_setting(self): - self._sync_setting_value = None - self._sync_setting_present = False + # Instance attribute type: SyncSetting (validator is set below) + sync_setting = bb.Attribute("sync_setting", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ContentSyncSetting, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ContentSyncSetting(id={!r}, sync_setting={!r})'.format( - self._id_value, - self._sync_setting_value, - ) - ContentSyncSetting_validator = bv.Struct(ContentSyncSetting) class ContentSyncSettingArg(bb.Struct): @@ -797,9 +371,7 @@ class ContentSyncSettingArg(bb.Struct): __slots__ = [ '_id_value', - '_id_present', '_sync_setting_value', - '_sync_setting_present', ] _has_required_fields = True @@ -807,70 +379,22 @@ class ContentSyncSettingArg(bb.Struct): def __init__(self, id=None, sync_setting=None): - self._id_value = None - self._id_present = False - self._sync_setting_value = None - self._sync_setting_present = False + self._id_value = bb.NOT_SET + self._sync_setting_value = bb.NOT_SET if id is not None: self.id = id if sync_setting is not None: self.sync_setting = sync_setting - @property - def id(self): - """ - Id of the item this setting is applied to. - - :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 sync_setting(self): - """ - Setting for this item. - - :rtype: SyncSettingArg - """ - if self._sync_setting_present: - return self._sync_setting_value - else: - raise AttributeError("missing required field 'sync_setting'") + # Instance attribute type: str (validator is set below) + id = bb.Attribute("id") - @sync_setting.setter - def sync_setting(self, val): - self._sync_setting_validator.validate_type_only(val) - self._sync_setting_value = val - self._sync_setting_present = True - - @sync_setting.deleter - def sync_setting(self): - self._sync_setting_value = None - self._sync_setting_present = False + # Instance attribute type: SyncSettingArg (validator is set below) + sync_setting = bb.Attribute("sync_setting", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ContentSyncSettingArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ContentSyncSettingArg(id={!r}, sync_setting={!r})'.format( - self._id_value, - self._sync_setting_value, - ) - ContentSyncSettingArg_validator = bv.Struct(ContentSyncSettingArg) class CreateFolderArg(bb.Struct): @@ -882,9 +406,7 @@ class CreateFolderArg(bb.Struct): __slots__ = [ '_path_value', - '_path_present', '_autorename_value', - '_autorename_present', ] _has_required_fields = True @@ -892,71 +414,22 @@ class CreateFolderArg(bb.Struct): def __init__(self, path=None, autorename=None): - self._path_value = None - self._path_present = False - self._autorename_value = None - self._autorename_present = False + self._path_value = bb.NOT_SET + self._autorename_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") - @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 + # Instance attribute type: bool (validator is set below) + autorename = bb.Attribute("autorename") def _process_custom_annotations(self, annotation_type, field_path, processor): super(CreateFolderArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CreateFolderArg(path={!r}, autorename={!r})'.format( - self._path_value, - self._autorename_value, - ) - CreateFolderArg_validator = bv.Struct(CreateFolderArg) class CreateFolderBatchArg(bb.Struct): @@ -972,11 +445,8 @@ class CreateFolderBatchArg(bb.Struct): __slots__ = [ '_paths_value', - '_paths_present', '_autorename_value', - '_autorename_present', '_force_async_value', - '_force_async_present', ] _has_required_fields = True @@ -985,12 +455,9 @@ def __init__(self, paths=None, autorename=None, force_async=None): - self._paths_value = None - self._paths_present = False - self._autorename_value = None - self._autorename_present = False - self._force_async_value = None - self._force_async_present = False + self._paths_value = bb.NOT_SET + self._autorename_value = bb.NOT_SET + self._force_async_value = bb.NOT_SET if paths is not None: self.paths = paths if autorename is not None: @@ -998,87 +465,18 @@ def __init__(self, if force_async is not None: self.force_async = force_async - @property - def paths(self): - """ - List of paths to be created in the user's Dropbox. Duplicate path - arguments in the batch are considered only once. - - :rtype: list of [str] - """ - if self._paths_present: - return self._paths_value - else: - raise AttributeError("missing required field 'paths'") - - @paths.setter - def paths(self, val): - val = self._paths_validator.validate(val) - self._paths_value = val - self._paths_present = True - - @paths.deleter - def paths(self): - self._paths_value = None - self._paths_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 - - @property - def force_async(self): - """ - Whether to force the create to happen asynchronously. - - :rtype: bool - """ - if self._force_async_present: - return self._force_async_value - else: - return False + # Instance attribute type: list of [str] (validator is set below) + paths = bb.Attribute("paths") - @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 + # Instance attribute type: bool (validator is set below) + autorename = bb.Attribute("autorename") - @force_async.deleter - def force_async(self): - self._force_async_value = None - self._force_async_present = False + # Instance attribute type: bool (validator is set below) + force_async = bb.Attribute("force_async") def _process_custom_annotations(self, annotation_type, field_path, processor): super(CreateFolderBatchArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CreateFolderBatchArg(paths={!r}, autorename={!r}, force_async={!r})'.format( - self._paths_value, - self._autorename_value, - self._force_async_value, - ) - CreateFolderBatchArg_validator = bv.Struct(CreateFolderBatchArg) class CreateFolderBatchError(bb.Union): @@ -1116,9 +514,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(CreateFolderBatchError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CreateFolderBatchError(%r, %r)' % (self._tag, self._value) - CreateFolderBatchError_validator = bv.Union(CreateFolderBatchError) class CreateFolderBatchJobStatus(async_.PollResultBase): @@ -1210,15 +605,13 @@ def get_failed(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(CreateFolderBatchJobStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CreateFolderBatchJobStatus(%r, %r)' % (self._tag, self._value) - CreateFolderBatchJobStatus_validator = bv.Union(CreateFolderBatchJobStatus) class CreateFolderBatchLaunch(async_.LaunchResultBase): """ - Result returned by :meth:`dropbox.dropbox.Dropbox.files_create_folder_batch` - that may either launch an asynchronous job or complete synchronously. + Result returned by + :meth:`dropbox.dropbox_client.Dropbox.files_create_folder_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 @@ -1269,9 +662,6 @@ def get_complete(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(CreateFolderBatchLaunch, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CreateFolderBatchLaunch(%r, %r)' % (self._tag, self._value) - CreateFolderBatchLaunch_validator = bv.Union(CreateFolderBatchLaunch) class FileOpsResult(bb.Struct): @@ -1287,9 +677,6 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileOpsResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileOpsResult()' - FileOpsResult_validator = bv.Struct(FileOpsResult) class CreateFolderBatchResult(FileOpsResult): @@ -1301,7 +688,6 @@ class CreateFolderBatchResult(FileOpsResult): __slots__ = [ '_entries_value', - '_entries_present', ] _has_required_fields = True @@ -1309,43 +695,16 @@ class CreateFolderBatchResult(FileOpsResult): def __init__(self, entries=None): super(CreateFolderBatchResult, self).__init__() - self._entries_value = None - self._entries_present = False + self._entries_value = bb.NOT_SET if entries is not None: self.entries = entries - @property - def entries(self): - """ - Each entry in ``CreateFolderBatchArg.paths`` will appear at the same - position inside ``CreateFolderBatchResult.entries``. - - :rtype: list of [CreateFolderBatchResultEntry] - """ - 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 + # Instance attribute type: list of [CreateFolderBatchResultEntry] (validator is set below) + entries = bb.Attribute("entries") def _process_custom_annotations(self, annotation_type, field_path, processor): super(CreateFolderBatchResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CreateFolderBatchResult(entries={!r})'.format( - self._entries_value, - ) - CreateFolderBatchResult_validator = bv.Struct(CreateFolderBatchResult) class CreateFolderBatchResultEntry(bb.Union): @@ -1418,9 +777,6 @@ def get_failure(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(CreateFolderBatchResultEntry, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CreateFolderBatchResultEntry(%r, %r)' % (self._tag, self._value) - CreateFolderBatchResultEntry_validator = bv.Union(CreateFolderBatchResultEntry) class CreateFolderEntryError(bb.Union): @@ -1474,9 +830,6 @@ def get_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(CreateFolderEntryError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CreateFolderEntryError(%r, %r)' % (self._tag, self._value) - CreateFolderEntryError_validator = bv.Union(CreateFolderEntryError) class CreateFolderEntryResult(bb.Struct): @@ -1487,49 +840,22 @@ class CreateFolderEntryResult(bb.Struct): __slots__ = [ '_metadata_value', - '_metadata_present', ] _has_required_fields = True def __init__(self, metadata=None): - self._metadata_value = None - self._metadata_present = False + self._metadata_value = bb.NOT_SET 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 + # Instance attribute type: FolderMetadata (validator is set below) + metadata = bb.Attribute("metadata", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(CreateFolderEntryResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CreateFolderEntryResult(metadata={!r})'.format( - self._metadata_value, - ) - CreateFolderEntryResult_validator = bv.Struct(CreateFolderEntryResult) class CreateFolderError(bb.Union): @@ -1573,9 +899,6 @@ def get_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(CreateFolderError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CreateFolderError(%r, %r)' % (self._tag, self._value) - CreateFolderError_validator = bv.Union(CreateFolderError) class CreateFolderResult(FileOpsResult): @@ -1585,7 +908,6 @@ class CreateFolderResult(FileOpsResult): __slots__ = [ '_metadata_value', - '_metadata_present', ] _has_required_fields = True @@ -1593,42 +915,16 @@ class CreateFolderResult(FileOpsResult): def __init__(self, metadata=None): super(CreateFolderResult, self).__init__() - self._metadata_value = None - self._metadata_present = False + self._metadata_value = bb.NOT_SET 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 + # Instance attribute type: FolderMetadata (validator is set below) + metadata = bb.Attribute("metadata", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(CreateFolderResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CreateFolderResult(metadata={!r})'.format( - self._metadata_value, - ) - CreateFolderResult_validator = bv.Struct(CreateFolderResult) class DeleteArg(bb.Struct): @@ -1641,9 +937,7 @@ class DeleteArg(bb.Struct): __slots__ = [ '_path_value', - '_path_present', '_parent_rev_value', - '_parent_rev_present', ] _has_required_fields = True @@ -1651,121 +945,44 @@ class DeleteArg(bb.Struct): def __init__(self, path=None, parent_rev=None): - self._path_value = None - self._path_present = False - self._parent_rev_value = None - self._parent_rev_present = False + self._path_value = bb.NOT_SET + self._parent_rev_value = bb.NOT_SET if path is not None: self.path = path if parent_rev is not None: self.parent_rev = parent_rev - @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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") - @property - def parent_rev(self): - """ - Perform delete if given "rev" matches the existing file's latest "rev". - This field does not support deleting a folder. - - :rtype: str - """ - if self._parent_rev_present: - return self._parent_rev_value - else: - return None - - @parent_rev.setter - def parent_rev(self, val): - if val is None: - del self.parent_rev - return - val = self._parent_rev_validator.validate(val) - self._parent_rev_value = val - self._parent_rev_present = True - - @parent_rev.deleter - def parent_rev(self): - self._parent_rev_value = None - self._parent_rev_present = False + # Instance attribute type: str (validator is set below) + parent_rev = bb.Attribute("parent_rev", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeleteArg(path={!r}, parent_rev={!r})'.format( - self._path_value, - self._parent_rev_value, - ) - DeleteArg_validator = bv.Struct(DeleteArg) class DeleteBatchArg(bb.Struct): __slots__ = [ '_entries_value', - '_entries_present', ] _has_required_fields = True def __init__(self, entries=None): - self._entries_value = None - self._entries_present = False + self._entries_value = bb.NOT_SET 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 + # Instance attribute type: list of [DeleteArg] (validator is set below) + entries = bb.Attribute("entries") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteBatchArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeleteBatchArg(entries={!r})'.format( - self._entries_value, - ) - DeleteBatchArg_validator = bv.Struct(DeleteBatchArg) class DeleteBatchError(bb.Union): @@ -1776,8 +993,8 @@ class DeleteBatchError(bb.Union): :ivar files.DeleteBatchError.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. + :meth:`dropbox.dropbox_client.Dropbox.files_delete_batch` now provides + smaller granularity about which entry has failed because of this. """ _catch_all = 'other' @@ -1805,9 +1022,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteBatchError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeleteBatchError(%r, %r)' % (self._tag, self._value) - DeleteBatchError_validator = bv.Union(DeleteBatchError) class DeleteBatchJobStatus(async_.PollResultBase): @@ -1899,15 +1113,12 @@ def get_failed(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteBatchJobStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - 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. + Result returned by :meth:`dropbox.dropbox_client.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 @@ -1958,9 +1169,6 @@ def get_complete(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteBatchLaunch, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeleteBatchLaunch(%r, %r)' % (self._tag, self._value) - DeleteBatchLaunch_validator = bv.Union(DeleteBatchLaunch) class DeleteBatchResult(FileOpsResult): @@ -1972,7 +1180,6 @@ class DeleteBatchResult(FileOpsResult): __slots__ = [ '_entries_value', - '_entries_present', ] _has_required_fields = True @@ -1980,43 +1187,16 @@ class DeleteBatchResult(FileOpsResult): def __init__(self, entries=None): super(DeleteBatchResult, self).__init__() - self._entries_value = None - self._entries_present = False + self._entries_value = bb.NOT_SET if entries is not None: self.entries = entries - @property - def entries(self): - """ - Each entry in ``DeleteBatchArg.entries`` will appear at the same - position inside ``DeleteBatchResult.entries``. - - :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 + # Instance attribute type: list of [DeleteBatchResultEntry] (validator is set below) + entries = bb.Attribute("entries") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteBatchResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeleteBatchResult(entries={!r})'.format( - self._entries_value, - ) - DeleteBatchResult_validator = bv.Struct(DeleteBatchResult) class DeleteBatchResultData(bb.Struct): @@ -2026,49 +1206,22 @@ class DeleteBatchResultData(bb.Struct): __slots__ = [ '_metadata_value', - '_metadata_present', ] _has_required_fields = True def __init__(self, metadata=None): - self._metadata_value = None - self._metadata_present = False + self._metadata_value = bb.NOT_SET 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 + # Instance attribute type: Metadata (validator is set below) + metadata = bb.Attribute("metadata", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteBatchResultData, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeleteBatchResultData(metadata={!r})'.format( - self._metadata_value, - ) - DeleteBatchResultData_validator = bv.Struct(DeleteBatchResultData) class DeleteBatchResultEntry(bb.Union): @@ -2141,9 +1294,6 @@ def get_failure(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteBatchResultEntry, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeleteBatchResultEntry(%r, %r)' % (self._tag, self._value) - DeleteBatchResultEntry_validator = bv.Union(DeleteBatchResultEntry) class DeleteError(bb.Union): @@ -2251,9 +1401,6 @@ def get_path_write(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeleteError(%r, %r)' % (self._tag, self._value) - DeleteError_validator = bv.Union(DeleteError) class DeleteResult(FileOpsResult): @@ -2263,7 +1410,6 @@ class DeleteResult(FileOpsResult): __slots__ = [ '_metadata_value', - '_metadata_present', ] _has_required_fields = True @@ -2271,42 +1417,16 @@ class DeleteResult(FileOpsResult): def __init__(self, metadata=None): super(DeleteResult, self).__init__() - self._metadata_value = None - self._metadata_present = False + self._metadata_value = bb.NOT_SET 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 + # Instance attribute type: Metadata (validator is set below) + metadata = bb.Attribute("metadata", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeleteResult(metadata={!r})'.format( - self._metadata_value, - ) - DeleteResult_validator = bv.Struct(DeleteResult) class Metadata(bb.Struct): @@ -2323,8 +1443,8 @@ class Metadata(bb.Struct): 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. + :meth:`dropbox.dropbox_client.Dropbox.files_list_folder_continue`. This + field will be null if the file or folder is not mounted. :ivar files.Metadata.parent_shared_folder_id: Please use ``FileSharingInfo.parent_shared_folder_id`` or ``FolderSharingInfo.parent_shared_folder_id`` instead. @@ -2332,13 +1452,9 @@ class Metadata(bb.Struct): __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 @@ -2348,14 +1464,10 @@ def __init__(self, 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 + self._name_value = bb.NOT_SET + self._path_lower_value = bb.NOT_SET + self._path_display_value = bb.NOT_SET + self._parent_shared_folder_id_value = bb.NOT_SET if name is not None: self.name = name if path_lower is not None: @@ -2365,127 +1477,21 @@ def __init__(self, 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. + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - :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. + # Instance attribute type: str (validator is set below) + path_lower = bb.Attribute("path_lower", nullable=True) - :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. + # Instance attribute type: str (validator is set below) + path_display = bb.Attribute("path_display", nullable=True) - :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 + # Instance attribute type: str (validator is set below) + parent_shared_folder_id = bb.Attribute("parent_shared_folder_id", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(Metadata, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -2512,14 +1518,6 @@ def __init__(self, def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeletedMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -2532,9 +1530,7 @@ class Dimensions(bb.Struct): __slots__ = [ '_height_value', - '_height_present', '_width_value', - '_width_present', ] _has_required_fields = True @@ -2542,70 +1538,22 @@ class Dimensions(bb.Struct): def __init__(self, height=None, width=None): - self._height_value = None - self._height_present = False - self._width_value = None - self._width_present = False + self._height_value = bb.NOT_SET + self._width_value = bb.NOT_SET 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: int - """ - 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: int - """ - 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 + # Instance attribute type: int (validator is set below) + height = bb.Attribute("height") - @width.deleter - def width(self): - self._width_value = None - self._width_present = False + # Instance attribute type: int (validator is set below) + width = bb.Attribute("width") def _process_custom_annotations(self, annotation_type, field_path, processor): super(Dimensions, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'Dimensions(height={!r}, width={!r})'.format( - self._height_value, - self._width_value, - ) - Dimensions_validator = bv.Struct(Dimensions) class DownloadArg(bb.Struct): @@ -2616,9 +1564,7 @@ class DownloadArg(bb.Struct): __slots__ = [ '_path_value', - '_path_present', '_rev_value', - '_rev_present', ] _has_required_fields = True @@ -2626,73 +1572,22 @@ class DownloadArg(bb.Struct): def __init__(self, path=None, rev=None): - self._path_value = None - self._path_present = False - self._rev_value = None - self._rev_present = False + self._path_value = bb.NOT_SET + self._rev_value = bb.NOT_SET 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. + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") - :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 + # Instance attribute type: str (validator is set below) + rev = bb.Attribute("rev", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DownloadArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -2702,8 +1597,8 @@ class DownloadError(bb.Union): corresponding ``get_*`` method. :ivar files.DownloadError.unsupported_file: This file type cannot be - downloaded directly; use :meth:`dropbox.dropbox.Dropbox.files_export` - instead. + downloaded directly; use + :meth:`dropbox.dropbox_client.Dropbox.files_export` instead. """ _catch_all = 'other' @@ -2760,9 +1655,6 @@ def get_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DownloadError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DownloadError(%r, %r)' % (self._tag, self._value) - DownloadError_validator = bv.Union(DownloadError) class DownloadZipArg(bb.Struct): @@ -2772,49 +1664,22 @@ class DownloadZipArg(bb.Struct): __slots__ = [ '_path_value', - '_path_present', ] _has_required_fields = True def __init__(self, path=None): - self._path_value = None - self._path_present = False + self._path_value = bb.NOT_SET if path is not None: self.path = path - @property - def path(self): - """ - The path of the folder 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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DownloadZipArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DownloadZipArg(path={!r})'.format( - self._path_value, - ) - DownloadZipArg_validator = bv.Struct(DownloadZipArg) class DownloadZipError(bb.Union): @@ -2893,56 +1758,28 @@ def get_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DownloadZipError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DownloadZipError(%r, %r)' % (self._tag, self._value) - DownloadZipError_validator = bv.Union(DownloadZipError) class DownloadZipResult(bb.Struct): __slots__ = [ '_metadata_value', - '_metadata_present', ] _has_required_fields = True def __init__(self, metadata=None): - self._metadata_value = None - self._metadata_present = False + self._metadata_value = bb.NOT_SET if metadata is not None: self.metadata = metadata - @property - def metadata(self): - """ - :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 + # Instance attribute type: FolderMetadata (validator is set below) + metadata = bb.Attribute("metadata", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DownloadZipResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DownloadZipResult(metadata={!r})'.format( - self._metadata_value, - ) - DownloadZipResult_validator = bv.Struct(DownloadZipResult) class ExportArg(bb.Struct): @@ -2952,49 +1789,22 @@ class ExportArg(bb.Struct): __slots__ = [ '_path_value', - '_path_present', ] _has_required_fields = True def __init__(self, path=None): - self._path_value = None - self._path_present = False + self._path_value = bb.NOT_SET if path is not None: self.path = path - @property - def path(self): - """ - The path of the file to be exported. - - :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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExportArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExportArg(path={!r})'.format( - self._path_value, - ) - ExportArg_validator = bv.Struct(ExportArg) class ExportError(bb.Union): @@ -3004,7 +1814,7 @@ class ExportError(bb.Union): corresponding ``get_*`` method. :ivar files.ExportError.non_exportable: This file type cannot be exported. - Use :meth:`dropbox.dropbox.Dropbox.files_download` instead. + Use :meth:`dropbox.dropbox_client.Dropbox.files_download` instead. :ivar files.ExportError.retry_error: The exportable content is not yet available. Please retry later. """ @@ -3073,9 +1883,6 @@ def get_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExportError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExportError(%r, %r)' % (self._tag, self._value) - ExportError_validator = bv.Union(ExportError) class ExportInfo(bb.Struct): @@ -3088,52 +1895,22 @@ class ExportInfo(bb.Struct): __slots__ = [ '_export_as_value', - '_export_as_present', ] _has_required_fields = False def __init__(self, export_as=None): - self._export_as_value = None - self._export_as_present = False + self._export_as_value = bb.NOT_SET if export_as is not None: self.export_as = export_as - @property - def export_as(self): - """ - Format to which the file can be exported to. - - :rtype: str - """ - if self._export_as_present: - return self._export_as_value - else: - return None - - @export_as.setter - def export_as(self, val): - if val is None: - del self.export_as - return - val = self._export_as_validator.validate(val) - self._export_as_value = val - self._export_as_present = True - - @export_as.deleter - def export_as(self): - self._export_as_value = None - self._export_as_present = False + # Instance attribute type: str (validator is set below) + export_as = bb.Attribute("export_as", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExportInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExportInfo(export_as={!r})'.format( - self._export_as_value, - ) - ExportInfo_validator = bv.Struct(ExportInfo) class ExportMetadata(bb.Struct): @@ -3149,11 +1926,8 @@ class ExportMetadata(bb.Struct): __slots__ = [ '_name_value', - '_name_present', '_size_value', - '_size_present', '_export_hash_value', - '_export_hash_present', ] _has_required_fields = True @@ -3162,12 +1936,9 @@ def __init__(self, name=None, size=None, export_hash=None): - self._name_value = None - self._name_present = False - self._size_value = None - self._size_present = False - self._export_hash_value = None - self._export_hash_present = False + self._name_value = bb.NOT_SET + self._size_value = bb.NOT_SET + self._export_hash_value = bb.NOT_SET if name is not None: self.name = name if size is not None: @@ -3175,92 +1946,18 @@ def __init__(self, if export_hash is not None: self.export_hash = export_hash - @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 size(self): - """ - The file size in bytes. - - :rtype: int - """ - 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 + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - @size.deleter - def size(self): - self._size_value = None - self._size_present = False + # Instance attribute type: int (validator is set below) + size = bb.Attribute("size") - @property - def export_hash(self): - """ - A hash based on the exported file content. This field can be used to - verify data integrity. Similar to content hash. For more information see - our `Content hash - `_ page. - - :rtype: str - """ - if self._export_hash_present: - return self._export_hash_value - else: - return None - - @export_hash.setter - def export_hash(self, val): - if val is None: - del self.export_hash - return - val = self._export_hash_validator.validate(val) - self._export_hash_value = val - self._export_hash_present = True - - @export_hash.deleter - def export_hash(self): - self._export_hash_value = None - self._export_hash_present = False + # Instance attribute type: str (validator is set below) + export_hash = bb.Attribute("export_hash", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExportMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExportMetadata(name={!r}, size={!r}, export_hash={!r})'.format( - self._name_value, - self._size_value, - self._export_hash_value, - ) - ExportMetadata_validator = bv.Struct(ExportMetadata) class ExportResult(bb.Struct): @@ -3272,9 +1969,7 @@ class ExportResult(bb.Struct): __slots__ = [ '_export_metadata_value', - '_export_metadata_present', '_file_metadata_value', - '_file_metadata_present', ] _has_required_fields = True @@ -3282,70 +1977,22 @@ class ExportResult(bb.Struct): def __init__(self, export_metadata=None, file_metadata=None): - self._export_metadata_value = None - self._export_metadata_present = False - self._file_metadata_value = None - self._file_metadata_present = False + self._export_metadata_value = bb.NOT_SET + self._file_metadata_value = bb.NOT_SET if export_metadata is not None: self.export_metadata = export_metadata if file_metadata is not None: self.file_metadata = file_metadata - @property - def export_metadata(self): - """ - Metadata for the exported version of the file. - - :rtype: ExportMetadata - """ - if self._export_metadata_present: - return self._export_metadata_value - else: - raise AttributeError("missing required field 'export_metadata'") - - @export_metadata.setter - def export_metadata(self, val): - self._export_metadata_validator.validate_type_only(val) - self._export_metadata_value = val - self._export_metadata_present = True - - @export_metadata.deleter - def export_metadata(self): - self._export_metadata_value = None - self._export_metadata_present = False + # Instance attribute type: ExportMetadata (validator is set below) + export_metadata = bb.Attribute("export_metadata", user_defined=True) - @property - def file_metadata(self): - """ - Metadata for the original file. - - :rtype: FileMetadata - """ - if self._file_metadata_present: - return self._file_metadata_value - else: - raise AttributeError("missing required field 'file_metadata'") - - @file_metadata.setter - def file_metadata(self, val): - self._file_metadata_validator.validate_type_only(val) - self._file_metadata_value = val - self._file_metadata_present = True - - @file_metadata.deleter - def file_metadata(self): - self._file_metadata_value = None - self._file_metadata_present = False + # Instance attribute type: FileMetadata (validator is set below) + file_metadata = bb.Attribute("file_metadata", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExportResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExportResult(export_metadata={!r}, file_metadata={!r})'.format( - self._export_metadata_value, - self._file_metadata_value, - ) - ExportResult_validator = bv.Struct(ExportResult) class FileCategory(bb.Union): @@ -3482,9 +2129,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileCategory, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileCategory(%r, %r)' % (self._tag, self._value) - FileCategory_validator = bv.Union(FileCategory) class FileLock(bb.Struct): @@ -3494,49 +2138,22 @@ class FileLock(bb.Struct): __slots__ = [ '_content_value', - '_content_present', ] _has_required_fields = True def __init__(self, content=None): - self._content_value = None - self._content_present = False + self._content_value = bb.NOT_SET if content is not None: self.content = content - @property - def content(self): - """ - The lock description. - - :rtype: FileLockContent - """ - if self._content_present: - return self._content_value - else: - raise AttributeError("missing required field 'content'") - - @content.setter - def content(self, val): - self._content_validator.validate_type_only(val) - self._content_value = val - self._content_present = True - - @content.deleter - def content(self): - self._content_value = None - self._content_present = False + # Instance attribute type: FileLockContent (validator is set below) + content = bb.Attribute("content", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileLock, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileLock(content={!r})'.format( - self._content_value, - ) - FileLock_validator = bv.Struct(FileLock) class FileLockContent(bb.Union): @@ -3606,9 +2223,6 @@ def get_single_user(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileLockContent, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileLockContent(%r, %r)' % (self._tag, self._value) - FileLockContent_validator = bv.Union(FileLockContent) class FileLockMetadata(bb.Struct): @@ -3624,13 +2238,9 @@ class FileLockMetadata(bb.Struct): __slots__ = [ '_is_lockholder_value', - '_is_lockholder_present', '_lockholder_name_value', - '_lockholder_name_present', '_lockholder_account_id_value', - '_lockholder_account_id_present', '_created_value', - '_created_present', ] _has_required_fields = False @@ -3640,14 +2250,10 @@ def __init__(self, lockholder_name=None, lockholder_account_id=None, created=None): - self._is_lockholder_value = None - self._is_lockholder_present = False - self._lockholder_name_value = None - self._lockholder_name_present = False - self._lockholder_account_id_value = None - self._lockholder_account_id_present = False - self._created_value = None - self._created_present = False + self._is_lockholder_value = bb.NOT_SET + self._lockholder_name_value = bb.NOT_SET + self._lockholder_account_id_value = bb.NOT_SET + self._created_value = bb.NOT_SET if is_lockholder is not None: self.is_lockholder = is_lockholder if lockholder_name is not None: @@ -3657,121 +2263,21 @@ def __init__(self, if created is not None: self.created = created - @property - def is_lockholder(self): - """ - True if caller holds the file lock. + # Instance attribute type: bool (validator is set below) + is_lockholder = bb.Attribute("is_lockholder", nullable=True) - :rtype: bool - """ - if self._is_lockholder_present: - return self._is_lockholder_value - else: - return None + # Instance attribute type: str (validator is set below) + lockholder_name = bb.Attribute("lockholder_name", nullable=True) - @is_lockholder.setter - def is_lockholder(self, val): - if val is None: - del self.is_lockholder - return - val = self._is_lockholder_validator.validate(val) - self._is_lockholder_value = val - self._is_lockholder_present = True + # Instance attribute type: str (validator is set below) + lockholder_account_id = bb.Attribute("lockholder_account_id", nullable=True) - @is_lockholder.deleter - def is_lockholder(self): - self._is_lockholder_value = None - self._is_lockholder_present = False - - @property - def lockholder_name(self): - """ - The display name of the lock holder. - - :rtype: str - """ - if self._lockholder_name_present: - return self._lockholder_name_value - else: - return None - - @lockholder_name.setter - def lockholder_name(self, val): - if val is None: - del self.lockholder_name - return - val = self._lockholder_name_validator.validate(val) - self._lockholder_name_value = val - self._lockholder_name_present = True - - @lockholder_name.deleter - def lockholder_name(self): - self._lockholder_name_value = None - self._lockholder_name_present = False - - @property - def lockholder_account_id(self): - """ - The account ID of the lock holder if known. - - :rtype: str - """ - if self._lockholder_account_id_present: - return self._lockholder_account_id_value - else: - return None - - @lockholder_account_id.setter - def lockholder_account_id(self, val): - if val is None: - del self.lockholder_account_id - return - val = self._lockholder_account_id_validator.validate(val) - self._lockholder_account_id_value = val - self._lockholder_account_id_present = True - - @lockholder_account_id.deleter - def lockholder_account_id(self): - self._lockholder_account_id_value = None - self._lockholder_account_id_present = False - - @property - def created(self): - """ - The timestamp of the lock 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 + # Instance attribute type: datetime.datetime (validator is set below) + created = bb.Attribute("created", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileLockMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileLockMetadata(is_lockholder={!r}, lockholder_name={!r}, lockholder_account_id={!r}, created={!r})'.format( - self._is_lockholder_value, - self._lockholder_name_value, - self._lockholder_account_id_value, - self._created_value, - ) - FileLockMetadata_validator = bv.Struct(FileLockMetadata) class FileMetadata(Metadata): @@ -3791,10 +2297,10 @@ class FileMetadata(Metadata): :ivar files.FileMetadata.size: The file size in bytes. :ivar files.FileMetadata.media_info: Additional information if the file is a photo or video. This field will not be set on entries returned by - :meth:`dropbox.dropbox.Dropbox.files_list_folder`, - :meth:`dropbox.dropbox.Dropbox.files_list_folder_continue`, or - :meth:`dropbox.dropbox.Dropbox.files_get_thumbnail_batch`, starting - December 2, 2019. + :meth:`dropbox.dropbox_client.Dropbox.files_list_folder`, + :meth:`dropbox.dropbox_client.Dropbox.files_list_folder_continue`, or + :meth:`dropbox.dropbox_client.Dropbox.files_get_thumbnail_batch`, + starting December 2, 2019. :ivar files.FileMetadata.symlink_info: Set if this file is a symlink. :ivar files.FileMetadata.sharing_info: Set if this file is contained in a shared folder. @@ -3807,12 +2313,12 @@ class FileMetadata(Metadata): has custom properties with the property template specified. :ivar files.FileMetadata.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. + :meth:`dropbox.dropbox_client.Dropbox.files_list_folder` or + :meth:`dropbox.dropbox_client.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 files.FileMetadata.content_hash: A hash of the file content. This field can be used to verify data integrity. For more information see our `Content hash @@ -3823,33 +2329,19 @@ class FileMetadata(Metadata): __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', '_symlink_info_value', - '_symlink_info_present', '_sharing_info_value', - '_sharing_info_present', '_is_downloadable_value', - '_is_downloadable_present', '_export_info_value', - '_export_info_present', '_property_groups_value', - '_property_groups_present', '_has_explicit_shared_members_value', - '_has_explicit_shared_members_present', '_content_hash_value', - '_content_hash_present', '_file_lock_info_value', - '_file_lock_info_present', ] _has_required_fields = True @@ -3877,34 +2369,20 @@ def __init__(self, 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._symlink_info_value = None - self._symlink_info_present = False - self._sharing_info_value = None - self._sharing_info_present = False - self._is_downloadable_value = None - self._is_downloadable_present = False - self._export_info_value = None - self._export_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 - self._file_lock_info_value = None - self._file_lock_info_present = False + self._id_value = bb.NOT_SET + self._client_modified_value = bb.NOT_SET + self._server_modified_value = bb.NOT_SET + self._rev_value = bb.NOT_SET + self._size_value = bb.NOT_SET + self._media_info_value = bb.NOT_SET + self._symlink_info_value = bb.NOT_SET + self._sharing_info_value = bb.NOT_SET + self._is_downloadable_value = bb.NOT_SET + self._export_info_value = bb.NOT_SET + self._property_groups_value = bb.NOT_SET + self._has_explicit_shared_members_value = bb.NOT_SET + self._content_hash_value = bb.NOT_SET + self._file_lock_info_value = bb.NOT_SET if id is not None: self.id = id if client_modified is not None: @@ -3934,399 +2412,51 @@ def __init__(self, if file_lock_info is not None: self.file_lock_info = file_lock_info - @property - def id(self): - """ - A unique identifier for the file. + # Instance attribute type: str (validator is set below) + id = bb.Attribute("id") - :rtype: str - """ - if self._id_present: - return self._id_value - else: - raise AttributeError("missing required field 'id'") + # Instance attribute type: datetime.datetime (validator is set below) + client_modified = bb.Attribute("client_modified") - @id.setter - def id(self, val): - val = self._id_validator.validate(val) - self._id_value = val - self._id_present = True + # Instance attribute type: datetime.datetime (validator is set below) + server_modified = bb.Attribute("server_modified") - @id.deleter - def id(self): - self._id_value = None - self._id_present = False + # Instance attribute type: str (validator is set below) + rev = bb.Attribute("rev") - @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'") + # Instance attribute type: int (validator is set below) + size = bb.Attribute("size") - @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 + # Instance attribute type: MediaInfo (validator is set below) + media_info = bb.Attribute("media_info", nullable=True, user_defined=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. + # Instance attribute type: SymlinkInfo (validator is set below) + symlink_info = bb.Attribute("symlink_info", nullable=True, user_defined=True) - :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: int - """ - 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. This field will - not be set on entries returned by - :meth:`dropbox.dropbox.Dropbox.files_list_folder`, - :meth:`dropbox.dropbox.Dropbox.files_list_folder_continue`, or - :meth:`dropbox.dropbox.Dropbox.files_get_thumbnail_batch`, starting - December 2, 2019. - - :rtype: MediaInfo - """ - if self._media_info_present: - return self._media_info_value - else: - return None + # Instance attribute type: FileSharingInfo (validator is set below) + sharing_info = bb.Attribute("sharing_info", nullable=True, user_defined=True) - @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 symlink_info(self): - """ - Set if this file is a symlink. - - :rtype: SymlinkInfo - """ - if self._symlink_info_present: - return self._symlink_info_value - else: - return None - - @symlink_info.setter - def symlink_info(self, val): - if val is None: - del self.symlink_info - return - self._symlink_info_validator.validate_type_only(val) - self._symlink_info_value = val - self._symlink_info_present = True - - @symlink_info.deleter - def symlink_info(self): - self._symlink_info_value = None - self._symlink_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 is_downloadable(self): - """ - If true, file can be downloaded directly; else the file must be - exported. - - :rtype: bool - """ - if self._is_downloadable_present: - return self._is_downloadable_value - else: - return True - - @is_downloadable.setter - def is_downloadable(self, val): - val = self._is_downloadable_validator.validate(val) - self._is_downloadable_value = val - self._is_downloadable_present = True - - @is_downloadable.deleter - def is_downloadable(self): - self._is_downloadable_value = None - self._is_downloadable_present = False - - @property - def export_info(self): - """ - Information about format this file can be exported to. This filed must - be set if ``is_downloadable`` is set to false. - - :rtype: ExportInfo - """ - if self._export_info_present: - return self._export_info_value - else: - return None - - @export_info.setter - def export_info(self, val): - if val is None: - del self.export_info - return - self._export_info_validator.validate_type_only(val) - self._export_info_value = val - self._export_info_present = True - - @export_info.deleter - def export_info(self): - self._export_info_value = None - self._export_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] - """ - 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. + # Instance attribute type: bool (validator is set below) + is_downloadable = bb.Attribute("is_downloadable") - :rtype: bool - """ - if self._has_explicit_shared_members_present: - return self._has_explicit_shared_members_value - else: - return None + # Instance attribute type: ExportInfo (validator is set below) + export_info = bb.Attribute("export_info", nullable=True, user_defined=True) - @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 + # Instance attribute type: list of [file_properties.PropertyGroup] (validator is set below) + property_groups = bb.Attribute("property_groups", nullable=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 + # Instance attribute type: bool (validator is set below) + has_explicit_shared_members = bb.Attribute("has_explicit_shared_members", nullable=True) - @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. + # Instance attribute type: str (validator is set below) + content_hash = bb.Attribute("content_hash", nullable=True) - :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 - - @property - def file_lock_info(self): - """ - If present, the metadata associated with the file's current lock. - - :rtype: FileLockMetadata - """ - if self._file_lock_info_present: - return self._file_lock_info_value - else: - return None - - @file_lock_info.setter - def file_lock_info(self, val): - if val is None: - del self.file_lock_info - return - self._file_lock_info_validator.validate_type_only(val) - self._file_lock_info_value = val - self._file_lock_info_present = True - - @file_lock_info.deleter - def file_lock_info(self): - self._file_lock_info_value = None - self._file_lock_info_present = False + # Instance attribute type: FileLockMetadata (validator is set below) + file_lock_info = bb.Attribute("file_lock_info", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - 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}, symlink_info={!r}, sharing_info={!r}, is_downloadable={!r}, export_info={!r}, property_groups={!r}, has_explicit_shared_members={!r}, content_hash={!r}, file_lock_info={!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._symlink_info_value, - self._sharing_info_value, - self._is_downloadable_value, - self._export_info_value, - self._property_groups_value, - self._has_explicit_shared_members_value, - self._content_hash_value, - self._file_lock_info_value, - ) - FileMetadata_validator = bv.Struct(FileMetadata) class SharingInfo(bb.Struct): @@ -4339,49 +2469,22 @@ class SharingInfo(bb.Struct): __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 + self._read_only_value = bb.NOT_SET 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 + # Instance attribute type: bool (validator is set below) + read_only = bb.Attribute("read_only") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharingInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharingInfo(read_only={!r})'.format( - self._read_only_value, - ) - SharingInfo_validator = bv.Struct(SharingInfo) class FileSharingInfo(SharingInfo): @@ -4396,9 +2499,7 @@ class FileSharingInfo(SharingInfo): __slots__ = [ '_parent_shared_folder_id_value', - '_parent_shared_folder_id_present', '_modified_by_value', - '_modified_by_present', ] _has_required_fields = True @@ -4408,75 +2509,22 @@ def __init__(self, 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 + self._parent_shared_folder_id_value = bb.NOT_SET + self._modified_by_value = bb.NOT_SET 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. + # Instance attribute type: str (validator is set below) + parent_shared_folder_id = bb.Attribute("parent_shared_folder_id") - :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 + # Instance attribute type: str (validator is set below) + modified_by = bb.Attribute("modified_by", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileSharingInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 FileStatus(bb.Union): @@ -4521,9 +2569,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileStatus(%r, %r)' % (self._tag, self._value) - FileStatus_validator = bv.Union(FileStatus) class FolderMetadata(Metadata): @@ -4541,13 +2586,9 @@ class FolderMetadata(Metadata): __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 @@ -4565,14 +2606,10 @@ def __init__(self, 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 + self._id_value = bb.NOT_SET + self._shared_folder_id_value = bb.NOT_SET + self._sharing_info_value = bb.NOT_SET + self._property_groups_value = bb.NOT_SET if id is not None: self.id = id if shared_folder_id is not None: @@ -4582,126 +2619,21 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + id = bb.Attribute("id") - @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. Note that only properties associated with - user-owned templates, not team-owned templates, can be attached to - folders. + # Instance attribute type: str (validator is set below) + shared_folder_id = bb.Attribute("shared_folder_id", nullable=True) - :rtype: list of [file_properties.PropertyGroup] - """ - if self._property_groups_present: - return self._property_groups_value - else: - return None + # Instance attribute type: FolderSharingInfo (validator is set below) + sharing_info = bb.Attribute("sharing_info", nullable=True, user_defined=True) - @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 + # Instance attribute type: list of [file_properties.PropertyGroup] (validator is set below) + property_groups = bb.Attribute("property_groups", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FolderMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -4724,13 +2656,9 @@ class FolderSharingInfo(SharingInfo): __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 @@ -4742,14 +2670,10 @@ def __init__(self, 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 + self._parent_shared_folder_id_value = bb.NOT_SET + self._shared_folder_id_value = bb.NOT_SET + self._traverse_only_value = bb.NOT_SET + self._no_access_value = bb.NOT_SET if parent_shared_folder_id is not None: self.parent_shared_folder_id = parent_shared_folder_id if shared_folder_id is not None: @@ -4759,120 +2683,21 @@ def __init__(self, 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. + # Instance attribute type: str (validator is set below) + parent_shared_folder_id = bb.Attribute("parent_shared_folder_id", nullable=True) - :rtype: str - """ - if self._parent_shared_folder_id_present: - return self._parent_shared_folder_id_value - else: - return None + # Instance attribute type: str (validator is set below) + shared_folder_id = bb.Attribute("shared_folder_id", nullable=True) - @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 + # Instance attribute type: bool (validator is set below) + traverse_only = bb.Attribute("traverse_only") - @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 + # Instance attribute type: bool (validator is set below) + no_access = bb.Attribute("no_access") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FolderSharingInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -4883,49 +2708,22 @@ class GetCopyReferenceArg(bb.Struct): __slots__ = [ '_path_value', - '_path_present', ] _has_required_fields = True def __init__(self, path=None): - self._path_value = None - self._path_present = False + self._path_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetCopyReferenceArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetCopyReferenceArg(path={!r})'.format( - self._path_value, - ) - GetCopyReferenceArg_validator = bv.Struct(GetCopyReferenceArg) class GetCopyReferenceError(bb.Union): @@ -4979,9 +2777,6 @@ def get_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetCopyReferenceError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetCopyReferenceError(%r, %r)' % (self._tag, self._value) - GetCopyReferenceError_validator = bv.Union(GetCopyReferenceError) class GetCopyReferenceResult(bb.Struct): @@ -4996,11 +2791,8 @@ class GetCopyReferenceResult(bb.Struct): __slots__ = [ '_metadata_value', - '_metadata_present', '_copy_reference_value', - '_copy_reference_present', '_expires_value', - '_expires_present', ] _has_required_fields = True @@ -5009,12 +2801,9 @@ 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 + self._metadata_value = bb.NOT_SET + self._copy_reference_value = bb.NOT_SET + self._expires_value = bb.NOT_SET if metadata is not None: self.metadata = metadata if copy_reference is not None: @@ -5022,87 +2811,18 @@ def __init__(self, if expires is not None: self.expires = expires - @property - def metadata(self): - """ - Metadata of the file or folder. + # Instance attribute type: Metadata (validator is set below) + metadata = bb.Attribute("metadata", user_defined=True) - :rtype: Metadata - """ - if self._metadata_present: - return self._metadata_value - else: - raise AttributeError("missing required field 'metadata'") + # Instance attribute type: str (validator is set below) + copy_reference = bb.Attribute("copy_reference") - @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 + # Instance attribute type: datetime.datetime (validator is set below) + expires = bb.Attribute("expires") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetCopyReferenceResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -5113,49 +2833,22 @@ class GetTemporaryLinkArg(bb.Struct): __slots__ = [ '_path_value', - '_path_present', ] _has_required_fields = True def __init__(self, path=None): - self._path_value = None - self._path_present = False + self._path_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetTemporaryLinkArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetTemporaryLinkArg(path={!r})'.format( - self._path_value, - ) - GetTemporaryLinkArg_validator = bv.Struct(GetTemporaryLinkArg) class GetTemporaryLinkError(bb.Union): @@ -5169,8 +2862,8 @@ class GetTemporaryLinkError(bb.Union): accounts with a verified email address. Users can verify their email address `here `_. :ivar files.GetTemporaryLinkError.unsupported_file: Cannot get temporary - link to this file type; use :meth:`dropbox.dropbox.Dropbox.files_export` - instead. + link to this file type; use + :meth:`dropbox.dropbox_client.Dropbox.files_export` instead. """ _catch_all = 'other' @@ -5237,9 +2930,6 @@ def get_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetTemporaryLinkError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetTemporaryLinkError(%r, %r)' % (self._tag, self._value) - GetTemporaryLinkError_validator = bv.Union(GetTemporaryLinkError) class GetTemporaryLinkResult(bb.Struct): @@ -5251,9 +2941,7 @@ class GetTemporaryLinkResult(bb.Struct): __slots__ = [ '_metadata_value', - '_metadata_present', '_link_value', - '_link_present', ] _has_required_fields = True @@ -5261,77 +2949,30 @@ class GetTemporaryLinkResult(bb.Struct): def __init__(self, metadata=None, link=None): - self._metadata_value = None - self._metadata_present = False - self._link_value = None - self._link_present = False + self._metadata_value = bb.NOT_SET + self._link_value = bb.NOT_SET 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 + # Instance attribute type: FileMetadata (validator is set below) + metadata = bb.Attribute("metadata", user_defined=True) - @link.deleter - def link(self): - self._link_value = None - self._link_present = False + # Instance attribute type: str (validator is set below) + link = bb.Attribute("link") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetTemporaryLinkResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetTemporaryLinkResult(metadata={!r}, link={!r})'.format( - self._metadata_value, - self._link_value, - ) - GetTemporaryLinkResult_validator = bv.Struct(GetTemporaryLinkResult) class GetTemporaryUploadLinkArg(bb.Struct): """ :ivar files.GetTemporaryUploadLinkArg.commit_info: Contains the path and other optional modifiers for the future upload commit. Equivalent to the - parameters provided to :meth:`dropbox.dropbox.Dropbox.files_upload`. + parameters provided to + :meth:`dropbox.dropbox_client.Dropbox.files_upload`. :ivar files.GetTemporaryUploadLinkArg.duration: How long before this link expires, in seconds. Attempting to start an upload with this link longer than this period of time after link creation will result in an @@ -5340,9 +2981,7 @@ class GetTemporaryUploadLinkArg(bb.Struct): __slots__ = [ '_commit_info_value', - '_commit_info_present', '_duration_value', - '_duration_present', ] _has_required_fields = True @@ -5350,74 +2989,22 @@ class GetTemporaryUploadLinkArg(bb.Struct): def __init__(self, commit_info=None, duration=None): - self._commit_info_value = None - self._commit_info_present = False - self._duration_value = None - self._duration_present = False + self._commit_info_value = bb.NOT_SET + self._duration_value = bb.NOT_SET if commit_info is not None: self.commit_info = commit_info if duration is not None: self.duration = duration - @property - def commit_info(self): - """ - Contains the path and other optional modifiers for the future upload - commit. Equivalent to the parameters provided to - :meth:`dropbox.dropbox.Dropbox.files_upload`. - - :rtype: CommitInfo - """ - if self._commit_info_present: - return self._commit_info_value - else: - raise AttributeError("missing required field 'commit_info'") - - @commit_info.setter - def commit_info(self, val): - self._commit_info_validator.validate_type_only(val) - self._commit_info_value = val - self._commit_info_present = True - - @commit_info.deleter - def commit_info(self): - self._commit_info_value = None - self._commit_info_present = False - - @property - def duration(self): - """ - How long before this link expires, in seconds. Attempting to start an - upload with this link longer than this period of time after link - creation will result in an error. - - :rtype: float - """ - if self._duration_present: - return self._duration_value - else: - return 14400.0 + # Instance attribute type: CommitInfo (validator is set below) + commit_info = bb.Attribute("commit_info", user_defined=True) - @duration.setter - def duration(self, val): - 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 + # Instance attribute type: float (validator is set below) + duration = bb.Attribute("duration") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetTemporaryUploadLinkArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetTemporaryUploadLinkArg(commit_info={!r}, duration={!r})'.format( - self._commit_info_value, - self._duration_value, - ) - GetTemporaryUploadLinkArg_validator = bv.Struct(GetTemporaryUploadLinkArg) class GetTemporaryUploadLinkResult(bb.Struct): @@ -5428,104 +3015,50 @@ class GetTemporaryUploadLinkResult(bb.Struct): __slots__ = [ '_link_value', - '_link_present', ] _has_required_fields = True def __init__(self, link=None): - self._link_value = None - self._link_present = False + self._link_value = bb.NOT_SET if link is not None: self.link = link - @property - def link(self): - """ - The temporary link which can be used to stream a file to a Dropbox - location. - - :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 + # Instance attribute type: str (validator is set below) + link = bb.Attribute("link") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetTemporaryUploadLinkResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetTemporaryUploadLinkResult(link={!r})'.format( - self._link_value, - ) - GetTemporaryUploadLinkResult_validator = bv.Struct(GetTemporaryUploadLinkResult) class GetThumbnailBatchArg(bb.Struct): """ - Arguments for :meth:`dropbox.dropbox.Dropbox.files_get_thumbnail_batch`. + Arguments for + :meth:`dropbox.dropbox_client.Dropbox.files_get_thumbnail_batch`. :ivar files.GetThumbnailBatchArg.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 + self._entries_value = bb.NOT_SET 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 + # Instance attribute type: list of [ThumbnailArg] (validator is set below) + entries = bb.Attribute("entries") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetThumbnailBatchArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetThumbnailBatchArg(entries={!r})'.format( - self._entries_value, - ) - GetThumbnailBatchArg_validator = bv.Struct(GetThumbnailBatchArg) class GetThumbnailBatchError(bb.Union): @@ -5563,9 +3096,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetThumbnailBatchError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetThumbnailBatchError(%r, %r)' % (self._tag, self._value) - GetThumbnailBatchError_validator = bv.Union(GetThumbnailBatchError) class GetThumbnailBatchResult(bb.Struct): @@ -5576,49 +3106,22 @@ class GetThumbnailBatchResult(bb.Struct): __slots__ = [ '_entries_value', - '_entries_present', ] _has_required_fields = True def __init__(self, entries=None): - self._entries_value = None - self._entries_present = False + self._entries_value = bb.NOT_SET 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 + # Instance attribute type: list of [GetThumbnailBatchResultEntry] (validator is set below) + entries = bb.Attribute("entries") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetThumbnailBatchResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetThumbnailBatchResult(entries={!r})'.format( - self._entries_value, - ) - GetThumbnailBatchResult_validator = bv.Struct(GetThumbnailBatchResult) class GetThumbnailBatchResultData(bb.Struct): @@ -5629,9 +3132,7 @@ class GetThumbnailBatchResultData(bb.Struct): __slots__ = [ '_metadata_value', - '_metadata_present', '_thumbnail_value', - '_thumbnail_present', ] _has_required_fields = True @@ -5639,68 +3140,22 @@ class GetThumbnailBatchResultData(bb.Struct): def __init__(self, metadata=None, thumbnail=None): - self._metadata_value = None - self._metadata_present = False - self._thumbnail_value = None - self._thumbnail_present = False + self._metadata_value = bb.NOT_SET + self._thumbnail_value = bb.NOT_SET 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 + # Instance attribute type: FileMetadata (validator is set below) + metadata = bb.Attribute("metadata", user_defined=True) - @metadata.deleter - def metadata(self): - self._metadata_value = None - self._metadata_present = False - - @property - def thumbnail(self): - """ - A string containing the base64-encoded thumbnail data for this file. - - :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 + # Instance attribute type: str (validator is set below) + thumbnail = bb.Attribute("thumbnail") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetThumbnailBatchResultData, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -5788,9 +3243,6 @@ def get_failure(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetThumbnailBatchResultEntry, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetThumbnailBatchResultEntry(%r, %r)' % (self._tag, self._value) - GetThumbnailBatchResultEntry_validator = bv.Union(GetThumbnailBatchResultEntry) class GpsCoordinates(bb.Struct): @@ -5803,9 +3255,7 @@ class GpsCoordinates(bb.Struct): __slots__ = [ '_latitude_value', - '_latitude_present', '_longitude_value', - '_longitude_present', ] _has_required_fields = True @@ -5813,70 +3263,22 @@ class GpsCoordinates(bb.Struct): def __init__(self, latitude=None, longitude=None): - self._latitude_value = None - self._latitude_present = False - self._longitude_value = None - self._longitude_present = False + self._latitude_value = bb.NOT_SET + self._longitude_value = bb.NOT_SET 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'") + # Instance attribute type: float (validator is set below) + latitude = bb.Attribute("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 + # Instance attribute type: float (validator is set below) + longitude = bb.Attribute("longitude") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GpsCoordinates, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GpsCoordinates(latitude={!r}, longitude={!r})'.format( - self._latitude_value, - self._longitude_value, - ) - GpsCoordinates_validator = bv.Struct(GpsCoordinates) class HighlightSpan(bb.Struct): @@ -5889,9 +3291,7 @@ class HighlightSpan(bb.Struct): __slots__ = [ '_highlight_str_value', - '_highlight_str_present', '_is_highlighted_value', - '_is_highlighted_present', ] _has_required_fields = True @@ -5899,70 +3299,22 @@ class HighlightSpan(bb.Struct): def __init__(self, highlight_str=None, is_highlighted=None): - self._highlight_str_value = None - self._highlight_str_present = False - self._is_highlighted_value = None - self._is_highlighted_present = False + self._highlight_str_value = bb.NOT_SET + self._is_highlighted_value = bb.NOT_SET if highlight_str is not None: self.highlight_str = highlight_str if is_highlighted is not None: self.is_highlighted = is_highlighted - @property - def highlight_str(self): - """ - String to be determined whether it should be highlighted or not. - - :rtype: str - """ - if self._highlight_str_present: - return self._highlight_str_value - else: - raise AttributeError("missing required field 'highlight_str'") + # Instance attribute type: str (validator is set below) + highlight_str = bb.Attribute("highlight_str") - @highlight_str.setter - def highlight_str(self, val): - val = self._highlight_str_validator.validate(val) - self._highlight_str_value = val - self._highlight_str_present = True - - @highlight_str.deleter - def highlight_str(self): - self._highlight_str_value = None - self._highlight_str_present = False - - @property - def is_highlighted(self): - """ - The string should be highlighted or not. - - :rtype: bool - """ - if self._is_highlighted_present: - return self._is_highlighted_value - else: - raise AttributeError("missing required field 'is_highlighted'") - - @is_highlighted.setter - def is_highlighted(self, val): - val = self._is_highlighted_validator.validate(val) - self._is_highlighted_value = val - self._is_highlighted_present = True - - @is_highlighted.deleter - def is_highlighted(self): - self._is_highlighted_value = None - self._is_highlighted_present = False + # Instance attribute type: bool (validator is set below) + is_highlighted = bb.Attribute("is_highlighted") def _process_custom_annotations(self, annotation_type, field_path, processor): super(HighlightSpan, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'HighlightSpan(highlight_str={!r}, is_highlighted={!r})'.format( - self._highlight_str_value, - self._is_highlighted_value, - ) - HighlightSpan_validator = bv.Struct(HighlightSpan) class ListFolderArg(bb.Struct): @@ -5999,405 +3351,121 @@ class ListFolderArg(bb.Struct): __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', - '_include_property_groups_value', - '_include_property_groups_present', - '_include_non_downloadable_files_value', - '_include_non_downloadable_files_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, - include_property_groups=None, - include_non_downloadable_files=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 - self._include_property_groups_value = None - self._include_property_groups_present = False - self._include_non_downloadable_files_value = None - self._include_non_downloadable_files_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 - if include_property_groups is not None: - self.include_property_groups = include_property_groups - if include_non_downloadable_files is not None: - self.include_non_downloadable_files = include_non_downloadable_files - - @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. This - parameter will no longer have an effect starting December 2, 2019. - - :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_property_groups_value', + '_include_non_downloadable_files_value', + ] - @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 + _has_required_fields = True - @include_mounted_folders.deleter - def include_mounted_folders(self): - self._include_mounted_folders_value = None - self._include_mounted_folders_present = False + 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, + include_property_groups=None, + include_non_downloadable_files=None): + self._path_value = bb.NOT_SET + self._recursive_value = bb.NOT_SET + self._include_media_info_value = bb.NOT_SET + self._include_deleted_value = bb.NOT_SET + self._include_has_explicit_shared_members_value = bb.NOT_SET + self._include_mounted_folders_value = bb.NOT_SET + self._limit_value = bb.NOT_SET + self._shared_link_value = bb.NOT_SET + self._include_property_groups_value = bb.NOT_SET + self._include_non_downloadable_files_value = bb.NOT_SET + 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 + if include_property_groups is not None: + self.include_property_groups = include_property_groups + if include_non_downloadable_files is not None: + self.include_non_downloadable_files = include_non_downloadable_files - @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. + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") - :rtype: int - """ - if self._limit_present: - return self._limit_value - else: - return None + # Instance attribute type: bool (validator is set below) + recursive = bb.Attribute("recursive") - @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 + # Instance attribute type: bool (validator is set below) + include_media_info = bb.Attribute("include_media_info") - @limit.deleter - def limit(self): - self._limit_value = None - self._limit_present = False + # Instance attribute type: bool (validator is set below) + include_deleted = bb.Attribute("include_deleted") - @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. + # Instance attribute type: bool (validator is set below) + include_has_explicit_shared_members = bb.Attribute("include_has_explicit_shared_members") - :rtype: SharedLink - """ - if self._shared_link_present: - return self._shared_link_value - else: - return None + # Instance attribute type: bool (validator is set below) + include_mounted_folders = bb.Attribute("include_mounted_folders") - @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 + # Instance attribute type: int (validator is set below) + limit = bb.Attribute("limit", nullable=True) - @shared_link.deleter - def shared_link(self): - self._shared_link_value = None - self._shared_link_present = False + # Instance attribute type: SharedLink (validator is set below) + shared_link = bb.Attribute("shared_link", nullable=True, user_defined=True) - @property - def include_property_groups(self): - """ - If set to a valid list of template IDs, ``FileMetadata.property_groups`` - is set if there exists property data associated with the file and each - of the listed templates. - - :rtype: file_properties.TemplateFilterBase - """ - if self._include_property_groups_present: - return self._include_property_groups_value - else: - return None + # Instance attribute type: file_properties.TemplateFilterBase (validator is set below) + include_property_groups = bb.Attribute("include_property_groups", nullable=True, user_defined=True) - @include_property_groups.setter - def include_property_groups(self, val): - if val is None: - del self.include_property_groups - return - self._include_property_groups_validator.validate_type_only(val) - self._include_property_groups_value = val - self._include_property_groups_present = True - - @include_property_groups.deleter - def include_property_groups(self): - self._include_property_groups_value = None - self._include_property_groups_present = False - - @property - def include_non_downloadable_files(self): - """ - If true, include files that are not downloadable, i.e. Google Docs. - - :rtype: bool - """ - if self._include_non_downloadable_files_present: - return self._include_non_downloadable_files_value - else: - return True - - @include_non_downloadable_files.setter - def include_non_downloadable_files(self, val): - val = self._include_non_downloadable_files_validator.validate(val) - self._include_non_downloadable_files_value = val - self._include_non_downloadable_files_present = True - - @include_non_downloadable_files.deleter - def include_non_downloadable_files(self): - self._include_non_downloadable_files_value = None - self._include_non_downloadable_files_present = False + # Instance attribute type: bool (validator is set below) + include_non_downloadable_files = bb.Attribute("include_non_downloadable_files") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFolderArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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}, include_property_groups={!r}, include_non_downloadable_files={!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, - self._include_property_groups_value, - self._include_non_downloadable_files_value, - ) - ListFolderArg_validator = bv.Struct(ListFolderArg) class ListFolderContinueArg(bb.Struct): """ :ivar files.ListFolderContinueArg.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`. + call to :meth:`dropbox.dropbox_client.Dropbox.files_list_folder` or + :meth:`dropbox.dropbox_client.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 + self._cursor_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFolderContinueArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFolderContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - ListFolderContinueArg_validator = bv.Struct(ListFolderContinueArg) class ListFolderContinueError(bb.Union): @@ -6407,8 +3475,9 @@ class ListFolderContinueError(bb.Union): corresponding ``get_*`` method. :ivar files.ListFolderContinueError.reset: Indicates that the cursor has - been invalidated. Call :meth:`dropbox.dropbox.Dropbox.files_list_folder` - to obtain a new cursor. + been invalidated. Call + :meth:`dropbox.dropbox_client.Dropbox.files_list_folder` to obtain a new + cursor. """ _catch_all = 'other' @@ -6465,9 +3534,6 @@ def get_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFolderContinueError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFolderContinueError(%r, %r)' % (self._tag, self._value) - ListFolderContinueError_validator = bv.Union(ListFolderContinueError) class ListFolderError(bb.Union): @@ -6550,74 +3616,42 @@ def get_template_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFolderError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFolderError(%r, %r)' % (self._tag, self._value) - ListFolderError_validator = bv.Union(ListFolderError) class ListFolderGetLatestCursorResult(bb.Struct): """ :ivar files.ListFolderGetLatestCursorResult.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. + :meth:`dropbox.dropbox_client.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 + self._cursor_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFolderGetLatestCursorResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFolderGetLatestCursorResult(cursor={!r})'.format( - self._cursor_value, - ) - ListFolderGetLatestCursorResult_validator = bv.Struct(ListFolderGetLatestCursorResult) class ListFolderLongpollArg(bb.Struct): """ :ivar files.ListFolderLongpollArg.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. + :meth:`dropbox.dropbox_client.Dropbox.files_list_folder` or + :meth:`dropbox.dropbox_client.Dropbox.files_list_folder_continue`. + Cursors retrieved by setting ``ListFolderArg.include_media_info`` to + ``True`` are not supported. :ivar files.ListFolderLongpollArg.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 @@ -6627,9 +3661,7 @@ class ListFolderLongpollArg(bb.Struct): __slots__ = [ '_cursor_value', - '_cursor_present', '_timeout_value', - '_timeout_present', ] _has_required_fields = True @@ -6637,77 +3669,22 @@ class ListFolderLongpollArg(bb.Struct): def __init__(self, cursor=None, timeout=None): - self._cursor_value = None - self._cursor_present = False - self._timeout_value = None - self._timeout_present = False + self._cursor_value = bb.NOT_SET + self._timeout_value = bb.NOT_SET 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: int - """ - 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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") - @timeout.deleter - def timeout(self): - self._timeout_value = None - self._timeout_present = False + # Instance attribute type: int (validator is set below) + timeout = bb.Attribute("timeout") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFolderLongpollArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -6717,8 +3694,9 @@ class ListFolderLongpollError(bb.Union): corresponding ``get_*`` method. :ivar files.ListFolderLongpollError.reset: Indicates that the cursor has - been invalidated. Call :meth:`dropbox.dropbox.Dropbox.files_list_folder` - to obtain a new cursor. + been invalidated. Call + :meth:`dropbox.dropbox_client.Dropbox.files_list_folder` to obtain a new + cursor. """ _catch_all = 'other' @@ -6746,27 +3724,22 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFolderLongpollError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFolderLongpollError(%r, %r)' % (self._tag, self._value) - ListFolderLongpollError_validator = bv.Union(ListFolderLongpollError) class ListFolderLongpollResult(bb.Struct): """ :ivar files.ListFolderLongpollResult.changes: Indicates whether new changes are available. If true, call - :meth:`dropbox.dropbox.Dropbox.files_list_folder_continue` to retrieve - the changes. + :meth:`dropbox.dropbox_client.Dropbox.files_list_folder_continue` to + retrieve the changes. :ivar files.ListFolderLongpollResult.backoff: If present, backoff for at least this many seconds before calling - :meth:`dropbox.dropbox.Dropbox.files_list_folder_longpoll` again. + :meth:`dropbox.dropbox_client.Dropbox.files_list_folder_longpoll` again. """ __slots__ = [ '_changes_value', - '_changes_present', '_backoff_value', - '_backoff_present', ] _has_required_fields = True @@ -6774,76 +3747,22 @@ class ListFolderLongpollResult(bb.Struct): def __init__(self, changes=None, backoff=None): - self._changes_value = None - self._changes_present = False - self._backoff_value = None - self._backoff_present = False + self._changes_value = bb.NOT_SET + self._backoff_value = bb.NOT_SET 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: int - """ - 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 + # Instance attribute type: bool (validator is set below) + changes = bb.Attribute("changes") - @backoff.deleter - def backoff(self): - self._backoff_value = None - self._backoff_present = False + # Instance attribute type: int (validator is set below) + backoff = bb.Attribute("backoff", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFolderLongpollResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFolderLongpollResult(changes={!r}, backoff={!r})'.format( - self._changes_value, - self._backoff_value, - ) - ListFolderLongpollResult_validator = bv.Struct(ListFolderLongpollResult) class ListFolderResult(bb.Struct): @@ -6851,21 +3770,18 @@ class ListFolderResult(bb.Struct): :ivar files.ListFolderResult.entries: The files and (direct) subfolders in the folder. :ivar files.ListFolderResult.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. + :meth:`dropbox.dropbox_client.Dropbox.files_list_folder_continue` to see + what's changed in the folder since your previous query. :ivar files.ListFolderResult.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. + :meth:`dropbox.dropbox_client.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 @@ -6874,12 +3790,9 @@ 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 + self._entries_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET + self._has_more_value = bb.NOT_SET if entries is not None: self.entries = entries if cursor is not None: @@ -6887,89 +3800,18 @@ def __init__(self, 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'") + # Instance attribute type: list of [Metadata] (validator is set below) + entries = bb.Attribute("entries") - @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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False + # Instance attribute type: bool (validator is set below) + has_more = bb.Attribute("has_more") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFolderResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -6984,11 +3826,8 @@ class ListRevisionsArg(bb.Struct): __slots__ = [ '_path_value', - '_path_present', '_mode_value', - '_mode_present', '_limit_value', - '_limit_present', ] _has_required_fields = True @@ -6997,12 +3836,9 @@ 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 + self._path_value = bb.NOT_SET + self._mode_value = bb.NOT_SET + self._limit_value = bb.NOT_SET if path is not None: self.path = path if mode is not None: @@ -7010,86 +3846,18 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") - @mode.deleter - def mode(self): - self._mode_value = None - self._mode_present = False + # Instance attribute type: ListRevisionsMode (validator is set below) + mode = bb.Attribute("mode", user_defined=True) - @property - def limit(self): - """ - The maximum number of revision entries returned. - - :rtype: int - """ - 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 + # Instance attribute type: int (validator is set below) + limit = bb.Attribute("limit") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListRevisionsArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -7143,9 +3911,6 @@ def get_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListRevisionsError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListRevisionsError(%r, %r)' % (self._tag, self._value) - ListRevisionsError_validator = bv.Union(ListRevisionsError) class ListRevisionsMode(bb.Union): @@ -7196,9 +3961,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListRevisionsMode, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListRevisionsMode(%r, %r)' % (self._tag, self._value) - ListRevisionsMode_validator = bv.Union(ListRevisionsMode) class ListRevisionsResult(bb.Struct): @@ -7213,11 +3975,8 @@ class ListRevisionsResult(bb.Struct): __slots__ = [ '_is_deleted_value', - '_is_deleted_present', '_server_deleted_value', - '_server_deleted_present', '_entries_value', - '_entries_present', ] _has_required_fields = True @@ -7226,12 +3985,9 @@ 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 + self._is_deleted_value = bb.NOT_SET + self._server_deleted_value = bb.NOT_SET + self._entries_value = bb.NOT_SET if is_deleted is not None: self.is_deleted = is_deleted if server_deleted is not None: @@ -7239,90 +3995,18 @@ def __init__(self, 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'") + # Instance attribute type: bool (validator is set below) + is_deleted = bb.Attribute("is_deleted") - @entries.setter - def entries(self, val): - val = self._entries_validator.validate(val) - self._entries_value = val - self._entries_present = True + # Instance attribute type: datetime.datetime (validator is set below) + server_deleted = bb.Attribute("server_deleted", nullable=True) - @entries.deleter - def entries(self): - self._entries_value = None - self._entries_present = False + # Instance attribute type: list of [FileMetadata] (validator is set below) + entries = bb.Attribute("entries") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListRevisionsResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 LockConflictError(bb.Struct): @@ -7332,49 +4016,22 @@ class LockConflictError(bb.Struct): __slots__ = [ '_lock_value', - '_lock_present', ] _has_required_fields = True def __init__(self, lock=None): - self._lock_value = None - self._lock_present = False + self._lock_value = bb.NOT_SET if lock is not None: self.lock = lock - @property - def lock(self): - """ - The lock that caused the conflict. - - :rtype: FileLock - """ - if self._lock_present: - return self._lock_value - else: - raise AttributeError("missing required field 'lock'") - - @lock.setter - def lock(self, val): - self._lock_validator.validate_type_only(val) - self._lock_value = val - self._lock_present = True - - @lock.deleter - def lock(self): - self._lock_value = None - self._lock_present = False + # Instance attribute type: FileLock (validator is set below) + lock = bb.Attribute("lock", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(LockConflictError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LockConflictError(lock={!r})'.format( - self._lock_value, - ) - LockConflictError_validator = bv.Struct(LockConflictError) class LockFileArg(bb.Struct): @@ -7384,49 +4041,22 @@ class LockFileArg(bb.Struct): __slots__ = [ '_path_value', - '_path_present', ] _has_required_fields = True def __init__(self, path=None): - self._path_value = None - self._path_present = False + self._path_value = bb.NOT_SET if path is not None: self.path = path - @property - def path(self): - """ - Path in the user's Dropbox to a 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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LockFileArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LockFileArg(path={!r})'.format( - self._path_value, - ) - LockFileArg_validator = bv.Struct(LockFileArg) class LockFileBatchArg(bb.Struct): @@ -7438,51 +4068,22 @@ class LockFileBatchArg(bb.Struct): __slots__ = [ '_entries_value', - '_entries_present', ] _has_required_fields = True def __init__(self, entries=None): - self._entries_value = None - self._entries_present = False + self._entries_value = bb.NOT_SET if entries is not None: self.entries = entries - @property - def entries(self): - """ - List of 'entries'. Each 'entry' contains a path of the file which will - be locked or queried. Duplicate path arguments in the batch are - considered only once. - - :rtype: list of [LockFileArg] - """ - 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 + # Instance attribute type: list of [LockFileArg] (validator is set below) + entries = bb.Attribute("entries") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LockFileBatchArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LockFileBatchArg(entries={!r})'.format( - self._entries_value, - ) - LockFileBatchArg_validator = bv.Struct(LockFileBatchArg) class LockFileBatchResult(FileOpsResult): @@ -7494,7 +4095,6 @@ class LockFileBatchResult(FileOpsResult): __slots__ = [ '_entries_value', - '_entries_present', ] _has_required_fields = True @@ -7502,44 +4102,16 @@ class LockFileBatchResult(FileOpsResult): def __init__(self, entries=None): super(LockFileBatchResult, self).__init__() - self._entries_value = None - self._entries_present = False + self._entries_value = bb.NOT_SET if entries is not None: self.entries = entries - @property - def entries(self): - """ - Each Entry in the 'entries' will have '.tag' with the operation status - (e.g. success), the metadata for the file and the lock state after the - operation. - - :rtype: list of [LockFileResultEntry] - """ - 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 + # Instance attribute type: list of [LockFileResultEntry] (validator is set below) + entries = bb.Attribute("entries") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LockFileBatchResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LockFileBatchResult(entries={!r})'.format( - self._entries_value, - ) - LockFileBatchResult_validator = bv.Struct(LockFileBatchResult) class LockFileError(bb.Union): @@ -7704,9 +4276,6 @@ def get_lock_conflict(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LockFileError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LockFileError(%r, %r)' % (self._tag, self._value) - LockFileError_validator = bv.Union(LockFileError) class LockFileResult(bb.Struct): @@ -7717,9 +4286,7 @@ class LockFileResult(bb.Struct): __slots__ = [ '_metadata_value', - '_metadata_present', '_lock_value', - '_lock_present', ] _has_required_fields = True @@ -7727,70 +4294,22 @@ class LockFileResult(bb.Struct): def __init__(self, metadata=None, lock=None): - self._metadata_value = None - self._metadata_present = False - self._lock_value = None - self._lock_present = False + self._metadata_value = bb.NOT_SET + self._lock_value = bb.NOT_SET if metadata is not None: self.metadata = metadata if lock is not None: self.lock = lock - @property - def metadata(self): - """ - Metadata of the file. - - :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 lock(self): - """ - The file lock state after the operation. - - :rtype: FileLock - """ - if self._lock_present: - return self._lock_value - else: - raise AttributeError("missing required field 'lock'") - - @lock.setter - def lock(self, val): - self._lock_validator.validate_type_only(val) - self._lock_value = val - self._lock_present = True + # Instance attribute type: Metadata (validator is set below) + metadata = bb.Attribute("metadata", user_defined=True) - @lock.deleter - def lock(self): - self._lock_value = None - self._lock_present = False + # Instance attribute type: FileLock (validator is set below) + lock = bb.Attribute("lock", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(LockFileResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LockFileResult(metadata={!r}, lock={!r})'.format( - self._metadata_value, - self._lock_value, - ) - LockFileResult_validator = bv.Struct(LockFileResult) class LockFileResultEntry(bb.Union): @@ -7863,9 +4382,6 @@ def get_failure(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LockFileResultEntry, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LockFileResultEntry(%r, %r)' % (self._tag, self._value) - LockFileResultEntry_validator = bv.Union(LockFileResultEntry) class LookupError(bb.Union): @@ -8001,9 +4517,6 @@ def get_malformed_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LookupError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LookupError(%r, %r)' % (self._tag, self._value) - LookupError_validator = bv.Union(LookupError) class MediaInfo(bb.Union): @@ -8063,9 +4576,6 @@ def get_metadata(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MediaInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MediaInfo(%r, %r)' % (self._tag, self._value) - MediaInfo_validator = bv.Union(MediaInfo) class MediaMetadata(bb.Struct): @@ -8080,11 +4590,8 @@ class MediaMetadata(bb.Struct): __slots__ = [ '_dimensions_value', - '_dimensions_present', '_location_value', - '_location_present', '_time_taken_value', - '_time_taken_present', ] _has_required_fields = False @@ -8093,12 +4600,9 @@ 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 + self._dimensions_value = bb.NOT_SET + self._location_value = bb.NOT_SET + self._time_taken_value = bb.NOT_SET if dimensions is not None: self.dimensions = dimensions if location is not None: @@ -8106,94 +4610,18 @@ def __init__(self, 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 + # Instance attribute type: Dimensions (validator is set below) + dimensions = bb.Attribute("dimensions", nullable=True, user_defined=True) - @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 + # Instance attribute type: GpsCoordinates (validator is set below) + location = bb.Attribute("location", nullable=True, user_defined=True) - @time_taken.deleter - def time_taken(self): - self._time_taken_value = None - self._time_taken_present = False + # Instance attribute type: datetime.datetime (validator is set below) + time_taken = bb.Attribute("time_taken", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MediaMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 MetadataV2(bb.Union): @@ -8249,9 +4677,6 @@ def get_metadata(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MetadataV2, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MetadataV2(%r, %r)' % (self._tag, self._value) - MetadataV2_validator = bv.Union(MetadataV2) class MinimalFileLinkMetadata(bb.Struct): @@ -8269,13 +4694,9 @@ class MinimalFileLinkMetadata(bb.Struct): __slots__ = [ '_url_value', - '_url_present', '_id_value', - '_id_present', '_path_value', - '_path_present', '_rev_value', - '_rev_present', ] _has_required_fields = True @@ -8285,14 +4706,10 @@ def __init__(self, rev=None, id=None, path=None): - self._url_value = None - self._url_present = False - self._id_value = None - self._id_present = False - self._path_value = None - self._path_present = False - self._rev_value = None - self._rev_present = False + self._url_value = bb.NOT_SET + self._id_value = bb.NOT_SET + self._path_value = bb.NOT_SET + self._rev_value = bb.NOT_SET if url is not None: self.url = url if id is not None: @@ -8302,119 +4719,21 @@ def __init__(self, if rev is not None: self.rev = rev - @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): - """ - 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 path(self): - """ - 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_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 + # Instance attribute type: str (validator is set below) + url = bb.Attribute("url") - @path.deleter - def path(self): - self._path_value = None - self._path_present = False + # Instance attribute type: str (validator is set below) + id = bb.Attribute("id", nullable=True) - @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'") + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path", nullable=True) - @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 + # Instance attribute type: str (validator is set below) + rev = bb.Attribute("rev") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MinimalFileLinkMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MinimalFileLinkMetadata(url={!r}, rev={!r}, id={!r}, path={!r})'.format( - self._url_value, - self._rev_value, - self._id_value, - self._path_value, - ) - MinimalFileLinkMetadata_validator = bv.Struct(MinimalFileLinkMetadata) class RelocationBatchArgBase(bb.Struct): @@ -8428,9 +4747,7 @@ class RelocationBatchArgBase(bb.Struct): __slots__ = [ '_entries_value', - '_entries_present', '_autorename_value', - '_autorename_present', ] _has_required_fields = True @@ -8438,72 +4755,22 @@ class RelocationBatchArgBase(bb.Struct): def __init__(self, entries=None, autorename=None): - self._entries_value = None - self._entries_present = False - self._autorename_value = None - self._autorename_present = False + self._entries_value = bb.NOT_SET + self._autorename_value = bb.NOT_SET if entries is not None: self.entries = entries if autorename is not None: self.autorename = autorename - @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 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 + # Instance attribute type: list of [RelocationPath] (validator is set below) + entries = bb.Attribute("entries") - @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 + # Instance attribute type: bool (validator is set below) + autorename = bb.Attribute("autorename") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelocationBatchArgBase, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RelocationBatchArgBase(entries={!r}, autorename={!r})'.format( - self._entries_value, - self._autorename_value, - ) - RelocationBatchArgBase_validator = bv.Struct(RelocationBatchArgBase) class MoveBatchArg(RelocationBatchArgBase): @@ -8515,7 +4782,6 @@ class MoveBatchArg(RelocationBatchArgBase): __slots__ = [ '_allow_ownership_transfer_value', - '_allow_ownership_transfer_present', ] _has_required_fields = True @@ -8526,45 +4792,16 @@ def __init__(self, allow_ownership_transfer=None): super(MoveBatchArg, self).__init__(entries, autorename) - self._allow_ownership_transfer_value = None - self._allow_ownership_transfer_present = False + self._allow_ownership_transfer_value = bb.NOT_SET if allow_ownership_transfer is not None: self.allow_ownership_transfer = allow_ownership_transfer - @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 + # Instance attribute type: bool (validator is set below) + allow_ownership_transfer = bb.Attribute("allow_ownership_transfer") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MoveBatchArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MoveBatchArg(entries={!r}, autorename={!r}, allow_ownership_transfer={!r})'.format( - self._entries_value, - self._autorename_value, - self._allow_ownership_transfer_value, - ) - MoveBatchArg_validator = bv.Struct(MoveBatchArg) class MoveIntoVaultError(bb.Union): @@ -8602,9 +4839,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MoveIntoVaultError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MoveIntoVaultError(%r, %r)' % (self._tag, self._value) - MoveIntoVaultError_validator = bv.Union(MoveIntoVaultError) class PathOrLink(bb.Union): @@ -8687,9 +4921,6 @@ def get_link(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PathOrLink, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PathOrLink(%r, %r)' % (self._tag, self._value) - PathOrLink_validator = bv.Union(PathOrLink) class PhotoMetadata(MediaMetadata): @@ -8713,13 +4944,6 @@ def __init__(self, def _process_custom_annotations(self, annotation_type, field_path, processor): super(PhotoMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -8730,9 +4954,7 @@ class PreviewArg(bb.Struct): __slots__ = [ '_path_value', - '_path_present', '_rev_value', - '_rev_present', ] _has_required_fields = True @@ -8740,73 +4962,22 @@ class PreviewArg(bb.Struct): def __init__(self, path=None, rev=None): - self._path_value = None - self._path_present = False - self._rev_value = None - self._rev_present = False + self._path_value = bb.NOT_SET + self._rev_value = bb.NOT_SET 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. + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") - :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 + # Instance attribute type: str (validator is set below) + rev = bb.Attribute("rev", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PreviewArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -8891,9 +5062,6 @@ def get_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PreviewError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PreviewError(%r, %r)' % (self._tag, self._value) - PreviewError_validator = bv.Union(PreviewError) class PreviewResult(bb.Struct): @@ -8908,9 +5076,7 @@ class PreviewResult(bb.Struct): __slots__ = [ '_file_metadata_value', - '_file_metadata_present', '_link_metadata_value', - '_link_metadata_present', ] _has_required_fields = False @@ -8918,79 +5084,22 @@ class PreviewResult(bb.Struct): def __init__(self, file_metadata=None, link_metadata=None): - self._file_metadata_value = None - self._file_metadata_present = False - self._link_metadata_value = None - self._link_metadata_present = False + self._file_metadata_value = bb.NOT_SET + self._link_metadata_value = bb.NOT_SET if file_metadata is not None: self.file_metadata = file_metadata if link_metadata is not None: self.link_metadata = link_metadata - @property - def file_metadata(self): - """ - Metadata corresponding to the file received as an argument. Will be - populated if the endpoint is called with a path (ReadPath). + # Instance attribute type: FileMetadata (validator is set below) + file_metadata = bb.Attribute("file_metadata", nullable=True, user_defined=True) - :rtype: FileMetadata - """ - if self._file_metadata_present: - return self._file_metadata_value - else: - return None - - @file_metadata.setter - def file_metadata(self, val): - if val is None: - del self.file_metadata - return - self._file_metadata_validator.validate_type_only(val) - self._file_metadata_value = val - self._file_metadata_present = True - - @file_metadata.deleter - def file_metadata(self): - self._file_metadata_value = None - self._file_metadata_present = False - - @property - def link_metadata(self): - """ - Minimal metadata corresponding to the file received as an argument. Will - be populated if the endpoint is called using a shared link - (SharedLinkFileInfo). - - :rtype: MinimalFileLinkMetadata - """ - 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 + # Instance attribute type: MinimalFileLinkMetadata (validator is set below) + link_metadata = bb.Attribute("link_metadata", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PreviewResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PreviewResult(file_metadata={!r}, link_metadata={!r})'.format( - self._file_metadata_value, - self._link_metadata_value, - ) - PreviewResult_validator = bv.Struct(PreviewResult) class RelocationPath(bb.Struct): @@ -9003,9 +5112,7 @@ class RelocationPath(bb.Struct): __slots__ = [ '_from_path_value', - '_from_path_present', '_to_path_value', - '_to_path_present', ] _has_required_fields = True @@ -9013,70 +5120,22 @@ class RelocationPath(bb.Struct): 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 + self._from_path_value = bb.NOT_SET + self._to_path_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + from_path = bb.Attribute("from_path") - @to_path.deleter - def to_path(self): - self._to_path_value = None - self._to_path_present = False + # Instance attribute type: str (validator is set below) + to_path = bb.Attribute("to_path") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelocationPath, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -9091,11 +5150,8 @@ class RelocationArg(RelocationPath): __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 @@ -9108,12 +5164,9 @@ def __init__(self, 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 + self._allow_shared_folder_value = bb.NOT_SET + self._autorename_value = bb.NOT_SET + self._allow_ownership_transfer_value = bb.NOT_SET if allow_shared_folder is not None: self.allow_shared_folder = allow_shared_folder if autorename is not None: @@ -9121,89 +5174,18 @@ def __init__(self, if allow_ownership_transfer is not None: self.allow_ownership_transfer = allow_ownership_transfer - @property - def allow_shared_folder(self): - """ - This flag has no effect. - - :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 + # Instance attribute type: bool (validator is set below) + allow_shared_folder = bb.Attribute("allow_shared_folder") - @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 + # Instance attribute type: bool (validator is set below) + autorename = bb.Attribute("autorename") - @allow_ownership_transfer.deleter - def allow_ownership_transfer(self): - self._allow_ownership_transfer_value = None - self._allow_ownership_transfer_present = False + # Instance attribute type: bool (validator is set below) + allow_ownership_transfer = bb.Attribute("allow_ownership_transfer") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelocationArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(RelocationBatchArgBase): @@ -9216,9 +5198,7 @@ class RelocationBatchArg(RelocationBatchArgBase): __slots__ = [ '_allow_shared_folder_value', - '_allow_shared_folder_present', '_allow_ownership_transfer_value', - '_allow_ownership_transfer_present', ] _has_required_fields = True @@ -9230,73 +5210,22 @@ def __init__(self, allow_ownership_transfer=None): super(RelocationBatchArg, self).__init__(entries, autorename) - self._allow_shared_folder_value = None - self._allow_shared_folder_present = False - self._allow_ownership_transfer_value = None - self._allow_ownership_transfer_present = False + self._allow_shared_folder_value = bb.NOT_SET + self._allow_ownership_transfer_value = bb.NOT_SET if allow_shared_folder is not None: self.allow_shared_folder = allow_shared_folder if allow_ownership_transfer is not None: self.allow_ownership_transfer = allow_ownership_transfer - @property - def allow_shared_folder(self): - """ - This flag has no effect. - - :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 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 + # Instance attribute type: bool (validator is set below) + allow_shared_folder = bb.Attribute("allow_shared_folder") - @allow_ownership_transfer.deleter - def allow_ownership_transfer(self): - self._allow_ownership_transfer_value = None - self._allow_ownership_transfer_present = False + # Instance attribute type: bool (validator is set below) + allow_ownership_transfer = bb.Attribute("allow_ownership_transfer") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelocationBatchArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RelocationBatchArg(entries={!r}, autorename={!r}, allow_shared_folder={!r}, allow_ownership_transfer={!r})'.format( - self._entries_value, - self._autorename_value, - self._allow_shared_folder_value, - self._allow_ownership_transfer_value, - ) - RelocationBatchArg_validator = bv.Struct(RelocationBatchArg) class RelocationError(bb.Union): @@ -9555,9 +5484,6 @@ def get_cant_move_into_vault(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelocationError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RelocationError(%r, %r)' % (self._tag, self._value) - RelocationError_validator = bv.Union(RelocationError) class RelocationBatchError(RelocationError): @@ -9584,9 +5510,6 @@ def is_too_many_write_operations(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelocationBatchError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RelocationBatchError(%r, %r)' % (self._tag, self._value) - RelocationBatchError_validator = bv.Union(RelocationBatchError) class RelocationBatchErrorEntry(bb.Union): @@ -9671,9 +5594,6 @@ def get_relocation_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelocationBatchErrorEntry, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RelocationBatchErrorEntry(%r, %r)' % (self._tag, self._value) - RelocationBatchErrorEntry_validator = bv.Union(RelocationBatchErrorEntry) class RelocationBatchJobStatus(async_.PollResultBase): @@ -9753,16 +5673,13 @@ def get_failed(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelocationBatchJobStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - 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. + Result returned by :meth:`dropbox.dropbox_client.Dropbox.files_copy_batch` + or :meth:`dropbox.dropbox_client.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 @@ -9813,16 +5730,12 @@ def get_complete(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelocationBatchLaunch, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 @@ -9830,40 +5743,16 @@ class RelocationBatchResult(FileOpsResult): def __init__(self, entries=None): super(RelocationBatchResult, self).__init__() - self._entries_value = None - self._entries_present = False + self._entries_value = bb.NOT_SET 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 + # Instance attribute type: list of [RelocationBatchResultData] (validator is set below) + entries = bb.Attribute("entries") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelocationBatchResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RelocationBatchResult(entries={!r})'.format( - self._entries_value, - ) - RelocationBatchResult_validator = bv.Struct(RelocationBatchResult) class RelocationBatchResultData(bb.Struct): @@ -9874,49 +5763,22 @@ class RelocationBatchResultData(bb.Struct): __slots__ = [ '_metadata_value', - '_metadata_present', ] _has_required_fields = True def __init__(self, metadata=None): - self._metadata_value = None - self._metadata_present = False + self._metadata_value = bb.NOT_SET 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 + # Instance attribute type: Metadata (validator is set below) + metadata = bb.Attribute("metadata", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelocationBatchResultData, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RelocationBatchResultData(metadata={!r})'.format( - self._metadata_value, - ) - RelocationBatchResultData_validator = bv.Struct(RelocationBatchResultData) class RelocationBatchResultEntry(bb.Union): @@ -9999,16 +5861,14 @@ def get_failure(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelocationBatchResultEntry, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RelocationBatchResultEntry(%r, %r)' % (self._tag, self._value) - RelocationBatchResultEntry_validator = bv.Union(RelocationBatchResultEntry) class RelocationBatchV2JobStatus(async_.PollResultBase): """ - Result returned by :meth:`dropbox.dropbox.Dropbox.files_copy_batch_check` or - :meth:`dropbox.dropbox.Dropbox.files_move_batch_check` that may either be in - progress or completed with result for each entry. + Result returned by + :meth:`dropbox.dropbox_client.Dropbox.files_copy_batch_check` or + :meth:`dropbox.dropbox_client.Dropbox.files_move_batch_check` that may + either be in progress or completed with result for each entry. This class acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the associated value of a tag (if one exists), use the @@ -10052,16 +5912,13 @@ def get_complete(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelocationBatchV2JobStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RelocationBatchV2JobStatus(%r, %r)' % (self._tag, self._value) - RelocationBatchV2JobStatus_validator = bv.Union(RelocationBatchV2JobStatus) class RelocationBatchV2Launch(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. + Result returned by :meth:`dropbox.dropbox_client.Dropbox.files_copy_batch` + or :meth:`dropbox.dropbox_client.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 @@ -10100,9 +5957,6 @@ def get_complete(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelocationBatchV2Launch, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RelocationBatchV2Launch(%r, %r)' % (self._tag, self._value) - RelocationBatchV2Launch_validator = bv.Union(RelocationBatchV2Launch) class RelocationBatchV2Result(FileOpsResult): @@ -10114,7 +5968,6 @@ class RelocationBatchV2Result(FileOpsResult): __slots__ = [ '_entries_value', - '_entries_present', ] _has_required_fields = True @@ -10122,43 +5975,16 @@ class RelocationBatchV2Result(FileOpsResult): def __init__(self, entries=None): super(RelocationBatchV2Result, self).__init__() - self._entries_value = None - self._entries_present = False + self._entries_value = bb.NOT_SET if entries is not None: self.entries = entries - @property - def entries(self): - """ - Each entry in CopyBatchArg.entries or ``MoveBatchArg.entries`` will - appear at the same position inside ``RelocationBatchV2Result.entries``. - - :rtype: list of [RelocationBatchResultEntry] - """ - 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 + # Instance attribute type: list of [RelocationBatchResultEntry] (validator is set below) + entries = bb.Attribute("entries") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelocationBatchV2Result, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RelocationBatchV2Result(entries={!r})'.format( - self._entries_value, - ) - RelocationBatchV2Result_validator = bv.Struct(RelocationBatchV2Result) class RelocationResult(FileOpsResult): @@ -10168,7 +5994,6 @@ class RelocationResult(FileOpsResult): __slots__ = [ '_metadata_value', - '_metadata_present', ] _has_required_fields = True @@ -10176,42 +6001,16 @@ class RelocationResult(FileOpsResult): def __init__(self, metadata=None): super(RelocationResult, self).__init__() - self._metadata_value = None - self._metadata_present = False + self._metadata_value = bb.NOT_SET 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 + # Instance attribute type: Metadata (validator is set below) + metadata = bb.Attribute("metadata", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelocationResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RelocationResult(metadata={!r})'.format( - self._metadata_value, - ) - RelocationResult_validator = bv.Struct(RelocationResult) class RestoreArg(bb.Struct): @@ -10222,9 +6021,7 @@ class RestoreArg(bb.Struct): __slots__ = [ '_path_value', - '_path_present', '_rev_value', - '_rev_present', ] _has_required_fields = True @@ -10232,70 +6029,22 @@ class RestoreArg(bb.Struct): def __init__(self, path=None, rev=None): - self._path_value = None - self._path_present = False - self._rev_value = None - self._rev_present = False + self._path_value = bb.NOT_SET + self._rev_value = bb.NOT_SET if path is not None: self.path = path if rev is not None: self.rev = rev - @property - def path(self): - """ - The path to save the restored 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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def rev(self): - """ - The revision to restore. - - :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 + # Instance attribute type: str (validator is set below) + rev = bb.Attribute("rev") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RestoreArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -10411,24 +6160,19 @@ def get_path_write(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RestoreError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RestoreError(%r, %r)' % (self._tag, self._value) - RestoreError_validator = bv.Union(RestoreError) class SaveCopyReferenceArg(bb.Struct): """ :ivar files.SaveCopyReferenceArg.copy_reference: A copy reference returned - by :meth:`dropbox.dropbox.Dropbox.files_copy_reference_get`. + by :meth:`dropbox.dropbox_client.Dropbox.files_copy_reference_get`. :ivar files.SaveCopyReferenceArg.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 @@ -10436,71 +6180,22 @@ class SaveCopyReferenceArg(bb.Struct): 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 + self._copy_reference_value = bb.NOT_SET + self._path_value = bb.NOT_SET 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'") + # Instance attribute type: str (validator is set below) + copy_reference = bb.Attribute("copy_reference") - @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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SaveCopyReferenceArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -10605,9 +6300,6 @@ def get_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SaveCopyReferenceError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SaveCopyReferenceError(%r, %r)' % (self._tag, self._value) - SaveCopyReferenceError_validator = bv.Union(SaveCopyReferenceError) class SaveCopyReferenceResult(bb.Struct): @@ -10618,49 +6310,22 @@ class SaveCopyReferenceResult(bb.Struct): __slots__ = [ '_metadata_value', - '_metadata_present', ] _has_required_fields = True def __init__(self, metadata=None): - self._metadata_value = None - self._metadata_present = False + self._metadata_value = bb.NOT_SET 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 + # Instance attribute type: Metadata (validator is set below) + metadata = bb.Attribute("metadata", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SaveCopyReferenceResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SaveCopyReferenceResult(metadata={!r})'.format( - self._metadata_value, - ) - SaveCopyReferenceResult_validator = bv.Struct(SaveCopyReferenceResult) class SaveUrlArg(bb.Struct): @@ -10672,9 +6337,7 @@ class SaveUrlArg(bb.Struct): __slots__ = [ '_path_value', - '_path_present', '_url_value', - '_url_present', ] _has_required_fields = True @@ -10682,70 +6345,22 @@ class SaveUrlArg(bb.Struct): def __init__(self, path=None, url=None): - self._path_value = None - self._path_present = False - self._url_value = None - self._url_present = False + self._path_value = bb.NOT_SET + self._url_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") - @url.deleter - def url(self): - self._url_value = None - self._url_present = False + # Instance attribute type: str (validator is set below) + url = bb.Attribute("url") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SaveUrlArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -10836,9 +6451,6 @@ def get_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SaveUrlError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SaveUrlError(%r, %r)' % (self._tag, self._value) - SaveUrlError_validator = bv.Union(SaveUrlError) class SaveUrlJobStatus(async_.PollResultBase): @@ -10914,9 +6526,6 @@ def get_failed(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SaveUrlJobStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SaveUrlJobStatus(%r, %r)' % (self._tag, self._value) - SaveUrlJobStatus_validator = bv.Union(SaveUrlJobStatus) class SaveUrlResult(async_.LaunchResultBase): @@ -10963,9 +6572,6 @@ def get_complete(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SaveUrlResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SaveUrlResult(%r, %r)' % (self._tag, self._value) - SaveUrlResult_validator = bv.Union(SaveUrlResult) class SearchArg(bb.Struct): @@ -10988,15 +6594,10 @@ class SearchArg(bb.Struct): __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 @@ -11007,16 +6608,11 @@ def __init__(self, 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 + self._path_value = bb.NOT_SET + self._query_value = bb.NOT_SET + self._start_value = bb.NOT_SET + self._max_results_value = bb.NOT_SET + self._mode_value = bb.NOT_SET if path is not None: self.path = path if query is not None: @@ -11028,138 +6624,24 @@ def __init__(self, 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. Query string may be rewritten to improve - relevance of results. The 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: int - """ - 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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") - @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: int - """ - 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. + # Instance attribute type: str (validator is set below) + query = bb.Attribute("query") - :rtype: SearchMode - """ - if self._mode_present: - return self._mode_value - else: - return SearchMode.filename + # Instance attribute type: int (validator is set below) + start = bb.Attribute("start") - @mode.setter - def mode(self, val): - self._mode_validator.validate_type_only(val) - self._mode_value = val - self._mode_present = True + # Instance attribute type: int (validator is set below) + max_results = bb.Attribute("max_results") - @mode.deleter - def mode(self): - self._mode_value = None - self._mode_present = False + # Instance attribute type: SearchMode (validator is set below) + mode = bb.Attribute("mode", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SearchArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -11255,9 +6737,6 @@ def get_invalid_argument(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SearchError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SearchError(%r, %r)' % (self._tag, self._value) - SearchError_validator = bv.Union(SearchError) class SearchMatch(bb.Struct): @@ -11269,9 +6748,7 @@ class SearchMatch(bb.Struct): __slots__ = [ '_match_type_value', - '_match_type_present', '_metadata_value', - '_metadata_present', ] _has_required_fields = True @@ -11279,70 +6756,22 @@ class SearchMatch(bb.Struct): 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 + self._match_type_value = bb.NOT_SET + self._metadata_value = bb.NOT_SET 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 + # Instance attribute type: SearchMatchType (validator is set below) + match_type = bb.Attribute("match_type", user_defined=True) - @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 + # Instance attribute type: Metadata (validator is set below) + metadata = bb.Attribute("metadata", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SearchMatch, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SearchMatch(match_type={!r}, metadata={!r})'.format( - self._match_type_value, - self._metadata_value, - ) - SearchMatch_validator = bv.Struct(SearchMatch) class SearchMatchFieldOptions(bb.Struct): @@ -11353,49 +6782,22 @@ class SearchMatchFieldOptions(bb.Struct): __slots__ = [ '_include_highlights_value', - '_include_highlights_present', ] _has_required_fields = False def __init__(self, include_highlights=None): - self._include_highlights_value = None - self._include_highlights_present = False + self._include_highlights_value = bb.NOT_SET if include_highlights is not None: self.include_highlights = include_highlights - @property - def include_highlights(self): - """ - Whether to include highlight span from file title. - - :rtype: bool - """ - if self._include_highlights_present: - return self._include_highlights_value - else: - return False - - @include_highlights.setter - def include_highlights(self, val): - val = self._include_highlights_validator.validate(val) - self._include_highlights_value = val - self._include_highlights_present = True - - @include_highlights.deleter - def include_highlights(self): - self._include_highlights_value = None - self._include_highlights_present = False + # Instance attribute type: bool (validator is set below) + include_highlights = bb.Attribute("include_highlights") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SearchMatchFieldOptions, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SearchMatchFieldOptions(include_highlights={!r})'.format( - self._include_highlights_value, - ) - SearchMatchFieldOptions_validator = bv.Struct(SearchMatchFieldOptions) class SearchMatchType(bb.Union): @@ -11449,9 +6851,6 @@ def is_both(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SearchMatchType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SearchMatchType(%r, %r)' % (self._tag, self._value) - SearchMatchType_validator = bv.Union(SearchMatchType) class SearchMatchTypeV2(bb.Union): @@ -11527,9 +6926,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SearchMatchTypeV2, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SearchMatchTypeV2(%r, %r)' % (self._tag, self._value) - SearchMatchTypeV2_validator = bv.Union(SearchMatchTypeV2) class SearchMatchV2(bb.Struct): @@ -11543,11 +6939,8 @@ class SearchMatchV2(bb.Struct): __slots__ = [ '_metadata_value', - '_metadata_present', '_match_type_value', - '_match_type_present', '_highlight_spans_value', - '_highlight_spans_present', ] _has_required_fields = True @@ -11556,12 +6949,9 @@ def __init__(self, metadata=None, match_type=None, highlight_spans=None): - self._metadata_value = None - self._metadata_present = False - self._match_type_value = None - self._match_type_present = False - self._highlight_spans_value = None - self._highlight_spans_present = False + self._metadata_value = bb.NOT_SET + self._match_type_value = bb.NOT_SET + self._highlight_spans_value = bb.NOT_SET if metadata is not None: self.metadata = metadata if match_type is not None: @@ -11569,92 +6959,18 @@ def __init__(self, if highlight_spans is not None: self.highlight_spans = highlight_spans - @property - def metadata(self): - """ - The metadata for the matched file or folder. + # Instance attribute type: MetadataV2 (validator is set below) + metadata = bb.Attribute("metadata", user_defined=True) - :rtype: MetadataV2 - """ - 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 match_type(self): - """ - The type of the match. - - :rtype: SearchMatchTypeV2 - """ - if self._match_type_present: - return self._match_type_value - else: - return None - - @match_type.setter - def match_type(self, val): - if val is None: - del self.match_type - return - 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 highlight_spans(self): - """ - The list of HighlightSpan determines which parts of the file title - should be highlighted. - - :rtype: list of [HighlightSpan] - """ - if self._highlight_spans_present: - return self._highlight_spans_value - else: - return None - - @highlight_spans.setter - def highlight_spans(self, val): - if val is None: - del self.highlight_spans - return - val = self._highlight_spans_validator.validate(val) - self._highlight_spans_value = val - self._highlight_spans_present = True - - @highlight_spans.deleter - def highlight_spans(self): - self._highlight_spans_value = None - self._highlight_spans_present = False + # Instance attribute type: SearchMatchTypeV2 (validator is set below) + match_type = bb.Attribute("match_type", nullable=True, user_defined=True) + + # Instance attribute type: list of [HighlightSpan] (validator is set below) + highlight_spans = bb.Attribute("highlight_spans", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SearchMatchV2, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SearchMatchV2(metadata={!r}, match_type={!r}, highlight_spans={!r})'.format( - self._metadata_value, - self._match_type_value, - self._highlight_spans_value, - ) - SearchMatchV2_validator = bv.Struct(SearchMatchV2) class SearchMode(bb.Union): @@ -11705,9 +7021,6 @@ def is_deleted_filename(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SearchMode, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SearchMode(%r, %r)' % (self._tag, self._value) - SearchMode_validator = bv.Union(SearchMode) class SearchOptions(bb.Struct): @@ -11730,19 +7043,12 @@ class SearchOptions(bb.Struct): __slots__ = [ '_path_value', - '_path_present', '_max_results_value', - '_max_results_present', '_order_by_value', - '_order_by_present', '_file_status_value', - '_file_status_present', '_filename_only_value', - '_filename_only_present', '_file_extensions_value', - '_file_extensions_present', '_file_categories_value', - '_file_categories_present', ] _has_required_fields = False @@ -11755,20 +7061,13 @@ def __init__(self, filename_only=None, file_extensions=None, file_categories=None): - self._path_value = None - self._path_present = False - self._max_results_value = None - self._max_results_present = False - self._order_by_value = None - self._order_by_present = False - self._file_status_value = None - self._file_status_present = False - self._filename_only_value = None - self._filename_only_present = False - self._file_extensions_value = None - self._file_extensions_present = False - self._file_categories_value = None - self._file_categories_present = False + self._path_value = bb.NOT_SET + self._max_results_value = bb.NOT_SET + self._order_by_value = bb.NOT_SET + self._file_status_value = bb.NOT_SET + self._filename_only_value = bb.NOT_SET + self._file_extensions_value = bb.NOT_SET + self._file_categories_value = bb.NOT_SET if path is not None: self.path = path if max_results is not None: @@ -11784,197 +7083,30 @@ def __init__(self, if file_categories is not None: self.file_categories = file_categories - @property - def path(self): - """ - Scopes the search to a path in the user's Dropbox. Searches the entire - Dropbox if not specified. - - :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 max_results(self): - """ - The maximum number of search results to return. - - :rtype: int - """ - 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 order_by(self): - """ - Specified property of the order of search results. By default, results - are sorted by relevance. - - :rtype: SearchOrderBy - """ - if self._order_by_present: - return self._order_by_value - else: - return None - - @order_by.setter - def order_by(self, val): - if val is None: - del self.order_by - return - self._order_by_validator.validate_type_only(val) - self._order_by_value = val - self._order_by_present = True - - @order_by.deleter - def order_by(self): - self._order_by_value = None - self._order_by_present = False - - @property - def file_status(self): - """ - Restricts search to the given file status. - - :rtype: FileStatus - """ - if self._file_status_present: - return self._file_status_value - else: - return FileStatus.active - - @file_status.setter - def file_status(self, val): - self._file_status_validator.validate_type_only(val) - self._file_status_value = val - self._file_status_present = True - - @file_status.deleter - def file_status(self): - self._file_status_value = None - self._file_status_present = False - - @property - def filename_only(self): - """ - Restricts search to only match on filenames. - - :rtype: bool - """ - if self._filename_only_present: - return self._filename_only_value - else: - return False - - @filename_only.setter - def filename_only(self, val): - val = self._filename_only_validator.validate(val) - self._filename_only_value = val - self._filename_only_present = True - - @filename_only.deleter - def filename_only(self): - self._filename_only_value = None - self._filename_only_present = False - - @property - def file_extensions(self): - """ - Restricts search to only the extensions specified. Only supported for - active file search. + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path", nullable=True) - :rtype: list of [str] - """ - if self._file_extensions_present: - return self._file_extensions_value - else: - return None - - @file_extensions.setter - def file_extensions(self, val): - if val is None: - del self.file_extensions - return - val = self._file_extensions_validator.validate(val) - self._file_extensions_value = val - self._file_extensions_present = True + # Instance attribute type: int (validator is set below) + max_results = bb.Attribute("max_results") - @file_extensions.deleter - def file_extensions(self): - self._file_extensions_value = None - self._file_extensions_present = False + # Instance attribute type: SearchOrderBy (validator is set below) + order_by = bb.Attribute("order_by", nullable=True, user_defined=True) - @property - def file_categories(self): - """ - Restricts search to only the file categories specified. Only supported - for active file search. + # Instance attribute type: FileStatus (validator is set below) + file_status = bb.Attribute("file_status", user_defined=True) - :rtype: list of [FileCategory] - """ - if self._file_categories_present: - return self._file_categories_value - else: - return None + # Instance attribute type: bool (validator is set below) + filename_only = bb.Attribute("filename_only") - @file_categories.setter - def file_categories(self, val): - if val is None: - del self.file_categories - return - val = self._file_categories_validator.validate(val) - self._file_categories_value = val - self._file_categories_present = True + # Instance attribute type: list of [str] (validator is set below) + file_extensions = bb.Attribute("file_extensions", nullable=True) - @file_categories.deleter - def file_categories(self): - self._file_categories_value = None - self._file_categories_present = False + # Instance attribute type: list of [FileCategory] (validator is set below) + file_categories = bb.Attribute("file_categories", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SearchOptions, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SearchOptions(path={!r}, max_results={!r}, order_by={!r}, file_status={!r}, filename_only={!r}, file_extensions={!r}, file_categories={!r})'.format( - self._path_value, - self._max_results_value, - self._order_by_value, - self._file_status_value, - self._filename_only_value, - self._file_extensions_value, - self._file_categories_value, - ) - SearchOptions_validator = bv.Struct(SearchOptions) class SearchOrderBy(bb.Union): @@ -12019,9 +7151,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SearchOrderBy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SearchOrderBy(%r, %r)' % (self._tag, self._value) - SearchOrderBy_validator = bv.Union(SearchOrderBy) class SearchResult(bb.Struct): @@ -12030,19 +7159,17 @@ class SearchResult(bb.Struct): query. :ivar files.SearchResult.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. + :meth:`dropbox.dropbox_client.Dropbox.files_search` again. :ivar files.SearchResult.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. + argument to when calling + :meth:`dropbox.dropbox_client.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 @@ -12051,12 +7178,9 @@ 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 + self._matches_value = bb.NOT_SET + self._more_value = bb.NOT_SET + self._start_value = bb.NOT_SET if matches is not None: self.matches = matches if more is not None: @@ -12064,89 +7188,18 @@ def __init__(self, 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: int - """ - if self._start_present: - return self._start_value - else: - raise AttributeError("missing required field 'start'") + # Instance attribute type: list of [SearchMatch] (validator is set below) + matches = bb.Attribute("matches") - @start.setter - def start(self, val): - val = self._start_validator.validate(val) - self._start_value = val - self._start_present = True + # Instance attribute type: bool (validator is set below) + more = bb.Attribute("more") - @start.deleter - def start(self): - self._start_value = None - self._start_present = False + # Instance attribute type: int (validator is set below) + start = bb.Attribute("start") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SearchResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 SearchV2Arg(bb.Struct): @@ -12163,13 +7216,9 @@ class SearchV2Arg(bb.Struct): __slots__ = [ '_query_value', - '_query_present', '_options_value', - '_options_present', '_match_field_options_value', - '_match_field_options_present', '_include_highlights_value', - '_include_highlights_present', ] _has_required_fields = True @@ -12179,14 +7228,10 @@ def __init__(self, options=None, match_field_options=None, include_highlights=None): - self._query_value = None - self._query_present = False - self._options_value = None - self._options_present = False - self._match_field_options_value = None - self._match_field_options_present = False - self._include_highlights_value = None - self._include_highlights_present = False + self._query_value = bb.NOT_SET + self._options_value = bb.NOT_SET + self._match_field_options_value = bb.NOT_SET + self._include_highlights_value = bb.NOT_SET if query is not None: self.query = query if options is not None: @@ -12196,176 +7241,48 @@ def __init__(self, if include_highlights is not None: self.include_highlights = include_highlights - @property - def query(self): - """ - The string to search for. May match across multiple fields based on the - request arguments. Query string may be rewritten to improve relevance of - results. - - :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 options(self): - """ - Options for more targeted search results. - - :rtype: SearchOptions - """ - if self._options_present: - return self._options_value - else: - return None - - @options.setter - def options(self, val): - if val is None: - del self.options - return - self._options_validator.validate_type_only(val) - self._options_value = val - self._options_present = True - - @options.deleter - def options(self): - self._options_value = None - self._options_present = False - - @property - def match_field_options(self): - """ - Options for search results match fields. - - :rtype: SearchMatchFieldOptions - """ - if self._match_field_options_present: - return self._match_field_options_value - else: - return None - - @match_field_options.setter - def match_field_options(self, val): - if val is None: - del self.match_field_options - return - self._match_field_options_validator.validate_type_only(val) - self._match_field_options_value = val - self._match_field_options_present = True - - @match_field_options.deleter - def match_field_options(self): - self._match_field_options_value = None - self._match_field_options_present = False - - @property - def include_highlights(self): - """ - Deprecated and moved this option to SearchMatchFieldOptions. + # Instance attribute type: str (validator is set below) + query = bb.Attribute("query") - :rtype: bool - """ - if self._include_highlights_present: - return self._include_highlights_value - else: - return None + # Instance attribute type: SearchOptions (validator is set below) + options = bb.Attribute("options", nullable=True, user_defined=True) - @include_highlights.setter - def include_highlights(self, val): - if val is None: - del self.include_highlights - return - val = self._include_highlights_validator.validate(val) - self._include_highlights_value = val - self._include_highlights_present = True + # Instance attribute type: SearchMatchFieldOptions (validator is set below) + match_field_options = bb.Attribute("match_field_options", nullable=True, user_defined=True) - @include_highlights.deleter - def include_highlights(self): - self._include_highlights_value = None - self._include_highlights_present = False + # Instance attribute type: bool (validator is set below) + include_highlights = bb.Attribute("include_highlights", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SearchV2Arg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SearchV2Arg(query={!r}, options={!r}, match_field_options={!r}, include_highlights={!r})'.format( - self._query_value, - self._options_value, - self._match_field_options_value, - self._include_highlights_value, - ) - SearchV2Arg_validator = bv.Struct(SearchV2Arg) class SearchV2ContinueArg(bb.Struct): """ :ivar files.SearchV2ContinueArg.cursor: The cursor returned by your last - call to :meth:`dropbox.dropbox.Dropbox.files_search`. Used to fetch the - next page of results. + call to :meth:`dropbox.dropbox_client.Dropbox.files_search`. Used to + fetch the next page of results. """ __slots__ = [ '_cursor_value', - '_cursor_present', ] _has_required_fields = True def __init__(self, cursor=None): - self._cursor_value = None - self._cursor_present = False + self._cursor_value = bb.NOT_SET 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_search`. Used to fetch the next - page of results. - - :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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SearchV2ContinueArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SearchV2ContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - SearchV2ContinueArg_validator = bv.Struct(SearchV2ContinueArg) class SearchV2Result(bb.Struct): @@ -12374,20 +7291,17 @@ class SearchV2Result(bb.Struct): the query. :ivar files.SearchV2Result.has_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_continue` with the - cursor. + calling :meth:`dropbox.dropbox_client.Dropbox.files_search_continue` + with the cursor. :ivar files.SearchV2Result.cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.files_search_continue` to fetch the next - page of results. + :meth:`dropbox.dropbox_client.Dropbox.files_search_continue` to fetch + the next page of results. """ __slots__ = [ '_matches_value', - '_matches_present', '_has_more_value', - '_has_more_present', '_cursor_value', - '_cursor_present', ] _has_required_fields = True @@ -12396,12 +7310,9 @@ def __init__(self, matches=None, has_more=None, cursor=None): - self._matches_value = None - self._matches_present = False - self._has_more_value = None - self._has_more_present = False - self._cursor_value = None - self._cursor_present = False + self._matches_value = bb.NOT_SET + self._has_more_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET if matches is not None: self.matches = matches if has_more is not None: @@ -12409,92 +7320,18 @@ def __init__(self, if cursor is not None: self.cursor = cursor - @property - def matches(self): - """ - A list (possibly empty) of matches for the query. - - :rtype: list of [SearchMatchV2] - """ - 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 has_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_continue` with the cursor. - - :rtype: bool - """ - if self._has_more_present: - return self._has_more_value - else: - raise AttributeError("missing required field 'has_more'") + # Instance attribute type: list of [SearchMatchV2] (validator is set below) + matches = bb.Attribute("matches") - @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.files_search_continue` to fetch the next - page of results. + # Instance attribute type: bool (validator is set below) + has_more = bb.Attribute("has_more") - :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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SearchV2Result, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SearchV2Result(matches={!r}, has_more={!r}, cursor={!r})'.format( - self._matches_value, - self._has_more_value, - self._cursor_value, - ) - SearchV2Result_validator = bv.Struct(SearchV2Result) class SharedLink(bb.Struct): @@ -12505,9 +7342,7 @@ class SharedLink(bb.Struct): __slots__ = [ '_url_value', - '_url_present', '_password_value', - '_password_present', ] _has_required_fields = True @@ -12515,73 +7350,22 @@ class SharedLink(bb.Struct): def __init__(self, url=None, password=None): - self._url_value = None - self._url_present = False - self._password_value = None - self._password_present = False + self._url_value = bb.NOT_SET + self._password_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + url = bb.Attribute("url") - @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 + # Instance attribute type: str (validator is set below) + password = bb.Attribute("password", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLink, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLink(url={!r}, password={!r})'.format( - self._url_value, - self._password_value, - ) - SharedLink_validator = bv.Struct(SharedLink) class SharedLinkFileInfo(bb.Struct): @@ -12599,11 +7383,8 @@ class SharedLinkFileInfo(bb.Struct): __slots__ = [ '_url_value', - '_url_present', '_path_value', - '_path_present', '_password_value', - '_password_present', ] _has_required_fields = True @@ -12612,12 +7393,9 @@ def __init__(self, url=None, path=None, password=None): - self._url_value = None - self._url_present = False - self._path_value = None - self._path_present = False - self._password_value = None - self._password_present = False + self._url_value = bb.NOT_SET + self._path_value = bb.NOT_SET + self._password_value = bb.NOT_SET if url is not None: self.url = url if path is not None: @@ -12625,95 +7403,18 @@ def __init__(self, if password is not None: self.password = password - @property - def url(self): - """ - The shared link corresponding to either a file or shared link to a - folder. If it is for a folder shared link, we use the path param to - determine for which file in the folder the view is for. - - :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): - """ - The path corresponding to a file in a shared link to a folder. Required - for shared links to folders. - - :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 + # Instance attribute type: str (validator is set below) + url = bb.Attribute("url") - @path.deleter - def path(self): - self._path_value = None - self._path_present = False - - @property - def password(self): - """ - Password for the shared link. Required for password-protected shared - links to files unless it can be read from a cookie. + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path", nullable=True) - :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 + # Instance attribute type: str (validator is set below) + password = bb.Attribute("password", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkFileInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkFileInfo(url={!r}, path={!r}, password={!r})'.format( - self._url_value, - self._path_value, - self._password_value, - ) - SharedLinkFileInfo_validator = bv.Struct(SharedLinkFileInfo) class SingleUserLock(bb.Struct): @@ -12727,11 +7428,8 @@ class SingleUserLock(bb.Struct): __slots__ = [ '_created_value', - '_created_present', '_lock_holder_account_id_value', - '_lock_holder_account_id_present', '_lock_holder_team_id_value', - '_lock_holder_team_id_present', ] _has_required_fields = True @@ -12740,12 +7438,9 @@ def __init__(self, created=None, lock_holder_account_id=None, lock_holder_team_id=None): - self._created_value = None - self._created_present = False - self._lock_holder_account_id_value = None - self._lock_holder_account_id_present = False - self._lock_holder_team_id_value = None - self._lock_holder_team_id_present = False + self._created_value = bb.NOT_SET + self._lock_holder_account_id_value = bb.NOT_SET + self._lock_holder_team_id_value = bb.NOT_SET if created is not None: self.created = created if lock_holder_account_id is not None: @@ -12753,88 +7448,18 @@ def __init__(self, if lock_holder_team_id is not None: self.lock_holder_team_id = lock_holder_team_id - @property - def created(self): - """ - The time the lock 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 lock_holder_account_id(self): - """ - The account ID of the lock holder if known. - - :rtype: str - """ - if self._lock_holder_account_id_present: - return self._lock_holder_account_id_value - else: - raise AttributeError("missing required field 'lock_holder_account_id'") - - @lock_holder_account_id.setter - def lock_holder_account_id(self, val): - val = self._lock_holder_account_id_validator.validate(val) - self._lock_holder_account_id_value = val - self._lock_holder_account_id_present = True + # Instance attribute type: datetime.datetime (validator is set below) + created = bb.Attribute("created") - @lock_holder_account_id.deleter - def lock_holder_account_id(self): - self._lock_holder_account_id_value = None - self._lock_holder_account_id_present = False - - @property - def lock_holder_team_id(self): - """ - The id of the team of the account holder if it exists. + # Instance attribute type: str (validator is set below) + lock_holder_account_id = bb.Attribute("lock_holder_account_id") - :rtype: str - """ - if self._lock_holder_team_id_present: - return self._lock_holder_team_id_value - else: - return None - - @lock_holder_team_id.setter - def lock_holder_team_id(self, val): - if val is None: - del self.lock_holder_team_id - return - val = self._lock_holder_team_id_validator.validate(val) - self._lock_holder_team_id_value = val - self._lock_holder_team_id_present = True - - @lock_holder_team_id.deleter - def lock_holder_team_id(self): - self._lock_holder_team_id_value = None - self._lock_holder_team_id_present = False + # Instance attribute type: str (validator is set below) + lock_holder_team_id = bb.Attribute("lock_holder_team_id", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SingleUserLock, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SingleUserLock(created={!r}, lock_holder_account_id={!r}, lock_holder_team_id={!r})'.format( - self._created_value, - self._lock_holder_account_id_value, - self._lock_holder_team_id_value, - ) - SingleUserLock_validator = bv.Struct(SingleUserLock) class SymlinkInfo(bb.Struct): @@ -12844,49 +7469,22 @@ class SymlinkInfo(bb.Struct): __slots__ = [ '_target_value', - '_target_present', ] _has_required_fields = True def __init__(self, target=None): - self._target_value = None - self._target_present = False + self._target_value = bb.NOT_SET if target is not None: self.target = target - @property - def target(self): - """ - The target this symlink points to. - - :rtype: str - """ - if self._target_present: - return self._target_value - else: - raise AttributeError("missing required field 'target'") - - @target.setter - def target(self, val): - val = self._target_validator.validate(val) - self._target_value = val - self._target_present = True - - @target.deleter - def target(self): - self._target_value = None - self._target_present = False + # Instance attribute type: str (validator is set below) + target = bb.Attribute("target") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SymlinkInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SymlinkInfo(target={!r})'.format( - self._target_value, - ) - SymlinkInfo_validator = bv.Struct(SymlinkInfo) class SyncSetting(bb.Union): @@ -12950,9 +7548,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SyncSetting, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SyncSetting(%r, %r)' % (self._tag, self._value) - SyncSetting_validator = bv.Union(SyncSetting) class SyncSettingArg(bb.Union): @@ -13003,9 +7598,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SyncSettingArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SyncSettingArg(%r, %r)' % (self._tag, self._value) - SyncSettingArg_validator = bv.Union(SyncSettingArg) class SyncSettingsError(bb.Union): @@ -13084,9 +7676,6 @@ def get_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SyncSettingsError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SyncSettingsError(%r, %r)' % (self._tag, self._value) - SyncSettingsError_validator = bv.Union(SyncSettingsError) class ThumbnailArg(bb.Struct): @@ -13103,13 +7692,9 @@ class ThumbnailArg(bb.Struct): __slots__ = [ '_path_value', - '_path_present', '_format_value', - '_format_present', '_size_value', - '_size_present', '_mode_value', - '_mode_present', ] _has_required_fields = True @@ -13119,14 +7704,10 @@ def __init__(self, format=None, size=None, mode=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 - self._mode_value = None - self._mode_present = False + self._path_value = bb.NOT_SET + self._format_value = bb.NOT_SET + self._size_value = bb.NOT_SET + self._mode_value = bb.NOT_SET if path is not None: self.path = path if format is not None: @@ -13136,111 +7717,21 @@ def __init__(self, if mode is not None: self.mode = mode - @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 - - @property - def mode(self): - """ - How to resize and crop the image to achieve the desired size. + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") - :rtype: ThumbnailMode - """ - if self._mode_present: - return self._mode_value - else: - return ThumbnailMode.strict + # Instance attribute type: ThumbnailFormat (validator is set below) + format = bb.Attribute("format", user_defined=True) - @mode.setter - def mode(self, val): - self._mode_validator.validate_type_only(val) - self._mode_value = val - self._mode_present = True + # Instance attribute type: ThumbnailSize (validator is set below) + size = bb.Attribute("size", user_defined=True) - @mode.deleter - def mode(self): - self._mode_value = None - self._mode_present = False + # Instance attribute type: ThumbnailMode (validator is set below) + mode = bb.Attribute("mode", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ThumbnailArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ThumbnailArg(path={!r}, format={!r}, size={!r}, mode={!r})'.format( - self._path_value, - self._format_value, - self._size_value, - self._mode_value, - ) - ThumbnailArg_validator = bv.Struct(ThumbnailArg) class ThumbnailError(bb.Union): @@ -13325,9 +7816,6 @@ def get_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ThumbnailError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ThumbnailError(%r, %r)' % (self._tag, self._value) - ThumbnailError_validator = bv.Union(ThumbnailError) class ThumbnailFormat(bb.Union): @@ -13362,9 +7850,6 @@ def is_png(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ThumbnailFormat, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ThumbnailFormat(%r, %r)' % (self._tag, self._value) - ThumbnailFormat_validator = bv.Union(ThumbnailFormat) class ThumbnailMode(bb.Union): @@ -13416,9 +7901,6 @@ def is_fitone_bestfit(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ThumbnailMode, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ThumbnailMode(%r, %r)' % (self._tag, self._value) - ThumbnailMode_validator = bv.Union(ThumbnailMode) class ThumbnailSize(bb.Union): @@ -13533,9 +8015,6 @@ def is_w2048h1536(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ThumbnailSize, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ThumbnailSize(%r, %r)' % (self._tag, self._value) - ThumbnailSize_validator = bv.Union(ThumbnailSize) class ThumbnailV2Arg(bb.Struct): @@ -13553,13 +8032,9 @@ class ThumbnailV2Arg(bb.Struct): __slots__ = [ '_resource_value', - '_resource_present', '_format_value', - '_format_present', '_size_value', - '_size_present', '_mode_value', - '_mode_present', ] _has_required_fields = True @@ -13569,14 +8044,10 @@ def __init__(self, format=None, size=None, mode=None): - self._resource_value = None - self._resource_present = False - self._format_value = None - self._format_present = False - self._size_value = None - self._size_present = False - self._mode_value = None - self._mode_present = False + self._resource_value = bb.NOT_SET + self._format_value = bb.NOT_SET + self._size_value = bb.NOT_SET + self._mode_value = bb.NOT_SET if resource is not None: self.resource = resource if format is not None: @@ -13586,113 +8057,21 @@ def __init__(self, if mode is not None: self.mode = mode - @property - def resource(self): - """ - Information specifying which file to preview. This could be a path to a - file, a shared link pointing to a file, or a shared link pointing to a - folder, with a relative path. - - :rtype: PathOrLink - """ - if self._resource_present: - return self._resource_value - else: - raise AttributeError("missing required field 'resource'") - - @resource.setter - def resource(self, val): - self._resource_validator.validate_type_only(val) - self._resource_value = val - self._resource_present = True + # Instance attribute type: PathOrLink (validator is set below) + resource = bb.Attribute("resource", user_defined=True) - @resource.deleter - def resource(self): - self._resource_value = None - self._resource_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 - - @property - def mode(self): - """ - How to resize and crop the image to achieve the desired size. - - :rtype: ThumbnailMode - """ - if self._mode_present: - return self._mode_value - else: - return ThumbnailMode.strict + # Instance attribute type: ThumbnailFormat (validator is set below) + format = bb.Attribute("format", user_defined=True) - @mode.setter - def mode(self, val): - self._mode_validator.validate_type_only(val) - self._mode_value = val - self._mode_present = True + # Instance attribute type: ThumbnailSize (validator is set below) + size = bb.Attribute("size", user_defined=True) - @mode.deleter - def mode(self): - self._mode_value = None - self._mode_present = False + # Instance attribute type: ThumbnailMode (validator is set below) + mode = bb.Attribute("mode", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ThumbnailV2Arg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ThumbnailV2Arg(resource={!r}, format={!r}, size={!r}, mode={!r})'.format( - self._resource_value, - self._format_value, - self._size_value, - self._mode_value, - ) - ThumbnailV2Arg_validator = bv.Struct(ThumbnailV2Arg) class ThumbnailV2Error(bb.Union): @@ -13810,9 +8189,6 @@ def get_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ThumbnailV2Error, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ThumbnailV2Error(%r, %r)' % (self._tag, self._value) - ThumbnailV2Error_validator = bv.Union(ThumbnailV2Error) class UnlockFileArg(bb.Struct): @@ -13822,49 +8198,22 @@ class UnlockFileArg(bb.Struct): __slots__ = [ '_path_value', - '_path_present', ] _has_required_fields = True def __init__(self, path=None): - self._path_value = None - self._path_present = False + self._path_value = bb.NOT_SET if path is not None: self.path = path - @property - def path(self): - """ - Path in the user's Dropbox to a 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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") def _process_custom_annotations(self, annotation_type, field_path, processor): super(UnlockFileArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UnlockFileArg(path={!r})'.format( - self._path_value, - ) - UnlockFileArg_validator = bv.Struct(UnlockFileArg) class UnlockFileBatchArg(bb.Struct): @@ -13876,51 +8225,22 @@ class UnlockFileBatchArg(bb.Struct): __slots__ = [ '_entries_value', - '_entries_present', ] _has_required_fields = True def __init__(self, entries=None): - self._entries_value = None - self._entries_present = False + self._entries_value = bb.NOT_SET if entries is not None: self.entries = entries - @property - def entries(self): - """ - List of 'entries'. Each 'entry' contains a path of the file which will - be unlocked. Duplicate path arguments in the batch are considered only - once. - - :rtype: list of [UnlockFileArg] - """ - 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 + # Instance attribute type: list of [UnlockFileArg] (validator is set below) + entries = bb.Attribute("entries") def _process_custom_annotations(self, annotation_type, field_path, processor): super(UnlockFileBatchArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UnlockFileBatchArg(entries={!r})'.format( - self._entries_value, - ) - UnlockFileBatchArg_validator = bv.Struct(UnlockFileBatchArg) class UploadError(bb.Union): @@ -14014,9 +8334,6 @@ def get_properties_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UploadError(%r, %r)' % (self._tag, self._value) - UploadError_validator = bv.Union(UploadError) class UploadErrorWithProperties(UploadError): @@ -14029,9 +8346,6 @@ class UploadErrorWithProperties(UploadError): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadErrorWithProperties, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UploadErrorWithProperties(%r, %r)' % (self._tag, self._value) - UploadErrorWithProperties_validator = bv.Union(UploadErrorWithProperties) class UploadSessionAppendArg(bb.Struct): @@ -14040,15 +8354,13 @@ class UploadSessionAppendArg(bb.Struct): and the offset. :ivar files.UploadSessionAppendArg.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` anymore with - the current session. + :meth:`dropbox.dropbox_client.Dropbox.files_upload_session_append` + anymore with the current session. """ __slots__ = [ '_cursor_value', - '_cursor_present', '_close_value', - '_close_present', ] _has_required_fields = True @@ -14056,78 +8368,28 @@ class UploadSessionAppendArg(bb.Struct): def __init__(self, cursor=None, close=None): - self._cursor_value = None - self._cursor_present = False - self._close_value = None - self._close_present = False + self._cursor_value = bb.NOT_SET + self._close_value = bb.NOT_SET 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` - 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 + # Instance attribute type: UploadSessionCursor (validator is set below) + cursor = bb.Attribute("cursor", user_defined=True) - @close.deleter - def close(self): - self._close_value = None - self._close_present = False + # Instance attribute type: bool (validator is set below) + close = bb.Attribute("close") def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadSessionAppendArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UploadSessionAppendArg(cursor={!r}, close={!r})'.format( - self._cursor_value, - self._close_value, - ) - UploadSessionAppendArg_validator = bv.Struct(UploadSessionAppendArg) class UploadSessionCursor(bb.Struct): """ :ivar files.UploadSessionCursor.session_id: The upload session ID (returned - by :meth:`dropbox.dropbox.Dropbox.files_upload_session_start`). + by :meth:`dropbox.dropbox_client.Dropbox.files_upload_session_start`). :ivar files.UploadSessionCursor.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. @@ -14135,9 +8397,7 @@ class UploadSessionCursor(bb.Struct): __slots__ = [ '_session_id_value', - '_session_id_present', '_offset_value', - '_offset_present', ] _has_required_fields = True @@ -14145,73 +8405,22 @@ class UploadSessionCursor(bb.Struct): 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 + self._session_id_value = bb.NOT_SET + self._offset_value = bb.NOT_SET 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: int - """ - 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 + # Instance attribute type: str (validator is set below) + session_id = bb.Attribute("session_id") - @offset.deleter - def offset(self): - self._offset_value = None - self._offset_present = False + # Instance attribute type: int (validator is set below) + offset = bb.Attribute("offset") def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadSessionCursor, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -14224,9 +8433,7 @@ class UploadSessionFinishArg(bb.Struct): __slots__ = [ '_cursor_value', - '_cursor_present', '_commit_value', - '_commit_present', ] _has_required_fields = True @@ -14234,70 +8441,22 @@ class UploadSessionFinishArg(bb.Struct): def __init__(self, cursor=None, commit=None): - self._cursor_value = None - self._cursor_present = False - self._commit_value = None - self._commit_present = False + self._cursor_value = bb.NOT_SET + self._commit_value = bb.NOT_SET 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 + # Instance attribute type: UploadSessionCursor (validator is set below) + cursor = bb.Attribute("cursor", user_defined=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 + # Instance attribute type: CommitInfo (validator is set below) + commit = bb.Attribute("commit", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadSessionFinishArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UploadSessionFinishArg(cursor={!r}, commit={!r})'.format( - self._cursor_value, - self._commit_value, - ) - UploadSessionFinishArg_validator = bv.Struct(UploadSessionFinishArg) class UploadSessionFinishBatchArg(bb.Struct): @@ -14308,49 +8467,22 @@ class UploadSessionFinishBatchArg(bb.Struct): __slots__ = [ '_entries_value', - '_entries_present', ] _has_required_fields = True def __init__(self, entries=None): - self._entries_value = None - self._entries_present = False + self._entries_value = bb.NOT_SET 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 + # Instance attribute type: list of [UploadSessionFinishArg] (validator is set below) + entries = bb.Attribute("entries") def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadSessionFinishBatchArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UploadSessionFinishBatchArg(entries={!r})'.format( - self._entries_value, - ) - UploadSessionFinishBatchArg_validator = bv.Struct(UploadSessionFinishBatchArg) class UploadSessionFinishBatchJobStatus(async_.PollResultBase): @@ -14361,8 +8493,8 @@ class UploadSessionFinishBatchJobStatus(async_.PollResultBase): :ivar UploadSessionFinishBatchResult UploadSessionFinishBatchJobStatus.complete: The - :meth:`dropbox.dropbox.Dropbox.files_upload_session_finish_batch` has - finished. + :meth:`dropbox.dropbox_client.Dropbox.files_upload_session_finish_batch` + has finished. """ @classmethod @@ -14386,7 +8518,8 @@ def is_complete(self): def get_complete(self): """ - The :meth:`dropbox.dropbox.Dropbox.files_upload_session_finish_batch` + The + :meth:`dropbox.dropbox_client.Dropbox.files_upload_session_finish_batch` has finished. Only call this if :meth:`is_complete` is true. @@ -14400,16 +8533,13 @@ def get_complete(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadSessionFinishBatchJobStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - 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. + :meth:`dropbox.dropbox_client.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 @@ -14460,9 +8590,6 @@ def get_complete(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadSessionFinishBatchLaunch, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UploadSessionFinishBatchLaunch(%r, %r)' % (self._tag, self._value) - UploadSessionFinishBatchLaunch_validator = bv.Union(UploadSessionFinishBatchLaunch) class UploadSessionFinishBatchResult(bb.Struct): @@ -14474,50 +8601,22 @@ class UploadSessionFinishBatchResult(bb.Struct): __slots__ = [ '_entries_value', - '_entries_present', ] _has_required_fields = True def __init__(self, entries=None): - self._entries_value = None - self._entries_present = False + self._entries_value = bb.NOT_SET if entries is not None: self.entries = entries - @property - def entries(self): - """ - Each entry in ``UploadSessionFinishBatchArg.entries`` will appear at the - same position inside ``UploadSessionFinishBatchResult.entries``. - - :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 + # Instance attribute type: list of [UploadSessionFinishBatchResultEntry] (validator is set below) + entries = bb.Attribute("entries") def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadSessionFinishBatchResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UploadSessionFinishBatchResult(entries={!r})'.format( - self._entries_value, - ) - UploadSessionFinishBatchResult_validator = bv.Struct(UploadSessionFinishBatchResult) class UploadSessionFinishBatchResultEntry(bb.Union): @@ -14590,9 +8689,6 @@ def get_failure(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadSessionFinishBatchResultEntry, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UploadSessionFinishBatchResultEntry(%r, %r)' % (self._tag, self._value) - UploadSessionFinishBatchResultEntry_validator = bv.Union(UploadSessionFinishBatchResultEntry) class UploadSessionFinishError(bb.Union): @@ -14785,9 +8881,6 @@ def get_properties_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadSessionFinishError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UploadSessionFinishError(%r, %r)' % (self._tag, self._value) - UploadSessionFinishError_validator = bv.Union(UploadSessionFinishError) class UploadSessionLookupError(bb.Union): @@ -14927,9 +9020,6 @@ def get_incorrect_offset(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadSessionLookupError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UploadSessionLookupError(%r, %r)' % (self._tag, self._value) - UploadSessionLookupError_validator = bv.Union(UploadSessionLookupError) class UploadSessionOffsetError(bb.Struct): @@ -14940,57 +9030,30 @@ class UploadSessionOffsetError(bb.Struct): __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 + self._correct_offset_value = bb.NOT_SET 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: int - """ - 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 + # Instance attribute type: int (validator is set below) + correct_offset = bb.Attribute("correct_offset") def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadSessionOffsetError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UploadSessionOffsetError(correct_offset={!r})'.format( - self._correct_offset_value, - ) - UploadSessionOffsetError_validator = bv.Struct(UploadSessionOffsetError) class UploadSessionStartArg(bb.Struct): """ :ivar files.UploadSessionStartArg.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` anymore with - the current session. + :meth:`dropbox.dropbox_client.Dropbox.files_upload_session_append` + anymore with the current session. :ivar files.UploadSessionStartArg.session_type: Type of upload session you want to start. If not specified, default is ``UploadSessionType.sequential``. @@ -14998,9 +9061,7 @@ class UploadSessionStartArg(bb.Struct): __slots__ = [ '_close_value', - '_close_present', '_session_type_value', - '_session_type_present', ] _has_required_fields = False @@ -15008,76 +9069,22 @@ class UploadSessionStartArg(bb.Struct): def __init__(self, close=None, session_type=None): - self._close_value = None - self._close_present = False - self._session_type_value = None - self._session_type_present = False + self._close_value = bb.NOT_SET + self._session_type_value = bb.NOT_SET if close is not None: self.close = close if session_type is not None: self.session_type = session_type - @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` - 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 - - @property - def session_type(self): - """ - Type of upload session you want to start. If not specified, default is - ``UploadSessionType.sequential``. - - :rtype: UploadSessionType - """ - if self._session_type_present: - return self._session_type_value - else: - return None - - @session_type.setter - def session_type(self, val): - if val is None: - del self.session_type - return - self._session_type_validator.validate_type_only(val) - self._session_type_value = val - self._session_type_present = True + # Instance attribute type: bool (validator is set below) + close = bb.Attribute("close") - @session_type.deleter - def session_type(self): - self._session_type_value = None - self._session_type_present = False + # Instance attribute type: UploadSessionType (validator is set below) + session_type = bb.Attribute("session_type", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadSessionStartArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UploadSessionStartArg(close={!r}, session_type={!r})'.format( - self._close_value, - self._session_type_value, - ) - UploadSessionStartArg_validator = bv.Struct(UploadSessionStartArg) class UploadSessionStartError(bb.Union): @@ -15127,66 +9134,34 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadSessionStartError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UploadSessionStartError(%r, %r)' % (self._tag, self._value) - UploadSessionStartError_validator = bv.Union(UploadSessionStartError) class UploadSessionStartResult(bb.Struct): """ :ivar files.UploadSessionStartResult.session_id: A unique identifier for the upload session. Pass this to - :meth:`dropbox.dropbox.Dropbox.files_upload_session_append` and - :meth:`dropbox.dropbox.Dropbox.files_upload_session_finish`. + :meth:`dropbox.dropbox_client.Dropbox.files_upload_session_append` and + :meth:`dropbox.dropbox_client.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 + self._session_id_value = bb.NOT_SET 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` 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 + # Instance attribute type: str (validator is set below) + session_id = bb.Attribute("session_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadSessionStartResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UploadSessionStartResult(session_id={!r})'.format( - self._session_id_value, - ) - UploadSessionStartResult_validator = bv.Struct(UploadSessionStartResult) class UploadSessionType(bb.Union): @@ -15236,9 +9211,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadSessionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UploadSessionType(%r, %r)' % (self._tag, self._value) - UploadSessionType_validator = bv.Union(UploadSessionType) class UploadWriteFailed(bb.Struct): @@ -15248,14 +9220,12 @@ class UploadWriteFailed(bb.Struct): :ivar files.UploadWriteFailed.upload_session_id: The upload session ID; data has already been uploaded to the corresponding upload session and this ID may be used to retry the commit with - :meth:`dropbox.dropbox.Dropbox.files_upload_session_finish`. + :meth:`dropbox.dropbox_client.Dropbox.files_upload_session_finish`. """ __slots__ = [ '_reason_value', - '_reason_present', '_upload_session_id_value', - '_upload_session_id_present', ] _has_required_fields = True @@ -15263,72 +9233,22 @@ class UploadWriteFailed(bb.Struct): 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 + self._reason_value = bb.NOT_SET + self._upload_session_id_value = bb.NOT_SET 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 + # Instance attribute type: WriteError (validator is set below) + reason = bb.Attribute("reason", user_defined=True) - @property - def upload_session_id(self): - """ - The upload session ID; data has already been uploaded to the - corresponding upload session and this ID may be used to retry the commit - with :meth:`dropbox.dropbox.Dropbox.files_upload_session_finish`. - - :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 + # Instance attribute type: str (validator is set below) + upload_session_id = bb.Attribute("upload_session_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadWriteFailed, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -15341,7 +9261,6 @@ class VideoMetadata(MediaMetadata): __slots__ = [ '_duration_value', - '_duration_present', ] _has_required_fields = False @@ -15354,48 +9273,16 @@ def __init__(self, super(VideoMetadata, self).__init__(dimensions, location, time_taken) - self._duration_value = None - self._duration_present = False + self._duration_value = bb.NOT_SET if duration is not None: self.duration = duration - @property - def duration(self): - """ - The duration of the video in milliseconds. - - :rtype: int - """ - 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 + # Instance attribute type: int (validator is set below) + duration = bb.Attribute("duration", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(VideoMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -15455,9 +9342,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(WriteConflictError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'WriteConflictError(%r, %r)' % (self._tag, self._value) - WriteConflictError_validator = bv.Union(WriteConflictError) class WriteError(bb.Union): @@ -15628,9 +9512,6 @@ def get_conflict(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(WriteError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'WriteError(%r, %r)' % (self._tag, self._value) - WriteError_validator = bv.Union(WriteError) class WriteMode(bb.Union): @@ -15720,9 +9601,6 @@ def get_update(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(WriteMode, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'WriteMode(%r, %r)' % (self._tag, self._value) - WriteMode_validator = bv.Union(WriteMode) CopyBatchArg_validator = RelocationBatchArgBase_validator @@ -15742,11 +9620,11 @@ def __repr__(self): 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._include_property_groups_validator = bv.Nullable(file_properties.TemplateFilterBase_validator) +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.include_property_groups.validator = bv.Nullable(file_properties.TemplateFilterBase_validator) GetMetadataArg._all_field_names_ = set([ 'path', 'include_media_info', @@ -15755,16 +9633,16 @@ def __repr__(self): 'include_property_groups', ]) 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), - ('include_property_groups', GetMetadataArg._include_property_groups_validator), + ('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), + ('include_property_groups', GetMetadataArg.include_property_groups.validator), ] -AlphaGetMetadataArg._include_property_templates_validator = bv.Nullable(bv.List(file_properties.TemplateId_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)] +AlphaGetMetadataArg._all_fields_ = GetMetadataArg._all_fields_ + [('include_property_templates', AlphaGetMetadataArg.include_property_templates.validator)] GetMetadataError._path_validator = LookupError_validator GetMetadataError._tagmap = { @@ -15777,13 +9655,13 @@ def __repr__(self): } 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._property_groups_validator = bv.Nullable(bv.List(file_properties.PropertyGroup_validator)) -CommitInfo._strict_conflict_validator = bv.Boolean() +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.property_groups.validator = bv.Nullable(bv.List(file_properties.PropertyGroup_validator)) +CommitInfo.strict_conflict.validator = bv.Boolean() CommitInfo._all_field_names_ = set([ 'path', 'mode', @@ -15794,63 +9672,63 @@ def __repr__(self): 'strict_conflict', ]) 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), - ('property_groups', CommitInfo._property_groups_validator), - ('strict_conflict', CommitInfo._strict_conflict_validator), + ('path', CommitInfo.path.validator), + ('mode', CommitInfo.mode.validator), + ('autorename', CommitInfo.autorename.validator), + ('client_modified', CommitInfo.client_modified.validator), + ('mute', CommitInfo.mute.validator), + ('property_groups', CommitInfo.property_groups.validator), + ('strict_conflict', CommitInfo.strict_conflict.validator), ] CommitInfoWithProperties._all_field_names_ = CommitInfo._all_field_names_.union(set([])) CommitInfoWithProperties._all_fields_ = CommitInfo._all_fields_ + [] -ContentSyncSetting._id_validator = FileId_validator -ContentSyncSetting._sync_setting_validator = SyncSetting_validator +ContentSyncSetting.id.validator = FileId_validator +ContentSyncSetting.sync_setting.validator = SyncSetting_validator ContentSyncSetting._all_field_names_ = set([ 'id', 'sync_setting', ]) ContentSyncSetting._all_fields_ = [ - ('id', ContentSyncSetting._id_validator), - ('sync_setting', ContentSyncSetting._sync_setting_validator), + ('id', ContentSyncSetting.id.validator), + ('sync_setting', ContentSyncSetting.sync_setting.validator), ] -ContentSyncSettingArg._id_validator = FileId_validator -ContentSyncSettingArg._sync_setting_validator = SyncSettingArg_validator +ContentSyncSettingArg.id.validator = FileId_validator +ContentSyncSettingArg.sync_setting.validator = SyncSettingArg_validator ContentSyncSettingArg._all_field_names_ = set([ 'id', 'sync_setting', ]) ContentSyncSettingArg._all_fields_ = [ - ('id', ContentSyncSettingArg._id_validator), - ('sync_setting', ContentSyncSettingArg._sync_setting_validator), + ('id', ContentSyncSettingArg.id.validator), + ('sync_setting', ContentSyncSettingArg.sync_setting.validator), ] -CreateFolderArg._path_validator = WritePath_validator -CreateFolderArg._autorename_validator = bv.Boolean() +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), + ('path', CreateFolderArg.path.validator), + ('autorename', CreateFolderArg.autorename.validator), ] -CreateFolderBatchArg._paths_validator = bv.List(WritePath_validator, max_items=10000) -CreateFolderBatchArg._autorename_validator = bv.Boolean() -CreateFolderBatchArg._force_async_validator = bv.Boolean() +CreateFolderBatchArg.paths.validator = bv.List(WritePath_validator, max_items=10000) +CreateFolderBatchArg.autorename.validator = bv.Boolean() +CreateFolderBatchArg.force_async.validator = bv.Boolean() CreateFolderBatchArg._all_field_names_ = set([ 'paths', 'autorename', 'force_async', ]) CreateFolderBatchArg._all_fields_ = [ - ('paths', CreateFolderBatchArg._paths_validator), - ('autorename', CreateFolderBatchArg._autorename_validator), - ('force_async', CreateFolderBatchArg._force_async_validator), + ('paths', CreateFolderBatchArg.paths.validator), + ('autorename', CreateFolderBatchArg.autorename.validator), + ('force_async', CreateFolderBatchArg.force_async.validator), ] CreateFolderBatchError._too_many_files_validator = bv.Void() @@ -15888,9 +9766,9 @@ def __repr__(self): FileOpsResult._all_field_names_ = set([]) FileOpsResult._all_fields_ = [] -CreateFolderBatchResult._entries_validator = bv.List(CreateFolderBatchResultEntry_validator) +CreateFolderBatchResult.entries.validator = bv.List(CreateFolderBatchResultEntry_validator) CreateFolderBatchResult._all_field_names_ = FileOpsResult._all_field_names_.union(set(['entries'])) -CreateFolderBatchResult._all_fields_ = FileOpsResult._all_fields_ + [('entries', CreateFolderBatchResult._entries_validator)] +CreateFolderBatchResult._all_fields_ = FileOpsResult._all_fields_ + [('entries', CreateFolderBatchResult.entries.validator)] CreateFolderBatchResultEntry._success_validator = CreateFolderEntryResult_validator CreateFolderBatchResultEntry._failure_validator = CreateFolderEntryError_validator @@ -15908,33 +9786,33 @@ def __repr__(self): CreateFolderEntryError.other = CreateFolderEntryError('other') -CreateFolderEntryResult._metadata_validator = FolderMetadata_validator +CreateFolderEntryResult.metadata.validator = FolderMetadata_validator CreateFolderEntryResult._all_field_names_ = set(['metadata']) -CreateFolderEntryResult._all_fields_ = [('metadata', CreateFolderEntryResult._metadata_validator)] +CreateFolderEntryResult._all_fields_ = [('metadata', CreateFolderEntryResult.metadata.validator)] CreateFolderError._path_validator = WriteError_validator CreateFolderError._tagmap = { 'path': CreateFolderError._path_validator, } -CreateFolderResult._metadata_validator = FolderMetadata_validator +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)] +CreateFolderResult._all_fields_ = FileOpsResult._all_fields_ + [('metadata', CreateFolderResult.metadata.validator)] -DeleteArg._path_validator = WritePathOrId_validator -DeleteArg._parent_rev_validator = bv.Nullable(Rev_validator) +DeleteArg.path.validator = WritePathOrId_validator +DeleteArg.parent_rev.validator = bv.Nullable(Rev_validator) DeleteArg._all_field_names_ = set([ 'path', 'parent_rev', ]) DeleteArg._all_fields_ = [ - ('path', DeleteArg._path_validator), - ('parent_rev', DeleteArg._parent_rev_validator), + ('path', DeleteArg.path.validator), + ('parent_rev', DeleteArg.parent_rev.validator), ] -DeleteBatchArg._entries_validator = bv.List(DeleteArg_validator) +DeleteBatchArg.entries.validator = bv.List(DeleteArg_validator) DeleteBatchArg._all_field_names_ = set(['entries']) -DeleteBatchArg._all_fields_ = [('entries', DeleteBatchArg._entries_validator)] +DeleteBatchArg._all_fields_ = [('entries', DeleteBatchArg.entries.validator)] DeleteBatchError._too_many_write_operations_validator = bv.Void() DeleteBatchError._other_validator = bv.Void() @@ -15968,13 +9846,13 @@ def __repr__(self): DeleteBatchLaunch.other = DeleteBatchLaunch('other') -DeleteBatchResult._entries_validator = bv.List(DeleteBatchResultEntry_validator) +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)] +DeleteBatchResult._all_fields_ = FileOpsResult._all_fields_ + [('entries', DeleteBatchResult.entries.validator)] -DeleteBatchResultData._metadata_validator = Metadata_validator +DeleteBatchResultData.metadata.validator = Metadata_validator DeleteBatchResultData._all_field_names_ = set(['metadata']) -DeleteBatchResultData._all_fields_ = [('metadata', DeleteBatchResultData._metadata_validator)] +DeleteBatchResultData._all_fields_ = [('metadata', DeleteBatchResultData.metadata.validator)] DeleteBatchResultEntry._success_validator = DeleteBatchResultData_validator DeleteBatchResultEntry._failure_validator = DeleteError_validator @@ -16000,14 +9878,14 @@ def __repr__(self): DeleteError.too_many_files = DeleteError('too_many_files') DeleteError.other = DeleteError('other') -DeleteResult._metadata_validator = Metadata_validator +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)] +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.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', @@ -16016,10 +9894,10 @@ def __repr__(self): ]) 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), + ('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_ @@ -16040,26 +9918,26 @@ def __repr__(self): DeletedMetadata._fields_ = [] DeletedMetadata._all_fields_ = Metadata._all_fields_ + DeletedMetadata._fields_ -Dimensions._height_validator = bv.UInt64() -Dimensions._width_validator = bv.UInt64() +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), + ('height', Dimensions.height.validator), + ('width', Dimensions.width.validator), ] -DownloadArg._path_validator = ReadPath_validator -DownloadArg._rev_validator = bv.Nullable(Rev_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), + ('path', DownloadArg.path.validator), + ('rev', DownloadArg.rev.validator), ] DownloadError._path_validator = LookupError_validator @@ -16074,9 +9952,9 @@ def __repr__(self): DownloadError.unsupported_file = DownloadError('unsupported_file') DownloadError.other = DownloadError('other') -DownloadZipArg._path_validator = ReadPath_validator +DownloadZipArg.path.validator = ReadPath_validator DownloadZipArg._all_field_names_ = set(['path']) -DownloadZipArg._all_fields_ = [('path', DownloadZipArg._path_validator)] +DownloadZipArg._all_fields_ = [('path', DownloadZipArg.path.validator)] DownloadZipError._path_validator = LookupError_validator DownloadZipError._too_large_validator = bv.Void() @@ -16093,13 +9971,13 @@ def __repr__(self): DownloadZipError.too_many_files = DownloadZipError('too_many_files') DownloadZipError.other = DownloadZipError('other') -DownloadZipResult._metadata_validator = FolderMetadata_validator +DownloadZipResult.metadata.validator = FolderMetadata_validator DownloadZipResult._all_field_names_ = set(['metadata']) -DownloadZipResult._all_fields_ = [('metadata', DownloadZipResult._metadata_validator)] +DownloadZipResult._all_fields_ = [('metadata', DownloadZipResult.metadata.validator)] -ExportArg._path_validator = ReadPath_validator +ExportArg.path.validator = ReadPath_validator ExportArg._all_field_names_ = set(['path']) -ExportArg._all_fields_ = [('path', ExportArg._path_validator)] +ExportArg._all_fields_ = [('path', ExportArg.path.validator)] ExportError._path_validator = LookupError_validator ExportError._non_exportable_validator = bv.Void() @@ -16116,33 +9994,33 @@ def __repr__(self): ExportError.retry_error = ExportError('retry_error') ExportError.other = ExportError('other') -ExportInfo._export_as_validator = bv.Nullable(bv.String()) +ExportInfo.export_as.validator = bv.Nullable(bv.String()) ExportInfo._all_field_names_ = set(['export_as']) -ExportInfo._all_fields_ = [('export_as', ExportInfo._export_as_validator)] +ExportInfo._all_fields_ = [('export_as', ExportInfo.export_as.validator)] -ExportMetadata._name_validator = bv.String() -ExportMetadata._size_validator = bv.UInt64() -ExportMetadata._export_hash_validator = bv.Nullable(Sha256HexHash_validator) +ExportMetadata.name.validator = bv.String() +ExportMetadata.size.validator = bv.UInt64() +ExportMetadata.export_hash.validator = bv.Nullable(Sha256HexHash_validator) ExportMetadata._all_field_names_ = set([ 'name', 'size', 'export_hash', ]) ExportMetadata._all_fields_ = [ - ('name', ExportMetadata._name_validator), - ('size', ExportMetadata._size_validator), - ('export_hash', ExportMetadata._export_hash_validator), + ('name', ExportMetadata.name.validator), + ('size', ExportMetadata.size.validator), + ('export_hash', ExportMetadata.export_hash.validator), ] -ExportResult._export_metadata_validator = ExportMetadata_validator -ExportResult._file_metadata_validator = FileMetadata_validator +ExportResult.export_metadata.validator = ExportMetadata_validator +ExportResult.file_metadata.validator = FileMetadata_validator ExportResult._all_field_names_ = set([ 'export_metadata', 'file_metadata', ]) ExportResult._all_fields_ = [ - ('export_metadata', ExportResult._export_metadata_validator), - ('file_metadata', ExportResult._file_metadata_validator), + ('export_metadata', ExportResult.export_metadata.validator), + ('file_metadata', ExportResult.file_metadata.validator), ] FileCategory._image_validator = bv.Void() @@ -16182,9 +10060,9 @@ def __repr__(self): FileCategory.others = FileCategory('others') FileCategory.other = FileCategory('other') -FileLock._content_validator = FileLockContent_validator +FileLock.content.validator = FileLockContent_validator FileLock._all_field_names_ = set(['content']) -FileLock._all_fields_ = [('content', FileLock._content_validator)] +FileLock._all_fields_ = [('content', FileLock.content.validator)] FileLockContent._unlocked_validator = bv.Void() FileLockContent._single_user_validator = SingleUserLock_validator @@ -16198,10 +10076,10 @@ def __repr__(self): FileLockContent.unlocked = FileLockContent('unlocked') FileLockContent.other = FileLockContent('other') -FileLockMetadata._is_lockholder_validator = bv.Nullable(bv.Boolean()) -FileLockMetadata._lockholder_name_validator = bv.Nullable(bv.String()) -FileLockMetadata._lockholder_account_id_validator = bv.Nullable(users_common.AccountId_validator) -FileLockMetadata._created_validator = bv.Nullable(common.DropboxTimestamp_validator) +FileLockMetadata.is_lockholder.validator = bv.Nullable(bv.Boolean()) +FileLockMetadata.lockholder_name.validator = bv.Nullable(bv.String()) +FileLockMetadata.lockholder_account_id.validator = bv.Nullable(users_common.AccountId_validator) +FileLockMetadata.created.validator = bv.Nullable(common.DropboxTimestamp_validator) FileLockMetadata._all_field_names_ = set([ 'is_lockholder', 'lockholder_name', @@ -16209,26 +10087,26 @@ def __repr__(self): 'created', ]) FileLockMetadata._all_fields_ = [ - ('is_lockholder', FileLockMetadata._is_lockholder_validator), - ('lockholder_name', FileLockMetadata._lockholder_name_validator), - ('lockholder_account_id', FileLockMetadata._lockholder_account_id_validator), - ('created', FileLockMetadata._created_validator), + ('is_lockholder', FileLockMetadata.is_lockholder.validator), + ('lockholder_name', FileLockMetadata.lockholder_name.validator), + ('lockholder_account_id', FileLockMetadata.lockholder_account_id.validator), + ('created', FileLockMetadata.created.validator), ] -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._symlink_info_validator = bv.Nullable(SymlinkInfo_validator) -FileMetadata._sharing_info_validator = bv.Nullable(FileSharingInfo_validator) -FileMetadata._is_downloadable_validator = bv.Boolean() -FileMetadata._export_info_validator = bv.Nullable(ExportInfo_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._file_lock_info_validator = bv.Nullable(FileLockMetadata_validator) +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.symlink_info.validator = bv.Nullable(SymlinkInfo_validator) +FileMetadata.sharing_info.validator = bv.Nullable(FileSharingInfo_validator) +FileMetadata.is_downloadable.validator = bv.Boolean() +FileMetadata.export_info.validator = bv.Nullable(ExportInfo_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.file_lock_info.validator = bv.Nullable(FileLockMetadata_validator) FileMetadata._field_names_ = set([ 'id', 'client_modified', @@ -16247,36 +10125,36 @@ def __repr__(self): ]) 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), - ('symlink_info', FileMetadata._symlink_info_validator), - ('sharing_info', FileMetadata._sharing_info_validator), - ('is_downloadable', FileMetadata._is_downloadable_validator), - ('export_info', FileMetadata._export_info_validator), - ('property_groups', FileMetadata._property_groups_validator), - ('has_explicit_shared_members', FileMetadata._has_explicit_shared_members_validator), - ('content_hash', FileMetadata._content_hash_validator), - ('file_lock_info', FileMetadata._file_lock_info_validator), + ('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), + ('symlink_info', FileMetadata.symlink_info.validator), + ('sharing_info', FileMetadata.sharing_info.validator), + ('is_downloadable', FileMetadata.is_downloadable.validator), + ('export_info', FileMetadata.export_info.validator), + ('property_groups', FileMetadata.property_groups.validator), + ('has_explicit_shared_members', FileMetadata.has_explicit_shared_members.validator), + ('content_hash', FileMetadata.content_hash.validator), + ('file_lock_info', FileMetadata.file_lock_info.validator), ] FileMetadata._all_fields_ = Metadata._all_fields_ + FileMetadata._fields_ -SharingInfo._read_only_validator = bv.Boolean() +SharingInfo.read_only.validator = bv.Boolean() SharingInfo._all_field_names_ = set(['read_only']) -SharingInfo._all_fields_ = [('read_only', SharingInfo._read_only_validator)] +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.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), + ('parent_shared_folder_id', FileSharingInfo.parent_shared_folder_id.validator), + ('modified_by', FileSharingInfo.modified_by.validator), ] FileStatus._active_validator = bv.Void() @@ -16292,10 +10170,10 @@ def __repr__(self): FileStatus.deleted = FileStatus('deleted') FileStatus.other = FileStatus('other') -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.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', @@ -16304,17 +10182,17 @@ def __repr__(self): ]) 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), + ('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.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', @@ -16322,15 +10200,15 @@ def __repr__(self): '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), + ('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.path.validator = ReadPath_validator GetCopyReferenceArg._all_field_names_ = set(['path']) -GetCopyReferenceArg._all_fields_ = [('path', GetCopyReferenceArg._path_validator)] +GetCopyReferenceArg._all_fields_ = [('path', GetCopyReferenceArg.path.validator)] GetCopyReferenceError._path_validator = LookupError_validator GetCopyReferenceError._other_validator = bv.Void() @@ -16341,23 +10219,23 @@ def __repr__(self): GetCopyReferenceError.other = GetCopyReferenceError('other') -GetCopyReferenceResult._metadata_validator = Metadata_validator -GetCopyReferenceResult._copy_reference_validator = bv.String() -GetCopyReferenceResult._expires_validator = common.DropboxTimestamp_validator +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), + ('metadata', GetCopyReferenceResult.metadata.validator), + ('copy_reference', GetCopyReferenceResult.copy_reference.validator), + ('expires', GetCopyReferenceResult.expires.validator), ] -GetTemporaryLinkArg._path_validator = ReadPath_validator +GetTemporaryLinkArg.path.validator = ReadPath_validator GetTemporaryLinkArg._all_field_names_ = set(['path']) -GetTemporaryLinkArg._all_fields_ = [('path', GetTemporaryLinkArg._path_validator)] +GetTemporaryLinkArg._all_fields_ = [('path', GetTemporaryLinkArg.path.validator)] GetTemporaryLinkError._path_validator = LookupError_validator GetTemporaryLinkError._email_not_verified_validator = bv.Void() @@ -16374,35 +10252,35 @@ def __repr__(self): GetTemporaryLinkError.unsupported_file = GetTemporaryLinkError('unsupported_file') GetTemporaryLinkError.other = GetTemporaryLinkError('other') -GetTemporaryLinkResult._metadata_validator = FileMetadata_validator -GetTemporaryLinkResult._link_validator = bv.String() +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), + ('metadata', GetTemporaryLinkResult.metadata.validator), + ('link', GetTemporaryLinkResult.link.validator), ] -GetTemporaryUploadLinkArg._commit_info_validator = CommitInfo_validator -GetTemporaryUploadLinkArg._duration_validator = bv.Float64(min_value=60.0, max_value=14400.0) +GetTemporaryUploadLinkArg.commit_info.validator = CommitInfo_validator +GetTemporaryUploadLinkArg.duration.validator = bv.Float64(min_value=60.0, max_value=14400.0) GetTemporaryUploadLinkArg._all_field_names_ = set([ 'commit_info', 'duration', ]) GetTemporaryUploadLinkArg._all_fields_ = [ - ('commit_info', GetTemporaryUploadLinkArg._commit_info_validator), - ('duration', GetTemporaryUploadLinkArg._duration_validator), + ('commit_info', GetTemporaryUploadLinkArg.commit_info.validator), + ('duration', GetTemporaryUploadLinkArg.duration.validator), ] -GetTemporaryUploadLinkResult._link_validator = bv.String() +GetTemporaryUploadLinkResult.link.validator = bv.String() GetTemporaryUploadLinkResult._all_field_names_ = set(['link']) -GetTemporaryUploadLinkResult._all_fields_ = [('link', GetTemporaryUploadLinkResult._link_validator)] +GetTemporaryUploadLinkResult._all_fields_ = [('link', GetTemporaryUploadLinkResult.link.validator)] -GetThumbnailBatchArg._entries_validator = bv.List(ThumbnailArg_validator) +GetThumbnailBatchArg.entries.validator = bv.List(ThumbnailArg_validator) GetThumbnailBatchArg._all_field_names_ = set(['entries']) -GetThumbnailBatchArg._all_fields_ = [('entries', GetThumbnailBatchArg._entries_validator)] +GetThumbnailBatchArg._all_fields_ = [('entries', GetThumbnailBatchArg.entries.validator)] GetThumbnailBatchError._too_many_files_validator = bv.Void() GetThumbnailBatchError._other_validator = bv.Void() @@ -16414,19 +10292,19 @@ def __repr__(self): GetThumbnailBatchError.too_many_files = GetThumbnailBatchError('too_many_files') GetThumbnailBatchError.other = GetThumbnailBatchError('other') -GetThumbnailBatchResult._entries_validator = bv.List(GetThumbnailBatchResultEntry_validator) +GetThumbnailBatchResult.entries.validator = bv.List(GetThumbnailBatchResultEntry_validator) GetThumbnailBatchResult._all_field_names_ = set(['entries']) -GetThumbnailBatchResult._all_fields_ = [('entries', GetThumbnailBatchResult._entries_validator)] +GetThumbnailBatchResult._all_fields_ = [('entries', GetThumbnailBatchResult.entries.validator)] -GetThumbnailBatchResultData._metadata_validator = FileMetadata_validator -GetThumbnailBatchResultData._thumbnail_validator = bv.String() +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), + ('metadata', GetThumbnailBatchResultData.metadata.validator), + ('thumbnail', GetThumbnailBatchResultData.thumbnail.validator), ] GetThumbnailBatchResultEntry._success_validator = GetThumbnailBatchResultData_validator @@ -16440,38 +10318,38 @@ def __repr__(self): GetThumbnailBatchResultEntry.other = GetThumbnailBatchResultEntry('other') -GpsCoordinates._latitude_validator = bv.Float64() -GpsCoordinates._longitude_validator = bv.Float64() +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), + ('latitude', GpsCoordinates.latitude.validator), + ('longitude', GpsCoordinates.longitude.validator), ] -HighlightSpan._highlight_str_validator = bv.String() -HighlightSpan._is_highlighted_validator = bv.Boolean() +HighlightSpan.highlight_str.validator = bv.String() +HighlightSpan.is_highlighted.validator = bv.Boolean() HighlightSpan._all_field_names_ = set([ 'highlight_str', 'is_highlighted', ]) HighlightSpan._all_fields_ = [ - ('highlight_str', HighlightSpan._highlight_str_validator), - ('is_highlighted', HighlightSpan._is_highlighted_validator), + ('highlight_str', HighlightSpan.highlight_str.validator), + ('is_highlighted', HighlightSpan.is_highlighted.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._include_property_groups_validator = bv.Nullable(file_properties.TemplateFilterBase_validator) -ListFolderArg._include_non_downloadable_files_validator = bv.Boolean() +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.include_property_groups.validator = bv.Nullable(file_properties.TemplateFilterBase_validator) +ListFolderArg.include_non_downloadable_files.validator = bv.Boolean() ListFolderArg._all_field_names_ = set([ 'path', 'recursive', @@ -16485,21 +10363,21 @@ def __repr__(self): 'include_non_downloadable_files', ]) 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), - ('include_property_groups', ListFolderArg._include_property_groups_validator), - ('include_non_downloadable_files', ListFolderArg._include_non_downloadable_files_validator), + ('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), + ('include_property_groups', ListFolderArg.include_property_groups.validator), + ('include_non_downloadable_files', ListFolderArg.include_non_downloadable_files.validator), ] -ListFolderContinueArg._cursor_validator = ListFolderCursor_validator +ListFolderContinueArg.cursor.validator = ListFolderCursor_validator ListFolderContinueArg._all_field_names_ = set(['cursor']) -ListFolderContinueArg._all_fields_ = [('cursor', ListFolderContinueArg._cursor_validator)] +ListFolderContinueArg._all_fields_ = [('cursor', ListFolderContinueArg.cursor.validator)] ListFolderContinueError._path_validator = LookupError_validator ListFolderContinueError._reset_validator = bv.Void() @@ -16524,19 +10402,19 @@ def __repr__(self): ListFolderError.other = ListFolderError('other') -ListFolderGetLatestCursorResult._cursor_validator = ListFolderCursor_validator +ListFolderGetLatestCursorResult.cursor.validator = ListFolderCursor_validator ListFolderGetLatestCursorResult._all_field_names_ = set(['cursor']) -ListFolderGetLatestCursorResult._all_fields_ = [('cursor', ListFolderGetLatestCursorResult._cursor_validator)] +ListFolderGetLatestCursorResult._all_fields_ = [('cursor', ListFolderGetLatestCursorResult.cursor.validator)] -ListFolderLongpollArg._cursor_validator = ListFolderCursor_validator -ListFolderLongpollArg._timeout_validator = bv.UInt64(min_value=30, max_value=480) +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), + ('cursor', ListFolderLongpollArg.cursor.validator), + ('timeout', ListFolderLongpollArg.timeout.validator), ] ListFolderLongpollError._reset_validator = bv.Void() @@ -16549,43 +10427,43 @@ def __repr__(self): ListFolderLongpollError.reset = ListFolderLongpollError('reset') ListFolderLongpollError.other = ListFolderLongpollError('other') -ListFolderLongpollResult._changes_validator = bv.Boolean() -ListFolderLongpollResult._backoff_validator = bv.Nullable(bv.UInt64()) +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), + ('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.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), + ('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.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), + ('path', ListRevisionsArg.path.validator), + ('mode', ListRevisionsArg.mode.validator), + ('limit', ListRevisionsArg.limit.validator), ] ListRevisionsError._path_validator = LookupError_validator @@ -16610,35 +10488,35 @@ def __repr__(self): 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.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), + ('is_deleted', ListRevisionsResult.is_deleted.validator), + ('server_deleted', ListRevisionsResult.server_deleted.validator), + ('entries', ListRevisionsResult.entries.validator), ] -LockConflictError._lock_validator = FileLock_validator +LockConflictError.lock.validator = FileLock_validator LockConflictError._all_field_names_ = set(['lock']) -LockConflictError._all_fields_ = [('lock', LockConflictError._lock_validator)] +LockConflictError._all_fields_ = [('lock', LockConflictError.lock.validator)] -LockFileArg._path_validator = WritePathOrId_validator +LockFileArg.path.validator = WritePathOrId_validator LockFileArg._all_field_names_ = set(['path']) -LockFileArg._all_fields_ = [('path', LockFileArg._path_validator)] +LockFileArg._all_fields_ = [('path', LockFileArg.path.validator)] -LockFileBatchArg._entries_validator = bv.List(LockFileArg_validator) +LockFileBatchArg.entries.validator = bv.List(LockFileArg_validator) LockFileBatchArg._all_field_names_ = set(['entries']) -LockFileBatchArg._all_fields_ = [('entries', LockFileBatchArg._entries_validator)] +LockFileBatchArg._all_fields_ = [('entries', LockFileBatchArg.entries.validator)] -LockFileBatchResult._entries_validator = bv.List(LockFileResultEntry_validator) +LockFileBatchResult.entries.validator = bv.List(LockFileResultEntry_validator) LockFileBatchResult._all_field_names_ = FileOpsResult._all_field_names_.union(set(['entries'])) -LockFileBatchResult._all_fields_ = FileOpsResult._all_fields_ + [('entries', LockFileBatchResult._entries_validator)] +LockFileBatchResult._all_fields_ = FileOpsResult._all_fields_ + [('entries', LockFileBatchResult.entries.validator)] LockFileError._path_lookup_validator = LookupError_validator LockFileError._too_many_write_operations_validator = bv.Void() @@ -16669,15 +10547,15 @@ def __repr__(self): LockFileError.internal_error = LockFileError('internal_error') LockFileError.other = LockFileError('other') -LockFileResult._metadata_validator = Metadata_validator -LockFileResult._lock_validator = FileLock_validator +LockFileResult.metadata.validator = Metadata_validator +LockFileResult.lock.validator = FileLock_validator LockFileResult._all_field_names_ = set([ 'metadata', 'lock', ]) LockFileResult._all_fields_ = [ - ('metadata', LockFileResult._metadata_validator), - ('lock', LockFileResult._lock_validator), + ('metadata', LockFileResult.metadata.validator), + ('lock', LockFileResult.lock.validator), ] LockFileResultEntry._success_validator = LockFileResult_validator @@ -16723,9 +10601,9 @@ def __repr__(self): 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.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', @@ -16733,9 +10611,9 @@ def __repr__(self): ]) MediaMetadata._all_field_names_ = MediaMetadata._field_names_ MediaMetadata._fields_ = [ - ('dimensions', MediaMetadata._dimensions_validator), - ('location', MediaMetadata._location_validator), - ('time_taken', MediaMetadata._time_taken_validator), + ('dimensions', MediaMetadata.dimensions.validator), + ('location', MediaMetadata.location.validator), + ('time_taken', MediaMetadata.time_taken.validator), ] MediaMetadata._all_fields_ = MediaMetadata._fields_ @@ -16758,10 +10636,10 @@ def __repr__(self): MetadataV2.other = MetadataV2('other') -MinimalFileLinkMetadata._url_validator = bv.String() -MinimalFileLinkMetadata._id_validator = bv.Nullable(Id_validator) -MinimalFileLinkMetadata._path_validator = bv.Nullable(bv.String()) -MinimalFileLinkMetadata._rev_validator = Rev_validator +MinimalFileLinkMetadata.url.validator = bv.String() +MinimalFileLinkMetadata.id.validator = bv.Nullable(Id_validator) +MinimalFileLinkMetadata.path.validator = bv.Nullable(bv.String()) +MinimalFileLinkMetadata.rev.validator = Rev_validator MinimalFileLinkMetadata._all_field_names_ = set([ 'url', 'id', @@ -16769,26 +10647,26 @@ def __repr__(self): 'rev', ]) MinimalFileLinkMetadata._all_fields_ = [ - ('url', MinimalFileLinkMetadata._url_validator), - ('id', MinimalFileLinkMetadata._id_validator), - ('path', MinimalFileLinkMetadata._path_validator), - ('rev', MinimalFileLinkMetadata._rev_validator), + ('url', MinimalFileLinkMetadata.url.validator), + ('id', MinimalFileLinkMetadata.id.validator), + ('path', MinimalFileLinkMetadata.path.validator), + ('rev', MinimalFileLinkMetadata.rev.validator), ] -RelocationBatchArgBase._entries_validator = bv.List(RelocationPath_validator, min_items=1) -RelocationBatchArgBase._autorename_validator = bv.Boolean() +RelocationBatchArgBase.entries.validator = bv.List(RelocationPath_validator, min_items=1) +RelocationBatchArgBase.autorename.validator = bv.Boolean() RelocationBatchArgBase._all_field_names_ = set([ 'entries', 'autorename', ]) RelocationBatchArgBase._all_fields_ = [ - ('entries', RelocationBatchArgBase._entries_validator), - ('autorename', RelocationBatchArgBase._autorename_validator), + ('entries', RelocationBatchArgBase.entries.validator), + ('autorename', RelocationBatchArgBase.autorename.validator), ] -MoveBatchArg._allow_ownership_transfer_validator = bv.Boolean() +MoveBatchArg.allow_ownership_transfer.validator = bv.Boolean() MoveBatchArg._all_field_names_ = RelocationBatchArgBase._all_field_names_.union(set(['allow_ownership_transfer'])) -MoveBatchArg._all_fields_ = RelocationBatchArgBase._all_fields_ + [('allow_ownership_transfer', MoveBatchArg._allow_ownership_transfer_validator)] +MoveBatchArg._all_fields_ = RelocationBatchArgBase._all_fields_ + [('allow_ownership_transfer', MoveBatchArg.allow_ownership_transfer.validator)] MoveIntoVaultError._is_shared_folder_validator = bv.Void() MoveIntoVaultError._other_validator = bv.Void() @@ -16816,15 +10694,15 @@ def __repr__(self): PhotoMetadata._fields_ = [] PhotoMetadata._all_fields_ = MediaMetadata._all_fields_ + PhotoMetadata._fields_ -PreviewArg._path_validator = ReadPath_validator -PreviewArg._rev_validator = bv.Nullable(Rev_validator) +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), + ('path', PreviewArg.path.validator), + ('rev', PreviewArg.rev.validator), ] PreviewError._path_validator = LookupError_validator @@ -16842,51 +10720,51 @@ def __repr__(self): PreviewError.unsupported_extension = PreviewError('unsupported_extension') PreviewError.unsupported_content = PreviewError('unsupported_content') -PreviewResult._file_metadata_validator = bv.Nullable(FileMetadata_validator) -PreviewResult._link_metadata_validator = bv.Nullable(MinimalFileLinkMetadata_validator) +PreviewResult.file_metadata.validator = bv.Nullable(FileMetadata_validator) +PreviewResult.link_metadata.validator = bv.Nullable(MinimalFileLinkMetadata_validator) PreviewResult._all_field_names_ = set([ 'file_metadata', 'link_metadata', ]) PreviewResult._all_fields_ = [ - ('file_metadata', PreviewResult._file_metadata_validator), - ('link_metadata', PreviewResult._link_metadata_validator), + ('file_metadata', PreviewResult.file_metadata.validator), + ('link_metadata', PreviewResult.link_metadata.validator), ] -RelocationPath._from_path_validator = WritePathOrId_validator -RelocationPath._to_path_validator = WritePathOrId_validator +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), + ('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.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), + ('allow_shared_folder', RelocationArg.allow_shared_folder.validator), + ('autorename', RelocationArg.autorename.validator), + ('allow_ownership_transfer', RelocationArg.allow_ownership_transfer.validator), ] -RelocationBatchArg._allow_shared_folder_validator = bv.Boolean() -RelocationBatchArg._allow_ownership_transfer_validator = bv.Boolean() +RelocationBatchArg.allow_shared_folder.validator = bv.Boolean() +RelocationBatchArg.allow_ownership_transfer.validator = bv.Boolean() RelocationBatchArg._all_field_names_ = RelocationBatchArgBase._all_field_names_.union(set([ 'allow_shared_folder', 'allow_ownership_transfer', ])) RelocationBatchArg._all_fields_ = RelocationBatchArgBase._all_fields_ + [ - ('allow_shared_folder', RelocationBatchArg._allow_shared_folder_validator), - ('allow_ownership_transfer', RelocationBatchArg._allow_ownership_transfer_validator), + ('allow_shared_folder', RelocationBatchArg.allow_shared_folder.validator), + ('allow_ownership_transfer', RelocationBatchArg.allow_ownership_transfer.validator), ] RelocationError._from_lookup_validator = LookupError_validator @@ -16972,13 +10850,13 @@ def __repr__(self): RelocationBatchLaunch.other = RelocationBatchLaunch('other') -RelocationBatchResult._entries_validator = bv.List(RelocationBatchResultData_validator) +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)] +RelocationBatchResult._all_fields_ = FileOpsResult._all_fields_ + [('entries', RelocationBatchResult.entries.validator)] -RelocationBatchResultData._metadata_validator = Metadata_validator +RelocationBatchResultData.metadata.validator = Metadata_validator RelocationBatchResultData._all_field_names_ = set(['metadata']) -RelocationBatchResultData._all_fields_ = [('metadata', RelocationBatchResultData._metadata_validator)] +RelocationBatchResultData._all_fields_ = [('metadata', RelocationBatchResultData.metadata.validator)] RelocationBatchResultEntry._success_validator = Metadata_validator RelocationBatchResultEntry._failure_validator = RelocationBatchErrorEntry_validator @@ -17003,23 +10881,23 @@ def __repr__(self): } RelocationBatchV2Launch._tagmap.update(async_.LaunchResultBase._tagmap) -RelocationBatchV2Result._entries_validator = bv.List(RelocationBatchResultEntry_validator) +RelocationBatchV2Result.entries.validator = bv.List(RelocationBatchResultEntry_validator) RelocationBatchV2Result._all_field_names_ = FileOpsResult._all_field_names_.union(set(['entries'])) -RelocationBatchV2Result._all_fields_ = FileOpsResult._all_fields_ + [('entries', RelocationBatchV2Result._entries_validator)] +RelocationBatchV2Result._all_fields_ = FileOpsResult._all_fields_ + [('entries', RelocationBatchV2Result.entries.validator)] -RelocationResult._metadata_validator = 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)] +RelocationResult._all_fields_ = FileOpsResult._all_fields_ + [('metadata', RelocationResult.metadata.validator)] -RestoreArg._path_validator = WritePath_validator -RestoreArg._rev_validator = Rev_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), + ('path', RestoreArg.path.validator), + ('rev', RestoreArg.rev.validator), ] RestoreError._path_lookup_validator = LookupError_validator @@ -17039,15 +10917,15 @@ def __repr__(self): RestoreError.in_progress = RestoreError('in_progress') RestoreError.other = RestoreError('other') -SaveCopyReferenceArg._copy_reference_validator = bv.String() -SaveCopyReferenceArg._path_validator = Path_validator +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), + ('copy_reference', SaveCopyReferenceArg.copy_reference.validator), + ('path', SaveCopyReferenceArg.path.validator), ] SaveCopyReferenceError._path_validator = WriteError_validator @@ -17071,19 +10949,19 @@ def __repr__(self): SaveCopyReferenceError.too_many_files = SaveCopyReferenceError('too_many_files') SaveCopyReferenceError.other = SaveCopyReferenceError('other') -SaveCopyReferenceResult._metadata_validator = Metadata_validator +SaveCopyReferenceResult.metadata.validator = Metadata_validator SaveCopyReferenceResult._all_field_names_ = set(['metadata']) -SaveCopyReferenceResult._all_fields_ = [('metadata', SaveCopyReferenceResult._metadata_validator)] +SaveCopyReferenceResult._all_fields_ = [('metadata', SaveCopyReferenceResult.metadata.validator)] -SaveUrlArg._path_validator = Path_validator -SaveUrlArg._url_validator = bv.String() +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), + ('path', SaveUrlArg.path.validator), + ('url', SaveUrlArg.url.validator), ] SaveUrlError._path_validator = WriteError_validator @@ -17118,11 +10996,11 @@ def __repr__(self): } SaveUrlResult._tagmap.update(async_.LaunchResultBase._tagmap) -SearchArg._path_validator = PathROrId_validator -SearchArg._query_validator = bv.String(max_length=1000) -SearchArg._start_validator = bv.UInt64(max_value=9999) -SearchArg._max_results_validator = bv.UInt64(min_value=1, max_value=1000) -SearchArg._mode_validator = SearchMode_validator +SearchArg.path.validator = PathROrId_validator +SearchArg.query.validator = bv.String(max_length=1000) +SearchArg.start.validator = bv.UInt64(max_value=9999) +SearchArg.max_results.validator = bv.UInt64(min_value=1, max_value=1000) +SearchArg.mode.validator = SearchMode_validator SearchArg._all_field_names_ = set([ 'path', 'query', @@ -17131,11 +11009,11 @@ def __repr__(self): '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), + ('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 @@ -17152,20 +11030,20 @@ def __repr__(self): SearchError.internal_error = SearchError('internal_error') SearchError.other = SearchError('other') -SearchMatch._match_type_validator = SearchMatchType_validator -SearchMatch._metadata_validator = Metadata_validator +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), + ('match_type', SearchMatch.match_type.validator), + ('metadata', SearchMatch.metadata.validator), ] -SearchMatchFieldOptions._include_highlights_validator = bv.Boolean() +SearchMatchFieldOptions.include_highlights.validator = bv.Boolean() SearchMatchFieldOptions._all_field_names_ = set(['include_highlights']) -SearchMatchFieldOptions._all_fields_ = [('include_highlights', SearchMatchFieldOptions._include_highlights_validator)] +SearchMatchFieldOptions._all_fields_ = [('include_highlights', SearchMatchFieldOptions.include_highlights.validator)] SearchMatchType._filename_validator = bv.Void() SearchMatchType._content_validator = bv.Void() @@ -17199,18 +11077,18 @@ def __repr__(self): SearchMatchTypeV2.image_content = SearchMatchTypeV2('image_content') SearchMatchTypeV2.other = SearchMatchTypeV2('other') -SearchMatchV2._metadata_validator = MetadataV2_validator -SearchMatchV2._match_type_validator = bv.Nullable(SearchMatchTypeV2_validator) -SearchMatchV2._highlight_spans_validator = bv.Nullable(bv.List(HighlightSpan_validator)) +SearchMatchV2.metadata.validator = MetadataV2_validator +SearchMatchV2.match_type.validator = bv.Nullable(SearchMatchTypeV2_validator) +SearchMatchV2.highlight_spans.validator = bv.Nullable(bv.List(HighlightSpan_validator)) SearchMatchV2._all_field_names_ = set([ 'metadata', 'match_type', 'highlight_spans', ]) SearchMatchV2._all_fields_ = [ - ('metadata', SearchMatchV2._metadata_validator), - ('match_type', SearchMatchV2._match_type_validator), - ('highlight_spans', SearchMatchV2._highlight_spans_validator), + ('metadata', SearchMatchV2.metadata.validator), + ('match_type', SearchMatchV2.match_type.validator), + ('highlight_spans', SearchMatchV2.highlight_spans.validator), ] SearchMode._filename_validator = bv.Void() @@ -17226,13 +11104,13 @@ def __repr__(self): SearchMode.filename_and_content = SearchMode('filename_and_content') SearchMode.deleted_filename = SearchMode('deleted_filename') -SearchOptions._path_validator = bv.Nullable(PathROrId_validator) -SearchOptions._max_results_validator = bv.UInt64(min_value=1, max_value=1000) -SearchOptions._order_by_validator = bv.Nullable(SearchOrderBy_validator) -SearchOptions._file_status_validator = FileStatus_validator -SearchOptions._filename_only_validator = bv.Boolean() -SearchOptions._file_extensions_validator = bv.Nullable(bv.List(bv.String())) -SearchOptions._file_categories_validator = bv.Nullable(bv.List(FileCategory_validator)) +SearchOptions.path.validator = bv.Nullable(PathROrId_validator) +SearchOptions.max_results.validator = bv.UInt64(min_value=1, max_value=1000) +SearchOptions.order_by.validator = bv.Nullable(SearchOrderBy_validator) +SearchOptions.file_status.validator = FileStatus_validator +SearchOptions.filename_only.validator = bv.Boolean() +SearchOptions.file_extensions.validator = bv.Nullable(bv.List(bv.String())) +SearchOptions.file_categories.validator = bv.Nullable(bv.List(FileCategory_validator)) SearchOptions._all_field_names_ = set([ 'path', 'max_results', @@ -17243,13 +11121,13 @@ def __repr__(self): 'file_categories', ]) SearchOptions._all_fields_ = [ - ('path', SearchOptions._path_validator), - ('max_results', SearchOptions._max_results_validator), - ('order_by', SearchOptions._order_by_validator), - ('file_status', SearchOptions._file_status_validator), - ('filename_only', SearchOptions._filename_only_validator), - ('file_extensions', SearchOptions._file_extensions_validator), - ('file_categories', SearchOptions._file_categories_validator), + ('path', SearchOptions.path.validator), + ('max_results', SearchOptions.max_results.validator), + ('order_by', SearchOptions.order_by.validator), + ('file_status', SearchOptions.file_status.validator), + ('filename_only', SearchOptions.filename_only.validator), + ('file_extensions', SearchOptions.file_extensions.validator), + ('file_categories', SearchOptions.file_categories.validator), ] SearchOrderBy._relevance_validator = bv.Void() @@ -17265,24 +11143,24 @@ def __repr__(self): SearchOrderBy.last_modified_time = SearchOrderBy('last_modified_time') SearchOrderBy.other = SearchOrderBy('other') -SearchResult._matches_validator = bv.List(SearchMatch_validator) -SearchResult._more_validator = bv.Boolean() -SearchResult._start_validator = bv.UInt64() +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), + ('matches', SearchResult.matches.validator), + ('more', SearchResult.more.validator), + ('start', SearchResult.start.validator), ] -SearchV2Arg._query_validator = bv.String(max_length=1000) -SearchV2Arg._options_validator = bv.Nullable(SearchOptions_validator) -SearchV2Arg._match_field_options_validator = bv.Nullable(SearchMatchFieldOptions_validator) -SearchV2Arg._include_highlights_validator = bv.Nullable(bv.Boolean()) +SearchV2Arg.query.validator = bv.String(max_length=1000) +SearchV2Arg.options.validator = bv.Nullable(SearchOptions_validator) +SearchV2Arg.match_field_options.validator = bv.Nullable(SearchMatchFieldOptions_validator) +SearchV2Arg.include_highlights.validator = bv.Nullable(bv.Boolean()) SearchV2Arg._all_field_names_ = set([ 'query', 'options', @@ -17290,72 +11168,72 @@ def __repr__(self): 'include_highlights', ]) SearchV2Arg._all_fields_ = [ - ('query', SearchV2Arg._query_validator), - ('options', SearchV2Arg._options_validator), - ('match_field_options', SearchV2Arg._match_field_options_validator), - ('include_highlights', SearchV2Arg._include_highlights_validator), + ('query', SearchV2Arg.query.validator), + ('options', SearchV2Arg.options.validator), + ('match_field_options', SearchV2Arg.match_field_options.validator), + ('include_highlights', SearchV2Arg.include_highlights.validator), ] -SearchV2ContinueArg._cursor_validator = SearchV2Cursor_validator +SearchV2ContinueArg.cursor.validator = SearchV2Cursor_validator SearchV2ContinueArg._all_field_names_ = set(['cursor']) -SearchV2ContinueArg._all_fields_ = [('cursor', SearchV2ContinueArg._cursor_validator)] +SearchV2ContinueArg._all_fields_ = [('cursor', SearchV2ContinueArg.cursor.validator)] -SearchV2Result._matches_validator = bv.List(SearchMatchV2_validator) -SearchV2Result._has_more_validator = bv.Boolean() -SearchV2Result._cursor_validator = bv.Nullable(SearchV2Cursor_validator) +SearchV2Result.matches.validator = bv.List(SearchMatchV2_validator) +SearchV2Result.has_more.validator = bv.Boolean() +SearchV2Result.cursor.validator = bv.Nullable(SearchV2Cursor_validator) SearchV2Result._all_field_names_ = set([ 'matches', 'has_more', 'cursor', ]) SearchV2Result._all_fields_ = [ - ('matches', SearchV2Result._matches_validator), - ('has_more', SearchV2Result._has_more_validator), - ('cursor', SearchV2Result._cursor_validator), + ('matches', SearchV2Result.matches.validator), + ('has_more', SearchV2Result.has_more.validator), + ('cursor', SearchV2Result.cursor.validator), ] -SharedLink._url_validator = SharedLinkUrl_validator -SharedLink._password_validator = bv.Nullable(bv.String()) +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), + ('url', SharedLink.url.validator), + ('password', SharedLink.password.validator), ] -SharedLinkFileInfo._url_validator = bv.String() -SharedLinkFileInfo._path_validator = bv.Nullable(bv.String()) -SharedLinkFileInfo._password_validator = bv.Nullable(bv.String()) +SharedLinkFileInfo.url.validator = bv.String() +SharedLinkFileInfo.path.validator = bv.Nullable(bv.String()) +SharedLinkFileInfo.password.validator = bv.Nullable(bv.String()) SharedLinkFileInfo._all_field_names_ = set([ 'url', 'path', 'password', ]) SharedLinkFileInfo._all_fields_ = [ - ('url', SharedLinkFileInfo._url_validator), - ('path', SharedLinkFileInfo._path_validator), - ('password', SharedLinkFileInfo._password_validator), + ('url', SharedLinkFileInfo.url.validator), + ('path', SharedLinkFileInfo.path.validator), + ('password', SharedLinkFileInfo.password.validator), ] -SingleUserLock._created_validator = common.DropboxTimestamp_validator -SingleUserLock._lock_holder_account_id_validator = users_common.AccountId_validator -SingleUserLock._lock_holder_team_id_validator = bv.Nullable(bv.String()) +SingleUserLock.created.validator = common.DropboxTimestamp_validator +SingleUserLock.lock_holder_account_id.validator = users_common.AccountId_validator +SingleUserLock.lock_holder_team_id.validator = bv.Nullable(bv.String()) SingleUserLock._all_field_names_ = set([ 'created', 'lock_holder_account_id', 'lock_holder_team_id', ]) SingleUserLock._all_fields_ = [ - ('created', SingleUserLock._created_validator), - ('lock_holder_account_id', SingleUserLock._lock_holder_account_id_validator), - ('lock_holder_team_id', SingleUserLock._lock_holder_team_id_validator), + ('created', SingleUserLock.created.validator), + ('lock_holder_account_id', SingleUserLock.lock_holder_account_id.validator), + ('lock_holder_team_id', SingleUserLock.lock_holder_team_id.validator), ] -SymlinkInfo._target_validator = bv.String() +SymlinkInfo.target.validator = bv.String() SymlinkInfo._all_field_names_ = set(['target']) -SymlinkInfo._all_fields_ = [('target', SymlinkInfo._target_validator)] +SymlinkInfo._all_fields_ = [('target', SymlinkInfo.target.validator)] SyncSetting._default_validator = bv.Void() SyncSetting._not_synced_validator = bv.Void() @@ -17401,10 +11279,10 @@ def __repr__(self): SyncSettingsError.unsupported_configuration = SyncSettingsError('unsupported_configuration') SyncSettingsError.other = SyncSettingsError('other') -ThumbnailArg._path_validator = ReadPath_validator -ThumbnailArg._format_validator = ThumbnailFormat_validator -ThumbnailArg._size_validator = ThumbnailSize_validator -ThumbnailArg._mode_validator = ThumbnailMode_validator +ThumbnailArg.path.validator = ReadPath_validator +ThumbnailArg.format.validator = ThumbnailFormat_validator +ThumbnailArg.size.validator = ThumbnailSize_validator +ThumbnailArg.mode.validator = ThumbnailMode_validator ThumbnailArg._all_field_names_ = set([ 'path', 'format', @@ -17412,10 +11290,10 @@ def __repr__(self): 'mode', ]) ThumbnailArg._all_fields_ = [ - ('path', ThumbnailArg._path_validator), - ('format', ThumbnailArg._format_validator), - ('size', ThumbnailArg._size_validator), - ('mode', ThumbnailArg._mode_validator), + ('path', ThumbnailArg.path.validator), + ('format', ThumbnailArg.format.validator), + ('size', ThumbnailArg.size.validator), + ('mode', ThumbnailArg.mode.validator), ] ThumbnailError._path_validator = LookupError_validator @@ -17487,10 +11365,10 @@ def __repr__(self): ThumbnailSize.w1024h768 = ThumbnailSize('w1024h768') ThumbnailSize.w2048h1536 = ThumbnailSize('w2048h1536') -ThumbnailV2Arg._resource_validator = PathOrLink_validator -ThumbnailV2Arg._format_validator = ThumbnailFormat_validator -ThumbnailV2Arg._size_validator = ThumbnailSize_validator -ThumbnailV2Arg._mode_validator = ThumbnailMode_validator +ThumbnailV2Arg.resource.validator = PathOrLink_validator +ThumbnailV2Arg.format.validator = ThumbnailFormat_validator +ThumbnailV2Arg.size.validator = ThumbnailSize_validator +ThumbnailV2Arg.mode.validator = ThumbnailMode_validator ThumbnailV2Arg._all_field_names_ = set([ 'resource', 'format', @@ -17498,10 +11376,10 @@ def __repr__(self): 'mode', ]) ThumbnailV2Arg._all_fields_ = [ - ('resource', ThumbnailV2Arg._resource_validator), - ('format', ThumbnailV2Arg._format_validator), - ('size', ThumbnailV2Arg._size_validator), - ('mode', ThumbnailV2Arg._mode_validator), + ('resource', ThumbnailV2Arg.resource.validator), + ('format', ThumbnailV2Arg.format.validator), + ('size', ThumbnailV2Arg.size.validator), + ('mode', ThumbnailV2Arg.mode.validator), ] ThumbnailV2Error._path_validator = LookupError_validator @@ -17528,13 +11406,13 @@ def __repr__(self): ThumbnailV2Error.not_found = ThumbnailV2Error('not_found') ThumbnailV2Error.other = ThumbnailV2Error('other') -UnlockFileArg._path_validator = WritePathOrId_validator +UnlockFileArg.path.validator = WritePathOrId_validator UnlockFileArg._all_field_names_ = set(['path']) -UnlockFileArg._all_fields_ = [('path', UnlockFileArg._path_validator)] +UnlockFileArg._all_fields_ = [('path', UnlockFileArg.path.validator)] -UnlockFileBatchArg._entries_validator = bv.List(UnlockFileArg_validator) +UnlockFileBatchArg.entries.validator = bv.List(UnlockFileArg_validator) UnlockFileBatchArg._all_field_names_ = set(['entries']) -UnlockFileBatchArg._all_fields_ = [('entries', UnlockFileBatchArg._entries_validator)] +UnlockFileBatchArg._all_fields_ = [('entries', UnlockFileBatchArg.entries.validator)] UploadError._path_validator = UploadWriteFailed_validator UploadError._properties_error_validator = file_properties.InvalidPropertyGroupError_validator @@ -17551,42 +11429,42 @@ def __repr__(self): } UploadErrorWithProperties._tagmap.update(UploadError._tagmap) -UploadSessionAppendArg._cursor_validator = UploadSessionCursor_validator -UploadSessionAppendArg._close_validator = bv.Boolean() +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), + ('cursor', UploadSessionAppendArg.cursor.validator), + ('close', UploadSessionAppendArg.close.validator), ] -UploadSessionCursor._session_id_validator = bv.String() -UploadSessionCursor._offset_validator = bv.UInt64() +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), + ('session_id', UploadSessionCursor.session_id.validator), + ('offset', UploadSessionCursor.offset.validator), ] -UploadSessionFinishArg._cursor_validator = UploadSessionCursor_validator -UploadSessionFinishArg._commit_validator = CommitInfo_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), + ('cursor', UploadSessionFinishArg.cursor.validator), + ('commit', UploadSessionFinishArg.commit.validator), ] -UploadSessionFinishBatchArg._entries_validator = bv.List(UploadSessionFinishArg_validator, max_items=1000) +UploadSessionFinishBatchArg.entries.validator = bv.List(UploadSessionFinishArg_validator, max_items=1000) UploadSessionFinishBatchArg._all_field_names_ = set(['entries']) -UploadSessionFinishBatchArg._all_fields_ = [('entries', UploadSessionFinishBatchArg._entries_validator)] +UploadSessionFinishBatchArg._all_fields_ = [('entries', UploadSessionFinishBatchArg.entries.validator)] UploadSessionFinishBatchJobStatus._complete_validator = UploadSessionFinishBatchResult_validator UploadSessionFinishBatchJobStatus._tagmap = { @@ -17604,9 +11482,9 @@ def __repr__(self): UploadSessionFinishBatchLaunch.other = UploadSessionFinishBatchLaunch('other') -UploadSessionFinishBatchResult._entries_validator = bv.List(UploadSessionFinishBatchResultEntry_validator) +UploadSessionFinishBatchResult.entries.validator = bv.List(UploadSessionFinishBatchResultEntry_validator) UploadSessionFinishBatchResult._all_field_names_ = set(['entries']) -UploadSessionFinishBatchResult._all_fields_ = [('entries', UploadSessionFinishBatchResult._entries_validator)] +UploadSessionFinishBatchResult._all_fields_ = [('entries', UploadSessionFinishBatchResult.entries.validator)] UploadSessionFinishBatchResultEntry._success_validator = FileMetadata_validator UploadSessionFinishBatchResultEntry._failure_validator = UploadSessionFinishError_validator @@ -17670,19 +11548,19 @@ def __repr__(self): UploadSessionLookupError.concurrent_session_invalid_data_size = UploadSessionLookupError('concurrent_session_invalid_data_size') UploadSessionLookupError.other = UploadSessionLookupError('other') -UploadSessionOffsetError._correct_offset_validator = bv.UInt64() +UploadSessionOffsetError.correct_offset.validator = bv.UInt64() UploadSessionOffsetError._all_field_names_ = set(['correct_offset']) -UploadSessionOffsetError._all_fields_ = [('correct_offset', UploadSessionOffsetError._correct_offset_validator)] +UploadSessionOffsetError._all_fields_ = [('correct_offset', UploadSessionOffsetError.correct_offset.validator)] -UploadSessionStartArg._close_validator = bv.Boolean() -UploadSessionStartArg._session_type_validator = bv.Nullable(UploadSessionType_validator) +UploadSessionStartArg.close.validator = bv.Boolean() +UploadSessionStartArg.session_type.validator = bv.Nullable(UploadSessionType_validator) UploadSessionStartArg._all_field_names_ = set([ 'close', 'session_type', ]) UploadSessionStartArg._all_fields_ = [ - ('close', UploadSessionStartArg._close_validator), - ('session_type', UploadSessionStartArg._session_type_validator), + ('close', UploadSessionStartArg.close.validator), + ('session_type', UploadSessionStartArg.session_type.validator), ] UploadSessionStartError._concurrent_session_data_not_allowed_validator = bv.Void() @@ -17698,9 +11576,9 @@ def __repr__(self): UploadSessionStartError.concurrent_session_close_not_allowed = UploadSessionStartError('concurrent_session_close_not_allowed') UploadSessionStartError.other = UploadSessionStartError('other') -UploadSessionStartResult._session_id_validator = bv.String() +UploadSessionStartResult.session_id.validator = bv.String() UploadSessionStartResult._all_field_names_ = set(['session_id']) -UploadSessionStartResult._all_fields_ = [('session_id', UploadSessionStartResult._session_id_validator)] +UploadSessionStartResult._all_fields_ = [('session_id', UploadSessionStartResult.session_id.validator)] UploadSessionType._sequential_validator = bv.Void() UploadSessionType._concurrent_validator = bv.Void() @@ -17715,21 +11593,21 @@ def __repr__(self): UploadSessionType.concurrent = UploadSessionType('concurrent') UploadSessionType.other = UploadSessionType('other') -UploadWriteFailed._reason_validator = WriteError_validator -UploadWriteFailed._upload_session_id_validator = bv.String() +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), + ('reason', UploadWriteFailed.reason.validator), + ('upload_session_id', UploadWriteFailed.upload_session_id.validator), ] -VideoMetadata._duration_validator = bv.Nullable(bv.UInt64()) +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._fields_ = [('duration', VideoMetadata.duration.validator)] VideoMetadata._all_fields_ = MediaMetadata._all_fields_ + VideoMetadata._fields_ WriteConflictError._file_validator = bv.Void() @@ -17789,6 +11667,51 @@ def __repr__(self): WriteMode.add = WriteMode('add') WriteMode.overwrite = WriteMode('overwrite') +GetMetadataArg.include_media_info.default = False +GetMetadataArg.include_deleted.default = False +GetMetadataArg.include_has_explicit_shared_members.default = False +CommitInfo.mode.default = WriteMode.add +CommitInfo.autorename.default = False +CommitInfo.mute.default = False +CommitInfo.strict_conflict.default = False +CreateFolderArg.autorename.default = False +CreateFolderBatchArg.autorename.default = False +CreateFolderBatchArg.force_async.default = False +FileMetadata.is_downloadable.default = True +FolderSharingInfo.traverse_only.default = False +FolderSharingInfo.no_access.default = False +GetTemporaryUploadLinkArg.duration.default = 14400.0 +ListFolderArg.recursive.default = False +ListFolderArg.include_media_info.default = False +ListFolderArg.include_deleted.default = False +ListFolderArg.include_has_explicit_shared_members.default = False +ListFolderArg.include_mounted_folders.default = True +ListFolderArg.include_non_downloadable_files.default = True +ListFolderLongpollArg.timeout.default = 30 +ListRevisionsArg.mode.default = ListRevisionsMode.path +ListRevisionsArg.limit.default = 10 +RelocationBatchArgBase.autorename.default = False +MoveBatchArg.allow_ownership_transfer.default = False +RelocationArg.allow_shared_folder.default = False +RelocationArg.autorename.default = False +RelocationArg.allow_ownership_transfer.default = False +RelocationBatchArg.allow_shared_folder.default = False +RelocationBatchArg.allow_ownership_transfer.default = False +SearchArg.start.default = 0 +SearchArg.max_results.default = 100 +SearchArg.mode.default = SearchMode.filename +SearchMatchFieldOptions.include_highlights.default = False +SearchOptions.max_results.default = 100 +SearchOptions.file_status.default = FileStatus.active +SearchOptions.filename_only.default = False +ThumbnailArg.format.default = ThumbnailFormat.jpeg +ThumbnailArg.size.default = ThumbnailSize.w64h64 +ThumbnailArg.mode.default = ThumbnailMode.strict +ThumbnailV2Arg.format.default = ThumbnailFormat.jpeg +ThumbnailV2Arg.size.default = ThumbnailSize.w64h64 +ThumbnailV2Arg.mode.default = ThumbnailMode.strict +UploadSessionAppendArg.close.default = False +UploadSessionStartArg.close.default = False alpha_get_metadata = bb.Route( 'alpha/get_metadata', 1, diff --git a/dropbox/paper.py b/dropbox/paper.py index 8160edf1..dcf67664 100644 --- a/dropbox/paper.py +++ b/dropbox/paper.py @@ -5,26 +5,15 @@ # pylint: skip-file """ This namespace contains endpoints and data types for managing docs and folders in Dropbox Paper. -New Paper users will see docs they create in their filesystem as '.paper' files alongside their other Dropbox content. The /paper endpoints are being deprecated and you'll need to use /files and /sharing endpoints to interact with their Paper content. Read more in the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide`. +New Paper users will see docs they create in their filesystem as '.paper' files alongside their other Dropbox content. The /paper endpoints are being deprecated and you'll need to use /files and /sharing endpoints to interact with their Paper content. Read more in the `Paper Migration Guide `_. """ -try: - from . import stone_validators as bv - from . import stone_base as bb -except (ImportError, 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 (ImportError, SystemError, ValueError): - import common - import sharing +from __future__ import unicode_literals +from stone.backends.python_rsrc import stone_base as bb +from stone.backends.python_rsrc import stone_validators as bv + +from dropbox import common +from dropbox import sharing class AddMember(bb.Struct): """ @@ -35,9 +24,7 @@ class AddMember(bb.Struct): __slots__ = [ '_permission_level_value', - '_permission_level_present', '_member_value', - '_member_present', ] _has_required_fields = True @@ -45,71 +32,22 @@ class AddMember(bb.Struct): 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 + self._permission_level_value = bb.NOT_SET + self._member_value = bb.NOT_SET 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 + # Instance attribute type: PaperDocPermissionLevel (validator is set below) + permission_level = bb.Attribute("permission_level", user_defined=True) - @property - def member(self): - """ - User which should be added to the Paper doc. Specify only email address - or Dropbox account ID. - - :rtype: sharing.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 + # Instance attribute type: sharing.MemberSelector (validator is set below) + member = bb.Attribute("member", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(AddMember, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -119,49 +57,22 @@ class RefPaperDoc(bb.Struct): __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 + self._doc_id_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + doc_id = bb.Attribute("doc_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RefPaperDoc, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RefPaperDoc(doc_id={!r})'.format( - self._doc_id_value, - ) - RefPaperDoc_validator = bv.Struct(RefPaperDoc) class AddPaperDocUser(RefPaperDoc): @@ -176,11 +87,8 @@ class AddPaperDocUser(RefPaperDoc): __slots__ = [ '_members_value', - '_members_present', '_custom_message_value', - '_custom_message_present', '_quiet_value', - '_quiet_present', ] _has_required_fields = True @@ -191,12 +99,9 @@ def __init__(self, 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 + self._members_value = bb.NOT_SET + self._custom_message_value = bb.NOT_SET + self._quiet_value = bb.NOT_SET if members is not None: self.members = members if custom_message is not None: @@ -204,97 +109,24 @@ def __init__(self, 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'") + # Instance attribute type: list of [AddMember] (validator is set below) + members = bb.Attribute("members") - @members.setter - def members(self, val): - val = self._members_validator.validate(val) - self._members_value = val - self._members_present = True + # Instance attribute type: str (validator is set below) + custom_message = bb.Attribute("custom_message", nullable=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 + # Instance attribute type: bool (validator is set below) + quiet = bb.Attribute("quiet") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AddPaperDocUser, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): """ - Per-member result for :meth:`dropbox.dropbox.Dropbox.paper_docs_users_add`. + Per-member result for + :meth:`dropbox.dropbox_client.Dropbox.paper_docs_users_add`. :ivar paper.AddPaperDocUserMemberResult.member: One of specified input members. @@ -304,9 +136,7 @@ class AddPaperDocUserMemberResult(bb.Struct): __slots__ = [ '_member_value', - '_member_present', '_result_value', - '_result_present', ] _has_required_fields = True @@ -314,70 +144,22 @@ class AddPaperDocUserMemberResult(bb.Struct): def __init__(self, member=None, result=None): - self._member_value = None - self._member_present = False - self._result_value = None - self._result_present = False + self._member_value = bb.NOT_SET + self._result_value = bb.NOT_SET 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. + # Instance attribute type: sharing.MemberSelector (validator is set below) + member = bb.Attribute("member", user_defined=True) - :rtype: sharing.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: 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 + # Instance attribute type: AddPaperDocUserResult (validator is set below) + result = bb.Attribute("result", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(AddPaperDocUserMemberResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -487,9 +269,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AddPaperDocUserResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AddPaperDocUserResult(%r, %r)' % (self._tag, self._value) - AddPaperDocUserResult_validator = bv.Union(AddPaperDocUserResult) class Cursor(bb.Struct): @@ -512,9 +291,7 @@ class Cursor(bb.Struct): __slots__ = [ '_value_value', - '_value_present', '_expiration_value', - '_expiration_present', ] _has_required_fields = True @@ -522,85 +299,22 @@ class Cursor(bb.Struct): def __init__(self, value=None, expiration=None): - self._value_value = None - self._value_present = False - self._expiration_value = None - self._expiration_present = False + self._value_value = bb.NOT_SET + self._expiration_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + value = bb.Attribute("value") + + # Instance attribute type: datetime.datetime (validator is set below) + expiration = bb.Attribute("expiration", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(Cursor, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -641,9 +355,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperApiBaseError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperApiBaseError(%r, %r)' % (self._tag, self._value) - PaperApiBaseError_validator = bv.Union(PaperApiBaseError) class DocLookupError(PaperApiBaseError): @@ -669,9 +380,6 @@ def is_doc_not_found(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DocLookupError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DocLookupError(%r, %r)' % (self._tag, self._value) - DocLookupError_validator = bv.Union(DocLookupError) class DocSubscriptionLevel(bb.Union): @@ -737,9 +445,6 @@ def is_no_email(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DocSubscriptionLevel, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DocSubscriptionLevel(%r, %r)' % (self._tag, self._value) - DocSubscriptionLevel_validator = bv.Union(DocSubscriptionLevel) class ExportFormat(bb.Union): @@ -789,9 +494,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExportFormat, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExportFormat(%r, %r)' % (self._tag, self._value) - ExportFormat_validator = bv.Union(ExportFormat) class Folder(bb.Struct): @@ -805,9 +507,7 @@ class Folder(bb.Struct): __slots__ = [ '_id_value', - '_id_present', '_name_value', - '_name_present', ] _has_required_fields = True @@ -815,70 +515,22 @@ class Folder(bb.Struct): def __init__(self, id=None, name=None): - self._id_value = None - self._id_present = False - self._name_value = None - self._name_present = False + self._id_value = bb.NOT_SET + self._name_value = bb.NOT_SET 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'") + # Instance attribute type: str (validator is set below) + id = bb.Attribute("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 + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(Folder, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -921,9 +573,6 @@ def is_invite_only(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FolderSharingPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FolderSharingPolicyType(%r, %r)' % (self._tag, self._value) - FolderSharingPolicyType_validator = bv.Union(FolderSharingPolicyType) class FolderSubscriptionLevel(bb.Union): @@ -989,9 +638,6 @@ def is_weekly_emails(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FolderSubscriptionLevel, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FolderSubscriptionLevel(%r, %r)' % (self._tag, self._value) - FolderSubscriptionLevel_validator = bv.Union(FolderSubscriptionLevel) class FoldersContainingPaperDoc(bb.Struct): @@ -1006,9 +652,7 @@ class FoldersContainingPaperDoc(bb.Struct): __slots__ = [ '_folder_sharing_policy_type_value', - '_folder_sharing_policy_type_present', '_folders_value', - '_folders_present', ] _has_required_fields = False @@ -1016,76 +660,22 @@ class FoldersContainingPaperDoc(bb.Struct): 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 + self._folder_sharing_policy_type_value = bb.NOT_SET + self._folders_value = bb.NOT_SET 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 + # Instance attribute type: FolderSharingPolicyType (validator is set below) + folder_sharing_policy_type = bb.Attribute("folder_sharing_policy_type", nullable=True, user_defined=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 + # Instance attribute type: list of [Folder] (validator is set below) + folders = bb.Attribute("folders", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FoldersContainingPaperDoc, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -1151,9 +741,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ImportFormat, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ImportFormat(%r, %r)' % (self._tag, self._value) - ImportFormat_validator = bv.Union(ImportFormat) class InviteeInfoWithPermissionLevel(bb.Struct): @@ -1166,9 +753,7 @@ class InviteeInfoWithPermissionLevel(bb.Struct): __slots__ = [ '_invitee_value', - '_invitee_present', '_permission_level_value', - '_permission_level_present', ] _has_required_fields = True @@ -1176,70 +761,22 @@ class InviteeInfoWithPermissionLevel(bb.Struct): 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 + self._invitee_value = bb.NOT_SET + self._permission_level_value = bb.NOT_SET 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 - """ - 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 + # Instance attribute type: sharing.InviteeInfo (validator is set below) + invitee = bb.Attribute("invitee", user_defined=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 + # Instance attribute type: PaperDocPermissionLevel (validator is set below) + permission_level = bb.Attribute("permission_level", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(InviteeInfoWithPermissionLevel, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -1293,9 +830,6 @@ def get_cursor_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListDocsCursorError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListDocsCursorError(%r, %r)' % (self._tag, self._value) - ListDocsCursorError_validator = bv.Union(ListDocsCursorError) class ListPaperDocsArgs(bb.Struct): @@ -1313,13 +847,9 @@ class ListPaperDocsArgs(bb.Struct): __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 @@ -1329,14 +859,10 @@ def __init__(self, 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 + self._filter_by_value = bb.NOT_SET + self._sort_by_value = bb.NOT_SET + self._sort_order_value = bb.NOT_SET + self._limit_value = bb.NOT_SET if filter_by is not None: self.filter_by = filter_by if sort_by is not None: @@ -1346,167 +872,49 @@ def __init__(self, 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. + # Instance attribute type: ListPaperDocsFilterBy (validator is set below) + filter_by = bb.Attribute("filter_by", user_defined=True) - :rtype: int - """ - if self._limit_present: - return self._limit_value - else: - return 1000 + # Instance attribute type: ListPaperDocsSortBy (validator is set below) + sort_by = bb.Attribute("sort_by", user_defined=True) - @limit.setter - def limit(self, val): - val = self._limit_validator.validate(val) - self._limit_value = val - self._limit_present = True + # Instance attribute type: ListPaperDocsSortOrder (validator is set below) + sort_order = bb.Attribute("sort_order", user_defined=True) - @limit.deleter - def limit(self): - self._limit_value = None - self._limit_present = False + # Instance attribute type: int (validator is set below) + limit = bb.Attribute("limit") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListPaperDocsArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): """ :ivar paper.ListPaperDocsContinueArgs.cursor: The cursor obtained from - :meth:`dropbox.dropbox.Dropbox.paper_docs_list` or - :meth:`dropbox.dropbox.Dropbox.paper_docs_list_continue`. Allows for - pagination. + :meth:`dropbox.dropbox_client.Dropbox.paper_docs_list` or + :meth:`dropbox.dropbox_client.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 + self._cursor_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListPaperDocsContinueArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListPaperDocsContinueArgs(cursor={!r})'.format( - self._cursor_value, - ) - ListPaperDocsContinueArgs_validator = bv.Struct(ListPaperDocsContinueArgs) class ListPaperDocsFilterBy(bb.Union): @@ -1556,9 +964,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListPaperDocsFilterBy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListPaperDocsFilterBy(%r, %r)' % (self._tag, self._value) - ListPaperDocsFilterBy_validator = bv.Union(ListPaperDocsFilterBy) class ListPaperDocsResponse(bb.Struct): @@ -1566,26 +971,24 @@ class ListPaperDocsResponse(bb.Struct): :ivar paper.ListPaperDocsResponse.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`. + to :meth:`dropbox.dropbox_client.Dropbox.paper_docs_list`. :ivar paper.ListPaperDocsResponse.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`. + :meth:`dropbox.dropbox_client.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_client.Dropbox.paper_docs_list`. :ivar paper.ListPaperDocsResponse.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 + :meth:`dropbox.dropbox_client.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`. + :meth:`dropbox.dropbox_client.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 @@ -1594,12 +997,9 @@ 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 + self._doc_ids_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET + self._has_more_value = bb.NOT_SET if doc_ids is not None: self.doc_ids = doc_ids if cursor is not None: @@ -1607,95 +1007,18 @@ def __init__(self, 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'") + # Instance attribute type: list of [str] (validator is set below) + doc_ids = bb.Attribute("doc_ids") - @cursor.setter - def cursor(self, val): - self._cursor_validator.validate_type_only(val) - self._cursor_value = val - self._cursor_present = True + # Instance attribute type: Cursor (validator is set below) + cursor = bb.Attribute("cursor", user_defined=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 + # Instance attribute type: bool (validator is set below) + has_more = bb.Attribute("has_more") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListPaperDocsResponse, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -1757,9 +1080,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListPaperDocsSortBy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListPaperDocsSortBy(%r, %r)' % (self._tag, self._value) - ListPaperDocsSortBy_validator = bv.Union(ListPaperDocsSortBy) class ListPaperDocsSortOrder(bb.Union): @@ -1809,9 +1129,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListPaperDocsSortOrder, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListPaperDocsSortOrder(%r, %r)' % (self._tag, self._value) - ListPaperDocsSortOrder_validator = bv.Union(ListPaperDocsSortOrder) class ListUsersCursorError(PaperApiBaseError): @@ -1867,9 +1184,6 @@ def get_cursor_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListUsersCursorError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListUsersCursorError(%r, %r)' % (self._tag, self._value) - ListUsersCursorError_validator = bv.Union(ListUsersCursorError) class ListUsersOnFolderArgs(RefPaperDoc): @@ -1881,7 +1195,6 @@ class ListUsersOnFolderArgs(RefPaperDoc): __slots__ = [ '_limit_value', - '_limit_present', ] _has_required_fields = True @@ -1890,57 +1203,28 @@ def __init__(self, doc_id=None, limit=None): super(ListUsersOnFolderArgs, self).__init__(doc_id) - self._limit_value = None - self._limit_present = False + self._limit_value = bb.NOT_SET 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: int - """ - 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 + # Instance attribute type: int (validator is set below) + limit = bb.Attribute("limit") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListUsersOnFolderArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 paper.ListUsersOnFolderContinueArgs.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`. + :meth:`dropbox.dropbox_client.Dropbox.paper_docs_folder_users_list` or + :meth:`dropbox.dropbox_client.Dropbox.paper_docs_folder_users_list_continue`. Allows for pagination. """ __slots__ = [ '_cursor_value', - '_cursor_present', ] _has_required_fields = True @@ -1949,46 +1233,16 @@ def __init__(self, doc_id=None, cursor=None): super(ListUsersOnFolderContinueArgs, self).__init__(doc_id) - self._cursor_value = None - self._cursor_present = False + self._cursor_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListUsersOnFolderContinueArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -1998,27 +1252,23 @@ class ListUsersOnFolderResponse(bb.Struct): :ivar paper.ListUsersOnFolderResponse.users: List of users that are invited on the Paper folder. :ivar paper.ListUsersOnFolderResponse.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 + :meth:`dropbox.dropbox_client.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`. + :meth:`dropbox.dropbox_client.Dropbox.paper_docs_folder_users_list`. :ivar paper.ListUsersOnFolderResponse.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` + :meth:`dropbox.dropbox_client.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`. + :meth:`dropbox.dropbox_client.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 @@ -2028,14 +1278,10 @@ def __init__(self, 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 + self._invitees_value = bb.NOT_SET + self._users_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET + self._has_more_value = bb.NOT_SET if invitees is not None: self.invitees = invitees if users is not None: @@ -2045,117 +1291,21 @@ def __init__(self, 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] - """ - 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] - """ - 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`. + # Instance attribute type: list of [sharing.InviteeInfo] (validator is set below) + invitees = bb.Attribute("invitees") - :rtype: Cursor - """ - if self._cursor_present: - return self._cursor_value - else: - raise AttributeError("missing required field 'cursor'") + # Instance attribute type: list of [sharing.UserInfo] (validator is set below) + users = bb.Attribute("users") - @cursor.setter - def cursor(self, val): - self._cursor_validator.validate_type_only(val) - self._cursor_value = val - self._cursor_present = True + # Instance attribute type: Cursor (validator is set below) + cursor = bb.Attribute("cursor", user_defined=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 + # Instance attribute type: bool (validator is set below) + has_more = bb.Attribute("has_more") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListUsersOnFolderResponse, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -2169,9 +1319,7 @@ class ListUsersOnPaperDocArgs(RefPaperDoc): __slots__ = [ '_limit_value', - '_limit_present', '_filter_by_value', - '_filter_by_present', ] _has_required_fields = True @@ -2181,86 +1329,34 @@ def __init__(self, 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 + self._limit_value = bb.NOT_SET + self._filter_by_value = bb.NOT_SET 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: int - """ - 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 + # Instance attribute type: int (validator is set below) + limit = bb.Attribute("limit") - @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 + # Instance attribute type: UserOnPaperDocFilter (validator is set below) + filter_by = bb.Attribute("filter_by", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListUsersOnPaperDocArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 paper.ListUsersOnPaperDocContinueArgs.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. + :meth:`dropbox.dropbox_client.Dropbox.paper_docs_users_list` or + :meth:`dropbox.dropbox_client.Dropbox.paper_docs_users_list_continue`. + Allows for pagination. """ __slots__ = [ '_cursor_value', - '_cursor_present', ] _has_required_fields = True @@ -2269,46 +1365,16 @@ def __init__(self, doc_id=None, cursor=None): super(ListUsersOnPaperDocContinueArgs, self).__init__(doc_id) - self._cursor_value = None - self._cursor_present = False + self._cursor_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListUsersOnPaperDocContinueArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -2321,29 +1387,24 @@ class ListUsersOnPaperDocResponse(bb.Struct): :ivar paper.ListUsersOnPaperDocResponse.doc_owner: The Paper doc owner. This field is populated on every single response. :ivar paper.ListUsersOnPaperDocResponse.cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.paper_docs_users_list_continue` to + :meth:`dropbox.dropbox_client.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`. + :meth:`dropbox.dropbox_client.Dropbox.paper_docs_users_list`. :ivar paper.ListUsersOnPaperDocResponse.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`. + :meth:`dropbox.dropbox_client.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_client.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 @@ -2354,16 +1415,11 @@ def __init__(self, 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 + self._invitees_value = bb.NOT_SET + self._users_value = bb.NOT_SET + self._doc_owner_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET + self._has_more_value = bb.NOT_SET if invitees is not None: self.invitees = invitees if users is not None: @@ -2375,143 +1431,24 @@ def __init__(self, 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. + # Instance attribute type: list of [InviteeInfoWithPermissionLevel] (validator is set below) + invitees = bb.Attribute("invitees") - :rtype: list of [InviteeInfoWithPermissionLevel] - """ - if self._invitees_present: - return self._invitees_value - else: - raise AttributeError("missing required field 'invitees'") + # Instance attribute type: list of [UserInfoWithPermissionLevel] (validator is set below) + users = bb.Attribute("users") - @invitees.setter - def invitees(self, val): - val = self._invitees_validator.validate(val) - self._invitees_value = val - self._invitees_present = True + # Instance attribute type: sharing.UserInfo (validator is set below) + doc_owner = bb.Attribute("doc_owner", user_defined=True) - @invitees.deleter - def invitees(self): - self._invitees_value = None - self._invitees_present = False + # Instance attribute type: Cursor (validator is set below) + cursor = bb.Attribute("cursor", user_defined=True) - @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 - """ - 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 + # Instance attribute type: bool (validator is set below) + has_more = bb.Attribute("has_more") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListUsersOnPaperDocResponse, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -2586,9 +1523,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperApiCursorError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperApiCursorError(%r, %r)' % (self._tag, self._value) - PaperApiCursorError_validator = bv.Union(PaperApiCursorError) class PaperDocCreateArgs(bb.Struct): @@ -2601,9 +1535,7 @@ class PaperDocCreateArgs(bb.Struct): __slots__ = [ '_parent_folder_id_value', - '_parent_folder_id_present', '_import_format_value', - '_import_format_present', ] _has_required_fields = True @@ -2611,74 +1543,22 @@ class PaperDocCreateArgs(bb.Struct): 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 + self._parent_folder_id_value = bb.NOT_SET + self._import_format_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + parent_folder_id = bb.Attribute("parent_folder_id", nullable=True) - @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 + # Instance attribute type: ImportFormat (validator is set below) + import_format = bb.Attribute("import_format", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocCreateArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -2742,9 +1622,6 @@ def is_image_size_exceeded(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocCreateError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocCreateError(%r, %r)' % (self._tag, self._value) - PaperDocCreateError_validator = bv.Union(PaperDocCreateError) class PaperDocCreateUpdateResult(bb.Struct): @@ -2758,11 +1635,8 @@ class PaperDocCreateUpdateResult(bb.Struct): __slots__ = [ '_doc_id_value', - '_doc_id_present', '_revision_value', - '_revision_present', '_title_value', - '_title_present', ] _has_required_fields = True @@ -2771,12 +1645,9 @@ 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 + self._doc_id_value = bb.NOT_SET + self._revision_value = bb.NOT_SET + self._title_value = bb.NOT_SET if doc_id is not None: self.doc_id = doc_id if revision is not None: @@ -2784,92 +1655,24 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + doc_id = bb.Attribute("doc_id") - @property - def revision(self): - """ - The Paper doc revision. Simply an ever increasing number. - - :rtype: int - """ - 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'") + # Instance attribute type: int (validator is set below) + revision = bb.Attribute("revision") - @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 + # Instance attribute type: str (validator is set below) + title = bb.Attribute("title") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocCreateUpdateResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 @@ -2878,41 +1681,16 @@ 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 + self._export_format_value = bb.NOT_SET 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 + # Instance attribute type: ExportFormat (validator is set below) + export_format = bb.Attribute("export_format", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocExport, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -2927,13 +1705,9 @@ class PaperDocExportResult(bb.Struct): __slots__ = [ '_owner_value', - '_owner_present', '_title_value', - '_title_present', '_revision_value', - '_revision_present', '_mime_type_value', - '_mime_type_present', ] _has_required_fields = True @@ -2943,14 +1717,10 @@ def __init__(self, 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 + self._owner_value = bb.NOT_SET + self._title_value = bb.NOT_SET + self._revision_value = bb.NOT_SET + self._mime_type_value = bb.NOT_SET if owner is not None: self.owner = owner if title is not None: @@ -2960,110 +1730,21 @@ def __init__(self, if mime_type is not None: self.mime_type = mime_type - @property - def owner(self): - """ - The Paper doc owner's email address. + # Instance attribute type: str (validator is set below) + owner = bb.Attribute("owner") - :rtype: str - """ - if self._owner_present: - return self._owner_value - else: - raise AttributeError("missing required field 'owner'") + # Instance attribute type: str (validator is set below) + title = bb.Attribute("title") - @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'") + # Instance attribute type: int (validator is set below) + revision = bb.Attribute("revision") - @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: int - """ - 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 + # Instance attribute type: str (validator is set below) + mime_type = bb.Attribute("mime_type") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocExportResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -3113,9 +1794,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocPermissionLevel, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocPermissionLevel(%r, %r)' % (self._tag, self._value) - PaperDocPermissionLevel_validator = bv.Union(PaperDocPermissionLevel) class PaperDocSharingPolicy(RefPaperDoc): @@ -3126,7 +1804,6 @@ class PaperDocSharingPolicy(RefPaperDoc): __slots__ = [ '_sharing_policy_value', - '_sharing_policy_present', ] _has_required_fields = True @@ -3135,43 +1812,16 @@ 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 + self._sharing_policy_value = bb.NOT_SET 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 + # Instance attribute type: SharingPolicy (validator is set below) + sharing_policy = bb.Attribute("sharing_policy", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocSharingPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -3186,11 +1836,8 @@ class PaperDocUpdateArgs(RefPaperDoc): __slots__ = [ '_doc_update_policy_value', - '_doc_update_policy_present', '_revision_value', - '_revision_present', '_import_format_value', - '_import_format_present', ] _has_required_fields = True @@ -3201,12 +1848,9 @@ def __init__(self, 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 + self._doc_update_policy_value = bb.NOT_SET + self._revision_value = bb.NOT_SET + self._import_format_value = bb.NOT_SET if doc_update_policy is not None: self.doc_update_policy = doc_update_policy if revision is not None: @@ -3214,87 +1858,18 @@ def __init__(self, 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: int - """ - 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 + # Instance attribute type: PaperDocUpdatePolicy (validator is set below) + doc_update_policy = bb.Attribute("doc_update_policy", user_defined=True) - @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'") + # Instance attribute type: int (validator is set below) + revision = bb.Attribute("revision") - @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 + # Instance attribute type: ImportFormat (validator is set below) + import_format = bb.Attribute("import_format", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocUpdateArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -3382,9 +1957,6 @@ def is_doc_deleted(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocUpdateError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocUpdateError(%r, %r)' % (self._tag, self._value) - PaperDocUpdateError_validator = bv.Union(PaperDocUpdateError) class PaperDocUpdatePolicy(bb.Union): @@ -3446,9 +2018,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocUpdatePolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocUpdatePolicy(%r, %r)' % (self._tag, self._value) - PaperDocUpdatePolicy_validator = bv.Union(PaperDocUpdatePolicy) class PaperFolderCreateArg(bb.Struct): @@ -3468,11 +2037,8 @@ class PaperFolderCreateArg(bb.Struct): __slots__ = [ '_name_value', - '_name_present', '_parent_folder_id_value', - '_parent_folder_id_present', '_is_team_folder_value', - '_is_team_folder_present', ] _has_required_fields = True @@ -3481,12 +2047,9 @@ def __init__(self, name=None, parent_folder_id=None, is_team_folder=None): - self._name_value = None - self._name_present = False - self._parent_folder_id_value = None - self._parent_folder_id_present = False - self._is_team_folder_value = None - self._is_team_folder_present = False + self._name_value = bb.NOT_SET + self._parent_folder_id_value = bb.NOT_SET + self._is_team_folder_value = bb.NOT_SET if name is not None: self.name = name if parent_folder_id is not None: @@ -3494,97 +2057,18 @@ def __init__(self, if is_team_folder is not None: self.is_team_folder = is_team_folder - @property - def name(self): - """ - The name of the new Paper 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 parent_folder_id(self): - """ - The encrypted Paper folder Id where the new Paper folder should be - created. The API user has to have write access to this folder or error - is thrown. If not supplied, the new folder will be created at top level. - - :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 + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - @parent_folder_id.deleter - def parent_folder_id(self): - self._parent_folder_id_value = None - self._parent_folder_id_present = False + # Instance attribute type: str (validator is set below) + parent_folder_id = bb.Attribute("parent_folder_id", nullable=True) - @property - def is_team_folder(self): - """ - Whether the folder to be created should be a team folder. This value - will be ignored if parent_folder_id is supplied, as the new folder will - inherit the type (private or team folder) from its parent. We will by - default create a top-level private folder if both parent_folder_id and - is_team_folder are not supplied. - - :rtype: bool - """ - if self._is_team_folder_present: - return self._is_team_folder_value - else: - return None - - @is_team_folder.setter - def is_team_folder(self, val): - if val is None: - del self.is_team_folder - return - 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 + # Instance attribute type: bool (validator is set below) + is_team_folder = bb.Attribute("is_team_folder", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperFolderCreateArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperFolderCreateArg(name={!r}, parent_folder_id={!r}, is_team_folder={!r})'.format( - self._name_value, - self._parent_folder_id_value, - self._is_team_folder_value, - ) - PaperFolderCreateArg_validator = bv.Struct(PaperFolderCreateArg) class PaperFolderCreateError(PaperApiBaseError): @@ -3623,9 +2107,6 @@ def is_invalid_folder_id(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperFolderCreateError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperFolderCreateError(%r, %r)' % (self._tag, self._value) - PaperFolderCreateError_validator = bv.Union(PaperFolderCreateError) class PaperFolderCreateResult(bb.Struct): @@ -3636,49 +2117,22 @@ class PaperFolderCreateResult(bb.Struct): __slots__ = [ '_folder_id_value', - '_folder_id_present', ] _has_required_fields = True def __init__(self, folder_id=None): - self._folder_id_value = None - self._folder_id_present = False + self._folder_id_value = bb.NOT_SET if folder_id is not None: self.folder_id = folder_id - @property - def folder_id(self): - """ - Folder ID of the newly created folder. - - :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 + # Instance attribute type: str (validator is set below) + folder_id = bb.Attribute("folder_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperFolderCreateResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperFolderCreateResult(folder_id={!r})'.format( - self._folder_id_value, - ) - PaperFolderCreateResult_validator = bv.Struct(PaperFolderCreateResult) class RemovePaperDocUser(RefPaperDoc): @@ -3689,7 +2143,6 @@ class RemovePaperDocUser(RefPaperDoc): __slots__ = [ '_member_value', - '_member_present', ] _has_required_fields = True @@ -3698,44 +2151,16 @@ def __init__(self, doc_id=None, member=None): super(RemovePaperDocUser, self).__init__(doc_id) - self._member_value = None - self._member_present = False + self._member_value = bb.NOT_SET 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 - """ - 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 + # Instance attribute type: sharing.MemberSelector (validator is set below) + member = bb.Attribute("member", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(RemovePaperDocUser, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -3750,9 +2175,7 @@ class SharingPolicy(bb.Struct): __slots__ = [ '_public_sharing_policy_value', - '_public_sharing_policy_present', '_team_sharing_policy_value', - '_team_sharing_policy_present', ] _has_required_fields = False @@ -3760,77 +2183,22 @@ class SharingPolicy(bb.Struct): 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 + self._public_sharing_policy_value = bb.NOT_SET + self._team_sharing_policy_value = bb.NOT_SET 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 + # Instance attribute type: SharingPublicPolicyType (validator is set below) + public_sharing_policy = bb.Attribute("public_sharing_policy", nullable=True, user_defined=True) - @team_sharing_policy.deleter - def team_sharing_policy(self): - self._team_sharing_policy_value = None - self._team_sharing_policy_present = False + # Instance attribute type: SharingTeamPolicyType (validator is set below) + team_sharing_policy = bb.Attribute("team_sharing_policy", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharingPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -3884,9 +2252,6 @@ def is_invite_only(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharingTeamPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharingTeamPolicyType(%r, %r)' % (self._tag, self._value) - SharingTeamPolicyType_validator = bv.Union(SharingTeamPolicyType) class SharingPublicPolicyType(SharingTeamPolicyType): @@ -3913,9 +2278,6 @@ def is_disabled(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharingPublicPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharingPublicPolicyType(%r, %r)' % (self._tag, self._value) - SharingPublicPolicyType_validator = bv.Union(SharingPublicPolicyType) class UserInfoWithPermissionLevel(bb.Struct): @@ -3927,9 +2289,7 @@ class UserInfoWithPermissionLevel(bb.Struct): __slots__ = [ '_user_value', - '_user_present', '_permission_level_value', - '_permission_level_present', ] _has_required_fields = True @@ -3937,70 +2297,22 @@ class UserInfoWithPermissionLevel(bb.Struct): 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 + self._user_value = bb.NOT_SET + self._permission_level_value = bb.NOT_SET 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. + # Instance attribute type: sharing.UserInfo (validator is set below) + user = bb.Attribute("user", user_defined=True) - :rtype: sharing.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 - - @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 + # Instance attribute type: PaperDocPermissionLevel (validator is set below) + permission_level = bb.Attribute("permission_level", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserInfoWithPermissionLevel, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -4051,51 +2363,48 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserOnPaperDocFilter, self)._process_custom_annotations(annotation_type, field_path, processor) - 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.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), + ('permission_level', AddMember.permission_level.validator), + ('member', AddMember.member.validator), ] -RefPaperDoc._doc_id_validator = PaperDocId_validator +RefPaperDoc.doc_id.validator = PaperDocId_validator RefPaperDoc._all_field_names_ = set(['doc_id']) -RefPaperDoc._all_fields_ = [('doc_id', RefPaperDoc._doc_id_validator)] +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.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), + ('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.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), + ('member', AddPaperDocUserMemberResult.member.validator), + ('result', AddPaperDocUserMemberResult.result.validator), ] AddPaperDocUserResult._success_validator = bv.Void() @@ -4126,15 +2435,15 @@ def __repr__(self): 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.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), + ('value', Cursor.value.validator), + ('expiration', Cursor.expiration.validator), ] PaperApiBaseError._insufficient_permissions_validator = bv.Void() @@ -4184,15 +2493,15 @@ def __repr__(self): ExportFormat.markdown = ExportFormat('markdown') ExportFormat.other = ExportFormat('other') -Folder._id_validator = bv.String() -Folder._name_validator = bv.String() +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), + ('id', Folder.id.validator), + ('name', Folder.name.validator), ] FolderSharingPolicyType._team_validator = bv.Void() @@ -4221,15 +2530,15 @@ def __repr__(self): 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.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), + ('folder_sharing_policy_type', FoldersContainingPaperDoc.folder_sharing_policy_type.validator), + ('folders', FoldersContainingPaperDoc.folders.validator), ] ImportFormat._html_validator = bv.Void() @@ -4248,15 +2557,15 @@ def __repr__(self): ImportFormat.plain_text = ImportFormat('plain_text') ImportFormat.other = ImportFormat('other') -InviteeInfoWithPermissionLevel._invitee_validator = sharing.InviteeInfo_validator -InviteeInfoWithPermissionLevel._permission_level_validator = PaperDocPermissionLevel_validator +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), + ('invitee', InviteeInfoWithPermissionLevel.invitee.validator), + ('permission_level', InviteeInfoWithPermissionLevel.permission_level.validator), ] ListDocsCursorError._cursor_error_validator = PaperApiCursorError_validator @@ -4268,10 +2577,10 @@ def __repr__(self): 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.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', @@ -4279,15 +2588,15 @@ def __repr__(self): '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), + ('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.cursor.validator = bv.String() ListPaperDocsContinueArgs._all_field_names_ = set(['cursor']) -ListPaperDocsContinueArgs._all_fields_ = [('cursor', ListPaperDocsContinueArgs._cursor_validator)] +ListPaperDocsContinueArgs._all_fields_ = [('cursor', ListPaperDocsContinueArgs.cursor.validator)] ListPaperDocsFilterBy._docs_accessed_validator = bv.Void() ListPaperDocsFilterBy._docs_created_validator = bv.Void() @@ -4302,18 +2611,18 @@ def __repr__(self): ListPaperDocsFilterBy.docs_created = ListPaperDocsFilterBy('docs_created') ListPaperDocsFilterBy.other = ListPaperDocsFilterBy('other') -ListPaperDocsResponse._doc_ids_validator = bv.List(PaperDocId_validator) -ListPaperDocsResponse._cursor_validator = Cursor_validator -ListPaperDocsResponse._has_more_validator = bv.Boolean() +ListPaperDocsResponse.doc_ids.validator = bv.List(PaperDocId_validator) +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), + ('doc_ids', ListPaperDocsResponse.doc_ids.validator), + ('cursor', ListPaperDocsResponse.cursor.validator), + ('has_more', ListPaperDocsResponse.has_more.validator), ] ListPaperDocsSortBy._accessed_validator = bv.Void() @@ -4355,18 +2664,18 @@ def __repr__(self): ListUsersCursorError.doc_not_found = ListUsersCursorError('doc_not_found') -ListUsersOnFolderArgs._limit_validator = bv.Int32(min_value=1, max_value=1000) +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)] +ListUsersOnFolderArgs._all_fields_ = RefPaperDoc._all_fields_ + [('limit', ListUsersOnFolderArgs.limit.validator)] -ListUsersOnFolderContinueArgs._cursor_validator = bv.String() +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)] +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.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', @@ -4374,32 +2683,32 @@ def __repr__(self): 'has_more', ]) ListUsersOnFolderResponse._all_fields_ = [ - ('invitees', ListUsersOnFolderResponse._invitees_validator), - ('users', ListUsersOnFolderResponse._users_validator), - ('cursor', ListUsersOnFolderResponse._cursor_validator), - ('has_more', ListUsersOnFolderResponse._has_more_validator), + ('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.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), + ('limit', ListUsersOnPaperDocArgs.limit.validator), + ('filter_by', ListUsersOnPaperDocArgs.filter_by.validator), ] -ListUsersOnPaperDocContinueArgs._cursor_validator = bv.String() +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)] +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.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', @@ -4408,11 +2717,11 @@ def __repr__(self): '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), + ('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() @@ -4434,15 +2743,15 @@ def __repr__(self): PaperApiCursorError.reset = PaperApiCursorError('reset') PaperApiCursorError.other = PaperApiCursorError('other') -PaperDocCreateArgs._parent_folder_id_validator = bv.Nullable(bv.String()) -PaperDocCreateArgs._import_format_validator = ImportFormat_validator +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), + ('parent_folder_id', PaperDocCreateArgs.parent_folder_id.validator), + ('import_format', PaperDocCreateArgs.import_format.validator), ] PaperDocCreateError._content_malformed_validator = bv.Void() @@ -4462,28 +2771,28 @@ def __repr__(self): 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.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), + ('doc_id', PaperDocCreateUpdateResult.doc_id.validator), + ('revision', PaperDocCreateUpdateResult.revision.validator), + ('title', PaperDocCreateUpdateResult.title.validator), ] -PaperDocExport._export_format_validator = ExportFormat_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)] +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.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', @@ -4491,10 +2800,10 @@ def __repr__(self): 'mime_type', ]) PaperDocExportResult._all_fields_ = [ - ('owner', PaperDocExportResult._owner_validator), - ('title', PaperDocExportResult._title_validator), - ('revision', PaperDocExportResult._revision_validator), - ('mime_type', PaperDocExportResult._mime_type_validator), + ('owner', PaperDocExportResult.owner.validator), + ('title', PaperDocExportResult.title.validator), + ('revision', PaperDocExportResult.revision.validator), + ('mime_type', PaperDocExportResult.mime_type.validator), ] PaperDocPermissionLevel._edit_validator = bv.Void() @@ -4510,22 +2819,22 @@ def __repr__(self): PaperDocPermissionLevel.view_and_comment = PaperDocPermissionLevel('view_and_comment') PaperDocPermissionLevel.other = PaperDocPermissionLevel('other') -PaperDocSharingPolicy._sharing_policy_validator = SharingPolicy_validator +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)] +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.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), + ('doc_update_policy', PaperDocUpdateArgs.doc_update_policy.validator), + ('revision', PaperDocUpdateArgs.revision.validator), + ('import_format', PaperDocUpdateArgs.import_format.validator), ] PaperDocUpdateError._content_malformed_validator = bv.Void() @@ -4567,18 +2876,18 @@ def __repr__(self): PaperDocUpdatePolicy.overwrite_all = PaperDocUpdatePolicy('overwrite_all') PaperDocUpdatePolicy.other = PaperDocUpdatePolicy('other') -PaperFolderCreateArg._name_validator = bv.String() -PaperFolderCreateArg._parent_folder_id_validator = bv.Nullable(bv.String()) -PaperFolderCreateArg._is_team_folder_validator = bv.Nullable(bv.Boolean()) +PaperFolderCreateArg.name.validator = bv.String() +PaperFolderCreateArg.parent_folder_id.validator = bv.Nullable(bv.String()) +PaperFolderCreateArg.is_team_folder.validator = bv.Nullable(bv.Boolean()) PaperFolderCreateArg._all_field_names_ = set([ 'name', 'parent_folder_id', 'is_team_folder', ]) PaperFolderCreateArg._all_fields_ = [ - ('name', PaperFolderCreateArg._name_validator), - ('parent_folder_id', PaperFolderCreateArg._parent_folder_id_validator), - ('is_team_folder', PaperFolderCreateArg._is_team_folder_validator), + ('name', PaperFolderCreateArg.name.validator), + ('parent_folder_id', PaperFolderCreateArg.parent_folder_id.validator), + ('is_team_folder', PaperFolderCreateArg.is_team_folder.validator), ] PaperFolderCreateError._folder_not_found_validator = bv.Void() @@ -4592,23 +2901,23 @@ def __repr__(self): PaperFolderCreateError.folder_not_found = PaperFolderCreateError('folder_not_found') PaperFolderCreateError.invalid_folder_id = PaperFolderCreateError('invalid_folder_id') -PaperFolderCreateResult._folder_id_validator = bv.String() +PaperFolderCreateResult.folder_id.validator = bv.String() PaperFolderCreateResult._all_field_names_ = set(['folder_id']) -PaperFolderCreateResult._all_fields_ = [('folder_id', PaperFolderCreateResult._folder_id_validator)] +PaperFolderCreateResult._all_fields_ = [('folder_id', PaperFolderCreateResult.folder_id.validator)] -RemovePaperDocUser._member_validator = sharing.MemberSelector_validator +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)] +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.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), + ('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() @@ -4632,15 +2941,15 @@ def __repr__(self): SharingPublicPolicyType.disabled = SharingPublicPolicyType('disabled') -UserInfoWithPermissionLevel._user_validator = sharing.UserInfo_validator -UserInfoWithPermissionLevel._permission_level_validator = PaperDocPermissionLevel_validator +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), + ('user', UserInfoWithPermissionLevel.user.validator), + ('permission_level', UserInfoWithPermissionLevel.permission_level.validator), ] UserOnPaperDocFilter._visited_validator = bv.Void() @@ -4656,6 +2965,15 @@ def __repr__(self): UserOnPaperDocFilter.shared = UserOnPaperDocFilter('shared') UserOnPaperDocFilter.other = UserOnPaperDocFilter('other') +AddMember.permission_level.default = PaperDocPermissionLevel.edit +AddPaperDocUser.quiet.default = False +ListPaperDocsArgs.filter_by.default = ListPaperDocsFilterBy.docs_accessed +ListPaperDocsArgs.sort_by.default = ListPaperDocsSortBy.accessed +ListPaperDocsArgs.sort_order.default = ListPaperDocsSortOrder.ascending +ListPaperDocsArgs.limit.default = 1000 +ListUsersOnFolderArgs.limit.default = 1000 +ListUsersOnPaperDocArgs.limit.default = 1000 +ListUsersOnPaperDocArgs.filter_by.default = UserOnPaperDocFilter.shared docs_archive = bb.Route( 'docs/archive', 1, diff --git a/dropbox/secondary_emails.py b/dropbox/secondary_emails.py index 11f7a8ad..bec9dc3b 100644 --- a/dropbox/secondary_emails.py +++ b/dropbox/secondary_emails.py @@ -3,21 +3,11 @@ # @generated # flake8: noqa # pylint: skip-file -try: - from . import stone_validators as bv - from . import stone_base as bb -except (ImportError, 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 +from __future__ import unicode_literals +from stone.backends.python_rsrc import stone_base as bb +from stone.backends.python_rsrc import stone_validators as bv -try: - from . import ( - common, - ) -except (ImportError, SystemError, ValueError): - import common +from dropbox import common class SecondaryEmail(bb.Struct): """ @@ -28,9 +18,7 @@ class SecondaryEmail(bb.Struct): __slots__ = [ '_email_value', - '_email_present', '_is_verified_value', - '_is_verified_present', ] _has_required_fields = True @@ -38,82 +26,33 @@ class SecondaryEmail(bb.Struct): def __init__(self, email=None, is_verified=None): - self._email_value = None - self._email_present = False - self._is_verified_value = None - self._is_verified_present = False + self._email_value = bb.NOT_SET + self._is_verified_value = bb.NOT_SET if email is not None: self.email = email if is_verified is not None: self.is_verified = is_verified - @property - def email(self): - """ - Secondary email address. + # Instance attribute type: str (validator is set below) + email = bb.Attribute("email") - :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 is_verified(self): - """ - Whether or not the secondary email address is verified to be owned by a - user. - - :rtype: bool - """ - if self._is_verified_present: - return self._is_verified_value - else: - raise AttributeError("missing required field 'is_verified'") - - @is_verified.setter - def is_verified(self, val): - val = self._is_verified_validator.validate(val) - self._is_verified_value = val - self._is_verified_present = True - - @is_verified.deleter - def is_verified(self): - self._is_verified_value = None - self._is_verified_present = False + # Instance attribute type: bool (validator is set below) + is_verified = bb.Attribute("is_verified") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SecondaryEmail, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SecondaryEmail(email={!r}, is_verified={!r})'.format( - self._email_value, - self._is_verified_value, - ) - SecondaryEmail_validator = bv.Struct(SecondaryEmail) -SecondaryEmail._email_validator = common.EmailAddress_validator -SecondaryEmail._is_verified_validator = bv.Boolean() +SecondaryEmail.email.validator = common.EmailAddress_validator +SecondaryEmail.is_verified.validator = bv.Boolean() SecondaryEmail._all_field_names_ = set([ 'email', 'is_verified', ]) SecondaryEmail._all_fields_ = [ - ('email', SecondaryEmail._email_validator), - ('is_verified', SecondaryEmail._is_verified_validator), + ('email', SecondaryEmail.email.validator), + ('is_verified', SecondaryEmail.is_verified.validator), ] ROUTES = { diff --git a/dropbox/seen_state.py b/dropbox/seen_state.py index ed4838c7..37af6946 100644 --- a/dropbox/seen_state.py +++ b/dropbox/seen_state.py @@ -3,14 +3,9 @@ # @generated # flake8: noqa # pylint: skip-file -try: - from . import stone_validators as bv - from . import stone_base as bb -except (ImportError, 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 +from __future__ import unicode_literals +from stone.backends.python_rsrc import stone_base as bb +from stone.backends.python_rsrc import stone_validators as bv class PlatformType(bb.Union): """ @@ -120,9 +115,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PlatformType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PlatformType(%r, %r)' % (self._tag, self._value) - PlatformType_validator = bv.Union(PlatformType) PlatformType._web_validator = bv.Void() diff --git a/dropbox/sharing.py b/dropbox/sharing.py index cbaa2f72..dc2d9a1e 100644 --- a/dropbox/sharing.py +++ b/dropbox/sharing.py @@ -7,33 +7,17 @@ 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 (ImportError, 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, - seen_state, - team_common, - users, - users_common, - ) -except (ImportError, SystemError, ValueError): - import async_ - import common - import files - import seen_state - import team_common - import users - import users_common +from __future__ import unicode_literals +from stone.backends.python_rsrc import stone_base as bb +from stone.backends.python_rsrc import stone_validators as bv + +from dropbox import async_ +from dropbox import common +from dropbox import files +from dropbox import seen_state +from dropbox import team_common +from dropbox import users +from dropbox import users_common class AccessInheritance(bb.Union): """ @@ -84,9 +68,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccessInheritance, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AccessInheritance(%r, %r)' % (self._tag, self._value) - AccessInheritance_validator = bv.Union(AccessInheritance) class AccessLevel(bb.Union): @@ -100,7 +81,7 @@ class AccessLevel(bb.Union): :ivar sharing.AccessLevel.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`. + :meth:`dropbox.dropbox_client.Dropbox.sharing_update_folder_policy`. :ivar sharing.AccessLevel.editor: The collaborator can both view and edit the shared folder. :ivar sharing.AccessLevel.viewer: The collaborator can only view the shared @@ -164,9 +145,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccessLevel, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AccessLevel(%r, %r)' % (self._tag, self._value) - AccessLevel_validator = bv.Union(AccessLevel) class AclUpdatePolicy(bb.Union): @@ -218,14 +196,12 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AclUpdatePolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AclUpdatePolicy(%r, %r)' % (self._tag, self._value) - AclUpdatePolicy_validator = bv.Union(AclUpdatePolicy) class AddFileMemberArgs(bb.Struct): """ - Arguments for :meth:`dropbox.dropbox.Dropbox.sharing_add_file_member`. + Arguments for + :meth:`dropbox.dropbox_client.Dropbox.sharing_add_file_member`. :ivar sharing.AddFileMemberArgs.file: File to which to add members. :ivar sharing.AddFileMemberArgs.members: Members to add. Note that even an @@ -243,17 +219,11 @@ class AddFileMemberArgs(bb.Struct): __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 @@ -265,18 +235,12 @@ def __init__(self, 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 + self._file_value = bb.NOT_SET + self._members_value = bb.NOT_SET + self._custom_message_value = bb.NOT_SET + self._quiet_value = bb.NOT_SET + self._access_level_value = bb.NOT_SET + self._add_message_as_comment_value = bb.NOT_SET if file is not None: self.file = file if members is not None: @@ -290,169 +254,32 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + file = bb.Attribute("file") - @access_level.deleter - def access_level(self): - self._access_level_value = None - self._access_level_present = False + # Instance attribute type: list of [MemberSelector] (validator is set below) + members = bb.Attribute("members") - @property - def add_message_as_comment(self): - """ - If the custom message should be added as a comment on the file. + # Instance attribute type: str (validator is set below) + custom_message = bb.Attribute("custom_message", nullable=True) - :rtype: bool - """ - if self._add_message_as_comment_present: - return self._add_message_as_comment_value - else: - return False + # Instance attribute type: bool (validator is set below) + quiet = bb.Attribute("quiet") - @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 + # Instance attribute type: AccessLevel (validator is set below) + access_level = bb.Attribute("access_level", user_defined=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 + # Instance attribute type: bool (validator is set below) + add_message_as_comment = bb.Attribute("add_message_as_comment") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AddFileMemberArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - 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`. + Errors for :meth:`dropbox.dropbox_client.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 @@ -557,9 +384,6 @@ def get_access_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AddFileMemberError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AddFileMemberError(%r, %r)' % (self._tag, self._value) - AddFileMemberError_validator = bv.Union(AddFileMemberError) class AddFolderMemberArg(bb.Struct): @@ -576,13 +400,9 @@ class AddFolderMemberArg(bb.Struct): __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 @@ -592,14 +412,10 @@ def __init__(self, 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 + self._shared_folder_id_value = bb.NOT_SET + self._members_value = bb.NOT_SET + self._quiet_value = bb.NOT_SET + self._custom_message_value = bb.NOT_SET if shared_folder_id is not None: self.shared_folder_id = shared_folder_id if members is not None: @@ -609,114 +425,21 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + shared_folder_id = bb.Attribute("shared_folder_id") - @quiet.setter - def quiet(self, val): - val = self._quiet_validator.validate(val) - self._quiet_value = val - self._quiet_present = True + # Instance attribute type: list of [AddMember] (validator is set below) + members = bb.Attribute("members") - @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. + # Instance attribute type: bool (validator is set below) + quiet = bb.Attribute("quiet") - :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 + # Instance attribute type: str (validator is set below) + custom_message = bb.Attribute("custom_message", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(AddFolderMemberArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -986,9 +709,6 @@ def get_too_many_pending_invites(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AddFolderMemberError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AddFolderMemberError(%r, %r)' % (self._tag, self._value) - AddFolderMemberError_validator = bv.Union(AddFolderMemberError) class AddMember(bb.Struct): @@ -1003,9 +723,7 @@ class AddMember(bb.Struct): __slots__ = [ '_member_value', - '_member_present', '_access_level_value', - '_access_level_present', ] _has_required_fields = True @@ -1013,71 +731,22 @@ class AddMember(bb.Struct): 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 + self._member_value = bb.NOT_SET + self._access_level_value = bb.NOT_SET 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. + # Instance attribute type: MemberSelector (validator is set below) + member = bb.Attribute("member", user_defined=True) - :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 + # Instance attribute type: AccessLevel (validator is set below) + access_level = bb.Attribute("access_level", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(AddMember, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -1241,9 +910,6 @@ def get_unverified_dropbox_id(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AddMemberSelectorError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AddMemberSelectorError(%r, %r)' % (self._tag, self._value) - AddMemberSelectorError_validator = bv.Union(AddMemberSelectorError) class AudienceExceptionContentInfo(bb.Struct): @@ -1257,49 +923,22 @@ class AudienceExceptionContentInfo(bb.Struct): __slots__ = [ '_name_value', - '_name_present', ] _has_required_fields = True def __init__(self, name=None): - self._name_value = None - self._name_present = False + self._name_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AudienceExceptionContentInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AudienceExceptionContentInfo(name={!r})'.format( - self._name_value, - ) - AudienceExceptionContentInfo_validator = bv.Struct(AudienceExceptionContentInfo) class AudienceExceptions(bb.Struct): @@ -1316,9 +955,7 @@ class AudienceExceptions(bb.Struct): __slots__ = [ '_count_value', - '_count_present', '_exceptions_value', - '_exceptions_present', ] _has_required_fields = True @@ -1326,70 +963,22 @@ class AudienceExceptions(bb.Struct): def __init__(self, count=None, exceptions=None): - self._count_value = None - self._count_present = False - self._exceptions_value = None - self._exceptions_present = False + self._count_value = bb.NOT_SET + self._exceptions_value = bb.NOT_SET if count is not None: self.count = count if exceptions is not None: self.exceptions = exceptions - @property - def count(self): - """ - :rtype: int - """ - 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 + # Instance attribute type: int (validator is set below) + count = bb.Attribute("count") - @exceptions.deleter - def exceptions(self): - self._exceptions_value = None - self._exceptions_present = False + # Instance attribute type: list of [AudienceExceptionContentInfo] (validator is set below) + exceptions = bb.Attribute("exceptions") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AudienceExceptions, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AudienceExceptions(count={!r}, exceptions={!r})'.format( - self._count_value, - self._exceptions_value, - ) - AudienceExceptions_validator = bv.Struct(AudienceExceptions) class AudienceRestrictingSharedFolder(bb.Struct): @@ -1407,11 +996,8 @@ class AudienceRestrictingSharedFolder(bb.Struct): __slots__ = [ '_shared_folder_id_value', - '_shared_folder_id_present', '_name_value', - '_name_present', '_audience_value', - '_audience_present', ] _has_required_fields = True @@ -1420,12 +1006,9 @@ 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 + self._shared_folder_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._audience_value = bb.NOT_SET if shared_folder_id is not None: self.shared_folder_id = shared_folder_id if name is not None: @@ -1433,91 +1016,24 @@ def __init__(self, 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'") + # Instance attribute type: str (validator is set below) + shared_folder_id = bb.Attribute("shared_folder_id") - @audience.setter - def audience(self, val): - self._audience_validator.validate_type_only(val) - self._audience_value = val - self._audience_present = True + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - @audience.deleter - def audience(self): - self._audience_value = None - self._audience_present = False + # Instance attribute type: LinkAudience (validator is set below) + audience = bb.Attribute("audience", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(AudienceRestrictingSharedFolder, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): """ Arguments for - :meth:`dropbox.dropbox.Dropbox.sharing_change_file_member_access`. + :meth:`dropbox.dropbox_client.Dropbox.sharing_change_file_member_access`. :ivar sharing.ChangeFileMemberAccessArgs.file: File for which we are changing a member's access. @@ -1529,11 +1045,8 @@ class ChangeFileMemberAccessArgs(bb.Struct): __slots__ = [ '_file_value', - '_file_present', '_member_value', - '_member_present', '_access_level_value', - '_access_level_present', ] _has_required_fields = True @@ -1542,12 +1055,9 @@ 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 + self._file_value = bb.NOT_SET + self._member_value = bb.NOT_SET + self._access_level_value = bb.NOT_SET if file is not None: self.file = file if member is not None: @@ -1555,85 +1065,18 @@ def __init__(self, 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'") + # Instance attribute type: str (validator is set below) + file = bb.Attribute("file") - @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 + # Instance attribute type: MemberSelector (validator is set below) + member = bb.Attribute("member", user_defined=True) - @access_level.deleter - def access_level(self): - self._access_level_value = None - self._access_level_present = False + # Instance attribute type: AccessLevel (validator is set below) + access_level = bb.Attribute("access_level", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ChangeFileMemberAccessArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -1649,11 +1092,8 @@ class LinkMetadata(bb.Struct): __slots__ = [ '_url_value', - '_url_present', '_visibility_value', - '_visibility_present', '_expires_value', - '_expires_present', ] _has_required_fields = True @@ -1662,12 +1102,9 @@ 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 + self._url_value = bb.NOT_SET + self._visibility_value = bb.NOT_SET + self._expires_value = bb.NOT_SET if url is not None: self.url = url if visibility is not None: @@ -1675,88 +1112,18 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + url = bb.Attribute("url") - @visibility.deleter - def visibility(self): - self._visibility_value = None - self._visibility_present = False + # Instance attribute type: Visibility (validator is set below) + visibility = bb.Attribute("visibility", user_defined=True) - @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 + # Instance attribute type: datetime.datetime (validator is set below) + expires = bb.Attribute("expires", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(LinkMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -1780,13 +1147,6 @@ def __init__(self, def _process_custom_annotations(self, annotation_type, field_path, processor): super(CollectionLinkMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -1802,11 +1162,8 @@ class CreateSharedLinkArg(bb.Struct): __slots__ = [ '_path_value', - '_path_present', '_short_url_value', - '_short_url_present', '_pending_upload_value', - '_pending_upload_present', ] _has_required_fields = True @@ -1815,12 +1172,9 @@ 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 + self._path_value = bb.NOT_SET + self._short_url_value = bb.NOT_SET + self._pending_upload_value = bb.NOT_SET if path is not None: self.path = path if short_url is not None: @@ -1828,90 +1182,18 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") - @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 + # Instance attribute type: bool (validator is set below) + short_url = bb.Attribute("short_url") - @pending_upload.deleter - def pending_upload(self): - self._pending_upload_value = None - self._pending_upload_present = False + # Instance attribute type: PendingUploadMode (validator is set below) + pending_upload = bb.Attribute("pending_upload", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(CreateSharedLinkArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -1965,9 +1247,6 @@ def get_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(CreateSharedLinkError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CreateSharedLinkError(%r, %r)' % (self._tag, self._value) - CreateSharedLinkError_validator = bv.Union(CreateSharedLinkError) class CreateSharedLinkWithSettingsArg(bb.Struct): @@ -1980,9 +1259,7 @@ class CreateSharedLinkWithSettingsArg(bb.Struct): __slots__ = [ '_path_value', - '_path_present', '_settings_value', - '_settings_present', ] _has_required_fields = True @@ -1990,73 +1267,22 @@ class CreateSharedLinkWithSettingsArg(bb.Struct): def __init__(self, path=None, settings=None): - self._path_value = None - self._path_present = False - self._settings_value = None - self._settings_present = False + self._path_value = bb.NOT_SET + self._settings_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") - @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 + # Instance attribute type: SharedLinkSettings (validator is set below) + settings = bb.Attribute("settings", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(CreateSharedLinkWithSettingsArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -2173,8 +1399,8 @@ def get_path(self): def get_shared_link_already_exists(self): """ The shared link already exists. You can call - :meth:`dropbox.dropbox.Dropbox.sharing_list_shared_links` to get the - existing link, or use the provided metadata if it is returned. + :meth:`dropbox.dropbox_client.Dropbox.sharing_list_shared_links` to get + the existing link, or use the provided metadata if it is returned. Only call this if :meth:`is_shared_link_already_exists` is true. @@ -2199,9 +1425,6 @@ def get_settings_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(CreateSharedLinkWithSettingsError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CreateSharedLinkWithSettingsError(%r, %r)' % (self._tag, self._value) - CreateSharedLinkWithSettingsError_validator = bv.Union(CreateSharedLinkWithSettingsError) class SharedContentLinkMetadataBase(bb.Struct): @@ -2230,19 +1453,12 @@ class SharedContentLinkMetadataBase(bb.Struct): __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 @@ -2255,20 +1471,13 @@ def __init__(self, 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 + self._access_level_value = bb.NOT_SET + self._audience_options_value = bb.NOT_SET + self._audience_restricting_shared_folder_value = bb.NOT_SET + self._current_audience_value = bb.NOT_SET + self._expiry_value = bb.NOT_SET + self._link_permissions_value = bb.NOT_SET + self._password_protected_value = bb.NOT_SET if access_level is not None: self.access_level = access_level if audience_options is not None: @@ -2284,195 +1493,30 @@ def __init__(self, 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 + # Instance attribute type: AccessLevel (validator is set below) + access_level = bb.Attribute("access_level", nullable=True, user_defined=True) - @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 + # Instance attribute type: list of [LinkAudience] (validator is set below) + audience_options = bb.Attribute("audience_options") - @link_permissions.deleter - def link_permissions(self): - self._link_permissions_value = None - self._link_permissions_present = False + # Instance attribute type: AudienceRestrictingSharedFolder (validator is set below) + audience_restricting_shared_folder = bb.Attribute("audience_restricting_shared_folder", nullable=True, user_defined=True) - @property - def password_protected(self): - """ - Whether the link is protected by a password. + # Instance attribute type: LinkAudience (validator is set below) + current_audience = bb.Attribute("current_audience", user_defined=True) - :rtype: bool - """ - if self._password_protected_present: - return self._password_protected_value - else: - raise AttributeError("missing required field 'password_protected'") + # Instance attribute type: datetime.datetime (validator is set below) + expiry = bb.Attribute("expiry", nullable=True) - @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 + # Instance attribute type: list of [LinkPermission] (validator is set below) + link_permissions = bb.Attribute("link_permissions") - @password_protected.deleter - def password_protected(self): - self._password_protected_value = None - self._password_protected_present = False + # Instance attribute type: bool (validator is set below) + password_protected = bb.Attribute("password_protected") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentLinkMetadataBase, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -2505,17 +1549,6 @@ def __init__(self, def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExpectedSharedContentLinkMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -2683,9 +1716,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileAction, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileAction(%r, %r)' % (self._tag, self._value) - FileAction_validator = bv.Union(FileAction) class FileErrorResult(bb.Union): @@ -2810,9 +1840,6 @@ def get_permission_denied_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileErrorResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileErrorResult(%r, %r)' % (self._tag, self._value) - FileErrorResult_validator = bv.Union(FileErrorResult) class SharedLinkMetadata(bb.Struct): @@ -2842,21 +1869,13 @@ class SharedLinkMetadata(bb.Struct): __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 @@ -2870,22 +1889,14 @@ def __init__(self, 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 + self._url_value = bb.NOT_SET + self._id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._expires_value = bb.NOT_SET + self._path_lower_value = bb.NOT_SET + self._link_permissions_value = bb.NOT_SET + self._team_member_info_value = bb.NOT_SET + self._content_owner_team_info_value = bb.NOT_SET if url is not None: self.url = url if id is not None: @@ -2903,225 +1914,33 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + url = bb.Attribute("url") - @url.deleter - def url(self): - self._url_value = None - self._url_present = False + # Instance attribute type: str (validator is set below) + id = bb.Attribute("id", nullable=True) - @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. + # Instance attribute type: str (validator is set below) + name = bb.Attribute("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 - - @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 + # Instance attribute type: datetime.datetime (validator is set below) + expires = bb.Attribute("expires", nullable=True) - @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 + # Instance attribute type: str (validator is set below) + path_lower = bb.Attribute("path_lower", nullable=True) - @expires.deleter - def expires(self): - self._expires_value = None - self._expires_present = False + # Instance attribute type: LinkPermissions (validator is set below) + link_permissions = bb.Attribute("link_permissions", user_defined=True) - @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. + # Instance attribute type: TeamMemberInfo (validator is set below) + team_member_info = bb.Attribute("team_member_info", nullable=True, user_defined=True) - :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 - """ - 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 + # Instance attribute type: users.Team (validator is set below) + content_owner_team_info = bb.Attribute("content_owner_team_info", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -3144,13 +1963,9 @@ class FileLinkMetadata(SharedLinkMetadata): __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 @@ -3176,14 +1991,10 @@ def __init__(self, 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 + self._client_modified_value = bb.NOT_SET + self._server_modified_value = bb.NOT_SET + self._rev_value = bb.NOT_SET + self._size_value = bb.NOT_SET if client_modified is not None: self.client_modified = client_modified if server_modified is not None: @@ -3193,124 +2004,22 @@ def __init__(self, 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 + # Instance attribute type: datetime.datetime (validator is set below) + client_modified = bb.Attribute("client_modified") - @client_modified.deleter - def client_modified(self): - self._client_modified_value = None - self._client_modified_present = False + # Instance attribute type: datetime.datetime (validator is set below) + server_modified = bb.Attribute("server_modified") - @property - def server_modified(self): - """ - The last time the file was modified on Dropbox. + # Instance attribute type: str (validator is set below) + rev = bb.Attribute("rev") - :rtype: datetime.datetime - """ - if self._server_modified_present: - return self._server_modified_value - else: - raise AttributeError("missing required field 'server_modified'") + # Instance attribute type: int (validator is set below) + size = bb.Attribute("size") - @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 + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(FileLinkMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - @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: int - """ - 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 _process_custom_annotations(self, annotation_type, field_path, processor): - super(FileLinkMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - - 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) +FileLinkMetadata_validator = bv.Struct(FileLinkMetadata) class FileMemberActionError(bb.Union): """ @@ -3429,9 +2138,6 @@ def get_no_explicit_access(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileMemberActionError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileMemberActionError(%r, %r)' % (self._tag, self._value) - FileMemberActionError_validator = bv.Union(FileMemberActionError) class FileMemberActionIndividualResult(bb.Union): @@ -3516,16 +2222,13 @@ def get_member_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileMemberActionIndividualResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileMemberActionIndividualResult(%r, %r)' % (self._tag, self._value) - FileMemberActionIndividualResult_validator = bv.Union(FileMemberActionIndividualResult) class FileMemberActionResult(bb.Struct): """ Per-member result for - :meth:`dropbox.dropbox.Dropbox.sharing_add_file_member` or - :meth:`dropbox.dropbox.Dropbox.sharing_change_file_member_access`. + :meth:`dropbox.dropbox_client.Dropbox.sharing_add_file_member` or + :meth:`dropbox.dropbox_client.Dropbox.sharing_change_file_member_access`. :ivar sharing.FileMemberActionResult.member: One of specified input members. :ivar sharing.FileMemberActionResult.result: The outcome of the action on @@ -3534,9 +2237,7 @@ class FileMemberActionResult(bb.Struct): __slots__ = [ '_member_value', - '_member_present', '_result_value', - '_result_present', ] _has_required_fields = True @@ -3544,70 +2245,22 @@ class FileMemberActionResult(bb.Struct): def __init__(self, member=None, result=None): - self._member_value = None - self._member_present = False - self._result_value = None - self._result_present = False + self._member_value = bb.NOT_SET + self._result_value = bb.NOT_SET 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 + # Instance attribute type: MemberSelector (validator is set below) + member = bb.Attribute("member", user_defined=True) - @result.deleter - def result(self): - self._result_value = None - self._result_present = False + # Instance attribute type: FileMemberActionIndividualResult (validator is set below) + result = bb.Attribute("result", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileMemberActionResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -3699,9 +2352,6 @@ def get_member_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileMemberRemoveActionResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileMemberRemoveActionResult(%r, %r)' % (self._tag, self._value) - FileMemberRemoveActionResult_validator = bv.Union(FileMemberRemoveActionResult) class FilePermission(bb.Struct): @@ -3718,11 +2368,8 @@ class FilePermission(bb.Struct): __slots__ = [ '_action_value', - '_action_present', '_allow_value', - '_allow_present', '_reason_value', - '_reason_present', ] _has_required_fields = True @@ -3731,12 +2378,9 @@ 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 + self._action_value = bb.NOT_SET + self._allow_value = bb.NOT_SET + self._reason_value = bb.NOT_SET if action is not None: self.action = action if allow is not None: @@ -3744,89 +2388,18 @@ def __init__(self, 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 + # Instance attribute type: FileAction (validator is set below) + action = bb.Attribute("action", user_defined=True) - @property - def reason(self): - """ - The reason why the user is denied the permission. Not present if the - action is allowed. + # Instance attribute type: bool (validator is set below) + allow = bb.Attribute("allow") - :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 + # Instance attribute type: PermissionDeniedReason (validator is set below) + reason = bb.Attribute("reason", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FilePermission, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -4018,9 +2591,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FolderAction, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FolderAction(%r, %r)' % (self._tag, self._value) - FolderAction_validator = bv.Union(FolderAction) class FolderLinkMetadata(SharedLinkMetadata): @@ -4054,18 +2624,6 @@ def __init__(self, def _process_custom_annotations(self, annotation_type, field_path, processor): super(FolderLinkMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -4083,11 +2641,8 @@ class FolderPermission(bb.Struct): __slots__ = [ '_action_value', - '_action_present', '_allow_value', - '_allow_present', '_reason_value', - '_reason_present', ] _has_required_fields = True @@ -4096,12 +2651,9 @@ 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 + self._action_value = bb.NOT_SET + self._allow_value = bb.NOT_SET + self._reason_value = bb.NOT_SET if action is not None: self.action = action if allow is not None: @@ -4109,89 +2661,18 @@ def __init__(self, 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 + # Instance attribute type: FolderAction (validator is set below) + action = bb.Attribute("action", user_defined=True) - @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. + # Instance attribute type: bool (validator is set below) + allow = bb.Attribute("allow") - :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 + # Instance attribute type: PermissionDeniedReason (validator is set below) + reason = bb.Attribute("reason", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FolderPermission, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -4216,15 +2697,10 @@ class FolderPolicy(bb.Struct): __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 @@ -4235,16 +2711,11 @@ def __init__(self, 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 + self._member_policy_value = bb.NOT_SET + self._resolved_member_policy_value = bb.NOT_SET + self._acl_update_policy_value = bb.NOT_SET + self._shared_link_policy_value = bb.NOT_SET + self._viewer_info_policy_value = bb.NOT_SET if member_policy is not None: self.member_policy = member_policy if resolved_member_policy is not None: @@ -4256,152 +2727,30 @@ def __init__(self, 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 + # Instance attribute type: MemberPolicy (validator is set below) + member_policy = bb.Attribute("member_policy", nullable=True, user_defined=True) + + # Instance attribute type: MemberPolicy (validator is set below) + resolved_member_policy = bb.Attribute("resolved_member_policy", nullable=True, user_defined=True) - @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 + # Instance attribute type: AclUpdatePolicy (validator is set below) + acl_update_policy = bb.Attribute("acl_update_policy", user_defined=True) + + # Instance attribute type: SharedLinkPolicy (validator is set below) + shared_link_policy = bb.Attribute("shared_link_policy", user_defined=True) + + # Instance attribute type: ViewerInfoPolicy (validator is set below) + viewer_info_policy = bb.Attribute("viewer_info_policy", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FolderPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): """ - Arguments of :meth:`dropbox.dropbox.Dropbox.sharing_get_file_metadata`. + Arguments of + :meth:`dropbox.dropbox_client.Dropbox.sharing_get_file_metadata`. :ivar sharing.GetFileMetadataArg.file: The file to query. :ivar sharing.GetFileMetadataArg.actions: A list of `FileAction`s @@ -4412,9 +2761,7 @@ class GetFileMetadataArg(bb.Struct): __slots__ = [ '_file_value', - '_file_present', '_actions_value', - '_actions_present', ] _has_required_fields = True @@ -4422,81 +2769,28 @@ class GetFileMetadataArg(bb.Struct): def __init__(self, file=None, actions=None): - self._file_value = None - self._file_present = False - self._actions_value = None - self._actions_present = False + self._file_value = bb.NOT_SET + self._actions_value = bb.NOT_SET if file is not None: self.file = file if actions is not None: self.actions = actions - @property - def file(self): - """ - The file to query. + # Instance attribute type: str (validator is set below) + file = bb.Attribute("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 - - @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 + # Instance attribute type: list of [FileAction] (validator is set below) + actions = bb.Attribute("actions", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetFileMetadataArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetFileMetadataArg(file={!r}, actions={!r})'.format( - self._file_value, - self._actions_value, - ) - GetFileMetadataArg_validator = bv.Struct(GetFileMetadataArg) class GetFileMetadataBatchArg(bb.Struct): """ Arguments of - :meth:`dropbox.dropbox.Dropbox.sharing_get_file_metadata_batch`. + :meth:`dropbox.dropbox_client.Dropbox.sharing_get_file_metadata_batch`. :ivar sharing.GetFileMetadataBatchArg.files: The files to query. :ivar sharing.GetFileMetadataBatchArg.actions: A list of `FileAction`s @@ -4507,9 +2801,7 @@ class GetFileMetadataBatchArg(bb.Struct): __slots__ = [ '_files_value', - '_files_present', '_actions_value', - '_actions_present', ] _has_required_fields = True @@ -4517,81 +2809,28 @@ class GetFileMetadataBatchArg(bb.Struct): def __init__(self, files=None, actions=None): - self._files_value = None - self._files_present = False - self._actions_value = None - self._actions_present = False + self._files_value = bb.NOT_SET + self._actions_value = bb.NOT_SET 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 + # Instance attribute type: list of [str] (validator is set below) + files = bb.Attribute("files") - @actions.deleter - def actions(self): - self._actions_value = None - self._actions_present = False + # Instance attribute type: list of [FileAction] (validator is set below) + actions = bb.Attribute("actions", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetFileMetadataBatchArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetFileMetadataBatchArg(files={!r}, actions={!r})'.format( - self._files_value, - self._actions_value, - ) - GetFileMetadataBatchArg_validator = bv.Struct(GetFileMetadataBatchArg) class GetFileMetadataBatchResult(bb.Struct): """ Per file results of - :meth:`dropbox.dropbox.Dropbox.sharing_get_file_metadata_batch`. + :meth:`dropbox.dropbox_client.Dropbox.sharing_get_file_metadata_batch`. :ivar sharing.GetFileMetadataBatchResult.file: This is the input file identifier corresponding to one of ``GetFileMetadataBatchArg.files``. @@ -4601,9 +2840,7 @@ class GetFileMetadataBatchResult(bb.Struct): __slots__ = [ '_file_value', - '_file_present', '_result_value', - '_result_present', ] _has_required_fields = True @@ -4611,76 +2848,28 @@ class GetFileMetadataBatchResult(bb.Struct): def __init__(self, file=None, result=None): - self._file_value = None - self._file_present = False - self._result_value = None - self._result_present = False + self._file_value = bb.NOT_SET + self._result_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + file = bb.Attribute("file") - @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 + # Instance attribute type: GetFileMetadataIndividualResult (validator is set below) + result = bb.Attribute("result", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetFileMetadataBatchResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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`. + Error result for + :meth:`dropbox.dropbox_client.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 @@ -4760,9 +2949,6 @@ def get_access_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetFileMetadataError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetFileMetadataError(%r, %r)' % (self._tag, self._value) - GetFileMetadataError_validator = bv.Union(GetFileMetadataError) class GetFileMetadataIndividualResult(bb.Union): @@ -4854,9 +3040,6 @@ def get_access_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetFileMetadataIndividualResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetFileMetadataIndividualResult(%r, %r)' % (self._tag, self._value) - GetFileMetadataIndividualResult_validator = bv.Union(GetFileMetadataIndividualResult) class GetMetadataArgs(bb.Struct): @@ -4871,9 +3054,7 @@ class GetMetadataArgs(bb.Struct): __slots__ = [ '_shared_folder_id_value', - '_shared_folder_id_present', '_actions_value', - '_actions_present', ] _has_required_fields = True @@ -4881,76 +3062,22 @@ class GetMetadataArgs(bb.Struct): 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 + self._shared_folder_id_value = bb.NOT_SET + self._actions_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + shared_folder_id = bb.Attribute("shared_folder_id") - @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 + # Instance attribute type: list of [FolderAction] (validator is set below) + actions = bb.Attribute("actions", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetMetadataArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -4964,7 +3091,7 @@ class SharedLinkError(bb.Union): :ivar sharing.SharedLinkError.shared_link_access_denied: The caller is not allowed to access this shared link. :ivar sharing.SharedLinkError.unsupported_link_type: This type of link is - not supported; use :meth:`dropbox.dropbox.Dropbox.sharing_files` + not supported; use :meth:`dropbox.dropbox_client.Dropbox.sharing_files` instead. """ @@ -5013,9 +3140,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkError(%r, %r)' % (self._tag, self._value) - SharedLinkError_validator = bv.Union(SharedLinkError) class GetSharedLinkFileError(SharedLinkError): @@ -5042,9 +3166,6 @@ def is_shared_link_is_directory(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetSharedLinkFileError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetSharedLinkFileError(%r, %r)' % (self._tag, self._value) - GetSharedLinkFileError_validator = bv.Union(GetSharedLinkFileError) class GetSharedLinkMetadataArg(bb.Struct): @@ -5060,11 +3181,8 @@ class GetSharedLinkMetadataArg(bb.Struct): __slots__ = [ '_url_value', - '_url_present', '_path_value', - '_path_present', '_link_password_value', - '_link_password_present', ] _has_required_fields = True @@ -5073,12 +3191,9 @@ 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 + self._url_value = bb.NOT_SET + self._path_value = bb.NOT_SET + self._link_password_value = bb.NOT_SET if url is not None: self.url = url if path is not None: @@ -5086,150 +3201,45 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + url = bb.Attribute("url") - @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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path", nullable=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 + # Instance attribute type: str (validator is set below) + link_password = bb.Attribute("link_password", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetSharedLinkMetadataArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): """ :ivar sharing.GetSharedLinksArg.path: See - :meth:`dropbox.dropbox.Dropbox.sharing_get_shared_links` description. + :meth:`dropbox.dropbox_client.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 + self._path_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetSharedLinksArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetSharedLinksArg(path={!r})'.format( - self._path_value, - ) - GetSharedLinksArg_validator = bv.Struct(GetSharedLinksArg) class GetSharedLinksError(bb.Union): @@ -5283,9 +3293,6 @@ def get_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetSharedLinksError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetSharedLinksError(%r, %r)' % (self._tag, self._value) - GetSharedLinksError_validator = bv.Union(GetSharedLinksError) class GetSharedLinksResult(bb.Struct): @@ -5296,49 +3303,22 @@ class GetSharedLinksResult(bb.Struct): __slots__ = [ '_links_value', - '_links_present', ] _has_required_fields = True def __init__(self, links=None): - self._links_value = None - self._links_present = False + self._links_value = bb.NOT_SET 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 + # Instance attribute type: list of [LinkMetadata] (validator is set below) + links = bb.Attribute("links") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetSharedLinksResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetSharedLinksResult(links={!r})'.format( - self._links_value, - ) - GetSharedLinksResult_validator = bv.Struct(GetSharedLinksResult) class GroupInfo(team_common.GroupSummary): @@ -5357,13 +3337,9 @@ class GroupInfo(team_common.GroupSummary): __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 @@ -5383,14 +3359,10 @@ def __init__(self, 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 + self._group_type_value = bb.NOT_SET + self._is_member_value = bb.NOT_SET + self._is_owner_value = bb.NOT_SET + self._same_team_value = bb.NOT_SET if group_type is not None: self.group_type = group_type if is_member is not None: @@ -5400,114 +3372,21 @@ def __init__(self, if same_team is not None: self.same_team = same_team - @property - def group_type(self): - """ - The type of group. - - :rtype: team_common.GroupType - """ - 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. + # Instance attribute type: team_common.GroupType (validator is set below) + group_type = bb.Attribute("group_type", user_defined=True) - :rtype: bool - """ - if self._same_team_present: - return self._same_team_value - else: - raise AttributeError("missing required field 'same_team'") + # Instance attribute type: bool (validator is set below) + is_member = bb.Attribute("is_member") - @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 + # Instance attribute type: bool (validator is set below) + is_owner = bb.Attribute("is_owner") - @same_team.deleter - def same_team(self): - self._same_team_value = None - self._same_team_present = False + # Instance attribute type: bool (validator is set below) + same_team = bb.Attribute("same_team") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -5527,13 +3406,9 @@ class MembershipInfo(bb.Struct): __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 @@ -5543,14 +3418,10 @@ def __init__(self, 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 + self._access_type_value = bb.NOT_SET + self._permissions_value = bb.NOT_SET + self._initials_value = bb.NOT_SET + self._is_inherited_value = bb.NOT_SET if access_type is not None: self.access_type = access_type if permissions is not None: @@ -5560,117 +3431,21 @@ def __init__(self, if is_inherited is not None: self.is_inherited = is_inherited - @property - def access_type(self): - """ - The access type for this member. It contains inherited access type from - parent folder, and acquired access type from this 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 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): - """ - Never set. - - :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 + # Instance attribute type: AccessLevel (validator is set below) + access_type = bb.Attribute("access_type", user_defined=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 + # Instance attribute type: list of [MemberPermission] (validator is set below) + permissions = bb.Attribute("permissions", nullable=True) - @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 + # Instance attribute type: str (validator is set below) + initials = bb.Attribute("initials", nullable=True) - @is_inherited.deleter - def is_inherited(self): - self._is_inherited_value = None - self._is_inherited_present = False + # Instance attribute type: bool (validator is set below) + is_inherited = bb.Attribute("is_inherited") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembershipInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -5683,7 +3458,6 @@ class GroupMembershipInfo(MembershipInfo): __slots__ = [ '_group_value', - '_group_present', ] _has_required_fields = True @@ -5698,46 +3472,16 @@ def __init__(self, permissions, initials, is_inherited) - self._group_value = None - self._group_present = False + self._group_value = bb.NOT_SET 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 + # Instance attribute type: GroupInfo (validator is set below) + group = bb.Attribute("group", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupMembershipInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -5751,9 +3495,7 @@ class InsufficientPlan(bb.Struct): __slots__ = [ '_message_value', - '_message_present', '_upsell_url_value', - '_upsell_url_present', ] _has_required_fields = True @@ -5761,76 +3503,22 @@ class InsufficientPlan(bb.Struct): 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 + self._message_value = bb.NOT_SET + self._upsell_url_value = bb.NOT_SET 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. + # Instance attribute type: str (validator is set below) + message = bb.Attribute("message") - :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 + # Instance attribute type: str (validator is set below) + upsell_url = bb.Attribute("upsell_url", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(InsufficientPlan, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -5845,11 +3533,8 @@ class InsufficientQuotaAmounts(bb.Struct): __slots__ = [ '_space_needed_value', - '_space_needed_present', '_space_shortage_value', - '_space_shortage_present', '_space_left_value', - '_space_left_present', ] _has_required_fields = True @@ -5858,12 +3543,9 @@ 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 + self._space_needed_value = bb.NOT_SET + self._space_shortage_value = bb.NOT_SET + self._space_left_value = bb.NOT_SET if space_needed is not None: self.space_needed = space_needed if space_shortage is not None: @@ -5871,85 +3553,18 @@ def __init__(self, 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: int - """ - 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: int - """ - 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 + # Instance attribute type: int (validator is set below) + space_needed = bb.Attribute("space_needed") - @space_shortage.deleter - def space_shortage(self): - self._space_shortage_value = None - self._space_shortage_present = False + # Instance attribute type: int (validator is set below) + space_shortage = bb.Attribute("space_shortage") - @property - def space_left(self): - """ - The amount of space left in the user's Dropbox, less than space_needed. - - :rtype: int - """ - 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 + # Instance attribute type: int (validator is set below) + space_left = bb.Attribute("space_left") def _process_custom_annotations(self, annotation_type, field_path, processor): super(InsufficientQuotaAmounts, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -6009,9 +3624,6 @@ def get_email(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(InviteeInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'InviteeInfo(%r, %r)' % (self._tag, self._value) - InviteeInfo_validator = bv.Union(InviteeInfo) class InviteeMembershipInfo(MembershipInfo): @@ -6025,9 +3637,7 @@ class InviteeMembershipInfo(MembershipInfo): __slots__ = [ '_invitee_value', - '_invitee_present', '_user_value', - '_user_present', ] _has_required_fields = True @@ -6043,99 +3653,45 @@ def __init__(self, permissions, initials, is_inherited) - self._invitee_value = None - self._invitee_present = False - self._user_value = None - self._user_present = False + self._invitee_value = bb.NOT_SET + self._user_value = bb.NOT_SET 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. + # Instance attribute type: InviteeInfo (validator is set below) + invitee = bb.Attribute("invitee", user_defined=True) - :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 + # Instance attribute type: UserInfo (validator is set below) + user = bb.Attribute("user", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(InviteeMembershipInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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`. + :meth:`dropbox.dropbox_client.Dropbox.sharing_unshare_folder` or + :meth:`dropbox.dropbox_client.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 JobError.unshare_folder_error: Error occurred while - performing :meth:`dropbox.dropbox.Dropbox.sharing_unshare_folder` + performing :meth:`dropbox.dropbox_client.Dropbox.sharing_unshare_folder` action. :ivar RemoveFolderMemberError JobError.remove_folder_member_error: Error occurred while performing - :meth:`dropbox.dropbox.Dropbox.sharing_remove_folder_member` action. + :meth:`dropbox.dropbox_client.Dropbox.sharing_remove_folder_member` + action. :ivar RelinquishFolderMembershipError JobError.relinquish_folder_membership_error: Error occurred while performing - :meth:`dropbox.dropbox.Dropbox.sharing_relinquish_folder_membership` + :meth:`dropbox.dropbox_client.Dropbox.sharing_relinquish_folder_membership` action. """ @@ -6211,7 +3767,7 @@ def is_other(self): def get_unshare_folder_error(self): """ Error occurred while performing - :meth:`dropbox.dropbox.Dropbox.sharing_unshare_folder` action. + :meth:`dropbox.dropbox_client.Dropbox.sharing_unshare_folder` action. Only call this if :meth:`is_unshare_folder_error` is true. @@ -6224,7 +3780,8 @@ def get_unshare_folder_error(self): def get_remove_folder_member_error(self): """ Error occurred while performing - :meth:`dropbox.dropbox.Dropbox.sharing_remove_folder_member` action. + :meth:`dropbox.dropbox_client.Dropbox.sharing_remove_folder_member` + action. Only call this if :meth:`is_remove_folder_member_error` is true. @@ -6237,7 +3794,7 @@ def get_remove_folder_member_error(self): def get_relinquish_folder_membership_error(self): """ Error occurred while performing - :meth:`dropbox.dropbox.Dropbox.sharing_relinquish_folder_membership` + :meth:`dropbox.dropbox_client.Dropbox.sharing_relinquish_folder_membership` action. Only call this if :meth:`is_relinquish_folder_membership_error` is true. @@ -6251,9 +3808,6 @@ def get_relinquish_folder_membership_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(JobError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'JobError(%r, %r)' % (self._tag, self._value) - JobError_validator = bv.Union(JobError) class JobStatus(async_.PollResultBase): @@ -6311,9 +3865,6 @@ def get_failed(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(JobStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'JobStatus(%r, %r)' % (self._tag, self._value) - JobStatus_validator = bv.Union(JobStatus) class LinkAccessLevel(bb.Union): @@ -6363,9 +3914,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LinkAccessLevel, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LinkAccessLevel(%r, %r)' % (self._tag, self._value) - LinkAccessLevel_validator = bv.Union(LinkAccessLevel) class LinkAction(bb.Union): @@ -6462,9 +4010,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LinkAction, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LinkAction(%r, %r)' % (self._tag, self._value) - LinkAction_validator = bv.Union(LinkAction) class LinkAudience(bb.Union): @@ -6550,9 +4095,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LinkAudience, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LinkAudience(%r, %r)' % (self._tag, self._value) - LinkAudience_validator = bv.Union(LinkAudience) class LinkExpiry(bb.Union): @@ -6623,9 +4165,6 @@ def get_set_expiry(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LinkExpiry, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LinkExpiry(%r, %r)' % (self._tag, self._value) - LinkExpiry_validator = bv.Union(LinkExpiry) class LinkPassword(bb.Union): @@ -6696,9 +4235,6 @@ def get_set_password(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LinkPassword, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LinkPassword(%r, %r)' % (self._tag, self._value) - LinkPassword_validator = bv.Union(LinkPassword) class LinkPermission(bb.Struct): @@ -6708,11 +4244,8 @@ class LinkPermission(bb.Struct): __slots__ = [ '_action_value', - '_action_present', '_allow_value', - '_allow_present', '_reason_value', - '_reason_present', ] _has_required_fields = True @@ -6721,12 +4254,9 @@ 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 + self._action_value = bb.NOT_SET + self._allow_value = bb.NOT_SET + self._reason_value = bb.NOT_SET if action is not None: self.action = action if allow is not None: @@ -6734,82 +4264,18 @@ def __init__(self, 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'") + # Instance attribute type: LinkAction (validator is set below) + action = bb.Attribute("action", user_defined=True) - @action.setter - def action(self, val): - self._action_validator.validate_type_only(val) - self._action_value = val - self._action_present = True + # Instance attribute type: bool (validator is set below) + allow = bb.Attribute("allow") - @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 + # Instance attribute type: PermissionDeniedReason (validator is set below) + reason = bb.Attribute("reason", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(LinkPermission, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -6848,17 +4314,11 @@ class LinkPermissions(bb.Struct): __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', '_effective_audience_value', - '_effective_audience_present', '_link_access_level_value', - '_link_access_level_present', ] _has_required_fields = True @@ -6870,18 +4330,12 @@ def __init__(self, revoke_failure_reason=None, effective_audience=None, link_access_level=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 - self._effective_audience_value = None - self._effective_audience_present = False - self._link_access_level_value = None - self._link_access_level_present = False + self._resolved_visibility_value = bb.NOT_SET + self._requested_visibility_value = bb.NOT_SET + self._can_revoke_value = bb.NOT_SET + self._revoke_failure_reason_value = bb.NOT_SET + self._effective_audience_value = bb.NOT_SET + self._link_access_level_value = bb.NOT_SET if resolved_visibility is not None: self.resolved_visibility = resolved_visibility if requested_visibility is not None: @@ -6895,190 +4349,27 @@ def __init__(self, if link_access_level is not None: self.link_access_level = link_access_level - @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). For some links, an - effective_audience value is returned instead. - - :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 and resolved_visibility is - returned instead of effective_audience. - - :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 - - @property - def effective_audience(self): - """ - The type of audience who can benefit from the access level specified by - the `link_access_level` field. - - :rtype: LinkAudience - """ - if self._effective_audience_present: - return self._effective_audience_value - else: - return None - - @effective_audience.setter - def effective_audience(self, val): - if val is None: - del self.effective_audience - return - self._effective_audience_validator.validate_type_only(val) - self._effective_audience_value = val - self._effective_audience_present = True - - @effective_audience.deleter - def effective_audience(self): - self._effective_audience_value = None - self._effective_audience_present = False - - @property - def link_access_level(self): - """ - The access level that the link will grant to its users. A link can grant - additional rights to a user beyond their current access level. For - example, if a user was invited as a viewer to a file, and then opens a - link with `link_access_level` set to `editor`, then they will gain - editor privileges. The `link_access_level` is a property of the link, - and does not depend on who is calling this API. In particular, - `link_access_level` does not take into account the API caller's current - permissions to the content. + # Instance attribute type: ResolvedVisibility (validator is set below) + resolved_visibility = bb.Attribute("resolved_visibility", nullable=True, user_defined=True) - :rtype: LinkAccessLevel - """ - if self._link_access_level_present: - return self._link_access_level_value - else: - return None + # Instance attribute type: RequestedVisibility (validator is set below) + requested_visibility = bb.Attribute("requested_visibility", nullable=True, user_defined=True) + + # Instance attribute type: bool (validator is set below) + can_revoke = bb.Attribute("can_revoke") - @link_access_level.setter - def link_access_level(self, val): - if val is None: - del self.link_access_level - return - self._link_access_level_validator.validate_type_only(val) - self._link_access_level_value = val - self._link_access_level_present = True + # Instance attribute type: SharedLinkAccessFailureReason (validator is set below) + revoke_failure_reason = bb.Attribute("revoke_failure_reason", nullable=True, user_defined=True) - @link_access_level.deleter - def link_access_level(self): - self._link_access_level_value = None - self._link_access_level_present = False + # Instance attribute type: LinkAudience (validator is set below) + effective_audience = bb.Attribute("effective_audience", nullable=True, user_defined=True) + + # Instance attribute type: LinkAccessLevel (validator is set below) + link_access_level = bb.Attribute("link_access_level", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(LinkPermissions, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LinkPermissions(can_revoke={!r}, resolved_visibility={!r}, requested_visibility={!r}, revoke_failure_reason={!r}, effective_audience={!r}, link_access_level={!r})'.format( - self._can_revoke_value, - self._resolved_visibility_value, - self._requested_visibility_value, - self._revoke_failure_reason_value, - self._effective_audience_value, - self._link_access_level_value, - ) - LinkPermissions_validator = bv.Struct(LinkPermissions) class LinkSettings(bb.Struct): @@ -7095,13 +4386,9 @@ class LinkSettings(bb.Struct): __slots__ = [ '_access_level_value', - '_access_level_present', '_audience_value', - '_audience_present', '_expiry_value', - '_expiry_present', '_password_value', - '_password_present', ] _has_required_fields = False @@ -7111,14 +4398,10 @@ def __init__(self, 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 + self._access_level_value = bb.NOT_SET + self._audience_value = bb.NOT_SET + self._expiry_value = bb.NOT_SET + self._password_value = bb.NOT_SET if access_level is not None: self.access_level = access_level if audience is not None: @@ -7128,127 +4411,27 @@ def __init__(self, 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'. + # Instance attribute type: AccessLevel (validator is set below) + access_level = bb.Attribute("access_level", nullable=True, user_defined=True) - :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 + # Instance attribute type: LinkAudience (validator is set below) + audience = bb.Attribute("audience", nullable=True, user_defined=True) - @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 + # Instance attribute type: LinkExpiry (validator is set below) + expiry = bb.Attribute("expiry", nullable=True, user_defined=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 + # Instance attribute type: LinkPassword (validator is set below) + password = bb.Attribute("password", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(LinkSettings, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): """ - Arguments for :meth:`dropbox.dropbox.Dropbox.sharing_list_file_members`. + Arguments for + :meth:`dropbox.dropbox_client.Dropbox.sharing_list_file_members`. :ivar sharing.ListFileMembersArg.file: The file for which you want to see members. @@ -7262,13 +4445,9 @@ class ListFileMembersArg(bb.Struct): __slots__ = [ '_file_value', - '_file_present', '_actions_value', - '_actions_present', '_include_inherited_value', - '_include_inherited_present', '_limit_value', - '_limit_present', ] _has_required_fields = True @@ -7278,14 +4457,10 @@ def __init__(self, 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 + self._file_value = bb.NOT_SET + self._actions_value = bb.NOT_SET + self._include_inherited_value = bb.NOT_SET + self._limit_value = bb.NOT_SET if file is not None: self.file = file if actions is not None: @@ -7295,120 +4470,27 @@ def __init__(self, if limit is not None: self.limit = limit - @property - def file(self): - """ - The file for which you want to see members. + # Instance attribute type: str (validator is set below) + file = bb.Attribute("file") - :rtype: str - """ - if self._file_present: - return self._file_value - else: - raise AttributeError("missing required field 'file'") + # Instance attribute type: list of [MemberAction] (validator is set below) + actions = bb.Attribute("actions", nullable=True) - @file.setter - def file(self, val): - val = self._file_validator.validate(val) - self._file_value = val - self._file_present = True + # Instance attribute type: bool (validator is set below) + include_inherited = bb.Attribute("include_inherited") - @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: int - """ - 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 + # Instance attribute type: int (validator is set below) + limit = bb.Attribute("limit") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFileMembersArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): """ Arguments for - :meth:`dropbox.dropbox.Dropbox.sharing_list_file_members_batch`. + :meth:`dropbox.dropbox_client.Dropbox.sharing_list_file_members_batch`. :ivar sharing.ListFileMembersBatchArg.files: Files for which to return members. @@ -7418,9 +4500,7 @@ class ListFileMembersBatchArg(bb.Struct): __slots__ = [ '_files_value', - '_files_present', '_limit_value', - '_limit_present', ] _has_required_fields = True @@ -7428,77 +4508,28 @@ class ListFileMembersBatchArg(bb.Struct): def __init__(self, files=None, limit=None): - self._files_value = None - self._files_present = False - self._limit_value = None - self._limit_present = False + self._files_value = bb.NOT_SET + self._limit_value = bb.NOT_SET 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 + # Instance attribute type: list of [str] (validator is set below) + files = bb.Attribute("files") - @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: int - """ - 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 + # Instance attribute type: int (validator is set below) + limit = bb.Attribute("limit") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFileMembersBatchArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFileMembersBatchArg(files={!r}, limit={!r})'.format( - self._files_value, - self._limit_value, - ) - ListFileMembersBatchArg_validator = bv.Struct(ListFileMembersBatchArg) class ListFileMembersBatchResult(bb.Struct): """ Per-file result for - :meth:`dropbox.dropbox.Dropbox.sharing_list_file_members_batch`. + :meth:`dropbox.dropbox_client.Dropbox.sharing_list_file_members_batch`. :ivar sharing.ListFileMembersBatchResult.file: This is the input file identifier, whether an ID or a path. @@ -7508,9 +4539,7 @@ class ListFileMembersBatchResult(bb.Struct): __slots__ = [ '_file_value', - '_file_present', '_result_value', - '_result_present', ] _has_required_fields = True @@ -7518,137 +4547,61 @@ class ListFileMembersBatchResult(bb.Struct): def __init__(self, file=None, result=None): - self._file_value = None - self._file_present = False - self._result_value = None - self._result_present = False + self._file_value = bb.NOT_SET + self._result_value = bb.NOT_SET 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. + # Instance attribute type: str (validator is set below) + file = bb.Attribute("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 + # Instance attribute type: ListFileMembersIndividualResult (validator is set below) + result = bb.Attribute("result", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFileMembersBatchResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFileMembersBatchResult(file={!r}, result={!r})'.format( - self._file_value, - self._result_value, - ) - ListFileMembersBatchResult_validator = bv.Struct(ListFileMembersBatchResult) class ListFileMembersContinueArg(bb.Struct): """ Arguments for - :meth:`dropbox.dropbox.Dropbox.sharing_list_file_members_continue`. + :meth:`dropbox.dropbox_client.Dropbox.sharing_list_file_members_continue`. :ivar sharing.ListFileMembersContinueArg.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`. + last call to + :meth:`dropbox.dropbox_client.Dropbox.sharing_list_file_members`, + :meth:`dropbox.dropbox_client.Dropbox.sharing_list_file_members_continue`, + or + :meth:`dropbox.dropbox_client.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 + self._cursor_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFileMembersContinueArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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`. + :meth:`dropbox.dropbox_client.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 @@ -7741,9 +4694,6 @@ def get_access_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFileMembersContinueError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFileMembersContinueError(%r, %r)' % (self._tag, self._value) - ListFileMembersContinueError_validator = bv.Union(ListFileMembersContinueError) class ListFileMembersCountResult(bb.Struct): @@ -7756,9 +4706,7 @@ class ListFileMembersCountResult(bb.Struct): __slots__ = [ '_members_value', - '_members_present', '_member_count_value', - '_member_count_present', ] _has_required_fields = True @@ -7766,76 +4714,27 @@ class ListFileMembersCountResult(bb.Struct): 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 + self._members_value = bb.NOT_SET + self._member_count_value = bb.NOT_SET 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: int - """ - 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 + # Instance attribute type: SharedFileMembers (validator is set below) + members = bb.Attribute("members", user_defined=True) - @member_count.deleter - def member_count(self): - self._member_count_value = None - self._member_count_present = False + # Instance attribute type: int (validator is set below) + member_count = bb.Attribute("member_count") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFileMembersCountResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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`. + Error for :meth:`dropbox.dropbox_client.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 @@ -7915,9 +4814,6 @@ def get_access_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFileMembersError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFileMembersError(%r, %r)' % (self._tag, self._value) - ListFileMembersError_validator = bv.Union(ListFileMembersError) class ListFileMembersIndividualResult(bb.Union): @@ -8009,14 +4905,12 @@ def get_access_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFileMembersIndividualResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFileMembersIndividualResult(%r, %r)' % (self._tag, self._value) - ListFileMembersIndividualResult_validator = bv.Union(ListFileMembersIndividualResult) class ListFilesArg(bb.Struct): """ - Arguments for :meth:`dropbox.dropbox.Dropbox.sharing_list_received_files`. + Arguments for + :meth:`dropbox.dropbox_client.Dropbox.sharing_list_received_files`. :ivar sharing.ListFilesArg.limit: Number of files to return max per query. Defaults to 100 if no limit is specified. @@ -8028,9 +4922,7 @@ class ListFilesArg(bb.Struct): __slots__ = [ '_limit_value', - '_limit_present', '_actions_value', - '_actions_present', ] _has_required_fields = False @@ -8038,82 +4930,28 @@ class ListFilesArg(bb.Struct): def __init__(self, limit=None, actions=None): - self._limit_value = None - self._limit_present = False - self._actions_value = None - self._actions_present = False + self._limit_value = bb.NOT_SET + self._actions_value = bb.NOT_SET 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. + # Instance attribute type: int (validator is set below) + limit = bb.Attribute("limit") - :rtype: int - """ - 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 + # Instance attribute type: list of [FileAction] (validator is set below) + actions = bb.Attribute("actions", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFilesArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFilesArg(limit={!r}, actions={!r})'.format( - self._limit_value, - self._actions_value, - ) - ListFilesArg_validator = bv.Struct(ListFilesArg) class ListFilesContinueArg(bb.Struct): """ Arguments for - :meth:`dropbox.dropbox.Dropbox.sharing_list_received_files_continue`. + :meth:`dropbox.dropbox_client.Dropbox.sharing_list_received_files_continue`. :ivar sharing.ListFilesContinueArg.cursor: Cursor in ``ListFilesResult.cursor``. @@ -8121,55 +4959,28 @@ class ListFilesContinueArg(bb.Struct): __slots__ = [ '_cursor_value', - '_cursor_present', ] _has_required_fields = True def __init__(self, cursor=None): - self._cursor_value = None - self._cursor_present = False + self._cursor_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFilesContinueArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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`. + :meth:`dropbox.dropbox_client.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 @@ -8237,15 +5048,12 @@ def get_user_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFilesContinueError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFilesContinueError(%r, %r)' % (self._tag, self._value) - ListFilesContinueError_validator = bv.Union(ListFilesContinueError) class ListFilesResult(bb.Struct): """ Success results for - :meth:`dropbox.dropbox.Dropbox.sharing_list_received_files`. + :meth:`dropbox.dropbox_client.Dropbox.sharing_list_received_files`. :ivar sharing.ListFilesResult.entries: Information about the files shared with current user. @@ -8255,9 +5063,7 @@ class ListFilesResult(bb.Struct): __slots__ = [ '_entries_value', - '_entries_present', '_cursor_value', - '_cursor_present', ] _has_required_fields = True @@ -8265,73 +5071,22 @@ class ListFilesResult(bb.Struct): def __init__(self, entries=None, cursor=None): - self._entries_value = None - self._entries_present = False - self._cursor_value = None - self._cursor_present = False + self._entries_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET 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 + # Instance attribute type: list of [SharedFileMetadata] (validator is set below) + entries = bb.Attribute("entries") - @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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFilesResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFilesResult(entries={!r}, cursor={!r})'.format( - self._entries_value, - self._cursor_value, - ) - ListFilesResult_validator = bv.Struct(ListFilesResult) class ListFolderMembersCursorArg(bb.Struct): @@ -8346,9 +5101,7 @@ class ListFolderMembersCursorArg(bb.Struct): __slots__ = [ '_actions_value', - '_actions_present', '_limit_value', - '_limit_present', ] _has_required_fields = False @@ -8356,76 +5109,22 @@ class ListFolderMembersCursorArg(bb.Struct): def __init__(self, actions=None, limit=None): - self._actions_value = None - self._actions_present = False - self._limit_value = None - self._limit_present = False + self._actions_value = bb.NOT_SET + self._limit_value = bb.NOT_SET 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 + # Instance attribute type: list of [MemberAction] (validator is set below) + actions = bb.Attribute("actions", nullable=True) - @property - def limit(self): - """ - The maximum number of results that include members, groups and invitees - to return per request. - - :rtype: int - """ - 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 + # Instance attribute type: int (validator is set below) + limit = bb.Attribute("limit") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFolderMembersCursorArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFolderMembersCursorArg(actions={!r}, limit={!r})'.format( - self._actions_value, - self._limit_value, - ) - ListFolderMembersCursorArg_validator = bv.Struct(ListFolderMembersCursorArg) class ListFolderMembersArgs(ListFolderMembersCursorArg): @@ -8436,7 +5135,6 @@ class ListFolderMembersArgs(ListFolderMembersCursorArg): __slots__ = [ '_shared_folder_id_value', - '_shared_folder_id_present', ] _has_required_fields = True @@ -8447,101 +5145,44 @@ def __init__(self, limit=None): super(ListFolderMembersArgs, self).__init__(actions, limit) - self._shared_folder_id_value = None - self._shared_folder_id_present = False + self._shared_folder_id_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + shared_folder_id = bb.Attribute("shared_folder_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFolderMembersArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): """ :ivar sharing.ListFolderMembersContinueArg.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`. + :meth:`dropbox.dropbox_client.Dropbox.sharing_list_folder_members` or + :meth:`dropbox.dropbox_client.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 + self._cursor_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFolderMembersContinueArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFolderMembersContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - ListFolderMembersContinueArg_validator = bv.Struct(ListFolderMembersContinueArg) class ListFolderMembersContinueError(bb.Union): @@ -8608,9 +5249,6 @@ def get_access_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFolderMembersContinueError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFolderMembersContinueError(%r, %r)' % (self._tag, self._value) - ListFolderMembersContinueError_validator = bv.Union(ListFolderMembersContinueError) class ListFoldersArgs(bb.Struct): @@ -8625,9 +5263,7 @@ class ListFoldersArgs(bb.Struct): __slots__ = [ '_limit_value', - '_limit_present', '_actions_value', - '_actions_present', ] _has_required_fields = False @@ -8635,76 +5271,22 @@ class ListFoldersArgs(bb.Struct): def __init__(self, limit=None, actions=None): - self._limit_value = None - self._limit_present = False - self._actions_value = None - self._actions_present = False + self._limit_value = bb.NOT_SET + self._actions_value = bb.NOT_SET 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: int - """ - 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 + # Instance attribute type: int (validator is set below) + limit = bb.Attribute("limit") - @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 + # Instance attribute type: list of [FolderAction] (validator is set below) + actions = bb.Attribute("actions", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFoldersArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFoldersArgs(limit={!r}, actions={!r})'.format( - self._limit_value, - self._actions_value, - ) - ListFoldersArgs_validator = bv.Struct(ListFoldersArgs) class ListFoldersContinueArg(bb.Struct): @@ -8715,50 +5297,22 @@ class ListFoldersContinueArg(bb.Struct): __slots__ = [ '_cursor_value', - '_cursor_present', ] _has_required_fields = True def __init__(self, cursor=None): - self._cursor_value = None - self._cursor_present = False + self._cursor_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFoldersContinueArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFoldersContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - ListFoldersContinueArg_validator = bv.Struct(ListFoldersContinueArg) class ListFoldersContinueError(bb.Union): @@ -8796,33 +5350,28 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFoldersContinueError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFoldersContinueError(%r, %r)' % (self._tag, self._value) - ListFoldersContinueError_validator = bv.Union(ListFoldersContinueError) class ListFoldersResult(bb.Struct): """ - 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``. + Result for :meth:`dropbox.dropbox_client.Dropbox.sharing_list_folders` or + :meth:`dropbox.dropbox_client.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 sharing.ListFoldersResult.entries: List of all shared folders the authenticated user has access to. :ivar sharing.ListFoldersResult.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`) + :meth:`dropbox.dropbox_client.Dropbox.sharing_list_folders_continue` or + :meth:`dropbox.dropbox_client.Dropbox.sharing_list_mountable_folders_continue`) to list additional folders. """ __slots__ = [ '_entries_value', - '_entries_present', '_cursor_value', - '_cursor_present', ] _has_required_fields = True @@ -8830,96 +5379,41 @@ class ListFoldersResult(bb.Struct): def __init__(self, entries=None, cursor=None): - self._entries_value = None - self._entries_present = False - self._cursor_value = None - self._cursor_present = False + self._entries_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET 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. + # Instance attribute type: list of [SharedFolderMetadata] (validator is set below) + entries = bb.Attribute("entries") - :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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListFoldersResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListFoldersResult(entries={!r}, cursor={!r})'.format( - self._entries_value, - self._cursor_value, - ) - ListFoldersResult_validator = bv.Struct(ListFoldersResult) class ListSharedLinksArg(bb.Struct): """ :ivar sharing.ListSharedLinksArg.path: See - :meth:`dropbox.dropbox.Dropbox.sharing_list_shared_links` description. + :meth:`dropbox.dropbox_client.Dropbox.sharing_list_shared_links` + description. :ivar sharing.ListSharedLinksArg.cursor: The cursor returned by your last - call to :meth:`dropbox.dropbox.Dropbox.sharing_list_shared_links`. + call to + :meth:`dropbox.dropbox_client.Dropbox.sharing_list_shared_links`. :ivar sharing.ListSharedLinksArg.direct_only: See - :meth:`dropbox.dropbox.Dropbox.sharing_list_shared_links` description. + :meth:`dropbox.dropbox_client.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 @@ -8928,12 +5422,9 @@ 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 + self._path_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET + self._direct_only_value = bb.NOT_SET if path is not None: self.path = path if cursor is not None: @@ -8941,97 +5432,18 @@ def __init__(self, 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. + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path", nullable=True) - :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`. + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor", nullable=True) - :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 + # Instance attribute type: bool (validator is set below) + direct_only = bb.Attribute("direct_only", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListSharedLinksArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -9042,8 +5454,8 @@ class ListSharedLinksError(bb.Union): :ivar sharing.ListSharedLinksError.reset: Indicates that the cursor has been invalidated. Call - :meth:`dropbox.dropbox.Dropbox.sharing_list_shared_links` to obtain a - new cursor. + :meth:`dropbox.dropbox_client.Dropbox.sharing_list_shared_links` to + obtain a new cursor. """ _catch_all = 'other' @@ -9100,9 +5512,6 @@ def get_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListSharedLinksError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListSharedLinksError(%r, %r)' % (self._tag, self._value) - ListSharedLinksError_validator = bv.Union(ListSharedLinksError) class ListSharedLinksResult(bb.Struct): @@ -9111,20 +5520,18 @@ class ListSharedLinksResult(bb.Struct): path argument. :ivar sharing.ListSharedLinksResult.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 + into :meth:`dropbox.dropbox_client.Dropbox.sharing_list_shared_links` to retrieve them. :ivar sharing.ListSharedLinksResult.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. + :meth:`dropbox.dropbox_client.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 @@ -9133,12 +5540,9 @@ 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 + self._links_value = bb.NOT_SET + self._has_more_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET if links is not None: self.links = links if has_more is not None: @@ -9146,93 +5550,18 @@ def __init__(self, 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 + # Instance attribute type: list of [SharedLinkMetadata] (validator is set below) + links = bb.Attribute("links") - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False + # Instance attribute type: bool (validator is set below) + has_more = bb.Attribute("has_more") - @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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListSharedLinksResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -9252,11 +5581,8 @@ class MemberAccessLevelResult(bb.Struct): __slots__ = [ '_access_level_value', - '_access_level_present', '_warning_value', - '_warning_present', '_access_details_value', - '_access_details_present', ] _has_required_fields = False @@ -9265,12 +5591,9 @@ 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 + self._access_level_value = bb.NOT_SET + self._warning_value = bb.NOT_SET + self._access_details_value = bb.NOT_SET if access_level is not None: self.access_level = access_level if warning is not None: @@ -9278,98 +5601,18 @@ def __init__(self, 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. + # Instance attribute type: AccessLevel (validator is set below) + access_level = bb.Attribute("access_level", nullable=True, user_defined=True) - :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. + # Instance attribute type: str (validator is set below) + warning = bb.Attribute("warning", nullable=True) - :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 + # Instance attribute type: list of [ParentFolderAccessInfo] (validator is set below) + access_details = bb.Attribute("access_details", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberAccessLevelResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -9468,9 +5711,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberAction, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberAction(%r, %r)' % (self._tag, self._value) - MemberAction_validator = bv.Union(MemberAction) class MemberPermission(bb.Struct): @@ -9487,11 +5727,8 @@ class MemberPermission(bb.Struct): __slots__ = [ '_action_value', - '_action_present', '_allow_value', - '_allow_present', '_reason_value', - '_reason_present', ] _has_required_fields = True @@ -9500,102 +5737,28 @@ 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 + self._action_value = bb.NOT_SET + self._allow_value = bb.NOT_SET + self._reason_value = bb.NOT_SET 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 + self.allow = allow + if reason is not None: + self.reason = reason - @allow.deleter - def allow(self): - self._allow_value = None - self._allow_present = False + # Instance attribute type: MemberAction (validator is set below) + action = bb.Attribute("action", user_defined=True) - @property - def reason(self): - """ - The reason why the user is denied the permission. Not present if the - action is allowed. + # Instance attribute type: bool (validator is set below) + allow = bb.Attribute("allow") - :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 + # Instance attribute type: PermissionDeniedReason (validator is set below) + reason = bb.Attribute("reason", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberPermission, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -9646,9 +5809,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberPolicy(%r, %r)' % (self._tag, self._value) - MemberPolicy_validator = bv.Union(MemberPolicy) class MemberSelector(bb.Union): @@ -9741,9 +5901,6 @@ def get_email(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSelector, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSelector(%r, %r)' % (self._tag, self._value) - MemberSelector_validator = bv.Union(MemberSelector) class ModifySharedLinkSettingsArgs(bb.Struct): @@ -9758,11 +5915,8 @@ class ModifySharedLinkSettingsArgs(bb.Struct): __slots__ = [ '_url_value', - '_url_present', '_settings_value', - '_settings_present', '_remove_expiration_value', - '_remove_expiration_present', ] _has_required_fields = True @@ -9771,12 +5925,9 @@ 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 + self._url_value = bb.NOT_SET + self._settings_value = bb.NOT_SET + self._remove_expiration_value = bb.NOT_SET if url is not None: self.url = url if settings is not None: @@ -9784,85 +5935,18 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + url = bb.Attribute("url") - @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 + # Instance attribute type: SharedLinkSettings (validator is set below) + settings = bb.Attribute("settings", user_defined=True) - @remove_expiration.deleter - def remove_expiration(self): - self._remove_expiration_value = None - self._remove_expiration_present = False + # Instance attribute type: bool (validator is set below) + remove_expiration = bb.Attribute("remove_expiration") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ModifySharedLinkSettingsArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -9924,9 +6008,6 @@ def get_settings_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ModifySharedLinkSettingsError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ModifySharedLinkSettingsError(%r, %r)' % (self._tag, self._value) - ModifySharedLinkSettingsError_validator = bv.Union(ModifySharedLinkSettingsError) class MountFolderArg(bb.Struct): @@ -9937,49 +6018,22 @@ class MountFolderArg(bb.Struct): __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 + self._shared_folder_id_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + shared_folder_id = bb.Attribute("shared_folder_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MountFolderArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MountFolderArg(shared_folder_id={!r})'.format( - self._shared_folder_id_value, - ) - MountFolderArg_validator = bv.Struct(MountFolderArg) class MountFolderError(bb.Union): @@ -10116,9 +6170,6 @@ def get_insufficient_quota(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MountFolderError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MountFolderError(%r, %r)' % (self._tag, self._value) - MountFolderError_validator = bv.Union(MountFolderError) class ParentFolderAccessInfo(bb.Struct): @@ -10137,13 +6188,9 @@ class ParentFolderAccessInfo(bb.Struct): __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 @@ -10153,14 +6200,10 @@ def __init__(self, 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 + self._folder_name_value = bb.NOT_SET + self._shared_folder_id_value = bb.NOT_SET + self._permissions_value = bb.NOT_SET + self._path_value = bb.NOT_SET if folder_name is not None: self.folder_name = folder_name if shared_folder_id is not None: @@ -10170,110 +6213,21 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + folder_name = bb.Attribute("folder_name") - @shared_folder_id.deleter - def shared_folder_id(self): - self._shared_folder_id_value = None - self._shared_folder_id_present = False + # Instance attribute type: str (validator is set below) + shared_folder_id = bb.Attribute("shared_folder_id") - @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'") + # Instance attribute type: list of [MemberPermission] (validator is set below) + permissions = bb.Attribute("permissions") - @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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ParentFolderAccessInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -10285,7 +6239,6 @@ class PathLinkMetadata(LinkMetadata): __slots__ = [ '_path_value', - '_path_present', ] _has_required_fields = True @@ -10298,45 +6251,16 @@ def __init__(self, super(PathLinkMetadata, self).__init__(url, visibility, expires) - self._path_value = None - self._path_present = False + self._path_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PathLinkMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -10377,9 +6301,6 @@ def is_folder(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PendingUploadMode, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PendingUploadMode(%r, %r)' % (self._tag, self._value) - PendingUploadMode_validator = bv.Union(PendingUploadMode) class PermissionDeniedReason(bb.Union): @@ -10604,9 +6525,6 @@ def get_insufficient_plan(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PermissionDeniedReason, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PermissionDeniedReason(%r, %r)' % (self._tag, self._value) - PermissionDeniedReason_validator = bv.Union(PermissionDeniedReason) class RelinquishFileMembershipArg(bb.Struct): @@ -10616,49 +6534,22 @@ class RelinquishFileMembershipArg(bb.Struct): __slots__ = [ '_file_value', - '_file_present', ] _has_required_fields = True def __init__(self, file=None): - self._file_value = None - self._file_present = False + self._file_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + file = bb.Attribute("file") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelinquishFileMembershipArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RelinquishFileMembershipArg(file={!r})'.format( - self._file_value, - ) - RelinquishFileMembershipArg_validator = bv.Struct(RelinquishFileMembershipArg) class RelinquishFileMembershipError(bb.Union): @@ -10738,9 +6629,6 @@ def get_access_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelinquishFileMembershipError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RelinquishFileMembershipError(%r, %r)' % (self._tag, self._value) - RelinquishFileMembershipError_validator = bv.Union(RelinquishFileMembershipError) class RelinquishFolderMembershipArg(bb.Struct): @@ -10753,9 +6641,7 @@ class RelinquishFolderMembershipArg(bb.Struct): __slots__ = [ '_shared_folder_id_value', - '_shared_folder_id_present', '_leave_a_copy_value', - '_leave_a_copy_present', ] _has_required_fields = True @@ -10763,70 +6649,22 @@ class RelinquishFolderMembershipArg(bb.Struct): 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 + self._shared_folder_id_value = bb.NOT_SET + self._leave_a_copy_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + shared_folder_id = bb.Attribute("shared_folder_id") - @leave_a_copy.deleter - def leave_a_copy(self): - self._leave_a_copy_value = None - self._leave_a_copy_present = False + # Instance attribute type: bool (validator is set below) + leave_a_copy = bb.Attribute("leave_a_copy") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelinquishFolderMembershipArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -10957,14 +6795,12 @@ def get_access_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelinquishFolderMembershipError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RelinquishFolderMembershipError(%r, %r)' % (self._tag, self._value) - RelinquishFolderMembershipError_validator = bv.Union(RelinquishFolderMembershipError) class RemoveFileMemberArg(bb.Struct): """ - Arguments for :meth:`dropbox.dropbox.Dropbox.sharing_remove_file_member_2`. + Arguments for + :meth:`dropbox.dropbox_client.Dropbox.sharing_remove_file_member_2`. :ivar sharing.RemoveFileMemberArg.file: File from which to remove members. :ivar sharing.RemoveFileMemberArg.member: Member to remove from this file. @@ -10975,9 +6811,7 @@ class RemoveFileMemberArg(bb.Struct): __slots__ = [ '_file_value', - '_file_present', '_member_value', - '_member_present', ] _has_required_fields = True @@ -10985,77 +6819,28 @@ class RemoveFileMemberArg(bb.Struct): def __init__(self, file=None, member=None): - self._file_value = None - self._file_present = False - self._member_value = None - self._member_present = False + self._file_value = bb.NOT_SET + self._member_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + file = bb.Attribute("file") - @member.deleter - def member(self): - self._member_value = None - self._member_present = False + # Instance attribute type: MemberSelector (validator is set below) + member = bb.Attribute("member", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(RemoveFileMemberArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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`. + Errors for + :meth:`dropbox.dropbox_client.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 @@ -11173,9 +6958,6 @@ def get_no_explicit_access(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RemoveFileMemberError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RemoveFileMemberError(%r, %r)' % (self._tag, self._value) - RemoveFileMemberError_validator = bv.Union(RemoveFileMemberError) class RemoveFolderMemberArg(bb.Struct): @@ -11192,11 +6974,8 @@ class RemoveFolderMemberArg(bb.Struct): __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 @@ -11205,12 +6984,9 @@ 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 + self._shared_folder_id_value = bb.NOT_SET + self._member_value = bb.NOT_SET + self._leave_a_copy_value = bb.NOT_SET if shared_folder_id is not None: self.shared_folder_id = shared_folder_id if member is not None: @@ -11218,87 +6994,18 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + shared_folder_id = bb.Attribute("shared_folder_id") - @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. + # Instance attribute type: MemberSelector (validator is set below) + member = bb.Attribute("member", user_defined=True) - :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 + # Instance attribute type: bool (validator is set below) + leave_a_copy = bb.Attribute("leave_a_copy") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RemoveFolderMemberArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -11444,9 +7151,6 @@ def get_member_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RemoveFolderMemberError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RemoveFolderMemberError(%r, %r)' % (self._tag, self._value) - RemoveFolderMemberError_validator = bv.Union(RemoveFolderMemberError) class RemoveMemberJobStatus(async_.PollResultBase): @@ -11524,9 +7228,6 @@ def get_failed(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RemoveMemberJobStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RemoveMemberJobStatus(%r, %r)' % (self._tag, self._value) - RemoveMemberJobStatus_validator = bv.Union(RemoveMemberJobStatus) class RequestedLinkAccessLevel(bb.Union): @@ -11589,9 +7290,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RequestedLinkAccessLevel, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RequestedLinkAccessLevel(%r, %r)' % (self._tag, self._value) - RequestedLinkAccessLevel_validator = bv.Union(RequestedLinkAccessLevel) class RequestedVisibility(bb.Union): @@ -11649,9 +7347,6 @@ def is_password(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RequestedVisibility, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RequestedVisibility(%r, %r)' % (self._tag, self._value) - RequestedVisibility_validator = bv.Union(RequestedVisibility) class ResolvedVisibility(RequestedVisibility): @@ -11708,9 +7403,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ResolvedVisibility, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ResolvedVisibility(%r, %r)' % (self._tag, self._value) - ResolvedVisibility_validator = bv.Union(ResolvedVisibility) class RevokeSharedLinkArg(bb.Struct): @@ -11720,49 +7412,22 @@ class RevokeSharedLinkArg(bb.Struct): __slots__ = [ '_url_value', - '_url_present', ] _has_required_fields = True def __init__(self, url=None): - self._url_value = None - self._url_present = False + self._url_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + url = bb.Attribute("url") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RevokeSharedLinkArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RevokeSharedLinkArg(url={!r})'.format( - self._url_value, - ) - RevokeSharedLinkArg_validator = bv.Struct(RevokeSharedLinkArg) class RevokeSharedLinkError(SharedLinkError): @@ -11789,9 +7454,6 @@ def is_shared_link_malformed(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RevokeSharedLinkError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RevokeSharedLinkError(%r, %r)' % (self._tag, self._value) - RevokeSharedLinkError_validator = bv.Union(RevokeSharedLinkError) class SetAccessInheritanceArg(bb.Struct): @@ -11804,9 +7466,7 @@ class SetAccessInheritanceArg(bb.Struct): __slots__ = [ '_access_inheritance_value', - '_access_inheritance_present', '_shared_folder_id_value', - '_shared_folder_id_present', ] _has_required_fields = True @@ -11814,70 +7474,22 @@ class SetAccessInheritanceArg(bb.Struct): def __init__(self, shared_folder_id=None, access_inheritance=None): - self._access_inheritance_value = None - self._access_inheritance_present = False - self._shared_folder_id_value = None - self._shared_folder_id_present = False + self._access_inheritance_value = bb.NOT_SET + self._shared_folder_id_value = bb.NOT_SET if access_inheritance is not None: self.access_inheritance = access_inheritance if shared_folder_id is not None: self.shared_folder_id = shared_folder_id - @property - def access_inheritance(self): - """ - The access inheritance settings for the folder. - - :rtype: AccessInheritance - """ - if self._access_inheritance_present: - return self._access_inheritance_value - else: - return AccessInheritance.inherit - - @access_inheritance.setter - def access_inheritance(self, val): - self._access_inheritance_validator.validate_type_only(val) - self._access_inheritance_value = val - self._access_inheritance_present = True - - @access_inheritance.deleter - def access_inheritance(self): - self._access_inheritance_value = None - self._access_inheritance_present = False - - @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'") + # Instance attribute type: AccessInheritance (validator is set below) + access_inheritance = bb.Attribute("access_inheritance", user_defined=True) - @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 + # Instance attribute type: str (validator is set below) + shared_folder_id = bb.Attribute("shared_folder_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SetAccessInheritanceArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SetAccessInheritanceArg(shared_folder_id={!r}, access_inheritance={!r})'.format( - self._shared_folder_id_value, - self._access_inheritance_value, - ) - SetAccessInheritanceArg_validator = bv.Struct(SetAccessInheritanceArg) class SetAccessInheritanceError(bb.Union): @@ -11948,9 +7560,6 @@ def get_access_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SetAccessInheritanceError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SetAccessInheritanceError(%r, %r)' % (self._tag, self._value) - SetAccessInheritanceError_validator = bv.Union(SetAccessInheritanceError) class ShareFolderArgBase(bb.Struct): @@ -11975,19 +7584,12 @@ class ShareFolderArgBase(bb.Struct): __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', '_access_inheritance_value', - '_access_inheritance_present', ] _has_required_fields = True @@ -12000,20 +7602,13 @@ def __init__(self, shared_link_policy=None, viewer_info_policy=None, access_inheritance=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 - self._access_inheritance_value = None - self._access_inheritance_present = False + self._acl_update_policy_value = bb.NOT_SET + self._force_async_value = bb.NOT_SET + self._member_policy_value = bb.NOT_SET + self._path_value = bb.NOT_SET + self._shared_link_policy_value = bb.NOT_SET + self._viewer_info_policy_value = bb.NOT_SET + self._access_inheritance_value = bb.NOT_SET if acl_update_policy is not None: self.acl_update_policy = acl_update_policy if force_async is not None: @@ -12029,197 +7624,30 @@ def __init__(self, if access_inheritance is not None: self.access_inheritance = access_inheritance - @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 + # Instance attribute type: AclUpdatePolicy (validator is set below) + acl_update_policy = bb.Attribute("acl_update_policy", nullable=True, user_defined=True) - @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. + # Instance attribute type: bool (validator is set below) + force_async = bb.Attribute("force_async") - :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 + # Instance attribute type: MemberPolicy (validator is set below) + member_policy = bb.Attribute("member_policy", nullable=True, user_defined=True) - @viewer_info_policy.deleter - def viewer_info_policy(self): - self._viewer_info_policy_value = None - self._viewer_info_policy_present = False - - @property - def access_inheritance(self): - """ - The access inheritance settings for the folder. + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") - :rtype: AccessInheritance - """ - if self._access_inheritance_present: - return self._access_inheritance_value - else: - return AccessInheritance.inherit + # Instance attribute type: SharedLinkPolicy (validator is set below) + shared_link_policy = bb.Attribute("shared_link_policy", nullable=True, user_defined=True) - @access_inheritance.setter - def access_inheritance(self, val): - self._access_inheritance_validator.validate_type_only(val) - self._access_inheritance_value = val - self._access_inheritance_present = True + # Instance attribute type: ViewerInfoPolicy (validator is set below) + viewer_info_policy = bb.Attribute("viewer_info_policy", nullable=True, user_defined=True) - @access_inheritance.deleter - def access_inheritance(self): - self._access_inheritance_value = None - self._access_inheritance_present = False + # Instance attribute type: AccessInheritance (validator is set below) + access_inheritance = bb.Attribute("access_inheritance", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShareFolderArgBase, self)._process_custom_annotations(annotation_type, field_path, processor) - 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}, access_inheritance={!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._access_inheritance_value, - ) - ShareFolderArgBase_validator = bv.Struct(ShareFolderArgBase) class ShareFolderArg(ShareFolderArgBase): @@ -12234,9 +7662,7 @@ class ShareFolderArg(ShareFolderArgBase): __slots__ = [ '_actions_value', - '_actions_present', '_link_settings_value', - '_link_settings_present', ] _has_required_fields = True @@ -12258,86 +7684,22 @@ def __init__(self, shared_link_policy, viewer_info_policy, access_inheritance) - self._actions_value = None - self._actions_present = False - self._link_settings_value = None - self._link_settings_present = False + self._actions_value = bb.NOT_SET + self._link_settings_value = bb.NOT_SET 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. + # Instance attribute type: list of [FolderAction] (validator is set below) + actions = bb.Attribute("actions", nullable=True) - :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 + # Instance attribute type: LinkSettings (validator is set below) + link_settings = bb.Attribute("link_settings", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShareFolderArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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}, access_inheritance={!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._access_inheritance_value, - self._actions_value, - self._link_settings_value, - ) - ShareFolderArg_validator = bv.Struct(ShareFolderArg) class ShareFolderErrorBase(bb.Union): @@ -12435,9 +7797,6 @@ def get_bad_path(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShareFolderErrorBase, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShareFolderErrorBase(%r, %r)' % (self._tag, self._value) - ShareFolderErrorBase_validator = bv.Union(ShareFolderErrorBase) class ShareFolderError(ShareFolderErrorBase): @@ -12464,9 +7823,6 @@ def is_no_permission(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShareFolderError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShareFolderError(%r, %r)' % (self._tag, self._value) - ShareFolderError_validator = bv.Union(ShareFolderError) class ShareFolderJobStatus(async_.PollResultBase): @@ -12542,9 +7898,6 @@ def get_failed(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShareFolderJobStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShareFolderJobStatus(%r, %r)' % (self._tag, self._value) - ShareFolderJobStatus_validator = bv.Union(ShareFolderJobStatus) class ShareFolderLaunch(async_.LaunchResultBase): @@ -12586,9 +7939,6 @@ def get_complete(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShareFolderLaunch, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShareFolderLaunch(%r, %r)' % (self._tag, self._value) - ShareFolderLaunch_validator = bv.Union(ShareFolderLaunch) class SharePathError(bb.Union): @@ -12814,9 +8164,6 @@ def get_already_shared(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharePathError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharePathError(%r, %r)' % (self._tag, self._value) - SharePathError_validator = bv.Union(SharePathError) class SharedContentLinkMetadata(SharedContentLinkMetadataBase): @@ -12832,9 +8179,7 @@ class SharedContentLinkMetadata(SharedContentLinkMetadataBase): __slots__ = [ '_audience_exceptions_value', - '_audience_exceptions_present', '_url_value', - '_url_present', ] _has_required_fields = True @@ -12856,91 +8201,31 @@ def __init__(self, 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 + self._audience_exceptions_value = bb.NOT_SET + self._url_value = bb.NOT_SET 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 + # Instance attribute type: AudienceExceptions (validator is set below) + audience_exceptions = bb.Attribute("audience_exceptions", nullable=True, user_defined=True) - @url.deleter - def url(self): - self._url_value = None - self._url_present = False + # Instance attribute type: str (validator is set below) + url = bb.Attribute("url") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentLinkMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): """ 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`. + :meth:`dropbox.dropbox_client.Dropbox.sharing_list_file_members` and + :meth:`dropbox.dropbox_client.Dropbox.sharing_list_file_members_continue`, + and used as part of the results for + :meth:`dropbox.dropbox_client.Dropbox.sharing_list_file_members_batch`. :ivar sharing.SharedFileMembers.users: The list of user members of the shared file. @@ -12950,19 +8235,16 @@ class SharedFileMembers(bb.Struct): file, but have not logged in and claimed this. :ivar sharing.SharedFileMembers.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` + into + :meth:`dropbox.dropbox_client.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 @@ -12972,14 +8254,10 @@ def __init__(self, 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 + self._users_value = bb.NOT_SET + self._groups_value = bb.NOT_SET + self._invitees_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET if users is not None: self.users = users if groups is not None: @@ -12989,116 +8267,21 @@ def __init__(self, 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 + # Instance attribute type: list of [UserFileMembershipInfo] (validator is set below) + users = bb.Attribute("users") - @invitees.deleter - def invitees(self): - self._invitees_value = None - self._invitees_present = False + # Instance attribute type: list of [GroupMembershipInfo] (validator is set below) + groups = bb.Attribute("groups") - @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. + # Instance attribute type: list of [InviteeMembershipInfo] (validator is set below) + invitees = bb.Attribute("invitees") - :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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFileMembers, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -13147,33 +8330,19 @@ class SharedFileMetadata(bb.Struct): __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 @@ -13193,34 +8362,20 @@ def __init__(self, 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 + self._access_type_value = bb.NOT_SET + self._id_value = bb.NOT_SET + self._expected_link_metadata_value = bb.NOT_SET + self._link_metadata_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._owner_display_names_value = bb.NOT_SET + self._owner_team_value = bb.NOT_SET + self._parent_shared_folder_id_value = bb.NOT_SET + self._path_display_value = bb.NOT_SET + self._path_lower_value = bb.NOT_SET + self._permissions_value = bb.NOT_SET + self._policy_value = bb.NOT_SET + self._preview_url_value = bb.NOT_SET + self._time_invited_value = bb.NOT_SET if access_type is not None: self.access_type = access_type if id is not None: @@ -13250,394 +8405,51 @@ def __init__(self, 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. + # Instance attribute type: AccessLevel (validator is set below) + access_type = bb.Attribute("access_type", nullable=True, user_defined=True) - :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 - """ - 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. + # Instance attribute type: str (validator is set below) + id = bb.Attribute("id") - :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. + # Instance attribute type: ExpectedSharedContentLinkMetadata (validator is set below) + expected_link_metadata = bb.Attribute("expected_link_metadata", nullable=True, user_defined=True) - :rtype: str - """ - if self._path_display_present: - return self._path_display_value - else: - return None + # Instance attribute type: SharedContentLinkMetadata (validator is set below) + link_metadata = bb.Attribute("link_metadata", nullable=True, user_defined=True) - @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 + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - @path_display.deleter - def path_display(self): - self._path_display_value = None - self._path_display_present = False + # Instance attribute type: list of [str] (validator is set below) + owner_display_names = bb.Attribute("owner_display_names", nullable=True) - @property - def path_lower(self): - """ - The lower-case full path of this file. Absent for unmounted files. + # Instance attribute type: users.Team (validator is set below) + owner_team = bb.Attribute("owner_team", nullable=True, user_defined=True) - :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. + # Instance attribute type: str (validator is set below) + parent_shared_folder_id = bb.Attribute("parent_shared_folder_id", nullable=True) - :rtype: str - """ - if self._preview_url_present: - return self._preview_url_value - else: - raise AttributeError("missing required field 'preview_url'") + # Instance attribute type: str (validator is set below) + path_display = bb.Attribute("path_display", nullable=True) - @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 + # Instance attribute type: str (validator is set below) + path_lower = bb.Attribute("path_lower", nullable=True) - @preview_url.deleter - def preview_url(self): - self._preview_url_value = None - self._preview_url_present = False + # Instance attribute type: list of [FilePermission] (validator is set below) + permissions = bb.Attribute("permissions", nullable=True) - @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. + # Instance attribute type: FolderPolicy (validator is set below) + policy = bb.Attribute("policy", user_defined=True) - :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 + # Instance attribute type: str (validator is set below) + preview_url = bb.Attribute("preview_url") + + # Instance attribute type: datetime.datetime (validator is set below) + time_invited = bb.Attribute("time_invited", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFileMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -13712,9 +8524,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderAccessError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderAccessError(%r, %r)' % (self._tag, self._value) - SharedFolderAccessError_validator = bv.Union(SharedFolderAccessError) class SharedFolderMemberError(bb.Union): @@ -13797,9 +8606,6 @@ def get_no_explicit_access(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderMemberError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderMemberError(%r, %r)' % (self._tag, self._value) - SharedFolderMemberError_validator = bv.Union(SharedFolderMemberError) class SharedFolderMembers(bb.Struct): @@ -13815,19 +8621,15 @@ class SharedFolderMembers(bb.Struct): :ivar sharing.SharedFolderMembers.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. + :meth:`dropbox.dropbox_client.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 @@ -13837,14 +8639,10 @@ def __init__(self, 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 + self._users_value = bb.NOT_SET + self._groups_value = bb.NOT_SET + self._invitees_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET if users is not None: self.users = users if groups is not None: @@ -13854,115 +8652,21 @@ def __init__(self, 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 + # Instance attribute type: list of [UserMembershipInfo] (validator is set below) + users = bb.Attribute("users") - @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 + # Instance attribute type: list of [GroupMembershipInfo] (validator is set below) + groups = bb.Attribute("groups") - @invitees.deleter - def invitees(self): - self._invitees_value = None - self._invitees_present = False + # Instance attribute type: list of [InviteeMembershipInfo] (validator is set below) + invitees = bb.Attribute("invitees") - @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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderMembers, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -13992,21 +8696,13 @@ class SharedFolderMetadataBase(bb.Struct): __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', '_parent_folder_name_value', - '_parent_folder_name_present', ] _has_required_fields = True @@ -14020,22 +8716,14 @@ def __init__(self, parent_shared_folder_id=None, path_lower=None, parent_folder_name=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 - self._parent_folder_name_value = None - self._parent_folder_name_present = False + self._access_type_value = bb.NOT_SET + self._is_inside_team_folder_value = bb.NOT_SET + self._is_team_folder_value = bb.NOT_SET + self._owner_display_names_value = bb.NOT_SET + self._owner_team_value = bb.NOT_SET + self._parent_shared_folder_id_value = bb.NOT_SET + self._path_lower_value = bb.NOT_SET + self._parent_folder_name_value = bb.NOT_SET if access_type is not None: self.access_type = access_type if is_inside_team_folder is not None: @@ -14053,226 +8741,33 @@ def __init__(self, if parent_folder_name is not None: self.parent_folder_name = parent_folder_name - @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 - """ - 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 + # Instance attribute type: AccessLevel (validator is set below) + access_type = bb.Attribute("access_type", user_defined=True) - @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 + # Instance attribute type: bool (validator is set below) + is_inside_team_folder = bb.Attribute("is_inside_team_folder") - @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. + # Instance attribute type: bool (validator is set below) + is_team_folder = bb.Attribute("is_team_folder") - :rtype: str - """ - if self._path_lower_present: - return self._path_lower_value - else: - return None + # Instance attribute type: list of [str] (validator is set below) + owner_display_names = bb.Attribute("owner_display_names", nullable=True) - @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 + # Instance attribute type: users.Team (validator is set below) + owner_team = bb.Attribute("owner_team", nullable=True, user_defined=True) - @path_lower.deleter - def path_lower(self): - self._path_lower_value = None - self._path_lower_present = False + # Instance attribute type: str (validator is set below) + parent_shared_folder_id = bb.Attribute("parent_shared_folder_id", nullable=True) - @property - def parent_folder_name(self): - """ - Display name for the parent folder. + # Instance attribute type: str (validator is set below) + path_lower = bb.Attribute("path_lower", nullable=True) - :rtype: str - """ - if self._parent_folder_name_present: - return self._parent_folder_name_value - else: - return None - - @parent_folder_name.setter - def parent_folder_name(self, val): - if val is None: - del self.parent_folder_name - return - val = self._parent_folder_name_validator.validate(val) - self._parent_folder_name_value = val - self._parent_folder_name_present = True - - @parent_folder_name.deleter - def parent_folder_name(self): - self._parent_folder_name_value = None - self._parent_folder_name_present = False + # Instance attribute type: str (validator is set below) + parent_folder_name = bb.Attribute("parent_folder_name", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderMetadataBase, self)._process_custom_annotations(annotation_type, field_path, processor) - 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}, parent_folder_name={!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, - self._parent_folder_name_value, - ) - SharedFolderMetadataBase_validator = bv.Struct(SharedFolderMetadataBase) class SharedFolderMetadata(SharedFolderMetadataBase): @@ -14300,21 +8795,13 @@ class SharedFolderMetadata(SharedFolderMetadataBase): __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', '_access_inheritance_value', - '_access_inheritance_present', ] _has_required_fields = True @@ -14344,22 +8831,14 @@ def __init__(self, parent_shared_folder_id, path_lower, parent_folder_name) - 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 - self._access_inheritance_value = None - self._access_inheritance_present = False + self._link_metadata_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._permissions_value = bb.NOT_SET + self._policy_value = bb.NOT_SET + self._preview_url_value = bb.NOT_SET + self._shared_folder_id_value = bb.NOT_SET + self._time_invited_value = bb.NOT_SET + self._access_inheritance_value = bb.NOT_SET if link_metadata is not None: self.link_metadata = link_metadata if name is not None: @@ -14377,223 +8856,33 @@ def __init__(self, if access_inheritance is not None: self.access_inheritance = access_inheritance - @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 + # Instance attribute type: SharedContentLinkMetadata (validator is set below) + link_metadata = bb.Attribute("link_metadata", nullable=True, user_defined=True) - @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'") + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - @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 + # Instance attribute type: list of [FolderPermission] (validator is set below) + permissions = bb.Attribute("permissions", nullable=True) - @time_invited.deleter - def time_invited(self): - self._time_invited_value = None - self._time_invited_present = False + # Instance attribute type: FolderPolicy (validator is set below) + policy = bb.Attribute("policy", user_defined=True) - @property - def access_inheritance(self): - """ - Whether the folder inherits its members from its parent. + # Instance attribute type: str (validator is set below) + preview_url = bb.Attribute("preview_url") - :rtype: AccessInheritance - """ - if self._access_inheritance_present: - return self._access_inheritance_value - else: - return AccessInheritance.inherit + # Instance attribute type: str (validator is set below) + shared_folder_id = bb.Attribute("shared_folder_id") - @access_inheritance.setter - def access_inheritance(self, val): - self._access_inheritance_validator.validate_type_only(val) - self._access_inheritance_value = val - self._access_inheritance_present = True + # Instance attribute type: datetime.datetime (validator is set below) + time_invited = bb.Attribute("time_invited") - @access_inheritance.deleter - def access_inheritance(self): - self._access_inheritance_value = None - self._access_inheritance_present = False + # Instance attribute type: AccessInheritance (validator is set below) + access_inheritance = bb.Attribute("access_inheritance", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - 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}, parent_folder_name={!r}, link_metadata={!r}, permissions={!r}, access_inheritance={!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._parent_folder_name_value, - self._link_metadata_value, - self._permissions_value, - self._access_inheritance_value, - ) - SharedFolderMetadata_validator = bv.Struct(SharedFolderMetadata) class SharedLinkAccessFailureReason(bb.Union): @@ -14681,9 +8970,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkAccessFailureReason, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkAccessFailureReason(%r, %r)' % (self._tag, self._value) - SharedLinkAccessFailureReason_validator = bv.Union(SharedLinkAccessFailureReason) class SharedLinkAlreadyExistsMetadata(bb.Union): @@ -14742,9 +9028,6 @@ def get_metadata(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkAlreadyExistsMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkAlreadyExistsMetadata(%r, %r)' % (self._tag, self._value) - SharedLinkAlreadyExistsMetadata_validator = bv.Union(SharedLinkAlreadyExistsMetadata) class SharedLinkPolicy(bb.Union): @@ -14807,9 +9090,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkPolicy(%r, %r)' % (self._tag, self._value) - SharedLinkPolicy_validator = bv.Union(SharedLinkPolicy) class SharedLinkSettings(bb.Struct): @@ -14834,15 +9114,10 @@ class SharedLinkSettings(bb.Struct): __slots__ = [ '_requested_visibility_value', - '_requested_visibility_present', '_link_password_value', - '_link_password_present', '_expires_value', - '_expires_present', '_audience_value', - '_audience_present', '_access_value', - '_access_present', ] _has_required_fields = False @@ -14853,16 +9128,11 @@ def __init__(self, expires=None, audience=None, access=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 - self._audience_value = None - self._audience_present = False - self._access_value = None - self._access_present = False + self._requested_visibility_value = bb.NOT_SET + self._link_password_value = bb.NOT_SET + self._expires_value = bb.NOT_SET + self._audience_value = bb.NOT_SET + self._access_value = bb.NOT_SET if requested_visibility is not None: self.requested_visibility = requested_visibility if link_password is not None: @@ -14874,154 +9144,24 @@ def __init__(self, if access is not None: self.access = access - @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 + # Instance attribute type: RequestedVisibility (validator is set below) + requested_visibility = bb.Attribute("requested_visibility", nullable=True, user_defined=True) - @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 + # Instance attribute type: str (validator is set below) + link_password = bb.Attribute("link_password", nullable=True) - @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 + # Instance attribute type: datetime.datetime (validator is set below) + expires = bb.Attribute("expires", nullable=True) - @link_password.deleter - def link_password(self): - self._link_password_value = None - self._link_password_present = False + # Instance attribute type: LinkAudience (validator is set below) + audience = bb.Attribute("audience", nullable=True, user_defined=True) - @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 - - @property - def audience(self): - """ - The new audience who can benefit from the access level specified by the - link's access level specified in the `link_access_level` field of - `LinkPermissions`. This is used in conjunction with team policies and - shared folder policies to determine the final effective audience type in - the `effective_audience` field of `LinkPermissions. - - :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 access(self): - """ - Requested access level you want the audience to gain from this link. - Note, modifying access level for an existing link is not supported. - - :rtype: RequestedLinkAccessLevel - """ - if self._access_present: - return self._access_value - else: - return None - - @access.setter - def access(self, val): - if val is None: - del self.access - return - self._access_validator.validate_type_only(val) - self._access_value = val - self._access_present = True - - @access.deleter - def access(self): - self._access_value = None - self._access_present = False + # Instance attribute type: RequestedLinkAccessLevel (validator is set below) + access = bb.Attribute("access", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettings, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkSettings(requested_visibility={!r}, link_password={!r}, expires={!r}, audience={!r}, access={!r})'.format( - self._requested_visibility_value, - self._link_password_value, - self._expires_value, - self._audience_value, - self._access_value, - ) - SharedLinkSettings_validator = bv.Struct(SharedLinkSettings) class SharedLinkSettingsError(bb.Union): @@ -15068,9 +9208,6 @@ def is_not_authorized(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettingsError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkSettingsError(%r, %r)' % (self._tag, self._value) - SharedLinkSettingsError_validator = bv.Union(SharedLinkSettingsError) class SharingFileAccessError(bb.Union): @@ -15158,9 +9295,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharingFileAccessError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharingFileAccessError(%r, %r)' % (self._tag, self._value) - SharingFileAccessError_validator = bv.Union(SharingFileAccessError) class SharingUserError(bb.Union): @@ -15202,9 +9336,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharingUserError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharingUserError(%r, %r)' % (self._tag, self._value) - SharingUserError_validator = bv.Union(SharingUserError) class TeamMemberInfo(bb.Struct): @@ -15220,11 +9351,8 @@ class TeamMemberInfo(bb.Struct): __slots__ = [ '_team_info_value', - '_team_info_present', '_display_name_value', - '_display_name_present', '_member_id_value', - '_member_id_present', ] _has_required_fields = True @@ -15233,12 +9361,9 @@ 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 + self._team_info_value = bb.NOT_SET + self._display_name_value = bb.NOT_SET + self._member_id_value = bb.NOT_SET if team_info is not None: self.team_info = team_info if display_name is not None: @@ -15246,89 +9371,18 @@ def __init__(self, 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 - """ - 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 + # Instance attribute type: users.Team (validator is set below) + team_info = bb.Attribute("team_info") - @team_info.deleter - def team_info(self): - self._team_info_value = None - self._team_info_present = False + # Instance attribute type: str (validator is set below) + display_name = bb.Attribute("display_name") - @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 + # Instance attribute type: str (validator is set below) + member_id = bb.Attribute("member_id", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMemberInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -15341,9 +9395,7 @@ class TransferFolderArg(bb.Struct): __slots__ = [ '_shared_folder_id_value', - '_shared_folder_id_present', '_to_dropbox_id_value', - '_to_dropbox_id_present', ] _has_required_fields = True @@ -15351,70 +9403,22 @@ class TransferFolderArg(bb.Struct): 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 + self._shared_folder_id_value = bb.NOT_SET + self._to_dropbox_id_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + shared_folder_id = bb.Attribute("shared_folder_id") - @to_dropbox_id.deleter - def to_dropbox_id(self): - self._to_dropbox_id_value = None - self._to_dropbox_id_present = False + # Instance attribute type: str (validator is set below) + to_dropbox_id = bb.Attribute("to_dropbox_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TransferFolderArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -15543,9 +9547,6 @@ def get_access_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TransferFolderError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TransferFolderError(%r, %r)' % (self._tag, self._value) - TransferFolderError_validator = bv.Union(TransferFolderError) class UnmountFolderArg(bb.Struct): @@ -15556,49 +9557,22 @@ class UnmountFolderArg(bb.Struct): __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 + self._shared_folder_id_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + shared_folder_id = bb.Attribute("shared_folder_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(UnmountFolderArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UnmountFolderArg(shared_folder_id={!r})'.format( - self._shared_folder_id_value, - ) - UnmountFolderArg_validator = bv.Struct(UnmountFolderArg) class UnmountFolderError(bb.Union): @@ -15679,68 +9653,39 @@ def get_access_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UnmountFolderError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UnmountFolderError(%r, %r)' % (self._tag, self._value) - UnmountFolderError_validator = bv.Union(UnmountFolderError) class UnshareFileArg(bb.Struct): """ - Arguments for :meth:`dropbox.dropbox.Dropbox.sharing_unshare_file`. + Arguments for :meth:`dropbox.dropbox_client.Dropbox.sharing_unshare_file`. :ivar sharing.UnshareFileArg.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 + self._file_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + file = bb.Attribute("file") def _process_custom_annotations(self, annotation_type, field_path, processor): super(UnshareFileArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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`. + Error result for + :meth:`dropbox.dropbox_client.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 @@ -15820,9 +9765,6 @@ def get_access_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UnshareFileError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UnshareFileError(%r, %r)' % (self._tag, self._value) - UnshareFileError_validator = bv.Union(UnshareFileError) class UnshareFolderArg(bb.Struct): @@ -15837,9 +9779,7 @@ class UnshareFolderArg(bb.Struct): __slots__ = [ '_shared_folder_id_value', - '_shared_folder_id_present', '_leave_a_copy_value', - '_leave_a_copy_present', ] _has_required_fields = True @@ -15847,72 +9787,22 @@ class UnshareFolderArg(bb.Struct): 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 + self._shared_folder_id_value = bb.NOT_SET + self._leave_a_copy_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + shared_folder_id = bb.Attribute("shared_folder_id") - @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 + # Instance attribute type: bool (validator is set below) + leave_a_copy = bb.Attribute("leave_a_copy") def _process_custom_annotations(self, annotation_type, field_path, processor): super(UnshareFolderArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -16003,14 +9893,12 @@ def get_access_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UnshareFolderError, self)._process_custom_annotations(annotation_type, field_path, processor) - 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`. + Arguments for + :meth:`dropbox.dropbox_client.Dropbox.sharing_update_file_member`. """ __slots__ = [ @@ -16029,13 +9917,6 @@ def __init__(self, def _process_custom_annotations(self, annotation_type, field_path, processor): super(UpdateFileMemberArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -16051,11 +9932,8 @@ class UpdateFolderMemberArg(bb.Struct): __slots__ = [ '_shared_folder_id_value', - '_shared_folder_id_present', '_member_value', - '_member_present', '_access_level_value', - '_access_level_present', ] _has_required_fields = True @@ -16064,12 +9942,9 @@ 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 + self._shared_folder_id_value = bb.NOT_SET + self._member_value = bb.NOT_SET + self._access_level_value = bb.NOT_SET if shared_folder_id is not None: self.shared_folder_id = shared_folder_id if member is not None: @@ -16077,87 +9952,18 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + shared_folder_id = bb.Attribute("shared_folder_id") - @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. + # Instance attribute type: MemberSelector (validator is set below) + member = bb.Attribute("member", user_defined=True) - :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 + # Instance attribute type: AccessLevel (validator is set below) + access_level = bb.Attribute("access_level", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(UpdateFolderMemberArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -16302,9 +10108,6 @@ def get_no_explicit_access(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UpdateFolderMemberError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UpdateFolderMemberError(%r, %r)' % (self._tag, self._value) - UpdateFolderMemberError_validator = bv.Union(UpdateFolderMemberError) class UpdateFolderPolicyArg(bb.Struct): @@ -16333,19 +10136,12 @@ class UpdateFolderPolicyArg(bb.Struct): __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 @@ -16358,20 +10154,13 @@ def __init__(self, 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 + self._shared_folder_id_value = bb.NOT_SET + self._member_policy_value = bb.NOT_SET + self._acl_update_policy_value = bb.NOT_SET + self._viewer_info_policy_value = bb.NOT_SET + self._shared_link_policy_value = bb.NOT_SET + self._link_settings_value = bb.NOT_SET + self._actions_value = bb.NOT_SET if shared_folder_id is not None: self.shared_folder_id = shared_folder_id if member_policy is not None: @@ -16387,205 +10176,30 @@ def __init__(self, if actions is not None: self.actions = actions - @property - def shared_folder_id(self): - """ - The ID for the shared folder. + # Instance attribute type: str (validator is set below) + shared_folder_id = bb.Attribute("shared_folder_id") - :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``. + # Instance attribute type: MemberPolicy (validator is set below) + member_policy = bb.Attribute("member_policy", nullable=True, user_defined=True) - :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. + # Instance attribute type: AclUpdatePolicy (validator is set below) + acl_update_policy = bb.Attribute("acl_update_policy", nullable=True, user_defined=True) - :rtype: list of [FolderAction] - """ - if self._actions_present: - return self._actions_value - else: - return None + # Instance attribute type: ViewerInfoPolicy (validator is set below) + viewer_info_policy = bb.Attribute("viewer_info_policy", nullable=True, user_defined=True) - @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 + # Instance attribute type: SharedLinkPolicy (validator is set below) + shared_link_policy = bb.Attribute("shared_link_policy", nullable=True, user_defined=True) - @actions.deleter - def actions(self): - self._actions_value = None - self._actions_present = False + # Instance attribute type: LinkSettings (validator is set below) + link_settings = bb.Attribute("link_settings", nullable=True, user_defined=True) + + # Instance attribute type: list of [FolderAction] (validator is set below) + actions = bb.Attribute("actions", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(UpdateFolderPolicyArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -16702,9 +10316,6 @@ def get_access_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UpdateFolderPolicyError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UpdateFolderPolicyError(%r, %r)' % (self._tag, self._value) - UpdateFolderPolicyError_validator = bv.Union(UpdateFolderPolicyError) class UserMembershipInfo(MembershipInfo): @@ -16717,7 +10328,6 @@ class UserMembershipInfo(MembershipInfo): __slots__ = [ '_user_value', - '_user_present', ] _has_required_fields = True @@ -16732,46 +10342,16 @@ def __init__(self, permissions, initials, is_inherited) - self._user_value = None - self._user_present = False + self._user_value = bb.NOT_SET 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 + # Instance attribute type: UserInfo (validator is set below) + user = bb.Attribute("user", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserMembershipInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -16787,9 +10367,7 @@ class UserFileMembershipInfo(UserMembershipInfo): __slots__ = [ '_time_last_seen_value', - '_time_last_seen_present', '_platform_type_value', - '_platform_type_present', ] _has_required_fields = True @@ -16807,90 +10385,30 @@ def __init__(self, permissions, initials, is_inherited) - self._time_last_seen_value = None - self._time_last_seen_present = False - self._platform_type_value = None - self._platform_type_present = False + self._time_last_seen_value = bb.NOT_SET + self._platform_type_value = bb.NOT_SET if time_last_seen is not None: self.time_last_seen = time_last_seen if platform_type is not None: self.platform_type = platform_type - @property - def time_last_seen(self): - """ - The UTC timestamp of when the user has last seen the content, if they - have. + # Instance attribute type: datetime.datetime (validator is set below) + time_last_seen = bb.Attribute("time_last_seen", nullable=True) - :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 - - @property - def platform_type(self): - """ - The platform on which the user has last seen the content, or unknown. - - :rtype: seen_state.PlatformType - """ - if self._platform_type_present: - return self._platform_type_value - else: - return None - - @platform_type.setter - def platform_type(self, val): - if val is None: - del self.platform_type - return - self._platform_type_validator.validate_type_only(val) - self._platform_type_value = val - self._platform_type_present = True - - @platform_type.deleter - def platform_type(self): - self._platform_type_value = None - self._platform_type_present = False + # Instance attribute type: seen_state.PlatformType (validator is set below) + platform_type = bb.Attribute("platform_type", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserFileMembershipInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UserFileMembershipInfo(access_type={!r}, user={!r}, permissions={!r}, initials={!r}, is_inherited={!r}, time_last_seen={!r}, platform_type={!r})'.format( - self._access_type_value, - self._user_value, - self._permissions_value, - self._initials_value, - self._is_inherited_value, - self._time_last_seen_value, - self._platform_type_value, - ) - UserFileMembershipInfo_validator = bv.Struct(UserFileMembershipInfo) class UserInfo(bb.Struct): """ 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. + :meth:`dropbox.dropbox_client.Dropbox.sharing_users_account` and + :meth:`dropbox.dropbox_client.Dropbox.sharing_users_account_batch` to obtain + more detailed information. :ivar sharing.UserInfo.account_id: The account ID of the user. :ivar sharing.UserInfo.email: Email address of user. @@ -16903,15 +10421,10 @@ class UserInfo(bb.Struct): __slots__ = [ '_account_id_value', - '_account_id_present', '_email_value', - '_email_present', '_display_name_value', - '_display_name_present', '_same_team_value', - '_same_team_present', '_team_member_id_value', - '_team_member_id_present', ] _has_required_fields = True @@ -16922,16 +10435,11 @@ def __init__(self, display_name=None, same_team=None, team_member_id=None): - self._account_id_value = None - self._account_id_present = False - self._email_value = None - self._email_present = False - self._display_name_value = None - self._display_name_present = False - self._same_team_value = None - self._same_team_present = False - self._team_member_id_value = None - self._team_member_id_present = False + self._account_id_value = bb.NOT_SET + self._email_value = bb.NOT_SET + self._display_name_value = bb.NOT_SET + self._same_team_value = bb.NOT_SET + self._team_member_id_value = bb.NOT_SET if account_id is not None: self.account_id = account_id if email is not None: @@ -16943,137 +10451,24 @@ def __init__(self, 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 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 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 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'") + # Instance attribute type: str (validator is set below) + account_id = bb.Attribute("account_id") - @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 + # Instance attribute type: str (validator is set below) + email = bb.Attribute("email") - @same_team.deleter - def same_team(self): - self._same_team_value = None - self._same_team_present = False + # Instance attribute type: str (validator is set below) + display_name = bb.Attribute("display_name") - @property - def team_member_id(self): - """ - The team member ID of the shared folder member. Only present if - ``same_team`` is true. + # Instance attribute type: bool (validator is set below) + same_team = bb.Attribute("same_team") - :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 + # Instance attribute type: str (validator is set below) + team_member_id = bb.Attribute("team_member_id", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UserInfo(account_id={!r}, email={!r}, display_name={!r}, same_team={!r}, team_member_id={!r})'.format( - self._account_id_value, - self._email_value, - self._display_name_value, - self._same_team_value, - self._team_member_id_value, - ) - UserInfo_validator = bv.Struct(UserInfo) class ViewerInfoPolicy(bb.Union): @@ -17123,9 +10518,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ViewerInfoPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ViewerInfoPolicy(%r, %r)' % (self._tag, self._value) - ViewerInfoPolicy_validator = bv.Union(ViewerInfoPolicy) class Visibility(bb.Union): @@ -17216,9 +10608,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(Visibility, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'Visibility(%r, %r)' % (self._tag, self._value) - Visibility_validator = bv.Union(Visibility) DropboxId_validator = bv.String(min_length=1) @@ -17276,12 +10665,12 @@ def __repr__(self): 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.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', @@ -17291,12 +10680,12 @@ def __repr__(self): '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), + ('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 @@ -17316,10 +10705,10 @@ def __repr__(self): 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.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', @@ -17327,10 +10716,10 @@ def __repr__(self): '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), + ('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 @@ -17375,15 +10764,15 @@ def __repr__(self): AddFolderMemberError.invalid_shared_folder = AddFolderMemberError('invalid_shared_folder') AddFolderMemberError.other = AddFolderMemberError('other') -AddMember._member_validator = MemberSelector_validator -AddMember._access_level_validator = AccessLevel_validator +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), + ('member', AddMember.member.validator), + ('access_level', AddMember.access_level.validator), ] AddMemberSelectorError._automatic_group_validator = bv.Void() @@ -17408,52 +10797,52 @@ def __repr__(self): AddMemberSelectorError.group_not_on_team = AddMemberSelectorError('group_not_on_team') AddMemberSelectorError.other = AddMemberSelectorError('other') -AudienceExceptionContentInfo._name_validator = bv.String() +AudienceExceptionContentInfo.name.validator = bv.String() AudienceExceptionContentInfo._all_field_names_ = set(['name']) -AudienceExceptionContentInfo._all_fields_ = [('name', AudienceExceptionContentInfo._name_validator)] +AudienceExceptionContentInfo._all_fields_ = [('name', AudienceExceptionContentInfo.name.validator)] -AudienceExceptions._count_validator = bv.UInt32() -AudienceExceptions._exceptions_validator = bv.List(AudienceExceptionContentInfo_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), + ('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.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), + ('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.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), + ('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.url.validator = bv.String() +LinkMetadata.visibility.validator = Visibility_validator +LinkMetadata.expires.validator = bv.Nullable(common.DropboxTimestamp_validator) LinkMetadata._field_names_ = set([ 'url', 'visibility', @@ -17461,9 +10850,9 @@ def __repr__(self): ]) LinkMetadata._all_field_names_ = LinkMetadata._field_names_ LinkMetadata._fields_ = [ - ('url', LinkMetadata._url_validator), - ('visibility', LinkMetadata._visibility_validator), - ('expires', LinkMetadata._expires_validator), + ('url', LinkMetadata.url.validator), + ('visibility', LinkMetadata.visibility.validator), + ('expires', LinkMetadata.expires.validator), ] LinkMetadata._all_fields_ = LinkMetadata._fields_ @@ -17482,18 +10871,18 @@ def __repr__(self): 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.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), + ('path', CreateSharedLinkArg.path.validator), + ('short_url', CreateSharedLinkArg.short_url.validator), + ('pending_upload', CreateSharedLinkArg.pending_upload.validator), ] CreateSharedLinkError._path_validator = files.LookupError_validator @@ -17505,15 +10894,15 @@ def __repr__(self): CreateSharedLinkError.other = CreateSharedLinkError('other') -CreateSharedLinkWithSettingsArg._path_validator = ReadPath_validator -CreateSharedLinkWithSettingsArg._settings_validator = bv.Nullable(SharedLinkSettings_validator) +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), + ('path', CreateSharedLinkWithSettingsArg.path.validator), + ('settings', CreateSharedLinkWithSettingsArg.settings.validator), ] CreateSharedLinkWithSettingsError._path_validator = files.LookupError_validator @@ -17532,13 +10921,13 @@ def __repr__(self): CreateSharedLinkWithSettingsError.email_not_verified = CreateSharedLinkWithSettingsError('email_not_verified') 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.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', @@ -17549,13 +10938,13 @@ def __repr__(self): '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), + ('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([])) @@ -17617,14 +11006,14 @@ def __repr__(self): 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.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', @@ -17637,14 +11026,14 @@ def __repr__(self): ]) 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), + ('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_ @@ -17658,10 +11047,10 @@ def __repr__(self): } 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.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', @@ -17670,10 +11059,10 @@ def __repr__(self): ]) 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), + ('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_ @@ -17701,15 +11090,15 @@ def __repr__(self): 'member_error': FileMemberActionIndividualResult._member_error_validator, } -FileMemberActionResult._member_validator = MemberSelector_validator -FileMemberActionResult._result_validator = FileMemberActionIndividualResult_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), + ('member', FileMemberActionResult.member.validator), + ('result', FileMemberActionResult.result.validator), ] FileMemberRemoveActionResult._success_validator = MemberAccessLevelResult_validator @@ -17723,18 +11112,18 @@ def __repr__(self): FileMemberRemoveActionResult.other = FileMemberRemoveActionResult('other') -FilePermission._action_validator = FileAction_validator -FilePermission._allow_validator = bv.Boolean() -FilePermission._reason_validator = bv.Nullable(PermissionDeniedReason_validator) +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), + ('action', FilePermission.action.validator), + ('allow', FilePermission.allow.validator), + ('reason', FilePermission.reason.validator), ] FolderAction._change_options_validator = bv.Void() @@ -17791,25 +11180,25 @@ def __repr__(self): 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.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), + ('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.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', @@ -17818,44 +11207,44 @@ def __repr__(self): '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), + ('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.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), + ('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.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), + ('files', GetFileMetadataBatchArg.files.validator), + ('actions', GetFileMetadataBatchArg.actions.validator), ] -GetFileMetadataBatchResult._file_validator = PathOrId_validator -GetFileMetadataBatchResult._result_validator = GetFileMetadataIndividualResult_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), + ('file', GetFileMetadataBatchResult.file.validator), + ('result', GetFileMetadataBatchResult.result.validator), ] GetFileMetadataError._user_error_validator = SharingUserError_validator @@ -17880,15 +11269,15 @@ def __repr__(self): GetFileMetadataIndividualResult.other = GetFileMetadataIndividualResult('other') -GetMetadataArgs._shared_folder_id_validator = common.SharedFolderId_validator -GetMetadataArgs._actions_validator = bv.Nullable(bv.List(FolderAction_validator)) +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), + ('shared_folder_id', GetMetadataArgs.shared_folder_id.validator), + ('actions', GetMetadataArgs.actions.validator), ] SharedLinkError._shared_link_not_found_validator = bv.Void() @@ -17915,23 +11304,23 @@ def __repr__(self): 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.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), + ('url', GetSharedLinkMetadataArg.url.validator), + ('path', GetSharedLinkMetadataArg.path.validator), + ('link_password', GetSharedLinkMetadataArg.link_password.validator), ] -GetSharedLinksArg._path_validator = bv.Nullable(bv.String()) +GetSharedLinksArg.path.validator = bv.Nullable(bv.String()) GetSharedLinksArg._all_field_names_ = set(['path']) -GetSharedLinksArg._all_fields_ = [('path', GetSharedLinksArg._path_validator)] +GetSharedLinksArg._all_fields_ = [('path', GetSharedLinksArg.path.validator)] GetSharedLinksError._path_validator = files.MalformedPathError_validator GetSharedLinksError._other_validator = bv.Void() @@ -17942,14 +11331,14 @@ def __repr__(self): GetSharedLinksError.other = GetSharedLinksError('other') -GetSharedLinksResult._links_validator = bv.List(LinkMetadata_validator) +GetSharedLinksResult.links.validator = bv.List(LinkMetadata_validator) GetSharedLinksResult._all_field_names_ = set(['links']) -GetSharedLinksResult._all_fields_ = [('links', GetSharedLinksResult._links_validator)] +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.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', @@ -17957,16 +11346,16 @@ def __repr__(self): '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), + ('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.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', @@ -17974,39 +11363,39 @@ def __repr__(self): '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), + ('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.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)] +GroupMembershipInfo._all_fields_ = MembershipInfo._all_fields_ + [('group', GroupMembershipInfo.group.validator)] -InsufficientPlan._message_validator = bv.String() -InsufficientPlan._upsell_url_validator = bv.Nullable(bv.String()) +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), + ('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.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), + ('space_needed', InsufficientQuotaAmounts.space_needed.validator), + ('space_shortage', InsufficientQuotaAmounts.space_shortage.validator), + ('space_left', InsufficientQuotaAmounts.space_left.validator), ] InviteeInfo._email_validator = common.EmailAddress_validator @@ -18018,15 +11407,15 @@ def __repr__(self): InviteeInfo.other = InviteeInfo('other') -InviteeMembershipInfo._invitee_validator = InviteeInfo_validator -InviteeMembershipInfo._user_validator = bv.Nullable(UserInfo_validator) +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), + ('invitee', InviteeMembershipInfo.invitee.validator), + ('user', InviteeMembershipInfo.user.validator), ] JobError._unshare_folder_error_validator = UnshareFolderError_validator @@ -18136,26 +11525,26 @@ def __repr__(self): 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.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), + ('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._effective_audience_validator = bv.Nullable(LinkAudience_validator) -LinkPermissions._link_access_level_validator = bv.Nullable(LinkAccessLevel_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.effective_audience.validator = bv.Nullable(LinkAudience_validator) +LinkPermissions.link_access_level.validator = bv.Nullable(LinkAccessLevel_validator) LinkPermissions._all_field_names_ = set([ 'resolved_visibility', 'requested_visibility', @@ -18165,18 +11554,18 @@ def __repr__(self): 'link_access_level', ]) 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), - ('effective_audience', LinkPermissions._effective_audience_validator), - ('link_access_level', LinkPermissions._link_access_level_validator), + ('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), + ('effective_audience', LinkPermissions.effective_audience.validator), + ('link_access_level', LinkPermissions.link_access_level.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.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', @@ -18184,16 +11573,16 @@ def __repr__(self): 'password', ]) LinkSettings._all_fields_ = [ - ('access_level', LinkSettings._access_level_validator), - ('audience', LinkSettings._audience_validator), - ('expiry', LinkSettings._expiry_validator), - ('password', LinkSettings._password_validator), + ('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.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', @@ -18201,37 +11590,37 @@ def __repr__(self): 'limit', ]) ListFileMembersArg._all_fields_ = [ - ('file', ListFileMembersArg._file_validator), - ('actions', ListFileMembersArg._actions_validator), - ('include_inherited', ListFileMembersArg._include_inherited_validator), - ('limit', ListFileMembersArg._limit_validator), + ('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.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), + ('files', ListFileMembersBatchArg.files.validator), + ('limit', ListFileMembersBatchArg.limit.validator), ] -ListFileMembersBatchResult._file_validator = PathOrId_validator -ListFileMembersBatchResult._result_validator = ListFileMembersIndividualResult_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), + ('file', ListFileMembersBatchResult.file.validator), + ('result', ListFileMembersBatchResult.result.validator), ] -ListFileMembersContinueArg._cursor_validator = bv.String() +ListFileMembersContinueArg.cursor.validator = bv.String() ListFileMembersContinueArg._all_field_names_ = set(['cursor']) -ListFileMembersContinueArg._all_fields_ = [('cursor', ListFileMembersContinueArg._cursor_validator)] +ListFileMembersContinueArg._all_fields_ = [('cursor', ListFileMembersContinueArg.cursor.validator)] ListFileMembersContinueError._user_error_validator = SharingUserError_validator ListFileMembersContinueError._access_error_validator = SharingFileAccessError_validator @@ -18247,15 +11636,15 @@ def __repr__(self): ListFileMembersContinueError.invalid_cursor = ListFileMembersContinueError('invalid_cursor') ListFileMembersContinueError.other = ListFileMembersContinueError('other') -ListFileMembersCountResult._members_validator = SharedFileMembers_validator -ListFileMembersCountResult._member_count_validator = bv.UInt32() +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), + ('members', ListFileMembersCountResult.members.validator), + ('member_count', ListFileMembersCountResult.member_count.validator), ] ListFileMembersError._user_error_validator = SharingUserError_validator @@ -18280,20 +11669,20 @@ def __repr__(self): 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.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), + ('limit', ListFilesArg.limit.validator), + ('actions', ListFilesArg.actions.validator), ] -ListFilesContinueArg._cursor_validator = bv.String() +ListFilesContinueArg.cursor.validator = bv.String() ListFilesContinueArg._all_field_names_ = set(['cursor']) -ListFilesContinueArg._all_fields_ = [('cursor', ListFilesContinueArg._cursor_validator)] +ListFilesContinueArg._all_fields_ = [('cursor', ListFilesContinueArg.cursor.validator)] ListFilesContinueError._user_error_validator = SharingUserError_validator ListFilesContinueError._invalid_cursor_validator = bv.Void() @@ -18307,35 +11696,35 @@ def __repr__(self): 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.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), + ('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.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), + ('actions', ListFolderMembersCursorArg.actions.validator), + ('limit', ListFolderMembersCursorArg.limit.validator), ] -ListFolderMembersArgs._shared_folder_id_validator = common.SharedFolderId_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)] +ListFolderMembersArgs._all_fields_ = ListFolderMembersCursorArg._all_fields_ + [('shared_folder_id', ListFolderMembersArgs.shared_folder_id.validator)] -ListFolderMembersContinueArg._cursor_validator = bv.String() +ListFolderMembersContinueArg.cursor.validator = bv.String() ListFolderMembersContinueArg._all_field_names_ = set(['cursor']) -ListFolderMembersContinueArg._all_fields_ = [('cursor', ListFolderMembersContinueArg._cursor_validator)] +ListFolderMembersContinueArg._all_fields_ = [('cursor', ListFolderMembersContinueArg.cursor.validator)] ListFolderMembersContinueError._access_error_validator = SharedFolderAccessError_validator ListFolderMembersContinueError._invalid_cursor_validator = bv.Void() @@ -18349,20 +11738,20 @@ def __repr__(self): 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.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), + ('limit', ListFoldersArgs.limit.validator), + ('actions', ListFoldersArgs.actions.validator), ] -ListFoldersContinueArg._cursor_validator = bv.String() +ListFoldersContinueArg.cursor.validator = bv.String() ListFoldersContinueArg._all_field_names_ = set(['cursor']) -ListFoldersContinueArg._all_fields_ = [('cursor', ListFoldersContinueArg._cursor_validator)] +ListFoldersContinueArg._all_fields_ = [('cursor', ListFoldersContinueArg.cursor.validator)] ListFoldersContinueError._invalid_cursor_validator = bv.Void() ListFoldersContinueError._other_validator = bv.Void() @@ -18374,29 +11763,29 @@ def __repr__(self): 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.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), + ('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.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), + ('path', ListSharedLinksArg.path.validator), + ('cursor', ListSharedLinksArg.cursor.validator), + ('direct_only', ListSharedLinksArg.direct_only.validator), ] ListSharedLinksError._path_validator = files.LookupError_validator @@ -18411,32 +11800,32 @@ def __repr__(self): 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.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), + ('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.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), + ('access_level', MemberAccessLevelResult.access_level.validator), + ('warning', MemberAccessLevelResult.warning.validator), + ('access_details', MemberAccessLevelResult.access_details.validator), ] MemberAction._leave_a_copy_validator = bv.Void() @@ -18464,18 +11853,18 @@ def __repr__(self): 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.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), + ('action', MemberPermission.action.validator), + ('allow', MemberPermission.allow.validator), + ('reason', MemberPermission.reason.validator), ] MemberPolicy._team_validator = bv.Void() @@ -18502,18 +11891,18 @@ def __repr__(self): MemberSelector.other = MemberSelector('other') -ModifySharedLinkSettingsArgs._url_validator = bv.String() -ModifySharedLinkSettingsArgs._settings_validator = SharedLinkSettings_validator -ModifySharedLinkSettingsArgs._remove_expiration_validator = bv.Boolean() +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), + ('url', ModifySharedLinkSettingsArgs.url.validator), + ('settings', ModifySharedLinkSettingsArgs.settings.validator), + ('remove_expiration', ModifySharedLinkSettingsArgs.remove_expiration.validator), ] ModifySharedLinkSettingsError._settings_error_validator = SharedLinkSettingsError_validator @@ -18526,9 +11915,9 @@ def __repr__(self): ModifySharedLinkSettingsError.email_not_verified = ModifySharedLinkSettingsError('email_not_verified') -MountFolderArg._shared_folder_id_validator = common.SharedFolderId_validator +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)] +MountFolderArg._all_fields_ = [('shared_folder_id', MountFolderArg.shared_folder_id.validator)] MountFolderError._access_error_validator = SharedFolderAccessError_validator MountFolderError._inside_shared_folder_validator = bv.Void() @@ -18553,10 +11942,10 @@ def __repr__(self): 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.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', @@ -18564,16 +11953,16 @@ def __repr__(self): '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), + ('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.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._fields_ = [('path', PathLinkMetadata.path.validator)] PathLinkMetadata._all_fields_ = LinkMetadata._all_fields_ + PathLinkMetadata._fields_ PendingUploadMode._file_validator = bv.Void() @@ -18637,9 +12026,9 @@ def __repr__(self): PermissionDeniedReason.restricted_by_parent_folder = PermissionDeniedReason('restricted_by_parent_folder') PermissionDeniedReason.other = PermissionDeniedReason('other') -RelinquishFileMembershipArg._file_validator = PathOrId_validator +RelinquishFileMembershipArg.file.validator = PathOrId_validator RelinquishFileMembershipArg._all_field_names_ = set(['file']) -RelinquishFileMembershipArg._all_fields_ = [('file', RelinquishFileMembershipArg._file_validator)] +RelinquishFileMembershipArg._all_fields_ = [('file', RelinquishFileMembershipArg.file.validator)] RelinquishFileMembershipError._access_error_validator = SharingFileAccessError_validator RelinquishFileMembershipError._group_access_validator = bv.Void() @@ -18656,15 +12045,15 @@ def __repr__(self): 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.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), + ('shared_folder_id', RelinquishFolderMembershipArg.shared_folder_id.validator), + ('leave_a_copy', RelinquishFolderMembershipArg.leave_a_copy.validator), ] RelinquishFolderMembershipError._access_error_validator = SharedFolderAccessError_validator @@ -18694,15 +12083,15 @@ def __repr__(self): RelinquishFolderMembershipError.no_explicit_access = RelinquishFolderMembershipError('no_explicit_access') RelinquishFolderMembershipError.other = RelinquishFolderMembershipError('other') -RemoveFileMemberArg._file_validator = PathOrId_validator -RemoveFileMemberArg._member_validator = MemberSelector_validator +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), + ('file', RemoveFileMemberArg.file.validator), + ('member', RemoveFileMemberArg.member.validator), ] RemoveFileMemberError._user_error_validator = SharingUserError_validator @@ -18718,18 +12107,18 @@ def __repr__(self): 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.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), + ('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 @@ -18809,9 +12198,9 @@ def __repr__(self): ResolvedVisibility.shared_folder_only = ResolvedVisibility('shared_folder_only') ResolvedVisibility.other = ResolvedVisibility('other') -RevokeSharedLinkArg._url_validator = bv.String() +RevokeSharedLinkArg.url.validator = bv.String() RevokeSharedLinkArg._all_field_names_ = set(['url']) -RevokeSharedLinkArg._all_fields_ = [('url', RevokeSharedLinkArg._url_validator)] +RevokeSharedLinkArg._all_fields_ = [('url', RevokeSharedLinkArg.url.validator)] RevokeSharedLinkError._shared_link_malformed_validator = bv.Void() RevokeSharedLinkError._tagmap = { @@ -18821,15 +12210,15 @@ def __repr__(self): RevokeSharedLinkError.shared_link_malformed = RevokeSharedLinkError('shared_link_malformed') -SetAccessInheritanceArg._access_inheritance_validator = AccessInheritance_validator -SetAccessInheritanceArg._shared_folder_id_validator = common.SharedFolderId_validator +SetAccessInheritanceArg.access_inheritance.validator = AccessInheritance_validator +SetAccessInheritanceArg.shared_folder_id.validator = common.SharedFolderId_validator SetAccessInheritanceArg._all_field_names_ = set([ 'access_inheritance', 'shared_folder_id', ]) SetAccessInheritanceArg._all_fields_ = [ - ('access_inheritance', SetAccessInheritanceArg._access_inheritance_validator), - ('shared_folder_id', SetAccessInheritanceArg._shared_folder_id_validator), + ('access_inheritance', SetAccessInheritanceArg.access_inheritance.validator), + ('shared_folder_id', SetAccessInheritanceArg.shared_folder_id.validator), ] SetAccessInheritanceError._access_error_validator = SharedFolderAccessError_validator @@ -18844,13 +12233,13 @@ def __repr__(self): SetAccessInheritanceError.no_permission = SetAccessInheritanceError('no_permission') SetAccessInheritanceError.other = SetAccessInheritanceError('other') -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._access_inheritance_validator = AccessInheritance_validator +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.access_inheritance.validator = AccessInheritance_validator ShareFolderArgBase._all_field_names_ = set([ 'acl_update_policy', 'force_async', @@ -18861,24 +12250,24 @@ def __repr__(self): 'access_inheritance', ]) 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), - ('access_inheritance', ShareFolderArgBase._access_inheritance_validator), + ('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), + ('access_inheritance', ShareFolderArgBase.access_inheritance.validator), ] -ShareFolderArg._actions_validator = bv.Nullable(bv.List(FolderAction_validator)) -ShareFolderArg._link_settings_validator = bv.Nullable(LinkSettings_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), + ('actions', ShareFolderArg.actions.validator), + ('link_settings', ShareFolderArg.link_settings.validator), ] ShareFolderErrorBase._email_unverified_validator = bv.Void() @@ -18972,21 +12361,21 @@ def __repr__(self): SharePathError.is_family = SharePathError('is_family') SharePathError.other = SharePathError('other') -SharedContentLinkMetadata._audience_exceptions_validator = bv.Nullable(AudienceExceptions_validator) -SharedContentLinkMetadata._url_validator = bv.String() +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), + ('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.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', @@ -18994,26 +12383,26 @@ def __repr__(self): 'cursor', ]) SharedFileMembers._all_fields_ = [ - ('users', SharedFileMembers._users_validator), - ('groups', SharedFileMembers._groups_validator), - ('invitees', SharedFileMembers._invitees_validator), - ('cursor', SharedFileMembers._cursor_validator), + ('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 = files.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.access_type.validator = bv.Nullable(AccessLevel_validator) +SharedFileMetadata.id.validator = files.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', @@ -19031,20 +12420,20 @@ def __repr__(self): '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), + ('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() @@ -19081,10 +12470,10 @@ def __repr__(self): 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.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', @@ -19092,20 +12481,20 @@ def __repr__(self): 'cursor', ]) SharedFolderMembers._all_fields_ = [ - ('users', SharedFolderMembers._users_validator), - ('groups', SharedFolderMembers._groups_validator), - ('invitees', SharedFolderMembers._invitees_validator), - ('cursor', SharedFolderMembers._cursor_validator), + ('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._parent_folder_name_validator = bv.Nullable(bv.String()) +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.parent_folder_name.validator = bv.Nullable(bv.String()) SharedFolderMetadataBase._all_field_names_ = set([ 'access_type', 'is_inside_team_folder', @@ -19117,24 +12506,24 @@ def __repr__(self): 'parent_folder_name', ]) 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), - ('parent_folder_name', SharedFolderMetadataBase._parent_folder_name_validator), + ('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), + ('parent_folder_name', SharedFolderMetadataBase.parent_folder_name.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._access_inheritance_validator = AccessInheritance_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.access_inheritance.validator = AccessInheritance_validator SharedFolderMetadata._all_field_names_ = SharedFolderMetadataBase._all_field_names_.union(set([ 'link_metadata', 'name', @@ -19146,14 +12535,14 @@ def __repr__(self): 'access_inheritance', ])) 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), - ('access_inheritance', SharedFolderMetadata._access_inheritance_validator), + ('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), + ('access_inheritance', SharedFolderMetadata.access_inheritance.validator), ] SharedLinkAccessFailureReason._login_required_validator = bv.Void() @@ -19203,11 +12592,11 @@ def __repr__(self): 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._audience_validator = bv.Nullable(LinkAudience_validator) -SharedLinkSettings._access_validator = bv.Nullable(RequestedLinkAccessLevel_validator) +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.audience.validator = bv.Nullable(LinkAudience_validator) +SharedLinkSettings.access.validator = bv.Nullable(RequestedLinkAccessLevel_validator) SharedLinkSettings._all_field_names_ = set([ 'requested_visibility', 'link_password', @@ -19216,11 +12605,11 @@ def __repr__(self): 'access', ]) SharedLinkSettings._all_fields_ = [ - ('requested_visibility', SharedLinkSettings._requested_visibility_validator), - ('link_password', SharedLinkSettings._link_password_validator), - ('expires', SharedLinkSettings._expires_validator), - ('audience', SharedLinkSettings._audience_validator), - ('access', SharedLinkSettings._access_validator), + ('requested_visibility', SharedLinkSettings.requested_visibility.validator), + ('link_password', SharedLinkSettings.link_password.validator), + ('expires', SharedLinkSettings.expires.validator), + ('audience', SharedLinkSettings.audience.validator), + ('access', SharedLinkSettings.access.validator), ] SharedLinkSettingsError._invalid_settings_validator = bv.Void() @@ -19265,29 +12654,29 @@ def __repr__(self): 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.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), + ('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.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), + ('shared_folder_id', TransferFolderArg.shared_folder_id.validator), + ('to_dropbox_id', TransferFolderArg.to_dropbox_id.validator), ] TransferFolderError._access_error_validator = SharedFolderAccessError_validator @@ -19317,9 +12706,9 @@ def __repr__(self): TransferFolderError.no_permission = TransferFolderError('no_permission') TransferFolderError.other = TransferFolderError('other') -UnmountFolderArg._shared_folder_id_validator = common.SharedFolderId_validator +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)] +UnmountFolderArg._all_fields_ = [('shared_folder_id', UnmountFolderArg.shared_folder_id.validator)] UnmountFolderError._access_error_validator = SharedFolderAccessError_validator UnmountFolderError._no_permission_validator = bv.Void() @@ -19336,9 +12725,9 @@ def __repr__(self): UnmountFolderError.not_unmountable = UnmountFolderError('not_unmountable') UnmountFolderError.other = UnmountFolderError('other') -UnshareFileArg._file_validator = PathOrId_validator +UnshareFileArg.file.validator = PathOrId_validator UnshareFileArg._all_field_names_ = set(['file']) -UnshareFileArg._all_fields_ = [('file', UnshareFileArg._file_validator)] +UnshareFileArg._all_fields_ = [('file', UnshareFileArg.file.validator)] UnshareFileError._user_error_validator = SharingUserError_validator UnshareFileError._access_error_validator = SharingFileAccessError_validator @@ -19351,15 +12740,15 @@ def __repr__(self): UnshareFileError.other = UnshareFileError('other') -UnshareFolderArg._shared_folder_id_validator = common.SharedFolderId_validator -UnshareFolderArg._leave_a_copy_validator = bv.Boolean() +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), + ('shared_folder_id', UnshareFolderArg.shared_folder_id.validator), + ('leave_a_copy', UnshareFolderArg.leave_a_copy.validator), ] UnshareFolderError._access_error_validator = SharedFolderAccessError_validator @@ -19383,18 +12772,18 @@ def __repr__(self): 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.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), + ('shared_folder_id', UpdateFolderMemberArg.shared_folder_id.validator), + ('member', UpdateFolderMemberArg.member.validator), + ('access_level', UpdateFolderMemberArg.access_level.validator), ] UpdateFolderMemberError._access_error_validator = SharedFolderAccessError_validator @@ -19416,13 +12805,13 @@ def __repr__(self): 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.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', @@ -19433,13 +12822,13 @@ def __repr__(self): '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), + ('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 @@ -19466,26 +12855,26 @@ def __repr__(self): UpdateFolderPolicyError.team_folder = UpdateFolderPolicyError('team_folder') UpdateFolderPolicyError.other = UpdateFolderPolicyError('other') -UserMembershipInfo._user_validator = UserInfo_validator +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)] +UserMembershipInfo._all_fields_ = MembershipInfo._all_fields_ + [('user', UserMembershipInfo.user.validator)] -UserFileMembershipInfo._time_last_seen_validator = bv.Nullable(common.DropboxTimestamp_validator) -UserFileMembershipInfo._platform_type_validator = bv.Nullable(seen_state.PlatformType_validator) +UserFileMembershipInfo.time_last_seen.validator = bv.Nullable(common.DropboxTimestamp_validator) +UserFileMembershipInfo.platform_type.validator = bv.Nullable(seen_state.PlatformType_validator) UserFileMembershipInfo._all_field_names_ = UserMembershipInfo._all_field_names_.union(set([ 'time_last_seen', 'platform_type', ])) UserFileMembershipInfo._all_fields_ = UserMembershipInfo._all_fields_ + [ - ('time_last_seen', UserFileMembershipInfo._time_last_seen_validator), - ('platform_type', UserFileMembershipInfo._platform_type_validator), + ('time_last_seen', UserFileMembershipInfo.time_last_seen.validator), + ('platform_type', UserFileMembershipInfo.platform_type.validator), ] -UserInfo._account_id_validator = users_common.AccountId_validator -UserInfo._email_validator = bv.String() -UserInfo._display_name_validator = bv.String() -UserInfo._same_team_validator = bv.Boolean() -UserInfo._team_member_id_validator = bv.Nullable(bv.String()) +UserInfo.account_id.validator = users_common.AccountId_validator +UserInfo.email.validator = bv.String() +UserInfo.display_name.validator = bv.String() +UserInfo.same_team.validator = bv.Boolean() +UserInfo.team_member_id.validator = bv.Nullable(bv.String()) UserInfo._all_field_names_ = set([ 'account_id', 'email', @@ -19494,11 +12883,11 @@ def __repr__(self): 'team_member_id', ]) UserInfo._all_fields_ = [ - ('account_id', UserInfo._account_id_validator), - ('email', UserInfo._email_validator), - ('display_name', UserInfo._display_name_validator), - ('same_team', UserInfo._same_team_validator), - ('team_member_id', UserInfo._team_member_id_validator), + ('account_id', UserInfo.account_id.validator), + ('email', UserInfo.email.validator), + ('display_name', UserInfo.display_name.validator), + ('same_team', UserInfo.same_team.validator), + ('team_member_id', UserInfo.team_member_id.validator), ] ViewerInfoPolicy._enabled_validator = bv.Void() @@ -19536,6 +12925,26 @@ def __repr__(self): Visibility.shared_folder_only = Visibility('shared_folder_only') Visibility.other = Visibility('other') +AddFileMemberArgs.quiet.default = False +AddFileMemberArgs.access_level.default = AccessLevel.viewer +AddFileMemberArgs.add_message_as_comment.default = False +AddFolderMemberArg.quiet.default = False +AddMember.access_level.default = AccessLevel.viewer +CreateSharedLinkArg.short_url.default = False +MembershipInfo.is_inherited.default = False +ListFileMembersArg.include_inherited.default = True +ListFileMembersArg.limit.default = 100 +ListFileMembersBatchArg.limit.default = 10 +ListFilesArg.limit.default = 100 +ListFolderMembersCursorArg.limit.default = 1000 +ListFoldersArgs.limit.default = 1000 +ModifySharedLinkSettingsArgs.remove_expiration.default = False +RelinquishFolderMembershipArg.leave_a_copy.default = False +SetAccessInheritanceArg.access_inheritance.default = AccessInheritance.inherit +ShareFolderArgBase.force_async.default = False +ShareFolderArgBase.access_inheritance.default = AccessInheritance.inherit +SharedFolderMetadata.access_inheritance.default = AccessInheritance.inherit +UnshareFolderArg.leave_a_copy.default = False add_file_member = bb.Route( 'add_file_member', 1, diff --git a/dropbox/stone_base.py b/dropbox/stone_base.py index ed6d81c0..b912eebd 100644 --- a/dropbox/stone_base.py +++ b/dropbox/stone_base.py @@ -1,176 +1 @@ -""" -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 - -import functools - -try: - from . import stone_validators as bv -except (ImportError, 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 AnnotationType(object): - # This is a base class for all annotation types. - pass - -if _MYPY: - T = typing.TypeVar('T', bound=AnnotationType) - U = typing.TypeVar('U') - -class Struct(object): - # This is a base class for all classes representing Stone structs. - - _all_field_names_ = set() # type: typing.Set[str] - - def __eq__(self, other): - # type: (object) -> bool - if not isinstance(other, Struct): - return False - - if self._all_field_names_ != other._all_field_names_: - return False - - if not isinstance(other, self.__class__) and not isinstance(self, other.__class__): - return False - - for field_name in self._all_field_names_: - if getattr(self, field_name) != getattr(other, field_name): - return False - - return True - - def __ne__(self, other): - # type: (object) -> bool - return not self == other - - def _process_custom_annotations(self, annotation_type, field_path, processor): - # type: (typing.Type[T], typing.Text, typing.Callable[[T, U], U]) -> None - pass - -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[str, bv.Validator] - _permissioned_tagmaps = set() # type: typing.Set[typing.Text] - - def __init__(self, tag, value=None): - validator = None - tagmap_names = ['_{}_tagmap'.format(map_name) for map_name in self._permissioned_tagmaps] - for tagmap_name in ['_tagmap'] + tagmap_names: - if tag in getattr(self, tagmap_name): - validator = getattr(self, tagmap_name)[tag] - assert validator is not None, 'Invalid tag %r.' % 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)) - - def _process_custom_annotations(self, annotation_type, field_path, processor): - # type: (typing.Type[T], typing.Text, typing.Callable[[T, U], U]) -> None - pass - - @classmethod - def _is_tag_present(cls, tag, caller_permissions): - assert tag is not None, 'tag value should not be None' - - if tag in cls._tagmap: - return True - - for extra_permission in caller_permissions.permissions: - tagmap_name = '_{}_tagmap'.format(extra_permission) - if hasattr(cls, tagmap_name) and tag in getattr(cls, tagmap_name): - return True - - return False - - @classmethod - def _get_val_data_type(cls, tag, caller_permissions): - assert tag is not None, 'tag value should not be None' - - for extra_permission in caller_permissions.permissions: - tagmap_name = '_{}_tagmap'.format(extra_permission) - if hasattr(cls, tagmap_name) and tag in getattr(cls, tagmap_name): - return getattr(cls, tagmap_name)[tag] - - return cls._tagmap[tag] - -class Route(object): - - def __init__(self, name, version, deprecated, arg_type, result_type, error_type, attrs): - self.name = name - self.version = version - 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}, {!r})'.format( - self.name, - self.version, - self.deprecated, - self.arg_type, - self.result_type, - self.error_type, - self.attrs) - -# helper functions used when constructing custom annotation processors - -# put this here so that every other file doesn't need to import functools -partially_apply = functools.partial - -def make_struct_annotation_processor(annotation_type, processor): - def g(field_path, struct): - if struct is None: - return struct - struct._process_custom_annotations(annotation_type, field_path, processor) - return struct - return g - -def make_list_annotation_processor(processor): - def g(field_path, list_): - if list_ is None: - return list_ - return [processor('{}[{}]'.format(field_path, idx), x) for idx, x in enumerate(list_)] - return g - -def make_map_value_annotation_processor(processor): - def g(field_path, map_): - if map_ is None: - return map_ - return {k: processor('{}[{}]'.format(field_path, repr(k)), v) for k, v in map_.items()} - return g +from stone.backends.python_rsrc.stone_base import * diff --git a/dropbox/stone_serializers.py b/dropbox/stone_serializers.py index dafc901f..669b985d 100644 --- a/dropbox/stone_serializers.py +++ b/dropbox/stone_serializers.py @@ -1,1076 +1 @@ -""" -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 binascii -import collections -import datetime -import functools -import json -import re -import time - -import six - -try: - from . import stone_base as bb # noqa: F401 # pylint: disable=unused-import - from . import stone_validators as bv -except (ImportError, 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 CallerPermissionsInterface(object): - - @property - def permissions(self): - """ - Returns the list of permissions this caller has access to. - """ - raise NotImplementedError - - -class CallerPermissionsDefault(CallerPermissionsInterface): - - @property - def permissions(self): - return [] - -# ------------------------------------------------------------------------ -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, caller_permissions, alias_validators): - # type: (CallerPermissionsInterface, typing.Mapping[bv.Validator, typing.Callable[[typing.Any], None]]) -> None # noqa: E501 - """ - Constructor, `obviously - `. - - Args: - caller_permissions (list): The list of raw-string caller permissions with which - to serialize. - 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.caller_permissions = (caller_permissions if - caller_permissions else CallerPermissionsDefault()) - 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 # type: typing.Callable[[typing.Any], None] - encode_f = self.encode_list # type: typing.Callable[[typing.Any, typing.Any], typing.Any] # noqa: E501 - 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): - if self.caller_permissions.permissions: - def validate_with_permissions(val): - validator.validate_with_permissions(val, self.caller_permissions) - - validate_f = validate_with_permissions - else: - validate_f = validator.validate - encode_f = self.encode_struct_tree - else: - # Fields are already validated on assignment - if self.caller_permissions.permissions: - def validate_with_permissions(val): - validator.validate_with_permissions(val, self.caller_permissions) - - validate_f = validate_with_permissions - else: - 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, caller_permissions, alias_validators, for_msgpack, old_style, should_redact): - # type: (CallerPermissionsInterface, typing.Mapping[bv.Validator, typing.Callable[[typing.Any], None]], bool, 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``. - should_redact (bool, optional): Whether to perform redaction on - marked fields. Defaults to ``False``. - """ - super(StoneToPythonPrimitiveSerializer, self).__init__( - caller_permissions, alias_validators=alias_validators) - self._for_msgpack = for_msgpack - self._old_style = old_style - self.should_redact = should_redact - - @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_sub(self, validator, value): - if self.should_redact and hasattr(validator, '_redact'): - if isinstance(value, list): - return [validator._redact.apply(v) for v in value] - elif isinstance(value, dict): - return {k: validator._redact.apply(v) for k, v in value.items()} - else: - return validator._redact.apply(value) - - # Encode value normally - return super(StoneToPythonPrimitiveSerializer, self).encode_sub(validator, value) - - 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] - - all_fields = validator.definition._all_fields_ - - for extra_permission in self.caller_permissions.permissions: - all_fields_name = '_all_{}_fields_'.format(extra_permission) - all_fields = all_fields + getattr(validator.definition, all_fields_name, []) - - for field_name, field_validator in 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') - - if not validator.definition._is_tag_present(value._tag, self.caller_permissions): - raise bv.ValidationError( - "caller does not have access to '{}' tag".format(value._tag)) - - field_validator = validator.definition._get_val_data_type(value._tag, - self.caller_permissions) - - 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, caller_permissions=None, alias_validators=None, old_style=False, - should_redact=False): - """Encodes an object into JSON based on its type. - - Args: - data_type (Validator): Validator for obj. - obj (object): Object to be serialized. - caller_permissions (list): The list of raw-string caller permissions with which - to serialize. - 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( - caller_permissions, alias_validators, for_msgpack, old_style, should_redact) - return serializer.encode(data_type, obj) - -def json_compat_obj_encode(data_type, obj, caller_permissions=None, alias_validators=None, - old_style=False, for_msgpack=False, should_redact=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. - caller_permissions (list): The list of raw-string caller permissions - with which to serialize. - - 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( - caller_permissions, alias_validators, for_msgpack, old_style, should_redact) - return serializer.encode(data_type, obj) - -# -------------------------------------------------------------- -# JSON Decoder -class PythonPrimitiveToStoneDecoder(object): - def __init__(self, caller_permissions, alias_validators, for_msgpack, old_style, strict): - self.caller_permissions = (caller_permissions if - caller_permissions else CallerPermissionsDefault()) - self.alias_validators = alias_validators - self.strict = strict - self._old_style = old_style - self._for_msgpack = for_msgpack - - @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 json_compat_obj_decode_helper(self, data_type, obj): - """ - See json_compat_obj_decode() for argument descriptions. - """ - if isinstance(data_type, bv.StructTree): - return self.decode_struct_tree(data_type, obj) - elif isinstance(data_type, bv.Struct): - return self.decode_struct(data_type, obj) - elif isinstance(data_type, bv.Union): - if self.old_style: - return self.decode_union_old(data_type, obj) - else: - return self.decode_union(data_type, obj) - elif isinstance(data_type, bv.List): - return self.decode_list( - data_type, obj) - elif isinstance(data_type, bv.Map): - return self.decode_map( - data_type, obj) - elif isinstance(data_type, bv.Nullable): - return self.decode_nullable( - data_type, obj) - 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 self.make_stone_friendly(data_type, obj, False) - else: - raise AssertionError('Cannot handle type %r.' % data_type) - - def decode_struct(self, data_type, obj): - """ - 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)) - all_fields = data_type.definition._all_fields_ - for extra_permission in self.caller_permissions.permissions: - all_extra_fields = '_all_{}_fields_'.format(extra_permission) - all_fields = all_fields + getattr(data_type.definition, all_extra_fields, []) - - if self.strict: - all_field_names = data_type.definition._all_field_names_ - for extra_permission in self.caller_permissions.permissions: - all_extra_field_names = '_all_{}_field_names_'.format(extra_permission) - all_field_names = all_field_names.union( - getattr(data_type.definition, all_extra_field_names, {})) - - for key in obj: - if (key not in all_field_names and - not key.startswith('.tag')): - raise bv.ValidationError("unknown field '%s'" % key) - ins = data_type.definition() - self.decode_struct_fields(ins, all_fields, obj) - # Check that all required fields have been set. - data_type.validate_fields_only_with_permissions(ins, self.caller_permissions) - return ins - - def decode_struct_fields(self, ins, fields, obj): - """ - 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 = self.json_compat_obj_decode_helper(field_data_type, obj[name]) - 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(self, data_type, obj): - """ - 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 data_type.definition._is_tag_present(tag, self.caller_permissions): - val_data_type = data_type.definition._get_val_data_type( - tag, self.caller_permissions) - 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) - elif not self.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 = self.decode_union_dict(data_type, obj) - else: - raise bv.ValidationError("expected string or object, got %s" % - bv.generic_type_name(obj)) - return data_type.definition(six.ensure_str(tag), val) - - def decode_union_dict(self, data_type, obj): - 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 not data_type.definition._is_tag_present(tag, self.caller_permissions): - if not self.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._get_val_data_type(tag, self.caller_permissions) - 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 self.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 = self.json_compat_obj_decode_helper(val_data_type, raw_val) - 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 = self.json_compat_obj_decode_helper(val_data_type, raw_val) - except bv.ValidationError as e: - e.add_parent(tag) - raise - else: - assert False, type(val_data_type) - return tag, val - - def decode_union_old(self, data_type, obj): - """ - 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 data_type.definition._is_tag_present(tag, self.caller_permissions): - val_data_type = data_type.definition._get_val_data_type(tag, - self.caller_permissions) - if not isinstance(val_data_type, (bv.Void, bv.Nullable)): - raise bv.ValidationError( - "expected object for '%s', got symbol" % tag) - else: - if not self.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 data_type.definition._is_tag_present(tag, self.caller_permissions): - val_data_type = data_type.definition._get_val_data_type(tag, - self.caller_permissions) - 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 self.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 = self.json_compat_obj_decode_helper(val_data_type, raw_val) - except bv.ValidationError as e: - e.add_parent(tag) - raise - else: - if not self.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(six.ensure_str(tag), val) - - def decode_struct_tree(self, data_type, obj): - """ - The data_type argument must be a StructTree. - See json_compat_obj_decode() for argument descriptions. - """ - subtype = self.determine_struct_tree_subtype(data_type, obj) - return self.decode_struct(subtype, obj) - - def determine_struct_tree_subtype(self, data_type, obj): - """ - 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 self.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(self, data_type, obj): - """ - 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 [ - self.json_compat_obj_decode_helper(data_type.item_validator, item) - for item in obj] - - def decode_map(self, data_type, obj): - """ - 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 { - self.json_compat_obj_decode_helper(data_type.key_validator, key): - self.json_compat_obj_decode_helper(data_type.value_validator, value) - for key, value in obj.items() - } - - def decode_nullable(self, data_type, obj): - """ - The data_type argument must be a Nullable. - See json_compat_obj_decode() for argument descriptions. - """ - if obj is not None: - return self.json_compat_obj_decode_helper(data_type.validator, obj) - else: - return None - - def make_stone_friendly(self, data_type, val, validate): - """ - 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. - """ - if isinstance(data_type, bv.Timestamp): - try: - ret = datetime.datetime.strptime(val, data_type.format) - except (TypeError, ValueError) as e: - raise bv.ValidationError(e.args[0]) - elif isinstance(data_type, bv.Bytes): - if self.for_msgpack: - if isinstance(val, six.text_type): - ret = val.encode('utf-8') - else: - ret = val - else: - try: - ret = base64.b64decode(val) - except (TypeError, binascii.Error): - raise bv.ValidationError('invalid base64-encoded bytes') - elif isinstance(data_type, bv.Void): - if self.strict and val is not None: - raise bv.ValidationError("expected null, got value") - return None - else: - if validate: - if self.caller_permissions.permissions: - data_type.validate_with_permissions(val, self.caller_permissions) - else: - data_type.validate(val) - ret = val - if self.alias_validators is not None and data_type in self.alias_validators: - self.alias_validators[data_type](ret) - return ret - -def json_decode(data_type, serialized_obj, caller_permissions=None, - 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. - caller_permissions (list): The list of raw-string caller permissions - with which to serialize. - 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, caller_permissions=caller_permissions, - alias_validators=alias_validators, strict=strict, old_style=old_style) - - -def json_compat_obj_decode(data_type, obj, caller_permissions=None, - 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. - caller_permissions (list): The list of raw-string caller permissions - with which to serialize. - 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(). - """ - decoder = PythonPrimitiveToStoneDecoder(caller_permissions, - alias_validators, for_msgpack, old_style, strict) - - if isinstance(data_type, bv.Primitive): - return decoder.make_stone_friendly( - data_type, obj, True) - else: - return decoder.json_compat_obj_decode_helper( - data_type, obj) - -# 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) +from stone.backends.python_rsrc.stone_serializers import * diff --git a/dropbox/stone_validators.py b/dropbox/stone_validators.py index 2f0f3492..2f41d57d 100644 --- a/dropbox/stone_validators.py +++ b/dropbox/stone_validators.py @@ -1,669 +1 @@ -""" -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 - -import datetime -import hashlib -import math -import numbers -import re - -from abc import ABCMeta, abstractmethod - -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, bool): - # Must come before any numbers checks since booleans are integers too - return 'boolean' - elif 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(six.with_metaclass(ABCMeta, object)): - """All primitive and composite data types should be a subclass of this.""" - - @abstractmethod - def validate(self, val): - """Validates that val is of this data type. - - Returns: A normalized value if validation succeeds. - Raises: ValidationError - """ - - def has_default(self): - return False - - def get_default(self): - raise AssertionError('No default available.') - - -class Primitive(Validator): # pylint: disable=abstract-method - """A basic type that is defined by Stone.""" - - -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): # pylint: disable=abstract-method - """Validator for a type that builds on other primitive and composite - types.""" - - -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_with_permissions(self, val, caller_permissions): - """ - For a val to pass validation, val must be of the correct type and have - all required permissioned fields present. Should only be called - for callers with extra permissions. - """ - self.validate(val) - self.validate_fields_only_with_permissions(val, caller_permissions) - 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_field_names_: - if not hasattr(val, field_name): - raise ValidationError("missing required field '%s'" % - field_name) - - def validate_fields_only_with_permissions(self, val, caller_permissions): - """ - 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. - Should only be called for callers with extra permissions. - """ - self.validate_fields_only(val) - - # check if type has been patched - for extra_permission in caller_permissions.permissions: - all_field_names = '_all_{}_field_names_'.format(extra_permission) - for field_name in getattr(self.definition, all_field_names, set()): - 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): - super(Nullable, self).__init__() - 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 - -class Redactor(object): - def __init__(self, regex): - """ - Args: - regex: What parts of the field to redact. - """ - self.regex = regex - - @abstractmethod - def apply(self, val): - """Redacts information from annotated field. - Returns: A redacted version of the string provided. - """ - - def _get_matches(self, val): - if not self.regex: - return None - try: - return re.search(self.regex, val) - except TypeError: - return None - - -class HashRedactor(Redactor): - def apply(self, val): - matches = self._get_matches(val) - - val_to_hash = str(val) if isinstance(val, int) or isinstance(val, float) else val - - try: - # add string literal to ensure unicode - hashed = hashlib.md5(val_to_hash.encode('utf-8')).hexdigest() + '' - except [AttributeError, ValueError]: - hashed = None - - if matches: - blotted = '***'.join(matches.groups()) - if hashed: - return '{} ({})'.format(hashed, blotted) - return blotted - return hashed - - -class BlotRedactor(Redactor): - def apply(self, val): - matches = self._get_matches(val) - if matches: - return '***'.join(matches.groups()) - return '********' +from stone.backends.python_rsrc.stone_validators import * diff --git a/dropbox/team.py b/dropbox/team.py index 27a986ec..864cf163 100644 --- a/dropbox/team.py +++ b/dropbox/team.py @@ -3,39 +3,20 @@ # @generated # flake8: noqa # pylint: skip-file -try: - from . import stone_validators as bv - from . import stone_base as bb -except (ImportError, 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 ( - account, - async_, - common, - file_properties, - files, - secondary_emails, - team_common, - team_policies, - users, - users_common, - ) -except (ImportError, SystemError, ValueError): - import account - import async_ - import common - import file_properties - import files - import secondary_emails - import team_common - import team_policies - import users - import users_common +from __future__ import unicode_literals +from stone.backends.python_rsrc import stone_base as bb +from stone.backends.python_rsrc import stone_validators as bv + +from dropbox import account +from dropbox import async_ +from dropbox import common +from dropbox import file_properties +from dropbox import files +from dropbox import secondary_emails +from dropbox import team_common +from dropbox import team_policies +from dropbox import users +from dropbox import users_common class DeviceSession(bb.Struct): """ @@ -51,15 +32,10 @@ class DeviceSession(bb.Struct): __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 @@ -70,16 +46,11 @@ def __init__(self, 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 + self._session_id_value = bb.NOT_SET + self._ip_address_value = bb.NOT_SET + self._country_value = bb.NOT_SET + self._created_value = bb.NOT_SET + self._updated_value = bb.NOT_SET if session_id is not None: self.session_id = session_id if ip_address is not None: @@ -91,145 +62,24 @@ def __init__(self, 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. + # Instance attribute type: str (validator is set below) + session_id = bb.Attribute("session_id") - :rtype: str - """ - if self._ip_address_present: - return self._ip_address_value - else: - return None + # Instance attribute type: str (validator is set below) + ip_address = bb.Attribute("ip_address", nullable=True) - @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 + # Instance attribute type: str (validator is set below) + country = bb.Attribute("country", nullable=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. + # Instance attribute type: datetime.datetime (validator is set below) + created = bb.Attribute("created", nullable=True) - :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 + # Instance attribute type: datetime.datetime (validator is set below) + updated = bb.Attribute("updated", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceSession, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -245,13 +95,9 @@ class ActiveWebSession(DeviceSession): __slots__ = [ '_user_agent_value', - '_user_agent_present', '_os_value', - '_os_present', '_browser_value', - '_browser_present', '_expires_value', - '_expires_present', ] _has_required_fields = True @@ -271,14 +117,10 @@ def __init__(self, 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 + self._user_agent_value = bb.NOT_SET + self._os_value = bb.NOT_SET + self._browser_value = bb.NOT_SET + self._expires_value = bb.NOT_SET if user_agent is not None: self.user_agent = user_agent if os is not None: @@ -288,117 +130,21 @@ def __init__(self, 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. + # Instance attribute type: str (validator is set below) + user_agent = bb.Attribute("user_agent") - :rtype: datetime.datetime - """ - if self._expires_present: - return self._expires_value - else: - return None + # Instance attribute type: str (validator is set below) + os = bb.Attribute("os") - @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 + # Instance attribute type: str (validator is set below) + browser = bb.Attribute("browser") - @expires.deleter - def expires(self): - self._expires_value = None - self._expires_present = False + # Instance attribute type: datetime.datetime (validator is set below) + expires = bb.Attribute("expires", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ActiveWebSession, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 AddSecondaryEmailResult(bb.Union): @@ -727,9 +473,6 @@ def get_rate_limited(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AddSecondaryEmailResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AddSecondaryEmailResult(%r, %r)' % (self._tag, self._value) - AddSecondaryEmailResult_validator = bv.Union(AddSecondaryEmailResult) class AddSecondaryEmailsArg(bb.Struct): @@ -740,49 +483,22 @@ class AddSecondaryEmailsArg(bb.Struct): __slots__ = [ '_new_secondary_emails_value', - '_new_secondary_emails_present', ] _has_required_fields = True def __init__(self, new_secondary_emails=None): - self._new_secondary_emails_value = None - self._new_secondary_emails_present = False + self._new_secondary_emails_value = bb.NOT_SET if new_secondary_emails is not None: self.new_secondary_emails = new_secondary_emails - @property - def new_secondary_emails(self): - """ - List of users and secondary emails to add. - - :rtype: list of [UserSecondaryEmailsArg] - """ - if self._new_secondary_emails_present: - return self._new_secondary_emails_value - else: - raise AttributeError("missing required field 'new_secondary_emails'") - - @new_secondary_emails.setter - def new_secondary_emails(self, val): - val = self._new_secondary_emails_validator.validate(val) - self._new_secondary_emails_value = val - self._new_secondary_emails_present = True - - @new_secondary_emails.deleter - def new_secondary_emails(self): - self._new_secondary_emails_value = None - self._new_secondary_emails_present = False + # Instance attribute type: list of [UserSecondaryEmailsArg] (validator is set below) + new_secondary_emails = bb.Attribute("new_secondary_emails") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AddSecondaryEmailsArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AddSecondaryEmailsArg(new_secondary_emails={!r})'.format( - self._new_secondary_emails_value, - ) - AddSecondaryEmailsArg_validator = bv.Struct(AddSecondaryEmailsArg) class AddSecondaryEmailsError(bb.Union): @@ -834,9 +550,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AddSecondaryEmailsError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AddSecondaryEmailsError(%r, %r)' % (self._tag, self._value) - AddSecondaryEmailsError_validator = bv.Union(AddSecondaryEmailsError) class AddSecondaryEmailsResult(bb.Struct): @@ -847,49 +560,22 @@ class AddSecondaryEmailsResult(bb.Struct): __slots__ = [ '_results_value', - '_results_present', ] _has_required_fields = True def __init__(self, results=None): - self._results_value = None - self._results_present = False + self._results_value = bb.NOT_SET if results is not None: self.results = results - @property - def results(self): - """ - List of users and secondary email results. - - :rtype: list of [UserAddResult] - """ - if self._results_present: - return self._results_value - else: - raise AttributeError("missing required field 'results'") - - @results.setter - def results(self, val): - val = self._results_validator.validate(val) - self._results_value = val - self._results_present = True - - @results.deleter - def results(self): - self._results_value = None - self._results_present = False + # Instance attribute type: list of [UserAddResult] (validator is set below) + results = bb.Attribute("results") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AddSecondaryEmailsResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AddSecondaryEmailsResult(results={!r})'.format( - self._results_value, - ) - AddSecondaryEmailsResult_validator = bv.Struct(AddSecondaryEmailsResult) class AdminTier(bb.Union): @@ -954,9 +640,6 @@ def is_member_only(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AdminTier, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AdminTier(%r, %r)' % (self._tag, self._value) - AdminTier_validator = bv.Union(AdminTier) class ApiApp(bb.Struct): @@ -974,17 +657,11 @@ class ApiApp(bb.Struct): __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 @@ -996,18 +673,12 @@ def __init__(self, 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 + self._app_id_value = bb.NOT_SET + self._app_name_value = bb.NOT_SET + self._publisher_value = bb.NOT_SET + self._publisher_url_value = bb.NOT_SET + self._linked_value = bb.NOT_SET + self._is_app_folder_value = bb.NOT_SET if app_id is not None: self.app_id = app_id if app_name is not None: @@ -1021,166 +692,27 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + app_id = bb.Attribute("app_id") - @property - def publisher_url(self): - """ - The publisher's URL. + # Instance attribute type: str (validator is set below) + app_name = bb.Attribute("app_name") - :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. + # Instance attribute type: str (validator is set below) + publisher = bb.Attribute("publisher", nullable=True) - :rtype: bool - """ - if self._is_app_folder_present: - return self._is_app_folder_value - else: - raise AttributeError("missing required field 'is_app_folder'") + # Instance attribute type: str (validator is set below) + publisher_url = bb.Attribute("publisher_url", nullable=True) - @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 + # Instance attribute type: datetime.datetime (validator is set below) + linked = bb.Attribute("linked", nullable=True) - @is_app_folder.deleter - def is_app_folder(self): - self._is_app_folder_value = None - self._is_app_folder_present = False + # Instance attribute type: bool (validator is set below) + is_app_folder = bb.Attribute("is_app_folder") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ApiApp, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -1193,49 +725,22 @@ class BaseDfbReport(bb.Struct): __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 + self._start_date_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + start_date = bb.Attribute("start_date") def _process_custom_annotations(self, annotation_type, field_path, processor): super(BaseDfbReport, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'BaseDfbReport(start_date={!r})'.format( - self._start_date_value, - ) - BaseDfbReport_validator = bv.Struct(BaseDfbReport) class BaseTeamFolderError(bb.Union): @@ -1349,9 +854,6 @@ def get_team_shared_dropbox_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(BaseTeamFolderError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'BaseTeamFolderError(%r, %r)' % (self._tag, self._value) - BaseTeamFolderError_validator = bv.Union(BaseTeamFolderError) class CustomQuotaError(bb.Union): @@ -1391,9 +893,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(CustomQuotaError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CustomQuotaError(%r, %r)' % (self._tag, self._value) - CustomQuotaError_validator = bv.Union(CustomQuotaError) class CustomQuotaResult(bb.Union): @@ -1486,9 +985,6 @@ def get_invalid_user(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(CustomQuotaResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CustomQuotaResult(%r, %r)' % (self._tag, self._value) - CustomQuotaResult_validator = bv.Union(CustomQuotaResult) class CustomQuotaUsersArg(bb.Struct): @@ -1498,49 +994,22 @@ class CustomQuotaUsersArg(bb.Struct): __slots__ = [ '_users_value', - '_users_present', ] _has_required_fields = True def __init__(self, users=None): - self._users_value = None - self._users_present = False + self._users_value = bb.NOT_SET 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 + # Instance attribute type: list of [UserSelectorArg] (validator is set below) + users = bb.Attribute("users") def _process_custom_annotations(self, annotation_type, field_path, processor): super(CustomQuotaUsersArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CustomQuotaUsersArg(users={!r})'.format( - self._users_value, - ) - CustomQuotaUsersArg_validator = bv.Struct(CustomQuotaUsersArg) class DateRange(bb.Struct): @@ -1555,9 +1024,7 @@ class DateRange(bb.Struct): __slots__ = [ '_start_date_value', - '_start_date_present', '_end_date_value', - '_end_date_present', ] _has_required_fields = False @@ -1565,77 +1032,22 @@ class DateRange(bb.Struct): 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 + self._start_date_value = bb.NOT_SET + self._end_date_value = bb.NOT_SET 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). If start_date is None or too long - ago, this field will be set to 6 months ago. - - :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 + # Instance attribute type: datetime.datetime (validator is set below) + start_date = bb.Attribute("start_date", nullable=True) - @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 + # Instance attribute type: datetime.datetime (validator is set below) + end_date = bb.Attribute("end_date", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DateRange, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -1662,9 +1074,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DateRangeError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DateRangeError(%r, %r)' % (self._tag, self._value) - DateRangeError_validator = bv.Union(DateRangeError) class DeleteSecondaryEmailResult(bb.Union): @@ -1795,9 +1204,6 @@ def get_cannot_remove_primary(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteSecondaryEmailResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeleteSecondaryEmailResult(%r, %r)' % (self._tag, self._value) - DeleteSecondaryEmailResult_validator = bv.Union(DeleteSecondaryEmailResult) class DeleteSecondaryEmailsArg(bb.Struct): @@ -1808,96 +1214,44 @@ class DeleteSecondaryEmailsArg(bb.Struct): __slots__ = [ '_emails_to_delete_value', - '_emails_to_delete_present', ] _has_required_fields = True def __init__(self, emails_to_delete=None): - self._emails_to_delete_value = None - self._emails_to_delete_present = False + self._emails_to_delete_value = bb.NOT_SET if emails_to_delete is not None: self.emails_to_delete = emails_to_delete - @property - def emails_to_delete(self): - """ - List of users and their secondary emails to delete. - - :rtype: list of [UserSecondaryEmailsArg] - """ - if self._emails_to_delete_present: - return self._emails_to_delete_value - else: - raise AttributeError("missing required field 'emails_to_delete'") - - @emails_to_delete.setter - def emails_to_delete(self, val): - val = self._emails_to_delete_validator.validate(val) - self._emails_to_delete_value = val - self._emails_to_delete_present = True - - @emails_to_delete.deleter - def emails_to_delete(self): - self._emails_to_delete_value = None - self._emails_to_delete_present = False + # Instance attribute type: list of [UserSecondaryEmailsArg] (validator is set below) + emails_to_delete = bb.Attribute("emails_to_delete") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteSecondaryEmailsArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeleteSecondaryEmailsArg(emails_to_delete={!r})'.format( - self._emails_to_delete_value, - ) - DeleteSecondaryEmailsArg_validator = bv.Struct(DeleteSecondaryEmailsArg) class DeleteSecondaryEmailsResult(bb.Struct): __slots__ = [ '_results_value', - '_results_present', ] _has_required_fields = True def __init__(self, results=None): - self._results_value = None - self._results_present = False + self._results_value = bb.NOT_SET if results is not None: self.results = results - @property - def results(self): - """ - :rtype: list of [UserDeleteResult] - """ - if self._results_present: - return self._results_value - else: - raise AttributeError("missing required field 'results'") - - @results.setter - def results(self, val): - val = self._results_validator.validate(val) - self._results_value = val - self._results_present = True - - @results.deleter - def results(self): - self._results_value = None - self._results_present = False + # Instance attribute type: list of [UserDeleteResult] (validator is set below) + results = bb.Attribute("results") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteSecondaryEmailsResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeleteSecondaryEmailsResult(results={!r})'.format( - self._results_value, - ) - DeleteSecondaryEmailsResult_validator = bv.Struct(DeleteSecondaryEmailsResult) class DesktopClientSession(DeviceSession): @@ -1916,15 +1270,10 @@ class DesktopClientSession(DeviceSession): __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 @@ -1945,16 +1294,11 @@ def __init__(self, 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 + self._host_name_value = bb.NOT_SET + self._client_type_value = bb.NOT_SET + self._client_version_value = bb.NOT_SET + self._platform_value = bb.NOT_SET + self._is_delete_on_unlink_supported_value = bb.NOT_SET if host_name is not None: self.host_name = host_name if client_type is not None: @@ -1966,138 +1310,24 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + host_name = bb.Attribute("host_name") - @host_name.deleter - def host_name(self): - self._host_name_value = None - self._host_name_present = False + # Instance attribute type: DesktopPlatform (validator is set below) + client_type = bb.Attribute("client_type", user_defined=True) - @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'") + # Instance attribute type: str (validator is set below) + client_version = bb.Attribute("client_version") - @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 + # Instance attribute type: str (validator is set below) + platform = bb.Attribute("platform") - @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 + # Instance attribute type: bool (validator is set below) + is_delete_on_unlink_supported = bb.Attribute("is_delete_on_unlink_supported") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DesktopClientSession, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -2156,9 +1386,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DesktopPlatform, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DesktopPlatform(%r, %r)' % (self._tag, self._value) - DesktopPlatform_validator = bv.Union(DesktopPlatform) class DeviceSessionArg(bb.Struct): @@ -2170,9 +1397,7 @@ class DeviceSessionArg(bb.Struct): __slots__ = [ '_session_id_value', - '_session_id_present', '_team_member_id_value', - '_team_member_id_present', ] _has_required_fields = True @@ -2180,70 +1405,22 @@ class DeviceSessionArg(bb.Struct): 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 + self._session_id_value = bb.NOT_SET + self._team_member_id_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + session_id = bb.Attribute("session_id") - @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 + # Instance attribute type: str (validator is set below) + team_member_id = bb.Attribute("team_member_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceSessionArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -2270,19 +1447,12 @@ class DevicesActive(bb.Struct): __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 @@ -2295,20 +1465,13 @@ def __init__(self, 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 + self._windows_value = bb.NOT_SET + self._macos_value = bb.NOT_SET + self._linux_value = bb.NOT_SET + self._ios_value = bb.NOT_SET + self._android_value = bb.NOT_SET + self._other_value = bb.NOT_SET + self._total_value = bb.NOT_SET if windows is not None: self.windows = windows if macos is not None: @@ -2324,182 +1487,30 @@ def __init__(self, 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[int]] - """ - 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[int]] - """ - 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[int]] - """ - 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[int]] - """ - 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[int]] - """ - 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[int]] - """ - if self._other_present: - return self._other_value - else: - raise AttributeError("missing required field 'other'") + # Instance attribute type: list of [Optional[int]] (validator is set below) + windows = bb.Attribute("windows") - @other.setter - def other(self, val): - val = self._other_validator.validate(val) - self._other_value = val - self._other_present = True + # Instance attribute type: list of [Optional[int]] (validator is set below) + macos = bb.Attribute("macos") - @other.deleter - def other(self): - self._other_value = None - self._other_present = False + # Instance attribute type: list of [Optional[int]] (validator is set below) + linux = bb.Attribute("linux") - @property - def total(self): - """ - Array of total number of linked clients with activity. + # Instance attribute type: list of [Optional[int]] (validator is set below) + ios = bb.Attribute("ios") - :rtype: list of [Optional[int]] - """ - if self._total_present: - return self._total_value - else: - raise AttributeError("missing required field 'total'") + # Instance attribute type: list of [Optional[int]] (validator is set below) + android = bb.Attribute("android") - @total.setter - def total(self, val): - val = self._total_validator.validate(val) - self._total_value = val - self._total_present = True + # Instance attribute type: list of [Optional[int]] (validator is set below) + other = bb.Attribute("other") - @total.deleter - def total(self): - self._total_value = None - self._total_present = False + # Instance attribute type: list of [Optional[int]] (validator is set below) + total = bb.Attribute("total") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DevicesActive, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 ExcludedUsersListArg(bb.Struct): @@ -2511,49 +1522,22 @@ class ExcludedUsersListArg(bb.Struct): __slots__ = [ '_limit_value', - '_limit_present', ] _has_required_fields = False def __init__(self, limit=None): - self._limit_value = None - self._limit_present = False + self._limit_value = bb.NOT_SET if limit is not None: self.limit = limit - @property - def limit(self): - """ - Number of results to return per call. - - :rtype: int - """ - 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 + # Instance attribute type: int (validator is set below) + limit = bb.Attribute("limit") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExcludedUsersListArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExcludedUsersListArg(limit={!r})'.format( - self._limit_value, - ) - ExcludedUsersListArg_validator = bv.Struct(ExcludedUsersListArg) class ExcludedUsersListContinueArg(bb.Struct): @@ -2566,49 +1550,22 @@ class ExcludedUsersListContinueArg(bb.Struct): __slots__ = [ '_cursor_value', - '_cursor_present', ] _has_required_fields = True def __init__(self, cursor=None): - self._cursor_value = None - self._cursor_present = False + self._cursor_value = bb.NOT_SET if cursor is not None: self.cursor = cursor - @property - def cursor(self): - """ - Indicates from what point to get the next set of users. - - :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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExcludedUsersListContinueArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExcludedUsersListContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - ExcludedUsersListContinueArg_validator = bv.Struct(ExcludedUsersListContinueArg) class ExcludedUsersListContinueError(bb.Union): @@ -2648,9 +1605,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExcludedUsersListContinueError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExcludedUsersListContinueError(%r, %r)' % (self._tag, self._value) - ExcludedUsersListContinueError_validator = bv.Union(ExcludedUsersListContinueError) class ExcludedUsersListError(bb.Union): @@ -2689,9 +1643,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExcludedUsersListError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExcludedUsersListError(%r, %r)' % (self._tag, self._value) - ExcludedUsersListError_validator = bv.Union(ExcludedUsersListError) class ExcludedUsersListResult(bb.Struct): @@ -2699,21 +1650,18 @@ class ExcludedUsersListResult(bb.Struct): Excluded users list result. :ivar team.ExcludedUsersListResult.cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_member_space_limits_excluded_users_list_continue` + :meth:`dropbox.dropbox_client.Dropbox.team_member_space_limits_excluded_users_list_continue` to obtain additional excluded users. :ivar team.ExcludedUsersListResult.has_more: Is true if there are additional excluded users that have not been returned yet. An additional call to - :meth:`dropbox.dropbox.Dropbox.team_member_space_limits_excluded_users_list_continue` + :meth:`dropbox.dropbox_client.Dropbox.team_member_space_limits_excluded_users_list_continue` can retrieve them. """ __slots__ = [ '_users_value', - '_users_present', '_cursor_value', - '_cursor_present', '_has_more_value', - '_has_more_present', ] _has_required_fields = True @@ -2722,12 +1670,9 @@ def __init__(self, users=None, has_more=None, cursor=None): - 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 + self._users_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET + self._has_more_value = bb.NOT_SET if users is not None: self.users = users if cursor is not None: @@ -2735,91 +1680,18 @@ def __init__(self, if has_more is not None: self.has_more = has_more - @property - def users(self): - """ - :rtype: list of [MemberProfile] - """ - 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 + # Instance attribute type: list of [MemberProfile] (validator is set below) + users = bb.Attribute("users") - @property - def cursor(self): - """ - Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_member_space_limits_excluded_users_list_continue` - to obtain additional excluded users. - - :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 has_more(self): - """ - Is true if there are additional excluded users that have not been - returned yet. An additional call to - :meth:`dropbox.dropbox.Dropbox.team_member_space_limits_excluded_users_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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor", nullable=True) - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False + # Instance attribute type: bool (validator is set below) + has_more = bb.Attribute("has_more") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExcludedUsersListResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExcludedUsersListResult(users={!r}, has_more={!r}, cursor={!r})'.format( - self._users_value, - self._has_more_value, - self._cursor_value, - ) - ExcludedUsersListResult_validator = bv.Struct(ExcludedUsersListResult) class ExcludedUsersUpdateArg(bb.Struct): @@ -2833,52 +1705,22 @@ class ExcludedUsersUpdateArg(bb.Struct): __slots__ = [ '_users_value', - '_users_present', ] _has_required_fields = False def __init__(self, users=None): - self._users_value = None - self._users_present = False + self._users_value = bb.NOT_SET if users is not None: self.users = users - @property - def users(self): - """ - List of users to be added/removed. - - :rtype: list of [UserSelectorArg] - """ - if self._users_present: - return self._users_value - else: - return None - - @users.setter - def users(self, val): - if val is None: - del self.users - return - 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 + # Instance attribute type: list of [UserSelectorArg] (validator is set below) + users = bb.Attribute("users", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExcludedUsersUpdateArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExcludedUsersUpdateArg(users={!r})'.format( - self._users_value, - ) - ExcludedUsersUpdateArg_validator = bv.Struct(ExcludedUsersUpdateArg) class ExcludedUsersUpdateError(bb.Union): @@ -2930,9 +1772,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExcludedUsersUpdateError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExcludedUsersUpdateError(%r, %r)' % (self._tag, self._value) - ExcludedUsersUpdateError_validator = bv.Union(ExcludedUsersUpdateError) class ExcludedUsersUpdateResult(bb.Struct): @@ -2944,49 +1783,22 @@ class ExcludedUsersUpdateResult(bb.Struct): __slots__ = [ '_status_value', - '_status_present', ] _has_required_fields = True def __init__(self, status=None): - self._status_value = None - self._status_present = False + self._status_value = bb.NOT_SET if status is not None: self.status = status - @property - def status(self): - """ - Update status. - - :rtype: ExcludedUsersUpdateStatus - """ - 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 + # Instance attribute type: ExcludedUsersUpdateStatus (validator is set below) + status = bb.Attribute("status", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExcludedUsersUpdateResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExcludedUsersUpdateResult(status={!r})'.format( - self._status_value, - ) - ExcludedUsersUpdateResult_validator = bv.Struct(ExcludedUsersUpdateResult) class ExcludedUsersUpdateStatus(bb.Union): @@ -3025,9 +1837,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExcludedUsersUpdateStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExcludedUsersUpdateStatus(%r, %r)' % (self._tag, self._value) - ExcludedUsersUpdateStatus_validator = bv.Union(ExcludedUsersUpdateStatus) class Feature(bb.Union): @@ -3102,9 +1911,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(Feature, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'Feature(%r, %r)' % (self._tag, self._value) - Feature_validator = bv.Union(Feature) class FeatureValue(bb.Union): @@ -3248,9 +2054,6 @@ def get_has_team_selective_sync(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FeatureValue, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FeatureValue(%r, %r)' % (self._tag, self._value) - FeatureValue_validator = bv.Union(FeatureValue) class FeaturesGetValuesBatchArg(bb.Struct): @@ -3262,50 +2065,22 @@ class FeaturesGetValuesBatchArg(bb.Struct): __slots__ = [ '_features_value', - '_features_present', ] _has_required_fields = True def __init__(self, features=None): - self._features_value = None - self._features_present = False + self._features_value = bb.NOT_SET 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 + # Instance attribute type: list of [Feature] (validator is set below) + features = bb.Attribute("features") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FeaturesGetValuesBatchArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FeaturesGetValuesBatchArg(features={!r})'.format( - self._features_value, - ) - FeaturesGetValuesBatchArg_validator = bv.Struct(FeaturesGetValuesBatchArg) class FeaturesGetValuesBatchError(bb.Union): @@ -3344,56 +2119,28 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FeaturesGetValuesBatchError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FeaturesGetValuesBatchError(%r, %r)' % (self._tag, self._value) - FeaturesGetValuesBatchError_validator = bv.Union(FeaturesGetValuesBatchError) class FeaturesGetValuesBatchResult(bb.Struct): __slots__ = [ '_values_value', - '_values_present', ] _has_required_fields = True def __init__(self, values=None): - self._values_value = None - self._values_present = False + self._values_value = bb.NOT_SET 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 + # Instance attribute type: list of [FeatureValue] (validator is set below) + values = bb.Attribute("values") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FeaturesGetValuesBatchResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FeaturesGetValuesBatchResult(values={!r})'.format( - self._values_value, - ) - FeaturesGetValuesBatchResult_validator = bv.Struct(FeaturesGetValuesBatchResult) class GetActivityReport(BaseDfbReport): @@ -3437,33 +2184,19 @@ class GetActivityReport(BaseDfbReport): __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 @@ -3485,34 +2218,20 @@ def __init__(self, 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 + self._adds_value = bb.NOT_SET + self._edits_value = bb.NOT_SET + self._deletes_value = bb.NOT_SET + self._active_users_28_day_value = bb.NOT_SET + self._active_users_7_day_value = bb.NOT_SET + self._active_users_1_day_value = bb.NOT_SET + self._active_shared_folders_28_day_value = bb.NOT_SET + self._active_shared_folders_7_day_value = bb.NOT_SET + self._active_shared_folders_1_day_value = bb.NOT_SET + self._shared_links_created_value = bb.NOT_SET + self._shared_links_viewed_by_team_value = bb.NOT_SET + self._shared_links_viewed_by_outside_user_value = bb.NOT_SET + self._shared_links_viewed_by_not_logged_in_value = bb.NOT_SET + self._shared_links_viewed_total_value = bb.NOT_SET if adds is not None: self.adds = adds if edits is not None: @@ -3542,357 +2261,51 @@ def __init__(self, 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[int]] - """ - 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[int]] - """ - 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[int]] - """ - 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[int]] - """ - 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[int]] - """ - 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[int]] - """ - 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[int]] - """ - 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[int]] - """ - 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[int]] - """ - 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[int]] - """ - 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[int]] - """ - 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 + # Instance attribute type: list of [Optional[int]] (validator is set below) + adds = bb.Attribute("adds") - @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 + # Instance attribute type: list of [Optional[int]] (validator is set below) + edits = bb.Attribute("edits") - @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. + # Instance attribute type: list of [Optional[int]] (validator is set below) + deletes = bb.Attribute("deletes") - :rtype: list of [Optional[int]] - """ - 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'") + # Instance attribute type: list of [Optional[int]] (validator is set below) + active_users_28_day = bb.Attribute("active_users_28_day") - @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 + # Instance attribute type: list of [Optional[int]] (validator is set below) + active_users_7_day = bb.Attribute("active_users_7_day") - @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 + # Instance attribute type: list of [Optional[int]] (validator is set below) + active_users_1_day = bb.Attribute("active_users_1_day") - @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. + # Instance attribute type: list of [Optional[int]] (validator is set below) + active_shared_folders_28_day = bb.Attribute("active_shared_folders_28_day") - :rtype: list of [Optional[int]] - """ - 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'") + # Instance attribute type: list of [Optional[int]] (validator is set below) + active_shared_folders_7_day = bb.Attribute("active_shared_folders_7_day") - @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 + # Instance attribute type: list of [Optional[int]] (validator is set below) + active_shared_folders_1_day = bb.Attribute("active_shared_folders_1_day") - @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 + # Instance attribute type: list of [Optional[int]] (validator is set below) + shared_links_created = bb.Attribute("shared_links_created") - @property - def shared_links_viewed_total(self): - """ - Array of the total number of views to shared links created by the team. + # Instance attribute type: list of [Optional[int]] (validator is set below) + shared_links_viewed_by_team = bb.Attribute("shared_links_viewed_by_team") - :rtype: list of [Optional[int]] - """ - if self._shared_links_viewed_total_present: - return self._shared_links_viewed_total_value - else: - raise AttributeError("missing required field 'shared_links_viewed_total'") + # Instance attribute type: list of [Optional[int]] (validator is set below) + shared_links_viewed_by_outside_user = bb.Attribute("shared_links_viewed_by_outside_user") - @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 + # Instance attribute type: list of [Optional[int]] (validator is set below) + shared_links_viewed_by_not_logged_in = bb.Attribute("shared_links_viewed_by_not_logged_in") - @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 + # Instance attribute type: list of [Optional[int]] (validator is set below) + shared_links_viewed_total = bb.Attribute("shared_links_viewed_total") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetActivityReport, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -3912,11 +2325,8 @@ class GetDevicesReport(BaseDfbReport): __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 @@ -3927,12 +2337,9 @@ def __init__(self, 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 + self._active_1_day_value = bb.NOT_SET + self._active_7_day_value = bb.NOT_SET + self._active_28_day_value = bb.NOT_SET if active_1_day is not None: self.active_1_day = active_1_day if active_7_day is not None: @@ -3940,86 +2347,18 @@ def __init__(self, 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'") + # Instance attribute type: DevicesActive (validator is set below) + active_1_day = bb.Attribute("active_1_day", user_defined=True) - @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 + # Instance attribute type: DevicesActive (validator is set below) + active_7_day = bb.Attribute("active_7_day", user_defined=True) - @active_28_day.deleter - def active_28_day(self): - self._active_28_day_value = None - self._active_28_day_present = False + # Instance attribute type: DevicesActive (validator is set below) + active_28_day = bb.Attribute("active_28_day", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetDevicesReport, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -4041,15 +2380,10 @@ class GetMembershipReport(BaseDfbReport): __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 @@ -4062,16 +2396,11 @@ def __init__(self, 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 + self._team_size_value = bb.NOT_SET + self._pending_invites_value = bb.NOT_SET + self._members_joined_value = bb.NOT_SET + self._suspended_members_value = bb.NOT_SET + self._licenses_value = bb.NOT_SET if team_size is not None: self.team_size = team_size if pending_invites is not None: @@ -4083,134 +2412,24 @@ def __init__(self, if licenses is not None: self.licenses = licenses - @property - def team_size(self): - """ - Team size, for each day. - - :rtype: list of [Optional[int]] - """ - 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[int]] - """ - 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[int]] - """ - 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 + # Instance attribute type: list of [Optional[int]] (validator is set below) + team_size = bb.Attribute("team_size") - @property - def suspended_members(self): - """ - The number of suspended team members, for each day. - - :rtype: list of [Optional[int]] - """ - 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 + # Instance attribute type: list of [Optional[int]] (validator is set below) + pending_invites = bb.Attribute("pending_invites") - @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[int]] - """ - if self._licenses_present: - return self._licenses_value - else: - raise AttributeError("missing required field 'licenses'") + # Instance attribute type: list of [Optional[int]] (validator is set below) + members_joined = bb.Attribute("members_joined") - @licenses.setter - def licenses(self, val): - val = self._licenses_validator.validate(val) - self._licenses_value = val - self._licenses_present = True + # Instance attribute type: list of [Optional[int]] (validator is set below) + suspended_members = bb.Attribute("suspended_members") - @licenses.deleter - def licenses(self): - self._licenses_value = None - self._licenses_present = False + # Instance attribute type: list of [Optional[int]] (validator is set below) + licenses = bb.Attribute("licenses") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetMembershipReport, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -4237,15 +2456,10 @@ class GetStorageReport(BaseDfbReport): __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 @@ -4258,16 +2472,11 @@ def __init__(self, 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 + self._total_usage_value = bb.NOT_SET + self._shared_usage_value = bb.NOT_SET + self._unshared_usage_value = bb.NOT_SET + self._shared_folders_value = bb.NOT_SET + self._member_storage_map_value = bb.NOT_SET if total_usage is not None: self.total_usage = total_usage if shared_usage is not None: @@ -4279,142 +2488,24 @@ def __init__(self, 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[int]] - """ - 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[int]] - """ - 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[int]] - """ - 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[int]] - """ - 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 + # Instance attribute type: list of [Optional[int]] (validator is set below) + total_usage = bb.Attribute("total_usage") - @shared_folders.deleter - def shared_folders(self): - self._shared_folders_value = None - self._shared_folders_present = False + # Instance attribute type: list of [Optional[int]] (validator is set below) + shared_usage = bb.Attribute("shared_usage") - @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. + # Instance attribute type: list of [Optional[int]] (validator is set below) + unshared_usage = bb.Attribute("unshared_usage") - :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 + # Instance attribute type: list of [Optional[int]] (validator is set below) + shared_folders = bb.Attribute("shared_folders") - @member_storage_map.deleter - def member_storage_map(self): - self._member_storage_map_value = None - self._member_storage_map_present = False + # Instance attribute type: list of [list of [StorageBucket]] (validator is set below) + member_storage_map = bb.Attribute("member_storage_map") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetStorageReport, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -4456,9 +2547,6 @@ def is_owner(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupAccessType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupAccessType(%r, %r)' % (self._tag, self._value) - GroupAccessType_validator = bv.Union(GroupAccessType) class GroupCreateArg(bb.Struct): @@ -4474,13 +2562,9 @@ class GroupCreateArg(bb.Struct): __slots__ = [ '_group_name_value', - '_group_name_present', '_add_creator_as_owner_value', - '_add_creator_as_owner_present', '_group_external_id_value', - '_group_external_id_present', '_group_management_type_value', - '_group_management_type_present', ] _has_required_fields = True @@ -4490,14 +2574,10 @@ def __init__(self, add_creator_as_owner=None, group_external_id=None, group_management_type=None): - self._group_name_value = None - self._group_name_present = False - self._add_creator_as_owner_value = None - self._add_creator_as_owner_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 + self._group_name_value = bb.NOT_SET + self._add_creator_as_owner_value = bb.NOT_SET + self._group_external_id_value = bb.NOT_SET + self._group_management_type_value = bb.NOT_SET if group_name is not None: self.group_name = group_name if add_creator_as_owner is not None: @@ -4507,117 +2587,21 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + group_name = bb.Attribute("group_name") - @property - def add_creator_as_owner(self): - """ - Automatically add the creator of the group. - - :rtype: bool - """ - if self._add_creator_as_owner_present: - return self._add_creator_as_owner_value - else: - return False + # Instance attribute type: bool (validator is set below) + add_creator_as_owner = bb.Attribute("add_creator_as_owner") - @add_creator_as_owner.setter - def add_creator_as_owner(self, val): - val = self._add_creator_as_owner_validator.validate(val) - self._add_creator_as_owner_value = val - self._add_creator_as_owner_present = True - - @add_creator_as_owner.deleter - def add_creator_as_owner(self): - self._add_creator_as_owner_value = None - self._add_creator_as_owner_present = False - - @property - def group_external_id(self): - """ - The creator of a team can associate an arbitrary external ID to the - group. + # Instance attribute type: str (validator is set below) + group_external_id = bb.Attribute("group_external_id", nullable=True) - :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 - """ - 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 + # Instance attribute type: team_common.GroupManagementType (validator is set below) + group_management_type = bb.Attribute("group_management_type", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupCreateArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupCreateArg(group_name={!r}, add_creator_as_owner={!r}, group_external_id={!r}, group_management_type={!r})'.format( - self._group_name_value, - self._add_creator_as_owner_value, - self._group_external_id_value, - self._group_management_type_value, - ) - GroupCreateArg_validator = bv.Struct(GroupCreateArg) class GroupCreateError(bb.Union): @@ -4691,9 +2675,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupCreateError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupCreateError(%r, %r)' % (self._tag, self._value) - GroupCreateError_validator = bv.Union(GroupCreateError) class GroupSelectorError(bb.Union): @@ -4733,9 +2714,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupSelectorError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupSelectorError(%r, %r)' % (self._tag, self._value) - GroupSelectorError_validator = bv.Union(GroupSelectorError) class GroupSelectorWithTeamGroupError(GroupSelectorError): @@ -4765,9 +2743,6 @@ def is_system_managed_group_disallowed(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupSelectorWithTeamGroupError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupSelectorWithTeamGroupError(%r, %r)' % (self._tag, self._value) - GroupSelectorWithTeamGroupError_validator = bv.Union(GroupSelectorWithTeamGroupError) class GroupDeleteError(GroupSelectorWithTeamGroupError): @@ -4794,9 +2769,6 @@ def is_group_already_deleted(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupDeleteError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupDeleteError(%r, %r)' % (self._tag, self._value) - GroupDeleteError_validator = bv.Union(GroupDeleteError) class GroupFullInfo(team_common.GroupSummary): @@ -4810,9 +2782,7 @@ class GroupFullInfo(team_common.GroupSummary): __slots__ = [ '_members_value', - '_members_present', '_created_value', - '_created_present', ] _has_required_fields = True @@ -4830,79 +2800,22 @@ def __init__(self, group_management_type, group_external_id, member_count) - self._members_value = None - self._members_present = False - self._created_value = None - self._created_present = False + self._members_value = bb.NOT_SET + self._created_value = bb.NOT_SET 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: int - """ - 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 + # Instance attribute type: list of [GroupMemberInfo] (validator is set below) + members = bb.Attribute("members", nullable=True) - @created.deleter - def created(self): - self._created_value = None - self._created_present = False + # Instance attribute type: int (validator is set below) + created = bb.Attribute("created") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupFullInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -4916,9 +2829,7 @@ class GroupMemberInfo(bb.Struct): __slots__ = [ '_profile_value', - '_profile_present', '_access_type_value', - '_access_type_present', ] _has_required_fields = True @@ -4926,70 +2837,22 @@ class GroupMemberInfo(bb.Struct): 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 + self._profile_value = bb.NOT_SET + self._access_type_value = bb.NOT_SET 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 + # Instance attribute type: MemberProfile (validator is set below) + profile = bb.Attribute("profile", user_defined=True) - @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 + # Instance attribute type: GroupAccessType (validator is set below) + access_type = bb.Attribute("access_type", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupMemberInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -5003,9 +2866,7 @@ class GroupMemberSelector(bb.Struct): __slots__ = [ '_group_value', - '_group_present', '_user_value', - '_user_present', ] _has_required_fields = True @@ -5013,70 +2874,22 @@ class GroupMemberSelector(bb.Struct): def __init__(self, group=None, user=None): - self._group_value = None - self._group_present = False - self._user_value = None - self._user_present = False + self._group_value = bb.NOT_SET + self._user_value = bb.NOT_SET 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 + # Instance attribute type: GroupSelector (validator is set below) + group = bb.Attribute("group", user_defined=True) - @user.deleter - def user(self): - self._user_value = None - self._user_present = False + # Instance attribute type: UserSelectorArg (validator is set below) + user = bb.Attribute("user", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupMemberSelector, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupMemberSelector(group={!r}, user={!r})'.format( - self._group_value, - self._user_value, - ) - GroupMemberSelector_validator = bv.Struct(GroupMemberSelector) class GroupMemberSelectorError(GroupSelectorWithTeamGroupError): @@ -5106,9 +2919,6 @@ def is_member_not_in_group(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupMemberSelectorError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupMemberSelectorError(%r, %r)' % (self._tag, self._value) - GroupMemberSelectorError_validator = bv.Union(GroupMemberSelectorError) class GroupMemberSetAccessTypeError(GroupMemberSelectorError): @@ -5136,9 +2946,6 @@ def is_user_cannot_be_manager_of_company_managed_group(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupMemberSetAccessTypeError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupMemberSetAccessTypeError(%r, %r)' % (self._tag, self._value) - GroupMemberSetAccessTypeError_validator = bv.Union(GroupMemberSetAccessTypeError) class IncludeMembersArg(bb.Struct): @@ -5151,51 +2958,22 @@ class IncludeMembersArg(bb.Struct): __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 + self._return_members_value = bb.NOT_SET 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 + # Instance attribute type: bool (validator is set below) + return_members = bb.Attribute("return_members") def _process_custom_annotations(self, annotation_type, field_path, processor): super(IncludeMembersArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'IncludeMembersArg(return_members={!r})'.format( - self._return_members_value, - ) - IncludeMembersArg_validator = bv.Struct(IncludeMembersArg) class GroupMembersAddArg(IncludeMembersArg): @@ -5207,9 +2985,7 @@ class GroupMembersAddArg(IncludeMembersArg): __slots__ = [ '_group_value', - '_group_present', '_members_value', - '_members_present', ] _has_required_fields = True @@ -5219,71 +2995,22 @@ def __init__(self, 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 + self._group_value = bb.NOT_SET + self._members_value = bb.NOT_SET 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 + # Instance attribute type: GroupSelector (validator is set below) + group = bb.Attribute("group", user_defined=True) - @members.deleter - def members(self): - self._members_value = None - self._members_present = False + # Instance attribute type: list of [MemberAccess] (validator is set below) + members = bb.Attribute("members") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupMembersAddArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -5405,8 +3132,8 @@ 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. + Business team, use the + :meth:`dropbox.dropbox_client.Dropbox.team_members_add` endpoint. Only call this if :meth:`is_members_not_in_team` is true. @@ -5443,15 +3170,13 @@ def get_user_cannot_be_manager_of_company_managed_group(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupMembersAddError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupMembersAddError(%r, %r)' % (self._tag, self._value) - GroupMembersAddError_validator = bv.Union(GroupMembersAddError) class GroupMembersChangeResult(bb.Struct): """ - Result returned by :meth:`dropbox.dropbox.Dropbox.team_groups_members_add` - and :meth:`dropbox.dropbox.Dropbox.team_groups_members_remove`. + Result returned by + :meth:`dropbox.dropbox_client.Dropbox.team_groups_members_add` and + :meth:`dropbox.dropbox_client.Dropbox.team_groups_members_remove`. :ivar team.GroupMembersChangeResult.group_info: The group info after member change operation has been performed. @@ -5464,9 +3189,7 @@ class GroupMembersChangeResult(bb.Struct): __slots__ = [ '_group_info_value', - '_group_info_present', '_async_job_id_value', - '_async_job_id_present', ] _has_required_fields = True @@ -5474,73 +3197,22 @@ class GroupMembersChangeResult(bb.Struct): 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 + self._group_info_value = bb.NOT_SET + self._async_job_id_value = bb.NOT_SET 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): - """ - For legacy purposes async_job_id will always return one space ' '. - Formerly, it was an ID that was used to obtain the status of - granting/revoking group-owned resources. It's no longer necessary - because the async processing now happens automatically. - - :rtype: str - """ - if self._async_job_id_present: - return self._async_job_id_value - else: - raise AttributeError("missing required field 'async_job_id'") + # Instance attribute type: GroupFullInfo (validator is set below) + group_info = bb.Attribute("group_info", user_defined=True) - @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 + # Instance attribute type: str (validator is set below) + async_job_id = bb.Attribute("async_job_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupMembersChangeResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -5553,9 +3225,7 @@ class GroupMembersRemoveArg(IncludeMembersArg): __slots__ = [ '_group_value', - '_group_present', '_users_value', - '_users_present', ] _has_required_fields = True @@ -5565,71 +3235,22 @@ def __init__(self, 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 + self._group_value = bb.NOT_SET + self._users_value = bb.NOT_SET 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'") + # Instance attribute type: GroupSelector (validator is set below) + group = bb.Attribute("group", user_defined=True) - @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 + # Instance attribute type: list of [UserSelectorArg] (validator is set below) + users = bb.Attribute("users") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupMembersRemoveArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -5659,9 +3280,6 @@ def is_member_not_in_group(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupMembersSelectorError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupMembersSelectorError(%r, %r)' % (self._tag, self._value) - GroupMembersSelectorError_validator = bv.Union(GroupMembersSelectorError) class GroupMembersRemoveError(GroupMembersSelectorError): @@ -5755,9 +3373,6 @@ def get_users_not_found(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupMembersRemoveError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupMembersRemoveError(%r, %r)' % (self._tag, self._value) - GroupMembersRemoveError_validator = bv.Union(GroupMembersRemoveError) class GroupMembersSelector(bb.Struct): @@ -5771,9 +3386,7 @@ class GroupMembersSelector(bb.Struct): __slots__ = [ '_group_value', - '_group_present', '_users_value', - '_users_present', ] _has_required_fields = True @@ -5781,70 +3394,22 @@ class GroupMembersSelector(bb.Struct): def __init__(self, group=None, users=None): - self._group_value = None - self._group_present = False - self._users_value = None - self._users_present = False + self._group_value = bb.NOT_SET + self._users_value = bb.NOT_SET 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'") + # Instance attribute type: GroupSelector (validator is set below) + group = bb.Attribute("group", user_defined=True) - @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 + # Instance attribute type: UsersSelectorArg (validator is set below) + users = bb.Attribute("users", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupMembersSelector, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupMembersSelector(group={!r}, users={!r})'.format( - self._group_value, - self._users_value, - ) - GroupMembersSelector_validator = bv.Struct(GroupMembersSelector) class GroupMembersSetAccessTypeArg(GroupMemberSelector): @@ -5859,9 +3424,7 @@ class GroupMembersSetAccessTypeArg(GroupMemberSelector): __slots__ = [ '_access_type_value', - '_access_type_present', '_return_members_value', - '_return_members_present', ] _has_required_fields = True @@ -5873,74 +3436,22 @@ def __init__(self, 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 + self._access_type_value = bb.NOT_SET + self._return_members_value = bb.NOT_SET 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 + # Instance attribute type: GroupAccessType (validator is set below) + access_type = bb.Attribute("access_type", user_defined=True) - @return_members.deleter - def return_members(self): - self._return_members_value = None - self._return_members_present = False + # Instance attribute type: bool (validator is set below) + return_members = bb.Attribute("return_members") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupMembersSetAccessTypeArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -6023,9 +3534,6 @@ def get_group_external_id(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupSelector, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupSelector(%r, %r)' % (self._tag, self._value) - GroupSelector_validator = bv.Union(GroupSelector) class GroupUpdateArgs(IncludeMembersArg): @@ -6043,13 +3551,9 @@ class GroupUpdateArgs(IncludeMembersArg): __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 @@ -6061,14 +3565,10 @@ def __init__(self, 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 + self._group_value = bb.NOT_SET + self._new_group_name_value = bb.NOT_SET + self._new_group_external_id_value = bb.NOT_SET + self._new_group_management_type_value = bb.NOT_SET if group is not None: self.group = group if new_group_name is not None: @@ -6078,121 +3578,21 @@ def __init__(self, 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 + # Instance attribute type: GroupSelector (validator is set below) + group = bb.Attribute("group", user_defined=True) - @new_group_name.deleter - def new_group_name(self): - self._new_group_name_value = None - self._new_group_name_present = False + # Instance attribute type: str (validator is set below) + new_group_name = bb.Attribute("new_group_name", nullable=True) - @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. + # Instance attribute type: str (validator is set below) + new_group_external_id = bb.Attribute("new_group_external_id", nullable=True) - :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 - """ - 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 + # Instance attribute type: team_common.GroupManagementType (validator is set below) + new_group_management_type = bb.Attribute("new_group_management_type", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupUpdateArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -6243,9 +3643,6 @@ def is_external_id_already_in_use(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupUpdateError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupUpdateError(%r, %r)' % (self._tag, self._value) - GroupUpdateError_validator = bv.Union(GroupUpdateError) class GroupsGetInfoError(bb.Union): @@ -6283,9 +3680,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupsGetInfoError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupsGetInfoError(%r, %r)' % (self._tag, self._value) - GroupsGetInfoError_validator = bv.Union(GroupsGetInfoError) class GroupsGetInfoItem(bb.Union): @@ -6344,9 +3738,9 @@ def is_group_info(self): 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. + :meth:`dropbox.dropbox_client.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. @@ -6371,9 +3765,6 @@ def get_group_info(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupsGetInfoItem, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupsGetInfoItem(%r, %r)' % (self._tag, self._value) - GroupsGetInfoItem_validator = bv.Union(GroupsGetInfoItem) class GroupsListArg(bb.Struct): @@ -6383,49 +3774,22 @@ class GroupsListArg(bb.Struct): __slots__ = [ '_limit_value', - '_limit_present', ] _has_required_fields = False def __init__(self, limit=None): - self._limit_value = None - self._limit_present = False + self._limit_value = bb.NOT_SET if limit is not None: self.limit = limit - @property - def limit(self): - """ - Number of results to return per call. - - :rtype: int - """ - 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 + # Instance attribute type: int (validator is set below) + limit = bb.Attribute("limit") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupsListArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupsListArg(limit={!r})'.format( - self._limit_value, - ) - GroupsListArg_validator = bv.Struct(GroupsListArg) class GroupsListContinueArg(bb.Struct): @@ -6436,49 +3800,22 @@ class GroupsListContinueArg(bb.Struct): __slots__ = [ '_cursor_value', - '_cursor_present', ] _has_required_fields = True def __init__(self, cursor=None): - self._cursor_value = None - self._cursor_present = False + self._cursor_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupsListContinueArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupsListContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - GroupsListContinueArg_validator = bv.Struct(GroupsListContinueArg) class GroupsListContinueError(bb.Union): @@ -6515,29 +3852,23 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupsListContinueError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupsListContinueError(%r, %r)' % (self._tag, self._value) - GroupsListContinueError_validator = bv.Union(GroupsListContinueError) class GroupsListResult(bb.Struct): """ :ivar team.GroupsListResult.cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_groups_list_continue` to obtain the - additional groups. + :meth:`dropbox.dropbox_client.Dropbox.team_groups_list_continue` to + obtain the additional groups. :ivar team.GroupsListResult.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. + :meth:`dropbox.dropbox_client.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 @@ -6546,12 +3877,9 @@ 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 + self._groups_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET + self._has_more_value = bb.NOT_SET if groups is not None: self.groups = groups if cursor is not None: @@ -6559,88 +3887,18 @@ def __init__(self, if has_more is not None: self.has_more = has_more - @property - def groups(self): - """ - :rtype: list of [team_common.GroupSummary] - """ - 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'") + # Instance attribute type: list of [team_common.GroupSummary] (validator is set below) + groups = bb.Attribute("groups") - @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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False + # Instance attribute type: bool (validator is set below) + has_more = bb.Attribute("has_more") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupsListResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -6652,9 +3910,7 @@ class GroupsMembersListArg(bb.Struct): __slots__ = [ '_group_value', - '_group_present', '_limit_value', - '_limit_present', ] _has_required_fields = True @@ -6662,70 +3918,22 @@ class GroupsMembersListArg(bb.Struct): def __init__(self, group=None, limit=None): - self._group_value = None - self._group_present = False - self._limit_value = None - self._limit_present = False + self._group_value = bb.NOT_SET + self._limit_value = bb.NOT_SET 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 + # Instance attribute type: GroupSelector (validator is set below) + group = bb.Attribute("group", user_defined=True) - @property - def limit(self): - """ - Number of results to return per call. - - :rtype: int - """ - 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 + # Instance attribute type: int (validator is set below) + limit = bb.Attribute("limit") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupsMembersListArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupsMembersListArg(group={!r}, limit={!r})'.format( - self._group_value, - self._limit_value, - ) - GroupsMembersListArg_validator = bv.Struct(GroupsMembersListArg) class GroupsMembersListContinueArg(bb.Struct): @@ -6736,49 +3944,22 @@ class GroupsMembersListContinueArg(bb.Struct): __slots__ = [ '_cursor_value', - '_cursor_present', ] _has_required_fields = True def __init__(self, cursor=None): - self._cursor_value = None - self._cursor_present = False + self._cursor_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupsMembersListContinueArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupsMembersListContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - GroupsMembersListContinueArg_validator = bv.Struct(GroupsMembersListContinueArg) class GroupsMembersListContinueError(bb.Union): @@ -6816,29 +3997,23 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupsMembersListContinueError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupsMembersListContinueError(%r, %r)' % (self._tag, self._value) - GroupsMembersListContinueError_validator = bv.Union(GroupsMembersListContinueError) class GroupsMembersListResult(bb.Struct): """ :ivar team.GroupsMembersListResult.cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_groups_members_list_continue` to - obtain additional group members. + :meth:`dropbox.dropbox_client.Dropbox.team_groups_members_list_continue` + to obtain additional group members. :ivar team.GroupsMembersListResult.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. + :meth:`dropbox.dropbox_client.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 @@ -6847,12 +4022,9 @@ 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 + self._members_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET + self._has_more_value = bb.NOT_SET if members is not None: self.members = members if cursor is not None: @@ -6860,88 +4032,18 @@ def __init__(self, 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'") + # Instance attribute type: list of [GroupMemberInfo] (validator is set below) + members = bb.Attribute("members") - @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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False + # Instance attribute type: bool (validator is set below) + has_more = bb.Attribute("has_more") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupsMembersListResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -6968,9 +4070,6 @@ def is_access_denied(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupsPollError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupsPollError(%r, %r)' % (self._tag, self._value) - GroupsPollError_validator = bv.Union(GroupsPollError) class GroupsSelector(bb.Union): @@ -7054,9 +4153,6 @@ def get_group_external_ids(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupsSelector, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupsSelector(%r, %r)' % (self._tag, self._value) - GroupsSelector_validator = bv.Union(GroupsSelector) class HasTeamFileEventsValue(bb.Union): @@ -7117,9 +4213,6 @@ def get_enabled(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(HasTeamFileEventsValue, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'HasTeamFileEventsValue(%r, %r)' % (self._tag, self._value) - HasTeamFileEventsValue_validator = bv.Union(HasTeamFileEventsValue) class HasTeamSelectiveSyncValue(bb.Union): @@ -7180,9 +4273,6 @@ def get_has_team_selective_sync(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(HasTeamSelectiveSyncValue, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'HasTeamSelectiveSyncValue(%r, %r)' % (self._tag, self._value) - HasTeamSelectiveSyncValue_validator = bv.Union(HasTeamSelectiveSyncValue) class HasTeamSharedDropboxValue(bb.Union): @@ -7243,9 +4333,6 @@ def get_has_team_shared_dropbox(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(HasTeamSharedDropboxValue, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'HasTeamSharedDropboxValue(%r, %r)' % (self._tag, self._value) - HasTeamSharedDropboxValue_validator = bv.Union(HasTeamSharedDropboxValue) class LegalHoldHeldRevisionMetadata(bb.Struct): @@ -7275,25 +4362,15 @@ class LegalHoldHeldRevisionMetadata(bb.Struct): __slots__ = [ '_new_filename_value', - '_new_filename_present', '_original_revision_id_value', - '_original_revision_id_present', '_original_file_path_value', - '_original_file_path_present', '_server_modified_value', - '_server_modified_present', '_author_member_id_value', - '_author_member_id_present', '_author_member_status_value', - '_author_member_status_present', '_author_email_value', - '_author_email_present', '_file_type_value', - '_file_type_present', '_size_value', - '_size_present', '_content_hash_value', - '_content_hash_present', ] _has_required_fields = True @@ -7309,26 +4386,16 @@ def __init__(self, file_type=None, size=None, content_hash=None): - self._new_filename_value = None - self._new_filename_present = False - self._original_revision_id_value = None - self._original_revision_id_present = False - self._original_file_path_value = None - self._original_file_path_present = False - self._server_modified_value = None - self._server_modified_present = False - self._author_member_id_value = None - self._author_member_id_present = False - self._author_member_status_value = None - self._author_member_status_present = False - self._author_email_value = None - self._author_email_present = False - self._file_type_value = None - self._file_type_present = False - self._size_value = None - self._size_present = False - self._content_hash_value = None - self._content_hash_present = False + self._new_filename_value = bb.NOT_SET + self._original_revision_id_value = bb.NOT_SET + self._original_file_path_value = bb.NOT_SET + self._server_modified_value = bb.NOT_SET + self._author_member_id_value = bb.NOT_SET + self._author_member_status_value = bb.NOT_SET + self._author_email_value = bb.NOT_SET + self._file_type_value = bb.NOT_SET + self._size_value = bb.NOT_SET + self._content_hash_value = bb.NOT_SET if new_filename is not None: self.new_filename = new_filename if original_revision_id is not None: @@ -7350,255 +4417,39 @@ def __init__(self, if content_hash is not None: self.content_hash = content_hash - @property - def new_filename(self): - """ - The held revision filename. - - :rtype: str - """ - if self._new_filename_present: - return self._new_filename_value - else: - raise AttributeError("missing required field 'new_filename'") - - @new_filename.setter - def new_filename(self, val): - val = self._new_filename_validator.validate(val) - self._new_filename_value = val - self._new_filename_present = True - - @new_filename.deleter - def new_filename(self): - self._new_filename_value = None - self._new_filename_present = False - - @property - def original_revision_id(self): - """ - The id of the held revision. - - :rtype: str - """ - if self._original_revision_id_present: - return self._original_revision_id_value - else: - raise AttributeError("missing required field 'original_revision_id'") - - @original_revision_id.setter - def original_revision_id(self, val): - val = self._original_revision_id_validator.validate(val) - self._original_revision_id_value = val - self._original_revision_id_present = True - - @original_revision_id.deleter - def original_revision_id(self): - self._original_revision_id_value = None - self._original_revision_id_present = False - - @property - def original_file_path(self): - """ - The original path of the held revision. - - :rtype: str - """ - if self._original_file_path_present: - return self._original_file_path_value - else: - raise AttributeError("missing required field 'original_file_path'") - - @original_file_path.setter - def original_file_path(self, val): - val = self._original_file_path_validator.validate(val) - self._original_file_path_value = val - self._original_file_path_present = True - - @original_file_path.deleter - def original_file_path(self): - self._original_file_path_value = None - self._original_file_path_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 author_member_id(self): - """ - The member id of the revision's author. - - :rtype: str - """ - if self._author_member_id_present: - return self._author_member_id_value - else: - raise AttributeError("missing required field 'author_member_id'") - - @author_member_id.setter - def author_member_id(self, val): - val = self._author_member_id_validator.validate(val) - self._author_member_id_value = val - self._author_member_id_present = True - - @author_member_id.deleter - def author_member_id(self): - self._author_member_id_value = None - self._author_member_id_present = False - - @property - def author_member_status(self): - """ - The member status of the revision's author. - - :rtype: TeamMemberStatus - """ - if self._author_member_status_present: - return self._author_member_status_value - else: - raise AttributeError("missing required field 'author_member_status'") - - @author_member_status.setter - def author_member_status(self, val): - self._author_member_status_validator.validate_type_only(val) - self._author_member_status_value = val - self._author_member_status_present = True - - @author_member_status.deleter - def author_member_status(self): - self._author_member_status_value = None - self._author_member_status_present = False + # Instance attribute type: str (validator is set below) + new_filename = bb.Attribute("new_filename") - @property - def author_email(self): - """ - The email address of the held revision author. - - :rtype: str - """ - if self._author_email_present: - return self._author_email_value - else: - raise AttributeError("missing required field 'author_email'") - - @author_email.setter - def author_email(self, val): - val = self._author_email_validator.validate(val) - self._author_email_value = val - self._author_email_present = True - - @author_email.deleter - def author_email(self): - self._author_email_value = None - self._author_email_present = False - - @property - def file_type(self): - """ - The type of the held revision's file. + # Instance attribute type: str (validator is set below) + original_revision_id = bb.Attribute("original_revision_id") - :rtype: str - """ - if self._file_type_present: - return self._file_type_value - else: - raise AttributeError("missing required field 'file_type'") - - @file_type.setter - def file_type(self, val): - val = self._file_type_validator.validate(val) - self._file_type_value = val - self._file_type_present = True - - @file_type.deleter - def file_type(self): - self._file_type_value = None - self._file_type_present = False + # Instance attribute type: str (validator is set below) + original_file_path = bb.Attribute("original_file_path") - @property - def size(self): - """ - The file size in bytes. - - :rtype: int - """ - if self._size_present: - return self._size_value - else: - raise AttributeError("missing required field 'size'") + # Instance attribute type: datetime.datetime (validator is set below) + server_modified = bb.Attribute("server_modified") - @size.setter - def size(self, val): - val = self._size_validator.validate(val) - self._size_value = val - self._size_present = True + # Instance attribute type: str (validator is set below) + author_member_id = bb.Attribute("author_member_id") - @size.deleter - def size(self): - self._size_value = None - self._size_present = False + # Instance attribute type: TeamMemberStatus (validator is set below) + author_member_status = bb.Attribute("author_member_status", user_defined=True) - @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. + # Instance attribute type: str (validator is set below) + author_email = bb.Attribute("author_email") - :rtype: str - """ - if self._content_hash_present: - return self._content_hash_value - else: - raise AttributeError("missing required field 'content_hash'") + # Instance attribute type: str (validator is set below) + file_type = bb.Attribute("file_type") - @content_hash.setter - def content_hash(self, val): - val = self._content_hash_validator.validate(val) - self._content_hash_value = val - self._content_hash_present = True + # Instance attribute type: int (validator is set below) + size = bb.Attribute("size") - @content_hash.deleter - def content_hash(self): - self._content_hash_value = None - self._content_hash_present = False + # Instance attribute type: str (validator is set below) + content_hash = bb.Attribute("content_hash") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldHeldRevisionMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldHeldRevisionMetadata(new_filename={!r}, original_revision_id={!r}, original_file_path={!r}, server_modified={!r}, author_member_id={!r}, author_member_status={!r}, author_email={!r}, file_type={!r}, size={!r}, content_hash={!r})'.format( - self._new_filename_value, - self._original_revision_id_value, - self._original_file_path_value, - self._server_modified_value, - self._author_member_id_value, - self._author_member_status_value, - self._author_email_value, - self._file_type_value, - self._size_value, - self._content_hash_value, - ) - LegalHoldHeldRevisionMetadata_validator = bv.Struct(LegalHoldHeldRevisionMetadata) class LegalHoldPolicy(bb.Struct): @@ -7618,21 +4469,13 @@ class LegalHoldPolicy(bb.Struct): __slots__ = [ '_id_value', - '_id_present', '_name_value', - '_name_present', '_description_value', - '_description_present', '_activation_time_value', - '_activation_time_present', '_members_value', - '_members_present', '_status_value', - '_status_present', '_start_date_value', - '_start_date_present', '_end_date_value', - '_end_date_present', ] _has_required_fields = True @@ -7646,22 +4489,14 @@ def __init__(self, description=None, activation_time=None, end_date=None): - self._id_value = None - self._id_present = False - self._name_value = None - self._name_present = False - self._description_value = None - self._description_present = False - self._activation_time_value = None - self._activation_time_present = False - self._members_value = None - self._members_present = False - self._status_value = None - self._status_present = False - self._start_date_value = None - self._start_date_present = False - self._end_date_value = None - self._end_date_present = False + self._id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._description_value = bb.NOT_SET + self._activation_time_value = bb.NOT_SET + self._members_value = bb.NOT_SET + self._status_value = bb.NOT_SET + self._start_date_value = bb.NOT_SET + self._end_date_value = bb.NOT_SET if id is not None: self.id = id if name is not None: @@ -7679,214 +4514,33 @@ def __init__(self, if end_date is not None: self.end_date = end_date - @property - def id(self): - """ - The legal hold 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): - """ - Policy 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 - - @property - def description(self): - """ - A description of the legal hold policy. - - :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 + # Instance attribute type: str (validator is set below) + id = bb.Attribute("id") - @description.deleter - def description(self): - self._description_value = None - self._description_present = False + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - @property - def activation_time(self): - """ - The time at which the legal hold was activated. + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description", nullable=True) - :rtype: datetime.datetime - """ - if self._activation_time_present: - return self._activation_time_value - else: - return None - - @activation_time.setter - def activation_time(self, val): - if val is None: - del self.activation_time - return - val = self._activation_time_validator.validate(val) - self._activation_time_value = val - self._activation_time_present = True - - @activation_time.deleter - def activation_time(self): - self._activation_time_value = None - self._activation_time_present = False - - @property - def members(self): - """ - Team members IDs and number of permanetly deleted members under hold. - - :rtype: MembersInfo - """ - 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 status(self): - """ - The current state of the hold. - - :rtype: LegalHoldStatus - """ - 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 start_date(self): - """ - Start date of the legal hold policy. - - :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 + # Instance attribute type: datetime.datetime (validator is set below) + activation_time = bb.Attribute("activation_time", nullable=True) - @property - def end_date(self): - """ - End date of the legal hold policy. + # Instance attribute type: MembersInfo (validator is set below) + members = bb.Attribute("members", user_defined=True) - :rtype: datetime.datetime - """ - if self._end_date_present: - return self._end_date_value - else: - return None + # Instance attribute type: LegalHoldStatus (validator is set below) + status = bb.Attribute("status", user_defined=True) - @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 + # Instance attribute type: datetime.datetime (validator is set below) + start_date = bb.Attribute("start_date") - @end_date.deleter - def end_date(self): - self._end_date_value = None - self._end_date_present = False + # Instance attribute type: datetime.datetime (validator is set below) + end_date = bb.Attribute("end_date", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldPolicy(id={!r}, name={!r}, members={!r}, status={!r}, start_date={!r}, description={!r}, activation_time={!r}, end_date={!r})'.format( - self._id_value, - self._name_value, - self._members_value, - self._status_value, - self._start_date_value, - self._description_value, - self._activation_time_value, - self._end_date_value, - ) - LegalHoldPolicy_validator = bv.Struct(LegalHoldPolicy) class LegalHoldStatus(bb.Union): @@ -7978,9 +4632,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldStatus(%r, %r)' % (self._tag, self._value) - LegalHoldStatus_validator = bv.Union(LegalHoldStatus) class LegalHoldsError(bb.Union): @@ -8030,9 +4681,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsError(%r, %r)' % (self._tag, self._value) - LegalHoldsError_validator = bv.Union(LegalHoldsError) class LegalHoldsGetPolicyArg(bb.Struct): @@ -8042,49 +4690,22 @@ class LegalHoldsGetPolicyArg(bb.Struct): __slots__ = [ '_id_value', - '_id_present', ] _has_required_fields = True def __init__(self, id=None): - self._id_value = None - self._id_present = False + self._id_value = bb.NOT_SET if id is not None: self.id = id - @property - def id(self): - """ - The legal hold 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 + # Instance attribute type: str (validator is set below) + id = bb.Attribute("id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsGetPolicyArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsGetPolicyArg(id={!r})'.format( - self._id_value, - ) - LegalHoldsGetPolicyArg_validator = bv.Struct(LegalHoldsGetPolicyArg) class LegalHoldsGetPolicyError(LegalHoldsError): @@ -8111,9 +4732,6 @@ def is_legal_hold_policy_not_found(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsGetPolicyError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsGetPolicyError(%r, %r)' % (self._tag, self._value) - LegalHoldsGetPolicyError_validator = bv.Union(LegalHoldsGetPolicyError) class LegalHoldsListHeldRevisionResult(bb.Struct): @@ -8131,11 +4749,8 @@ class LegalHoldsListHeldRevisionResult(bb.Struct): __slots__ = [ '_entries_value', - '_entries_present', '_cursor_value', - '_cursor_present', '_has_more_value', - '_has_more_present', ] _has_required_fields = True @@ -8144,12 +4759,9 @@ def __init__(self, entries=None, has_more=None, cursor=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 + self._entries_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET + self._has_more_value = bb.NOT_SET if entries is not None: self.entries = entries if cursor is not None: @@ -8157,92 +4769,18 @@ def __init__(self, if has_more is not None: self.has_more = has_more - @property - def entries(self): - """ - List of file entries that under the hold. - - :rtype: list of [LegalHoldHeldRevisionMetadata] - """ - 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): - """ - The cursor idicates where to continue reading file metadata entries for - the next API call. When there are no more entries, the cursor will - return none. Pass the cursor into - /2/team/legal_holds/list_held_revisions/continue. - - :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 has_more(self): - """ - True if there are more file entries that haven't been returned. You can - retrieve them with a call to /legal_holds/list_held_revisions_continue. - - :rtype: bool - """ - if self._has_more_present: - return self._has_more_value - else: - raise AttributeError("missing required field 'has_more'") + # Instance attribute type: list of [LegalHoldHeldRevisionMetadata] (validator is set below) + entries = bb.Attribute("entries") - @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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor", nullable=True) - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False + # Instance attribute type: bool (validator is set below) + has_more = bb.Attribute("has_more") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsListHeldRevisionResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsListHeldRevisionResult(entries={!r}, has_more={!r}, cursor={!r})'.format( - self._entries_value, - self._has_more_value, - self._cursor_value, - ) - LegalHoldsListHeldRevisionResult_validator = bv.Struct(LegalHoldsListHeldRevisionResult) class LegalHoldsListHeldRevisionsArg(bb.Struct): @@ -8252,49 +4790,22 @@ class LegalHoldsListHeldRevisionsArg(bb.Struct): __slots__ = [ '_id_value', - '_id_present', ] _has_required_fields = True def __init__(self, id=None): - self._id_value = None - self._id_present = False + self._id_value = bb.NOT_SET if id is not None: self.id = id - @property - def id(self): - """ - The legal hold 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 + # Instance attribute type: str (validator is set below) + id = bb.Attribute("id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsListHeldRevisionsArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsListHeldRevisionsArg(id={!r})'.format( - self._id_value, - ) - LegalHoldsListHeldRevisionsArg_validator = bv.Struct(LegalHoldsListHeldRevisionsArg) class LegalHoldsListHeldRevisionsContinueArg(bb.Struct): @@ -8307,9 +4818,7 @@ class LegalHoldsListHeldRevisionsContinueArg(bb.Struct): __slots__ = [ '_id_value', - '_id_present', '_cursor_value', - '_cursor_present', ] _has_required_fields = True @@ -8317,75 +4826,22 @@ class LegalHoldsListHeldRevisionsContinueArg(bb.Struct): def __init__(self, id=None, cursor=None): - self._id_value = None - self._id_present = False - self._cursor_value = None - self._cursor_present = False + self._id_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET if id is not None: self.id = id if cursor is not None: self.cursor = cursor - @property - def id(self): - """ - The legal hold 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 cursor(self): - """ - The cursor idicates where to continue reading file metadata entries for - the next API call. When there are no more entries, the cursor will - return none. + # Instance attribute type: str (validator is set below) + id = bb.Attribute("id") - :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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsListHeldRevisionsContinueArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsListHeldRevisionsContinueArg(id={!r}, cursor={!r})'.format( - self._id_value, - self._cursor_value, - ) - LegalHoldsListHeldRevisionsContinueArg_validator = bv.Struct(LegalHoldsListHeldRevisionsContinueArg) class LegalHoldsListHeldRevisionsContinueError(bb.Union): @@ -8401,7 +4857,7 @@ class LegalHoldsListHeldRevisionsContinueError(bb.Union): Temporary infrastructure failure, please retry. :ivar team.LegalHoldsListHeldRevisionsContinueError.reset: Indicates that the cursor has been invalidated. Call - :meth:`dropbox.dropbox.Dropbox.team_legal_holds_list_held_revisions_continue` + :meth:`dropbox.dropbox_client.Dropbox.team_legal_holds_list_held_revisions_continue` again with an empty cursor to obtain a new cursor. """ @@ -8450,9 +4906,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsListHeldRevisionsContinueError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsListHeldRevisionsContinueError(%r, %r)' % (self._tag, self._value) - LegalHoldsListHeldRevisionsContinueError_validator = bv.Union(LegalHoldsListHeldRevisionsContinueError) class LegalHoldsListHeldRevisionsError(LegalHoldsError): @@ -8503,9 +4956,6 @@ def is_inactive_legal_hold(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsListHeldRevisionsError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsListHeldRevisionsError(%r, %r)' % (self._tag, self._value) - LegalHoldsListHeldRevisionsError_validator = bv.Union(LegalHoldsListHeldRevisionsError) class LegalHoldsListPoliciesArg(bb.Struct): @@ -8516,49 +4966,22 @@ class LegalHoldsListPoliciesArg(bb.Struct): __slots__ = [ '_include_released_value', - '_include_released_present', ] _has_required_fields = False def __init__(self, include_released=None): - self._include_released_value = None - self._include_released_present = False + self._include_released_value = bb.NOT_SET if include_released is not None: self.include_released = include_released - @property - def include_released(self): - """ - Whether to return holds that were released. - - :rtype: bool - """ - if self._include_released_present: - return self._include_released_value - else: - return False - - @include_released.setter - def include_released(self, val): - val = self._include_released_validator.validate(val) - self._include_released_value = val - self._include_released_present = True - - @include_released.deleter - def include_released(self): - self._include_released_value = None - self._include_released_present = False + # Instance attribute type: bool (validator is set below) + include_released = bb.Attribute("include_released") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsListPoliciesArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsListPoliciesArg(include_released={!r})'.format( - self._include_released_value, - ) - LegalHoldsListPoliciesArg_validator = bv.Struct(LegalHoldsListPoliciesArg) class LegalHoldsListPoliciesError(LegalHoldsError): @@ -8585,56 +5008,28 @@ def is_transient_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsListPoliciesError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsListPoliciesError(%r, %r)' % (self._tag, self._value) - LegalHoldsListPoliciesError_validator = bv.Union(LegalHoldsListPoliciesError) class LegalHoldsListPoliciesResult(bb.Struct): __slots__ = [ '_policies_value', - '_policies_present', ] _has_required_fields = True def __init__(self, policies=None): - self._policies_value = None - self._policies_present = False + self._policies_value = bb.NOT_SET if policies is not None: self.policies = policies - @property - def policies(self): - """ - :rtype: list of [LegalHoldPolicy] - """ - if self._policies_present: - return self._policies_value - else: - raise AttributeError("missing required field 'policies'") - - @policies.setter - def policies(self, val): - val = self._policies_validator.validate(val) - self._policies_value = val - self._policies_present = True - - @policies.deleter - def policies(self): - self._policies_value = None - self._policies_present = False + # Instance attribute type: list of [LegalHoldPolicy] (validator is set below) + policies = bb.Attribute("policies") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsListPoliciesResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsListPoliciesResult(policies={!r})'.format( - self._policies_value, - ) - LegalHoldsListPoliciesResult_validator = bv.Struct(LegalHoldsListPoliciesResult) class LegalHoldsPolicyCreateArg(bb.Struct): @@ -8652,15 +5047,10 @@ class LegalHoldsPolicyCreateArg(bb.Struct): __slots__ = [ '_name_value', - '_name_present', '_description_value', - '_description_present', '_members_value', - '_members_present', '_start_date_value', - '_start_date_present', '_end_date_value', - '_end_date_present', ] _has_required_fields = True @@ -8671,16 +5061,11 @@ def __init__(self, description=None, start_date=None, end_date=None): - self._name_value = None - self._name_present = False - self._description_value = None - self._description_present = False - self._members_value = None - self._members_present = False - self._start_date_value = None - self._start_date_present = False - self._end_date_value = None - self._end_date_present = False + self._name_value = bb.NOT_SET + self._description_value = bb.NOT_SET + self._members_value = bb.NOT_SET + self._start_date_value = bb.NOT_SET + self._end_date_value = bb.NOT_SET if name is not None: self.name = name if description is not None: @@ -8692,142 +5077,24 @@ def __init__(self, if end_date is not None: self.end_date = end_date - @property - def name(self): - """ - Policy 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 + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - @name.deleter - def name(self): - self._name_value = None - self._name_present = False + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description", nullable=True) - @property - def description(self): - """ - A description of the legal hold policy. + # Instance attribute type: list of [str] (validator is set below) + members = bb.Attribute("members") - :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 + # Instance attribute type: datetime.datetime (validator is set below) + start_date = bb.Attribute("start_date", nullable=True) - @description.deleter - def description(self): - self._description_value = None - self._description_present = False - - @property - def members(self): - """ - List of team member IDs added to the hold. - - :rtype: list of [str] - """ - 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 start_date(self): - """ - start date of the legal hold policy. - - :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): - """ - end date of the legal hold policy. - - :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 + # Instance attribute type: datetime.datetime (validator is set below) + end_date = bb.Attribute("end_date", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsPolicyCreateArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsPolicyCreateArg(name={!r}, members={!r}, description={!r}, start_date={!r}, end_date={!r})'.format( - self._name_value, - self._members_value, - self._description_value, - self._start_date_value, - self._end_date_value, - ) - LegalHoldsPolicyCreateArg_validator = bv.Struct(LegalHoldsPolicyCreateArg) class LegalHoldsPolicyCreateError(LegalHoldsError): @@ -8939,9 +5206,6 @@ def is_invalid_date(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsPolicyCreateError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsPolicyCreateError(%r, %r)' % (self._tag, self._value) - LegalHoldsPolicyCreateError_validator = bv.Union(LegalHoldsPolicyCreateError) class LegalHoldsPolicyReleaseArg(bb.Struct): @@ -8951,49 +5215,22 @@ class LegalHoldsPolicyReleaseArg(bb.Struct): __slots__ = [ '_id_value', - '_id_present', ] _has_required_fields = True def __init__(self, id=None): - self._id_value = None - self._id_present = False + self._id_value = bb.NOT_SET if id is not None: self.id = id - @property - def id(self): - """ - The legal hold 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 + # Instance attribute type: str (validator is set below) + id = bb.Attribute("id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsPolicyReleaseArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsPolicyReleaseArg(id={!r})'.format( - self._id_value, - ) - LegalHoldsPolicyReleaseArg_validator = bv.Struct(LegalHoldsPolicyReleaseArg) class LegalHoldsPolicyReleaseError(LegalHoldsError): @@ -9045,9 +5282,6 @@ def is_legal_hold_policy_not_found(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsPolicyReleaseError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsPolicyReleaseError(%r, %r)' % (self._tag, self._value) - LegalHoldsPolicyReleaseError_validator = bv.Union(LegalHoldsPolicyReleaseError) class LegalHoldsPolicyUpdateArg(bb.Struct): @@ -9061,13 +5295,9 @@ class LegalHoldsPolicyUpdateArg(bb.Struct): __slots__ = [ '_id_value', - '_id_present', '_name_value', - '_name_present', '_description_value', - '_description_present', '_members_value', - '_members_present', ] _has_required_fields = True @@ -9077,14 +5307,10 @@ def __init__(self, name=None, description=None, members=None): - self._id_value = None - self._id_present = False - self._name_value = None - self._name_present = False - self._description_value = None - self._description_present = False - self._members_value = None - self._members_present = False + self._id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._description_value = bb.NOT_SET + self._members_value = bb.NOT_SET if id is not None: self.id = id if name is not None: @@ -9094,118 +5320,21 @@ def __init__(self, if members is not None: self.members = members - @property - def id(self): - """ - The legal hold 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 + # Instance attribute type: str (validator is set below) + id = bb.Attribute("id") - @id.deleter - def id(self): - self._id_value = None - self._id_present = False - - @property - def name(self): - """ - Policy new name. - - :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): - """ - Policy new description. - - :rtype: str - """ - if self._description_present: - return self._description_value - else: - return None + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name", nullable=True) - @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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description", nullable=True) - @description.deleter - def description(self): - self._description_value = None - self._description_present = False - - @property - def members(self): - """ - List of team member IDs to apply the policy on. - - :rtype: list of [str] - """ - 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 + # Instance attribute type: list of [str] (validator is set below) + members = bb.Attribute("members", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsPolicyUpdateArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsPolicyUpdateArg(id={!r}, name={!r}, description={!r}, members={!r})'.format( - self._id_value, - self._name_value, - self._description_value, - self._members_value, - ) - LegalHoldsPolicyUpdateArg_validator = bv.Struct(LegalHoldsPolicyUpdateArg) class LegalHoldsPolicyUpdateError(LegalHoldsError): @@ -9306,9 +5435,6 @@ def is_legal_hold_policy_not_found(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsPolicyUpdateError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsPolicyUpdateError(%r, %r)' % (self._tag, self._value) - LegalHoldsPolicyUpdateError_validator = bv.Union(LegalHoldsPolicyUpdateError) class ListMemberAppsArg(bb.Struct): @@ -9318,55 +5444,28 @@ class ListMemberAppsArg(bb.Struct): __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 + self._team_member_id_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + team_member_id = bb.Attribute("team_member_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListMemberAppsArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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`. + :meth:`dropbox.dropbox_client.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 @@ -9400,9 +5499,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListMemberAppsError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListMemberAppsError(%r, %r)' % (self._tag, self._value) - ListMemberAppsError_validator = bv.Union(ListMemberAppsError) class ListMemberAppsResult(bb.Struct): @@ -9413,49 +5509,22 @@ class ListMemberAppsResult(bb.Struct): __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 + self._linked_api_apps_value = bb.NOT_SET 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 + # Instance attribute type: list of [ApiApp] (validator is set below) + linked_api_apps = bb.Attribute("linked_api_apps") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListMemberAppsResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListMemberAppsResult(linked_api_apps={!r})'.format( - self._linked_api_apps_value, - ) - ListMemberAppsResult_validator = bv.Struct(ListMemberAppsResult) class ListMemberDevicesArg(bb.Struct): @@ -9471,13 +5540,9 @@ class ListMemberDevicesArg(bb.Struct): __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 @@ -9487,14 +5552,10 @@ def __init__(self, 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 + self._team_member_id_value = bb.NOT_SET + self._include_web_sessions_value = bb.NOT_SET + self._include_desktop_clients_value = bb.NOT_SET + self._include_mobile_clients_value = bb.NOT_SET if team_member_id is not None: self.team_member_id = team_member_id if include_web_sessions is not None: @@ -9504,109 +5565,21 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + team_member_id = bb.Attribute("team_member_id") - @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 + # Instance attribute type: bool (validator is set below) + include_web_sessions = bb.Attribute("include_web_sessions") - @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 + # Instance attribute type: bool (validator is set below) + include_desktop_clients = bb.Attribute("include_desktop_clients") - @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 + # Instance attribute type: bool (validator is set below) + include_mobile_clients = bb.Attribute("include_mobile_clients") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListMemberDevicesArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -9643,9 +5616,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListMemberDevicesError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListMemberDevicesError(%r, %r)' % (self._tag, self._value) - ListMemberDevicesError_validator = bv.Union(ListMemberDevicesError) class ListMemberDevicesResult(bb.Struct): @@ -9660,11 +5630,8 @@ class ListMemberDevicesResult(bb.Struct): __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 @@ -9673,12 +5640,9 @@ 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 + self._active_web_sessions_value = bb.NOT_SET + self._desktop_client_sessions_value = bb.NOT_SET + self._mobile_client_sessions_value = bb.NOT_SET if active_web_sessions is not None: self.active_web_sessions = active_web_sessions if desktop_client_sessions is not None: @@ -9686,103 +5650,27 @@ def __init__(self, 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 + # Instance attribute type: list of [ActiveWebSession] (validator is set below) + active_web_sessions = bb.Attribute("active_web_sessions", nullable=True) - @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 + # Instance attribute type: list of [DesktopClientSession] (validator is set below) + desktop_client_sessions = bb.Attribute("desktop_client_sessions", nullable=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 + # Instance attribute type: list of [MobileClientSession] (validator is set below) + mobile_client_sessions = bb.Attribute("mobile_client_sessions", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListMemberDevicesResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): """ Arguments for - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_members_linked_apps`. + :meth:`dropbox.dropbox_client.Dropbox.team_linked_apps_list_members_linked_apps`. :ivar team.ListMembersAppsArg.cursor: At the first call to the - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_members_linked_apps` + :meth:`dropbox.dropbox_client.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. @@ -9790,62 +5678,28 @@ class ListMembersAppsArg(bb.Struct): __slots__ = [ '_cursor_value', - '_cursor_present', ] _has_required_fields = False def __init__(self, cursor=None): - self._cursor_value = None - self._cursor_present = False + self._cursor_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListMembersAppsArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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`. + :meth:`dropbox.dropbox_client.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 @@ -9853,7 +5707,7 @@ class ListMembersAppsError(bb.Union): :ivar team.ListMembersAppsError.reset: Indicates that the cursor has been invalidated. Call - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_members_linked_apps` + :meth:`dropbox.dropbox_client.Dropbox.team_linked_apps_list_members_linked_apps` again with an empty cursor to obtain a new cursor. """ @@ -9882,34 +5736,28 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListMembersAppsError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListMembersAppsError(%r, %r)' % (self._tag, self._value) - ListMembersAppsError_validator = bv.Union(ListMembersAppsError) class ListMembersAppsResult(bb.Struct): """ Information returned by - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_members_linked_apps`. + :meth:`dropbox.dropbox_client.Dropbox.team_linked_apps_list_members_linked_apps`. :ivar team.ListMembersAppsResult.apps: The linked applications of each member of the team. :ivar team.ListMembersAppsResult.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` + :meth:`dropbox.dropbox_client.Dropbox.team_linked_apps_list_members_linked_apps` to retrieve the rest. :ivar team.ListMembersAppsResult.cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_members_linked_apps` + :meth:`dropbox.dropbox_client.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 @@ -9918,12 +5766,9 @@ 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 + self._apps_value = bb.NOT_SET + self._has_more_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET if apps is not None: self.apps = apps if has_more is not None: @@ -9931,100 +5776,26 @@ def __init__(self, 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 + # Instance attribute type: list of [MemberLinkedApps] (validator is set below) + apps = bb.Attribute("apps") - @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'") + # Instance attribute type: bool (validator is set below) + has_more = bb.Attribute("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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListMembersAppsResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): """ :ivar team.ListMembersDevicesArg.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 + :meth:`dropbox.dropbox_client.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 team.ListMembersDevicesArg.include_web_sessions: Whether to list web sessions of the team members. @@ -10036,13 +5807,9 @@ class ListMembersDevicesArg(bb.Struct): __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 @@ -10052,14 +5819,10 @@ def __init__(self, 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 + self._cursor_value = bb.NOT_SET + self._include_web_sessions_value = bb.NOT_SET + self._include_desktop_clients_value = bb.NOT_SET + self._include_mobile_clients_value = bb.NOT_SET if cursor is not None: self.cursor = cursor if include_web_sessions is not None: @@ -10069,116 +5832,21 @@ def __init__(self, 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. + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor", nullable=True) - :rtype: bool - """ - if self._include_web_sessions_present: - return self._include_web_sessions_value - else: - return True + # Instance attribute type: bool (validator is set below) + include_web_sessions = bb.Attribute("include_web_sessions") - @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 + # Instance attribute type: bool (validator is set below) + include_desktop_clients = bb.Attribute("include_desktop_clients") - @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 + # Instance attribute type: bool (validator is set below) + include_mobile_clients = bb.Attribute("include_mobile_clients") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListMembersDevicesArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -10189,8 +5857,8 @@ class ListMembersDevicesError(bb.Union): :ivar team.ListMembersDevicesError.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. + :meth:`dropbox.dropbox_client.Dropbox.team_devices_list_members_devices` + again with an empty cursor to obtain a new cursor. """ _catch_all = 'other' @@ -10218,9 +5886,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListMembersDevicesError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListMembersDevicesError(%r, %r)' % (self._tag, self._value) - ListMembersDevicesError_validator = bv.Union(ListMembersDevicesError) class ListMembersDevicesResult(bb.Struct): @@ -10229,20 +5894,17 @@ class ListMembersDevicesResult(bb.Struct): the team. :ivar team.ListMembersDevicesResult.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. + :meth:`dropbox.dropbox_client.Dropbox.team_devices_list_members_devices` + to retrieve the rest. :ivar team.ListMembersDevicesResult.cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_devices_list_members_devices` to - receive the next sub list of team's devices. + :meth:`dropbox.dropbox_client.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 @@ -10251,12 +5913,9 @@ 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 + self._devices_value = bb.NOT_SET + self._has_more_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET if devices is not None: self.devices = devices if has_more is not None: @@ -10264,101 +5923,27 @@ def __init__(self, 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 + # Instance attribute type: list of [MemberDevices] (validator is set below) + devices = bb.Attribute("devices") - @devices.deleter - def devices(self): - self._devices_value = None - self._devices_present = False + # Instance attribute type: bool (validator is set below) + has_more = bb.Attribute("has_more") - @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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListMembersDevicesResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): """ Arguments for - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_team_linked_apps`. + :meth:`dropbox.dropbox_client.Dropbox.team_linked_apps_list_team_linked_apps`. :ivar team.ListTeamAppsArg.cursor: At the first call to the - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_team_linked_apps` + :meth:`dropbox.dropbox_client.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. @@ -10366,62 +5951,28 @@ class ListTeamAppsArg(bb.Struct): __slots__ = [ '_cursor_value', - '_cursor_present', ] _has_required_fields = False def __init__(self, cursor=None): - self._cursor_value = None - self._cursor_present = False + self._cursor_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListTeamAppsArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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`. + :meth:`dropbox.dropbox_client.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 @@ -10429,7 +5980,7 @@ class ListTeamAppsError(bb.Union): :ivar team.ListTeamAppsError.reset: Indicates that the cursor has been invalidated. Call - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_team_linked_apps` + :meth:`dropbox.dropbox_client.Dropbox.team_linked_apps_list_team_linked_apps` again with an empty cursor to obtain a new cursor. """ @@ -10458,34 +6009,28 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListTeamAppsError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListTeamAppsError(%r, %r)' % (self._tag, self._value) - ListTeamAppsError_validator = bv.Union(ListTeamAppsError) class ListTeamAppsResult(bb.Struct): """ Information returned by - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_team_linked_apps`. + :meth:`dropbox.dropbox_client.Dropbox.team_linked_apps_list_team_linked_apps`. :ivar team.ListTeamAppsResult.apps: The linked applications of each member of the team. :ivar team.ListTeamAppsResult.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` + :meth:`dropbox.dropbox_client.Dropbox.team_linked_apps_list_team_linked_apps` to retrieve the rest. :ivar team.ListTeamAppsResult.cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_linked_apps_list_team_linked_apps` + :meth:`dropbox.dropbox_client.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 @@ -10494,12 +6039,9 @@ 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 + self._apps_value = bb.NOT_SET + self._has_more_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET if apps is not None: self.apps = apps if has_more is not None: @@ -10507,100 +6049,26 @@ def __init__(self, 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'") + # Instance attribute type: list of [MemberLinkedApps] (validator is set below) + apps = bb.Attribute("apps") - @apps.setter - def apps(self, val): - val = self._apps_validator.validate(val) - self._apps_value = val - self._apps_present = True + # Instance attribute type: bool (validator is set below) + has_more = bb.Attribute("has_more") - @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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListTeamAppsResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): """ :ivar team.ListTeamDevicesArg.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 + :meth:`dropbox.dropbox_client.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 team.ListTeamDevicesArg.include_web_sessions: Whether to list web sessions of the team members. @@ -10612,13 +6080,9 @@ class ListTeamDevicesArg(bb.Struct): __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 @@ -10628,14 +6092,10 @@ def __init__(self, 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 + self._cursor_value = bb.NOT_SET + self._include_web_sessions_value = bb.NOT_SET + self._include_desktop_clients_value = bb.NOT_SET + self._include_mobile_clients_value = bb.NOT_SET if cursor is not None: self.cursor = cursor if include_web_sessions is not None: @@ -10645,116 +6105,21 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor", nullable=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 + # Instance attribute type: bool (validator is set below) + include_web_sessions = bb.Attribute("include_web_sessions") - @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 + # Instance attribute type: bool (validator is set below) + include_desktop_clients = bb.Attribute("include_desktop_clients") - @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 + # Instance attribute type: bool (validator is set below) + include_mobile_clients = bb.Attribute("include_mobile_clients") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListTeamDevicesArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -10765,8 +6130,8 @@ class ListTeamDevicesError(bb.Union): :ivar team.ListTeamDevicesError.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. + :meth:`dropbox.dropbox_client.Dropbox.team_devices_list_team_devices` + again with an empty cursor to obtain a new cursor. """ _catch_all = 'other' @@ -10794,9 +6159,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListTeamDevicesError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ListTeamDevicesError(%r, %r)' % (self._tag, self._value) - ListTeamDevicesError_validator = bv.Union(ListTeamDevicesError) class ListTeamDevicesResult(bb.Struct): @@ -10805,20 +6167,17 @@ class ListTeamDevicesResult(bb.Struct): team. :ivar team.ListTeamDevicesResult.has_more: If true, then there are more devices available. Pass the cursor to - :meth:`dropbox.dropbox.Dropbox.team_devices_list_team_devices` to + :meth:`dropbox.dropbox_client.Dropbox.team_devices_list_team_devices` to retrieve the rest. :ivar team.ListTeamDevicesResult.cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_devices_list_team_devices` to + :meth:`dropbox.dropbox_client.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 @@ -10827,12 +6186,9 @@ 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 + self._devices_value = bb.NOT_SET + self._has_more_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET if devices is not None: self.devices = devices if has_more is not None: @@ -10840,92 +6196,18 @@ def __init__(self, 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 + # Instance attribute type: list of [MemberDevices] (validator is set below) + devices = bb.Attribute("devices") - @devices.deleter - def devices(self): - self._devices_value = None - self._devices_present = False + # Instance attribute type: bool (validator is set below) + has_more = bb.Attribute("has_more") - @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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ListTeamDevicesResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -10938,9 +6220,7 @@ class MemberAccess(bb.Struct): __slots__ = [ '_user_value', - '_user_present', '_access_type_value', - '_access_type_present', ] _has_required_fields = True @@ -10948,70 +6228,22 @@ class MemberAccess(bb.Struct): 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 + self._user_value = bb.NOT_SET + self._access_type_value = bb.NOT_SET 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 + # Instance attribute type: UserSelectorArg (validator is set below) + user = bb.Attribute("user", user_defined=True) - @access_type.deleter - def access_type(self): - self._access_type_value = None - self._access_type_present = False + # Instance attribute type: GroupAccessType (validator is set below) + access_type = bb.Attribute("access_type", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberAccess, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -11031,21 +6263,13 @@ class MemberAddArg(bb.Struct): __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', '_is_directory_restricted_value', - '_is_directory_restricted_present', ] _has_required_fields = True @@ -11059,22 +6283,14 @@ def __init__(self, send_welcome_email=None, role=None, is_directory_restricted=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 - self._is_directory_restricted_value = None - self._is_directory_restricted_present = False + self._member_email_value = bb.NOT_SET + self._member_given_name_value = bb.NOT_SET + self._member_surname_value = bb.NOT_SET + self._member_external_id_value = bb.NOT_SET + self._member_persistent_id_value = bb.NOT_SET + self._send_welcome_email_value = bb.NOT_SET + self._role_value = bb.NOT_SET + self._is_directory_restricted_value = bb.NOT_SET if member_email is not None: self.member_email = member_email if member_given_name is not None: @@ -11092,220 +6308,33 @@ def __init__(self, if is_directory_restricted is not None: self.is_directory_restricted = is_directory_restricted - @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 + # Instance attribute type: str (validator is set below) + member_email = bb.Attribute("member_email") - @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 + # Instance attribute type: str (validator is set below) + member_given_name = bb.Attribute("member_given_name", nullable=True) - @member_external_id.deleter - def member_external_id(self): - self._member_external_id_value = None - self._member_external_id_present = False + # Instance attribute type: str (validator is set below) + member_surname = bb.Attribute("member_surname", nullable=True) - @property - def member_persistent_id(self): - """ - Persistent ID for member. This field is only available to teams using - persistent ID SAML configuration. + # Instance attribute type: str (validator is set below) + member_external_id = bb.Attribute("member_external_id", nullable=True) - :rtype: str - """ - if self._member_persistent_id_present: - return self._member_persistent_id_value - else: - return None + # Instance attribute type: str (validator is set below) + member_persistent_id = bb.Attribute("member_persistent_id", nullable=True) - @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 + # Instance attribute type: bool (validator is set below) + send_welcome_email = bb.Attribute("send_welcome_email") - @member_persistent_id.deleter - def member_persistent_id(self): - self._member_persistent_id_value = None - self._member_persistent_id_present = False + # Instance attribute type: AdminTier (validator is set below) + role = bb.Attribute("role", user_defined=True) - @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 - - @property - def is_directory_restricted(self): - """ - Whether a user is directory restricted. - - :rtype: bool - """ - if self._is_directory_restricted_present: - return self._is_directory_restricted_value - else: - return None - - @is_directory_restricted.setter - def is_directory_restricted(self, val): - if val is None: - del self.is_directory_restricted - return - val = self._is_directory_restricted_validator.validate(val) - self._is_directory_restricted_value = val - self._is_directory_restricted_present = True - - @is_directory_restricted.deleter - def is_directory_restricted(self): - self._is_directory_restricted_value = None - self._is_directory_restricted_present = False + # Instance attribute type: bool (validator is set below) + is_directory_restricted = bb.Attribute("is_directory_restricted", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberAddArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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}, is_directory_restricted={!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, - self._is_directory_restricted_value, - ) - MemberAddArg_validator = bv.Struct(MemberAddArg) class MemberAddResult(bb.Union): @@ -11701,9 +6730,6 @@ def get_user_creation_failed(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberAddResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberAddResult(%r, %r)' % (self._tag, self._value) - MemberAddResult_validator = bv.Union(MemberAddResult) class MemberDevices(bb.Struct): @@ -11721,13 +6747,9 @@ class MemberDevices(bb.Struct): __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 @@ -11737,14 +6759,10 @@ def __init__(self, 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 + self._team_member_id_value = bb.NOT_SET + self._web_sessions_value = bb.NOT_SET + self._desktop_clients_value = bb.NOT_SET + self._mobile_clients_value = bb.NOT_SET if team_member_id is not None: self.team_member_id = team_member_id if web_sessions is not None: @@ -11754,118 +6772,21 @@ def __init__(self, if mobile_clients is not None: self.mobile_clients = mobile_clients - @property - def team_member_id(self): - """ - The member unique Id. + # Instance attribute type: str (validator is set below) + team_member_id = bb.Attribute("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 - - @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 + # Instance attribute type: list of [ActiveWebSession] (validator is set below) + web_sessions = bb.Attribute("web_sessions", nullable=True) + + # Instance attribute type: list of [DesktopClientSession] (validator is set below) + desktop_clients = bb.Attribute("desktop_clients", nullable=True) + + # Instance attribute type: list of [MobileClientSession] (validator is set below) + mobile_clients = bb.Attribute("mobile_clients", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberDevices, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -11879,9 +6800,7 @@ class MemberLinkedApps(bb.Struct): __slots__ = [ '_team_member_id_value', - '_team_member_id_present', '_linked_api_apps_value', - '_linked_api_apps_present', ] _has_required_fields = True @@ -11889,70 +6808,22 @@ class MemberLinkedApps(bb.Struct): 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 + self._team_member_id_value = bb.NOT_SET + self._linked_api_apps_value = bb.NOT_SET 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. + # Instance attribute type: str (validator is set below) + team_member_id = bb.Attribute("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 - - @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 + # Instance attribute type: list of [ApiApp] (validator is set below) + linked_api_apps = bb.Attribute("linked_api_apps") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberLinkedApps, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -11993,35 +6864,20 @@ class MemberProfile(bb.Struct): __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', '_secondary_emails_value', - '_secondary_emails_present', '_status_value', - '_status_present', '_name_value', - '_name_present', '_membership_type_value', - '_membership_type_present', '_invited_on_value', - '_invited_on_present', '_joined_on_value', - '_joined_on_present', '_suspended_on_value', - '_suspended_on_present', '_persistent_id_value', - '_persistent_id_present', '_is_directory_restricted_value', - '_is_directory_restricted_present', '_profile_photo_url_value', - '_profile_photo_url_present', ] _has_required_fields = True @@ -12042,36 +6898,21 @@ def __init__(self, persistent_id=None, is_directory_restricted=None, profile_photo_url=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._secondary_emails_value = None - self._secondary_emails_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._invited_on_value = None - self._invited_on_present = False - self._joined_on_value = None - self._joined_on_present = False - self._suspended_on_value = None - self._suspended_on_present = False - self._persistent_id_value = None - self._persistent_id_present = False - self._is_directory_restricted_value = None - self._is_directory_restricted_present = False - self._profile_photo_url_value = None - self._profile_photo_url_present = False + self._team_member_id_value = bb.NOT_SET + self._external_id_value = bb.NOT_SET + self._account_id_value = bb.NOT_SET + self._email_value = bb.NOT_SET + self._email_verified_value = bb.NOT_SET + self._secondary_emails_value = bb.NOT_SET + self._status_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._membership_type_value = bb.NOT_SET + self._invited_on_value = bb.NOT_SET + self._joined_on_value = bb.NOT_SET + self._suspended_on_value = bb.NOT_SET + self._persistent_id_value = bb.NOT_SET + self._is_directory_restricted_value = bb.NOT_SET + self._profile_photo_url_value = bb.NOT_SET if team_member_id is not None: self.team_member_id = team_member_id if external_id is not None: @@ -12085,424 +6926,72 @@ def __init__(self, if secondary_emails is not None: self.secondary_emails = secondary_emails 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 invited_on is not None: - self.invited_on = invited_on - if joined_on is not None: - self.joined_on = joined_on - if suspended_on is not None: - self.suspended_on = suspended_on - if persistent_id is not None: - self.persistent_id = persistent_id - if is_directory_restricted is not None: - self.is_directory_restricted = is_directory_restricted - if profile_photo_url is not None: - self.profile_photo_url = profile_photo_url - - @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 secondary_emails(self): - """ - Secondary emails of a user. - - :rtype: list of [secondary_emails.SecondaryEmail] - """ - if self._secondary_emails_present: - return self._secondary_emails_value - else: - return None - - @secondary_emails.setter - def secondary_emails(self, val): - if val is None: - del self.secondary_emails - return - val = self._secondary_emails_validator.validate(val) - self._secondary_emails_value = val - self._secondary_emails_present = True + self.status = status + if name is not None: + self.name = name + if membership_type is not None: + self.membership_type = membership_type + if invited_on is not None: + self.invited_on = invited_on + if joined_on is not None: + self.joined_on = joined_on + if suspended_on is not None: + self.suspended_on = suspended_on + if persistent_id is not None: + self.persistent_id = persistent_id + if is_directory_restricted is not None: + self.is_directory_restricted = is_directory_restricted + if profile_photo_url is not None: + self.profile_photo_url = profile_photo_url - @secondary_emails.deleter - def secondary_emails(self): - self._secondary_emails_value = None - self._secondary_emails_present = False + # Instance attribute type: str (validator is set below) + team_member_id = bb.Attribute("team_member_id") - @property - def status(self): - """ - The user's status as a member of a specific team. + # Instance attribute type: str (validator is set below) + external_id = bb.Attribute("external_id", nullable=True) - :rtype: TeamMemberStatus - """ - if self._status_present: - return self._status_value - else: - raise AttributeError("missing required field 'status'") + # Instance attribute type: str (validator is set below) + account_id = bb.Attribute("account_id", nullable=True) - @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 - """ - 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 invited_on(self): - """ - The date and time the user was invited to the team (contains value only - when the member's status matches ``TeamMemberStatus.invited``). - - :rtype: datetime.datetime - """ - if self._invited_on_present: - return self._invited_on_value - else: - return None - - @invited_on.setter - def invited_on(self, val): - if val is None: - del self.invited_on - return - val = self._invited_on_validator.validate(val) - self._invited_on_value = val - self._invited_on_present = True - - @invited_on.deleter - def invited_on(self): - self._invited_on_value = None - self._invited_on_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 + # Instance attribute type: str (validator is set below) + email = bb.Attribute("email") - @joined_on.deleter - def joined_on(self): - self._joined_on_value = None - self._joined_on_present = False + # Instance attribute type: bool (validator is set below) + email_verified = bb.Attribute("email_verified") - @property - def suspended_on(self): - """ - The date and time the user was suspended from the team (contains value - only when the member's status matches ``TeamMemberStatus.suspended``). - - :rtype: datetime.datetime - """ - if self._suspended_on_present: - return self._suspended_on_value - else: - return None - - @suspended_on.setter - def suspended_on(self, val): - if val is None: - del self.suspended_on - return - val = self._suspended_on_validator.validate(val) - self._suspended_on_value = val - self._suspended_on_present = True - - @suspended_on.deleter - def suspended_on(self): - self._suspended_on_value = None - self._suspended_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. + # Instance attribute type: list of [secondary_emails.SecondaryEmail] (validator is set below) + secondary_emails = bb.Attribute("secondary_emails", nullable=True) - :rtype: str - """ - if self._persistent_id_present: - return self._persistent_id_value - else: - return None + # Instance attribute type: TeamMemberStatus (validator is set below) + status = bb.Attribute("status", user_defined=True) - @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 + # Instance attribute type: users.Name (validator is set below) + name = bb.Attribute("name", user_defined=True) - @persistent_id.deleter - def persistent_id(self): - self._persistent_id_value = None - self._persistent_id_present = False + # Instance attribute type: TeamMembershipType (validator is set below) + membership_type = bb.Attribute("membership_type", user_defined=True) - @property - def is_directory_restricted(self): - """ - Whether the user is a directory restricted user. + # Instance attribute type: datetime.datetime (validator is set below) + invited_on = bb.Attribute("invited_on", nullable=True) - :rtype: bool - """ - if self._is_directory_restricted_present: - return self._is_directory_restricted_value - else: - return None + # Instance attribute type: datetime.datetime (validator is set below) + joined_on = bb.Attribute("joined_on", nullable=True) - @is_directory_restricted.setter - def is_directory_restricted(self, val): - if val is None: - del self.is_directory_restricted - return - val = self._is_directory_restricted_validator.validate(val) - self._is_directory_restricted_value = val - self._is_directory_restricted_present = True + # Instance attribute type: datetime.datetime (validator is set below) + suspended_on = bb.Attribute("suspended_on", nullable=True) - @is_directory_restricted.deleter - def is_directory_restricted(self): - self._is_directory_restricted_value = None - self._is_directory_restricted_present = False + # Instance attribute type: str (validator is set below) + persistent_id = bb.Attribute("persistent_id", nullable=True) - @property - def profile_photo_url(self): - """ - URL for the photo representing the user, if one is set. + # Instance attribute type: bool (validator is set below) + is_directory_restricted = bb.Attribute("is_directory_restricted", nullable=True) - :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 + # Instance attribute type: str (validator is set below) + profile_photo_url = bb.Attribute("profile_photo_url", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberProfile, self)._process_custom_annotations(annotation_type, field_path, processor) - 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}, secondary_emails={!r}, invited_on={!r}, joined_on={!r}, suspended_on={!r}, persistent_id={!r}, is_directory_restricted={!r}, profile_photo_url={!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._secondary_emails_value, - self._invited_on_value, - self._joined_on_value, - self._suspended_on_value, - self._persistent_id_value, - self._is_directory_restricted_value, - self._profile_photo_url_value, - ) - MemberProfile_validator = bv.Struct(MemberProfile) class UserSelectorError(bb.Union): @@ -12534,9 +7023,6 @@ def is_user_not_found(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserSelectorError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UserSelectorError(%r, %r)' % (self._tag, self._value) - UserSelectorError_validator = bv.Union(UserSelectorError) class MemberSelectorError(UserSelectorError): @@ -12563,9 +7049,6 @@ def is_user_not_in_team(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSelectorError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSelectorError(%r, %r)' % (self._tag, self._value) - MemberSelectorError_validator = bv.Union(MemberSelectorError) class MembersAddArg(bb.Struct): @@ -12578,9 +7061,7 @@ class MembersAddArg(bb.Struct): __slots__ = [ '_new_members_value', - '_new_members_present', '_force_async_value', - '_force_async_present', ] _has_required_fields = True @@ -12588,70 +7069,22 @@ class MembersAddArg(bb.Struct): 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 + self._new_members_value = bb.NOT_SET + self._force_async_value = bb.NOT_SET 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 + # Instance attribute type: list of [MemberAddArg] (validator is set below) + new_members = bb.Attribute("new_members") - @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 + # Instance attribute type: bool (validator is set below) + force_async = bb.Attribute("force_async") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersAddArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -12710,8 +7143,8 @@ 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. + :meth:`dropbox.dropbox_client.Dropbox.team_members_add`, a corresponding + item is returned in this list. Only call this if :meth:`is_complete` is true. @@ -12737,9 +7170,6 @@ def get_failed(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersAddJobStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersAddJobStatus(%r, %r)' % (self._tag, self._value) - MembersAddJobStatus_validator = bv.Union(MembersAddJobStatus) class MembersAddLaunch(async_.LaunchResultBase): @@ -12781,9 +7211,6 @@ def get_complete(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersAddLaunch, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersAddLaunch(%r, %r)' % (self._tag, self._value) - MembersAddLaunch_validator = bv.Union(MembersAddLaunch) class MembersDeactivateBaseArg(bb.Struct): @@ -12797,49 +7224,22 @@ class MembersDeactivateBaseArg(bb.Struct): __slots__ = [ '_user_value', - '_user_present', ] _has_required_fields = True def __init__(self, user=None): - self._user_value = None - self._user_present = False + self._user_value = bb.NOT_SET if user is not None: self.user = user - @property - def user(self): - """ - Identity of user to remove/suspend/have their files moved. - - :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 + # Instance attribute type: UserSelectorArg (validator is set below) + user = bb.Attribute("user", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersDeactivateBaseArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersDeactivateBaseArg(user={!r})'.format( - self._user_value, - ) - MembersDeactivateBaseArg_validator = bv.Struct(MembersDeactivateBaseArg) class MembersDataTransferArg(MembersDeactivateBaseArg): @@ -12852,9 +7252,7 @@ class MembersDataTransferArg(MembersDeactivateBaseArg): __slots__ = [ '_transfer_dest_id_value', - '_transfer_dest_id_present', '_transfer_admin_id_value', - '_transfer_admin_id_present', ] _has_required_fields = True @@ -12864,71 +7262,22 @@ def __init__(self, transfer_dest_id=None, transfer_admin_id=None): super(MembersDataTransferArg, self).__init__(user) - 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._transfer_dest_id_value = bb.NOT_SET + self._transfer_admin_id_value = bb.NOT_SET 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 - @property - def transfer_dest_id(self): - """ - 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: - raise AttributeError("missing required field 'transfer_dest_id'") - - @transfer_dest_id.setter - def transfer_dest_id(self, val): - 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): - """ - Errors during the transfer process will be sent via email to this user. - - :rtype: UserSelectorArg - """ - if self._transfer_admin_id_present: - return self._transfer_admin_id_value - else: - raise AttributeError("missing required field 'transfer_admin_id'") - - @transfer_admin_id.setter - def transfer_admin_id(self, val): - self._transfer_admin_id_validator.validate_type_only(val) - self._transfer_admin_id_value = val - self._transfer_admin_id_present = True + # Instance attribute type: UserSelectorArg (validator is set below) + transfer_dest_id = bb.Attribute("transfer_dest_id", user_defined=True) - @transfer_admin_id.deleter - def transfer_admin_id(self): - self._transfer_admin_id_value = None - self._transfer_admin_id_present = False + # Instance attribute type: UserSelectorArg (validator is set below) + transfer_admin_id = bb.Attribute("transfer_admin_id", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersDataTransferArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersDataTransferArg(user={!r}, transfer_dest_id={!r}, transfer_admin_id={!r})'.format( - self._user_value, - self._transfer_dest_id_value, - self._transfer_admin_id_value, - ) - MembersDataTransferArg_validator = bv.Struct(MembersDataTransferArg) class MembersDeactivateArg(MembersDeactivateBaseArg): @@ -12939,7 +7288,6 @@ class MembersDeactivateArg(MembersDeactivateBaseArg): __slots__ = [ '_wipe_data_value', - '_wipe_data_present', ] _has_required_fields = True @@ -12948,44 +7296,16 @@ def __init__(self, user=None, wipe_data=None): super(MembersDeactivateArg, self).__init__(user) - self._wipe_data_value = None - self._wipe_data_present = False + self._wipe_data_value = bb.NOT_SET if wipe_data is not None: self.wipe_data = wipe_data - @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 + # Instance attribute type: bool (validator is set below) + wipe_data = bb.Attribute("wipe_data") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersDeactivateArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -13023,9 +7343,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersDeactivateError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersDeactivateError(%r, %r)' % (self._tag, self._value) - MembersDeactivateError_validator = bv.Union(MembersDeactivateError) class MembersDeleteProfilePhotoArg(bb.Struct): @@ -13036,49 +7353,22 @@ class MembersDeleteProfilePhotoArg(bb.Struct): __slots__ = [ '_user_value', - '_user_present', ] _has_required_fields = True def __init__(self, user=None): - self._user_value = None - self._user_present = False + self._user_value = bb.NOT_SET if user is not None: self.user = user - @property - def user(self): - """ - Identity of the user whose profile photo will be deleted. - - :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 + # Instance attribute type: UserSelectorArg (validator is set below) + user = bb.Attribute("user", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersDeleteProfilePhotoArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersDeleteProfilePhotoArg(user={!r})'.format( - self._user_value, - ) - MembersDeleteProfilePhotoArg_validator = bv.Struct(MembersDeleteProfilePhotoArg) class MembersDeleteProfilePhotoError(MemberSelectorError): @@ -13116,9 +7406,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersDeleteProfilePhotoError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersDeleteProfilePhotoError(%r, %r)' % (self._tag, self._value) - MembersDeleteProfilePhotoError_validator = bv.Union(MembersDeleteProfilePhotoError) class MembersGetInfoArgs(bb.Struct): @@ -13128,49 +7415,22 @@ class MembersGetInfoArgs(bb.Struct): __slots__ = [ '_members_value', - '_members_present', ] _has_required_fields = True def __init__(self, members=None): - self._members_value = None - self._members_present = False + self._members_value = bb.NOT_SET 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 + # Instance attribute type: list of [UserSelectorArg] (validator is set below) + members = bb.Attribute("members") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersGetInfoArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersGetInfoArgs(members={!r})'.format( - self._members_value, - ) - MembersGetInfoArgs_validator = bv.Struct(MembersGetInfoArgs) class MembersGetInfoError(bb.Union): @@ -13195,15 +7455,12 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersGetInfoError, self)._process_custom_annotations(annotation_type, field_path, processor) - 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`. + parameter of :meth:`dropbox.dropbox_client.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 @@ -13260,9 +7517,9 @@ def is_member_info(self): 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. + :meth:`dropbox.dropbox_client.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. @@ -13287,9 +7544,6 @@ def get_member_info(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersGetInfoItem, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersGetInfoItem(%r, %r)' % (self._tag, self._value) - MembersGetInfoItem_validator = bv.Union(MembersGetInfoItem) class MembersInfo(bb.Struct): @@ -13302,9 +7556,7 @@ class MembersInfo(bb.Struct): __slots__ = [ '_team_member_ids_value', - '_team_member_ids_present', '_permanently_deleted_users_value', - '_permanently_deleted_users_present', ] _has_required_fields = True @@ -13312,70 +7564,22 @@ class MembersInfo(bb.Struct): def __init__(self, team_member_ids=None, permanently_deleted_users=None): - self._team_member_ids_value = None - self._team_member_ids_present = False - self._permanently_deleted_users_value = None - self._permanently_deleted_users_present = False + self._team_member_ids_value = bb.NOT_SET + self._permanently_deleted_users_value = bb.NOT_SET if team_member_ids is not None: self.team_member_ids = team_member_ids if permanently_deleted_users is not None: self.permanently_deleted_users = permanently_deleted_users - @property - def team_member_ids(self): - """ - Team member IDs of the users under this hold. - - :rtype: list of [str] - """ - if self._team_member_ids_present: - return self._team_member_ids_value - else: - raise AttributeError("missing required field 'team_member_ids'") - - @team_member_ids.setter - def team_member_ids(self, val): - val = self._team_member_ids_validator.validate(val) - self._team_member_ids_value = val - self._team_member_ids_present = True + # Instance attribute type: list of [str] (validator is set below) + team_member_ids = bb.Attribute("team_member_ids") - @team_member_ids.deleter - def team_member_ids(self): - self._team_member_ids_value = None - self._team_member_ids_present = False - - @property - def permanently_deleted_users(self): - """ - The number of permanently deleted users that were under this hold. - - :rtype: int - """ - if self._permanently_deleted_users_present: - return self._permanently_deleted_users_value - else: - raise AttributeError("missing required field 'permanently_deleted_users'") - - @permanently_deleted_users.setter - def permanently_deleted_users(self, val): - val = self._permanently_deleted_users_validator.validate(val) - self._permanently_deleted_users_value = val - self._permanently_deleted_users_present = True - - @permanently_deleted_users.deleter - def permanently_deleted_users(self): - self._permanently_deleted_users_value = None - self._permanently_deleted_users_present = False + # Instance attribute type: int (validator is set below) + permanently_deleted_users = bb.Attribute("permanently_deleted_users") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersInfo(team_member_ids={!r}, permanently_deleted_users={!r})'.format( - self._team_member_ids_value, - self._permanently_deleted_users_value, - ) - MembersInfo_validator = bv.Struct(MembersInfo) class MembersListArg(bb.Struct): @@ -13387,9 +7591,7 @@ class MembersListArg(bb.Struct): __slots__ = [ '_limit_value', - '_limit_present', '_include_removed_value', - '_include_removed_present', ] _has_required_fields = False @@ -13397,70 +7599,22 @@ class MembersListArg(bb.Struct): 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 + self._limit_value = bb.NOT_SET + self._include_removed_value = bb.NOT_SET 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: int - """ - 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 + # Instance attribute type: int (validator is set below) + limit = bb.Attribute("limit") - @include_removed.deleter - def include_removed(self): - self._include_removed_value = None - self._include_removed_present = False + # Instance attribute type: bool (validator is set below) + include_removed = bb.Attribute("include_removed") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersListArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -13471,49 +7625,22 @@ class MembersListContinueArg(bb.Struct): __slots__ = [ '_cursor_value', - '_cursor_present', ] _has_required_fields = True def __init__(self, cursor=None): - self._cursor_value = None - self._cursor_present = False + self._cursor_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersListContinueArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersListContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - MembersListContinueArg_validator = bv.Struct(MembersListContinueArg) class MembersListContinueError(bb.Union): @@ -13550,9 +7677,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersListContinueError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersListContinueError(%r, %r)' % (self._tag, self._value) - MembersListContinueError_validator = bv.Union(MembersListContinueError) class MembersListError(bb.Union): @@ -13577,30 +7701,24 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersListError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersListError(%r, %r)' % (self._tag, self._value) - MembersListError_validator = bv.Union(MembersListError) class MembersListResult(bb.Struct): """ :ivar team.MembersListResult.members: List of team members. :ivar team.MembersListResult.cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_members_list_continue` to obtain the - additional members. + :meth:`dropbox.dropbox_client.Dropbox.team_members_list_continue` to + obtain the additional members. :ivar team.MembersListResult.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. + :meth:`dropbox.dropbox_client.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 @@ -13609,12 +7727,9 @@ 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 + self._members_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET + self._has_more_value = bb.NOT_SET if members is not None: self.members = members if cursor is not None: @@ -13622,90 +7737,18 @@ def __init__(self, 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'") + # Instance attribute type: list of [TeamMemberInfo] (validator is set below) + members = bb.Attribute("members") - @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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False + # Instance attribute type: bool (validator is set below) + has_more = bb.Attribute("has_more") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersListResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -13718,49 +7761,22 @@ class MembersRecoverArg(bb.Struct): __slots__ = [ '_user_value', - '_user_present', ] _has_required_fields = True def __init__(self, user=None): - self._user_value = None - self._user_present = False + self._user_value = bb.NOT_SET 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 + # Instance attribute type: UserSelectorArg (validator is set below) + user = bb.Attribute("user", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersRecoverArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersRecoverArg(user={!r})'.format( - self._user_value, - ) - MembersRecoverArg_validator = bv.Struct(MembersRecoverArg) class MembersRecoverError(UserSelectorError): @@ -13822,9 +7838,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersRecoverError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersRecoverError(%r, %r)' % (self._tag, self._value) - MembersRecoverError_validator = bv.Union(MembersRecoverError) class MembersRemoveArg(MembersDeactivateArg): @@ -13851,13 +7864,9 @@ class MembersRemoveArg(MembersDeactivateArg): __slots__ = [ '_transfer_dest_id_value', - '_transfer_dest_id_present', '_transfer_admin_id_value', - '_transfer_admin_id_present', '_keep_account_value', - '_keep_account_present', '_retain_team_shares_value', - '_retain_team_shares_present', ] _has_required_fields = True @@ -13871,14 +7880,10 @@ def __init__(self, retain_team_shares=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 - self._retain_team_shares_value = None - self._retain_team_shares_present = False + self._transfer_dest_id_value = bb.NOT_SET + self._transfer_admin_id_value = bb.NOT_SET + self._keep_account_value = bb.NOT_SET + self._retain_team_shares_value = bb.NOT_SET if transfer_dest_id is not None: self.transfer_dest_id = transfer_dest_id if transfer_admin_id is not None: @@ -13888,128 +7893,21 @@ def __init__(self, if retain_team_shares is not None: self.retain_team_shares = retain_team_shares - @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``. + # Instance attribute type: UserSelectorArg (validator is set below) + transfer_dest_id = bb.Attribute("transfer_dest_id", nullable=True, user_defined=True) - :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 - - @property - def retain_team_shares(self): - """ - If provided, allows removed users to keep access to Dropbox folders (not - Dropbox Paper folders) already explicitly shared with them (not via a - group) when they are downgraded to a Basic account. Users will not - retain access to folders that do not allow external sharing. In order to - keep the sharing relationships, the arguments ``wipe_data`` should be - set to ``False`` and ``keep_account`` should be set to ``True``. - - :rtype: bool - """ - if self._retain_team_shares_present: - return self._retain_team_shares_value - else: - return False + # Instance attribute type: UserSelectorArg (validator is set below) + transfer_admin_id = bb.Attribute("transfer_admin_id", nullable=True, user_defined=True) - @retain_team_shares.setter - def retain_team_shares(self, val): - val = self._retain_team_shares_validator.validate(val) - self._retain_team_shares_value = val - self._retain_team_shares_present = True + # Instance attribute type: bool (validator is set below) + keep_account = bb.Attribute("keep_account") - @retain_team_shares.deleter - def retain_team_shares(self): - self._retain_team_shares_value = None - self._retain_team_shares_present = False + # Instance attribute type: bool (validator is set below) + retain_team_shares = bb.Attribute("retain_team_shares") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersRemoveArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersRemoveArg(user={!r}, wipe_data={!r}, transfer_dest_id={!r}, transfer_admin_id={!r}, keep_account={!r}, retain_team_shares={!r})'.format( - self._user_value, - self._wipe_data_value, - self._transfer_dest_id_value, - self._transfer_admin_id_value, - self._keep_account_value, - self._retain_team_shares_value, - ) - MembersRemoveArg_validator = bv.Struct(MembersRemoveArg) class MembersTransferFilesError(MembersDeactivateError): @@ -14135,9 +8033,6 @@ def is_recipient_not_verified(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersTransferFilesError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersTransferFilesError(%r, %r)' % (self._tag, self._value) - MembersTransferFilesError_validator = bv.Union(MembersTransferFilesError) class MembersRemoveError(MembersTransferFilesError): @@ -14291,9 +8186,6 @@ def is_cannot_keep_account_required_to_sign_tos(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersRemoveError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersRemoveError(%r, %r)' % (self._tag, self._value) - MembersRemoveError_validator = bv.Union(MembersRemoveError) class MembersSendWelcomeError(MemberSelectorError): @@ -14318,9 +8210,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersSendWelcomeError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersSendWelcomeError(%r, %r)' % (self._tag, self._value) - MembersSendWelcomeError_validator = bv.Union(MembersSendWelcomeError) class MembersSetPermissionsArg(bb.Struct): @@ -14335,9 +8224,7 @@ class MembersSetPermissionsArg(bb.Struct): __slots__ = [ '_user_value', - '_user_present', '_new_role_value', - '_new_role_present', ] _has_required_fields = True @@ -14345,70 +8232,22 @@ class MembersSetPermissionsArg(bb.Struct): 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 + self._user_value = bb.NOT_SET + self._new_role_value = bb.NOT_SET 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 + # Instance attribute type: UserSelectorArg (validator is set below) + user = bb.Attribute("user", user_defined=True) - @new_role.deleter - def new_role(self): - self._new_role_value = None - self._new_role_present = False + # Instance attribute type: AdminTier (validator is set below) + new_role = bb.Attribute("new_role", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersSetPermissionsArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -14482,9 +8321,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersSetPermissionsError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersSetPermissionsError(%r, %r)' % (self._tag, self._value) - MembersSetPermissionsError_validator = bv.Union(MembersSetPermissionsError) class MembersSetPermissionsResult(bb.Struct): @@ -14496,9 +8332,7 @@ class MembersSetPermissionsResult(bb.Struct): __slots__ = [ '_team_member_id_value', - '_team_member_id_present', '_role_value', - '_role_present', ] _has_required_fields = True @@ -14506,70 +8340,22 @@ class MembersSetPermissionsResult(bb.Struct): 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 + self._team_member_id_value = bb.NOT_SET + self._role_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + team_member_id = bb.Attribute("team_member_id") - @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 + # Instance attribute type: AdminTier (validator is set below) + role = bb.Attribute("role", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersSetPermissionsResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -14592,19 +8378,12 @@ class MembersSetProfileArg(bb.Struct): __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', '_new_is_directory_restricted_value', - '_new_is_directory_restricted_present', ] _has_required_fields = True @@ -14617,229 +8396,52 @@ def __init__(self, new_surname=None, new_persistent_id=None, new_is_directory_restricted=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 - self._new_is_directory_restricted_value = None - self._new_is_directory_restricted_present = False + self._user_value = bb.NOT_SET + self._new_email_value = bb.NOT_SET + self._new_external_id_value = bb.NOT_SET + self._new_given_name_value = bb.NOT_SET + self._new_surname_value = bb.NOT_SET + self._new_persistent_id_value = bb.NOT_SET + self._new_is_directory_restricted_value = bb.NOT_SET 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 - if new_is_directory_restricted is not None: - self.new_is_directory_restricted = new_is_directory_restricted - - @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. + 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 + if new_is_directory_restricted is not None: + self.new_is_directory_restricted = new_is_directory_restricted - :rtype: str - """ - if self._new_persistent_id_present: - return self._new_persistent_id_value - else: - return None + # Instance attribute type: UserSelectorArg (validator is set below) + user = bb.Attribute("user", user_defined=True) - @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 + # Instance attribute type: str (validator is set below) + new_email = bb.Attribute("new_email", nullable=True) - @new_persistent_id.deleter - def new_persistent_id(self): - self._new_persistent_id_value = None - self._new_persistent_id_present = False + # Instance attribute type: str (validator is set below) + new_external_id = bb.Attribute("new_external_id", nullable=True) - @property - def new_is_directory_restricted(self): - """ - New value for whether the user is a directory restricted user. + # Instance attribute type: str (validator is set below) + new_given_name = bb.Attribute("new_given_name", nullable=True) - :rtype: bool - """ - if self._new_is_directory_restricted_present: - return self._new_is_directory_restricted_value - else: - return None + # Instance attribute type: str (validator is set below) + new_surname = bb.Attribute("new_surname", nullable=True) - @new_is_directory_restricted.setter - def new_is_directory_restricted(self, val): - if val is None: - del self.new_is_directory_restricted - return - val = self._new_is_directory_restricted_validator.validate(val) - self._new_is_directory_restricted_value = val - self._new_is_directory_restricted_present = True + # Instance attribute type: str (validator is set below) + new_persistent_id = bb.Attribute("new_persistent_id", nullable=True) - @new_is_directory_restricted.deleter - def new_is_directory_restricted(self): - self._new_is_directory_restricted_value = None - self._new_is_directory_restricted_present = False + # Instance attribute type: bool (validator is set below) + new_is_directory_restricted = bb.Attribute("new_is_directory_restricted", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersSetProfileArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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}, new_is_directory_restricted={!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, - self._new_is_directory_restricted_value, - ) - MembersSetProfileArg_validator = bv.Struct(MembersSetProfileArg) class MembersSetProfileError(MemberSelectorError): @@ -14974,9 +8576,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersSetProfileError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersSetProfileError(%r, %r)' % (self._tag, self._value) - MembersSetProfileError_validator = bv.Union(MembersSetProfileError) class MembersSetProfilePhotoArg(bb.Struct): @@ -14989,9 +8588,7 @@ class MembersSetProfilePhotoArg(bb.Struct): __slots__ = [ '_user_value', - '_user_present', '_photo_value', - '_photo_present', ] _has_required_fields = True @@ -14999,70 +8596,22 @@ class MembersSetProfilePhotoArg(bb.Struct): def __init__(self, user=None, photo=None): - self._user_value = None - self._user_present = False - self._photo_value = None - self._photo_present = False + self._user_value = bb.NOT_SET + self._photo_value = bb.NOT_SET if user is not None: self.user = user if photo is not None: self.photo = photo - @property - def user(self): - """ - Identity of the user whose profile photo 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 photo(self): - """ - Image to set as the member's new profile photo. - - :rtype: account.PhotoSourceArg - """ - if self._photo_present: - return self._photo_value - else: - raise AttributeError("missing required field 'photo'") - - @photo.setter - def photo(self, val): - self._photo_validator.validate_type_only(val) - self._photo_value = val - self._photo_present = True + # Instance attribute type: UserSelectorArg (validator is set below) + user = bb.Attribute("user", user_defined=True) - @photo.deleter - def photo(self): - self._photo_value = None - self._photo_present = False + # Instance attribute type: account.PhotoSourceArg (validator is set below) + photo = bb.Attribute("photo", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersSetProfilePhotoArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersSetProfilePhotoArg(user={!r}, photo={!r})'.format( - self._user_value, - self._photo_value, - ) - MembersSetProfilePhotoArg_validator = bv.Struct(MembersSetProfilePhotoArg) class MembersSetProfilePhotoError(MemberSelectorError): @@ -15129,9 +8678,6 @@ def get_photo_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersSetProfilePhotoError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersSetProfilePhotoError(%r, %r)' % (self._tag, self._value) - MembersSetProfilePhotoError_validator = bv.Union(MembersSetProfilePhotoError) class MembersSuspendError(MembersDeactivateError): @@ -15182,9 +8728,6 @@ def is_team_license_limit(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersSuspendError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersSuspendError(%r, %r)' % (self._tag, self._value) - MembersSuspendError_validator = bv.Union(MembersSuspendError) class MembersTransferFormerMembersFilesError(MembersTransferFilesError): @@ -15251,9 +8794,6 @@ def is_user_data_already_transferred(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersTransferFormerMembersFilesError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersTransferFormerMembersFilesError(%r, %r)' % (self._tag, self._value) - MembersTransferFormerMembersFilesError_validator = bv.Union(MembersTransferFormerMembersFilesError) class MembersUnsuspendArg(bb.Struct): @@ -15266,49 +8806,22 @@ class MembersUnsuspendArg(bb.Struct): __slots__ = [ '_user_value', - '_user_present', ] _has_required_fields = True def __init__(self, user=None): - self._user_value = None - self._user_present = False + self._user_value = bb.NOT_SET 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 + # Instance attribute type: UserSelectorArg (validator is set below) + user = bb.Attribute("user", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersUnsuspendArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersUnsuspendArg(user={!r})'.format( - self._user_value, - ) - MembersUnsuspendArg_validator = bv.Struct(MembersUnsuspendArg) class MembersUnsuspendError(MembersDeactivateError): @@ -15347,9 +8860,6 @@ def is_team_license_limit(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersUnsuspendError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MembersUnsuspendError(%r, %r)' % (self._tag, self._value) - MembersUnsuspendError_validator = bv.Union(MembersUnsuspendError) class MobileClientPlatform(bb.Union): @@ -15432,9 +8942,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MobileClientPlatform, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MobileClientPlatform(%r, %r)' % (self._tag, self._value) - MobileClientPlatform_validator = bv.Union(MobileClientPlatform) class MobileClientSession(DeviceSession): @@ -15451,15 +8958,10 @@ class MobileClientSession(DeviceSession): __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 @@ -15480,16 +8982,11 @@ def __init__(self, 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 + self._device_name_value = bb.NOT_SET + self._client_type_value = bb.NOT_SET + self._client_version_value = bb.NOT_SET + self._os_version_value = bb.NOT_SET + self._last_carrier_value = bb.NOT_SET if device_name is not None: self.device_name = device_name if client_type is not None: @@ -15501,147 +8998,24 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + device_name = bb.Attribute("device_name") - @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 + # Instance attribute type: MobileClientPlatform (validator is set below) + client_type = bb.Attribute("client_type", user_defined=True) - @os_version.deleter - def os_version(self): - self._os_version_value = None - self._os_version_present = False + # Instance attribute type: str (validator is set below) + client_version = bb.Attribute("client_version", nullable=True) - @property - def last_carrier(self): - """ - last carrier used by the device. + # Instance attribute type: str (validator is set below) + os_version = bb.Attribute("os_version", nullable=True) - :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 + # Instance attribute type: str (validator is set below) + last_carrier = bb.Attribute("last_carrier", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MobileClientSession, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -15658,13 +9032,9 @@ class NamespaceMetadata(bb.Struct): __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 @@ -15674,14 +9044,10 @@ def __init__(self, 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 + self._name_value = bb.NOT_SET + self._namespace_id_value = bb.NOT_SET + self._namespace_type_value = bb.NOT_SET + self._team_member_id_value = bb.NOT_SET if name is not None: self.name = name if namespace_id is not None: @@ -15691,113 +9057,21 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - @namespace_type.deleter - def namespace_type(self): - self._namespace_type_value = None - self._namespace_type_present = False + # Instance attribute type: str (validator is set below) + namespace_id = bb.Attribute("namespace_id") - @property - def team_member_id(self): - """ - If this is a team member or app folder, the ID of the owning team - member. Otherwise, this field is not present. + # Instance attribute type: NamespaceType (validator is set below) + namespace_type = bb.Attribute("namespace_type", user_defined=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 + # Instance attribute type: str (validator is set below) + team_member_id = bb.Attribute("team_member_id", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(NamespaceMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -15867,9 +9141,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(NamespaceType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NamespaceType(%r, %r)' % (self._tag, self._value) - NamespaceType_validator = bv.Union(NamespaceType) class RemoveCustomQuotaResult(bb.Union): @@ -15963,9 +9234,6 @@ def get_invalid_user(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RemoveCustomQuotaResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RemoveCustomQuotaResult(%r, %r)' % (self._tag, self._value) - RemoveCustomQuotaResult_validator = bv.Union(RemoveCustomQuotaResult) class RemovedStatus(bb.Struct): @@ -15978,9 +9246,7 @@ class RemovedStatus(bb.Struct): __slots__ = [ '_is_recoverable_value', - '_is_recoverable_present', '_is_disconnected_value', - '_is_disconnected_present', ] _has_required_fields = True @@ -15988,70 +9254,22 @@ class RemovedStatus(bb.Struct): def __init__(self, is_recoverable=None, is_disconnected=None): - self._is_recoverable_value = None - self._is_recoverable_present = False - self._is_disconnected_value = None - self._is_disconnected_present = False + self._is_recoverable_value = bb.NOT_SET + self._is_disconnected_value = bb.NOT_SET if is_recoverable is not None: self.is_recoverable = is_recoverable if is_disconnected is not None: self.is_disconnected = is_disconnected - @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 - - @property - def is_disconnected(self): - """ - True if the team member's account was converted to individual account. + # Instance attribute type: bool (validator is set below) + is_recoverable = bb.Attribute("is_recoverable") - :rtype: bool - """ - if self._is_disconnected_present: - return self._is_disconnected_value - else: - raise AttributeError("missing required field 'is_disconnected'") - - @is_disconnected.setter - def is_disconnected(self, val): - val = self._is_disconnected_validator.validate(val) - self._is_disconnected_value = val - self._is_disconnected_present = True - - @is_disconnected.deleter - def is_disconnected(self): - self._is_disconnected_value = None - self._is_disconnected_present = False + # Instance attribute type: bool (validator is set below) + is_disconnected = bb.Attribute("is_disconnected") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RemovedStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RemovedStatus(is_recoverable={!r}, is_disconnected={!r})'.format( - self._is_recoverable_value, - self._is_disconnected_value, - ) - RemovedStatus_validator = bv.Struct(RemovedStatus) class ResendSecondaryEmailResult(bb.Union): @@ -16183,9 +9401,6 @@ def get_rate_limited(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ResendSecondaryEmailResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ResendSecondaryEmailResult(%r, %r)' % (self._tag, self._value) - ResendSecondaryEmailResult_validator = bv.Union(ResendSecondaryEmailResult) class ResendVerificationEmailArg(bb.Struct): @@ -16196,49 +9411,22 @@ class ResendVerificationEmailArg(bb.Struct): __slots__ = [ '_emails_to_resend_value', - '_emails_to_resend_present', ] _has_required_fields = True def __init__(self, emails_to_resend=None): - self._emails_to_resend_value = None - self._emails_to_resend_present = False + self._emails_to_resend_value = bb.NOT_SET if emails_to_resend is not None: self.emails_to_resend = emails_to_resend - @property - def emails_to_resend(self): - """ - List of users and secondary emails to resend verification emails to. - - :rtype: list of [UserSecondaryEmailsArg] - """ - if self._emails_to_resend_present: - return self._emails_to_resend_value - else: - raise AttributeError("missing required field 'emails_to_resend'") - - @emails_to_resend.setter - def emails_to_resend(self, val): - val = self._emails_to_resend_validator.validate(val) - self._emails_to_resend_value = val - self._emails_to_resend_present = True - - @emails_to_resend.deleter - def emails_to_resend(self): - self._emails_to_resend_value = None - self._emails_to_resend_present = False + # Instance attribute type: list of [UserSecondaryEmailsArg] (validator is set below) + emails_to_resend = bb.Attribute("emails_to_resend") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ResendVerificationEmailArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ResendVerificationEmailArg(emails_to_resend={!r})'.format( - self._emails_to_resend_value, - ) - ResendVerificationEmailArg_validator = bv.Struct(ResendVerificationEmailArg) class ResendVerificationEmailResult(bb.Struct): @@ -16248,47 +9436,22 @@ class ResendVerificationEmailResult(bb.Struct): __slots__ = [ '_results_value', - '_results_present', ] _has_required_fields = True def __init__(self, results=None): - self._results_value = None - self._results_present = False + self._results_value = bb.NOT_SET if results is not None: self.results = results - @property - def results(self): - """ - :rtype: list of [UserResendResult] - """ - if self._results_present: - return self._results_value - else: - raise AttributeError("missing required field 'results'") - - @results.setter - def results(self, val): - val = self._results_validator.validate(val) - self._results_value = val - self._results_present = True - - @results.deleter - def results(self): - self._results_value = None - self._results_present = False + # Instance attribute type: list of [UserResendResult] (validator is set below) + results = bb.Attribute("results") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ResendVerificationEmailResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ResendVerificationEmailResult(results={!r})'.format( - self._results_value, - ) - ResendVerificationEmailResult_validator = bv.Struct(ResendVerificationEmailResult) class RevokeDesktopClientArg(DeviceSessionArg): @@ -16300,7 +9463,6 @@ class RevokeDesktopClientArg(DeviceSessionArg): __slots__ = [ '_delete_on_unlink_value', - '_delete_on_unlink_present', ] _has_required_fields = True @@ -16311,46 +9473,16 @@ def __init__(self, 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 + self._delete_on_unlink_value = bb.NOT_SET 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 + # Instance attribute type: bool (validator is set below) + delete_on_unlink = bb.Attribute("delete_on_unlink") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RevokeDesktopClientArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -16465,56 +9597,28 @@ def get_mobile_client(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RevokeDeviceSessionArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RevokeDeviceSessionArg(%r, %r)' % (self._tag, self._value) - RevokeDeviceSessionArg_validator = bv.Union(RevokeDeviceSessionArg) class RevokeDeviceSessionBatchArg(bb.Struct): __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 + self._revoke_devices_value = bb.NOT_SET 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 + # Instance attribute type: list of [RevokeDeviceSessionArg] (validator is set below) + revoke_devices = bb.Attribute("revoke_devices") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RevokeDeviceSessionBatchArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RevokeDeviceSessionBatchArg(revoke_devices={!r})'.format( - self._revoke_devices_value, - ) - RevokeDeviceSessionBatchArg_validator = bv.Struct(RevokeDeviceSessionBatchArg) class RevokeDeviceSessionBatchError(bb.Union): @@ -16539,56 +9643,28 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RevokeDeviceSessionBatchError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RevokeDeviceSessionBatchError(%r, %r)' % (self._tag, self._value) - RevokeDeviceSessionBatchError_validator = bv.Union(RevokeDeviceSessionBatchError) class RevokeDeviceSessionBatchResult(bb.Struct): __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 + self._revoke_devices_status_value = bb.NOT_SET 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 + # Instance attribute type: list of [RevokeDeviceSessionStatus] (validator is set below) + revoke_devices_status = bb.Attribute("revoke_devices_status") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RevokeDeviceSessionBatchResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RevokeDeviceSessionBatchResult(revoke_devices_status={!r})'.format( - self._revoke_devices_status_value, - ) - RevokeDeviceSessionBatchResult_validator = bv.Struct(RevokeDeviceSessionBatchResult) class RevokeDeviceSessionError(bb.Union): @@ -16637,9 +9713,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RevokeDeviceSessionError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RevokeDeviceSessionError(%r, %r)' % (self._tag, self._value) - RevokeDeviceSessionError_validator = bv.Union(RevokeDeviceSessionError) class RevokeDeviceSessionStatus(bb.Struct): @@ -16652,9 +9725,7 @@ class RevokeDeviceSessionStatus(bb.Struct): __slots__ = [ '_success_value', - '_success_present', '_error_type_value', - '_error_type_present', ] _has_required_fields = True @@ -16662,73 +9733,22 @@ class RevokeDeviceSessionStatus(bb.Struct): 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 + self._success_value = bb.NOT_SET + self._error_type_value = bb.NOT_SET 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 + # Instance attribute type: bool (validator is set below) + success = bb.Attribute("success") - @error_type.deleter - def error_type(self): - self._error_type_value = None - self._error_type_present = False + # Instance attribute type: RevokeDeviceSessionError (validator is set below) + error_type = bb.Attribute("error_type", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(RevokeDeviceSessionStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -16743,11 +9763,8 @@ class RevokeLinkedApiAppArg(bb.Struct): __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 @@ -16756,12 +9773,9 @@ 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 + self._app_id_value = bb.NOT_SET + self._team_member_id_value = bb.NOT_SET + self._keep_app_folder_value = bb.NOT_SET if app_id is not None: self.app_id = app_id if team_member_id is not None: @@ -16769,139 +9783,46 @@ def __init__(self, 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): - """ - This flag is not longer supported, the application dedicated folder (in - case the application uses one) will be kept. + # Instance attribute type: str (validator is set below) + app_id = bb.Attribute("app_id") - :rtype: bool - """ - if self._keep_app_folder_present: - return self._keep_app_folder_value - else: - return True + # Instance attribute type: str (validator is set below) + team_member_id = bb.Attribute("team_member_id") - @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 + # Instance attribute type: bool (validator is set below) + keep_app_folder = bb.Attribute("keep_app_folder") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RevokeLinkedApiAppArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): __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 + self._revoke_linked_app_value = bb.NOT_SET 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 + # Instance attribute type: list of [RevokeLinkedApiAppArg] (validator is set below) + revoke_linked_app = bb.Attribute("revoke_linked_app") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RevokeLinkedApiAppBatchArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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`. + :meth:`dropbox.dropbox_client.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 @@ -16923,62 +9844,34 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RevokeLinkedAppBatchError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RevokeLinkedAppBatchError(%r, %r)' % (self._tag, self._value) - RevokeLinkedAppBatchError_validator = bv.Union(RevokeLinkedAppBatchError) class RevokeLinkedAppBatchResult(bb.Struct): __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 + self._revoke_linked_app_status_value = bb.NOT_SET 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 + # Instance attribute type: list of [RevokeLinkedAppStatus] (validator is set below) + revoke_linked_app_status = bb.Attribute("revoke_linked_app_status") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RevokeLinkedAppBatchResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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`. + :meth:`dropbox.dropbox_client.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 @@ -17035,9 +9928,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RevokeLinkedAppError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RevokeLinkedAppError(%r, %r)' % (self._tag, self._value) - RevokeLinkedAppError_validator = bv.Union(RevokeLinkedAppError) class RevokeLinkedAppStatus(bb.Struct): @@ -17049,9 +9939,7 @@ class RevokeLinkedAppStatus(bb.Struct): __slots__ = [ '_success_value', - '_success_present', '_error_type_value', - '_error_type_present', ] _has_required_fields = True @@ -17059,73 +9947,22 @@ class RevokeLinkedAppStatus(bb.Struct): 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 + self._success_value = bb.NOT_SET + self._error_type_value = bb.NOT_SET 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 + # Instance attribute type: bool (validator is set below) + success = bb.Attribute("success") - @error_type.deleter - def error_type(self): - self._error_type_value = None - self._error_type_present = False + # Instance attribute type: RevokeLinkedAppError (validator is set below) + error_type = bb.Attribute("error_type", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(RevokeLinkedAppStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -17136,49 +9973,22 @@ class SetCustomQuotaArg(bb.Struct): __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 + self._users_and_quotas_value = bb.NOT_SET 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 + # Instance attribute type: list of [UserCustomQuotaArg] (validator is set below) + users_and_quotas = bb.Attribute("users_and_quotas") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SetCustomQuotaArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SetCustomQuotaArg(users_and_quotas={!r})'.format( - self._users_and_quotas_value, - ) - SetCustomQuotaArg_validator = bv.Struct(SetCustomQuotaArg) class SetCustomQuotaError(CustomQuotaError): @@ -17207,9 +10017,6 @@ def is_some_users_are_excluded(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SetCustomQuotaError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SetCustomQuotaError(%r, %r)' % (self._tag, self._value) - SetCustomQuotaError_validator = bv.Union(SetCustomQuotaError) class StorageBucket(bb.Struct): @@ -17224,9 +10031,7 @@ class StorageBucket(bb.Struct): __slots__ = [ '_bucket_value', - '_bucket_present', '_users_value', - '_users_present', ] _has_required_fields = True @@ -17234,72 +10039,22 @@ class StorageBucket(bb.Struct): def __init__(self, bucket=None, users=None): - self._bucket_value = None - self._bucket_present = False - self._users_value = None - self._users_present = False + self._bucket_value = bb.NOT_SET + self._users_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + bucket = bb.Attribute("bucket") - @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: int - """ - 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 + # Instance attribute type: int (validator is set below) + users = bb.Attribute("users") def _process_custom_annotations(self, annotation_type, field_path, processor): super(StorageBucket, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -17349,9 +10104,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderAccessError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderAccessError(%r, %r)' % (self._tag, self._value) - TeamFolderAccessError_validator = bv.Union(TeamFolderAccessError) class TeamFolderActivateError(BaseTeamFolderError): @@ -17364,9 +10116,6 @@ class TeamFolderActivateError(BaseTeamFolderError): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderActivateError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderActivateError(%r, %r)' % (self._tag, self._value) - TeamFolderActivateError_validator = bv.Union(TeamFolderActivateError) class TeamFolderIdArg(bb.Struct): @@ -17376,49 +10125,22 @@ class TeamFolderIdArg(bb.Struct): __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 + self._team_folder_id_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + team_folder_id = bb.Attribute("team_folder_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderIdArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderIdArg(team_folder_id={!r})'.format( - self._team_folder_id_value, - ) - TeamFolderIdArg_validator = bv.Struct(TeamFolderIdArg) class TeamFolderArchiveArg(TeamFolderIdArg): @@ -17429,7 +10151,6 @@ class TeamFolderArchiveArg(TeamFolderIdArg): __slots__ = [ '_force_async_off_value', - '_force_async_off_present', ] _has_required_fields = True @@ -17438,43 +10159,16 @@ 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 + self._force_async_off_value = bb.NOT_SET 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 + # Instance attribute type: bool (validator is set below) + force_async_off = bb.Attribute("force_async_off") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderArchiveArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -17487,9 +10181,6 @@ class TeamFolderArchiveError(BaseTeamFolderError): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderArchiveError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderArchiveError(%r, %r)' % (self._tag, self._value) - TeamFolderArchiveError_validator = bv.Union(TeamFolderArchiveError) class TeamFolderArchiveJobStatus(async_.PollResultBase): @@ -17503,7 +10194,7 @@ class TeamFolderArchiveJobStatus(async_.PollResultBase): folder. :ivar TeamFolderArchiveError TeamFolderArchiveJobStatus.failed: Error occurred while performing an asynchronous job from - :meth:`dropbox.dropbox.Dropbox.team_team_folder_archive`. + :meth:`dropbox.dropbox_client.Dropbox.team_team_folder_archive`. """ @classmethod @@ -17560,7 +10251,7 @@ def get_complete(self): def get_failed(self): """ Error occurred while performing an asynchronous job from - :meth:`dropbox.dropbox.Dropbox.team_team_folder_archive`. + :meth:`dropbox.dropbox_client.Dropbox.team_team_folder_archive`. Only call this if :meth:`is_failed` is true. @@ -17573,9 +10264,6 @@ def get_failed(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderArchiveJobStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderArchiveJobStatus(%r, %r)' % (self._tag, self._value) - TeamFolderArchiveJobStatus_validator = bv.Union(TeamFolderArchiveJobStatus) class TeamFolderArchiveLaunch(async_.LaunchResultBase): @@ -17617,9 +10305,6 @@ def get_complete(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderArchiveLaunch, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderArchiveLaunch(%r, %r)' % (self._tag, self._value) - TeamFolderArchiveLaunch_validator = bv.Union(TeamFolderArchiveLaunch) class TeamFolderCreateArg(bb.Struct): @@ -17632,9 +10317,7 @@ class TeamFolderCreateArg(bb.Struct): __slots__ = [ '_name_value', - '_name_present', '_sync_setting_value', - '_sync_setting_present', ] _has_required_fields = True @@ -17642,74 +10325,22 @@ class TeamFolderCreateArg(bb.Struct): def __init__(self, name=None, sync_setting=None): - self._name_value = None - self._name_present = False - self._sync_setting_value = None - self._sync_setting_present = False + self._name_value = bb.NOT_SET + self._sync_setting_value = bb.NOT_SET if name is not None: self.name = name if sync_setting is not None: self.sync_setting = sync_setting - @property - def name(self): - """ - Name for the new team folder. + # Instance attribute type: str (validator is set below) + name = bb.Attribute("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 - - @property - def sync_setting(self): - """ - The sync setting to apply to this team folder. Only permitted if the - team has team selective sync enabled. - - :rtype: files.SyncSettingArg - """ - if self._sync_setting_present: - return self._sync_setting_value - else: - return None - - @sync_setting.setter - def sync_setting(self, val): - if val is None: - del self.sync_setting - return - self._sync_setting_validator.validate_type_only(val) - self._sync_setting_value = val - self._sync_setting_present = True - - @sync_setting.deleter - def sync_setting(self): - self._sync_setting_value = None - self._sync_setting_present = False + # Instance attribute type: files.SyncSettingArg (validator is set below) + sync_setting = bb.Attribute("sync_setting", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderCreateArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderCreateArg(name={!r}, sync_setting={!r})'.format( - self._name_value, - self._sync_setting_value, - ) - TeamFolderCreateArg_validator = bv.Struct(TeamFolderCreateArg) class TeamFolderCreateError(bb.Union): @@ -17804,9 +10435,6 @@ def get_sync_settings_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderCreateError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderCreateError(%r, %r)' % (self._tag, self._value) - TeamFolderCreateError_validator = bv.Union(TeamFolderCreateError) class TeamFolderGetInfoItem(bb.Union): @@ -17865,8 +10493,8 @@ def is_team_folder_metadata(self): 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. + :meth:`dropbox.dropbox_client.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. @@ -17891,9 +10519,6 @@ def get_team_folder_metadata(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderGetInfoItem, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderGetInfoItem(%r, %r)' % (self._tag, self._value) - TeamFolderGetInfoItem_validator = bv.Union(TeamFolderGetInfoItem) class TeamFolderIdListArg(bb.Struct): @@ -17903,49 +10528,22 @@ class TeamFolderIdListArg(bb.Struct): __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 + self._team_folder_ids_value = bb.NOT_SET 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 + # Instance attribute type: list of [str] (validator is set below) + team_folder_ids = bb.Attribute("team_folder_ids") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderIdListArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderIdListArg(team_folder_ids={!r})'.format( - self._team_folder_ids_value, - ) - TeamFolderIdListArg_validator = bv.Struct(TeamFolderIdListArg) class TeamFolderInvalidStatusError(bb.Union): @@ -18007,9 +10605,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderInvalidStatusError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderInvalidStatusError(%r, %r)' % (self._tag, self._value) - TeamFolderInvalidStatusError_validator = bv.Union(TeamFolderInvalidStatusError) class TeamFolderListArg(bb.Struct): @@ -18020,49 +10615,22 @@ class TeamFolderListArg(bb.Struct): __slots__ = [ '_limit_value', - '_limit_present', ] _has_required_fields = False def __init__(self, limit=None): - self._limit_value = None - self._limit_present = False + self._limit_value = bb.NOT_SET if limit is not None: self.limit = limit - @property - def limit(self): - """ - The maximum number of results to return per request. - - :rtype: int - """ - 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 + # Instance attribute type: int (validator is set below) + limit = bb.Attribute("limit") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderListArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderListArg(limit={!r})'.format( - self._limit_value, - ) - TeamFolderListArg_validator = bv.Struct(TeamFolderListArg) class TeamFolderListContinueArg(bb.Struct): @@ -18073,49 +10641,22 @@ class TeamFolderListContinueArg(bb.Struct): __slots__ = [ '_cursor_value', - '_cursor_present', ] _has_required_fields = True def __init__(self, cursor=None): - self._cursor_value = None - self._cursor_present = False + self._cursor_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderListContinueArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderListContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - TeamFolderListContinueArg_validator = bv.Struct(TeamFolderListContinueArg) class TeamFolderListContinueError(bb.Union): @@ -18153,81 +10694,50 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderListContinueError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderListContinueError(%r, %r)' % (self._tag, self._value) - TeamFolderListContinueError_validator = bv.Union(TeamFolderListContinueError) class TeamFolderListError(bb.Struct): __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 + self._access_error_value = bb.NOT_SET 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 + # Instance attribute type: TeamFolderAccessError (validator is set below) + access_error = bb.Attribute("access_error", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderListError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderListError(access_error={!r})'.format( - self._access_error_value, - ) - TeamFolderListError_validator = bv.Struct(TeamFolderListError) class TeamFolderListResult(bb.Struct): """ - Result for :meth:`dropbox.dropbox.Dropbox.team_team_folder_list` and - :meth:`dropbox.dropbox.Dropbox.team_team_folder_list_continue`. + Result for :meth:`dropbox.dropbox_client.Dropbox.team_team_folder_list` and + :meth:`dropbox.dropbox_client.Dropbox.team_team_folder_list_continue`. :ivar team.TeamFolderListResult.team_folders: List of all team folders in the authenticated team. :ivar team.TeamFolderListResult.cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_team_folder_list_continue` to obtain - additional team folders. + :meth:`dropbox.dropbox_client.Dropbox.team_team_folder_list_continue` to + obtain additional team folders. :ivar team.TeamFolderListResult.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. + :meth:`dropbox.dropbox_client.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 @@ -18236,12 +10746,9 @@ 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 + self._team_folders_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET + self._has_more_value = bb.NOT_SET if team_folders is not None: self.team_folders = team_folders if cursor is not None: @@ -18249,90 +10756,18 @@ def __init__(self, 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'") + # Instance attribute type: list of [TeamFolderMetadata] (validator is set below) + team_folders = bb.Attribute("team_folders") - @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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False + # Instance attribute type: bool (validator is set below) + has_more = bb.Attribute("has_more") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderListResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -18352,17 +10787,11 @@ class TeamFolderMetadata(bb.Struct): __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', '_sync_setting_value', - '_sync_setting_present', '_content_sync_settings_value', - '_content_sync_settings_present', ] _has_required_fields = True @@ -18374,18 +10803,12 @@ def __init__(self, is_team_shared_dropbox=None, sync_setting=None, content_sync_settings=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 - self._sync_setting_value = None - self._sync_setting_present = False - self._content_sync_settings_value = None - self._content_sync_settings_present = False + self._team_folder_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._status_value = bb.NOT_SET + self._is_team_shared_dropbox_value = bb.NOT_SET + self._sync_setting_value = bb.NOT_SET + self._content_sync_settings_value = bb.NOT_SET if team_folder_id is not None: self.team_folder_id = team_folder_id if name is not None: @@ -18399,157 +10822,27 @@ def __init__(self, if content_sync_settings is not None: self.content_sync_settings = content_sync_settings - @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 a shared team root. - - :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 - - @property - def sync_setting(self): - """ - The sync setting applied to this team folder. - - :rtype: files.SyncSetting - """ - if self._sync_setting_present: - return self._sync_setting_value - else: - raise AttributeError("missing required field 'sync_setting'") - - @sync_setting.setter - def sync_setting(self, val): - self._sync_setting_validator.validate_type_only(val) - self._sync_setting_value = val - self._sync_setting_present = True + # Instance attribute type: str (validator is set below) + team_folder_id = bb.Attribute("team_folder_id") - @sync_setting.deleter - def sync_setting(self): - self._sync_setting_value = None - self._sync_setting_present = False + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - @property - def content_sync_settings(self): - """ - Sync settings applied to contents of this team folder. + # Instance attribute type: TeamFolderStatus (validator is set below) + status = bb.Attribute("status", user_defined=True) - :rtype: list of [files.ContentSyncSetting] - """ - if self._content_sync_settings_present: - return self._content_sync_settings_value - else: - raise AttributeError("missing required field 'content_sync_settings'") + # Instance attribute type: bool (validator is set below) + is_team_shared_dropbox = bb.Attribute("is_team_shared_dropbox") - @content_sync_settings.setter - def content_sync_settings(self, val): - val = self._content_sync_settings_validator.validate(val) - self._content_sync_settings_value = val - self._content_sync_settings_present = True + # Instance attribute type: files.SyncSetting (validator is set below) + sync_setting = bb.Attribute("sync_setting", user_defined=True) - @content_sync_settings.deleter - def content_sync_settings(self): - self._content_sync_settings_value = None - self._content_sync_settings_present = False + # Instance attribute type: list of [files.ContentSyncSetting] (validator is set below) + content_sync_settings = bb.Attribute("content_sync_settings") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderMetadata(team_folder_id={!r}, name={!r}, status={!r}, is_team_shared_dropbox={!r}, sync_setting={!r}, content_sync_settings={!r})'.format( - self._team_folder_id_value, - self._name_value, - self._status_value, - self._is_team_shared_dropbox_value, - self._sync_setting_value, - self._content_sync_settings_value, - ) - TeamFolderMetadata_validator = bv.Struct(TeamFolderMetadata) class TeamFolderPermanentlyDeleteError(BaseTeamFolderError): @@ -18562,9 +10855,6 @@ class TeamFolderPermanentlyDeleteError(BaseTeamFolderError): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderPermanentlyDeleteError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderPermanentlyDeleteError(%r, %r)' % (self._tag, self._value) - TeamFolderPermanentlyDeleteError_validator = bv.Union(TeamFolderPermanentlyDeleteError) class TeamFolderRenameArg(TeamFolderIdArg): @@ -18574,7 +10864,6 @@ class TeamFolderRenameArg(TeamFolderIdArg): __slots__ = [ '_name_value', - '_name_present', ] _has_required_fields = True @@ -18583,43 +10872,16 @@ def __init__(self, team_folder_id=None, name=None): super(TeamFolderRenameArg, self).__init__(team_folder_id) - self._name_value = None - self._name_present = False + self._name_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderRenameArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -18670,9 +10932,6 @@ def is_folder_name_reserved(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderRenameError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderRenameError(%r, %r)' % (self._tag, self._value) - TeamFolderRenameError_validator = bv.Union(TeamFolderRenameError) class TeamFolderStatus(bb.Union): @@ -18734,9 +10993,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderStatus(%r, %r)' % (self._tag, self._value) - TeamFolderStatus_validator = bv.Union(TeamFolderStatus) class TeamFolderTeamSharedDropboxError(bb.Union): @@ -18774,9 +11030,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderTeamSharedDropboxError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderTeamSharedDropboxError(%r, %r)' % (self._tag, self._value) - TeamFolderTeamSharedDropboxError_validator = bv.Union(TeamFolderTeamSharedDropboxError) class TeamFolderUpdateSyncSettingsArg(TeamFolderIdArg): @@ -18790,9 +11043,7 @@ class TeamFolderUpdateSyncSettingsArg(TeamFolderIdArg): __slots__ = [ '_sync_setting_value', - '_sync_setting_present', '_content_sync_settings_value', - '_content_sync_settings_present', ] _has_required_fields = True @@ -18802,78 +11053,22 @@ def __init__(self, sync_setting=None, content_sync_settings=None): super(TeamFolderUpdateSyncSettingsArg, self).__init__(team_folder_id) - self._sync_setting_value = None - self._sync_setting_present = False - self._content_sync_settings_value = None - self._content_sync_settings_present = False + self._sync_setting_value = bb.NOT_SET + self._content_sync_settings_value = bb.NOT_SET if sync_setting is not None: self.sync_setting = sync_setting if content_sync_settings is not None: self.content_sync_settings = content_sync_settings - @property - def sync_setting(self): - """ - Sync setting to apply to the team folder itself. Only meaningful if the - team folder is not a shared team root. - - :rtype: files.SyncSettingArg - """ - if self._sync_setting_present: - return self._sync_setting_value - else: - return None - - @sync_setting.setter - def sync_setting(self, val): - if val is None: - del self.sync_setting - return - self._sync_setting_validator.validate_type_only(val) - self._sync_setting_value = val - self._sync_setting_present = True - - @sync_setting.deleter - def sync_setting(self): - self._sync_setting_value = None - self._sync_setting_present = False - - @property - def content_sync_settings(self): - """ - Sync settings to apply to contents of this team folder. - - :rtype: list of [files.ContentSyncSettingArg] - """ - if self._content_sync_settings_present: - return self._content_sync_settings_value - else: - return None - - @content_sync_settings.setter - def content_sync_settings(self, val): - if val is None: - del self.content_sync_settings - return - val = self._content_sync_settings_validator.validate(val) - self._content_sync_settings_value = val - self._content_sync_settings_present = True + # Instance attribute type: files.SyncSettingArg (validator is set below) + sync_setting = bb.Attribute("sync_setting", nullable=True, user_defined=True) - @content_sync_settings.deleter - def content_sync_settings(self): - self._content_sync_settings_value = None - self._content_sync_settings_present = False + # Instance attribute type: list of [files.ContentSyncSettingArg] (validator is set below) + content_sync_settings = bb.Attribute("content_sync_settings", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderUpdateSyncSettingsArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderUpdateSyncSettingsArg(team_folder_id={!r}, sync_setting={!r}, content_sync_settings={!r})'.format( - self._team_folder_id_value, - self._sync_setting_value, - self._content_sync_settings_value, - ) - TeamFolderUpdateSyncSettingsArg_validator = bv.Struct(TeamFolderUpdateSyncSettingsArg) class TeamFolderUpdateSyncSettingsError(BaseTeamFolderError): @@ -18921,9 +11116,6 @@ def get_sync_settings_error(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderUpdateSyncSettingsError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderUpdateSyncSettingsError(%r, %r)' % (self._tag, self._value) - TeamFolderUpdateSyncSettingsError_validator = bv.Union(TeamFolderUpdateSyncSettingsError) class TeamGetInfoResult(bb.Struct): @@ -18938,15 +11130,10 @@ class TeamGetInfoResult(bb.Struct): __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 @@ -18957,16 +11144,11 @@ def __init__(self, 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 + self._name_value = bb.NOT_SET + self._team_id_value = bb.NOT_SET + self._num_licensed_users_value = bb.NOT_SET + self._num_provisioned_users_value = bb.NOT_SET + self._policies_value = bb.NOT_SET if name is not None: self.name = name if team_id is not None: @@ -18978,132 +11160,24 @@ def __init__(self, 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: int - """ - 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 + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - @property - def num_provisioned_users(self): - """ - The number of accounts that have been invited or are already active - members of the team. - - :rtype: int - """ - if self._num_provisioned_users_present: - return self._num_provisioned_users_value - else: - raise AttributeError("missing required field 'num_provisioned_users'") + # Instance attribute type: str (validator is set below) + team_id = bb.Attribute("team_id") - @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 - """ - if self._policies_present: - return self._policies_value - else: - raise AttributeError("missing required field 'policies'") + # Instance attribute type: int (validator is set below) + num_licensed_users = bb.Attribute("num_licensed_users") - @policies.setter - def policies(self, val): - self._policies_validator.validate_type_only(val) - self._policies_value = val - self._policies_present = True + # Instance attribute type: int (validator is set below) + num_provisioned_users = bb.Attribute("num_provisioned_users") - @policies.deleter - def policies(self): - self._policies_value = None - self._policies_present = False + # Instance attribute type: team_policies.TeamMemberPolicies (validator is set below) + policies = bb.Attribute("policies", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamGetInfoResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -19116,9 +11190,7 @@ class TeamMemberInfo(bb.Struct): __slots__ = [ '_profile_value', - '_profile_present', '_role_value', - '_role_present', ] _has_required_fields = True @@ -19126,70 +11198,22 @@ class TeamMemberInfo(bb.Struct): def __init__(self, profile=None, role=None): - self._profile_value = None - self._profile_present = False - self._role_value = None - self._role_present = False + self._profile_value = bb.NOT_SET + self._role_value = bb.NOT_SET 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 + # Instance attribute type: TeamMemberProfile (validator is set below) + profile = bb.Attribute("profile", user_defined=True) - @role.deleter - def role(self): - self._role_value = None - self._role_present = False + # Instance attribute type: AdminTier (validator is set below) + role = bb.Attribute("role", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMemberInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMemberInfo(profile={!r}, role={!r})'.format( - self._profile_value, - self._role_value, - ) - TeamMemberInfo_validator = bv.Struct(TeamMemberInfo) class TeamMemberProfile(MemberProfile): @@ -19204,9 +11228,7 @@ class TeamMemberProfile(MemberProfile): __slots__ = [ '_groups_value', - '_groups_present', '_member_folder_id_value', - '_member_folder_id_present', ] _has_required_fields = True @@ -19244,85 +11266,22 @@ def __init__(self, persistent_id, is_directory_restricted, profile_photo_url) - self._groups_value = None - self._groups_present = False - self._member_folder_id_value = None - self._member_folder_id_present = False + self._groups_value = bb.NOT_SET + self._member_folder_id_value = bb.NOT_SET 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 + # Instance attribute type: list of [str] (validator is set below) + groups = bb.Attribute("groups") - @member_folder_id.deleter - def member_folder_id(self): - self._member_folder_id_value = None - self._member_folder_id_present = False + # Instance attribute type: str (validator is set below) + member_folder_id = bb.Attribute("member_folder_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMemberProfile, self)._process_custom_annotations(annotation_type, field_path, processor) - 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}, secondary_emails={!r}, invited_on={!r}, joined_on={!r}, suspended_on={!r}, persistent_id={!r}, is_directory_restricted={!r}, profile_photo_url={!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._secondary_emails_value, - self._invited_on_value, - self._joined_on_value, - self._suspended_on_value, - self._persistent_id_value, - self._is_directory_restricted_value, - self._profile_photo_url_value, - ) - TeamMemberProfile_validator = bv.Struct(TeamMemberProfile) class TeamMemberStatus(bb.Union): @@ -19411,9 +11370,6 @@ def get_removed(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMemberStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMemberStatus(%r, %r)' % (self._tag, self._value) - TeamMemberStatus_validator = bv.Union(TeamMemberStatus) class TeamMembershipType(bb.Union): @@ -19453,9 +11409,6 @@ def is_limited(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMembershipType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMembershipType(%r, %r)' % (self._tag, self._value) - TeamMembershipType_validator = bv.Union(TeamMembershipType) class TeamNamespacesListArg(bb.Struct): @@ -19466,49 +11419,22 @@ class TeamNamespacesListArg(bb.Struct): __slots__ = [ '_limit_value', - '_limit_present', ] _has_required_fields = False def __init__(self, limit=None): - self._limit_value = None - self._limit_present = False + self._limit_value = bb.NOT_SET if limit is not None: self.limit = limit - @property - def limit(self): - """ - Specifying a value here has no effect. - - :rtype: int - """ - 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 + # Instance attribute type: int (validator is set below) + limit = bb.Attribute("limit") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamNamespacesListArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamNamespacesListArg(limit={!r})'.format( - self._limit_value, - ) - TeamNamespacesListArg_validator = bv.Struct(TeamNamespacesListArg) class TeamNamespacesListContinueArg(bb.Struct): @@ -19519,50 +11445,22 @@ class TeamNamespacesListContinueArg(bb.Struct): __slots__ = [ '_cursor_value', - '_cursor_present', ] _has_required_fields = True def __init__(self, cursor=None): - self._cursor_value = None - self._cursor_present = False + self._cursor_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamNamespacesListContinueArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamNamespacesListContinueArg(cursor={!r})'.format( - self._cursor_value, - ) - TeamNamespacesListContinueArg_validator = bv.Struct(TeamNamespacesListContinueArg) class TeamNamespacesListError(bb.Union): @@ -19600,9 +11498,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamNamespacesListError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamNamespacesListError(%r, %r)' % (self._tag, self._value) - TeamNamespacesListError_validator = bv.Union(TeamNamespacesListError) class TeamNamespacesListContinueError(TeamNamespacesListError): @@ -19629,31 +11524,26 @@ def is_invalid_cursor(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamNamespacesListContinueError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamNamespacesListContinueError(%r, %r)' % (self._tag, self._value) - TeamNamespacesListContinueError_validator = bv.Union(TeamNamespacesListContinueError) class TeamNamespacesListResult(bb.Struct): """ - Result for :meth:`dropbox.dropbox.Dropbox.team_namespaces_list`. + Result for :meth:`dropbox.dropbox_client.Dropbox.team_namespaces_list`. :ivar team.TeamNamespacesListResult.namespaces: List of all namespaces the team can access. :ivar team.TeamNamespacesListResult.cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_namespaces_list_continue` to obtain - additional namespaces. Note that duplicate namespaces may be returned. + :meth:`dropbox.dropbox_client.Dropbox.team_namespaces_list_continue` to + obtain additional namespaces. Note that duplicate namespaces may be + returned. :ivar team.TeamNamespacesListResult.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 @@ -19662,12 +11552,9 @@ 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 + self._namespaces_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET + self._has_more_value = bb.NOT_SET if namespaces is not None: self.namespaces = namespaces if cursor is not None: @@ -19675,88 +11562,18 @@ def __init__(self, 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'") + # Instance attribute type: list of [NamespaceMetadata] (validator is set below) + namespaces = bb.Attribute("namespaces") - @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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") - @has_more.deleter - def has_more(self): - self._has_more_value = None - self._has_more_present = False + # Instance attribute type: bool (validator is set below) + has_more = bb.Attribute("has_more") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamNamespacesListResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 TeamReportFailureReason(bb.Union): @@ -19820,15 +11637,12 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamReportFailureReason, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamReportFailureReason(%r, %r)' % (self._tag, self._value) - TeamReportFailureReason_validator = bv.Union(TeamReportFailureReason) class TokenGetAuthenticatedAdminError(bb.Union): """ Error returned by - :meth:`dropbox.dropbox.Dropbox.team_token_get_authenticated_admin`. + :meth:`dropbox.dropbox_client.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 @@ -19878,15 +11692,12 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TokenGetAuthenticatedAdminError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TokenGetAuthenticatedAdminError(%r, %r)' % (self._tag, self._value) - TokenGetAuthenticatedAdminError_validator = bv.Union(TokenGetAuthenticatedAdminError) class TokenGetAuthenticatedAdminResult(bb.Struct): """ Results for - :meth:`dropbox.dropbox.Dropbox.team_token_get_authenticated_admin`. + :meth:`dropbox.dropbox_client.Dropbox.team_token_get_authenticated_admin`. :ivar team.TokenGetAuthenticatedAdminResult.admin_profile: The admin who authorized the token. @@ -19894,49 +11705,22 @@ class TokenGetAuthenticatedAdminResult(bb.Struct): __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 + self._admin_profile_value = bb.NOT_SET 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 + # Instance attribute type: TeamMemberProfile (validator is set below) + admin_profile = bb.Attribute("admin_profile", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TokenGetAuthenticatedAdminResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TokenGetAuthenticatedAdminResult(admin_profile={!r})'.format( - self._admin_profile_value, - ) - TokenGetAuthenticatedAdminResult_validator = bv.Struct(TokenGetAuthenticatedAdminResult) class UploadApiRateLimitValue(bb.Union): @@ -20010,9 +11794,6 @@ def get_limit(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadApiRateLimitValue, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UploadApiRateLimitValue(%r, %r)' % (self._tag, self._value) - UploadApiRateLimitValue_validator = bv.Union(UploadApiRateLimitValue) class UserAddResult(bb.Union): @@ -20176,9 +11957,6 @@ def get_placeholder_user(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserAddResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UserAddResult(%r, %r)' % (self._tag, self._value) - UserAddResult_validator = bv.Union(UserAddResult) class UserCustomQuotaArg(bb.Struct): @@ -20188,9 +11966,7 @@ class UserCustomQuotaArg(bb.Struct): __slots__ = [ '_user_value', - '_user_present', '_quota_gb_value', - '_quota_gb_present', ] _has_required_fields = True @@ -20198,66 +11974,22 @@ class UserCustomQuotaArg(bb.Struct): 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 + self._user_value = bb.NOT_SET + self._quota_gb_value = bb.NOT_SET 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: int - """ - 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 + # Instance attribute type: UserSelectorArg (validator is set below) + user = bb.Attribute("user", user_defined=True) - @quota_gb.deleter - def quota_gb(self): - self._quota_gb_value = None - self._quota_gb_present = False + # Instance attribute type: int (validator is set below) + quota_gb = bb.Attribute("quota_gb") def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserCustomQuotaArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -20268,9 +12000,7 @@ class UserCustomQuotaResult(bb.Struct): __slots__ = [ '_user_value', - '_user_present', '_quota_gb_value', - '_quota_gb_present', ] _has_required_fields = True @@ -20278,78 +12008,29 @@ class UserCustomQuotaResult(bb.Struct): 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 + self._user_value = bb.NOT_SET + self._quota_gb_value = bb.NOT_SET 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 + # Instance attribute type: UserSelectorArg (validator is set below) + user = bb.Attribute("user", user_defined=True) - @user.deleter - def user(self): - self._user_value = None - self._user_present = False - - @property - def quota_gb(self): - """ - :rtype: int - """ - 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 + # Instance attribute type: int (validator is set below) + quota_gb = bb.Attribute("quota_gb", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserCustomQuotaResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UserCustomQuotaResult(user={!r}, quota_gb={!r})'.format( - self._user_value, - self._quota_gb_value, - ) - UserCustomQuotaResult_validator = bv.Struct(UserCustomQuotaResult) class UserDeleteEmailsResult(bb.Struct): __slots__ = [ '_user_value', - '_user_present', '_results_value', - '_results_present', ] _has_required_fields = True @@ -20357,66 +12038,22 @@ class UserDeleteEmailsResult(bb.Struct): def __init__(self, user=None, results=None): - self._user_value = None - self._user_present = False - self._results_value = None - self._results_present = False + self._user_value = bb.NOT_SET + self._results_value = bb.NOT_SET if user is not None: self.user = user if results is not None: self.results = results - @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 + # Instance attribute type: UserSelectorArg (validator is set below) + user = bb.Attribute("user", user_defined=True) - @property - def results(self): - """ - :rtype: list of [DeleteSecondaryEmailResult] - """ - if self._results_present: - return self._results_value - else: - raise AttributeError("missing required field 'results'") - - @results.setter - def results(self, val): - val = self._results_validator.validate(val) - self._results_value = val - self._results_present = True - - @results.deleter - def results(self): - self._results_value = None - self._results_present = False + # Instance attribute type: list of [DeleteSecondaryEmailResult] (validator is set below) + results = bb.Attribute("results") def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserDeleteEmailsResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UserDeleteEmailsResult(user={!r}, results={!r})'.format( - self._user_value, - self._results_value, - ) - UserDeleteEmailsResult_validator = bv.Struct(UserDeleteEmailsResult) class UserDeleteResult(bb.Union): @@ -20514,18 +12151,13 @@ def get_invalid_user(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserDeleteResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UserDeleteResult(%r, %r)' % (self._tag, self._value) - UserDeleteResult_validator = bv.Union(UserDeleteResult) class UserResendEmailsResult(bb.Struct): __slots__ = [ '_user_value', - '_user_present', '_results_value', - '_results_present', ] _has_required_fields = True @@ -20533,66 +12165,22 @@ class UserResendEmailsResult(bb.Struct): def __init__(self, user=None, results=None): - self._user_value = None - self._user_present = False - self._results_value = None - self._results_present = False + self._user_value = bb.NOT_SET + self._results_value = bb.NOT_SET if user is not None: self.user = user if results is not None: self.results = results - @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 results(self): - """ - :rtype: list of [ResendSecondaryEmailResult] - """ - if self._results_present: - return self._results_value - else: - raise AttributeError("missing required field 'results'") + # Instance attribute type: UserSelectorArg (validator is set below) + user = bb.Attribute("user", user_defined=True) - @results.setter - def results(self, val): - val = self._results_validator.validate(val) - self._results_value = val - self._results_present = True - - @results.deleter - def results(self): - self._results_value = None - self._results_present = False + # Instance attribute type: list of [ResendSecondaryEmailResult] (validator is set below) + results = bb.Attribute("results") def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserResendEmailsResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UserResendEmailsResult(user={!r}, results={!r})'.format( - self._user_value, - self._results_value, - ) - UserResendEmailsResult_validator = bv.Struct(UserResendEmailsResult) class UserResendResult(bb.Union): @@ -20690,9 +12278,6 @@ def get_invalid_user(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserResendResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UserResendResult(%r, %r)' % (self._tag, self._value) - UserResendResult_validator = bv.Union(UserResendResult) class UserSecondaryEmailsArg(bb.Struct): @@ -20702,9 +12287,7 @@ class UserSecondaryEmailsArg(bb.Struct): __slots__ = [ '_user_value', - '_user_present', '_secondary_emails_value', - '_secondary_emails_present', ] _has_required_fields = True @@ -20712,75 +12295,29 @@ class UserSecondaryEmailsArg(bb.Struct): def __init__(self, user=None, secondary_emails=None): - self._user_value = None - self._user_present = False - self._secondary_emails_value = None - self._secondary_emails_present = False + self._user_value = bb.NOT_SET + self._secondary_emails_value = bb.NOT_SET if user is not None: self.user = user if secondary_emails is not None: self.secondary_emails = secondary_emails - @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 secondary_emails(self): - """ - :rtype: list of [str] - """ - if self._secondary_emails_present: - return self._secondary_emails_value - else: - raise AttributeError("missing required field 'secondary_emails'") - - @secondary_emails.setter - def secondary_emails(self, val): - val = self._secondary_emails_validator.validate(val) - self._secondary_emails_value = val - self._secondary_emails_present = True + # Instance attribute type: UserSelectorArg (validator is set below) + user = bb.Attribute("user", user_defined=True) - @secondary_emails.deleter - def secondary_emails(self): - self._secondary_emails_value = None - self._secondary_emails_present = False + # Instance attribute type: list of [str] (validator is set below) + secondary_emails = bb.Attribute("secondary_emails") def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserSecondaryEmailsArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UserSecondaryEmailsArg(user={!r}, secondary_emails={!r})'.format( - self._user_value, - self._secondary_emails_value, - ) - UserSecondaryEmailsArg_validator = bv.Struct(UserSecondaryEmailsArg) class UserSecondaryEmailsResult(bb.Struct): __slots__ = [ '_user_value', - '_user_present', '_results_value', - '_results_present', ] _has_required_fields = True @@ -20788,66 +12325,22 @@ class UserSecondaryEmailsResult(bb.Struct): def __init__(self, user=None, results=None): - self._user_value = None - self._user_present = False - self._results_value = None - self._results_present = False + self._user_value = bb.NOT_SET + self._results_value = bb.NOT_SET if user is not None: self.user = user if results is not None: self.results = results - @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 + # Instance attribute type: UserSelectorArg (validator is set below) + user = bb.Attribute("user", user_defined=True) - @user.deleter - def user(self): - self._user_value = None - self._user_present = False - - @property - def results(self): - """ - :rtype: list of [AddSecondaryEmailResult] - """ - if self._results_present: - return self._results_value - else: - raise AttributeError("missing required field 'results'") - - @results.setter - def results(self, val): - val = self._results_validator.validate(val) - self._results_value = val - self._results_present = True - - @results.deleter - def results(self): - self._results_value = None - self._results_present = False + # Instance attribute type: list of [AddSecondaryEmailResult] (validator is set below) + results = bb.Attribute("results") def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserSecondaryEmailsResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UserSecondaryEmailsResult(user={!r}, results={!r})'.format( - self._user_value, - self._results_value, - ) - UserSecondaryEmailsResult_validator = bv.Struct(UserSecondaryEmailsResult) class UserSelectorArg(bb.Union): @@ -20952,9 +12445,6 @@ def get_email(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserSelectorArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UserSelectorArg(%r, %r)' % (self._tag, self._value) - UserSelectorArg_validator = bv.Union(UserSelectorArg) class UsersSelectorArg(bb.Union): @@ -21071,9 +12561,6 @@ def get_emails(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UsersSelectorArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UsersSelectorArg(%r, %r)' % (self._tag, self._value) - UsersSelectorArg_validator = bv.Union(UsersSelectorArg) GroupsGetInfoResult_validator = bv.List(GroupsGetInfoItem_validator) @@ -21093,11 +12580,11 @@ def __repr__(self): SecondaryEmail_validator = secondary_emails.SecondaryEmail_validator SecondaryEmail = secondary_emails.SecondaryEmail UserQuota_validator = bv.UInt32(min_value=15) -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.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', @@ -21106,17 +12593,17 @@ def __repr__(self): '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), + ('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.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', @@ -21124,10 +12611,10 @@ def __repr__(self): '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), + ('user_agent', ActiveWebSession.user_agent.validator), + ('os', ActiveWebSession.os.validator), + ('browser', ActiveWebSession.browser.validator), + ('expires', ActiveWebSession.expires.validator), ] AddSecondaryEmailResult._success_validator = SecondaryEmail_validator @@ -21155,9 +12642,9 @@ def __repr__(self): AddSecondaryEmailResult.other = AddSecondaryEmailResult('other') -AddSecondaryEmailsArg._new_secondary_emails_validator = bv.List(UserSecondaryEmailsArg_validator) +AddSecondaryEmailsArg.new_secondary_emails.validator = bv.List(UserSecondaryEmailsArg_validator) AddSecondaryEmailsArg._all_field_names_ = set(['new_secondary_emails']) -AddSecondaryEmailsArg._all_fields_ = [('new_secondary_emails', AddSecondaryEmailsArg._new_secondary_emails_validator)] +AddSecondaryEmailsArg._all_fields_ = [('new_secondary_emails', AddSecondaryEmailsArg.new_secondary_emails.validator)] AddSecondaryEmailsError._secondary_emails_disabled_validator = bv.Void() AddSecondaryEmailsError._too_many_emails_validator = bv.Void() @@ -21172,9 +12659,9 @@ def __repr__(self): AddSecondaryEmailsError.too_many_emails = AddSecondaryEmailsError('too_many_emails') AddSecondaryEmailsError.other = AddSecondaryEmailsError('other') -AddSecondaryEmailsResult._results_validator = bv.List(UserAddResult_validator) +AddSecondaryEmailsResult.results.validator = bv.List(UserAddResult_validator) AddSecondaryEmailsResult._all_field_names_ = set(['results']) -AddSecondaryEmailsResult._all_fields_ = [('results', AddSecondaryEmailsResult._results_validator)] +AddSecondaryEmailsResult._all_fields_ = [('results', AddSecondaryEmailsResult.results.validator)] AdminTier._team_admin_validator = bv.Void() AdminTier._user_management_admin_validator = bv.Void() @@ -21192,12 +12679,12 @@ def __repr__(self): 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.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', @@ -21207,17 +12694,17 @@ def __repr__(self): '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), + ('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.start_date.validator = bv.String() BaseDfbReport._all_field_names_ = set(['start_date']) -BaseDfbReport._all_fields_ = [('start_date', BaseDfbReport._start_date_validator)] +BaseDfbReport._all_fields_ = [('start_date', BaseDfbReport.start_date.validator)] BaseTeamFolderError._access_error_validator = TeamFolderAccessError_validator BaseTeamFolderError._status_error_validator = TeamFolderInvalidStatusError_validator @@ -21253,19 +12740,19 @@ def __repr__(self): CustomQuotaResult.other = CustomQuotaResult('other') -CustomQuotaUsersArg._users_validator = bv.List(UserSelectorArg_validator) +CustomQuotaUsersArg.users.validator = bv.List(UserSelectorArg_validator) CustomQuotaUsersArg._all_field_names_ = set(['users']) -CustomQuotaUsersArg._all_fields_ = [('users', CustomQuotaUsersArg._users_validator)] +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.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), + ('start_date', DateRange.start_date.validator), + ('end_date', DateRange.end_date.validator), ] DateRangeError._other_validator = bv.Void() @@ -21288,19 +12775,19 @@ def __repr__(self): DeleteSecondaryEmailResult.other = DeleteSecondaryEmailResult('other') -DeleteSecondaryEmailsArg._emails_to_delete_validator = bv.List(UserSecondaryEmailsArg_validator) +DeleteSecondaryEmailsArg.emails_to_delete.validator = bv.List(UserSecondaryEmailsArg_validator) DeleteSecondaryEmailsArg._all_field_names_ = set(['emails_to_delete']) -DeleteSecondaryEmailsArg._all_fields_ = [('emails_to_delete', DeleteSecondaryEmailsArg._emails_to_delete_validator)] +DeleteSecondaryEmailsArg._all_fields_ = [('emails_to_delete', DeleteSecondaryEmailsArg.emails_to_delete.validator)] -DeleteSecondaryEmailsResult._results_validator = bv.List(UserDeleteResult_validator) +DeleteSecondaryEmailsResult.results.validator = bv.List(UserDeleteResult_validator) DeleteSecondaryEmailsResult._all_field_names_ = set(['results']) -DeleteSecondaryEmailsResult._all_fields_ = [('results', DeleteSecondaryEmailsResult._results_validator)] +DeleteSecondaryEmailsResult._all_fields_ = [('results', DeleteSecondaryEmailsResult.results.validator)] -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.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', @@ -21309,11 +12796,11 @@ def __repr__(self): '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), + ('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() @@ -21332,24 +12819,24 @@ def __repr__(self): DesktopPlatform.linux = DesktopPlatform('linux') DesktopPlatform.other = DesktopPlatform('other') -DeviceSessionArg._session_id_validator = bv.String() -DeviceSessionArg._team_member_id_validator = bv.String() +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), + ('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.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', @@ -21360,22 +12847,22 @@ def __repr__(self): '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), + ('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), ] -ExcludedUsersListArg._limit_validator = bv.UInt32(min_value=1, max_value=1000) +ExcludedUsersListArg.limit.validator = bv.UInt32(min_value=1, max_value=1000) ExcludedUsersListArg._all_field_names_ = set(['limit']) -ExcludedUsersListArg._all_fields_ = [('limit', ExcludedUsersListArg._limit_validator)] +ExcludedUsersListArg._all_fields_ = [('limit', ExcludedUsersListArg.limit.validator)] -ExcludedUsersListContinueArg._cursor_validator = bv.String() +ExcludedUsersListContinueArg.cursor.validator = bv.String() ExcludedUsersListContinueArg._all_field_names_ = set(['cursor']) -ExcludedUsersListContinueArg._all_fields_ = [('cursor', ExcludedUsersListContinueArg._cursor_validator)] +ExcludedUsersListContinueArg._all_fields_ = [('cursor', ExcludedUsersListContinueArg.cursor.validator)] ExcludedUsersListContinueError._invalid_cursor_validator = bv.Void() ExcludedUsersListContinueError._other_validator = bv.Void() @@ -21397,23 +12884,23 @@ def __repr__(self): ExcludedUsersListError.list_error = ExcludedUsersListError('list_error') ExcludedUsersListError.other = ExcludedUsersListError('other') -ExcludedUsersListResult._users_validator = bv.List(MemberProfile_validator) -ExcludedUsersListResult._cursor_validator = bv.Nullable(bv.String()) -ExcludedUsersListResult._has_more_validator = bv.Boolean() +ExcludedUsersListResult.users.validator = bv.List(MemberProfile_validator) +ExcludedUsersListResult.cursor.validator = bv.Nullable(bv.String()) +ExcludedUsersListResult.has_more.validator = bv.Boolean() ExcludedUsersListResult._all_field_names_ = set([ 'users', 'cursor', 'has_more', ]) ExcludedUsersListResult._all_fields_ = [ - ('users', ExcludedUsersListResult._users_validator), - ('cursor', ExcludedUsersListResult._cursor_validator), - ('has_more', ExcludedUsersListResult._has_more_validator), + ('users', ExcludedUsersListResult.users.validator), + ('cursor', ExcludedUsersListResult.cursor.validator), + ('has_more', ExcludedUsersListResult.has_more.validator), ] -ExcludedUsersUpdateArg._users_validator = bv.Nullable(bv.List(UserSelectorArg_validator)) +ExcludedUsersUpdateArg.users.validator = bv.Nullable(bv.List(UserSelectorArg_validator)) ExcludedUsersUpdateArg._all_field_names_ = set(['users']) -ExcludedUsersUpdateArg._all_fields_ = [('users', ExcludedUsersUpdateArg._users_validator)] +ExcludedUsersUpdateArg._all_fields_ = [('users', ExcludedUsersUpdateArg.users.validator)] ExcludedUsersUpdateError._users_not_in_team_validator = bv.Void() ExcludedUsersUpdateError._too_many_users_validator = bv.Void() @@ -21428,9 +12915,9 @@ def __repr__(self): ExcludedUsersUpdateError.too_many_users = ExcludedUsersUpdateError('too_many_users') ExcludedUsersUpdateError.other = ExcludedUsersUpdateError('other') -ExcludedUsersUpdateResult._status_validator = ExcludedUsersUpdateStatus_validator +ExcludedUsersUpdateResult.status.validator = ExcludedUsersUpdateStatus_validator ExcludedUsersUpdateResult._all_field_names_ = set(['status']) -ExcludedUsersUpdateResult._all_fields_ = [('status', ExcludedUsersUpdateResult._status_validator)] +ExcludedUsersUpdateResult._all_fields_ = [('status', ExcludedUsersUpdateResult.status.validator)] ExcludedUsersUpdateStatus._success_validator = bv.Void() ExcludedUsersUpdateStatus._other_validator = bv.Void() @@ -21476,9 +12963,9 @@ def __repr__(self): FeatureValue.other = FeatureValue('other') -FeaturesGetValuesBatchArg._features_validator = bv.List(Feature_validator) +FeaturesGetValuesBatchArg.features.validator = bv.List(Feature_validator) FeaturesGetValuesBatchArg._all_field_names_ = set(['features']) -FeaturesGetValuesBatchArg._all_fields_ = [('features', FeaturesGetValuesBatchArg._features_validator)] +FeaturesGetValuesBatchArg._all_fields_ = [('features', FeaturesGetValuesBatchArg.features.validator)] FeaturesGetValuesBatchError._empty_features_list_validator = bv.Void() FeaturesGetValuesBatchError._other_validator = bv.Void() @@ -21490,24 +12977,24 @@ def __repr__(self): FeaturesGetValuesBatchError.empty_features_list = FeaturesGetValuesBatchError('empty_features_list') FeaturesGetValuesBatchError.other = FeaturesGetValuesBatchError('other') -FeaturesGetValuesBatchResult._values_validator = bv.List(FeatureValue_validator) +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 +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', @@ -21525,41 +13012,41 @@ def __repr__(self): '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), + ('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.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), + ('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.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', @@ -21568,18 +13055,18 @@ def __repr__(self): '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), + ('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.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', @@ -21588,11 +13075,11 @@ def __repr__(self): '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), + ('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() @@ -21605,10 +13092,10 @@ def __repr__(self): GroupAccessType.member = GroupAccessType('member') GroupAccessType.owner = GroupAccessType('owner') -GroupCreateArg._group_name_validator = bv.String() -GroupCreateArg._add_creator_as_owner_validator = bv.Boolean() -GroupCreateArg._group_external_id_validator = bv.Nullable(team_common.GroupExternalId_validator) -GroupCreateArg._group_management_type_validator = bv.Nullable(team_common.GroupManagementType_validator) +GroupCreateArg.group_name.validator = bv.String() +GroupCreateArg.add_creator_as_owner.validator = bv.Boolean() +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', 'add_creator_as_owner', @@ -21616,10 +13103,10 @@ def __repr__(self): 'group_management_type', ]) GroupCreateArg._all_fields_ = [ - ('group_name', GroupCreateArg._group_name_validator), - ('add_creator_as_owner', GroupCreateArg._add_creator_as_owner_validator), - ('group_external_id', GroupCreateArg._group_external_id_validator), - ('group_management_type', GroupCreateArg._group_management_type_validator), + ('group_name', GroupCreateArg.group_name.validator), + ('add_creator_as_owner', GroupCreateArg.add_creator_as_owner.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() @@ -21667,37 +13154,37 @@ def __repr__(self): GroupDeleteError.group_already_deleted = GroupDeleteError('group_already_deleted') -GroupFullInfo._members_validator = bv.Nullable(bv.List(GroupMemberInfo_validator)) -GroupFullInfo._created_validator = bv.UInt64() +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), + ('members', GroupFullInfo.members.validator), + ('created', GroupFullInfo.created.validator), ] -GroupMemberInfo._profile_validator = MemberProfile_validator -GroupMemberInfo._access_type_validator = GroupAccessType_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), + ('profile', GroupMemberInfo.profile.validator), + ('access_type', GroupMemberInfo.access_type.validator), ] -GroupMemberSelector._group_validator = GroupSelector_validator -GroupMemberSelector._user_validator = UserSelectorArg_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), + ('group', GroupMemberSelector.group.validator), + ('user', GroupMemberSelector.user.validator), ] GroupMemberSelectorError._member_not_in_group_validator = bv.Void() @@ -21716,19 +13203,19 @@ def __repr__(self): 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.return_members.validator = bv.Boolean() IncludeMembersArg._all_field_names_ = set(['return_members']) -IncludeMembersArg._all_fields_ = [('return_members', IncludeMembersArg._return_members_validator)] +IncludeMembersArg._all_fields_ = [('return_members', IncludeMembersArg.return_members.validator)] -GroupMembersAddArg._group_validator = GroupSelector_validator -GroupMembersAddArg._members_validator = bv.List(MemberAccess_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), + ('group', GroupMembersAddArg.group.validator), + ('members', GroupMembersAddArg.members.validator), ] GroupMembersAddError._duplicate_user_validator = bv.Void() @@ -21751,26 +13238,26 @@ def __repr__(self): 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.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), + ('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.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), + ('group', GroupMembersRemoveArg.group.validator), + ('users', GroupMembersRemoveArg.users.validator), ] GroupMembersSelectorError._member_not_in_group_validator = bv.Void() @@ -21793,26 +13280,26 @@ def __repr__(self): GroupMembersRemoveError.group_not_in_team = GroupMembersRemoveError('group_not_in_team') -GroupMembersSelector._group_validator = GroupSelector_validator -GroupMembersSelector._users_validator = UsersSelectorArg_validator +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), + ('group', GroupMembersSelector.group.validator), + ('users', GroupMembersSelector.users.validator), ] -GroupMembersSetAccessTypeArg._access_type_validator = GroupAccessType_validator -GroupMembersSetAccessTypeArg._return_members_validator = bv.Boolean() +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), + ('access_type', GroupMembersSetAccessTypeArg.access_type.validator), + ('return_members', GroupMembersSetAccessTypeArg.return_members.validator), ] GroupSelector._group_id_validator = team_common.GroupId_validator @@ -21822,10 +13309,10 @@ def __repr__(self): '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.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', @@ -21833,10 +13320,10 @@ def __repr__(self): '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), + ('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() @@ -21870,13 +13357,13 @@ def __repr__(self): 'group_info': GroupsGetInfoItem._group_info_validator, } -GroupsListArg._limit_validator = bv.UInt32(min_value=1, max_value=1000) +GroupsListArg.limit.validator = bv.UInt32(min_value=1, max_value=1000) GroupsListArg._all_field_names_ = set(['limit']) -GroupsListArg._all_fields_ = [('limit', GroupsListArg._limit_validator)] +GroupsListArg._all_fields_ = [('limit', GroupsListArg.limit.validator)] -GroupsListContinueArg._cursor_validator = bv.String() +GroupsListContinueArg.cursor.validator = bv.String() GroupsListContinueArg._all_field_names_ = set(['cursor']) -GroupsListContinueArg._all_fields_ = [('cursor', GroupsListContinueArg._cursor_validator)] +GroupsListContinueArg._all_fields_ = [('cursor', GroupsListContinueArg.cursor.validator)] GroupsListContinueError._invalid_cursor_validator = bv.Void() GroupsListContinueError._other_validator = bv.Void() @@ -21888,34 +13375,34 @@ def __repr__(self): 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.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), + ('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.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), + ('group', GroupsMembersListArg.group.validator), + ('limit', GroupsMembersListArg.limit.validator), ] -GroupsMembersListContinueArg._cursor_validator = bv.String() +GroupsMembersListContinueArg.cursor.validator = bv.String() GroupsMembersListContinueArg._all_field_names_ = set(['cursor']) -GroupsMembersListContinueArg._all_fields_ = [('cursor', GroupsMembersListContinueArg._cursor_validator)] +GroupsMembersListContinueArg._all_fields_ = [('cursor', GroupsMembersListContinueArg.cursor.validator)] GroupsMembersListContinueError._invalid_cursor_validator = bv.Void() GroupsMembersListContinueError._other_validator = bv.Void() @@ -21927,18 +13414,18 @@ def __repr__(self): 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.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), + ('members', GroupsMembersListResult.members.validator), + ('cursor', GroupsMembersListResult.cursor.validator), + ('has_more', GroupsMembersListResult.has_more.validator), ] GroupsPollError._access_denied_validator = bv.Void() @@ -21983,16 +13470,16 @@ def __repr__(self): HasTeamSharedDropboxValue.other = HasTeamSharedDropboxValue('other') -LegalHoldHeldRevisionMetadata._new_filename_validator = bv.String() -LegalHoldHeldRevisionMetadata._original_revision_id_validator = files.Rev_validator -LegalHoldHeldRevisionMetadata._original_file_path_validator = Path_validator -LegalHoldHeldRevisionMetadata._server_modified_validator = common.DropboxTimestamp_validator -LegalHoldHeldRevisionMetadata._author_member_id_validator = team_common.TeamMemberId_validator -LegalHoldHeldRevisionMetadata._author_member_status_validator = TeamMemberStatus_validator -LegalHoldHeldRevisionMetadata._author_email_validator = common.EmailAddress_validator -LegalHoldHeldRevisionMetadata._file_type_validator = bv.String() -LegalHoldHeldRevisionMetadata._size_validator = bv.UInt64() -LegalHoldHeldRevisionMetadata._content_hash_validator = files.Sha256HexHash_validator +LegalHoldHeldRevisionMetadata.new_filename.validator = bv.String() +LegalHoldHeldRevisionMetadata.original_revision_id.validator = files.Rev_validator +LegalHoldHeldRevisionMetadata.original_file_path.validator = Path_validator +LegalHoldHeldRevisionMetadata.server_modified.validator = common.DropboxTimestamp_validator +LegalHoldHeldRevisionMetadata.author_member_id.validator = team_common.TeamMemberId_validator +LegalHoldHeldRevisionMetadata.author_member_status.validator = TeamMemberStatus_validator +LegalHoldHeldRevisionMetadata.author_email.validator = common.EmailAddress_validator +LegalHoldHeldRevisionMetadata.file_type.validator = bv.String() +LegalHoldHeldRevisionMetadata.size.validator = bv.UInt64() +LegalHoldHeldRevisionMetadata.content_hash.validator = files.Sha256HexHash_validator LegalHoldHeldRevisionMetadata._all_field_names_ = set([ 'new_filename', 'original_revision_id', @@ -22006,26 +13493,26 @@ def __repr__(self): 'content_hash', ]) LegalHoldHeldRevisionMetadata._all_fields_ = [ - ('new_filename', LegalHoldHeldRevisionMetadata._new_filename_validator), - ('original_revision_id', LegalHoldHeldRevisionMetadata._original_revision_id_validator), - ('original_file_path', LegalHoldHeldRevisionMetadata._original_file_path_validator), - ('server_modified', LegalHoldHeldRevisionMetadata._server_modified_validator), - ('author_member_id', LegalHoldHeldRevisionMetadata._author_member_id_validator), - ('author_member_status', LegalHoldHeldRevisionMetadata._author_member_status_validator), - ('author_email', LegalHoldHeldRevisionMetadata._author_email_validator), - ('file_type', LegalHoldHeldRevisionMetadata._file_type_validator), - ('size', LegalHoldHeldRevisionMetadata._size_validator), - ('content_hash', LegalHoldHeldRevisionMetadata._content_hash_validator), + ('new_filename', LegalHoldHeldRevisionMetadata.new_filename.validator), + ('original_revision_id', LegalHoldHeldRevisionMetadata.original_revision_id.validator), + ('original_file_path', LegalHoldHeldRevisionMetadata.original_file_path.validator), + ('server_modified', LegalHoldHeldRevisionMetadata.server_modified.validator), + ('author_member_id', LegalHoldHeldRevisionMetadata.author_member_id.validator), + ('author_member_status', LegalHoldHeldRevisionMetadata.author_member_status.validator), + ('author_email', LegalHoldHeldRevisionMetadata.author_email.validator), + ('file_type', LegalHoldHeldRevisionMetadata.file_type.validator), + ('size', LegalHoldHeldRevisionMetadata.size.validator), + ('content_hash', LegalHoldHeldRevisionMetadata.content_hash.validator), ] -LegalHoldPolicy._id_validator = LegalHoldId_validator -LegalHoldPolicy._name_validator = LegalHoldPolicyName_validator -LegalHoldPolicy._description_validator = bv.Nullable(LegalHoldPolicyDescription_validator) -LegalHoldPolicy._activation_time_validator = bv.Nullable(common.DropboxTimestamp_validator) -LegalHoldPolicy._members_validator = MembersInfo_validator -LegalHoldPolicy._status_validator = LegalHoldStatus_validator -LegalHoldPolicy._start_date_validator = common.DropboxTimestamp_validator -LegalHoldPolicy._end_date_validator = bv.Nullable(common.DropboxTimestamp_validator) +LegalHoldPolicy.id.validator = LegalHoldId_validator +LegalHoldPolicy.name.validator = LegalHoldPolicyName_validator +LegalHoldPolicy.description.validator = bv.Nullable(LegalHoldPolicyDescription_validator) +LegalHoldPolicy.activation_time.validator = bv.Nullable(common.DropboxTimestamp_validator) +LegalHoldPolicy.members.validator = MembersInfo_validator +LegalHoldPolicy.status.validator = LegalHoldStatus_validator +LegalHoldPolicy.start_date.validator = common.DropboxTimestamp_validator +LegalHoldPolicy.end_date.validator = bv.Nullable(common.DropboxTimestamp_validator) LegalHoldPolicy._all_field_names_ = set([ 'id', 'name', @@ -22037,14 +13524,14 @@ def __repr__(self): 'end_date', ]) LegalHoldPolicy._all_fields_ = [ - ('id', LegalHoldPolicy._id_validator), - ('name', LegalHoldPolicy._name_validator), - ('description', LegalHoldPolicy._description_validator), - ('activation_time', LegalHoldPolicy._activation_time_validator), - ('members', LegalHoldPolicy._members_validator), - ('status', LegalHoldPolicy._status_validator), - ('start_date', LegalHoldPolicy._start_date_validator), - ('end_date', LegalHoldPolicy._end_date_validator), + ('id', LegalHoldPolicy.id.validator), + ('name', LegalHoldPolicy.name.validator), + ('description', LegalHoldPolicy.description.validator), + ('activation_time', LegalHoldPolicy.activation_time.validator), + ('members', LegalHoldPolicy.members.validator), + ('status', LegalHoldPolicy.status.validator), + ('start_date', LegalHoldPolicy.start_date.validator), + ('end_date', LegalHoldPolicy.end_date.validator), ] LegalHoldStatus._active_validator = bv.Void() @@ -22085,9 +13572,9 @@ def __repr__(self): LegalHoldsError.insufficient_permissions = LegalHoldsError('insufficient_permissions') LegalHoldsError.other = LegalHoldsError('other') -LegalHoldsGetPolicyArg._id_validator = LegalHoldId_validator +LegalHoldsGetPolicyArg.id.validator = LegalHoldId_validator LegalHoldsGetPolicyArg._all_field_names_ = set(['id']) -LegalHoldsGetPolicyArg._all_fields_ = [('id', LegalHoldsGetPolicyArg._id_validator)] +LegalHoldsGetPolicyArg._all_fields_ = [('id', LegalHoldsGetPolicyArg.id.validator)] LegalHoldsGetPolicyError._legal_hold_policy_not_found_validator = bv.Void() LegalHoldsGetPolicyError._tagmap = { @@ -22097,33 +13584,33 @@ def __repr__(self): LegalHoldsGetPolicyError.legal_hold_policy_not_found = LegalHoldsGetPolicyError('legal_hold_policy_not_found') -LegalHoldsListHeldRevisionResult._entries_validator = bv.List(LegalHoldHeldRevisionMetadata_validator) -LegalHoldsListHeldRevisionResult._cursor_validator = bv.Nullable(ListHeldRevisionCursor_validator) -LegalHoldsListHeldRevisionResult._has_more_validator = bv.Boolean() +LegalHoldsListHeldRevisionResult.entries.validator = bv.List(LegalHoldHeldRevisionMetadata_validator) +LegalHoldsListHeldRevisionResult.cursor.validator = bv.Nullable(ListHeldRevisionCursor_validator) +LegalHoldsListHeldRevisionResult.has_more.validator = bv.Boolean() LegalHoldsListHeldRevisionResult._all_field_names_ = set([ 'entries', 'cursor', 'has_more', ]) LegalHoldsListHeldRevisionResult._all_fields_ = [ - ('entries', LegalHoldsListHeldRevisionResult._entries_validator), - ('cursor', LegalHoldsListHeldRevisionResult._cursor_validator), - ('has_more', LegalHoldsListHeldRevisionResult._has_more_validator), + ('entries', LegalHoldsListHeldRevisionResult.entries.validator), + ('cursor', LegalHoldsListHeldRevisionResult.cursor.validator), + ('has_more', LegalHoldsListHeldRevisionResult.has_more.validator), ] -LegalHoldsListHeldRevisionsArg._id_validator = LegalHoldId_validator +LegalHoldsListHeldRevisionsArg.id.validator = LegalHoldId_validator LegalHoldsListHeldRevisionsArg._all_field_names_ = set(['id']) -LegalHoldsListHeldRevisionsArg._all_fields_ = [('id', LegalHoldsListHeldRevisionsArg._id_validator)] +LegalHoldsListHeldRevisionsArg._all_fields_ = [('id', LegalHoldsListHeldRevisionsArg.id.validator)] -LegalHoldsListHeldRevisionsContinueArg._id_validator = LegalHoldId_validator -LegalHoldsListHeldRevisionsContinueArg._cursor_validator = bv.Nullable(ListHeldRevisionCursor_validator) +LegalHoldsListHeldRevisionsContinueArg.id.validator = LegalHoldId_validator +LegalHoldsListHeldRevisionsContinueArg.cursor.validator = bv.Nullable(ListHeldRevisionCursor_validator) LegalHoldsListHeldRevisionsContinueArg._all_field_names_ = set([ 'id', 'cursor', ]) LegalHoldsListHeldRevisionsContinueArg._all_fields_ = [ - ('id', LegalHoldsListHeldRevisionsContinueArg._id_validator), - ('cursor', LegalHoldsListHeldRevisionsContinueArg._cursor_validator), + ('id', LegalHoldsListHeldRevisionsContinueArg.id.validator), + ('cursor', LegalHoldsListHeldRevisionsContinueArg.cursor.validator), ] LegalHoldsListHeldRevisionsContinueError._unknown_legal_hold_error_validator = bv.Void() @@ -22156,9 +13643,9 @@ def __repr__(self): LegalHoldsListHeldRevisionsError.legal_hold_still_empty = LegalHoldsListHeldRevisionsError('legal_hold_still_empty') LegalHoldsListHeldRevisionsError.inactive_legal_hold = LegalHoldsListHeldRevisionsError('inactive_legal_hold') -LegalHoldsListPoliciesArg._include_released_validator = bv.Boolean() +LegalHoldsListPoliciesArg.include_released.validator = bv.Boolean() LegalHoldsListPoliciesArg._all_field_names_ = set(['include_released']) -LegalHoldsListPoliciesArg._all_fields_ = [('include_released', LegalHoldsListPoliciesArg._include_released_validator)] +LegalHoldsListPoliciesArg._all_fields_ = [('include_released', LegalHoldsListPoliciesArg.include_released.validator)] LegalHoldsListPoliciesError._transient_error_validator = bv.Void() LegalHoldsListPoliciesError._tagmap = { @@ -22168,15 +13655,15 @@ def __repr__(self): LegalHoldsListPoliciesError.transient_error = LegalHoldsListPoliciesError('transient_error') -LegalHoldsListPoliciesResult._policies_validator = bv.List(LegalHoldPolicy_validator) +LegalHoldsListPoliciesResult.policies.validator = bv.List(LegalHoldPolicy_validator) LegalHoldsListPoliciesResult._all_field_names_ = set(['policies']) -LegalHoldsListPoliciesResult._all_fields_ = [('policies', LegalHoldsListPoliciesResult._policies_validator)] +LegalHoldsListPoliciesResult._all_fields_ = [('policies', LegalHoldsListPoliciesResult.policies.validator)] -LegalHoldsPolicyCreateArg._name_validator = LegalHoldPolicyName_validator -LegalHoldsPolicyCreateArg._description_validator = bv.Nullable(LegalHoldPolicyDescription_validator) -LegalHoldsPolicyCreateArg._members_validator = bv.List(team_common.TeamMemberId_validator) -LegalHoldsPolicyCreateArg._start_date_validator = bv.Nullable(common.DropboxTimestamp_validator) -LegalHoldsPolicyCreateArg._end_date_validator = bv.Nullable(common.DropboxTimestamp_validator) +LegalHoldsPolicyCreateArg.name.validator = LegalHoldPolicyName_validator +LegalHoldsPolicyCreateArg.description.validator = bv.Nullable(LegalHoldPolicyDescription_validator) +LegalHoldsPolicyCreateArg.members.validator = bv.List(team_common.TeamMemberId_validator) +LegalHoldsPolicyCreateArg.start_date.validator = bv.Nullable(common.DropboxTimestamp_validator) +LegalHoldsPolicyCreateArg.end_date.validator = bv.Nullable(common.DropboxTimestamp_validator) LegalHoldsPolicyCreateArg._all_field_names_ = set([ 'name', 'description', @@ -22185,11 +13672,11 @@ def __repr__(self): 'end_date', ]) LegalHoldsPolicyCreateArg._all_fields_ = [ - ('name', LegalHoldsPolicyCreateArg._name_validator), - ('description', LegalHoldsPolicyCreateArg._description_validator), - ('members', LegalHoldsPolicyCreateArg._members_validator), - ('start_date', LegalHoldsPolicyCreateArg._start_date_validator), - ('end_date', LegalHoldsPolicyCreateArg._end_date_validator), + ('name', LegalHoldsPolicyCreateArg.name.validator), + ('description', LegalHoldsPolicyCreateArg.description.validator), + ('members', LegalHoldsPolicyCreateArg.members.validator), + ('start_date', LegalHoldsPolicyCreateArg.start_date.validator), + ('end_date', LegalHoldsPolicyCreateArg.end_date.validator), ] LegalHoldsPolicyCreateError._start_date_is_later_than_end_date_validator = bv.Void() @@ -22221,9 +13708,9 @@ def __repr__(self): LegalHoldsPolicyCreateError.team_exceeded_legal_hold_quota = LegalHoldsPolicyCreateError('team_exceeded_legal_hold_quota') LegalHoldsPolicyCreateError.invalid_date = LegalHoldsPolicyCreateError('invalid_date') -LegalHoldsPolicyReleaseArg._id_validator = LegalHoldId_validator +LegalHoldsPolicyReleaseArg.id.validator = LegalHoldId_validator LegalHoldsPolicyReleaseArg._all_field_names_ = set(['id']) -LegalHoldsPolicyReleaseArg._all_fields_ = [('id', LegalHoldsPolicyReleaseArg._id_validator)] +LegalHoldsPolicyReleaseArg._all_fields_ = [('id', LegalHoldsPolicyReleaseArg.id.validator)] LegalHoldsPolicyReleaseError._legal_hold_performing_another_operation_validator = bv.Void() LegalHoldsPolicyReleaseError._legal_hold_already_releasing_validator = bv.Void() @@ -22239,10 +13726,10 @@ def __repr__(self): LegalHoldsPolicyReleaseError.legal_hold_already_releasing = LegalHoldsPolicyReleaseError('legal_hold_already_releasing') LegalHoldsPolicyReleaseError.legal_hold_policy_not_found = LegalHoldsPolicyReleaseError('legal_hold_policy_not_found') -LegalHoldsPolicyUpdateArg._id_validator = LegalHoldId_validator -LegalHoldsPolicyUpdateArg._name_validator = bv.Nullable(LegalHoldPolicyName_validator) -LegalHoldsPolicyUpdateArg._description_validator = bv.Nullable(LegalHoldPolicyDescription_validator) -LegalHoldsPolicyUpdateArg._members_validator = bv.Nullable(bv.List(team_common.TeamMemberId_validator)) +LegalHoldsPolicyUpdateArg.id.validator = LegalHoldId_validator +LegalHoldsPolicyUpdateArg.name.validator = bv.Nullable(LegalHoldPolicyName_validator) +LegalHoldsPolicyUpdateArg.description.validator = bv.Nullable(LegalHoldPolicyDescription_validator) +LegalHoldsPolicyUpdateArg.members.validator = bv.Nullable(bv.List(team_common.TeamMemberId_validator)) LegalHoldsPolicyUpdateArg._all_field_names_ = set([ 'id', 'name', @@ -22250,10 +13737,10 @@ def __repr__(self): 'members', ]) LegalHoldsPolicyUpdateArg._all_fields_ = [ - ('id', LegalHoldsPolicyUpdateArg._id_validator), - ('name', LegalHoldsPolicyUpdateArg._name_validator), - ('description', LegalHoldsPolicyUpdateArg._description_validator), - ('members', LegalHoldsPolicyUpdateArg._members_validator), + ('id', LegalHoldsPolicyUpdateArg.id.validator), + ('name', LegalHoldsPolicyUpdateArg.name.validator), + ('description', LegalHoldsPolicyUpdateArg.description.validator), + ('members', LegalHoldsPolicyUpdateArg.members.validator), ] LegalHoldsPolicyUpdateError._inactive_legal_hold_validator = bv.Void() @@ -22282,9 +13769,9 @@ def __repr__(self): LegalHoldsPolicyUpdateError.name_must_be_unique = LegalHoldsPolicyUpdateError('name_must_be_unique') LegalHoldsPolicyUpdateError.legal_hold_policy_not_found = LegalHoldsPolicyUpdateError('legal_hold_policy_not_found') -ListMemberAppsArg._team_member_id_validator = bv.String() +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)] +ListMemberAppsArg._all_fields_ = [('team_member_id', ListMemberAppsArg.team_member_id.validator)] ListMemberAppsError._member_not_found_validator = bv.Void() ListMemberAppsError._other_validator = bv.Void() @@ -22296,14 +13783,14 @@ def __repr__(self): ListMemberAppsError.member_not_found = ListMemberAppsError('member_not_found') ListMemberAppsError.other = ListMemberAppsError('other') -ListMemberAppsResult._linked_api_apps_validator = bv.List(ApiApp_validator) +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)] +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.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', @@ -22311,10 +13798,10 @@ def __repr__(self): '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), + ('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() @@ -22327,23 +13814,23 @@ def __repr__(self): 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.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), + ('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.cursor.validator = bv.Nullable(bv.String()) ListMembersAppsArg._all_field_names_ = set(['cursor']) -ListMembersAppsArg._all_fields_ = [('cursor', ListMembersAppsArg._cursor_validator)] +ListMembersAppsArg._all_fields_ = [('cursor', ListMembersAppsArg.cursor.validator)] ListMembersAppsError._reset_validator = bv.Void() ListMembersAppsError._other_validator = bv.Void() @@ -22355,24 +13842,24 @@ def __repr__(self): 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.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), + ('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.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', @@ -22380,10 +13867,10 @@ def __repr__(self): '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), + ('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() @@ -22396,23 +13883,23 @@ def __repr__(self): 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.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), + ('devices', ListMembersDevicesResult.devices.validator), + ('has_more', ListMembersDevicesResult.has_more.validator), + ('cursor', ListMembersDevicesResult.cursor.validator), ] -ListTeamAppsArg._cursor_validator = bv.Nullable(bv.String()) +ListTeamAppsArg.cursor.validator = bv.Nullable(bv.String()) ListTeamAppsArg._all_field_names_ = set(['cursor']) -ListTeamAppsArg._all_fields_ = [('cursor', ListTeamAppsArg._cursor_validator)] +ListTeamAppsArg._all_fields_ = [('cursor', ListTeamAppsArg.cursor.validator)] ListTeamAppsError._reset_validator = bv.Void() ListTeamAppsError._other_validator = bv.Void() @@ -22424,24 +13911,24 @@ def __repr__(self): 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.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), + ('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.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', @@ -22449,10 +13936,10 @@ def __repr__(self): '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), + ('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() @@ -22465,39 +13952,39 @@ def __repr__(self): 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.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), + ('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.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), + ('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._is_directory_restricted_validator = bv.Nullable(bv.Boolean()) +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.is_directory_restricted.validator = bv.Nullable(bv.Boolean()) MemberAddArg._all_field_names_ = set([ 'member_email', 'member_given_name', @@ -22509,14 +13996,14 @@ def __repr__(self): 'is_directory_restricted', ]) 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), - ('is_directory_restricted', MemberAddArg._is_directory_restricted_validator), + ('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), + ('is_directory_restricted', MemberAddArg.is_directory_restricted.validator), ] MemberAddResult._success_validator = TeamMemberInfo_validator @@ -22544,10 +14031,10 @@ def __repr__(self): '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.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', @@ -22555,38 +14042,38 @@ def __repr__(self): '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), + ('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.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), + ('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._secondary_emails_validator = bv.Nullable(bv.List(secondary_emails.SecondaryEmail_validator)) -MemberProfile._status_validator = TeamMemberStatus_validator -MemberProfile._name_validator = users.Name_validator -MemberProfile._membership_type_validator = TeamMembershipType_validator -MemberProfile._invited_on_validator = bv.Nullable(common.DropboxTimestamp_validator) -MemberProfile._joined_on_validator = bv.Nullable(common.DropboxTimestamp_validator) -MemberProfile._suspended_on_validator = bv.Nullable(common.DropboxTimestamp_validator) -MemberProfile._persistent_id_validator = bv.Nullable(bv.String()) -MemberProfile._is_directory_restricted_validator = bv.Nullable(bv.Boolean()) -MemberProfile._profile_photo_url_validator = bv.Nullable(bv.String()) +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.secondary_emails.validator = bv.Nullable(bv.List(secondary_emails.SecondaryEmail_validator)) +MemberProfile.status.validator = TeamMemberStatus_validator +MemberProfile.name.validator = users.Name_validator +MemberProfile.membership_type.validator = TeamMembershipType_validator +MemberProfile.invited_on.validator = bv.Nullable(common.DropboxTimestamp_validator) +MemberProfile.joined_on.validator = bv.Nullable(common.DropboxTimestamp_validator) +MemberProfile.suspended_on.validator = bv.Nullable(common.DropboxTimestamp_validator) +MemberProfile.persistent_id.validator = bv.Nullable(bv.String()) +MemberProfile.is_directory_restricted.validator = bv.Nullable(bv.Boolean()) +MemberProfile.profile_photo_url.validator = bv.Nullable(bv.String()) MemberProfile._all_field_names_ = set([ 'team_member_id', 'external_id', @@ -22605,21 +14092,21 @@ def __repr__(self): 'profile_photo_url', ]) 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), - ('secondary_emails', MemberProfile._secondary_emails_validator), - ('status', MemberProfile._status_validator), - ('name', MemberProfile._name_validator), - ('membership_type', MemberProfile._membership_type_validator), - ('invited_on', MemberProfile._invited_on_validator), - ('joined_on', MemberProfile._joined_on_validator), - ('suspended_on', MemberProfile._suspended_on_validator), - ('persistent_id', MemberProfile._persistent_id_validator), - ('is_directory_restricted', MemberProfile._is_directory_restricted_validator), - ('profile_photo_url', MemberProfile._profile_photo_url_validator), + ('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), + ('secondary_emails', MemberProfile.secondary_emails.validator), + ('status', MemberProfile.status.validator), + ('name', MemberProfile.name.validator), + ('membership_type', MemberProfile.membership_type.validator), + ('invited_on', MemberProfile.invited_on.validator), + ('joined_on', MemberProfile.joined_on.validator), + ('suspended_on', MemberProfile.suspended_on.validator), + ('persistent_id', MemberProfile.persistent_id.validator), + ('is_directory_restricted', MemberProfile.is_directory_restricted.validator), + ('profile_photo_url', MemberProfile.profile_photo_url.validator), ] UserSelectorError._user_not_found_validator = bv.Void() @@ -22637,15 +14124,15 @@ def __repr__(self): 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.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), + ('new_members', MembersAddArg.new_members.validator), + ('force_async', MembersAddArg.force_async.validator), ] MembersAddJobStatus._complete_validator = bv.List(MemberAddResult_validator) @@ -22662,24 +14149,24 @@ def __repr__(self): } MembersAddLaunch._tagmap.update(async_.LaunchResultBase._tagmap) -MembersDeactivateBaseArg._user_validator = UserSelectorArg_validator +MembersDeactivateBaseArg.user.validator = UserSelectorArg_validator MembersDeactivateBaseArg._all_field_names_ = set(['user']) -MembersDeactivateBaseArg._all_fields_ = [('user', MembersDeactivateBaseArg._user_validator)] +MembersDeactivateBaseArg._all_fields_ = [('user', MembersDeactivateBaseArg.user.validator)] -MembersDataTransferArg._transfer_dest_id_validator = UserSelectorArg_validator -MembersDataTransferArg._transfer_admin_id_validator = UserSelectorArg_validator +MembersDataTransferArg.transfer_dest_id.validator = UserSelectorArg_validator +MembersDataTransferArg.transfer_admin_id.validator = UserSelectorArg_validator MembersDataTransferArg._all_field_names_ = MembersDeactivateBaseArg._all_field_names_.union(set([ 'transfer_dest_id', 'transfer_admin_id', ])) MembersDataTransferArg._all_fields_ = MembersDeactivateBaseArg._all_fields_ + [ - ('transfer_dest_id', MembersDataTransferArg._transfer_dest_id_validator), - ('transfer_admin_id', MembersDataTransferArg._transfer_admin_id_validator), + ('transfer_dest_id', MembersDataTransferArg.transfer_dest_id.validator), + ('transfer_admin_id', MembersDataTransferArg.transfer_admin_id.validator), ] -MembersDeactivateArg._wipe_data_validator = bv.Boolean() +MembersDeactivateArg.wipe_data.validator = bv.Boolean() MembersDeactivateArg._all_field_names_ = MembersDeactivateBaseArg._all_field_names_.union(set(['wipe_data'])) -MembersDeactivateArg._all_fields_ = MembersDeactivateBaseArg._all_fields_ + [('wipe_data', MembersDeactivateArg._wipe_data_validator)] +MembersDeactivateArg._all_fields_ = MembersDeactivateBaseArg._all_fields_ + [('wipe_data', MembersDeactivateArg.wipe_data.validator)] MembersDeactivateError._user_not_in_team_validator = bv.Void() MembersDeactivateError._other_validator = bv.Void() @@ -22692,9 +14179,9 @@ def __repr__(self): MembersDeactivateError.user_not_in_team = MembersDeactivateError('user_not_in_team') MembersDeactivateError.other = MembersDeactivateError('other') -MembersDeleteProfilePhotoArg._user_validator = UserSelectorArg_validator +MembersDeleteProfilePhotoArg.user.validator = UserSelectorArg_validator MembersDeleteProfilePhotoArg._all_field_names_ = set(['user']) -MembersDeleteProfilePhotoArg._all_fields_ = [('user', MembersDeleteProfilePhotoArg._user_validator)] +MembersDeleteProfilePhotoArg._all_fields_ = [('user', MembersDeleteProfilePhotoArg.user.validator)] MembersDeleteProfilePhotoError._set_profile_disallowed_validator = bv.Void() MembersDeleteProfilePhotoError._other_validator = bv.Void() @@ -22707,9 +14194,9 @@ def __repr__(self): MembersDeleteProfilePhotoError.set_profile_disallowed = MembersDeleteProfilePhotoError('set_profile_disallowed') MembersDeleteProfilePhotoError.other = MembersDeleteProfilePhotoError('other') -MembersGetInfoArgs._members_validator = bv.List(UserSelectorArg_validator) +MembersGetInfoArgs.members.validator = bv.List(UserSelectorArg_validator) MembersGetInfoArgs._all_field_names_ = set(['members']) -MembersGetInfoArgs._all_fields_ = [('members', MembersGetInfoArgs._members_validator)] +MembersGetInfoArgs._all_fields_ = [('members', MembersGetInfoArgs.members.validator)] MembersGetInfoError._other_validator = bv.Void() MembersGetInfoError._tagmap = { @@ -22725,31 +14212,31 @@ def __repr__(self): 'member_info': MembersGetInfoItem._member_info_validator, } -MembersInfo._team_member_ids_validator = bv.List(team_common.TeamMemberId_validator) -MembersInfo._permanently_deleted_users_validator = bv.UInt64() +MembersInfo.team_member_ids.validator = bv.List(team_common.TeamMemberId_validator) +MembersInfo.permanently_deleted_users.validator = bv.UInt64() MembersInfo._all_field_names_ = set([ 'team_member_ids', 'permanently_deleted_users', ]) MembersInfo._all_fields_ = [ - ('team_member_ids', MembersInfo._team_member_ids_validator), - ('permanently_deleted_users', MembersInfo._permanently_deleted_users_validator), + ('team_member_ids', MembersInfo.team_member_ids.validator), + ('permanently_deleted_users', MembersInfo.permanently_deleted_users.validator), ] -MembersListArg._limit_validator = bv.UInt32(min_value=1, max_value=1000) -MembersListArg._include_removed_validator = bv.Boolean() +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), + ('limit', MembersListArg.limit.validator), + ('include_removed', MembersListArg.include_removed.validator), ] -MembersListContinueArg._cursor_validator = bv.String() +MembersListContinueArg.cursor.validator = bv.String() MembersListContinueArg._all_field_names_ = set(['cursor']) -MembersListContinueArg._all_fields_ = [('cursor', MembersListContinueArg._cursor_validator)] +MembersListContinueArg._all_fields_ = [('cursor', MembersListContinueArg.cursor.validator)] MembersListContinueError._invalid_cursor_validator = bv.Void() MembersListContinueError._other_validator = bv.Void() @@ -22768,23 +14255,23 @@ def __repr__(self): MembersListError.other = MembersListError('other') -MembersListResult._members_validator = bv.List(TeamMemberInfo_validator) -MembersListResult._cursor_validator = bv.String() -MembersListResult._has_more_validator = bv.Boolean() +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), + ('members', MembersListResult.members.validator), + ('cursor', MembersListResult.cursor.validator), + ('has_more', MembersListResult.has_more.validator), ] -MembersRecoverArg._user_validator = UserSelectorArg_validator +MembersRecoverArg.user.validator = UserSelectorArg_validator MembersRecoverArg._all_field_names_ = set(['user']) -MembersRecoverArg._all_fields_ = [('user', MembersRecoverArg._user_validator)] +MembersRecoverArg._all_fields_ = [('user', MembersRecoverArg.user.validator)] MembersRecoverError._user_unrecoverable_validator = bv.Void() MembersRecoverError._user_not_in_team_validator = bv.Void() @@ -22803,10 +14290,10 @@ def __repr__(self): 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._retain_team_shares_validator = bv.Boolean() +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.retain_team_shares.validator = bv.Boolean() MembersRemoveArg._all_field_names_ = MembersDeactivateArg._all_field_names_.union(set([ 'transfer_dest_id', 'transfer_admin_id', @@ -22814,10 +14301,10 @@ def __repr__(self): 'retain_team_shares', ])) 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), - ('retain_team_shares', MembersRemoveArg._retain_team_shares_validator), + ('transfer_dest_id', MembersRemoveArg.transfer_dest_id.validator), + ('transfer_admin_id', MembersRemoveArg.transfer_admin_id.validator), + ('keep_account', MembersRemoveArg.keep_account.validator), + ('retain_team_shares', MembersRemoveArg.retain_team_shares.validator), ] MembersTransferFilesError._removed_and_transfer_dest_should_differ_validator = bv.Void() @@ -22898,15 +14385,15 @@ def __repr__(self): MembersSendWelcomeError.other = MembersSendWelcomeError('other') -MembersSetPermissionsArg._user_validator = UserSelectorArg_validator -MembersSetPermissionsArg._new_role_validator = AdminTier_validator +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), + ('user', MembersSetPermissionsArg.user.validator), + ('new_role', MembersSetPermissionsArg.new_role.validator), ] MembersSetPermissionsError._last_admin_validator = bv.Void() @@ -22929,24 +14416,24 @@ def __repr__(self): 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.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), + ('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._new_is_directory_restricted_validator = bv.Nullable(bv.Boolean()) +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.new_is_directory_restricted.validator = bv.Nullable(bv.Boolean()) MembersSetProfileArg._all_field_names_ = set([ 'user', 'new_email', @@ -22957,13 +14444,13 @@ def __repr__(self): 'new_is_directory_restricted', ]) 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), - ('new_is_directory_restricted', MembersSetProfileArg._new_is_directory_restricted_validator), + ('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), + ('new_is_directory_restricted', MembersSetProfileArg.new_is_directory_restricted.validator), ] MembersSetProfileError._external_id_and_new_external_id_unsafe_validator = bv.Void() @@ -23001,15 +14488,15 @@ def __repr__(self): MembersSetProfileError.directory_restricted_off = MembersSetProfileError('directory_restricted_off') MembersSetProfileError.other = MembersSetProfileError('other') -MembersSetProfilePhotoArg._user_validator = UserSelectorArg_validator -MembersSetProfilePhotoArg._photo_validator = account.PhotoSourceArg_validator +MembersSetProfilePhotoArg.user.validator = UserSelectorArg_validator +MembersSetProfilePhotoArg.photo.validator = account.PhotoSourceArg_validator MembersSetProfilePhotoArg._all_field_names_ = set([ 'user', 'photo', ]) MembersSetProfilePhotoArg._all_fields_ = [ - ('user', MembersSetProfilePhotoArg._user_validator), - ('photo', MembersSetProfilePhotoArg._photo_validator), + ('user', MembersSetProfilePhotoArg.user.validator), + ('photo', MembersSetProfilePhotoArg.photo.validator), ] MembersSetProfilePhotoError._set_profile_disallowed_validator = bv.Void() @@ -23056,9 +14543,9 @@ def __repr__(self): MembersTransferFormerMembersFilesError.user_data_cannot_be_transferred = MembersTransferFormerMembersFilesError('user_data_cannot_be_transferred') MembersTransferFormerMembersFilesError.user_data_already_transferred = MembersTransferFormerMembersFilesError('user_data_already_transferred') -MembersUnsuspendArg._user_validator = UserSelectorArg_validator +MembersUnsuspendArg.user.validator = UserSelectorArg_validator MembersUnsuspendArg._all_field_names_ = set(['user']) -MembersUnsuspendArg._all_fields_ = [('user', MembersUnsuspendArg._user_validator)] +MembersUnsuspendArg._all_fields_ = [('user', MembersUnsuspendArg.user.validator)] MembersUnsuspendError._unsuspend_non_suspended_member_validator = bv.Void() MembersUnsuspendError._team_license_limit_validator = bv.Void() @@ -23093,11 +14580,11 @@ def __repr__(self): 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.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', @@ -23106,17 +14593,17 @@ def __repr__(self): '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), + ('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.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', @@ -23124,10 +14611,10 @@ def __repr__(self): '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), + ('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() @@ -23160,15 +14647,15 @@ def __repr__(self): RemoveCustomQuotaResult.other = RemoveCustomQuotaResult('other') -RemovedStatus._is_recoverable_validator = bv.Boolean() -RemovedStatus._is_disconnected_validator = bv.Boolean() +RemovedStatus.is_recoverable.validator = bv.Boolean() +RemovedStatus.is_disconnected.validator = bv.Boolean() RemovedStatus._all_field_names_ = set([ 'is_recoverable', 'is_disconnected', ]) RemovedStatus._all_fields_ = [ - ('is_recoverable', RemovedStatus._is_recoverable_validator), - ('is_disconnected', RemovedStatus._is_disconnected_validator), + ('is_recoverable', RemovedStatus.is_recoverable.validator), + ('is_disconnected', RemovedStatus.is_disconnected.validator), ] ResendSecondaryEmailResult._success_validator = common.EmailAddress_validator @@ -23184,17 +14671,17 @@ def __repr__(self): ResendSecondaryEmailResult.other = ResendSecondaryEmailResult('other') -ResendVerificationEmailArg._emails_to_resend_validator = bv.List(UserSecondaryEmailsArg_validator) +ResendVerificationEmailArg.emails_to_resend.validator = bv.List(UserSecondaryEmailsArg_validator) ResendVerificationEmailArg._all_field_names_ = set(['emails_to_resend']) -ResendVerificationEmailArg._all_fields_ = [('emails_to_resend', ResendVerificationEmailArg._emails_to_resend_validator)] +ResendVerificationEmailArg._all_fields_ = [('emails_to_resend', ResendVerificationEmailArg.emails_to_resend.validator)] -ResendVerificationEmailResult._results_validator = bv.List(UserResendResult_validator) +ResendVerificationEmailResult.results.validator = bv.List(UserResendResult_validator) ResendVerificationEmailResult._all_field_names_ = set(['results']) -ResendVerificationEmailResult._all_fields_ = [('results', ResendVerificationEmailResult._results_validator)] +ResendVerificationEmailResult._all_fields_ = [('results', ResendVerificationEmailResult.results.validator)] -RevokeDesktopClientArg._delete_on_unlink_validator = bv.Boolean() +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)] +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 @@ -23205,9 +14692,9 @@ def __repr__(self): 'mobile_client': RevokeDeviceSessionArg._mobile_client_validator, } -RevokeDeviceSessionBatchArg._revoke_devices_validator = bv.List(RevokeDeviceSessionArg_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)] +RevokeDeviceSessionBatchArg._all_fields_ = [('revoke_devices', RevokeDeviceSessionBatchArg.revoke_devices.validator)] RevokeDeviceSessionBatchError._other_validator = bv.Void() RevokeDeviceSessionBatchError._tagmap = { @@ -23216,9 +14703,9 @@ def __repr__(self): RevokeDeviceSessionBatchError.other = RevokeDeviceSessionBatchError('other') -RevokeDeviceSessionBatchResult._revoke_devices_status_validator = bv.List(RevokeDeviceSessionStatus_validator) +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)] +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() @@ -23233,34 +14720,34 @@ def __repr__(self): 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.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), + ('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.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), + ('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.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)] +RevokeLinkedApiAppBatchArg._all_fields_ = [('revoke_linked_app', RevokeLinkedApiAppBatchArg.revoke_linked_app.validator)] RevokeLinkedAppBatchError._other_validator = bv.Void() RevokeLinkedAppBatchError._tagmap = { @@ -23269,9 +14756,9 @@ def __repr__(self): RevokeLinkedAppBatchError.other = RevokeLinkedAppBatchError('other') -RevokeLinkedAppBatchResult._revoke_linked_app_status_validator = bv.List(RevokeLinkedAppStatus_validator) +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)] +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() @@ -23289,20 +14776,20 @@ def __repr__(self): RevokeLinkedAppError.app_folder_removal_not_supported = RevokeLinkedAppError('app_folder_removal_not_supported') RevokeLinkedAppError.other = RevokeLinkedAppError('other') -RevokeLinkedAppStatus._success_validator = bv.Boolean() -RevokeLinkedAppStatus._error_type_validator = bv.Nullable(RevokeLinkedAppError_validator) +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), + ('success', RevokeLinkedAppStatus.success.validator), + ('error_type', RevokeLinkedAppStatus.error_type.validator), ] -SetCustomQuotaArg._users_and_quotas_validator = bv.List(UserCustomQuotaArg_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)] +SetCustomQuotaArg._all_fields_ = [('users_and_quotas', SetCustomQuotaArg.users_and_quotas.validator)] SetCustomQuotaError._some_users_are_excluded_validator = bv.Void() SetCustomQuotaError._tagmap = { @@ -23312,15 +14799,15 @@ def __repr__(self): SetCustomQuotaError.some_users_are_excluded = SetCustomQuotaError('some_users_are_excluded') -StorageBucket._bucket_validator = bv.String() -StorageBucket._users_validator = bv.UInt64() +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), + ('bucket', StorageBucket.bucket.validator), + ('users', StorageBucket.users.validator), ] TeamFolderAccessError._invalid_team_folder_id_validator = bv.Void() @@ -23340,13 +14827,13 @@ def __repr__(self): } TeamFolderActivateError._tagmap.update(BaseTeamFolderError._tagmap) -TeamFolderIdArg._team_folder_id_validator = common.SharedFolderId_validator +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)] +TeamFolderIdArg._all_fields_ = [('team_folder_id', TeamFolderIdArg.team_folder_id.validator)] -TeamFolderArchiveArg._force_async_off_validator = bv.Boolean() +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)] +TeamFolderArchiveArg._all_fields_ = TeamFolderIdArg._all_fields_ + [('force_async_off', TeamFolderArchiveArg.force_async_off.validator)] TeamFolderArchiveError._tagmap = { } @@ -23366,15 +14853,15 @@ def __repr__(self): } TeamFolderArchiveLaunch._tagmap.update(async_.LaunchResultBase._tagmap) -TeamFolderCreateArg._name_validator = bv.String() -TeamFolderCreateArg._sync_setting_validator = bv.Nullable(files.SyncSettingArg_validator) +TeamFolderCreateArg.name.validator = bv.String() +TeamFolderCreateArg.sync_setting.validator = bv.Nullable(files.SyncSettingArg_validator) TeamFolderCreateArg._all_field_names_ = set([ 'name', 'sync_setting', ]) TeamFolderCreateArg._all_fields_ = [ - ('name', TeamFolderCreateArg._name_validator), - ('sync_setting', TeamFolderCreateArg._sync_setting_validator), + ('name', TeamFolderCreateArg.name.validator), + ('sync_setting', TeamFolderCreateArg.sync_setting.validator), ] TeamFolderCreateError._invalid_folder_name_validator = bv.Void() @@ -23402,9 +14889,9 @@ def __repr__(self): 'team_folder_metadata': TeamFolderGetInfoItem._team_folder_metadata_validator, } -TeamFolderIdListArg._team_folder_ids_validator = bv.List(common.SharedFolderId_validator, min_items=1) +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)] +TeamFolderIdListArg._all_fields_ = [('team_folder_ids', TeamFolderIdListArg.team_folder_ids.validator)] TeamFolderInvalidStatusError._active_validator = bv.Void() TeamFolderInvalidStatusError._archived_validator = bv.Void() @@ -23422,13 +14909,13 @@ def __repr__(self): TeamFolderInvalidStatusError.archive_in_progress = TeamFolderInvalidStatusError('archive_in_progress') TeamFolderInvalidStatusError.other = TeamFolderInvalidStatusError('other') -TeamFolderListArg._limit_validator = bv.UInt32(min_value=1, max_value=1000) +TeamFolderListArg.limit.validator = bv.UInt32(min_value=1, max_value=1000) TeamFolderListArg._all_field_names_ = set(['limit']) -TeamFolderListArg._all_fields_ = [('limit', TeamFolderListArg._limit_validator)] +TeamFolderListArg._all_fields_ = [('limit', TeamFolderListArg.limit.validator)] -TeamFolderListContinueArg._cursor_validator = bv.String() +TeamFolderListContinueArg.cursor.validator = bv.String() TeamFolderListContinueArg._all_field_names_ = set(['cursor']) -TeamFolderListContinueArg._all_fields_ = [('cursor', TeamFolderListContinueArg._cursor_validator)] +TeamFolderListContinueArg._all_fields_ = [('cursor', TeamFolderListContinueArg.cursor.validator)] TeamFolderListContinueError._invalid_cursor_validator = bv.Void() TeamFolderListContinueError._other_validator = bv.Void() @@ -23440,30 +14927,30 @@ def __repr__(self): TeamFolderListContinueError.invalid_cursor = TeamFolderListContinueError('invalid_cursor') TeamFolderListContinueError.other = TeamFolderListContinueError('other') -TeamFolderListError._access_error_validator = TeamFolderAccessError_validator +TeamFolderListError.access_error.validator = TeamFolderAccessError_validator TeamFolderListError._all_field_names_ = set(['access_error']) -TeamFolderListError._all_fields_ = [('access_error', TeamFolderListError._access_error_validator)] +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.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), + ('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._sync_setting_validator = files.SyncSetting_validator -TeamFolderMetadata._content_sync_settings_validator = bv.List(files.ContentSyncSetting_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.sync_setting.validator = files.SyncSetting_validator +TeamFolderMetadata.content_sync_settings.validator = bv.List(files.ContentSyncSetting_validator) TeamFolderMetadata._all_field_names_ = set([ 'team_folder_id', 'name', @@ -23473,21 +14960,21 @@ def __repr__(self): 'content_sync_settings', ]) 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), - ('sync_setting', TeamFolderMetadata._sync_setting_validator), - ('content_sync_settings', TeamFolderMetadata._content_sync_settings_validator), + ('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), + ('sync_setting', TeamFolderMetadata.sync_setting.validator), + ('content_sync_settings', TeamFolderMetadata.content_sync_settings.validator), ] TeamFolderPermanentlyDeleteError._tagmap = { } TeamFolderPermanentlyDeleteError._tagmap.update(BaseTeamFolderError._tagmap) -TeamFolderRenameArg._name_validator = bv.String() +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)] +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() @@ -23529,15 +15016,15 @@ def __repr__(self): TeamFolderTeamSharedDropboxError.disallowed = TeamFolderTeamSharedDropboxError('disallowed') TeamFolderTeamSharedDropboxError.other = TeamFolderTeamSharedDropboxError('other') -TeamFolderUpdateSyncSettingsArg._sync_setting_validator = bv.Nullable(files.SyncSettingArg_validator) -TeamFolderUpdateSyncSettingsArg._content_sync_settings_validator = bv.Nullable(bv.List(files.ContentSyncSettingArg_validator)) +TeamFolderUpdateSyncSettingsArg.sync_setting.validator = bv.Nullable(files.SyncSettingArg_validator) +TeamFolderUpdateSyncSettingsArg.content_sync_settings.validator = bv.Nullable(bv.List(files.ContentSyncSettingArg_validator)) TeamFolderUpdateSyncSettingsArg._all_field_names_ = TeamFolderIdArg._all_field_names_.union(set([ 'sync_setting', 'content_sync_settings', ])) TeamFolderUpdateSyncSettingsArg._all_fields_ = TeamFolderIdArg._all_fields_ + [ - ('sync_setting', TeamFolderUpdateSyncSettingsArg._sync_setting_validator), - ('content_sync_settings', TeamFolderUpdateSyncSettingsArg._content_sync_settings_validator), + ('sync_setting', TeamFolderUpdateSyncSettingsArg.sync_setting.validator), + ('content_sync_settings', TeamFolderUpdateSyncSettingsArg.content_sync_settings.validator), ] TeamFolderUpdateSyncSettingsError._sync_settings_error_validator = files.SyncSettingsError_validator @@ -23546,11 +15033,11 @@ def __repr__(self): } TeamFolderUpdateSyncSettingsError._tagmap.update(BaseTeamFolderError._tagmap) -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.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', @@ -23559,33 +15046,33 @@ def __repr__(self): '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), + ('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.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), + ('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.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), + ('groups', TeamMemberProfile.groups.validator), + ('member_folder_id', TeamMemberProfile.member_folder_id.validator), ] TeamMemberStatus._active_validator = bv.Void() @@ -23613,13 +15100,13 @@ def __repr__(self): TeamMembershipType.full = TeamMembershipType('full') TeamMembershipType.limited = TeamMembershipType('limited') -TeamNamespacesListArg._limit_validator = bv.UInt32(min_value=1, max_value=1000) +TeamNamespacesListArg.limit.validator = bv.UInt32(min_value=1, max_value=1000) TeamNamespacesListArg._all_field_names_ = set(['limit']) -TeamNamespacesListArg._all_fields_ = [('limit', TeamNamespacesListArg._limit_validator)] +TeamNamespacesListArg._all_fields_ = [('limit', TeamNamespacesListArg.limit.validator)] -TeamNamespacesListContinueArg._cursor_validator = bv.String() +TeamNamespacesListContinueArg.cursor.validator = bv.String() TeamNamespacesListContinueArg._all_field_names_ = set(['cursor']) -TeamNamespacesListContinueArg._all_fields_ = [('cursor', TeamNamespacesListContinueArg._cursor_validator)] +TeamNamespacesListContinueArg._all_fields_ = [('cursor', TeamNamespacesListContinueArg.cursor.validator)] TeamNamespacesListError._invalid_arg_validator = bv.Void() TeamNamespacesListError._other_validator = bv.Void() @@ -23639,18 +15126,18 @@ def __repr__(self): TeamNamespacesListContinueError.invalid_cursor = TeamNamespacesListContinueError('invalid_cursor') -TeamNamespacesListResult._namespaces_validator = bv.List(NamespaceMetadata_validator) -TeamNamespacesListResult._cursor_validator = bv.String() -TeamNamespacesListResult._has_more_validator = bv.Boolean() +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), + ('namespaces', TeamNamespacesListResult.namespaces.validator), + ('cursor', TeamNamespacesListResult.cursor.validator), + ('has_more', TeamNamespacesListResult.has_more.validator), ] TeamReportFailureReason._temporary_error_validator = bv.Void() @@ -23682,9 +15169,9 @@ def __repr__(self): TokenGetAuthenticatedAdminError.admin_not_active = TokenGetAuthenticatedAdminError('admin_not_active') TokenGetAuthenticatedAdminError.other = TokenGetAuthenticatedAdminError('other') -TokenGetAuthenticatedAdminResult._admin_profile_validator = TeamMemberProfile_validator +TokenGetAuthenticatedAdminResult.admin_profile.validator = TeamMemberProfile_validator TokenGetAuthenticatedAdminResult._all_field_names_ = set(['admin_profile']) -TokenGetAuthenticatedAdminResult._all_fields_ = [('admin_profile', TokenGetAuthenticatedAdminResult._admin_profile_validator)] +TokenGetAuthenticatedAdminResult._all_fields_ = [('admin_profile', TokenGetAuthenticatedAdminResult.admin_profile.validator)] UploadApiRateLimitValue._unlimited_validator = bv.Void() UploadApiRateLimitValue._limit_validator = bv.UInt32() @@ -23713,37 +15200,37 @@ def __repr__(self): UserAddResult.other = UserAddResult('other') -UserCustomQuotaArg._user_validator = UserSelectorArg_validator -UserCustomQuotaArg._quota_gb_validator = UserQuota_validator +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), + ('user', UserCustomQuotaArg.user.validator), + ('quota_gb', UserCustomQuotaArg.quota_gb.validator), ] -UserCustomQuotaResult._user_validator = UserSelectorArg_validator -UserCustomQuotaResult._quota_gb_validator = bv.Nullable(UserQuota_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), + ('user', UserCustomQuotaResult.user.validator), + ('quota_gb', UserCustomQuotaResult.quota_gb.validator), ] -UserDeleteEmailsResult._user_validator = UserSelectorArg_validator -UserDeleteEmailsResult._results_validator = bv.List(DeleteSecondaryEmailResult_validator) +UserDeleteEmailsResult.user.validator = UserSelectorArg_validator +UserDeleteEmailsResult.results.validator = bv.List(DeleteSecondaryEmailResult_validator) UserDeleteEmailsResult._all_field_names_ = set([ 'user', 'results', ]) UserDeleteEmailsResult._all_fields_ = [ - ('user', UserDeleteEmailsResult._user_validator), - ('results', UserDeleteEmailsResult._results_validator), + ('user', UserDeleteEmailsResult.user.validator), + ('results', UserDeleteEmailsResult.results.validator), ] UserDeleteResult._success_validator = UserDeleteEmailsResult_validator @@ -23757,15 +15244,15 @@ def __repr__(self): UserDeleteResult.other = UserDeleteResult('other') -UserResendEmailsResult._user_validator = UserSelectorArg_validator -UserResendEmailsResult._results_validator = bv.List(ResendSecondaryEmailResult_validator) +UserResendEmailsResult.user.validator = UserSelectorArg_validator +UserResendEmailsResult.results.validator = bv.List(ResendSecondaryEmailResult_validator) UserResendEmailsResult._all_field_names_ = set([ 'user', 'results', ]) UserResendEmailsResult._all_fields_ = [ - ('user', UserResendEmailsResult._user_validator), - ('results', UserResendEmailsResult._results_validator), + ('user', UserResendEmailsResult.user.validator), + ('results', UserResendEmailsResult.results.validator), ] UserResendResult._success_validator = UserResendEmailsResult_validator @@ -23779,26 +15266,26 @@ def __repr__(self): UserResendResult.other = UserResendResult('other') -UserSecondaryEmailsArg._user_validator = UserSelectorArg_validator -UserSecondaryEmailsArg._secondary_emails_validator = bv.List(common.EmailAddress_validator) +UserSecondaryEmailsArg.user.validator = UserSelectorArg_validator +UserSecondaryEmailsArg.secondary_emails.validator = bv.List(common.EmailAddress_validator) UserSecondaryEmailsArg._all_field_names_ = set([ 'user', 'secondary_emails', ]) UserSecondaryEmailsArg._all_fields_ = [ - ('user', UserSecondaryEmailsArg._user_validator), - ('secondary_emails', UserSecondaryEmailsArg._secondary_emails_validator), + ('user', UserSecondaryEmailsArg.user.validator), + ('secondary_emails', UserSecondaryEmailsArg.secondary_emails.validator), ] -UserSecondaryEmailsResult._user_validator = UserSelectorArg_validator -UserSecondaryEmailsResult._results_validator = bv.List(AddSecondaryEmailResult_validator) +UserSecondaryEmailsResult.user.validator = UserSelectorArg_validator +UserSecondaryEmailsResult.results.validator = bv.List(AddSecondaryEmailResult_validator) UserSecondaryEmailsResult._all_field_names_ = set([ 'user', 'results', ]) UserSecondaryEmailsResult._all_fields_ = [ - ('user', UserSecondaryEmailsResult._user_validator), - ('results', UserSecondaryEmailsResult._results_validator), + ('user', UserSecondaryEmailsResult.user.validator), + ('results', UserSecondaryEmailsResult.results.validator), ] UserSelectorArg._team_member_id_validator = team_common.TeamMemberId_validator @@ -23819,6 +15306,35 @@ def __repr__(self): 'emails': UsersSelectorArg._emails_validator, } +ExcludedUsersListArg.limit.default = 1000 +GroupCreateArg.add_creator_as_owner.default = False +IncludeMembersArg.return_members.default = True +GroupMembersSetAccessTypeArg.return_members.default = True +GroupsListArg.limit.default = 1000 +GroupsMembersListArg.limit.default = 1000 +LegalHoldsListPoliciesArg.include_released.default = False +ListMemberDevicesArg.include_web_sessions.default = True +ListMemberDevicesArg.include_desktop_clients.default = True +ListMemberDevicesArg.include_mobile_clients.default = True +ListMembersDevicesArg.include_web_sessions.default = True +ListMembersDevicesArg.include_desktop_clients.default = True +ListMembersDevicesArg.include_mobile_clients.default = True +ListTeamDevicesArg.include_web_sessions.default = True +ListTeamDevicesArg.include_desktop_clients.default = True +ListTeamDevicesArg.include_mobile_clients.default = True +MemberAddArg.send_welcome_email.default = True +MemberAddArg.role.default = AdminTier.member_only +MembersAddArg.force_async.default = False +MembersDeactivateArg.wipe_data.default = True +MembersListArg.limit.default = 1000 +MembersListArg.include_removed.default = False +MembersRemoveArg.keep_account.default = False +MembersRemoveArg.retain_team_shares.default = False +RevokeDesktopClientArg.delete_on_unlink.default = False +RevokeLinkedApiAppArg.keep_app_folder.default = True +TeamFolderArchiveArg.force_async_off.default = False +TeamFolderListArg.limit.default = 1000 +TeamNamespacesListArg.limit.default = 1000 devices_list_member_devices = bb.Route( 'devices/list_member_devices', 1, diff --git a/dropbox/team_common.py b/dropbox/team_common.py index 8f7befaa..8784d9db 100644 --- a/dropbox/team_common.py +++ b/dropbox/team_common.py @@ -3,21 +3,11 @@ # @generated # flake8: noqa # pylint: skip-file -try: - from . import stone_validators as bv - from . import stone_base as bb -except (ImportError, 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 (ImportError, SystemError, ValueError): - import common +from __future__ import unicode_literals +from stone.backends.python_rsrc import stone_base as bb +from stone.backends.python_rsrc import stone_validators as bv + +from dropbox import common class GroupManagementType(bb.Union): """ @@ -80,9 +70,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupManagementType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupManagementType(%r, %r)' % (self._tag, self._value) - GroupManagementType_validator = bv.Union(GroupManagementType) class GroupSummary(bb.Struct): @@ -99,15 +86,10 @@ class GroupSummary(bb.Struct): __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 @@ -118,16 +100,11 @@ def __init__(self, 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 + self._group_name_value = bb.NOT_SET + self._group_id_value = bb.NOT_SET + self._group_external_id_value = bb.NOT_SET + self._member_count_value = bb.NOT_SET + self._group_management_type_value = bb.NOT_SET if group_name is not None: self.group_name = group_name if group_id is not None: @@ -139,136 +116,24 @@ def __init__(self, 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. + # Instance attribute type: str (validator is set below) + group_name = bb.Attribute("group_name") - :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. + # Instance attribute type: str (validator is set below) + group_id = bb.Attribute("group_id") - :rtype: int - """ - 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. + # Instance attribute type: str (validator is set below) + group_external_id = bb.Attribute("group_external_id", nullable=True) - :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 + # Instance attribute type: int (validator is set below) + member_count = bb.Attribute("member_count", nullable=True) + + # Instance attribute type: GroupManagementType (validator is set below) + group_management_type = bb.Attribute("group_management_type", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupSummary, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -321,9 +186,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupType(%r, %r)' % (self._tag, self._value) - GroupType_validator = bv.Union(GroupType) class MemberSpaceLimitType(bb.Union): @@ -389,9 +251,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSpaceLimitType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSpaceLimitType(%r, %r)' % (self._tag, self._value) - MemberSpaceLimitType_validator = bv.Union(MemberSpaceLimitType) class TimeRange(bb.Struct): @@ -404,9 +263,7 @@ class TimeRange(bb.Struct): __slots__ = [ '_start_time_value', - '_start_time_present', '_end_time_value', - '_end_time_present', ] _has_required_fields = False @@ -414,76 +271,22 @@ class TimeRange(bb.Struct): 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 + self._start_time_value = bb.NOT_SET + self._end_time_value = bb.NOT_SET 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). + # Instance attribute type: datetime.datetime (validator is set below) + start_time = bb.Attribute("start_time", nullable=True) - :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 + # Instance attribute type: datetime.datetime (validator is set below) + end_time = bb.Attribute("end_time", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TimeRange, self)._process_custom_annotations(annotation_type, field_path, processor) - 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() @@ -508,11 +311,11 @@ def __repr__(self): 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.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', @@ -521,11 +324,11 @@ def __repr__(self): '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), + ('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() @@ -557,15 +360,15 @@ def __repr__(self): MemberSpaceLimitType.stop_sync = MemberSpaceLimitType('stop_sync') MemberSpaceLimitType.other = MemberSpaceLimitType('other') -TimeRange._start_time_validator = bv.Nullable(common.DropboxTimestamp_validator) -TimeRange._end_time_validator = bv.Nullable(common.DropboxTimestamp_validator) +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), + ('start_time', TimeRange.start_time.validator), + ('end_time', TimeRange.end_time.validator), ] ROUTES = { diff --git a/dropbox/team_log.py b/dropbox/team_log.py index d8562615..87f8d02c 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -3,35 +3,18 @@ # @generated # flake8: noqa # pylint: skip-file -try: - from . import stone_validators as bv - from . import stone_base as bb -except (ImportError, 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, - file_requests, - files, - sharing, - team, - team_common, - team_policies, - users_common, - ) -except (ImportError, SystemError, ValueError): - import common - import file_requests - import files - import sharing - import team - import team_common - import team_policies - import users_common +from __future__ import unicode_literals +from stone.backends.python_rsrc import stone_base as bb +from stone.backends.python_rsrc import stone_validators as bv + +from dropbox import common +from dropbox import file_requests +from dropbox import files +from dropbox import sharing +from dropbox import team +from dropbox import team_common +from dropbox import team_policies +from dropbox import users_common class AccessMethodLogInfo(bb.Union): """ @@ -254,9 +237,6 @@ def get_sign_in_as(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccessMethodLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AccessMethodLogInfo(%r, %r)' % (self._tag, self._value) - AccessMethodLogInfo_validator = bv.Union(AccessMethodLogInfo) class AccountCaptureAvailability(bb.Union): @@ -301,9 +281,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccountCaptureAvailability, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AccountCaptureAvailability(%r, %r)' % (self._tag, self._value) - AccountCaptureAvailability_validator = bv.Union(AccountCaptureAvailability) class AccountCaptureChangeAvailabilityDetails(bb.Struct): @@ -319,9 +296,7 @@ class AccountCaptureChangeAvailabilityDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -329,121 +304,44 @@ class AccountCaptureChangeAvailabilityDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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'") + # Instance attribute type: AccountCaptureAvailability (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @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 + # Instance attribute type: AccountCaptureAvailability (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccountCaptureChangeAvailabilityDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 AccountCaptureChangeAvailabilityType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccountCaptureChangeAvailabilityType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AccountCaptureChangeAvailabilityType(description={!r})'.format( - self._description_value, - ) - AccountCaptureChangeAvailabilityType_validator = bv.Struct(AccountCaptureChangeAvailabilityType) class AccountCaptureChangePolicyDetails(bb.Struct): @@ -458,9 +356,7 @@ class AccountCaptureChangePolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -468,121 +364,44 @@ class AccountCaptureChangePolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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. + # Instance attribute type: AccountCapturePolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - :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 + # Instance attribute type: AccountCapturePolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccountCaptureChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 AccountCaptureChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccountCaptureChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AccountCaptureChangePolicyType(description={!r})'.format( - self._description_value, - ) - AccountCaptureChangePolicyType_validator = bv.Struct(AccountCaptureChangePolicyType) class AccountCaptureMigrateAccountDetails(bb.Struct): @@ -594,96 +413,44 @@ class AccountCaptureMigrateAccountDetails(bb.Struct): __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 + self._domain_name_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + domain_name = bb.Attribute("domain_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccountCaptureMigrateAccountDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AccountCaptureMigrateAccountDetails(domain_name={!r})'.format( - self._domain_name_value, - ) - AccountCaptureMigrateAccountDetails_validator = bv.Struct(AccountCaptureMigrateAccountDetails) class AccountCaptureMigrateAccountType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccountCaptureMigrateAccountType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AccountCaptureMigrateAccountType(description={!r})'.format( - self._description_value, - ) - AccountCaptureMigrateAccountType_validator = bv.Struct(AccountCaptureMigrateAccountType) class AccountCaptureNotificationEmailsSentDetails(bb.Struct): @@ -699,9 +466,7 @@ class AccountCaptureNotificationEmailsSentDetails(bb.Struct): __slots__ = [ '_domain_name_value', - '_domain_name_present', '_notification_type_value', - '_notification_type_present', ] _has_required_fields = True @@ -709,120 +474,44 @@ class AccountCaptureNotificationEmailsSentDetails(bb.Struct): def __init__(self, domain_name=None, notification_type=None): - self._domain_name_value = None - self._domain_name_present = False - self._notification_type_value = None - self._notification_type_present = False + self._domain_name_value = bb.NOT_SET + self._notification_type_value = bb.NOT_SET if domain_name is not None: self.domain_name = domain_name if notification_type is not None: self.notification_type = notification_type - @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 notification_type(self): - """ - Account-capture email notification type. - - :rtype: AccountCaptureNotificationType - """ - if self._notification_type_present: - return self._notification_type_value - else: - return None + # Instance attribute type: str (validator is set below) + domain_name = bb.Attribute("domain_name") - @notification_type.setter - def notification_type(self, val): - if val is None: - del self.notification_type - return - self._notification_type_validator.validate_type_only(val) - self._notification_type_value = val - self._notification_type_present = True - - @notification_type.deleter - def notification_type(self): - self._notification_type_value = None - self._notification_type_present = False + # Instance attribute type: AccountCaptureNotificationType (validator is set below) + notification_type = bb.Attribute("notification_type", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccountCaptureNotificationEmailsSentDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AccountCaptureNotificationEmailsSentDetails(domain_name={!r}, notification_type={!r})'.format( - self._domain_name_value, - self._notification_type_value, - ) - AccountCaptureNotificationEmailsSentDetails_validator = bv.Struct(AccountCaptureNotificationEmailsSentDetails) class AccountCaptureNotificationEmailsSentType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccountCaptureNotificationEmailsSentType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AccountCaptureNotificationEmailsSentType(description={!r})'.format( - self._description_value, - ) - AccountCaptureNotificationEmailsSentType_validator = bv.Struct(AccountCaptureNotificationEmailsSentType) class AccountCaptureNotificationType(bb.Union): @@ -867,9 +556,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccountCaptureNotificationType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AccountCaptureNotificationType(%r, %r)' % (self._tag, self._value) - AccountCaptureNotificationType_validator = bv.Union(AccountCaptureNotificationType) class AccountCapturePolicy(bb.Union): @@ -924,9 +610,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccountCapturePolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AccountCapturePolicy(%r, %r)' % (self._tag, self._value) - AccountCapturePolicy_validator = bv.Union(AccountCapturePolicy) class AccountCaptureRelinquishAccountDetails(bb.Struct): @@ -939,96 +622,44 @@ class AccountCaptureRelinquishAccountDetails(bb.Struct): __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 + self._domain_name_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + domain_name = bb.Attribute("domain_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccountCaptureRelinquishAccountDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AccountCaptureRelinquishAccountDetails(domain_name={!r})'.format( - self._domain_name_value, - ) - AccountCaptureRelinquishAccountDetails_validator = bv.Struct(AccountCaptureRelinquishAccountDetails) class AccountCaptureRelinquishAccountType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccountCaptureRelinquishAccountType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AccountCaptureRelinquishAccountType(description={!r})'.format( - self._description_value, - ) - AccountCaptureRelinquishAccountType_validator = bv.Struct(AccountCaptureRelinquishAccountType) class AccountLockOrUnlockedDetails(bb.Struct): @@ -1043,9 +674,7 @@ class AccountLockOrUnlockedDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -1053,117 +682,44 @@ class AccountLockOrUnlockedDetails(bb.Struct): 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 + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET 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): - """ - The previous account status. - - :rtype: AccountState - """ - 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 + # Instance attribute type: AccountState (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - @property - def new_value(self): - """ - The new account status. - - :rtype: AccountState - """ - 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 + # Instance attribute type: AccountState (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccountLockOrUnlockedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AccountLockOrUnlockedDetails(previous_value={!r}, new_value={!r})'.format( - self._previous_value_value, - self._new_value_value, - ) - AccountLockOrUnlockedDetails_validator = bv.Struct(AccountLockOrUnlockedDetails) class AccountLockOrUnlockedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccountLockOrUnlockedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AccountLockOrUnlockedType(description={!r})'.format( - self._description_value, - ) - AccountLockOrUnlockedType_validator = bv.Struct(AccountLockOrUnlockedType) class AccountState(bb.Union): @@ -1208,9 +764,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccountState, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AccountState(%r, %r)' % (self._tag, self._value) - AccountState_validator = bv.Union(AccountState) class ActionDetails(bb.Union): @@ -1338,9 +891,6 @@ def get_team_join_details(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ActionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ActionDetails(%r, %r)' % (self._tag, self._value) - ActionDetails_validator = bv.Union(ActionDetails) class ActorLogInfo(bb.Union): @@ -1518,9 +1068,6 @@ def get_user(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ActorLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ActorLogInfo(%r, %r)' % (self._tag, self._value) - ActorLogInfo_validator = bv.Union(ActorLogInfo) class AdminAlertingAlertConfiguration(bb.Struct): @@ -1532,49 +1079,22 @@ class AdminAlertingAlertConfiguration(bb.Struct): __slots__ = [ '_alert_state_value', - '_alert_state_present', ] _has_required_fields = True def __init__(self, alert_state=None): - self._alert_state_value = None - self._alert_state_present = False + self._alert_state_value = bb.NOT_SET if alert_state is not None: self.alert_state = alert_state - @property - def alert_state(self): - """ - Alert state. - - :rtype: AdminAlertingAlertStatePolicy - """ - if self._alert_state_present: - return self._alert_state_value - else: - raise AttributeError("missing required field 'alert_state'") - - @alert_state.setter - def alert_state(self, val): - self._alert_state_validator.validate_type_only(val) - self._alert_state_value = val - self._alert_state_present = True - - @alert_state.deleter - def alert_state(self): - self._alert_state_value = None - self._alert_state_present = False + # Instance attribute type: AdminAlertingAlertStatePolicy (validator is set below) + alert_state = bb.Attribute("alert_state", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(AdminAlertingAlertConfiguration, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AdminAlertingAlertConfiguration(alert_state={!r})'.format( - self._alert_state_value, - ) - AdminAlertingAlertConfiguration_validator = bv.Struct(AdminAlertingAlertConfiguration) class AdminAlertingAlertStatePolicy(bb.Union): @@ -1621,9 +1141,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AdminAlertingAlertStatePolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AdminAlertingAlertStatePolicy(%r, %r)' % (self._tag, self._value) - AdminAlertingAlertStatePolicy_validator = bv.Union(AdminAlertingAlertStatePolicy) class AdminAlertingChangedAlertConfigDetails(bb.Struct): @@ -1640,11 +1157,8 @@ class AdminAlertingChangedAlertConfigDetails(bb.Struct): __slots__ = [ '_alert_name_value', - '_alert_name_present', '_previous_alert_config_value', - '_previous_alert_config_present', '_new_alert_config_value', - '_new_alert_config_present', ] _has_required_fields = True @@ -1653,12 +1167,9 @@ def __init__(self, alert_name=None, previous_alert_config=None, new_alert_config=None): - self._alert_name_value = None - self._alert_name_present = False - self._previous_alert_config_value = None - self._previous_alert_config_present = False - self._new_alert_config_value = None - self._new_alert_config_present = False + self._alert_name_value = bb.NOT_SET + self._previous_alert_config_value = bb.NOT_SET + self._new_alert_config_value = bb.NOT_SET if alert_name is not None: self.alert_name = alert_name if previous_alert_config is not None: @@ -1666,132 +1177,40 @@ def __init__(self, if new_alert_config is not None: self.new_alert_config = new_alert_config - @property - def alert_name(self): - """ - Alert Name. - - :rtype: str - """ - if self._alert_name_present: - return self._alert_name_value - else: - raise AttributeError("missing required field 'alert_name'") - - @alert_name.setter - def alert_name(self, val): - val = self._alert_name_validator.validate(val) - self._alert_name_value = val - self._alert_name_present = True - - @alert_name.deleter - def alert_name(self): - self._alert_name_value = None - self._alert_name_present = False - - @property - def previous_alert_config(self): - """ - Previous alert configuration. - - :rtype: AdminAlertingAlertConfiguration - """ - if self._previous_alert_config_present: - return self._previous_alert_config_value - else: - raise AttributeError("missing required field 'previous_alert_config'") - - @previous_alert_config.setter - def previous_alert_config(self, val): - self._previous_alert_config_validator.validate_type_only(val) - self._previous_alert_config_value = val - self._previous_alert_config_present = True - - @previous_alert_config.deleter - def previous_alert_config(self): - self._previous_alert_config_value = None - self._previous_alert_config_present = False + # Instance attribute type: str (validator is set below) + alert_name = bb.Attribute("alert_name") - @property - def new_alert_config(self): - """ - New alert configuration. - - :rtype: AdminAlertingAlertConfiguration - """ - if self._new_alert_config_present: - return self._new_alert_config_value - else: - raise AttributeError("missing required field 'new_alert_config'") + # Instance attribute type: AdminAlertingAlertConfiguration (validator is set below) + previous_alert_config = bb.Attribute("previous_alert_config", user_defined=True) - @new_alert_config.setter - def new_alert_config(self, val): - self._new_alert_config_validator.validate_type_only(val) - self._new_alert_config_value = val - self._new_alert_config_present = True - - @new_alert_config.deleter - def new_alert_config(self): - self._new_alert_config_value = None - self._new_alert_config_present = False + # Instance attribute type: AdminAlertingAlertConfiguration (validator is set below) + new_alert_config = bb.Attribute("new_alert_config", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(AdminAlertingChangedAlertConfigDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AdminAlertingChangedAlertConfigDetails(alert_name={!r}, previous_alert_config={!r}, new_alert_config={!r})'.format( - self._alert_name_value, - self._previous_alert_config_value, - self._new_alert_config_value, - ) - AdminAlertingChangedAlertConfigDetails_validator = bv.Struct(AdminAlertingChangedAlertConfigDetails) class AdminAlertingChangedAlertConfigType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AdminAlertingChangedAlertConfigType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AdminAlertingChangedAlertConfigType(description={!r})'.format( - self._description_value, - ) - AdminAlertingChangedAlertConfigType_validator = bv.Struct(AdminAlertingChangedAlertConfigType) class AdminRole(bb.Union): @@ -1866,9 +1285,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AdminRole, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AdminRole(%r, %r)' % (self._tag, self._value) - AdminRole_validator = bv.Union(AdminRole) class AllowDownloadDisabledDetails(bb.Struct): @@ -1887,56 +1303,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AllowDownloadDisabledDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AllowDownloadDisabledDetails()' - AllowDownloadDisabledDetails_validator = bv.Struct(AllowDownloadDisabledDetails) class AllowDownloadDisabledType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AllowDownloadDisabledType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AllowDownloadDisabledType(description={!r})'.format( - self._description_value, - ) - AllowDownloadDisabledType_validator = bv.Struct(AllowDownloadDisabledType) class AllowDownloadEnabledDetails(bb.Struct): @@ -1955,56 +1343,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AllowDownloadEnabledDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AllowDownloadEnabledDetails()' - AllowDownloadEnabledDetails_validator = bv.Struct(AllowDownloadEnabledDetails) class AllowDownloadEnabledType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AllowDownloadEnabledType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AllowDownloadEnabledType(description={!r})'.format( - self._description_value, - ) - AllowDownloadEnabledType_validator = bv.Struct(AllowDownloadEnabledType) class ApiSessionLogInfo(bb.Struct): @@ -2016,49 +1376,22 @@ class ApiSessionLogInfo(bb.Struct): __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 + self._request_id_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + request_id = bb.Attribute("request_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ApiSessionLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ApiSessionLogInfo(request_id={!r})'.format( - self._request_id_value, - ) - ApiSessionLogInfo_validator = bv.Struct(ApiSessionLogInfo) class AppLinkTeamDetails(bb.Struct): @@ -2070,96 +1403,44 @@ class AppLinkTeamDetails(bb.Struct): __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 + self._app_info_value = bb.NOT_SET 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 + # Instance attribute type: AppLogInfo (validator is set below) + app_info = bb.Attribute("app_info", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(AppLinkTeamDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AppLinkTeamDetails(app_info={!r})'.format( - self._app_info_value, - ) - AppLinkTeamDetails_validator = bv.Struct(AppLinkTeamDetails) class AppLinkTeamType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AppLinkTeamType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AppLinkTeamType(description={!r})'.format( - self._description_value, - ) - AppLinkTeamType_validator = bv.Struct(AppLinkTeamType) class AppLinkUserDetails(bb.Struct): @@ -2171,96 +1452,44 @@ class AppLinkUserDetails(bb.Struct): __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 + self._app_info_value = bb.NOT_SET 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 + # Instance attribute type: AppLogInfo (validator is set below) + app_info = bb.Attribute("app_info", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(AppLinkUserDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AppLinkUserDetails(app_info={!r})'.format( - self._app_info_value, - ) - AppLinkUserDetails_validator = bv.Struct(AppLinkUserDetails) class AppLinkUserType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AppLinkUserType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AppLinkUserType(description={!r})'.format( - self._description_value, - ) - AppLinkUserType_validator = bv.Struct(AppLinkUserType) class AppLogInfo(bb.Struct): @@ -2275,9 +1504,7 @@ class AppLogInfo(bb.Struct): __slots__ = [ '_app_id_value', - '_app_id_present', '_display_name_value', - '_display_name_present', ] _has_required_fields = False @@ -2285,76 +1512,22 @@ class AppLogInfo(bb.Struct): 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 + self._app_id_value = bb.NOT_SET + self._display_name_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + app_id = bb.Attribute("app_id", nullable=True) - @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 + # Instance attribute type: str (validator is set below) + display_name = bb.Attribute("display_name", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(AppLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -2366,96 +1539,44 @@ class AppUnlinkTeamDetails(bb.Struct): __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 + self._app_info_value = bb.NOT_SET 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 + # Instance attribute type: AppLogInfo (validator is set below) + app_info = bb.Attribute("app_info", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(AppUnlinkTeamDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AppUnlinkTeamDetails(app_info={!r})'.format( - self._app_info_value, - ) - AppUnlinkTeamDetails_validator = bv.Struct(AppUnlinkTeamDetails) class AppUnlinkTeamType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AppUnlinkTeamType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AppUnlinkTeamType(description={!r})'.format( - self._description_value, - ) - AppUnlinkTeamType_validator = bv.Struct(AppUnlinkTeamType) class AppUnlinkUserDetails(bb.Struct): @@ -2467,96 +1588,44 @@ class AppUnlinkUserDetails(bb.Struct): __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 + self._app_info_value = bb.NOT_SET 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 + # Instance attribute type: AppLogInfo (validator is set below) + app_info = bb.Attribute("app_info", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(AppUnlinkUserDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AppUnlinkUserDetails(app_info={!r})'.format( - self._app_info_value, - ) - AppUnlinkUserDetails_validator = bv.Struct(AppUnlinkUserDetails) class AppUnlinkUserType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(AppUnlinkUserType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AppUnlinkUserType(description={!r})'.format( - self._description_value, - ) - AppUnlinkUserType_validator = bv.Struct(AppUnlinkUserType) class AssetLogInfo(bb.Union): @@ -2746,9 +1815,6 @@ def get_showcase_document(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AssetLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'AssetLogInfo(%r, %r)' % (self._tag, self._value) - AssetLogInfo_validator = bv.Union(AssetLogInfo) class BackupStatus(bb.Union): @@ -2795,9 +1861,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(BackupStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'BackupStatus(%r, %r)' % (self._tag, self._value) - BackupStatus_validator = bv.Union(BackupStatus) class BinderAddPageDetails(bb.Struct): @@ -2812,11 +1875,8 @@ class BinderAddPageDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_doc_title_value', - '_doc_title_present', '_binder_item_name_value', - '_binder_item_name_present', ] _has_required_fields = True @@ -2825,12 +1885,9 @@ def __init__(self, event_uuid=None, doc_title=None, binder_item_name=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._doc_title_value = None - self._doc_title_present = False - self._binder_item_name_value = None - self._binder_item_name_present = False + self._event_uuid_value = bb.NOT_SET + self._doc_title_value = bb.NOT_SET + self._binder_item_name_value = bb.NOT_SET if event_uuid is not None: self.event_uuid = event_uuid if doc_title is not None: @@ -2838,132 +1895,40 @@ def __init__(self, if binder_item_name is not None: self.binder_item_name = binder_item_name - @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 doc_title(self): - """ - Title of the Binder doc. - - :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 - - @property - def binder_item_name(self): - """ - Name of the Binder page/section. - - :rtype: str - """ - if self._binder_item_name_present: - return self._binder_item_name_value - else: - raise AttributeError("missing required field 'binder_item_name'") + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - @binder_item_name.setter - def binder_item_name(self, val): - val = self._binder_item_name_validator.validate(val) - self._binder_item_name_value = val - self._binder_item_name_present = True + # Instance attribute type: str (validator is set below) + doc_title = bb.Attribute("doc_title") - @binder_item_name.deleter - def binder_item_name(self): - self._binder_item_name_value = None - self._binder_item_name_present = False + # Instance attribute type: str (validator is set below) + binder_item_name = bb.Attribute("binder_item_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(BinderAddPageDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'BinderAddPageDetails(event_uuid={!r}, doc_title={!r}, binder_item_name={!r})'.format( - self._event_uuid_value, - self._doc_title_value, - self._binder_item_name_value, - ) - BinderAddPageDetails_validator = bv.Struct(BinderAddPageDetails) class BinderAddPageType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(BinderAddPageType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'BinderAddPageType(description={!r})'.format( - self._description_value, - ) - BinderAddPageType_validator = bv.Struct(BinderAddPageType) class BinderAddSectionDetails(bb.Struct): @@ -2978,11 +1943,8 @@ class BinderAddSectionDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_doc_title_value', - '_doc_title_present', '_binder_item_name_value', - '_binder_item_name_present', ] _has_required_fields = True @@ -2991,12 +1953,9 @@ def __init__(self, event_uuid=None, doc_title=None, binder_item_name=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._doc_title_value = None - self._doc_title_present = False - self._binder_item_name_value = None - self._binder_item_name_present = False + self._event_uuid_value = bb.NOT_SET + self._doc_title_value = bb.NOT_SET + self._binder_item_name_value = bb.NOT_SET if event_uuid is not None: self.event_uuid = event_uuid if doc_title is not None: @@ -3004,132 +1963,40 @@ def __init__(self, if binder_item_name is not None: self.binder_item_name = binder_item_name - @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 doc_title(self): - """ - Title of the Binder doc. - - :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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - @doc_title.deleter - def doc_title(self): - self._doc_title_value = None - self._doc_title_present = False + # Instance attribute type: str (validator is set below) + doc_title = bb.Attribute("doc_title") - @property - def binder_item_name(self): - """ - Name of the Binder page/section. - - :rtype: str - """ - if self._binder_item_name_present: - return self._binder_item_name_value - else: - raise AttributeError("missing required field 'binder_item_name'") - - @binder_item_name.setter - def binder_item_name(self, val): - val = self._binder_item_name_validator.validate(val) - self._binder_item_name_value = val - self._binder_item_name_present = True - - @binder_item_name.deleter - def binder_item_name(self): - self._binder_item_name_value = None - self._binder_item_name_present = False + # Instance attribute type: str (validator is set below) + binder_item_name = bb.Attribute("binder_item_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(BinderAddSectionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'BinderAddSectionDetails(event_uuid={!r}, doc_title={!r}, binder_item_name={!r})'.format( - self._event_uuid_value, - self._doc_title_value, - self._binder_item_name_value, - ) - BinderAddSectionDetails_validator = bv.Struct(BinderAddSectionDetails) class BinderAddSectionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(BinderAddSectionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'BinderAddSectionType(description={!r})'.format( - self._description_value, - ) - BinderAddSectionType_validator = bv.Struct(BinderAddSectionType) class BinderRemovePageDetails(bb.Struct): @@ -3144,11 +2011,8 @@ class BinderRemovePageDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_doc_title_value', - '_doc_title_present', '_binder_item_name_value', - '_binder_item_name_present', ] _has_required_fields = True @@ -3157,12 +2021,9 @@ def __init__(self, event_uuid=None, doc_title=None, binder_item_name=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._doc_title_value = None - self._doc_title_present = False - self._binder_item_name_value = None - self._binder_item_name_present = False + self._event_uuid_value = bb.NOT_SET + self._doc_title_value = bb.NOT_SET + self._binder_item_name_value = bb.NOT_SET if event_uuid is not None: self.event_uuid = event_uuid if doc_title is not None: @@ -3170,132 +2031,40 @@ def __init__(self, if binder_item_name is not None: self.binder_item_name = binder_item_name - @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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False + # Instance attribute type: str (validator is set below) + doc_title = bb.Attribute("doc_title") - @property - def doc_title(self): - """ - Title of the Binder doc. - - :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 - - @property - def binder_item_name(self): - """ - Name of the Binder page/section. - - :rtype: str - """ - if self._binder_item_name_present: - return self._binder_item_name_value - else: - raise AttributeError("missing required field 'binder_item_name'") - - @binder_item_name.setter - def binder_item_name(self, val): - val = self._binder_item_name_validator.validate(val) - self._binder_item_name_value = val - self._binder_item_name_present = True - - @binder_item_name.deleter - def binder_item_name(self): - self._binder_item_name_value = None - self._binder_item_name_present = False + # Instance attribute type: str (validator is set below) + binder_item_name = bb.Attribute("binder_item_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(BinderRemovePageDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'BinderRemovePageDetails(event_uuid={!r}, doc_title={!r}, binder_item_name={!r})'.format( - self._event_uuid_value, - self._doc_title_value, - self._binder_item_name_value, - ) - BinderRemovePageDetails_validator = bv.Struct(BinderRemovePageDetails) class BinderRemovePageType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(BinderRemovePageType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'BinderRemovePageType(description={!r})'.format( - self._description_value, - ) - BinderRemovePageType_validator = bv.Struct(BinderRemovePageType) class BinderRemoveSectionDetails(bb.Struct): @@ -3312,11 +2081,8 @@ class BinderRemoveSectionDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_doc_title_value', - '_doc_title_present', '_binder_item_name_value', - '_binder_item_name_present', ] _has_required_fields = True @@ -3325,12 +2091,9 @@ def __init__(self, event_uuid=None, doc_title=None, binder_item_name=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._doc_title_value = None - self._doc_title_present = False - self._binder_item_name_value = None - self._binder_item_name_present = False + self._event_uuid_value = bb.NOT_SET + self._doc_title_value = bb.NOT_SET + self._binder_item_name_value = bb.NOT_SET if event_uuid is not None: self.event_uuid = event_uuid if doc_title is not None: @@ -3338,132 +2101,40 @@ def __init__(self, if binder_item_name is not None: self.binder_item_name = binder_item_name - @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 doc_title(self): - """ - Title of the Binder doc. - - :rtype: str - """ - if self._doc_title_present: - return self._doc_title_value - else: - raise AttributeError("missing required field 'doc_title'") + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - @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 + # Instance attribute type: str (validator is set below) + doc_title = bb.Attribute("doc_title") - @doc_title.deleter - def doc_title(self): - self._doc_title_value = None - self._doc_title_present = False - - @property - def binder_item_name(self): - """ - Name of the Binder page/section. - - :rtype: str - """ - if self._binder_item_name_present: - return self._binder_item_name_value - else: - raise AttributeError("missing required field 'binder_item_name'") - - @binder_item_name.setter - def binder_item_name(self, val): - val = self._binder_item_name_validator.validate(val) - self._binder_item_name_value = val - self._binder_item_name_present = True - - @binder_item_name.deleter - def binder_item_name(self): - self._binder_item_name_value = None - self._binder_item_name_present = False + # Instance attribute type: str (validator is set below) + binder_item_name = bb.Attribute("binder_item_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(BinderRemoveSectionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'BinderRemoveSectionDetails(event_uuid={!r}, doc_title={!r}, binder_item_name={!r})'.format( - self._event_uuid_value, - self._doc_title_value, - self._binder_item_name_value, - ) - BinderRemoveSectionDetails_validator = bv.Struct(BinderRemoveSectionDetails) class BinderRemoveSectionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(BinderRemoveSectionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'BinderRemoveSectionType(description={!r})'.format( - self._description_value, - ) - BinderRemoveSectionType_validator = bv.Struct(BinderRemoveSectionType) class BinderRenamePageDetails(bb.Struct): @@ -3480,13 +2151,9 @@ class BinderRenamePageDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_doc_title_value', - '_doc_title_present', '_binder_item_name_value', - '_binder_item_name_present', '_previous_binder_item_name_value', - '_previous_binder_item_name_present', ] _has_required_fields = True @@ -3496,14 +2163,10 @@ def __init__(self, doc_title=None, binder_item_name=None, previous_binder_item_name=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._doc_title_value = None - self._doc_title_present = False - self._binder_item_name_value = None - self._binder_item_name_present = False - self._previous_binder_item_name_value = None - self._previous_binder_item_name_present = False + self._event_uuid_value = bb.NOT_SET + self._doc_title_value = bb.NOT_SET + self._binder_item_name_value = bb.NOT_SET + self._previous_binder_item_name_value = bb.NOT_SET if event_uuid is not None: self.event_uuid = event_uuid if doc_title is not None: @@ -3513,159 +2176,43 @@ def __init__(self, if previous_binder_item_name is not None: self.previous_binder_item_name = previous_binder_item_name - @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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False + # Instance attribute type: str (validator is set below) + doc_title = bb.Attribute("doc_title") - @property - def doc_title(self): - """ - Title of the Binder doc. - - :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 + # Instance attribute type: str (validator is set below) + binder_item_name = bb.Attribute("binder_item_name") - @doc_title.deleter - def doc_title(self): - self._doc_title_value = None - self._doc_title_present = False - - @property - def binder_item_name(self): - """ - Name of the Binder page/section. - - :rtype: str - """ - if self._binder_item_name_present: - return self._binder_item_name_value - else: - raise AttributeError("missing required field 'binder_item_name'") - - @binder_item_name.setter - def binder_item_name(self, val): - val = self._binder_item_name_validator.validate(val) - self._binder_item_name_value = val - self._binder_item_name_present = True - - @binder_item_name.deleter - def binder_item_name(self): - self._binder_item_name_value = None - self._binder_item_name_present = False - - @property - def previous_binder_item_name(self): - """ - Previous name of the Binder page/section. - - :rtype: str - """ - if self._previous_binder_item_name_present: - return self._previous_binder_item_name_value - else: - return None - - @previous_binder_item_name.setter - def previous_binder_item_name(self, val): - if val is None: - del self.previous_binder_item_name - return - val = self._previous_binder_item_name_validator.validate(val) - self._previous_binder_item_name_value = val - self._previous_binder_item_name_present = True - - @previous_binder_item_name.deleter - def previous_binder_item_name(self): - self._previous_binder_item_name_value = None - self._previous_binder_item_name_present = False + # Instance attribute type: str (validator is set below) + previous_binder_item_name = bb.Attribute("previous_binder_item_name", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(BinderRenamePageDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'BinderRenamePageDetails(event_uuid={!r}, doc_title={!r}, binder_item_name={!r}, previous_binder_item_name={!r})'.format( - self._event_uuid_value, - self._doc_title_value, - self._binder_item_name_value, - self._previous_binder_item_name_value, - ) - BinderRenamePageDetails_validator = bv.Struct(BinderRenamePageDetails) class BinderRenamePageType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(BinderRenamePageType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'BinderRenamePageType(description={!r})'.format( - self._description_value, - ) - BinderRenamePageType_validator = bv.Struct(BinderRenamePageType) class BinderRenameSectionDetails(bb.Struct): @@ -3684,13 +2231,9 @@ class BinderRenameSectionDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_doc_title_value', - '_doc_title_present', '_binder_item_name_value', - '_binder_item_name_present', '_previous_binder_item_name_value', - '_previous_binder_item_name_present', ] _has_required_fields = True @@ -3700,14 +2243,10 @@ def __init__(self, doc_title=None, binder_item_name=None, previous_binder_item_name=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._doc_title_value = None - self._doc_title_present = False - self._binder_item_name_value = None - self._binder_item_name_present = False - self._previous_binder_item_name_value = None - self._previous_binder_item_name_present = False + self._event_uuid_value = bb.NOT_SET + self._doc_title_value = bb.NOT_SET + self._binder_item_name_value = bb.NOT_SET + self._previous_binder_item_name_value = bb.NOT_SET if event_uuid is not None: self.event_uuid = event_uuid if doc_title is not None: @@ -3717,159 +2256,43 @@ def __init__(self, if previous_binder_item_name is not None: self.previous_binder_item_name = previous_binder_item_name - @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 doc_title(self): - """ - Title of the Binder doc. - - :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 - - @property - def binder_item_name(self): - """ - Name of the Binder page/section. - - :rtype: str - """ - if self._binder_item_name_present: - return self._binder_item_name_value - else: - raise AttributeError("missing required field 'binder_item_name'") - - @binder_item_name.setter - def binder_item_name(self, val): - val = self._binder_item_name_validator.validate(val) - self._binder_item_name_value = val - self._binder_item_name_present = True - - @binder_item_name.deleter - def binder_item_name(self): - self._binder_item_name_value = None - self._binder_item_name_present = False + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - @property - def previous_binder_item_name(self): - """ - Previous name of the Binder page/section. + # Instance attribute type: str (validator is set below) + doc_title = bb.Attribute("doc_title") - :rtype: str - """ - if self._previous_binder_item_name_present: - return self._previous_binder_item_name_value - else: - return None + # Instance attribute type: str (validator is set below) + binder_item_name = bb.Attribute("binder_item_name") - @previous_binder_item_name.setter - def previous_binder_item_name(self, val): - if val is None: - del self.previous_binder_item_name - return - val = self._previous_binder_item_name_validator.validate(val) - self._previous_binder_item_name_value = val - self._previous_binder_item_name_present = True - - @previous_binder_item_name.deleter - def previous_binder_item_name(self): - self._previous_binder_item_name_value = None - self._previous_binder_item_name_present = False + # Instance attribute type: str (validator is set below) + previous_binder_item_name = bb.Attribute("previous_binder_item_name", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(BinderRenameSectionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'BinderRenameSectionDetails(event_uuid={!r}, doc_title={!r}, binder_item_name={!r}, previous_binder_item_name={!r})'.format( - self._event_uuid_value, - self._doc_title_value, - self._binder_item_name_value, - self._previous_binder_item_name_value, - ) - BinderRenameSectionDetails_validator = bv.Struct(BinderRenameSectionDetails) class BinderRenameSectionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(BinderRenameSectionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'BinderRenameSectionType(description={!r})'.format( - self._description_value, - ) - BinderRenameSectionType_validator = bv.Struct(BinderRenameSectionType) class BinderReorderPageDetails(bb.Struct): @@ -3884,11 +2307,8 @@ class BinderReorderPageDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_doc_title_value', - '_doc_title_present', '_binder_item_name_value', - '_binder_item_name_present', ] _has_required_fields = True @@ -3897,12 +2317,9 @@ def __init__(self, event_uuid=None, doc_title=None, binder_item_name=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._doc_title_value = None - self._doc_title_present = False - self._binder_item_name_value = None - self._binder_item_name_present = False + self._event_uuid_value = bb.NOT_SET + self._doc_title_value = bb.NOT_SET + self._binder_item_name_value = bb.NOT_SET if event_uuid is not None: self.event_uuid = event_uuid if doc_title is not None: @@ -3910,132 +2327,40 @@ def __init__(self, if binder_item_name is not None: self.binder_item_name = binder_item_name - @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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - @property - def doc_title(self): - """ - Title of the Binder doc. + # Instance attribute type: str (validator is set below) + doc_title = bb.Attribute("doc_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 - - @property - def binder_item_name(self): - """ - Name of the Binder page/section. - - :rtype: str - """ - if self._binder_item_name_present: - return self._binder_item_name_value - else: - raise AttributeError("missing required field 'binder_item_name'") - - @binder_item_name.setter - def binder_item_name(self, val): - val = self._binder_item_name_validator.validate(val) - self._binder_item_name_value = val - self._binder_item_name_present = True - - @binder_item_name.deleter - def binder_item_name(self): - self._binder_item_name_value = None - self._binder_item_name_present = False + # Instance attribute type: str (validator is set below) + binder_item_name = bb.Attribute("binder_item_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(BinderReorderPageDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'BinderReorderPageDetails(event_uuid={!r}, doc_title={!r}, binder_item_name={!r})'.format( - self._event_uuid_value, - self._doc_title_value, - self._binder_item_name_value, - ) - BinderReorderPageDetails_validator = bv.Struct(BinderReorderPageDetails) class BinderReorderPageType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(BinderReorderPageType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'BinderReorderPageType(description={!r})'.format( - self._description_value, - ) - BinderReorderPageType_validator = bv.Struct(BinderReorderPageType) class BinderReorderSectionDetails(bb.Struct): @@ -4052,11 +2377,8 @@ class BinderReorderSectionDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_doc_title_value', - '_doc_title_present', '_binder_item_name_value', - '_binder_item_name_present', ] _has_required_fields = True @@ -4065,12 +2387,9 @@ def __init__(self, event_uuid=None, doc_title=None, binder_item_name=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._doc_title_value = None - self._doc_title_present = False - self._binder_item_name_value = None - self._binder_item_name_present = False + self._event_uuid_value = bb.NOT_SET + self._doc_title_value = bb.NOT_SET + self._binder_item_name_value = bb.NOT_SET if event_uuid is not None: self.event_uuid = event_uuid if doc_title is not None: @@ -4078,132 +2397,40 @@ def __init__(self, if binder_item_name is not None: self.binder_item_name = binder_item_name - @property - def event_uuid(self): - """ - Event unique identifier. + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") + # Instance attribute type: str (validator is set below) + doc_title = bb.Attribute("doc_title") - @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 doc_title(self): - """ - Title of the Binder doc. - - :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 - - @property - def binder_item_name(self): - """ - Name of the Binder page/section. - - :rtype: str - """ - if self._binder_item_name_present: - return self._binder_item_name_value - else: - raise AttributeError("missing required field 'binder_item_name'") - - @binder_item_name.setter - def binder_item_name(self, val): - val = self._binder_item_name_validator.validate(val) - self._binder_item_name_value = val - self._binder_item_name_present = True - - @binder_item_name.deleter - def binder_item_name(self): - self._binder_item_name_value = None - self._binder_item_name_present = False + # Instance attribute type: str (validator is set below) + binder_item_name = bb.Attribute("binder_item_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(BinderReorderSectionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'BinderReorderSectionDetails(event_uuid={!r}, doc_title={!r}, binder_item_name={!r})'.format( - self._event_uuid_value, - self._doc_title_value, - self._binder_item_name_value, - ) - BinderReorderSectionDetails_validator = bv.Struct(BinderReorderSectionDetails) class BinderReorderSectionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(BinderReorderSectionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'BinderReorderSectionType(description={!r})'.format( - self._description_value, - ) - BinderReorderSectionType_validator = bv.Struct(BinderReorderSectionType) class CameraUploadsPolicy(bb.Union): @@ -4250,9 +2477,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(CameraUploadsPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CameraUploadsPolicy(%r, %r)' % (self._tag, self._value) - CameraUploadsPolicy_validator = bv.Union(CameraUploadsPolicy) class CameraUploadsPolicyChangedDetails(bb.Struct): @@ -4267,9 +2491,7 @@ class CameraUploadsPolicyChangedDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -4277,117 +2499,44 @@ class CameraUploadsPolicyChangedDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 camera uploads setting. - - :rtype: CameraUploadsPolicy - """ - 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 + # Instance attribute type: CameraUploadsPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous camera uploads setting. - - :rtype: CameraUploadsPolicy - """ - 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 + # Instance attribute type: CameraUploadsPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(CameraUploadsPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CameraUploadsPolicyChangedDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - CameraUploadsPolicyChangedDetails_validator = bv.Struct(CameraUploadsPolicyChangedDetails) class CameraUploadsPolicyChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(CameraUploadsPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CameraUploadsPolicyChangedType(description={!r})'.format( - self._description_value, - ) - CameraUploadsPolicyChangedType_validator = bv.Struct(CameraUploadsPolicyChangedType) class Certificate(bb.Struct): @@ -4405,19 +2554,12 @@ class Certificate(bb.Struct): __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 @@ -4430,20 +2572,13 @@ def __init__(self, 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 + self._subject_value = bb.NOT_SET + self._issuer_value = bb.NOT_SET + self._issue_date_value = bb.NOT_SET + self._expiration_date_value = bb.NOT_SET + self._serial_number_value = bb.NOT_SET + self._sha1_fingerprint_value = bb.NOT_SET + self._common_name_value = bb.NOT_SET if subject is not None: self.subject = subject if issuer is not None: @@ -4459,184 +2594,30 @@ def __init__(self, if common_name is not None: self.common_name = common_name - @property - def subject(self): - """ - Certificate subject. + # Instance attribute type: str (validator is set below) + subject = bb.Attribute("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 + # Instance attribute type: str (validator is set below) + issuer = bb.Attribute("issuer") - @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'") + # Instance attribute type: str (validator is set below) + issue_date = bb.Attribute("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 + # Instance attribute type: str (validator is set below) + expiration_date = bb.Attribute("expiration_date") - @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'") + # Instance attribute type: str (validator is set below) + serial_number = bb.Attribute("serial_number") - @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 + # Instance attribute type: str (validator is set below) + sha1_fingerprint = bb.Attribute("sha1_fingerprint") - @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: - return None - - @common_name.setter - def common_name(self, val): - if val is None: - del self.common_name - return - 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 + # Instance attribute type: str (validator is set below) + common_name = bb.Attribute("common_name", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(Certificate, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 ChangedEnterpriseAdminRoleDetails(bb.Struct): @@ -4653,11 +2634,8 @@ class ChangedEnterpriseAdminRoleDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', '_team_name_value', - '_team_name_present', ] _has_required_fields = True @@ -4666,12 +2644,9 @@ def __init__(self, previous_value=None, new_value=None, team_name=None): - self._previous_value_value = None - self._previous_value_present = False - self._new_value_value = None - self._new_value_present = False - self._team_name_value = None - self._team_name_present = False + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET + self._team_name_value = bb.NOT_SET if previous_value is not None: self.previous_value = previous_value if new_value is not None: @@ -4679,132 +2654,40 @@ def __init__(self, if team_name is not None: self.team_name = team_name - @property - def previous_value(self): - """ - The member’s previous enterprise admin role. - - :rtype: FedAdminRole - """ - 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): - """ - The member’s new enterprise admin role. - - :rtype: FedAdminRole - """ - 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_name(self): - """ - The name of the member’s team. - - :rtype: str - """ - if self._team_name_present: - return self._team_name_value - else: - raise AttributeError("missing required field 'team_name'") + # Instance attribute type: FedAdminRole (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) - @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 + # Instance attribute type: FedAdminRole (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @team_name.deleter - def team_name(self): - self._team_name_value = None - self._team_name_present = False + # Instance attribute type: str (validator is set below) + team_name = bb.Attribute("team_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ChangedEnterpriseAdminRoleDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ChangedEnterpriseAdminRoleDetails(previous_value={!r}, new_value={!r}, team_name={!r})'.format( - self._previous_value_value, - self._new_value_value, - self._team_name_value, - ) - ChangedEnterpriseAdminRoleDetails_validator = bv.Struct(ChangedEnterpriseAdminRoleDetails) class ChangedEnterpriseAdminRoleType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ChangedEnterpriseAdminRoleType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ChangedEnterpriseAdminRoleType(description={!r})'.format( - self._description_value, - ) - ChangedEnterpriseAdminRoleType_validator = bv.Struct(ChangedEnterpriseAdminRoleType) class ChangedEnterpriseConnectedTeamStatusDetails(bb.Struct): @@ -4823,13 +2706,9 @@ class ChangedEnterpriseConnectedTeamStatusDetails(bb.Struct): __slots__ = [ '_action_value', - '_action_present', '_additional_info_value', - '_additional_info_present', '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -4839,14 +2718,10 @@ def __init__(self, additional_info=None, previous_value=None, new_value=None): - self._action_value = None - self._action_present = False - self._additional_info_value = None - self._additional_info_present = False - self._previous_value_value = None - self._previous_value_present = False - self._new_value_value = None - self._new_value_present = False + self._action_value = bb.NOT_SET + self._additional_info_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET if action is not None: self.action = action if additional_info is not None: @@ -4856,156 +2731,43 @@ def __init__(self, if new_value is not None: self.new_value = new_value - @property - def action(self): - """ - The preformed change in the team’s connection status. + # Instance attribute type: FedHandshakeAction (validator is set below) + action = bb.Attribute("action", user_defined=True) - :rtype: FedHandshakeAction - """ - if self._action_present: - return self._action_value - else: - raise AttributeError("missing required field 'action'") + # Instance attribute type: FederationStatusChangeAdditionalInfo (validator is set below) + additional_info = bb.Attribute("additional_info", user_defined=True) - @action.setter - def action(self, val): - self._action_validator.validate_type_only(val) - self._action_value = val - self._action_present = True + # Instance attribute type: TrustedTeamsRequestState (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) - @action.deleter - def action(self): - self._action_value = None - self._action_present = False - - @property - def additional_info(self): - """ - Additional information about the organization or team. - - :rtype: FederationStatusChangeAdditionalInfo - """ - if self._additional_info_present: - return self._additional_info_value - else: - raise AttributeError("missing required field 'additional_info'") - - @additional_info.setter - def additional_info(self, val): - self._additional_info_validator.validate_type_only(val) - self._additional_info_value = val - self._additional_info_present = True - - @additional_info.deleter - def additional_info(self): - self._additional_info_value = None - self._additional_info_present = False - - @property - def previous_value(self): - """ - Previous request state. - - :rtype: TrustedTeamsRequestState - """ - 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 request state. - - :rtype: TrustedTeamsRequestState - """ - 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 + # Instance attribute type: TrustedTeamsRequestState (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ChangedEnterpriseConnectedTeamStatusDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ChangedEnterpriseConnectedTeamStatusDetails(action={!r}, additional_info={!r}, previous_value={!r}, new_value={!r})'.format( - self._action_value, - self._additional_info_value, - self._previous_value_value, - self._new_value_value, - ) - ChangedEnterpriseConnectedTeamStatusDetails_validator = bv.Struct(ChangedEnterpriseConnectedTeamStatusDetails) class ChangedEnterpriseConnectedTeamStatusType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ChangedEnterpriseConnectedTeamStatusType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ChangedEnterpriseConnectedTeamStatusType(description={!r})'.format( - self._description_value, - ) - ChangedEnterpriseConnectedTeamStatusType_validator = bv.Struct(ChangedEnterpriseConnectedTeamStatusType) class ClassificationChangePolicyDetails(bb.Struct): @@ -5022,11 +2784,8 @@ class ClassificationChangePolicyDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', '_classification_type_value', - '_classification_type_present', ] _has_required_fields = True @@ -5035,12 +2794,9 @@ def __init__(self, previous_value=None, new_value=None, classification_type=None): - self._previous_value_value = None - self._previous_value_present = False - self._new_value_value = None - self._new_value_present = False - self._classification_type_value = None - self._classification_type_present = False + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET + self._classification_type_value = bb.NOT_SET if previous_value is not None: self.previous_value = previous_value if new_value is not None: @@ -5048,132 +2804,40 @@ def __init__(self, if classification_type is not None: self.classification_type = classification_type - @property - def previous_value(self): - """ - Previous classification policy. - - :rtype: ClassificationPolicyEnumWrapper - """ - 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 classification policy. - - :rtype: ClassificationPolicyEnumWrapper - """ - 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 classification_type(self): - """ - Policy type. - - :rtype: ClassificationType - """ - if self._classification_type_present: - return self._classification_type_value - else: - raise AttributeError("missing required field 'classification_type'") + # Instance attribute type: ClassificationPolicyEnumWrapper (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) - @classification_type.setter - def classification_type(self, val): - self._classification_type_validator.validate_type_only(val) - self._classification_type_value = val - self._classification_type_present = True + # Instance attribute type: ClassificationPolicyEnumWrapper (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @classification_type.deleter - def classification_type(self): - self._classification_type_value = None - self._classification_type_present = False + # Instance attribute type: ClassificationType (validator is set below) + classification_type = bb.Attribute("classification_type", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ClassificationChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ClassificationChangePolicyDetails(previous_value={!r}, new_value={!r}, classification_type={!r})'.format( - self._previous_value_value, - self._new_value_value, - self._classification_type_value, - ) - ClassificationChangePolicyDetails_validator = bv.Struct(ClassificationChangePolicyDetails) class ClassificationChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ClassificationChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ClassificationChangePolicyType(description={!r})'.format( - self._description_value, - ) - ClassificationChangePolicyType_validator = bv.Struct(ClassificationChangePolicyType) class ClassificationCreateReportDetails(bb.Struct): @@ -5192,9 +2856,6 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ClassificationCreateReportDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ClassificationCreateReportDetails()' - ClassificationCreateReportDetails_validator = bv.Struct(ClassificationCreateReportDetails) class ClassificationCreateReportFailDetails(bb.Struct): @@ -5207,143 +2868,66 @@ class ClassificationCreateReportFailDetails(bb.Struct): __slots__ = [ '_failure_reason_value', - '_failure_reason_present', ] _has_required_fields = True def __init__(self, failure_reason=None): - self._failure_reason_value = None - self._failure_reason_present = False + self._failure_reason_value = bb.NOT_SET if failure_reason is not None: self.failure_reason = failure_reason - @property - def failure_reason(self): - """ - Failure reason. - - :rtype: team.TeamReportFailureReason - """ - if self._failure_reason_present: - return self._failure_reason_value - else: - raise AttributeError("missing required field 'failure_reason'") - - @failure_reason.setter - def failure_reason(self, val): - self._failure_reason_validator.validate_type_only(val) - self._failure_reason_value = val - self._failure_reason_present = True - - @failure_reason.deleter - def failure_reason(self): - self._failure_reason_value = None - self._failure_reason_present = False + # Instance attribute type: team.TeamReportFailureReason (validator is set below) + failure_reason = bb.Attribute("failure_reason", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ClassificationCreateReportFailDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ClassificationCreateReportFailDetails(failure_reason={!r})'.format( - self._failure_reason_value, - ) - ClassificationCreateReportFailDetails_validator = bv.Struct(ClassificationCreateReportFailDetails) class ClassificationCreateReportFailType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ClassificationCreateReportFailType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ClassificationCreateReportFailType(description={!r})'.format( - self._description_value, - ) - ClassificationCreateReportFailType_validator = bv.Struct(ClassificationCreateReportFailType) class ClassificationCreateReportType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ClassificationCreateReportType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ClassificationCreateReportType(description={!r})'.format( - self._description_value, - ) - ClassificationCreateReportType_validator = bv.Struct(ClassificationCreateReportType) class ClassificationPolicyEnumWrapper(bb.Union): @@ -5390,9 +2974,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ClassificationPolicyEnumWrapper, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ClassificationPolicyEnumWrapper(%r, %r)' % (self._tag, self._value) - ClassificationPolicyEnumWrapper_validator = bv.Union(ClassificationPolicyEnumWrapper) class ClassificationType(bb.Union): @@ -5429,9 +3010,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ClassificationType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ClassificationType(%r, %r)' % (self._tag, self._value) - ClassificationType_validator = bv.Union(ClassificationType) class CollectionShareDetails(bb.Struct): @@ -5443,96 +3021,44 @@ class CollectionShareDetails(bb.Struct): __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 + self._album_name_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + album_name = bb.Attribute("album_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(CollectionShareDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CollectionShareDetails(album_name={!r})'.format( - self._album_name_value, - ) - CollectionShareDetails_validator = bv.Struct(CollectionShareDetails) class CollectionShareType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(CollectionShareType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CollectionShareType(description={!r})'.format( - self._description_value, - ) - CollectionShareType_validator = bv.Struct(CollectionShareType) class ComputerBackupPolicy(bb.Union): @@ -5589,9 +3115,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ComputerBackupPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ComputerBackupPolicy(%r, %r)' % (self._tag, self._value) - ComputerBackupPolicy_validator = bv.Union(ComputerBackupPolicy) class ComputerBackupPolicyChangedDetails(bb.Struct): @@ -5606,9 +3129,7 @@ class ComputerBackupPolicyChangedDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -5616,117 +3137,44 @@ class ComputerBackupPolicyChangedDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 computer backup policy. - - :rtype: ComputerBackupPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") + # Instance attribute type: ComputerBackupPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @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 computer backup policy. - - :rtype: ComputerBackupPolicy - """ - 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 + # Instance attribute type: ComputerBackupPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ComputerBackupPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ComputerBackupPolicyChangedDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - ComputerBackupPolicyChangedDetails_validator = bv.Struct(ComputerBackupPolicyChangedDetails) class ComputerBackupPolicyChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ComputerBackupPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ComputerBackupPolicyChangedType(description={!r})'.format( - self._description_value, - ) - ComputerBackupPolicyChangedType_validator = bv.Struct(ComputerBackupPolicyChangedType) class ConnectedTeamName(bb.Struct): @@ -5738,49 +3186,22 @@ class ConnectedTeamName(bb.Struct): __slots__ = [ '_team_value', - '_team_present', ] _has_required_fields = True def __init__(self, team=None): - self._team_value = None - self._team_present = False + self._team_value = bb.NOT_SET if team is not None: self.team = team - @property - def team(self): - """ - The name of the team. - - :rtype: str - """ - if self._team_present: - return self._team_value - else: - raise AttributeError("missing required field 'team'") - - @team.setter - def team(self, val): - val = self._team_validator.validate(val) - self._team_value = val - self._team_present = True - - @team.deleter - def team(self): - self._team_value = None - self._team_present = False + # Instance attribute type: str (validator is set below) + team = bb.Attribute("team") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ConnectedTeamName, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ConnectedTeamName(team={!r})'.format( - self._team_value, - ) - ConnectedTeamName_validator = bv.Struct(ConnectedTeamName) class ContentAdministrationPolicyChangedDetails(bb.Struct): @@ -5795,9 +3216,7 @@ class ContentAdministrationPolicyChangedDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -5805,117 +3224,44 @@ class ContentAdministrationPolicyChangedDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 content administration policy. + # Instance attribute type: str (validator is set below) + new_value = bb.Attribute("new_value") - :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 content administration policy. - - :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 + # Instance attribute type: str (validator is set below) + previous_value = bb.Attribute("previous_value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ContentAdministrationPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ContentAdministrationPolicyChangedDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - ContentAdministrationPolicyChangedDetails_validator = bv.Struct(ContentAdministrationPolicyChangedDetails) class ContentAdministrationPolicyChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ContentAdministrationPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ContentAdministrationPolicyChangedType(description={!r})'.format( - self._description_value, - ) - ContentAdministrationPolicyChangedType_validator = bv.Struct(ContentAdministrationPolicyChangedType) class ContentPermanentDeletePolicy(bb.Union): @@ -5962,9 +3308,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ContentPermanentDeletePolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ContentPermanentDeletePolicy(%r, %r)' % (self._tag, self._value) - ContentPermanentDeletePolicy_validator = bv.Union(ContentPermanentDeletePolicy) class ContextLogInfo(bb.Union): @@ -6146,9 +3489,6 @@ def get_trusted_non_team_member(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ContextLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ContextLogInfo(%r, %r)' % (self._tag, self._value) - ContextLogInfo_validator = bv.Union(ContextLogInfo) class CreateFolderDetails(bb.Struct): @@ -6167,56 +3507,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(CreateFolderDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CreateFolderDetails()' - CreateFolderDetails_validator = bv.Struct(CreateFolderDetails) class CreateFolderType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(CreateFolderType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CreateFolderType(description={!r})'.format( - self._description_value, - ) - CreateFolderType_validator = bv.Struct(CreateFolderType) class CreateTeamInviteLinkDetails(bb.Struct): @@ -6231,9 +3543,7 @@ class CreateTeamInviteLinkDetails(bb.Struct): __slots__ = [ '_link_url_value', - '_link_url_present', '_expiry_date_value', - '_expiry_date_present', ] _has_required_fields = True @@ -6241,117 +3551,44 @@ class CreateTeamInviteLinkDetails(bb.Struct): def __init__(self, link_url=None, expiry_date=None): - self._link_url_value = None - self._link_url_present = False - self._expiry_date_value = None - self._expiry_date_present = False + self._link_url_value = bb.NOT_SET + self._expiry_date_value = bb.NOT_SET if link_url is not None: self.link_url = link_url if expiry_date is not None: self.expiry_date = expiry_date - @property - def link_url(self): - """ - The invite link url that was created. - - :rtype: str - """ - if self._link_url_present: - return self._link_url_value - else: - raise AttributeError("missing required field 'link_url'") - - @link_url.setter - def link_url(self, val): - val = self._link_url_validator.validate(val) - self._link_url_value = val - self._link_url_present = True + # Instance attribute type: str (validator is set below) + link_url = bb.Attribute("link_url") - @link_url.deleter - def link_url(self): - self._link_url_value = None - self._link_url_present = False - - @property - def expiry_date(self): - """ - The expiration date of the invite link. - - :rtype: str - """ - if self._expiry_date_present: - return self._expiry_date_value - else: - raise AttributeError("missing required field 'expiry_date'") - - @expiry_date.setter - def expiry_date(self, val): - val = self._expiry_date_validator.validate(val) - self._expiry_date_value = val - self._expiry_date_present = True - - @expiry_date.deleter - def expiry_date(self): - self._expiry_date_value = None - self._expiry_date_present = False + # Instance attribute type: str (validator is set below) + expiry_date = bb.Attribute("expiry_date") def _process_custom_annotations(self, annotation_type, field_path, processor): super(CreateTeamInviteLinkDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CreateTeamInviteLinkDetails(link_url={!r}, expiry_date={!r})'.format( - self._link_url_value, - self._expiry_date_value, - ) - CreateTeamInviteLinkDetails_validator = bv.Struct(CreateTeamInviteLinkDetails) class CreateTeamInviteLinkType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(CreateTeamInviteLinkType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CreateTeamInviteLinkType(description={!r})'.format( - self._description_value, - ) - CreateTeamInviteLinkType_validator = bv.Struct(CreateTeamInviteLinkType) class DataPlacementRestrictionChangePolicyDetails(bb.Struct): @@ -6366,9 +3603,7 @@ class DataPlacementRestrictionChangePolicyDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -6376,117 +3611,44 @@ class DataPlacementRestrictionChangePolicyDetails(bb.Struct): 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 + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET 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 + # Instance attribute type: PlacementRestriction (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=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 + # Instance attribute type: PlacementRestriction (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DataPlacementRestrictionChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 DataPlacementRestrictionChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DataPlacementRestrictionChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DataPlacementRestrictionChangePolicyType(description={!r})'.format( - self._description_value, - ) - DataPlacementRestrictionChangePolicyType_validator = bv.Struct(DataPlacementRestrictionChangePolicyType) class DataPlacementRestrictionSatisfyPolicyDetails(bb.Struct): @@ -6500,96 +3662,44 @@ class DataPlacementRestrictionSatisfyPolicyDetails(bb.Struct): __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 + self._placement_restriction_value = bb.NOT_SET 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 + # Instance attribute type: PlacementRestriction (validator is set below) + placement_restriction = bb.Attribute("placement_restriction", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DataPlacementRestrictionSatisfyPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DataPlacementRestrictionSatisfyPolicyDetails(placement_restriction={!r})'.format( - self._placement_restriction_value, - ) - DataPlacementRestrictionSatisfyPolicyDetails_validator = bv.Struct(DataPlacementRestrictionSatisfyPolicyDetails) class DataPlacementRestrictionSatisfyPolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DataPlacementRestrictionSatisfyPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DataPlacementRestrictionSatisfyPolicyType(description={!r})'.format( - self._description_value, - ) - DataPlacementRestrictionSatisfyPolicyType_validator = bv.Struct(DataPlacementRestrictionSatisfyPolicyType) class DeleteTeamInviteLinkDetails(bb.Struct): @@ -6602,96 +3712,44 @@ class DeleteTeamInviteLinkDetails(bb.Struct): __slots__ = [ '_link_url_value', - '_link_url_present', ] _has_required_fields = True def __init__(self, link_url=None): - self._link_url_value = None - self._link_url_present = False + self._link_url_value = bb.NOT_SET if link_url is not None: self.link_url = link_url - @property - def link_url(self): - """ - The invite link url that was deleted. - - :rtype: str - """ - if self._link_url_present: - return self._link_url_value - else: - raise AttributeError("missing required field 'link_url'") - - @link_url.setter - def link_url(self, val): - val = self._link_url_validator.validate(val) - self._link_url_value = val - self._link_url_present = True - - @link_url.deleter - def link_url(self): - self._link_url_value = None - self._link_url_present = False + # Instance attribute type: str (validator is set below) + link_url = bb.Attribute("link_url") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteTeamInviteLinkDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeleteTeamInviteLinkDetails(link_url={!r})'.format( - self._link_url_value, - ) - DeleteTeamInviteLinkDetails_validator = bv.Struct(DeleteTeamInviteLinkDetails) class DeleteTeamInviteLinkType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeleteTeamInviteLinkType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeleteTeamInviteLinkType(description={!r})'.format( - self._description_value, - ) - DeleteTeamInviteLinkType_validator = bv.Struct(DeleteTeamInviteLinkType) class DeviceSessionLogInfo(bb.Struct): @@ -6708,11 +3766,8 @@ class DeviceSessionLogInfo(bb.Struct): __slots__ = [ '_ip_address_value', - '_ip_address_present', '_created_value', - '_created_present', '_updated_value', - '_updated_present', ] _has_required_fields = False @@ -6721,12 +3776,9 @@ def __init__(self, ip_address=None, created=None, updated=None): - self._ip_address_value = None - self._ip_address_present = False - self._created_value = None - self._created_present = False - self._updated_value = None - self._updated_present = False + self._ip_address_value = bb.NOT_SET + self._created_value = bb.NOT_SET + self._updated_value = bb.NOT_SET if ip_address is not None: self.ip_address = ip_address if created is not None: @@ -6734,97 +3786,18 @@ def __init__(self, if updated is not None: self.updated = updated - @property - def ip_address(self): - """ - The IP address of the last activity from this session. 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 + # Instance attribute type: str (validator is set below) + ip_address = bb.Attribute("ip_address", nullable=True) - @property - def created(self): - """ - The time this session was created. Might be missing due to historical - data gap. - - :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. Might be missing due to - historical data gap. + # Instance attribute type: datetime.datetime (validator is set below) + created = bb.Attribute("created", nullable=True) - :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 + # Instance attribute type: datetime.datetime (validator is set below) + updated = bb.Attribute("updated", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceSessionLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceSessionLogInfo(ip_address={!r}, created={!r}, updated={!r})'.format( - self._ip_address_value, - self._created_value, - self._updated_value, - ) - DeviceSessionLogInfo_validator = bv.StructTree(DeviceSessionLogInfo) class DesktopDeviceSessionLogInfo(DeviceSessionLogInfo): @@ -6848,17 +3821,11 @@ class DesktopDeviceSessionLogInfo(DeviceSessionLogInfo): __slots__ = [ '_session_info_value', - '_session_info_present', '_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 @@ -6876,18 +3843,12 @@ def __init__(self, super(DesktopDeviceSessionLogInfo, self).__init__(ip_address, created, updated) - self._session_info_value = None - self._session_info_present = False - 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 + self._session_info_value = bb.NOT_SET + self._host_name_value = bb.NOT_SET + self._client_type_value = bb.NOT_SET + self._client_version_value = bb.NOT_SET + self._platform_value = bb.NOT_SET + self._is_delete_on_unlink_supported_value = bb.NOT_SET if session_info is not None: self.session_info = session_info if host_name is not None: @@ -6901,167 +3862,27 @@ def __init__(self, if is_delete_on_unlink_supported is not None: self.is_delete_on_unlink_supported = is_delete_on_unlink_supported - @property - def session_info(self): - """ - Desktop session unique id. Might be missing due to historical data gap. + # Instance attribute type: DesktopSessionLogInfo (validator is set below) + session_info = bb.Attribute("session_info", nullable=True, user_defined=True) - :rtype: DesktopSessionLogInfo - """ - if self._session_info_present: - return self._session_info_value - else: - return None - - @session_info.setter - def session_info(self, val): - if val is None: - del self.session_info - return - self._session_info_validator.validate_type_only(val) - self._session_info_value = val - self._session_info_present = True - - @session_info.deleter - def session_info(self): - self._session_info_value = None - self._session_info_present = False - - @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: team.DesktopPlatform - """ - if self._client_type_present: - return self._client_type_value - else: - raise AttributeError("missing required field 'client_type'") + # Instance attribute type: str (validator is set below) + host_name = bb.Attribute("host_name") - @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 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 itu2019s possible to delete all of the account files upon - unlinking. + # Instance attribute type: team.DesktopPlatform (validator is set below) + client_type = bb.Attribute("client_type", user_defined=True) - :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'") + # Instance attribute type: str (validator is set below) + client_version = bb.Attribute("client_version", nullable=True) - @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 + # Instance attribute type: str (validator is set below) + platform = bb.Attribute("platform") - @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 + # Instance attribute type: bool (validator is set below) + is_delete_on_unlink_supported = bb.Attribute("is_delete_on_unlink_supported") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DesktopDeviceSessionLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DesktopDeviceSessionLogInfo(host_name={!r}, client_type={!r}, platform={!r}, is_delete_on_unlink_supported={!r}, ip_address={!r}, created={!r}, updated={!r}, session_info={!r}, client_version={!r})'.format( - self._host_name_value, - self._client_type_value, - self._platform_value, - self._is_delete_on_unlink_supported_value, - self._ip_address_value, - self._created_value, - self._updated_value, - self._session_info_value, - self._client_version_value, - ) - DesktopDeviceSessionLogInfo_validator = bv.Struct(DesktopDeviceSessionLogInfo) class SessionLogInfo(bb.Struct): @@ -7074,52 +3895,22 @@ class SessionLogInfo(bb.Struct): __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 + self._session_id_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + session_id = bb.Attribute("session_id", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SessionLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SessionLogInfo(session_id={!r})'.format( - self._session_id_value, - ) - SessionLogInfo_validator = bv.StructTree(SessionLogInfo) class DesktopSessionLogInfo(SessionLogInfo): @@ -7139,11 +3930,6 @@ def __init__(self, def _process_custom_annotations(self, annotation_type, field_path, processor): super(DesktopSessionLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DesktopSessionLogInfo(session_id={!r})'.format( - self._session_id_value, - ) - DesktopSessionLogInfo_validator = bv.Struct(DesktopSessionLogInfo) class DeviceApprovalsAddExceptionDetails(bb.Struct): @@ -7162,56 +3948,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceApprovalsAddExceptionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceApprovalsAddExceptionDetails()' - DeviceApprovalsAddExceptionDetails_validator = bv.Struct(DeviceApprovalsAddExceptionDetails) class DeviceApprovalsAddExceptionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceApprovalsAddExceptionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceApprovalsAddExceptionType(description={!r})'.format( - self._description_value, - ) - DeviceApprovalsAddExceptionType_validator = bv.Struct(DeviceApprovalsAddExceptionType) class DeviceApprovalsChangeDesktopPolicyDetails(bb.Struct): @@ -7229,9 +3987,7 @@ class DeviceApprovalsChangeDesktopPolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = False @@ -7239,125 +3995,44 @@ class DeviceApprovalsChangeDesktopPolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: DeviceApprovalsPolicy (validator is set below) + new_value = bb.Attribute("new_value", nullable=True, user_defined=True) - @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 + # Instance attribute type: DeviceApprovalsPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceApprovalsChangeDesktopPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 DeviceApprovalsChangeDesktopPolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceApprovalsChangeDesktopPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceApprovalsChangeDesktopPolicyType(description={!r})'.format( - self._description_value, - ) - DeviceApprovalsChangeDesktopPolicyType_validator = bv.Struct(DeviceApprovalsChangeDesktopPolicyType) class DeviceApprovalsChangeMobilePolicyDetails(bb.Struct): @@ -7375,9 +4050,7 @@ class DeviceApprovalsChangeMobilePolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = False @@ -7385,125 +4058,44 @@ class DeviceApprovalsChangeMobilePolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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. + # Instance attribute type: DeviceApprovalsPolicy (validator is set below) + new_value = bb.Attribute("new_value", nullable=True, user_defined=True) - :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 + # Instance attribute type: DeviceApprovalsPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceApprovalsChangeMobilePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 DeviceApprovalsChangeMobilePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceApprovalsChangeMobilePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceApprovalsChangeMobilePolicyType(description={!r})'.format( - self._description_value, - ) - DeviceApprovalsChangeMobilePolicyType_validator = bv.Struct(DeviceApprovalsChangeMobilePolicyType) class DeviceApprovalsChangeOverageActionDetails(bb.Struct): @@ -7519,9 +4111,7 @@ class DeviceApprovalsChangeOverageActionDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = False @@ -7529,124 +4119,44 @@ class DeviceApprovalsChangeOverageActionDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 - """ - 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 - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None + # Instance attribute type: team_policies.RolloutMethod (validator is set below) + new_value = bb.Attribute("new_value", nullable=True, user_defined=True) - @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 + # Instance attribute type: team_policies.RolloutMethod (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceApprovalsChangeOverageActionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 DeviceApprovalsChangeOverageActionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceApprovalsChangeOverageActionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceApprovalsChangeOverageActionType(description={!r})'.format( - self._description_value, - ) - DeviceApprovalsChangeOverageActionType_validator = bv.Struct(DeviceApprovalsChangeOverageActionType) class DeviceApprovalsChangeUnlinkActionDetails(bb.Struct): @@ -7662,9 +4172,7 @@ class DeviceApprovalsChangeUnlinkActionDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = False @@ -7672,124 +4180,44 @@ class DeviceApprovalsChangeUnlinkActionDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: DeviceUnlinkPolicy (validator is set below) + new_value = bb.Attribute("new_value", nullable=True, user_defined=True) - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False + # Instance attribute type: DeviceUnlinkPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceApprovalsChangeUnlinkActionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 DeviceApprovalsChangeUnlinkActionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceApprovalsChangeUnlinkActionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceApprovalsChangeUnlinkActionType(description={!r})'.format( - self._description_value, - ) - DeviceApprovalsChangeUnlinkActionType_validator = bv.Struct(DeviceApprovalsChangeUnlinkActionType) class DeviceApprovalsPolicy(bb.Union): @@ -7834,9 +4262,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceApprovalsPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceApprovalsPolicy(%r, %r)' % (self._tag, self._value) - DeviceApprovalsPolicy_validator = bv.Union(DeviceApprovalsPolicy) class DeviceApprovalsRemoveExceptionDetails(bb.Struct): @@ -7855,56 +4280,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceApprovalsRemoveExceptionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceApprovalsRemoveExceptionDetails()' - DeviceApprovalsRemoveExceptionDetails_validator = bv.Struct(DeviceApprovalsRemoveExceptionDetails) class DeviceApprovalsRemoveExceptionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceApprovalsRemoveExceptionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceApprovalsRemoveExceptionType(description={!r})'.format( - self._description_value, - ) - DeviceApprovalsRemoveExceptionType_validator = bv.Struct(DeviceApprovalsRemoveExceptionType) class DeviceChangeIpDesktopDetails(bb.Struct): @@ -7917,96 +4314,44 @@ class DeviceChangeIpDesktopDetails(bb.Struct): __slots__ = [ '_device_session_info_value', - '_device_session_info_present', ] _has_required_fields = True def __init__(self, device_session_info=None): - self._device_session_info_value = None - self._device_session_info_present = False + self._device_session_info_value = bb.NOT_SET if device_session_info is not None: self.device_session_info = device_session_info - @property - def device_session_info(self): - """ - Device's session logged information. - - :rtype: DeviceSessionLogInfo - """ - if self._device_session_info_present: - return self._device_session_info_value - else: - raise AttributeError("missing required field 'device_session_info'") - - @device_session_info.setter - def device_session_info(self, val): - self._device_session_info_validator.validate_type_only(val) - self._device_session_info_value = val - self._device_session_info_present = True - - @device_session_info.deleter - def device_session_info(self): - self._device_session_info_value = None - self._device_session_info_present = False + # Instance attribute type: DeviceSessionLogInfo (validator is set below) + device_session_info = bb.Attribute("device_session_info", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceChangeIpDesktopDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceChangeIpDesktopDetails(device_session_info={!r})'.format( - self._device_session_info_value, - ) - DeviceChangeIpDesktopDetails_validator = bv.Struct(DeviceChangeIpDesktopDetails) class DeviceChangeIpDesktopType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceChangeIpDesktopType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceChangeIpDesktopType(description={!r})'.format( - self._description_value, - ) - DeviceChangeIpDesktopType_validator = bv.Struct(DeviceChangeIpDesktopType) class DeviceChangeIpMobileDetails(bb.Struct): @@ -8019,99 +4364,44 @@ class DeviceChangeIpMobileDetails(bb.Struct): __slots__ = [ '_device_session_info_value', - '_device_session_info_present', ] _has_required_fields = False def __init__(self, device_session_info=None): - self._device_session_info_value = None - self._device_session_info_present = False + self._device_session_info_value = bb.NOT_SET if device_session_info is not None: self.device_session_info = device_session_info - @property - def device_session_info(self): - """ - Device's session logged information. - - :rtype: DeviceSessionLogInfo - """ - if self._device_session_info_present: - return self._device_session_info_value - else: - return None - - @device_session_info.setter - def device_session_info(self, val): - if val is None: - del self.device_session_info - return - self._device_session_info_validator.validate_type_only(val) - self._device_session_info_value = val - self._device_session_info_present = True - - @device_session_info.deleter - def device_session_info(self): - self._device_session_info_value = None - self._device_session_info_present = False + # Instance attribute type: DeviceSessionLogInfo (validator is set below) + device_session_info = bb.Attribute("device_session_info", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceChangeIpMobileDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceChangeIpMobileDetails(device_session_info={!r})'.format( - self._device_session_info_value, - ) - DeviceChangeIpMobileDetails_validator = bv.Struct(DeviceChangeIpMobileDetails) class DeviceChangeIpMobileType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceChangeIpMobileType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceChangeIpMobileType(description={!r})'.format( - self._description_value, - ) - DeviceChangeIpMobileType_validator = bv.Struct(DeviceChangeIpMobileType) class DeviceChangeIpWebDetails(bb.Struct): @@ -8123,96 +4413,44 @@ class DeviceChangeIpWebDetails(bb.Struct): __slots__ = [ '_user_agent_value', - '_user_agent_present', ] _has_required_fields = True def __init__(self, user_agent=None): - self._user_agent_value = None - self._user_agent_present = False + self._user_agent_value = bb.NOT_SET if user_agent is not None: self.user_agent = user_agent - @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 + # Instance attribute type: str (validator is set below) + user_agent = bb.Attribute("user_agent") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceChangeIpWebDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceChangeIpWebDetails(user_agent={!r})'.format( - self._user_agent_value, - ) - DeviceChangeIpWebDetails_validator = bv.Struct(DeviceChangeIpWebDetails) class DeviceChangeIpWebType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceChangeIpWebType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceChangeIpWebType(description={!r})'.format( - self._description_value, - ) - DeviceChangeIpWebType_validator = bv.Struct(DeviceChangeIpWebType) class DeviceDeleteOnUnlinkFailDetails(bb.Struct): @@ -8229,11 +4467,8 @@ class DeviceDeleteOnUnlinkFailDetails(bb.Struct): __slots__ = [ '_session_info_value', - '_session_info_present', '_display_name_value', - '_display_name_present', '_num_failures_value', - '_num_failures_present', ] _has_required_fields = True @@ -8242,12 +4477,9 @@ def __init__(self, num_failures=None, session_info=None, display_name=None): - self._session_info_value = None - self._session_info_present = False - self._display_name_value = None - self._display_name_present = False - self._num_failures_value = None - self._num_failures_present = False + self._session_info_value = bb.NOT_SET + self._display_name_value = bb.NOT_SET + self._num_failures_value = bb.NOT_SET if session_info is not None: self.session_info = session_info if display_name is not None: @@ -8255,138 +4487,40 @@ def __init__(self, if num_failures is not None: self.num_failures = num_failures - @property - def session_info(self): - """ - Session unique id. Might be missing due to historical data gap. - - :rtype: SessionLogInfo - """ - if self._session_info_present: - return self._session_info_value - else: - return None - - @session_info.setter - def session_info(self, val): - if val is None: - del self.session_info - return - self._session_info_validator.validate_type_only(val) - self._session_info_value = val - self._session_info_present = True - - @session_info.deleter - def session_info(self): - self._session_info_value = None - self._session_info_present = False - - @property - def display_name(self): - """ - The device 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 num_failures(self): - """ - The number of times that remote file deletion failed. - - :rtype: int - """ - if self._num_failures_present: - return self._num_failures_value - else: - raise AttributeError("missing required field 'num_failures'") + # Instance attribute type: SessionLogInfo (validator is set below) + session_info = bb.Attribute("session_info", nullable=True, user_defined=True) - @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 + # Instance attribute type: str (validator is set below) + display_name = bb.Attribute("display_name", nullable=True) - @num_failures.deleter - def num_failures(self): - self._num_failures_value = None - self._num_failures_present = False + # Instance attribute type: int (validator is set below) + num_failures = bb.Attribute("num_failures") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceDeleteOnUnlinkFailDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceDeleteOnUnlinkFailDetails(num_failures={!r}, session_info={!r}, display_name={!r})'.format( - self._num_failures_value, - self._session_info_value, - self._display_name_value, - ) - DeviceDeleteOnUnlinkFailDetails_validator = bv.Struct(DeviceDeleteOnUnlinkFailDetails) class DeviceDeleteOnUnlinkFailType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceDeleteOnUnlinkFailType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceDeleteOnUnlinkFailType(description={!r})'.format( - self._description_value, - ) - DeviceDeleteOnUnlinkFailType_validator = bv.Struct(DeviceDeleteOnUnlinkFailType) class DeviceDeleteOnUnlinkSuccessDetails(bb.Struct): @@ -8401,9 +4535,7 @@ class DeviceDeleteOnUnlinkSuccessDetails(bb.Struct): __slots__ = [ '_session_info_value', - '_session_info_present', '_display_name_value', - '_display_name_present', ] _has_required_fields = False @@ -8411,123 +4543,44 @@ class DeviceDeleteOnUnlinkSuccessDetails(bb.Struct): def __init__(self, session_info=None, display_name=None): - self._session_info_value = None - self._session_info_present = False - self._display_name_value = None - self._display_name_present = False + self._session_info_value = bb.NOT_SET + self._display_name_value = bb.NOT_SET if session_info is not None: self.session_info = session_info if display_name is not None: self.display_name = display_name - @property - def session_info(self): - """ - Session unique id. Might be missing due to historical data gap. - - :rtype: SessionLogInfo - """ - if self._session_info_present: - return self._session_info_value - else: - return None - - @session_info.setter - def session_info(self, val): - if val is None: - del self.session_info - return - self._session_info_validator.validate_type_only(val) - self._session_info_value = val - self._session_info_present = True - - @session_info.deleter - def session_info(self): - self._session_info_value = None - self._session_info_present = False - - @property - def display_name(self): - """ - The device name. Might be missing due to historical data gap. - - :rtype: str - """ - if self._display_name_present: - return self._display_name_value - else: - return None + # Instance attribute type: SessionLogInfo (validator is set below) + session_info = bb.Attribute("session_info", nullable=True, user_defined=True) - @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 + # Instance attribute type: str (validator is set below) + display_name = bb.Attribute("display_name", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceDeleteOnUnlinkSuccessDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceDeleteOnUnlinkSuccessDetails(session_info={!r}, display_name={!r})'.format( - self._session_info_value, - self._display_name_value, - ) - DeviceDeleteOnUnlinkSuccessDetails_validator = bv.Struct(DeviceDeleteOnUnlinkSuccessDetails) class DeviceDeleteOnUnlinkSuccessType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceDeleteOnUnlinkSuccessType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceDeleteOnUnlinkSuccessType(description={!r})'.format( - self._description_value, - ) - DeviceDeleteOnUnlinkSuccessType_validator = bv.Struct(DeviceDeleteOnUnlinkSuccessType) class DeviceLinkFailDetails(bb.Struct): @@ -8542,9 +4595,7 @@ class DeviceLinkFailDetails(bb.Struct): __slots__ = [ '_ip_address_value', - '_ip_address_present', '_device_type_value', - '_device_type_present', ] _has_required_fields = True @@ -8552,120 +4603,44 @@ class DeviceLinkFailDetails(bb.Struct): def __init__(self, device_type=None, ip_address=None): - self._ip_address_value = None - self._ip_address_present = False - self._device_type_value = None - self._device_type_present = False + self._ip_address_value = bb.NOT_SET + self._device_type_value = bb.NOT_SET if ip_address is not None: self.ip_address = ip_address if device_type is not None: self.device_type = device_type - @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 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 + # Instance attribute type: str (validator is set below) + ip_address = bb.Attribute("ip_address", nullable=True) - @device_type.deleter - def device_type(self): - self._device_type_value = None - self._device_type_present = False + # Instance attribute type: DeviceType (validator is set below) + device_type = bb.Attribute("device_type", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceLinkFailDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceLinkFailDetails(device_type={!r}, ip_address={!r})'.format( - self._device_type_value, - self._ip_address_value, - ) - DeviceLinkFailDetails_validator = bv.Struct(DeviceLinkFailDetails) class DeviceLinkFailType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceLinkFailType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceLinkFailType(description={!r})'.format( - self._description_value, - ) - DeviceLinkFailType_validator = bv.Struct(DeviceLinkFailType) class DeviceLinkSuccessDetails(bb.Struct): @@ -8678,99 +4653,44 @@ class DeviceLinkSuccessDetails(bb.Struct): __slots__ = [ '_device_session_info_value', - '_device_session_info_present', ] _has_required_fields = False def __init__(self, device_session_info=None): - self._device_session_info_value = None - self._device_session_info_present = False + self._device_session_info_value = bb.NOT_SET if device_session_info is not None: self.device_session_info = device_session_info - @property - def device_session_info(self): - """ - Device's session logged information. - - :rtype: DeviceSessionLogInfo - """ - if self._device_session_info_present: - return self._device_session_info_value - else: - return None - - @device_session_info.setter - def device_session_info(self, val): - if val is None: - del self.device_session_info - return - self._device_session_info_validator.validate_type_only(val) - self._device_session_info_value = val - self._device_session_info_present = True - - @device_session_info.deleter - def device_session_info(self): - self._device_session_info_value = None - self._device_session_info_present = False + # Instance attribute type: DeviceSessionLogInfo (validator is set below) + device_session_info = bb.Attribute("device_session_info", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceLinkSuccessDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceLinkSuccessDetails(device_session_info={!r})'.format( - self._device_session_info_value, - ) - DeviceLinkSuccessDetails_validator = bv.Struct(DeviceLinkSuccessDetails) class DeviceLinkSuccessType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceLinkSuccessType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceLinkSuccessType(description={!r})'.format( - self._description_value, - ) - DeviceLinkSuccessType_validator = bv.Struct(DeviceLinkSuccessType) class DeviceManagementDisabledDetails(bb.Struct): @@ -8789,56 +4709,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceManagementDisabledDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceManagementDisabledDetails()' - DeviceManagementDisabledDetails_validator = bv.Struct(DeviceManagementDisabledDetails) class DeviceManagementDisabledType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceManagementDisabledType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceManagementDisabledType(description={!r})'.format( - self._description_value, - ) - DeviceManagementDisabledType_validator = bv.Struct(DeviceManagementDisabledType) class DeviceManagementEnabledDetails(bb.Struct): @@ -8857,56 +4749,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceManagementEnabledDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceManagementEnabledDetails()' - DeviceManagementEnabledDetails_validator = bv.Struct(DeviceManagementEnabledDetails) class DeviceManagementEnabledType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceManagementEnabledType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceManagementEnabledType(description={!r})'.format( - self._description_value, - ) - DeviceManagementEnabledType_validator = bv.Struct(DeviceManagementEnabledType) class DeviceSyncBackupStatusChangedDetails(bb.Struct): @@ -8924,11 +4788,8 @@ class DeviceSyncBackupStatusChangedDetails(bb.Struct): __slots__ = [ '_desktop_device_session_info_value', - '_desktop_device_session_info_present', '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -8937,12 +4798,9 @@ def __init__(self, desktop_device_session_info=None, previous_value=None, new_value=None): - self._desktop_device_session_info_value = None - self._desktop_device_session_info_present = False - self._previous_value_value = None - self._previous_value_present = False - self._new_value_value = None - self._new_value_present = False + self._desktop_device_session_info_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET if desktop_device_session_info is not None: self.desktop_device_session_info = desktop_device_session_info if previous_value is not None: @@ -8950,132 +4808,40 @@ def __init__(self, if new_value is not None: self.new_value = new_value - @property - def desktop_device_session_info(self): - """ - Device's session logged information. + # Instance attribute type: DesktopDeviceSessionLogInfo (validator is set below) + desktop_device_session_info = bb.Attribute("desktop_device_session_info", user_defined=True) - :rtype: DesktopDeviceSessionLogInfo - """ - if self._desktop_device_session_info_present: - return self._desktop_device_session_info_value - else: - raise AttributeError("missing required field 'desktop_device_session_info'") - - @desktop_device_session_info.setter - def desktop_device_session_info(self, val): - self._desktop_device_session_info_validator.validate_type_only(val) - self._desktop_device_session_info_value = val - self._desktop_device_session_info_present = True - - @desktop_device_session_info.deleter - def desktop_device_session_info(self): - self._desktop_device_session_info_value = None - self._desktop_device_session_info_present = False - - @property - def previous_value(self): - """ - Previous status of computer backup on the device. - - :rtype: BackupStatus - """ - 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 + # Instance attribute type: BackupStatus (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - @property - def new_value(self): - """ - Next status of computer backup on the device. - - :rtype: BackupStatus - """ - 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 + # Instance attribute type: BackupStatus (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceSyncBackupStatusChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceSyncBackupStatusChangedDetails(desktop_device_session_info={!r}, previous_value={!r}, new_value={!r})'.format( - self._desktop_device_session_info_value, - self._previous_value_value, - self._new_value_value, - ) - DeviceSyncBackupStatusChangedDetails_validator = bv.Struct(DeviceSyncBackupStatusChangedDetails) class DeviceSyncBackupStatusChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceSyncBackupStatusChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceSyncBackupStatusChangedType(description={!r})'.format( - self._description_value, - ) - DeviceSyncBackupStatusChangedType_validator = bv.Struct(DeviceSyncBackupStatusChangedType) class DeviceType(bb.Union): @@ -9120,9 +4886,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceType(%r, %r)' % (self._tag, self._value) - DeviceType_validator = bv.Union(DeviceType) class DeviceUnlinkDetails(bb.Struct): @@ -9138,11 +4901,8 @@ class DeviceUnlinkDetails(bb.Struct): __slots__ = [ '_session_info_value', - '_session_info_present', '_display_name_value', - '_display_name_present', '_delete_data_value', - '_delete_data_present', ] _has_required_fields = True @@ -9151,12 +4911,9 @@ def __init__(self, delete_data=None, session_info=None, display_name=None): - self._session_info_value = None - self._session_info_present = False - self._display_name_value = None - self._display_name_present = False - self._delete_data_value = None - self._delete_data_present = False + self._session_info_value = bb.NOT_SET + self._display_name_value = bb.NOT_SET + self._delete_data_value = bb.NOT_SET if session_info is not None: self.session_info = session_info if display_name is not None: @@ -9164,92 +4921,18 @@ def __init__(self, if delete_data is not None: self.delete_data = delete_data - @property - def session_info(self): - """ - Session unique id. - - :rtype: SessionLogInfo - """ - if self._session_info_present: - return self._session_info_value - else: - return None + # Instance attribute type: SessionLogInfo (validator is set below) + session_info = bb.Attribute("session_info", nullable=True, user_defined=True) - @session_info.setter - def session_info(self, val): - if val is None: - del self.session_info - return - self._session_info_validator.validate_type_only(val) - self._session_info_value = val - self._session_info_present = True + # Instance attribute type: str (validator is set below) + display_name = bb.Attribute("display_name", nullable=True) - @session_info.deleter - def session_info(self): - self._session_info_value = None - self._session_info_present = False - - @property - def display_name(self): - """ - The device 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 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 + # Instance attribute type: bool (validator is set below) + delete_data = bb.Attribute("delete_data") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceUnlinkDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceUnlinkDetails(delete_data={!r}, session_info={!r}, display_name={!r})'.format( - self._delete_data_value, - self._session_info_value, - self._display_name_value, - ) - DeviceUnlinkDetails_validator = bv.Struct(DeviceUnlinkDetails) class DeviceUnlinkPolicy(bb.Union): @@ -9294,56 +4977,28 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceUnlinkPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceUnlinkPolicy(%r, %r)' % (self._tag, self._value) - DeviceUnlinkPolicy_validator = bv.Union(DeviceUnlinkPolicy) class DeviceUnlinkType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeviceUnlinkType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DeviceUnlinkType(description={!r})'.format( - self._description_value, - ) - DeviceUnlinkType_validator = bv.Struct(DeviceUnlinkType) class DirectoryRestrictionsAddMembersDetails(bb.Struct): @@ -9362,56 +5017,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DirectoryRestrictionsAddMembersDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DirectoryRestrictionsAddMembersDetails()' - DirectoryRestrictionsAddMembersDetails_validator = bv.Struct(DirectoryRestrictionsAddMembersDetails) class DirectoryRestrictionsAddMembersType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DirectoryRestrictionsAddMembersType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DirectoryRestrictionsAddMembersType(description={!r})'.format( - self._description_value, - ) - DirectoryRestrictionsAddMembersType_validator = bv.Struct(DirectoryRestrictionsAddMembersType) class DirectoryRestrictionsRemoveMembersDetails(bb.Struct): @@ -9430,56 +5057,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DirectoryRestrictionsRemoveMembersDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DirectoryRestrictionsRemoveMembersDetails()' - DirectoryRestrictionsRemoveMembersDetails_validator = bv.Struct(DirectoryRestrictionsRemoveMembersDetails) class DirectoryRestrictionsRemoveMembersType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DirectoryRestrictionsRemoveMembersType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DirectoryRestrictionsRemoveMembersType(description={!r})'.format( - self._description_value, - ) - DirectoryRestrictionsRemoveMembersType_validator = bv.Struct(DirectoryRestrictionsRemoveMembersType) class DisabledDomainInvitesDetails(bb.Struct): @@ -9498,56 +5097,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DisabledDomainInvitesDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DisabledDomainInvitesDetails()' - DisabledDomainInvitesDetails_validator = bv.Struct(DisabledDomainInvitesDetails) class DisabledDomainInvitesType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DisabledDomainInvitesType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DisabledDomainInvitesType(description={!r})'.format( - self._description_value, - ) - DisabledDomainInvitesType_validator = bv.Struct(DisabledDomainInvitesType) class DomainInvitesApproveRequestToJoinTeamDetails(bb.Struct): @@ -9566,56 +5137,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DomainInvitesApproveRequestToJoinTeamDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DomainInvitesApproveRequestToJoinTeamDetails()' - DomainInvitesApproveRequestToJoinTeamDetails_validator = bv.Struct(DomainInvitesApproveRequestToJoinTeamDetails) class DomainInvitesApproveRequestToJoinTeamType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DomainInvitesApproveRequestToJoinTeamType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DomainInvitesApproveRequestToJoinTeamType(description={!r})'.format( - self._description_value, - ) - DomainInvitesApproveRequestToJoinTeamType_validator = bv.Struct(DomainInvitesApproveRequestToJoinTeamType) class DomainInvitesDeclineRequestToJoinTeamDetails(bb.Struct): @@ -9634,56 +5177,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DomainInvitesDeclineRequestToJoinTeamDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DomainInvitesDeclineRequestToJoinTeamDetails()' - DomainInvitesDeclineRequestToJoinTeamDetails_validator = bv.Struct(DomainInvitesDeclineRequestToJoinTeamDetails) class DomainInvitesDeclineRequestToJoinTeamType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DomainInvitesDeclineRequestToJoinTeamType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DomainInvitesDeclineRequestToJoinTeamType(description={!r})'.format( - self._description_value, - ) - DomainInvitesDeclineRequestToJoinTeamType_validator = bv.Struct(DomainInvitesDeclineRequestToJoinTeamType) class DomainInvitesEmailExistingUsersDetails(bb.Struct): @@ -9698,9 +5213,7 @@ class DomainInvitesEmailExistingUsersDetails(bb.Struct): __slots__ = [ '_domain_name_value', - '_domain_name_present', '_num_recipients_value', - '_num_recipients_present', ] _has_required_fields = True @@ -9708,117 +5221,44 @@ class DomainInvitesEmailExistingUsersDetails(bb.Struct): 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 + self._domain_name_value = bb.NOT_SET + self._num_recipients_value = bb.NOT_SET 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: 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: int - """ - if self._num_recipients_present: - return self._num_recipients_value - else: - raise AttributeError("missing required field 'num_recipients'") + # Instance attribute type: str (validator is set below) + domain_name = bb.Attribute("domain_name") - @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 + # Instance attribute type: int (validator is set below) + num_recipients = bb.Attribute("num_recipients") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DomainInvitesEmailExistingUsersDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 DomainInvitesEmailExistingUsersType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DomainInvitesEmailExistingUsersType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DomainInvitesEmailExistingUsersType(description={!r})'.format( - self._description_value, - ) - DomainInvitesEmailExistingUsersType_validator = bv.Struct(DomainInvitesEmailExistingUsersType) class DomainInvitesRequestToJoinTeamDetails(bb.Struct): @@ -9837,56 +5277,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DomainInvitesRequestToJoinTeamDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DomainInvitesRequestToJoinTeamDetails()' - DomainInvitesRequestToJoinTeamDetails_validator = bv.Struct(DomainInvitesRequestToJoinTeamDetails) class DomainInvitesRequestToJoinTeamType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DomainInvitesRequestToJoinTeamType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DomainInvitesRequestToJoinTeamType(description={!r})'.format( - self._description_value, - ) - DomainInvitesRequestToJoinTeamType_validator = bv.Struct(DomainInvitesRequestToJoinTeamType) class DomainInvitesSetInviteNewUserPrefToNoDetails(bb.Struct): @@ -9905,56 +5317,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DomainInvitesSetInviteNewUserPrefToNoDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DomainInvitesSetInviteNewUserPrefToNoDetails()' - DomainInvitesSetInviteNewUserPrefToNoDetails_validator = bv.Struct(DomainInvitesSetInviteNewUserPrefToNoDetails) class DomainInvitesSetInviteNewUserPrefToNoType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DomainInvitesSetInviteNewUserPrefToNoType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DomainInvitesSetInviteNewUserPrefToNoType(description={!r})'.format( - self._description_value, - ) - DomainInvitesSetInviteNewUserPrefToNoType_validator = bv.Struct(DomainInvitesSetInviteNewUserPrefToNoType) class DomainInvitesSetInviteNewUserPrefToYesDetails(bb.Struct): @@ -9973,56 +5357,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DomainInvitesSetInviteNewUserPrefToYesDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DomainInvitesSetInviteNewUserPrefToYesDetails()' - DomainInvitesSetInviteNewUserPrefToYesDetails_validator = bv.Struct(DomainInvitesSetInviteNewUserPrefToYesDetails) class DomainInvitesSetInviteNewUserPrefToYesType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DomainInvitesSetInviteNewUserPrefToYesType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DomainInvitesSetInviteNewUserPrefToYesType(description={!r})'.format( - self._description_value, - ) - DomainInvitesSetInviteNewUserPrefToYesType_validator = bv.Struct(DomainInvitesSetInviteNewUserPrefToYesType) class DomainVerificationAddDomainFailDetails(bb.Struct): @@ -10038,9 +5394,7 @@ class DomainVerificationAddDomainFailDetails(bb.Struct): __slots__ = [ '_domain_name_value', - '_domain_name_present', '_verification_method_value', - '_verification_method_present', ] _has_required_fields = True @@ -10048,121 +5402,44 @@ class DomainVerificationAddDomainFailDetails(bb.Struct): 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 + self._domain_name_value = bb.NOT_SET + self._verification_method_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + domain_name = bb.Attribute("domain_name") - @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 + # Instance attribute type: str (validator is set below) + verification_method = bb.Attribute("verification_method", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DomainVerificationAddDomainFailDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 DomainVerificationAddDomainFailType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DomainVerificationAddDomainFailType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DomainVerificationAddDomainFailType(description={!r})'.format( - self._description_value, - ) - DomainVerificationAddDomainFailType_validator = bv.Struct(DomainVerificationAddDomainFailType) class DomainVerificationAddDomainSuccessDetails(bb.Struct): @@ -10179,9 +5456,7 @@ class DomainVerificationAddDomainSuccessDetails(bb.Struct): __slots__ = [ '_domain_names_value', - '_domain_names_present', '_verification_method_value', - '_verification_method_present', ] _has_required_fields = True @@ -10189,121 +5464,44 @@ class DomainVerificationAddDomainSuccessDetails(bb.Struct): 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 + self._domain_names_value = bb.NOT_SET + self._verification_method_value = bb.NOT_SET 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. + # Instance attribute type: list of [str] (validator is set below) + domain_names = bb.Attribute("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 + # Instance attribute type: str (validator is set below) + verification_method = bb.Attribute("verification_method", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DomainVerificationAddDomainSuccessDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 DomainVerificationAddDomainSuccessType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DomainVerificationAddDomainSuccessType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DomainVerificationAddDomainSuccessType(description={!r})'.format( - self._description_value, - ) - DomainVerificationAddDomainSuccessType_validator = bv.Struct(DomainVerificationAddDomainSuccessType) class DomainVerificationRemoveDomainDetails(bb.Struct): @@ -10316,96 +5514,44 @@ class DomainVerificationRemoveDomainDetails(bb.Struct): __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 + self._domain_names_value = bb.NOT_SET 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 + # Instance attribute type: list of [str] (validator is set below) + domain_names = bb.Attribute("domain_names") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DomainVerificationRemoveDomainDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DomainVerificationRemoveDomainDetails(domain_names={!r})'.format( - self._domain_names_value, - ) - DomainVerificationRemoveDomainDetails_validator = bv.Struct(DomainVerificationRemoveDomainDetails) class DomainVerificationRemoveDomainType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DomainVerificationRemoveDomainType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DomainVerificationRemoveDomainType(description={!r})'.format( - self._description_value, - ) - DomainVerificationRemoveDomainType_validator = bv.Struct(DomainVerificationRemoveDomainType) class DownloadPolicyType(bb.Union): @@ -10452,9 +5598,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(DownloadPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DownloadPolicyType(%r, %r)' % (self._tag, self._value) - DownloadPolicyType_validator = bv.Union(DownloadPolicyType) class DropboxPasswordsExportedDetails(bb.Struct): @@ -10467,96 +5610,44 @@ class DropboxPasswordsExportedDetails(bb.Struct): __slots__ = [ '_platform_value', - '_platform_present', ] _has_required_fields = True def __init__(self, platform=None): - self._platform_value = None - self._platform_present = False + self._platform_value = bb.NOT_SET if platform is not None: self.platform = platform - @property - def platform(self): - """ - The platform the device runs export. - - :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 + # Instance attribute type: str (validator is set below) + platform = bb.Attribute("platform") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DropboxPasswordsExportedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DropboxPasswordsExportedDetails(platform={!r})'.format( - self._platform_value, - ) - DropboxPasswordsExportedDetails_validator = bv.Struct(DropboxPasswordsExportedDetails) class DropboxPasswordsExportedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DropboxPasswordsExportedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DropboxPasswordsExportedType(description={!r})'.format( - self._description_value, - ) - DropboxPasswordsExportedType_validator = bv.Struct(DropboxPasswordsExportedType) class DropboxPasswordsNewDeviceEnrolledDetails(bb.Struct): @@ -10571,9 +5662,7 @@ class DropboxPasswordsNewDeviceEnrolledDetails(bb.Struct): __slots__ = [ '_is_first_device_value', - '_is_first_device_present', '_platform_value', - '_platform_present', ] _has_required_fields = True @@ -10581,117 +5670,44 @@ class DropboxPasswordsNewDeviceEnrolledDetails(bb.Struct): def __init__(self, is_first_device=None, platform=None): - self._is_first_device_value = None - self._is_first_device_present = False - self._platform_value = None - self._platform_present = False + self._is_first_device_value = bb.NOT_SET + self._platform_value = bb.NOT_SET if is_first_device is not None: self.is_first_device = is_first_device if platform is not None: self.platform = platform - @property - def is_first_device(self): - """ - Whether it's a first device enrolled. + # Instance attribute type: bool (validator is set below) + is_first_device = bb.Attribute("is_first_device") - :rtype: bool - """ - if self._is_first_device_present: - return self._is_first_device_value - else: - raise AttributeError("missing required field 'is_first_device'") - - @is_first_device.setter - def is_first_device(self, val): - val = self._is_first_device_validator.validate(val) - self._is_first_device_value = val - self._is_first_device_present = True - - @is_first_device.deleter - def is_first_device(self): - self._is_first_device_value = None - self._is_first_device_present = False - - @property - def platform(self): - """ - The platform the device is enrolled. - - :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 + # Instance attribute type: str (validator is set below) + platform = bb.Attribute("platform") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DropboxPasswordsNewDeviceEnrolledDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DropboxPasswordsNewDeviceEnrolledDetails(is_first_device={!r}, platform={!r})'.format( - self._is_first_device_value, - self._platform_value, - ) - DropboxPasswordsNewDeviceEnrolledDetails_validator = bv.Struct(DropboxPasswordsNewDeviceEnrolledDetails) class DropboxPasswordsNewDeviceEnrolledType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DropboxPasswordsNewDeviceEnrolledType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DropboxPasswordsNewDeviceEnrolledType(description={!r})'.format( - self._description_value, - ) - DropboxPasswordsNewDeviceEnrolledType_validator = bv.Struct(DropboxPasswordsNewDeviceEnrolledType) class DurationLogInfo(bb.Struct): @@ -10704,9 +5720,7 @@ class DurationLogInfo(bb.Struct): __slots__ = [ '_unit_value', - '_unit_present', '_amount_value', - '_amount_present', ] _has_required_fields = True @@ -10714,70 +5728,22 @@ class DurationLogInfo(bb.Struct): def __init__(self, unit=None, amount=None): - self._unit_value = None - self._unit_present = False - self._amount_value = None - self._amount_present = False + self._unit_value = bb.NOT_SET + self._amount_value = bb.NOT_SET 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: int - """ - if self._amount_present: - return self._amount_value - else: - raise AttributeError("missing required field 'amount'") + # Instance attribute type: TimeUnit (validator is set below) + unit = bb.Attribute("unit", user_defined=True) - @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 + # Instance attribute type: int (validator is set below) + amount = bb.Attribute("amount") def _process_custom_annotations(self, annotation_type, field_path, processor): super(DurationLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'DurationLogInfo(unit={!r}, amount={!r})'.format( - self._unit_value, - self._amount_value, - ) - DurationLogInfo_validator = bv.Struct(DurationLogInfo) class EmmAddExceptionDetails(bb.Struct): @@ -10796,56 +5762,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(EmmAddExceptionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EmmAddExceptionDetails()' - EmmAddExceptionDetails_validator = bv.Struct(EmmAddExceptionDetails) class EmmAddExceptionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(EmmAddExceptionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EmmAddExceptionType(description={!r})'.format( - self._description_value, - ) - EmmAddExceptionType_validator = bv.Struct(EmmAddExceptionType) class EmmChangePolicyDetails(bb.Struct): @@ -10860,9 +5798,7 @@ class EmmChangePolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -10870,121 +5806,44 @@ class EmmChangePolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 - """ - 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 - """ - 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 + # Instance attribute type: team_policies.EmmState (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False + # Instance attribute type: team_policies.EmmState (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(EmmChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 EmmChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(EmmChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EmmChangePolicyType(description={!r})'.format( - self._description_value, - ) - EmmChangePolicyType_validator = bv.Struct(EmmChangePolicyType) class EmmCreateExceptionsReportDetails(bb.Struct): @@ -11003,56 +5862,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(EmmCreateExceptionsReportDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EmmCreateExceptionsReportDetails()' - EmmCreateExceptionsReportDetails_validator = bv.Struct(EmmCreateExceptionsReportDetails) class EmmCreateExceptionsReportType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(EmmCreateExceptionsReportType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EmmCreateExceptionsReportType(description={!r})'.format( - self._description_value, - ) - EmmCreateExceptionsReportType_validator = bv.Struct(EmmCreateExceptionsReportType) class EmmCreateUsageReportDetails(bb.Struct): @@ -11071,56 +5902,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(EmmCreateUsageReportDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EmmCreateUsageReportDetails()' - EmmCreateUsageReportDetails_validator = bv.Struct(EmmCreateUsageReportDetails) class EmmCreateUsageReportType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(EmmCreateUsageReportType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EmmCreateUsageReportType(description={!r})'.format( - self._description_value, - ) - EmmCreateUsageReportType_validator = bv.Struct(EmmCreateUsageReportType) class EmmErrorDetails(bb.Struct): @@ -11132,96 +5935,44 @@ class EmmErrorDetails(bb.Struct): __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 + self._error_details_value = bb.NOT_SET if error_details is not None: self.error_details = error_details - @property - def error_details(self): - """ - Error 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 + # Instance attribute type: FailureDetailsLogInfo (validator is set below) + error_details = bb.Attribute("error_details", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(EmmErrorDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EmmErrorDetails(error_details={!r})'.format( - self._error_details_value, - ) - EmmErrorDetails_validator = bv.Struct(EmmErrorDetails) class EmmErrorType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(EmmErrorType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EmmErrorType(description={!r})'.format( - self._description_value, - ) - EmmErrorType_validator = bv.Struct(EmmErrorType) class EmmRefreshAuthTokenDetails(bb.Struct): @@ -11240,56 +5991,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(EmmRefreshAuthTokenDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EmmRefreshAuthTokenDetails()' - EmmRefreshAuthTokenDetails_validator = bv.Struct(EmmRefreshAuthTokenDetails) class EmmRefreshAuthTokenType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(EmmRefreshAuthTokenType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EmmRefreshAuthTokenType(description={!r})'.format( - self._description_value, - ) - EmmRefreshAuthTokenType_validator = bv.Struct(EmmRefreshAuthTokenType) class EmmRemoveExceptionDetails(bb.Struct): @@ -11308,56 +6031,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(EmmRemoveExceptionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EmmRemoveExceptionDetails()' - EmmRemoveExceptionDetails_validator = bv.Struct(EmmRemoveExceptionDetails) class EmmRemoveExceptionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(EmmRemoveExceptionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EmmRemoveExceptionType(description={!r})'.format( - self._description_value, - ) - EmmRemoveExceptionType_validator = bv.Struct(EmmRemoveExceptionType) class EnabledDomainInvitesDetails(bb.Struct): @@ -11376,56 +6071,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(EnabledDomainInvitesDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EnabledDomainInvitesDetails()' - EnabledDomainInvitesDetails_validator = bv.Struct(EnabledDomainInvitesDetails) class EnabledDomainInvitesType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(EnabledDomainInvitesType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EnabledDomainInvitesType(description={!r})'.format( - self._description_value, - ) - EnabledDomainInvitesType_validator = bv.Struct(EnabledDomainInvitesType) class EndedEnterpriseAdminSessionDeprecatedDetails(bb.Struct): @@ -11439,96 +6106,44 @@ class EndedEnterpriseAdminSessionDeprecatedDetails(bb.Struct): __slots__ = [ '_federation_extra_details_value', - '_federation_extra_details_present', ] _has_required_fields = True def __init__(self, federation_extra_details=None): - self._federation_extra_details_value = None - self._federation_extra_details_present = False + self._federation_extra_details_value = bb.NOT_SET if federation_extra_details is not None: self.federation_extra_details = federation_extra_details - @property - def federation_extra_details(self): - """ - More information about the organization or team. - - :rtype: FedExtraDetails - """ - if self._federation_extra_details_present: - return self._federation_extra_details_value - else: - raise AttributeError("missing required field 'federation_extra_details'") - - @federation_extra_details.setter - def federation_extra_details(self, val): - self._federation_extra_details_validator.validate_type_only(val) - self._federation_extra_details_value = val - self._federation_extra_details_present = True - - @federation_extra_details.deleter - def federation_extra_details(self): - self._federation_extra_details_value = None - self._federation_extra_details_present = False + # Instance attribute type: FedExtraDetails (validator is set below) + federation_extra_details = bb.Attribute("federation_extra_details", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(EndedEnterpriseAdminSessionDeprecatedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EndedEnterpriseAdminSessionDeprecatedDetails(federation_extra_details={!r})'.format( - self._federation_extra_details_value, - ) - EndedEnterpriseAdminSessionDeprecatedDetails_validator = bv.Struct(EndedEnterpriseAdminSessionDeprecatedDetails) class EndedEnterpriseAdminSessionDeprecatedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(EndedEnterpriseAdminSessionDeprecatedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EndedEnterpriseAdminSessionDeprecatedType(description={!r})'.format( - self._description_value, - ) - EndedEnterpriseAdminSessionDeprecatedType_validator = bv.Struct(EndedEnterpriseAdminSessionDeprecatedType) class EndedEnterpriseAdminSessionDetails(bb.Struct): @@ -11547,56 +6162,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(EndedEnterpriseAdminSessionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EndedEnterpriseAdminSessionDetails()' - EndedEnterpriseAdminSessionDetails_validator = bv.Struct(EndedEnterpriseAdminSessionDetails) class EndedEnterpriseAdminSessionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(EndedEnterpriseAdminSessionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EndedEnterpriseAdminSessionType(description={!r})'.format( - self._description_value, - ) - EndedEnterpriseAdminSessionType_validator = bv.Struct(EndedEnterpriseAdminSessionType) class EnterpriseSettingsLockingDetails(bb.Struct): @@ -11617,13 +6204,9 @@ class EnterpriseSettingsLockingDetails(bb.Struct): __slots__ = [ '_team_name_value', - '_team_name_present', '_settings_page_name_value', - '_settings_page_name_present', '_previous_settings_page_locking_state_value', - '_previous_settings_page_locking_state_present', '_new_settings_page_locking_state_value', - '_new_settings_page_locking_state_present', ] _has_required_fields = True @@ -11633,14 +6216,10 @@ def __init__(self, settings_page_name=None, previous_settings_page_locking_state=None, new_settings_page_locking_state=None): - self._team_name_value = None - self._team_name_present = False - self._settings_page_name_value = None - self._settings_page_name_present = False - self._previous_settings_page_locking_state_value = None - self._previous_settings_page_locking_state_present = False - self._new_settings_page_locking_state_value = None - self._new_settings_page_locking_state_present = False + self._team_name_value = bb.NOT_SET + self._settings_page_name_value = bb.NOT_SET + self._previous_settings_page_locking_state_value = bb.NOT_SET + self._new_settings_page_locking_state_value = bb.NOT_SET if team_name is not None: self.team_name = team_name if settings_page_name is not None: @@ -11650,156 +6229,43 @@ def __init__(self, if new_settings_page_locking_state is not None: self.new_settings_page_locking_state = new_settings_page_locking_state - @property - def team_name(self): - """ - The secondary 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 - - @property - def settings_page_name(self): - """ - Settings page name. - - :rtype: str - """ - if self._settings_page_name_present: - return self._settings_page_name_value - else: - raise AttributeError("missing required field 'settings_page_name'") - - @settings_page_name.setter - def settings_page_name(self, val): - val = self._settings_page_name_validator.validate(val) - self._settings_page_name_value = val - self._settings_page_name_present = True - - @settings_page_name.deleter - def settings_page_name(self): - self._settings_page_name_value = None - self._settings_page_name_present = False - - @property - def previous_settings_page_locking_state(self): - """ - Previous locked settings page state. - - :rtype: str - """ - if self._previous_settings_page_locking_state_present: - return self._previous_settings_page_locking_state_value - else: - raise AttributeError("missing required field 'previous_settings_page_locking_state'") + # Instance attribute type: str (validator is set below) + team_name = bb.Attribute("team_name") - @previous_settings_page_locking_state.setter - def previous_settings_page_locking_state(self, val): - val = self._previous_settings_page_locking_state_validator.validate(val) - self._previous_settings_page_locking_state_value = val - self._previous_settings_page_locking_state_present = True + # Instance attribute type: str (validator is set below) + settings_page_name = bb.Attribute("settings_page_name") - @previous_settings_page_locking_state.deleter - def previous_settings_page_locking_state(self): - self._previous_settings_page_locking_state_value = None - self._previous_settings_page_locking_state_present = False + # Instance attribute type: str (validator is set below) + previous_settings_page_locking_state = bb.Attribute("previous_settings_page_locking_state") - @property - def new_settings_page_locking_state(self): - """ - New locked settings page state. - - :rtype: str - """ - if self._new_settings_page_locking_state_present: - return self._new_settings_page_locking_state_value - else: - raise AttributeError("missing required field 'new_settings_page_locking_state'") - - @new_settings_page_locking_state.setter - def new_settings_page_locking_state(self, val): - val = self._new_settings_page_locking_state_validator.validate(val) - self._new_settings_page_locking_state_value = val - self._new_settings_page_locking_state_present = True - - @new_settings_page_locking_state.deleter - def new_settings_page_locking_state(self): - self._new_settings_page_locking_state_value = None - self._new_settings_page_locking_state_present = False + # Instance attribute type: str (validator is set below) + new_settings_page_locking_state = bb.Attribute("new_settings_page_locking_state") def _process_custom_annotations(self, annotation_type, field_path, processor): super(EnterpriseSettingsLockingDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EnterpriseSettingsLockingDetails(team_name={!r}, settings_page_name={!r}, previous_settings_page_locking_state={!r}, new_settings_page_locking_state={!r})'.format( - self._team_name_value, - self._settings_page_name_value, - self._previous_settings_page_locking_state_value, - self._new_settings_page_locking_state_value, - ) - EnterpriseSettingsLockingDetails_validator = bv.Struct(EnterpriseSettingsLockingDetails) class EnterpriseSettingsLockingType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(EnterpriseSettingsLockingType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EnterpriseSettingsLockingType(description={!r})'.format( - self._description_value, - ) - EnterpriseSettingsLockingType_validator = bv.Struct(EnterpriseSettingsLockingType) class EventCategory(bb.Union): @@ -12091,9 +6557,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(EventCategory, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EventCategory(%r, %r)' % (self._tag, self._value) - EventCategory_validator = bv.Union(EventCategory) class EventDetails(bb.Union): @@ -25230,9 +19693,6 @@ def get_missing_details(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(EventDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EventDetails(%r, %r)' % (self._tag, self._value) - EventDetails_validator = bv.Union(EventDetails) class EventType(bb.Union): @@ -40360,9 +34820,6 @@ def get_team_merge_request_sent_shown_to_secondary_team(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(EventType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EventType(%r, %r)' % (self._tag, self._value) - EventType_validator = bv.Union(EventType) class EventTypeArg(bb.Union): @@ -45807,9 +40264,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(EventTypeArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EventTypeArg(%r, %r)' % (self._tag, self._value) - EventTypeArg_validator = bv.Union(EventTypeArg) class ExportMembersReportDetails(bb.Struct): @@ -45828,9 +40282,6 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExportMembersReportDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExportMembersReportDetails()' - ExportMembersReportDetails_validator = bv.Struct(ExportMembersReportDetails) class ExportMembersReportFailDetails(bb.Struct): @@ -45843,143 +40294,66 @@ class ExportMembersReportFailDetails(bb.Struct): __slots__ = [ '_failure_reason_value', - '_failure_reason_present', ] _has_required_fields = True def __init__(self, failure_reason=None): - self._failure_reason_value = None - self._failure_reason_present = False + self._failure_reason_value = bb.NOT_SET if failure_reason is not None: self.failure_reason = failure_reason - @property - def failure_reason(self): - """ - Failure reason. - - :rtype: team.TeamReportFailureReason - """ - if self._failure_reason_present: - return self._failure_reason_value - else: - raise AttributeError("missing required field 'failure_reason'") - - @failure_reason.setter - def failure_reason(self, val): - self._failure_reason_validator.validate_type_only(val) - self._failure_reason_value = val - self._failure_reason_present = True - - @failure_reason.deleter - def failure_reason(self): - self._failure_reason_value = None - self._failure_reason_present = False + # Instance attribute type: team.TeamReportFailureReason (validator is set below) + failure_reason = bb.Attribute("failure_reason", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExportMembersReportFailDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExportMembersReportFailDetails(failure_reason={!r})'.format( - self._failure_reason_value, - ) - ExportMembersReportFailDetails_validator = bv.Struct(ExportMembersReportFailDetails) class ExportMembersReportFailType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExportMembersReportFailType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExportMembersReportFailType(description={!r})'.format( - self._description_value, - ) - ExportMembersReportFailType_validator = bv.Struct(ExportMembersReportFailType) class ExportMembersReportType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExportMembersReportType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExportMembersReportType(description={!r})'.format( - self._description_value, - ) - ExportMembersReportType_validator = bv.Struct(ExportMembersReportType) class ExtendedVersionHistoryChangePolicyDetails(bb.Struct): @@ -45995,9 +40369,7 @@ class ExtendedVersionHistoryChangePolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -46005,121 +40377,44 @@ class ExtendedVersionHistoryChangePolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: ExtendedVersionHistoryPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False + # Instance attribute type: ExtendedVersionHistoryPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExtendedVersionHistoryChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 ExtendedVersionHistoryChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExtendedVersionHistoryChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExtendedVersionHistoryChangePolicyType(description={!r})'.format( - self._description_value, - ) - ExtendedVersionHistoryChangePolicyType_validator = bv.Struct(ExtendedVersionHistoryChangePolicyType) class ExtendedVersionHistoryPolicy(bb.Union): @@ -46184,9 +40479,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExtendedVersionHistoryPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExtendedVersionHistoryPolicy(%r, %r)' % (self._tag, self._value) - ExtendedVersionHistoryPolicy_validator = bv.Union(ExtendedVersionHistoryPolicy) class ExternalSharingCreateReportDetails(bb.Struct): @@ -46205,56 +40497,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExternalSharingCreateReportDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExternalSharingCreateReportDetails()' - ExternalSharingCreateReportDetails_validator = bv.Struct(ExternalSharingCreateReportDetails) class ExternalSharingCreateReportType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExternalSharingCreateReportType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExternalSharingCreateReportType(description={!r})'.format( - self._description_value, - ) - ExternalSharingCreateReportType_validator = bv.Struct(ExternalSharingCreateReportType) class ExternalSharingReportFailedDetails(bb.Struct): @@ -46267,96 +40531,44 @@ class ExternalSharingReportFailedDetails(bb.Struct): __slots__ = [ '_failure_reason_value', - '_failure_reason_present', ] _has_required_fields = True def __init__(self, failure_reason=None): - self._failure_reason_value = None - self._failure_reason_present = False + self._failure_reason_value = bb.NOT_SET if failure_reason is not None: self.failure_reason = failure_reason - @property - def failure_reason(self): - """ - Failure reason. - - :rtype: team.TeamReportFailureReason - """ - if self._failure_reason_present: - return self._failure_reason_value - else: - raise AttributeError("missing required field 'failure_reason'") - - @failure_reason.setter - def failure_reason(self, val): - self._failure_reason_validator.validate_type_only(val) - self._failure_reason_value = val - self._failure_reason_present = True - - @failure_reason.deleter - def failure_reason(self): - self._failure_reason_value = None - self._failure_reason_present = False + # Instance attribute type: team.TeamReportFailureReason (validator is set below) + failure_reason = bb.Attribute("failure_reason", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExternalSharingReportFailedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExternalSharingReportFailedDetails(failure_reason={!r})'.format( - self._failure_reason_value, - ) - ExternalSharingReportFailedDetails_validator = bv.Struct(ExternalSharingReportFailedDetails) class ExternalSharingReportFailedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExternalSharingReportFailedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExternalSharingReportFailedType(description={!r})'.format( - self._description_value, - ) - ExternalSharingReportFailedType_validator = bv.Struct(ExternalSharingReportFailedType) class ExternalUserLogInfo(bb.Struct): @@ -46370,9 +40582,7 @@ class ExternalUserLogInfo(bb.Struct): __slots__ = [ '_user_identifier_value', - '_user_identifier_present', '_identifier_type_value', - '_identifier_type_present', ] _has_required_fields = True @@ -46380,70 +40590,22 @@ class ExternalUserLogInfo(bb.Struct): def __init__(self, user_identifier=None, identifier_type=None): - self._user_identifier_value = None - self._user_identifier_present = False - self._identifier_type_value = None - self._identifier_type_present = False + self._user_identifier_value = bb.NOT_SET + self._identifier_type_value = bb.NOT_SET if user_identifier is not None: self.user_identifier = user_identifier if identifier_type is not None: self.identifier_type = identifier_type - @property - def user_identifier(self): - """ - An external user identifier. - - :rtype: str - """ - if self._user_identifier_present: - return self._user_identifier_value - else: - raise AttributeError("missing required field 'user_identifier'") + # Instance attribute type: str (validator is set below) + user_identifier = bb.Attribute("user_identifier") - @user_identifier.setter - def user_identifier(self, val): - val = self._user_identifier_validator.validate(val) - self._user_identifier_value = val - self._user_identifier_present = True - - @user_identifier.deleter - def user_identifier(self): - self._user_identifier_value = None - self._user_identifier_present = False - - @property - def identifier_type(self): - """ - Identifier type. - - :rtype: IdentifierType - """ - if self._identifier_type_present: - return self._identifier_type_value - else: - raise AttributeError("missing required field 'identifier_type'") - - @identifier_type.setter - def identifier_type(self, val): - self._identifier_type_validator.validate_type_only(val) - self._identifier_type_value = val - self._identifier_type_present = True - - @identifier_type.deleter - def identifier_type(self): - self._identifier_type_value = None - self._identifier_type_present = False + # Instance attribute type: IdentifierType (validator is set below) + identifier_type = bb.Attribute("identifier_type", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExternalUserLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ExternalUserLogInfo(user_identifier={!r}, identifier_type={!r})'.format( - self._user_identifier_value, - self._identifier_type_value, - ) - ExternalUserLogInfo_validator = bv.Struct(ExternalUserLogInfo) class FailureDetailsLogInfo(bb.Struct): @@ -46458,9 +40620,7 @@ class FailureDetailsLogInfo(bb.Struct): __slots__ = [ '_user_friendly_message_value', - '_user_friendly_message_present', '_technical_error_message_value', - '_technical_error_message_present', ] _has_required_fields = False @@ -46468,77 +40628,22 @@ class FailureDetailsLogInfo(bb.Struct): 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 + self._user_friendly_message_value = bb.NOT_SET + self._technical_error_message_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + user_friendly_message = bb.Attribute("user_friendly_message", nullable=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 + # Instance attribute type: str (validator is set below) + technical_error_message = bb.Attribute("technical_error_message", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FailureDetailsLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 FedAdminRole(bb.Union): @@ -46583,9 +40688,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FedAdminRole, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FedAdminRole(%r, %r)' % (self._tag, self._value) - FedAdminRole_validator = bv.Union(FedAdminRole) class FedExtraDetails(bb.Union): @@ -46678,9 +40780,6 @@ def get_team(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FedExtraDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FedExtraDetails(%r, %r)' % (self._tag, self._value) - FedExtraDetails_validator = bv.Union(FedExtraDetails) class FedHandshakeAction(bb.Union): @@ -46765,9 +40864,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FedHandshakeAction, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FedHandshakeAction(%r, %r)' % (self._tag, self._value) - FedHandshakeAction_validator = bv.Union(FedHandshakeAction) class FederationStatusChangeAdditionalInfo(bb.Union): @@ -46897,9 +40993,6 @@ def get_organization_name(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FederationStatusChangeAdditionalInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FederationStatusChangeAdditionalInfo(%r, %r)' % (self._tag, self._value) - FederationStatusChangeAdditionalInfo_validator = bv.Union(FederationStatusChangeAdditionalInfo) class FileAddCommentDetails(bb.Struct): @@ -46912,99 +41005,44 @@ class FileAddCommentDetails(bb.Struct): __slots__ = [ '_comment_text_value', - '_comment_text_present', ] _has_required_fields = False def __init__(self, comment_text=None): - self._comment_text_value = None - self._comment_text_present = False + self._comment_text_value = bb.NOT_SET if comment_text is not None: self.comment_text = comment_text - @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 + # Instance attribute type: str (validator is set below) + comment_text = bb.Attribute("comment_text", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileAddCommentDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileAddCommentDetails(comment_text={!r})'.format( - self._comment_text_value, - ) - FileAddCommentDetails_validator = bv.Struct(FileAddCommentDetails) class FileAddCommentType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileAddCommentType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileAddCommentType(description={!r})'.format( - self._description_value, - ) - FileAddCommentType_validator = bv.Struct(FileAddCommentType) class FileAddDetails(bb.Struct): @@ -47023,56 +41061,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileAddDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileAddDetails()' - FileAddDetails_validator = bv.Struct(FileAddDetails) class FileAddType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileAddType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileAddType(description={!r})'.format( - self._description_value, - ) - FileAddType_validator = bv.Struct(FileAddType) class FileChangeCommentSubscriptionDetails(bb.Struct): @@ -47087,9 +41097,7 @@ class FileChangeCommentSubscriptionDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -47097,121 +41105,44 @@ class FileChangeCommentSubscriptionDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 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 + # Instance attribute type: FileCommentNotificationPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @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 + # Instance attribute type: FileCommentNotificationPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileChangeCommentSubscriptionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileChangeCommentSubscriptionDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - FileChangeCommentSubscriptionDetails_validator = bv.Struct(FileChangeCommentSubscriptionDetails) class FileChangeCommentSubscriptionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileChangeCommentSubscriptionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileChangeCommentSubscriptionType(description={!r})'.format( - self._description_value, - ) - FileChangeCommentSubscriptionType_validator = bv.Struct(FileChangeCommentSubscriptionType) class FileCommentNotificationPolicy(bb.Union): @@ -47258,9 +41189,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileCommentNotificationPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileCommentNotificationPolicy(%r, %r)' % (self._tag, self._value) - FileCommentNotificationPolicy_validator = bv.Union(FileCommentNotificationPolicy) class FileCommentsChangePolicyDetails(bb.Struct): @@ -47276,9 +41204,7 @@ class FileCommentsChangePolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -47286,121 +41212,44 @@ class FileCommentsChangePolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: FileCommentsPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=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 + # Instance attribute type: FileCommentsPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileCommentsChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 FileCommentsChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileCommentsChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileCommentsChangePolicyType(description={!r})'.format( - self._description_value, - ) - FileCommentsChangePolicyType_validator = bv.Struct(FileCommentsChangePolicyType) class FileCommentsPolicy(bb.Union): @@ -47447,9 +41296,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileCommentsPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileCommentsPolicy(%r, %r)' % (self._tag, self._value) - FileCommentsPolicy_validator = bv.Union(FileCommentsPolicy) class FileCopyDetails(bb.Struct): @@ -47462,96 +41308,44 @@ class FileCopyDetails(bb.Struct): __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 + self._relocate_action_details_value = bb.NOT_SET 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 + # Instance attribute type: list of [RelocateAssetReferencesLogInfo] (validator is set below) + relocate_action_details = bb.Attribute("relocate_action_details") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileCopyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileCopyDetails(relocate_action_details={!r})'.format( - self._relocate_action_details_value, - ) - FileCopyDetails_validator = bv.Struct(FileCopyDetails) class FileCopyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileCopyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileCopyType(description={!r})'.format( - self._description_value, - ) - FileCopyType_validator = bv.Struct(FileCopyType) class FileDeleteCommentDetails(bb.Struct): @@ -47564,99 +41358,44 @@ class FileDeleteCommentDetails(bb.Struct): __slots__ = [ '_comment_text_value', - '_comment_text_present', ] _has_required_fields = False def __init__(self, comment_text=None): - self._comment_text_value = None - self._comment_text_present = False + self._comment_text_value = bb.NOT_SET if comment_text is not None: self.comment_text = comment_text - @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 + # Instance attribute type: str (validator is set below) + comment_text = bb.Attribute("comment_text", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileDeleteCommentDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileDeleteCommentDetails(comment_text={!r})'.format( - self._comment_text_value, - ) - FileDeleteCommentDetails_validator = bv.Struct(FileDeleteCommentDetails) class FileDeleteCommentType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileDeleteCommentType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileDeleteCommentType(description={!r})'.format( - self._description_value, - ) - FileDeleteCommentType_validator = bv.Struct(FileDeleteCommentType) class FileDeleteDetails(bb.Struct): @@ -47675,56 +41414,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileDeleteDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileDeleteDetails()' - FileDeleteDetails_validator = bv.Struct(FileDeleteDetails) class FileDeleteType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileDeleteType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileDeleteType(description={!r})'.format( - self._description_value, - ) - FileDeleteType_validator = bv.Struct(FileDeleteType) class FileDownloadDetails(bb.Struct): @@ -47743,56 +41454,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileDownloadDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileDownloadDetails()' - FileDownloadDetails_validator = bv.Struct(FileDownloadDetails) class FileDownloadType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileDownloadType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileDownloadType(description={!r})'.format( - self._description_value, - ) - FileDownloadType_validator = bv.Struct(FileDownloadType) class FileEditCommentDetails(bb.Struct): @@ -47807,9 +41490,7 @@ class FileEditCommentDetails(bb.Struct): __slots__ = [ '_comment_text_value', - '_comment_text_present', '_previous_comment_text_value', - '_previous_comment_text_present', ] _has_required_fields = True @@ -47817,120 +41498,44 @@ class FileEditCommentDetails(bb.Struct): def __init__(self, previous_comment_text=None, comment_text=None): - self._comment_text_value = None - self._comment_text_present = False - self._previous_comment_text_value = None - self._previous_comment_text_present = False + self._comment_text_value = bb.NOT_SET + self._previous_comment_text_value = bb.NOT_SET if comment_text is not None: self.comment_text = comment_text if previous_comment_text is not None: self.previous_comment_text = previous_comment_text - @property - def comment_text(self): - """ - Comment text. Might be missing due to historical data gap. + # Instance attribute type: str (validator is set below) + comment_text = bb.Attribute("comment_text", nullable=True) - :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 - - @property - def previous_comment_text(self): - """ - Previous comment text. - - :rtype: str - """ - if self._previous_comment_text_present: - return self._previous_comment_text_value - else: - raise AttributeError("missing required field 'previous_comment_text'") - - @previous_comment_text.setter - def previous_comment_text(self, val): - val = self._previous_comment_text_validator.validate(val) - self._previous_comment_text_value = val - self._previous_comment_text_present = True - - @previous_comment_text.deleter - def previous_comment_text(self): - self._previous_comment_text_value = None - self._previous_comment_text_present = False + # Instance attribute type: str (validator is set below) + previous_comment_text = bb.Attribute("previous_comment_text") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileEditCommentDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileEditCommentDetails(previous_comment_text={!r}, comment_text={!r})'.format( - self._previous_comment_text_value, - self._comment_text_value, - ) - FileEditCommentDetails_validator = bv.Struct(FileEditCommentDetails) class FileEditCommentType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileEditCommentType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileEditCommentType(description={!r})'.format( - self._description_value, - ) - FileEditCommentType_validator = bv.Struct(FileEditCommentType) class FileEditDetails(bb.Struct): @@ -47949,56 +41554,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileEditDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileEditDetails()' - FileEditDetails_validator = bv.Struct(FileEditDetails) class FileEditType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileEditType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileEditType(description={!r})'.format( - self._description_value, - ) - FileEditType_validator = bv.Struct(FileEditType) class FileGetCopyReferenceDetails(bb.Struct): @@ -48017,56 +41594,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileGetCopyReferenceDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileGetCopyReferenceDetails()' - FileGetCopyReferenceDetails_validator = bv.Struct(FileGetCopyReferenceDetails) class FileGetCopyReferenceType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileGetCopyReferenceType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileGetCopyReferenceType(description={!r})'.format( - self._description_value, - ) - FileGetCopyReferenceType_validator = bv.Struct(FileGetCopyReferenceType) class FileLikeCommentDetails(bb.Struct): @@ -48079,99 +41628,44 @@ class FileLikeCommentDetails(bb.Struct): __slots__ = [ '_comment_text_value', - '_comment_text_present', ] _has_required_fields = False def __init__(self, comment_text=None): - self._comment_text_value = None - self._comment_text_present = False + self._comment_text_value = bb.NOT_SET if comment_text is not None: self.comment_text = comment_text - @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 + # Instance attribute type: str (validator is set below) + comment_text = bb.Attribute("comment_text", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileLikeCommentDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileLikeCommentDetails(comment_text={!r})'.format( - self._comment_text_value, - ) - FileLikeCommentDetails_validator = bv.Struct(FileLikeCommentDetails) class FileLikeCommentType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileLikeCommentType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileLikeCommentType(description={!r})'.format( - self._description_value, - ) - FileLikeCommentType_validator = bv.Struct(FileLikeCommentType) class FileLockingLockStatusChangedDetails(bb.Struct): @@ -48186,9 +41680,7 @@ class FileLockingLockStatusChangedDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -48196,117 +41688,44 @@ class FileLockingLockStatusChangedDetails(bb.Struct): 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 + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET 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 lock status of the file. - - :rtype: LockStatus - """ - 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 + # Instance attribute type: LockStatus (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) - @property - def new_value(self): - """ - New lock status of the file. - - :rtype: LockStatus - """ - 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 + # Instance attribute type: LockStatus (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileLockingLockStatusChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileLockingLockStatusChangedDetails(previous_value={!r}, new_value={!r})'.format( - self._previous_value_value, - self._new_value_value, - ) - FileLockingLockStatusChangedDetails_validator = bv.Struct(FileLockingLockStatusChangedDetails) class FileLockingLockStatusChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileLockingLockStatusChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileLockingLockStatusChangedType(description={!r})'.format( - self._description_value, - ) - FileLockingLockStatusChangedType_validator = bv.Struct(FileLockingLockStatusChangedType) class FileLockingPolicyChangedDetails(bb.Struct): @@ -48321,9 +41740,7 @@ class FileLockingPolicyChangedDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -48331,117 +41748,44 @@ class FileLockingPolicyChangedDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 locking policy. - - :rtype: team_policies.FileLockingPolicyState - """ - 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 + # Instance attribute type: team_policies.FileLockingPolicyState (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @property - def previous_value(self): - """ - Previous file locking policy. - - :rtype: team_policies.FileLockingPolicyState - """ - 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 + # Instance attribute type: team_policies.FileLockingPolicyState (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileLockingPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileLockingPolicyChangedDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - FileLockingPolicyChangedDetails_validator = bv.Struct(FileLockingPolicyChangedDetails) class FileLockingPolicyChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileLockingPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileLockingPolicyChangedType(description={!r})'.format( - self._description_value, - ) - FileLockingPolicyChangedType_validator = bv.Struct(FileLockingPolicyChangedType) class FileOrFolderLogInfo(bb.Struct): @@ -48458,13 +41802,9 @@ class FileOrFolderLogInfo(bb.Struct): __slots__ = [ '_path_value', - '_path_present', '_display_name_value', - '_display_name_present', '_file_id_value', - '_file_id_present', '_file_size_value', - '_file_size_present', ] _has_required_fields = True @@ -48474,14 +41814,10 @@ def __init__(self, display_name=None, file_id=None, file_size=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 - self._file_size_value = None - self._file_size_present = False + self._path_value = bb.NOT_SET + self._display_name_value = bb.NOT_SET + self._file_id_value = bb.NOT_SET + self._file_size_value = bb.NOT_SET if path is not None: self.path = path if display_name is not None: @@ -48491,118 +41827,21 @@ def __init__(self, if file_size is not None: self.file_size = file_size - @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 + # Instance attribute type: PathLogInfo (validator is set below) + path = bb.Attribute("path", user_defined=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 + # Instance attribute type: str (validator is set below) + display_name = bb.Attribute("display_name", nullable=True) - @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 + # Instance attribute type: str (validator is set below) + file_id = bb.Attribute("file_id", nullable=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 - - @property - def file_size(self): - """ - File or folder size in bytes. - - :rtype: int - """ - if self._file_size_present: - return self._file_size_value - else: - return None - - @file_size.setter - def file_size(self, val): - if val is None: - del self.file_size - return - val = self._file_size_validator.validate(val) - self._file_size_value = val - self._file_size_present = True - - @file_size.deleter - def file_size(self): - self._file_size_value = None - self._file_size_present = False + # Instance attribute type: int (validator is set below) + file_size = bb.Attribute("file_size", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileOrFolderLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileOrFolderLogInfo(path={!r}, display_name={!r}, file_id={!r}, file_size={!r})'.format( - self._path_value, - self._display_name_value, - self._file_id_value, - self._file_size_value, - ) - FileOrFolderLogInfo_validator = bv.Struct(FileOrFolderLogInfo) class FileLogInfo(FileOrFolderLogInfo): @@ -48628,14 +41867,6 @@ def __init__(self, def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileLogInfo(path={!r}, display_name={!r}, file_id={!r}, file_size={!r})'.format( - self._path_value, - self._display_name_value, - self._file_id_value, - self._file_size_value, - ) - FileLogInfo_validator = bv.Struct(FileLogInfo) class FileMoveDetails(bb.Struct): @@ -48648,96 +41879,44 @@ class FileMoveDetails(bb.Struct): __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 + self._relocate_action_details_value = bb.NOT_SET 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 + # Instance attribute type: list of [RelocateAssetReferencesLogInfo] (validator is set below) + relocate_action_details = bb.Attribute("relocate_action_details") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileMoveDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileMoveDetails(relocate_action_details={!r})'.format( - self._relocate_action_details_value, - ) - FileMoveDetails_validator = bv.Struct(FileMoveDetails) class FileMoveType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileMoveType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileMoveType(description={!r})'.format( - self._description_value, - ) - FileMoveType_validator = bv.Struct(FileMoveType) class FilePermanentlyDeleteDetails(bb.Struct): @@ -48756,56 +41935,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FilePermanentlyDeleteDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FilePermanentlyDeleteDetails()' - FilePermanentlyDeleteDetails_validator = bv.Struct(FilePermanentlyDeleteDetails) class FilePermanentlyDeleteType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FilePermanentlyDeleteType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FilePermanentlyDeleteType(description={!r})'.format( - self._description_value, - ) - FilePermanentlyDeleteType_validator = bv.Struct(FilePermanentlyDeleteType) class FilePreviewDetails(bb.Struct): @@ -48824,56 +41975,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FilePreviewDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FilePreviewDetails()' - FilePreviewDetails_validator = bv.Struct(FilePreviewDetails) class FilePreviewType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FilePreviewType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FilePreviewType(description={!r})'.format( - self._description_value, - ) - FilePreviewType_validator = bv.Struct(FilePreviewType) class FileRenameDetails(bb.Struct): @@ -48886,96 +42009,44 @@ class FileRenameDetails(bb.Struct): __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 + self._relocate_action_details_value = bb.NOT_SET 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 + # Instance attribute type: list of [RelocateAssetReferencesLogInfo] (validator is set below) + relocate_action_details = bb.Attribute("relocate_action_details") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRenameDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRenameDetails(relocate_action_details={!r})'.format( - self._relocate_action_details_value, - ) - FileRenameDetails_validator = bv.Struct(FileRenameDetails) class FileRenameType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRenameType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRenameType(description={!r})'.format( - self._description_value, - ) - FileRenameType_validator = bv.Struct(FileRenameType) class FileRequestChangeDetails(bb.Struct): @@ -48992,11 +42063,8 @@ class FileRequestChangeDetails(bb.Struct): __slots__ = [ '_file_request_id_value', - '_file_request_id_present', '_previous_details_value', - '_previous_details_present', '_new_details_value', - '_new_details_present', ] _has_required_fields = True @@ -49005,12 +42073,9 @@ def __init__(self, new_details=None, file_request_id=None, previous_details=None): - self._file_request_id_value = None - self._file_request_id_present = False - self._previous_details_value = None - self._previous_details_present = False - self._new_details_value = None - self._new_details_present = False + self._file_request_id_value = bb.NOT_SET + self._previous_details_value = bb.NOT_SET + self._new_details_value = bb.NOT_SET if file_request_id is not None: self.file_request_id = file_request_id if previous_details is not None: @@ -49018,139 +42083,40 @@ def __init__(self, if new_details is not None: self.new_details = new_details - @property - def file_request_id(self): - """ - File request id. Might be missing due to historical data gap. - - :rtype: str - """ - if self._file_request_id_present: - return self._file_request_id_value - else: - return None - - @file_request_id.setter - def file_request_id(self, val): - if val is None: - del self.file_request_id - return - val = self._file_request_id_validator.validate(val) - self._file_request_id_value = val - self._file_request_id_present = True - - @file_request_id.deleter - def file_request_id(self): - self._file_request_id_value = None - self._file_request_id_present = False - - @property - def previous_details(self): - """ - Previous file request details. Might be missing due to historical data - gap. - - :rtype: FileRequestDetails - """ - if self._previous_details_present: - return self._previous_details_value - else: - return None - - @previous_details.setter - def previous_details(self, val): - if val is None: - del self.previous_details - return - self._previous_details_validator.validate_type_only(val) - self._previous_details_value = val - self._previous_details_present = True - - @previous_details.deleter - def previous_details(self): - self._previous_details_value = None - self._previous_details_present = False - - @property - def new_details(self): - """ - New file request details. - - :rtype: FileRequestDetails - """ - if self._new_details_present: - return self._new_details_value - else: - raise AttributeError("missing required field 'new_details'") + # Instance attribute type: str (validator is set below) + file_request_id = bb.Attribute("file_request_id", nullable=True) - @new_details.setter - def new_details(self, val): - self._new_details_validator.validate_type_only(val) - self._new_details_value = val - self._new_details_present = True + # Instance attribute type: FileRequestDetails (validator is set below) + previous_details = bb.Attribute("previous_details", nullable=True, user_defined=True) - @new_details.deleter - def new_details(self): - self._new_details_value = None - self._new_details_present = False + # Instance attribute type: FileRequestDetails (validator is set below) + new_details = bb.Attribute("new_details", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequestChangeDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRequestChangeDetails(new_details={!r}, file_request_id={!r}, previous_details={!r})'.format( - self._new_details_value, - self._file_request_id_value, - self._previous_details_value, - ) - FileRequestChangeDetails_validator = bv.Struct(FileRequestChangeDetails) class FileRequestChangeType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequestChangeType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRequestChangeType(description={!r})'.format( - self._description_value, - ) - FileRequestChangeType_validator = bv.Struct(FileRequestChangeType) class FileRequestCloseDetails(bb.Struct): @@ -49165,9 +42131,7 @@ class FileRequestCloseDetails(bb.Struct): __slots__ = [ '_file_request_id_value', - '_file_request_id_present', '_previous_details_value', - '_previous_details_present', ] _has_required_fields = False @@ -49175,124 +42139,44 @@ class FileRequestCloseDetails(bb.Struct): def __init__(self, file_request_id=None, previous_details=None): - self._file_request_id_value = None - self._file_request_id_present = False - self._previous_details_value = None - self._previous_details_present = False + self._file_request_id_value = bb.NOT_SET + self._previous_details_value = bb.NOT_SET if file_request_id is not None: self.file_request_id = file_request_id if previous_details is not None: self.previous_details = previous_details - @property - def file_request_id(self): - """ - File request id. Might be missing due to historical data gap. - - :rtype: str - """ - if self._file_request_id_present: - return self._file_request_id_value - else: - return None - - @file_request_id.setter - def file_request_id(self, val): - if val is None: - del self.file_request_id - return - val = self._file_request_id_validator.validate(val) - self._file_request_id_value = val - self._file_request_id_present = True - - @file_request_id.deleter - def file_request_id(self): - self._file_request_id_value = None - self._file_request_id_present = False - - @property - def previous_details(self): - """ - Previous file request details. Might be missing due to historical data - gap. - - :rtype: FileRequestDetails - """ - if self._previous_details_present: - return self._previous_details_value - else: - return None - - @previous_details.setter - def previous_details(self, val): - if val is None: - del self.previous_details - return - self._previous_details_validator.validate_type_only(val) - self._previous_details_value = val - self._previous_details_present = True + # Instance attribute type: str (validator is set below) + file_request_id = bb.Attribute("file_request_id", nullable=True) - @previous_details.deleter - def previous_details(self): - self._previous_details_value = None - self._previous_details_present = False + # Instance attribute type: FileRequestDetails (validator is set below) + previous_details = bb.Attribute("previous_details", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequestCloseDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRequestCloseDetails(file_request_id={!r}, previous_details={!r})'.format( - self._file_request_id_value, - self._previous_details_value, - ) - FileRequestCloseDetails_validator = bv.Struct(FileRequestCloseDetails) class FileRequestCloseType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequestCloseType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRequestCloseType(description={!r})'.format( - self._description_value, - ) - FileRequestCloseType_validator = bv.Struct(FileRequestCloseType) class FileRequestCreateDetails(bb.Struct): @@ -49307,9 +42191,7 @@ class FileRequestCreateDetails(bb.Struct): __slots__ = [ '_file_request_id_value', - '_file_request_id_present', '_request_details_value', - '_request_details_present', ] _has_required_fields = False @@ -49317,123 +42199,44 @@ class FileRequestCreateDetails(bb.Struct): def __init__(self, file_request_id=None, request_details=None): - self._file_request_id_value = None - self._file_request_id_present = False - self._request_details_value = None - self._request_details_present = False + self._file_request_id_value = bb.NOT_SET + self._request_details_value = bb.NOT_SET if file_request_id is not None: self.file_request_id = file_request_id if request_details is not None: self.request_details = request_details - @property - def file_request_id(self): - """ - File request id. Might be missing due to historical data gap. - - :rtype: str - """ - if self._file_request_id_present: - return self._file_request_id_value - else: - return None - - @file_request_id.setter - def file_request_id(self, val): - if val is None: - del self.file_request_id - return - val = self._file_request_id_validator.validate(val) - self._file_request_id_value = val - self._file_request_id_present = True - - @file_request_id.deleter - def file_request_id(self): - self._file_request_id_value = None - self._file_request_id_present = False - - @property - def request_details(self): - """ - File request details. Might be missing due to historical data gap. - - :rtype: FileRequestDetails - """ - if self._request_details_present: - return self._request_details_value - else: - return None - - @request_details.setter - def request_details(self, val): - if val is None: - del self.request_details - return - self._request_details_validator.validate_type_only(val) - self._request_details_value = val - self._request_details_present = True + # Instance attribute type: str (validator is set below) + file_request_id = bb.Attribute("file_request_id", nullable=True) - @request_details.deleter - def request_details(self): - self._request_details_value = None - self._request_details_present = False + # Instance attribute type: FileRequestDetails (validator is set below) + request_details = bb.Attribute("request_details", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequestCreateDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRequestCreateDetails(file_request_id={!r}, request_details={!r})'.format( - self._file_request_id_value, - self._request_details_value, - ) - FileRequestCreateDetails_validator = bv.Struct(FileRequestCreateDetails) class FileRequestCreateType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequestCreateType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRequestCreateType(description={!r})'.format( - self._description_value, - ) - FileRequestCreateType_validator = bv.Struct(FileRequestCreateType) class FileRequestDeadline(bb.Struct): @@ -49449,9 +42252,7 @@ class FileRequestDeadline(bb.Struct): __slots__ = [ '_deadline_value', - '_deadline_present', '_allow_late_uploads_value', - '_allow_late_uploads_present', ] _has_required_fields = False @@ -49459,78 +42260,22 @@ class FileRequestDeadline(bb.Struct): 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 + self._deadline_value = bb.NOT_SET + self._allow_late_uploads_value = bb.NOT_SET 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. Might be missing due to historical - data gap. - - :rtype: datetime.datetime - """ - 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 - 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. Might be missing - due to historical data gap. - - :rtype: str - """ - 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 - val = self._allow_late_uploads_validator.validate(val) - self._allow_late_uploads_value = val - self._allow_late_uploads_present = True + # Instance attribute type: datetime.datetime (validator is set below) + deadline = bb.Attribute("deadline", nullable=True) - @allow_late_uploads.deleter - def allow_late_uploads(self): - self._allow_late_uploads_value = None - self._allow_late_uploads_present = False + # Instance attribute type: str (validator is set below) + allow_late_uploads = bb.Attribute("allow_late_uploads", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequestDeadline, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 FileRequestDeleteDetails(bb.Struct): @@ -49545,9 +42290,7 @@ class FileRequestDeleteDetails(bb.Struct): __slots__ = [ '_file_request_id_value', - '_file_request_id_present', '_previous_details_value', - '_previous_details_present', ] _has_required_fields = False @@ -49555,124 +42298,44 @@ class FileRequestDeleteDetails(bb.Struct): def __init__(self, file_request_id=None, previous_details=None): - self._file_request_id_value = None - self._file_request_id_present = False - self._previous_details_value = None - self._previous_details_present = False + self._file_request_id_value = bb.NOT_SET + self._previous_details_value = bb.NOT_SET if file_request_id is not None: self.file_request_id = file_request_id if previous_details is not None: self.previous_details = previous_details - @property - def file_request_id(self): - """ - File request id. Might be missing due to historical data gap. - - :rtype: str - """ - if self._file_request_id_present: - return self._file_request_id_value - else: - return None - - @file_request_id.setter - def file_request_id(self, val): - if val is None: - del self.file_request_id - return - val = self._file_request_id_validator.validate(val) - self._file_request_id_value = val - self._file_request_id_present = True - - @file_request_id.deleter - def file_request_id(self): - self._file_request_id_value = None - self._file_request_id_present = False + # Instance attribute type: str (validator is set below) + file_request_id = bb.Attribute("file_request_id", nullable=True) - @property - def previous_details(self): - """ - Previous file request details. Might be missing due to historical data - gap. - - :rtype: FileRequestDetails - """ - if self._previous_details_present: - return self._previous_details_value - else: - return None - - @previous_details.setter - def previous_details(self, val): - if val is None: - del self.previous_details - return - self._previous_details_validator.validate_type_only(val) - self._previous_details_value = val - self._previous_details_present = True - - @previous_details.deleter - def previous_details(self): - self._previous_details_value = None - self._previous_details_present = False + # Instance attribute type: FileRequestDetails (validator is set below) + previous_details = bb.Attribute("previous_details", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequestDeleteDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRequestDeleteDetails(file_request_id={!r}, previous_details={!r})'.format( - self._file_request_id_value, - self._previous_details_value, - ) - FileRequestDeleteDetails_validator = bv.Struct(FileRequestDeleteDetails) class FileRequestDeleteType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequestDeleteType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRequestDeleteType(description={!r})'.format( - self._description_value, - ) - FileRequestDeleteType_validator = bv.Struct(FileRequestDeleteType) class FileRequestDetails(bb.Struct): @@ -49687,9 +42350,7 @@ class FileRequestDetails(bb.Struct): __slots__ = [ '_asset_index_value', - '_asset_index_present', '_deadline_value', - '_deadline_present', ] _has_required_fields = True @@ -49697,73 +42358,22 @@ class FileRequestDetails(bb.Struct): def __init__(self, asset_index=None, deadline=None): - self._asset_index_value = None - self._asset_index_present = False - self._deadline_value = None - self._deadline_present = False + self._asset_index_value = bb.NOT_SET + self._deadline_value = bb.NOT_SET if asset_index is not None: self.asset_index = asset_index if deadline is not None: self.deadline = deadline - @property - def asset_index(self): - """ - Asset position in the Assets list. - - :rtype: int - """ - if self._asset_index_present: - return self._asset_index_value - else: - raise AttributeError("missing required field 'asset_index'") - - @asset_index.setter - def asset_index(self, val): - val = self._asset_index_validator.validate(val) - self._asset_index_value = val - self._asset_index_present = True - - @asset_index.deleter - def asset_index(self): - self._asset_index_value = None - self._asset_index_present = False - - @property - def deadline(self): - """ - File request deadline. Might be missing due to historical data gap. - - :rtype: FileRequestDeadline - """ - if self._deadline_present: - return self._deadline_value - else: - return None + # Instance attribute type: int (validator is set below) + asset_index = bb.Attribute("asset_index") - @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 + # Instance attribute type: FileRequestDeadline (validator is set below) + deadline = bb.Attribute("deadline", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequestDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRequestDetails(asset_index={!r}, deadline={!r})'.format( - self._asset_index_value, - self._deadline_value, - ) - FileRequestDetails_validator = bv.Struct(FileRequestDetails) class FileRequestReceiveFileDetails(bb.Struct): @@ -49784,15 +42394,10 @@ class FileRequestReceiveFileDetails(bb.Struct): __slots__ = [ '_file_request_id_value', - '_file_request_id_present', '_file_request_details_value', - '_file_request_details_present', '_submitted_file_names_value', - '_submitted_file_names_present', '_submitter_name_value', - '_submitter_name_present', '_submitter_email_value', - '_submitter_email_present', ] _has_required_fields = True @@ -49803,16 +42408,11 @@ def __init__(self, file_request_details=None, submitter_name=None, submitter_email=None): - self._file_request_id_value = None - self._file_request_id_present = False - self._file_request_details_value = None - self._file_request_details_present = False - self._submitted_file_names_value = None - self._submitted_file_names_present = False - self._submitter_name_value = None - self._submitter_name_present = False - self._submitter_email_value = None - self._submitter_email_present = False + self._file_request_id_value = bb.NOT_SET + self._file_request_details_value = bb.NOT_SET + self._submitted_file_names_value = bb.NOT_SET + self._submitter_name_value = bb.NOT_SET + self._submitter_email_value = bb.NOT_SET if file_request_id is not None: self.file_request_id = file_request_id if file_request_details is not None: @@ -49824,194 +42424,46 @@ def __init__(self, if submitter_email is not None: self.submitter_email = submitter_email - @property - def file_request_id(self): - """ - File request id. Might be missing due to historical data gap. - - :rtype: str - """ - if self._file_request_id_present: - return self._file_request_id_value - else: - return None - - @file_request_id.setter - def file_request_id(self, val): - if val is None: - del self.file_request_id - return - val = self._file_request_id_validator.validate(val) - self._file_request_id_value = val - self._file_request_id_present = True + # Instance attribute type: str (validator is set below) + file_request_id = bb.Attribute("file_request_id", nullable=True) - @file_request_id.deleter - def file_request_id(self): - self._file_request_id_value = None - self._file_request_id_present = False + # Instance attribute type: FileRequestDetails (validator is set below) + file_request_details = bb.Attribute("file_request_details", nullable=True, user_defined=True) - @property - def file_request_details(self): - """ - File request details. Might be missing due to historical data gap. + # Instance attribute type: list of [str] (validator is set below) + submitted_file_names = bb.Attribute("submitted_file_names") - :rtype: FileRequestDetails - """ - if self._file_request_details_present: - return self._file_request_details_value - else: - return None + # Instance attribute type: str (validator is set below) + submitter_name = bb.Attribute("submitter_name", nullable=True) - @file_request_details.setter - def file_request_details(self, val): - if val is None: - del self.file_request_details - return - self._file_request_details_validator.validate_type_only(val) - self._file_request_details_value = val - self._file_request_details_present = True - - @file_request_details.deleter - def file_request_details(self): - self._file_request_details_value = None - self._file_request_details_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 - - @property - def submitter_name(self): - """ - The name as provided by the submitter. Might be missing due to - historical data gap. - - :rtype: str - """ - if self._submitter_name_present: - return self._submitter_name_value - else: - return None - - @submitter_name.setter - def submitter_name(self, val): - if val is None: - del self.submitter_name - return - val = self._submitter_name_validator.validate(val) - self._submitter_name_value = val - self._submitter_name_present = True - - @submitter_name.deleter - def submitter_name(self): - self._submitter_name_value = None - self._submitter_name_present = False - - @property - def submitter_email(self): - """ - The email as provided by the submitter. Might be missing due to - historical data gap. - - :rtype: str - """ - if self._submitter_email_present: - return self._submitter_email_value - else: - return None - - @submitter_email.setter - def submitter_email(self, val): - if val is None: - del self.submitter_email - return - val = self._submitter_email_validator.validate(val) - self._submitter_email_value = val - self._submitter_email_present = True - - @submitter_email.deleter - def submitter_email(self): - self._submitter_email_value = None - self._submitter_email_present = False + # Instance attribute type: str (validator is set below) + submitter_email = bb.Attribute("submitter_email", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequestReceiveFileDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRequestReceiveFileDetails(submitted_file_names={!r}, file_request_id={!r}, file_request_details={!r}, submitter_name={!r}, submitter_email={!r})'.format( - self._submitted_file_names_value, - self._file_request_id_value, - self._file_request_details_value, - self._submitter_name_value, - self._submitter_email_value, - ) - FileRequestReceiveFileDetails_validator = bv.Struct(FileRequestReceiveFileDetails) class FileRequestReceiveFileType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequestReceiveFileType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRequestReceiveFileType(description={!r})'.format( - self._description_value, - ) - FileRequestReceiveFileType_validator = bv.Struct(FileRequestReceiveFileType) class FileRequestsChangePolicyDetails(bb.Struct): @@ -50026,9 +42478,7 @@ class FileRequestsChangePolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -50036,121 +42486,44 @@ class FileRequestsChangePolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: FileRequestsPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False + # Instance attribute type: FileRequestsPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequestsChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 FileRequestsChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequestsChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRequestsChangePolicyType(description={!r})'.format( - self._description_value, - ) - FileRequestsChangePolicyType_validator = bv.Struct(FileRequestsChangePolicyType) class FileRequestsEmailsEnabledDetails(bb.Struct): @@ -50169,56 +42542,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequestsEmailsEnabledDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRequestsEmailsEnabledDetails()' - FileRequestsEmailsEnabledDetails_validator = bv.Struct(FileRequestsEmailsEnabledDetails) class FileRequestsEmailsEnabledType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequestsEmailsEnabledType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRequestsEmailsEnabledType(description={!r})'.format( - self._description_value, - ) - FileRequestsEmailsEnabledType_validator = bv.Struct(FileRequestsEmailsEnabledType) class FileRequestsEmailsRestrictedToTeamOnlyDetails(bb.Struct): @@ -50237,56 +42582,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequestsEmailsRestrictedToTeamOnlyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRequestsEmailsRestrictedToTeamOnlyDetails()' - FileRequestsEmailsRestrictedToTeamOnlyDetails_validator = bv.Struct(FileRequestsEmailsRestrictedToTeamOnlyDetails) class FileRequestsEmailsRestrictedToTeamOnlyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequestsEmailsRestrictedToTeamOnlyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRequestsEmailsRestrictedToTeamOnlyType(description={!r})'.format( - self._description_value, - ) - FileRequestsEmailsRestrictedToTeamOnlyType_validator = bv.Struct(FileRequestsEmailsRestrictedToTeamOnlyType) class FileRequestsPolicy(bb.Union): @@ -50333,9 +42650,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRequestsPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRequestsPolicy(%r, %r)' % (self._tag, self._value) - FileRequestsPolicy_validator = bv.Union(FileRequestsPolicy) class FileResolveCommentDetails(bb.Struct): @@ -50348,99 +42662,44 @@ class FileResolveCommentDetails(bb.Struct): __slots__ = [ '_comment_text_value', - '_comment_text_present', ] _has_required_fields = False def __init__(self, comment_text=None): - self._comment_text_value = None - self._comment_text_present = False + self._comment_text_value = bb.NOT_SET if comment_text is not None: self.comment_text = comment_text - @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 + # Instance attribute type: str (validator is set below) + comment_text = bb.Attribute("comment_text", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileResolveCommentDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileResolveCommentDetails(comment_text={!r})'.format( - self._comment_text_value, - ) - FileResolveCommentDetails_validator = bv.Struct(FileResolveCommentDetails) class FileResolveCommentType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileResolveCommentType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileResolveCommentType(description={!r})'.format( - self._description_value, - ) - FileResolveCommentType_validator = bv.Struct(FileResolveCommentType) class FileRestoreDetails(bb.Struct): @@ -50459,56 +42718,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRestoreDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRestoreDetails()' - FileRestoreDetails_validator = bv.Struct(FileRestoreDetails) class FileRestoreType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRestoreType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRestoreType(description={!r})'.format( - self._description_value, - ) - FileRestoreType_validator = bv.Struct(FileRestoreType) class FileRevertDetails(bb.Struct): @@ -50527,56 +42758,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRevertDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRevertDetails()' - FileRevertDetails_validator = bv.Struct(FileRevertDetails) class FileRevertType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRevertType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRevertType(description={!r})'.format( - self._description_value, - ) - FileRevertType_validator = bv.Struct(FileRevertType) class FileRollbackChangesDetails(bb.Struct): @@ -50595,56 +42798,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRollbackChangesDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRollbackChangesDetails()' - FileRollbackChangesDetails_validator = bv.Struct(FileRollbackChangesDetails) class FileRollbackChangesType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileRollbackChangesType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileRollbackChangesType(description={!r})'.format( - self._description_value, - ) - FileRollbackChangesType_validator = bv.Struct(FileRollbackChangesType) class FileSaveCopyReferenceDetails(bb.Struct): @@ -50657,96 +42832,44 @@ class FileSaveCopyReferenceDetails(bb.Struct): __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 + self._relocate_action_details_value = bb.NOT_SET 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 + # Instance attribute type: list of [RelocateAssetReferencesLogInfo] (validator is set below) + relocate_action_details = bb.Attribute("relocate_action_details") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileSaveCopyReferenceDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileSaveCopyReferenceDetails(relocate_action_details={!r})'.format( - self._relocate_action_details_value, - ) - FileSaveCopyReferenceDetails_validator = bv.Struct(FileSaveCopyReferenceDetails) class FileSaveCopyReferenceType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileSaveCopyReferenceType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileSaveCopyReferenceType(description={!r})'.format( - self._description_value, - ) - FileSaveCopyReferenceType_validator = bv.Struct(FileSaveCopyReferenceType) class FileTransfersFileAddDetails(bb.Struct): @@ -50758,96 +42881,44 @@ class FileTransfersFileAddDetails(bb.Struct): __slots__ = [ '_file_transfer_id_value', - '_file_transfer_id_present', ] _has_required_fields = True def __init__(self, file_transfer_id=None): - self._file_transfer_id_value = None - self._file_transfer_id_present = False + self._file_transfer_id_value = bb.NOT_SET if file_transfer_id is not None: self.file_transfer_id = file_transfer_id - @property - def file_transfer_id(self): - """ - Transfer id. - - :rtype: str - """ - if self._file_transfer_id_present: - return self._file_transfer_id_value - else: - raise AttributeError("missing required field 'file_transfer_id'") - - @file_transfer_id.setter - def file_transfer_id(self, val): - val = self._file_transfer_id_validator.validate(val) - self._file_transfer_id_value = val - self._file_transfer_id_present = True - - @file_transfer_id.deleter - def file_transfer_id(self): - self._file_transfer_id_value = None - self._file_transfer_id_present = False + # Instance attribute type: str (validator is set below) + file_transfer_id = bb.Attribute("file_transfer_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileTransfersFileAddDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileTransfersFileAddDetails(file_transfer_id={!r})'.format( - self._file_transfer_id_value, - ) - FileTransfersFileAddDetails_validator = bv.Struct(FileTransfersFileAddDetails) class FileTransfersFileAddType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileTransfersFileAddType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileTransfersFileAddType(description={!r})'.format( - self._description_value, - ) - FileTransfersFileAddType_validator = bv.Struct(FileTransfersFileAddType) class FileTransfersPolicy(bb.Union): @@ -50894,9 +42965,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileTransfersPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileTransfersPolicy(%r, %r)' % (self._tag, self._value) - FileTransfersPolicy_validator = bv.Union(FileTransfersPolicy) class FileTransfersPolicyChangedDetails(bb.Struct): @@ -50911,9 +42979,7 @@ class FileTransfersPolicyChangedDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -50921,117 +42987,44 @@ class FileTransfersPolicyChangedDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 transfers policy. - - :rtype: FileTransfersPolicy - """ - 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 transfers policy. - - :rtype: FileTransfersPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - raise AttributeError("missing required field 'previous_value'") + # Instance attribute type: FileTransfersPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @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 + # Instance attribute type: FileTransfersPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileTransfersPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileTransfersPolicyChangedDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - FileTransfersPolicyChangedDetails_validator = bv.Struct(FileTransfersPolicyChangedDetails) class FileTransfersPolicyChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileTransfersPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileTransfersPolicyChangedType(description={!r})'.format( - self._description_value, - ) - FileTransfersPolicyChangedType_validator = bv.Struct(FileTransfersPolicyChangedType) class FileTransfersTransferDeleteDetails(bb.Struct): @@ -51044,96 +43037,44 @@ class FileTransfersTransferDeleteDetails(bb.Struct): __slots__ = [ '_file_transfer_id_value', - '_file_transfer_id_present', ] _has_required_fields = True def __init__(self, file_transfer_id=None): - self._file_transfer_id_value = None - self._file_transfer_id_present = False + self._file_transfer_id_value = bb.NOT_SET if file_transfer_id is not None: self.file_transfer_id = file_transfer_id - @property - def file_transfer_id(self): - """ - Transfer id. - - :rtype: str - """ - if self._file_transfer_id_present: - return self._file_transfer_id_value - else: - raise AttributeError("missing required field 'file_transfer_id'") - - @file_transfer_id.setter - def file_transfer_id(self, val): - val = self._file_transfer_id_validator.validate(val) - self._file_transfer_id_value = val - self._file_transfer_id_present = True - - @file_transfer_id.deleter - def file_transfer_id(self): - self._file_transfer_id_value = None - self._file_transfer_id_present = False + # Instance attribute type: str (validator is set below) + file_transfer_id = bb.Attribute("file_transfer_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileTransfersTransferDeleteDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileTransfersTransferDeleteDetails(file_transfer_id={!r})'.format( - self._file_transfer_id_value, - ) - FileTransfersTransferDeleteDetails_validator = bv.Struct(FileTransfersTransferDeleteDetails) class FileTransfersTransferDeleteType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileTransfersTransferDeleteType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileTransfersTransferDeleteType(description={!r})'.format( - self._description_value, - ) - FileTransfersTransferDeleteType_validator = bv.Struct(FileTransfersTransferDeleteType) class FileTransfersTransferDownloadDetails(bb.Struct): @@ -51146,96 +43087,44 @@ class FileTransfersTransferDownloadDetails(bb.Struct): __slots__ = [ '_file_transfer_id_value', - '_file_transfer_id_present', ] _has_required_fields = True def __init__(self, file_transfer_id=None): - self._file_transfer_id_value = None - self._file_transfer_id_present = False + self._file_transfer_id_value = bb.NOT_SET if file_transfer_id is not None: self.file_transfer_id = file_transfer_id - @property - def file_transfer_id(self): - """ - Transfer id. - - :rtype: str - """ - if self._file_transfer_id_present: - return self._file_transfer_id_value - else: - raise AttributeError("missing required field 'file_transfer_id'") - - @file_transfer_id.setter - def file_transfer_id(self, val): - val = self._file_transfer_id_validator.validate(val) - self._file_transfer_id_value = val - self._file_transfer_id_present = True - - @file_transfer_id.deleter - def file_transfer_id(self): - self._file_transfer_id_value = None - self._file_transfer_id_present = False + # Instance attribute type: str (validator is set below) + file_transfer_id = bb.Attribute("file_transfer_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileTransfersTransferDownloadDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileTransfersTransferDownloadDetails(file_transfer_id={!r})'.format( - self._file_transfer_id_value, - ) - FileTransfersTransferDownloadDetails_validator = bv.Struct(FileTransfersTransferDownloadDetails) class FileTransfersTransferDownloadType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileTransfersTransferDownloadType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileTransfersTransferDownloadType(description={!r})'.format( - self._description_value, - ) - FileTransfersTransferDownloadType_validator = bv.Struct(FileTransfersTransferDownloadType) class FileTransfersTransferSendDetails(bb.Struct): @@ -51248,96 +43137,44 @@ class FileTransfersTransferSendDetails(bb.Struct): __slots__ = [ '_file_transfer_id_value', - '_file_transfer_id_present', ] _has_required_fields = True def __init__(self, file_transfer_id=None): - self._file_transfer_id_value = None - self._file_transfer_id_present = False + self._file_transfer_id_value = bb.NOT_SET if file_transfer_id is not None: self.file_transfer_id = file_transfer_id - @property - def file_transfer_id(self): - """ - Transfer id. - - :rtype: str - """ - if self._file_transfer_id_present: - return self._file_transfer_id_value - else: - raise AttributeError("missing required field 'file_transfer_id'") - - @file_transfer_id.setter - def file_transfer_id(self, val): - val = self._file_transfer_id_validator.validate(val) - self._file_transfer_id_value = val - self._file_transfer_id_present = True - - @file_transfer_id.deleter - def file_transfer_id(self): - self._file_transfer_id_value = None - self._file_transfer_id_present = False + # Instance attribute type: str (validator is set below) + file_transfer_id = bb.Attribute("file_transfer_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileTransfersTransferSendDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileTransfersTransferSendDetails(file_transfer_id={!r})'.format( - self._file_transfer_id_value, - ) - FileTransfersTransferSendDetails_validator = bv.Struct(FileTransfersTransferSendDetails) class FileTransfersTransferSendType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileTransfersTransferSendType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileTransfersTransferSendType(description={!r})'.format( - self._description_value, - ) - FileTransfersTransferSendType_validator = bv.Struct(FileTransfersTransferSendType) class FileTransfersTransferViewDetails(bb.Struct): @@ -51350,96 +43187,44 @@ class FileTransfersTransferViewDetails(bb.Struct): __slots__ = [ '_file_transfer_id_value', - '_file_transfer_id_present', ] _has_required_fields = True def __init__(self, file_transfer_id=None): - self._file_transfer_id_value = None - self._file_transfer_id_present = False + self._file_transfer_id_value = bb.NOT_SET if file_transfer_id is not None: self.file_transfer_id = file_transfer_id - @property - def file_transfer_id(self): - """ - Transfer id. - - :rtype: str - """ - if self._file_transfer_id_present: - return self._file_transfer_id_value - else: - raise AttributeError("missing required field 'file_transfer_id'") - - @file_transfer_id.setter - def file_transfer_id(self, val): - val = self._file_transfer_id_validator.validate(val) - self._file_transfer_id_value = val - self._file_transfer_id_present = True - - @file_transfer_id.deleter - def file_transfer_id(self): - self._file_transfer_id_value = None - self._file_transfer_id_present = False + # Instance attribute type: str (validator is set below) + file_transfer_id = bb.Attribute("file_transfer_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileTransfersTransferViewDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileTransfersTransferViewDetails(file_transfer_id={!r})'.format( - self._file_transfer_id_value, - ) - FileTransfersTransferViewDetails_validator = bv.Struct(FileTransfersTransferViewDetails) class FileTransfersTransferViewType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileTransfersTransferViewType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileTransfersTransferViewType(description={!r})'.format( - self._description_value, - ) - FileTransfersTransferViewType_validator = bv.Struct(FileTransfersTransferViewType) class FileUnlikeCommentDetails(bb.Struct): @@ -51452,99 +43237,44 @@ class FileUnlikeCommentDetails(bb.Struct): __slots__ = [ '_comment_text_value', - '_comment_text_present', ] _has_required_fields = False def __init__(self, comment_text=None): - self._comment_text_value = None - self._comment_text_present = False + self._comment_text_value = bb.NOT_SET if comment_text is not None: self.comment_text = comment_text - @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 + # Instance attribute type: str (validator is set below) + comment_text = bb.Attribute("comment_text", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileUnlikeCommentDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileUnlikeCommentDetails(comment_text={!r})'.format( - self._comment_text_value, - ) - FileUnlikeCommentDetails_validator = bv.Struct(FileUnlikeCommentDetails) class FileUnlikeCommentType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileUnlikeCommentType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileUnlikeCommentType(description={!r})'.format( - self._description_value, - ) - FileUnlikeCommentType_validator = bv.Struct(FileUnlikeCommentType) class FileUnresolveCommentDetails(bb.Struct): @@ -51557,99 +43287,44 @@ class FileUnresolveCommentDetails(bb.Struct): __slots__ = [ '_comment_text_value', - '_comment_text_present', ] _has_required_fields = False def __init__(self, comment_text=None): - self._comment_text_value = None - self._comment_text_present = False + self._comment_text_value = bb.NOT_SET if comment_text is not None: self.comment_text = comment_text - @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 + # Instance attribute type: str (validator is set below) + comment_text = bb.Attribute("comment_text", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileUnresolveCommentDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileUnresolveCommentDetails(comment_text={!r})'.format( - self._comment_text_value, - ) - FileUnresolveCommentDetails_validator = bv.Struct(FileUnresolveCommentDetails) class FileUnresolveCommentType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileUnresolveCommentType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileUnresolveCommentType(description={!r})'.format( - self._description_value, - ) - FileUnresolveCommentType_validator = bv.Struct(FileUnresolveCommentType) class FolderLogInfo(FileOrFolderLogInfo): @@ -51661,7 +43336,6 @@ class FolderLogInfo(FileOrFolderLogInfo): __slots__ = [ '_file_count_value', - '_file_count_present', ] _has_required_fields = True @@ -51676,49 +43350,16 @@ def __init__(self, display_name, file_id, file_size) - self._file_count_value = None - self._file_count_present = False + self._file_count_value = bb.NOT_SET if file_count is not None: self.file_count = file_count - @property - def file_count(self): - """ - Number of files within the folder. - - :rtype: int - """ - if self._file_count_present: - return self._file_count_value - else: - return None - - @file_count.setter - def file_count(self, val): - if val is None: - del self.file_count - return - 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 + # Instance attribute type: int (validator is set below) + file_count = bb.Attribute("file_count", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FolderLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FolderLogInfo(path={!r}, display_name={!r}, file_id={!r}, file_size={!r}, file_count={!r})'.format( - self._path_value, - self._display_name_value, - self._file_id_value, - self._file_size_value, - self._file_count_value, - ) - FolderLogInfo_validator = bv.Struct(FolderLogInfo) class FolderOverviewDescriptionChangedDetails(bb.Struct): @@ -51732,96 +43373,44 @@ class FolderOverviewDescriptionChangedDetails(bb.Struct): __slots__ = [ '_folder_overview_location_asset_value', - '_folder_overview_location_asset_present', ] _has_required_fields = True def __init__(self, folder_overview_location_asset=None): - self._folder_overview_location_asset_value = None - self._folder_overview_location_asset_present = False + self._folder_overview_location_asset_value = bb.NOT_SET if folder_overview_location_asset is not None: self.folder_overview_location_asset = folder_overview_location_asset - @property - def folder_overview_location_asset(self): - """ - Folder Overview location position in the Assets list. - - :rtype: int - """ - if self._folder_overview_location_asset_present: - return self._folder_overview_location_asset_value - else: - raise AttributeError("missing required field 'folder_overview_location_asset'") - - @folder_overview_location_asset.setter - def folder_overview_location_asset(self, val): - val = self._folder_overview_location_asset_validator.validate(val) - self._folder_overview_location_asset_value = val - self._folder_overview_location_asset_present = True - - @folder_overview_location_asset.deleter - def folder_overview_location_asset(self): - self._folder_overview_location_asset_value = None - self._folder_overview_location_asset_present = False + # Instance attribute type: int (validator is set below) + folder_overview_location_asset = bb.Attribute("folder_overview_location_asset") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FolderOverviewDescriptionChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FolderOverviewDescriptionChangedDetails(folder_overview_location_asset={!r})'.format( - self._folder_overview_location_asset_value, - ) - FolderOverviewDescriptionChangedDetails_validator = bv.Struct(FolderOverviewDescriptionChangedDetails) class FolderOverviewDescriptionChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FolderOverviewDescriptionChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FolderOverviewDescriptionChangedType(description={!r})'.format( - self._description_value, - ) - FolderOverviewDescriptionChangedType_validator = bv.Struct(FolderOverviewDescriptionChangedType) class FolderOverviewItemPinnedDetails(bb.Struct): @@ -51837,9 +43426,7 @@ class FolderOverviewItemPinnedDetails(bb.Struct): __slots__ = [ '_folder_overview_location_asset_value', - '_folder_overview_location_asset_present', '_pinned_items_asset_indices_value', - '_pinned_items_asset_indices_present', ] _has_required_fields = True @@ -51847,117 +43434,44 @@ class FolderOverviewItemPinnedDetails(bb.Struct): def __init__(self, folder_overview_location_asset=None, pinned_items_asset_indices=None): - self._folder_overview_location_asset_value = None - self._folder_overview_location_asset_present = False - self._pinned_items_asset_indices_value = None - self._pinned_items_asset_indices_present = False + self._folder_overview_location_asset_value = bb.NOT_SET + self._pinned_items_asset_indices_value = bb.NOT_SET if folder_overview_location_asset is not None: self.folder_overview_location_asset = folder_overview_location_asset if pinned_items_asset_indices is not None: self.pinned_items_asset_indices = pinned_items_asset_indices - @property - def folder_overview_location_asset(self): - """ - Folder Overview location position in the Assets list. + # Instance attribute type: int (validator is set below) + folder_overview_location_asset = bb.Attribute("folder_overview_location_asset") - :rtype: int - """ - if self._folder_overview_location_asset_present: - return self._folder_overview_location_asset_value - else: - raise AttributeError("missing required field 'folder_overview_location_asset'") - - @folder_overview_location_asset.setter - def folder_overview_location_asset(self, val): - val = self._folder_overview_location_asset_validator.validate(val) - self._folder_overview_location_asset_value = val - self._folder_overview_location_asset_present = True - - @folder_overview_location_asset.deleter - def folder_overview_location_asset(self): - self._folder_overview_location_asset_value = None - self._folder_overview_location_asset_present = False - - @property - def pinned_items_asset_indices(self): - """ - Pinned items positions in the Assets list. - - :rtype: list of [int] - """ - if self._pinned_items_asset_indices_present: - return self._pinned_items_asset_indices_value - else: - raise AttributeError("missing required field 'pinned_items_asset_indices'") - - @pinned_items_asset_indices.setter - def pinned_items_asset_indices(self, val): - val = self._pinned_items_asset_indices_validator.validate(val) - self._pinned_items_asset_indices_value = val - self._pinned_items_asset_indices_present = True - - @pinned_items_asset_indices.deleter - def pinned_items_asset_indices(self): - self._pinned_items_asset_indices_value = None - self._pinned_items_asset_indices_present = False + # Instance attribute type: list of [int] (validator is set below) + pinned_items_asset_indices = bb.Attribute("pinned_items_asset_indices") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FolderOverviewItemPinnedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FolderOverviewItemPinnedDetails(folder_overview_location_asset={!r}, pinned_items_asset_indices={!r})'.format( - self._folder_overview_location_asset_value, - self._pinned_items_asset_indices_value, - ) - FolderOverviewItemPinnedDetails_validator = bv.Struct(FolderOverviewItemPinnedDetails) class FolderOverviewItemPinnedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FolderOverviewItemPinnedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FolderOverviewItemPinnedType(description={!r})'.format( - self._description_value, - ) - FolderOverviewItemPinnedType_validator = bv.Struct(FolderOverviewItemPinnedType) class FolderOverviewItemUnpinnedDetails(bb.Struct): @@ -51973,9 +43487,7 @@ class FolderOverviewItemUnpinnedDetails(bb.Struct): __slots__ = [ '_folder_overview_location_asset_value', - '_folder_overview_location_asset_present', '_pinned_items_asset_indices_value', - '_pinned_items_asset_indices_present', ] _has_required_fields = True @@ -51983,117 +43495,44 @@ class FolderOverviewItemUnpinnedDetails(bb.Struct): def __init__(self, folder_overview_location_asset=None, pinned_items_asset_indices=None): - self._folder_overview_location_asset_value = None - self._folder_overview_location_asset_present = False - self._pinned_items_asset_indices_value = None - self._pinned_items_asset_indices_present = False + self._folder_overview_location_asset_value = bb.NOT_SET + self._pinned_items_asset_indices_value = bb.NOT_SET if folder_overview_location_asset is not None: self.folder_overview_location_asset = folder_overview_location_asset if pinned_items_asset_indices is not None: self.pinned_items_asset_indices = pinned_items_asset_indices - @property - def folder_overview_location_asset(self): - """ - Folder Overview location position in the Assets list. - - :rtype: int - """ - if self._folder_overview_location_asset_present: - return self._folder_overview_location_asset_value - else: - raise AttributeError("missing required field 'folder_overview_location_asset'") - - @folder_overview_location_asset.setter - def folder_overview_location_asset(self, val): - val = self._folder_overview_location_asset_validator.validate(val) - self._folder_overview_location_asset_value = val - self._folder_overview_location_asset_present = True + # Instance attribute type: int (validator is set below) + folder_overview_location_asset = bb.Attribute("folder_overview_location_asset") - @folder_overview_location_asset.deleter - def folder_overview_location_asset(self): - self._folder_overview_location_asset_value = None - self._folder_overview_location_asset_present = False - - @property - def pinned_items_asset_indices(self): - """ - Pinned items positions in the Assets list. - - :rtype: list of [int] - """ - if self._pinned_items_asset_indices_present: - return self._pinned_items_asset_indices_value - else: - raise AttributeError("missing required field 'pinned_items_asset_indices'") - - @pinned_items_asset_indices.setter - def pinned_items_asset_indices(self, val): - val = self._pinned_items_asset_indices_validator.validate(val) - self._pinned_items_asset_indices_value = val - self._pinned_items_asset_indices_present = True - - @pinned_items_asset_indices.deleter - def pinned_items_asset_indices(self): - self._pinned_items_asset_indices_value = None - self._pinned_items_asset_indices_present = False + # Instance attribute type: list of [int] (validator is set below) + pinned_items_asset_indices = bb.Attribute("pinned_items_asset_indices") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FolderOverviewItemUnpinnedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FolderOverviewItemUnpinnedDetails(folder_overview_location_asset={!r}, pinned_items_asset_indices={!r})'.format( - self._folder_overview_location_asset_value, - self._pinned_items_asset_indices_value, - ) - FolderOverviewItemUnpinnedDetails_validator = bv.Struct(FolderOverviewItemUnpinnedDetails) class FolderOverviewItemUnpinnedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(FolderOverviewItemUnpinnedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FolderOverviewItemUnpinnedType(description={!r})'.format( - self._description_value, - ) - FolderOverviewItemUnpinnedType_validator = bv.Struct(FolderOverviewItemUnpinnedType) class GeoLocationLogInfo(bb.Struct): @@ -52108,13 +43547,9 @@ class GeoLocationLogInfo(bb.Struct): __slots__ = [ '_city_value', - '_city_present', '_region_value', - '_region_present', '_country_value', - '_country_present', '_ip_address_value', - '_ip_address_present', ] _has_required_fields = True @@ -52124,14 +43559,10 @@ def __init__(self, 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 + self._city_value = bb.NOT_SET + self._region_value = bb.NOT_SET + self._country_value = bb.NOT_SET + self._ip_address_value = bb.NOT_SET if city is not None: self.city = city if region is not None: @@ -52141,118 +43572,21 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + city = bb.Attribute("city", nullable=True) - @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'") + # Instance attribute type: str (validator is set below) + region = bb.Attribute("region", nullable=True) - @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 + # Instance attribute type: str (validator is set below) + country = bb.Attribute("country", nullable=True) - @ip_address.deleter - def ip_address(self): - self._ip_address_value = None - self._ip_address_present = False + # Instance attribute type: str (validator is set below) + ip_address = bb.Attribute("ip_address") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GeoLocationLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -52261,7 +43595,7 @@ class GetTeamEventsArg(bb.Struct): return per call. Note that some calls may not return ``limit`` number of events, and may even return no events, even with `has_more` set to true. In this case, callers should fetch again using - :meth:`dropbox.dropbox.Dropbox.team_log_get_events_continue`. + :meth:`dropbox.dropbox_client.Dropbox.team_log_get_events_continue`. :ivar team_log.GetTeamEventsArg.account_id: Filter the events by account ID. Return only events with this account_id as either Actor, Context, or Participants. @@ -52276,15 +43610,10 @@ class GetTeamEventsArg(bb.Struct): __slots__ = [ '_limit_value', - '_limit_present', '_account_id_value', - '_account_id_present', '_time_value', - '_time_present', '_category_value', - '_category_present', '_event_type_value', - '_event_type_present', ] _has_required_fields = False @@ -52295,16 +43624,11 @@ def __init__(self, time=None, category=None, event_type=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 - self._event_type_value = None - self._event_type_present = False + self._limit_value = bb.NOT_SET + self._account_id_value = bb.NOT_SET + self._time_value = bb.NOT_SET + self._category_value = bb.NOT_SET + self._event_type_value = bb.NOT_SET if limit is not None: self.limit = limit if account_id is not None: @@ -52316,152 +43640,24 @@ def __init__(self, if event_type is not None: self.event_type = event_type - @property - def limit(self): - """ - The maximal number of results to return per call. Note that some calls - may not return ``limit`` number of events, and may even return no - events, even with `has_more` set to true. In this case, callers should - fetch again using - :meth:`dropbox.dropbox.Dropbox.team_log_get_events_continue`. - - :rtype: int - """ - 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 only 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 - """ - 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. Note that category - shouldn't be provided together with event_type. - - :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 - - @property - def event_type(self): - """ - Filter the returned events to a single event type. Note that event_type - shouldn't be provided together with category. - - :rtype: EventTypeArg - """ - if self._event_type_present: - return self._event_type_value - else: - return None - - @event_type.setter - def event_type(self, val): - if val is None: - del self.event_type - return - 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 + # Instance attribute type: int (validator is set below) + limit = bb.Attribute("limit") + + # Instance attribute type: str (validator is set below) + account_id = bb.Attribute("account_id", nullable=True) + + # Instance attribute type: team_common.TimeRange (validator is set below) + time = bb.Attribute("time", nullable=True, user_defined=True) + + # Instance attribute type: EventCategory (validator is set below) + category = bb.Attribute("category", nullable=True, user_defined=True) + + # Instance attribute type: EventTypeArg (validator is set below) + event_type = bb.Attribute("event_type", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetTeamEventsArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetTeamEventsArg(limit={!r}, account_id={!r}, time={!r}, category={!r}, event_type={!r})'.format( - self._limit_value, - self._account_id_value, - self._time_value, - self._category_value, - self._event_type_value, - ) - GetTeamEventsArg_validator = bv.Struct(GetTeamEventsArg) class GetTeamEventsContinueArg(bb.Struct): @@ -52472,55 +43668,28 @@ class GetTeamEventsContinueArg(bb.Struct): __slots__ = [ '_cursor_value', - '_cursor_present', ] _has_required_fields = True def __init__(self, cursor=None): - self._cursor_value = None - self._cursor_present = False + self._cursor_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetTeamEventsContinueArg, self)._process_custom_annotations(annotation_type, field_path, processor) - 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`. + :meth:`dropbox.dropbox_client.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 @@ -52583,11 +43752,11 @@ def get_reset(self): Cursors are intended to be used quickly. Individual cursor values are normally valid for days, but in rare cases may be reset sooner. Cursor reset errors should be handled by fetching a new cursor from - :meth:`dropbox.dropbox.Dropbox.team_log_get_events`. The associated - value is the approximate timestamp of the most recent event returned by - the cursor. This should be used as a resumption point when calling - :meth:`dropbox.dropbox.Dropbox.team_log_get_events` to obtain a new - cursor. + :meth:`dropbox.dropbox_client.Dropbox.team_log_get_events`. The + associated value is the approximate timestamp of the most recent event + returned by the cursor. This should be used as a resumption point when + calling :meth:`dropbox.dropbox_client.Dropbox.team_log_get_events` to + obtain a new cursor. Only call this if :meth:`is_reset` is true. @@ -52600,15 +43769,12 @@ def get_reset(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetTeamEventsContinueError, self)._process_custom_annotations(annotation_type, field_path, processor) - 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`. + :meth:`dropbox.dropbox_client.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 @@ -52666,9 +43832,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetTeamEventsError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetTeamEventsError(%r, %r)' % (self._tag, self._value) - GetTeamEventsError_validator = bv.Union(GetTeamEventsError) class GetTeamEventsResult(bb.Struct): @@ -52676,9 +43839,10 @@ class GetTeamEventsResult(bb.Struct): :ivar team_log.GetTeamEventsResult.events: List of events. Note that events are not guaranteed to be sorted by their timestamp value. :ivar team_log.GetTeamEventsResult.cursor: Pass the cursor into - :meth:`dropbox.dropbox.Dropbox.team_log_get_events_continue` to obtain - additional events. The value of ``cursor`` may change for each response - from :meth:`dropbox.dropbox.Dropbox.team_log_get_events_continue`, + :meth:`dropbox.dropbox_client.Dropbox.team_log_get_events_continue` to + obtain additional events. The value of ``cursor`` may change for each + response from + :meth:`dropbox.dropbox_client.Dropbox.team_log_get_events_continue`, regardless of the value of ``has_more``; older cursor strings may expire. Thus, callers should ensure that they update their cursor based on the latest value of ``cursor`` after each call, and poll regularly if @@ -52686,18 +43850,15 @@ class GetTeamEventsResult(bb.Struct): for expired cursors. :ivar team_log.GetTeamEventsResult.has_more: Is true if there may be additional events that have not been returned yet. An additional call to - :meth:`dropbox.dropbox.Dropbox.team_log_get_events_continue` can + :meth:`dropbox.dropbox_client.Dropbox.team_log_get_events_continue` can retrieve them. Note that ``has_more`` may be ``True``, even if ``events`` is empty. """ __slots__ = [ '_events_value', - '_events_present', '_cursor_value', - '_cursor_present', '_has_more_value', - '_has_more_present', ] _has_required_fields = True @@ -52706,12 +43867,9 @@ 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 + self._events_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET + self._has_more_value = bb.NOT_SET if events is not None: self.events = events if cursor is not None: @@ -52719,98 +43877,18 @@ def __init__(self, if has_more is not None: self.has_more = has_more - @property - def events(self): - """ - List of events. Note that events are not guaranteed to be sorted by - their timestamp value. - - :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. The value of ``cursor`` may change for each response - from :meth:`dropbox.dropbox.Dropbox.team_log_get_events_continue`, - regardless of the value of ``has_more``; older cursor strings may - expire. Thus, callers should ensure that they update their cursor based - on the latest value of ``cursor`` after each call, and poll regularly if - they wish to poll for new events. Callers should handle reset exceptions - for expired cursors. - - :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 + # Instance attribute type: list of [TeamEvent] (validator is set below) + events = bb.Attribute("events") - @property - def has_more(self): - """ - Is true if there may be additional events that have not been returned - yet. An additional call to - :meth:`dropbox.dropbox.Dropbox.team_log_get_events_continue` can - retrieve them. Note that ``has_more`` may be ``True``, even if - ``events`` is empty. - - :rtype: bool - """ - if self._has_more_present: - return self._has_more_value - else: - raise AttributeError("missing required field 'has_more'") + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") - @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 + # Instance attribute type: bool (validator is set below) + has_more = bb.Attribute("has_more") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetTeamEventsResult, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -52825,9 +43903,7 @@ class GoogleSsoChangePolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -52835,121 +43911,44 @@ class GoogleSsoChangePolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: GoogleSsoPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=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 + # Instance attribute type: GoogleSsoPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GoogleSsoChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 GoogleSsoChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GoogleSsoChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GoogleSsoChangePolicyType(description={!r})'.format( - self._description_value, - ) - GoogleSsoChangePolicyType_validator = bv.Struct(GoogleSsoChangePolicyType) class GoogleSsoPolicy(bb.Union): @@ -52996,9 +43995,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GoogleSsoPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GoogleSsoPolicy(%r, %r)' % (self._tag, self._value) - GoogleSsoPolicy_validator = bv.Union(GoogleSsoPolicy) class GovernancePolicyAddFoldersDetails(bb.Struct): @@ -53014,13 +44010,9 @@ class GovernancePolicyAddFoldersDetails(bb.Struct): __slots__ = [ '_governance_policy_id_value', - '_governance_policy_id_present', '_name_value', - '_name_present', '_policy_type_value', - '_policy_type_present', '_folders_value', - '_folders_present', ] _has_required_fields = True @@ -53030,14 +44022,10 @@ def __init__(self, name=None, policy_type=None, folders=None): - self._governance_policy_id_value = None - self._governance_policy_id_present = False - self._name_value = None - self._name_present = False - self._policy_type_value = None - self._policy_type_present = False - self._folders_value = None - self._folders_present = False + self._governance_policy_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._policy_type_value = bb.NOT_SET + self._folders_value = bb.NOT_SET if governance_policy_id is not None: self.governance_policy_id = governance_policy_id if name is not None: @@ -53047,162 +44035,43 @@ def __init__(self, if folders is not None: self.folders = folders - @property - def governance_policy_id(self): - """ - Policy ID. - - :rtype: str - """ - if self._governance_policy_id_present: - return self._governance_policy_id_value - else: - raise AttributeError("missing required field 'governance_policy_id'") - - @governance_policy_id.setter - def governance_policy_id(self, val): - val = self._governance_policy_id_validator.validate(val) - self._governance_policy_id_value = val - self._governance_policy_id_present = True - - @governance_policy_id.deleter - def governance_policy_id(self): - self._governance_policy_id_value = None - self._governance_policy_id_present = False + # Instance attribute type: str (validator is set below) + governance_policy_id = bb.Attribute("governance_policy_id") - @property - def name(self): - """ - Policy 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 - - @property - def policy_type(self): - """ - Policy type. - - :rtype: PolicyType - """ - if self._policy_type_present: - return self._policy_type_value - else: - return None - - @policy_type.setter - def policy_type(self, val): - if val is None: - del self.policy_type - return - self._policy_type_validator.validate_type_only(val) - self._policy_type_value = val - self._policy_type_present = True - - @policy_type.deleter - def policy_type(self): - self._policy_type_value = None - self._policy_type_present = False - - @property - def folders(self): - """ - Folders. - - :rtype: list of [str] - """ - if self._folders_present: - return self._folders_value - else: - return None + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - @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 + # Instance attribute type: PolicyType (validator is set below) + policy_type = bb.Attribute("policy_type", nullable=True, user_defined=True) - @folders.deleter - def folders(self): - self._folders_value = None - self._folders_present = False + # Instance attribute type: list of [str] (validator is set below) + folders = bb.Attribute("folders", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GovernancePolicyAddFoldersDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GovernancePolicyAddFoldersDetails(governance_policy_id={!r}, name={!r}, policy_type={!r}, folders={!r})'.format( - self._governance_policy_id_value, - self._name_value, - self._policy_type_value, - self._folders_value, - ) - GovernancePolicyAddFoldersDetails_validator = bv.Struct(GovernancePolicyAddFoldersDetails) class GovernancePolicyAddFoldersType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GovernancePolicyAddFoldersType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GovernancePolicyAddFoldersType(description={!r})'.format( - self._description_value, - ) - GovernancePolicyAddFoldersType_validator = bv.Struct(GovernancePolicyAddFoldersType) class GovernancePolicyCreateDetails(bb.Struct): @@ -53219,15 +44088,10 @@ class GovernancePolicyCreateDetails(bb.Struct): __slots__ = [ '_governance_policy_id_value', - '_governance_policy_id_present', '_name_value', - '_name_present', '_policy_type_value', - '_policy_type_present', '_duration_value', - '_duration_present', '_folders_value', - '_folders_present', ] _has_required_fields = True @@ -53238,16 +44102,11 @@ def __init__(self, duration=None, policy_type=None, folders=None): - self._governance_policy_id_value = None - self._governance_policy_id_present = False - self._name_value = None - self._name_present = False - self._policy_type_value = None - self._policy_type_present = False - self._duration_value = None - self._duration_present = False - self._folders_value = None - self._folders_present = False + self._governance_policy_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._policy_type_value = bb.NOT_SET + self._duration_value = bb.NOT_SET + self._folders_value = bb.NOT_SET if governance_policy_id is not None: self.governance_policy_id = governance_policy_id if name is not None: @@ -53259,186 +44118,46 @@ def __init__(self, if folders is not None: self.folders = folders - @property - def governance_policy_id(self): - """ - Policy ID. - - :rtype: str - """ - if self._governance_policy_id_present: - return self._governance_policy_id_value - else: - raise AttributeError("missing required field 'governance_policy_id'") - - @governance_policy_id.setter - def governance_policy_id(self, val): - val = self._governance_policy_id_validator.validate(val) - self._governance_policy_id_value = val - self._governance_policy_id_present = True - - @governance_policy_id.deleter - def governance_policy_id(self): - self._governance_policy_id_value = None - self._governance_policy_id_present = False - - @property - def name(self): - """ - Policy 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 + # Instance attribute type: str (validator is set below) + governance_policy_id = bb.Attribute("governance_policy_id") - @property - def policy_type(self): - """ - Policy type. - - :rtype: PolicyType - """ - if self._policy_type_present: - return self._policy_type_value - else: - return None - - @policy_type.setter - def policy_type(self, val): - if val is None: - del self.policy_type - return - self._policy_type_validator.validate_type_only(val) - self._policy_type_value = val - self._policy_type_present = True - - @policy_type.deleter - def policy_type(self): - self._policy_type_value = None - self._policy_type_present = False - - @property - def duration(self): - """ - Duration in days. + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - :rtype: DurationLogInfo - """ - if self._duration_present: - return self._duration_value - else: - raise AttributeError("missing required field 'duration'") - - @duration.setter - def duration(self, val): - self._duration_validator.validate_type_only(val) - self._duration_value = val - self._duration_present = True - - @duration.deleter - def duration(self): - self._duration_value = None - self._duration_present = False - - @property - def folders(self): - """ - Folders. - - :rtype: list of [str] - """ - if self._folders_present: - return self._folders_value - else: - return None + # Instance attribute type: PolicyType (validator is set below) + policy_type = bb.Attribute("policy_type", nullable=True, user_defined=True) - @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 + # Instance attribute type: DurationLogInfo (validator is set below) + duration = bb.Attribute("duration", user_defined=True) - @folders.deleter - def folders(self): - self._folders_value = None - self._folders_present = False + # Instance attribute type: list of [str] (validator is set below) + folders = bb.Attribute("folders", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GovernancePolicyCreateDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GovernancePolicyCreateDetails(governance_policy_id={!r}, name={!r}, duration={!r}, policy_type={!r}, folders={!r})'.format( - self._governance_policy_id_value, - self._name_value, - self._duration_value, - self._policy_type_value, - self._folders_value, - ) - GovernancePolicyCreateDetails_validator = bv.Struct(GovernancePolicyCreateDetails) class GovernancePolicyCreateType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GovernancePolicyCreateType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GovernancePolicyCreateType(description={!r})'.format( - self._description_value, - ) - GovernancePolicyCreateType_validator = bv.Struct(GovernancePolicyCreateType) class GovernancePolicyDeleteDetails(bb.Struct): @@ -53453,11 +44172,8 @@ class GovernancePolicyDeleteDetails(bb.Struct): __slots__ = [ '_governance_policy_id_value', - '_governance_policy_id_present', '_name_value', - '_name_present', '_policy_type_value', - '_policy_type_present', ] _has_required_fields = True @@ -53466,12 +44182,9 @@ def __init__(self, governance_policy_id=None, name=None, policy_type=None): - self._governance_policy_id_value = None - self._governance_policy_id_present = False - self._name_value = None - self._name_present = False - self._policy_type_value = None - self._policy_type_present = False + self._governance_policy_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._policy_type_value = bb.NOT_SET if governance_policy_id is not None: self.governance_policy_id = governance_policy_id if name is not None: @@ -53479,135 +44192,40 @@ def __init__(self, if policy_type is not None: self.policy_type = policy_type - @property - def governance_policy_id(self): - """ - Policy ID. - - :rtype: str - """ - if self._governance_policy_id_present: - return self._governance_policy_id_value - else: - raise AttributeError("missing required field 'governance_policy_id'") - - @governance_policy_id.setter - def governance_policy_id(self, val): - val = self._governance_policy_id_validator.validate(val) - self._governance_policy_id_value = val - self._governance_policy_id_present = True - - @governance_policy_id.deleter - def governance_policy_id(self): - self._governance_policy_id_value = None - self._governance_policy_id_present = False - - @property - def name(self): - """ - Policy 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 + # Instance attribute type: str (validator is set below) + governance_policy_id = bb.Attribute("governance_policy_id") - @property - def policy_type(self): - """ - Policy type. - - :rtype: PolicyType - """ - if self._policy_type_present: - return self._policy_type_value - else: - return None + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - @policy_type.setter - def policy_type(self, val): - if val is None: - del self.policy_type - return - self._policy_type_validator.validate_type_only(val) - self._policy_type_value = val - self._policy_type_present = True - - @policy_type.deleter - def policy_type(self): - self._policy_type_value = None - self._policy_type_present = False + # Instance attribute type: PolicyType (validator is set below) + policy_type = bb.Attribute("policy_type", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GovernancePolicyDeleteDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GovernancePolicyDeleteDetails(governance_policy_id={!r}, name={!r}, policy_type={!r})'.format( - self._governance_policy_id_value, - self._name_value, - self._policy_type_value, - ) - GovernancePolicyDeleteDetails_validator = bv.Struct(GovernancePolicyDeleteDetails) class GovernancePolicyDeleteType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GovernancePolicyDeleteType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GovernancePolicyDeleteType(description={!r})'.format( - self._description_value, - ) - GovernancePolicyDeleteType_validator = bv.Struct(GovernancePolicyDeleteType) class GovernancePolicyEditDetailsDetails(bb.Struct): @@ -53625,17 +44243,11 @@ class GovernancePolicyEditDetailsDetails(bb.Struct): __slots__ = [ '_governance_policy_id_value', - '_governance_policy_id_present', '_name_value', - '_name_present', '_policy_type_value', - '_policy_type_present', '_attribute_value', - '_attribute_present', '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -53647,18 +44259,12 @@ def __init__(self, previous_value=None, new_value=None, policy_type=None): - self._governance_policy_id_value = None - self._governance_policy_id_present = False - self._name_value = None - self._name_present = False - self._policy_type_value = None - self._policy_type_present = False - self._attribute_value = None - self._attribute_present = False - self._previous_value_value = None - self._previous_value_present = False - self._new_value_value = None - self._new_value_present = False + self._governance_policy_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._policy_type_value = bb.NOT_SET + self._attribute_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET if governance_policy_id is not None: self.governance_policy_id = governance_policy_id if name is not None: @@ -53672,207 +44278,49 @@ def __init__(self, if new_value is not None: self.new_value = new_value - @property - def governance_policy_id(self): - """ - Policy ID. - - :rtype: str - """ - if self._governance_policy_id_present: - return self._governance_policy_id_value - else: - raise AttributeError("missing required field 'governance_policy_id'") - - @governance_policy_id.setter - def governance_policy_id(self, val): - val = self._governance_policy_id_validator.validate(val) - self._governance_policy_id_value = val - self._governance_policy_id_present = True - - @governance_policy_id.deleter - def governance_policy_id(self): - self._governance_policy_id_value = None - self._governance_policy_id_present = False - - @property - def name(self): - """ - Policy 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 - - @property - def policy_type(self): - """ - Policy type. - - :rtype: PolicyType - """ - if self._policy_type_present: - return self._policy_type_value - else: - return None - - @policy_type.setter - def policy_type(self, val): - if val is None: - del self.policy_type - return - self._policy_type_validator.validate_type_only(val) - self._policy_type_value = val - self._policy_type_present = True - - @policy_type.deleter - def policy_type(self): - self._policy_type_value = None - self._policy_type_present = False - - @property - def attribute(self): - """ - Attribute. - - :rtype: str - """ - if self._attribute_present: - return self._attribute_value - else: - raise AttributeError("missing required field 'attribute'") - - @attribute.setter - def attribute(self, val): - val = self._attribute_validator.validate(val) - self._attribute_value = val - self._attribute_present = True + # Instance attribute type: str (validator is set below) + governance_policy_id = bb.Attribute("governance_policy_id") - @attribute.deleter - def attribute(self): - self._attribute_value = None - self._attribute_present = False + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - @property - def previous_value(self): - """ - From. - - :rtype: str - """ - if self._previous_value_present: - return self._previous_value_value - else: - raise AttributeError("missing required field 'previous_value'") + # Instance attribute type: PolicyType (validator is set below) + policy_type = bb.Attribute("policy_type", nullable=True, user_defined=True) - @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 + # Instance attribute type: str (validator is set below) + attribute = bb.Attribute("attribute") - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False - - @property - def new_value(self): - """ - To. - - :rtype: str - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") + # Instance attribute type: str (validator is set below) + previous_value = bb.Attribute("previous_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 + # Instance attribute type: str (validator is set below) + new_value = bb.Attribute("new_value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GovernancePolicyEditDetailsDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GovernancePolicyEditDetailsDetails(governance_policy_id={!r}, name={!r}, attribute={!r}, previous_value={!r}, new_value={!r}, policy_type={!r})'.format( - self._governance_policy_id_value, - self._name_value, - self._attribute_value, - self._previous_value_value, - self._new_value_value, - self._policy_type_value, - ) - GovernancePolicyEditDetailsDetails_validator = bv.Struct(GovernancePolicyEditDetailsDetails) class GovernancePolicyEditDetailsType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GovernancePolicyEditDetailsType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GovernancePolicyEditDetailsType(description={!r})'.format( - self._description_value, - ) - GovernancePolicyEditDetailsType_validator = bv.Struct(GovernancePolicyEditDetailsType) class GovernancePolicyEditDurationDetails(bb.Struct): @@ -53889,15 +44337,10 @@ class GovernancePolicyEditDurationDetails(bb.Struct): __slots__ = [ '_governance_policy_id_value', - '_governance_policy_id_present', '_name_value', - '_name_present', '_policy_type_value', - '_policy_type_present', '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -53908,16 +44351,11 @@ def __init__(self, previous_value=None, new_value=None, policy_type=None): - self._governance_policy_id_value = None - self._governance_policy_id_present = False - self._name_value = None - self._name_present = False - self._policy_type_value = None - self._policy_type_present = False - self._previous_value_value = None - self._previous_value_present = False - self._new_value_value = None - self._new_value_present = False + self._governance_policy_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._policy_type_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET if governance_policy_id is not None: self.governance_policy_id = governance_policy_id if name is not None: @@ -53929,183 +44367,46 @@ def __init__(self, if new_value is not None: self.new_value = new_value - @property - def governance_policy_id(self): - """ - Policy ID. - - :rtype: str - """ - if self._governance_policy_id_present: - return self._governance_policy_id_value - else: - raise AttributeError("missing required field 'governance_policy_id'") - - @governance_policy_id.setter - def governance_policy_id(self, val): - val = self._governance_policy_id_validator.validate(val) - self._governance_policy_id_value = val - self._governance_policy_id_present = True - - @governance_policy_id.deleter - def governance_policy_id(self): - self._governance_policy_id_value = None - self._governance_policy_id_present = False - - @property - def name(self): - """ - Policy 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 - - @property - def policy_type(self): - """ - Policy type. - - :rtype: PolicyType - """ - if self._policy_type_present: - return self._policy_type_value - else: - return None - - @policy_type.setter - def policy_type(self, val): - if val is None: - del self.policy_type - return - self._policy_type_validator.validate_type_only(val) - self._policy_type_value = val - self._policy_type_present = True + # Instance attribute type: str (validator is set below) + governance_policy_id = bb.Attribute("governance_policy_id") - @policy_type.deleter - def policy_type(self): - self._policy_type_value = None - self._policy_type_present = False + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - @property - def previous_value(self): - """ - From. - - :rtype: DurationLogInfo - """ - 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 + # Instance attribute type: PolicyType (validator is set below) + policy_type = bb.Attribute("policy_type", nullable=True, user_defined=True) - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False + # Instance attribute type: DurationLogInfo (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) - @property - def new_value(self): - """ - To. - - :rtype: DurationLogInfo - """ - 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 + # Instance attribute type: DurationLogInfo (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GovernancePolicyEditDurationDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GovernancePolicyEditDurationDetails(governance_policy_id={!r}, name={!r}, previous_value={!r}, new_value={!r}, policy_type={!r})'.format( - self._governance_policy_id_value, - self._name_value, - self._previous_value_value, - self._new_value_value, - self._policy_type_value, - ) - GovernancePolicyEditDurationDetails_validator = bv.Struct(GovernancePolicyEditDurationDetails) class GovernancePolicyEditDurationType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GovernancePolicyEditDurationType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GovernancePolicyEditDurationType(description={!r})'.format( - self._description_value, - ) - GovernancePolicyEditDurationType_validator = bv.Struct(GovernancePolicyEditDurationType) class GovernancePolicyRemoveFoldersDetails(bb.Struct): @@ -54123,15 +44424,10 @@ class GovernancePolicyRemoveFoldersDetails(bb.Struct): __slots__ = [ '_governance_policy_id_value', - '_governance_policy_id_present', '_name_value', - '_name_present', '_policy_type_value', - '_policy_type_present', '_folders_value', - '_folders_present', '_reason_value', - '_reason_present', ] _has_required_fields = True @@ -54142,16 +44438,11 @@ def __init__(self, policy_type=None, folders=None, reason=None): - self._governance_policy_id_value = None - self._governance_policy_id_present = False - self._name_value = None - self._name_present = False - self._policy_type_value = None - self._policy_type_present = False - self._folders_value = None - self._folders_present = False - self._reason_value = None - self._reason_present = False + self._governance_policy_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._policy_type_value = bb.NOT_SET + self._folders_value = bb.NOT_SET + self._reason_value = bb.NOT_SET if governance_policy_id is not None: self.governance_policy_id = governance_policy_id if name is not None: @@ -54163,189 +44454,46 @@ def __init__(self, if reason is not None: self.reason = reason - @property - def governance_policy_id(self): - """ - Policy ID. - - :rtype: str - """ - if self._governance_policy_id_present: - return self._governance_policy_id_value - else: - raise AttributeError("missing required field 'governance_policy_id'") - - @governance_policy_id.setter - def governance_policy_id(self, val): - val = self._governance_policy_id_validator.validate(val) - self._governance_policy_id_value = val - self._governance_policy_id_present = True - - @governance_policy_id.deleter - def governance_policy_id(self): - self._governance_policy_id_value = None - self._governance_policy_id_present = False - - @property - def name(self): - """ - Policy name. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") + # Instance attribute type: str (validator is set below) + governance_policy_id = bb.Attribute("governance_policy_id") - @name.setter - def name(self, val): - val = self._name_validator.validate(val) - self._name_value = val - self._name_present = True + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - @name.deleter - def name(self): - self._name_value = None - self._name_present = False + # Instance attribute type: PolicyType (validator is set below) + policy_type = bb.Attribute("policy_type", nullable=True, user_defined=True) - @property - def policy_type(self): - """ - Policy type. - - :rtype: PolicyType - """ - if self._policy_type_present: - return self._policy_type_value - else: - return None - - @policy_type.setter - def policy_type(self, val): - if val is None: - del self.policy_type - return - self._policy_type_validator.validate_type_only(val) - self._policy_type_value = val - self._policy_type_present = True + # Instance attribute type: list of [str] (validator is set below) + folders = bb.Attribute("folders", nullable=True) - @policy_type.deleter - def policy_type(self): - self._policy_type_value = None - self._policy_type_present = False - - @property - def folders(self): - """ - Folders. - - :rtype: list of [str] - """ - 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 - - @property - def reason(self): - """ - Reason. - - :rtype: str - """ - 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 - val = self._reason_validator.validate(val) - self._reason_value = val - self._reason_present = True - - @reason.deleter - def reason(self): - self._reason_value = None - self._reason_present = False + # Instance attribute type: str (validator is set below) + reason = bb.Attribute("reason", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GovernancePolicyRemoveFoldersDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GovernancePolicyRemoveFoldersDetails(governance_policy_id={!r}, name={!r}, policy_type={!r}, folders={!r}, reason={!r})'.format( - self._governance_policy_id_value, - self._name_value, - self._policy_type_value, - self._folders_value, - self._reason_value, - ) - GovernancePolicyRemoveFoldersDetails_validator = bv.Struct(GovernancePolicyRemoveFoldersDetails) class GovernancePolicyRemoveFoldersType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GovernancePolicyRemoveFoldersType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GovernancePolicyRemoveFoldersType(description={!r})'.format( - self._description_value, - ) - GovernancePolicyRemoveFoldersType_validator = bv.Struct(GovernancePolicyRemoveFoldersType) class GroupAddExternalIdDetails(bb.Struct): @@ -54357,96 +44505,44 @@ class GroupAddExternalIdDetails(bb.Struct): __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 + self._new_value_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + new_value = bb.Attribute("new_value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupAddExternalIdDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupAddExternalIdDetails(new_value={!r})'.format( - self._new_value_value, - ) - GroupAddExternalIdDetails_validator = bv.Struct(GroupAddExternalIdDetails) class GroupAddExternalIdType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupAddExternalIdType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupAddExternalIdType(description={!r})'.format( - self._description_value, - ) - GroupAddExternalIdType_validator = bv.Struct(GroupAddExternalIdType) class GroupAddMemberDetails(bb.Struct): @@ -54458,96 +44554,44 @@ class GroupAddMemberDetails(bb.Struct): __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 + self._is_group_owner_value = bb.NOT_SET 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 + # Instance attribute type: bool (validator is set below) + is_group_owner = bb.Attribute("is_group_owner") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupAddMemberDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupAddMemberDetails(is_group_owner={!r})'.format( - self._is_group_owner_value, - ) - GroupAddMemberDetails_validator = bv.Struct(GroupAddMemberDetails) class GroupAddMemberType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupAddMemberType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupAddMemberType(description={!r})'.format( - self._description_value, - ) - GroupAddMemberType_validator = bv.Struct(GroupAddMemberType) class GroupChangeExternalIdDetails(bb.Struct): @@ -54560,9 +44604,7 @@ class GroupChangeExternalIdDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -54570,117 +44612,44 @@ class GroupChangeExternalIdDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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. + # Instance attribute type: str (validator is set below) + new_value = bb.Attribute("new_value") - :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 + # Instance attribute type: str (validator is set below) + previous_value = bb.Attribute("previous_value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupChangeExternalIdDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 GroupChangeExternalIdType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupChangeExternalIdType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupChangeExternalIdType(description={!r})'.format( - self._description_value, - ) - GroupChangeExternalIdType_validator = bv.Struct(GroupChangeExternalIdType) class GroupChangeManagementTypeDetails(bb.Struct): @@ -54695,9 +44664,7 @@ class GroupChangeManagementTypeDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -54705,121 +44672,44 @@ class GroupChangeManagementTypeDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 - """ - 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 - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None + # Instance attribute type: team_common.GroupManagementType (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @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 + # Instance attribute type: team_common.GroupManagementType (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupChangeManagementTypeDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 GroupChangeManagementTypeType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupChangeManagementTypeType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupChangeManagementTypeType(description={!r})'.format( - self._description_value, - ) - GroupChangeManagementTypeType_validator = bv.Struct(GroupChangeManagementTypeType) class GroupChangeMemberRoleDetails(bb.Struct): @@ -54831,96 +44721,44 @@ class GroupChangeMemberRoleDetails(bb.Struct): __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 + self._is_group_owner_value = bb.NOT_SET 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 + # Instance attribute type: bool (validator is set below) + is_group_owner = bb.Attribute("is_group_owner") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupChangeMemberRoleDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupChangeMemberRoleDetails(is_group_owner={!r})'.format( - self._is_group_owner_value, - ) - GroupChangeMemberRoleDetails_validator = bv.Struct(GroupChangeMemberRoleDetails) class GroupChangeMemberRoleType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupChangeMemberRoleType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupChangeMemberRoleType(description={!r})'.format( - self._description_value, - ) - GroupChangeMemberRoleType_validator = bv.Struct(GroupChangeMemberRoleType) class GroupCreateDetails(bb.Struct): @@ -54934,9 +44772,7 @@ class GroupCreateDetails(bb.Struct): __slots__ = [ '_is_company_managed_value', - '_is_company_managed_present', '_join_policy_value', - '_join_policy_present', ] _has_required_fields = False @@ -54944,123 +44780,44 @@ class GroupCreateDetails(bb.Struct): def __init__(self, is_company_managed=None, join_policy=None): - self._is_company_managed_value = None - self._is_company_managed_present = False - self._join_policy_value = None - self._join_policy_present = False + self._is_company_managed_value = bb.NOT_SET + self._join_policy_value = bb.NOT_SET 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. + # Instance attribute type: bool (validator is set below) + is_company_managed = bb.Attribute("is_company_managed", nullable=True) - :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: - return None - - @join_policy.setter - def join_policy(self, val): - if val is None: - del self.join_policy - return - 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 + # Instance attribute type: GroupJoinPolicy (validator is set below) + join_policy = bb.Attribute("join_policy", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupCreateDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupCreateDetails(is_company_managed={!r}, join_policy={!r})'.format( - self._is_company_managed_value, - self._join_policy_value, - ) - GroupCreateDetails_validator = bv.Struct(GroupCreateDetails) class GroupCreateType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupCreateType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupCreateType(description={!r})'.format( - self._description_value, - ) - GroupCreateType_validator = bv.Struct(GroupCreateType) class GroupDeleteDetails(bb.Struct): @@ -55073,99 +44830,44 @@ class GroupDeleteDetails(bb.Struct): __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 + self._is_company_managed_value = bb.NOT_SET 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 + # Instance attribute type: bool (validator is set below) + is_company_managed = bb.Attribute("is_company_managed", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupDeleteDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupDeleteDetails(is_company_managed={!r})'.format( - self._is_company_managed_value, - ) - GroupDeleteDetails_validator = bv.Struct(GroupDeleteDetails) class GroupDeleteType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupDeleteType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupDeleteType(description={!r})'.format( - self._description_value, - ) - GroupDeleteType_validator = bv.Struct(GroupDeleteType) class GroupDescriptionUpdatedDetails(bb.Struct): @@ -55184,56 +44886,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupDescriptionUpdatedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupDescriptionUpdatedDetails()' - GroupDescriptionUpdatedDetails_validator = bv.Struct(GroupDescriptionUpdatedDetails) class GroupDescriptionUpdatedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupDescriptionUpdatedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupDescriptionUpdatedType(description={!r})'.format( - self._description_value, - ) - GroupDescriptionUpdatedType_validator = bv.Struct(GroupDescriptionUpdatedType) class GroupJoinPolicy(bb.Union): @@ -55278,9 +44952,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupJoinPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupJoinPolicy(%r, %r)' % (self._tag, self._value) - GroupJoinPolicy_validator = bv.Union(GroupJoinPolicy) class GroupJoinPolicyUpdatedDetails(bb.Struct): @@ -55294,9 +44965,7 @@ class GroupJoinPolicyUpdatedDetails(bb.Struct): __slots__ = [ '_is_company_managed_value', - '_is_company_managed_present', '_join_policy_value', - '_join_policy_present', ] _has_required_fields = False @@ -55304,123 +44973,44 @@ class GroupJoinPolicyUpdatedDetails(bb.Struct): def __init__(self, is_company_managed=None, join_policy=None): - self._is_company_managed_value = None - self._is_company_managed_present = False - self._join_policy_value = None - self._join_policy_present = False + self._is_company_managed_value = bb.NOT_SET + self._join_policy_value = bb.NOT_SET 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: - return None - - @join_policy.setter - def join_policy(self, val): - if val is None: - del self.join_policy - return - self._join_policy_validator.validate_type_only(val) - self._join_policy_value = val - self._join_policy_present = True + # Instance attribute type: bool (validator is set below) + is_company_managed = bb.Attribute("is_company_managed", nullable=True) - @join_policy.deleter - def join_policy(self): - self._join_policy_value = None - self._join_policy_present = False + # Instance attribute type: GroupJoinPolicy (validator is set below) + join_policy = bb.Attribute("join_policy", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupJoinPolicyUpdatedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupJoinPolicyUpdatedDetails(is_company_managed={!r}, join_policy={!r})'.format( - self._is_company_managed_value, - self._join_policy_value, - ) - GroupJoinPolicyUpdatedDetails_validator = bv.Struct(GroupJoinPolicyUpdatedDetails) class GroupJoinPolicyUpdatedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupJoinPolicyUpdatedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupJoinPolicyUpdatedType(description={!r})'.format( - self._description_value, - ) - GroupJoinPolicyUpdatedType_validator = bv.Struct(GroupJoinPolicyUpdatedType) class GroupLogInfo(bb.Struct): @@ -55436,11 +45026,8 @@ class GroupLogInfo(bb.Struct): __slots__ = [ '_group_id_value', - '_group_id_present', '_display_name_value', - '_display_name_present', '_external_id_value', - '_external_id_present', ] _has_required_fields = True @@ -55449,12 +45036,9 @@ 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 + self._group_id_value = bb.NOT_SET + self._display_name_value = bb.NOT_SET + self._external_id_value = bb.NOT_SET if group_id is not None: self.group_id = group_id if display_name is not None: @@ -55462,92 +45046,18 @@ def __init__(self, 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. + # Instance attribute type: str (validator is set below) + group_id = bb.Attribute("group_id", nullable=True) - :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 + # Instance attribute type: str (validator is set below) + display_name = bb.Attribute("display_name") - @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 + # Instance attribute type: str (validator is set below) + external_id = bb.Attribute("external_id", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -55566,56 +45076,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupMovedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupMovedDetails()' - GroupMovedDetails_validator = bv.Struct(GroupMovedDetails) class GroupMovedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupMovedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupMovedType(description={!r})'.format( - self._description_value, - ) - GroupMovedType_validator = bv.Struct(GroupMovedType) class GroupRemoveExternalIdDetails(bb.Struct): @@ -55627,96 +45109,44 @@ class GroupRemoveExternalIdDetails(bb.Struct): __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 + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + previous_value = bb.Attribute("previous_value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupRemoveExternalIdDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupRemoveExternalIdDetails(previous_value={!r})'.format( - self._previous_value_value, - ) - GroupRemoveExternalIdDetails_validator = bv.Struct(GroupRemoveExternalIdDetails) class GroupRemoveExternalIdType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupRemoveExternalIdType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupRemoveExternalIdType(description={!r})'.format( - self._description_value, - ) - GroupRemoveExternalIdType_validator = bv.Struct(GroupRemoveExternalIdType) class GroupRemoveMemberDetails(bb.Struct): @@ -55735,56 +45165,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupRemoveMemberDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupRemoveMemberDetails()' - GroupRemoveMemberDetails_validator = bv.Struct(GroupRemoveMemberDetails) class GroupRemoveMemberType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupRemoveMemberType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupRemoveMemberType(description={!r})'.format( - self._description_value, - ) - GroupRemoveMemberType_validator = bv.Struct(GroupRemoveMemberType) class GroupRenameDetails(bb.Struct): @@ -55797,9 +45199,7 @@ class GroupRenameDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -55807,117 +45207,44 @@ class GroupRenameDetails(bb.Struct): 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 + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + previous_value = bb.Attribute("previous_value") - @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 + # Instance attribute type: str (validator is set below) + new_value = bb.Attribute("new_value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupRenameDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 GroupRenameType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupRenameType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupRenameType(description={!r})'.format( - self._description_value, - ) - GroupRenameType_validator = bv.Struct(GroupRenameType) class GroupUserManagementChangePolicyDetails(bb.Struct): @@ -55933,9 +45260,7 @@ class GroupUserManagementChangePolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -55943,121 +45268,44 @@ class GroupUserManagementChangePolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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: team_policies.GroupCreation - """ - 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 + # Instance attribute type: team_policies.GroupCreation (validator is set below) + new_value = bb.Attribute("new_value", user_defined=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: team_policies.GroupCreation - """ - 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 + # Instance attribute type: team_policies.GroupCreation (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupUserManagementChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 GroupUserManagementChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupUserManagementChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupUserManagementChangePolicyType(description={!r})'.format( - self._description_value, - ) - GroupUserManagementChangePolicyType_validator = bv.Struct(GroupUserManagementChangePolicyType) class GuestAdminChangeStatusDetails(bb.Struct): @@ -56078,17 +45326,11 @@ class GuestAdminChangeStatusDetails(bb.Struct): __slots__ = [ '_is_guest_value', - '_is_guest_present', '_guest_team_name_value', - '_guest_team_name_present', '_host_team_name_value', - '_host_team_name_present', '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', '_action_details_value', - '_action_details_present', ] _has_required_fields = True @@ -56100,18 +45342,12 @@ def __init__(self, action_details=None, guest_team_name=None, host_team_name=None): - self._is_guest_value = None - self._is_guest_present = False - self._guest_team_name_value = None - self._guest_team_name_present = False - self._host_team_name_value = None - self._host_team_name_present = False - self._previous_value_value = None - self._previous_value_present = False - self._new_value_value = None - self._new_value_present = False - self._action_details_value = None - self._action_details_present = False + self._is_guest_value = bb.NOT_SET + self._guest_team_name_value = bb.NOT_SET + self._host_team_name_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET + self._action_details_value = bb.NOT_SET if is_guest is not None: self.is_guest = is_guest if guest_team_name is not None: @@ -56125,210 +45361,49 @@ def __init__(self, if action_details is not None: self.action_details = action_details - @property - def is_guest(self): - """ - True for guest, false for host. - - :rtype: bool - """ - if self._is_guest_present: - return self._is_guest_value - else: - raise AttributeError("missing required field 'is_guest'") - - @is_guest.setter - def is_guest(self, val): - val = self._is_guest_validator.validate(val) - self._is_guest_value = val - self._is_guest_present = True + # Instance attribute type: bool (validator is set below) + is_guest = bb.Attribute("is_guest") - @is_guest.deleter - def is_guest(self): - self._is_guest_value = None - self._is_guest_present = False + # Instance attribute type: str (validator is set below) + guest_team_name = bb.Attribute("guest_team_name", nullable=True) - @property - def guest_team_name(self): - """ - The name of the guest team. + # Instance attribute type: str (validator is set below) + host_team_name = bb.Attribute("host_team_name", nullable=True) - :rtype: str - """ - if self._guest_team_name_present: - return self._guest_team_name_value - else: - return None + # Instance attribute type: TrustedTeamsRequestState (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) - @guest_team_name.setter - def guest_team_name(self, val): - if val is None: - del self.guest_team_name - return - val = self._guest_team_name_validator.validate(val) - self._guest_team_name_value = val - self._guest_team_name_present = True + # Instance attribute type: TrustedTeamsRequestState (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @guest_team_name.deleter - def guest_team_name(self): - self._guest_team_name_value = None - self._guest_team_name_present = False - - @property - def host_team_name(self): - """ - The name of the host team. - - :rtype: str - """ - if self._host_team_name_present: - return self._host_team_name_value - else: - return None - - @host_team_name.setter - def host_team_name(self, val): - if val is None: - del self.host_team_name - return - val = self._host_team_name_validator.validate(val) - self._host_team_name_value = val - self._host_team_name_present = True - - @host_team_name.deleter - def host_team_name(self): - self._host_team_name_value = None - self._host_team_name_present = False - - @property - def previous_value(self): - """ - Previous request state. - - :rtype: TrustedTeamsRequestState - """ - 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 request state. - - :rtype: TrustedTeamsRequestState - """ - 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 action_details(self): - """ - Action details. - - :rtype: TrustedTeamsRequestAction - """ - if self._action_details_present: - return self._action_details_value - else: - raise AttributeError("missing required field 'action_details'") - - @action_details.setter - def action_details(self, val): - self._action_details_validator.validate_type_only(val) - self._action_details_value = val - self._action_details_present = True - - @action_details.deleter - def action_details(self): - self._action_details_value = None - self._action_details_present = False + # Instance attribute type: TrustedTeamsRequestAction (validator is set below) + action_details = bb.Attribute("action_details", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GuestAdminChangeStatusDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GuestAdminChangeStatusDetails(is_guest={!r}, previous_value={!r}, new_value={!r}, action_details={!r}, guest_team_name={!r}, host_team_name={!r})'.format( - self._is_guest_value, - self._previous_value_value, - self._new_value_value, - self._action_details_value, - self._guest_team_name_value, - self._host_team_name_value, - ) - GuestAdminChangeStatusDetails_validator = bv.Struct(GuestAdminChangeStatusDetails) class GuestAdminChangeStatusType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GuestAdminChangeStatusType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GuestAdminChangeStatusType(description={!r})'.format( - self._description_value, - ) - GuestAdminChangeStatusType_validator = bv.Struct(GuestAdminChangeStatusType) class GuestAdminSignedInViaTrustedTeamsDetails(bb.Struct): @@ -56343,9 +45418,7 @@ class GuestAdminSignedInViaTrustedTeamsDetails(bb.Struct): __slots__ = [ '_team_name_value', - '_team_name_present', '_trusted_team_name_value', - '_trusted_team_name_present', ] _has_required_fields = False @@ -56353,123 +45426,44 @@ class GuestAdminSignedInViaTrustedTeamsDetails(bb.Struct): def __init__(self, team_name=None, trusted_team_name=None): - self._team_name_value = None - self._team_name_present = False - self._trusted_team_name_value = None - self._trusted_team_name_present = False + self._team_name_value = bb.NOT_SET + self._trusted_team_name_value = bb.NOT_SET if team_name is not None: self.team_name = team_name if trusted_team_name is not None: self.trusted_team_name = trusted_team_name - @property - def team_name(self): - """ - Host team name. - - :rtype: str - """ - if self._team_name_present: - return self._team_name_value - else: - return None - - @team_name.setter - def team_name(self, val): - if val is None: - del self.team_name - return - 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 - - @property - def trusted_team_name(self): - """ - Trusted team name. - - :rtype: str - """ - if self._trusted_team_name_present: - return self._trusted_team_name_value - else: - return None - - @trusted_team_name.setter - def trusted_team_name(self, val): - if val is None: - del self.trusted_team_name - return - val = self._trusted_team_name_validator.validate(val) - self._trusted_team_name_value = val - self._trusted_team_name_present = True + # Instance attribute type: str (validator is set below) + team_name = bb.Attribute("team_name", nullable=True) - @trusted_team_name.deleter - def trusted_team_name(self): - self._trusted_team_name_value = None - self._trusted_team_name_present = False + # Instance attribute type: str (validator is set below) + trusted_team_name = bb.Attribute("trusted_team_name", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GuestAdminSignedInViaTrustedTeamsDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GuestAdminSignedInViaTrustedTeamsDetails(team_name={!r}, trusted_team_name={!r})'.format( - self._team_name_value, - self._trusted_team_name_value, - ) - GuestAdminSignedInViaTrustedTeamsDetails_validator = bv.Struct(GuestAdminSignedInViaTrustedTeamsDetails) class GuestAdminSignedInViaTrustedTeamsType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GuestAdminSignedInViaTrustedTeamsType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GuestAdminSignedInViaTrustedTeamsType(description={!r})'.format( - self._description_value, - ) - GuestAdminSignedInViaTrustedTeamsType_validator = bv.Struct(GuestAdminSignedInViaTrustedTeamsType) class GuestAdminSignedOutViaTrustedTeamsDetails(bb.Struct): @@ -56484,9 +45478,7 @@ class GuestAdminSignedOutViaTrustedTeamsDetails(bb.Struct): __slots__ = [ '_team_name_value', - '_team_name_present', '_trusted_team_name_value', - '_trusted_team_name_present', ] _has_required_fields = False @@ -56494,123 +45486,44 @@ class GuestAdminSignedOutViaTrustedTeamsDetails(bb.Struct): def __init__(self, team_name=None, trusted_team_name=None): - self._team_name_value = None - self._team_name_present = False - self._trusted_team_name_value = None - self._trusted_team_name_present = False + self._team_name_value = bb.NOT_SET + self._trusted_team_name_value = bb.NOT_SET if team_name is not None: self.team_name = team_name if trusted_team_name is not None: self.trusted_team_name = trusted_team_name - @property - def team_name(self): - """ - Host team name. - - :rtype: str - """ - if self._team_name_present: - return self._team_name_value - else: - return None - - @team_name.setter - def team_name(self, val): - if val is None: - del self.team_name - return - 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 + # Instance attribute type: str (validator is set below) + team_name = bb.Attribute("team_name", nullable=True) - @property - def trusted_team_name(self): - """ - Trusted team name. - - :rtype: str - """ - if self._trusted_team_name_present: - return self._trusted_team_name_value - else: - return None - - @trusted_team_name.setter - def trusted_team_name(self, val): - if val is None: - del self.trusted_team_name - return - val = self._trusted_team_name_validator.validate(val) - self._trusted_team_name_value = val - self._trusted_team_name_present = True - - @trusted_team_name.deleter - def trusted_team_name(self): - self._trusted_team_name_value = None - self._trusted_team_name_present = False + # Instance attribute type: str (validator is set below) + trusted_team_name = bb.Attribute("trusted_team_name", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(GuestAdminSignedOutViaTrustedTeamsDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GuestAdminSignedOutViaTrustedTeamsDetails(team_name={!r}, trusted_team_name={!r})'.format( - self._team_name_value, - self._trusted_team_name_value, - ) - GuestAdminSignedOutViaTrustedTeamsDetails_validator = bv.Struct(GuestAdminSignedOutViaTrustedTeamsDetails) class GuestAdminSignedOutViaTrustedTeamsType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GuestAdminSignedOutViaTrustedTeamsType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GuestAdminSignedOutViaTrustedTeamsType(description={!r})'.format( - self._description_value, - ) - GuestAdminSignedOutViaTrustedTeamsType_validator = bv.Struct(GuestAdminSignedOutViaTrustedTeamsType) class IdentifierType(bb.Union): @@ -56655,9 +45568,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(IdentifierType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'IdentifierType(%r, %r)' % (self._tag, self._value) - IdentifierType_validator = bv.Union(IdentifierType) class IntegrationConnectedDetails(bb.Struct): @@ -56670,96 +45580,44 @@ class IntegrationConnectedDetails(bb.Struct): __slots__ = [ '_integration_name_value', - '_integration_name_present', ] _has_required_fields = True def __init__(self, integration_name=None): - self._integration_name_value = None - self._integration_name_present = False + self._integration_name_value = bb.NOT_SET if integration_name is not None: self.integration_name = integration_name - @property - def integration_name(self): - """ - Name of the third-party integration. - - :rtype: str - """ - if self._integration_name_present: - return self._integration_name_value - else: - raise AttributeError("missing required field 'integration_name'") - - @integration_name.setter - def integration_name(self, val): - val = self._integration_name_validator.validate(val) - self._integration_name_value = val - self._integration_name_present = True - - @integration_name.deleter - def integration_name(self): - self._integration_name_value = None - self._integration_name_present = False + # Instance attribute type: str (validator is set below) + integration_name = bb.Attribute("integration_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(IntegrationConnectedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'IntegrationConnectedDetails(integration_name={!r})'.format( - self._integration_name_value, - ) - IntegrationConnectedDetails_validator = bv.Struct(IntegrationConnectedDetails) class IntegrationConnectedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(IntegrationConnectedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'IntegrationConnectedType(description={!r})'.format( - self._description_value, - ) - IntegrationConnectedType_validator = bv.Struct(IntegrationConnectedType) class IntegrationDisconnectedDetails(bb.Struct): @@ -56772,96 +45630,44 @@ class IntegrationDisconnectedDetails(bb.Struct): __slots__ = [ '_integration_name_value', - '_integration_name_present', ] _has_required_fields = True def __init__(self, integration_name=None): - self._integration_name_value = None - self._integration_name_present = False + self._integration_name_value = bb.NOT_SET if integration_name is not None: self.integration_name = integration_name - @property - def integration_name(self): - """ - Name of the third-party integration. - - :rtype: str - """ - if self._integration_name_present: - return self._integration_name_value - else: - raise AttributeError("missing required field 'integration_name'") - - @integration_name.setter - def integration_name(self, val): - val = self._integration_name_validator.validate(val) - self._integration_name_value = val - self._integration_name_present = True - - @integration_name.deleter - def integration_name(self): - self._integration_name_value = None - self._integration_name_present = False + # Instance attribute type: str (validator is set below) + integration_name = bb.Attribute("integration_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(IntegrationDisconnectedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'IntegrationDisconnectedDetails(integration_name={!r})'.format( - self._integration_name_value, - ) - IntegrationDisconnectedDetails_validator = bv.Struct(IntegrationDisconnectedDetails) class IntegrationDisconnectedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(IntegrationDisconnectedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'IntegrationDisconnectedType(description={!r})'.format( - self._description_value, - ) - IntegrationDisconnectedType_validator = bv.Struct(IntegrationDisconnectedType) class IntegrationPolicy(bb.Union): @@ -56909,9 +45715,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(IntegrationPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'IntegrationPolicy(%r, %r)' % (self._tag, self._value) - IntegrationPolicy_validator = bv.Union(IntegrationPolicy) class IntegrationPolicyChangedDetails(bb.Struct): @@ -56928,11 +45731,8 @@ class IntegrationPolicyChangedDetails(bb.Struct): __slots__ = [ '_integration_name_value', - '_integration_name_present', '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -56941,12 +45741,9 @@ def __init__(self, integration_name=None, new_value=None, previous_value=None): - self._integration_name_value = None - self._integration_name_present = False - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False + self._integration_name_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET if integration_name is not None: self.integration_name = integration_name if new_value is not None: @@ -56954,132 +45751,40 @@ def __init__(self, if previous_value is not None: self.previous_value = previous_value - @property - def integration_name(self): - """ - Name of the third-party integration. - - :rtype: str - """ - if self._integration_name_present: - return self._integration_name_value - else: - raise AttributeError("missing required field 'integration_name'") - - @integration_name.setter - def integration_name(self, val): - val = self._integration_name_validator.validate(val) - self._integration_name_value = val - self._integration_name_present = True - - @integration_name.deleter - def integration_name(self): - self._integration_name_value = None - self._integration_name_present = False - - @property - def new_value(self): - """ - New integration policy. - - :rtype: IntegrationPolicy - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") + # Instance attribute type: str (validator is set below) + integration_name = bb.Attribute("integration_name") - @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 + # Instance attribute type: IntegrationPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous integration policy. - - :rtype: IntegrationPolicy - """ - 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 + # Instance attribute type: IntegrationPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(IntegrationPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'IntegrationPolicyChangedDetails(integration_name={!r}, new_value={!r}, previous_value={!r})'.format( - self._integration_name_value, - self._new_value_value, - self._previous_value_value, - ) - IntegrationPolicyChangedDetails_validator = bv.Struct(IntegrationPolicyChangedDetails) class IntegrationPolicyChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(IntegrationPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'IntegrationPolicyChangedType(description={!r})'.format( - self._description_value, - ) - IntegrationPolicyChangedType_validator = bv.Struct(IntegrationPolicyChangedType) class InviteMethod(bb.Union): @@ -57144,9 +45849,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(InviteMethod, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'InviteMethod(%r, %r)' % (self._tag, self._value) - InviteMethod_validator = bv.Union(InviteMethod) class JoinTeamDetails(bb.Struct): @@ -57178,23 +45880,14 @@ class JoinTeamDetails(bb.Struct): __slots__ = [ '_linked_apps_value', - '_linked_apps_present', '_linked_devices_value', - '_linked_devices_present', '_linked_shared_folders_value', - '_linked_shared_folders_present', '_was_linked_apps_truncated_value', - '_was_linked_apps_truncated_present', '_was_linked_devices_truncated_value', - '_was_linked_devices_truncated_present', '_was_linked_shared_folders_truncated_value', - '_was_linked_shared_folders_truncated_present', '_has_linked_apps_value', - '_has_linked_apps_present', '_has_linked_devices_value', - '_has_linked_devices_present', '_has_linked_shared_folders_value', - '_has_linked_shared_folders_present', ] _has_required_fields = True @@ -57209,24 +45902,15 @@ def __init__(self, has_linked_apps=None, has_linked_devices=None, has_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 - self._was_linked_apps_truncated_value = None - self._was_linked_apps_truncated_present = False - self._was_linked_devices_truncated_value = None - self._was_linked_devices_truncated_present = False - self._was_linked_shared_folders_truncated_value = None - self._was_linked_shared_folders_truncated_present = False - self._has_linked_apps_value = None - self._has_linked_apps_present = False - self._has_linked_devices_value = None - self._has_linked_devices_present = False - self._has_linked_shared_folders_value = None - self._has_linked_shared_folders_present = False + self._linked_apps_value = bb.NOT_SET + self._linked_devices_value = bb.NOT_SET + self._linked_shared_folders_value = bb.NOT_SET + self._was_linked_apps_truncated_value = bb.NOT_SET + self._was_linked_devices_truncated_value = bb.NOT_SET + self._was_linked_shared_folders_truncated_value = bb.NOT_SET + self._has_linked_apps_value = bb.NOT_SET + self._has_linked_devices_value = bb.NOT_SET + self._has_linked_shared_folders_value = bb.NOT_SET if linked_apps is not None: self.linked_apps = linked_apps if linked_devices is not None: @@ -57246,253 +45930,36 @@ def __init__(self, if has_linked_shared_folders is not None: self.has_linked_shared_folders = has_linked_shared_folders - @property - def linked_apps(self): - """ - Linked applications. (Deprecated) Please use has_linked_apps boolean - field instead. - - :rtype: list of [UserLinkedAppLogInfo] - """ - 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. (Deprecated) Please use has_linked_devices boolean field - instead. - - :rtype: list of [LinkedDeviceLogInfo] - """ - 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. (Deprecated) Please use has_linked_shared_folders - boolean field instead. - - :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 - - @property - def was_linked_apps_truncated(self): - """ - (Deprecated) True if the linked_apps list was truncated to the maximum - supported length (50). - - :rtype: bool - """ - if self._was_linked_apps_truncated_present: - return self._was_linked_apps_truncated_value - else: - return None - - @was_linked_apps_truncated.setter - def was_linked_apps_truncated(self, val): - if val is None: - del self.was_linked_apps_truncated - return - val = self._was_linked_apps_truncated_validator.validate(val) - self._was_linked_apps_truncated_value = val - self._was_linked_apps_truncated_present = True - - @was_linked_apps_truncated.deleter - def was_linked_apps_truncated(self): - self._was_linked_apps_truncated_value = None - self._was_linked_apps_truncated_present = False - - @property - def was_linked_devices_truncated(self): - """ - (Deprecated) True if the linked_devices list was truncated to the - maximum supported length (50). - - :rtype: bool - """ - if self._was_linked_devices_truncated_present: - return self._was_linked_devices_truncated_value - else: - return None - - @was_linked_devices_truncated.setter - def was_linked_devices_truncated(self, val): - if val is None: - del self.was_linked_devices_truncated - return - val = self._was_linked_devices_truncated_validator.validate(val) - self._was_linked_devices_truncated_value = val - self._was_linked_devices_truncated_present = True - - @was_linked_devices_truncated.deleter - def was_linked_devices_truncated(self): - self._was_linked_devices_truncated_value = None - self._was_linked_devices_truncated_present = False - - @property - def was_linked_shared_folders_truncated(self): - """ - (Deprecated) True if the linked_shared_folders list was truncated to the - maximum supported length (50). - - :rtype: bool - """ - if self._was_linked_shared_folders_truncated_present: - return self._was_linked_shared_folders_truncated_value - else: - return None + # Instance attribute type: list of [UserLinkedAppLogInfo] (validator is set below) + linked_apps = bb.Attribute("linked_apps") - @was_linked_shared_folders_truncated.setter - def was_linked_shared_folders_truncated(self, val): - if val is None: - del self.was_linked_shared_folders_truncated - return - val = self._was_linked_shared_folders_truncated_validator.validate(val) - self._was_linked_shared_folders_truncated_value = val - self._was_linked_shared_folders_truncated_present = True + # Instance attribute type: list of [LinkedDeviceLogInfo] (validator is set below) + linked_devices = bb.Attribute("linked_devices") - @was_linked_shared_folders_truncated.deleter - def was_linked_shared_folders_truncated(self): - self._was_linked_shared_folders_truncated_value = None - self._was_linked_shared_folders_truncated_present = False + # Instance attribute type: list of [FolderLogInfo] (validator is set below) + linked_shared_folders = bb.Attribute("linked_shared_folders") - @property - def has_linked_apps(self): - """ - True if the user had linked apps at event time. + # Instance attribute type: bool (validator is set below) + was_linked_apps_truncated = bb.Attribute("was_linked_apps_truncated", nullable=True) - :rtype: bool - """ - if self._has_linked_apps_present: - return self._has_linked_apps_value - else: - return None - - @has_linked_apps.setter - def has_linked_apps(self, val): - if val is None: - del self.has_linked_apps - return - val = self._has_linked_apps_validator.validate(val) - self._has_linked_apps_value = val - self._has_linked_apps_present = True + # Instance attribute type: bool (validator is set below) + was_linked_devices_truncated = bb.Attribute("was_linked_devices_truncated", nullable=True) - @has_linked_apps.deleter - def has_linked_apps(self): - self._has_linked_apps_value = None - self._has_linked_apps_present = False + # Instance attribute type: bool (validator is set below) + was_linked_shared_folders_truncated = bb.Attribute("was_linked_shared_folders_truncated", nullable=True) - @property - def has_linked_devices(self): - """ - True if the user had linked apps at event time. + # Instance attribute type: bool (validator is set below) + has_linked_apps = bb.Attribute("has_linked_apps", nullable=True) - :rtype: bool - """ - if self._has_linked_devices_present: - return self._has_linked_devices_value - else: - return None - - @has_linked_devices.setter - def has_linked_devices(self, val): - if val is None: - del self.has_linked_devices - return - val = self._has_linked_devices_validator.validate(val) - self._has_linked_devices_value = val - self._has_linked_devices_present = True - - @has_linked_devices.deleter - def has_linked_devices(self): - self._has_linked_devices_value = None - self._has_linked_devices_present = False - - @property - def has_linked_shared_folders(self): - """ - True if the user had linked shared folders at event time. - - :rtype: bool - """ - if self._has_linked_shared_folders_present: - return self._has_linked_shared_folders_value - else: - return None + # Instance attribute type: bool (validator is set below) + has_linked_devices = bb.Attribute("has_linked_devices", nullable=True) - @has_linked_shared_folders.setter - def has_linked_shared_folders(self, val): - if val is None: - del self.has_linked_shared_folders - return - val = self._has_linked_shared_folders_validator.validate(val) - self._has_linked_shared_folders_value = val - self._has_linked_shared_folders_present = True - - @has_linked_shared_folders.deleter - def has_linked_shared_folders(self): - self._has_linked_shared_folders_value = None - self._has_linked_shared_folders_present = False + # Instance attribute type: bool (validator is set below) + has_linked_shared_folders = bb.Attribute("has_linked_shared_folders", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(JoinTeamDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'JoinTeamDetails(linked_apps={!r}, linked_devices={!r}, linked_shared_folders={!r}, was_linked_apps_truncated={!r}, was_linked_devices_truncated={!r}, was_linked_shared_folders_truncated={!r}, has_linked_apps={!r}, has_linked_devices={!r}, has_linked_shared_folders={!r})'.format( - self._linked_apps_value, - self._linked_devices_value, - self._linked_shared_folders_value, - self._was_linked_apps_truncated_value, - self._was_linked_devices_truncated_value, - self._was_linked_shared_folders_truncated_value, - self._has_linked_apps_value, - self._has_linked_devices_value, - self._has_linked_shared_folders_value, - ) - JoinTeamDetails_validator = bv.Struct(JoinTeamDetails) class LegacyDeviceSessionLogInfo(DeviceSessionLogInfo): @@ -57523,23 +45990,14 @@ class LegacyDeviceSessionLogInfo(DeviceSessionLogInfo): __slots__ = [ '_session_info_value', - '_session_info_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', '_client_version_value', - '_client_version_present', '_legacy_uniq_id_value', - '_legacy_uniq_id_present', ] _has_required_fields = False @@ -57560,24 +46018,15 @@ def __init__(self, super(LegacyDeviceSessionLogInfo, self).__init__(ip_address, created, updated) - self._session_info_value = None - self._session_info_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._client_version_value = None - self._client_version_present = False - self._legacy_uniq_id_value = None - self._legacy_uniq_id_present = False + self._session_info_value = bb.NOT_SET + self._display_name_value = bb.NOT_SET + self._is_emm_managed_value = bb.NOT_SET + self._platform_value = bb.NOT_SET + self._mac_address_value = bb.NOT_SET + self._os_version_value = bb.NOT_SET + self._device_type_value = bb.NOT_SET + self._client_version_value = bb.NOT_SET + self._legacy_uniq_id_value = bb.NOT_SET if session_info is not None: self.session_info = session_info if display_name is not None: @@ -57597,263 +46046,36 @@ def __init__(self, if legacy_uniq_id is not None: self.legacy_uniq_id = legacy_uniq_id - @property - def session_info(self): - """ - Session unique id. Might be missing due to historical data gap. - - :rtype: SessionLogInfo - """ - if self._session_info_present: - return self._session_info_value - else: - return None - - @session_info.setter - def session_info(self, val): - if val is None: - del self.session_info - return - self._session_info_validator.validate_type_only(val) - self._session_info_value = val - self._session_info_present = True - - @session_info.deleter - def session_info(self): - self._session_info_value = None - self._session_info_present = False - - @property - def display_name(self): - """ - The device 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): - """ - Is device managed by emm. 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): - """ - Information on the hosting platform. Might be missing due to historical - data gap. - - :rtype: str - """ - if self._platform_present: - return self._platform_value - else: - return None + # Instance attribute type: SessionLogInfo (validator is set below) + session_info = bb.Attribute("session_info", nullable=True, user_defined=True) - @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 + # Instance attribute type: str (validator is set below) + display_name = bb.Attribute("display_name", nullable=True) - @platform.deleter - def platform(self): - self._platform_value = None - self._platform_present = False + # Instance attribute type: bool (validator is set below) + is_emm_managed = bb.Attribute("is_emm_managed", nullable=True) - @property - def mac_address(self): - """ - The mac address of the last activity from this session. Might be missing - due to historical data gap. + # Instance attribute type: str (validator is set below) + platform = bb.Attribute("platform", nullable=True) - :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): - """ - The hosting 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): - """ - Information on the hosting device type. Might be missing due to - historical data gap. + # Instance attribute type: str (validator is set below) + mac_address = bb.Attribute("mac_address", nullable=True) - :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 client_version(self): - """ - The Dropbox client version. Might be missing due to historical data gap. - - :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 legacy_uniq_id(self): - """ - Alternative unique device session id, instead of session id field. Might - be missing due to historical data gap. + # Instance attribute type: str (validator is set below) + os_version = bb.Attribute("os_version", nullable=True) - :rtype: str - """ - if self._legacy_uniq_id_present: - return self._legacy_uniq_id_value - else: - return None + # Instance attribute type: str (validator is set below) + device_type = bb.Attribute("device_type", nullable=True) - @legacy_uniq_id.setter - def legacy_uniq_id(self, val): - if val is None: - del self.legacy_uniq_id - return - val = self._legacy_uniq_id_validator.validate(val) - self._legacy_uniq_id_value = val - self._legacy_uniq_id_present = True + # Instance attribute type: str (validator is set below) + client_version = bb.Attribute("client_version", nullable=True) - @legacy_uniq_id.deleter - def legacy_uniq_id(self): - self._legacy_uniq_id_value = None - self._legacy_uniq_id_present = False + # Instance attribute type: str (validator is set below) + legacy_uniq_id = bb.Attribute("legacy_uniq_id", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegacyDeviceSessionLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegacyDeviceSessionLogInfo(ip_address={!r}, created={!r}, updated={!r}, session_info={!r}, display_name={!r}, is_emm_managed={!r}, platform={!r}, mac_address={!r}, os_version={!r}, device_type={!r}, client_version={!r}, legacy_uniq_id={!r})'.format( - self._ip_address_value, - self._created_value, - self._updated_value, - self._session_info_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._client_version_value, - self._legacy_uniq_id_value, - ) - LegacyDeviceSessionLogInfo_validator = bv.Struct(LegacyDeviceSessionLogInfo) class LegalHoldsActivateAHoldDetails(bb.Struct): @@ -57868,13 +46090,9 @@ class LegalHoldsActivateAHoldDetails(bb.Struct): __slots__ = [ '_legal_hold_id_value', - '_legal_hold_id_present', '_name_value', - '_name_present', '_start_date_value', - '_start_date_present', '_end_date_value', - '_end_date_present', ] _has_required_fields = True @@ -57884,14 +46102,10 @@ def __init__(self, name=None, start_date=None, end_date=None): - self._legal_hold_id_value = None - self._legal_hold_id_present = False - self._name_value = None - self._name_present = False - self._start_date_value = None - self._start_date_present = False - self._end_date_value = None - self._end_date_present = False + self._legal_hold_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._start_date_value = bb.NOT_SET + self._end_date_value = bb.NOT_SET if legal_hold_id is not None: self.legal_hold_id = legal_hold_id if name is not None: @@ -57901,159 +46115,43 @@ def __init__(self, if end_date is not None: self.end_date = end_date - @property - def legal_hold_id(self): - """ - Hold ID. - - :rtype: str - """ - if self._legal_hold_id_present: - return self._legal_hold_id_value - else: - raise AttributeError("missing required field 'legal_hold_id'") + # Instance attribute type: str (validator is set below) + legal_hold_id = bb.Attribute("legal_hold_id") - @legal_hold_id.setter - def legal_hold_id(self, val): - val = self._legal_hold_id_validator.validate(val) - self._legal_hold_id_value = val - self._legal_hold_id_present = True + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - @legal_hold_id.deleter - def legal_hold_id(self): - self._legal_hold_id_value = None - self._legal_hold_id_present = False + # Instance attribute type: datetime.datetime (validator is set below) + start_date = bb.Attribute("start_date") - @property - def name(self): - """ - Hold 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 - - @property - def start_date(self): - """ - Hold 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): - """ - Hold end date. - - :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 + # Instance attribute type: datetime.datetime (validator is set below) + end_date = bb.Attribute("end_date", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsActivateAHoldDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsActivateAHoldDetails(legal_hold_id={!r}, name={!r}, start_date={!r}, end_date={!r})'.format( - self._legal_hold_id_value, - self._name_value, - self._start_date_value, - self._end_date_value, - ) - LegalHoldsActivateAHoldDetails_validator = bv.Struct(LegalHoldsActivateAHoldDetails) class LegalHoldsActivateAHoldType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsActivateAHoldType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsActivateAHoldType(description={!r})'.format( - self._description_value, - ) - LegalHoldsActivateAHoldType_validator = bv.Struct(LegalHoldsActivateAHoldType) class LegalHoldsAddMembersDetails(bb.Struct): @@ -58066,9 +46164,7 @@ class LegalHoldsAddMembersDetails(bb.Struct): __slots__ = [ '_legal_hold_id_value', - '_legal_hold_id_present', '_name_value', - '_name_present', ] _has_required_fields = True @@ -58076,117 +46172,44 @@ class LegalHoldsAddMembersDetails(bb.Struct): def __init__(self, legal_hold_id=None, name=None): - self._legal_hold_id_value = None - self._legal_hold_id_present = False - self._name_value = None - self._name_present = False + self._legal_hold_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET if legal_hold_id is not None: self.legal_hold_id = legal_hold_id if name is not None: self.name = name - @property - def legal_hold_id(self): - """ - Hold ID. - - :rtype: str - """ - if self._legal_hold_id_present: - return self._legal_hold_id_value - else: - raise AttributeError("missing required field 'legal_hold_id'") - - @legal_hold_id.setter - def legal_hold_id(self, val): - val = self._legal_hold_id_validator.validate(val) - self._legal_hold_id_value = val - self._legal_hold_id_present = True - - @legal_hold_id.deleter - def legal_hold_id(self): - self._legal_hold_id_value = None - self._legal_hold_id_present = False - - @property - def name(self): - """ - Hold name. - - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") + # Instance attribute type: str (validator is set below) + legal_hold_id = bb.Attribute("legal_hold_id") - @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 + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsAddMembersDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsAddMembersDetails(legal_hold_id={!r}, name={!r})'.format( - self._legal_hold_id_value, - self._name_value, - ) - LegalHoldsAddMembersDetails_validator = bv.Struct(LegalHoldsAddMembersDetails) class LegalHoldsAddMembersType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsAddMembersType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsAddMembersType(description={!r})'.format( - self._description_value, - ) - LegalHoldsAddMembersType_validator = bv.Struct(LegalHoldsAddMembersType) class LegalHoldsChangeHoldDetailsDetails(bb.Struct): @@ -58202,13 +46225,9 @@ class LegalHoldsChangeHoldDetailsDetails(bb.Struct): __slots__ = [ '_legal_hold_id_value', - '_legal_hold_id_present', '_name_value', - '_name_present', '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -58218,14 +46237,10 @@ def __init__(self, name=None, previous_value=None, new_value=None): - self._legal_hold_id_value = None - self._legal_hold_id_present = False - self._name_value = None - self._name_present = False - self._previous_value_value = None - self._previous_value_present = False - self._new_value_value = None - self._new_value_present = False + self._legal_hold_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET if legal_hold_id is not None: self.legal_hold_id = legal_hold_id if name is not None: @@ -58235,156 +46250,43 @@ def __init__(self, if new_value is not None: self.new_value = new_value - @property - def legal_hold_id(self): - """ - Hold ID. - - :rtype: str - """ - if self._legal_hold_id_present: - return self._legal_hold_id_value - else: - raise AttributeError("missing required field 'legal_hold_id'") - - @legal_hold_id.setter - def legal_hold_id(self, val): - val = self._legal_hold_id_validator.validate(val) - self._legal_hold_id_value = val - self._legal_hold_id_present = True - - @legal_hold_id.deleter - def legal_hold_id(self): - self._legal_hold_id_value = None - self._legal_hold_id_present = False + # Instance attribute type: str (validator is set below) + legal_hold_id = bb.Attribute("legal_hold_id") - @property - def name(self): - """ - Hold name. + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - :rtype: str - """ - if self._name_present: - return self._name_value - else: - raise AttributeError("missing required field 'name'") + # Instance attribute type: str (validator is set below) + previous_value = bb.Attribute("previous_value") - @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 previous_value(self): - """ - Previous details. - - :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 details. - - :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 + # Instance attribute type: str (validator is set below) + new_value = bb.Attribute("new_value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsChangeHoldDetailsDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsChangeHoldDetailsDetails(legal_hold_id={!r}, name={!r}, previous_value={!r}, new_value={!r})'.format( - self._legal_hold_id_value, - self._name_value, - self._previous_value_value, - self._new_value_value, - ) - LegalHoldsChangeHoldDetailsDetails_validator = bv.Struct(LegalHoldsChangeHoldDetailsDetails) class LegalHoldsChangeHoldDetailsType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsChangeHoldDetailsType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsChangeHoldDetailsType(description={!r})'.format( - self._description_value, - ) - LegalHoldsChangeHoldDetailsType_validator = bv.Struct(LegalHoldsChangeHoldDetailsType) class LegalHoldsChangeHoldNameDetails(bb.Struct): @@ -58399,11 +46301,8 @@ class LegalHoldsChangeHoldNameDetails(bb.Struct): __slots__ = [ '_legal_hold_id_value', - '_legal_hold_id_present', '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -58412,12 +46311,9 @@ def __init__(self, legal_hold_id=None, previous_value=None, new_value=None): - self._legal_hold_id_value = None - self._legal_hold_id_present = False - self._previous_value_value = None - self._previous_value_present = False - self._new_value_value = None - self._new_value_present = False + self._legal_hold_id_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET if legal_hold_id is not None: self.legal_hold_id = legal_hold_id if previous_value is not None: @@ -58425,132 +46321,40 @@ def __init__(self, if new_value is not None: self.new_value = new_value - @property - def legal_hold_id(self): - """ - Hold ID. + # Instance attribute type: str (validator is set below) + legal_hold_id = bb.Attribute("legal_hold_id") - :rtype: str - """ - if self._legal_hold_id_present: - return self._legal_hold_id_value - else: - raise AttributeError("missing required field 'legal_hold_id'") - - @legal_hold_id.setter - def legal_hold_id(self, val): - val = self._legal_hold_id_validator.validate(val) - self._legal_hold_id_value = val - self._legal_hold_id_present = True - - @legal_hold_id.deleter - def legal_hold_id(self): - self._legal_hold_id_value = None - self._legal_hold_id_present = False - - @property - def previous_value(self): - """ - Previous 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 Name. - - :rtype: str - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") + # Instance attribute type: str (validator is set below) + previous_value = bb.Attribute("previous_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 + # Instance attribute type: str (validator is set below) + new_value = bb.Attribute("new_value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsChangeHoldNameDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsChangeHoldNameDetails(legal_hold_id={!r}, previous_value={!r}, new_value={!r})'.format( - self._legal_hold_id_value, - self._previous_value_value, - self._new_value_value, - ) - LegalHoldsChangeHoldNameDetails_validator = bv.Struct(LegalHoldsChangeHoldNameDetails) class LegalHoldsChangeHoldNameType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsChangeHoldNameType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsChangeHoldNameType(description={!r})'.format( - self._description_value, - ) - LegalHoldsChangeHoldNameType_validator = bv.Struct(LegalHoldsChangeHoldNameType) class LegalHoldsExportAHoldDetails(bb.Struct): @@ -58564,11 +46368,8 @@ class LegalHoldsExportAHoldDetails(bb.Struct): __slots__ = [ '_legal_hold_id_value', - '_legal_hold_id_present', '_name_value', - '_name_present', '_export_name_value', - '_export_name_present', ] _has_required_fields = True @@ -58577,12 +46378,9 @@ def __init__(self, legal_hold_id=None, name=None, export_name=None): - self._legal_hold_id_value = None - self._legal_hold_id_present = False - self._name_value = None - self._name_present = False - self._export_name_value = None - self._export_name_present = False + self._legal_hold_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._export_name_value = bb.NOT_SET if legal_hold_id is not None: self.legal_hold_id = legal_hold_id if name is not None: @@ -58590,135 +46388,40 @@ def __init__(self, if export_name is not None: self.export_name = export_name - @property - def legal_hold_id(self): - """ - Hold ID. - - :rtype: str - """ - if self._legal_hold_id_present: - return self._legal_hold_id_value - else: - raise AttributeError("missing required field 'legal_hold_id'") - - @legal_hold_id.setter - def legal_hold_id(self, val): - val = self._legal_hold_id_validator.validate(val) - self._legal_hold_id_value = val - self._legal_hold_id_present = True - - @legal_hold_id.deleter - def legal_hold_id(self): - self._legal_hold_id_value = None - self._legal_hold_id_present = False - - @property - def name(self): - """ - Hold 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 + # Instance attribute type: str (validator is set below) + legal_hold_id = bb.Attribute("legal_hold_id") - @property - def export_name(self): - """ - Export name. - - :rtype: str - """ - if self._export_name_present: - return self._export_name_value - else: - return None + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - @export_name.setter - def export_name(self, val): - if val is None: - del self.export_name - return - val = self._export_name_validator.validate(val) - self._export_name_value = val - self._export_name_present = True - - @export_name.deleter - def export_name(self): - self._export_name_value = None - self._export_name_present = False + # Instance attribute type: str (validator is set below) + export_name = bb.Attribute("export_name", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsExportAHoldDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsExportAHoldDetails(legal_hold_id={!r}, name={!r}, export_name={!r})'.format( - self._legal_hold_id_value, - self._name_value, - self._export_name_value, - ) - LegalHoldsExportAHoldDetails_validator = bv.Struct(LegalHoldsExportAHoldDetails) class LegalHoldsExportAHoldType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsExportAHoldType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsExportAHoldType(description={!r})'.format( - self._description_value, - ) - LegalHoldsExportAHoldType_validator = bv.Struct(LegalHoldsExportAHoldType) class LegalHoldsExportCancelledDetails(bb.Struct): @@ -58732,11 +46435,8 @@ class LegalHoldsExportCancelledDetails(bb.Struct): __slots__ = [ '_legal_hold_id_value', - '_legal_hold_id_present', '_name_value', - '_name_present', '_export_name_value', - '_export_name_present', ] _has_required_fields = True @@ -58745,12 +46445,9 @@ def __init__(self, legal_hold_id=None, name=None, export_name=None): - self._legal_hold_id_value = None - self._legal_hold_id_present = False - self._name_value = None - self._name_present = False - self._export_name_value = None - self._export_name_present = False + self._legal_hold_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._export_name_value = bb.NOT_SET if legal_hold_id is not None: self.legal_hold_id = legal_hold_id if name is not None: @@ -58758,132 +46455,40 @@ def __init__(self, if export_name is not None: self.export_name = export_name - @property - def legal_hold_id(self): - """ - Hold ID. - - :rtype: str - """ - if self._legal_hold_id_present: - return self._legal_hold_id_value - else: - raise AttributeError("missing required field 'legal_hold_id'") - - @legal_hold_id.setter - def legal_hold_id(self, val): - val = self._legal_hold_id_validator.validate(val) - self._legal_hold_id_value = val - self._legal_hold_id_present = True + # Instance attribute type: str (validator is set below) + legal_hold_id = bb.Attribute("legal_hold_id") - @legal_hold_id.deleter - def legal_hold_id(self): - self._legal_hold_id_value = None - self._legal_hold_id_present = False + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - @property - def name(self): - """ - Hold 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 - - @property - def export_name(self): - """ - Export name. - - :rtype: str - """ - if self._export_name_present: - return self._export_name_value - else: - raise AttributeError("missing required field 'export_name'") - - @export_name.setter - def export_name(self, val): - val = self._export_name_validator.validate(val) - self._export_name_value = val - self._export_name_present = True - - @export_name.deleter - def export_name(self): - self._export_name_value = None - self._export_name_present = False + # Instance attribute type: str (validator is set below) + export_name = bb.Attribute("export_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsExportCancelledDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsExportCancelledDetails(legal_hold_id={!r}, name={!r}, export_name={!r})'.format( - self._legal_hold_id_value, - self._name_value, - self._export_name_value, - ) - LegalHoldsExportCancelledDetails_validator = bv.Struct(LegalHoldsExportCancelledDetails) class LegalHoldsExportCancelledType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsExportCancelledType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsExportCancelledType(description={!r})'.format( - self._description_value, - ) - LegalHoldsExportCancelledType_validator = bv.Struct(LegalHoldsExportCancelledType) class LegalHoldsExportDownloadedDetails(bb.Struct): @@ -58899,15 +46504,10 @@ class LegalHoldsExportDownloadedDetails(bb.Struct): __slots__ = [ '_legal_hold_id_value', - '_legal_hold_id_present', '_name_value', - '_name_present', '_export_name_value', - '_export_name_present', '_part_value', - '_part_present', '_file_name_value', - '_file_name_present', ] _has_required_fields = True @@ -58918,16 +46518,11 @@ def __init__(self, export_name=None, part=None, file_name=None): - self._legal_hold_id_value = None - self._legal_hold_id_present = False - self._name_value = None - self._name_present = False - self._export_name_value = None - self._export_name_present = False - self._part_value = None - self._part_present = False - self._file_name_value = None - self._file_name_present = False + self._legal_hold_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._export_name_value = bb.NOT_SET + self._part_value = bb.NOT_SET + self._file_name_value = bb.NOT_SET if legal_hold_id is not None: self.legal_hold_id = legal_hold_id if name is not None: @@ -58939,186 +46534,46 @@ def __init__(self, if file_name is not None: self.file_name = file_name - @property - def legal_hold_id(self): - """ - Hold ID. + # Instance attribute type: str (validator is set below) + legal_hold_id = bb.Attribute("legal_hold_id") - :rtype: str - """ - if self._legal_hold_id_present: - return self._legal_hold_id_value - else: - raise AttributeError("missing required field 'legal_hold_id'") + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - @legal_hold_id.setter - def legal_hold_id(self, val): - val = self._legal_hold_id_validator.validate(val) - self._legal_hold_id_value = val - self._legal_hold_id_present = True + # Instance attribute type: str (validator is set below) + export_name = bb.Attribute("export_name") - @legal_hold_id.deleter - def legal_hold_id(self): - self._legal_hold_id_value = None - self._legal_hold_id_present = False + # Instance attribute type: str (validator is set below) + part = bb.Attribute("part", nullable=True) - @property - def name(self): - """ - Hold 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 - - @property - def export_name(self): - """ - Export name. - - :rtype: str - """ - if self._export_name_present: - return self._export_name_value - else: - raise AttributeError("missing required field 'export_name'") - - @export_name.setter - def export_name(self, val): - val = self._export_name_validator.validate(val) - self._export_name_value = val - self._export_name_present = True - - @export_name.deleter - def export_name(self): - self._export_name_value = None - self._export_name_present = False - - @property - def part(self): - """ - Part. - - :rtype: str - """ - if self._part_present: - return self._part_value - else: - return None - - @part.setter - def part(self, val): - if val is None: - del self.part - return - val = self._part_validator.validate(val) - self._part_value = val - self._part_present = True - - @part.deleter - def part(self): - self._part_value = None - self._part_present = False - - @property - def file_name(self): - """ - Filename. - - :rtype: str - """ - if self._file_name_present: - return self._file_name_value - else: - return None - - @file_name.setter - def file_name(self, val): - if val is None: - del self.file_name - return - val = self._file_name_validator.validate(val) - self._file_name_value = val - self._file_name_present = True - - @file_name.deleter - def file_name(self): - self._file_name_value = None - self._file_name_present = False + # Instance attribute type: str (validator is set below) + file_name = bb.Attribute("file_name", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsExportDownloadedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsExportDownloadedDetails(legal_hold_id={!r}, name={!r}, export_name={!r}, part={!r}, file_name={!r})'.format( - self._legal_hold_id_value, - self._name_value, - self._export_name_value, - self._part_value, - self._file_name_value, - ) - LegalHoldsExportDownloadedDetails_validator = bv.Struct(LegalHoldsExportDownloadedDetails) class LegalHoldsExportDownloadedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsExportDownloadedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsExportDownloadedType(description={!r})'.format( - self._description_value, - ) - LegalHoldsExportDownloadedType_validator = bv.Struct(LegalHoldsExportDownloadedType) class LegalHoldsExportRemovedDetails(bb.Struct): @@ -59132,11 +46587,8 @@ class LegalHoldsExportRemovedDetails(bb.Struct): __slots__ = [ '_legal_hold_id_value', - '_legal_hold_id_present', '_name_value', - '_name_present', '_export_name_value', - '_export_name_present', ] _has_required_fields = True @@ -59145,12 +46597,9 @@ def __init__(self, legal_hold_id=None, name=None, export_name=None): - self._legal_hold_id_value = None - self._legal_hold_id_present = False - self._name_value = None - self._name_present = False - self._export_name_value = None - self._export_name_present = False + self._legal_hold_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._export_name_value = bb.NOT_SET if legal_hold_id is not None: self.legal_hold_id = legal_hold_id if name is not None: @@ -59158,132 +46607,40 @@ def __init__(self, if export_name is not None: self.export_name = export_name - @property - def legal_hold_id(self): - """ - Hold ID. + # Instance attribute type: str (validator is set below) + legal_hold_id = bb.Attribute("legal_hold_id") - :rtype: str - """ - if self._legal_hold_id_present: - return self._legal_hold_id_value - else: - raise AttributeError("missing required field 'legal_hold_id'") + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") - @legal_hold_id.setter - def legal_hold_id(self, val): - val = self._legal_hold_id_validator.validate(val) - self._legal_hold_id_value = val - self._legal_hold_id_present = True - - @legal_hold_id.deleter - def legal_hold_id(self): - self._legal_hold_id_value = None - self._legal_hold_id_present = False - - @property - def name(self): - """ - Hold 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 - - @property - def export_name(self): - """ - Export name. - - :rtype: str - """ - if self._export_name_present: - return self._export_name_value - else: - raise AttributeError("missing required field 'export_name'") - - @export_name.setter - def export_name(self, val): - val = self._export_name_validator.validate(val) - self._export_name_value = val - self._export_name_present = True - - @export_name.deleter - def export_name(self): - self._export_name_value = None - self._export_name_present = False + # Instance attribute type: str (validator is set below) + export_name = bb.Attribute("export_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsExportRemovedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsExportRemovedDetails(legal_hold_id={!r}, name={!r}, export_name={!r})'.format( - self._legal_hold_id_value, - self._name_value, - self._export_name_value, - ) - LegalHoldsExportRemovedDetails_validator = bv.Struct(LegalHoldsExportRemovedDetails) class LegalHoldsExportRemovedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsExportRemovedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsExportRemovedType(description={!r})'.format( - self._description_value, - ) - LegalHoldsExportRemovedType_validator = bv.Struct(LegalHoldsExportRemovedType) class LegalHoldsReleaseAHoldDetails(bb.Struct): @@ -59296,9 +46653,7 @@ class LegalHoldsReleaseAHoldDetails(bb.Struct): __slots__ = [ '_legal_hold_id_value', - '_legal_hold_id_present', '_name_value', - '_name_present', ] _has_required_fields = True @@ -59306,117 +46661,44 @@ class LegalHoldsReleaseAHoldDetails(bb.Struct): def __init__(self, legal_hold_id=None, name=None): - self._legal_hold_id_value = None - self._legal_hold_id_present = False - self._name_value = None - self._name_present = False + self._legal_hold_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET if legal_hold_id is not None: self.legal_hold_id = legal_hold_id if name is not None: self.name = name - @property - def legal_hold_id(self): - """ - Hold ID. - - :rtype: str - """ - if self._legal_hold_id_present: - return self._legal_hold_id_value - else: - raise AttributeError("missing required field 'legal_hold_id'") - - @legal_hold_id.setter - def legal_hold_id(self, val): - val = self._legal_hold_id_validator.validate(val) - self._legal_hold_id_value = val - self._legal_hold_id_present = True - - @legal_hold_id.deleter - def legal_hold_id(self): - self._legal_hold_id_value = None - self._legal_hold_id_present = False + # Instance attribute type: str (validator is set below) + legal_hold_id = bb.Attribute("legal_hold_id") - @property - def name(self): - """ - Hold 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 + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsReleaseAHoldDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsReleaseAHoldDetails(legal_hold_id={!r}, name={!r})'.format( - self._legal_hold_id_value, - self._name_value, - ) - LegalHoldsReleaseAHoldDetails_validator = bv.Struct(LegalHoldsReleaseAHoldDetails) class LegalHoldsReleaseAHoldType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsReleaseAHoldType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsReleaseAHoldType(description={!r})'.format( - self._description_value, - ) - LegalHoldsReleaseAHoldType_validator = bv.Struct(LegalHoldsReleaseAHoldType) class LegalHoldsRemoveMembersDetails(bb.Struct): @@ -59429,9 +46711,7 @@ class LegalHoldsRemoveMembersDetails(bb.Struct): __slots__ = [ '_legal_hold_id_value', - '_legal_hold_id_present', '_name_value', - '_name_present', ] _has_required_fields = True @@ -59439,117 +46719,44 @@ class LegalHoldsRemoveMembersDetails(bb.Struct): def __init__(self, legal_hold_id=None, name=None): - self._legal_hold_id_value = None - self._legal_hold_id_present = False - self._name_value = None - self._name_present = False + self._legal_hold_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET if legal_hold_id is not None: self.legal_hold_id = legal_hold_id if name is not None: self.name = name - @property - def legal_hold_id(self): - """ - Hold ID. - - :rtype: str - """ - if self._legal_hold_id_present: - return self._legal_hold_id_value - else: - raise AttributeError("missing required field 'legal_hold_id'") - - @legal_hold_id.setter - def legal_hold_id(self, val): - val = self._legal_hold_id_validator.validate(val) - self._legal_hold_id_value = val - self._legal_hold_id_present = True - - @legal_hold_id.deleter - def legal_hold_id(self): - self._legal_hold_id_value = None - self._legal_hold_id_present = False + # Instance attribute type: str (validator is set below) + legal_hold_id = bb.Attribute("legal_hold_id") - @property - def name(self): - """ - Hold 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 + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsRemoveMembersDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsRemoveMembersDetails(legal_hold_id={!r}, name={!r})'.format( - self._legal_hold_id_value, - self._name_value, - ) - LegalHoldsRemoveMembersDetails_validator = bv.Struct(LegalHoldsRemoveMembersDetails) class LegalHoldsRemoveMembersType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsRemoveMembersType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsRemoveMembersType(description={!r})'.format( - self._description_value, - ) - LegalHoldsRemoveMembersType_validator = bv.Struct(LegalHoldsRemoveMembersType) class LegalHoldsReportAHoldDetails(bb.Struct): @@ -59562,9 +46769,7 @@ class LegalHoldsReportAHoldDetails(bb.Struct): __slots__ = [ '_legal_hold_id_value', - '_legal_hold_id_present', '_name_value', - '_name_present', ] _has_required_fields = True @@ -59572,117 +46777,44 @@ class LegalHoldsReportAHoldDetails(bb.Struct): def __init__(self, legal_hold_id=None, name=None): - self._legal_hold_id_value = None - self._legal_hold_id_present = False - self._name_value = None - self._name_present = False + self._legal_hold_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET if legal_hold_id is not None: self.legal_hold_id = legal_hold_id if name is not None: self.name = name - @property - def legal_hold_id(self): - """ - Hold ID. - - :rtype: str - """ - if self._legal_hold_id_present: - return self._legal_hold_id_value - else: - raise AttributeError("missing required field 'legal_hold_id'") - - @legal_hold_id.setter - def legal_hold_id(self, val): - val = self._legal_hold_id_validator.validate(val) - self._legal_hold_id_value = val - self._legal_hold_id_present = True - - @legal_hold_id.deleter - def legal_hold_id(self): - self._legal_hold_id_value = None - self._legal_hold_id_present = False + # Instance attribute type: str (validator is set below) + legal_hold_id = bb.Attribute("legal_hold_id") - @property - def name(self): - """ - Hold 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 + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsReportAHoldDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsReportAHoldDetails(legal_hold_id={!r}, name={!r})'.format( - self._legal_hold_id_value, - self._name_value, - ) - LegalHoldsReportAHoldDetails_validator = bv.Struct(LegalHoldsReportAHoldDetails) class LegalHoldsReportAHoldType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsReportAHoldType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LegalHoldsReportAHoldType(description={!r})'.format( - self._description_value, - ) - LegalHoldsReportAHoldType_validator = bv.Struct(LegalHoldsReportAHoldType) class LinkedDeviceLogInfo(bb.Union): @@ -59843,9 +46975,6 @@ def get_web_device_session(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LinkedDeviceLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LinkedDeviceLogInfo(%r, %r)' % (self._tag, self._value) - LinkedDeviceLogInfo_validator = bv.Union(LinkedDeviceLogInfo) class LockStatus(bb.Union): @@ -59892,9 +47021,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LockStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LockStatus(%r, %r)' % (self._tag, self._value) - LockStatus_validator = bv.Union(LockStatus) class LoginFailDetails(bb.Struct): @@ -59909,11 +47035,8 @@ class LoginFailDetails(bb.Struct): __slots__ = [ '_is_emm_managed_value', - '_is_emm_managed_present', '_login_method_value', - '_login_method_present', '_error_details_value', - '_error_details_present', ] _has_required_fields = True @@ -59922,12 +47045,9 @@ def __init__(self, login_method=None, error_details=None, is_emm_managed=None): - self._is_emm_managed_value = None - self._is_emm_managed_present = False - self._login_method_value = None - self._login_method_present = False - self._error_details_value = None - self._error_details_present = False + self._is_emm_managed_value = bb.NOT_SET + self._login_method_value = bb.NOT_SET + self._error_details_value = bb.NOT_SET if is_emm_managed is not None: self.is_emm_managed = is_emm_managed if login_method is not None: @@ -59935,136 +47055,40 @@ def __init__(self, if error_details is not None: self.error_details = error_details - @property - def is_emm_managed(self): - """ - Tells if the login device is EMM managed. 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 login_method(self): - """ - Login method. - - :rtype: LoginMethod - """ - if self._login_method_present: - return self._login_method_value - else: - raise AttributeError("missing required field 'login_method'") - - @login_method.setter - def login_method(self, val): - self._login_method_validator.validate_type_only(val) - self._login_method_value = val - self._login_method_present = True - - @login_method.deleter - def login_method(self): - self._login_method_value = None - self._login_method_present = False - - @property - def error_details(self): - """ - Error details. - - :rtype: FailureDetailsLogInfo - """ - if self._error_details_present: - return self._error_details_value - else: - raise AttributeError("missing required field 'error_details'") + # Instance attribute type: bool (validator is set below) + is_emm_managed = bb.Attribute("is_emm_managed", nullable=True) - @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 + # Instance attribute type: LoginMethod (validator is set below) + login_method = bb.Attribute("login_method", user_defined=True) - @error_details.deleter - def error_details(self): - self._error_details_value = None - self._error_details_present = False + # Instance attribute type: FailureDetailsLogInfo (validator is set below) + error_details = bb.Attribute("error_details", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(LoginFailDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LoginFailDetails(login_method={!r}, error_details={!r}, is_emm_managed={!r})'.format( - self._login_method_value, - self._error_details_value, - self._is_emm_managed_value, - ) - LoginFailDetails_validator = bv.Struct(LoginFailDetails) class LoginFailType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LoginFailType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LoginFailType(description={!r})'.format( - self._description_value, - ) - LoginFailType_validator = bv.Struct(LoginFailType) class LoginMethod(bb.Union): @@ -60169,9 +47193,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(LoginMethod, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LoginMethod(%r, %r)' % (self._tag, self._value) - LoginMethod_validator = bv.Union(LoginMethod) class LoginSuccessDetails(bb.Struct): @@ -60185,9 +47206,7 @@ class LoginSuccessDetails(bb.Struct): __slots__ = [ '_is_emm_managed_value', - '_is_emm_managed_present', '_login_method_value', - '_login_method_present', ] _has_required_fields = True @@ -60195,121 +47214,44 @@ class LoginSuccessDetails(bb.Struct): def __init__(self, login_method=None, is_emm_managed=None): - self._is_emm_managed_value = None - self._is_emm_managed_present = False - self._login_method_value = None - self._login_method_present = False + self._is_emm_managed_value = bb.NOT_SET + self._login_method_value = bb.NOT_SET if is_emm_managed is not None: self.is_emm_managed = is_emm_managed if login_method is not None: self.login_method = login_method - @property - def is_emm_managed(self): - """ - Tells if the login device is EMM managed. Might be missing due to - historical data gap. + # Instance attribute type: bool (validator is set below) + is_emm_managed = bb.Attribute("is_emm_managed", nullable=True) - :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 login_method(self): - """ - Login method. - - :rtype: LoginMethod - """ - if self._login_method_present: - return self._login_method_value - else: - raise AttributeError("missing required field 'login_method'") - - @login_method.setter - def login_method(self, val): - self._login_method_validator.validate_type_only(val) - self._login_method_value = val - self._login_method_present = True - - @login_method.deleter - def login_method(self): - self._login_method_value = None - self._login_method_present = False + # Instance attribute type: LoginMethod (validator is set below) + login_method = bb.Attribute("login_method", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(LoginSuccessDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LoginSuccessDetails(login_method={!r}, is_emm_managed={!r})'.format( - self._login_method_value, - self._is_emm_managed_value, - ) - LoginSuccessDetails_validator = bv.Struct(LoginSuccessDetails) class LoginSuccessType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LoginSuccessType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LoginSuccessType(description={!r})'.format( - self._description_value, - ) - LoginSuccessType_validator = bv.Struct(LoginSuccessType) class LogoutDetails(bb.Struct): @@ -60321,99 +47263,44 @@ class LogoutDetails(bb.Struct): __slots__ = [ '_login_id_value', - '_login_id_present', ] _has_required_fields = False def __init__(self, login_id=None): - self._login_id_value = None - self._login_id_present = False + self._login_id_value = bb.NOT_SET if login_id is not None: self.login_id = login_id - @property - def login_id(self): - """ - Login session id. - - :rtype: str - """ - if self._login_id_present: - return self._login_id_value - else: - return None - - @login_id.setter - def login_id(self, val): - if val is None: - del self.login_id - return - val = self._login_id_validator.validate(val) - self._login_id_value = val - self._login_id_present = True - - @login_id.deleter - def login_id(self): - self._login_id_value = None - self._login_id_present = False + # Instance attribute type: str (validator is set below) + login_id = bb.Attribute("login_id", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(LogoutDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LogoutDetails(login_id={!r})'.format( - self._login_id_value, - ) - LogoutDetails_validator = bv.Struct(LogoutDetails) class LogoutType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(LogoutType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'LogoutType(description={!r})'.format( - self._description_value, - ) - LogoutType_validator = bv.Struct(LogoutType) class MemberAddExternalIdDetails(bb.Struct): @@ -60425,96 +47312,44 @@ class MemberAddExternalIdDetails(bb.Struct): __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 + self._new_value_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + new_value = bb.Attribute("new_value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberAddExternalIdDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberAddExternalIdDetails(new_value={!r})'.format( - self._new_value_value, - ) - MemberAddExternalIdDetails_validator = bv.Struct(MemberAddExternalIdDetails) class MemberAddExternalIdType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberAddExternalIdType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberAddExternalIdType(description={!r})'.format( - self._description_value, - ) - MemberAddExternalIdType_validator = bv.Struct(MemberAddExternalIdType) class MemberAddNameDetails(bb.Struct): @@ -60526,96 +47361,44 @@ class MemberAddNameDetails(bb.Struct): __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 + self._new_value_value = bb.NOT_SET if new_value is not None: self.new_value = new_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 + # Instance attribute type: UserNameLogInfo (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberAddNameDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberAddNameDetails(new_value={!r})'.format( - self._new_value_value, - ) - MemberAddNameDetails_validator = bv.Struct(MemberAddNameDetails) class MemberAddNameType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberAddNameType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberAddNameType(description={!r})'.format( - self._description_value, - ) - MemberAddNameType_validator = bv.Struct(MemberAddNameType) class MemberChangeAdminRoleDetails(bb.Struct): @@ -60632,9 +47415,7 @@ class MemberChangeAdminRoleDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = False @@ -60642,125 +47423,44 @@ class MemberChangeAdminRoleDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: AdminRole (validator is set below) + new_value = bb.Attribute("new_value", nullable=True, user_defined=True) - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False + # Instance attribute type: AdminRole (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberChangeAdminRoleDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 MemberChangeAdminRoleType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberChangeAdminRoleType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberChangeAdminRoleType(description={!r})'.format( - self._description_value, - ) - MemberChangeAdminRoleType_validator = bv.Struct(MemberChangeAdminRoleType) class MemberChangeEmailDetails(bb.Struct): @@ -60774,9 +47474,7 @@ class MemberChangeEmailDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -60784,120 +47482,44 @@ class MemberChangeEmailDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + new_value = bb.Attribute("new_value") - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False + # Instance attribute type: str (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberChangeEmailDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 MemberChangeEmailType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberChangeEmailType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberChangeEmailType(description={!r})'.format( - self._description_value, - ) - MemberChangeEmailType_validator = bv.Struct(MemberChangeEmailType) class MemberChangeExternalIdDetails(bb.Struct): @@ -60911,9 +47533,7 @@ class MemberChangeExternalIdDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -60921,117 +47541,44 @@ class MemberChangeExternalIdDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + new_value = bb.Attribute("new_value") - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False + # Instance attribute type: str (validator is set below) + previous_value = bb.Attribute("previous_value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberChangeExternalIdDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberChangeExternalIdDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - MemberChangeExternalIdDetails_validator = bv.Struct(MemberChangeExternalIdDetails) class MemberChangeExternalIdType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberChangeExternalIdType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberChangeExternalIdType(description={!r})'.format( - self._description_value, - ) - MemberChangeExternalIdType_validator = bv.Struct(MemberChangeExternalIdType) class MemberChangeMembershipTypeDetails(bb.Struct): @@ -61046,9 +47593,7 @@ class MemberChangeMembershipTypeDetails(bb.Struct): __slots__ = [ '_prev_value_value', - '_prev_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -61056,117 +47601,44 @@ class MemberChangeMembershipTypeDetails(bb.Struct): 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 + self._prev_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET 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 + # Instance attribute type: TeamMembershipType (validator is set below) + prev_value = bb.Attribute("prev_value", user_defined=True) - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False + # Instance attribute type: TeamMembershipType (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberChangeMembershipTypeDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 MemberChangeMembershipTypeType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberChangeMembershipTypeType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberChangeMembershipTypeType(description={!r})'.format( - self._description_value, - ) - MemberChangeMembershipTypeType_validator = bv.Struct(MemberChangeMembershipTypeType) class MemberChangeNameDetails(bb.Struct): @@ -61180,9 +47652,7 @@ class MemberChangeNameDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -61190,120 +47660,44 @@ class MemberChangeNameDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: UserNameLogInfo (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False + # Instance attribute type: UserNameLogInfo (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberChangeNameDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 MemberChangeNameType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberChangeNameType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberChangeNameType(description={!r})'.format( - self._description_value, - ) - MemberChangeNameType_validator = bv.Struct(MemberChangeNameType) class MemberChangeResellerRoleDetails(bb.Struct): @@ -61319,9 +47713,7 @@ class MemberChangeResellerRoleDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -61329,119 +47721,44 @@ class MemberChangeResellerRoleDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 reseller role. This field is relevant when the reseller role is - changed. - - :rtype: ResellerRole - """ - 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 reseller role. This field is relevant when the reseller role is - changed or when the reseller role is removed. - - :rtype: ResellerRole - """ - if self._previous_value_present: - return self._previous_value_value - else: - raise AttributeError("missing required field 'previous_value'") + # Instance attribute type: ResellerRole (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @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 + # Instance attribute type: ResellerRole (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberChangeResellerRoleDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberChangeResellerRoleDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - MemberChangeResellerRoleDetails_validator = bv.Struct(MemberChangeResellerRoleDetails) class MemberChangeResellerRoleType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberChangeResellerRoleType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberChangeResellerRoleType(description={!r})'.format( - self._description_value, - ) - MemberChangeResellerRoleType_validator = bv.Struct(MemberChangeResellerRoleType) class MemberChangeStatusDetails(bb.Struct): @@ -61462,15 +47779,10 @@ class MemberChangeStatusDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', '_action_value', - '_action_present', '_new_team_value', - '_new_team_present', '_previous_team_value', - '_previous_team_present', ] _has_required_fields = True @@ -61481,16 +47793,11 @@ def __init__(self, action=None, new_team=None, previous_team=None): - self._previous_value_value = None - self._previous_value_present = False - self._new_value_value = None - self._new_value_present = False - self._action_value = None - self._action_present = False - self._new_team_value = None - self._new_team_present = False - self._previous_team_value = None - self._previous_team_present = False + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET + self._action_value = bb.NOT_SET + self._new_team_value = bb.NOT_SET + self._previous_team_value = bb.NOT_SET if previous_value is not None: self.previous_value = previous_value if new_value is not None: @@ -61502,195 +47809,46 @@ def __init__(self, if previous_team is not None: self.previous_team = previous_team - @property - def previous_value(self): - """ - Previous member status. Might be missing due to historical data gap. + # Instance attribute type: MemberStatus (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) - :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 + # Instance attribute type: MemberStatus (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False + # Instance attribute type: ActionDetails (validator is set below) + action = bb.Attribute("action", nullable=True, user_defined=True) - @property - def action(self): - """ - Additional information indicating the action taken that caused status - change. + # Instance attribute type: str (validator is set below) + new_team = bb.Attribute("new_team", nullable=True) - :rtype: ActionDetails - """ - if self._action_present: - return self._action_value - else: - return None - - @action.setter - def action(self, val): - if val is None: - del self.action - return - 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 new_team(self): - """ - The user's new team name. This field is relevant when the user is - transferred off the team. - - :rtype: str - """ - if self._new_team_present: - return self._new_team_value - else: - return None - - @new_team.setter - def new_team(self, val): - if val is None: - del self.new_team - return - val = self._new_team_validator.validate(val) - self._new_team_value = val - self._new_team_present = True - - @new_team.deleter - def new_team(self): - self._new_team_value = None - self._new_team_present = False - - @property - def previous_team(self): - """ - The user's previous team name. This field is relevant when the user is - transferred onto the team. - - :rtype: str - """ - if self._previous_team_present: - return self._previous_team_value - else: - return None - - @previous_team.setter - def previous_team(self, val): - if val is None: - del self.previous_team - return - val = self._previous_team_validator.validate(val) - self._previous_team_value = val - self._previous_team_present = True - - @previous_team.deleter - def previous_team(self): - self._previous_team_value = None - self._previous_team_present = False + # Instance attribute type: str (validator is set below) + previous_team = bb.Attribute("previous_team", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberChangeStatusDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberChangeStatusDetails(new_value={!r}, previous_value={!r}, action={!r}, new_team={!r}, previous_team={!r})'.format( - self._new_value_value, - self._previous_value_value, - self._action_value, - self._new_team_value, - self._previous_team_value, - ) - MemberChangeStatusDetails_validator = bv.Struct(MemberChangeStatusDetails) class MemberChangeStatusType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberChangeStatusType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberChangeStatusType(description={!r})'.format( - self._description_value, - ) - MemberChangeStatusType_validator = bv.Struct(MemberChangeStatusType) class MemberDeleteManualContactsDetails(bb.Struct): @@ -61709,56 +47867,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberDeleteManualContactsDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberDeleteManualContactsDetails()' - MemberDeleteManualContactsDetails_validator = bv.Struct(MemberDeleteManualContactsDetails) class MemberDeleteManualContactsType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberDeleteManualContactsType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberDeleteManualContactsType(description={!r})'.format( - self._description_value, - ) - MemberDeleteManualContactsType_validator = bv.Struct(MemberDeleteManualContactsType) class MemberDeleteProfilePhotoDetails(bb.Struct): @@ -61777,56 +47907,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberDeleteProfilePhotoDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberDeleteProfilePhotoDetails()' - MemberDeleteProfilePhotoDetails_validator = bv.Struct(MemberDeleteProfilePhotoDetails) class MemberDeleteProfilePhotoType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberDeleteProfilePhotoType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberDeleteProfilePhotoType(description={!r})'.format( - self._description_value, - ) - MemberDeleteProfilePhotoType_validator = bv.Struct(MemberDeleteProfilePhotoType) class MemberPermanentlyDeleteAccountContentsDetails(bb.Struct): @@ -61845,56 +47947,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberPermanentlyDeleteAccountContentsDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberPermanentlyDeleteAccountContentsDetails()' - MemberPermanentlyDeleteAccountContentsDetails_validator = bv.Struct(MemberPermanentlyDeleteAccountContentsDetails) class MemberPermanentlyDeleteAccountContentsType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberPermanentlyDeleteAccountContentsType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberPermanentlyDeleteAccountContentsType(description={!r})'.format( - self._description_value, - ) - MemberPermanentlyDeleteAccountContentsType_validator = bv.Struct(MemberPermanentlyDeleteAccountContentsType) class MemberRemoveActionType(bb.Union): @@ -61959,9 +48033,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberRemoveActionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberRemoveActionType(%r, %r)' % (self._tag, self._value) - MemberRemoveActionType_validator = bv.Union(MemberRemoveActionType) class MemberRemoveExternalIdDetails(bb.Struct): @@ -61974,96 +48045,44 @@ class MemberRemoveExternalIdDetails(bb.Struct): __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 + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + previous_value = bb.Attribute("previous_value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberRemoveExternalIdDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberRemoveExternalIdDetails(previous_value={!r})'.format( - self._previous_value_value, - ) - MemberRemoveExternalIdDetails_validator = bv.Struct(MemberRemoveExternalIdDetails) class MemberRemoveExternalIdType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberRemoveExternalIdType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberRemoveExternalIdType(description={!r})'.format( - self._description_value, - ) - MemberRemoveExternalIdType_validator = bv.Struct(MemberRemoveExternalIdType) class MemberRequestsChangePolicyDetails(bb.Struct): @@ -62079,9 +48098,7 @@ class MemberRequestsChangePolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -62089,121 +48106,44 @@ class MemberRequestsChangePolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: MemberRequestsPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False + # Instance attribute type: MemberRequestsPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberRequestsChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 MemberRequestsChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberRequestsChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberRequestsChangePolicyType(description={!r})'.format( - self._description_value, - ) - MemberRequestsChangePolicyType_validator = bv.Struct(MemberRequestsChangePolicyType) class MemberRequestsPolicy(bb.Union): @@ -62258,9 +48198,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberRequestsPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberRequestsPolicy(%r, %r)' % (self._tag, self._value) - MemberRequestsPolicy_validator = bv.Union(MemberRequestsPolicy) class MemberSendInvitePolicy(bb.Union): @@ -62317,9 +48254,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSendInvitePolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSendInvitePolicy(%r, %r)' % (self._tag, self._value) - MemberSendInvitePolicy_validator = bv.Union(MemberSendInvitePolicy) class MemberSendInvitePolicyChangedDetails(bb.Struct): @@ -62334,9 +48268,7 @@ class MemberSendInvitePolicyChangedDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -62344,117 +48276,44 @@ class MemberSendInvitePolicyChangedDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 send invite policy. - - :rtype: MemberSendInvitePolicy - """ - 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 send invite policy. - - :rtype: MemberSendInvitePolicy - """ - 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 + # Instance attribute type: MemberSendInvitePolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False + # Instance attribute type: MemberSendInvitePolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSendInvitePolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSendInvitePolicyChangedDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - MemberSendInvitePolicyChangedDetails_validator = bv.Struct(MemberSendInvitePolicyChangedDetails) class MemberSendInvitePolicyChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSendInvitePolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSendInvitePolicyChangedType(description={!r})'.format( - self._description_value, - ) - MemberSendInvitePolicyChangedType_validator = bv.Struct(MemberSendInvitePolicyChangedType) class MemberSetProfilePhotoDetails(bb.Struct): @@ -62473,56 +48332,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSetProfilePhotoDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSetProfilePhotoDetails()' - MemberSetProfilePhotoDetails_validator = bv.Struct(MemberSetProfilePhotoDetails) class MemberSetProfilePhotoType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSetProfilePhotoType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSetProfilePhotoType(description={!r})'.format( - self._description_value, - ) - MemberSetProfilePhotoType_validator = bv.Struct(MemberSetProfilePhotoType) class MemberSpaceLimitsAddCustomQuotaDetails(bb.Struct): @@ -62535,96 +48366,44 @@ class MemberSpaceLimitsAddCustomQuotaDetails(bb.Struct): __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 + self._new_value_value = bb.NOT_SET if new_value is not None: self.new_value = new_value - @property - def new_value(self): - """ - New custom quota value in bytes. - - :rtype: int - """ - 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 + # Instance attribute type: int (validator is set below) + new_value = bb.Attribute("new_value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSpaceLimitsAddCustomQuotaDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSpaceLimitsAddCustomQuotaDetails(new_value={!r})'.format( - self._new_value_value, - ) - MemberSpaceLimitsAddCustomQuotaDetails_validator = bv.Struct(MemberSpaceLimitsAddCustomQuotaDetails) class MemberSpaceLimitsAddCustomQuotaType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSpaceLimitsAddCustomQuotaType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSpaceLimitsAddCustomQuotaType(description={!r})'.format( - self._description_value, - ) - MemberSpaceLimitsAddCustomQuotaType_validator = bv.Struct(MemberSpaceLimitsAddCustomQuotaType) class MemberSpaceLimitsAddExceptionDetails(bb.Struct): @@ -62643,56 +48422,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSpaceLimitsAddExceptionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSpaceLimitsAddExceptionDetails()' - MemberSpaceLimitsAddExceptionDetails_validator = bv.Struct(MemberSpaceLimitsAddExceptionDetails) class MemberSpaceLimitsAddExceptionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSpaceLimitsAddExceptionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSpaceLimitsAddExceptionType(description={!r})'.format( - self._description_value, - ) - MemberSpaceLimitsAddExceptionType_validator = bv.Struct(MemberSpaceLimitsAddExceptionType) class MemberSpaceLimitsChangeCapsTypePolicyDetails(bb.Struct): @@ -62707,9 +48458,7 @@ class MemberSpaceLimitsChangeCapsTypePolicyDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -62717,117 +48466,44 @@ class MemberSpaceLimitsChangeCapsTypePolicyDetails(bb.Struct): 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 + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET 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 space limit type. - - :rtype: SpaceCapsType - """ - 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 space limit type. - - :rtype: SpaceCapsType - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") + # Instance attribute type: SpaceCapsType (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) - @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 + # Instance attribute type: SpaceCapsType (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSpaceLimitsChangeCapsTypePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSpaceLimitsChangeCapsTypePolicyDetails(previous_value={!r}, new_value={!r})'.format( - self._previous_value_value, - self._new_value_value, - ) - MemberSpaceLimitsChangeCapsTypePolicyDetails_validator = bv.Struct(MemberSpaceLimitsChangeCapsTypePolicyDetails) class MemberSpaceLimitsChangeCapsTypePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSpaceLimitsChangeCapsTypePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSpaceLimitsChangeCapsTypePolicyType(description={!r})'.format( - self._description_value, - ) - MemberSpaceLimitsChangeCapsTypePolicyType_validator = bv.Struct(MemberSpaceLimitsChangeCapsTypePolicyType) class MemberSpaceLimitsChangeCustomQuotaDetails(bb.Struct): @@ -62842,9 +48518,7 @@ class MemberSpaceLimitsChangeCustomQuotaDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -62852,117 +48526,44 @@ class MemberSpaceLimitsChangeCustomQuotaDetails(bb.Struct): 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 + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET 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 custom quota value in bytes. - - :rtype: int - """ - 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 custom quota value in bytes. - - :rtype: int - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") + # Instance attribute type: int (validator is set below) + previous_value = bb.Attribute("previous_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 + # Instance attribute type: int (validator is set below) + new_value = bb.Attribute("new_value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSpaceLimitsChangeCustomQuotaDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSpaceLimitsChangeCustomQuotaDetails(previous_value={!r}, new_value={!r})'.format( - self._previous_value_value, - self._new_value_value, - ) - MemberSpaceLimitsChangeCustomQuotaDetails_validator = bv.Struct(MemberSpaceLimitsChangeCustomQuotaDetails) class MemberSpaceLimitsChangeCustomQuotaType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSpaceLimitsChangeCustomQuotaType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSpaceLimitsChangeCustomQuotaType(description={!r})'.format( - self._description_value, - ) - MemberSpaceLimitsChangeCustomQuotaType_validator = bv.Struct(MemberSpaceLimitsChangeCustomQuotaType) class MemberSpaceLimitsChangePolicyDetails(bb.Struct): @@ -62979,9 +48580,7 @@ class MemberSpaceLimitsChangePolicyDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = False @@ -62989,125 +48588,44 @@ class MemberSpaceLimitsChangePolicyDetails(bb.Struct): 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 + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET 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 team default limit value in bytes. Might be missing due to - historical data gap. - - :rtype: int - """ - 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 team default limit value in bytes. Might be missing due to - historical data gap. - - :rtype: int - """ - 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 + # Instance attribute type: int (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True) - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False + # Instance attribute type: int (validator is set below) + new_value = bb.Attribute("new_value", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSpaceLimitsChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 MemberSpaceLimitsChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSpaceLimitsChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSpaceLimitsChangePolicyType(description={!r})'.format( - self._description_value, - ) - MemberSpaceLimitsChangePolicyType_validator = bv.Struct(MemberSpaceLimitsChangePolicyType) class MemberSpaceLimitsChangeStatusDetails(bb.Struct): @@ -63122,9 +48640,7 @@ class MemberSpaceLimitsChangeStatusDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -63132,117 +48648,44 @@ class MemberSpaceLimitsChangeStatusDetails(bb.Struct): 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 + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET 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 + # Instance attribute type: SpaceLimitsStatus (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=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 + # Instance attribute type: SpaceLimitsStatus (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSpaceLimitsChangeStatusDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 MemberSpaceLimitsChangeStatusType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSpaceLimitsChangeStatusType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSpaceLimitsChangeStatusType(description={!r})'.format( - self._description_value, - ) - MemberSpaceLimitsChangeStatusType_validator = bv.Struct(MemberSpaceLimitsChangeStatusType) class MemberSpaceLimitsRemoveCustomQuotaDetails(bb.Struct): @@ -63261,56 +48704,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSpaceLimitsRemoveCustomQuotaDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSpaceLimitsRemoveCustomQuotaDetails()' - MemberSpaceLimitsRemoveCustomQuotaDetails_validator = bv.Struct(MemberSpaceLimitsRemoveCustomQuotaDetails) class MemberSpaceLimitsRemoveCustomQuotaType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSpaceLimitsRemoveCustomQuotaType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSpaceLimitsRemoveCustomQuotaType(description={!r})'.format( - self._description_value, - ) - MemberSpaceLimitsRemoveCustomQuotaType_validator = bv.Struct(MemberSpaceLimitsRemoveCustomQuotaType) class MemberSpaceLimitsRemoveExceptionDetails(bb.Struct): @@ -63329,56 +48744,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSpaceLimitsRemoveExceptionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSpaceLimitsRemoveExceptionDetails()' - MemberSpaceLimitsRemoveExceptionDetails_validator = bv.Struct(MemberSpaceLimitsRemoveExceptionDetails) class MemberSpaceLimitsRemoveExceptionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSpaceLimitsRemoveExceptionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSpaceLimitsRemoveExceptionType(description={!r})'.format( - self._description_value, - ) - MemberSpaceLimitsRemoveExceptionType_validator = bv.Struct(MemberSpaceLimitsRemoveExceptionType) class MemberStatus(bb.Union): @@ -63463,9 +48850,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberStatus(%r, %r)' % (self._tag, self._value) - MemberStatus_validator = bv.Union(MemberStatus) class MemberSuggestDetails(bb.Struct): @@ -63478,96 +48862,44 @@ class MemberSuggestDetails(bb.Struct): __slots__ = [ '_suggested_members_value', - '_suggested_members_present', ] _has_required_fields = True def __init__(self, suggested_members=None): - self._suggested_members_value = None - self._suggested_members_present = False + self._suggested_members_value = bb.NOT_SET if suggested_members is not None: self.suggested_members = suggested_members - @property - def suggested_members(self): - """ - suggested users emails. - - :rtype: list of [str] - """ - if self._suggested_members_present: - return self._suggested_members_value - else: - raise AttributeError("missing required field 'suggested_members'") - - @suggested_members.setter - def suggested_members(self, val): - val = self._suggested_members_validator.validate(val) - self._suggested_members_value = val - self._suggested_members_present = True - - @suggested_members.deleter - def suggested_members(self): - self._suggested_members_value = None - self._suggested_members_present = False + # Instance attribute type: list of [str] (validator is set below) + suggested_members = bb.Attribute("suggested_members") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSuggestDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSuggestDetails(suggested_members={!r})'.format( - self._suggested_members_value, - ) - MemberSuggestDetails_validator = bv.Struct(MemberSuggestDetails) class MemberSuggestType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSuggestType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSuggestType(description={!r})'.format( - self._description_value, - ) - MemberSuggestType_validator = bv.Struct(MemberSuggestType) class MemberSuggestionsChangePolicyDetails(bb.Struct): @@ -63583,9 +48915,7 @@ class MemberSuggestionsChangePolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -63593,121 +48923,44 @@ class MemberSuggestionsChangePolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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. + # Instance attribute type: MemberSuggestionsPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - :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 + # Instance attribute type: MemberSuggestionsPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSuggestionsChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 MemberSuggestionsChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSuggestionsChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSuggestionsChangePolicyType(description={!r})'.format( - self._description_value, - ) - MemberSuggestionsChangePolicyType_validator = bv.Struct(MemberSuggestionsChangePolicyType) class MemberSuggestionsPolicy(bb.Union): @@ -63754,9 +49007,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberSuggestionsPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberSuggestionsPolicy(%r, %r)' % (self._tag, self._value) - MemberSuggestionsPolicy_validator = bv.Union(MemberSuggestionsPolicy) class MemberTransferAccountContentsDetails(bb.Struct): @@ -63775,56 +49025,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberTransferAccountContentsDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberTransferAccountContentsDetails()' - MemberTransferAccountContentsDetails_validator = bv.Struct(MemberTransferAccountContentsDetails) class MemberTransferAccountContentsType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberTransferAccountContentsType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MemberTransferAccountContentsType(description={!r})'.format( - self._description_value, - ) - MemberTransferAccountContentsType_validator = bv.Struct(MemberTransferAccountContentsType) class MicrosoftOfficeAddinChangePolicyDetails(bb.Struct): @@ -63840,9 +49062,7 @@ class MicrosoftOfficeAddinChangePolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -63850,121 +49070,44 @@ class MicrosoftOfficeAddinChangePolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: MicrosoftOfficeAddinPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False + # Instance attribute type: MicrosoftOfficeAddinPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MicrosoftOfficeAddinChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 MicrosoftOfficeAddinChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(MicrosoftOfficeAddinChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MicrosoftOfficeAddinChangePolicyType(description={!r})'.format( - self._description_value, - ) - MicrosoftOfficeAddinChangePolicyType_validator = bv.Struct(MicrosoftOfficeAddinChangePolicyType) class MicrosoftOfficeAddinPolicy(bb.Union): @@ -64011,9 +49154,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(MicrosoftOfficeAddinPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MicrosoftOfficeAddinPolicy(%r, %r)' % (self._tag, self._value) - MicrosoftOfficeAddinPolicy_validator = bv.Union(MicrosoftOfficeAddinPolicy) class MissingDetails(bb.Struct): @@ -64027,53 +49167,22 @@ class MissingDetails(bb.Struct): __slots__ = [ '_source_event_fields_value', - '_source_event_fields_present', ] _has_required_fields = False def __init__(self, source_event_fields=None): - self._source_event_fields_value = None - self._source_event_fields_present = False + self._source_event_fields_value = bb.NOT_SET if source_event_fields is not None: self.source_event_fields = source_event_fields - @property - def source_event_fields(self): - """ - All the data that could be retrieved and converted from the source - event. - - :rtype: str - """ - if self._source_event_fields_present: - return self._source_event_fields_value - else: - return None - - @source_event_fields.setter - def source_event_fields(self, val): - if val is None: - del self.source_event_fields - return - val = self._source_event_fields_validator.validate(val) - self._source_event_fields_value = val - self._source_event_fields_present = True - - @source_event_fields.deleter - def source_event_fields(self): - self._source_event_fields_value = None - self._source_event_fields_present = False + # Instance attribute type: str (validator is set below) + source_event_fields = bb.Attribute("source_event_fields", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MissingDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MissingDetails(source_event_fields={!r})'.format( - self._source_event_fields_value, - ) - MissingDetails_validator = bv.Struct(MissingDetails) class MobileDeviceSessionLogInfo(DeviceSessionLogInfo): @@ -64095,17 +49204,11 @@ class MobileDeviceSessionLogInfo(DeviceSessionLogInfo): __slots__ = [ '_session_info_value', - '_session_info_present', '_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 @@ -64123,18 +49226,12 @@ def __init__(self, super(MobileDeviceSessionLogInfo, self).__init__(ip_address, created, updated) - self._session_info_value = None - self._session_info_present = False - 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 + self._session_info_value = bb.NOT_SET + self._device_name_value = bb.NOT_SET + self._client_type_value = bb.NOT_SET + self._client_version_value = bb.NOT_SET + self._os_version_value = bb.NOT_SET + self._last_carrier_value = bb.NOT_SET if session_info is not None: self.session_info = session_info if device_name is not None: @@ -64148,172 +49245,27 @@ def __init__(self, if last_carrier is not None: self.last_carrier = last_carrier - @property - def session_info(self): - """ - Mobile session unique id. Might be missing due to historical data gap. - - :rtype: MobileSessionLogInfo - """ - if self._session_info_present: - return self._session_info_value - else: - return None - - @session_info.setter - def session_info(self, val): - if val is None: - del self.session_info - return - self._session_info_validator.validate_type_only(val) - self._session_info_value = val - self._session_info_present = True - - @session_info.deleter - def session_info(self): - self._session_info_value = None - self._session_info_present = False - - @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: team.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. + # Instance attribute type: MobileSessionLogInfo (validator is set below) + session_info = bb.Attribute("session_info", nullable=True, user_defined=True) - :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 + # Instance attribute type: str (validator is set below) + device_name = bb.Attribute("device_name") - @client_version.deleter - def client_version(self): - self._client_version_value = None - self._client_version_present = False + # Instance attribute type: team.MobileClientPlatform (validator is set below) + client_type = bb.Attribute("client_type", user_defined=True) - @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 + # Instance attribute type: str (validator is set below) + client_version = bb.Attribute("client_version", nullable=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 + # Instance attribute type: str (validator is set below) + os_version = bb.Attribute("os_version", nullable=True) - @last_carrier.deleter - def last_carrier(self): - self._last_carrier_value = None - self._last_carrier_present = False + # Instance attribute type: str (validator is set below) + last_carrier = bb.Attribute("last_carrier", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(MobileDeviceSessionLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MobileDeviceSessionLogInfo(device_name={!r}, client_type={!r}, ip_address={!r}, created={!r}, updated={!r}, session_info={!r}, client_version={!r}, os_version={!r}, last_carrier={!r})'.format( - self._device_name_value, - self._client_type_value, - self._ip_address_value, - self._created_value, - self._updated_value, - self._session_info_value, - self._client_version_value, - self._os_version_value, - self._last_carrier_value, - ) - MobileDeviceSessionLogInfo_validator = bv.Struct(MobileDeviceSessionLogInfo) class MobileSessionLogInfo(SessionLogInfo): @@ -64333,11 +49285,6 @@ def __init__(self, def _process_custom_annotations(self, annotation_type, field_path, processor): super(MobileSessionLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'MobileSessionLogInfo(session_id={!r})'.format( - self._session_id_value, - ) - MobileSessionLogInfo_validator = bv.Struct(MobileSessionLogInfo) class NamespaceRelativePathLogInfo(bb.Struct): @@ -64355,11 +49302,8 @@ class NamespaceRelativePathLogInfo(bb.Struct): __slots__ = [ '_ns_id_value', - '_ns_id_present', '_relative_path_value', - '_relative_path_present', '_is_shared_namespace_value', - '_is_shared_namespace_present', ] _has_required_fields = False @@ -64368,12 +49312,9 @@ def __init__(self, ns_id=None, relative_path=None, is_shared_namespace=None): - self._ns_id_value = None - self._ns_id_present = False - self._relative_path_value = None - self._relative_path_present = False - self._is_shared_namespace_value = None - self._is_shared_namespace_present = False + self._ns_id_value = bb.NOT_SET + self._relative_path_value = bb.NOT_SET + self._is_shared_namespace_value = bb.NOT_SET if ns_id is not None: self.ns_id = ns_id if relative_path is not None: @@ -64381,96 +49322,18 @@ def __init__(self, if is_shared_namespace is not None: self.is_shared_namespace = is_shared_namespace - @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. + # Instance attribute type: str (validator is set below) + ns_id = bb.Attribute("ns_id", nullable=True) - :rtype: str - """ - if self._relative_path_present: - return self._relative_path_value - else: - return None + # Instance attribute type: str (validator is set below) + relative_path = bb.Attribute("relative_path", nullable=True) - @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 - - @property - def is_shared_namespace(self): - """ - True if the namespace is shared. Might be missing due to historical data - gap. - - :rtype: bool - """ - if self._is_shared_namespace_present: - return self._is_shared_namespace_value - else: - return None - - @is_shared_namespace.setter - def is_shared_namespace(self, val): - if val is None: - del self.is_shared_namespace - return - val = self._is_shared_namespace_validator.validate(val) - self._is_shared_namespace_value = val - self._is_shared_namespace_present = True - - @is_shared_namespace.deleter - def is_shared_namespace(self): - self._is_shared_namespace_value = None - self._is_shared_namespace_present = False + # Instance attribute type: bool (validator is set below) + is_shared_namespace = bb.Attribute("is_shared_namespace", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(NamespaceRelativePathLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NamespaceRelativePathLogInfo(ns_id={!r}, relative_path={!r}, is_shared_namespace={!r})'.format( - self._ns_id_value, - self._relative_path_value, - self._is_shared_namespace_value, - ) - NamespaceRelativePathLogInfo_validator = bv.Struct(NamespaceRelativePathLogInfo) class NetworkControlChangePolicyDetails(bb.Struct): @@ -64485,9 +49348,7 @@ class NetworkControlChangePolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -64495,121 +49356,44 @@ class NetworkControlChangePolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: NetworkControlPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=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 + # Instance attribute type: NetworkControlPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(NetworkControlChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 NetworkControlChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(NetworkControlChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NetworkControlChangePolicyType(description={!r})'.format( - self._description_value, - ) - NetworkControlChangePolicyType_validator = bv.Struct(NetworkControlChangePolicyType) class NetworkControlPolicy(bb.Union): @@ -64656,9 +49440,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(NetworkControlPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NetworkControlPolicy(%r, %r)' % (self._tag, self._value) - NetworkControlPolicy_validator = bv.Union(NetworkControlPolicy) class NoExpirationLinkGenCreateReportDetails(bb.Struct): @@ -64673,9 +49454,7 @@ class NoExpirationLinkGenCreateReportDetails(bb.Struct): __slots__ = [ '_start_date_value', - '_start_date_present', '_end_date_value', - '_end_date_present', ] _has_required_fields = True @@ -64683,117 +49462,44 @@ class NoExpirationLinkGenCreateReportDetails(bb.Struct): 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 + self._start_date_value = bb.NOT_SET + self._end_date_value = bb.NOT_SET 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 + # Instance attribute type: datetime.datetime (validator is set below) + start_date = bb.Attribute("start_date") - @end_date.deleter - def end_date(self): - self._end_date_value = None - self._end_date_present = False + # Instance attribute type: datetime.datetime (validator is set below) + end_date = bb.Attribute("end_date") def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoExpirationLinkGenCreateReportDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoExpirationLinkGenCreateReportDetails(start_date={!r}, end_date={!r})'.format( - self._start_date_value, - self._end_date_value, - ) - NoExpirationLinkGenCreateReportDetails_validator = bv.Struct(NoExpirationLinkGenCreateReportDetails) class NoExpirationLinkGenCreateReportType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoExpirationLinkGenCreateReportType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoExpirationLinkGenCreateReportType(description={!r})'.format( - self._description_value, - ) - NoExpirationLinkGenCreateReportType_validator = bv.Struct(NoExpirationLinkGenCreateReportType) class NoExpirationLinkGenReportFailedDetails(bb.Struct): @@ -64806,96 +49512,44 @@ class NoExpirationLinkGenReportFailedDetails(bb.Struct): __slots__ = [ '_failure_reason_value', - '_failure_reason_present', ] _has_required_fields = True def __init__(self, failure_reason=None): - self._failure_reason_value = None - self._failure_reason_present = False + self._failure_reason_value = bb.NOT_SET if failure_reason is not None: self.failure_reason = failure_reason - @property - def failure_reason(self): - """ - Failure reason. - - :rtype: team.TeamReportFailureReason - """ - if self._failure_reason_present: - return self._failure_reason_value - else: - raise AttributeError("missing required field 'failure_reason'") - - @failure_reason.setter - def failure_reason(self, val): - self._failure_reason_validator.validate_type_only(val) - self._failure_reason_value = val - self._failure_reason_present = True - - @failure_reason.deleter - def failure_reason(self): - self._failure_reason_value = None - self._failure_reason_present = False + # Instance attribute type: team.TeamReportFailureReason (validator is set below) + failure_reason = bb.Attribute("failure_reason", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoExpirationLinkGenReportFailedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoExpirationLinkGenReportFailedDetails(failure_reason={!r})'.format( - self._failure_reason_value, - ) - NoExpirationLinkGenReportFailedDetails_validator = bv.Struct(NoExpirationLinkGenReportFailedDetails) class NoExpirationLinkGenReportFailedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoExpirationLinkGenReportFailedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoExpirationLinkGenReportFailedType(description={!r})'.format( - self._description_value, - ) - NoExpirationLinkGenReportFailedType_validator = bv.Struct(NoExpirationLinkGenReportFailedType) class NoPasswordLinkGenCreateReportDetails(bb.Struct): @@ -64910,9 +49564,7 @@ class NoPasswordLinkGenCreateReportDetails(bb.Struct): __slots__ = [ '_start_date_value', - '_start_date_present', '_end_date_value', - '_end_date_present', ] _has_required_fields = True @@ -64920,117 +49572,44 @@ class NoPasswordLinkGenCreateReportDetails(bb.Struct): 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 + self._start_date_value = bb.NOT_SET + self._end_date_value = bb.NOT_SET 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 + # Instance attribute type: datetime.datetime (validator is set below) + start_date = bb.Attribute("start_date") - @end_date.deleter - def end_date(self): - self._end_date_value = None - self._end_date_present = False + # Instance attribute type: datetime.datetime (validator is set below) + end_date = bb.Attribute("end_date") def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoPasswordLinkGenCreateReportDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoPasswordLinkGenCreateReportDetails(start_date={!r}, end_date={!r})'.format( - self._start_date_value, - self._end_date_value, - ) - NoPasswordLinkGenCreateReportDetails_validator = bv.Struct(NoPasswordLinkGenCreateReportDetails) class NoPasswordLinkGenCreateReportType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoPasswordLinkGenCreateReportType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoPasswordLinkGenCreateReportType(description={!r})'.format( - self._description_value, - ) - NoPasswordLinkGenCreateReportType_validator = bv.Struct(NoPasswordLinkGenCreateReportType) class NoPasswordLinkGenReportFailedDetails(bb.Struct): @@ -65043,96 +49622,44 @@ class NoPasswordLinkGenReportFailedDetails(bb.Struct): __slots__ = [ '_failure_reason_value', - '_failure_reason_present', ] _has_required_fields = True def __init__(self, failure_reason=None): - self._failure_reason_value = None - self._failure_reason_present = False + self._failure_reason_value = bb.NOT_SET if failure_reason is not None: self.failure_reason = failure_reason - @property - def failure_reason(self): - """ - Failure reason. - - :rtype: team.TeamReportFailureReason - """ - if self._failure_reason_present: - return self._failure_reason_value - else: - raise AttributeError("missing required field 'failure_reason'") - - @failure_reason.setter - def failure_reason(self, val): - self._failure_reason_validator.validate_type_only(val) - self._failure_reason_value = val - self._failure_reason_present = True - - @failure_reason.deleter - def failure_reason(self): - self._failure_reason_value = None - self._failure_reason_present = False + # Instance attribute type: team.TeamReportFailureReason (validator is set below) + failure_reason = bb.Attribute("failure_reason", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoPasswordLinkGenReportFailedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoPasswordLinkGenReportFailedDetails(failure_reason={!r})'.format( - self._failure_reason_value, - ) - NoPasswordLinkGenReportFailedDetails_validator = bv.Struct(NoPasswordLinkGenReportFailedDetails) class NoPasswordLinkGenReportFailedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoPasswordLinkGenReportFailedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoPasswordLinkGenReportFailedType(description={!r})'.format( - self._description_value, - ) - NoPasswordLinkGenReportFailedType_validator = bv.Struct(NoPasswordLinkGenReportFailedType) class NoPasswordLinkViewCreateReportDetails(bb.Struct): @@ -65147,9 +49674,7 @@ class NoPasswordLinkViewCreateReportDetails(bb.Struct): __slots__ = [ '_start_date_value', - '_start_date_present', '_end_date_value', - '_end_date_present', ] _has_required_fields = True @@ -65157,117 +49682,44 @@ class NoPasswordLinkViewCreateReportDetails(bb.Struct): 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 + self._start_date_value = bb.NOT_SET + self._end_date_value = bb.NOT_SET 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'") + # Instance attribute type: datetime.datetime (validator is set below) + start_date = bb.Attribute("start_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 + # Instance attribute type: datetime.datetime (validator is set below) + end_date = bb.Attribute("end_date") def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoPasswordLinkViewCreateReportDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoPasswordLinkViewCreateReportDetails(start_date={!r}, end_date={!r})'.format( - self._start_date_value, - self._end_date_value, - ) - NoPasswordLinkViewCreateReportDetails_validator = bv.Struct(NoPasswordLinkViewCreateReportDetails) class NoPasswordLinkViewCreateReportType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoPasswordLinkViewCreateReportType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoPasswordLinkViewCreateReportType(description={!r})'.format( - self._description_value, - ) - NoPasswordLinkViewCreateReportType_validator = bv.Struct(NoPasswordLinkViewCreateReportType) class NoPasswordLinkViewReportFailedDetails(bb.Struct): @@ -65280,96 +49732,44 @@ class NoPasswordLinkViewReportFailedDetails(bb.Struct): __slots__ = [ '_failure_reason_value', - '_failure_reason_present', ] _has_required_fields = True def __init__(self, failure_reason=None): - self._failure_reason_value = None - self._failure_reason_present = False + self._failure_reason_value = bb.NOT_SET if failure_reason is not None: self.failure_reason = failure_reason - @property - def failure_reason(self): - """ - Failure reason. - - :rtype: team.TeamReportFailureReason - """ - if self._failure_reason_present: - return self._failure_reason_value - else: - raise AttributeError("missing required field 'failure_reason'") - - @failure_reason.setter - def failure_reason(self, val): - self._failure_reason_validator.validate_type_only(val) - self._failure_reason_value = val - self._failure_reason_present = True - - @failure_reason.deleter - def failure_reason(self): - self._failure_reason_value = None - self._failure_reason_present = False + # Instance attribute type: team.TeamReportFailureReason (validator is set below) + failure_reason = bb.Attribute("failure_reason", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoPasswordLinkViewReportFailedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoPasswordLinkViewReportFailedDetails(failure_reason={!r})'.format( - self._failure_reason_value, - ) - NoPasswordLinkViewReportFailedDetails_validator = bv.Struct(NoPasswordLinkViewReportFailedDetails) class NoPasswordLinkViewReportFailedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoPasswordLinkViewReportFailedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoPasswordLinkViewReportFailedType(description={!r})'.format( - self._description_value, - ) - NoPasswordLinkViewReportFailedType_validator = bv.Struct(NoPasswordLinkViewReportFailedType) class UserLogInfo(bb.Struct): @@ -65386,11 +49786,8 @@ class UserLogInfo(bb.Struct): __slots__ = [ '_account_id_value', - '_account_id_present', '_display_name_value', - '_display_name_present', '_email_value', - '_email_present', ] _has_required_fields = False @@ -65399,12 +49796,9 @@ 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 + self._account_id_value = bb.NOT_SET + self._display_name_value = bb.NOT_SET + self._email_value = bb.NOT_SET if account_id is not None: self.account_id = account_id if display_name is not None: @@ -65412,94 +49806,18 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + account_id = bb.Attribute("account_id", nullable=True) - @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 + # Instance attribute type: str (validator is set below) + display_name = bb.Attribute("display_name", nullable=True) - @email.deleter - def email(self): - self._email_value = None - self._email_present = False + # Instance attribute type: str (validator is set below) + email = bb.Attribute("email", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -65523,13 +49841,6 @@ def __init__(self, def _process_custom_annotations(self, annotation_type, field_path, processor): super(NonTeamMemberLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 NonTrustedTeamDetails(bb.Struct): @@ -65542,49 +49853,22 @@ class NonTrustedTeamDetails(bb.Struct): __slots__ = [ '_team_value', - '_team_present', ] _has_required_fields = True def __init__(self, team=None): - self._team_value = None - self._team_present = False + self._team_value = bb.NOT_SET if team is not None: self.team = team - @property - def team(self): - """ - The email to which the request was sent. - - :rtype: str - """ - if self._team_present: - return self._team_value - else: - raise AttributeError("missing required field 'team'") - - @team.setter - def team(self, val): - val = self._team_validator.validate(val) - self._team_value = val - self._team_present = True - - @team.deleter - def team(self): - self._team_value = None - self._team_present = False + # Instance attribute type: str (validator is set below) + team = bb.Attribute("team") def _process_custom_annotations(self, annotation_type, field_path, processor): super(NonTrustedTeamDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NonTrustedTeamDetails(team={!r})'.format( - self._team_value, - ) - NonTrustedTeamDetails_validator = bv.Struct(NonTrustedTeamDetails) class NoteAclInviteOnlyDetails(bb.Struct): @@ -65603,56 +49887,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoteAclInviteOnlyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoteAclInviteOnlyDetails()' - NoteAclInviteOnlyDetails_validator = bv.Struct(NoteAclInviteOnlyDetails) class NoteAclInviteOnlyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoteAclInviteOnlyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoteAclInviteOnlyType(description={!r})'.format( - self._description_value, - ) - NoteAclInviteOnlyType_validator = bv.Struct(NoteAclInviteOnlyType) class NoteAclLinkDetails(bb.Struct): @@ -65671,56 +49927,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoteAclLinkDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoteAclLinkDetails()' - NoteAclLinkDetails_validator = bv.Struct(NoteAclLinkDetails) class NoteAclLinkType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoteAclLinkType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoteAclLinkType(description={!r})'.format( - self._description_value, - ) - NoteAclLinkType_validator = bv.Struct(NoteAclLinkType) class NoteAclTeamLinkDetails(bb.Struct): @@ -65739,56 +49967,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoteAclTeamLinkDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoteAclTeamLinkDetails()' - NoteAclTeamLinkDetails_validator = bv.Struct(NoteAclTeamLinkDetails) class NoteAclTeamLinkType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoteAclTeamLinkType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoteAclTeamLinkType(description={!r})'.format( - self._description_value, - ) - NoteAclTeamLinkType_validator = bv.Struct(NoteAclTeamLinkType) class NoteShareReceiveDetails(bb.Struct): @@ -65807,56 +50007,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoteShareReceiveDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoteShareReceiveDetails()' - NoteShareReceiveDetails_validator = bv.Struct(NoteShareReceiveDetails) class NoteShareReceiveType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoteShareReceiveType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoteShareReceiveType(description={!r})'.format( - self._description_value, - ) - NoteShareReceiveType_validator = bv.Struct(NoteShareReceiveType) class NoteSharedDetails(bb.Struct): @@ -65875,56 +50047,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoteSharedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoteSharedDetails()' - NoteSharedDetails_validator = bv.Struct(NoteSharedDetails) class NoteSharedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(NoteSharedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'NoteSharedType(description={!r})'.format( - self._description_value, - ) - NoteSharedType_validator = bv.Struct(NoteSharedType) class OpenNoteSharedDetails(bb.Struct): @@ -65943,56 +50087,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(OpenNoteSharedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'OpenNoteSharedDetails()' - OpenNoteSharedDetails_validator = bv.Struct(OpenNoteSharedDetails) class OpenNoteSharedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(OpenNoteSharedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'OpenNoteSharedType(description={!r})'.format( - self._description_value, - ) - OpenNoteSharedType_validator = bv.Struct(OpenNoteSharedType) class OrganizationDetails(bb.Struct): @@ -66005,49 +50121,22 @@ class OrganizationDetails(bb.Struct): __slots__ = [ '_organization_value', - '_organization_present', ] _has_required_fields = True def __init__(self, organization=None): - self._organization_value = None - self._organization_present = False + self._organization_value = bb.NOT_SET if organization is not None: self.organization = organization - @property - def organization(self): - """ - The name of the organization. - - :rtype: str - """ - if self._organization_present: - return self._organization_value - else: - raise AttributeError("missing required field 'organization'") - - @organization.setter - def organization(self, val): - val = self._organization_validator.validate(val) - self._organization_value = val - self._organization_present = True - - @organization.deleter - def organization(self): - self._organization_value = None - self._organization_present = False + # Instance attribute type: str (validator is set below) + organization = bb.Attribute("organization") def _process_custom_annotations(self, annotation_type, field_path, processor): super(OrganizationDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'OrganizationDetails(organization={!r})'.format( - self._organization_value, - ) - OrganizationDetails_validator = bv.Struct(OrganizationDetails) class OrganizationName(bb.Struct): @@ -66059,49 +50148,22 @@ class OrganizationName(bb.Struct): __slots__ = [ '_organization_value', - '_organization_present', ] _has_required_fields = True def __init__(self, organization=None): - self._organization_value = None - self._organization_present = False + self._organization_value = bb.NOT_SET if organization is not None: self.organization = organization - @property - def organization(self): - """ - The name of the organization. - - :rtype: str - """ - if self._organization_present: - return self._organization_value - else: - raise AttributeError("missing required field 'organization'") - - @organization.setter - def organization(self, val): - val = self._organization_validator.validate(val) - self._organization_value = val - self._organization_present = True - - @organization.deleter - def organization(self): - self._organization_value = None - self._organization_present = False + # Instance attribute type: str (validator is set below) + organization = bb.Attribute("organization") def _process_custom_annotations(self, annotation_type, field_path, processor): super(OrganizationName, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'OrganizationName(organization={!r})'.format( - self._organization_value, - ) - OrganizationName_validator = bv.Struct(OrganizationName) class OriginLogInfo(bb.Struct): @@ -66115,9 +50177,7 @@ class OriginLogInfo(bb.Struct): __slots__ = [ '_geo_location_value', - '_geo_location_present', '_access_method_value', - '_access_method_present', ] _has_required_fields = True @@ -66125,73 +50185,22 @@ class OriginLogInfo(bb.Struct): def __init__(self, access_method=None, geo_location=None): - self._geo_location_value = None - self._geo_location_present = False - self._access_method_value = None - self._access_method_present = False + self._geo_location_value = bb.NOT_SET + self._access_method_value = bb.NOT_SET if geo_location is not None: self.geo_location = geo_location if access_method is not None: self.access_method = access_method - @property - def geo_location(self): - """ - Geographic location details. + # Instance attribute type: GeoLocationLogInfo (validator is set below) + geo_location = bb.Attribute("geo_location", nullable=True, user_defined=True) - :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 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 + # Instance attribute type: AccessMethodLogInfo (validator is set below) + access_method = bb.Attribute("access_method", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(OriginLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'OriginLogInfo(access_method={!r}, geo_location={!r})'.format( - self._access_method_value, - self._geo_location_value, - ) - OriginLogInfo_validator = bv.Struct(OriginLogInfo) class OutdatedLinkViewCreateReportDetails(bb.Struct): @@ -66206,9 +50215,7 @@ class OutdatedLinkViewCreateReportDetails(bb.Struct): __slots__ = [ '_start_date_value', - '_start_date_present', '_end_date_value', - '_end_date_present', ] _has_required_fields = True @@ -66216,117 +50223,44 @@ class OutdatedLinkViewCreateReportDetails(bb.Struct): 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 + self._start_date_value = bb.NOT_SET + self._end_date_value = bb.NOT_SET 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. + # Instance attribute type: datetime.datetime (validator is set below) + start_date = bb.Attribute("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 + # Instance attribute type: datetime.datetime (validator is set below) + end_date = bb.Attribute("end_date") def _process_custom_annotations(self, annotation_type, field_path, processor): super(OutdatedLinkViewCreateReportDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'OutdatedLinkViewCreateReportDetails(start_date={!r}, end_date={!r})'.format( - self._start_date_value, - self._end_date_value, - ) - OutdatedLinkViewCreateReportDetails_validator = bv.Struct(OutdatedLinkViewCreateReportDetails) class OutdatedLinkViewCreateReportType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(OutdatedLinkViewCreateReportType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'OutdatedLinkViewCreateReportType(description={!r})'.format( - self._description_value, - ) - OutdatedLinkViewCreateReportType_validator = bv.Struct(OutdatedLinkViewCreateReportType) class OutdatedLinkViewReportFailedDetails(bb.Struct): @@ -66339,96 +50273,44 @@ class OutdatedLinkViewReportFailedDetails(bb.Struct): __slots__ = [ '_failure_reason_value', - '_failure_reason_present', ] _has_required_fields = True def __init__(self, failure_reason=None): - self._failure_reason_value = None - self._failure_reason_present = False + self._failure_reason_value = bb.NOT_SET if failure_reason is not None: self.failure_reason = failure_reason - @property - def failure_reason(self): - """ - Failure reason. - - :rtype: team.TeamReportFailureReason - """ - if self._failure_reason_present: - return self._failure_reason_value - else: - raise AttributeError("missing required field 'failure_reason'") - - @failure_reason.setter - def failure_reason(self, val): - self._failure_reason_validator.validate_type_only(val) - self._failure_reason_value = val - self._failure_reason_present = True - - @failure_reason.deleter - def failure_reason(self): - self._failure_reason_value = None - self._failure_reason_present = False + # Instance attribute type: team.TeamReportFailureReason (validator is set below) + failure_reason = bb.Attribute("failure_reason", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(OutdatedLinkViewReportFailedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'OutdatedLinkViewReportFailedDetails(failure_reason={!r})'.format( - self._failure_reason_value, - ) - OutdatedLinkViewReportFailedDetails_validator = bv.Struct(OutdatedLinkViewReportFailedDetails) class OutdatedLinkViewReportFailedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(OutdatedLinkViewReportFailedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'OutdatedLinkViewReportFailedType(description={!r})'.format( - self._description_value, - ) - OutdatedLinkViewReportFailedType_validator = bv.Struct(OutdatedLinkViewReportFailedType) class PaperAccessType(bb.Union): @@ -66483,9 +50365,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperAccessType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperAccessType(%r, %r)' % (self._tag, self._value) - PaperAccessType_validator = bv.Union(PaperAccessType) class PaperAdminExportStartDetails(bb.Struct): @@ -66504,56 +50383,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperAdminExportStartDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperAdminExportStartDetails()' - PaperAdminExportStartDetails_validator = bv.Struct(PaperAdminExportStartDetails) class PaperAdminExportStartType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperAdminExportStartType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperAdminExportStartType(description={!r})'.format( - self._description_value, - ) - PaperAdminExportStartType_validator = bv.Struct(PaperAdminExportStartType) class PaperChangeDeploymentPolicyDetails(bb.Struct): @@ -66570,9 +50421,7 @@ class PaperChangeDeploymentPolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -66580,121 +50429,44 @@ class PaperChangeDeploymentPolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 - """ - 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 - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None + # Instance attribute type: team_policies.PaperDeploymentPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @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 + # Instance attribute type: team_policies.PaperDeploymentPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperChangeDeploymentPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 PaperChangeDeploymentPolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperChangeDeploymentPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperChangeDeploymentPolicyType(description={!r})'.format( - self._description_value, - ) - PaperChangeDeploymentPolicyType_validator = bv.Struct(PaperChangeDeploymentPolicyType) class PaperChangeMemberLinkPolicyDetails(bb.Struct): @@ -66707,96 +50479,44 @@ class PaperChangeMemberLinkPolicyDetails(bb.Struct): __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 + self._new_value_value = bb.NOT_SET 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 + # Instance attribute type: PaperMemberPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperChangeMemberLinkPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperChangeMemberLinkPolicyDetails(new_value={!r})'.format( - self._new_value_value, - ) - PaperChangeMemberLinkPolicyDetails_validator = bv.Struct(PaperChangeMemberLinkPolicyDetails) class PaperChangeMemberLinkPolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperChangeMemberLinkPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperChangeMemberLinkPolicyType(description={!r})'.format( - self._description_value, - ) - PaperChangeMemberLinkPolicyType_validator = bv.Struct(PaperChangeMemberLinkPolicyType) class PaperChangeMemberPolicyDetails(bb.Struct): @@ -66813,9 +50533,7 @@ class PaperChangeMemberPolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -66823,121 +50541,44 @@ class PaperChangeMemberPolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: PaperMemberPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @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 + # Instance attribute type: PaperMemberPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperChangeMemberPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 PaperChangeMemberPolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperChangeMemberPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperChangeMemberPolicyType(description={!r})'.format( - self._description_value, - ) - PaperChangeMemberPolicyType_validator = bv.Struct(PaperChangeMemberPolicyType) class PaperChangePolicyDetails(bb.Struct): @@ -66951,9 +50592,7 @@ class PaperChangePolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -66961,121 +50600,44 @@ class PaperChangePolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 - """ - 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 + # Instance attribute type: team_policies.PaperEnabledPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @property - def previous_value(self): - """ - Previous Dropbox Paper policy. Might be missing due to historical data - gap. - - :rtype: team_policies.PaperEnabledPolicy - """ - 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 + # Instance attribute type: team_policies.PaperEnabledPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 PaperChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperChangePolicyType(description={!r})'.format( - self._description_value, - ) - PaperChangePolicyType_validator = bv.Struct(PaperChangePolicyType) class PaperContentAddMemberDetails(bb.Struct): @@ -67088,96 +50650,44 @@ class PaperContentAddMemberDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperContentAddMemberDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperContentAddMemberDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperContentAddMemberDetails_validator = bv.Struct(PaperContentAddMemberDetails) class PaperContentAddMemberType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperContentAddMemberType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperContentAddMemberType(description={!r})'.format( - self._description_value, - ) - PaperContentAddMemberType_validator = bv.Struct(PaperContentAddMemberType) class PaperContentAddToFolderDetails(bb.Struct): @@ -67194,11 +50704,8 @@ class PaperContentAddToFolderDetails(bb.Struct): __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 @@ -67207,12 +50714,9 @@ 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 + self._event_uuid_value = bb.NOT_SET + self._target_asset_index_value = bb.NOT_SET + self._parent_asset_index_value = bb.NOT_SET if event_uuid is not None: self.event_uuid = event_uuid if target_asset_index is not None: @@ -67220,132 +50724,40 @@ def __init__(self, if parent_asset_index is not None: self.parent_asset_index = parent_asset_index - @property - def event_uuid(self): - """ - Event unique identifier. + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - :rtype: str - """ - if self._event_uuid_present: - return self._event_uuid_value - else: - raise AttributeError("missing required field 'event_uuid'") + # Instance attribute type: int (validator is set below) + target_asset_index = bb.Attribute("target_asset_index") - @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: int - """ - 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: int - """ - 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 + # Instance attribute type: int (validator is set below) + parent_asset_index = bb.Attribute("parent_asset_index") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperContentAddToFolderDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 PaperContentAddToFolderType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperContentAddToFolderType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperContentAddToFolderType(description={!r})'.format( - self._description_value, - ) - PaperContentAddToFolderType_validator = bv.Struct(PaperContentAddToFolderType) class PaperContentArchiveDetails(bb.Struct): @@ -67358,96 +50770,44 @@ class PaperContentArchiveDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperContentArchiveDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperContentArchiveDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperContentArchiveDetails_validator = bv.Struct(PaperContentArchiveDetails) class PaperContentArchiveType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperContentArchiveType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperContentArchiveType(description={!r})'.format( - self._description_value, - ) - PaperContentArchiveType_validator = bv.Struct(PaperContentArchiveType) class PaperContentCreateDetails(bb.Struct): @@ -67460,96 +50820,44 @@ class PaperContentCreateDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperContentCreateDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperContentCreateDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperContentCreateDetails_validator = bv.Struct(PaperContentCreateDetails) class PaperContentCreateType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperContentCreateType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperContentCreateType(description={!r})'.format( - self._description_value, - ) - PaperContentCreateType_validator = bv.Struct(PaperContentCreateType) class PaperContentPermanentlyDeleteDetails(bb.Struct): @@ -67562,96 +50870,44 @@ class PaperContentPermanentlyDeleteDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperContentPermanentlyDeleteDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperContentPermanentlyDeleteDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperContentPermanentlyDeleteDetails_validator = bv.Struct(PaperContentPermanentlyDeleteDetails) class PaperContentPermanentlyDeleteType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperContentPermanentlyDeleteType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperContentPermanentlyDeleteType(description={!r})'.format( - self._description_value, - ) - PaperContentPermanentlyDeleteType_validator = bv.Struct(PaperContentPermanentlyDeleteType) class PaperContentRemoveFromFolderDetails(bb.Struct): @@ -67668,11 +50924,8 @@ class PaperContentRemoveFromFolderDetails(bb.Struct): __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 @@ -67681,12 +50934,9 @@ 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 + self._event_uuid_value = bb.NOT_SET + self._target_asset_index_value = bb.NOT_SET + self._parent_asset_index_value = bb.NOT_SET if event_uuid is not None: self.event_uuid = event_uuid if target_asset_index is not None: @@ -67694,138 +50944,40 @@ def __init__(self, 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'") + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("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 + # Instance attribute type: int (validator is set below) + target_asset_index = bb.Attribute("target_asset_index", nullable=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: int - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - return None - - @target_asset_index.setter - def target_asset_index(self, val): - if val is None: - del self.target_asset_index - return - 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: int - """ - if self._parent_asset_index_present: - return self._parent_asset_index_value - else: - return None - - @parent_asset_index.setter - def parent_asset_index(self, val): - if val is None: - del self.parent_asset_index - return - 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 + # Instance attribute type: int (validator is set below) + parent_asset_index = bb.Attribute("parent_asset_index", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperContentRemoveFromFolderDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperContentRemoveFromFolderDetails(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, - ) - PaperContentRemoveFromFolderDetails_validator = bv.Struct(PaperContentRemoveFromFolderDetails) class PaperContentRemoveFromFolderType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperContentRemoveFromFolderType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperContentRemoveFromFolderType(description={!r})'.format( - self._description_value, - ) - PaperContentRemoveFromFolderType_validator = bv.Struct(PaperContentRemoveFromFolderType) class PaperContentRemoveMemberDetails(bb.Struct): @@ -67838,96 +50990,44 @@ class PaperContentRemoveMemberDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperContentRemoveMemberDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperContentRemoveMemberDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperContentRemoveMemberDetails_validator = bv.Struct(PaperContentRemoveMemberDetails) class PaperContentRemoveMemberType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperContentRemoveMemberType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperContentRemoveMemberType(description={!r})'.format( - self._description_value, - ) - PaperContentRemoveMemberType_validator = bv.Struct(PaperContentRemoveMemberType) class PaperContentRenameDetails(bb.Struct): @@ -67940,96 +51040,44 @@ class PaperContentRenameDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperContentRenameDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperContentRenameDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperContentRenameDetails_validator = bv.Struct(PaperContentRenameDetails) class PaperContentRenameType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperContentRenameType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperContentRenameType(description={!r})'.format( - self._description_value, - ) - PaperContentRenameType_validator = bv.Struct(PaperContentRenameType) class PaperContentRestoreDetails(bb.Struct): @@ -68042,96 +51090,44 @@ class PaperContentRestoreDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperContentRestoreDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperContentRestoreDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperContentRestoreDetails_validator = bv.Struct(PaperContentRestoreDetails) class PaperContentRestoreType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperContentRestoreType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperContentRestoreType(description={!r})'.format( - self._description_value, - ) - PaperContentRestoreType_validator = bv.Struct(PaperContentRestoreType) class PaperDefaultFolderPolicy(bb.Union): @@ -68178,9 +51174,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDefaultFolderPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDefaultFolderPolicy(%r, %r)' % (self._tag, self._value) - PaperDefaultFolderPolicy_validator = bv.Union(PaperDefaultFolderPolicy) class PaperDefaultFolderPolicyChangedDetails(bb.Struct): @@ -68195,9 +51188,7 @@ class PaperDefaultFolderPolicyChangedDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -68205,117 +51196,44 @@ class PaperDefaultFolderPolicyChangedDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 Default Folder Policy. + # Instance attribute type: PaperDefaultFolderPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - :rtype: PaperDefaultFolderPolicy - """ - 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 Default Folder Policy. - - :rtype: PaperDefaultFolderPolicy - """ - 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 + # Instance attribute type: PaperDefaultFolderPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDefaultFolderPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDefaultFolderPolicyChangedDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - PaperDefaultFolderPolicyChangedDetails_validator = bv.Struct(PaperDefaultFolderPolicyChangedDetails) class PaperDefaultFolderPolicyChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDefaultFolderPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDefaultFolderPolicyChangedType(description={!r})'.format( - self._description_value, - ) - PaperDefaultFolderPolicyChangedType_validator = bv.Struct(PaperDefaultFolderPolicyChangedType) class PaperDesktopPolicy(bb.Union): @@ -68362,9 +51280,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDesktopPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDesktopPolicy(%r, %r)' % (self._tag, self._value) - PaperDesktopPolicy_validator = bv.Union(PaperDesktopPolicy) class PaperDesktopPolicyChangedDetails(bb.Struct): @@ -68379,9 +51294,7 @@ class PaperDesktopPolicyChangedDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -68389,117 +51302,44 @@ class PaperDesktopPolicyChangedDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 Desktop policy. - - :rtype: PaperDesktopPolicy - """ - 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 Desktop policy. - - :rtype: PaperDesktopPolicy - """ - 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 + # Instance attribute type: PaperDesktopPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False + # Instance attribute type: PaperDesktopPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDesktopPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDesktopPolicyChangedDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - PaperDesktopPolicyChangedDetails_validator = bv.Struct(PaperDesktopPolicyChangedDetails) class PaperDesktopPolicyChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDesktopPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDesktopPolicyChangedType(description={!r})'.format( - self._description_value, - ) - PaperDesktopPolicyChangedType_validator = bv.Struct(PaperDesktopPolicyChangedType) class PaperDocAddCommentDetails(bb.Struct): @@ -68514,9 +51354,7 @@ class PaperDocAddCommentDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_comment_text_value', - '_comment_text_present', ] _has_required_fields = True @@ -68524,120 +51362,44 @@ class PaperDocAddCommentDetails(bb.Struct): 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 + self._event_uuid_value = bb.NOT_SET + self._comment_text_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - @comment_text.deleter - def comment_text(self): - self._comment_text_value = None - self._comment_text_present = False + # Instance attribute type: str (validator is set below) + comment_text = bb.Attribute("comment_text", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocAddCommentDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 PaperDocAddCommentType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocAddCommentType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocAddCommentType(description={!r})'.format( - self._description_value, - ) - PaperDocAddCommentType_validator = bv.Struct(PaperDocAddCommentType) class PaperDocChangeMemberRoleDetails(bb.Struct): @@ -68652,9 +51414,7 @@ class PaperDocChangeMemberRoleDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_access_type_value', - '_access_type_present', ] _has_required_fields = True @@ -68662,117 +51422,44 @@ class PaperDocChangeMemberRoleDetails(bb.Struct): 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 + self._event_uuid_value = bb.NOT_SET + self._access_type_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - @access_type.deleter - def access_type(self): - self._access_type_value = None - self._access_type_present = False + # Instance attribute type: PaperAccessType (validator is set below) + access_type = bb.Attribute("access_type", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocChangeMemberRoleDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 PaperDocChangeMemberRoleType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocChangeMemberRoleType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocChangeMemberRoleType(description={!r})'.format( - self._description_value, - ) - PaperDocChangeMemberRoleType_validator = bv.Struct(PaperDocChangeMemberRoleType) class PaperDocChangeSharingPolicyDetails(bb.Struct): @@ -68790,11 +51477,8 @@ class PaperDocChangeSharingPolicyDetails(bb.Struct): __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 @@ -68803,12 +51487,9 @@ 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 + self._event_uuid_value = bb.NOT_SET + self._public_sharing_policy_value = bb.NOT_SET + self._team_sharing_policy_value = bb.NOT_SET if event_uuid is not None: self.event_uuid = event_uuid if public_sharing_policy is not None: @@ -68816,139 +51497,40 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - @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 + # Instance attribute type: str (validator is set below) + public_sharing_policy = bb.Attribute("public_sharing_policy", nullable=True) - @team_sharing_policy.deleter - def team_sharing_policy(self): - self._team_sharing_policy_value = None - self._team_sharing_policy_present = False + # Instance attribute type: str (validator is set below) + team_sharing_policy = bb.Attribute("team_sharing_policy", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocChangeSharingPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 PaperDocChangeSharingPolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocChangeSharingPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocChangeSharingPolicyType(description={!r})'.format( - self._description_value, - ) - PaperDocChangeSharingPolicyType_validator = bv.Struct(PaperDocChangeSharingPolicyType) class PaperDocChangeSubscriptionDetails(bb.Struct): @@ -68967,11 +51549,8 @@ class PaperDocChangeSubscriptionDetails(bb.Struct): __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 @@ -68980,12 +51559,9 @@ 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 + self._event_uuid_value = bb.NOT_SET + self._new_subscription_level_value = bb.NOT_SET + self._previous_subscription_level_value = bb.NOT_SET if event_uuid is not None: self.event_uuid = event_uuid if new_subscription_level is not None: @@ -68993,136 +51569,40 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - @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 + # Instance attribute type: str (validator is set below) + new_subscription_level = bb.Attribute("new_subscription_level") - @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 + # Instance attribute type: str (validator is set below) + previous_subscription_level = bb.Attribute("previous_subscription_level", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocChangeSubscriptionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 PaperDocChangeSubscriptionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocChangeSubscriptionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocChangeSubscriptionType(description={!r})'.format( - self._description_value, - ) - PaperDocChangeSubscriptionType_validator = bv.Struct(PaperDocChangeSubscriptionType) class PaperDocDeleteCommentDetails(bb.Struct): @@ -69137,9 +51617,7 @@ class PaperDocDeleteCommentDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_comment_text_value', - '_comment_text_present', ] _has_required_fields = True @@ -69147,120 +51625,44 @@ class PaperDocDeleteCommentDetails(bb.Struct): 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 + self._event_uuid_value = bb.NOT_SET + self._comment_text_value = bb.NOT_SET 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. + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - :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 + # Instance attribute type: str (validator is set below) + comment_text = bb.Attribute("comment_text", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocDeleteCommentDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 PaperDocDeleteCommentType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocDeleteCommentType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocDeleteCommentType(description={!r})'.format( - self._description_value, - ) - PaperDocDeleteCommentType_validator = bv.Struct(PaperDocDeleteCommentType) class PaperDocDeletedDetails(bb.Struct): @@ -69272,96 +51674,44 @@ class PaperDocDeletedDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocDeletedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocDeletedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperDocDeletedDetails_validator = bv.Struct(PaperDocDeletedDetails) class PaperDocDeletedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocDeletedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocDeletedType(description={!r})'.format( - self._description_value, - ) - PaperDocDeletedType_validator = bv.Struct(PaperDocDeletedType) class PaperDocDownloadDetails(bb.Struct): @@ -69375,9 +51725,7 @@ class PaperDocDownloadDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_export_file_format_value', - '_export_file_format_present', ] _has_required_fields = True @@ -69385,117 +51733,44 @@ class PaperDocDownloadDetails(bb.Struct): 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 + self._event_uuid_value = bb.NOT_SET + self._export_file_format_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - @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 + # Instance attribute type: PaperDownloadFormat (validator is set below) + export_file_format = bb.Attribute("export_file_format", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocDownloadDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 PaperDocDownloadType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocDownloadType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocDownloadType(description={!r})'.format( - self._description_value, - ) - PaperDocDownloadType_validator = bv.Struct(PaperDocDownloadType) class PaperDocEditCommentDetails(bb.Struct): @@ -69510,9 +51785,7 @@ class PaperDocEditCommentDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_comment_text_value', - '_comment_text_present', ] _has_required_fields = True @@ -69520,120 +51793,44 @@ class PaperDocEditCommentDetails(bb.Struct): 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 + self._event_uuid_value = bb.NOT_SET + self._comment_text_value = bb.NOT_SET 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'") + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("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 + # Instance attribute type: str (validator is set below) + comment_text = bb.Attribute("comment_text", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocEditCommentDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 PaperDocEditCommentType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocEditCommentType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocEditCommentType(description={!r})'.format( - self._description_value, - ) - PaperDocEditCommentType_validator = bv.Struct(PaperDocEditCommentType) class PaperDocEditDetails(bb.Struct): @@ -69645,96 +51842,44 @@ class PaperDocEditDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocEditDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocEditDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperDocEditDetails_validator = bv.Struct(PaperDocEditDetails) class PaperDocEditType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocEditType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocEditType(description={!r})'.format( - self._description_value, - ) - PaperDocEditType_validator = bv.Struct(PaperDocEditType) class PaperDocFollowedDetails(bb.Struct): @@ -69746,96 +51891,44 @@ class PaperDocFollowedDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocFollowedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocFollowedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperDocFollowedDetails_validator = bv.Struct(PaperDocFollowedDetails) class PaperDocFollowedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocFollowedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocFollowedType(description={!r})'.format( - self._description_value, - ) - PaperDocFollowedType_validator = bv.Struct(PaperDocFollowedType) class PaperDocMentionDetails(bb.Struct): @@ -69847,96 +51940,44 @@ class PaperDocMentionDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocMentionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocMentionDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperDocMentionDetails_validator = bv.Struct(PaperDocMentionDetails) class PaperDocMentionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocMentionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocMentionType(description={!r})'.format( - self._description_value, - ) - PaperDocMentionType_validator = bv.Struct(PaperDocMentionType) class PaperDocOwnershipChangedDetails(bb.Struct): @@ -69952,11 +51993,8 @@ class PaperDocOwnershipChangedDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_old_owner_user_id_value', - '_old_owner_user_id_present', '_new_owner_user_id_value', - '_new_owner_user_id_present', ] _has_required_fields = True @@ -69965,12 +52003,9 @@ def __init__(self, event_uuid=None, new_owner_user_id=None, old_owner_user_id=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._old_owner_user_id_value = None - self._old_owner_user_id_present = False - self._new_owner_user_id_value = None - self._new_owner_user_id_present = False + self._event_uuid_value = bb.NOT_SET + self._old_owner_user_id_value = bb.NOT_SET + self._new_owner_user_id_value = bb.NOT_SET if event_uuid is not None: self.event_uuid = event_uuid if old_owner_user_id is not None: @@ -69978,135 +52013,40 @@ def __init__(self, if new_owner_user_id is not None: self.new_owner_user_id = new_owner_user_id - @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 old_owner_user_id(self): - """ - Previous owner. - - :rtype: str - """ - if self._old_owner_user_id_present: - return self._old_owner_user_id_value - else: - return None - - @old_owner_user_id.setter - def old_owner_user_id(self, val): - if val is None: - del self.old_owner_user_id - return - val = self._old_owner_user_id_validator.validate(val) - self._old_owner_user_id_value = val - self._old_owner_user_id_present = True + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - @old_owner_user_id.deleter - def old_owner_user_id(self): - self._old_owner_user_id_value = None - self._old_owner_user_id_present = False + # Instance attribute type: str (validator is set below) + old_owner_user_id = bb.Attribute("old_owner_user_id", nullable=True) - @property - def new_owner_user_id(self): - """ - New owner. - - :rtype: str - """ - if self._new_owner_user_id_present: - return self._new_owner_user_id_value - else: - raise AttributeError("missing required field 'new_owner_user_id'") - - @new_owner_user_id.setter - def new_owner_user_id(self, val): - val = self._new_owner_user_id_validator.validate(val) - self._new_owner_user_id_value = val - self._new_owner_user_id_present = True - - @new_owner_user_id.deleter - def new_owner_user_id(self): - self._new_owner_user_id_value = None - self._new_owner_user_id_present = False + # Instance attribute type: str (validator is set below) + new_owner_user_id = bb.Attribute("new_owner_user_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocOwnershipChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocOwnershipChangedDetails(event_uuid={!r}, new_owner_user_id={!r}, old_owner_user_id={!r})'.format( - self._event_uuid_value, - self._new_owner_user_id_value, - self._old_owner_user_id_value, - ) - PaperDocOwnershipChangedDetails_validator = bv.Struct(PaperDocOwnershipChangedDetails) class PaperDocOwnershipChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocOwnershipChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocOwnershipChangedType(description={!r})'.format( - self._description_value, - ) - PaperDocOwnershipChangedType_validator = bv.Struct(PaperDocOwnershipChangedType) class PaperDocRequestAccessDetails(bb.Struct): @@ -70119,96 +52059,44 @@ class PaperDocRequestAccessDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocRequestAccessDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocRequestAccessDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperDocRequestAccessDetails_validator = bv.Struct(PaperDocRequestAccessDetails) class PaperDocRequestAccessType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocRequestAccessType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocRequestAccessType(description={!r})'.format( - self._description_value, - ) - PaperDocRequestAccessType_validator = bv.Struct(PaperDocRequestAccessType) class PaperDocResolveCommentDetails(bb.Struct): @@ -70223,9 +52111,7 @@ class PaperDocResolveCommentDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_comment_text_value', - '_comment_text_present', ] _has_required_fields = True @@ -70233,120 +52119,44 @@ class PaperDocResolveCommentDetails(bb.Struct): 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 + self._event_uuid_value = bb.NOT_SET + self._comment_text_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - @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 + # Instance attribute type: str (validator is set below) + comment_text = bb.Attribute("comment_text", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocResolveCommentDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 PaperDocResolveCommentType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocResolveCommentType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocResolveCommentType(description={!r})'.format( - self._description_value, - ) - PaperDocResolveCommentType_validator = bv.Struct(PaperDocResolveCommentType) class PaperDocRevertDetails(bb.Struct): @@ -70358,96 +52168,44 @@ class PaperDocRevertDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocRevertDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocRevertDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperDocRevertDetails_validator = bv.Struct(PaperDocRevertDetails) class PaperDocRevertType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocRevertType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocRevertType(description={!r})'.format( - self._description_value, - ) - PaperDocRevertType_validator = bv.Struct(PaperDocRevertType) class PaperDocSlackShareDetails(bb.Struct): @@ -70460,96 +52218,44 @@ class PaperDocSlackShareDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocSlackShareDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocSlackShareDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperDocSlackShareDetails_validator = bv.Struct(PaperDocSlackShareDetails) class PaperDocSlackShareType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocSlackShareType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocSlackShareType(description={!r})'.format( - self._description_value, - ) - PaperDocSlackShareType_validator = bv.Struct(PaperDocSlackShareType) class PaperDocTeamInviteDetails(bb.Struct): @@ -70562,96 +52268,44 @@ class PaperDocTeamInviteDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocTeamInviteDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocTeamInviteDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperDocTeamInviteDetails_validator = bv.Struct(PaperDocTeamInviteDetails) class PaperDocTeamInviteType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocTeamInviteType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocTeamInviteType(description={!r})'.format( - self._description_value, - ) - PaperDocTeamInviteType_validator = bv.Struct(PaperDocTeamInviteType) class PaperDocTrashedDetails(bb.Struct): @@ -70663,96 +52317,44 @@ class PaperDocTrashedDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocTrashedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocTrashedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperDocTrashedDetails_validator = bv.Struct(PaperDocTrashedDetails) class PaperDocTrashedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocTrashedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocTrashedType(description={!r})'.format( - self._description_value, - ) - PaperDocTrashedType_validator = bv.Struct(PaperDocTrashedType) class PaperDocUnresolveCommentDetails(bb.Struct): @@ -70767,9 +52369,7 @@ class PaperDocUnresolveCommentDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_comment_text_value', - '_comment_text_present', ] _has_required_fields = True @@ -70777,120 +52377,44 @@ class PaperDocUnresolveCommentDetails(bb.Struct): 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 + self._event_uuid_value = bb.NOT_SET + self._comment_text_value = bb.NOT_SET 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. + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - :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 + # Instance attribute type: str (validator is set below) + comment_text = bb.Attribute("comment_text", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocUnresolveCommentDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 PaperDocUnresolveCommentType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocUnresolveCommentType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocUnresolveCommentType(description={!r})'.format( - self._description_value, - ) - PaperDocUnresolveCommentType_validator = bv.Struct(PaperDocUnresolveCommentType) class PaperDocUntrashedDetails(bb.Struct): @@ -70902,96 +52426,44 @@ class PaperDocUntrashedDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocUntrashedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocUntrashedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperDocUntrashedDetails_validator = bv.Struct(PaperDocUntrashedDetails) class PaperDocUntrashedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocUntrashedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocUntrashedType(description={!r})'.format( - self._description_value, - ) - PaperDocUntrashedType_validator = bv.Struct(PaperDocUntrashedType) class PaperDocViewDetails(bb.Struct): @@ -71003,96 +52475,44 @@ class PaperDocViewDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocViewDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocViewDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperDocViewDetails_validator = bv.Struct(PaperDocViewDetails) class PaperDocViewType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocViewType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDocViewType(description={!r})'.format( - self._description_value, - ) - PaperDocViewType_validator = bv.Struct(PaperDocViewType) class PaperDocumentLogInfo(bb.Struct): @@ -71105,9 +52525,7 @@ class PaperDocumentLogInfo(bb.Struct): __slots__ = [ '_doc_id_value', - '_doc_id_present', '_doc_title_value', - '_doc_title_present', ] _has_required_fields = True @@ -71115,70 +52533,22 @@ class PaperDocumentLogInfo(bb.Struct): 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 + self._doc_id_value = bb.NOT_SET + self._doc_title_value = bb.NOT_SET 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'") + # Instance attribute type: str (validator is set below) + doc_id = bb.Attribute("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 + # Instance attribute type: str (validator is set below) + doc_title = bb.Attribute("doc_title") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDocumentLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -71243,9 +52613,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDownloadFormat, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDownloadFormat(%r, %r)' % (self._tag, self._value) - PaperDownloadFormat_validator = bv.Union(PaperDownloadFormat) class PaperEnabledUsersGroupAdditionDetails(bb.Struct): @@ -71264,56 +52631,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperEnabledUsersGroupAdditionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperEnabledUsersGroupAdditionDetails()' - PaperEnabledUsersGroupAdditionDetails_validator = bv.Struct(PaperEnabledUsersGroupAdditionDetails) class PaperEnabledUsersGroupAdditionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperEnabledUsersGroupAdditionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperEnabledUsersGroupAdditionType(description={!r})'.format( - self._description_value, - ) - PaperEnabledUsersGroupAdditionType_validator = bv.Struct(PaperEnabledUsersGroupAdditionType) class PaperEnabledUsersGroupRemovalDetails(bb.Struct): @@ -71332,56 +52671,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperEnabledUsersGroupRemovalDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperEnabledUsersGroupRemovalDetails()' - PaperEnabledUsersGroupRemovalDetails_validator = bv.Struct(PaperEnabledUsersGroupRemovalDetails) class PaperEnabledUsersGroupRemovalType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperEnabledUsersGroupRemovalType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperEnabledUsersGroupRemovalType(description={!r})'.format( - self._description_value, - ) - PaperEnabledUsersGroupRemovalType_validator = bv.Struct(PaperEnabledUsersGroupRemovalType) class PaperExternalViewAllowDetails(bb.Struct): @@ -71394,96 +52705,44 @@ class PaperExternalViewAllowDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperExternalViewAllowDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperExternalViewAllowDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperExternalViewAllowDetails_validator = bv.Struct(PaperExternalViewAllowDetails) class PaperExternalViewAllowType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperExternalViewAllowType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperExternalViewAllowType(description={!r})'.format( - self._description_value, - ) - PaperExternalViewAllowType_validator = bv.Struct(PaperExternalViewAllowType) class PaperExternalViewDefaultTeamDetails(bb.Struct): @@ -71496,96 +52755,44 @@ class PaperExternalViewDefaultTeamDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperExternalViewDefaultTeamDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperExternalViewDefaultTeamDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperExternalViewDefaultTeamDetails_validator = bv.Struct(PaperExternalViewDefaultTeamDetails) class PaperExternalViewDefaultTeamType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperExternalViewDefaultTeamType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperExternalViewDefaultTeamType(description={!r})'.format( - self._description_value, - ) - PaperExternalViewDefaultTeamType_validator = bv.Struct(PaperExternalViewDefaultTeamType) class PaperExternalViewForbidDetails(bb.Struct): @@ -71598,96 +52805,44 @@ class PaperExternalViewForbidDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperExternalViewForbidDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperExternalViewForbidDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperExternalViewForbidDetails_validator = bv.Struct(PaperExternalViewForbidDetails) class PaperExternalViewForbidType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperExternalViewForbidType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperExternalViewForbidType(description={!r})'.format( - self._description_value, - ) - PaperExternalViewForbidType_validator = bv.Struct(PaperExternalViewForbidType) class PaperFolderChangeSubscriptionDetails(bb.Struct): @@ -71706,11 +52861,8 @@ class PaperFolderChangeSubscriptionDetails(bb.Struct): __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 @@ -71719,12 +52871,9 @@ 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 + self._event_uuid_value = bb.NOT_SET + self._new_subscription_level_value = bb.NOT_SET + self._previous_subscription_level_value = bb.NOT_SET if event_uuid is not None: self.event_uuid = event_uuid if new_subscription_level is not None: @@ -71732,136 +52881,40 @@ def __init__(self, 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'") + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("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 + # Instance attribute type: str (validator is set below) + new_subscription_level = bb.Attribute("new_subscription_level") - @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 + # Instance attribute type: str (validator is set below) + previous_subscription_level = bb.Attribute("previous_subscription_level", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperFolderChangeSubscriptionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 PaperFolderChangeSubscriptionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperFolderChangeSubscriptionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperFolderChangeSubscriptionType(description={!r})'.format( - self._description_value, - ) - PaperFolderChangeSubscriptionType_validator = bv.Struct(PaperFolderChangeSubscriptionType) class PaperFolderDeletedDetails(bb.Struct): @@ -71874,96 +52927,44 @@ class PaperFolderDeletedDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperFolderDeletedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperFolderDeletedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperFolderDeletedDetails_validator = bv.Struct(PaperFolderDeletedDetails) class PaperFolderDeletedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperFolderDeletedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperFolderDeletedType(description={!r})'.format( - self._description_value, - ) - PaperFolderDeletedType_validator = bv.Struct(PaperFolderDeletedType) class PaperFolderFollowedDetails(bb.Struct): @@ -71976,96 +52977,44 @@ class PaperFolderFollowedDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperFolderFollowedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperFolderFollowedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperFolderFollowedDetails_validator = bv.Struct(PaperFolderFollowedDetails) class PaperFolderFollowedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperFolderFollowedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperFolderFollowedType(description={!r})'.format( - self._description_value, - ) - PaperFolderFollowedType_validator = bv.Struct(PaperFolderFollowedType) class PaperFolderLogInfo(bb.Struct): @@ -72078,9 +53027,7 @@ class PaperFolderLogInfo(bb.Struct): __slots__ = [ '_folder_id_value', - '_folder_id_present', '_folder_name_value', - '_folder_name_present', ] _has_required_fields = True @@ -72088,70 +53035,22 @@ class PaperFolderLogInfo(bb.Struct): 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 + self._folder_id_value = bb.NOT_SET + self._folder_name_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + folder_id = bb.Attribute("folder_id") - @folder_name.deleter - def folder_name(self): - self._folder_name_value = None - self._folder_name_present = False + # Instance attribute type: str (validator is set below) + folder_name = bb.Attribute("folder_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperFolderLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -72164,96 +53063,44 @@ class PaperFolderTeamInviteDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperFolderTeamInviteDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperFolderTeamInviteDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperFolderTeamInviteDetails_validator = bv.Struct(PaperFolderTeamInviteDetails) class PaperFolderTeamInviteType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperFolderTeamInviteType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperFolderTeamInviteType(description={!r})'.format( - self._description_value, - ) - PaperFolderTeamInviteType_validator = bv.Struct(PaperFolderTeamInviteType) class PaperMemberPolicy(bb.Union): @@ -72310,9 +53157,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperMemberPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperMemberPolicy(%r, %r)' % (self._tag, self._value) - PaperMemberPolicy_validator = bv.Union(PaperMemberPolicy) class PaperPublishedLinkChangePermissionDetails(bb.Struct): @@ -72331,11 +53175,8 @@ class PaperPublishedLinkChangePermissionDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_new_permission_level_value', - '_new_permission_level_present', '_previous_permission_level_value', - '_previous_permission_level_present', ] _has_required_fields = True @@ -72344,12 +53185,9 @@ def __init__(self, event_uuid=None, new_permission_level=None, previous_permission_level=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._new_permission_level_value = None - self._new_permission_level_present = False - self._previous_permission_level_value = None - self._previous_permission_level_present = False + self._event_uuid_value = bb.NOT_SET + self._new_permission_level_value = bb.NOT_SET + self._previous_permission_level_value = bb.NOT_SET if event_uuid is not None: self.event_uuid = event_uuid if new_permission_level is not None: @@ -72357,132 +53195,40 @@ def __init__(self, if previous_permission_level is not None: self.previous_permission_level = previous_permission_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_permission_level(self): - """ - New permission level. - - :rtype: str - """ - if self._new_permission_level_present: - return self._new_permission_level_value - else: - raise AttributeError("missing required field 'new_permission_level'") - - @new_permission_level.setter - def new_permission_level(self, val): - val = self._new_permission_level_validator.validate(val) - self._new_permission_level_value = val - self._new_permission_level_present = True - - @new_permission_level.deleter - def new_permission_level(self): - self._new_permission_level_value = None - self._new_permission_level_present = False - - @property - def previous_permission_level(self): - """ - Previous permission level. - - :rtype: str - """ - if self._previous_permission_level_present: - return self._previous_permission_level_value - else: - raise AttributeError("missing required field 'previous_permission_level'") + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - @previous_permission_level.setter - def previous_permission_level(self, val): - val = self._previous_permission_level_validator.validate(val) - self._previous_permission_level_value = val - self._previous_permission_level_present = True + # Instance attribute type: str (validator is set below) + new_permission_level = bb.Attribute("new_permission_level") - @previous_permission_level.deleter - def previous_permission_level(self): - self._previous_permission_level_value = None - self._previous_permission_level_present = False + # Instance attribute type: str (validator is set below) + previous_permission_level = bb.Attribute("previous_permission_level") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperPublishedLinkChangePermissionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperPublishedLinkChangePermissionDetails(event_uuid={!r}, new_permission_level={!r}, previous_permission_level={!r})'.format( - self._event_uuid_value, - self._new_permission_level_value, - self._previous_permission_level_value, - ) - PaperPublishedLinkChangePermissionDetails_validator = bv.Struct(PaperPublishedLinkChangePermissionDetails) class PaperPublishedLinkChangePermissionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperPublishedLinkChangePermissionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperPublishedLinkChangePermissionType(description={!r})'.format( - self._description_value, - ) - PaperPublishedLinkChangePermissionType_validator = bv.Struct(PaperPublishedLinkChangePermissionType) class PaperPublishedLinkCreateDetails(bb.Struct): @@ -72495,96 +53241,44 @@ class PaperPublishedLinkCreateDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperPublishedLinkCreateDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperPublishedLinkCreateDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperPublishedLinkCreateDetails_validator = bv.Struct(PaperPublishedLinkCreateDetails) class PaperPublishedLinkCreateType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperPublishedLinkCreateType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperPublishedLinkCreateType(description={!r})'.format( - self._description_value, - ) - PaperPublishedLinkCreateType_validator = bv.Struct(PaperPublishedLinkCreateType) class PaperPublishedLinkDisabledDetails(bb.Struct): @@ -72597,96 +53291,44 @@ class PaperPublishedLinkDisabledDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperPublishedLinkDisabledDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperPublishedLinkDisabledDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperPublishedLinkDisabledDetails_validator = bv.Struct(PaperPublishedLinkDisabledDetails) class PaperPublishedLinkDisabledType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperPublishedLinkDisabledType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperPublishedLinkDisabledType(description={!r})'.format( - self._description_value, - ) - PaperPublishedLinkDisabledType_validator = bv.Struct(PaperPublishedLinkDisabledType) class PaperPublishedLinkViewDetails(bb.Struct): @@ -72699,96 +53341,44 @@ class PaperPublishedLinkViewDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperPublishedLinkViewDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperPublishedLinkViewDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - PaperPublishedLinkViewDetails_validator = bv.Struct(PaperPublishedLinkViewDetails) class PaperPublishedLinkViewType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperPublishedLinkViewType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperPublishedLinkViewType(description={!r})'.format( - self._description_value, - ) - PaperPublishedLinkViewType_validator = bv.Struct(PaperPublishedLinkViewType) class ParticipantLogInfo(bb.Union): @@ -72880,9 +53470,6 @@ def get_user(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ParticipantLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ParticipantLogInfo(%r, %r)' % (self._tag, self._value) - ParticipantLogInfo_validator = bv.Union(ParticipantLogInfo) class PassPolicy(bb.Union): @@ -72937,9 +53524,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PassPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PassPolicy(%r, %r)' % (self._tag, self._value) - PassPolicy_validator = bv.Union(PassPolicy) class PasswordChangeDetails(bb.Struct): @@ -72958,56 +53542,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PasswordChangeDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PasswordChangeDetails()' - PasswordChangeDetails_validator = bv.Struct(PasswordChangeDetails) class PasswordChangeType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PasswordChangeType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PasswordChangeType(description={!r})'.format( - self._description_value, - ) - PasswordChangeType_validator = bv.Struct(PasswordChangeType) class PasswordResetAllDetails(bb.Struct): @@ -73026,56 +53582,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PasswordResetAllDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PasswordResetAllDetails()' - PasswordResetAllDetails_validator = bv.Struct(PasswordResetAllDetails) class PasswordResetAllType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PasswordResetAllType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PasswordResetAllType(description={!r})'.format( - self._description_value, - ) - PasswordResetAllType_validator = bv.Struct(PasswordResetAllType) class PasswordResetDetails(bb.Struct): @@ -73094,56 +53622,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PasswordResetDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PasswordResetDetails()' - PasswordResetDetails_validator = bv.Struct(PasswordResetDetails) class PasswordResetType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PasswordResetType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PasswordResetType(description={!r})'.format( - self._description_value, - ) - PasswordResetType_validator = bv.Struct(PasswordResetType) class PasswordStrengthRequirementsChangePolicyDetails(bb.Struct): @@ -73159,9 +53659,7 @@ class PasswordStrengthRequirementsChangePolicyDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -73169,117 +53667,44 @@ class PasswordStrengthRequirementsChangePolicyDetails(bb.Struct): 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 + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET 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): - """ - Old password strength policy. - - :rtype: team_policies.PasswordStrengthPolicy - """ - 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 password strength policy. - - :rtype: team_policies.PasswordStrengthPolicy - """ - 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 + # Instance attribute type: team_policies.PasswordStrengthPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False + # Instance attribute type: team_policies.PasswordStrengthPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PasswordStrengthRequirementsChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PasswordStrengthRequirementsChangePolicyDetails(previous_value={!r}, new_value={!r})'.format( - self._previous_value_value, - self._new_value_value, - ) - PasswordStrengthRequirementsChangePolicyDetails_validator = bv.Struct(PasswordStrengthRequirementsChangePolicyDetails) class PasswordStrengthRequirementsChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PasswordStrengthRequirementsChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PasswordStrengthRequirementsChangePolicyType(description={!r})'.format( - self._description_value, - ) - PasswordStrengthRequirementsChangePolicyType_validator = bv.Struct(PasswordStrengthRequirementsChangePolicyType) class PathLogInfo(bb.Struct): @@ -73294,9 +53719,7 @@ class PathLogInfo(bb.Struct): __slots__ = [ '_contextual_value', - '_contextual_present', '_namespace_relative_value', - '_namespace_relative_present', ] _has_required_fields = True @@ -73304,74 +53727,22 @@ class PathLogInfo(bb.Struct): 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 + self._contextual_value = bb.NOT_SET + self._namespace_relative_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + contextual = bb.Attribute("contextual", nullable=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 + # Instance attribute type: NamespaceRelativePathLogInfo (validator is set below) + namespace_relative = bb.Attribute("namespace_relative", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PathLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PathLogInfo(namespace_relative={!r}, contextual={!r})'.format( - self._namespace_relative_value, - self._contextual_value, - ) - PathLogInfo_validator = bv.Struct(PathLogInfo) class PendingSecondaryEmailAddedDetails(bb.Struct): @@ -73384,96 +53755,44 @@ class PendingSecondaryEmailAddedDetails(bb.Struct): __slots__ = [ '_secondary_email_value', - '_secondary_email_present', ] _has_required_fields = True def __init__(self, secondary_email=None): - self._secondary_email_value = None - self._secondary_email_present = False + self._secondary_email_value = bb.NOT_SET if secondary_email is not None: self.secondary_email = secondary_email - @property - def secondary_email(self): - """ - New pending secondary email. - - :rtype: str - """ - if self._secondary_email_present: - return self._secondary_email_value - else: - raise AttributeError("missing required field 'secondary_email'") - - @secondary_email.setter - def secondary_email(self, val): - val = self._secondary_email_validator.validate(val) - self._secondary_email_value = val - self._secondary_email_present = True - - @secondary_email.deleter - def secondary_email(self): - self._secondary_email_value = None - self._secondary_email_present = False + # Instance attribute type: str (validator is set below) + secondary_email = bb.Attribute("secondary_email") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PendingSecondaryEmailAddedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PendingSecondaryEmailAddedDetails(secondary_email={!r})'.format( - self._secondary_email_value, - ) - PendingSecondaryEmailAddedDetails_validator = bv.Struct(PendingSecondaryEmailAddedDetails) class PendingSecondaryEmailAddedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PendingSecondaryEmailAddedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PendingSecondaryEmailAddedType(description={!r})'.format( - self._description_value, - ) - PendingSecondaryEmailAddedType_validator = bv.Struct(PendingSecondaryEmailAddedType) class PermanentDeleteChangePolicyDetails(bb.Struct): @@ -73489,9 +53808,7 @@ class PermanentDeleteChangePolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -73499,121 +53816,44 @@ class PermanentDeleteChangePolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: ContentPermanentDeletePolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=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 + # Instance attribute type: ContentPermanentDeletePolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(PermanentDeleteChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 PermanentDeleteChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PermanentDeleteChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PermanentDeleteChangePolicyType(description={!r})'.format( - self._description_value, - ) - PermanentDeleteChangePolicyType_validator = bv.Struct(PermanentDeleteChangePolicyType) class PlacementRestriction(bb.Union): @@ -73678,9 +53918,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PlacementRestriction, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PlacementRestriction(%r, %r)' % (self._tag, self._value) - PlacementRestriction_validator = bv.Union(PlacementRestriction) class PolicyType(bb.Union): @@ -73715,9 +53952,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PolicyType(%r, %r)' % (self._tag, self._value) - PolicyType_validator = bv.Union(PolicyType) class PrimaryTeamRequestAcceptedDetails(bb.Struct): @@ -73732,9 +53966,7 @@ class PrimaryTeamRequestAcceptedDetails(bb.Struct): __slots__ = [ '_secondary_team_value', - '_secondary_team_present', '_sent_by_value', - '_sent_by_present', ] _has_required_fields = True @@ -73742,70 +53974,22 @@ class PrimaryTeamRequestAcceptedDetails(bb.Struct): def __init__(self, secondary_team=None, sent_by=None): - self._secondary_team_value = None - self._secondary_team_present = False - self._sent_by_value = None - self._sent_by_present = False + self._secondary_team_value = bb.NOT_SET + self._sent_by_value = bb.NOT_SET if secondary_team is not None: self.secondary_team = secondary_team if sent_by is not None: self.sent_by = sent_by - @property - def secondary_team(self): - """ - The secondary team name. - - :rtype: str - """ - if self._secondary_team_present: - return self._secondary_team_value - else: - raise AttributeError("missing required field 'secondary_team'") - - @secondary_team.setter - def secondary_team(self, val): - val = self._secondary_team_validator.validate(val) - self._secondary_team_value = val - self._secondary_team_present = True + # Instance attribute type: str (validator is set below) + secondary_team = bb.Attribute("secondary_team") - @secondary_team.deleter - def secondary_team(self): - self._secondary_team_value = None - self._secondary_team_present = False - - @property - def sent_by(self): - """ - The name of the secondary team admin who sent the request originally. - - :rtype: str - """ - if self._sent_by_present: - return self._sent_by_value - else: - raise AttributeError("missing required field 'sent_by'") - - @sent_by.setter - def sent_by(self, val): - val = self._sent_by_validator.validate(val) - self._sent_by_value = val - self._sent_by_present = True - - @sent_by.deleter - def sent_by(self): - self._sent_by_value = None - self._sent_by_present = False + # Instance attribute type: str (validator is set below) + sent_by = bb.Attribute("sent_by") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PrimaryTeamRequestAcceptedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PrimaryTeamRequestAcceptedDetails(secondary_team={!r}, sent_by={!r})'.format( - self._secondary_team_value, - self._sent_by_value, - ) - PrimaryTeamRequestAcceptedDetails_validator = bv.Struct(PrimaryTeamRequestAcceptedDetails) class PrimaryTeamRequestCanceledDetails(bb.Struct): @@ -73820,9 +54004,7 @@ class PrimaryTeamRequestCanceledDetails(bb.Struct): __slots__ = [ '_secondary_team_value', - '_secondary_team_present', '_sent_by_value', - '_sent_by_present', ] _has_required_fields = True @@ -73830,70 +54012,22 @@ class PrimaryTeamRequestCanceledDetails(bb.Struct): def __init__(self, secondary_team=None, sent_by=None): - self._secondary_team_value = None - self._secondary_team_present = False - self._sent_by_value = None - self._sent_by_present = False + self._secondary_team_value = bb.NOT_SET + self._sent_by_value = bb.NOT_SET if secondary_team is not None: self.secondary_team = secondary_team if sent_by is not None: self.sent_by = sent_by - @property - def secondary_team(self): - """ - The secondary team name. - - :rtype: str - """ - if self._secondary_team_present: - return self._secondary_team_value - else: - raise AttributeError("missing required field 'secondary_team'") - - @secondary_team.setter - def secondary_team(self, val): - val = self._secondary_team_validator.validate(val) - self._secondary_team_value = val - self._secondary_team_present = True + # Instance attribute type: str (validator is set below) + secondary_team = bb.Attribute("secondary_team") - @secondary_team.deleter - def secondary_team(self): - self._secondary_team_value = None - self._secondary_team_present = False - - @property - def sent_by(self): - """ - The name of the secondary team admin who sent the request originally. - - :rtype: str - """ - if self._sent_by_present: - return self._sent_by_value - else: - raise AttributeError("missing required field 'sent_by'") - - @sent_by.setter - def sent_by(self, val): - val = self._sent_by_validator.validate(val) - self._sent_by_value = val - self._sent_by_present = True - - @sent_by.deleter - def sent_by(self): - self._sent_by_value = None - self._sent_by_present = False + # Instance attribute type: str (validator is set below) + sent_by = bb.Attribute("sent_by") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PrimaryTeamRequestCanceledDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PrimaryTeamRequestCanceledDetails(secondary_team={!r}, sent_by={!r})'.format( - self._secondary_team_value, - self._sent_by_value, - ) - PrimaryTeamRequestCanceledDetails_validator = bv.Struct(PrimaryTeamRequestCanceledDetails) class PrimaryTeamRequestExpiredDetails(bb.Struct): @@ -73908,9 +54042,7 @@ class PrimaryTeamRequestExpiredDetails(bb.Struct): __slots__ = [ '_secondary_team_value', - '_secondary_team_present', '_sent_by_value', - '_sent_by_present', ] _has_required_fields = True @@ -73918,70 +54050,22 @@ class PrimaryTeamRequestExpiredDetails(bb.Struct): def __init__(self, secondary_team=None, sent_by=None): - self._secondary_team_value = None - self._secondary_team_present = False - self._sent_by_value = None - self._sent_by_present = False + self._secondary_team_value = bb.NOT_SET + self._sent_by_value = bb.NOT_SET if secondary_team is not None: self.secondary_team = secondary_team if sent_by is not None: self.sent_by = sent_by - @property - def secondary_team(self): - """ - The secondary team name. - - :rtype: str - """ - if self._secondary_team_present: - return self._secondary_team_value - else: - raise AttributeError("missing required field 'secondary_team'") - - @secondary_team.setter - def secondary_team(self, val): - val = self._secondary_team_validator.validate(val) - self._secondary_team_value = val - self._secondary_team_present = True + # Instance attribute type: str (validator is set below) + secondary_team = bb.Attribute("secondary_team") - @secondary_team.deleter - def secondary_team(self): - self._secondary_team_value = None - self._secondary_team_present = False - - @property - def sent_by(self): - """ - The name of the secondary team admin who sent the request originally. - - :rtype: str - """ - if self._sent_by_present: - return self._sent_by_value - else: - raise AttributeError("missing required field 'sent_by'") - - @sent_by.setter - def sent_by(self, val): - val = self._sent_by_validator.validate(val) - self._sent_by_value = val - self._sent_by_present = True - - @sent_by.deleter - def sent_by(self): - self._sent_by_value = None - self._sent_by_present = False + # Instance attribute type: str (validator is set below) + sent_by = bb.Attribute("sent_by") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PrimaryTeamRequestExpiredDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PrimaryTeamRequestExpiredDetails(secondary_team={!r}, sent_by={!r})'.format( - self._secondary_team_value, - self._sent_by_value, - ) - PrimaryTeamRequestExpiredDetails_validator = bv.Struct(PrimaryTeamRequestExpiredDetails) class PrimaryTeamRequestReminderDetails(bb.Struct): @@ -73996,9 +54080,7 @@ class PrimaryTeamRequestReminderDetails(bb.Struct): __slots__ = [ '_secondary_team_value', - '_secondary_team_present', '_sent_to_value', - '_sent_to_present', ] _has_required_fields = True @@ -74006,70 +54088,22 @@ class PrimaryTeamRequestReminderDetails(bb.Struct): def __init__(self, secondary_team=None, sent_to=None): - self._secondary_team_value = None - self._secondary_team_present = False - self._sent_to_value = None - self._sent_to_present = False + self._secondary_team_value = bb.NOT_SET + self._sent_to_value = bb.NOT_SET if secondary_team is not None: self.secondary_team = secondary_team if sent_to is not None: self.sent_to = sent_to - @property - def secondary_team(self): - """ - The secondary team name. - - :rtype: str - """ - if self._secondary_team_present: - return self._secondary_team_value - else: - raise AttributeError("missing required field 'secondary_team'") - - @secondary_team.setter - def secondary_team(self, val): - val = self._secondary_team_validator.validate(val) - self._secondary_team_value = val - self._secondary_team_present = True - - @secondary_team.deleter - def secondary_team(self): - self._secondary_team_value = None - self._secondary_team_present = False - - @property - def sent_to(self): - """ - The name of the primary team admin the request was sent to. - - :rtype: str - """ - if self._sent_to_present: - return self._sent_to_value - else: - raise AttributeError("missing required field 'sent_to'") + # Instance attribute type: str (validator is set below) + secondary_team = bb.Attribute("secondary_team") - @sent_to.setter - def sent_to(self, val): - val = self._sent_to_validator.validate(val) - self._sent_to_value = val - self._sent_to_present = True - - @sent_to.deleter - def sent_to(self): - self._sent_to_value = None - self._sent_to_present = False + # Instance attribute type: str (validator is set below) + sent_to = bb.Attribute("sent_to") def _process_custom_annotations(self, annotation_type, field_path, processor): super(PrimaryTeamRequestReminderDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PrimaryTeamRequestReminderDetails(secondary_team={!r}, sent_to={!r})'.format( - self._secondary_team_value, - self._sent_to_value, - ) - PrimaryTeamRequestReminderDetails_validator = bv.Struct(PrimaryTeamRequestReminderDetails) class QuickActionType(bb.Union): @@ -74156,9 +54190,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(QuickActionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'QuickActionType(%r, %r)' % (self._tag, self._value) - QuickActionType_validator = bv.Union(QuickActionType) class RelocateAssetReferencesLogInfo(bb.Struct): @@ -74174,9 +54205,7 @@ class RelocateAssetReferencesLogInfo(bb.Struct): __slots__ = [ '_src_asset_index_value', - '_src_asset_index_present', '_dest_asset_index_value', - '_dest_asset_index_present', ] _has_required_fields = True @@ -74184,70 +54213,22 @@ class RelocateAssetReferencesLogInfo(bb.Struct): 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 + self._src_asset_index_value = bb.NOT_SET + self._dest_asset_index_value = bb.NOT_SET 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: int - """ - if self._src_asset_index_present: - return self._src_asset_index_value - else: - raise AttributeError("missing required field 'src_asset_index'") + # Instance attribute type: int (validator is set below) + src_asset_index = bb.Attribute("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: int - """ - 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 + # Instance attribute type: int (validator is set below) + dest_asset_index = bb.Attribute("dest_asset_index") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelocateAssetReferencesLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -74260,9 +54241,7 @@ class ResellerLogInfo(bb.Struct): __slots__ = [ '_reseller_name_value', - '_reseller_name_present', '_reseller_email_value', - '_reseller_email_present', ] _has_required_fields = True @@ -74270,70 +54249,22 @@ class ResellerLogInfo(bb.Struct): def __init__(self, reseller_name=None, reseller_email=None): - self._reseller_name_value = None - self._reseller_name_present = False - self._reseller_email_value = None - self._reseller_email_present = False + self._reseller_name_value = bb.NOT_SET + self._reseller_email_value = bb.NOT_SET if reseller_name is not None: self.reseller_name = reseller_name if reseller_email is not None: self.reseller_email = reseller_email - @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_email(self): - """ - Reseller email. - - :rtype: str - """ - if self._reseller_email_present: - return self._reseller_email_value - else: - raise AttributeError("missing required field 'reseller_email'") + # Instance attribute type: str (validator is set below) + reseller_name = bb.Attribute("reseller_name") - @reseller_email.setter - def reseller_email(self, val): - val = self._reseller_email_validator.validate(val) - self._reseller_email_value = val - self._reseller_email_present = True - - @reseller_email.deleter - def reseller_email(self): - self._reseller_email_value = None - self._reseller_email_present = False + # Instance attribute type: str (validator is set below) + reseller_email = bb.Attribute("reseller_email") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ResellerLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ResellerLogInfo(reseller_name={!r}, reseller_email={!r})'.format( - self._reseller_name_value, - self._reseller_email_value, - ) - ResellerLogInfo_validator = bv.Struct(ResellerLogInfo) class ResellerRole(bb.Union): @@ -74378,9 +54309,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ResellerRole, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ResellerRole(%r, %r)' % (self._tag, self._value) - ResellerRole_validator = bv.Union(ResellerRole) class ResellerSupportChangePolicyDetails(bb.Struct): @@ -74395,9 +54323,7 @@ class ResellerSupportChangePolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -74405,117 +54331,44 @@ class ResellerSupportChangePolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 Reseller support policy. - - :rtype: ResellerSupportPolicy - """ - 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 + # Instance attribute type: ResellerSupportPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous Reseller support policy. - - :rtype: ResellerSupportPolicy - """ - 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 + # Instance attribute type: ResellerSupportPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ResellerSupportChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ResellerSupportChangePolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - ResellerSupportChangePolicyDetails_validator = bv.Struct(ResellerSupportChangePolicyDetails) class ResellerSupportChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ResellerSupportChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ResellerSupportChangePolicyType(description={!r})'.format( - self._description_value, - ) - ResellerSupportChangePolicyType_validator = bv.Struct(ResellerSupportChangePolicyType) class ResellerSupportPolicy(bb.Union): @@ -74563,9 +54416,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ResellerSupportPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ResellerSupportPolicy(%r, %r)' % (self._tag, self._value) - ResellerSupportPolicy_validator = bv.Union(ResellerSupportPolicy) class ResellerSupportSessionEndDetails(bb.Struct): @@ -74584,56 +54434,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ResellerSupportSessionEndDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ResellerSupportSessionEndDetails()' - ResellerSupportSessionEndDetails_validator = bv.Struct(ResellerSupportSessionEndDetails) class ResellerSupportSessionEndType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ResellerSupportSessionEndType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ResellerSupportSessionEndType(description={!r})'.format( - self._description_value, - ) - ResellerSupportSessionEndType_validator = bv.Struct(ResellerSupportSessionEndType) class ResellerSupportSessionStartDetails(bb.Struct): @@ -74652,56 +54474,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ResellerSupportSessionStartDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ResellerSupportSessionStartDetails()' - ResellerSupportSessionStartDetails_validator = bv.Struct(ResellerSupportSessionStartDetails) class ResellerSupportSessionStartType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ResellerSupportSessionStartType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ResellerSupportSessionStartType(description={!r})'.format( - self._description_value, - ) - ResellerSupportSessionStartType_validator = bv.Struct(ResellerSupportSessionStartType) class RewindFolderDetails(bb.Struct): @@ -74714,96 +54508,44 @@ class RewindFolderDetails(bb.Struct): __slots__ = [ '_rewind_folder_target_ts_ms_value', - '_rewind_folder_target_ts_ms_present', ] _has_required_fields = True def __init__(self, rewind_folder_target_ts_ms=None): - self._rewind_folder_target_ts_ms_value = None - self._rewind_folder_target_ts_ms_present = False + self._rewind_folder_target_ts_ms_value = bb.NOT_SET if rewind_folder_target_ts_ms is not None: self.rewind_folder_target_ts_ms = rewind_folder_target_ts_ms - @property - def rewind_folder_target_ts_ms(self): - """ - Folder was Rewound to this date. - - :rtype: datetime.datetime - """ - if self._rewind_folder_target_ts_ms_present: - return self._rewind_folder_target_ts_ms_value - else: - raise AttributeError("missing required field 'rewind_folder_target_ts_ms'") - - @rewind_folder_target_ts_ms.setter - def rewind_folder_target_ts_ms(self, val): - val = self._rewind_folder_target_ts_ms_validator.validate(val) - self._rewind_folder_target_ts_ms_value = val - self._rewind_folder_target_ts_ms_present = True - - @rewind_folder_target_ts_ms.deleter - def rewind_folder_target_ts_ms(self): - self._rewind_folder_target_ts_ms_value = None - self._rewind_folder_target_ts_ms_present = False + # Instance attribute type: datetime.datetime (validator is set below) + rewind_folder_target_ts_ms = bb.Attribute("rewind_folder_target_ts_ms") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RewindFolderDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RewindFolderDetails(rewind_folder_target_ts_ms={!r})'.format( - self._rewind_folder_target_ts_ms_value, - ) - RewindFolderDetails_validator = bv.Struct(RewindFolderDetails) class RewindFolderType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RewindFolderType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RewindFolderType(description={!r})'.format( - self._description_value, - ) - RewindFolderType_validator = bv.Struct(RewindFolderType) class RewindPolicy(bb.Union): @@ -74850,9 +54592,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RewindPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RewindPolicy(%r, %r)' % (self._tag, self._value) - RewindPolicy_validator = bv.Union(RewindPolicy) class RewindPolicyChangedDetails(bb.Struct): @@ -74867,9 +54606,7 @@ class RewindPolicyChangedDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -74877,117 +54614,44 @@ class RewindPolicyChangedDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 Rewind policy. + # Instance attribute type: RewindPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - :rtype: RewindPolicy - """ - 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 Rewind policy. - - :rtype: RewindPolicy - """ - 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 + # Instance attribute type: RewindPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(RewindPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RewindPolicyChangedDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - RewindPolicyChangedDetails_validator = bv.Struct(RewindPolicyChangedDetails) class RewindPolicyChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(RewindPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RewindPolicyChangedType(description={!r})'.format( - self._description_value, - ) - RewindPolicyChangedType_validator = bv.Struct(RewindPolicyChangedType) class SecondaryEmailDeletedDetails(bb.Struct): @@ -75000,96 +54664,44 @@ class SecondaryEmailDeletedDetails(bb.Struct): __slots__ = [ '_secondary_email_value', - '_secondary_email_present', ] _has_required_fields = True def __init__(self, secondary_email=None): - self._secondary_email_value = None - self._secondary_email_present = False + self._secondary_email_value = bb.NOT_SET if secondary_email is not None: self.secondary_email = secondary_email - @property - def secondary_email(self): - """ - Deleted secondary email. - - :rtype: str - """ - if self._secondary_email_present: - return self._secondary_email_value - else: - raise AttributeError("missing required field 'secondary_email'") - - @secondary_email.setter - def secondary_email(self, val): - val = self._secondary_email_validator.validate(val) - self._secondary_email_value = val - self._secondary_email_present = True - - @secondary_email.deleter - def secondary_email(self): - self._secondary_email_value = None - self._secondary_email_present = False + # Instance attribute type: str (validator is set below) + secondary_email = bb.Attribute("secondary_email") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SecondaryEmailDeletedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SecondaryEmailDeletedDetails(secondary_email={!r})'.format( - self._secondary_email_value, - ) - SecondaryEmailDeletedDetails_validator = bv.Struct(SecondaryEmailDeletedDetails) class SecondaryEmailDeletedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SecondaryEmailDeletedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SecondaryEmailDeletedType(description={!r})'.format( - self._description_value, - ) - SecondaryEmailDeletedType_validator = bv.Struct(SecondaryEmailDeletedType) class SecondaryEmailVerifiedDetails(bb.Struct): @@ -75102,96 +54714,44 @@ class SecondaryEmailVerifiedDetails(bb.Struct): __slots__ = [ '_secondary_email_value', - '_secondary_email_present', ] _has_required_fields = True def __init__(self, secondary_email=None): - self._secondary_email_value = None - self._secondary_email_present = False + self._secondary_email_value = bb.NOT_SET if secondary_email is not None: self.secondary_email = secondary_email - @property - def secondary_email(self): - """ - Verified secondary email. - - :rtype: str - """ - if self._secondary_email_present: - return self._secondary_email_value - else: - raise AttributeError("missing required field 'secondary_email'") - - @secondary_email.setter - def secondary_email(self, val): - val = self._secondary_email_validator.validate(val) - self._secondary_email_value = val - self._secondary_email_present = True - - @secondary_email.deleter - def secondary_email(self): - self._secondary_email_value = None - self._secondary_email_present = False + # Instance attribute type: str (validator is set below) + secondary_email = bb.Attribute("secondary_email") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SecondaryEmailVerifiedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SecondaryEmailVerifiedDetails(secondary_email={!r})'.format( - self._secondary_email_value, - ) - SecondaryEmailVerifiedDetails_validator = bv.Struct(SecondaryEmailVerifiedDetails) class SecondaryEmailVerifiedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SecondaryEmailVerifiedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SecondaryEmailVerifiedType(description={!r})'.format( - self._description_value, - ) - SecondaryEmailVerifiedType_validator = bv.Struct(SecondaryEmailVerifiedType) class SecondaryMailsPolicy(bb.Union): @@ -75236,9 +54796,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SecondaryMailsPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SecondaryMailsPolicy(%r, %r)' % (self._tag, self._value) - SecondaryMailsPolicy_validator = bv.Union(SecondaryMailsPolicy) class SecondaryMailsPolicyChangedDetails(bb.Struct): @@ -75253,9 +54810,7 @@ class SecondaryMailsPolicyChangedDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -75263,117 +54818,44 @@ class SecondaryMailsPolicyChangedDetails(bb.Struct): 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 + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET 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 secondary mails policy. - - :rtype: SecondaryMailsPolicy - """ - 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 secondary mails policy. - - :rtype: SecondaryMailsPolicy - """ - 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 + # Instance attribute type: SecondaryMailsPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False + # Instance attribute type: SecondaryMailsPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SecondaryMailsPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SecondaryMailsPolicyChangedDetails(previous_value={!r}, new_value={!r})'.format( - self._previous_value_value, - self._new_value_value, - ) - SecondaryMailsPolicyChangedDetails_validator = bv.Struct(SecondaryMailsPolicyChangedDetails) class SecondaryMailsPolicyChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SecondaryMailsPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SecondaryMailsPolicyChangedType(description={!r})'.format( - self._description_value, - ) - SecondaryMailsPolicyChangedType_validator = bv.Struct(SecondaryMailsPolicyChangedType) class SecondaryTeamRequestAcceptedDetails(bb.Struct): @@ -75388,9 +54870,7 @@ class SecondaryTeamRequestAcceptedDetails(bb.Struct): __slots__ = [ '_primary_team_value', - '_primary_team_present', '_sent_by_value', - '_sent_by_present', ] _has_required_fields = True @@ -75398,70 +54878,22 @@ class SecondaryTeamRequestAcceptedDetails(bb.Struct): def __init__(self, primary_team=None, sent_by=None): - self._primary_team_value = None - self._primary_team_present = False - self._sent_by_value = None - self._sent_by_present = False + self._primary_team_value = bb.NOT_SET + self._sent_by_value = bb.NOT_SET if primary_team is not None: self.primary_team = primary_team if sent_by is not None: self.sent_by = sent_by - @property - def primary_team(self): - """ - The primary team name. - - :rtype: str - """ - if self._primary_team_present: - return self._primary_team_value - else: - raise AttributeError("missing required field 'primary_team'") - - @primary_team.setter - def primary_team(self, val): - val = self._primary_team_validator.validate(val) - self._primary_team_value = val - self._primary_team_present = True + # Instance attribute type: str (validator is set below) + primary_team = bb.Attribute("primary_team") - @primary_team.deleter - def primary_team(self): - self._primary_team_value = None - self._primary_team_present = False - - @property - def sent_by(self): - """ - The name of the secondary team admin who sent the request originally. - - :rtype: str - """ - if self._sent_by_present: - return self._sent_by_value - else: - raise AttributeError("missing required field 'sent_by'") - - @sent_by.setter - def sent_by(self, val): - val = self._sent_by_validator.validate(val) - self._sent_by_value = val - self._sent_by_present = True - - @sent_by.deleter - def sent_by(self): - self._sent_by_value = None - self._sent_by_present = False + # Instance attribute type: str (validator is set below) + sent_by = bb.Attribute("sent_by") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SecondaryTeamRequestAcceptedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SecondaryTeamRequestAcceptedDetails(primary_team={!r}, sent_by={!r})'.format( - self._primary_team_value, - self._sent_by_value, - ) - SecondaryTeamRequestAcceptedDetails_validator = bv.Struct(SecondaryTeamRequestAcceptedDetails) class SecondaryTeamRequestCanceledDetails(bb.Struct): @@ -75476,9 +54908,7 @@ class SecondaryTeamRequestCanceledDetails(bb.Struct): __slots__ = [ '_sent_to_value', - '_sent_to_present', '_sent_by_value', - '_sent_by_present', ] _has_required_fields = True @@ -75486,70 +54916,22 @@ class SecondaryTeamRequestCanceledDetails(bb.Struct): def __init__(self, sent_to=None, sent_by=None): - self._sent_to_value = None - self._sent_to_present = False - self._sent_by_value = None - self._sent_by_present = False + self._sent_to_value = bb.NOT_SET + self._sent_by_value = bb.NOT_SET if sent_to is not None: self.sent_to = sent_to if sent_by is not None: self.sent_by = sent_by - @property - def sent_to(self): - """ - The email of the primary team admin that the request was sent to. - - :rtype: str - """ - if self._sent_to_present: - return self._sent_to_value - else: - raise AttributeError("missing required field 'sent_to'") - - @sent_to.setter - def sent_to(self, val): - val = self._sent_to_validator.validate(val) - self._sent_to_value = val - self._sent_to_present = True + # Instance attribute type: str (validator is set below) + sent_to = bb.Attribute("sent_to") - @sent_to.deleter - def sent_to(self): - self._sent_to_value = None - self._sent_to_present = False - - @property - def sent_by(self): - """ - The name of the secondary team admin who sent the request originally. - - :rtype: str - """ - if self._sent_by_present: - return self._sent_by_value - else: - raise AttributeError("missing required field 'sent_by'") - - @sent_by.setter - def sent_by(self, val): - val = self._sent_by_validator.validate(val) - self._sent_by_value = val - self._sent_by_present = True - - @sent_by.deleter - def sent_by(self): - self._sent_by_value = None - self._sent_by_present = False + # Instance attribute type: str (validator is set below) + sent_by = bb.Attribute("sent_by") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SecondaryTeamRequestCanceledDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SecondaryTeamRequestCanceledDetails(sent_to={!r}, sent_by={!r})'.format( - self._sent_to_value, - self._sent_by_value, - ) - SecondaryTeamRequestCanceledDetails_validator = bv.Struct(SecondaryTeamRequestCanceledDetails) class SecondaryTeamRequestExpiredDetails(bb.Struct): @@ -75562,49 +54944,22 @@ class SecondaryTeamRequestExpiredDetails(bb.Struct): __slots__ = [ '_sent_to_value', - '_sent_to_present', ] _has_required_fields = True def __init__(self, sent_to=None): - self._sent_to_value = None - self._sent_to_present = False + self._sent_to_value = bb.NOT_SET if sent_to is not None: self.sent_to = sent_to - @property - def sent_to(self): - """ - The email of the primary team admin the request was sent to. - - :rtype: str - """ - if self._sent_to_present: - return self._sent_to_value - else: - raise AttributeError("missing required field 'sent_to'") - - @sent_to.setter - def sent_to(self, val): - val = self._sent_to_validator.validate(val) - self._sent_to_value = val - self._sent_to_present = True - - @sent_to.deleter - def sent_to(self): - self._sent_to_value = None - self._sent_to_present = False + # Instance attribute type: str (validator is set below) + sent_to = bb.Attribute("sent_to") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SecondaryTeamRequestExpiredDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SecondaryTeamRequestExpiredDetails(sent_to={!r})'.format( - self._sent_to_value, - ) - SecondaryTeamRequestExpiredDetails_validator = bv.Struct(SecondaryTeamRequestExpiredDetails) class SecondaryTeamRequestReminderDetails(bb.Struct): @@ -75617,49 +54972,22 @@ class SecondaryTeamRequestReminderDetails(bb.Struct): __slots__ = [ '_sent_to_value', - '_sent_to_present', ] _has_required_fields = True def __init__(self, sent_to=None): - self._sent_to_value = None - self._sent_to_present = False + self._sent_to_value = bb.NOT_SET if sent_to is not None: self.sent_to = sent_to - @property - def sent_to(self): - """ - The email of the primary team admin the request was sent to. - - :rtype: str - """ - if self._sent_to_present: - return self._sent_to_value - else: - raise AttributeError("missing required field 'sent_to'") - - @sent_to.setter - def sent_to(self, val): - val = self._sent_to_validator.validate(val) - self._sent_to_value = val - self._sent_to_present = True - - @sent_to.deleter - def sent_to(self): - self._sent_to_value = None - self._sent_to_present = False + # Instance attribute type: str (validator is set below) + sent_to = bb.Attribute("sent_to") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SecondaryTeamRequestReminderDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SecondaryTeamRequestReminderDetails(sent_to={!r})'.format( - self._sent_to_value, - ) - SecondaryTeamRequestReminderDetails_validator = bv.Struct(SecondaryTeamRequestReminderDetails) class SendForSignaturePolicy(bb.Union): @@ -75706,9 +55034,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SendForSignaturePolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SendForSignaturePolicy(%r, %r)' % (self._tag, self._value) - SendForSignaturePolicy_validator = bv.Union(SendForSignaturePolicy) class SendForSignaturePolicyChangedDetails(bb.Struct): @@ -75723,9 +55048,7 @@ class SendForSignaturePolicyChangedDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -75733,117 +55056,44 @@ class SendForSignaturePolicyChangedDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 send for signature policy. - - :rtype: SendForSignaturePolicy - """ - 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 send for signature policy. - - :rtype: SendForSignaturePolicy - """ - 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 + # Instance attribute type: SendForSignaturePolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False + # Instance attribute type: SendForSignaturePolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SendForSignaturePolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SendForSignaturePolicyChangedDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - SendForSignaturePolicyChangedDetails_validator = bv.Struct(SendForSignaturePolicyChangedDetails) class SendForSignaturePolicyChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SendForSignaturePolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SendForSignaturePolicyChangedType(description={!r})'.format( - self._description_value, - ) - SendForSignaturePolicyChangedType_validator = bv.Struct(SendForSignaturePolicyChangedType) class SfAddGroupDetails(bb.Struct): @@ -75861,13 +55111,9 @@ class SfAddGroupDetails(bb.Struct): __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 @@ -75877,14 +55123,10 @@ def __init__(self, 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 + self._target_asset_index_value = bb.NOT_SET + self._original_folder_name_value = bb.NOT_SET + self._sharing_permission_value = bb.NOT_SET + self._team_name_value = bb.NOT_SET if target_asset_index is not None: self.target_asset_index = target_asset_index if original_folder_name is not None: @@ -75894,159 +55136,43 @@ def __init__(self, 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: int - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") + # Instance attribute type: int (validator is set below) + target_asset_index = bb.Attribute("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 + # Instance attribute type: str (validator is set below) + original_folder_name = bb.Attribute("original_folder_name") - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False + # Instance attribute type: str (validator is set below) + sharing_permission = bb.Attribute("sharing_permission", nullable=True) - @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 + # Instance attribute type: str (validator is set below) + team_name = bb.Attribute("team_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfAddGroupDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 SfAddGroupType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfAddGroupType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SfAddGroupType(description={!r})'.format( - self._description_value, - ) - SfAddGroupType_validator = bv.Struct(SfAddGroupType) class SfAllowNonMembersToViewSharedLinksDetails(bb.Struct): @@ -76064,11 +55190,8 @@ class SfAllowNonMembersToViewSharedLinksDetails(bb.Struct): __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 @@ -76077,12 +55200,9 @@ 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 + self._target_asset_index_value = bb.NOT_SET + self._original_folder_name_value = bb.NOT_SET + self._shared_folder_type_value = bb.NOT_SET if target_asset_index is not None: self.target_asset_index = target_asset_index if original_folder_name is not None: @@ -76090,135 +55210,40 @@ def __init__(self, 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: int - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") + # Instance attribute type: int (validator is set below) + target_asset_index = bb.Attribute("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 + # Instance attribute type: str (validator is set below) + original_folder_name = bb.Attribute("original_folder_name") - @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 + # Instance attribute type: str (validator is set below) + shared_folder_type = bb.Attribute("shared_folder_type", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfAllowNonMembersToViewSharedLinksDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 SfAllowNonMembersToViewSharedLinksType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfAllowNonMembersToViewSharedLinksType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SfAllowNonMembersToViewSharedLinksType(description={!r})'.format( - self._description_value, - ) - SfAllowNonMembersToViewSharedLinksType_validator = bv.Struct(SfAllowNonMembersToViewSharedLinksType) class SfExternalInviteWarnDetails(bb.Struct): @@ -76238,13 +55263,9 @@ class SfExternalInviteWarnDetails(bb.Struct): __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 @@ -76254,14 +55275,10 @@ def __init__(self, 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 + self._target_asset_index_value = bb.NOT_SET + self._original_folder_name_value = bb.NOT_SET + self._new_sharing_permission_value = bb.NOT_SET + self._previous_sharing_permission_value = bb.NOT_SET if target_asset_index is not None: self.target_asset_index = target_asset_index if original_folder_name is not None: @@ -76271,163 +55288,43 @@ def __init__(self, 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: int - """ - 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 + # Instance attribute type: int (validator is set below) + target_asset_index = bb.Attribute("target_asset_index") - @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 + # Instance attribute type: str (validator is set below) + original_folder_name = bb.Attribute("original_folder_name") - @new_sharing_permission.deleter - def new_sharing_permission(self): - self._new_sharing_permission_value = None - self._new_sharing_permission_present = False + # Instance attribute type: str (validator is set below) + new_sharing_permission = bb.Attribute("new_sharing_permission", nullable=True) - @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 + # Instance attribute type: str (validator is set below) + previous_sharing_permission = bb.Attribute("previous_sharing_permission", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfExternalInviteWarnDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SfExternalInviteWarnDetails(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, - ) - SfExternalInviteWarnDetails_validator = bv.Struct(SfExternalInviteWarnDetails) class SfExternalInviteWarnType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfExternalInviteWarnType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SfExternalInviteWarnType(description={!r})'.format( - self._description_value, - ) - SfExternalInviteWarnType_validator = bv.Struct(SfExternalInviteWarnType) class SfFbInviteChangeRoleDetails(bb.Struct): @@ -76447,13 +55344,9 @@ class SfFbInviteChangeRoleDetails(bb.Struct): __slots__ = [ '_target_asset_index_value', - '_target_asset_index_present', '_original_folder_name_value', - '_original_folder_name_present', '_previous_sharing_permission_value', - '_previous_sharing_permission_present', '_new_sharing_permission_value', - '_new_sharing_permission_present', ] _has_required_fields = True @@ -76463,14 +55356,10 @@ def __init__(self, original_folder_name=None, previous_sharing_permission=None, new_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._previous_sharing_permission_value = None - self._previous_sharing_permission_present = False - self._new_sharing_permission_value = None - self._new_sharing_permission_present = False + self._target_asset_index_value = bb.NOT_SET + self._original_folder_name_value = bb.NOT_SET + self._previous_sharing_permission_value = bb.NOT_SET + self._new_sharing_permission_value = bb.NOT_SET if target_asset_index is not None: self.target_asset_index = target_asset_index if original_folder_name is not None: @@ -76480,163 +55369,43 @@ def __init__(self, if new_sharing_permission is not None: self.new_sharing_permission = new_sharing_permission - @property - def target_asset_index(self): - """ - Target asset position in the Assets list. + # Instance attribute type: int (validator is set below) + target_asset_index = bb.Attribute("target_asset_index") - :rtype: int - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") + # Instance attribute type: str (validator is set below) + original_folder_name = bb.Attribute("original_folder_name") - @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 + # Instance attribute type: str (validator is set below) + previous_sharing_permission = bb.Attribute("previous_sharing_permission", nullable=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 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 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 + # Instance attribute type: str (validator is set below) + new_sharing_permission = bb.Attribute("new_sharing_permission", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfFbInviteChangeRoleDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SfFbInviteChangeRoleDetails(target_asset_index={!r}, original_folder_name={!r}, previous_sharing_permission={!r}, new_sharing_permission={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - self._previous_sharing_permission_value, - self._new_sharing_permission_value, - ) - SfFbInviteChangeRoleDetails_validator = bv.Struct(SfFbInviteChangeRoleDetails) class SfFbInviteChangeRoleType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfFbInviteChangeRoleType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SfFbInviteChangeRoleType(description={!r})'.format( - self._description_value, - ) - SfFbInviteChangeRoleType_validator = bv.Struct(SfFbInviteChangeRoleType) class SfFbInviteDetails(bb.Struct): @@ -76653,11 +55422,8 @@ class SfFbInviteDetails(bb.Struct): __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 @@ -76666,12 +55432,9 @@ 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 + self._target_asset_index_value = bb.NOT_SET + self._original_folder_name_value = bb.NOT_SET + self._sharing_permission_value = bb.NOT_SET if target_asset_index is not None: self.target_asset_index = target_asset_index if original_folder_name is not None: @@ -76679,135 +55442,40 @@ def __init__(self, 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: int - """ - 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 + # Instance attribute type: int (validator is set below) + target_asset_index = bb.Attribute("target_asset_index") - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False + # Instance attribute type: str (validator is set below) + original_folder_name = bb.Attribute("original_folder_name") - @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 + # Instance attribute type: str (validator is set below) + sharing_permission = bb.Attribute("sharing_permission", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfFbInviteDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SfFbInviteDetails(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, - ) - SfFbInviteDetails_validator = bv.Struct(SfFbInviteDetails) class SfFbInviteType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfFbInviteType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SfFbInviteType(description={!r})'.format( - self._description_value, - ) - SfFbInviteType_validator = bv.Struct(SfFbInviteType) class SfFbUninviteDetails(bb.Struct): @@ -76822,9 +55490,7 @@ class SfFbUninviteDetails(bb.Struct): __slots__ = [ '_target_asset_index_value', - '_target_asset_index_present', '_original_folder_name_value', - '_original_folder_name_present', ] _has_required_fields = True @@ -76832,117 +55498,44 @@ class SfFbUninviteDetails(bb.Struct): 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 + self._target_asset_index_value = bb.NOT_SET + self._original_folder_name_value = bb.NOT_SET 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: int - """ - 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. + # Instance attribute type: int (validator is set below) + target_asset_index = bb.Attribute("target_asset_index") - :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 + # Instance attribute type: str (validator is set below) + original_folder_name = bb.Attribute("original_folder_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfFbUninviteDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SfFbUninviteDetails(target_asset_index={!r}, original_folder_name={!r})'.format( - self._target_asset_index_value, - self._original_folder_name_value, - ) - SfFbUninviteDetails_validator = bv.Struct(SfFbUninviteDetails) class SfFbUninviteType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfFbUninviteType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SfFbUninviteType(description={!r})'.format( - self._description_value, - ) - SfFbUninviteType_validator = bv.Struct(SfFbUninviteType) class SfInviteGroupDetails(bb.Struct): @@ -76955,96 +55548,44 @@ class SfInviteGroupDetails(bb.Struct): __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 + self._target_asset_index_value = bb.NOT_SET 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: int - """ - 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 + # Instance attribute type: int (validator is set below) + target_asset_index = bb.Attribute("target_asset_index") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfInviteGroupDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SfInviteGroupDetails(target_asset_index={!r})'.format( - self._target_asset_index_value, - ) - SfInviteGroupDetails_validator = bv.Struct(SfInviteGroupDetails) class SfInviteGroupType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfInviteGroupType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SfInviteGroupType(description={!r})'.format( - self._description_value, - ) - SfInviteGroupType_validator = bv.Struct(SfInviteGroupType) class SfTeamGrantAccessDetails(bb.Struct): @@ -77059,9 +55600,7 @@ class SfTeamGrantAccessDetails(bb.Struct): __slots__ = [ '_target_asset_index_value', - '_target_asset_index_present', '_original_folder_name_value', - '_original_folder_name_present', ] _has_required_fields = True @@ -77069,117 +55608,44 @@ class SfTeamGrantAccessDetails(bb.Struct): 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 + self._target_asset_index_value = bb.NOT_SET + self._original_folder_name_value = bb.NOT_SET 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: int - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") + # Instance attribute type: int (validator is set below) + target_asset_index = bb.Attribute("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 + # Instance attribute type: str (validator is set below) + original_folder_name = bb.Attribute("original_folder_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfTeamGrantAccessDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 SfTeamGrantAccessType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfTeamGrantAccessType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SfTeamGrantAccessType(description={!r})'.format( - self._description_value, - ) - SfTeamGrantAccessType_validator = bv.Struct(SfTeamGrantAccessType) class SfTeamInviteChangeRoleDetails(bb.Struct): @@ -77199,13 +55665,9 @@ class SfTeamInviteChangeRoleDetails(bb.Struct): __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 @@ -77215,14 +55677,10 @@ def __init__(self, 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 + self._target_asset_index_value = bb.NOT_SET + self._original_folder_name_value = bb.NOT_SET + self._new_sharing_permission_value = bb.NOT_SET + self._previous_sharing_permission_value = bb.NOT_SET if target_asset_index is not None: self.target_asset_index = target_asset_index if original_folder_name is not None: @@ -77232,163 +55690,43 @@ def __init__(self, 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. + # Instance attribute type: int (validator is set below) + target_asset_index = bb.Attribute("target_asset_index") - :rtype: int - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") + # Instance attribute type: str (validator is set below) + original_folder_name = bb.Attribute("original_folder_name") - @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 + # Instance attribute type: str (validator is set below) + new_sharing_permission = bb.Attribute("new_sharing_permission", nullable=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 + # Instance attribute type: str (validator is set below) + previous_sharing_permission = bb.Attribute("previous_sharing_permission", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfTeamInviteChangeRoleDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 SfTeamInviteChangeRoleType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfTeamInviteChangeRoleType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SfTeamInviteChangeRoleType(description={!r})'.format( - self._description_value, - ) - SfTeamInviteChangeRoleType_validator = bv.Struct(SfTeamInviteChangeRoleType) class SfTeamInviteDetails(bb.Struct): @@ -77405,11 +55743,8 @@ class SfTeamInviteDetails(bb.Struct): __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 @@ -77418,12 +55753,9 @@ 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 + self._target_asset_index_value = bb.NOT_SET + self._original_folder_name_value = bb.NOT_SET + self._sharing_permission_value = bb.NOT_SET if target_asset_index is not None: self.target_asset_index = target_asset_index if original_folder_name is not None: @@ -77431,135 +55763,40 @@ def __init__(self, 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: int - """ - 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 + # Instance attribute type: int (validator is set below) + target_asset_index = bb.Attribute("target_asset_index") - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False + # Instance attribute type: str (validator is set below) + original_folder_name = bb.Attribute("original_folder_name") - @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 + # Instance attribute type: str (validator is set below) + sharing_permission = bb.Attribute("sharing_permission", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfTeamInviteDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 SfTeamInviteType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfTeamInviteType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SfTeamInviteType(description={!r})'.format( - self._description_value, - ) - SfTeamInviteType_validator = bv.Struct(SfTeamInviteType) class SfTeamJoinDetails(bb.Struct): @@ -77574,9 +55811,7 @@ class SfTeamJoinDetails(bb.Struct): __slots__ = [ '_target_asset_index_value', - '_target_asset_index_present', '_original_folder_name_value', - '_original_folder_name_present', ] _has_required_fields = True @@ -77584,70 +55819,22 @@ class SfTeamJoinDetails(bb.Struct): 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 + self._target_asset_index_value = bb.NOT_SET + self._original_folder_name_value = bb.NOT_SET 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: int - """ - 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'") + # Instance attribute type: int (validator is set below) + target_asset_index = bb.Attribute("target_asset_index") - @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 + # Instance attribute type: str (validator is set below) + original_folder_name = bb.Attribute("original_folder_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfTeamJoinDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -77666,13 +55853,9 @@ class SfTeamJoinFromOobLinkDetails(bb.Struct): __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 @@ -77682,14 +55865,10 @@ def __init__(self, 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 + self._target_asset_index_value = bb.NOT_SET + self._original_folder_name_value = bb.NOT_SET + self._token_key_value = bb.NOT_SET + self._sharing_permission_value = bb.NOT_SET if target_asset_index is not None: self.target_asset_index = target_asset_index if original_folder_name is not None: @@ -77699,209 +55878,65 @@ def __init__(self, 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: int - """ - if self._target_asset_index_present: - return self._target_asset_index_value - else: - raise AttributeError("missing required field 'target_asset_index'") + # Instance attribute type: int (validator is set below) + target_asset_index = bb.Attribute("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 + # Instance attribute type: str (validator is set below) + original_folder_name = bb.Attribute("original_folder_name") - @target_asset_index.deleter - def target_asset_index(self): - self._target_asset_index_value = None - self._target_asset_index_present = False + # Instance attribute type: str (validator is set below) + token_key = bb.Attribute("token_key", nullable=True) - @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 + # Instance attribute type: str (validator is set below) + sharing_permission = bb.Attribute("sharing_permission", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfTeamJoinFromOobLinkDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 SfTeamJoinFromOobLinkType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfTeamJoinFromOobLinkType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SfTeamJoinFromOobLinkType(description={!r})'.format( - self._description_value, - ) - SfTeamJoinFromOobLinkType_validator = bv.Struct(SfTeamJoinFromOobLinkType) class SfTeamJoinType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfTeamJoinType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SfTeamJoinType(description={!r})'.format( - self._description_value, - ) - SfTeamJoinType_validator = bv.Struct(SfTeamJoinType) class SfTeamUninviteDetails(bb.Struct): @@ -77916,9 +55951,7 @@ class SfTeamUninviteDetails(bb.Struct): __slots__ = [ '_target_asset_index_value', - '_target_asset_index_present', '_original_folder_name_value', - '_original_folder_name_present', ] _has_required_fields = True @@ -77926,117 +55959,44 @@ class SfTeamUninviteDetails(bb.Struct): 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 + self._target_asset_index_value = bb.NOT_SET + self._original_folder_name_value = bb.NOT_SET 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: int - """ - 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'") + # Instance attribute type: int (validator is set below) + target_asset_index = bb.Attribute("target_asset_index") - @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 + # Instance attribute type: str (validator is set below) + original_folder_name = bb.Attribute("original_folder_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfTeamUninviteDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 SfTeamUninviteType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SfTeamUninviteType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SfTeamUninviteType(description={!r})'.format( - self._description_value, - ) - SfTeamUninviteType_validator = bv.Struct(SfTeamUninviteType) class SharedContentAddInviteesDetails(bb.Struct): @@ -78050,9 +56010,7 @@ class SharedContentAddInviteesDetails(bb.Struct): __slots__ = [ '_shared_content_access_level_value', - '_shared_content_access_level_present', '_invitees_value', - '_invitees_present', ] _has_required_fields = True @@ -78060,117 +56018,44 @@ class SharedContentAddInviteesDetails(bb.Struct): def __init__(self, shared_content_access_level=None, invitees=None): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False - self._invitees_value = None - self._invitees_present = False + self._shared_content_access_level_value = bb.NOT_SET + self._invitees_value = bb.NOT_SET if shared_content_access_level is not None: self.shared_content_access_level = shared_content_access_level if invitees is not None: self.invitees = invitees - @property - def shared_content_access_level(self): - """ - Shared content access level. - - :rtype: sharing.AccessLevel - """ - if self._shared_content_access_level_present: - return self._shared_content_access_level_value - else: - raise AttributeError("missing required field 'shared_content_access_level'") - - @shared_content_access_level.setter - def shared_content_access_level(self, val): - self._shared_content_access_level_validator.validate_type_only(val) - self._shared_content_access_level_value = val - self._shared_content_access_level_present = True - - @shared_content_access_level.deleter - def shared_content_access_level(self): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False - - @property - def invitees(self): - """ - A list of invitees. - - :rtype: list of [str] - """ - 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 + # Instance attribute type: sharing.AccessLevel (validator is set below) + shared_content_access_level = bb.Attribute("shared_content_access_level", user_defined=True) - @invitees.deleter - def invitees(self): - self._invitees_value = None - self._invitees_present = False + # Instance attribute type: list of [str] (validator is set below) + invitees = bb.Attribute("invitees") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentAddInviteesDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentAddInviteesDetails(shared_content_access_level={!r}, invitees={!r})'.format( - self._shared_content_access_level_value, - self._invitees_value, - ) - SharedContentAddInviteesDetails_validator = bv.Struct(SharedContentAddInviteesDetails) class SharedContentAddInviteesType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentAddInviteesType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentAddInviteesType(description={!r})'.format( - self._description_value, - ) - SharedContentAddInviteesType_validator = bv.Struct(SharedContentAddInviteesType) class SharedContentAddLinkExpiryDetails(bb.Struct): @@ -78184,100 +56069,44 @@ class SharedContentAddLinkExpiryDetails(bb.Struct): __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 + self._new_value_value = bb.NOT_SET if new_value is not None: self.new_value = new_value - @property - def new_value(self): - """ - New shared content link expiration date. Might be missing due to - historical data gap. - - :rtype: datetime.datetime - """ - 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 + # Instance attribute type: datetime.datetime (validator is set below) + new_value = bb.Attribute("new_value", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentAddLinkExpiryDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentAddLinkExpiryDetails(new_value={!r})'.format( - self._new_value_value, - ) - SharedContentAddLinkExpiryDetails_validator = bv.Struct(SharedContentAddLinkExpiryDetails) class SharedContentAddLinkExpiryType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentAddLinkExpiryType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentAddLinkExpiryType(description={!r})'.format( - self._description_value, - ) - SharedContentAddLinkExpiryType_validator = bv.Struct(SharedContentAddLinkExpiryType) class SharedContentAddLinkPasswordDetails(bb.Struct): @@ -78296,56 +56125,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentAddLinkPasswordDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentAddLinkPasswordDetails()' - SharedContentAddLinkPasswordDetails_validator = bv.Struct(SharedContentAddLinkPasswordDetails) class SharedContentAddLinkPasswordType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentAddLinkPasswordType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentAddLinkPasswordType(description={!r})'.format( - self._description_value, - ) - SharedContentAddLinkPasswordType_validator = bv.Struct(SharedContentAddLinkPasswordType) class SharedContentAddMemberDetails(bb.Struct): @@ -78358,96 +56159,44 @@ class SharedContentAddMemberDetails(bb.Struct): __slots__ = [ '_shared_content_access_level_value', - '_shared_content_access_level_present', ] _has_required_fields = True def __init__(self, shared_content_access_level=None): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False + self._shared_content_access_level_value = bb.NOT_SET if shared_content_access_level is not None: self.shared_content_access_level = shared_content_access_level - @property - def shared_content_access_level(self): - """ - Shared content access level. - - :rtype: sharing.AccessLevel - """ - if self._shared_content_access_level_present: - return self._shared_content_access_level_value - else: - raise AttributeError("missing required field 'shared_content_access_level'") - - @shared_content_access_level.setter - def shared_content_access_level(self, val): - self._shared_content_access_level_validator.validate_type_only(val) - self._shared_content_access_level_value = val - self._shared_content_access_level_present = True - - @shared_content_access_level.deleter - def shared_content_access_level(self): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False + # Instance attribute type: sharing.AccessLevel (validator is set below) + shared_content_access_level = bb.Attribute("shared_content_access_level", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentAddMemberDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentAddMemberDetails(shared_content_access_level={!r})'.format( - self._shared_content_access_level_value, - ) - SharedContentAddMemberDetails_validator = bv.Struct(SharedContentAddMemberDetails) class SharedContentAddMemberType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentAddMemberType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentAddMemberType(description={!r})'.format( - self._description_value, - ) - SharedContentAddMemberType_validator = bv.Struct(SharedContentAddMemberType) class SharedContentChangeDownloadsPolicyDetails(bb.Struct): @@ -78462,9 +56211,7 @@ class SharedContentChangeDownloadsPolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -78472,120 +56219,44 @@ class SharedContentChangeDownloadsPolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 downloads policy. - - :rtype: DownloadPolicyType - """ - 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 + # Instance attribute type: DownloadPolicyType (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False - - @property - def previous_value(self): - """ - Previous downloads policy. Might be missing due to historical data gap. - - :rtype: DownloadPolicyType - """ - 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 + # Instance attribute type: DownloadPolicyType (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentChangeDownloadsPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentChangeDownloadsPolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - SharedContentChangeDownloadsPolicyDetails_validator = bv.Struct(SharedContentChangeDownloadsPolicyDetails) class SharedContentChangeDownloadsPolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentChangeDownloadsPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentChangeDownloadsPolicyType(description={!r})'.format( - self._description_value, - ) - SharedContentChangeDownloadsPolicyType_validator = bv.Struct(SharedContentChangeDownloadsPolicyType) class SharedContentChangeInviteeRoleDetails(bb.Struct): @@ -78603,11 +56274,8 @@ class SharedContentChangeInviteeRoleDetails(bb.Struct): __slots__ = [ '_previous_access_level_value', - '_previous_access_level_present', '_new_access_level_value', - '_new_access_level_present', '_invitee_value', - '_invitee_present', ] _has_required_fields = True @@ -78616,12 +56284,9 @@ def __init__(self, new_access_level=None, invitee=None, previous_access_level=None): - self._previous_access_level_value = None - self._previous_access_level_present = False - self._new_access_level_value = None - self._new_access_level_present = False - self._invitee_value = None - self._invitee_present = False + self._previous_access_level_value = bb.NOT_SET + self._new_access_level_value = bb.NOT_SET + self._invitee_value = bb.NOT_SET if previous_access_level is not None: self.previous_access_level = previous_access_level if new_access_level is not None: @@ -78629,135 +56294,40 @@ def __init__(self, if invitee is not None: self.invitee = invitee - @property - def previous_access_level(self): - """ - Previous access level. Might be missing due to historical data gap. - - :rtype: sharing.AccessLevel - """ - if self._previous_access_level_present: - return self._previous_access_level_value - else: - return None - - @previous_access_level.setter - def previous_access_level(self, val): - if val is None: - del self.previous_access_level - return - self._previous_access_level_validator.validate_type_only(val) - self._previous_access_level_value = val - self._previous_access_level_present = True - - @previous_access_level.deleter - def previous_access_level(self): - self._previous_access_level_value = None - self._previous_access_level_present = False + # Instance attribute type: sharing.AccessLevel (validator is set below) + previous_access_level = bb.Attribute("previous_access_level", nullable=True, user_defined=True) - @property - def new_access_level(self): - """ - New access level. - - :rtype: sharing.AccessLevel - """ - if self._new_access_level_present: - return self._new_access_level_value - else: - raise AttributeError("missing required field 'new_access_level'") + # Instance attribute type: sharing.AccessLevel (validator is set below) + new_access_level = bb.Attribute("new_access_level", user_defined=True) - @new_access_level.setter - def new_access_level(self, val): - self._new_access_level_validator.validate_type_only(val) - self._new_access_level_value = val - self._new_access_level_present = True - - @new_access_level.deleter - def new_access_level(self): - self._new_access_level_value = None - self._new_access_level_present = False - - @property - def invitee(self): - """ - The invitee whose role was changed. - - :rtype: str - """ - if self._invitee_present: - return self._invitee_value - else: - raise AttributeError("missing required field 'invitee'") - - @invitee.setter - def invitee(self, val): - val = self._invitee_validator.validate(val) - self._invitee_value = val - self._invitee_present = True - - @invitee.deleter - def invitee(self): - self._invitee_value = None - self._invitee_present = False + # Instance attribute type: str (validator is set below) + invitee = bb.Attribute("invitee") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentChangeInviteeRoleDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentChangeInviteeRoleDetails(new_access_level={!r}, invitee={!r}, previous_access_level={!r})'.format( - self._new_access_level_value, - self._invitee_value, - self._previous_access_level_value, - ) - SharedContentChangeInviteeRoleDetails_validator = bv.Struct(SharedContentChangeInviteeRoleDetails) class SharedContentChangeInviteeRoleType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentChangeInviteeRoleType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentChangeInviteeRoleType(description={!r})'.format( - self._description_value, - ) - SharedContentChangeInviteeRoleType_validator = bv.Struct(SharedContentChangeInviteeRoleType) class SharedContentChangeLinkAudienceDetails(bb.Struct): @@ -78772,9 +56342,7 @@ class SharedContentChangeLinkAudienceDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -78782,120 +56350,44 @@ class SharedContentChangeLinkAudienceDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 link audience value. - - :rtype: sharing.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 + # Instance attribute type: sharing.LinkAudience (validator is set below) + new_value = bb.Attribute("new_value", user_defined=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. - - :rtype: sharing.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 + # Instance attribute type: sharing.LinkAudience (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentChangeLinkAudienceDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentChangeLinkAudienceDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - SharedContentChangeLinkAudienceDetails_validator = bv.Struct(SharedContentChangeLinkAudienceDetails) class SharedContentChangeLinkAudienceType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentChangeLinkAudienceType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentChangeLinkAudienceType(description={!r})'.format( - self._description_value, - ) - SharedContentChangeLinkAudienceType_validator = bv.Struct(SharedContentChangeLinkAudienceType) class SharedContentChangeLinkExpiryDetails(bb.Struct): @@ -78912,9 +56404,7 @@ class SharedContentChangeLinkExpiryDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = False @@ -78922,125 +56412,44 @@ class SharedContentChangeLinkExpiryDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 shared content link expiration date. Might be missing due to - historical data gap. + # Instance attribute type: datetime.datetime (validator is set below) + new_value = bb.Attribute("new_value", nullable=True) - :rtype: datetime.datetime - """ - 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 - - @property - def previous_value(self): - """ - Previous shared content link expiration date. Might be missing due to - historical data gap. - - :rtype: datetime.datetime - """ - 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 + # Instance attribute type: datetime.datetime (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentChangeLinkExpiryDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentChangeLinkExpiryDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - SharedContentChangeLinkExpiryDetails_validator = bv.Struct(SharedContentChangeLinkExpiryDetails) class SharedContentChangeLinkExpiryType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentChangeLinkExpiryType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentChangeLinkExpiryType(description={!r})'.format( - self._description_value, - ) - SharedContentChangeLinkExpiryType_validator = bv.Struct(SharedContentChangeLinkExpiryType) class SharedContentChangeLinkPasswordDetails(bb.Struct): @@ -79059,56 +56468,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentChangeLinkPasswordDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentChangeLinkPasswordDetails()' - SharedContentChangeLinkPasswordDetails_validator = bv.Struct(SharedContentChangeLinkPasswordDetails) class SharedContentChangeLinkPasswordType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentChangeLinkPasswordType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentChangeLinkPasswordType(description={!r})'.format( - self._description_value, - ) - SharedContentChangeLinkPasswordType_validator = bv.Struct(SharedContentChangeLinkPasswordType) class SharedContentChangeMemberRoleDetails(bb.Struct): @@ -79123,9 +56504,7 @@ class SharedContentChangeMemberRoleDetails(bb.Struct): __slots__ = [ '_previous_access_level_value', - '_previous_access_level_present', '_new_access_level_value', - '_new_access_level_present', ] _has_required_fields = True @@ -79133,120 +56512,44 @@ class SharedContentChangeMemberRoleDetails(bb.Struct): def __init__(self, new_access_level=None, previous_access_level=None): - self._previous_access_level_value = None - self._previous_access_level_present = False - self._new_access_level_value = None - self._new_access_level_present = False + self._previous_access_level_value = bb.NOT_SET + self._new_access_level_value = bb.NOT_SET if previous_access_level is not None: self.previous_access_level = previous_access_level if new_access_level is not None: self.new_access_level = new_access_level - @property - def previous_access_level(self): - """ - Previous access level. Might be missing due to historical data gap. - - :rtype: sharing.AccessLevel - """ - if self._previous_access_level_present: - return self._previous_access_level_value - else: - return None - - @previous_access_level.setter - def previous_access_level(self, val): - if val is None: - del self.previous_access_level - return - self._previous_access_level_validator.validate_type_only(val) - self._previous_access_level_value = val - self._previous_access_level_present = True - - @previous_access_level.deleter - def previous_access_level(self): - self._previous_access_level_value = None - self._previous_access_level_present = False + # Instance attribute type: sharing.AccessLevel (validator is set below) + previous_access_level = bb.Attribute("previous_access_level", nullable=True, user_defined=True) - @property - def new_access_level(self): - """ - New access level. - - :rtype: sharing.AccessLevel - """ - if self._new_access_level_present: - return self._new_access_level_value - else: - raise AttributeError("missing required field 'new_access_level'") - - @new_access_level.setter - def new_access_level(self, val): - self._new_access_level_validator.validate_type_only(val) - self._new_access_level_value = val - self._new_access_level_present = True - - @new_access_level.deleter - def new_access_level(self): - self._new_access_level_value = None - self._new_access_level_present = False + # Instance attribute type: sharing.AccessLevel (validator is set below) + new_access_level = bb.Attribute("new_access_level", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentChangeMemberRoleDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentChangeMemberRoleDetails(new_access_level={!r}, previous_access_level={!r})'.format( - self._new_access_level_value, - self._previous_access_level_value, - ) - SharedContentChangeMemberRoleDetails_validator = bv.Struct(SharedContentChangeMemberRoleDetails) class SharedContentChangeMemberRoleType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentChangeMemberRoleType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentChangeMemberRoleType(description={!r})'.format( - self._description_value, - ) - SharedContentChangeMemberRoleType_validator = bv.Struct(SharedContentChangeMemberRoleType) class SharedContentChangeViewerInfoPolicyDetails(bb.Struct): @@ -79261,9 +56564,7 @@ class SharedContentChangeViewerInfoPolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -79271,120 +56572,44 @@ class SharedContentChangeViewerInfoPolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 viewer info policy. - - :rtype: sharing.ViewerInfoPolicy - """ - 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: sharing.ViewerInfoPolicy - """ - 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 + # Instance attribute type: sharing.ViewerInfoPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False + # Instance attribute type: sharing.ViewerInfoPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentChangeViewerInfoPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentChangeViewerInfoPolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - SharedContentChangeViewerInfoPolicyDetails_validator = bv.Struct(SharedContentChangeViewerInfoPolicyDetails) class SharedContentChangeViewerInfoPolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentChangeViewerInfoPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentChangeViewerInfoPolicyType(description={!r})'.format( - self._description_value, - ) - SharedContentChangeViewerInfoPolicyType_validator = bv.Struct(SharedContentChangeViewerInfoPolicyType) class SharedContentClaimInvitationDetails(bb.Struct): @@ -79397,99 +56622,44 @@ class SharedContentClaimInvitationDetails(bb.Struct): __slots__ = [ '_shared_content_link_value', - '_shared_content_link_present', ] _has_required_fields = False def __init__(self, shared_content_link=None): - self._shared_content_link_value = None - self._shared_content_link_present = False + self._shared_content_link_value = bb.NOT_SET if shared_content_link is not None: self.shared_content_link = shared_content_link - @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 + # Instance attribute type: str (validator is set below) + shared_content_link = bb.Attribute("shared_content_link", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentClaimInvitationDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentClaimInvitationDetails(shared_content_link={!r})'.format( - self._shared_content_link_value, - ) - SharedContentClaimInvitationDetails_validator = bv.Struct(SharedContentClaimInvitationDetails) class SharedContentClaimInvitationType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentClaimInvitationType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentClaimInvitationType(description={!r})'.format( - self._description_value, - ) - SharedContentClaimInvitationType_validator = bv.Struct(SharedContentClaimInvitationType) class SharedContentCopyDetails(bb.Struct): @@ -79508,13 +56678,9 @@ class SharedContentCopyDetails(bb.Struct): __slots__ = [ '_shared_content_link_value', - '_shared_content_link_present', '_shared_content_owner_value', - '_shared_content_owner_present', '_shared_content_access_level_value', - '_shared_content_access_level_present', '_destination_path_value', - '_destination_path_present', ] _has_required_fields = True @@ -79524,14 +56690,10 @@ def __init__(self, shared_content_access_level=None, destination_path=None, shared_content_owner=None): - self._shared_content_link_value = None - self._shared_content_link_present = False - self._shared_content_owner_value = None - self._shared_content_owner_present = False - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False - self._destination_path_value = None - self._destination_path_present = False + self._shared_content_link_value = bb.NOT_SET + self._shared_content_owner_value = bb.NOT_SET + self._shared_content_access_level_value = bb.NOT_SET + self._destination_path_value = bb.NOT_SET if shared_content_link is not None: self.shared_content_link = shared_content_link if shared_content_owner is not None: @@ -79541,159 +56703,43 @@ def __init__(self, if destination_path is not None: self.destination_path = destination_path - @property - def shared_content_link(self): - """ - Shared content link. + # Instance attribute type: str (validator is set below) + shared_content_link = bb.Attribute("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'") + # Instance attribute type: UserLogInfo (validator is set below) + shared_content_owner = bb.Attribute("shared_content_owner", nullable=True, user_defined=True) - @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 + # Instance attribute type: sharing.AccessLevel (validator is set below) + shared_content_access_level = bb.Attribute("shared_content_access_level", user_defined=True) - @shared_content_link.deleter - def shared_content_link(self): - self._shared_content_link_value = None - self._shared_content_link_present = False - - @property - def shared_content_owner(self): - """ - The shared content owner. - - :rtype: UserLogInfo - """ - if self._shared_content_owner_present: - return self._shared_content_owner_value - else: - return None - - @shared_content_owner.setter - def shared_content_owner(self, val): - if val is None: - del self.shared_content_owner - return - self._shared_content_owner_validator.validate_type_only(val) - self._shared_content_owner_value = val - self._shared_content_owner_present = True - - @shared_content_owner.deleter - def shared_content_owner(self): - self._shared_content_owner_value = None - self._shared_content_owner_present = False - - @property - def shared_content_access_level(self): - """ - Shared content access level. - - :rtype: sharing.AccessLevel - """ - if self._shared_content_access_level_present: - return self._shared_content_access_level_value - else: - raise AttributeError("missing required field 'shared_content_access_level'") - - @shared_content_access_level.setter - def shared_content_access_level(self, val): - self._shared_content_access_level_validator.validate_type_only(val) - self._shared_content_access_level_value = val - self._shared_content_access_level_present = True - - @shared_content_access_level.deleter - def shared_content_access_level(self): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False - - @property - def destination_path(self): - """ - The path where the member saved the content. - - :rtype: str - """ - if self._destination_path_present: - return self._destination_path_value - else: - raise AttributeError("missing required field 'destination_path'") - - @destination_path.setter - def destination_path(self, val): - val = self._destination_path_validator.validate(val) - self._destination_path_value = val - self._destination_path_present = True - - @destination_path.deleter - def destination_path(self): - self._destination_path_value = None - self._destination_path_present = False + # Instance attribute type: str (validator is set below) + destination_path = bb.Attribute("destination_path") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentCopyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentCopyDetails(shared_content_link={!r}, shared_content_access_level={!r}, destination_path={!r}, shared_content_owner={!r})'.format( - self._shared_content_link_value, - self._shared_content_access_level_value, - self._destination_path_value, - self._shared_content_owner_value, - ) - SharedContentCopyDetails_validator = bv.Struct(SharedContentCopyDetails) class SharedContentCopyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentCopyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentCopyType(description={!r})'.format( - self._description_value, - ) - SharedContentCopyType_validator = bv.Struct(SharedContentCopyType) class SharedContentDownloadDetails(bb.Struct): @@ -79710,11 +56756,8 @@ class SharedContentDownloadDetails(bb.Struct): __slots__ = [ '_shared_content_link_value', - '_shared_content_link_present', '_shared_content_owner_value', - '_shared_content_owner_present', '_shared_content_access_level_value', - '_shared_content_access_level_present', ] _has_required_fields = True @@ -79723,12 +56766,9 @@ def __init__(self, shared_content_link=None, shared_content_access_level=None, shared_content_owner=None): - self._shared_content_link_value = None - self._shared_content_link_present = False - self._shared_content_owner_value = None - self._shared_content_owner_present = False - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False + self._shared_content_link_value = bb.NOT_SET + self._shared_content_owner_value = bb.NOT_SET + self._shared_content_access_level_value = bb.NOT_SET if shared_content_link is not None: self.shared_content_link = shared_content_link if shared_content_owner is not None: @@ -79736,135 +56776,40 @@ def __init__(self, if shared_content_access_level is not None: self.shared_content_access_level = shared_content_access_level - @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 + # Instance attribute type: str (validator is set below) + shared_content_link = bb.Attribute("shared_content_link") - @shared_content_link.deleter - def shared_content_link(self): - self._shared_content_link_value = None - self._shared_content_link_present = False - - @property - def shared_content_owner(self): - """ - The shared content owner. - - :rtype: UserLogInfo - """ - if self._shared_content_owner_present: - return self._shared_content_owner_value - else: - return None - - @shared_content_owner.setter - def shared_content_owner(self, val): - if val is None: - del self.shared_content_owner - return - self._shared_content_owner_validator.validate_type_only(val) - self._shared_content_owner_value = val - self._shared_content_owner_present = True - - @shared_content_owner.deleter - def shared_content_owner(self): - self._shared_content_owner_value = None - self._shared_content_owner_present = False - - @property - def shared_content_access_level(self): - """ - Shared content access level. - - :rtype: sharing.AccessLevel - """ - if self._shared_content_access_level_present: - return self._shared_content_access_level_value - else: - raise AttributeError("missing required field 'shared_content_access_level'") + # Instance attribute type: UserLogInfo (validator is set below) + shared_content_owner = bb.Attribute("shared_content_owner", nullable=True, user_defined=True) - @shared_content_access_level.setter - def shared_content_access_level(self, val): - self._shared_content_access_level_validator.validate_type_only(val) - self._shared_content_access_level_value = val - self._shared_content_access_level_present = True - - @shared_content_access_level.deleter - def shared_content_access_level(self): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False + # Instance attribute type: sharing.AccessLevel (validator is set below) + shared_content_access_level = bb.Attribute("shared_content_access_level", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentDownloadDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentDownloadDetails(shared_content_link={!r}, shared_content_access_level={!r}, shared_content_owner={!r})'.format( - self._shared_content_link_value, - self._shared_content_access_level_value, - self._shared_content_owner_value, - ) - SharedContentDownloadDetails_validator = bv.Struct(SharedContentDownloadDetails) class SharedContentDownloadType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentDownloadType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentDownloadType(description={!r})'.format( - self._description_value, - ) - SharedContentDownloadType_validator = bv.Struct(SharedContentDownloadType) class SharedContentRelinquishMembershipDetails(bb.Struct): @@ -79883,56 +56828,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentRelinquishMembershipDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentRelinquishMembershipDetails()' - SharedContentRelinquishMembershipDetails_validator = bv.Struct(SharedContentRelinquishMembershipDetails) class SharedContentRelinquishMembershipType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentRelinquishMembershipType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentRelinquishMembershipType(description={!r})'.format( - self._description_value, - ) - SharedContentRelinquishMembershipType_validator = bv.Struct(SharedContentRelinquishMembershipType) class SharedContentRemoveInviteesDetails(bb.Struct): @@ -79945,96 +56862,44 @@ class SharedContentRemoveInviteesDetails(bb.Struct): __slots__ = [ '_invitees_value', - '_invitees_present', ] _has_required_fields = True def __init__(self, invitees=None): - self._invitees_value = None - self._invitees_present = False + self._invitees_value = bb.NOT_SET if invitees is not None: self.invitees = invitees - @property - def invitees(self): - """ - A list of invitees. - - :rtype: list of [str] - """ - 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 + # Instance attribute type: list of [str] (validator is set below) + invitees = bb.Attribute("invitees") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentRemoveInviteesDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentRemoveInviteesDetails(invitees={!r})'.format( - self._invitees_value, - ) - SharedContentRemoveInviteesDetails_validator = bv.Struct(SharedContentRemoveInviteesDetails) class SharedContentRemoveInviteesType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentRemoveInviteesType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentRemoveInviteesType(description={!r})'.format( - self._description_value, - ) - SharedContentRemoveInviteesType_validator = bv.Struct(SharedContentRemoveInviteesType) class SharedContentRemoveLinkExpiryDetails(bb.Struct): @@ -80048,100 +56913,44 @@ class SharedContentRemoveLinkExpiryDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', ] _has_required_fields = False def __init__(self, previous_value=None): - self._previous_value_value = None - self._previous_value_present = False + self._previous_value_value = bb.NOT_SET if previous_value is not None: self.previous_value = previous_value - @property - def previous_value(self): - """ - Previous shared content link expiration date. Might be missing due to - historical data gap. - - :rtype: datetime.datetime - """ - 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 + # Instance attribute type: datetime.datetime (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentRemoveLinkExpiryDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentRemoveLinkExpiryDetails(previous_value={!r})'.format( - self._previous_value_value, - ) - SharedContentRemoveLinkExpiryDetails_validator = bv.Struct(SharedContentRemoveLinkExpiryDetails) class SharedContentRemoveLinkExpiryType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentRemoveLinkExpiryType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentRemoveLinkExpiryType(description={!r})'.format( - self._description_value, - ) - SharedContentRemoveLinkExpiryType_validator = bv.Struct(SharedContentRemoveLinkExpiryType) class SharedContentRemoveLinkPasswordDetails(bb.Struct): @@ -80160,56 +56969,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentRemoveLinkPasswordDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentRemoveLinkPasswordDetails()' - SharedContentRemoveLinkPasswordDetails_validator = bv.Struct(SharedContentRemoveLinkPasswordDetails) class SharedContentRemoveLinkPasswordType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentRemoveLinkPasswordType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentRemoveLinkPasswordType(description={!r})'.format( - self._description_value, - ) - SharedContentRemoveLinkPasswordType_validator = bv.Struct(SharedContentRemoveLinkPasswordType) class SharedContentRemoveMemberDetails(bb.Struct): @@ -80222,99 +57003,44 @@ class SharedContentRemoveMemberDetails(bb.Struct): __slots__ = [ '_shared_content_access_level_value', - '_shared_content_access_level_present', ] _has_required_fields = False def __init__(self, shared_content_access_level=None): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False + self._shared_content_access_level_value = bb.NOT_SET if shared_content_access_level is not None: self.shared_content_access_level = shared_content_access_level - @property - def shared_content_access_level(self): - """ - Shared content access level. - - :rtype: sharing.AccessLevel - """ - if self._shared_content_access_level_present: - return self._shared_content_access_level_value - else: - return None - - @shared_content_access_level.setter - def shared_content_access_level(self, val): - if val is None: - del self.shared_content_access_level - return - self._shared_content_access_level_validator.validate_type_only(val) - self._shared_content_access_level_value = val - self._shared_content_access_level_present = True - - @shared_content_access_level.deleter - def shared_content_access_level(self): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False + # Instance attribute type: sharing.AccessLevel (validator is set below) + shared_content_access_level = bb.Attribute("shared_content_access_level", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentRemoveMemberDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentRemoveMemberDetails(shared_content_access_level={!r})'.format( - self._shared_content_access_level_value, - ) - SharedContentRemoveMemberDetails_validator = bv.Struct(SharedContentRemoveMemberDetails) class SharedContentRemoveMemberType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentRemoveMemberType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentRemoveMemberType(description={!r})'.format( - self._description_value, - ) - SharedContentRemoveMemberType_validator = bv.Struct(SharedContentRemoveMemberType) class SharedContentRequestAccessDetails(bb.Struct): @@ -80327,99 +57053,44 @@ class SharedContentRequestAccessDetails(bb.Struct): __slots__ = [ '_shared_content_link_value', - '_shared_content_link_present', ] _has_required_fields = False def __init__(self, shared_content_link=None): - self._shared_content_link_value = None - self._shared_content_link_present = False + self._shared_content_link_value = bb.NOT_SET if shared_content_link is not None: self.shared_content_link = shared_content_link - @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 + # Instance attribute type: str (validator is set below) + shared_content_link = bb.Attribute("shared_content_link", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentRequestAccessDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentRequestAccessDetails(shared_content_link={!r})'.format( - self._shared_content_link_value, - ) - SharedContentRequestAccessDetails_validator = bv.Struct(SharedContentRequestAccessDetails) class SharedContentRequestAccessType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentRequestAccessType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentRequestAccessType(description={!r})'.format( - self._description_value, - ) - SharedContentRequestAccessType_validator = bv.Struct(SharedContentRequestAccessType) class SharedContentRestoreInviteesDetails(bb.Struct): @@ -80435,9 +57106,7 @@ class SharedContentRestoreInviteesDetails(bb.Struct): __slots__ = [ '_shared_content_access_level_value', - '_shared_content_access_level_present', '_invitees_value', - '_invitees_present', ] _has_required_fields = True @@ -80445,117 +57114,44 @@ class SharedContentRestoreInviteesDetails(bb.Struct): def __init__(self, shared_content_access_level=None, invitees=None): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False - self._invitees_value = None - self._invitees_present = False + self._shared_content_access_level_value = bb.NOT_SET + self._invitees_value = bb.NOT_SET if shared_content_access_level is not None: self.shared_content_access_level = shared_content_access_level if invitees is not None: self.invitees = invitees - @property - def shared_content_access_level(self): - """ - Shared content access level. - - :rtype: sharing.AccessLevel - """ - if self._shared_content_access_level_present: - return self._shared_content_access_level_value - else: - raise AttributeError("missing required field 'shared_content_access_level'") - - @shared_content_access_level.setter - def shared_content_access_level(self, val): - self._shared_content_access_level_validator.validate_type_only(val) - self._shared_content_access_level_value = val - self._shared_content_access_level_present = True + # Instance attribute type: sharing.AccessLevel (validator is set below) + shared_content_access_level = bb.Attribute("shared_content_access_level", user_defined=True) - @shared_content_access_level.deleter - def shared_content_access_level(self): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False - - @property - def invitees(self): - """ - A list of invitees. - - :rtype: list of [str] - """ - 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 + # Instance attribute type: list of [str] (validator is set below) + invitees = bb.Attribute("invitees") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentRestoreInviteesDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentRestoreInviteesDetails(shared_content_access_level={!r}, invitees={!r})'.format( - self._shared_content_access_level_value, - self._invitees_value, - ) - SharedContentRestoreInviteesDetails_validator = bv.Struct(SharedContentRestoreInviteesDetails) class SharedContentRestoreInviteesType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentRestoreInviteesType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentRestoreInviteesType(description={!r})'.format( - self._description_value, - ) - SharedContentRestoreInviteesType_validator = bv.Struct(SharedContentRestoreInviteesType) class SharedContentRestoreMemberDetails(bb.Struct): @@ -80569,96 +57165,44 @@ class SharedContentRestoreMemberDetails(bb.Struct): __slots__ = [ '_shared_content_access_level_value', - '_shared_content_access_level_present', ] _has_required_fields = True def __init__(self, shared_content_access_level=None): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False + self._shared_content_access_level_value = bb.NOT_SET if shared_content_access_level is not None: self.shared_content_access_level = shared_content_access_level - @property - def shared_content_access_level(self): - """ - Shared content access level. - - :rtype: sharing.AccessLevel - """ - if self._shared_content_access_level_present: - return self._shared_content_access_level_value - else: - raise AttributeError("missing required field 'shared_content_access_level'") - - @shared_content_access_level.setter - def shared_content_access_level(self, val): - self._shared_content_access_level_validator.validate_type_only(val) - self._shared_content_access_level_value = val - self._shared_content_access_level_present = True - - @shared_content_access_level.deleter - def shared_content_access_level(self): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False + # Instance attribute type: sharing.AccessLevel (validator is set below) + shared_content_access_level = bb.Attribute("shared_content_access_level", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentRestoreMemberDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentRestoreMemberDetails(shared_content_access_level={!r})'.format( - self._shared_content_access_level_value, - ) - SharedContentRestoreMemberDetails_validator = bv.Struct(SharedContentRestoreMemberDetails) class SharedContentRestoreMemberType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentRestoreMemberType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentRestoreMemberType(description={!r})'.format( - self._description_value, - ) - SharedContentRestoreMemberType_validator = bv.Struct(SharedContentRestoreMemberType) class SharedContentUnshareDetails(bb.Struct): @@ -80677,56 +57221,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentUnshareDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentUnshareDetails()' - SharedContentUnshareDetails_validator = bv.Struct(SharedContentUnshareDetails) class SharedContentUnshareType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentUnshareType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentUnshareType(description={!r})'.format( - self._description_value, - ) - SharedContentUnshareType_validator = bv.Struct(SharedContentUnshareType) class SharedContentViewDetails(bb.Struct): @@ -80743,11 +57259,8 @@ class SharedContentViewDetails(bb.Struct): __slots__ = [ '_shared_content_link_value', - '_shared_content_link_present', '_shared_content_owner_value', - '_shared_content_owner_present', '_shared_content_access_level_value', - '_shared_content_access_level_present', ] _has_required_fields = True @@ -80756,12 +57269,9 @@ def __init__(self, shared_content_link=None, shared_content_access_level=None, shared_content_owner=None): - self._shared_content_link_value = None - self._shared_content_link_present = False - self._shared_content_owner_value = None - self._shared_content_owner_present = False - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False + self._shared_content_link_value = bb.NOT_SET + self._shared_content_owner_value = bb.NOT_SET + self._shared_content_access_level_value = bb.NOT_SET if shared_content_link is not None: self.shared_content_link = shared_content_link if shared_content_owner is not None: @@ -80769,135 +57279,40 @@ def __init__(self, if shared_content_access_level is not None: self.shared_content_access_level = shared_content_access_level - @property - def shared_content_link(self): - """ - Shared content link. + # Instance attribute type: str (validator is set below) + shared_content_link = bb.Attribute("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'") + # Instance attribute type: UserLogInfo (validator is set below) + shared_content_owner = bb.Attribute("shared_content_owner", nullable=True, user_defined=True) - @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 shared_content_owner(self): - """ - The shared content owner. - - :rtype: UserLogInfo - """ - if self._shared_content_owner_present: - return self._shared_content_owner_value - else: - return None - - @shared_content_owner.setter - def shared_content_owner(self, val): - if val is None: - del self.shared_content_owner - return - self._shared_content_owner_validator.validate_type_only(val) - self._shared_content_owner_value = val - self._shared_content_owner_present = True - - @shared_content_owner.deleter - def shared_content_owner(self): - self._shared_content_owner_value = None - self._shared_content_owner_present = False - - @property - def shared_content_access_level(self): - """ - Shared content access level. - - :rtype: sharing.AccessLevel - """ - if self._shared_content_access_level_present: - return self._shared_content_access_level_value - else: - raise AttributeError("missing required field 'shared_content_access_level'") - - @shared_content_access_level.setter - def shared_content_access_level(self, val): - self._shared_content_access_level_validator.validate_type_only(val) - self._shared_content_access_level_value = val - self._shared_content_access_level_present = True - - @shared_content_access_level.deleter - def shared_content_access_level(self): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False + # Instance attribute type: sharing.AccessLevel (validator is set below) + shared_content_access_level = bb.Attribute("shared_content_access_level", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentViewDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentViewDetails(shared_content_link={!r}, shared_content_access_level={!r}, shared_content_owner={!r})'.format( - self._shared_content_link_value, - self._shared_content_access_level_value, - self._shared_content_owner_value, - ) - SharedContentViewDetails_validator = bv.Struct(SharedContentViewDetails) class SharedContentViewType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedContentViewType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedContentViewType(description={!r})'.format( - self._description_value, - ) - SharedContentViewType_validator = bv.Struct(SharedContentViewType) class SharedFolderChangeLinkPolicyDetails(bb.Struct): @@ -80912,9 +57327,7 @@ class SharedFolderChangeLinkPolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -80922,121 +57335,44 @@ class SharedFolderChangeLinkPolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 shared folder link policy. - - :rtype: sharing.SharedLinkPolicy - """ - 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: sharing.SharedLinkPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None + # Instance attribute type: sharing.SharedLinkPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @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 + # Instance attribute type: sharing.SharedLinkPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderChangeLinkPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderChangeLinkPolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - SharedFolderChangeLinkPolicyDetails_validator = bv.Struct(SharedFolderChangeLinkPolicyDetails) class SharedFolderChangeLinkPolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderChangeLinkPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderChangeLinkPolicyType(description={!r})'.format( - self._description_value, - ) - SharedFolderChangeLinkPolicyType_validator = bv.Struct(SharedFolderChangeLinkPolicyType) class SharedFolderChangeMembersInheritancePolicyDetails(bb.Struct): @@ -81053,9 +57389,7 @@ class SharedFolderChangeMembersInheritancePolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -81063,121 +57397,44 @@ class SharedFolderChangeMembersInheritancePolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 inheritance policy. - - :rtype: SharedFolderMembersInheritancePolicy - """ - 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 + # Instance attribute type: SharedFolderMembersInheritancePolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=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 inheritance policy. Might be missing due to historical - data gap. - - :rtype: SharedFolderMembersInheritancePolicy - """ - 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 + # Instance attribute type: SharedFolderMembersInheritancePolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderChangeMembersInheritancePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderChangeMembersInheritancePolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - SharedFolderChangeMembersInheritancePolicyDetails_validator = bv.Struct(SharedFolderChangeMembersInheritancePolicyDetails) class SharedFolderChangeMembersInheritancePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderChangeMembersInheritancePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderChangeMembersInheritancePolicyType(description={!r})'.format( - self._description_value, - ) - SharedFolderChangeMembersInheritancePolicyType_validator = bv.Struct(SharedFolderChangeMembersInheritancePolicyType) class SharedFolderChangeMembersManagementPolicyDetails(bb.Struct): @@ -81194,9 +57451,7 @@ class SharedFolderChangeMembersManagementPolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -81204,121 +57459,44 @@ class SharedFolderChangeMembersManagementPolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 members management policy. - - :rtype: sharing.AclUpdatePolicy - """ - 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 members management policy. Might be missing due to historical - data gap. - - :rtype: sharing.AclUpdatePolicy - """ - 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 + # Instance attribute type: sharing.AclUpdatePolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False + # Instance attribute type: sharing.AclUpdatePolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderChangeMembersManagementPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderChangeMembersManagementPolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - SharedFolderChangeMembersManagementPolicyDetails_validator = bv.Struct(SharedFolderChangeMembersManagementPolicyDetails) class SharedFolderChangeMembersManagementPolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderChangeMembersManagementPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderChangeMembersManagementPolicyType(description={!r})'.format( - self._description_value, - ) - SharedFolderChangeMembersManagementPolicyType_validator = bv.Struct(SharedFolderChangeMembersManagementPolicyType) class SharedFolderChangeMembersPolicyDetails(bb.Struct): @@ -81334,9 +57512,7 @@ class SharedFolderChangeMembersPolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -81344,121 +57520,44 @@ class SharedFolderChangeMembersPolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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. + # Instance attribute type: sharing.MemberPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - :rtype: sharing.MemberPolicy - """ - 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: sharing.MemberPolicy - """ - 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 + # Instance attribute type: sharing.MemberPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderChangeMembersPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderChangeMembersPolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - SharedFolderChangeMembersPolicyDetails_validator = bv.Struct(SharedFolderChangeMembersPolicyDetails) class SharedFolderChangeMembersPolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderChangeMembersPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderChangeMembersPolicyType(description={!r})'.format( - self._description_value, - ) - SharedFolderChangeMembersPolicyType_validator = bv.Struct(SharedFolderChangeMembersPolicyType) class SharedFolderCreateDetails(bb.Struct): @@ -81471,99 +57570,44 @@ class SharedFolderCreateDetails(bb.Struct): __slots__ = [ '_target_ns_id_value', - '_target_ns_id_present', ] _has_required_fields = False def __init__(self, target_ns_id=None): - self._target_ns_id_value = None - self._target_ns_id_present = False + self._target_ns_id_value = bb.NOT_SET if target_ns_id is not None: self.target_ns_id = target_ns_id - @property - def target_ns_id(self): - """ - Target namespace ID. Might be missing due to historical data gap. - - :rtype: str - """ - if self._target_ns_id_present: - return self._target_ns_id_value - else: - return None - - @target_ns_id.setter - def target_ns_id(self, val): - if val is None: - del self.target_ns_id - return - val = self._target_ns_id_validator.validate(val) - self._target_ns_id_value = val - self._target_ns_id_present = True - - @target_ns_id.deleter - def target_ns_id(self): - self._target_ns_id_value = None - self._target_ns_id_present = False + # Instance attribute type: str (validator is set below) + target_ns_id = bb.Attribute("target_ns_id", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderCreateDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderCreateDetails(target_ns_id={!r})'.format( - self._target_ns_id_value, - ) - SharedFolderCreateDetails_validator = bv.Struct(SharedFolderCreateDetails) class SharedFolderCreateType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderCreateType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderCreateType(description={!r})'.format( - self._description_value, - ) - SharedFolderCreateType_validator = bv.Struct(SharedFolderCreateType) class SharedFolderDeclineInvitationDetails(bb.Struct): @@ -81582,56 +57626,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderDeclineInvitationDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderDeclineInvitationDetails()' - SharedFolderDeclineInvitationDetails_validator = bv.Struct(SharedFolderDeclineInvitationDetails) class SharedFolderDeclineInvitationType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderDeclineInvitationType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderDeclineInvitationType(description={!r})'.format( - self._description_value, - ) - SharedFolderDeclineInvitationType_validator = bv.Struct(SharedFolderDeclineInvitationType) class SharedFolderMembersInheritancePolicy(bb.Union): @@ -81678,9 +57694,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderMembersInheritancePolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderMembersInheritancePolicy(%r, %r)' % (self._tag, self._value) - SharedFolderMembersInheritancePolicy_validator = bv.Union(SharedFolderMembersInheritancePolicy) class SharedFolderMountDetails(bb.Struct): @@ -81699,56 +57712,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderMountDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderMountDetails()' - SharedFolderMountDetails_validator = bv.Struct(SharedFolderMountDetails) class SharedFolderMountType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderMountType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderMountType(description={!r})'.format( - self._description_value, - ) - SharedFolderMountType_validator = bv.Struct(SharedFolderMountType) class SharedFolderNestDetails(bb.Struct): @@ -81767,13 +57752,9 @@ class SharedFolderNestDetails(bb.Struct): __slots__ = [ '_previous_parent_ns_id_value', - '_previous_parent_ns_id_present', '_new_parent_ns_id_value', - '_new_parent_ns_id_present', '_previous_ns_path_value', - '_previous_ns_path_present', '_new_ns_path_value', - '_new_ns_path_present', ] _has_required_fields = False @@ -81783,14 +57764,10 @@ def __init__(self, new_parent_ns_id=None, previous_ns_path=None, new_ns_path=None): - self._previous_parent_ns_id_value = None - self._previous_parent_ns_id_present = False - self._new_parent_ns_id_value = None - self._new_parent_ns_id_present = False - self._previous_ns_path_value = None - self._previous_ns_path_present = False - self._new_ns_path_value = None - self._new_ns_path_present = False + self._previous_parent_ns_id_value = bb.NOT_SET + self._new_parent_ns_id_value = bb.NOT_SET + self._previous_ns_path_value = bb.NOT_SET + self._new_ns_path_value = bb.NOT_SET if previous_parent_ns_id is not None: self.previous_parent_ns_id = previous_parent_ns_id if new_parent_ns_id is not None: @@ -81800,169 +57777,43 @@ def __init__(self, if new_ns_path is not None: self.new_ns_path = new_ns_path - @property - def previous_parent_ns_id(self): - """ - Previous parent namespace ID. Might be missing due to historical data - gap. + # Instance attribute type: str (validator is set below) + previous_parent_ns_id = bb.Attribute("previous_parent_ns_id", nullable=True) + + # Instance attribute type: str (validator is set below) + new_parent_ns_id = bb.Attribute("new_parent_ns_id", nullable=True) - :rtype: str - """ - if self._previous_parent_ns_id_present: - return self._previous_parent_ns_id_value - else: - return None - - @previous_parent_ns_id.setter - def previous_parent_ns_id(self, val): - if val is None: - del self.previous_parent_ns_id - return - val = self._previous_parent_ns_id_validator.validate(val) - self._previous_parent_ns_id_value = val - self._previous_parent_ns_id_present = True - - @previous_parent_ns_id.deleter - def previous_parent_ns_id(self): - self._previous_parent_ns_id_value = None - self._previous_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 - - @property - def previous_ns_path(self): - """ - Previous namespace path. Might be missing due to historical data gap. - - :rtype: str - """ - if self._previous_ns_path_present: - return self._previous_ns_path_value - else: - return None - - @previous_ns_path.setter - def previous_ns_path(self, val): - if val is None: - del self.previous_ns_path - return - val = self._previous_ns_path_validator.validate(val) - self._previous_ns_path_value = val - self._previous_ns_path_present = True - - @previous_ns_path.deleter - def previous_ns_path(self): - self._previous_ns_path_value = None - self._previous_ns_path_present = False - - @property - def new_ns_path(self): - """ - New namespace path. Might be missing due to historical data gap. - - :rtype: str - """ - if self._new_ns_path_present: - return self._new_ns_path_value - else: - return None - - @new_ns_path.setter - def new_ns_path(self, val): - if val is None: - del self.new_ns_path - return - val = self._new_ns_path_validator.validate(val) - self._new_ns_path_value = val - self._new_ns_path_present = True - - @new_ns_path.deleter - def new_ns_path(self): - self._new_ns_path_value = None - self._new_ns_path_present = False + # Instance attribute type: str (validator is set below) + previous_ns_path = bb.Attribute("previous_ns_path", nullable=True) + + # Instance attribute type: str (validator is set below) + new_ns_path = bb.Attribute("new_ns_path", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderNestDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderNestDetails(previous_parent_ns_id={!r}, new_parent_ns_id={!r}, previous_ns_path={!r}, new_ns_path={!r})'.format( - self._previous_parent_ns_id_value, - self._new_parent_ns_id_value, - self._previous_ns_path_value, - self._new_ns_path_value, - ) - SharedFolderNestDetails_validator = bv.Struct(SharedFolderNestDetails) class SharedFolderNestType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderNestType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderNestType(description={!r})'.format( - self._description_value, - ) - SharedFolderNestType_validator = bv.Struct(SharedFolderNestType) class SharedFolderTransferOwnershipDetails(bb.Struct): @@ -81977,9 +57828,7 @@ class SharedFolderTransferOwnershipDetails(bb.Struct): __slots__ = [ '_previous_owner_email_value', - '_previous_owner_email_present', '_new_owner_email_value', - '_new_owner_email_present', ] _has_required_fields = True @@ -81987,120 +57836,44 @@ class SharedFolderTransferOwnershipDetails(bb.Struct): def __init__(self, new_owner_email=None, previous_owner_email=None): - self._previous_owner_email_value = None - self._previous_owner_email_present = False - self._new_owner_email_value = None - self._new_owner_email_present = False + self._previous_owner_email_value = bb.NOT_SET + self._new_owner_email_value = bb.NOT_SET if previous_owner_email is not None: self.previous_owner_email = previous_owner_email if new_owner_email is not None: self.new_owner_email = new_owner_email - @property - def previous_owner_email(self): - """ - The email address of the previous shared folder owner. - - :rtype: str - """ - if self._previous_owner_email_present: - return self._previous_owner_email_value - else: - return None + # Instance attribute type: str (validator is set below) + previous_owner_email = bb.Attribute("previous_owner_email", nullable=True) - @previous_owner_email.setter - def previous_owner_email(self, val): - if val is None: - del self.previous_owner_email - return - val = self._previous_owner_email_validator.validate(val) - self._previous_owner_email_value = val - self._previous_owner_email_present = True - - @previous_owner_email.deleter - def previous_owner_email(self): - self._previous_owner_email_value = None - self._previous_owner_email_present = False - - @property - def new_owner_email(self): - """ - The email address of the new shared folder owner. - - :rtype: str - """ - if self._new_owner_email_present: - return self._new_owner_email_value - else: - raise AttributeError("missing required field 'new_owner_email'") - - @new_owner_email.setter - def new_owner_email(self, val): - val = self._new_owner_email_validator.validate(val) - self._new_owner_email_value = val - self._new_owner_email_present = True - - @new_owner_email.deleter - def new_owner_email(self): - self._new_owner_email_value = None - self._new_owner_email_present = False + # Instance attribute type: str (validator is set below) + new_owner_email = bb.Attribute("new_owner_email") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderTransferOwnershipDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderTransferOwnershipDetails(new_owner_email={!r}, previous_owner_email={!r})'.format( - self._new_owner_email_value, - self._previous_owner_email_value, - ) - SharedFolderTransferOwnershipDetails_validator = bv.Struct(SharedFolderTransferOwnershipDetails) class SharedFolderTransferOwnershipType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderTransferOwnershipType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderTransferOwnershipType(description={!r})'.format( - self._description_value, - ) - SharedFolderTransferOwnershipType_validator = bv.Struct(SharedFolderTransferOwnershipType) class SharedFolderUnmountDetails(bb.Struct): @@ -82119,56 +57892,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderUnmountDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderUnmountDetails()' - SharedFolderUnmountDetails_validator = bv.Struct(SharedFolderUnmountDetails) class SharedFolderUnmountType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderUnmountType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderUnmountType(description={!r})'.format( - self._description_value, - ) - SharedFolderUnmountType_validator = bv.Struct(SharedFolderUnmountType) class SharedLinkAccessLevel(bb.Union): @@ -82225,9 +57970,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkAccessLevel, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkAccessLevel(%r, %r)' % (self._tag, self._value) - SharedLinkAccessLevel_validator = bv.Union(SharedLinkAccessLevel) class SharedLinkAddExpiryDetails(bb.Struct): @@ -82240,96 +57982,44 @@ class SharedLinkAddExpiryDetails(bb.Struct): __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 + self._new_value_value = bb.NOT_SET if new_value is not None: self.new_value = new_value - @property - def new_value(self): - """ - New shared link expiration date. - - :rtype: datetime.datetime - """ - 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 + # Instance attribute type: datetime.datetime (validator is set below) + new_value = bb.Attribute("new_value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkAddExpiryDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkAddExpiryDetails(new_value={!r})'.format( - self._new_value_value, - ) - SharedLinkAddExpiryDetails_validator = bv.Struct(SharedLinkAddExpiryDetails) class SharedLinkAddExpiryType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkAddExpiryType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkAddExpiryType(description={!r})'.format( - self._description_value, - ) - SharedLinkAddExpiryType_validator = bv.Struct(SharedLinkAddExpiryType) class SharedLinkChangeExpiryDetails(bb.Struct): @@ -82344,9 +58034,7 @@ class SharedLinkChangeExpiryDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = False @@ -82354,125 +58042,44 @@ class SharedLinkChangeExpiryDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 shared link expiration date. Might be missing due to historical data - gap. - - :rtype: datetime.datetime - """ - if self._new_value_present: - return self._new_value_value - else: - return None + # Instance attribute type: datetime.datetime (validator is set below) + new_value = bb.Attribute("new_value", nullable=True) - @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 - - @property - def previous_value(self): - """ - Previous shared link expiration date. Might be missing due to historical - data gap. - - :rtype: datetime.datetime - """ - 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 + # Instance attribute type: datetime.datetime (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkChangeExpiryDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkChangeExpiryDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - SharedLinkChangeExpiryDetails_validator = bv.Struct(SharedLinkChangeExpiryDetails) class SharedLinkChangeExpiryType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkChangeExpiryType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkChangeExpiryType(description={!r})'.format( - self._description_value, - ) - SharedLinkChangeExpiryType_validator = bv.Struct(SharedLinkChangeExpiryType) class SharedLinkChangeVisibilityDetails(bb.Struct): @@ -82487,9 +58094,7 @@ class SharedLinkChangeVisibilityDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -82497,121 +58102,44 @@ class SharedLinkChangeVisibilityDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 shared link visibility. - - :rtype: SharedLinkVisibility - """ - 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 link visibility. Might be missing due to historical data - gap. - - :rtype: SharedLinkVisibility - """ - 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 + # Instance attribute type: SharedLinkVisibility (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False + # Instance attribute type: SharedLinkVisibility (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkChangeVisibilityDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkChangeVisibilityDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - SharedLinkChangeVisibilityDetails_validator = bv.Struct(SharedLinkChangeVisibilityDetails) class SharedLinkChangeVisibilityType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkChangeVisibilityType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkChangeVisibilityType(description={!r})'.format( - self._description_value, - ) - SharedLinkChangeVisibilityType_validator = bv.Struct(SharedLinkChangeVisibilityType) class SharedLinkCopyDetails(bb.Struct): @@ -82624,99 +58152,44 @@ class SharedLinkCopyDetails(bb.Struct): __slots__ = [ '_shared_link_owner_value', - '_shared_link_owner_present', ] _has_required_fields = False def __init__(self, shared_link_owner=None): - self._shared_link_owner_value = None - self._shared_link_owner_present = False + self._shared_link_owner_value = bb.NOT_SET if shared_link_owner is not None: self.shared_link_owner = shared_link_owner - @property - def shared_link_owner(self): - """ - Shared link owner details. Might be missing due to historical data gap. - - :rtype: UserLogInfo - """ - if self._shared_link_owner_present: - return self._shared_link_owner_value - else: - return None - - @shared_link_owner.setter - def shared_link_owner(self, val): - if val is None: - del self.shared_link_owner - return - self._shared_link_owner_validator.validate_type_only(val) - self._shared_link_owner_value = val - self._shared_link_owner_present = True - - @shared_link_owner.deleter - def shared_link_owner(self): - self._shared_link_owner_value = None - self._shared_link_owner_present = False + # Instance attribute type: UserLogInfo (validator is set below) + shared_link_owner = bb.Attribute("shared_link_owner", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkCopyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkCopyDetails(shared_link_owner={!r})'.format( - self._shared_link_owner_value, - ) - SharedLinkCopyDetails_validator = bv.Struct(SharedLinkCopyDetails) class SharedLinkCopyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkCopyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkCopyType(description={!r})'.format( - self._description_value, - ) - SharedLinkCopyType_validator = bv.Struct(SharedLinkCopyType) class SharedLinkCreateDetails(bb.Struct): @@ -82729,100 +58202,44 @@ class SharedLinkCreateDetails(bb.Struct): __slots__ = [ '_shared_link_access_level_value', - '_shared_link_access_level_present', ] _has_required_fields = False def __init__(self, shared_link_access_level=None): - self._shared_link_access_level_value = None - self._shared_link_access_level_present = False + self._shared_link_access_level_value = bb.NOT_SET if shared_link_access_level is not None: self.shared_link_access_level = shared_link_access_level - @property - def shared_link_access_level(self): - """ - Defines who can access the shared link. Might be missing due to - historical data gap. - - :rtype: SharedLinkAccessLevel - """ - if self._shared_link_access_level_present: - return self._shared_link_access_level_value - else: - return None - - @shared_link_access_level.setter - def shared_link_access_level(self, val): - if val is None: - del self.shared_link_access_level - return - self._shared_link_access_level_validator.validate_type_only(val) - self._shared_link_access_level_value = val - self._shared_link_access_level_present = True - - @shared_link_access_level.deleter - def shared_link_access_level(self): - self._shared_link_access_level_value = None - self._shared_link_access_level_present = False + # Instance attribute type: SharedLinkAccessLevel (validator is set below) + shared_link_access_level = bb.Attribute("shared_link_access_level", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkCreateDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkCreateDetails(shared_link_access_level={!r})'.format( - self._shared_link_access_level_value, - ) - SharedLinkCreateDetails_validator = bv.Struct(SharedLinkCreateDetails) class SharedLinkCreateType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkCreateType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkCreateType(description={!r})'.format( - self._description_value, - ) - SharedLinkCreateType_validator = bv.Struct(SharedLinkCreateType) class SharedLinkDisableDetails(bb.Struct): @@ -82835,99 +58252,44 @@ class SharedLinkDisableDetails(bb.Struct): __slots__ = [ '_shared_link_owner_value', - '_shared_link_owner_present', ] _has_required_fields = False def __init__(self, shared_link_owner=None): - self._shared_link_owner_value = None - self._shared_link_owner_present = False + self._shared_link_owner_value = bb.NOT_SET if shared_link_owner is not None: self.shared_link_owner = shared_link_owner - @property - def shared_link_owner(self): - """ - Shared link owner details. Might be missing due to historical data gap. - - :rtype: UserLogInfo - """ - if self._shared_link_owner_present: - return self._shared_link_owner_value - else: - return None - - @shared_link_owner.setter - def shared_link_owner(self, val): - if val is None: - del self.shared_link_owner - return - self._shared_link_owner_validator.validate_type_only(val) - self._shared_link_owner_value = val - self._shared_link_owner_present = True - - @shared_link_owner.deleter - def shared_link_owner(self): - self._shared_link_owner_value = None - self._shared_link_owner_present = False + # Instance attribute type: UserLogInfo (validator is set below) + shared_link_owner = bb.Attribute("shared_link_owner", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkDisableDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkDisableDetails(shared_link_owner={!r})'.format( - self._shared_link_owner_value, - ) - SharedLinkDisableDetails_validator = bv.Struct(SharedLinkDisableDetails) class SharedLinkDisableType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkDisableType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkDisableType(description={!r})'.format( - self._description_value, - ) - SharedLinkDisableType_validator = bv.Struct(SharedLinkDisableType) class SharedLinkDownloadDetails(bb.Struct): @@ -82940,99 +58302,44 @@ class SharedLinkDownloadDetails(bb.Struct): __slots__ = [ '_shared_link_owner_value', - '_shared_link_owner_present', ] _has_required_fields = False def __init__(self, shared_link_owner=None): - self._shared_link_owner_value = None - self._shared_link_owner_present = False + self._shared_link_owner_value = bb.NOT_SET if shared_link_owner is not None: self.shared_link_owner = shared_link_owner - @property - def shared_link_owner(self): - """ - Shared link owner details. Might be missing due to historical data gap. - - :rtype: UserLogInfo - """ - if self._shared_link_owner_present: - return self._shared_link_owner_value - else: - return None - - @shared_link_owner.setter - def shared_link_owner(self, val): - if val is None: - del self.shared_link_owner - return - self._shared_link_owner_validator.validate_type_only(val) - self._shared_link_owner_value = val - self._shared_link_owner_present = True - - @shared_link_owner.deleter - def shared_link_owner(self): - self._shared_link_owner_value = None - self._shared_link_owner_present = False + # Instance attribute type: UserLogInfo (validator is set below) + shared_link_owner = bb.Attribute("shared_link_owner", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkDownloadDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkDownloadDetails(shared_link_owner={!r})'.format( - self._shared_link_owner_value, - ) - SharedLinkDownloadDetails_validator = bv.Struct(SharedLinkDownloadDetails) class SharedLinkDownloadType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkDownloadType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkDownloadType(description={!r})'.format( - self._description_value, - ) - SharedLinkDownloadType_validator = bv.Struct(SharedLinkDownloadType) class SharedLinkRemoveExpiryDetails(bb.Struct): @@ -83045,100 +58352,44 @@ class SharedLinkRemoveExpiryDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', ] _has_required_fields = False def __init__(self, previous_value=None): - self._previous_value_value = None - self._previous_value_present = False + self._previous_value_value = bb.NOT_SET if previous_value is not None: self.previous_value = previous_value - @property - def previous_value(self): - """ - Previous shared link expiration date. Might be missing due to historical - data gap. - - :rtype: datetime.datetime - """ - 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 + # Instance attribute type: datetime.datetime (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkRemoveExpiryDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkRemoveExpiryDetails(previous_value={!r})'.format( - self._previous_value_value, - ) - SharedLinkRemoveExpiryDetails_validator = bv.Struct(SharedLinkRemoveExpiryDetails) class SharedLinkRemoveExpiryType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkRemoveExpiryType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkRemoveExpiryType(description={!r})'.format( - self._description_value, - ) - SharedLinkRemoveExpiryType_validator = bv.Struct(SharedLinkRemoveExpiryType) class SharedLinkSettingsAddExpirationDetails(bb.Struct): @@ -83157,11 +58408,8 @@ class SharedLinkSettingsAddExpirationDetails(bb.Struct): __slots__ = [ '_shared_content_access_level_value', - '_shared_content_access_level_present', '_shared_content_link_value', - '_shared_content_link_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -83170,12 +58418,9 @@ def __init__(self, shared_content_access_level=None, shared_content_link=None, new_value=None): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False - self._shared_content_link_value = None - self._shared_content_link_present = False - self._new_value_value = None - self._new_value_present = False + self._shared_content_access_level_value = bb.NOT_SET + self._shared_content_link_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET if shared_content_access_level is not None: self.shared_content_access_level = shared_content_access_level if shared_content_link is not None: @@ -83183,139 +58428,40 @@ def __init__(self, if new_value is not None: self.new_value = new_value - @property - def shared_content_access_level(self): - """ - Shared content access level. - - :rtype: sharing.AccessLevel - """ - if self._shared_content_access_level_present: - return self._shared_content_access_level_value - else: - raise AttributeError("missing required field 'shared_content_access_level'") - - @shared_content_access_level.setter - def shared_content_access_level(self, val): - self._shared_content_access_level_validator.validate_type_only(val) - self._shared_content_access_level_value = val - self._shared_content_access_level_present = True - - @shared_content_access_level.deleter - def shared_content_access_level(self): - self._shared_content_access_level_value = None - self._shared_content_access_level_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 - - @property - def new_value(self): - """ - New shared content link expiration date. Might be missing due to - historical data gap. - - :rtype: datetime.datetime - """ - if self._new_value_present: - return self._new_value_value - else: - return None + # Instance attribute type: sharing.AccessLevel (validator is set below) + shared_content_access_level = bb.Attribute("shared_content_access_level", user_defined=True) - @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 + # Instance attribute type: str (validator is set below) + shared_content_link = bb.Attribute("shared_content_link", nullable=True) - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False + # Instance attribute type: datetime.datetime (validator is set below) + new_value = bb.Attribute("new_value", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettingsAddExpirationDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkSettingsAddExpirationDetails(shared_content_access_level={!r}, shared_content_link={!r}, new_value={!r})'.format( - self._shared_content_access_level_value, - self._shared_content_link_value, - self._new_value_value, - ) - SharedLinkSettingsAddExpirationDetails_validator = bv.Struct(SharedLinkSettingsAddExpirationDetails) class SharedLinkSettingsAddExpirationType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettingsAddExpirationType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkSettingsAddExpirationType(description={!r})'.format( - self._description_value, - ) - SharedLinkSettingsAddExpirationType_validator = bv.Struct(SharedLinkSettingsAddExpirationType) class SharedLinkSettingsAddPasswordDetails(bb.Struct): @@ -83331,9 +58477,7 @@ class SharedLinkSettingsAddPasswordDetails(bb.Struct): __slots__ = [ '_shared_content_access_level_value', - '_shared_content_access_level_present', '_shared_content_link_value', - '_shared_content_link_present', ] _has_required_fields = True @@ -83341,120 +58485,44 @@ class SharedLinkSettingsAddPasswordDetails(bb.Struct): def __init__(self, shared_content_access_level=None, shared_content_link=None): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False - self._shared_content_link_value = None - self._shared_content_link_present = False + self._shared_content_access_level_value = bb.NOT_SET + self._shared_content_link_value = bb.NOT_SET if shared_content_access_level is not None: self.shared_content_access_level = shared_content_access_level if shared_content_link is not None: self.shared_content_link = shared_content_link - @property - def shared_content_access_level(self): - """ - Shared content access level. + # Instance attribute type: sharing.AccessLevel (validator is set below) + shared_content_access_level = bb.Attribute("shared_content_access_level", user_defined=True) - :rtype: sharing.AccessLevel - """ - if self._shared_content_access_level_present: - return self._shared_content_access_level_value - else: - raise AttributeError("missing required field 'shared_content_access_level'") - - @shared_content_access_level.setter - def shared_content_access_level(self, val): - self._shared_content_access_level_validator.validate_type_only(val) - self._shared_content_access_level_value = val - self._shared_content_access_level_present = True - - @shared_content_access_level.deleter - def shared_content_access_level(self): - self._shared_content_access_level_value = None - self._shared_content_access_level_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 + # Instance attribute type: str (validator is set below) + shared_content_link = bb.Attribute("shared_content_link", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettingsAddPasswordDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkSettingsAddPasswordDetails(shared_content_access_level={!r}, shared_content_link={!r})'.format( - self._shared_content_access_level_value, - self._shared_content_link_value, - ) - SharedLinkSettingsAddPasswordDetails_validator = bv.Struct(SharedLinkSettingsAddPasswordDetails) class SharedLinkSettingsAddPasswordType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettingsAddPasswordType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkSettingsAddPasswordType(description={!r})'.format( - self._description_value, - ) - SharedLinkSettingsAddPasswordType_validator = bv.Struct(SharedLinkSettingsAddPasswordType) class SharedLinkSettingsAllowDownloadDisabledDetails(bb.Struct): @@ -83471,9 +58539,7 @@ class SharedLinkSettingsAllowDownloadDisabledDetails(bb.Struct): __slots__ = [ '_shared_content_access_level_value', - '_shared_content_access_level_present', '_shared_content_link_value', - '_shared_content_link_present', ] _has_required_fields = True @@ -83481,120 +58547,44 @@ class SharedLinkSettingsAllowDownloadDisabledDetails(bb.Struct): def __init__(self, shared_content_access_level=None, shared_content_link=None): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False - self._shared_content_link_value = None - self._shared_content_link_present = False + self._shared_content_access_level_value = bb.NOT_SET + self._shared_content_link_value = bb.NOT_SET if shared_content_access_level is not None: self.shared_content_access_level = shared_content_access_level if shared_content_link is not None: self.shared_content_link = shared_content_link - @property - def shared_content_access_level(self): - """ - Shared content access level. - - :rtype: sharing.AccessLevel - """ - if self._shared_content_access_level_present: - return self._shared_content_access_level_value - else: - raise AttributeError("missing required field 'shared_content_access_level'") - - @shared_content_access_level.setter - def shared_content_access_level(self, val): - self._shared_content_access_level_validator.validate_type_only(val) - self._shared_content_access_level_value = val - self._shared_content_access_level_present = True - - @shared_content_access_level.deleter - def shared_content_access_level(self): - self._shared_content_access_level_value = None - self._shared_content_access_level_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 + # Instance attribute type: sharing.AccessLevel (validator is set below) + shared_content_access_level = bb.Attribute("shared_content_access_level", user_defined=True) - @shared_content_link.deleter - def shared_content_link(self): - self._shared_content_link_value = None - self._shared_content_link_present = False + # Instance attribute type: str (validator is set below) + shared_content_link = bb.Attribute("shared_content_link", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettingsAllowDownloadDisabledDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkSettingsAllowDownloadDisabledDetails(shared_content_access_level={!r}, shared_content_link={!r})'.format( - self._shared_content_access_level_value, - self._shared_content_link_value, - ) - SharedLinkSettingsAllowDownloadDisabledDetails_validator = bv.Struct(SharedLinkSettingsAllowDownloadDisabledDetails) class SharedLinkSettingsAllowDownloadDisabledType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettingsAllowDownloadDisabledType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkSettingsAllowDownloadDisabledType(description={!r})'.format( - self._description_value, - ) - SharedLinkSettingsAllowDownloadDisabledType_validator = bv.Struct(SharedLinkSettingsAllowDownloadDisabledType) class SharedLinkSettingsAllowDownloadEnabledDetails(bb.Struct): @@ -83611,9 +58601,7 @@ class SharedLinkSettingsAllowDownloadEnabledDetails(bb.Struct): __slots__ = [ '_shared_content_access_level_value', - '_shared_content_access_level_present', '_shared_content_link_value', - '_shared_content_link_present', ] _has_required_fields = True @@ -83621,120 +58609,44 @@ class SharedLinkSettingsAllowDownloadEnabledDetails(bb.Struct): def __init__(self, shared_content_access_level=None, shared_content_link=None): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False - self._shared_content_link_value = None - self._shared_content_link_present = False + self._shared_content_access_level_value = bb.NOT_SET + self._shared_content_link_value = bb.NOT_SET if shared_content_access_level is not None: self.shared_content_access_level = shared_content_access_level if shared_content_link is not None: self.shared_content_link = shared_content_link - @property - def shared_content_access_level(self): - """ - Shared content access level. - - :rtype: sharing.AccessLevel - """ - if self._shared_content_access_level_present: - return self._shared_content_access_level_value - else: - raise AttributeError("missing required field 'shared_content_access_level'") - - @shared_content_access_level.setter - def shared_content_access_level(self, val): - self._shared_content_access_level_validator.validate_type_only(val) - self._shared_content_access_level_value = val - self._shared_content_access_level_present = True - - @shared_content_access_level.deleter - def shared_content_access_level(self): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False + # Instance attribute type: sharing.AccessLevel (validator is set below) + shared_content_access_level = bb.Attribute("shared_content_access_level", user_defined=True) - @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 + # Instance attribute type: str (validator is set below) + shared_content_link = bb.Attribute("shared_content_link", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettingsAllowDownloadEnabledDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkSettingsAllowDownloadEnabledDetails(shared_content_access_level={!r}, shared_content_link={!r})'.format( - self._shared_content_access_level_value, - self._shared_content_link_value, - ) - SharedLinkSettingsAllowDownloadEnabledDetails_validator = bv.Struct(SharedLinkSettingsAllowDownloadEnabledDetails) class SharedLinkSettingsAllowDownloadEnabledType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettingsAllowDownloadEnabledType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkSettingsAllowDownloadEnabledType(description={!r})'.format( - self._description_value, - ) - SharedLinkSettingsAllowDownloadEnabledType_validator = bv.Struct(SharedLinkSettingsAllowDownloadEnabledType) class SharedLinkSettingsChangeAudienceDetails(bb.Struct): @@ -83754,13 +58666,9 @@ class SharedLinkSettingsChangeAudienceDetails(bb.Struct): __slots__ = [ '_shared_content_access_level_value', - '_shared_content_access_level_present', '_shared_content_link_value', - '_shared_content_link_present', '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -83770,14 +58678,10 @@ def __init__(self, new_value=None, shared_content_link=None, previous_value=None): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False - self._shared_content_link_value = None - self._shared_content_link_present = False - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False + self._shared_content_access_level_value = bb.NOT_SET + self._shared_content_link_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET if shared_content_access_level is not None: self.shared_content_access_level = shared_content_access_level if shared_content_link is not None: @@ -83787,162 +58691,43 @@ def __init__(self, if previous_value is not None: self.previous_value = previous_value - @property - def shared_content_access_level(self): - """ - Shared content access level. - - :rtype: sharing.AccessLevel - """ - if self._shared_content_access_level_present: - return self._shared_content_access_level_value - else: - raise AttributeError("missing required field 'shared_content_access_level'") - - @shared_content_access_level.setter - def shared_content_access_level(self, val): - self._shared_content_access_level_validator.validate_type_only(val) - self._shared_content_access_level_value = val - self._shared_content_access_level_present = True - - @shared_content_access_level.deleter - def shared_content_access_level(self): - self._shared_content_access_level_value = None - self._shared_content_access_level_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 + # Instance attribute type: sharing.AccessLevel (validator is set below) + shared_content_access_level = bb.Attribute("shared_content_access_level", user_defined=True) - @shared_content_link.deleter - def shared_content_link(self): - self._shared_content_link_value = None - self._shared_content_link_present = False + # Instance attribute type: str (validator is set below) + shared_content_link = bb.Attribute("shared_content_link", nullable=True) - @property - def new_value(self): - """ - New link audience value. - - :rtype: sharing.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 + # Instance attribute type: sharing.LinkAudience (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @property - def previous_value(self): - """ - Previous link audience value. - - :rtype: sharing.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 + # Instance attribute type: sharing.LinkAudience (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettingsChangeAudienceDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkSettingsChangeAudienceDetails(shared_content_access_level={!r}, new_value={!r}, shared_content_link={!r}, previous_value={!r})'.format( - self._shared_content_access_level_value, - self._new_value_value, - self._shared_content_link_value, - self._previous_value_value, - ) - SharedLinkSettingsChangeAudienceDetails_validator = bv.Struct(SharedLinkSettingsChangeAudienceDetails) class SharedLinkSettingsChangeAudienceType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettingsChangeAudienceType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkSettingsChangeAudienceType(description={!r})'.format( - self._description_value, - ) - SharedLinkSettingsChangeAudienceType_validator = bv.Struct(SharedLinkSettingsChangeAudienceType) class SharedLinkSettingsChangeExpirationDetails(bb.Struct): @@ -83965,13 +58750,9 @@ class SharedLinkSettingsChangeExpirationDetails(bb.Struct): __slots__ = [ '_shared_content_access_level_value', - '_shared_content_access_level_present', '_shared_content_link_value', - '_shared_content_link_present', '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -83981,14 +58762,10 @@ def __init__(self, shared_content_link=None, new_value=None, previous_value=None): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False - self._shared_content_link_value = None - self._shared_content_link_present = False - self._new_value_value = None - self._new_value_present = False - self._previous_value_value = None - self._previous_value_present = False + self._shared_content_access_level_value = bb.NOT_SET + self._shared_content_link_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET if shared_content_access_level is not None: self.shared_content_access_level = shared_content_access_level if shared_content_link is not None: @@ -83998,167 +58775,43 @@ def __init__(self, if previous_value is not None: self.previous_value = previous_value - @property - def shared_content_access_level(self): - """ - Shared content access level. - - :rtype: sharing.AccessLevel - """ - if self._shared_content_access_level_present: - return self._shared_content_access_level_value - else: - raise AttributeError("missing required field 'shared_content_access_level'") - - @shared_content_access_level.setter - def shared_content_access_level(self, val): - self._shared_content_access_level_validator.validate_type_only(val) - self._shared_content_access_level_value = val - self._shared_content_access_level_present = True - - @shared_content_access_level.deleter - def shared_content_access_level(self): - self._shared_content_access_level_value = None - self._shared_content_access_level_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 + # Instance attribute type: sharing.AccessLevel (validator is set below) + shared_content_access_level = bb.Attribute("shared_content_access_level", user_defined=True) - @shared_content_link.deleter - def shared_content_link(self): - self._shared_content_link_value = None - self._shared_content_link_present = False + # Instance attribute type: str (validator is set below) + shared_content_link = bb.Attribute("shared_content_link", nullable=True) - @property - def new_value(self): - """ - New shared content link expiration date. Might be missing due to - historical data gap. + # Instance attribute type: datetime.datetime (validator is set below) + new_value = bb.Attribute("new_value", nullable=True) - :rtype: datetime.datetime - """ - 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 - - @property - def previous_value(self): - """ - Previous shared content link expiration date. Might be missing due to - historical data gap. - - :rtype: datetime.datetime - """ - 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 + # Instance attribute type: datetime.datetime (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettingsChangeExpirationDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkSettingsChangeExpirationDetails(shared_content_access_level={!r}, shared_content_link={!r}, new_value={!r}, previous_value={!r})'.format( - self._shared_content_access_level_value, - self._shared_content_link_value, - self._new_value_value, - self._previous_value_value, - ) - SharedLinkSettingsChangeExpirationDetails_validator = bv.Struct(SharedLinkSettingsChangeExpirationDetails) class SharedLinkSettingsChangeExpirationType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettingsChangeExpirationType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkSettingsChangeExpirationType(description={!r})'.format( - self._description_value, - ) - SharedLinkSettingsChangeExpirationType_validator = bv.Struct(SharedLinkSettingsChangeExpirationType) class SharedLinkSettingsChangePasswordDetails(bb.Struct): @@ -84174,9 +58827,7 @@ class SharedLinkSettingsChangePasswordDetails(bb.Struct): __slots__ = [ '_shared_content_access_level_value', - '_shared_content_access_level_present', '_shared_content_link_value', - '_shared_content_link_present', ] _has_required_fields = True @@ -84184,120 +58835,44 @@ class SharedLinkSettingsChangePasswordDetails(bb.Struct): def __init__(self, shared_content_access_level=None, shared_content_link=None): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False - self._shared_content_link_value = None - self._shared_content_link_present = False + self._shared_content_access_level_value = bb.NOT_SET + self._shared_content_link_value = bb.NOT_SET if shared_content_access_level is not None: self.shared_content_access_level = shared_content_access_level if shared_content_link is not None: self.shared_content_link = shared_content_link - @property - def shared_content_access_level(self): - """ - Shared content access level. - - :rtype: sharing.AccessLevel - """ - if self._shared_content_access_level_present: - return self._shared_content_access_level_value - else: - raise AttributeError("missing required field 'shared_content_access_level'") - - @shared_content_access_level.setter - def shared_content_access_level(self, val): - self._shared_content_access_level_validator.validate_type_only(val) - self._shared_content_access_level_value = val - self._shared_content_access_level_present = True - - @shared_content_access_level.deleter - def shared_content_access_level(self): - self._shared_content_access_level_value = None - self._shared_content_access_level_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 + # Instance attribute type: sharing.AccessLevel (validator is set below) + shared_content_access_level = bb.Attribute("shared_content_access_level", user_defined=True) - @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 + # Instance attribute type: str (validator is set below) + shared_content_link = bb.Attribute("shared_content_link", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettingsChangePasswordDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkSettingsChangePasswordDetails(shared_content_access_level={!r}, shared_content_link={!r})'.format( - self._shared_content_access_level_value, - self._shared_content_link_value, - ) - SharedLinkSettingsChangePasswordDetails_validator = bv.Struct(SharedLinkSettingsChangePasswordDetails) class SharedLinkSettingsChangePasswordType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettingsChangePasswordType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkSettingsChangePasswordType(description={!r})'.format( - self._description_value, - ) - SharedLinkSettingsChangePasswordType_validator = bv.Struct(SharedLinkSettingsChangePasswordType) class SharedLinkSettingsRemoveExpirationDetails(bb.Struct): @@ -84317,11 +58892,8 @@ class SharedLinkSettingsRemoveExpirationDetails(bb.Struct): __slots__ = [ '_shared_content_access_level_value', - '_shared_content_access_level_present', '_shared_content_link_value', - '_shared_content_link_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -84330,12 +58902,9 @@ def __init__(self, shared_content_access_level=None, shared_content_link=None, previous_value=None): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False - self._shared_content_link_value = None - self._shared_content_link_present = False - self._previous_value_value = None - self._previous_value_present = False + self._shared_content_access_level_value = bb.NOT_SET + self._shared_content_link_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET if shared_content_access_level is not None: self.shared_content_access_level = shared_content_access_level if shared_content_link is not None: @@ -84343,139 +58912,40 @@ def __init__(self, if previous_value is not None: self.previous_value = previous_value - @property - def shared_content_access_level(self): - """ - Shared content access level. - - :rtype: sharing.AccessLevel - """ - if self._shared_content_access_level_present: - return self._shared_content_access_level_value - else: - raise AttributeError("missing required field 'shared_content_access_level'") - - @shared_content_access_level.setter - def shared_content_access_level(self, val): - self._shared_content_access_level_validator.validate_type_only(val) - self._shared_content_access_level_value = val - self._shared_content_access_level_present = True - - @shared_content_access_level.deleter - def shared_content_access_level(self): - self._shared_content_access_level_value = None - self._shared_content_access_level_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 + # Instance attribute type: sharing.AccessLevel (validator is set below) + shared_content_access_level = bb.Attribute("shared_content_access_level", user_defined=True) - @property - def previous_value(self): - """ - Previous shared link expiration date. Might be missing due to historical - data gap. - - :rtype: datetime.datetime - """ - if self._previous_value_present: - return self._previous_value_value - else: - return None + # Instance attribute type: str (validator is set below) + shared_content_link = bb.Attribute("shared_content_link", nullable=True) - @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 + # Instance attribute type: datetime.datetime (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettingsRemoveExpirationDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkSettingsRemoveExpirationDetails(shared_content_access_level={!r}, shared_content_link={!r}, previous_value={!r})'.format( - self._shared_content_access_level_value, - self._shared_content_link_value, - self._previous_value_value, - ) - SharedLinkSettingsRemoveExpirationDetails_validator = bv.Struct(SharedLinkSettingsRemoveExpirationDetails) class SharedLinkSettingsRemoveExpirationType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettingsRemoveExpirationType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkSettingsRemoveExpirationType(description={!r})'.format( - self._description_value, - ) - SharedLinkSettingsRemoveExpirationType_validator = bv.Struct(SharedLinkSettingsRemoveExpirationType) class SharedLinkSettingsRemovePasswordDetails(bb.Struct): @@ -84491,9 +58961,7 @@ class SharedLinkSettingsRemovePasswordDetails(bb.Struct): __slots__ = [ '_shared_content_access_level_value', - '_shared_content_access_level_present', '_shared_content_link_value', - '_shared_content_link_present', ] _has_required_fields = True @@ -84501,120 +58969,44 @@ class SharedLinkSettingsRemovePasswordDetails(bb.Struct): def __init__(self, shared_content_access_level=None, shared_content_link=None): - self._shared_content_access_level_value = None - self._shared_content_access_level_present = False - self._shared_content_link_value = None - self._shared_content_link_present = False + self._shared_content_access_level_value = bb.NOT_SET + self._shared_content_link_value = bb.NOT_SET if shared_content_access_level is not None: self.shared_content_access_level = shared_content_access_level if shared_content_link is not None: self.shared_content_link = shared_content_link - @property - def shared_content_access_level(self): - """ - Shared content access level. - - :rtype: sharing.AccessLevel - """ - if self._shared_content_access_level_present: - return self._shared_content_access_level_value - else: - raise AttributeError("missing required field 'shared_content_access_level'") - - @shared_content_access_level.setter - def shared_content_access_level(self, val): - self._shared_content_access_level_validator.validate_type_only(val) - self._shared_content_access_level_value = val - self._shared_content_access_level_present = True - - @shared_content_access_level.deleter - def shared_content_access_level(self): - self._shared_content_access_level_value = None - self._shared_content_access_level_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 + # Instance attribute type: sharing.AccessLevel (validator is set below) + shared_content_access_level = bb.Attribute("shared_content_access_level", user_defined=True) - @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 + # Instance attribute type: str (validator is set below) + shared_content_link = bb.Attribute("shared_content_link", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettingsRemovePasswordDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkSettingsRemovePasswordDetails(shared_content_access_level={!r}, shared_content_link={!r})'.format( - self._shared_content_access_level_value, - self._shared_content_link_value, - ) - SharedLinkSettingsRemovePasswordDetails_validator = bv.Struct(SharedLinkSettingsRemovePasswordDetails) class SharedLinkSettingsRemovePasswordType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettingsRemovePasswordType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkSettingsRemovePasswordType(description={!r})'.format( - self._description_value, - ) - SharedLinkSettingsRemovePasswordType_validator = bv.Struct(SharedLinkSettingsRemovePasswordType) class SharedLinkShareDetails(bb.Struct): @@ -84629,9 +59021,7 @@ class SharedLinkShareDetails(bb.Struct): __slots__ = [ '_shared_link_owner_value', - '_shared_link_owner_present', '_external_users_value', - '_external_users_present', ] _has_required_fields = False @@ -84639,123 +59029,44 @@ class SharedLinkShareDetails(bb.Struct): def __init__(self, shared_link_owner=None, external_users=None): - self._shared_link_owner_value = None - self._shared_link_owner_present = False - self._external_users_value = None - self._external_users_present = False + self._shared_link_owner_value = bb.NOT_SET + self._external_users_value = bb.NOT_SET if shared_link_owner is not None: self.shared_link_owner = shared_link_owner if external_users is not None: self.external_users = external_users - @property - def shared_link_owner(self): - """ - Shared link owner details. Might be missing due to historical data gap. - - :rtype: UserLogInfo - """ - if self._shared_link_owner_present: - return self._shared_link_owner_value - else: - return None - - @shared_link_owner.setter - def shared_link_owner(self, val): - if val is None: - del self.shared_link_owner - return - self._shared_link_owner_validator.validate_type_only(val) - self._shared_link_owner_value = val - self._shared_link_owner_present = True - - @shared_link_owner.deleter - def shared_link_owner(self): - self._shared_link_owner_value = None - self._shared_link_owner_present = False - - @property - def external_users(self): - """ - Users without a Dropbox account that were added as shared link audience. - - :rtype: list of [ExternalUserLogInfo] - """ - if self._external_users_present: - return self._external_users_value - else: - return None - - @external_users.setter - def external_users(self, val): - if val is None: - del self.external_users - return - val = self._external_users_validator.validate(val) - self._external_users_value = val - self._external_users_present = True + # Instance attribute type: UserLogInfo (validator is set below) + shared_link_owner = bb.Attribute("shared_link_owner", nullable=True, user_defined=True) - @external_users.deleter - def external_users(self): - self._external_users_value = None - self._external_users_present = False + # Instance attribute type: list of [ExternalUserLogInfo] (validator is set below) + external_users = bb.Attribute("external_users", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkShareDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkShareDetails(shared_link_owner={!r}, external_users={!r})'.format( - self._shared_link_owner_value, - self._external_users_value, - ) - SharedLinkShareDetails_validator = bv.Struct(SharedLinkShareDetails) class SharedLinkShareType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkShareType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkShareType(description={!r})'.format( - self._description_value, - ) - SharedLinkShareType_validator = bv.Struct(SharedLinkShareType) class SharedLinkViewDetails(bb.Struct): @@ -84768,99 +59079,44 @@ class SharedLinkViewDetails(bb.Struct): __slots__ = [ '_shared_link_owner_value', - '_shared_link_owner_present', ] _has_required_fields = False def __init__(self, shared_link_owner=None): - self._shared_link_owner_value = None - self._shared_link_owner_present = False + self._shared_link_owner_value = bb.NOT_SET if shared_link_owner is not None: self.shared_link_owner = shared_link_owner - @property - def shared_link_owner(self): - """ - Shared link owner details. Might be missing due to historical data gap. - - :rtype: UserLogInfo - """ - if self._shared_link_owner_present: - return self._shared_link_owner_value - else: - return None - - @shared_link_owner.setter - def shared_link_owner(self, val): - if val is None: - del self.shared_link_owner - return - self._shared_link_owner_validator.validate_type_only(val) - self._shared_link_owner_value = val - self._shared_link_owner_present = True - - @shared_link_owner.deleter - def shared_link_owner(self): - self._shared_link_owner_value = None - self._shared_link_owner_present = False + # Instance attribute type: UserLogInfo (validator is set below) + shared_link_owner = bb.Attribute("shared_link_owner", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkViewDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkViewDetails(shared_link_owner={!r})'.format( - self._shared_link_owner_value, - ) - SharedLinkViewDetails_validator = bv.Struct(SharedLinkViewDetails) class SharedLinkViewType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkViewType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkViewType(description={!r})'.format( - self._description_value, - ) - SharedLinkViewType_validator = bv.Struct(SharedLinkViewType) class SharedLinkVisibility(bb.Union): @@ -84927,9 +59183,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkVisibility, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkVisibility(%r, %r)' % (self._tag, self._value) - SharedLinkVisibility_validator = bv.Union(SharedLinkVisibility) class SharedNoteOpenedDetails(bb.Struct): @@ -84948,56 +59201,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedNoteOpenedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedNoteOpenedDetails()' - SharedNoteOpenedDetails_validator = bv.Struct(SharedNoteOpenedDetails) class SharedNoteOpenedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedNoteOpenedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedNoteOpenedType(description={!r})'.format( - self._description_value, - ) - SharedNoteOpenedType_validator = bv.Struct(SharedNoteOpenedType) class SharingChangeFolderJoinPolicyDetails(bb.Struct): @@ -85012,9 +59237,7 @@ class SharingChangeFolderJoinPolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -85022,121 +59245,44 @@ class SharingChangeFolderJoinPolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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'") + # Instance attribute type: SharingFolderJoinPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @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 + # Instance attribute type: SharingFolderJoinPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharingChangeFolderJoinPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 SharingChangeFolderJoinPolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharingChangeFolderJoinPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharingChangeFolderJoinPolicyType(description={!r})'.format( - self._description_value, - ) - SharingChangeFolderJoinPolicyType_validator = bv.Struct(SharingChangeFolderJoinPolicyType) class SharingChangeLinkPolicyDetails(bb.Struct): @@ -85153,9 +59299,7 @@ class SharingChangeLinkPolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -85163,121 +59307,44 @@ class SharingChangeLinkPolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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'") + # Instance attribute type: SharingLinkPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @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 + # Instance attribute type: SharingLinkPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharingChangeLinkPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 SharingChangeLinkPolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharingChangeLinkPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharingChangeLinkPolicyType(description={!r})'.format( - self._description_value, - ) - SharingChangeLinkPolicyType_validator = bv.Struct(SharingChangeLinkPolicyType) class SharingChangeMemberPolicyDetails(bb.Struct): @@ -85292,9 +59359,7 @@ class SharingChangeMemberPolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -85302,121 +59367,44 @@ class SharingChangeMemberPolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: SharingMemberPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False + # Instance attribute type: SharingMemberPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharingChangeMemberPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 SharingChangeMemberPolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharingChangeMemberPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharingChangeMemberPolicyType(description={!r})'.format( - self._description_value, - ) - SharingChangeMemberPolicyType_validator = bv.Struct(SharingChangeMemberPolicyType) class SharingFolderJoinPolicy(bb.Union): @@ -85464,9 +59452,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharingFolderJoinPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharingFolderJoinPolicy(%r, %r)' % (self._tag, self._value) - SharingFolderJoinPolicy_validator = bv.Union(SharingFolderJoinPolicy) class SharingLinkPolicy(bb.Union): @@ -85523,9 +59508,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharingLinkPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharingLinkPolicy(%r, %r)' % (self._tag, self._value) - SharingLinkPolicy_validator = bv.Union(SharingLinkPolicy) class SharingMemberPolicy(bb.Union): @@ -85582,9 +59564,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharingMemberPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharingMemberPolicy(%r, %r)' % (self._tag, self._value) - SharingMemberPolicy_validator = bv.Union(SharingMemberPolicy) class ShmodelDisableDownloadsDetails(bb.Struct): @@ -85597,99 +59576,44 @@ class ShmodelDisableDownloadsDetails(bb.Struct): __slots__ = [ '_shared_link_owner_value', - '_shared_link_owner_present', ] _has_required_fields = False def __init__(self, shared_link_owner=None): - self._shared_link_owner_value = None - self._shared_link_owner_present = False + self._shared_link_owner_value = bb.NOT_SET if shared_link_owner is not None: self.shared_link_owner = shared_link_owner - @property - def shared_link_owner(self): - """ - Shared link owner details. Might be missing due to historical data gap. - - :rtype: UserLogInfo - """ - if self._shared_link_owner_present: - return self._shared_link_owner_value - else: - return None - - @shared_link_owner.setter - def shared_link_owner(self, val): - if val is None: - del self.shared_link_owner - return - self._shared_link_owner_validator.validate_type_only(val) - self._shared_link_owner_value = val - self._shared_link_owner_present = True - - @shared_link_owner.deleter - def shared_link_owner(self): - self._shared_link_owner_value = None - self._shared_link_owner_present = False + # Instance attribute type: UserLogInfo (validator is set below) + shared_link_owner = bb.Attribute("shared_link_owner", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShmodelDisableDownloadsDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShmodelDisableDownloadsDetails(shared_link_owner={!r})'.format( - self._shared_link_owner_value, - ) - ShmodelDisableDownloadsDetails_validator = bv.Struct(ShmodelDisableDownloadsDetails) class ShmodelDisableDownloadsType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShmodelDisableDownloadsType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShmodelDisableDownloadsType(description={!r})'.format( - self._description_value, - ) - ShmodelDisableDownloadsType_validator = bv.Struct(ShmodelDisableDownloadsType) class ShmodelEnableDownloadsDetails(bb.Struct): @@ -85702,99 +59626,44 @@ class ShmodelEnableDownloadsDetails(bb.Struct): __slots__ = [ '_shared_link_owner_value', - '_shared_link_owner_present', ] _has_required_fields = False def __init__(self, shared_link_owner=None): - self._shared_link_owner_value = None - self._shared_link_owner_present = False + self._shared_link_owner_value = bb.NOT_SET if shared_link_owner is not None: self.shared_link_owner = shared_link_owner - @property - def shared_link_owner(self): - """ - Shared link owner details. Might be missing due to historical data gap. - - :rtype: UserLogInfo - """ - if self._shared_link_owner_present: - return self._shared_link_owner_value - else: - return None - - @shared_link_owner.setter - def shared_link_owner(self, val): - if val is None: - del self.shared_link_owner - return - self._shared_link_owner_validator.validate_type_only(val) - self._shared_link_owner_value = val - self._shared_link_owner_present = True - - @shared_link_owner.deleter - def shared_link_owner(self): - self._shared_link_owner_value = None - self._shared_link_owner_present = False + # Instance attribute type: UserLogInfo (validator is set below) + shared_link_owner = bb.Attribute("shared_link_owner", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShmodelEnableDownloadsDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShmodelEnableDownloadsDetails(shared_link_owner={!r})'.format( - self._shared_link_owner_value, - ) - ShmodelEnableDownloadsDetails_validator = bv.Struct(ShmodelEnableDownloadsDetails) class ShmodelEnableDownloadsType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShmodelEnableDownloadsType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShmodelEnableDownloadsType(description={!r})'.format( - self._description_value, - ) - ShmodelEnableDownloadsType_validator = bv.Struct(ShmodelEnableDownloadsType) class ShmodelGroupShareDetails(bb.Struct): @@ -85813,56 +59682,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShmodelGroupShareDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShmodelGroupShareDetails()' - ShmodelGroupShareDetails_validator = bv.Struct(ShmodelGroupShareDetails) class ShmodelGroupShareType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShmodelGroupShareType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShmodelGroupShareType(description={!r})'.format( - self._description_value, - ) - ShmodelGroupShareType_validator = bv.Struct(ShmodelGroupShareType) class ShowcaseAccessGrantedDetails(bb.Struct): @@ -85875,96 +59716,44 @@ class ShowcaseAccessGrantedDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseAccessGrantedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseAccessGrantedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - ShowcaseAccessGrantedDetails_validator = bv.Struct(ShowcaseAccessGrantedDetails) class ShowcaseAccessGrantedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseAccessGrantedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseAccessGrantedType(description={!r})'.format( - self._description_value, - ) - ShowcaseAccessGrantedType_validator = bv.Struct(ShowcaseAccessGrantedType) class ShowcaseAddMemberDetails(bb.Struct): @@ -85976,96 +59765,44 @@ class ShowcaseAddMemberDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseAddMemberDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseAddMemberDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - ShowcaseAddMemberDetails_validator = bv.Struct(ShowcaseAddMemberDetails) class ShowcaseAddMemberType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseAddMemberType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseAddMemberType(description={!r})'.format( - self._description_value, - ) - ShowcaseAddMemberType_validator = bv.Struct(ShowcaseAddMemberType) class ShowcaseArchivedDetails(bb.Struct): @@ -86077,96 +59814,44 @@ class ShowcaseArchivedDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseArchivedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseArchivedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - ShowcaseArchivedDetails_validator = bv.Struct(ShowcaseArchivedDetails) class ShowcaseArchivedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseArchivedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseArchivedType(description={!r})'.format( - self._description_value, - ) - ShowcaseArchivedType_validator = bv.Struct(ShowcaseArchivedType) class ShowcaseChangeDownloadPolicyDetails(bb.Struct): @@ -86181,9 +59866,7 @@ class ShowcaseChangeDownloadPolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -86191,117 +59874,44 @@ class ShowcaseChangeDownloadPolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 Showcase download policy. + # Instance attribute type: ShowcaseDownloadPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - :rtype: ShowcaseDownloadPolicy - """ - 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 Showcase download policy. - - :rtype: ShowcaseDownloadPolicy - """ - 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 + # Instance attribute type: ShowcaseDownloadPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseChangeDownloadPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseChangeDownloadPolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - ShowcaseChangeDownloadPolicyDetails_validator = bv.Struct(ShowcaseChangeDownloadPolicyDetails) class ShowcaseChangeDownloadPolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseChangeDownloadPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseChangeDownloadPolicyType(description={!r})'.format( - self._description_value, - ) - ShowcaseChangeDownloadPolicyType_validator = bv.Struct(ShowcaseChangeDownloadPolicyType) class ShowcaseChangeEnabledPolicyDetails(bb.Struct): @@ -86316,9 +59926,7 @@ class ShowcaseChangeEnabledPolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -86326,117 +59934,44 @@ class ShowcaseChangeEnabledPolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 Showcase policy. - - :rtype: ShowcaseEnabledPolicy - """ - 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 + # Instance attribute type: ShowcaseEnabledPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @property - def previous_value(self): - """ - Previous Dropbox Showcase policy. - - :rtype: ShowcaseEnabledPolicy - """ - 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 + # Instance attribute type: ShowcaseEnabledPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseChangeEnabledPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseChangeEnabledPolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - ShowcaseChangeEnabledPolicyDetails_validator = bv.Struct(ShowcaseChangeEnabledPolicyDetails) class ShowcaseChangeEnabledPolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseChangeEnabledPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseChangeEnabledPolicyType(description={!r})'.format( - self._description_value, - ) - ShowcaseChangeEnabledPolicyType_validator = bv.Struct(ShowcaseChangeEnabledPolicyType) class ShowcaseChangeExternalSharingPolicyDetails(bb.Struct): @@ -86451,9 +59986,7 @@ class ShowcaseChangeExternalSharingPolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -86461,117 +59994,44 @@ class ShowcaseChangeExternalSharingPolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 Showcase external sharing policy. + # Instance attribute type: ShowcaseExternalSharingPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - :rtype: ShowcaseExternalSharingPolicy - """ - 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 Showcase external sharing policy. - - :rtype: ShowcaseExternalSharingPolicy - """ - 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 + # Instance attribute type: ShowcaseExternalSharingPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseChangeExternalSharingPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseChangeExternalSharingPolicyDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - ShowcaseChangeExternalSharingPolicyDetails_validator = bv.Struct(ShowcaseChangeExternalSharingPolicyDetails) class ShowcaseChangeExternalSharingPolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseChangeExternalSharingPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseChangeExternalSharingPolicyType(description={!r})'.format( - self._description_value, - ) - ShowcaseChangeExternalSharingPolicyType_validator = bv.Struct(ShowcaseChangeExternalSharingPolicyType) class ShowcaseCreatedDetails(bb.Struct): @@ -86583,96 +60043,44 @@ class ShowcaseCreatedDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseCreatedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseCreatedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - ShowcaseCreatedDetails_validator = bv.Struct(ShowcaseCreatedDetails) class ShowcaseCreatedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseCreatedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseCreatedType(description={!r})'.format( - self._description_value, - ) - ShowcaseCreatedType_validator = bv.Struct(ShowcaseCreatedType) class ShowcaseDeleteCommentDetails(bb.Struct): @@ -86686,9 +60094,7 @@ class ShowcaseDeleteCommentDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_comment_text_value', - '_comment_text_present', ] _has_required_fields = True @@ -86696,120 +60102,44 @@ class ShowcaseDeleteCommentDetails(bb.Struct): 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 + self._event_uuid_value = bb.NOT_SET + self._comment_text_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - @event_uuid.deleter - def event_uuid(self): - self._event_uuid_value = None - self._event_uuid_present = False - - @property - def comment_text(self): - """ - Comment text. - - :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 + # Instance attribute type: str (validator is set below) + comment_text = bb.Attribute("comment_text", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseDeleteCommentDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseDeleteCommentDetails(event_uuid={!r}, comment_text={!r})'.format( - self._event_uuid_value, - self._comment_text_value, - ) - ShowcaseDeleteCommentDetails_validator = bv.Struct(ShowcaseDeleteCommentDetails) class ShowcaseDeleteCommentType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseDeleteCommentType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseDeleteCommentType(description={!r})'.format( - self._description_value, - ) - ShowcaseDeleteCommentType_validator = bv.Struct(ShowcaseDeleteCommentType) class ShowcaseDocumentLogInfo(bb.Struct): @@ -86823,9 +60153,7 @@ class ShowcaseDocumentLogInfo(bb.Struct): __slots__ = [ '_showcase_id_value', - '_showcase_id_present', '_showcase_title_value', - '_showcase_title_present', ] _has_required_fields = True @@ -86833,70 +60161,22 @@ class ShowcaseDocumentLogInfo(bb.Struct): def __init__(self, showcase_id=None, showcase_title=None): - self._showcase_id_value = None - self._showcase_id_present = False - self._showcase_title_value = None - self._showcase_title_present = False + self._showcase_id_value = bb.NOT_SET + self._showcase_title_value = bb.NOT_SET if showcase_id is not None: self.showcase_id = showcase_id if showcase_title is not None: self.showcase_title = showcase_title - @property - def showcase_id(self): - """ - Showcase document Id. - - :rtype: str - """ - if self._showcase_id_present: - return self._showcase_id_value - else: - raise AttributeError("missing required field 'showcase_id'") + # Instance attribute type: str (validator is set below) + showcase_id = bb.Attribute("showcase_id") - @showcase_id.setter - def showcase_id(self, val): - val = self._showcase_id_validator.validate(val) - self._showcase_id_value = val - self._showcase_id_present = True - - @showcase_id.deleter - def showcase_id(self): - self._showcase_id_value = None - self._showcase_id_present = False - - @property - def showcase_title(self): - """ - Showcase document title. - - :rtype: str - """ - if self._showcase_title_present: - return self._showcase_title_value - else: - raise AttributeError("missing required field 'showcase_title'") - - @showcase_title.setter - def showcase_title(self, val): - val = self._showcase_title_validator.validate(val) - self._showcase_title_value = val - self._showcase_title_present = True - - @showcase_title.deleter - def showcase_title(self): - self._showcase_title_value = None - self._showcase_title_present = False + # Instance attribute type: str (validator is set below) + showcase_title = bb.Attribute("showcase_title") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseDocumentLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseDocumentLogInfo(showcase_id={!r}, showcase_title={!r})'.format( - self._showcase_id_value, - self._showcase_title_value, - ) - ShowcaseDocumentLogInfo_validator = bv.Struct(ShowcaseDocumentLogInfo) class ShowcaseDownloadPolicy(bb.Union): @@ -86944,9 +60224,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseDownloadPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseDownloadPolicy(%r, %r)' % (self._tag, self._value) - ShowcaseDownloadPolicy_validator = bv.Union(ShowcaseDownloadPolicy) class ShowcaseEditCommentDetails(bb.Struct): @@ -86960,9 +60237,7 @@ class ShowcaseEditCommentDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_comment_text_value', - '_comment_text_present', ] _has_required_fields = True @@ -86970,120 +60245,44 @@ class ShowcaseEditCommentDetails(bb.Struct): 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 + self._event_uuid_value = bb.NOT_SET + self._comment_text_value = bb.NOT_SET 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. - - :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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - @comment_text.deleter - def comment_text(self): - self._comment_text_value = None - self._comment_text_present = False + # Instance attribute type: str (validator is set below) + comment_text = bb.Attribute("comment_text", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseEditCommentDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseEditCommentDetails(event_uuid={!r}, comment_text={!r})'.format( - self._event_uuid_value, - self._comment_text_value, - ) - ShowcaseEditCommentDetails_validator = bv.Struct(ShowcaseEditCommentDetails) class ShowcaseEditCommentType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseEditCommentType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseEditCommentType(description={!r})'.format( - self._description_value, - ) - ShowcaseEditCommentType_validator = bv.Struct(ShowcaseEditCommentType) class ShowcaseEditedDetails(bb.Struct): @@ -87095,96 +60294,44 @@ class ShowcaseEditedDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseEditedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseEditedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - ShowcaseEditedDetails_validator = bv.Struct(ShowcaseEditedDetails) class ShowcaseEditedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseEditedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseEditedType(description={!r})'.format( - self._description_value, - ) - ShowcaseEditedType_validator = bv.Struct(ShowcaseEditedType) class ShowcaseEnabledPolicy(bb.Union): @@ -87231,9 +60378,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseEnabledPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseEnabledPolicy(%r, %r)' % (self._tag, self._value) - ShowcaseEnabledPolicy_validator = bv.Union(ShowcaseEnabledPolicy) class ShowcaseExternalSharingPolicy(bb.Union): @@ -87280,9 +60424,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseExternalSharingPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseExternalSharingPolicy(%r, %r)' % (self._tag, self._value) - ShowcaseExternalSharingPolicy_validator = bv.Union(ShowcaseExternalSharingPolicy) class ShowcaseFileAddedDetails(bb.Struct): @@ -87294,96 +60435,44 @@ class ShowcaseFileAddedDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseFileAddedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseFileAddedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - ShowcaseFileAddedDetails_validator = bv.Struct(ShowcaseFileAddedDetails) class ShowcaseFileAddedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseFileAddedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseFileAddedType(description={!r})'.format( - self._description_value, - ) - ShowcaseFileAddedType_validator = bv.Struct(ShowcaseFileAddedType) class ShowcaseFileDownloadDetails(bb.Struct): @@ -87398,9 +60487,7 @@ class ShowcaseFileDownloadDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_download_type_value', - '_download_type_present', ] _has_required_fields = True @@ -87408,117 +60495,44 @@ class ShowcaseFileDownloadDetails(bb.Struct): def __init__(self, event_uuid=None, download_type=None): - self._event_uuid_value = None - self._event_uuid_present = False - self._download_type_value = None - self._download_type_present = False + self._event_uuid_value = bb.NOT_SET + self._download_type_value = bb.NOT_SET if event_uuid is not None: self.event_uuid = event_uuid if download_type is not None: self.download_type = download_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 download_type(self): - """ - Showcase download type. - - :rtype: str - """ - if self._download_type_present: - return self._download_type_value - else: - raise AttributeError("missing required field 'download_type'") + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - @download_type.setter - def download_type(self, val): - val = self._download_type_validator.validate(val) - self._download_type_value = val - self._download_type_present = True - - @download_type.deleter - def download_type(self): - self._download_type_value = None - self._download_type_present = False + # Instance attribute type: str (validator is set below) + download_type = bb.Attribute("download_type") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseFileDownloadDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseFileDownloadDetails(event_uuid={!r}, download_type={!r})'.format( - self._event_uuid_value, - self._download_type_value, - ) - ShowcaseFileDownloadDetails_validator = bv.Struct(ShowcaseFileDownloadDetails) class ShowcaseFileDownloadType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseFileDownloadType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseFileDownloadType(description={!r})'.format( - self._description_value, - ) - ShowcaseFileDownloadType_validator = bv.Struct(ShowcaseFileDownloadType) class ShowcaseFileRemovedDetails(bb.Struct): @@ -87531,96 +60545,44 @@ class ShowcaseFileRemovedDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseFileRemovedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseFileRemovedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - ShowcaseFileRemovedDetails_validator = bv.Struct(ShowcaseFileRemovedDetails) class ShowcaseFileRemovedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseFileRemovedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseFileRemovedType(description={!r})'.format( - self._description_value, - ) - ShowcaseFileRemovedType_validator = bv.Struct(ShowcaseFileRemovedType) class ShowcaseFileViewDetails(bb.Struct): @@ -87632,96 +60594,44 @@ class ShowcaseFileViewDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseFileViewDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseFileViewDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - ShowcaseFileViewDetails_validator = bv.Struct(ShowcaseFileViewDetails) class ShowcaseFileViewType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseFileViewType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseFileViewType(description={!r})'.format( - self._description_value, - ) - ShowcaseFileViewType_validator = bv.Struct(ShowcaseFileViewType) class ShowcasePermanentlyDeletedDetails(bb.Struct): @@ -87734,96 +60644,44 @@ class ShowcasePermanentlyDeletedDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcasePermanentlyDeletedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcasePermanentlyDeletedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - ShowcasePermanentlyDeletedDetails_validator = bv.Struct(ShowcasePermanentlyDeletedDetails) class ShowcasePermanentlyDeletedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcasePermanentlyDeletedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcasePermanentlyDeletedType(description={!r})'.format( - self._description_value, - ) - ShowcasePermanentlyDeletedType_validator = bv.Struct(ShowcasePermanentlyDeletedType) class ShowcasePostCommentDetails(bb.Struct): @@ -87837,9 +60695,7 @@ class ShowcasePostCommentDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_comment_text_value', - '_comment_text_present', ] _has_required_fields = True @@ -87847,120 +60703,44 @@ class ShowcasePostCommentDetails(bb.Struct): 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 + self._event_uuid_value = bb.NOT_SET + self._comment_text_value = bb.NOT_SET 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. + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - :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. - - :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 + # Instance attribute type: str (validator is set below) + comment_text = bb.Attribute("comment_text", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcasePostCommentDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcasePostCommentDetails(event_uuid={!r}, comment_text={!r})'.format( - self._event_uuid_value, - self._comment_text_value, - ) - ShowcasePostCommentDetails_validator = bv.Struct(ShowcasePostCommentDetails) class ShowcasePostCommentType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcasePostCommentType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcasePostCommentType(description={!r})'.format( - self._description_value, - ) - ShowcasePostCommentType_validator = bv.Struct(ShowcasePostCommentType) class ShowcaseRemoveMemberDetails(bb.Struct): @@ -87973,96 +60753,44 @@ class ShowcaseRemoveMemberDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseRemoveMemberDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseRemoveMemberDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - ShowcaseRemoveMemberDetails_validator = bv.Struct(ShowcaseRemoveMemberDetails) class ShowcaseRemoveMemberType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseRemoveMemberType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseRemoveMemberType(description={!r})'.format( - self._description_value, - ) - ShowcaseRemoveMemberType_validator = bv.Struct(ShowcaseRemoveMemberType) class ShowcaseRenamedDetails(bb.Struct): @@ -88074,96 +60802,44 @@ class ShowcaseRenamedDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseRenamedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseRenamedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - ShowcaseRenamedDetails_validator = bv.Struct(ShowcaseRenamedDetails) class ShowcaseRenamedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseRenamedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseRenamedType(description={!r})'.format( - self._description_value, - ) - ShowcaseRenamedType_validator = bv.Struct(ShowcaseRenamedType) class ShowcaseRequestAccessDetails(bb.Struct): @@ -88176,96 +60852,44 @@ class ShowcaseRequestAccessDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseRequestAccessDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseRequestAccessDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - ShowcaseRequestAccessDetails_validator = bv.Struct(ShowcaseRequestAccessDetails) class ShowcaseRequestAccessType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseRequestAccessType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseRequestAccessType(description={!r})'.format( - self._description_value, - ) - ShowcaseRequestAccessType_validator = bv.Struct(ShowcaseRequestAccessType) class ShowcaseResolveCommentDetails(bb.Struct): @@ -88279,9 +60903,7 @@ class ShowcaseResolveCommentDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_comment_text_value', - '_comment_text_present', ] _has_required_fields = True @@ -88289,120 +60911,44 @@ class ShowcaseResolveCommentDetails(bb.Struct): 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 + self._event_uuid_value = bb.NOT_SET + self._comment_text_value = bb.NOT_SET 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. - - :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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - @comment_text.deleter - def comment_text(self): - self._comment_text_value = None - self._comment_text_present = False + # Instance attribute type: str (validator is set below) + comment_text = bb.Attribute("comment_text", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseResolveCommentDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseResolveCommentDetails(event_uuid={!r}, comment_text={!r})'.format( - self._event_uuid_value, - self._comment_text_value, - ) - ShowcaseResolveCommentDetails_validator = bv.Struct(ShowcaseResolveCommentDetails) class ShowcaseResolveCommentType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseResolveCommentType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseResolveCommentType(description={!r})'.format( - self._description_value, - ) - ShowcaseResolveCommentType_validator = bv.Struct(ShowcaseResolveCommentType) class ShowcaseRestoredDetails(bb.Struct): @@ -88414,96 +60960,44 @@ class ShowcaseRestoredDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseRestoredDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseRestoredDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - ShowcaseRestoredDetails_validator = bv.Struct(ShowcaseRestoredDetails) class ShowcaseRestoredType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseRestoredType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseRestoredType(description={!r})'.format( - self._description_value, - ) - ShowcaseRestoredType_validator = bv.Struct(ShowcaseRestoredType) class ShowcaseTrashedDeprecatedDetails(bb.Struct): @@ -88516,96 +61010,44 @@ class ShowcaseTrashedDeprecatedDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseTrashedDeprecatedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseTrashedDeprecatedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - ShowcaseTrashedDeprecatedDetails_validator = bv.Struct(ShowcaseTrashedDeprecatedDetails) class ShowcaseTrashedDeprecatedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseTrashedDeprecatedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseTrashedDeprecatedType(description={!r})'.format( - self._description_value, - ) - ShowcaseTrashedDeprecatedType_validator = bv.Struct(ShowcaseTrashedDeprecatedType) class ShowcaseTrashedDetails(bb.Struct): @@ -88617,96 +61059,44 @@ class ShowcaseTrashedDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseTrashedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseTrashedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - ShowcaseTrashedDetails_validator = bv.Struct(ShowcaseTrashedDetails) class ShowcaseTrashedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseTrashedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseTrashedType(description={!r})'.format( - self._description_value, - ) - ShowcaseTrashedType_validator = bv.Struct(ShowcaseTrashedType) class ShowcaseUnresolveCommentDetails(bb.Struct): @@ -88720,9 +61110,7 @@ class ShowcaseUnresolveCommentDetails(bb.Struct): __slots__ = [ '_event_uuid_value', - '_event_uuid_present', '_comment_text_value', - '_comment_text_present', ] _has_required_fields = True @@ -88730,120 +61118,44 @@ class ShowcaseUnresolveCommentDetails(bb.Struct): 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 + self._event_uuid_value = bb.NOT_SET + self._comment_text_value = bb.NOT_SET 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. + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") - :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. - - :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 + # Instance attribute type: str (validator is set below) + comment_text = bb.Attribute("comment_text", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseUnresolveCommentDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseUnresolveCommentDetails(event_uuid={!r}, comment_text={!r})'.format( - self._event_uuid_value, - self._comment_text_value, - ) - ShowcaseUnresolveCommentDetails_validator = bv.Struct(ShowcaseUnresolveCommentDetails) class ShowcaseUnresolveCommentType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseUnresolveCommentType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseUnresolveCommentType(description={!r})'.format( - self._description_value, - ) - ShowcaseUnresolveCommentType_validator = bv.Struct(ShowcaseUnresolveCommentType) class ShowcaseUntrashedDeprecatedDetails(bb.Struct): @@ -88856,96 +61168,44 @@ class ShowcaseUntrashedDeprecatedDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseUntrashedDeprecatedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseUntrashedDeprecatedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - ShowcaseUntrashedDeprecatedDetails_validator = bv.Struct(ShowcaseUntrashedDeprecatedDetails) class ShowcaseUntrashedDeprecatedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseUntrashedDeprecatedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseUntrashedDeprecatedType(description={!r})'.format( - self._description_value, - ) - ShowcaseUntrashedDeprecatedType_validator = bv.Struct(ShowcaseUntrashedDeprecatedType) class ShowcaseUntrashedDetails(bb.Struct): @@ -88957,96 +61217,44 @@ class ShowcaseUntrashedDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseUntrashedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseUntrashedDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - ShowcaseUntrashedDetails_validator = bv.Struct(ShowcaseUntrashedDetails) class ShowcaseUntrashedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseUntrashedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseUntrashedType(description={!r})'.format( - self._description_value, - ) - ShowcaseUntrashedType_validator = bv.Struct(ShowcaseUntrashedType) class ShowcaseViewDetails(bb.Struct): @@ -89058,96 +61266,44 @@ class ShowcaseViewDetails(bb.Struct): __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 + self._event_uuid_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + event_uuid = bb.Attribute("event_uuid") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseViewDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseViewDetails(event_uuid={!r})'.format( - self._event_uuid_value, - ) - ShowcaseViewDetails_validator = bv.Struct(ShowcaseViewDetails) class ShowcaseViewType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseViewType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseViewType(description={!r})'.format( - self._description_value, - ) - ShowcaseViewType_validator = bv.Struct(ShowcaseViewType) class SignInAsSessionEndDetails(bb.Struct): @@ -89166,56 +61322,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SignInAsSessionEndDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SignInAsSessionEndDetails()' - SignInAsSessionEndDetails_validator = bv.Struct(SignInAsSessionEndDetails) class SignInAsSessionEndType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SignInAsSessionEndType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SignInAsSessionEndType(description={!r})'.format( - self._description_value, - ) - SignInAsSessionEndType_validator = bv.Struct(SignInAsSessionEndType) class SignInAsSessionStartDetails(bb.Struct): @@ -89234,56 +61362,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SignInAsSessionStartDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SignInAsSessionStartDetails()' - SignInAsSessionStartDetails_validator = bv.Struct(SignInAsSessionStartDetails) class SignInAsSessionStartType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SignInAsSessionStartType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SignInAsSessionStartType(description={!r})'.format( - self._description_value, - ) - SignInAsSessionStartType_validator = bv.Struct(SignInAsSessionStartType) class SmartSyncChangePolicyDetails(bb.Struct): @@ -89298,9 +61398,7 @@ class SmartSyncChangePolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = False @@ -89308,123 +61406,44 @@ class SmartSyncChangePolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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: team_policies.SmartSyncPolicy - """ - 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 + # Instance attribute type: team_policies.SmartSyncPolicy (validator is set below) + new_value = bb.Attribute("new_value", nullable=True, user_defined=True) - @property - def previous_value(self): - """ - Previous smart sync policy. - - :rtype: team_policies.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 + # Instance attribute type: team_policies.SmartSyncPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SmartSyncChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 SmartSyncChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SmartSyncChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SmartSyncChangePolicyType(description={!r})'.format( - self._description_value, - ) - SmartSyncChangePolicyType_validator = bv.Struct(SmartSyncChangePolicyType) class SmartSyncCreateAdminPrivilegeReportDetails(bb.Struct): @@ -89443,56 +61462,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SmartSyncCreateAdminPrivilegeReportDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SmartSyncCreateAdminPrivilegeReportDetails()' - SmartSyncCreateAdminPrivilegeReportDetails_validator = bv.Struct(SmartSyncCreateAdminPrivilegeReportDetails) class SmartSyncCreateAdminPrivilegeReportType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SmartSyncCreateAdminPrivilegeReportType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SmartSyncCreateAdminPrivilegeReportType(description={!r})'.format( - self._description_value, - ) - SmartSyncCreateAdminPrivilegeReportType_validator = bv.Struct(SmartSyncCreateAdminPrivilegeReportType) class SmartSyncNotOptOutDetails(bb.Struct): @@ -89507,9 +61498,7 @@ class SmartSyncNotOptOutDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -89517,117 +61506,44 @@ class SmartSyncNotOptOutDetails(bb.Struct): 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 + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET 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. + # Instance attribute type: SmartSyncOptOutPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) - :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 + # Instance attribute type: SmartSyncOptOutPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SmartSyncNotOptOutDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 SmartSyncNotOptOutType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SmartSyncNotOptOutType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SmartSyncNotOptOutType(description={!r})'.format( - self._description_value, - ) - SmartSyncNotOptOutType_validator = bv.Struct(SmartSyncNotOptOutType) class SmartSyncOptOutDetails(bb.Struct): @@ -89642,9 +61558,7 @@ class SmartSyncOptOutDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -89652,70 +61566,22 @@ class SmartSyncOptOutDetails(bb.Struct): 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 + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET 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 + # Instance attribute type: SmartSyncOptOutPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False + # Instance attribute type: SmartSyncOptOutPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SmartSyncOptOutDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -89760,56 +61626,28 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SmartSyncOptOutPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SmartSyncOptOutPolicy(%r, %r)' % (self._tag, self._value) - SmartSyncOptOutPolicy_validator = bv.Union(SmartSyncOptOutPolicy) class SmartSyncOptOutType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SmartSyncOptOutType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SmartSyncOptOutType(description={!r})'.format( - self._description_value, - ) - SmartSyncOptOutType_validator = bv.Struct(SmartSyncOptOutType) class SmarterSmartSyncPolicyChangedDetails(bb.Struct): @@ -89824,9 +61662,7 @@ class SmarterSmartSyncPolicyChangedDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -89834,117 +61670,44 @@ class SmarterSmartSyncPolicyChangedDetails(bb.Struct): 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 + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET 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 automatic Smart Sync setting. - - :rtype: team_policies.SmarterSmartSyncPolicyState - """ - 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 automatic Smart Sync setting. - - :rtype: team_policies.SmarterSmartSyncPolicyState - """ - if self._new_value_present: - return self._new_value_value - else: - raise AttributeError("missing required field 'new_value'") + # Instance attribute type: team_policies.SmarterSmartSyncPolicyState (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) - @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 + # Instance attribute type: team_policies.SmarterSmartSyncPolicyState (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SmarterSmartSyncPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SmarterSmartSyncPolicyChangedDetails(previous_value={!r}, new_value={!r})'.format( - self._previous_value_value, - self._new_value_value, - ) - SmarterSmartSyncPolicyChangedDetails_validator = bv.Struct(SmarterSmartSyncPolicyChangedDetails) class SmarterSmartSyncPolicyChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SmarterSmartSyncPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SmarterSmartSyncPolicyChangedType(description={!r})'.format( - self._description_value, - ) - SmarterSmartSyncPolicyChangedType_validator = bv.Struct(SmarterSmartSyncPolicyChangedType) class SpaceCapsType(bb.Union): @@ -90001,9 +61764,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SpaceCapsType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SpaceCapsType(%r, %r)' % (self._tag, self._value) - SpaceCapsType_validator = bv.Union(SpaceCapsType) class SpaceLimitsStatus(bb.Union): @@ -90058,9 +61818,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SpaceLimitsStatus, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SpaceLimitsStatus(%r, %r)' % (self._tag, self._value) - SpaceLimitsStatus_validator = bv.Union(SpaceLimitsStatus) class SsoAddCertDetails(bb.Struct): @@ -90073,96 +61830,44 @@ class SsoAddCertDetails(bb.Struct): __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 + self._certificate_details_value = bb.NOT_SET 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 + # Instance attribute type: Certificate (validator is set below) + certificate_details = bb.Attribute("certificate_details", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoAddCertDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SsoAddCertDetails(certificate_details={!r})'.format( - self._certificate_details_value, - ) - SsoAddCertDetails_validator = bv.Struct(SsoAddCertDetails) class SsoAddCertType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoAddCertType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SsoAddCertType(description={!r})'.format( - self._description_value, - ) - SsoAddCertType_validator = bv.Struct(SsoAddCertType) class SsoAddLoginUrlDetails(bb.Struct): @@ -90175,96 +61880,44 @@ class SsoAddLoginUrlDetails(bb.Struct): __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 + self._new_value_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + new_value = bb.Attribute("new_value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoAddLoginUrlDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SsoAddLoginUrlDetails(new_value={!r})'.format( - self._new_value_value, - ) - SsoAddLoginUrlDetails_validator = bv.Struct(SsoAddLoginUrlDetails) class SsoAddLoginUrlType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoAddLoginUrlType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SsoAddLoginUrlType(description={!r})'.format( - self._description_value, - ) - SsoAddLoginUrlType_validator = bv.Struct(SsoAddLoginUrlType) class SsoAddLogoutUrlDetails(bb.Struct): @@ -90277,100 +61930,44 @@ class SsoAddLogoutUrlDetails(bb.Struct): __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 + self._new_value_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + new_value = bb.Attribute("new_value", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoAddLogoutUrlDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SsoAddLogoutUrlDetails(new_value={!r})'.format( - self._new_value_value, - ) - SsoAddLogoutUrlDetails_validator = bv.Struct(SsoAddLogoutUrlDetails) class SsoAddLogoutUrlType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoAddLogoutUrlType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SsoAddLogoutUrlType(description={!r})'.format( - self._description_value, - ) - SsoAddLogoutUrlType_validator = bv.Struct(SsoAddLogoutUrlType) class SsoChangeCertDetails(bb.Struct): @@ -90385,9 +61982,7 @@ class SsoChangeCertDetails(bb.Struct): __slots__ = [ '_previous_certificate_details_value', - '_previous_certificate_details_present', '_new_certificate_details_value', - '_new_certificate_details_present', ] _has_required_fields = True @@ -90395,121 +61990,44 @@ class SsoChangeCertDetails(bb.Struct): 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 + self._previous_certificate_details_value = bb.NOT_SET + self._new_certificate_details_value = bb.NOT_SET 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. Might be missing due to historical - data gap. - - :rtype: Certificate - """ - if self._previous_certificate_details_present: - return self._previous_certificate_details_value - else: - return None + # Instance attribute type: Certificate (validator is set below) + previous_certificate_details = bb.Attribute("previous_certificate_details", nullable=True, user_defined=True) - @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 + # Instance attribute type: Certificate (validator is set below) + new_certificate_details = bb.Attribute("new_certificate_details", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoChangeCertDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 SsoChangeCertType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoChangeCertType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SsoChangeCertType(description={!r})'.format( - self._description_value, - ) - SsoChangeCertType_validator = bv.Struct(SsoChangeCertType) class SsoChangeLoginUrlDetails(bb.Struct): @@ -90524,9 +62042,7 @@ class SsoChangeLoginUrlDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -90534,117 +62050,44 @@ class SsoChangeLoginUrlDetails(bb.Struct): 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 + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + previous_value = bb.Attribute("previous_value") - @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 + # Instance attribute type: str (validator is set below) + new_value = bb.Attribute("new_value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoChangeLoginUrlDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 SsoChangeLoginUrlType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoChangeLoginUrlType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SsoChangeLoginUrlType(description={!r})'.format( - self._description_value, - ) - SsoChangeLoginUrlType_validator = bv.Struct(SsoChangeLoginUrlType) class SsoChangeLogoutUrlDetails(bb.Struct): @@ -90659,9 +62102,7 @@ class SsoChangeLogoutUrlDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = False @@ -90669,125 +62110,44 @@ class SsoChangeLogoutUrlDetails(bb.Struct): 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 + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=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 + # Instance attribute type: str (validator is set below) + new_value = bb.Attribute("new_value", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoChangeLogoutUrlDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 SsoChangeLogoutUrlType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoChangeLogoutUrlType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SsoChangeLogoutUrlType(description={!r})'.format( - self._description_value, - ) - SsoChangeLogoutUrlType_validator = bv.Struct(SsoChangeLogoutUrlType) class SsoChangePolicyDetails(bb.Struct): @@ -90801,9 +62161,7 @@ class SsoChangePolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -90811,121 +62169,44 @@ class SsoChangePolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 - """ - 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 + # Instance attribute type: team_policies.SsoPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=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 - """ - 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 + # Instance attribute type: team_policies.SsoPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 SsoChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SsoChangePolicyType(description={!r})'.format( - self._description_value, - ) - SsoChangePolicyType_validator = bv.Struct(SsoChangePolicyType) class SsoChangeSamlIdentityModeDetails(bb.Struct): @@ -90940,9 +62221,7 @@ class SsoChangeSamlIdentityModeDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -90950,117 +62229,44 @@ class SsoChangeSamlIdentityModeDetails(bb.Struct): 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 + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET 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: int - """ - 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: int - """ - 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 + # Instance attribute type: int (validator is set below) + previous_value = bb.Attribute("previous_value") - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False + # Instance attribute type: int (validator is set below) + new_value = bb.Attribute("new_value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoChangeSamlIdentityModeDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 SsoChangeSamlIdentityModeType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoChangeSamlIdentityModeType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SsoChangeSamlIdentityModeType(description={!r})'.format( - self._description_value, - ) - SsoChangeSamlIdentityModeType_validator = bv.Struct(SsoChangeSamlIdentityModeType) class SsoErrorDetails(bb.Struct): @@ -91072,96 +62278,44 @@ class SsoErrorDetails(bb.Struct): __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 + self._error_details_value = bb.NOT_SET if error_details is not None: self.error_details = error_details - @property - def error_details(self): - """ - Error 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 + # Instance attribute type: FailureDetailsLogInfo (validator is set below) + error_details = bb.Attribute("error_details", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoErrorDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SsoErrorDetails(error_details={!r})'.format( - self._error_details_value, - ) - SsoErrorDetails_validator = bv.Struct(SsoErrorDetails) class SsoErrorType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoErrorType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SsoErrorType(description={!r})'.format( - self._description_value, - ) - SsoErrorType_validator = bv.Struct(SsoErrorType) class SsoRemoveCertDetails(bb.Struct): @@ -91180,56 +62334,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoRemoveCertDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SsoRemoveCertDetails()' - SsoRemoveCertDetails_validator = bv.Struct(SsoRemoveCertDetails) class SsoRemoveCertType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoRemoveCertType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SsoRemoveCertType(description={!r})'.format( - self._description_value, - ) - SsoRemoveCertType_validator = bv.Struct(SsoRemoveCertType) class SsoRemoveLoginUrlDetails(bb.Struct): @@ -91242,96 +62368,44 @@ class SsoRemoveLoginUrlDetails(bb.Struct): __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 + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + previous_value = bb.Attribute("previous_value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoRemoveLoginUrlDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SsoRemoveLoginUrlDetails(previous_value={!r})'.format( - self._previous_value_value, - ) - SsoRemoveLoginUrlDetails_validator = bv.Struct(SsoRemoveLoginUrlDetails) class SsoRemoveLoginUrlType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoRemoveLoginUrlType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SsoRemoveLoginUrlType(description={!r})'.format( - self._description_value, - ) - SsoRemoveLoginUrlType_validator = bv.Struct(SsoRemoveLoginUrlType) class SsoRemoveLogoutUrlDetails(bb.Struct): @@ -91344,96 +62418,44 @@ class SsoRemoveLogoutUrlDetails(bb.Struct): __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 + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + previous_value = bb.Attribute("previous_value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoRemoveLogoutUrlDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SsoRemoveLogoutUrlDetails(previous_value={!r})'.format( - self._previous_value_value, - ) - SsoRemoveLogoutUrlDetails_validator = bv.Struct(SsoRemoveLogoutUrlDetails) class SsoRemoveLogoutUrlType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoRemoveLogoutUrlType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SsoRemoveLogoutUrlType(description={!r})'.format( - self._description_value, - ) - SsoRemoveLogoutUrlType_validator = bv.Struct(SsoRemoveLogoutUrlType) class StartedEnterpriseAdminSessionDetails(bb.Struct): @@ -91447,96 +62469,44 @@ class StartedEnterpriseAdminSessionDetails(bb.Struct): __slots__ = [ '_federation_extra_details_value', - '_federation_extra_details_present', ] _has_required_fields = True def __init__(self, federation_extra_details=None): - self._federation_extra_details_value = None - self._federation_extra_details_present = False + self._federation_extra_details_value = bb.NOT_SET if federation_extra_details is not None: self.federation_extra_details = federation_extra_details - @property - def federation_extra_details(self): - """ - More information about the organization or team. - - :rtype: FedExtraDetails - """ - if self._federation_extra_details_present: - return self._federation_extra_details_value - else: - raise AttributeError("missing required field 'federation_extra_details'") - - @federation_extra_details.setter - def federation_extra_details(self, val): - self._federation_extra_details_validator.validate_type_only(val) - self._federation_extra_details_value = val - self._federation_extra_details_present = True - - @federation_extra_details.deleter - def federation_extra_details(self): - self._federation_extra_details_value = None - self._federation_extra_details_present = False + # Instance attribute type: FedExtraDetails (validator is set below) + federation_extra_details = bb.Attribute("federation_extra_details", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(StartedEnterpriseAdminSessionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'StartedEnterpriseAdminSessionDetails(federation_extra_details={!r})'.format( - self._federation_extra_details_value, - ) - StartedEnterpriseAdminSessionDetails_validator = bv.Struct(StartedEnterpriseAdminSessionDetails) class StartedEnterpriseAdminSessionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(StartedEnterpriseAdminSessionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'StartedEnterpriseAdminSessionType(description={!r})'.format( - self._description_value, - ) - StartedEnterpriseAdminSessionType_validator = bv.Struct(StartedEnterpriseAdminSessionType) class TeamActivityCreateReportDetails(bb.Struct): @@ -91550,9 +62520,7 @@ class TeamActivityCreateReportDetails(bb.Struct): __slots__ = [ '_start_date_value', - '_start_date_present', '_end_date_value', - '_end_date_present', ] _has_required_fields = True @@ -91560,70 +62528,22 @@ class TeamActivityCreateReportDetails(bb.Struct): 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 + self._start_date_value = bb.NOT_SET + self._end_date_value = bb.NOT_SET 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 + # Instance attribute type: datetime.datetime (validator is set below) + start_date = bb.Attribute("start_date") - @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 + # Instance attribute type: datetime.datetime (validator is set below) + end_date = bb.Attribute("end_date") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamActivityCreateReportDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 TeamActivityCreateReportFailDetails(bb.Struct): @@ -91636,143 +62556,66 @@ class TeamActivityCreateReportFailDetails(bb.Struct): __slots__ = [ '_failure_reason_value', - '_failure_reason_present', ] _has_required_fields = True def __init__(self, failure_reason=None): - self._failure_reason_value = None - self._failure_reason_present = False + self._failure_reason_value = bb.NOT_SET if failure_reason is not None: self.failure_reason = failure_reason - @property - def failure_reason(self): - """ - Failure reason. - - :rtype: team.TeamReportFailureReason - """ - if self._failure_reason_present: - return self._failure_reason_value - else: - raise AttributeError("missing required field 'failure_reason'") - - @failure_reason.setter - def failure_reason(self, val): - self._failure_reason_validator.validate_type_only(val) - self._failure_reason_value = val - self._failure_reason_present = True - - @failure_reason.deleter - def failure_reason(self): - self._failure_reason_value = None - self._failure_reason_present = False + # Instance attribute type: team.TeamReportFailureReason (validator is set below) + failure_reason = bb.Attribute("failure_reason", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamActivityCreateReportFailDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamActivityCreateReportFailDetails(failure_reason={!r})'.format( - self._failure_reason_value, - ) - TeamActivityCreateReportFailDetails_validator = bv.Struct(TeamActivityCreateReportFailDetails) class TeamActivityCreateReportFailType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamActivityCreateReportFailType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamActivityCreateReportFailType(description={!r})'.format( - self._description_value, - ) - TeamActivityCreateReportFailType_validator = bv.Struct(TeamActivityCreateReportFailType) class TeamActivityCreateReportType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamActivityCreateReportType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamActivityCreateReportType(description={!r})'.format( - self._description_value, - ) - TeamActivityCreateReportType_validator = bv.Struct(TeamActivityCreateReportType) class TeamBrandingPolicy(bb.Union): @@ -91819,9 +62662,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamBrandingPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamBrandingPolicy(%r, %r)' % (self._tag, self._value) - TeamBrandingPolicy_validator = bv.Union(TeamBrandingPolicy) class TeamBrandingPolicyChangedDetails(bb.Struct): @@ -91836,9 +62676,7 @@ class TeamBrandingPolicyChangedDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -91846,117 +62684,44 @@ class TeamBrandingPolicyChangedDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 branding policy. - - :rtype: TeamBrandingPolicy - """ - 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 branding policy. - - :rtype: TeamBrandingPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - raise AttributeError("missing required field 'previous_value'") + # Instance attribute type: TeamBrandingPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @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 + # Instance attribute type: TeamBrandingPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamBrandingPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamBrandingPolicyChangedDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - TeamBrandingPolicyChangedDetails_validator = bv.Struct(TeamBrandingPolicyChangedDetails) class TeamBrandingPolicyChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamBrandingPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamBrandingPolicyChangedType(description={!r})'.format( - self._description_value, - ) - TeamBrandingPolicyChangedType_validator = bv.Struct(TeamBrandingPolicyChangedType) class TeamDetails(bb.Struct): @@ -91968,49 +62733,22 @@ class TeamDetails(bb.Struct): __slots__ = [ '_team_value', - '_team_present', ] _has_required_fields = True def __init__(self, team=None): - self._team_value = None - self._team_present = False + self._team_value = bb.NOT_SET if team is not None: self.team = team - @property - def team(self): - """ - The name of the team. - - :rtype: str - """ - if self._team_present: - return self._team_value - else: - raise AttributeError("missing required field 'team'") - - @team.setter - def team(self, val): - val = self._team_validator.validate(val) - self._team_value = val - self._team_present = True - - @team.deleter - def team(self): - self._team_value = None - self._team_present = False + # Instance attribute type: str (validator is set below) + team = bb.Attribute("team") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamDetails(team={!r})'.format( - self._team_value, - ) - TeamDetails_validator = bv.Struct(TeamDetails) class TeamEvent(bb.Struct): @@ -92047,25 +62785,15 @@ class TeamEvent(bb.Struct): __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 @@ -92081,26 +62809,16 @@ def __init__(self, context=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 + self._timestamp_value = bb.NOT_SET + self._event_category_value = bb.NOT_SET + self._actor_value = bb.NOT_SET + self._origin_value = bb.NOT_SET + self._involve_non_team_member_value = bb.NOT_SET + self._context_value = bb.NOT_SET + self._participants_value = bb.NOT_SET + self._assets_value = bb.NOT_SET + self._event_type_value = bb.NOT_SET + self._details_value = bb.NOT_SET if timestamp is not None: self.timestamp = timestamp if event_category is not None: @@ -92122,281 +62840,39 @@ def __init__(self, if details is not None: self.details = details - @property - def timestamp(self): - """ - The Dropbox timestamp representing when the action was taken. + # Instance attribute type: datetime.datetime (validator is set below) + timestamp = bb.Attribute("timestamp") - :rtype: datetime.datetime - """ - if self._timestamp_present: - return self._timestamp_value - else: - raise AttributeError("missing required field 'timestamp'") + # Instance attribute type: EventCategory (validator is set below) + event_category = bb.Attribute("event_category", user_defined=True) - @timestamp.setter - def timestamp(self, val): - val = self._timestamp_validator.validate(val) - self._timestamp_value = val - self._timestamp_present = True + # Instance attribute type: ActorLogInfo (validator is set below) + actor = bb.Attribute("actor", nullable=True, user_defined=True) - @timestamp.deleter - def timestamp(self): - self._timestamp_value = None - self._timestamp_present = False + # Instance attribute type: OriginLogInfo (validator is set below) + origin = bb.Attribute("origin", nullable=True, user_defined=True) - @property - def event_category(self): - """ - The category that this type of action belongs to. + # Instance attribute type: bool (validator is set below) + involve_non_team_member = bb.Attribute("involve_non_team_member", nullable=True) - :rtype: EventCategory - """ - if self._event_category_present: - return self._event_category_value - else: - raise AttributeError("missing required field 'event_category'") + # Instance attribute type: ContextLogInfo (validator is set below) + context = bb.Attribute("context", nullable=True, user_defined=True) - @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 + # Instance attribute type: list of [ParticipantLogInfo] (validator is set below) + participants = bb.Attribute("participants", nullable=True) - @event_category.deleter - def event_category(self): - self._event_category_value = None - self._event_category_present = False + # Instance attribute type: list of [AssetLogInfo] (validator is set below) + assets = bb.Attribute("assets", nullable=True) - @property - def actor(self): - """ - The entity who actually performed the action. Might be missing due to - historical data gap. + # Instance attribute type: EventType (validator is set below) + event_type = bb.Attribute("event_type", user_defined=True) - :rtype: ActorLogInfo - """ - if self._actor_present: - return self._actor_value - else: - return None - - @actor.setter - def actor(self, val): - if val is None: - del self.actor - return - 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. Might be missing due to historical data gap. - - :rtype: bool - """ - if self._involve_non_team_member_present: - return self._involve_non_team_member_value - else: - return None - - @involve_non_team_member.setter - def involve_non_team_member(self, val): - if val is None: - del self.involve_non_team_member - return - 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. Might - be missing due to historical data gap. - - :rtype: ContextLogInfo - """ - if self._context_present: - return self._context_value - else: - return None - - @context.setter - def context(self, val): - if val is None: - del self.context - return - 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 + # Instance attribute type: EventDetails (validator is set below) + details = bb.Attribute("details", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamEvent, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamEvent(timestamp={!r}, event_category={!r}, event_type={!r}, details={!r}, actor={!r}, origin={!r}, involve_non_team_member={!r}, context={!r}, participants={!r}, assets={!r})'.format( - self._timestamp_value, - self._event_category_value, - self._event_type_value, - self._details_value, - self._actor_value, - self._origin_value, - self._involve_non_team_member_value, - self._context_value, - self._participants_value, - self._assets_value, - ) - TeamEvent_validator = bv.Struct(TeamEvent) class TeamExtensionsPolicy(bb.Union): @@ -92443,9 +62919,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamExtensionsPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamExtensionsPolicy(%r, %r)' % (self._tag, self._value) - TeamExtensionsPolicy_validator = bv.Union(TeamExtensionsPolicy) class TeamExtensionsPolicyChangedDetails(bb.Struct): @@ -92460,9 +62933,7 @@ class TeamExtensionsPolicyChangedDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -92470,117 +62941,44 @@ class TeamExtensionsPolicyChangedDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 Extensions policy. - - :rtype: TeamExtensionsPolicy - """ - 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 Extensions policy. - - :rtype: TeamExtensionsPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - raise AttributeError("missing required field 'previous_value'") + # Instance attribute type: TeamExtensionsPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @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 + # Instance attribute type: TeamExtensionsPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamExtensionsPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamExtensionsPolicyChangedDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - TeamExtensionsPolicyChangedDetails_validator = bv.Struct(TeamExtensionsPolicyChangedDetails) class TeamExtensionsPolicyChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamExtensionsPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamExtensionsPolicyChangedType(description={!r})'.format( - self._description_value, - ) - TeamExtensionsPolicyChangedType_validator = bv.Struct(TeamExtensionsPolicyChangedType) class TeamFolderChangeStatusDetails(bb.Struct): @@ -92595,9 +62993,7 @@ class TeamFolderChangeStatusDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -92605,121 +63001,44 @@ class TeamFolderChangeStatusDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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. + # Instance attribute type: team.TeamFolderStatus (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - :rtype: team.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: team.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 + # Instance attribute type: team.TeamFolderStatus (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderChangeStatusDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 TeamFolderChangeStatusType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderChangeStatusType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderChangeStatusType(description={!r})'.format( - self._description_value, - ) - TeamFolderChangeStatusType_validator = bv.Struct(TeamFolderChangeStatusType) class TeamFolderCreateDetails(bb.Struct): @@ -92738,56 +63057,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderCreateDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderCreateDetails()' - TeamFolderCreateDetails_validator = bv.Struct(TeamFolderCreateDetails) class TeamFolderCreateType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderCreateType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderCreateType(description={!r})'.format( - self._description_value, - ) - TeamFolderCreateType_validator = bv.Struct(TeamFolderCreateType) class TeamFolderDowngradeDetails(bb.Struct): @@ -92800,96 +63091,44 @@ class TeamFolderDowngradeDetails(bb.Struct): __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 + self._target_asset_index_value = bb.NOT_SET 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: int - """ - 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 + # Instance attribute type: int (validator is set below) + target_asset_index = bb.Attribute("target_asset_index") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderDowngradeDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderDowngradeDetails(target_asset_index={!r})'.format( - self._target_asset_index_value, - ) - TeamFolderDowngradeDetails_validator = bv.Struct(TeamFolderDowngradeDetails) class TeamFolderDowngradeType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderDowngradeType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderDowngradeType(description={!r})'.format( - self._description_value, - ) - TeamFolderDowngradeType_validator = bv.Struct(TeamFolderDowngradeType) class TeamFolderPermanentlyDeleteDetails(bb.Struct): @@ -92908,56 +63147,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderPermanentlyDeleteDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderPermanentlyDeleteDetails()' - TeamFolderPermanentlyDeleteDetails_validator = bv.Struct(TeamFolderPermanentlyDeleteDetails) class TeamFolderPermanentlyDeleteType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderPermanentlyDeleteType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderPermanentlyDeleteType(description={!r})'.format( - self._description_value, - ) - TeamFolderPermanentlyDeleteType_validator = bv.Struct(TeamFolderPermanentlyDeleteType) class TeamFolderRenameDetails(bb.Struct): @@ -92971,9 +63182,7 @@ class TeamFolderRenameDetails(bb.Struct): __slots__ = [ '_previous_folder_name_value', - '_previous_folder_name_present', '_new_folder_name_value', - '_new_folder_name_present', ] _has_required_fields = True @@ -92981,117 +63190,44 @@ class TeamFolderRenameDetails(bb.Struct): def __init__(self, previous_folder_name=None, new_folder_name=None): - self._previous_folder_name_value = None - self._previous_folder_name_present = False - self._new_folder_name_value = None - self._new_folder_name_present = False + self._previous_folder_name_value = bb.NOT_SET + self._new_folder_name_value = bb.NOT_SET if previous_folder_name is not None: self.previous_folder_name = previous_folder_name if new_folder_name is not None: self.new_folder_name = new_folder_name - @property - def previous_folder_name(self): - """ - Previous folder name. - - :rtype: str - """ - if self._previous_folder_name_present: - return self._previous_folder_name_value - else: - raise AttributeError("missing required field 'previous_folder_name'") - - @previous_folder_name.setter - def previous_folder_name(self, val): - val = self._previous_folder_name_validator.validate(val) - self._previous_folder_name_value = val - self._previous_folder_name_present = True + # Instance attribute type: str (validator is set below) + previous_folder_name = bb.Attribute("previous_folder_name") - @previous_folder_name.deleter - def previous_folder_name(self): - self._previous_folder_name_value = None - self._previous_folder_name_present = False - - @property - def new_folder_name(self): - """ - New folder name. - - :rtype: str - """ - if self._new_folder_name_present: - return self._new_folder_name_value - else: - raise AttributeError("missing required field 'new_folder_name'") - - @new_folder_name.setter - def new_folder_name(self, val): - val = self._new_folder_name_validator.validate(val) - self._new_folder_name_value = val - self._new_folder_name_present = True - - @new_folder_name.deleter - def new_folder_name(self): - self._new_folder_name_value = None - self._new_folder_name_present = False + # Instance attribute type: str (validator is set below) + new_folder_name = bb.Attribute("new_folder_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderRenameDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderRenameDetails(previous_folder_name={!r}, new_folder_name={!r})'.format( - self._previous_folder_name_value, - self._new_folder_name_value, - ) - TeamFolderRenameDetails_validator = bv.Struct(TeamFolderRenameDetails) class TeamFolderRenameType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamFolderRenameType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamFolderRenameType(description={!r})'.format( - self._description_value, - ) - TeamFolderRenameType_validator = bv.Struct(TeamFolderRenameType) class TeamInviteDetails(bb.Struct): @@ -93106,9 +63242,7 @@ class TeamInviteDetails(bb.Struct): __slots__ = [ '_invite_method_value', - '_invite_method_present', '_additional_license_purchase_value', - '_additional_license_purchase_present', ] _has_required_fields = True @@ -93116,73 +63250,22 @@ class TeamInviteDetails(bb.Struct): def __init__(self, invite_method=None, additional_license_purchase=None): - self._invite_method_value = None - self._invite_method_present = False - self._additional_license_purchase_value = None - self._additional_license_purchase_present = False + self._invite_method_value = bb.NOT_SET + self._additional_license_purchase_value = bb.NOT_SET if invite_method is not None: self.invite_method = invite_method if additional_license_purchase is not None: self.additional_license_purchase = additional_license_purchase - @property - def invite_method(self): - """ - How the user was invited to the team. - - :rtype: InviteMethod - """ - if self._invite_method_present: - return self._invite_method_value - else: - raise AttributeError("missing required field 'invite_method'") - - @invite_method.setter - def invite_method(self, val): - self._invite_method_validator.validate_type_only(val) - self._invite_method_value = val - self._invite_method_present = True - - @invite_method.deleter - def invite_method(self): - self._invite_method_value = None - self._invite_method_present = False - - @property - def additional_license_purchase(self): - """ - True if the invitation incurred an additional license purchase. - - :rtype: bool - """ - if self._additional_license_purchase_present: - return self._additional_license_purchase_value - else: - return None + # Instance attribute type: InviteMethod (validator is set below) + invite_method = bb.Attribute("invite_method", user_defined=True) - @additional_license_purchase.setter - def additional_license_purchase(self, val): - if val is None: - del self.additional_license_purchase - return - val = self._additional_license_purchase_validator.validate(val) - self._additional_license_purchase_value = val - self._additional_license_purchase_present = True - - @additional_license_purchase.deleter - def additional_license_purchase(self): - self._additional_license_purchase_value = None - self._additional_license_purchase_present = False + # Instance attribute type: bool (validator is set below) + additional_license_purchase = bb.Attribute("additional_license_purchase", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamInviteDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamInviteDetails(invite_method={!r}, additional_license_purchase={!r})'.format( - self._invite_method_value, - self._additional_license_purchase_value, - ) - TeamInviteDetails_validator = bv.Struct(TeamInviteDetails) class TeamLinkedAppLogInfo(AppLogInfo): @@ -93204,12 +63287,6 @@ def __init__(self, def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamLinkedAppLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 TeamLogInfo(bb.Struct): @@ -93221,49 +63298,22 @@ class TeamLogInfo(bb.Struct): __slots__ = [ '_display_name_value', - '_display_name_present', ] _has_required_fields = True def __init__(self, display_name=None): - self._display_name_value = None - self._display_name_present = False + self._display_name_value = bb.NOT_SET if display_name is not None: self.display_name = display_name - @property - def display_name(self): - """ - Team display name. - - :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 + # Instance attribute type: str (validator is set below) + display_name = bb.Attribute("display_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamLogInfo(display_name={!r})'.format( - self._display_name_value, - ) - TeamLogInfo_validator = bv.Struct(TeamLogInfo) class TeamMemberLogInfo(UserLogInfo): @@ -93280,11 +63330,8 @@ class TeamMemberLogInfo(UserLogInfo): __slots__ = [ '_team_member_id_value', - '_team_member_id_present', '_member_external_id_value', - '_member_external_id_present', '_team_value', - '_team_present', ] _has_required_fields = False @@ -93299,12 +63346,9 @@ def __init__(self, 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 - self._team_value = None - self._team_present = False + self._team_member_id_value = bb.NOT_SET + self._member_external_id_value = bb.NOT_SET + self._team_value = bb.NOT_SET if team_member_id is not None: self.team_member_id = team_member_id if member_external_id is not None: @@ -93312,97 +63356,18 @@ def __init__(self, if team is not None: self.team = team - @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 + # Instance attribute type: str (validator is set below) + team_member_id = bb.Attribute("team_member_id", nullable=True) - @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 - - @property - def team(self): - """ - Details about this user’s team for enterprise event. - - :rtype: TeamLogInfo - """ - if self._team_present: - return self._team_value - else: - return None + # Instance attribute type: str (validator is set below) + member_external_id = bb.Attribute("member_external_id", nullable=True) - @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 + # Instance attribute type: TeamLogInfo (validator is set below) + team = bb.Attribute("team", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMemberLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMemberLogInfo(account_id={!r}, display_name={!r}, email={!r}, team_member_id={!r}, member_external_id={!r}, team={!r})'.format( - self._account_id_value, - self._display_name_value, - self._email_value, - self._team_member_id_value, - self._member_external_id_value, - self._team_value, - ) - TeamMemberLogInfo_validator = bv.Struct(TeamMemberLogInfo) class TeamMembershipType(bb.Union): @@ -93447,9 +63412,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMembershipType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMembershipType(%r, %r)' % (self._tag, self._value) - TeamMembershipType_validator = bv.Union(TeamMembershipType) class TeamMergeFromDetails(bb.Struct): @@ -93462,96 +63424,44 @@ class TeamMergeFromDetails(bb.Struct): __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 + self._team_name_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + team_name = bb.Attribute("team_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeFromDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeFromDetails(team_name={!r})'.format( - self._team_name_value, - ) - TeamMergeFromDetails_validator = bv.Struct(TeamMergeFromDetails) class TeamMergeFromType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeFromType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeFromType(description={!r})'.format( - self._description_value, - ) - TeamMergeFromType_validator = bv.Struct(TeamMergeFromType) class TeamMergeRequestAcceptedDetails(bb.Struct): @@ -93564,49 +63474,22 @@ class TeamMergeRequestAcceptedDetails(bb.Struct): __slots__ = [ '_request_accepted_details_value', - '_request_accepted_details_present', ] _has_required_fields = True def __init__(self, request_accepted_details=None): - self._request_accepted_details_value = None - self._request_accepted_details_present = False + self._request_accepted_details_value = bb.NOT_SET if request_accepted_details is not None: self.request_accepted_details = request_accepted_details - @property - def request_accepted_details(self): - """ - Team merge request acceptance details. - - :rtype: TeamMergeRequestAcceptedExtraDetails - """ - if self._request_accepted_details_present: - return self._request_accepted_details_value - else: - raise AttributeError("missing required field 'request_accepted_details'") - - @request_accepted_details.setter - def request_accepted_details(self, val): - self._request_accepted_details_validator.validate_type_only(val) - self._request_accepted_details_value = val - self._request_accepted_details_present = True - - @request_accepted_details.deleter - def request_accepted_details(self): - self._request_accepted_details_value = None - self._request_accepted_details_present = False + # Instance attribute type: TeamMergeRequestAcceptedExtraDetails (validator is set below) + request_accepted_details = bb.Attribute("request_accepted_details", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestAcceptedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestAcceptedDetails(request_accepted_details={!r})'.format( - self._request_accepted_details_value, - ) - TeamMergeRequestAcceptedDetails_validator = bv.Struct(TeamMergeRequestAcceptedDetails) class TeamMergeRequestAcceptedExtraDetails(bb.Union): @@ -93702,9 +63585,6 @@ def get_secondary_team(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestAcceptedExtraDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestAcceptedExtraDetails(%r, %r)' % (self._tag, self._value) - TeamMergeRequestAcceptedExtraDetails_validator = bv.Union(TeamMergeRequestAcceptedExtraDetails) class TeamMergeRequestAcceptedShownToPrimaryTeamDetails(bb.Struct): @@ -93720,9 +63600,7 @@ class TeamMergeRequestAcceptedShownToPrimaryTeamDetails(bb.Struct): __slots__ = [ '_secondary_team_value', - '_secondary_team_present', '_sent_by_value', - '_sent_by_present', ] _has_required_fields = True @@ -93730,117 +63608,44 @@ class TeamMergeRequestAcceptedShownToPrimaryTeamDetails(bb.Struct): def __init__(self, secondary_team=None, sent_by=None): - self._secondary_team_value = None - self._secondary_team_present = False - self._sent_by_value = None - self._sent_by_present = False + self._secondary_team_value = bb.NOT_SET + self._sent_by_value = bb.NOT_SET if secondary_team is not None: self.secondary_team = secondary_team if sent_by is not None: self.sent_by = sent_by - @property - def secondary_team(self): - """ - The secondary team name. - - :rtype: str - """ - if self._secondary_team_present: - return self._secondary_team_value - else: - raise AttributeError("missing required field 'secondary_team'") + # Instance attribute type: str (validator is set below) + secondary_team = bb.Attribute("secondary_team") - @secondary_team.setter - def secondary_team(self, val): - val = self._secondary_team_validator.validate(val) - self._secondary_team_value = val - self._secondary_team_present = True - - @secondary_team.deleter - def secondary_team(self): - self._secondary_team_value = None - self._secondary_team_present = False - - @property - def sent_by(self): - """ - The name of the secondary team admin who sent the request originally. - - :rtype: str - """ - if self._sent_by_present: - return self._sent_by_value - else: - raise AttributeError("missing required field 'sent_by'") - - @sent_by.setter - def sent_by(self, val): - val = self._sent_by_validator.validate(val) - self._sent_by_value = val - self._sent_by_present = True - - @sent_by.deleter - def sent_by(self): - self._sent_by_value = None - self._sent_by_present = False + # Instance attribute type: str (validator is set below) + sent_by = bb.Attribute("sent_by") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestAcceptedShownToPrimaryTeamDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestAcceptedShownToPrimaryTeamDetails(secondary_team={!r}, sent_by={!r})'.format( - self._secondary_team_value, - self._sent_by_value, - ) - TeamMergeRequestAcceptedShownToPrimaryTeamDetails_validator = bv.Struct(TeamMergeRequestAcceptedShownToPrimaryTeamDetails) class TeamMergeRequestAcceptedShownToPrimaryTeamType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestAcceptedShownToPrimaryTeamType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestAcceptedShownToPrimaryTeamType(description={!r})'.format( - self._description_value, - ) - TeamMergeRequestAcceptedShownToPrimaryTeamType_validator = bv.Struct(TeamMergeRequestAcceptedShownToPrimaryTeamType) class TeamMergeRequestAcceptedShownToSecondaryTeamDetails(bb.Struct): @@ -93856,9 +63661,7 @@ class TeamMergeRequestAcceptedShownToSecondaryTeamDetails(bb.Struct): __slots__ = [ '_primary_team_value', - '_primary_team_present', '_sent_by_value', - '_sent_by_present', ] _has_required_fields = True @@ -93866,164 +63669,66 @@ class TeamMergeRequestAcceptedShownToSecondaryTeamDetails(bb.Struct): def __init__(self, primary_team=None, sent_by=None): - self._primary_team_value = None - self._primary_team_present = False - self._sent_by_value = None - self._sent_by_present = False + self._primary_team_value = bb.NOT_SET + self._sent_by_value = bb.NOT_SET if primary_team is not None: self.primary_team = primary_team if sent_by is not None: self.sent_by = sent_by - @property - def primary_team(self): - """ - The primary team name. - - :rtype: str - """ - if self._primary_team_present: - return self._primary_team_value - else: - raise AttributeError("missing required field 'primary_team'") - - @primary_team.setter - def primary_team(self, val): - val = self._primary_team_validator.validate(val) - self._primary_team_value = val - self._primary_team_present = True - - @primary_team.deleter - def primary_team(self): - self._primary_team_value = None - self._primary_team_present = False + # Instance attribute type: str (validator is set below) + primary_team = bb.Attribute("primary_team") - @property - def sent_by(self): - """ - The name of the secondary team admin who sent the request originally. - - :rtype: str - """ - if self._sent_by_present: - return self._sent_by_value - else: - raise AttributeError("missing required field 'sent_by'") - - @sent_by.setter - def sent_by(self, val): - val = self._sent_by_validator.validate(val) - self._sent_by_value = val - self._sent_by_present = True - - @sent_by.deleter - def sent_by(self): - self._sent_by_value = None - self._sent_by_present = False + # Instance attribute type: str (validator is set below) + sent_by = bb.Attribute("sent_by") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestAcceptedShownToSecondaryTeamDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestAcceptedShownToSecondaryTeamDetails(primary_team={!r}, sent_by={!r})'.format( - self._primary_team_value, - self._sent_by_value, - ) - TeamMergeRequestAcceptedShownToSecondaryTeamDetails_validator = bv.Struct(TeamMergeRequestAcceptedShownToSecondaryTeamDetails) class TeamMergeRequestAcceptedShownToSecondaryTeamType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestAcceptedShownToSecondaryTeamType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestAcceptedShownToSecondaryTeamType(description={!r})'.format( - self._description_value, - ) - TeamMergeRequestAcceptedShownToSecondaryTeamType_validator = bv.Struct(TeamMergeRequestAcceptedShownToSecondaryTeamType) class TeamMergeRequestAcceptedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestAcceptedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestAcceptedType(description={!r})'.format( - self._description_value, - ) - TeamMergeRequestAcceptedType_validator = bv.Struct(TeamMergeRequestAcceptedType) class TeamMergeRequestAutoCanceledDetails(bb.Struct): @@ -94036,99 +63741,44 @@ class TeamMergeRequestAutoCanceledDetails(bb.Struct): __slots__ = [ '_details_value', - '_details_present', ] _has_required_fields = False def __init__(self, details=None): - self._details_value = None - self._details_present = False + self._details_value = bb.NOT_SET if details is not None: self.details = details - @property - def details(self): - """ - The cancellation reason. - - :rtype: str - """ - if self._details_present: - return self._details_value - else: - return None - - @details.setter - def details(self, val): - if val is None: - del self.details - return - val = self._details_validator.validate(val) - self._details_value = val - self._details_present = True - - @details.deleter - def details(self): - self._details_value = None - self._details_present = False + # Instance attribute type: str (validator is set below) + details = bb.Attribute("details", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestAutoCanceledDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestAutoCanceledDetails(details={!r})'.format( - self._details_value, - ) - TeamMergeRequestAutoCanceledDetails_validator = bv.Struct(TeamMergeRequestAutoCanceledDetails) class TeamMergeRequestAutoCanceledType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestAutoCanceledType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestAutoCanceledType(description={!r})'.format( - self._description_value, - ) - TeamMergeRequestAutoCanceledType_validator = bv.Struct(TeamMergeRequestAutoCanceledType) class TeamMergeRequestCanceledDetails(bb.Struct): @@ -94141,49 +63791,22 @@ class TeamMergeRequestCanceledDetails(bb.Struct): __slots__ = [ '_request_canceled_details_value', - '_request_canceled_details_present', ] _has_required_fields = True def __init__(self, request_canceled_details=None): - self._request_canceled_details_value = None - self._request_canceled_details_present = False + self._request_canceled_details_value = bb.NOT_SET if request_canceled_details is not None: self.request_canceled_details = request_canceled_details - @property - def request_canceled_details(self): - """ - Team merge request cancellation details. - - :rtype: TeamMergeRequestCanceledExtraDetails - """ - if self._request_canceled_details_present: - return self._request_canceled_details_value - else: - raise AttributeError("missing required field 'request_canceled_details'") - - @request_canceled_details.setter - def request_canceled_details(self, val): - self._request_canceled_details_validator.validate_type_only(val) - self._request_canceled_details_value = val - self._request_canceled_details_present = True - - @request_canceled_details.deleter - def request_canceled_details(self): - self._request_canceled_details_value = None - self._request_canceled_details_present = False + # Instance attribute type: TeamMergeRequestCanceledExtraDetails (validator is set below) + request_canceled_details = bb.Attribute("request_canceled_details", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestCanceledDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestCanceledDetails(request_canceled_details={!r})'.format( - self._request_canceled_details_value, - ) - TeamMergeRequestCanceledDetails_validator = bv.Struct(TeamMergeRequestCanceledDetails) class TeamMergeRequestCanceledExtraDetails(bb.Union): @@ -94279,9 +63902,6 @@ def get_secondary_team(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestCanceledExtraDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestCanceledExtraDetails(%r, %r)' % (self._tag, self._value) - TeamMergeRequestCanceledExtraDetails_validator = bv.Union(TeamMergeRequestCanceledExtraDetails) class TeamMergeRequestCanceledShownToPrimaryTeamDetails(bb.Struct): @@ -94297,9 +63917,7 @@ class TeamMergeRequestCanceledShownToPrimaryTeamDetails(bb.Struct): __slots__ = [ '_secondary_team_value', - '_secondary_team_present', '_sent_by_value', - '_sent_by_present', ] _has_required_fields = True @@ -94307,117 +63925,44 @@ class TeamMergeRequestCanceledShownToPrimaryTeamDetails(bb.Struct): def __init__(self, secondary_team=None, sent_by=None): - self._secondary_team_value = None - self._secondary_team_present = False - self._sent_by_value = None - self._sent_by_present = False + self._secondary_team_value = bb.NOT_SET + self._sent_by_value = bb.NOT_SET if secondary_team is not None: self.secondary_team = secondary_team if sent_by is not None: self.sent_by = sent_by - @property - def secondary_team(self): - """ - The secondary team name. + # Instance attribute type: str (validator is set below) + secondary_team = bb.Attribute("secondary_team") - :rtype: str - """ - if self._secondary_team_present: - return self._secondary_team_value - else: - raise AttributeError("missing required field 'secondary_team'") - - @secondary_team.setter - def secondary_team(self, val): - val = self._secondary_team_validator.validate(val) - self._secondary_team_value = val - self._secondary_team_present = True - - @secondary_team.deleter - def secondary_team(self): - self._secondary_team_value = None - self._secondary_team_present = False - - @property - def sent_by(self): - """ - The name of the secondary team admin who sent the request originally. - - :rtype: str - """ - if self._sent_by_present: - return self._sent_by_value - else: - raise AttributeError("missing required field 'sent_by'") - - @sent_by.setter - def sent_by(self, val): - val = self._sent_by_validator.validate(val) - self._sent_by_value = val - self._sent_by_present = True - - @sent_by.deleter - def sent_by(self): - self._sent_by_value = None - self._sent_by_present = False + # Instance attribute type: str (validator is set below) + sent_by = bb.Attribute("sent_by") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestCanceledShownToPrimaryTeamDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestCanceledShownToPrimaryTeamDetails(secondary_team={!r}, sent_by={!r})'.format( - self._secondary_team_value, - self._sent_by_value, - ) - TeamMergeRequestCanceledShownToPrimaryTeamDetails_validator = bv.Struct(TeamMergeRequestCanceledShownToPrimaryTeamDetails) class TeamMergeRequestCanceledShownToPrimaryTeamType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestCanceledShownToPrimaryTeamType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestCanceledShownToPrimaryTeamType(description={!r})'.format( - self._description_value, - ) - TeamMergeRequestCanceledShownToPrimaryTeamType_validator = bv.Struct(TeamMergeRequestCanceledShownToPrimaryTeamType) class TeamMergeRequestCanceledShownToSecondaryTeamDetails(bb.Struct): @@ -94432,9 +63977,7 @@ class TeamMergeRequestCanceledShownToSecondaryTeamDetails(bb.Struct): __slots__ = [ '_sent_to_value', - '_sent_to_present', '_sent_by_value', - '_sent_by_present', ] _has_required_fields = True @@ -94442,164 +63985,66 @@ class TeamMergeRequestCanceledShownToSecondaryTeamDetails(bb.Struct): def __init__(self, sent_to=None, sent_by=None): - self._sent_to_value = None - self._sent_to_present = False - self._sent_by_value = None - self._sent_by_present = False + self._sent_to_value = bb.NOT_SET + self._sent_by_value = bb.NOT_SET if sent_to is not None: self.sent_to = sent_to if sent_by is not None: self.sent_by = sent_by - @property - def sent_to(self): - """ - The email of the primary team admin that the request was sent to. - - :rtype: str - """ - if self._sent_to_present: - return self._sent_to_value - else: - raise AttributeError("missing required field 'sent_to'") - - @sent_to.setter - def sent_to(self, val): - val = self._sent_to_validator.validate(val) - self._sent_to_value = val - self._sent_to_present = True - - @sent_to.deleter - def sent_to(self): - self._sent_to_value = None - self._sent_to_present = False - - @property - def sent_by(self): - """ - The name of the secondary team admin who sent the request originally. - - :rtype: str - """ - if self._sent_by_present: - return self._sent_by_value - else: - raise AttributeError("missing required field 'sent_by'") - - @sent_by.setter - def sent_by(self, val): - val = self._sent_by_validator.validate(val) - self._sent_by_value = val - self._sent_by_present = True + # Instance attribute type: str (validator is set below) + sent_to = bb.Attribute("sent_to") - @sent_by.deleter - def sent_by(self): - self._sent_by_value = None - self._sent_by_present = False + # Instance attribute type: str (validator is set below) + sent_by = bb.Attribute("sent_by") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestCanceledShownToSecondaryTeamDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestCanceledShownToSecondaryTeamDetails(sent_to={!r}, sent_by={!r})'.format( - self._sent_to_value, - self._sent_by_value, - ) - TeamMergeRequestCanceledShownToSecondaryTeamDetails_validator = bv.Struct(TeamMergeRequestCanceledShownToSecondaryTeamDetails) class TeamMergeRequestCanceledShownToSecondaryTeamType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestCanceledShownToSecondaryTeamType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestCanceledShownToSecondaryTeamType(description={!r})'.format( - self._description_value, - ) - TeamMergeRequestCanceledShownToSecondaryTeamType_validator = bv.Struct(TeamMergeRequestCanceledShownToSecondaryTeamType) class TeamMergeRequestCanceledType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestCanceledType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestCanceledType(description={!r})'.format( - self._description_value, - ) - TeamMergeRequestCanceledType_validator = bv.Struct(TeamMergeRequestCanceledType) class TeamMergeRequestExpiredDetails(bb.Struct): @@ -94612,49 +64057,22 @@ class TeamMergeRequestExpiredDetails(bb.Struct): __slots__ = [ '_request_expired_details_value', - '_request_expired_details_present', ] _has_required_fields = True def __init__(self, request_expired_details=None): - self._request_expired_details_value = None - self._request_expired_details_present = False + self._request_expired_details_value = bb.NOT_SET if request_expired_details is not None: self.request_expired_details = request_expired_details - @property - def request_expired_details(self): - """ - Team merge request expiration details. - - :rtype: TeamMergeRequestExpiredExtraDetails - """ - if self._request_expired_details_present: - return self._request_expired_details_value - else: - raise AttributeError("missing required field 'request_expired_details'") - - @request_expired_details.setter - def request_expired_details(self, val): - self._request_expired_details_validator.validate_type_only(val) - self._request_expired_details_value = val - self._request_expired_details_present = True - - @request_expired_details.deleter - def request_expired_details(self): - self._request_expired_details_value = None - self._request_expired_details_present = False + # Instance attribute type: TeamMergeRequestExpiredExtraDetails (validator is set below) + request_expired_details = bb.Attribute("request_expired_details", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestExpiredDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestExpiredDetails(request_expired_details={!r})'.format( - self._request_expired_details_value, - ) - TeamMergeRequestExpiredDetails_validator = bv.Struct(TeamMergeRequestExpiredDetails) class TeamMergeRequestExpiredExtraDetails(bb.Union): @@ -94750,9 +64168,6 @@ def get_secondary_team(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestExpiredExtraDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestExpiredExtraDetails(%r, %r)' % (self._tag, self._value) - TeamMergeRequestExpiredExtraDetails_validator = bv.Union(TeamMergeRequestExpiredExtraDetails) class TeamMergeRequestExpiredShownToPrimaryTeamDetails(bb.Struct): @@ -94768,9 +64183,7 @@ class TeamMergeRequestExpiredShownToPrimaryTeamDetails(bb.Struct): __slots__ = [ '_secondary_team_value', - '_secondary_team_present', '_sent_by_value', - '_sent_by_present', ] _has_required_fields = True @@ -94778,117 +64191,44 @@ class TeamMergeRequestExpiredShownToPrimaryTeamDetails(bb.Struct): def __init__(self, secondary_team=None, sent_by=None): - self._secondary_team_value = None - self._secondary_team_present = False - self._sent_by_value = None - self._sent_by_present = False + self._secondary_team_value = bb.NOT_SET + self._sent_by_value = bb.NOT_SET if secondary_team is not None: self.secondary_team = secondary_team if sent_by is not None: self.sent_by = sent_by - @property - def secondary_team(self): - """ - The secondary team name. - - :rtype: str - """ - if self._secondary_team_present: - return self._secondary_team_value - else: - raise AttributeError("missing required field 'secondary_team'") - - @secondary_team.setter - def secondary_team(self, val): - val = self._secondary_team_validator.validate(val) - self._secondary_team_value = val - self._secondary_team_present = True - - @secondary_team.deleter - def secondary_team(self): - self._secondary_team_value = None - self._secondary_team_present = False - - @property - def sent_by(self): - """ - The name of the secondary team admin who sent the request originally. - - :rtype: str - """ - if self._sent_by_present: - return self._sent_by_value - else: - raise AttributeError("missing required field 'sent_by'") - - @sent_by.setter - def sent_by(self, val): - val = self._sent_by_validator.validate(val) - self._sent_by_value = val - self._sent_by_present = True + # Instance attribute type: str (validator is set below) + secondary_team = bb.Attribute("secondary_team") - @sent_by.deleter - def sent_by(self): - self._sent_by_value = None - self._sent_by_present = False + # Instance attribute type: str (validator is set below) + sent_by = bb.Attribute("sent_by") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestExpiredShownToPrimaryTeamDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestExpiredShownToPrimaryTeamDetails(secondary_team={!r}, sent_by={!r})'.format( - self._secondary_team_value, - self._sent_by_value, - ) - TeamMergeRequestExpiredShownToPrimaryTeamDetails_validator = bv.Struct(TeamMergeRequestExpiredShownToPrimaryTeamDetails) class TeamMergeRequestExpiredShownToPrimaryTeamType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestExpiredShownToPrimaryTeamType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestExpiredShownToPrimaryTeamType(description={!r})'.format( - self._description_value, - ) - TeamMergeRequestExpiredShownToPrimaryTeamType_validator = bv.Struct(TeamMergeRequestExpiredShownToPrimaryTeamType) class TeamMergeRequestExpiredShownToSecondaryTeamDetails(bb.Struct): @@ -94901,143 +64241,66 @@ class TeamMergeRequestExpiredShownToSecondaryTeamDetails(bb.Struct): __slots__ = [ '_sent_to_value', - '_sent_to_present', ] _has_required_fields = True def __init__(self, sent_to=None): - self._sent_to_value = None - self._sent_to_present = False + self._sent_to_value = bb.NOT_SET if sent_to is not None: self.sent_to = sent_to - @property - def sent_to(self): - """ - The email of the primary team admin the request was sent to. - - :rtype: str - """ - if self._sent_to_present: - return self._sent_to_value - else: - raise AttributeError("missing required field 'sent_to'") - - @sent_to.setter - def sent_to(self, val): - val = self._sent_to_validator.validate(val) - self._sent_to_value = val - self._sent_to_present = True - - @sent_to.deleter - def sent_to(self): - self._sent_to_value = None - self._sent_to_present = False + # Instance attribute type: str (validator is set below) + sent_to = bb.Attribute("sent_to") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestExpiredShownToSecondaryTeamDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestExpiredShownToSecondaryTeamDetails(sent_to={!r})'.format( - self._sent_to_value, - ) - TeamMergeRequestExpiredShownToSecondaryTeamDetails_validator = bv.Struct(TeamMergeRequestExpiredShownToSecondaryTeamDetails) class TeamMergeRequestExpiredShownToSecondaryTeamType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestExpiredShownToSecondaryTeamType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestExpiredShownToSecondaryTeamType(description={!r})'.format( - self._description_value, - ) - TeamMergeRequestExpiredShownToSecondaryTeamType_validator = bv.Struct(TeamMergeRequestExpiredShownToSecondaryTeamType) class TeamMergeRequestExpiredType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestExpiredType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestExpiredType(description={!r})'.format( - self._description_value, - ) - TeamMergeRequestExpiredType_validator = bv.Struct(TeamMergeRequestExpiredType) class TeamMergeRequestRejectedShownToPrimaryTeamDetails(bb.Struct): @@ -95053,9 +64316,7 @@ class TeamMergeRequestRejectedShownToPrimaryTeamDetails(bb.Struct): __slots__ = [ '_secondary_team_value', - '_secondary_team_present', '_sent_by_value', - '_sent_by_present', ] _has_required_fields = True @@ -95063,117 +64324,44 @@ class TeamMergeRequestRejectedShownToPrimaryTeamDetails(bb.Struct): def __init__(self, secondary_team=None, sent_by=None): - self._secondary_team_value = None - self._secondary_team_present = False - self._sent_by_value = None - self._sent_by_present = False + self._secondary_team_value = bb.NOT_SET + self._sent_by_value = bb.NOT_SET if secondary_team is not None: self.secondary_team = secondary_team if sent_by is not None: self.sent_by = sent_by - @property - def secondary_team(self): - """ - The secondary team name. - - :rtype: str - """ - if self._secondary_team_present: - return self._secondary_team_value - else: - raise AttributeError("missing required field 'secondary_team'") - - @secondary_team.setter - def secondary_team(self, val): - val = self._secondary_team_validator.validate(val) - self._secondary_team_value = val - self._secondary_team_present = True - - @secondary_team.deleter - def secondary_team(self): - self._secondary_team_value = None - self._secondary_team_present = False - - @property - def sent_by(self): - """ - The name of the secondary team admin who sent the request originally. - - :rtype: str - """ - if self._sent_by_present: - return self._sent_by_value - else: - raise AttributeError("missing required field 'sent_by'") - - @sent_by.setter - def sent_by(self, val): - val = self._sent_by_validator.validate(val) - self._sent_by_value = val - self._sent_by_present = True + # Instance attribute type: str (validator is set below) + secondary_team = bb.Attribute("secondary_team") - @sent_by.deleter - def sent_by(self): - self._sent_by_value = None - self._sent_by_present = False + # Instance attribute type: str (validator is set below) + sent_by = bb.Attribute("sent_by") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestRejectedShownToPrimaryTeamDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestRejectedShownToPrimaryTeamDetails(secondary_team={!r}, sent_by={!r})'.format( - self._secondary_team_value, - self._sent_by_value, - ) - TeamMergeRequestRejectedShownToPrimaryTeamDetails_validator = bv.Struct(TeamMergeRequestRejectedShownToPrimaryTeamDetails) class TeamMergeRequestRejectedShownToPrimaryTeamType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestRejectedShownToPrimaryTeamType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestRejectedShownToPrimaryTeamType(description={!r})'.format( - self._description_value, - ) - TeamMergeRequestRejectedShownToPrimaryTeamType_validator = bv.Struct(TeamMergeRequestRejectedShownToPrimaryTeamType) class TeamMergeRequestRejectedShownToSecondaryTeamDetails(bb.Struct): @@ -95186,96 +64374,44 @@ class TeamMergeRequestRejectedShownToSecondaryTeamDetails(bb.Struct): __slots__ = [ '_sent_by_value', - '_sent_by_present', ] _has_required_fields = True def __init__(self, sent_by=None): - self._sent_by_value = None - self._sent_by_present = False + self._sent_by_value = bb.NOT_SET if sent_by is not None: self.sent_by = sent_by - @property - def sent_by(self): - """ - The name of the secondary team admin who sent the request originally. - - :rtype: str - """ - if self._sent_by_present: - return self._sent_by_value - else: - raise AttributeError("missing required field 'sent_by'") - - @sent_by.setter - def sent_by(self, val): - val = self._sent_by_validator.validate(val) - self._sent_by_value = val - self._sent_by_present = True - - @sent_by.deleter - def sent_by(self): - self._sent_by_value = None - self._sent_by_present = False + # Instance attribute type: str (validator is set below) + sent_by = bb.Attribute("sent_by") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestRejectedShownToSecondaryTeamDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestRejectedShownToSecondaryTeamDetails(sent_by={!r})'.format( - self._sent_by_value, - ) - TeamMergeRequestRejectedShownToSecondaryTeamDetails_validator = bv.Struct(TeamMergeRequestRejectedShownToSecondaryTeamDetails) class TeamMergeRequestRejectedShownToSecondaryTeamType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestRejectedShownToSecondaryTeamType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestRejectedShownToSecondaryTeamType(description={!r})'.format( - self._description_value, - ) - TeamMergeRequestRejectedShownToSecondaryTeamType_validator = bv.Struct(TeamMergeRequestRejectedShownToSecondaryTeamType) class TeamMergeRequestReminderDetails(bb.Struct): @@ -95288,49 +64424,22 @@ class TeamMergeRequestReminderDetails(bb.Struct): __slots__ = [ '_request_reminder_details_value', - '_request_reminder_details_present', ] _has_required_fields = True def __init__(self, request_reminder_details=None): - self._request_reminder_details_value = None - self._request_reminder_details_present = False + self._request_reminder_details_value = bb.NOT_SET if request_reminder_details is not None: self.request_reminder_details = request_reminder_details - @property - def request_reminder_details(self): - """ - Team merge request reminder details. - - :rtype: TeamMergeRequestReminderExtraDetails - """ - if self._request_reminder_details_present: - return self._request_reminder_details_value - else: - raise AttributeError("missing required field 'request_reminder_details'") - - @request_reminder_details.setter - def request_reminder_details(self, val): - self._request_reminder_details_validator.validate_type_only(val) - self._request_reminder_details_value = val - self._request_reminder_details_present = True - - @request_reminder_details.deleter - def request_reminder_details(self): - self._request_reminder_details_value = None - self._request_reminder_details_present = False + # Instance attribute type: TeamMergeRequestReminderExtraDetails (validator is set below) + request_reminder_details = bb.Attribute("request_reminder_details", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestReminderDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestReminderDetails(request_reminder_details={!r})'.format( - self._request_reminder_details_value, - ) - TeamMergeRequestReminderDetails_validator = bv.Struct(TeamMergeRequestReminderDetails) class TeamMergeRequestReminderExtraDetails(bb.Union): @@ -95426,9 +64535,6 @@ def get_secondary_team(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestReminderExtraDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestReminderExtraDetails(%r, %r)' % (self._tag, self._value) - TeamMergeRequestReminderExtraDetails_validator = bv.Union(TeamMergeRequestReminderExtraDetails) class TeamMergeRequestReminderShownToPrimaryTeamDetails(bb.Struct): @@ -95444,9 +64550,7 @@ class TeamMergeRequestReminderShownToPrimaryTeamDetails(bb.Struct): __slots__ = [ '_secondary_team_value', - '_secondary_team_present', '_sent_to_value', - '_sent_to_present', ] _has_required_fields = True @@ -95454,117 +64558,44 @@ class TeamMergeRequestReminderShownToPrimaryTeamDetails(bb.Struct): def __init__(self, secondary_team=None, sent_to=None): - self._secondary_team_value = None - self._secondary_team_present = False - self._sent_to_value = None - self._sent_to_present = False + self._secondary_team_value = bb.NOT_SET + self._sent_to_value = bb.NOT_SET if secondary_team is not None: self.secondary_team = secondary_team if sent_to is not None: self.sent_to = sent_to - @property - def secondary_team(self): - """ - The secondary team name. - - :rtype: str - """ - if self._secondary_team_present: - return self._secondary_team_value - else: - raise AttributeError("missing required field 'secondary_team'") - - @secondary_team.setter - def secondary_team(self, val): - val = self._secondary_team_validator.validate(val) - self._secondary_team_value = val - self._secondary_team_present = True + # Instance attribute type: str (validator is set below) + secondary_team = bb.Attribute("secondary_team") - @secondary_team.deleter - def secondary_team(self): - self._secondary_team_value = None - self._secondary_team_present = False - - @property - def sent_to(self): - """ - The name of the primary team admin the request was sent to. - - :rtype: str - """ - if self._sent_to_present: - return self._sent_to_value - else: - raise AttributeError("missing required field 'sent_to'") - - @sent_to.setter - def sent_to(self, val): - val = self._sent_to_validator.validate(val) - self._sent_to_value = val - self._sent_to_present = True - - @sent_to.deleter - def sent_to(self): - self._sent_to_value = None - self._sent_to_present = False + # Instance attribute type: str (validator is set below) + sent_to = bb.Attribute("sent_to") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestReminderShownToPrimaryTeamDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestReminderShownToPrimaryTeamDetails(secondary_team={!r}, sent_to={!r})'.format( - self._secondary_team_value, - self._sent_to_value, - ) - TeamMergeRequestReminderShownToPrimaryTeamDetails_validator = bv.Struct(TeamMergeRequestReminderShownToPrimaryTeamDetails) class TeamMergeRequestReminderShownToPrimaryTeamType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestReminderShownToPrimaryTeamType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestReminderShownToPrimaryTeamType(description={!r})'.format( - self._description_value, - ) - TeamMergeRequestReminderShownToPrimaryTeamType_validator = bv.Struct(TeamMergeRequestReminderShownToPrimaryTeamType) class TeamMergeRequestReminderShownToSecondaryTeamDetails(bb.Struct): @@ -95577,143 +64608,66 @@ class TeamMergeRequestReminderShownToSecondaryTeamDetails(bb.Struct): __slots__ = [ '_sent_to_value', - '_sent_to_present', ] _has_required_fields = True def __init__(self, sent_to=None): - self._sent_to_value = None - self._sent_to_present = False + self._sent_to_value = bb.NOT_SET if sent_to is not None: self.sent_to = sent_to - @property - def sent_to(self): - """ - The email of the primary team admin the request was sent to. - - :rtype: str - """ - if self._sent_to_present: - return self._sent_to_value - else: - raise AttributeError("missing required field 'sent_to'") - - @sent_to.setter - def sent_to(self, val): - val = self._sent_to_validator.validate(val) - self._sent_to_value = val - self._sent_to_present = True - - @sent_to.deleter - def sent_to(self): - self._sent_to_value = None - self._sent_to_present = False + # Instance attribute type: str (validator is set below) + sent_to = bb.Attribute("sent_to") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestReminderShownToSecondaryTeamDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestReminderShownToSecondaryTeamDetails(sent_to={!r})'.format( - self._sent_to_value, - ) - TeamMergeRequestReminderShownToSecondaryTeamDetails_validator = bv.Struct(TeamMergeRequestReminderShownToSecondaryTeamDetails) class TeamMergeRequestReminderShownToSecondaryTeamType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestReminderShownToSecondaryTeamType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestReminderShownToSecondaryTeamType(description={!r})'.format( - self._description_value, - ) - TeamMergeRequestReminderShownToSecondaryTeamType_validator = bv.Struct(TeamMergeRequestReminderShownToSecondaryTeamType) class TeamMergeRequestReminderType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestReminderType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestReminderType(description={!r})'.format( - self._description_value, - ) - TeamMergeRequestReminderType_validator = bv.Struct(TeamMergeRequestReminderType) class TeamMergeRequestRevokedDetails(bb.Struct): @@ -95726,96 +64680,44 @@ class TeamMergeRequestRevokedDetails(bb.Struct): __slots__ = [ '_team_value', - '_team_present', ] _has_required_fields = True def __init__(self, team=None): - self._team_value = None - self._team_present = False + self._team_value = bb.NOT_SET if team is not None: self.team = team - @property - def team(self): - """ - The name of the other team. - - :rtype: str - """ - if self._team_present: - return self._team_value - else: - raise AttributeError("missing required field 'team'") - - @team.setter - def team(self, val): - val = self._team_validator.validate(val) - self._team_value = val - self._team_present = True - - @team.deleter - def team(self): - self._team_value = None - self._team_present = False + # Instance attribute type: str (validator is set below) + team = bb.Attribute("team") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestRevokedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestRevokedDetails(team={!r})'.format( - self._team_value, - ) - TeamMergeRequestRevokedDetails_validator = bv.Struct(TeamMergeRequestRevokedDetails) class TeamMergeRequestRevokedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestRevokedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestRevokedType(description={!r})'.format( - self._description_value, - ) - TeamMergeRequestRevokedType_validator = bv.Struct(TeamMergeRequestRevokedType) class TeamMergeRequestSentShownToPrimaryTeamDetails(bb.Struct): @@ -95830,9 +64732,7 @@ class TeamMergeRequestSentShownToPrimaryTeamDetails(bb.Struct): __slots__ = [ '_secondary_team_value', - '_secondary_team_present', '_sent_to_value', - '_sent_to_present', ] _has_required_fields = True @@ -95840,117 +64740,44 @@ class TeamMergeRequestSentShownToPrimaryTeamDetails(bb.Struct): def __init__(self, secondary_team=None, sent_to=None): - self._secondary_team_value = None - self._secondary_team_present = False - self._sent_to_value = None - self._sent_to_present = False + self._secondary_team_value = bb.NOT_SET + self._sent_to_value = bb.NOT_SET if secondary_team is not None: self.secondary_team = secondary_team if sent_to is not None: self.sent_to = sent_to - @property - def secondary_team(self): - """ - The secondary team name. - - :rtype: str - """ - if self._secondary_team_present: - return self._secondary_team_value - else: - raise AttributeError("missing required field 'secondary_team'") - - @secondary_team.setter - def secondary_team(self, val): - val = self._secondary_team_validator.validate(val) - self._secondary_team_value = val - self._secondary_team_present = True - - @secondary_team.deleter - def secondary_team(self): - self._secondary_team_value = None - self._secondary_team_present = False - - @property - def sent_to(self): - """ - The name of the primary team admin the request was sent to. - - :rtype: str - """ - if self._sent_to_present: - return self._sent_to_value - else: - raise AttributeError("missing required field 'sent_to'") - - @sent_to.setter - def sent_to(self, val): - val = self._sent_to_validator.validate(val) - self._sent_to_value = val - self._sent_to_present = True + # Instance attribute type: str (validator is set below) + secondary_team = bb.Attribute("secondary_team") - @sent_to.deleter - def sent_to(self): - self._sent_to_value = None - self._sent_to_present = False + # Instance attribute type: str (validator is set below) + sent_to = bb.Attribute("sent_to") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestSentShownToPrimaryTeamDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestSentShownToPrimaryTeamDetails(secondary_team={!r}, sent_to={!r})'.format( - self._secondary_team_value, - self._sent_to_value, - ) - TeamMergeRequestSentShownToPrimaryTeamDetails_validator = bv.Struct(TeamMergeRequestSentShownToPrimaryTeamDetails) class TeamMergeRequestSentShownToPrimaryTeamType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestSentShownToPrimaryTeamType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestSentShownToPrimaryTeamType(description={!r})'.format( - self._description_value, - ) - TeamMergeRequestSentShownToPrimaryTeamType_validator = bv.Struct(TeamMergeRequestSentShownToPrimaryTeamType) class TeamMergeRequestSentShownToSecondaryTeamDetails(bb.Struct): @@ -95963,96 +64790,44 @@ class TeamMergeRequestSentShownToSecondaryTeamDetails(bb.Struct): __slots__ = [ '_sent_to_value', - '_sent_to_present', ] _has_required_fields = True def __init__(self, sent_to=None): - self._sent_to_value = None - self._sent_to_present = False + self._sent_to_value = bb.NOT_SET if sent_to is not None: self.sent_to = sent_to - @property - def sent_to(self): - """ - The email of the primary team admin the request was sent to. - - :rtype: str - """ - if self._sent_to_present: - return self._sent_to_value - else: - raise AttributeError("missing required field 'sent_to'") - - @sent_to.setter - def sent_to(self, val): - val = self._sent_to_validator.validate(val) - self._sent_to_value = val - self._sent_to_present = True - - @sent_to.deleter - def sent_to(self): - self._sent_to_value = None - self._sent_to_present = False + # Instance attribute type: str (validator is set below) + sent_to = bb.Attribute("sent_to") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestSentShownToSecondaryTeamDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestSentShownToSecondaryTeamDetails(sent_to={!r})'.format( - self._sent_to_value, - ) - TeamMergeRequestSentShownToSecondaryTeamDetails_validator = bv.Struct(TeamMergeRequestSentShownToSecondaryTeamDetails) class TeamMergeRequestSentShownToSecondaryTeamType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeRequestSentShownToSecondaryTeamType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeRequestSentShownToSecondaryTeamType(description={!r})'.format( - self._description_value, - ) - TeamMergeRequestSentShownToSecondaryTeamType_validator = bv.Struct(TeamMergeRequestSentShownToSecondaryTeamType) class TeamMergeToDetails(bb.Struct): @@ -96065,96 +64840,44 @@ class TeamMergeToDetails(bb.Struct): __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 + self._team_name_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + team_name = bb.Attribute("team_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeToDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeToDetails(team_name={!r})'.format( - self._team_name_value, - ) - TeamMergeToDetails_validator = bv.Struct(TeamMergeToDetails) class TeamMergeToType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMergeToType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMergeToType(description={!r})'.format( - self._description_value, - ) - TeamMergeToType_validator = bv.Struct(TeamMergeToType) class TeamName(bb.Struct): @@ -96167,9 +64890,7 @@ class TeamName(bb.Struct): __slots__ = [ '_team_display_name_value', - '_team_display_name_present', '_team_legal_name_value', - '_team_legal_name_present', ] _has_required_fields = True @@ -96177,70 +64898,22 @@ class TeamName(bb.Struct): 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 + self._team_display_name_value = bb.NOT_SET + self._team_legal_name_value = bb.NOT_SET 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'") + # Instance attribute type: str (validator is set below) + team_display_name = bb.Attribute("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 + # Instance attribute type: str (validator is set below) + team_legal_name = bb.Attribute("team_legal_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamName, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 TeamProfileAddBackgroundDetails(bb.Struct): @@ -96259,56 +64932,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamProfileAddBackgroundDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamProfileAddBackgroundDetails()' - TeamProfileAddBackgroundDetails_validator = bv.Struct(TeamProfileAddBackgroundDetails) class TeamProfileAddBackgroundType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamProfileAddBackgroundType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamProfileAddBackgroundType(description={!r})'.format( - self._description_value, - ) - TeamProfileAddBackgroundType_validator = bv.Struct(TeamProfileAddBackgroundType) class TeamProfileAddLogoDetails(bb.Struct): @@ -96327,56 +64972,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamProfileAddLogoDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamProfileAddLogoDetails()' - TeamProfileAddLogoDetails_validator = bv.Struct(TeamProfileAddLogoDetails) class TeamProfileAddLogoType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamProfileAddLogoType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamProfileAddLogoType(description={!r})'.format( - self._description_value, - ) - TeamProfileAddLogoType_validator = bv.Struct(TeamProfileAddLogoType) class TeamProfileChangeBackgroundDetails(bb.Struct): @@ -96395,56 +65012,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamProfileChangeBackgroundDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamProfileChangeBackgroundDetails()' - TeamProfileChangeBackgroundDetails_validator = bv.Struct(TeamProfileChangeBackgroundDetails) class TeamProfileChangeBackgroundType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamProfileChangeBackgroundType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamProfileChangeBackgroundType(description={!r})'.format( - self._description_value, - ) - TeamProfileChangeBackgroundType_validator = bv.Struct(TeamProfileChangeBackgroundType) class TeamProfileChangeDefaultLanguageDetails(bb.Struct): @@ -96459,9 +65048,7 @@ class TeamProfileChangeDefaultLanguageDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -96469,117 +65056,44 @@ class TeamProfileChangeDefaultLanguageDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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'") + # Instance attribute type: str (validator is set below) + new_value = bb.Attribute("new_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 + # Instance attribute type: str (validator is set below) + previous_value = bb.Attribute("previous_value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamProfileChangeDefaultLanguageDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 TeamProfileChangeDefaultLanguageType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamProfileChangeDefaultLanguageType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamProfileChangeDefaultLanguageType(description={!r})'.format( - self._description_value, - ) - TeamProfileChangeDefaultLanguageType_validator = bv.Struct(TeamProfileChangeDefaultLanguageType) class TeamProfileChangeLogoDetails(bb.Struct): @@ -96598,56 +65112,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamProfileChangeLogoDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamProfileChangeLogoDetails()' - TeamProfileChangeLogoDetails_validator = bv.Struct(TeamProfileChangeLogoDetails) class TeamProfileChangeLogoType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamProfileChangeLogoType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamProfileChangeLogoType(description={!r})'.format( - self._description_value, - ) - TeamProfileChangeLogoType_validator = bv.Struct(TeamProfileChangeLogoType) class TeamProfileChangeNameDetails(bb.Struct): @@ -96661,9 +65147,7 @@ class TeamProfileChangeNameDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -96671,120 +65155,44 @@ class TeamProfileChangeNameDetails(bb.Struct): 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 + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET 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 + # Instance attribute type: TeamName (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False + # Instance attribute type: TeamName (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamProfileChangeNameDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 TeamProfileChangeNameType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamProfileChangeNameType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamProfileChangeNameType(description={!r})'.format( - self._description_value, - ) - TeamProfileChangeNameType_validator = bv.Struct(TeamProfileChangeNameType) class TeamProfileRemoveBackgroundDetails(bb.Struct): @@ -96803,56 +65211,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamProfileRemoveBackgroundDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamProfileRemoveBackgroundDetails()' - TeamProfileRemoveBackgroundDetails_validator = bv.Struct(TeamProfileRemoveBackgroundDetails) class TeamProfileRemoveBackgroundType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamProfileRemoveBackgroundType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamProfileRemoveBackgroundType(description={!r})'.format( - self._description_value, - ) - TeamProfileRemoveBackgroundType_validator = bv.Struct(TeamProfileRemoveBackgroundType) class TeamProfileRemoveLogoDetails(bb.Struct): @@ -96871,56 +65251,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamProfileRemoveLogoDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamProfileRemoveLogoDetails()' - TeamProfileRemoveLogoDetails_validator = bv.Struct(TeamProfileRemoveLogoDetails) class TeamProfileRemoveLogoType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamProfileRemoveLogoType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamProfileRemoveLogoType(description={!r})'.format( - self._description_value, - ) - TeamProfileRemoveLogoType_validator = bv.Struct(TeamProfileRemoveLogoType) class TeamSelectiveSyncPolicy(bb.Union): @@ -96967,9 +65319,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamSelectiveSyncPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamSelectiveSyncPolicy(%r, %r)' % (self._tag, self._value) - TeamSelectiveSyncPolicy_validator = bv.Union(TeamSelectiveSyncPolicy) class TeamSelectiveSyncPolicyChangedDetails(bb.Struct): @@ -96984,9 +65333,7 @@ class TeamSelectiveSyncPolicyChangedDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -96994,117 +65341,44 @@ class TeamSelectiveSyncPolicyChangedDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 Selective Sync policy. - - :rtype: TeamSelectiveSyncPolicy - """ - 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 Selective Sync policy. - - :rtype: TeamSelectiveSyncPolicy - """ - if self._previous_value_present: - return self._previous_value_value - else: - raise AttributeError("missing required field 'previous_value'") + # Instance attribute type: TeamSelectiveSyncPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @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 + # Instance attribute type: TeamSelectiveSyncPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamSelectiveSyncPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamSelectiveSyncPolicyChangedDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - TeamSelectiveSyncPolicyChangedDetails_validator = bv.Struct(TeamSelectiveSyncPolicyChangedDetails) class TeamSelectiveSyncPolicyChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamSelectiveSyncPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamSelectiveSyncPolicyChangedType(description={!r})'.format( - self._description_value, - ) - TeamSelectiveSyncPolicyChangedType_validator = bv.Struct(TeamSelectiveSyncPolicyChangedType) class TeamSelectiveSyncSettingsChangedDetails(bb.Struct): @@ -97118,9 +65392,7 @@ class TeamSelectiveSyncSettingsChangedDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -97128,117 +65400,44 @@ class TeamSelectiveSyncSettingsChangedDetails(bb.Struct): 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 + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET 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 value. - - :rtype: files.SyncSetting - """ - 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 value. - - :rtype: files.SyncSetting - """ - 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 + # Instance attribute type: files.SyncSetting (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False + # Instance attribute type: files.SyncSetting (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamSelectiveSyncSettingsChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamSelectiveSyncSettingsChangedDetails(previous_value={!r}, new_value={!r})'.format( - self._previous_value_value, - self._new_value_value, - ) - TeamSelectiveSyncSettingsChangedDetails_validator = bv.Struct(TeamSelectiveSyncSettingsChangedDetails) class TeamSelectiveSyncSettingsChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamSelectiveSyncSettingsChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamSelectiveSyncSettingsChangedType(description={!r})'.format( - self._description_value, - ) - TeamSelectiveSyncSettingsChangedType_validator = bv.Struct(TeamSelectiveSyncSettingsChangedType) class TeamSharingWhitelistSubjectsChangedDetails(bb.Struct): @@ -97255,9 +65454,7 @@ class TeamSharingWhitelistSubjectsChangedDetails(bb.Struct): __slots__ = [ '_added_whitelist_subjects_value', - '_added_whitelist_subjects_present', '_removed_whitelist_subjects_value', - '_removed_whitelist_subjects_present', ] _has_required_fields = True @@ -97265,117 +65462,44 @@ class TeamSharingWhitelistSubjectsChangedDetails(bb.Struct): def __init__(self, added_whitelist_subjects=None, removed_whitelist_subjects=None): - self._added_whitelist_subjects_value = None - self._added_whitelist_subjects_present = False - self._removed_whitelist_subjects_value = None - self._removed_whitelist_subjects_present = False + self._added_whitelist_subjects_value = bb.NOT_SET + self._removed_whitelist_subjects_value = bb.NOT_SET if added_whitelist_subjects is not None: self.added_whitelist_subjects = added_whitelist_subjects if removed_whitelist_subjects is not None: self.removed_whitelist_subjects = removed_whitelist_subjects - @property - def added_whitelist_subjects(self): - """ - Domains or emails added to the approved list for sharing externally. - - :rtype: list of [str] - """ - if self._added_whitelist_subjects_present: - return self._added_whitelist_subjects_value - else: - raise AttributeError("missing required field 'added_whitelist_subjects'") - - @added_whitelist_subjects.setter - def added_whitelist_subjects(self, val): - val = self._added_whitelist_subjects_validator.validate(val) - self._added_whitelist_subjects_value = val - self._added_whitelist_subjects_present = True - - @added_whitelist_subjects.deleter - def added_whitelist_subjects(self): - self._added_whitelist_subjects_value = None - self._added_whitelist_subjects_present = False - - @property - def removed_whitelist_subjects(self): - """ - Domains or emails removed from the approved list for sharing externally. + # Instance attribute type: list of [str] (validator is set below) + added_whitelist_subjects = bb.Attribute("added_whitelist_subjects") - :rtype: list of [str] - """ - if self._removed_whitelist_subjects_present: - return self._removed_whitelist_subjects_value - else: - raise AttributeError("missing required field 'removed_whitelist_subjects'") - - @removed_whitelist_subjects.setter - def removed_whitelist_subjects(self, val): - val = self._removed_whitelist_subjects_validator.validate(val) - self._removed_whitelist_subjects_value = val - self._removed_whitelist_subjects_present = True - - @removed_whitelist_subjects.deleter - def removed_whitelist_subjects(self): - self._removed_whitelist_subjects_value = None - self._removed_whitelist_subjects_present = False + # Instance attribute type: list of [str] (validator is set below) + removed_whitelist_subjects = bb.Attribute("removed_whitelist_subjects") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamSharingWhitelistSubjectsChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamSharingWhitelistSubjectsChangedDetails(added_whitelist_subjects={!r}, removed_whitelist_subjects={!r})'.format( - self._added_whitelist_subjects_value, - self._removed_whitelist_subjects_value, - ) - TeamSharingWhitelistSubjectsChangedDetails_validator = bv.Struct(TeamSharingWhitelistSubjectsChangedDetails) class TeamSharingWhitelistSubjectsChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamSharingWhitelistSubjectsChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamSharingWhitelistSubjectsChangedType(description={!r})'.format( - self._description_value, - ) - TeamSharingWhitelistSubjectsChangedType_validator = bv.Struct(TeamSharingWhitelistSubjectsChangedType) class TfaAddBackupPhoneDetails(bb.Struct): @@ -97394,56 +65518,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TfaAddBackupPhoneDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TfaAddBackupPhoneDetails()' - TfaAddBackupPhoneDetails_validator = bv.Struct(TfaAddBackupPhoneDetails) class TfaAddBackupPhoneType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TfaAddBackupPhoneType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TfaAddBackupPhoneType(description={!r})'.format( - self._description_value, - ) - TfaAddBackupPhoneType_validator = bv.Struct(TfaAddBackupPhoneType) class TfaAddExceptionDetails(bb.Struct): @@ -97462,56 +65558,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TfaAddExceptionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TfaAddExceptionDetails()' - TfaAddExceptionDetails_validator = bv.Struct(TfaAddExceptionDetails) class TfaAddExceptionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TfaAddExceptionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TfaAddExceptionType(description={!r})'.format( - self._description_value, - ) - TfaAddExceptionType_validator = bv.Struct(TfaAddExceptionType) class TfaAddSecurityKeyDetails(bb.Struct): @@ -97530,56 +65598,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TfaAddSecurityKeyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TfaAddSecurityKeyDetails()' - TfaAddSecurityKeyDetails_validator = bv.Struct(TfaAddSecurityKeyDetails) class TfaAddSecurityKeyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TfaAddSecurityKeyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TfaAddSecurityKeyType(description={!r})'.format( - self._description_value, - ) - TfaAddSecurityKeyType_validator = bv.Struct(TfaAddSecurityKeyType) class TfaChangeBackupPhoneDetails(bb.Struct): @@ -97598,56 +65638,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TfaChangeBackupPhoneDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TfaChangeBackupPhoneDetails()' - TfaChangeBackupPhoneDetails_validator = bv.Struct(TfaChangeBackupPhoneDetails) class TfaChangeBackupPhoneType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TfaChangeBackupPhoneType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TfaChangeBackupPhoneType(description={!r})'.format( - self._description_value, - ) - TfaChangeBackupPhoneType_validator = bv.Struct(TfaChangeBackupPhoneType) class TfaChangePolicyDetails(bb.Struct): @@ -97661,9 +65673,7 @@ class TfaChangePolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -97671,120 +65681,44 @@ class TfaChangePolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 - """ - 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 - """ - 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 + # Instance attribute type: team_policies.TwoStepVerificationPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @previous_value.deleter - def previous_value(self): - self._previous_value_value = None - self._previous_value_present = False + # Instance attribute type: team_policies.TwoStepVerificationPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TfaChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 TfaChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TfaChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TfaChangePolicyType(description={!r})'.format( - self._description_value, - ) - TfaChangePolicyType_validator = bv.Struct(TfaChangePolicyType) class TfaChangeStatusDetails(bb.Struct): @@ -97803,11 +65737,8 @@ class TfaChangeStatusDetails(bb.Struct): __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 @@ -97816,12 +65747,9 @@ 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + self._used_rescue_code_value = bb.NOT_SET if new_value is not None: self.new_value = new_value if previous_value is not None: @@ -97829,140 +65757,40 @@ def __init__(self, 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'") + # Instance attribute type: TfaConfiguration (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - @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 + # Instance attribute type: TfaConfiguration (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=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 + # Instance attribute type: bool (validator is set below) + used_rescue_code = bb.Attribute("used_rescue_code", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TfaChangeStatusDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 TfaChangeStatusType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TfaChangeStatusType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TfaChangeStatusType(description={!r})'.format( - self._description_value, - ) - TfaChangeStatusType_validator = bv.Struct(TfaChangeStatusType) class TfaConfiguration(bb.Union): @@ -98030,9 +65858,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TfaConfiguration, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TfaConfiguration(%r, %r)' % (self._tag, self._value) - TfaConfiguration_validator = bv.Union(TfaConfiguration) class TfaRemoveBackupPhoneDetails(bb.Struct): @@ -98051,56 +65876,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TfaRemoveBackupPhoneDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TfaRemoveBackupPhoneDetails()' - TfaRemoveBackupPhoneDetails_validator = bv.Struct(TfaRemoveBackupPhoneDetails) class TfaRemoveBackupPhoneType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TfaRemoveBackupPhoneType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TfaRemoveBackupPhoneType(description={!r})'.format( - self._description_value, - ) - TfaRemoveBackupPhoneType_validator = bv.Struct(TfaRemoveBackupPhoneType) class TfaRemoveExceptionDetails(bb.Struct): @@ -98119,56 +65916,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TfaRemoveExceptionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TfaRemoveExceptionDetails()' - TfaRemoveExceptionDetails_validator = bv.Struct(TfaRemoveExceptionDetails) class TfaRemoveExceptionType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TfaRemoveExceptionType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TfaRemoveExceptionType(description={!r})'.format( - self._description_value, - ) - TfaRemoveExceptionType_validator = bv.Struct(TfaRemoveExceptionType) class TfaRemoveSecurityKeyDetails(bb.Struct): @@ -98187,56 +65956,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TfaRemoveSecurityKeyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TfaRemoveSecurityKeyDetails()' - TfaRemoveSecurityKeyDetails_validator = bv.Struct(TfaRemoveSecurityKeyDetails) class TfaRemoveSecurityKeyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TfaRemoveSecurityKeyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TfaRemoveSecurityKeyType(description={!r})'.format( - self._description_value, - ) - TfaRemoveSecurityKeyType_validator = bv.Struct(TfaRemoveSecurityKeyType) class TfaResetDetails(bb.Struct): @@ -98255,56 +65996,28 @@ def __init__(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TfaResetDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TfaResetDetails()' - TfaResetDetails_validator = bv.Struct(TfaResetDetails) class TfaResetType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TfaResetType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TfaResetType(description={!r})'.format( - self._description_value, - ) - TfaResetType_validator = bv.Struct(TfaResetType) class TimeUnit(bb.Union): @@ -98409,9 +66122,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TimeUnit, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TimeUnit(%r, %r)' % (self._tag, self._value) - TimeUnit_validator = bv.Union(TimeUnit) class TrustedNonTeamMemberLogInfo(UserLogInfo): @@ -98426,9 +66136,7 @@ class TrustedNonTeamMemberLogInfo(UserLogInfo): __slots__ = [ '_trusted_non_team_member_type_value', - '_trusted_non_team_member_type_present', '_team_value', - '_team_present', ] _has_required_fields = True @@ -98442,76 +66150,22 @@ def __init__(self, super(TrustedNonTeamMemberLogInfo, self).__init__(account_id, display_name, email) - self._trusted_non_team_member_type_value = None - self._trusted_non_team_member_type_present = False - self._team_value = None - self._team_present = False + self._trusted_non_team_member_type_value = bb.NOT_SET + self._team_value = bb.NOT_SET if trusted_non_team_member_type is not None: self.trusted_non_team_member_type = trusted_non_team_member_type if team is not None: self.team = team - @property - def trusted_non_team_member_type(self): - """ - Indicates the type of the member of a trusted team. - - :rtype: TrustedNonTeamMemberType - """ - if self._trusted_non_team_member_type_present: - return self._trusted_non_team_member_type_value - else: - raise AttributeError("missing required field 'trusted_non_team_member_type'") - - @trusted_non_team_member_type.setter - def trusted_non_team_member_type(self, val): - self._trusted_non_team_member_type_validator.validate_type_only(val) - self._trusted_non_team_member_type_value = val - self._trusted_non_team_member_type_present = True + # Instance attribute type: TrustedNonTeamMemberType (validator is set below) + trusted_non_team_member_type = bb.Attribute("trusted_non_team_member_type", user_defined=True) - @trusted_non_team_member_type.deleter - def trusted_non_team_member_type(self): - self._trusted_non_team_member_type_value = None - self._trusted_non_team_member_type_present = False - - @property - def team(self): - """ - Details about this user's trusted team. - - :rtype: TeamLogInfo - """ - 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 + # Instance attribute type: TeamLogInfo (validator is set below) + team = bb.Attribute("team", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TrustedNonTeamMemberLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TrustedNonTeamMemberLogInfo(trusted_non_team_member_type={!r}, account_id={!r}, display_name={!r}, email={!r}, team={!r})'.format( - self._trusted_non_team_member_type_value, - self._account_id_value, - self._display_name_value, - self._email_value, - self._team_value, - ) - TrustedNonTeamMemberLogInfo_validator = bv.Struct(TrustedNonTeamMemberLogInfo) class TrustedNonTeamMemberType(bb.Union): @@ -98556,9 +66210,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TrustedNonTeamMemberType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TrustedNonTeamMemberType(%r, %r)' % (self._tag, self._value) - TrustedNonTeamMemberType_validator = bv.Union(TrustedNonTeamMemberType) class TrustedTeamsRequestAction(bb.Union): @@ -98633,9 +66284,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TrustedTeamsRequestAction, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TrustedTeamsRequestAction(%r, %r)' % (self._tag, self._value) - TrustedTeamsRequestAction_validator = bv.Union(TrustedTeamsRequestAction) class TrustedTeamsRequestState(bb.Union): @@ -98690,9 +66338,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TrustedTeamsRequestState, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TrustedTeamsRequestState(%r, %r)' % (self._tag, self._value) - TrustedTeamsRequestState_validator = bv.Union(TrustedTeamsRequestState) class TwoAccountChangePolicyDetails(bb.Struct): @@ -98708,9 +66353,7 @@ class TwoAccountChangePolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -98718,121 +66361,44 @@ class TwoAccountChangePolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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. + # Instance attribute type: TwoAccountPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - :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 + # Instance attribute type: TwoAccountPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TwoAccountChangePolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 TwoAccountChangePolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TwoAccountChangePolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TwoAccountChangePolicyType(description={!r})'.format( - self._description_value, - ) - TwoAccountChangePolicyType_validator = bv.Struct(TwoAccountChangePolicyType) class TwoAccountPolicy(bb.Union): @@ -98879,9 +66445,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TwoAccountPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TwoAccountPolicy(%r, %r)' % (self._tag, self._value) - TwoAccountPolicy_validator = bv.Union(TwoAccountPolicy) class UserLinkedAppLogInfo(AppLogInfo): @@ -98903,12 +66466,6 @@ def __init__(self, def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserLinkedAppLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -98923,11 +66480,8 @@ class UserNameLogInfo(bb.Struct): __slots__ = [ '_given_name_value', - '_given_name_present', '_surname_value', - '_surname_present', '_locale_value', - '_locale_present', ] _has_required_fields = True @@ -98936,12 +66490,9 @@ 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 + self._given_name_value = bb.NOT_SET + self._surname_value = bb.NOT_SET + self._locale_value = bb.NOT_SET if given_name is not None: self.given_name = given_name if surname is not None: @@ -98949,88 +66500,18 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + given_name = bb.Attribute("given_name") - @given_name.deleter - def given_name(self): - self._given_name_value = None - self._given_name_present = False + # Instance attribute type: str (validator is set below) + surname = bb.Attribute("surname") - @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 + # Instance attribute type: str (validator is set below) + locale = bb.Attribute("locale", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserNameLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -99053,12 +66534,6 @@ def __init__(self, def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserOrTeamLinkedAppLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 ViewerInfoPolicyChangedDetails(bb.Struct): @@ -99073,9 +66548,7 @@ class ViewerInfoPolicyChangedDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -99083,117 +66556,44 @@ class ViewerInfoPolicyChangedDetails(bb.Struct): 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 + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET 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 Viewer Info policy. + # Instance attribute type: PassPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) - :rtype: PassPolicy - """ - 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 Viewer Info policy. - - :rtype: PassPolicy - """ - 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 + # Instance attribute type: PassPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(ViewerInfoPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ViewerInfoPolicyChangedDetails(previous_value={!r}, new_value={!r})'.format( - self._previous_value_value, - self._new_value_value, - ) - ViewerInfoPolicyChangedDetails_validator = bv.Struct(ViewerInfoPolicyChangedDetails) class ViewerInfoPolicyChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(ViewerInfoPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ViewerInfoPolicyChangedType(description={!r})'.format( - self._description_value, - ) - ViewerInfoPolicyChangedType_validator = bv.Struct(ViewerInfoPolicyChangedType) class WatermarkingPolicy(bb.Union): @@ -99240,9 +66640,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(WatermarkingPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'WatermarkingPolicy(%r, %r)' % (self._tag, self._value) - WatermarkingPolicy_validator = bv.Union(WatermarkingPolicy) class WatermarkingPolicyChangedDetails(bb.Struct): @@ -99257,9 +66654,7 @@ class WatermarkingPolicyChangedDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = True @@ -99267,117 +66662,44 @@ class WatermarkingPolicyChangedDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 watermarking policy. + # Instance attribute type: WatermarkingPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) - :rtype: WatermarkingPolicy - """ - 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 watermarking policy. - - :rtype: WatermarkingPolicy - """ - 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 + # Instance attribute type: WatermarkingPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(WatermarkingPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'WatermarkingPolicyChangedDetails(new_value={!r}, previous_value={!r})'.format( - self._new_value_value, - self._previous_value_value, - ) - WatermarkingPolicyChangedDetails_validator = bv.Struct(WatermarkingPolicyChangedDetails) class WatermarkingPolicyChangedType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(WatermarkingPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'WatermarkingPolicyChangedType(description={!r})'.format( - self._description_value, - ) - WatermarkingPolicyChangedType_validator = bv.Struct(WatermarkingPolicyChangedType) class WebDeviceSessionLogInfo(DeviceSessionLogInfo): @@ -99396,13 +66718,9 @@ class WebDeviceSessionLogInfo(DeviceSessionLogInfo): __slots__ = [ '_session_info_value', - '_session_info_present', '_user_agent_value', - '_user_agent_present', '_os_value', - '_os_present', '_browser_value', - '_browser_present', ] _has_required_fields = True @@ -99418,14 +66736,10 @@ def __init__(self, super(WebDeviceSessionLogInfo, self).__init__(ip_address, created, updated) - self._session_info_value = None - self._session_info_present = False - 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._session_info_value = bb.NOT_SET + self._user_agent_value = bb.NOT_SET + self._os_value = bb.NOT_SET + self._browser_value = bb.NOT_SET if session_info is not None: self.session_info = session_info if user_agent is not None: @@ -99435,115 +66749,21 @@ def __init__(self, if browser is not None: self.browser = browser - @property - def session_info(self): - """ - Web session unique id. Might be missing due to historical data gap. + # Instance attribute type: WebSessionLogInfo (validator is set below) + session_info = bb.Attribute("session_info", nullable=True, user_defined=True) - :rtype: WebSessionLogInfo - """ - if self._session_info_present: - return self._session_info_value - else: - return None - - @session_info.setter - def session_info(self, val): - if val is None: - del self.session_info - return - self._session_info_validator.validate_type_only(val) - self._session_info_value = val - self._session_info_present = True + # Instance attribute type: str (validator is set below) + user_agent = bb.Attribute("user_agent") - @session_info.deleter - def session_info(self): - self._session_info_value = None - self._session_info_present = False - - @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'") + # Instance attribute type: str (validator is set below) + os = bb.Attribute("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 + # Instance attribute type: str (validator is set below) + browser = bb.Attribute("browser") def _process_custom_annotations(self, annotation_type, field_path, processor): super(WebDeviceSessionLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'WebDeviceSessionLogInfo(user_agent={!r}, os={!r}, browser={!r}, ip_address={!r}, created={!r}, updated={!r}, session_info={!r})'.format( - self._user_agent_value, - self._os_value, - self._browser_value, - self._ip_address_value, - self._created_value, - self._updated_value, - self._session_info_value, - ) - WebDeviceSessionLogInfo_validator = bv.Struct(WebDeviceSessionLogInfo) class WebSessionLogInfo(SessionLogInfo): @@ -99563,11 +66783,6 @@ def __init__(self, def _process_custom_annotations(self, annotation_type, field_path, processor): super(WebSessionLogInfo, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'WebSessionLogInfo(session_id={!r})'.format( - self._session_id_value, - ) - WebSessionLogInfo_validator = bv.Struct(WebSessionLogInfo) class WebSessionsChangeActiveSessionLimitDetails(bb.Struct): @@ -99582,9 +66797,7 @@ class WebSessionsChangeActiveSessionLimitDetails(bb.Struct): __slots__ = [ '_previous_value_value', - '_previous_value_present', '_new_value_value', - '_new_value_present', ] _has_required_fields = True @@ -99592,117 +66805,44 @@ class WebSessionsChangeActiveSessionLimitDetails(bb.Struct): 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 + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET 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 max number of concurrent active sessions policy. - - :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 max number of concurrent active sessions policy. - - :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 + # Instance attribute type: str (validator is set below) + previous_value = bb.Attribute("previous_value") - @new_value.deleter - def new_value(self): - self._new_value_value = None - self._new_value_present = False + # Instance attribute type: str (validator is set below) + new_value = bb.Attribute("new_value") def _process_custom_annotations(self, annotation_type, field_path, processor): super(WebSessionsChangeActiveSessionLimitDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'WebSessionsChangeActiveSessionLimitDetails(previous_value={!r}, new_value={!r})'.format( - self._previous_value_value, - self._new_value_value, - ) - WebSessionsChangeActiveSessionLimitDetails_validator = bv.Struct(WebSessionsChangeActiveSessionLimitDetails) class WebSessionsChangeActiveSessionLimitType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(WebSessionsChangeActiveSessionLimitType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'WebSessionsChangeActiveSessionLimitType(description={!r})'.format( - self._description_value, - ) - WebSessionsChangeActiveSessionLimitType_validator = bv.Struct(WebSessionsChangeActiveSessionLimitType) class WebSessionsChangeFixedLengthPolicyDetails(bb.Struct): @@ -99718,9 +66858,7 @@ class WebSessionsChangeFixedLengthPolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = False @@ -99728,124 +66866,44 @@ class WebSessionsChangeFixedLengthPolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: WebSessionsFixedLengthPolicy (validator is set below) + new_value = bb.Attribute("new_value", nullable=True, user_defined=True) - @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 + # Instance attribute type: WebSessionsFixedLengthPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(WebSessionsChangeFixedLengthPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 WebSessionsChangeFixedLengthPolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(WebSessionsChangeFixedLengthPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'WebSessionsChangeFixedLengthPolicyType(description={!r})'.format( - self._description_value, - ) - WebSessionsChangeFixedLengthPolicyType_validator = bv.Struct(WebSessionsChangeFixedLengthPolicyType) class WebSessionsChangeIdleLengthPolicyDetails(bb.Struct): @@ -99861,9 +66919,7 @@ class WebSessionsChangeIdleLengthPolicyDetails(bb.Struct): __slots__ = [ '_new_value_value', - '_new_value_present', '_previous_value_value', - '_previous_value_present', ] _has_required_fields = False @@ -99871,124 +66927,44 @@ class WebSessionsChangeIdleLengthPolicyDetails(bb.Struct): 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 + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET 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 + # Instance attribute type: WebSessionsIdleLengthPolicy (validator is set below) + new_value = bb.Attribute("new_value", nullable=True, user_defined=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 + # Instance attribute type: WebSessionsIdleLengthPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(WebSessionsChangeIdleLengthPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 WebSessionsChangeIdleLengthPolicyType(bb.Struct): __slots__ = [ '_description_value', - '_description_present', ] _has_required_fields = True def __init__(self, description=None): - self._description_value = None - self._description_present = False + self._description_value = bb.NOT_SET if description is not None: self.description = description - @property - def description(self): - """ - :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 + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") def _process_custom_annotations(self, annotation_type, field_path, processor): super(WebSessionsChangeIdleLengthPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'WebSessionsChangeIdleLengthPolicyType(description={!r})'.format( - self._description_value, - ) - WebSessionsChangeIdleLengthPolicyType_validator = bv.Struct(WebSessionsChangeIdleLengthPolicyType) class WebSessionsFixedLengthPolicy(bb.Union): @@ -100061,9 +67037,6 @@ def get_defined(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(WebSessionsFixedLengthPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'WebSessionsFixedLengthPolicy(%r, %r)' % (self._tag, self._value) - WebSessionsFixedLengthPolicy_validator = bv.Union(WebSessionsFixedLengthPolicy) class WebSessionsIdleLengthPolicy(bb.Union): @@ -100136,9 +67109,6 @@ def get_defined(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(WebSessionsIdleLengthPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'WebSessionsIdleLengthPolicy(%r, %r)' % (self._tag, self._value) - WebSessionsIdleLengthPolicy_validator = bv.Union(WebSessionsIdleLengthPolicy) AppId_validator = bv.String() @@ -100180,58 +67150,58 @@ def __repr__(self): AccountCaptureAvailability.unavailable = AccountCaptureAvailability('unavailable') AccountCaptureAvailability.other = AccountCaptureAvailability('other') -AccountCaptureChangeAvailabilityDetails._new_value_validator = AccountCaptureAvailability_validator -AccountCaptureChangeAvailabilityDetails._previous_value_validator = bv.Nullable(AccountCaptureAvailability_validator) +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), + ('new_value', AccountCaptureChangeAvailabilityDetails.new_value.validator), + ('previous_value', AccountCaptureChangeAvailabilityDetails.previous_value.validator), ] -AccountCaptureChangeAvailabilityType._description_validator = bv.String() +AccountCaptureChangeAvailabilityType.description.validator = bv.String() AccountCaptureChangeAvailabilityType._all_field_names_ = set(['description']) -AccountCaptureChangeAvailabilityType._all_fields_ = [('description', AccountCaptureChangeAvailabilityType._description_validator)] +AccountCaptureChangeAvailabilityType._all_fields_ = [('description', AccountCaptureChangeAvailabilityType.description.validator)] -AccountCaptureChangePolicyDetails._new_value_validator = AccountCapturePolicy_validator -AccountCaptureChangePolicyDetails._previous_value_validator = bv.Nullable(AccountCapturePolicy_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), + ('new_value', AccountCaptureChangePolicyDetails.new_value.validator), + ('previous_value', AccountCaptureChangePolicyDetails.previous_value.validator), ] -AccountCaptureChangePolicyType._description_validator = bv.String() +AccountCaptureChangePolicyType.description.validator = bv.String() AccountCaptureChangePolicyType._all_field_names_ = set(['description']) -AccountCaptureChangePolicyType._all_fields_ = [('description', AccountCaptureChangePolicyType._description_validator)] +AccountCaptureChangePolicyType._all_fields_ = [('description', AccountCaptureChangePolicyType.description.validator)] -AccountCaptureMigrateAccountDetails._domain_name_validator = bv.String() +AccountCaptureMigrateAccountDetails.domain_name.validator = bv.String() AccountCaptureMigrateAccountDetails._all_field_names_ = set(['domain_name']) -AccountCaptureMigrateAccountDetails._all_fields_ = [('domain_name', AccountCaptureMigrateAccountDetails._domain_name_validator)] +AccountCaptureMigrateAccountDetails._all_fields_ = [('domain_name', AccountCaptureMigrateAccountDetails.domain_name.validator)] -AccountCaptureMigrateAccountType._description_validator = bv.String() +AccountCaptureMigrateAccountType.description.validator = bv.String() AccountCaptureMigrateAccountType._all_field_names_ = set(['description']) -AccountCaptureMigrateAccountType._all_fields_ = [('description', AccountCaptureMigrateAccountType._description_validator)] +AccountCaptureMigrateAccountType._all_fields_ = [('description', AccountCaptureMigrateAccountType.description.validator)] -AccountCaptureNotificationEmailsSentDetails._domain_name_validator = bv.String() -AccountCaptureNotificationEmailsSentDetails._notification_type_validator = bv.Nullable(AccountCaptureNotificationType_validator) +AccountCaptureNotificationEmailsSentDetails.domain_name.validator = bv.String() +AccountCaptureNotificationEmailsSentDetails.notification_type.validator = bv.Nullable(AccountCaptureNotificationType_validator) AccountCaptureNotificationEmailsSentDetails._all_field_names_ = set([ 'domain_name', 'notification_type', ]) AccountCaptureNotificationEmailsSentDetails._all_fields_ = [ - ('domain_name', AccountCaptureNotificationEmailsSentDetails._domain_name_validator), - ('notification_type', AccountCaptureNotificationEmailsSentDetails._notification_type_validator), + ('domain_name', AccountCaptureNotificationEmailsSentDetails.domain_name.validator), + ('notification_type', AccountCaptureNotificationEmailsSentDetails.notification_type.validator), ] -AccountCaptureNotificationEmailsSentType._description_validator = bv.String() +AccountCaptureNotificationEmailsSentType.description.validator = bv.String() AccountCaptureNotificationEmailsSentType._all_field_names_ = set(['description']) -AccountCaptureNotificationEmailsSentType._all_fields_ = [('description', AccountCaptureNotificationEmailsSentType._description_validator)] +AccountCaptureNotificationEmailsSentType._all_fields_ = [('description', AccountCaptureNotificationEmailsSentType.description.validator)] AccountCaptureNotificationType._actionable_notification_validator = bv.Void() AccountCaptureNotificationType._proactive_warning_notification_validator = bv.Void() @@ -100262,28 +67232,28 @@ def __repr__(self): AccountCapturePolicy.invited_users = AccountCapturePolicy('invited_users') AccountCapturePolicy.other = AccountCapturePolicy('other') -AccountCaptureRelinquishAccountDetails._domain_name_validator = bv.String() +AccountCaptureRelinquishAccountDetails.domain_name.validator = bv.String() AccountCaptureRelinquishAccountDetails._all_field_names_ = set(['domain_name']) -AccountCaptureRelinquishAccountDetails._all_fields_ = [('domain_name', AccountCaptureRelinquishAccountDetails._domain_name_validator)] +AccountCaptureRelinquishAccountDetails._all_fields_ = [('domain_name', AccountCaptureRelinquishAccountDetails.domain_name.validator)] -AccountCaptureRelinquishAccountType._description_validator = bv.String() +AccountCaptureRelinquishAccountType.description.validator = bv.String() AccountCaptureRelinquishAccountType._all_field_names_ = set(['description']) -AccountCaptureRelinquishAccountType._all_fields_ = [('description', AccountCaptureRelinquishAccountType._description_validator)] +AccountCaptureRelinquishAccountType._all_fields_ = [('description', AccountCaptureRelinquishAccountType.description.validator)] -AccountLockOrUnlockedDetails._previous_value_validator = AccountState_validator -AccountLockOrUnlockedDetails._new_value_validator = AccountState_validator +AccountLockOrUnlockedDetails.previous_value.validator = AccountState_validator +AccountLockOrUnlockedDetails.new_value.validator = AccountState_validator AccountLockOrUnlockedDetails._all_field_names_ = set([ 'previous_value', 'new_value', ]) AccountLockOrUnlockedDetails._all_fields_ = [ - ('previous_value', AccountLockOrUnlockedDetails._previous_value_validator), - ('new_value', AccountLockOrUnlockedDetails._new_value_validator), + ('previous_value', AccountLockOrUnlockedDetails.previous_value.validator), + ('new_value', AccountLockOrUnlockedDetails.new_value.validator), ] -AccountLockOrUnlockedType._description_validator = bv.String() +AccountLockOrUnlockedType.description.validator = bv.String() AccountLockOrUnlockedType._all_field_names_ = set(['description']) -AccountLockOrUnlockedType._all_fields_ = [('description', AccountLockOrUnlockedType._description_validator)] +AccountLockOrUnlockedType._all_fields_ = [('description', AccountLockOrUnlockedType.description.validator)] AccountState._locked_validator = bv.Void() AccountState._unlocked_validator = bv.Void() @@ -100332,9 +67302,9 @@ def __repr__(self): ActorLogInfo.dropbox = ActorLogInfo('dropbox') ActorLogInfo.other = ActorLogInfo('other') -AdminAlertingAlertConfiguration._alert_state_validator = AdminAlertingAlertStatePolicy_validator +AdminAlertingAlertConfiguration.alert_state.validator = AdminAlertingAlertStatePolicy_validator AdminAlertingAlertConfiguration._all_field_names_ = set(['alert_state']) -AdminAlertingAlertConfiguration._all_fields_ = [('alert_state', AdminAlertingAlertConfiguration._alert_state_validator)] +AdminAlertingAlertConfiguration._all_fields_ = [('alert_state', AdminAlertingAlertConfiguration.alert_state.validator)] AdminAlertingAlertStatePolicy._off_validator = bv.Void() AdminAlertingAlertStatePolicy._on_validator = bv.Void() @@ -100349,23 +67319,23 @@ def __repr__(self): AdminAlertingAlertStatePolicy.on = AdminAlertingAlertStatePolicy('on') AdminAlertingAlertStatePolicy.other = AdminAlertingAlertStatePolicy('other') -AdminAlertingChangedAlertConfigDetails._alert_name_validator = bv.String() -AdminAlertingChangedAlertConfigDetails._previous_alert_config_validator = AdminAlertingAlertConfiguration_validator -AdminAlertingChangedAlertConfigDetails._new_alert_config_validator = AdminAlertingAlertConfiguration_validator +AdminAlertingChangedAlertConfigDetails.alert_name.validator = bv.String() +AdminAlertingChangedAlertConfigDetails.previous_alert_config.validator = AdminAlertingAlertConfiguration_validator +AdminAlertingChangedAlertConfigDetails.new_alert_config.validator = AdminAlertingAlertConfiguration_validator AdminAlertingChangedAlertConfigDetails._all_field_names_ = set([ 'alert_name', 'previous_alert_config', 'new_alert_config', ]) AdminAlertingChangedAlertConfigDetails._all_fields_ = [ - ('alert_name', AdminAlertingChangedAlertConfigDetails._alert_name_validator), - ('previous_alert_config', AdminAlertingChangedAlertConfigDetails._previous_alert_config_validator), - ('new_alert_config', AdminAlertingChangedAlertConfigDetails._new_alert_config_validator), + ('alert_name', AdminAlertingChangedAlertConfigDetails.alert_name.validator), + ('previous_alert_config', AdminAlertingChangedAlertConfigDetails.previous_alert_config.validator), + ('new_alert_config', AdminAlertingChangedAlertConfigDetails.new_alert_config.validator), ] -AdminAlertingChangedAlertConfigType._description_validator = bv.String() +AdminAlertingChangedAlertConfigType.description.validator = bv.String() AdminAlertingChangedAlertConfigType._all_field_names_ = set(['description']) -AdminAlertingChangedAlertConfigType._all_fields_ = [('description', AdminAlertingChangedAlertConfigType._description_validator)] +AdminAlertingChangedAlertConfigType._all_fields_ = [('description', AdminAlertingChangedAlertConfigType.description.validator)] AdminRole._limited_admin_validator = bv.Void() AdminRole._member_only_validator = bv.Void() @@ -100392,47 +67362,47 @@ def __repr__(self): AllowDownloadDisabledDetails._all_field_names_ = set([]) AllowDownloadDisabledDetails._all_fields_ = [] -AllowDownloadDisabledType._description_validator = bv.String() +AllowDownloadDisabledType.description.validator = bv.String() AllowDownloadDisabledType._all_field_names_ = set(['description']) -AllowDownloadDisabledType._all_fields_ = [('description', AllowDownloadDisabledType._description_validator)] +AllowDownloadDisabledType._all_fields_ = [('description', AllowDownloadDisabledType.description.validator)] AllowDownloadEnabledDetails._all_field_names_ = set([]) AllowDownloadEnabledDetails._all_fields_ = [] -AllowDownloadEnabledType._description_validator = bv.String() +AllowDownloadEnabledType.description.validator = bv.String() AllowDownloadEnabledType._all_field_names_ = set(['description']) -AllowDownloadEnabledType._all_fields_ = [('description', AllowDownloadEnabledType._description_validator)] +AllowDownloadEnabledType._all_fields_ = [('description', AllowDownloadEnabledType.description.validator)] -ApiSessionLogInfo._request_id_validator = RequestId_validator +ApiSessionLogInfo.request_id.validator = RequestId_validator ApiSessionLogInfo._all_field_names_ = set(['request_id']) -ApiSessionLogInfo._all_fields_ = [('request_id', ApiSessionLogInfo._request_id_validator)] +ApiSessionLogInfo._all_fields_ = [('request_id', ApiSessionLogInfo.request_id.validator)] -AppLinkTeamDetails._app_info_validator = AppLogInfo_validator +AppLinkTeamDetails.app_info.validator = AppLogInfo_validator AppLinkTeamDetails._all_field_names_ = set(['app_info']) -AppLinkTeamDetails._all_fields_ = [('app_info', AppLinkTeamDetails._app_info_validator)] +AppLinkTeamDetails._all_fields_ = [('app_info', AppLinkTeamDetails.app_info.validator)] -AppLinkTeamType._description_validator = bv.String() +AppLinkTeamType.description.validator = bv.String() AppLinkTeamType._all_field_names_ = set(['description']) -AppLinkTeamType._all_fields_ = [('description', AppLinkTeamType._description_validator)] +AppLinkTeamType._all_fields_ = [('description', AppLinkTeamType.description.validator)] -AppLinkUserDetails._app_info_validator = AppLogInfo_validator +AppLinkUserDetails.app_info.validator = AppLogInfo_validator AppLinkUserDetails._all_field_names_ = set(['app_info']) -AppLinkUserDetails._all_fields_ = [('app_info', AppLinkUserDetails._app_info_validator)] +AppLinkUserDetails._all_fields_ = [('app_info', AppLinkUserDetails.app_info.validator)] -AppLinkUserType._description_validator = bv.String() +AppLinkUserType.description.validator = bv.String() AppLinkUserType._all_field_names_ = set(['description']) -AppLinkUserType._all_fields_ = [('description', AppLinkUserType._description_validator)] +AppLinkUserType._all_fields_ = [('description', AppLinkUserType.description.validator)] -AppLogInfo._app_id_validator = bv.Nullable(AppId_validator) -AppLogInfo._display_name_validator = bv.Nullable(bv.String()) +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), + ('app_id', AppLogInfo.app_id.validator), + ('display_name', AppLogInfo.display_name.validator), ] AppLogInfo._all_fields_ = AppLogInfo._fields_ @@ -100448,21 +67418,21 @@ def __repr__(self): } AppLogInfo._is_catch_all_ = True -AppUnlinkTeamDetails._app_info_validator = AppLogInfo_validator +AppUnlinkTeamDetails.app_info.validator = AppLogInfo_validator AppUnlinkTeamDetails._all_field_names_ = set(['app_info']) -AppUnlinkTeamDetails._all_fields_ = [('app_info', AppUnlinkTeamDetails._app_info_validator)] +AppUnlinkTeamDetails._all_fields_ = [('app_info', AppUnlinkTeamDetails.app_info.validator)] -AppUnlinkTeamType._description_validator = bv.String() +AppUnlinkTeamType.description.validator = bv.String() AppUnlinkTeamType._all_field_names_ = set(['description']) -AppUnlinkTeamType._all_fields_ = [('description', AppUnlinkTeamType._description_validator)] +AppUnlinkTeamType._all_fields_ = [('description', AppUnlinkTeamType.description.validator)] -AppUnlinkUserDetails._app_info_validator = AppLogInfo_validator +AppUnlinkUserDetails.app_info.validator = AppLogInfo_validator AppUnlinkUserDetails._all_field_names_ = set(['app_info']) -AppUnlinkUserDetails._all_fields_ = [('app_info', AppUnlinkUserDetails._app_info_validator)] +AppUnlinkUserDetails._all_fields_ = [('app_info', AppUnlinkUserDetails.app_info.validator)] -AppUnlinkUserType._description_validator = bv.String() +AppUnlinkUserType.description.validator = bv.String() AppUnlinkUserType._all_field_names_ = set(['description']) -AppUnlinkUserType._all_fields_ = [('description', AppUnlinkUserType._description_validator)] +AppUnlinkUserType._all_fields_ = [('description', AppUnlinkUserType.description.validator)] AssetLogInfo._file_validator = FileLogInfo_validator AssetLogInfo._folder_validator = FolderLogInfo_validator @@ -100494,82 +67464,82 @@ def __repr__(self): BackupStatus.enabled = BackupStatus('enabled') BackupStatus.other = BackupStatus('other') -BinderAddPageDetails._event_uuid_validator = bv.String() -BinderAddPageDetails._doc_title_validator = bv.String() -BinderAddPageDetails._binder_item_name_validator = bv.String() +BinderAddPageDetails.event_uuid.validator = bv.String() +BinderAddPageDetails.doc_title.validator = bv.String() +BinderAddPageDetails.binder_item_name.validator = bv.String() BinderAddPageDetails._all_field_names_ = set([ 'event_uuid', 'doc_title', 'binder_item_name', ]) BinderAddPageDetails._all_fields_ = [ - ('event_uuid', BinderAddPageDetails._event_uuid_validator), - ('doc_title', BinderAddPageDetails._doc_title_validator), - ('binder_item_name', BinderAddPageDetails._binder_item_name_validator), + ('event_uuid', BinderAddPageDetails.event_uuid.validator), + ('doc_title', BinderAddPageDetails.doc_title.validator), + ('binder_item_name', BinderAddPageDetails.binder_item_name.validator), ] -BinderAddPageType._description_validator = bv.String() +BinderAddPageType.description.validator = bv.String() BinderAddPageType._all_field_names_ = set(['description']) -BinderAddPageType._all_fields_ = [('description', BinderAddPageType._description_validator)] +BinderAddPageType._all_fields_ = [('description', BinderAddPageType.description.validator)] -BinderAddSectionDetails._event_uuid_validator = bv.String() -BinderAddSectionDetails._doc_title_validator = bv.String() -BinderAddSectionDetails._binder_item_name_validator = bv.String() +BinderAddSectionDetails.event_uuid.validator = bv.String() +BinderAddSectionDetails.doc_title.validator = bv.String() +BinderAddSectionDetails.binder_item_name.validator = bv.String() BinderAddSectionDetails._all_field_names_ = set([ 'event_uuid', 'doc_title', 'binder_item_name', ]) BinderAddSectionDetails._all_fields_ = [ - ('event_uuid', BinderAddSectionDetails._event_uuid_validator), - ('doc_title', BinderAddSectionDetails._doc_title_validator), - ('binder_item_name', BinderAddSectionDetails._binder_item_name_validator), + ('event_uuid', BinderAddSectionDetails.event_uuid.validator), + ('doc_title', BinderAddSectionDetails.doc_title.validator), + ('binder_item_name', BinderAddSectionDetails.binder_item_name.validator), ] -BinderAddSectionType._description_validator = bv.String() +BinderAddSectionType.description.validator = bv.String() BinderAddSectionType._all_field_names_ = set(['description']) -BinderAddSectionType._all_fields_ = [('description', BinderAddSectionType._description_validator)] +BinderAddSectionType._all_fields_ = [('description', BinderAddSectionType.description.validator)] -BinderRemovePageDetails._event_uuid_validator = bv.String() -BinderRemovePageDetails._doc_title_validator = bv.String() -BinderRemovePageDetails._binder_item_name_validator = bv.String() +BinderRemovePageDetails.event_uuid.validator = bv.String() +BinderRemovePageDetails.doc_title.validator = bv.String() +BinderRemovePageDetails.binder_item_name.validator = bv.String() BinderRemovePageDetails._all_field_names_ = set([ 'event_uuid', 'doc_title', 'binder_item_name', ]) BinderRemovePageDetails._all_fields_ = [ - ('event_uuid', BinderRemovePageDetails._event_uuid_validator), - ('doc_title', BinderRemovePageDetails._doc_title_validator), - ('binder_item_name', BinderRemovePageDetails._binder_item_name_validator), + ('event_uuid', BinderRemovePageDetails.event_uuid.validator), + ('doc_title', BinderRemovePageDetails.doc_title.validator), + ('binder_item_name', BinderRemovePageDetails.binder_item_name.validator), ] -BinderRemovePageType._description_validator = bv.String() +BinderRemovePageType.description.validator = bv.String() BinderRemovePageType._all_field_names_ = set(['description']) -BinderRemovePageType._all_fields_ = [('description', BinderRemovePageType._description_validator)] +BinderRemovePageType._all_fields_ = [('description', BinderRemovePageType.description.validator)] -BinderRemoveSectionDetails._event_uuid_validator = bv.String() -BinderRemoveSectionDetails._doc_title_validator = bv.String() -BinderRemoveSectionDetails._binder_item_name_validator = bv.String() +BinderRemoveSectionDetails.event_uuid.validator = bv.String() +BinderRemoveSectionDetails.doc_title.validator = bv.String() +BinderRemoveSectionDetails.binder_item_name.validator = bv.String() BinderRemoveSectionDetails._all_field_names_ = set([ 'event_uuid', 'doc_title', 'binder_item_name', ]) BinderRemoveSectionDetails._all_fields_ = [ - ('event_uuid', BinderRemoveSectionDetails._event_uuid_validator), - ('doc_title', BinderRemoveSectionDetails._doc_title_validator), - ('binder_item_name', BinderRemoveSectionDetails._binder_item_name_validator), + ('event_uuid', BinderRemoveSectionDetails.event_uuid.validator), + ('doc_title', BinderRemoveSectionDetails.doc_title.validator), + ('binder_item_name', BinderRemoveSectionDetails.binder_item_name.validator), ] -BinderRemoveSectionType._description_validator = bv.String() +BinderRemoveSectionType.description.validator = bv.String() BinderRemoveSectionType._all_field_names_ = set(['description']) -BinderRemoveSectionType._all_fields_ = [('description', BinderRemoveSectionType._description_validator)] +BinderRemoveSectionType._all_fields_ = [('description', BinderRemoveSectionType.description.validator)] -BinderRenamePageDetails._event_uuid_validator = bv.String() -BinderRenamePageDetails._doc_title_validator = bv.String() -BinderRenamePageDetails._binder_item_name_validator = bv.String() -BinderRenamePageDetails._previous_binder_item_name_validator = bv.Nullable(bv.String()) +BinderRenamePageDetails.event_uuid.validator = bv.String() +BinderRenamePageDetails.doc_title.validator = bv.String() +BinderRenamePageDetails.binder_item_name.validator = bv.String() +BinderRenamePageDetails.previous_binder_item_name.validator = bv.Nullable(bv.String()) BinderRenamePageDetails._all_field_names_ = set([ 'event_uuid', 'doc_title', @@ -100577,20 +67547,20 @@ def __repr__(self): 'previous_binder_item_name', ]) BinderRenamePageDetails._all_fields_ = [ - ('event_uuid', BinderRenamePageDetails._event_uuid_validator), - ('doc_title', BinderRenamePageDetails._doc_title_validator), - ('binder_item_name', BinderRenamePageDetails._binder_item_name_validator), - ('previous_binder_item_name', BinderRenamePageDetails._previous_binder_item_name_validator), + ('event_uuid', BinderRenamePageDetails.event_uuid.validator), + ('doc_title', BinderRenamePageDetails.doc_title.validator), + ('binder_item_name', BinderRenamePageDetails.binder_item_name.validator), + ('previous_binder_item_name', BinderRenamePageDetails.previous_binder_item_name.validator), ] -BinderRenamePageType._description_validator = bv.String() +BinderRenamePageType.description.validator = bv.String() BinderRenamePageType._all_field_names_ = set(['description']) -BinderRenamePageType._all_fields_ = [('description', BinderRenamePageType._description_validator)] +BinderRenamePageType._all_fields_ = [('description', BinderRenamePageType.description.validator)] -BinderRenameSectionDetails._event_uuid_validator = bv.String() -BinderRenameSectionDetails._doc_title_validator = bv.String() -BinderRenameSectionDetails._binder_item_name_validator = bv.String() -BinderRenameSectionDetails._previous_binder_item_name_validator = bv.Nullable(bv.String()) +BinderRenameSectionDetails.event_uuid.validator = bv.String() +BinderRenameSectionDetails.doc_title.validator = bv.String() +BinderRenameSectionDetails.binder_item_name.validator = bv.String() +BinderRenameSectionDetails.previous_binder_item_name.validator = bv.Nullable(bv.String()) BinderRenameSectionDetails._all_field_names_ = set([ 'event_uuid', 'doc_title', @@ -100598,51 +67568,51 @@ def __repr__(self): 'previous_binder_item_name', ]) BinderRenameSectionDetails._all_fields_ = [ - ('event_uuid', BinderRenameSectionDetails._event_uuid_validator), - ('doc_title', BinderRenameSectionDetails._doc_title_validator), - ('binder_item_name', BinderRenameSectionDetails._binder_item_name_validator), - ('previous_binder_item_name', BinderRenameSectionDetails._previous_binder_item_name_validator), + ('event_uuid', BinderRenameSectionDetails.event_uuid.validator), + ('doc_title', BinderRenameSectionDetails.doc_title.validator), + ('binder_item_name', BinderRenameSectionDetails.binder_item_name.validator), + ('previous_binder_item_name', BinderRenameSectionDetails.previous_binder_item_name.validator), ] -BinderRenameSectionType._description_validator = bv.String() +BinderRenameSectionType.description.validator = bv.String() BinderRenameSectionType._all_field_names_ = set(['description']) -BinderRenameSectionType._all_fields_ = [('description', BinderRenameSectionType._description_validator)] +BinderRenameSectionType._all_fields_ = [('description', BinderRenameSectionType.description.validator)] -BinderReorderPageDetails._event_uuid_validator = bv.String() -BinderReorderPageDetails._doc_title_validator = bv.String() -BinderReorderPageDetails._binder_item_name_validator = bv.String() +BinderReorderPageDetails.event_uuid.validator = bv.String() +BinderReorderPageDetails.doc_title.validator = bv.String() +BinderReorderPageDetails.binder_item_name.validator = bv.String() BinderReorderPageDetails._all_field_names_ = set([ 'event_uuid', 'doc_title', 'binder_item_name', ]) BinderReorderPageDetails._all_fields_ = [ - ('event_uuid', BinderReorderPageDetails._event_uuid_validator), - ('doc_title', BinderReorderPageDetails._doc_title_validator), - ('binder_item_name', BinderReorderPageDetails._binder_item_name_validator), + ('event_uuid', BinderReorderPageDetails.event_uuid.validator), + ('doc_title', BinderReorderPageDetails.doc_title.validator), + ('binder_item_name', BinderReorderPageDetails.binder_item_name.validator), ] -BinderReorderPageType._description_validator = bv.String() +BinderReorderPageType.description.validator = bv.String() BinderReorderPageType._all_field_names_ = set(['description']) -BinderReorderPageType._all_fields_ = [('description', BinderReorderPageType._description_validator)] +BinderReorderPageType._all_fields_ = [('description', BinderReorderPageType.description.validator)] -BinderReorderSectionDetails._event_uuid_validator = bv.String() -BinderReorderSectionDetails._doc_title_validator = bv.String() -BinderReorderSectionDetails._binder_item_name_validator = bv.String() +BinderReorderSectionDetails.event_uuid.validator = bv.String() +BinderReorderSectionDetails.doc_title.validator = bv.String() +BinderReorderSectionDetails.binder_item_name.validator = bv.String() BinderReorderSectionDetails._all_field_names_ = set([ 'event_uuid', 'doc_title', 'binder_item_name', ]) BinderReorderSectionDetails._all_fields_ = [ - ('event_uuid', BinderReorderSectionDetails._event_uuid_validator), - ('doc_title', BinderReorderSectionDetails._doc_title_validator), - ('binder_item_name', BinderReorderSectionDetails._binder_item_name_validator), + ('event_uuid', BinderReorderSectionDetails.event_uuid.validator), + ('doc_title', BinderReorderSectionDetails.doc_title.validator), + ('binder_item_name', BinderReorderSectionDetails.binder_item_name.validator), ] -BinderReorderSectionType._description_validator = bv.String() +BinderReorderSectionType.description.validator = bv.String() BinderReorderSectionType._all_field_names_ = set(['description']) -BinderReorderSectionType._all_fields_ = [('description', BinderReorderSectionType._description_validator)] +BinderReorderSectionType._all_fields_ = [('description', BinderReorderSectionType.description.validator)] CameraUploadsPolicy._disabled_validator = bv.Void() CameraUploadsPolicy._enabled_validator = bv.Void() @@ -100657,28 +67627,28 @@ def __repr__(self): CameraUploadsPolicy.enabled = CameraUploadsPolicy('enabled') CameraUploadsPolicy.other = CameraUploadsPolicy('other') -CameraUploadsPolicyChangedDetails._new_value_validator = CameraUploadsPolicy_validator -CameraUploadsPolicyChangedDetails._previous_value_validator = CameraUploadsPolicy_validator +CameraUploadsPolicyChangedDetails.new_value.validator = CameraUploadsPolicy_validator +CameraUploadsPolicyChangedDetails.previous_value.validator = CameraUploadsPolicy_validator CameraUploadsPolicyChangedDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) CameraUploadsPolicyChangedDetails._all_fields_ = [ - ('new_value', CameraUploadsPolicyChangedDetails._new_value_validator), - ('previous_value', CameraUploadsPolicyChangedDetails._previous_value_validator), + ('new_value', CameraUploadsPolicyChangedDetails.new_value.validator), + ('previous_value', CameraUploadsPolicyChangedDetails.previous_value.validator), ] -CameraUploadsPolicyChangedType._description_validator = bv.String() +CameraUploadsPolicyChangedType.description.validator = bv.String() CameraUploadsPolicyChangedType._all_field_names_ = set(['description']) -CameraUploadsPolicyChangedType._all_fields_ = [('description', CameraUploadsPolicyChangedType._description_validator)] - -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.Nullable(bv.String()) +CameraUploadsPolicyChangedType._all_fields_ = [('description', CameraUploadsPolicyChangedType.description.validator)] + +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.Nullable(bv.String()) Certificate._all_field_names_ = set([ 'subject', 'issuer', @@ -100689,37 +67659,37 @@ def __repr__(self): '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), + ('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), ] -ChangedEnterpriseAdminRoleDetails._previous_value_validator = FedAdminRole_validator -ChangedEnterpriseAdminRoleDetails._new_value_validator = FedAdminRole_validator -ChangedEnterpriseAdminRoleDetails._team_name_validator = bv.String() +ChangedEnterpriseAdminRoleDetails.previous_value.validator = FedAdminRole_validator +ChangedEnterpriseAdminRoleDetails.new_value.validator = FedAdminRole_validator +ChangedEnterpriseAdminRoleDetails.team_name.validator = bv.String() ChangedEnterpriseAdminRoleDetails._all_field_names_ = set([ 'previous_value', 'new_value', 'team_name', ]) ChangedEnterpriseAdminRoleDetails._all_fields_ = [ - ('previous_value', ChangedEnterpriseAdminRoleDetails._previous_value_validator), - ('new_value', ChangedEnterpriseAdminRoleDetails._new_value_validator), - ('team_name', ChangedEnterpriseAdminRoleDetails._team_name_validator), + ('previous_value', ChangedEnterpriseAdminRoleDetails.previous_value.validator), + ('new_value', ChangedEnterpriseAdminRoleDetails.new_value.validator), + ('team_name', ChangedEnterpriseAdminRoleDetails.team_name.validator), ] -ChangedEnterpriseAdminRoleType._description_validator = bv.String() +ChangedEnterpriseAdminRoleType.description.validator = bv.String() ChangedEnterpriseAdminRoleType._all_field_names_ = set(['description']) -ChangedEnterpriseAdminRoleType._all_fields_ = [('description', ChangedEnterpriseAdminRoleType._description_validator)] +ChangedEnterpriseAdminRoleType._all_fields_ = [('description', ChangedEnterpriseAdminRoleType.description.validator)] -ChangedEnterpriseConnectedTeamStatusDetails._action_validator = FedHandshakeAction_validator -ChangedEnterpriseConnectedTeamStatusDetails._additional_info_validator = FederationStatusChangeAdditionalInfo_validator -ChangedEnterpriseConnectedTeamStatusDetails._previous_value_validator = TrustedTeamsRequestState_validator -ChangedEnterpriseConnectedTeamStatusDetails._new_value_validator = TrustedTeamsRequestState_validator +ChangedEnterpriseConnectedTeamStatusDetails.action.validator = FedHandshakeAction_validator +ChangedEnterpriseConnectedTeamStatusDetails.additional_info.validator = FederationStatusChangeAdditionalInfo_validator +ChangedEnterpriseConnectedTeamStatusDetails.previous_value.validator = TrustedTeamsRequestState_validator +ChangedEnterpriseConnectedTeamStatusDetails.new_value.validator = TrustedTeamsRequestState_validator ChangedEnterpriseConnectedTeamStatusDetails._all_field_names_ = set([ 'action', 'additional_info', @@ -100727,48 +67697,48 @@ def __repr__(self): 'new_value', ]) ChangedEnterpriseConnectedTeamStatusDetails._all_fields_ = [ - ('action', ChangedEnterpriseConnectedTeamStatusDetails._action_validator), - ('additional_info', ChangedEnterpriseConnectedTeamStatusDetails._additional_info_validator), - ('previous_value', ChangedEnterpriseConnectedTeamStatusDetails._previous_value_validator), - ('new_value', ChangedEnterpriseConnectedTeamStatusDetails._new_value_validator), + ('action', ChangedEnterpriseConnectedTeamStatusDetails.action.validator), + ('additional_info', ChangedEnterpriseConnectedTeamStatusDetails.additional_info.validator), + ('previous_value', ChangedEnterpriseConnectedTeamStatusDetails.previous_value.validator), + ('new_value', ChangedEnterpriseConnectedTeamStatusDetails.new_value.validator), ] -ChangedEnterpriseConnectedTeamStatusType._description_validator = bv.String() +ChangedEnterpriseConnectedTeamStatusType.description.validator = bv.String() ChangedEnterpriseConnectedTeamStatusType._all_field_names_ = set(['description']) -ChangedEnterpriseConnectedTeamStatusType._all_fields_ = [('description', ChangedEnterpriseConnectedTeamStatusType._description_validator)] +ChangedEnterpriseConnectedTeamStatusType._all_fields_ = [('description', ChangedEnterpriseConnectedTeamStatusType.description.validator)] -ClassificationChangePolicyDetails._previous_value_validator = ClassificationPolicyEnumWrapper_validator -ClassificationChangePolicyDetails._new_value_validator = ClassificationPolicyEnumWrapper_validator -ClassificationChangePolicyDetails._classification_type_validator = ClassificationType_validator +ClassificationChangePolicyDetails.previous_value.validator = ClassificationPolicyEnumWrapper_validator +ClassificationChangePolicyDetails.new_value.validator = ClassificationPolicyEnumWrapper_validator +ClassificationChangePolicyDetails.classification_type.validator = ClassificationType_validator ClassificationChangePolicyDetails._all_field_names_ = set([ 'previous_value', 'new_value', 'classification_type', ]) ClassificationChangePolicyDetails._all_fields_ = [ - ('previous_value', ClassificationChangePolicyDetails._previous_value_validator), - ('new_value', ClassificationChangePolicyDetails._new_value_validator), - ('classification_type', ClassificationChangePolicyDetails._classification_type_validator), + ('previous_value', ClassificationChangePolicyDetails.previous_value.validator), + ('new_value', ClassificationChangePolicyDetails.new_value.validator), + ('classification_type', ClassificationChangePolicyDetails.classification_type.validator), ] -ClassificationChangePolicyType._description_validator = bv.String() +ClassificationChangePolicyType.description.validator = bv.String() ClassificationChangePolicyType._all_field_names_ = set(['description']) -ClassificationChangePolicyType._all_fields_ = [('description', ClassificationChangePolicyType._description_validator)] +ClassificationChangePolicyType._all_fields_ = [('description', ClassificationChangePolicyType.description.validator)] ClassificationCreateReportDetails._all_field_names_ = set([]) ClassificationCreateReportDetails._all_fields_ = [] -ClassificationCreateReportFailDetails._failure_reason_validator = team.TeamReportFailureReason_validator +ClassificationCreateReportFailDetails.failure_reason.validator = team.TeamReportFailureReason_validator ClassificationCreateReportFailDetails._all_field_names_ = set(['failure_reason']) -ClassificationCreateReportFailDetails._all_fields_ = [('failure_reason', ClassificationCreateReportFailDetails._failure_reason_validator)] +ClassificationCreateReportFailDetails._all_fields_ = [('failure_reason', ClassificationCreateReportFailDetails.failure_reason.validator)] -ClassificationCreateReportFailType._description_validator = bv.String() +ClassificationCreateReportFailType.description.validator = bv.String() ClassificationCreateReportFailType._all_field_names_ = set(['description']) -ClassificationCreateReportFailType._all_fields_ = [('description', ClassificationCreateReportFailType._description_validator)] +ClassificationCreateReportFailType._all_fields_ = [('description', ClassificationCreateReportFailType.description.validator)] -ClassificationCreateReportType._description_validator = bv.String() +ClassificationCreateReportType.description.validator = bv.String() ClassificationCreateReportType._all_field_names_ = set(['description']) -ClassificationCreateReportType._all_fields_ = [('description', ClassificationCreateReportType._description_validator)] +ClassificationCreateReportType._all_fields_ = [('description', ClassificationCreateReportType.description.validator)] ClassificationPolicyEnumWrapper._disabled_validator = bv.Void() ClassificationPolicyEnumWrapper._enabled_validator = bv.Void() @@ -100793,13 +67763,13 @@ def __repr__(self): ClassificationType.pii = ClassificationType('pii') ClassificationType.other = ClassificationType('other') -CollectionShareDetails._album_name_validator = bv.String() +CollectionShareDetails.album_name.validator = bv.String() CollectionShareDetails._all_field_names_ = set(['album_name']) -CollectionShareDetails._all_fields_ = [('album_name', CollectionShareDetails._album_name_validator)] +CollectionShareDetails._all_fields_ = [('album_name', CollectionShareDetails.album_name.validator)] -CollectionShareType._description_validator = bv.String() +CollectionShareType.description.validator = bv.String() CollectionShareType._all_field_names_ = set(['description']) -CollectionShareType._all_fields_ = [('description', CollectionShareType._description_validator)] +CollectionShareType._all_fields_ = [('description', CollectionShareType.description.validator)] ComputerBackupPolicy._default_validator = bv.Void() ComputerBackupPolicy._disabled_validator = bv.Void() @@ -100817,39 +67787,39 @@ def __repr__(self): ComputerBackupPolicy.enabled = ComputerBackupPolicy('enabled') ComputerBackupPolicy.other = ComputerBackupPolicy('other') -ComputerBackupPolicyChangedDetails._new_value_validator = ComputerBackupPolicy_validator -ComputerBackupPolicyChangedDetails._previous_value_validator = ComputerBackupPolicy_validator +ComputerBackupPolicyChangedDetails.new_value.validator = ComputerBackupPolicy_validator +ComputerBackupPolicyChangedDetails.previous_value.validator = ComputerBackupPolicy_validator ComputerBackupPolicyChangedDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) ComputerBackupPolicyChangedDetails._all_fields_ = [ - ('new_value', ComputerBackupPolicyChangedDetails._new_value_validator), - ('previous_value', ComputerBackupPolicyChangedDetails._previous_value_validator), + ('new_value', ComputerBackupPolicyChangedDetails.new_value.validator), + ('previous_value', ComputerBackupPolicyChangedDetails.previous_value.validator), ] -ComputerBackupPolicyChangedType._description_validator = bv.String() +ComputerBackupPolicyChangedType.description.validator = bv.String() ComputerBackupPolicyChangedType._all_field_names_ = set(['description']) -ComputerBackupPolicyChangedType._all_fields_ = [('description', ComputerBackupPolicyChangedType._description_validator)] +ComputerBackupPolicyChangedType._all_fields_ = [('description', ComputerBackupPolicyChangedType.description.validator)] -ConnectedTeamName._team_validator = bv.String() +ConnectedTeamName.team.validator = bv.String() ConnectedTeamName._all_field_names_ = set(['team']) -ConnectedTeamName._all_fields_ = [('team', ConnectedTeamName._team_validator)] +ConnectedTeamName._all_fields_ = [('team', ConnectedTeamName.team.validator)] -ContentAdministrationPolicyChangedDetails._new_value_validator = bv.String() -ContentAdministrationPolicyChangedDetails._previous_value_validator = bv.String() +ContentAdministrationPolicyChangedDetails.new_value.validator = bv.String() +ContentAdministrationPolicyChangedDetails.previous_value.validator = bv.String() ContentAdministrationPolicyChangedDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) ContentAdministrationPolicyChangedDetails._all_fields_ = [ - ('new_value', ContentAdministrationPolicyChangedDetails._new_value_validator), - ('previous_value', ContentAdministrationPolicyChangedDetails._previous_value_validator), + ('new_value', ContentAdministrationPolicyChangedDetails.new_value.validator), + ('previous_value', ContentAdministrationPolicyChangedDetails.previous_value.validator), ] -ContentAdministrationPolicyChangedType._description_validator = bv.String() +ContentAdministrationPolicyChangedType.description.validator = bv.String() ContentAdministrationPolicyChangedType._all_field_names_ = set(['description']) -ContentAdministrationPolicyChangedType._all_fields_ = [('description', ContentAdministrationPolicyChangedType._description_validator)] +ContentAdministrationPolicyChangedType._all_fields_ = [('description', ContentAdministrationPolicyChangedType.description.validator)] ContentPermanentDeletePolicy._disabled_validator = bv.Void() ContentPermanentDeletePolicy._enabled_validator = bv.Void() @@ -100888,59 +67858,59 @@ def __repr__(self): CreateFolderDetails._all_field_names_ = set([]) CreateFolderDetails._all_fields_ = [] -CreateFolderType._description_validator = bv.String() +CreateFolderType.description.validator = bv.String() CreateFolderType._all_field_names_ = set(['description']) -CreateFolderType._all_fields_ = [('description', CreateFolderType._description_validator)] +CreateFolderType._all_fields_ = [('description', CreateFolderType.description.validator)] -CreateTeamInviteLinkDetails._link_url_validator = bv.String() -CreateTeamInviteLinkDetails._expiry_date_validator = bv.String() +CreateTeamInviteLinkDetails.link_url.validator = bv.String() +CreateTeamInviteLinkDetails.expiry_date.validator = bv.String() CreateTeamInviteLinkDetails._all_field_names_ = set([ 'link_url', 'expiry_date', ]) CreateTeamInviteLinkDetails._all_fields_ = [ - ('link_url', CreateTeamInviteLinkDetails._link_url_validator), - ('expiry_date', CreateTeamInviteLinkDetails._expiry_date_validator), + ('link_url', CreateTeamInviteLinkDetails.link_url.validator), + ('expiry_date', CreateTeamInviteLinkDetails.expiry_date.validator), ] -CreateTeamInviteLinkType._description_validator = bv.String() +CreateTeamInviteLinkType.description.validator = bv.String() CreateTeamInviteLinkType._all_field_names_ = set(['description']) -CreateTeamInviteLinkType._all_fields_ = [('description', CreateTeamInviteLinkType._description_validator)] +CreateTeamInviteLinkType._all_fields_ = [('description', CreateTeamInviteLinkType.description.validator)] -DataPlacementRestrictionChangePolicyDetails._previous_value_validator = PlacementRestriction_validator -DataPlacementRestrictionChangePolicyDetails._new_value_validator = PlacementRestriction_validator +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), + ('previous_value', DataPlacementRestrictionChangePolicyDetails.previous_value.validator), + ('new_value', DataPlacementRestrictionChangePolicyDetails.new_value.validator), ] -DataPlacementRestrictionChangePolicyType._description_validator = bv.String() +DataPlacementRestrictionChangePolicyType.description.validator = bv.String() DataPlacementRestrictionChangePolicyType._all_field_names_ = set(['description']) -DataPlacementRestrictionChangePolicyType._all_fields_ = [('description', DataPlacementRestrictionChangePolicyType._description_validator)] +DataPlacementRestrictionChangePolicyType._all_fields_ = [('description', DataPlacementRestrictionChangePolicyType.description.validator)] -DataPlacementRestrictionSatisfyPolicyDetails._placement_restriction_validator = PlacementRestriction_validator +DataPlacementRestrictionSatisfyPolicyDetails.placement_restriction.validator = PlacementRestriction_validator DataPlacementRestrictionSatisfyPolicyDetails._all_field_names_ = set(['placement_restriction']) -DataPlacementRestrictionSatisfyPolicyDetails._all_fields_ = [('placement_restriction', DataPlacementRestrictionSatisfyPolicyDetails._placement_restriction_validator)] +DataPlacementRestrictionSatisfyPolicyDetails._all_fields_ = [('placement_restriction', DataPlacementRestrictionSatisfyPolicyDetails.placement_restriction.validator)] -DataPlacementRestrictionSatisfyPolicyType._description_validator = bv.String() +DataPlacementRestrictionSatisfyPolicyType.description.validator = bv.String() DataPlacementRestrictionSatisfyPolicyType._all_field_names_ = set(['description']) -DataPlacementRestrictionSatisfyPolicyType._all_fields_ = [('description', DataPlacementRestrictionSatisfyPolicyType._description_validator)] +DataPlacementRestrictionSatisfyPolicyType._all_fields_ = [('description', DataPlacementRestrictionSatisfyPolicyType.description.validator)] -DeleteTeamInviteLinkDetails._link_url_validator = bv.String() +DeleteTeamInviteLinkDetails.link_url.validator = bv.String() DeleteTeamInviteLinkDetails._all_field_names_ = set(['link_url']) -DeleteTeamInviteLinkDetails._all_fields_ = [('link_url', DeleteTeamInviteLinkDetails._link_url_validator)] +DeleteTeamInviteLinkDetails._all_fields_ = [('link_url', DeleteTeamInviteLinkDetails.link_url.validator)] -DeleteTeamInviteLinkType._description_validator = bv.String() +DeleteTeamInviteLinkType.description.validator = bv.String() DeleteTeamInviteLinkType._all_field_names_ = set(['description']) -DeleteTeamInviteLinkType._all_fields_ = [('description', DeleteTeamInviteLinkType._description_validator)] +DeleteTeamInviteLinkType._all_fields_ = [('description', DeleteTeamInviteLinkType.description.validator)] -DeviceSessionLogInfo._ip_address_validator = bv.Nullable(IpAddress_validator) -DeviceSessionLogInfo._created_validator = bv.Nullable(common.DropboxTimestamp_validator) -DeviceSessionLogInfo._updated_validator = bv.Nullable(common.DropboxTimestamp_validator) +DeviceSessionLogInfo.ip_address.validator = bv.Nullable(IpAddress_validator) +DeviceSessionLogInfo.created.validator = bv.Nullable(common.DropboxTimestamp_validator) +DeviceSessionLogInfo.updated.validator = bv.Nullable(common.DropboxTimestamp_validator) DeviceSessionLogInfo._field_names_ = set([ 'ip_address', 'created', @@ -100948,9 +67918,9 @@ def __repr__(self): ]) DeviceSessionLogInfo._all_field_names_ = DeviceSessionLogInfo._field_names_ DeviceSessionLogInfo._fields_ = [ - ('ip_address', DeviceSessionLogInfo._ip_address_validator), - ('created', DeviceSessionLogInfo._created_validator), - ('updated', DeviceSessionLogInfo._updated_validator), + ('ip_address', DeviceSessionLogInfo.ip_address.validator), + ('created', DeviceSessionLogInfo.created.validator), + ('updated', DeviceSessionLogInfo.updated.validator), ] DeviceSessionLogInfo._all_fields_ = DeviceSessionLogInfo._fields_ @@ -100968,12 +67938,12 @@ def __repr__(self): } DeviceSessionLogInfo._is_catch_all_ = True -DesktopDeviceSessionLogInfo._session_info_validator = bv.Nullable(DesktopSessionLogInfo_validator) -DesktopDeviceSessionLogInfo._host_name_validator = bv.String() -DesktopDeviceSessionLogInfo._client_type_validator = team.DesktopPlatform_validator -DesktopDeviceSessionLogInfo._client_version_validator = bv.Nullable(bv.String()) -DesktopDeviceSessionLogInfo._platform_validator = bv.String() -DesktopDeviceSessionLogInfo._is_delete_on_unlink_supported_validator = bv.Boolean() +DesktopDeviceSessionLogInfo.session_info.validator = bv.Nullable(DesktopSessionLogInfo_validator) +DesktopDeviceSessionLogInfo.host_name.validator = bv.String() +DesktopDeviceSessionLogInfo.client_type.validator = team.DesktopPlatform_validator +DesktopDeviceSessionLogInfo.client_version.validator = bv.Nullable(bv.String()) +DesktopDeviceSessionLogInfo.platform.validator = bv.String() +DesktopDeviceSessionLogInfo.is_delete_on_unlink_supported.validator = bv.Boolean() DesktopDeviceSessionLogInfo._field_names_ = set([ 'session_info', 'host_name', @@ -100984,19 +67954,19 @@ def __repr__(self): ]) DesktopDeviceSessionLogInfo._all_field_names_ = DeviceSessionLogInfo._all_field_names_.union(DesktopDeviceSessionLogInfo._field_names_) DesktopDeviceSessionLogInfo._fields_ = [ - ('session_info', DesktopDeviceSessionLogInfo._session_info_validator), - ('host_name', DesktopDeviceSessionLogInfo._host_name_validator), - ('client_type', DesktopDeviceSessionLogInfo._client_type_validator), - ('client_version', DesktopDeviceSessionLogInfo._client_version_validator), - ('platform', DesktopDeviceSessionLogInfo._platform_validator), - ('is_delete_on_unlink_supported', DesktopDeviceSessionLogInfo._is_delete_on_unlink_supported_validator), + ('session_info', DesktopDeviceSessionLogInfo.session_info.validator), + ('host_name', DesktopDeviceSessionLogInfo.host_name.validator), + ('client_type', DesktopDeviceSessionLogInfo.client_type.validator), + ('client_version', DesktopDeviceSessionLogInfo.client_version.validator), + ('platform', DesktopDeviceSessionLogInfo.platform.validator), + ('is_delete_on_unlink_supported', DesktopDeviceSessionLogInfo.is_delete_on_unlink_supported.validator), ] DesktopDeviceSessionLogInfo._all_fields_ = DeviceSessionLogInfo._all_fields_ + DesktopDeviceSessionLogInfo._fields_ -SessionLogInfo._session_id_validator = bv.Nullable(common.SessionId_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._fields_ = [('session_id', SessionLogInfo.session_id.validator)] SessionLogInfo._all_fields_ = SessionLogInfo._fields_ SessionLogInfo._tag_to_subtype_ = { @@ -101019,69 +67989,69 @@ def __repr__(self): DeviceApprovalsAddExceptionDetails._all_field_names_ = set([]) DeviceApprovalsAddExceptionDetails._all_fields_ = [] -DeviceApprovalsAddExceptionType._description_validator = bv.String() +DeviceApprovalsAddExceptionType.description.validator = bv.String() DeviceApprovalsAddExceptionType._all_field_names_ = set(['description']) -DeviceApprovalsAddExceptionType._all_fields_ = [('description', DeviceApprovalsAddExceptionType._description_validator)] +DeviceApprovalsAddExceptionType._all_fields_ = [('description', DeviceApprovalsAddExceptionType.description.validator)] -DeviceApprovalsChangeDesktopPolicyDetails._new_value_validator = bv.Nullable(DeviceApprovalsPolicy_validator) -DeviceApprovalsChangeDesktopPolicyDetails._previous_value_validator = bv.Nullable(DeviceApprovalsPolicy_validator) +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), + ('new_value', DeviceApprovalsChangeDesktopPolicyDetails.new_value.validator), + ('previous_value', DeviceApprovalsChangeDesktopPolicyDetails.previous_value.validator), ] -DeviceApprovalsChangeDesktopPolicyType._description_validator = bv.String() +DeviceApprovalsChangeDesktopPolicyType.description.validator = bv.String() DeviceApprovalsChangeDesktopPolicyType._all_field_names_ = set(['description']) -DeviceApprovalsChangeDesktopPolicyType._all_fields_ = [('description', DeviceApprovalsChangeDesktopPolicyType._description_validator)] +DeviceApprovalsChangeDesktopPolicyType._all_fields_ = [('description', DeviceApprovalsChangeDesktopPolicyType.description.validator)] -DeviceApprovalsChangeMobilePolicyDetails._new_value_validator = bv.Nullable(DeviceApprovalsPolicy_validator) -DeviceApprovalsChangeMobilePolicyDetails._previous_value_validator = bv.Nullable(DeviceApprovalsPolicy_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), + ('new_value', DeviceApprovalsChangeMobilePolicyDetails.new_value.validator), + ('previous_value', DeviceApprovalsChangeMobilePolicyDetails.previous_value.validator), ] -DeviceApprovalsChangeMobilePolicyType._description_validator = bv.String() +DeviceApprovalsChangeMobilePolicyType.description.validator = bv.String() DeviceApprovalsChangeMobilePolicyType._all_field_names_ = set(['description']) -DeviceApprovalsChangeMobilePolicyType._all_fields_ = [('description', DeviceApprovalsChangeMobilePolicyType._description_validator)] +DeviceApprovalsChangeMobilePolicyType._all_fields_ = [('description', DeviceApprovalsChangeMobilePolicyType.description.validator)] -DeviceApprovalsChangeOverageActionDetails._new_value_validator = bv.Nullable(team_policies.RolloutMethod_validator) -DeviceApprovalsChangeOverageActionDetails._previous_value_validator = bv.Nullable(team_policies.RolloutMethod_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), + ('new_value', DeviceApprovalsChangeOverageActionDetails.new_value.validator), + ('previous_value', DeviceApprovalsChangeOverageActionDetails.previous_value.validator), ] -DeviceApprovalsChangeOverageActionType._description_validator = bv.String() +DeviceApprovalsChangeOverageActionType.description.validator = bv.String() DeviceApprovalsChangeOverageActionType._all_field_names_ = set(['description']) -DeviceApprovalsChangeOverageActionType._all_fields_ = [('description', DeviceApprovalsChangeOverageActionType._description_validator)] +DeviceApprovalsChangeOverageActionType._all_fields_ = [('description', DeviceApprovalsChangeOverageActionType.description.validator)] -DeviceApprovalsChangeUnlinkActionDetails._new_value_validator = bv.Nullable(DeviceUnlinkPolicy_validator) -DeviceApprovalsChangeUnlinkActionDetails._previous_value_validator = bv.Nullable(DeviceUnlinkPolicy_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), + ('new_value', DeviceApprovalsChangeUnlinkActionDetails.new_value.validator), + ('previous_value', DeviceApprovalsChangeUnlinkActionDetails.previous_value.validator), ] -DeviceApprovalsChangeUnlinkActionType._description_validator = bv.String() +DeviceApprovalsChangeUnlinkActionType.description.validator = bv.String() DeviceApprovalsChangeUnlinkActionType._all_field_names_ = set(['description']) -DeviceApprovalsChangeUnlinkActionType._all_fields_ = [('description', DeviceApprovalsChangeUnlinkActionType._description_validator)] +DeviceApprovalsChangeUnlinkActionType._all_fields_ = [('description', DeviceApprovalsChangeUnlinkActionType.description.validator)] DeviceApprovalsPolicy._limited_validator = bv.Void() DeviceApprovalsPolicy._unlimited_validator = bv.Void() @@ -101099,121 +68069,121 @@ def __repr__(self): DeviceApprovalsRemoveExceptionDetails._all_field_names_ = set([]) DeviceApprovalsRemoveExceptionDetails._all_fields_ = [] -DeviceApprovalsRemoveExceptionType._description_validator = bv.String() +DeviceApprovalsRemoveExceptionType.description.validator = bv.String() DeviceApprovalsRemoveExceptionType._all_field_names_ = set(['description']) -DeviceApprovalsRemoveExceptionType._all_fields_ = [('description', DeviceApprovalsRemoveExceptionType._description_validator)] +DeviceApprovalsRemoveExceptionType._all_fields_ = [('description', DeviceApprovalsRemoveExceptionType.description.validator)] -DeviceChangeIpDesktopDetails._device_session_info_validator = DeviceSessionLogInfo_validator +DeviceChangeIpDesktopDetails.device_session_info.validator = DeviceSessionLogInfo_validator DeviceChangeIpDesktopDetails._all_field_names_ = set(['device_session_info']) -DeviceChangeIpDesktopDetails._all_fields_ = [('device_session_info', DeviceChangeIpDesktopDetails._device_session_info_validator)] +DeviceChangeIpDesktopDetails._all_fields_ = [('device_session_info', DeviceChangeIpDesktopDetails.device_session_info.validator)] -DeviceChangeIpDesktopType._description_validator = bv.String() +DeviceChangeIpDesktopType.description.validator = bv.String() DeviceChangeIpDesktopType._all_field_names_ = set(['description']) -DeviceChangeIpDesktopType._all_fields_ = [('description', DeviceChangeIpDesktopType._description_validator)] +DeviceChangeIpDesktopType._all_fields_ = [('description', DeviceChangeIpDesktopType.description.validator)] -DeviceChangeIpMobileDetails._device_session_info_validator = bv.Nullable(DeviceSessionLogInfo_validator) +DeviceChangeIpMobileDetails.device_session_info.validator = bv.Nullable(DeviceSessionLogInfo_validator) DeviceChangeIpMobileDetails._all_field_names_ = set(['device_session_info']) -DeviceChangeIpMobileDetails._all_fields_ = [('device_session_info', DeviceChangeIpMobileDetails._device_session_info_validator)] +DeviceChangeIpMobileDetails._all_fields_ = [('device_session_info', DeviceChangeIpMobileDetails.device_session_info.validator)] -DeviceChangeIpMobileType._description_validator = bv.String() +DeviceChangeIpMobileType.description.validator = bv.String() DeviceChangeIpMobileType._all_field_names_ = set(['description']) -DeviceChangeIpMobileType._all_fields_ = [('description', DeviceChangeIpMobileType._description_validator)] +DeviceChangeIpMobileType._all_fields_ = [('description', DeviceChangeIpMobileType.description.validator)] -DeviceChangeIpWebDetails._user_agent_validator = bv.String() +DeviceChangeIpWebDetails.user_agent.validator = bv.String() DeviceChangeIpWebDetails._all_field_names_ = set(['user_agent']) -DeviceChangeIpWebDetails._all_fields_ = [('user_agent', DeviceChangeIpWebDetails._user_agent_validator)] +DeviceChangeIpWebDetails._all_fields_ = [('user_agent', DeviceChangeIpWebDetails.user_agent.validator)] -DeviceChangeIpWebType._description_validator = bv.String() +DeviceChangeIpWebType.description.validator = bv.String() DeviceChangeIpWebType._all_field_names_ = set(['description']) -DeviceChangeIpWebType._all_fields_ = [('description', DeviceChangeIpWebType._description_validator)] +DeviceChangeIpWebType._all_fields_ = [('description', DeviceChangeIpWebType.description.validator)] -DeviceDeleteOnUnlinkFailDetails._session_info_validator = bv.Nullable(SessionLogInfo_validator) -DeviceDeleteOnUnlinkFailDetails._display_name_validator = bv.Nullable(bv.String()) -DeviceDeleteOnUnlinkFailDetails._num_failures_validator = bv.Int64() +DeviceDeleteOnUnlinkFailDetails.session_info.validator = bv.Nullable(SessionLogInfo_validator) +DeviceDeleteOnUnlinkFailDetails.display_name.validator = bv.Nullable(bv.String()) +DeviceDeleteOnUnlinkFailDetails.num_failures.validator = bv.Int64() DeviceDeleteOnUnlinkFailDetails._all_field_names_ = set([ 'session_info', 'display_name', 'num_failures', ]) DeviceDeleteOnUnlinkFailDetails._all_fields_ = [ - ('session_info', DeviceDeleteOnUnlinkFailDetails._session_info_validator), - ('display_name', DeviceDeleteOnUnlinkFailDetails._display_name_validator), - ('num_failures', DeviceDeleteOnUnlinkFailDetails._num_failures_validator), + ('session_info', DeviceDeleteOnUnlinkFailDetails.session_info.validator), + ('display_name', DeviceDeleteOnUnlinkFailDetails.display_name.validator), + ('num_failures', DeviceDeleteOnUnlinkFailDetails.num_failures.validator), ] -DeviceDeleteOnUnlinkFailType._description_validator = bv.String() +DeviceDeleteOnUnlinkFailType.description.validator = bv.String() DeviceDeleteOnUnlinkFailType._all_field_names_ = set(['description']) -DeviceDeleteOnUnlinkFailType._all_fields_ = [('description', DeviceDeleteOnUnlinkFailType._description_validator)] +DeviceDeleteOnUnlinkFailType._all_fields_ = [('description', DeviceDeleteOnUnlinkFailType.description.validator)] -DeviceDeleteOnUnlinkSuccessDetails._session_info_validator = bv.Nullable(SessionLogInfo_validator) -DeviceDeleteOnUnlinkSuccessDetails._display_name_validator = bv.Nullable(bv.String()) +DeviceDeleteOnUnlinkSuccessDetails.session_info.validator = bv.Nullable(SessionLogInfo_validator) +DeviceDeleteOnUnlinkSuccessDetails.display_name.validator = bv.Nullable(bv.String()) DeviceDeleteOnUnlinkSuccessDetails._all_field_names_ = set([ 'session_info', 'display_name', ]) DeviceDeleteOnUnlinkSuccessDetails._all_fields_ = [ - ('session_info', DeviceDeleteOnUnlinkSuccessDetails._session_info_validator), - ('display_name', DeviceDeleteOnUnlinkSuccessDetails._display_name_validator), + ('session_info', DeviceDeleteOnUnlinkSuccessDetails.session_info.validator), + ('display_name', DeviceDeleteOnUnlinkSuccessDetails.display_name.validator), ] -DeviceDeleteOnUnlinkSuccessType._description_validator = bv.String() +DeviceDeleteOnUnlinkSuccessType.description.validator = bv.String() DeviceDeleteOnUnlinkSuccessType._all_field_names_ = set(['description']) -DeviceDeleteOnUnlinkSuccessType._all_fields_ = [('description', DeviceDeleteOnUnlinkSuccessType._description_validator)] +DeviceDeleteOnUnlinkSuccessType._all_fields_ = [('description', DeviceDeleteOnUnlinkSuccessType.description.validator)] -DeviceLinkFailDetails._ip_address_validator = bv.Nullable(IpAddress_validator) -DeviceLinkFailDetails._device_type_validator = DeviceType_validator +DeviceLinkFailDetails.ip_address.validator = bv.Nullable(IpAddress_validator) +DeviceLinkFailDetails.device_type.validator = DeviceType_validator DeviceLinkFailDetails._all_field_names_ = set([ 'ip_address', 'device_type', ]) DeviceLinkFailDetails._all_fields_ = [ - ('ip_address', DeviceLinkFailDetails._ip_address_validator), - ('device_type', DeviceLinkFailDetails._device_type_validator), + ('ip_address', DeviceLinkFailDetails.ip_address.validator), + ('device_type', DeviceLinkFailDetails.device_type.validator), ] -DeviceLinkFailType._description_validator = bv.String() +DeviceLinkFailType.description.validator = bv.String() DeviceLinkFailType._all_field_names_ = set(['description']) -DeviceLinkFailType._all_fields_ = [('description', DeviceLinkFailType._description_validator)] +DeviceLinkFailType._all_fields_ = [('description', DeviceLinkFailType.description.validator)] -DeviceLinkSuccessDetails._device_session_info_validator = bv.Nullable(DeviceSessionLogInfo_validator) +DeviceLinkSuccessDetails.device_session_info.validator = bv.Nullable(DeviceSessionLogInfo_validator) DeviceLinkSuccessDetails._all_field_names_ = set(['device_session_info']) -DeviceLinkSuccessDetails._all_fields_ = [('device_session_info', DeviceLinkSuccessDetails._device_session_info_validator)] +DeviceLinkSuccessDetails._all_fields_ = [('device_session_info', DeviceLinkSuccessDetails.device_session_info.validator)] -DeviceLinkSuccessType._description_validator = bv.String() +DeviceLinkSuccessType.description.validator = bv.String() DeviceLinkSuccessType._all_field_names_ = set(['description']) -DeviceLinkSuccessType._all_fields_ = [('description', DeviceLinkSuccessType._description_validator)] +DeviceLinkSuccessType._all_fields_ = [('description', DeviceLinkSuccessType.description.validator)] DeviceManagementDisabledDetails._all_field_names_ = set([]) DeviceManagementDisabledDetails._all_fields_ = [] -DeviceManagementDisabledType._description_validator = bv.String() +DeviceManagementDisabledType.description.validator = bv.String() DeviceManagementDisabledType._all_field_names_ = set(['description']) -DeviceManagementDisabledType._all_fields_ = [('description', DeviceManagementDisabledType._description_validator)] +DeviceManagementDisabledType._all_fields_ = [('description', DeviceManagementDisabledType.description.validator)] DeviceManagementEnabledDetails._all_field_names_ = set([]) DeviceManagementEnabledDetails._all_fields_ = [] -DeviceManagementEnabledType._description_validator = bv.String() +DeviceManagementEnabledType.description.validator = bv.String() DeviceManagementEnabledType._all_field_names_ = set(['description']) -DeviceManagementEnabledType._all_fields_ = [('description', DeviceManagementEnabledType._description_validator)] +DeviceManagementEnabledType._all_fields_ = [('description', DeviceManagementEnabledType.description.validator)] -DeviceSyncBackupStatusChangedDetails._desktop_device_session_info_validator = DesktopDeviceSessionLogInfo_validator -DeviceSyncBackupStatusChangedDetails._previous_value_validator = BackupStatus_validator -DeviceSyncBackupStatusChangedDetails._new_value_validator = BackupStatus_validator +DeviceSyncBackupStatusChangedDetails.desktop_device_session_info.validator = DesktopDeviceSessionLogInfo_validator +DeviceSyncBackupStatusChangedDetails.previous_value.validator = BackupStatus_validator +DeviceSyncBackupStatusChangedDetails.new_value.validator = BackupStatus_validator DeviceSyncBackupStatusChangedDetails._all_field_names_ = set([ 'desktop_device_session_info', 'previous_value', 'new_value', ]) DeviceSyncBackupStatusChangedDetails._all_fields_ = [ - ('desktop_device_session_info', DeviceSyncBackupStatusChangedDetails._desktop_device_session_info_validator), - ('previous_value', DeviceSyncBackupStatusChangedDetails._previous_value_validator), - ('new_value', DeviceSyncBackupStatusChangedDetails._new_value_validator), + ('desktop_device_session_info', DeviceSyncBackupStatusChangedDetails.desktop_device_session_info.validator), + ('previous_value', DeviceSyncBackupStatusChangedDetails.previous_value.validator), + ('new_value', DeviceSyncBackupStatusChangedDetails.new_value.validator), ] -DeviceSyncBackupStatusChangedType._description_validator = bv.String() +DeviceSyncBackupStatusChangedType.description.validator = bv.String() DeviceSyncBackupStatusChangedType._all_field_names_ = set(['description']) -DeviceSyncBackupStatusChangedType._all_fields_ = [('description', DeviceSyncBackupStatusChangedType._description_validator)] +DeviceSyncBackupStatusChangedType._all_fields_ = [('description', DeviceSyncBackupStatusChangedType.description.validator)] DeviceType._desktop_validator = bv.Void() DeviceType._mobile_validator = bv.Void() @@ -101228,18 +68198,18 @@ def __repr__(self): DeviceType.mobile = DeviceType('mobile') DeviceType.other = DeviceType('other') -DeviceUnlinkDetails._session_info_validator = bv.Nullable(SessionLogInfo_validator) -DeviceUnlinkDetails._display_name_validator = bv.Nullable(bv.String()) -DeviceUnlinkDetails._delete_data_validator = bv.Boolean() +DeviceUnlinkDetails.session_info.validator = bv.Nullable(SessionLogInfo_validator) +DeviceUnlinkDetails.display_name.validator = bv.Nullable(bv.String()) +DeviceUnlinkDetails.delete_data.validator = bv.Boolean() DeviceUnlinkDetails._all_field_names_ = set([ 'session_info', 'display_name', 'delete_data', ]) DeviceUnlinkDetails._all_fields_ = [ - ('session_info', DeviceUnlinkDetails._session_info_validator), - ('display_name', DeviceUnlinkDetails._display_name_validator), - ('delete_data', DeviceUnlinkDetails._delete_data_validator), + ('session_info', DeviceUnlinkDetails.session_info.validator), + ('display_name', DeviceUnlinkDetails.display_name.validator), + ('delete_data', DeviceUnlinkDetails.delete_data.validator), ] DeviceUnlinkPolicy._keep_validator = bv.Void() @@ -101255,118 +68225,118 @@ def __repr__(self): DeviceUnlinkPolicy.remove = DeviceUnlinkPolicy('remove') DeviceUnlinkPolicy.other = DeviceUnlinkPolicy('other') -DeviceUnlinkType._description_validator = bv.String() +DeviceUnlinkType.description.validator = bv.String() DeviceUnlinkType._all_field_names_ = set(['description']) -DeviceUnlinkType._all_fields_ = [('description', DeviceUnlinkType._description_validator)] +DeviceUnlinkType._all_fields_ = [('description', DeviceUnlinkType.description.validator)] DirectoryRestrictionsAddMembersDetails._all_field_names_ = set([]) DirectoryRestrictionsAddMembersDetails._all_fields_ = [] -DirectoryRestrictionsAddMembersType._description_validator = bv.String() +DirectoryRestrictionsAddMembersType.description.validator = bv.String() DirectoryRestrictionsAddMembersType._all_field_names_ = set(['description']) -DirectoryRestrictionsAddMembersType._all_fields_ = [('description', DirectoryRestrictionsAddMembersType._description_validator)] +DirectoryRestrictionsAddMembersType._all_fields_ = [('description', DirectoryRestrictionsAddMembersType.description.validator)] DirectoryRestrictionsRemoveMembersDetails._all_field_names_ = set([]) DirectoryRestrictionsRemoveMembersDetails._all_fields_ = [] -DirectoryRestrictionsRemoveMembersType._description_validator = bv.String() +DirectoryRestrictionsRemoveMembersType.description.validator = bv.String() DirectoryRestrictionsRemoveMembersType._all_field_names_ = set(['description']) -DirectoryRestrictionsRemoveMembersType._all_fields_ = [('description', DirectoryRestrictionsRemoveMembersType._description_validator)] +DirectoryRestrictionsRemoveMembersType._all_fields_ = [('description', DirectoryRestrictionsRemoveMembersType.description.validator)] DisabledDomainInvitesDetails._all_field_names_ = set([]) DisabledDomainInvitesDetails._all_fields_ = [] -DisabledDomainInvitesType._description_validator = bv.String() +DisabledDomainInvitesType.description.validator = bv.String() DisabledDomainInvitesType._all_field_names_ = set(['description']) -DisabledDomainInvitesType._all_fields_ = [('description', DisabledDomainInvitesType._description_validator)] +DisabledDomainInvitesType._all_fields_ = [('description', DisabledDomainInvitesType.description.validator)] DomainInvitesApproveRequestToJoinTeamDetails._all_field_names_ = set([]) DomainInvitesApproveRequestToJoinTeamDetails._all_fields_ = [] -DomainInvitesApproveRequestToJoinTeamType._description_validator = bv.String() +DomainInvitesApproveRequestToJoinTeamType.description.validator = bv.String() DomainInvitesApproveRequestToJoinTeamType._all_field_names_ = set(['description']) -DomainInvitesApproveRequestToJoinTeamType._all_fields_ = [('description', DomainInvitesApproveRequestToJoinTeamType._description_validator)] +DomainInvitesApproveRequestToJoinTeamType._all_fields_ = [('description', DomainInvitesApproveRequestToJoinTeamType.description.validator)] DomainInvitesDeclineRequestToJoinTeamDetails._all_field_names_ = set([]) DomainInvitesDeclineRequestToJoinTeamDetails._all_fields_ = [] -DomainInvitesDeclineRequestToJoinTeamType._description_validator = bv.String() +DomainInvitesDeclineRequestToJoinTeamType.description.validator = bv.String() DomainInvitesDeclineRequestToJoinTeamType._all_field_names_ = set(['description']) -DomainInvitesDeclineRequestToJoinTeamType._all_fields_ = [('description', DomainInvitesDeclineRequestToJoinTeamType._description_validator)] +DomainInvitesDeclineRequestToJoinTeamType._all_fields_ = [('description', DomainInvitesDeclineRequestToJoinTeamType.description.validator)] -DomainInvitesEmailExistingUsersDetails._domain_name_validator = bv.String() -DomainInvitesEmailExistingUsersDetails._num_recipients_validator = bv.UInt64() +DomainInvitesEmailExistingUsersDetails.domain_name.validator = 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), + ('domain_name', DomainInvitesEmailExistingUsersDetails.domain_name.validator), + ('num_recipients', DomainInvitesEmailExistingUsersDetails.num_recipients.validator), ] -DomainInvitesEmailExistingUsersType._description_validator = bv.String() +DomainInvitesEmailExistingUsersType.description.validator = bv.String() DomainInvitesEmailExistingUsersType._all_field_names_ = set(['description']) -DomainInvitesEmailExistingUsersType._all_fields_ = [('description', DomainInvitesEmailExistingUsersType._description_validator)] +DomainInvitesEmailExistingUsersType._all_fields_ = [('description', DomainInvitesEmailExistingUsersType.description.validator)] DomainInvitesRequestToJoinTeamDetails._all_field_names_ = set([]) DomainInvitesRequestToJoinTeamDetails._all_fields_ = [] -DomainInvitesRequestToJoinTeamType._description_validator = bv.String() +DomainInvitesRequestToJoinTeamType.description.validator = bv.String() DomainInvitesRequestToJoinTeamType._all_field_names_ = set(['description']) -DomainInvitesRequestToJoinTeamType._all_fields_ = [('description', DomainInvitesRequestToJoinTeamType._description_validator)] +DomainInvitesRequestToJoinTeamType._all_fields_ = [('description', DomainInvitesRequestToJoinTeamType.description.validator)] DomainInvitesSetInviteNewUserPrefToNoDetails._all_field_names_ = set([]) DomainInvitesSetInviteNewUserPrefToNoDetails._all_fields_ = [] -DomainInvitesSetInviteNewUserPrefToNoType._description_validator = bv.String() +DomainInvitesSetInviteNewUserPrefToNoType.description.validator = bv.String() DomainInvitesSetInviteNewUserPrefToNoType._all_field_names_ = set(['description']) -DomainInvitesSetInviteNewUserPrefToNoType._all_fields_ = [('description', DomainInvitesSetInviteNewUserPrefToNoType._description_validator)] +DomainInvitesSetInviteNewUserPrefToNoType._all_fields_ = [('description', DomainInvitesSetInviteNewUserPrefToNoType.description.validator)] DomainInvitesSetInviteNewUserPrefToYesDetails._all_field_names_ = set([]) DomainInvitesSetInviteNewUserPrefToYesDetails._all_fields_ = [] -DomainInvitesSetInviteNewUserPrefToYesType._description_validator = bv.String() +DomainInvitesSetInviteNewUserPrefToYesType.description.validator = bv.String() DomainInvitesSetInviteNewUserPrefToYesType._all_field_names_ = set(['description']) -DomainInvitesSetInviteNewUserPrefToYesType._all_fields_ = [('description', DomainInvitesSetInviteNewUserPrefToYesType._description_validator)] +DomainInvitesSetInviteNewUserPrefToYesType._all_fields_ = [('description', DomainInvitesSetInviteNewUserPrefToYesType.description.validator)] -DomainVerificationAddDomainFailDetails._domain_name_validator = bv.String() -DomainVerificationAddDomainFailDetails._verification_method_validator = bv.Nullable(bv.String()) +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), + ('domain_name', DomainVerificationAddDomainFailDetails.domain_name.validator), + ('verification_method', DomainVerificationAddDomainFailDetails.verification_method.validator), ] -DomainVerificationAddDomainFailType._description_validator = bv.String() +DomainVerificationAddDomainFailType.description.validator = bv.String() DomainVerificationAddDomainFailType._all_field_names_ = set(['description']) -DomainVerificationAddDomainFailType._all_fields_ = [('description', DomainVerificationAddDomainFailType._description_validator)] +DomainVerificationAddDomainFailType._all_fields_ = [('description', DomainVerificationAddDomainFailType.description.validator)] -DomainVerificationAddDomainSuccessDetails._domain_names_validator = bv.List(bv.String()) -DomainVerificationAddDomainSuccessDetails._verification_method_validator = bv.Nullable(bv.String()) +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), + ('domain_names', DomainVerificationAddDomainSuccessDetails.domain_names.validator), + ('verification_method', DomainVerificationAddDomainSuccessDetails.verification_method.validator), ] -DomainVerificationAddDomainSuccessType._description_validator = bv.String() +DomainVerificationAddDomainSuccessType.description.validator = bv.String() DomainVerificationAddDomainSuccessType._all_field_names_ = set(['description']) -DomainVerificationAddDomainSuccessType._all_fields_ = [('description', DomainVerificationAddDomainSuccessType._description_validator)] +DomainVerificationAddDomainSuccessType._all_fields_ = [('description', DomainVerificationAddDomainSuccessType.description.validator)] -DomainVerificationRemoveDomainDetails._domain_names_validator = bv.List(bv.String()) +DomainVerificationRemoveDomainDetails.domain_names.validator = bv.List(bv.String()) DomainVerificationRemoveDomainDetails._all_field_names_ = set(['domain_names']) -DomainVerificationRemoveDomainDetails._all_fields_ = [('domain_names', DomainVerificationRemoveDomainDetails._domain_names_validator)] +DomainVerificationRemoveDomainDetails._all_fields_ = [('domain_names', DomainVerificationRemoveDomainDetails.domain_names.validator)] -DomainVerificationRemoveDomainType._description_validator = bv.String() +DomainVerificationRemoveDomainType.description.validator = bv.String() DomainVerificationRemoveDomainType._all_field_names_ = set(['description']) -DomainVerificationRemoveDomainType._all_fields_ = [('description', DomainVerificationRemoveDomainType._description_validator)] +DomainVerificationRemoveDomainType._all_fields_ = [('description', DomainVerificationRemoveDomainType.description.validator)] DownloadPolicyType._allow_validator = bv.Void() DownloadPolicyType._disallow_validator = bv.Void() @@ -101381,124 +68351,124 @@ def __repr__(self): DownloadPolicyType.disallow = DownloadPolicyType('disallow') DownloadPolicyType.other = DownloadPolicyType('other') -DropboxPasswordsExportedDetails._platform_validator = bv.String() +DropboxPasswordsExportedDetails.platform.validator = bv.String() DropboxPasswordsExportedDetails._all_field_names_ = set(['platform']) -DropboxPasswordsExportedDetails._all_fields_ = [('platform', DropboxPasswordsExportedDetails._platform_validator)] +DropboxPasswordsExportedDetails._all_fields_ = [('platform', DropboxPasswordsExportedDetails.platform.validator)] -DropboxPasswordsExportedType._description_validator = bv.String() +DropboxPasswordsExportedType.description.validator = bv.String() DropboxPasswordsExportedType._all_field_names_ = set(['description']) -DropboxPasswordsExportedType._all_fields_ = [('description', DropboxPasswordsExportedType._description_validator)] +DropboxPasswordsExportedType._all_fields_ = [('description', DropboxPasswordsExportedType.description.validator)] -DropboxPasswordsNewDeviceEnrolledDetails._is_first_device_validator = bv.Boolean() -DropboxPasswordsNewDeviceEnrolledDetails._platform_validator = bv.String() +DropboxPasswordsNewDeviceEnrolledDetails.is_first_device.validator = bv.Boolean() +DropboxPasswordsNewDeviceEnrolledDetails.platform.validator = bv.String() DropboxPasswordsNewDeviceEnrolledDetails._all_field_names_ = set([ 'is_first_device', 'platform', ]) DropboxPasswordsNewDeviceEnrolledDetails._all_fields_ = [ - ('is_first_device', DropboxPasswordsNewDeviceEnrolledDetails._is_first_device_validator), - ('platform', DropboxPasswordsNewDeviceEnrolledDetails._platform_validator), + ('is_first_device', DropboxPasswordsNewDeviceEnrolledDetails.is_first_device.validator), + ('platform', DropboxPasswordsNewDeviceEnrolledDetails.platform.validator), ] -DropboxPasswordsNewDeviceEnrolledType._description_validator = bv.String() +DropboxPasswordsNewDeviceEnrolledType.description.validator = bv.String() DropboxPasswordsNewDeviceEnrolledType._all_field_names_ = set(['description']) -DropboxPasswordsNewDeviceEnrolledType._all_fields_ = [('description', DropboxPasswordsNewDeviceEnrolledType._description_validator)] +DropboxPasswordsNewDeviceEnrolledType._all_fields_ = [('description', DropboxPasswordsNewDeviceEnrolledType.description.validator)] -DurationLogInfo._unit_validator = TimeUnit_validator -DurationLogInfo._amount_validator = bv.UInt64() +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), + ('unit', DurationLogInfo.unit.validator), + ('amount', DurationLogInfo.amount.validator), ] EmmAddExceptionDetails._all_field_names_ = set([]) EmmAddExceptionDetails._all_fields_ = [] -EmmAddExceptionType._description_validator = bv.String() +EmmAddExceptionType.description.validator = bv.String() EmmAddExceptionType._all_field_names_ = set(['description']) -EmmAddExceptionType._all_fields_ = [('description', EmmAddExceptionType._description_validator)] +EmmAddExceptionType._all_fields_ = [('description', EmmAddExceptionType.description.validator)] -EmmChangePolicyDetails._new_value_validator = team_policies.EmmState_validator -EmmChangePolicyDetails._previous_value_validator = bv.Nullable(team_policies.EmmState_validator) +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), + ('new_value', EmmChangePolicyDetails.new_value.validator), + ('previous_value', EmmChangePolicyDetails.previous_value.validator), ] -EmmChangePolicyType._description_validator = bv.String() +EmmChangePolicyType.description.validator = bv.String() EmmChangePolicyType._all_field_names_ = set(['description']) -EmmChangePolicyType._all_fields_ = [('description', EmmChangePolicyType._description_validator)] +EmmChangePolicyType._all_fields_ = [('description', EmmChangePolicyType.description.validator)] EmmCreateExceptionsReportDetails._all_field_names_ = set([]) EmmCreateExceptionsReportDetails._all_fields_ = [] -EmmCreateExceptionsReportType._description_validator = bv.String() +EmmCreateExceptionsReportType.description.validator = bv.String() EmmCreateExceptionsReportType._all_field_names_ = set(['description']) -EmmCreateExceptionsReportType._all_fields_ = [('description', EmmCreateExceptionsReportType._description_validator)] +EmmCreateExceptionsReportType._all_fields_ = [('description', EmmCreateExceptionsReportType.description.validator)] EmmCreateUsageReportDetails._all_field_names_ = set([]) EmmCreateUsageReportDetails._all_fields_ = [] -EmmCreateUsageReportType._description_validator = bv.String() +EmmCreateUsageReportType.description.validator = bv.String() EmmCreateUsageReportType._all_field_names_ = set(['description']) -EmmCreateUsageReportType._all_fields_ = [('description', EmmCreateUsageReportType._description_validator)] +EmmCreateUsageReportType._all_fields_ = [('description', EmmCreateUsageReportType.description.validator)] -EmmErrorDetails._error_details_validator = FailureDetailsLogInfo_validator +EmmErrorDetails.error_details.validator = FailureDetailsLogInfo_validator EmmErrorDetails._all_field_names_ = set(['error_details']) -EmmErrorDetails._all_fields_ = [('error_details', EmmErrorDetails._error_details_validator)] +EmmErrorDetails._all_fields_ = [('error_details', EmmErrorDetails.error_details.validator)] -EmmErrorType._description_validator = bv.String() +EmmErrorType.description.validator = bv.String() EmmErrorType._all_field_names_ = set(['description']) -EmmErrorType._all_fields_ = [('description', EmmErrorType._description_validator)] +EmmErrorType._all_fields_ = [('description', EmmErrorType.description.validator)] EmmRefreshAuthTokenDetails._all_field_names_ = set([]) EmmRefreshAuthTokenDetails._all_fields_ = [] -EmmRefreshAuthTokenType._description_validator = bv.String() +EmmRefreshAuthTokenType.description.validator = bv.String() EmmRefreshAuthTokenType._all_field_names_ = set(['description']) -EmmRefreshAuthTokenType._all_fields_ = [('description', EmmRefreshAuthTokenType._description_validator)] +EmmRefreshAuthTokenType._all_fields_ = [('description', EmmRefreshAuthTokenType.description.validator)] EmmRemoveExceptionDetails._all_field_names_ = set([]) EmmRemoveExceptionDetails._all_fields_ = [] -EmmRemoveExceptionType._description_validator = bv.String() +EmmRemoveExceptionType.description.validator = bv.String() EmmRemoveExceptionType._all_field_names_ = set(['description']) -EmmRemoveExceptionType._all_fields_ = [('description', EmmRemoveExceptionType._description_validator)] +EmmRemoveExceptionType._all_fields_ = [('description', EmmRemoveExceptionType.description.validator)] EnabledDomainInvitesDetails._all_field_names_ = set([]) EnabledDomainInvitesDetails._all_fields_ = [] -EnabledDomainInvitesType._description_validator = bv.String() +EnabledDomainInvitesType.description.validator = bv.String() EnabledDomainInvitesType._all_field_names_ = set(['description']) -EnabledDomainInvitesType._all_fields_ = [('description', EnabledDomainInvitesType._description_validator)] +EnabledDomainInvitesType._all_fields_ = [('description', EnabledDomainInvitesType.description.validator)] -EndedEnterpriseAdminSessionDeprecatedDetails._federation_extra_details_validator = FedExtraDetails_validator +EndedEnterpriseAdminSessionDeprecatedDetails.federation_extra_details.validator = FedExtraDetails_validator EndedEnterpriseAdminSessionDeprecatedDetails._all_field_names_ = set(['federation_extra_details']) -EndedEnterpriseAdminSessionDeprecatedDetails._all_fields_ = [('federation_extra_details', EndedEnterpriseAdminSessionDeprecatedDetails._federation_extra_details_validator)] +EndedEnterpriseAdminSessionDeprecatedDetails._all_fields_ = [('federation_extra_details', EndedEnterpriseAdminSessionDeprecatedDetails.federation_extra_details.validator)] -EndedEnterpriseAdminSessionDeprecatedType._description_validator = bv.String() +EndedEnterpriseAdminSessionDeprecatedType.description.validator = bv.String() EndedEnterpriseAdminSessionDeprecatedType._all_field_names_ = set(['description']) -EndedEnterpriseAdminSessionDeprecatedType._all_fields_ = [('description', EndedEnterpriseAdminSessionDeprecatedType._description_validator)] +EndedEnterpriseAdminSessionDeprecatedType._all_fields_ = [('description', EndedEnterpriseAdminSessionDeprecatedType.description.validator)] EndedEnterpriseAdminSessionDetails._all_field_names_ = set([]) EndedEnterpriseAdminSessionDetails._all_fields_ = [] -EndedEnterpriseAdminSessionType._description_validator = bv.String() +EndedEnterpriseAdminSessionType.description.validator = bv.String() EndedEnterpriseAdminSessionType._all_field_names_ = set(['description']) -EndedEnterpriseAdminSessionType._all_fields_ = [('description', EndedEnterpriseAdminSessionType._description_validator)] +EndedEnterpriseAdminSessionType._all_fields_ = [('description', EndedEnterpriseAdminSessionType.description.validator)] -EnterpriseSettingsLockingDetails._team_name_validator = bv.String() -EnterpriseSettingsLockingDetails._settings_page_name_validator = bv.String() -EnterpriseSettingsLockingDetails._previous_settings_page_locking_state_validator = bv.String() -EnterpriseSettingsLockingDetails._new_settings_page_locking_state_validator = bv.String() +EnterpriseSettingsLockingDetails.team_name.validator = bv.String() +EnterpriseSettingsLockingDetails.settings_page_name.validator = bv.String() +EnterpriseSettingsLockingDetails.previous_settings_page_locking_state.validator = bv.String() +EnterpriseSettingsLockingDetails.new_settings_page_locking_state.validator = bv.String() EnterpriseSettingsLockingDetails._all_field_names_ = set([ 'team_name', 'settings_page_name', @@ -101506,15 +68476,15 @@ def __repr__(self): 'new_settings_page_locking_state', ]) EnterpriseSettingsLockingDetails._all_fields_ = [ - ('team_name', EnterpriseSettingsLockingDetails._team_name_validator), - ('settings_page_name', EnterpriseSettingsLockingDetails._settings_page_name_validator), - ('previous_settings_page_locking_state', EnterpriseSettingsLockingDetails._previous_settings_page_locking_state_validator), - ('new_settings_page_locking_state', EnterpriseSettingsLockingDetails._new_settings_page_locking_state_validator), + ('team_name', EnterpriseSettingsLockingDetails.team_name.validator), + ('settings_page_name', EnterpriseSettingsLockingDetails.settings_page_name.validator), + ('previous_settings_page_locking_state', EnterpriseSettingsLockingDetails.previous_settings_page_locking_state.validator), + ('new_settings_page_locking_state', EnterpriseSettingsLockingDetails.new_settings_page_locking_state.validator), ] -EnterpriseSettingsLockingType._description_validator = bv.String() +EnterpriseSettingsLockingType.description.validator = bv.String() EnterpriseSettingsLockingType._all_field_names_ = set(['description']) -EnterpriseSettingsLockingType._all_fields_ = [('description', EnterpriseSettingsLockingType._description_validator)] +EnterpriseSettingsLockingType._all_fields_ = [('description', EnterpriseSettingsLockingType.description.validator)] EventCategory._admin_alerting_validator = bv.Void() EventCategory._apps_validator = bv.Void() @@ -104758,32 +71728,32 @@ def __repr__(self): ExportMembersReportDetails._all_field_names_ = set([]) ExportMembersReportDetails._all_fields_ = [] -ExportMembersReportFailDetails._failure_reason_validator = team.TeamReportFailureReason_validator +ExportMembersReportFailDetails.failure_reason.validator = team.TeamReportFailureReason_validator ExportMembersReportFailDetails._all_field_names_ = set(['failure_reason']) -ExportMembersReportFailDetails._all_fields_ = [('failure_reason', ExportMembersReportFailDetails._failure_reason_validator)] +ExportMembersReportFailDetails._all_fields_ = [('failure_reason', ExportMembersReportFailDetails.failure_reason.validator)] -ExportMembersReportFailType._description_validator = bv.String() +ExportMembersReportFailType.description.validator = bv.String() ExportMembersReportFailType._all_field_names_ = set(['description']) -ExportMembersReportFailType._all_fields_ = [('description', ExportMembersReportFailType._description_validator)] +ExportMembersReportFailType._all_fields_ = [('description', ExportMembersReportFailType.description.validator)] -ExportMembersReportType._description_validator = bv.String() +ExportMembersReportType.description.validator = bv.String() ExportMembersReportType._all_field_names_ = set(['description']) -ExportMembersReportType._all_fields_ = [('description', ExportMembersReportType._description_validator)] +ExportMembersReportType._all_fields_ = [('description', ExportMembersReportType.description.validator)] -ExtendedVersionHistoryChangePolicyDetails._new_value_validator = ExtendedVersionHistoryPolicy_validator -ExtendedVersionHistoryChangePolicyDetails._previous_value_validator = bv.Nullable(ExtendedVersionHistoryPolicy_validator) +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), + ('new_value', ExtendedVersionHistoryChangePolicyDetails.new_value.validator), + ('previous_value', ExtendedVersionHistoryChangePolicyDetails.previous_value.validator), ] -ExtendedVersionHistoryChangePolicyType._description_validator = bv.String() +ExtendedVersionHistoryChangePolicyType.description.validator = bv.String() ExtendedVersionHistoryChangePolicyType._all_field_names_ = set(['description']) -ExtendedVersionHistoryChangePolicyType._all_fields_ = [('description', ExtendedVersionHistoryChangePolicyType._description_validator)] +ExtendedVersionHistoryChangePolicyType._all_fields_ = [('description', ExtendedVersionHistoryChangePolicyType.description.validator)] ExtendedVersionHistoryPolicy._explicitly_limited_validator = bv.Void() ExtendedVersionHistoryPolicy._explicitly_unlimited_validator = bv.Void() @@ -104807,38 +71777,38 @@ def __repr__(self): ExternalSharingCreateReportDetails._all_field_names_ = set([]) ExternalSharingCreateReportDetails._all_fields_ = [] -ExternalSharingCreateReportType._description_validator = bv.String() +ExternalSharingCreateReportType.description.validator = bv.String() ExternalSharingCreateReportType._all_field_names_ = set(['description']) -ExternalSharingCreateReportType._all_fields_ = [('description', ExternalSharingCreateReportType._description_validator)] +ExternalSharingCreateReportType._all_fields_ = [('description', ExternalSharingCreateReportType.description.validator)] -ExternalSharingReportFailedDetails._failure_reason_validator = team.TeamReportFailureReason_validator +ExternalSharingReportFailedDetails.failure_reason.validator = team.TeamReportFailureReason_validator ExternalSharingReportFailedDetails._all_field_names_ = set(['failure_reason']) -ExternalSharingReportFailedDetails._all_fields_ = [('failure_reason', ExternalSharingReportFailedDetails._failure_reason_validator)] +ExternalSharingReportFailedDetails._all_fields_ = [('failure_reason', ExternalSharingReportFailedDetails.failure_reason.validator)] -ExternalSharingReportFailedType._description_validator = bv.String() +ExternalSharingReportFailedType.description.validator = bv.String() ExternalSharingReportFailedType._all_field_names_ = set(['description']) -ExternalSharingReportFailedType._all_fields_ = [('description', ExternalSharingReportFailedType._description_validator)] +ExternalSharingReportFailedType._all_fields_ = [('description', ExternalSharingReportFailedType.description.validator)] -ExternalUserLogInfo._user_identifier_validator = bv.String() -ExternalUserLogInfo._identifier_type_validator = IdentifierType_validator +ExternalUserLogInfo.user_identifier.validator = bv.String() +ExternalUserLogInfo.identifier_type.validator = IdentifierType_validator ExternalUserLogInfo._all_field_names_ = set([ 'user_identifier', 'identifier_type', ]) ExternalUserLogInfo._all_fields_ = [ - ('user_identifier', ExternalUserLogInfo._user_identifier_validator), - ('identifier_type', ExternalUserLogInfo._identifier_type_validator), + ('user_identifier', ExternalUserLogInfo.user_identifier.validator), + ('identifier_type', ExternalUserLogInfo.identifier_type.validator), ] -FailureDetailsLogInfo._user_friendly_message_validator = bv.Nullable(bv.String()) -FailureDetailsLogInfo._technical_error_message_validator = bv.Nullable(bv.String()) +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), + ('user_friendly_message', FailureDetailsLogInfo.user_friendly_message.validator), + ('technical_error_message', FailureDetailsLogInfo.technical_error_message.validator), ] FedAdminRole._enterprise_admin_validator = bv.Void() @@ -104903,35 +71873,35 @@ def __repr__(self): FederationStatusChangeAdditionalInfo.other = FederationStatusChangeAdditionalInfo('other') -FileAddCommentDetails._comment_text_validator = bv.Nullable(bv.String()) +FileAddCommentDetails.comment_text.validator = bv.Nullable(bv.String()) FileAddCommentDetails._all_field_names_ = set(['comment_text']) -FileAddCommentDetails._all_fields_ = [('comment_text', FileAddCommentDetails._comment_text_validator)] +FileAddCommentDetails._all_fields_ = [('comment_text', FileAddCommentDetails.comment_text.validator)] -FileAddCommentType._description_validator = bv.String() +FileAddCommentType.description.validator = bv.String() FileAddCommentType._all_field_names_ = set(['description']) -FileAddCommentType._all_fields_ = [('description', FileAddCommentType._description_validator)] +FileAddCommentType._all_fields_ = [('description', FileAddCommentType.description.validator)] FileAddDetails._all_field_names_ = set([]) FileAddDetails._all_fields_ = [] -FileAddType._description_validator = bv.String() +FileAddType.description.validator = bv.String() FileAddType._all_field_names_ = set(['description']) -FileAddType._all_fields_ = [('description', FileAddType._description_validator)] +FileAddType._all_fields_ = [('description', FileAddType.description.validator)] -FileChangeCommentSubscriptionDetails._new_value_validator = FileCommentNotificationPolicy_validator -FileChangeCommentSubscriptionDetails._previous_value_validator = bv.Nullable(FileCommentNotificationPolicy_validator) +FileChangeCommentSubscriptionDetails.new_value.validator = FileCommentNotificationPolicy_validator +FileChangeCommentSubscriptionDetails.previous_value.validator = bv.Nullable(FileCommentNotificationPolicy_validator) FileChangeCommentSubscriptionDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) FileChangeCommentSubscriptionDetails._all_fields_ = [ - ('new_value', FileChangeCommentSubscriptionDetails._new_value_validator), - ('previous_value', FileChangeCommentSubscriptionDetails._previous_value_validator), + ('new_value', FileChangeCommentSubscriptionDetails.new_value.validator), + ('previous_value', FileChangeCommentSubscriptionDetails.previous_value.validator), ] -FileChangeCommentSubscriptionType._description_validator = bv.String() +FileChangeCommentSubscriptionType.description.validator = bv.String() FileChangeCommentSubscriptionType._all_field_names_ = set(['description']) -FileChangeCommentSubscriptionType._all_fields_ = [('description', FileChangeCommentSubscriptionType._description_validator)] +FileChangeCommentSubscriptionType._all_fields_ = [('description', FileChangeCommentSubscriptionType.description.validator)] FileCommentNotificationPolicy._disabled_validator = bv.Void() FileCommentNotificationPolicy._enabled_validator = bv.Void() @@ -104946,20 +71916,20 @@ def __repr__(self): FileCommentNotificationPolicy.enabled = FileCommentNotificationPolicy('enabled') FileCommentNotificationPolicy.other = FileCommentNotificationPolicy('other') -FileCommentsChangePolicyDetails._new_value_validator = FileCommentsPolicy_validator -FileCommentsChangePolicyDetails._previous_value_validator = bv.Nullable(FileCommentsPolicy_validator) +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), + ('new_value', FileCommentsChangePolicyDetails.new_value.validator), + ('previous_value', FileCommentsChangePolicyDetails.previous_value.validator), ] -FileCommentsChangePolicyType._description_validator = bv.String() +FileCommentsChangePolicyType.description.validator = bv.String() FileCommentsChangePolicyType._all_field_names_ = set(['description']) -FileCommentsChangePolicyType._all_fields_ = [('description', FileCommentsChangePolicyType._description_validator)] +FileCommentsChangePolicyType._all_fields_ = [('description', FileCommentsChangePolicyType.description.validator)] FileCommentsPolicy._disabled_validator = bv.Void() FileCommentsPolicy._enabled_validator = bv.Void() @@ -104974,107 +71944,107 @@ def __repr__(self): FileCommentsPolicy.enabled = FileCommentsPolicy('enabled') FileCommentsPolicy.other = FileCommentsPolicy('other') -FileCopyDetails._relocate_action_details_validator = bv.List(RelocateAssetReferencesLogInfo_validator) +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)] +FileCopyDetails._all_fields_ = [('relocate_action_details', FileCopyDetails.relocate_action_details.validator)] -FileCopyType._description_validator = bv.String() +FileCopyType.description.validator = bv.String() FileCopyType._all_field_names_ = set(['description']) -FileCopyType._all_fields_ = [('description', FileCopyType._description_validator)] +FileCopyType._all_fields_ = [('description', FileCopyType.description.validator)] -FileDeleteCommentDetails._comment_text_validator = bv.Nullable(bv.String()) +FileDeleteCommentDetails.comment_text.validator = bv.Nullable(bv.String()) FileDeleteCommentDetails._all_field_names_ = set(['comment_text']) -FileDeleteCommentDetails._all_fields_ = [('comment_text', FileDeleteCommentDetails._comment_text_validator)] +FileDeleteCommentDetails._all_fields_ = [('comment_text', FileDeleteCommentDetails.comment_text.validator)] -FileDeleteCommentType._description_validator = bv.String() +FileDeleteCommentType.description.validator = bv.String() FileDeleteCommentType._all_field_names_ = set(['description']) -FileDeleteCommentType._all_fields_ = [('description', FileDeleteCommentType._description_validator)] +FileDeleteCommentType._all_fields_ = [('description', FileDeleteCommentType.description.validator)] FileDeleteDetails._all_field_names_ = set([]) FileDeleteDetails._all_fields_ = [] -FileDeleteType._description_validator = bv.String() +FileDeleteType.description.validator = bv.String() FileDeleteType._all_field_names_ = set(['description']) -FileDeleteType._all_fields_ = [('description', FileDeleteType._description_validator)] +FileDeleteType._all_fields_ = [('description', FileDeleteType.description.validator)] FileDownloadDetails._all_field_names_ = set([]) FileDownloadDetails._all_fields_ = [] -FileDownloadType._description_validator = bv.String() +FileDownloadType.description.validator = bv.String() FileDownloadType._all_field_names_ = set(['description']) -FileDownloadType._all_fields_ = [('description', FileDownloadType._description_validator)] +FileDownloadType._all_fields_ = [('description', FileDownloadType.description.validator)] -FileEditCommentDetails._comment_text_validator = bv.Nullable(bv.String()) -FileEditCommentDetails._previous_comment_text_validator = bv.String() +FileEditCommentDetails.comment_text.validator = bv.Nullable(bv.String()) +FileEditCommentDetails.previous_comment_text.validator = bv.String() FileEditCommentDetails._all_field_names_ = set([ 'comment_text', 'previous_comment_text', ]) FileEditCommentDetails._all_fields_ = [ - ('comment_text', FileEditCommentDetails._comment_text_validator), - ('previous_comment_text', FileEditCommentDetails._previous_comment_text_validator), + ('comment_text', FileEditCommentDetails.comment_text.validator), + ('previous_comment_text', FileEditCommentDetails.previous_comment_text.validator), ] -FileEditCommentType._description_validator = bv.String() +FileEditCommentType.description.validator = bv.String() FileEditCommentType._all_field_names_ = set(['description']) -FileEditCommentType._all_fields_ = [('description', FileEditCommentType._description_validator)] +FileEditCommentType._all_fields_ = [('description', FileEditCommentType.description.validator)] FileEditDetails._all_field_names_ = set([]) FileEditDetails._all_fields_ = [] -FileEditType._description_validator = bv.String() +FileEditType.description.validator = bv.String() FileEditType._all_field_names_ = set(['description']) -FileEditType._all_fields_ = [('description', FileEditType._description_validator)] +FileEditType._all_fields_ = [('description', FileEditType.description.validator)] FileGetCopyReferenceDetails._all_field_names_ = set([]) FileGetCopyReferenceDetails._all_fields_ = [] -FileGetCopyReferenceType._description_validator = bv.String() +FileGetCopyReferenceType.description.validator = bv.String() FileGetCopyReferenceType._all_field_names_ = set(['description']) -FileGetCopyReferenceType._all_fields_ = [('description', FileGetCopyReferenceType._description_validator)] +FileGetCopyReferenceType._all_fields_ = [('description', FileGetCopyReferenceType.description.validator)] -FileLikeCommentDetails._comment_text_validator = bv.Nullable(bv.String()) +FileLikeCommentDetails.comment_text.validator = bv.Nullable(bv.String()) FileLikeCommentDetails._all_field_names_ = set(['comment_text']) -FileLikeCommentDetails._all_fields_ = [('comment_text', FileLikeCommentDetails._comment_text_validator)] +FileLikeCommentDetails._all_fields_ = [('comment_text', FileLikeCommentDetails.comment_text.validator)] -FileLikeCommentType._description_validator = bv.String() +FileLikeCommentType.description.validator = bv.String() FileLikeCommentType._all_field_names_ = set(['description']) -FileLikeCommentType._all_fields_ = [('description', FileLikeCommentType._description_validator)] +FileLikeCommentType._all_fields_ = [('description', FileLikeCommentType.description.validator)] -FileLockingLockStatusChangedDetails._previous_value_validator = LockStatus_validator -FileLockingLockStatusChangedDetails._new_value_validator = LockStatus_validator +FileLockingLockStatusChangedDetails.previous_value.validator = LockStatus_validator +FileLockingLockStatusChangedDetails.new_value.validator = LockStatus_validator FileLockingLockStatusChangedDetails._all_field_names_ = set([ 'previous_value', 'new_value', ]) FileLockingLockStatusChangedDetails._all_fields_ = [ - ('previous_value', FileLockingLockStatusChangedDetails._previous_value_validator), - ('new_value', FileLockingLockStatusChangedDetails._new_value_validator), + ('previous_value', FileLockingLockStatusChangedDetails.previous_value.validator), + ('new_value', FileLockingLockStatusChangedDetails.new_value.validator), ] -FileLockingLockStatusChangedType._description_validator = bv.String() +FileLockingLockStatusChangedType.description.validator = bv.String() FileLockingLockStatusChangedType._all_field_names_ = set(['description']) -FileLockingLockStatusChangedType._all_fields_ = [('description', FileLockingLockStatusChangedType._description_validator)] +FileLockingLockStatusChangedType._all_fields_ = [('description', FileLockingLockStatusChangedType.description.validator)] -FileLockingPolicyChangedDetails._new_value_validator = team_policies.FileLockingPolicyState_validator -FileLockingPolicyChangedDetails._previous_value_validator = team_policies.FileLockingPolicyState_validator +FileLockingPolicyChangedDetails.new_value.validator = team_policies.FileLockingPolicyState_validator +FileLockingPolicyChangedDetails.previous_value.validator = team_policies.FileLockingPolicyState_validator FileLockingPolicyChangedDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) FileLockingPolicyChangedDetails._all_fields_ = [ - ('new_value', FileLockingPolicyChangedDetails._new_value_validator), - ('previous_value', FileLockingPolicyChangedDetails._previous_value_validator), + ('new_value', FileLockingPolicyChangedDetails.new_value.validator), + ('previous_value', FileLockingPolicyChangedDetails.previous_value.validator), ] -FileLockingPolicyChangedType._description_validator = bv.String() +FileLockingPolicyChangedType.description.validator = bv.String() FileLockingPolicyChangedType._all_field_names_ = set(['description']) -FileLockingPolicyChangedType._all_fields_ = [('description', FileLockingPolicyChangedType._description_validator)] +FileLockingPolicyChangedType._all_fields_ = [('description', FileLockingPolicyChangedType.description.validator)] -FileOrFolderLogInfo._path_validator = PathLogInfo_validator -FileOrFolderLogInfo._display_name_validator = bv.Nullable(bv.String()) -FileOrFolderLogInfo._file_id_validator = bv.Nullable(bv.String()) -FileOrFolderLogInfo._file_size_validator = bv.Nullable(bv.UInt64()) +FileOrFolderLogInfo.path.validator = PathLogInfo_validator +FileOrFolderLogInfo.display_name.validator = bv.Nullable(bv.String()) +FileOrFolderLogInfo.file_id.validator = bv.Nullable(bv.String()) +FileOrFolderLogInfo.file_size.validator = bv.Nullable(bv.UInt64()) FileOrFolderLogInfo._all_field_names_ = set([ 'path', 'display_name', @@ -105082,135 +72052,135 @@ def __repr__(self): 'file_size', ]) FileOrFolderLogInfo._all_fields_ = [ - ('path', FileOrFolderLogInfo._path_validator), - ('display_name', FileOrFolderLogInfo._display_name_validator), - ('file_id', FileOrFolderLogInfo._file_id_validator), - ('file_size', FileOrFolderLogInfo._file_size_validator), + ('path', FileOrFolderLogInfo.path.validator), + ('display_name', FileOrFolderLogInfo.display_name.validator), + ('file_id', FileOrFolderLogInfo.file_id.validator), + ('file_size', FileOrFolderLogInfo.file_size.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.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)] +FileMoveDetails._all_fields_ = [('relocate_action_details', FileMoveDetails.relocate_action_details.validator)] -FileMoveType._description_validator = bv.String() +FileMoveType.description.validator = bv.String() FileMoveType._all_field_names_ = set(['description']) -FileMoveType._all_fields_ = [('description', FileMoveType._description_validator)] +FileMoveType._all_fields_ = [('description', FileMoveType.description.validator)] FilePermanentlyDeleteDetails._all_field_names_ = set([]) FilePermanentlyDeleteDetails._all_fields_ = [] -FilePermanentlyDeleteType._description_validator = bv.String() +FilePermanentlyDeleteType.description.validator = bv.String() FilePermanentlyDeleteType._all_field_names_ = set(['description']) -FilePermanentlyDeleteType._all_fields_ = [('description', FilePermanentlyDeleteType._description_validator)] +FilePermanentlyDeleteType._all_fields_ = [('description', FilePermanentlyDeleteType.description.validator)] FilePreviewDetails._all_field_names_ = set([]) FilePreviewDetails._all_fields_ = [] -FilePreviewType._description_validator = bv.String() +FilePreviewType.description.validator = bv.String() FilePreviewType._all_field_names_ = set(['description']) -FilePreviewType._all_fields_ = [('description', FilePreviewType._description_validator)] +FilePreviewType._all_fields_ = [('description', FilePreviewType.description.validator)] -FileRenameDetails._relocate_action_details_validator = bv.List(RelocateAssetReferencesLogInfo_validator) +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)] +FileRenameDetails._all_fields_ = [('relocate_action_details', FileRenameDetails.relocate_action_details.validator)] -FileRenameType._description_validator = bv.String() +FileRenameType.description.validator = bv.String() FileRenameType._all_field_names_ = set(['description']) -FileRenameType._all_fields_ = [('description', FileRenameType._description_validator)] +FileRenameType._all_fields_ = [('description', FileRenameType.description.validator)] -FileRequestChangeDetails._file_request_id_validator = bv.Nullable(file_requests.FileRequestId_validator) -FileRequestChangeDetails._previous_details_validator = bv.Nullable(FileRequestDetails_validator) -FileRequestChangeDetails._new_details_validator = FileRequestDetails_validator +FileRequestChangeDetails.file_request_id.validator = bv.Nullable(file_requests.FileRequestId_validator) +FileRequestChangeDetails.previous_details.validator = bv.Nullable(FileRequestDetails_validator) +FileRequestChangeDetails.new_details.validator = FileRequestDetails_validator FileRequestChangeDetails._all_field_names_ = set([ 'file_request_id', 'previous_details', 'new_details', ]) FileRequestChangeDetails._all_fields_ = [ - ('file_request_id', FileRequestChangeDetails._file_request_id_validator), - ('previous_details', FileRequestChangeDetails._previous_details_validator), - ('new_details', FileRequestChangeDetails._new_details_validator), + ('file_request_id', FileRequestChangeDetails.file_request_id.validator), + ('previous_details', FileRequestChangeDetails.previous_details.validator), + ('new_details', FileRequestChangeDetails.new_details.validator), ] -FileRequestChangeType._description_validator = bv.String() +FileRequestChangeType.description.validator = bv.String() FileRequestChangeType._all_field_names_ = set(['description']) -FileRequestChangeType._all_fields_ = [('description', FileRequestChangeType._description_validator)] +FileRequestChangeType._all_fields_ = [('description', FileRequestChangeType.description.validator)] -FileRequestCloseDetails._file_request_id_validator = bv.Nullable(file_requests.FileRequestId_validator) -FileRequestCloseDetails._previous_details_validator = bv.Nullable(FileRequestDetails_validator) +FileRequestCloseDetails.file_request_id.validator = bv.Nullable(file_requests.FileRequestId_validator) +FileRequestCloseDetails.previous_details.validator = bv.Nullable(FileRequestDetails_validator) FileRequestCloseDetails._all_field_names_ = set([ 'file_request_id', 'previous_details', ]) FileRequestCloseDetails._all_fields_ = [ - ('file_request_id', FileRequestCloseDetails._file_request_id_validator), - ('previous_details', FileRequestCloseDetails._previous_details_validator), + ('file_request_id', FileRequestCloseDetails.file_request_id.validator), + ('previous_details', FileRequestCloseDetails.previous_details.validator), ] -FileRequestCloseType._description_validator = bv.String() +FileRequestCloseType.description.validator = bv.String() FileRequestCloseType._all_field_names_ = set(['description']) -FileRequestCloseType._all_fields_ = [('description', FileRequestCloseType._description_validator)] +FileRequestCloseType._all_fields_ = [('description', FileRequestCloseType.description.validator)] -FileRequestCreateDetails._file_request_id_validator = bv.Nullable(file_requests.FileRequestId_validator) -FileRequestCreateDetails._request_details_validator = bv.Nullable(FileRequestDetails_validator) +FileRequestCreateDetails.file_request_id.validator = bv.Nullable(file_requests.FileRequestId_validator) +FileRequestCreateDetails.request_details.validator = bv.Nullable(FileRequestDetails_validator) FileRequestCreateDetails._all_field_names_ = set([ 'file_request_id', 'request_details', ]) FileRequestCreateDetails._all_fields_ = [ - ('file_request_id', FileRequestCreateDetails._file_request_id_validator), - ('request_details', FileRequestCreateDetails._request_details_validator), + ('file_request_id', FileRequestCreateDetails.file_request_id.validator), + ('request_details', FileRequestCreateDetails.request_details.validator), ] -FileRequestCreateType._description_validator = bv.String() +FileRequestCreateType.description.validator = bv.String() FileRequestCreateType._all_field_names_ = set(['description']) -FileRequestCreateType._all_fields_ = [('description', FileRequestCreateType._description_validator)] +FileRequestCreateType._all_fields_ = [('description', FileRequestCreateType.description.validator)] -FileRequestDeadline._deadline_validator = bv.Nullable(common.DropboxTimestamp_validator) -FileRequestDeadline._allow_late_uploads_validator = bv.Nullable(bv.String()) +FileRequestDeadline.deadline.validator = bv.Nullable(common.DropboxTimestamp_validator) +FileRequestDeadline.allow_late_uploads.validator = bv.Nullable(bv.String()) FileRequestDeadline._all_field_names_ = set([ 'deadline', 'allow_late_uploads', ]) FileRequestDeadline._all_fields_ = [ - ('deadline', FileRequestDeadline._deadline_validator), - ('allow_late_uploads', FileRequestDeadline._allow_late_uploads_validator), + ('deadline', FileRequestDeadline.deadline.validator), + ('allow_late_uploads', FileRequestDeadline.allow_late_uploads.validator), ] -FileRequestDeleteDetails._file_request_id_validator = bv.Nullable(file_requests.FileRequestId_validator) -FileRequestDeleteDetails._previous_details_validator = bv.Nullable(FileRequestDetails_validator) +FileRequestDeleteDetails.file_request_id.validator = bv.Nullable(file_requests.FileRequestId_validator) +FileRequestDeleteDetails.previous_details.validator = bv.Nullable(FileRequestDetails_validator) FileRequestDeleteDetails._all_field_names_ = set([ 'file_request_id', 'previous_details', ]) FileRequestDeleteDetails._all_fields_ = [ - ('file_request_id', FileRequestDeleteDetails._file_request_id_validator), - ('previous_details', FileRequestDeleteDetails._previous_details_validator), + ('file_request_id', FileRequestDeleteDetails.file_request_id.validator), + ('previous_details', FileRequestDeleteDetails.previous_details.validator), ] -FileRequestDeleteType._description_validator = bv.String() +FileRequestDeleteType.description.validator = bv.String() FileRequestDeleteType._all_field_names_ = set(['description']) -FileRequestDeleteType._all_fields_ = [('description', FileRequestDeleteType._description_validator)] +FileRequestDeleteType._all_fields_ = [('description', FileRequestDeleteType.description.validator)] -FileRequestDetails._asset_index_validator = bv.UInt64() -FileRequestDetails._deadline_validator = bv.Nullable(FileRequestDeadline_validator) +FileRequestDetails.asset_index.validator = bv.UInt64() +FileRequestDetails.deadline.validator = bv.Nullable(FileRequestDeadline_validator) FileRequestDetails._all_field_names_ = set([ 'asset_index', 'deadline', ]) FileRequestDetails._all_fields_ = [ - ('asset_index', FileRequestDetails._asset_index_validator), - ('deadline', FileRequestDetails._deadline_validator), + ('asset_index', FileRequestDetails.asset_index.validator), + ('deadline', FileRequestDetails.deadline.validator), ] -FileRequestReceiveFileDetails._file_request_id_validator = bv.Nullable(file_requests.FileRequestId_validator) -FileRequestReceiveFileDetails._file_request_details_validator = bv.Nullable(FileRequestDetails_validator) -FileRequestReceiveFileDetails._submitted_file_names_validator = bv.List(bv.String()) -FileRequestReceiveFileDetails._submitter_name_validator = bv.Nullable(common.DisplayNameLegacy_validator) -FileRequestReceiveFileDetails._submitter_email_validator = bv.Nullable(EmailAddress_validator) +FileRequestReceiveFileDetails.file_request_id.validator = bv.Nullable(file_requests.FileRequestId_validator) +FileRequestReceiveFileDetails.file_request_details.validator = bv.Nullable(FileRequestDetails_validator) +FileRequestReceiveFileDetails.submitted_file_names.validator = bv.List(bv.String()) +FileRequestReceiveFileDetails.submitter_name.validator = bv.Nullable(common.DisplayNameLegacy_validator) +FileRequestReceiveFileDetails.submitter_email.validator = bv.Nullable(EmailAddress_validator) FileRequestReceiveFileDetails._all_field_names_ = set([ 'file_request_id', 'file_request_details', @@ -105219,45 +72189,45 @@ def __repr__(self): 'submitter_email', ]) FileRequestReceiveFileDetails._all_fields_ = [ - ('file_request_id', FileRequestReceiveFileDetails._file_request_id_validator), - ('file_request_details', FileRequestReceiveFileDetails._file_request_details_validator), - ('submitted_file_names', FileRequestReceiveFileDetails._submitted_file_names_validator), - ('submitter_name', FileRequestReceiveFileDetails._submitter_name_validator), - ('submitter_email', FileRequestReceiveFileDetails._submitter_email_validator), + ('file_request_id', FileRequestReceiveFileDetails.file_request_id.validator), + ('file_request_details', FileRequestReceiveFileDetails.file_request_details.validator), + ('submitted_file_names', FileRequestReceiveFileDetails.submitted_file_names.validator), + ('submitter_name', FileRequestReceiveFileDetails.submitter_name.validator), + ('submitter_email', FileRequestReceiveFileDetails.submitter_email.validator), ] -FileRequestReceiveFileType._description_validator = bv.String() +FileRequestReceiveFileType.description.validator = bv.String() FileRequestReceiveFileType._all_field_names_ = set(['description']) -FileRequestReceiveFileType._all_fields_ = [('description', FileRequestReceiveFileType._description_validator)] +FileRequestReceiveFileType._all_fields_ = [('description', FileRequestReceiveFileType.description.validator)] -FileRequestsChangePolicyDetails._new_value_validator = FileRequestsPolicy_validator -FileRequestsChangePolicyDetails._previous_value_validator = bv.Nullable(FileRequestsPolicy_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), + ('new_value', FileRequestsChangePolicyDetails.new_value.validator), + ('previous_value', FileRequestsChangePolicyDetails.previous_value.validator), ] -FileRequestsChangePolicyType._description_validator = bv.String() +FileRequestsChangePolicyType.description.validator = bv.String() FileRequestsChangePolicyType._all_field_names_ = set(['description']) -FileRequestsChangePolicyType._all_fields_ = [('description', FileRequestsChangePolicyType._description_validator)] +FileRequestsChangePolicyType._all_fields_ = [('description', FileRequestsChangePolicyType.description.validator)] FileRequestsEmailsEnabledDetails._all_field_names_ = set([]) FileRequestsEmailsEnabledDetails._all_fields_ = [] -FileRequestsEmailsEnabledType._description_validator = bv.String() +FileRequestsEmailsEnabledType.description.validator = bv.String() FileRequestsEmailsEnabledType._all_field_names_ = set(['description']) -FileRequestsEmailsEnabledType._all_fields_ = [('description', FileRequestsEmailsEnabledType._description_validator)] +FileRequestsEmailsEnabledType._all_fields_ = [('description', FileRequestsEmailsEnabledType.description.validator)] FileRequestsEmailsRestrictedToTeamOnlyDetails._all_field_names_ = set([]) FileRequestsEmailsRestrictedToTeamOnlyDetails._all_fields_ = [] -FileRequestsEmailsRestrictedToTeamOnlyType._description_validator = bv.String() +FileRequestsEmailsRestrictedToTeamOnlyType.description.validator = bv.String() FileRequestsEmailsRestrictedToTeamOnlyType._all_field_names_ = set(['description']) -FileRequestsEmailsRestrictedToTeamOnlyType._all_fields_ = [('description', FileRequestsEmailsRestrictedToTeamOnlyType._description_validator)] +FileRequestsEmailsRestrictedToTeamOnlyType._all_fields_ = [('description', FileRequestsEmailsRestrictedToTeamOnlyType.description.validator)] FileRequestsPolicy._disabled_validator = bv.Void() FileRequestsPolicy._enabled_validator = bv.Void() @@ -105272,50 +72242,50 @@ def __repr__(self): FileRequestsPolicy.enabled = FileRequestsPolicy('enabled') FileRequestsPolicy.other = FileRequestsPolicy('other') -FileResolveCommentDetails._comment_text_validator = bv.Nullable(bv.String()) +FileResolveCommentDetails.comment_text.validator = bv.Nullable(bv.String()) FileResolveCommentDetails._all_field_names_ = set(['comment_text']) -FileResolveCommentDetails._all_fields_ = [('comment_text', FileResolveCommentDetails._comment_text_validator)] +FileResolveCommentDetails._all_fields_ = [('comment_text', FileResolveCommentDetails.comment_text.validator)] -FileResolveCommentType._description_validator = bv.String() +FileResolveCommentType.description.validator = bv.String() FileResolveCommentType._all_field_names_ = set(['description']) -FileResolveCommentType._all_fields_ = [('description', FileResolveCommentType._description_validator)] +FileResolveCommentType._all_fields_ = [('description', FileResolveCommentType.description.validator)] FileRestoreDetails._all_field_names_ = set([]) FileRestoreDetails._all_fields_ = [] -FileRestoreType._description_validator = bv.String() +FileRestoreType.description.validator = bv.String() FileRestoreType._all_field_names_ = set(['description']) -FileRestoreType._all_fields_ = [('description', FileRestoreType._description_validator)] +FileRestoreType._all_fields_ = [('description', FileRestoreType.description.validator)] FileRevertDetails._all_field_names_ = set([]) FileRevertDetails._all_fields_ = [] -FileRevertType._description_validator = bv.String() +FileRevertType.description.validator = bv.String() FileRevertType._all_field_names_ = set(['description']) -FileRevertType._all_fields_ = [('description', FileRevertType._description_validator)] +FileRevertType._all_fields_ = [('description', FileRevertType.description.validator)] FileRollbackChangesDetails._all_field_names_ = set([]) FileRollbackChangesDetails._all_fields_ = [] -FileRollbackChangesType._description_validator = bv.String() +FileRollbackChangesType.description.validator = bv.String() FileRollbackChangesType._all_field_names_ = set(['description']) -FileRollbackChangesType._all_fields_ = [('description', FileRollbackChangesType._description_validator)] +FileRollbackChangesType._all_fields_ = [('description', FileRollbackChangesType.description.validator)] -FileSaveCopyReferenceDetails._relocate_action_details_validator = bv.List(RelocateAssetReferencesLogInfo_validator) +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)] +FileSaveCopyReferenceDetails._all_fields_ = [('relocate_action_details', FileSaveCopyReferenceDetails.relocate_action_details.validator)] -FileSaveCopyReferenceType._description_validator = bv.String() +FileSaveCopyReferenceType.description.validator = bv.String() FileSaveCopyReferenceType._all_field_names_ = set(['description']) -FileSaveCopyReferenceType._all_fields_ = [('description', FileSaveCopyReferenceType._description_validator)] +FileSaveCopyReferenceType._all_fields_ = [('description', FileSaveCopyReferenceType.description.validator)] -FileTransfersFileAddDetails._file_transfer_id_validator = bv.String() +FileTransfersFileAddDetails.file_transfer_id.validator = bv.String() FileTransfersFileAddDetails._all_field_names_ = set(['file_transfer_id']) -FileTransfersFileAddDetails._all_fields_ = [('file_transfer_id', FileTransfersFileAddDetails._file_transfer_id_validator)] +FileTransfersFileAddDetails._all_fields_ = [('file_transfer_id', FileTransfersFileAddDetails.file_transfer_id.validator)] -FileTransfersFileAddType._description_validator = bv.String() +FileTransfersFileAddType.description.validator = bv.String() FileTransfersFileAddType._all_field_names_ = set(['description']) -FileTransfersFileAddType._all_fields_ = [('description', FileTransfersFileAddType._description_validator)] +FileTransfersFileAddType._all_fields_ = [('description', FileTransfersFileAddType.description.validator)] FileTransfersPolicy._disabled_validator = bv.Void() FileTransfersPolicy._enabled_validator = bv.Void() @@ -105330,115 +72300,115 @@ def __repr__(self): FileTransfersPolicy.enabled = FileTransfersPolicy('enabled') FileTransfersPolicy.other = FileTransfersPolicy('other') -FileTransfersPolicyChangedDetails._new_value_validator = FileTransfersPolicy_validator -FileTransfersPolicyChangedDetails._previous_value_validator = FileTransfersPolicy_validator +FileTransfersPolicyChangedDetails.new_value.validator = FileTransfersPolicy_validator +FileTransfersPolicyChangedDetails.previous_value.validator = FileTransfersPolicy_validator FileTransfersPolicyChangedDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) FileTransfersPolicyChangedDetails._all_fields_ = [ - ('new_value', FileTransfersPolicyChangedDetails._new_value_validator), - ('previous_value', FileTransfersPolicyChangedDetails._previous_value_validator), + ('new_value', FileTransfersPolicyChangedDetails.new_value.validator), + ('previous_value', FileTransfersPolicyChangedDetails.previous_value.validator), ] -FileTransfersPolicyChangedType._description_validator = bv.String() +FileTransfersPolicyChangedType.description.validator = bv.String() FileTransfersPolicyChangedType._all_field_names_ = set(['description']) -FileTransfersPolicyChangedType._all_fields_ = [('description', FileTransfersPolicyChangedType._description_validator)] +FileTransfersPolicyChangedType._all_fields_ = [('description', FileTransfersPolicyChangedType.description.validator)] -FileTransfersTransferDeleteDetails._file_transfer_id_validator = bv.String() +FileTransfersTransferDeleteDetails.file_transfer_id.validator = bv.String() FileTransfersTransferDeleteDetails._all_field_names_ = set(['file_transfer_id']) -FileTransfersTransferDeleteDetails._all_fields_ = [('file_transfer_id', FileTransfersTransferDeleteDetails._file_transfer_id_validator)] +FileTransfersTransferDeleteDetails._all_fields_ = [('file_transfer_id', FileTransfersTransferDeleteDetails.file_transfer_id.validator)] -FileTransfersTransferDeleteType._description_validator = bv.String() +FileTransfersTransferDeleteType.description.validator = bv.String() FileTransfersTransferDeleteType._all_field_names_ = set(['description']) -FileTransfersTransferDeleteType._all_fields_ = [('description', FileTransfersTransferDeleteType._description_validator)] +FileTransfersTransferDeleteType._all_fields_ = [('description', FileTransfersTransferDeleteType.description.validator)] -FileTransfersTransferDownloadDetails._file_transfer_id_validator = bv.String() +FileTransfersTransferDownloadDetails.file_transfer_id.validator = bv.String() FileTransfersTransferDownloadDetails._all_field_names_ = set(['file_transfer_id']) -FileTransfersTransferDownloadDetails._all_fields_ = [('file_transfer_id', FileTransfersTransferDownloadDetails._file_transfer_id_validator)] +FileTransfersTransferDownloadDetails._all_fields_ = [('file_transfer_id', FileTransfersTransferDownloadDetails.file_transfer_id.validator)] -FileTransfersTransferDownloadType._description_validator = bv.String() +FileTransfersTransferDownloadType.description.validator = bv.String() FileTransfersTransferDownloadType._all_field_names_ = set(['description']) -FileTransfersTransferDownloadType._all_fields_ = [('description', FileTransfersTransferDownloadType._description_validator)] +FileTransfersTransferDownloadType._all_fields_ = [('description', FileTransfersTransferDownloadType.description.validator)] -FileTransfersTransferSendDetails._file_transfer_id_validator = bv.String() +FileTransfersTransferSendDetails.file_transfer_id.validator = bv.String() FileTransfersTransferSendDetails._all_field_names_ = set(['file_transfer_id']) -FileTransfersTransferSendDetails._all_fields_ = [('file_transfer_id', FileTransfersTransferSendDetails._file_transfer_id_validator)] +FileTransfersTransferSendDetails._all_fields_ = [('file_transfer_id', FileTransfersTransferSendDetails.file_transfer_id.validator)] -FileTransfersTransferSendType._description_validator = bv.String() +FileTransfersTransferSendType.description.validator = bv.String() FileTransfersTransferSendType._all_field_names_ = set(['description']) -FileTransfersTransferSendType._all_fields_ = [('description', FileTransfersTransferSendType._description_validator)] +FileTransfersTransferSendType._all_fields_ = [('description', FileTransfersTransferSendType.description.validator)] -FileTransfersTransferViewDetails._file_transfer_id_validator = bv.String() +FileTransfersTransferViewDetails.file_transfer_id.validator = bv.String() FileTransfersTransferViewDetails._all_field_names_ = set(['file_transfer_id']) -FileTransfersTransferViewDetails._all_fields_ = [('file_transfer_id', FileTransfersTransferViewDetails._file_transfer_id_validator)] +FileTransfersTransferViewDetails._all_fields_ = [('file_transfer_id', FileTransfersTransferViewDetails.file_transfer_id.validator)] -FileTransfersTransferViewType._description_validator = bv.String() +FileTransfersTransferViewType.description.validator = bv.String() FileTransfersTransferViewType._all_field_names_ = set(['description']) -FileTransfersTransferViewType._all_fields_ = [('description', FileTransfersTransferViewType._description_validator)] +FileTransfersTransferViewType._all_fields_ = [('description', FileTransfersTransferViewType.description.validator)] -FileUnlikeCommentDetails._comment_text_validator = bv.Nullable(bv.String()) +FileUnlikeCommentDetails.comment_text.validator = bv.Nullable(bv.String()) FileUnlikeCommentDetails._all_field_names_ = set(['comment_text']) -FileUnlikeCommentDetails._all_fields_ = [('comment_text', FileUnlikeCommentDetails._comment_text_validator)] +FileUnlikeCommentDetails._all_fields_ = [('comment_text', FileUnlikeCommentDetails.comment_text.validator)] -FileUnlikeCommentType._description_validator = bv.String() +FileUnlikeCommentType.description.validator = bv.String() FileUnlikeCommentType._all_field_names_ = set(['description']) -FileUnlikeCommentType._all_fields_ = [('description', FileUnlikeCommentType._description_validator)] +FileUnlikeCommentType._all_fields_ = [('description', FileUnlikeCommentType.description.validator)] -FileUnresolveCommentDetails._comment_text_validator = bv.Nullable(bv.String()) +FileUnresolveCommentDetails.comment_text.validator = bv.Nullable(bv.String()) FileUnresolveCommentDetails._all_field_names_ = set(['comment_text']) -FileUnresolveCommentDetails._all_fields_ = [('comment_text', FileUnresolveCommentDetails._comment_text_validator)] +FileUnresolveCommentDetails._all_fields_ = [('comment_text', FileUnresolveCommentDetails.comment_text.validator)] -FileUnresolveCommentType._description_validator = bv.String() +FileUnresolveCommentType.description.validator = bv.String() FileUnresolveCommentType._all_field_names_ = set(['description']) -FileUnresolveCommentType._all_fields_ = [('description', FileUnresolveCommentType._description_validator)] +FileUnresolveCommentType._all_fields_ = [('description', FileUnresolveCommentType.description.validator)] -FolderLogInfo._file_count_validator = bv.Nullable(bv.UInt64()) +FolderLogInfo.file_count.validator = bv.Nullable(bv.UInt64()) FolderLogInfo._all_field_names_ = FileOrFolderLogInfo._all_field_names_.union(set(['file_count'])) -FolderLogInfo._all_fields_ = FileOrFolderLogInfo._all_fields_ + [('file_count', FolderLogInfo._file_count_validator)] +FolderLogInfo._all_fields_ = FileOrFolderLogInfo._all_fields_ + [('file_count', FolderLogInfo.file_count.validator)] -FolderOverviewDescriptionChangedDetails._folder_overview_location_asset_validator = bv.UInt64() +FolderOverviewDescriptionChangedDetails.folder_overview_location_asset.validator = bv.UInt64() FolderOverviewDescriptionChangedDetails._all_field_names_ = set(['folder_overview_location_asset']) -FolderOverviewDescriptionChangedDetails._all_fields_ = [('folder_overview_location_asset', FolderOverviewDescriptionChangedDetails._folder_overview_location_asset_validator)] +FolderOverviewDescriptionChangedDetails._all_fields_ = [('folder_overview_location_asset', FolderOverviewDescriptionChangedDetails.folder_overview_location_asset.validator)] -FolderOverviewDescriptionChangedType._description_validator = bv.String() +FolderOverviewDescriptionChangedType.description.validator = bv.String() FolderOverviewDescriptionChangedType._all_field_names_ = set(['description']) -FolderOverviewDescriptionChangedType._all_fields_ = [('description', FolderOverviewDescriptionChangedType._description_validator)] +FolderOverviewDescriptionChangedType._all_fields_ = [('description', FolderOverviewDescriptionChangedType.description.validator)] -FolderOverviewItemPinnedDetails._folder_overview_location_asset_validator = bv.UInt64() -FolderOverviewItemPinnedDetails._pinned_items_asset_indices_validator = bv.List(bv.UInt64()) +FolderOverviewItemPinnedDetails.folder_overview_location_asset.validator = bv.UInt64() +FolderOverviewItemPinnedDetails.pinned_items_asset_indices.validator = bv.List(bv.UInt64()) FolderOverviewItemPinnedDetails._all_field_names_ = set([ 'folder_overview_location_asset', 'pinned_items_asset_indices', ]) FolderOverviewItemPinnedDetails._all_fields_ = [ - ('folder_overview_location_asset', FolderOverviewItemPinnedDetails._folder_overview_location_asset_validator), - ('pinned_items_asset_indices', FolderOverviewItemPinnedDetails._pinned_items_asset_indices_validator), + ('folder_overview_location_asset', FolderOverviewItemPinnedDetails.folder_overview_location_asset.validator), + ('pinned_items_asset_indices', FolderOverviewItemPinnedDetails.pinned_items_asset_indices.validator), ] -FolderOverviewItemPinnedType._description_validator = bv.String() +FolderOverviewItemPinnedType.description.validator = bv.String() FolderOverviewItemPinnedType._all_field_names_ = set(['description']) -FolderOverviewItemPinnedType._all_fields_ = [('description', FolderOverviewItemPinnedType._description_validator)] +FolderOverviewItemPinnedType._all_fields_ = [('description', FolderOverviewItemPinnedType.description.validator)] -FolderOverviewItemUnpinnedDetails._folder_overview_location_asset_validator = bv.UInt64() -FolderOverviewItemUnpinnedDetails._pinned_items_asset_indices_validator = bv.List(bv.UInt64()) +FolderOverviewItemUnpinnedDetails.folder_overview_location_asset.validator = bv.UInt64() +FolderOverviewItemUnpinnedDetails.pinned_items_asset_indices.validator = bv.List(bv.UInt64()) FolderOverviewItemUnpinnedDetails._all_field_names_ = set([ 'folder_overview_location_asset', 'pinned_items_asset_indices', ]) FolderOverviewItemUnpinnedDetails._all_fields_ = [ - ('folder_overview_location_asset', FolderOverviewItemUnpinnedDetails._folder_overview_location_asset_validator), - ('pinned_items_asset_indices', FolderOverviewItemUnpinnedDetails._pinned_items_asset_indices_validator), + ('folder_overview_location_asset', FolderOverviewItemUnpinnedDetails.folder_overview_location_asset.validator), + ('pinned_items_asset_indices', FolderOverviewItemUnpinnedDetails.pinned_items_asset_indices.validator), ] -FolderOverviewItemUnpinnedType._description_validator = bv.String() +FolderOverviewItemUnpinnedType.description.validator = bv.String() FolderOverviewItemUnpinnedType._all_field_names_ = set(['description']) -FolderOverviewItemUnpinnedType._all_fields_ = [('description', FolderOverviewItemUnpinnedType._description_validator)] +FolderOverviewItemUnpinnedType._all_fields_ = [('description', FolderOverviewItemUnpinnedType.description.validator)] -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.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', @@ -105446,17 +72416,17 @@ def __repr__(self): 'ip_address', ]) GeoLocationLogInfo._all_fields_ = [ - ('city', GeoLocationLogInfo._city_validator), - ('region', GeoLocationLogInfo._region_validator), - ('country', GeoLocationLogInfo._country_validator), - ('ip_address', GeoLocationLogInfo._ip_address_validator), + ('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._event_type_validator = bv.Nullable(EventTypeArg_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.event_type.validator = bv.Nullable(EventTypeArg_validator) GetTeamEventsArg._all_field_names_ = set([ 'limit', 'account_id', @@ -105465,16 +72435,16 @@ def __repr__(self): 'event_type', ]) GetTeamEventsArg._all_fields_ = [ - ('limit', GetTeamEventsArg._limit_validator), - ('account_id', GetTeamEventsArg._account_id_validator), - ('time', GetTeamEventsArg._time_validator), - ('category', GetTeamEventsArg._category_validator), - ('event_type', GetTeamEventsArg._event_type_validator), + ('limit', GetTeamEventsArg.limit.validator), + ('account_id', GetTeamEventsArg.account_id.validator), + ('time', GetTeamEventsArg.time.validator), + ('category', GetTeamEventsArg.category.validator), + ('event_type', GetTeamEventsArg.event_type.validator), ] -GetTeamEventsContinueArg._cursor_validator = bv.String() +GetTeamEventsContinueArg.cursor.validator = bv.String() GetTeamEventsContinueArg._all_field_names_ = set(['cursor']) -GetTeamEventsContinueArg._all_fields_ = [('cursor', GetTeamEventsContinueArg._cursor_validator)] +GetTeamEventsContinueArg._all_fields_ = [('cursor', GetTeamEventsContinueArg.cursor.validator)] GetTeamEventsContinueError._bad_cursor_validator = bv.Void() GetTeamEventsContinueError._reset_validator = common.DropboxTimestamp_validator @@ -105504,34 +72474,34 @@ def __repr__(self): GetTeamEventsError.invalid_filters = GetTeamEventsError('invalid_filters') GetTeamEventsError.other = GetTeamEventsError('other') -GetTeamEventsResult._events_validator = bv.List(TeamEvent_validator) -GetTeamEventsResult._cursor_validator = bv.String() -GetTeamEventsResult._has_more_validator = bv.Boolean() +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), + ('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.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), + ('new_value', GoogleSsoChangePolicyDetails.new_value.validator), + ('previous_value', GoogleSsoChangePolicyDetails.previous_value.validator), ] -GoogleSsoChangePolicyType._description_validator = bv.String() +GoogleSsoChangePolicyType.description.validator = bv.String() GoogleSsoChangePolicyType._all_field_names_ = set(['description']) -GoogleSsoChangePolicyType._all_fields_ = [('description', GoogleSsoChangePolicyType._description_validator)] +GoogleSsoChangePolicyType._all_fields_ = [('description', GoogleSsoChangePolicyType.description.validator)] GoogleSsoPolicy._disabled_validator = bv.Void() GoogleSsoPolicy._enabled_validator = bv.Void() @@ -105546,10 +72516,10 @@ def __repr__(self): GoogleSsoPolicy.enabled = GoogleSsoPolicy('enabled') GoogleSsoPolicy.other = GoogleSsoPolicy('other') -GovernancePolicyAddFoldersDetails._governance_policy_id_validator = bv.String() -GovernancePolicyAddFoldersDetails._name_validator = bv.String() -GovernancePolicyAddFoldersDetails._policy_type_validator = bv.Nullable(PolicyType_validator) -GovernancePolicyAddFoldersDetails._folders_validator = bv.Nullable(bv.List(bv.String())) +GovernancePolicyAddFoldersDetails.governance_policy_id.validator = bv.String() +GovernancePolicyAddFoldersDetails.name.validator = bv.String() +GovernancePolicyAddFoldersDetails.policy_type.validator = bv.Nullable(PolicyType_validator) +GovernancePolicyAddFoldersDetails.folders.validator = bv.Nullable(bv.List(bv.String())) GovernancePolicyAddFoldersDetails._all_field_names_ = set([ 'governance_policy_id', 'name', @@ -105557,21 +72527,21 @@ def __repr__(self): 'folders', ]) GovernancePolicyAddFoldersDetails._all_fields_ = [ - ('governance_policy_id', GovernancePolicyAddFoldersDetails._governance_policy_id_validator), - ('name', GovernancePolicyAddFoldersDetails._name_validator), - ('policy_type', GovernancePolicyAddFoldersDetails._policy_type_validator), - ('folders', GovernancePolicyAddFoldersDetails._folders_validator), + ('governance_policy_id', GovernancePolicyAddFoldersDetails.governance_policy_id.validator), + ('name', GovernancePolicyAddFoldersDetails.name.validator), + ('policy_type', GovernancePolicyAddFoldersDetails.policy_type.validator), + ('folders', GovernancePolicyAddFoldersDetails.folders.validator), ] -GovernancePolicyAddFoldersType._description_validator = bv.String() +GovernancePolicyAddFoldersType.description.validator = bv.String() GovernancePolicyAddFoldersType._all_field_names_ = set(['description']) -GovernancePolicyAddFoldersType._all_fields_ = [('description', GovernancePolicyAddFoldersType._description_validator)] +GovernancePolicyAddFoldersType._all_fields_ = [('description', GovernancePolicyAddFoldersType.description.validator)] -GovernancePolicyCreateDetails._governance_policy_id_validator = bv.String() -GovernancePolicyCreateDetails._name_validator = bv.String() -GovernancePolicyCreateDetails._policy_type_validator = bv.Nullable(PolicyType_validator) -GovernancePolicyCreateDetails._duration_validator = DurationLogInfo_validator -GovernancePolicyCreateDetails._folders_validator = bv.Nullable(bv.List(bv.String())) +GovernancePolicyCreateDetails.governance_policy_id.validator = bv.String() +GovernancePolicyCreateDetails.name.validator = bv.String() +GovernancePolicyCreateDetails.policy_type.validator = bv.Nullable(PolicyType_validator) +GovernancePolicyCreateDetails.duration.validator = DurationLogInfo_validator +GovernancePolicyCreateDetails.folders.validator = bv.Nullable(bv.List(bv.String())) GovernancePolicyCreateDetails._all_field_names_ = set([ 'governance_policy_id', 'name', @@ -105580,41 +72550,41 @@ def __repr__(self): 'folders', ]) GovernancePolicyCreateDetails._all_fields_ = [ - ('governance_policy_id', GovernancePolicyCreateDetails._governance_policy_id_validator), - ('name', GovernancePolicyCreateDetails._name_validator), - ('policy_type', GovernancePolicyCreateDetails._policy_type_validator), - ('duration', GovernancePolicyCreateDetails._duration_validator), - ('folders', GovernancePolicyCreateDetails._folders_validator), + ('governance_policy_id', GovernancePolicyCreateDetails.governance_policy_id.validator), + ('name', GovernancePolicyCreateDetails.name.validator), + ('policy_type', GovernancePolicyCreateDetails.policy_type.validator), + ('duration', GovernancePolicyCreateDetails.duration.validator), + ('folders', GovernancePolicyCreateDetails.folders.validator), ] -GovernancePolicyCreateType._description_validator = bv.String() +GovernancePolicyCreateType.description.validator = bv.String() GovernancePolicyCreateType._all_field_names_ = set(['description']) -GovernancePolicyCreateType._all_fields_ = [('description', GovernancePolicyCreateType._description_validator)] +GovernancePolicyCreateType._all_fields_ = [('description', GovernancePolicyCreateType.description.validator)] -GovernancePolicyDeleteDetails._governance_policy_id_validator = bv.String() -GovernancePolicyDeleteDetails._name_validator = bv.String() -GovernancePolicyDeleteDetails._policy_type_validator = bv.Nullable(PolicyType_validator) +GovernancePolicyDeleteDetails.governance_policy_id.validator = bv.String() +GovernancePolicyDeleteDetails.name.validator = bv.String() +GovernancePolicyDeleteDetails.policy_type.validator = bv.Nullable(PolicyType_validator) GovernancePolicyDeleteDetails._all_field_names_ = set([ 'governance_policy_id', 'name', 'policy_type', ]) GovernancePolicyDeleteDetails._all_fields_ = [ - ('governance_policy_id', GovernancePolicyDeleteDetails._governance_policy_id_validator), - ('name', GovernancePolicyDeleteDetails._name_validator), - ('policy_type', GovernancePolicyDeleteDetails._policy_type_validator), + ('governance_policy_id', GovernancePolicyDeleteDetails.governance_policy_id.validator), + ('name', GovernancePolicyDeleteDetails.name.validator), + ('policy_type', GovernancePolicyDeleteDetails.policy_type.validator), ] -GovernancePolicyDeleteType._description_validator = bv.String() +GovernancePolicyDeleteType.description.validator = bv.String() GovernancePolicyDeleteType._all_field_names_ = set(['description']) -GovernancePolicyDeleteType._all_fields_ = [('description', GovernancePolicyDeleteType._description_validator)] - -GovernancePolicyEditDetailsDetails._governance_policy_id_validator = bv.String() -GovernancePolicyEditDetailsDetails._name_validator = bv.String() -GovernancePolicyEditDetailsDetails._policy_type_validator = bv.Nullable(PolicyType_validator) -GovernancePolicyEditDetailsDetails._attribute_validator = bv.String() -GovernancePolicyEditDetailsDetails._previous_value_validator = bv.String() -GovernancePolicyEditDetailsDetails._new_value_validator = bv.String() +GovernancePolicyDeleteType._all_fields_ = [('description', GovernancePolicyDeleteType.description.validator)] + +GovernancePolicyEditDetailsDetails.governance_policy_id.validator = bv.String() +GovernancePolicyEditDetailsDetails.name.validator = bv.String() +GovernancePolicyEditDetailsDetails.policy_type.validator = bv.Nullable(PolicyType_validator) +GovernancePolicyEditDetailsDetails.attribute.validator = bv.String() +GovernancePolicyEditDetailsDetails.previous_value.validator = bv.String() +GovernancePolicyEditDetailsDetails.new_value.validator = bv.String() GovernancePolicyEditDetailsDetails._all_field_names_ = set([ 'governance_policy_id', 'name', @@ -105624,23 +72594,23 @@ def __repr__(self): 'new_value', ]) GovernancePolicyEditDetailsDetails._all_fields_ = [ - ('governance_policy_id', GovernancePolicyEditDetailsDetails._governance_policy_id_validator), - ('name', GovernancePolicyEditDetailsDetails._name_validator), - ('policy_type', GovernancePolicyEditDetailsDetails._policy_type_validator), - ('attribute', GovernancePolicyEditDetailsDetails._attribute_validator), - ('previous_value', GovernancePolicyEditDetailsDetails._previous_value_validator), - ('new_value', GovernancePolicyEditDetailsDetails._new_value_validator), + ('governance_policy_id', GovernancePolicyEditDetailsDetails.governance_policy_id.validator), + ('name', GovernancePolicyEditDetailsDetails.name.validator), + ('policy_type', GovernancePolicyEditDetailsDetails.policy_type.validator), + ('attribute', GovernancePolicyEditDetailsDetails.attribute.validator), + ('previous_value', GovernancePolicyEditDetailsDetails.previous_value.validator), + ('new_value', GovernancePolicyEditDetailsDetails.new_value.validator), ] -GovernancePolicyEditDetailsType._description_validator = bv.String() +GovernancePolicyEditDetailsType.description.validator = bv.String() GovernancePolicyEditDetailsType._all_field_names_ = set(['description']) -GovernancePolicyEditDetailsType._all_fields_ = [('description', GovernancePolicyEditDetailsType._description_validator)] +GovernancePolicyEditDetailsType._all_fields_ = [('description', GovernancePolicyEditDetailsType.description.validator)] -GovernancePolicyEditDurationDetails._governance_policy_id_validator = bv.String() -GovernancePolicyEditDurationDetails._name_validator = bv.String() -GovernancePolicyEditDurationDetails._policy_type_validator = bv.Nullable(PolicyType_validator) -GovernancePolicyEditDurationDetails._previous_value_validator = DurationLogInfo_validator -GovernancePolicyEditDurationDetails._new_value_validator = DurationLogInfo_validator +GovernancePolicyEditDurationDetails.governance_policy_id.validator = bv.String() +GovernancePolicyEditDurationDetails.name.validator = bv.String() +GovernancePolicyEditDurationDetails.policy_type.validator = bv.Nullable(PolicyType_validator) +GovernancePolicyEditDurationDetails.previous_value.validator = DurationLogInfo_validator +GovernancePolicyEditDurationDetails.new_value.validator = DurationLogInfo_validator GovernancePolicyEditDurationDetails._all_field_names_ = set([ 'governance_policy_id', 'name', @@ -105649,22 +72619,22 @@ def __repr__(self): 'new_value', ]) GovernancePolicyEditDurationDetails._all_fields_ = [ - ('governance_policy_id', GovernancePolicyEditDurationDetails._governance_policy_id_validator), - ('name', GovernancePolicyEditDurationDetails._name_validator), - ('policy_type', GovernancePolicyEditDurationDetails._policy_type_validator), - ('previous_value', GovernancePolicyEditDurationDetails._previous_value_validator), - ('new_value', GovernancePolicyEditDurationDetails._new_value_validator), + ('governance_policy_id', GovernancePolicyEditDurationDetails.governance_policy_id.validator), + ('name', GovernancePolicyEditDurationDetails.name.validator), + ('policy_type', GovernancePolicyEditDurationDetails.policy_type.validator), + ('previous_value', GovernancePolicyEditDurationDetails.previous_value.validator), + ('new_value', GovernancePolicyEditDurationDetails.new_value.validator), ] -GovernancePolicyEditDurationType._description_validator = bv.String() +GovernancePolicyEditDurationType.description.validator = bv.String() GovernancePolicyEditDurationType._all_field_names_ = set(['description']) -GovernancePolicyEditDurationType._all_fields_ = [('description', GovernancePolicyEditDurationType._description_validator)] +GovernancePolicyEditDurationType._all_fields_ = [('description', GovernancePolicyEditDurationType.description.validator)] -GovernancePolicyRemoveFoldersDetails._governance_policy_id_validator = bv.String() -GovernancePolicyRemoveFoldersDetails._name_validator = bv.String() -GovernancePolicyRemoveFoldersDetails._policy_type_validator = bv.Nullable(PolicyType_validator) -GovernancePolicyRemoveFoldersDetails._folders_validator = bv.Nullable(bv.List(bv.String())) -GovernancePolicyRemoveFoldersDetails._reason_validator = bv.Nullable(bv.String()) +GovernancePolicyRemoveFoldersDetails.governance_policy_id.validator = bv.String() +GovernancePolicyRemoveFoldersDetails.name.validator = bv.String() +GovernancePolicyRemoveFoldersDetails.policy_type.validator = bv.Nullable(PolicyType_validator) +GovernancePolicyRemoveFoldersDetails.folders.validator = bv.Nullable(bv.List(bv.String())) +GovernancePolicyRemoveFoldersDetails.reason.validator = bv.Nullable(bv.String()) GovernancePolicyRemoveFoldersDetails._all_field_names_ = set([ 'governance_policy_id', 'name', @@ -105673,100 +72643,100 @@ def __repr__(self): 'reason', ]) GovernancePolicyRemoveFoldersDetails._all_fields_ = [ - ('governance_policy_id', GovernancePolicyRemoveFoldersDetails._governance_policy_id_validator), - ('name', GovernancePolicyRemoveFoldersDetails._name_validator), - ('policy_type', GovernancePolicyRemoveFoldersDetails._policy_type_validator), - ('folders', GovernancePolicyRemoveFoldersDetails._folders_validator), - ('reason', GovernancePolicyRemoveFoldersDetails._reason_validator), + ('governance_policy_id', GovernancePolicyRemoveFoldersDetails.governance_policy_id.validator), + ('name', GovernancePolicyRemoveFoldersDetails.name.validator), + ('policy_type', GovernancePolicyRemoveFoldersDetails.policy_type.validator), + ('folders', GovernancePolicyRemoveFoldersDetails.folders.validator), + ('reason', GovernancePolicyRemoveFoldersDetails.reason.validator), ] -GovernancePolicyRemoveFoldersType._description_validator = bv.String() +GovernancePolicyRemoveFoldersType.description.validator = bv.String() GovernancePolicyRemoveFoldersType._all_field_names_ = set(['description']) -GovernancePolicyRemoveFoldersType._all_fields_ = [('description', GovernancePolicyRemoveFoldersType._description_validator)] +GovernancePolicyRemoveFoldersType._all_fields_ = [('description', GovernancePolicyRemoveFoldersType.description.validator)] -GroupAddExternalIdDetails._new_value_validator = team_common.GroupExternalId_validator +GroupAddExternalIdDetails.new_value.validator = team_common.GroupExternalId_validator GroupAddExternalIdDetails._all_field_names_ = set(['new_value']) -GroupAddExternalIdDetails._all_fields_ = [('new_value', GroupAddExternalIdDetails._new_value_validator)] +GroupAddExternalIdDetails._all_fields_ = [('new_value', GroupAddExternalIdDetails.new_value.validator)] -GroupAddExternalIdType._description_validator = bv.String() +GroupAddExternalIdType.description.validator = bv.String() GroupAddExternalIdType._all_field_names_ = set(['description']) -GroupAddExternalIdType._all_fields_ = [('description', GroupAddExternalIdType._description_validator)] +GroupAddExternalIdType._all_fields_ = [('description', GroupAddExternalIdType.description.validator)] -GroupAddMemberDetails._is_group_owner_validator = bv.Boolean() +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)] +GroupAddMemberDetails._all_fields_ = [('is_group_owner', GroupAddMemberDetails.is_group_owner.validator)] -GroupAddMemberType._description_validator = bv.String() +GroupAddMemberType.description.validator = bv.String() GroupAddMemberType._all_field_names_ = set(['description']) -GroupAddMemberType._all_fields_ = [('description', GroupAddMemberType._description_validator)] +GroupAddMemberType._all_fields_ = [('description', GroupAddMemberType.description.validator)] -GroupChangeExternalIdDetails._new_value_validator = team_common.GroupExternalId_validator -GroupChangeExternalIdDetails._previous_value_validator = team_common.GroupExternalId_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), + ('new_value', GroupChangeExternalIdDetails.new_value.validator), + ('previous_value', GroupChangeExternalIdDetails.previous_value.validator), ] -GroupChangeExternalIdType._description_validator = bv.String() +GroupChangeExternalIdType.description.validator = bv.String() GroupChangeExternalIdType._all_field_names_ = set(['description']) -GroupChangeExternalIdType._all_fields_ = [('description', GroupChangeExternalIdType._description_validator)] +GroupChangeExternalIdType._all_fields_ = [('description', GroupChangeExternalIdType.description.validator)] -GroupChangeManagementTypeDetails._new_value_validator = team_common.GroupManagementType_validator -GroupChangeManagementTypeDetails._previous_value_validator = bv.Nullable(team_common.GroupManagementType_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), + ('new_value', GroupChangeManagementTypeDetails.new_value.validator), + ('previous_value', GroupChangeManagementTypeDetails.previous_value.validator), ] -GroupChangeManagementTypeType._description_validator = bv.String() +GroupChangeManagementTypeType.description.validator = bv.String() GroupChangeManagementTypeType._all_field_names_ = set(['description']) -GroupChangeManagementTypeType._all_fields_ = [('description', GroupChangeManagementTypeType._description_validator)] +GroupChangeManagementTypeType._all_fields_ = [('description', GroupChangeManagementTypeType.description.validator)] -GroupChangeMemberRoleDetails._is_group_owner_validator = bv.Boolean() +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)] +GroupChangeMemberRoleDetails._all_fields_ = [('is_group_owner', GroupChangeMemberRoleDetails.is_group_owner.validator)] -GroupChangeMemberRoleType._description_validator = bv.String() +GroupChangeMemberRoleType.description.validator = bv.String() GroupChangeMemberRoleType._all_field_names_ = set(['description']) -GroupChangeMemberRoleType._all_fields_ = [('description', GroupChangeMemberRoleType._description_validator)] +GroupChangeMemberRoleType._all_fields_ = [('description', GroupChangeMemberRoleType.description.validator)] -GroupCreateDetails._is_company_managed_validator = bv.Nullable(bv.Boolean()) -GroupCreateDetails._join_policy_validator = bv.Nullable(GroupJoinPolicy_validator) +GroupCreateDetails.is_company_managed.validator = bv.Nullable(bv.Boolean()) +GroupCreateDetails.join_policy.validator = bv.Nullable(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), + ('is_company_managed', GroupCreateDetails.is_company_managed.validator), + ('join_policy', GroupCreateDetails.join_policy.validator), ] -GroupCreateType._description_validator = bv.String() +GroupCreateType.description.validator = bv.String() GroupCreateType._all_field_names_ = set(['description']) -GroupCreateType._all_fields_ = [('description', GroupCreateType._description_validator)] +GroupCreateType._all_fields_ = [('description', GroupCreateType.description.validator)] -GroupDeleteDetails._is_company_managed_validator = bv.Nullable(bv.Boolean()) +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)] +GroupDeleteDetails._all_fields_ = [('is_company_managed', GroupDeleteDetails.is_company_managed.validator)] -GroupDeleteType._description_validator = bv.String() +GroupDeleteType.description.validator = bv.String() GroupDeleteType._all_field_names_ = set(['description']) -GroupDeleteType._all_fields_ = [('description', GroupDeleteType._description_validator)] +GroupDeleteType._all_fields_ = [('description', GroupDeleteType.description.validator)] GroupDescriptionUpdatedDetails._all_field_names_ = set([]) GroupDescriptionUpdatedDetails._all_fields_ = [] -GroupDescriptionUpdatedType._description_validator = bv.String() +GroupDescriptionUpdatedType.description.validator = bv.String() GroupDescriptionUpdatedType._all_field_names_ = set(['description']) -GroupDescriptionUpdatedType._all_fields_ = [('description', GroupDescriptionUpdatedType._description_validator)] +GroupDescriptionUpdatedType._all_fields_ = [('description', GroupDescriptionUpdatedType.description.validator)] GroupJoinPolicy._open_validator = bv.Void() GroupJoinPolicy._request_to_join_validator = bv.Void() @@ -105781,93 +72751,93 @@ def __repr__(self): GroupJoinPolicy.request_to_join = GroupJoinPolicy('request_to_join') GroupJoinPolicy.other = GroupJoinPolicy('other') -GroupJoinPolicyUpdatedDetails._is_company_managed_validator = bv.Nullable(bv.Boolean()) -GroupJoinPolicyUpdatedDetails._join_policy_validator = bv.Nullable(GroupJoinPolicy_validator) +GroupJoinPolicyUpdatedDetails.is_company_managed.validator = bv.Nullable(bv.Boolean()) +GroupJoinPolicyUpdatedDetails.join_policy.validator = bv.Nullable(GroupJoinPolicy_validator) GroupJoinPolicyUpdatedDetails._all_field_names_ = set([ 'is_company_managed', 'join_policy', ]) GroupJoinPolicyUpdatedDetails._all_fields_ = [ - ('is_company_managed', GroupJoinPolicyUpdatedDetails._is_company_managed_validator), - ('join_policy', GroupJoinPolicyUpdatedDetails._join_policy_validator), + ('is_company_managed', GroupJoinPolicyUpdatedDetails.is_company_managed.validator), + ('join_policy', GroupJoinPolicyUpdatedDetails.join_policy.validator), ] -GroupJoinPolicyUpdatedType._description_validator = bv.String() +GroupJoinPolicyUpdatedType.description.validator = bv.String() GroupJoinPolicyUpdatedType._all_field_names_ = set(['description']) -GroupJoinPolicyUpdatedType._all_fields_ = [('description', GroupJoinPolicyUpdatedType._description_validator)] +GroupJoinPolicyUpdatedType._all_fields_ = [('description', GroupJoinPolicyUpdatedType.description.validator)] -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.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), + ('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_ = [] -GroupMovedType._description_validator = bv.String() +GroupMovedType.description.validator = bv.String() GroupMovedType._all_field_names_ = set(['description']) -GroupMovedType._all_fields_ = [('description', GroupMovedType._description_validator)] +GroupMovedType._all_fields_ = [('description', GroupMovedType.description.validator)] -GroupRemoveExternalIdDetails._previous_value_validator = team_common.GroupExternalId_validator +GroupRemoveExternalIdDetails.previous_value.validator = team_common.GroupExternalId_validator GroupRemoveExternalIdDetails._all_field_names_ = set(['previous_value']) -GroupRemoveExternalIdDetails._all_fields_ = [('previous_value', GroupRemoveExternalIdDetails._previous_value_validator)] +GroupRemoveExternalIdDetails._all_fields_ = [('previous_value', GroupRemoveExternalIdDetails.previous_value.validator)] -GroupRemoveExternalIdType._description_validator = bv.String() +GroupRemoveExternalIdType.description.validator = bv.String() GroupRemoveExternalIdType._all_field_names_ = set(['description']) -GroupRemoveExternalIdType._all_fields_ = [('description', GroupRemoveExternalIdType._description_validator)] +GroupRemoveExternalIdType._all_fields_ = [('description', GroupRemoveExternalIdType.description.validator)] GroupRemoveMemberDetails._all_field_names_ = set([]) GroupRemoveMemberDetails._all_fields_ = [] -GroupRemoveMemberType._description_validator = bv.String() +GroupRemoveMemberType.description.validator = bv.String() GroupRemoveMemberType._all_field_names_ = set(['description']) -GroupRemoveMemberType._all_fields_ = [('description', GroupRemoveMemberType._description_validator)] +GroupRemoveMemberType._all_fields_ = [('description', GroupRemoveMemberType.description.validator)] -GroupRenameDetails._previous_value_validator = bv.String() -GroupRenameDetails._new_value_validator = bv.String() +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), + ('previous_value', GroupRenameDetails.previous_value.validator), + ('new_value', GroupRenameDetails.new_value.validator), ] -GroupRenameType._description_validator = bv.String() +GroupRenameType.description.validator = bv.String() GroupRenameType._all_field_names_ = set(['description']) -GroupRenameType._all_fields_ = [('description', GroupRenameType._description_validator)] +GroupRenameType._all_fields_ = [('description', GroupRenameType.description.validator)] -GroupUserManagementChangePolicyDetails._new_value_validator = team_policies.GroupCreation_validator -GroupUserManagementChangePolicyDetails._previous_value_validator = bv.Nullable(team_policies.GroupCreation_validator) +GroupUserManagementChangePolicyDetails.new_value.validator = team_policies.GroupCreation_validator +GroupUserManagementChangePolicyDetails.previous_value.validator = bv.Nullable(team_policies.GroupCreation_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), + ('new_value', GroupUserManagementChangePolicyDetails.new_value.validator), + ('previous_value', GroupUserManagementChangePolicyDetails.previous_value.validator), ] -GroupUserManagementChangePolicyType._description_validator = bv.String() +GroupUserManagementChangePolicyType.description.validator = bv.String() GroupUserManagementChangePolicyType._all_field_names_ = set(['description']) -GroupUserManagementChangePolicyType._all_fields_ = [('description', GroupUserManagementChangePolicyType._description_validator)] - -GuestAdminChangeStatusDetails._is_guest_validator = bv.Boolean() -GuestAdminChangeStatusDetails._guest_team_name_validator = bv.Nullable(bv.String()) -GuestAdminChangeStatusDetails._host_team_name_validator = bv.Nullable(bv.String()) -GuestAdminChangeStatusDetails._previous_value_validator = TrustedTeamsRequestState_validator -GuestAdminChangeStatusDetails._new_value_validator = TrustedTeamsRequestState_validator -GuestAdminChangeStatusDetails._action_details_validator = TrustedTeamsRequestAction_validator +GroupUserManagementChangePolicyType._all_fields_ = [('description', GroupUserManagementChangePolicyType.description.validator)] + +GuestAdminChangeStatusDetails.is_guest.validator = bv.Boolean() +GuestAdminChangeStatusDetails.guest_team_name.validator = bv.Nullable(bv.String()) +GuestAdminChangeStatusDetails.host_team_name.validator = bv.Nullable(bv.String()) +GuestAdminChangeStatusDetails.previous_value.validator = TrustedTeamsRequestState_validator +GuestAdminChangeStatusDetails.new_value.validator = TrustedTeamsRequestState_validator +GuestAdminChangeStatusDetails.action_details.validator = TrustedTeamsRequestAction_validator GuestAdminChangeStatusDetails._all_field_names_ = set([ 'is_guest', 'guest_team_name', @@ -105877,47 +72847,47 @@ def __repr__(self): 'action_details', ]) GuestAdminChangeStatusDetails._all_fields_ = [ - ('is_guest', GuestAdminChangeStatusDetails._is_guest_validator), - ('guest_team_name', GuestAdminChangeStatusDetails._guest_team_name_validator), - ('host_team_name', GuestAdminChangeStatusDetails._host_team_name_validator), - ('previous_value', GuestAdminChangeStatusDetails._previous_value_validator), - ('new_value', GuestAdminChangeStatusDetails._new_value_validator), - ('action_details', GuestAdminChangeStatusDetails._action_details_validator), + ('is_guest', GuestAdminChangeStatusDetails.is_guest.validator), + ('guest_team_name', GuestAdminChangeStatusDetails.guest_team_name.validator), + ('host_team_name', GuestAdminChangeStatusDetails.host_team_name.validator), + ('previous_value', GuestAdminChangeStatusDetails.previous_value.validator), + ('new_value', GuestAdminChangeStatusDetails.new_value.validator), + ('action_details', GuestAdminChangeStatusDetails.action_details.validator), ] -GuestAdminChangeStatusType._description_validator = bv.String() +GuestAdminChangeStatusType.description.validator = bv.String() GuestAdminChangeStatusType._all_field_names_ = set(['description']) -GuestAdminChangeStatusType._all_fields_ = [('description', GuestAdminChangeStatusType._description_validator)] +GuestAdminChangeStatusType._all_fields_ = [('description', GuestAdminChangeStatusType.description.validator)] -GuestAdminSignedInViaTrustedTeamsDetails._team_name_validator = bv.Nullable(bv.String()) -GuestAdminSignedInViaTrustedTeamsDetails._trusted_team_name_validator = bv.Nullable(bv.String()) +GuestAdminSignedInViaTrustedTeamsDetails.team_name.validator = bv.Nullable(bv.String()) +GuestAdminSignedInViaTrustedTeamsDetails.trusted_team_name.validator = bv.Nullable(bv.String()) GuestAdminSignedInViaTrustedTeamsDetails._all_field_names_ = set([ 'team_name', 'trusted_team_name', ]) GuestAdminSignedInViaTrustedTeamsDetails._all_fields_ = [ - ('team_name', GuestAdminSignedInViaTrustedTeamsDetails._team_name_validator), - ('trusted_team_name', GuestAdminSignedInViaTrustedTeamsDetails._trusted_team_name_validator), + ('team_name', GuestAdminSignedInViaTrustedTeamsDetails.team_name.validator), + ('trusted_team_name', GuestAdminSignedInViaTrustedTeamsDetails.trusted_team_name.validator), ] -GuestAdminSignedInViaTrustedTeamsType._description_validator = bv.String() +GuestAdminSignedInViaTrustedTeamsType.description.validator = bv.String() GuestAdminSignedInViaTrustedTeamsType._all_field_names_ = set(['description']) -GuestAdminSignedInViaTrustedTeamsType._all_fields_ = [('description', GuestAdminSignedInViaTrustedTeamsType._description_validator)] +GuestAdminSignedInViaTrustedTeamsType._all_fields_ = [('description', GuestAdminSignedInViaTrustedTeamsType.description.validator)] -GuestAdminSignedOutViaTrustedTeamsDetails._team_name_validator = bv.Nullable(bv.String()) -GuestAdminSignedOutViaTrustedTeamsDetails._trusted_team_name_validator = bv.Nullable(bv.String()) +GuestAdminSignedOutViaTrustedTeamsDetails.team_name.validator = bv.Nullable(bv.String()) +GuestAdminSignedOutViaTrustedTeamsDetails.trusted_team_name.validator = bv.Nullable(bv.String()) GuestAdminSignedOutViaTrustedTeamsDetails._all_field_names_ = set([ 'team_name', 'trusted_team_name', ]) GuestAdminSignedOutViaTrustedTeamsDetails._all_fields_ = [ - ('team_name', GuestAdminSignedOutViaTrustedTeamsDetails._team_name_validator), - ('trusted_team_name', GuestAdminSignedOutViaTrustedTeamsDetails._trusted_team_name_validator), + ('team_name', GuestAdminSignedOutViaTrustedTeamsDetails.team_name.validator), + ('trusted_team_name', GuestAdminSignedOutViaTrustedTeamsDetails.trusted_team_name.validator), ] -GuestAdminSignedOutViaTrustedTeamsType._description_validator = bv.String() +GuestAdminSignedOutViaTrustedTeamsType.description.validator = bv.String() GuestAdminSignedOutViaTrustedTeamsType._all_field_names_ = set(['description']) -GuestAdminSignedOutViaTrustedTeamsType._all_fields_ = [('description', GuestAdminSignedOutViaTrustedTeamsType._description_validator)] +GuestAdminSignedOutViaTrustedTeamsType._all_fields_ = [('description', GuestAdminSignedOutViaTrustedTeamsType.description.validator)] IdentifierType._email_validator = bv.Void() IdentifierType._facebook_profile_name_validator = bv.Void() @@ -105932,21 +72902,21 @@ def __repr__(self): IdentifierType.facebook_profile_name = IdentifierType('facebook_profile_name') IdentifierType.other = IdentifierType('other') -IntegrationConnectedDetails._integration_name_validator = bv.String() +IntegrationConnectedDetails.integration_name.validator = bv.String() IntegrationConnectedDetails._all_field_names_ = set(['integration_name']) -IntegrationConnectedDetails._all_fields_ = [('integration_name', IntegrationConnectedDetails._integration_name_validator)] +IntegrationConnectedDetails._all_fields_ = [('integration_name', IntegrationConnectedDetails.integration_name.validator)] -IntegrationConnectedType._description_validator = bv.String() +IntegrationConnectedType.description.validator = bv.String() IntegrationConnectedType._all_field_names_ = set(['description']) -IntegrationConnectedType._all_fields_ = [('description', IntegrationConnectedType._description_validator)] +IntegrationConnectedType._all_fields_ = [('description', IntegrationConnectedType.description.validator)] -IntegrationDisconnectedDetails._integration_name_validator = bv.String() +IntegrationDisconnectedDetails.integration_name.validator = bv.String() IntegrationDisconnectedDetails._all_field_names_ = set(['integration_name']) -IntegrationDisconnectedDetails._all_fields_ = [('integration_name', IntegrationDisconnectedDetails._integration_name_validator)] +IntegrationDisconnectedDetails._all_fields_ = [('integration_name', IntegrationDisconnectedDetails.integration_name.validator)] -IntegrationDisconnectedType._description_validator = bv.String() +IntegrationDisconnectedType.description.validator = bv.String() IntegrationDisconnectedType._all_field_names_ = set(['description']) -IntegrationDisconnectedType._all_fields_ = [('description', IntegrationDisconnectedType._description_validator)] +IntegrationDisconnectedType._all_fields_ = [('description', IntegrationDisconnectedType.description.validator)] IntegrationPolicy._disabled_validator = bv.Void() IntegrationPolicy._enabled_validator = bv.Void() @@ -105961,23 +72931,23 @@ def __repr__(self): IntegrationPolicy.enabled = IntegrationPolicy('enabled') IntegrationPolicy.other = IntegrationPolicy('other') -IntegrationPolicyChangedDetails._integration_name_validator = bv.String() -IntegrationPolicyChangedDetails._new_value_validator = IntegrationPolicy_validator -IntegrationPolicyChangedDetails._previous_value_validator = IntegrationPolicy_validator +IntegrationPolicyChangedDetails.integration_name.validator = bv.String() +IntegrationPolicyChangedDetails.new_value.validator = IntegrationPolicy_validator +IntegrationPolicyChangedDetails.previous_value.validator = IntegrationPolicy_validator IntegrationPolicyChangedDetails._all_field_names_ = set([ 'integration_name', 'new_value', 'previous_value', ]) IntegrationPolicyChangedDetails._all_fields_ = [ - ('integration_name', IntegrationPolicyChangedDetails._integration_name_validator), - ('new_value', IntegrationPolicyChangedDetails._new_value_validator), - ('previous_value', IntegrationPolicyChangedDetails._previous_value_validator), + ('integration_name', IntegrationPolicyChangedDetails.integration_name.validator), + ('new_value', IntegrationPolicyChangedDetails.new_value.validator), + ('previous_value', IntegrationPolicyChangedDetails.previous_value.validator), ] -IntegrationPolicyChangedType._description_validator = bv.String() +IntegrationPolicyChangedType.description.validator = bv.String() IntegrationPolicyChangedType._all_field_names_ = set(['description']) -IntegrationPolicyChangedType._all_fields_ = [('description', IntegrationPolicyChangedType._description_validator)] +IntegrationPolicyChangedType._all_fields_ = [('description', IntegrationPolicyChangedType.description.validator)] InviteMethod._auto_approve_validator = bv.Void() InviteMethod._invite_link_validator = bv.Void() @@ -105998,15 +72968,15 @@ def __repr__(self): InviteMethod.moved_from_another_team = InviteMethod('moved_from_another_team') InviteMethod.other = InviteMethod('other') -JoinTeamDetails._linked_apps_validator = bv.List(UserLinkedAppLogInfo_validator) -JoinTeamDetails._linked_devices_validator = bv.List(LinkedDeviceLogInfo_validator) -JoinTeamDetails._linked_shared_folders_validator = bv.List(FolderLogInfo_validator) -JoinTeamDetails._was_linked_apps_truncated_validator = bv.Nullable(bv.Boolean()) -JoinTeamDetails._was_linked_devices_truncated_validator = bv.Nullable(bv.Boolean()) -JoinTeamDetails._was_linked_shared_folders_truncated_validator = bv.Nullable(bv.Boolean()) -JoinTeamDetails._has_linked_apps_validator = bv.Nullable(bv.Boolean()) -JoinTeamDetails._has_linked_devices_validator = bv.Nullable(bv.Boolean()) -JoinTeamDetails._has_linked_shared_folders_validator = bv.Nullable(bv.Boolean()) +JoinTeamDetails.linked_apps.validator = bv.List(UserLinkedAppLogInfo_validator) +JoinTeamDetails.linked_devices.validator = bv.List(LinkedDeviceLogInfo_validator) +JoinTeamDetails.linked_shared_folders.validator = bv.List(FolderLogInfo_validator) +JoinTeamDetails.was_linked_apps_truncated.validator = bv.Nullable(bv.Boolean()) +JoinTeamDetails.was_linked_devices_truncated.validator = bv.Nullable(bv.Boolean()) +JoinTeamDetails.was_linked_shared_folders_truncated.validator = bv.Nullable(bv.Boolean()) +JoinTeamDetails.has_linked_apps.validator = bv.Nullable(bv.Boolean()) +JoinTeamDetails.has_linked_devices.validator = bv.Nullable(bv.Boolean()) +JoinTeamDetails.has_linked_shared_folders.validator = bv.Nullable(bv.Boolean()) JoinTeamDetails._all_field_names_ = set([ 'linked_apps', 'linked_devices', @@ -106019,26 +72989,26 @@ def __repr__(self): 'has_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), - ('was_linked_apps_truncated', JoinTeamDetails._was_linked_apps_truncated_validator), - ('was_linked_devices_truncated', JoinTeamDetails._was_linked_devices_truncated_validator), - ('was_linked_shared_folders_truncated', JoinTeamDetails._was_linked_shared_folders_truncated_validator), - ('has_linked_apps', JoinTeamDetails._has_linked_apps_validator), - ('has_linked_devices', JoinTeamDetails._has_linked_devices_validator), - ('has_linked_shared_folders', JoinTeamDetails._has_linked_shared_folders_validator), + ('linked_apps', JoinTeamDetails.linked_apps.validator), + ('linked_devices', JoinTeamDetails.linked_devices.validator), + ('linked_shared_folders', JoinTeamDetails.linked_shared_folders.validator), + ('was_linked_apps_truncated', JoinTeamDetails.was_linked_apps_truncated.validator), + ('was_linked_devices_truncated', JoinTeamDetails.was_linked_devices_truncated.validator), + ('was_linked_shared_folders_truncated', JoinTeamDetails.was_linked_shared_folders_truncated.validator), + ('has_linked_apps', JoinTeamDetails.has_linked_apps.validator), + ('has_linked_devices', JoinTeamDetails.has_linked_devices.validator), + ('has_linked_shared_folders', JoinTeamDetails.has_linked_shared_folders.validator), ] -LegacyDeviceSessionLogInfo._session_info_validator = bv.Nullable(SessionLogInfo_validator) -LegacyDeviceSessionLogInfo._display_name_validator = bv.Nullable(bv.String()) -LegacyDeviceSessionLogInfo._is_emm_managed_validator = bv.Nullable(bv.Boolean()) -LegacyDeviceSessionLogInfo._platform_validator = bv.Nullable(bv.String()) -LegacyDeviceSessionLogInfo._mac_address_validator = bv.Nullable(IpAddress_validator) -LegacyDeviceSessionLogInfo._os_version_validator = bv.Nullable(bv.String()) -LegacyDeviceSessionLogInfo._device_type_validator = bv.Nullable(bv.String()) -LegacyDeviceSessionLogInfo._client_version_validator = bv.Nullable(bv.String()) -LegacyDeviceSessionLogInfo._legacy_uniq_id_validator = bv.Nullable(bv.String()) +LegacyDeviceSessionLogInfo.session_info.validator = bv.Nullable(SessionLogInfo_validator) +LegacyDeviceSessionLogInfo.display_name.validator = bv.Nullable(bv.String()) +LegacyDeviceSessionLogInfo.is_emm_managed.validator = bv.Nullable(bv.Boolean()) +LegacyDeviceSessionLogInfo.platform.validator = bv.Nullable(bv.String()) +LegacyDeviceSessionLogInfo.mac_address.validator = bv.Nullable(IpAddress_validator) +LegacyDeviceSessionLogInfo.os_version.validator = bv.Nullable(bv.String()) +LegacyDeviceSessionLogInfo.device_type.validator = bv.Nullable(bv.String()) +LegacyDeviceSessionLogInfo.client_version.validator = bv.Nullable(bv.String()) +LegacyDeviceSessionLogInfo.legacy_uniq_id.validator = bv.Nullable(bv.String()) LegacyDeviceSessionLogInfo._field_names_ = set([ 'session_info', 'display_name', @@ -106052,22 +73022,22 @@ def __repr__(self): ]) LegacyDeviceSessionLogInfo._all_field_names_ = DeviceSessionLogInfo._all_field_names_.union(LegacyDeviceSessionLogInfo._field_names_) LegacyDeviceSessionLogInfo._fields_ = [ - ('session_info', LegacyDeviceSessionLogInfo._session_info_validator), - ('display_name', LegacyDeviceSessionLogInfo._display_name_validator), - ('is_emm_managed', LegacyDeviceSessionLogInfo._is_emm_managed_validator), - ('platform', LegacyDeviceSessionLogInfo._platform_validator), - ('mac_address', LegacyDeviceSessionLogInfo._mac_address_validator), - ('os_version', LegacyDeviceSessionLogInfo._os_version_validator), - ('device_type', LegacyDeviceSessionLogInfo._device_type_validator), - ('client_version', LegacyDeviceSessionLogInfo._client_version_validator), - ('legacy_uniq_id', LegacyDeviceSessionLogInfo._legacy_uniq_id_validator), + ('session_info', LegacyDeviceSessionLogInfo.session_info.validator), + ('display_name', LegacyDeviceSessionLogInfo.display_name.validator), + ('is_emm_managed', LegacyDeviceSessionLogInfo.is_emm_managed.validator), + ('platform', LegacyDeviceSessionLogInfo.platform.validator), + ('mac_address', LegacyDeviceSessionLogInfo.mac_address.validator), + ('os_version', LegacyDeviceSessionLogInfo.os_version.validator), + ('device_type', LegacyDeviceSessionLogInfo.device_type.validator), + ('client_version', LegacyDeviceSessionLogInfo.client_version.validator), + ('legacy_uniq_id', LegacyDeviceSessionLogInfo.legacy_uniq_id.validator), ] LegacyDeviceSessionLogInfo._all_fields_ = DeviceSessionLogInfo._all_fields_ + LegacyDeviceSessionLogInfo._fields_ -LegalHoldsActivateAHoldDetails._legal_hold_id_validator = bv.String() -LegalHoldsActivateAHoldDetails._name_validator = bv.String() -LegalHoldsActivateAHoldDetails._start_date_validator = common.DropboxTimestamp_validator -LegalHoldsActivateAHoldDetails._end_date_validator = bv.Nullable(common.DropboxTimestamp_validator) +LegalHoldsActivateAHoldDetails.legal_hold_id.validator = bv.String() +LegalHoldsActivateAHoldDetails.name.validator = bv.String() +LegalHoldsActivateAHoldDetails.start_date.validator = common.DropboxTimestamp_validator +LegalHoldsActivateAHoldDetails.end_date.validator = bv.Nullable(common.DropboxTimestamp_validator) LegalHoldsActivateAHoldDetails._all_field_names_ = set([ 'legal_hold_id', 'name', @@ -106075,35 +73045,35 @@ def __repr__(self): 'end_date', ]) LegalHoldsActivateAHoldDetails._all_fields_ = [ - ('legal_hold_id', LegalHoldsActivateAHoldDetails._legal_hold_id_validator), - ('name', LegalHoldsActivateAHoldDetails._name_validator), - ('start_date', LegalHoldsActivateAHoldDetails._start_date_validator), - ('end_date', LegalHoldsActivateAHoldDetails._end_date_validator), + ('legal_hold_id', LegalHoldsActivateAHoldDetails.legal_hold_id.validator), + ('name', LegalHoldsActivateAHoldDetails.name.validator), + ('start_date', LegalHoldsActivateAHoldDetails.start_date.validator), + ('end_date', LegalHoldsActivateAHoldDetails.end_date.validator), ] -LegalHoldsActivateAHoldType._description_validator = bv.String() +LegalHoldsActivateAHoldType.description.validator = bv.String() LegalHoldsActivateAHoldType._all_field_names_ = set(['description']) -LegalHoldsActivateAHoldType._all_fields_ = [('description', LegalHoldsActivateAHoldType._description_validator)] +LegalHoldsActivateAHoldType._all_fields_ = [('description', LegalHoldsActivateAHoldType.description.validator)] -LegalHoldsAddMembersDetails._legal_hold_id_validator = bv.String() -LegalHoldsAddMembersDetails._name_validator = bv.String() +LegalHoldsAddMembersDetails.legal_hold_id.validator = bv.String() +LegalHoldsAddMembersDetails.name.validator = bv.String() LegalHoldsAddMembersDetails._all_field_names_ = set([ 'legal_hold_id', 'name', ]) LegalHoldsAddMembersDetails._all_fields_ = [ - ('legal_hold_id', LegalHoldsAddMembersDetails._legal_hold_id_validator), - ('name', LegalHoldsAddMembersDetails._name_validator), + ('legal_hold_id', LegalHoldsAddMembersDetails.legal_hold_id.validator), + ('name', LegalHoldsAddMembersDetails.name.validator), ] -LegalHoldsAddMembersType._description_validator = bv.String() +LegalHoldsAddMembersType.description.validator = bv.String() LegalHoldsAddMembersType._all_field_names_ = set(['description']) -LegalHoldsAddMembersType._all_fields_ = [('description', LegalHoldsAddMembersType._description_validator)] +LegalHoldsAddMembersType._all_fields_ = [('description', LegalHoldsAddMembersType.description.validator)] -LegalHoldsChangeHoldDetailsDetails._legal_hold_id_validator = bv.String() -LegalHoldsChangeHoldDetailsDetails._name_validator = bv.String() -LegalHoldsChangeHoldDetailsDetails._previous_value_validator = bv.String() -LegalHoldsChangeHoldDetailsDetails._new_value_validator = bv.String() +LegalHoldsChangeHoldDetailsDetails.legal_hold_id.validator = bv.String() +LegalHoldsChangeHoldDetailsDetails.name.validator = bv.String() +LegalHoldsChangeHoldDetailsDetails.previous_value.validator = bv.String() +LegalHoldsChangeHoldDetailsDetails.new_value.validator = bv.String() LegalHoldsChangeHoldDetailsDetails._all_field_names_ = set([ 'legal_hold_id', 'name', @@ -106111,75 +73081,75 @@ def __repr__(self): 'new_value', ]) LegalHoldsChangeHoldDetailsDetails._all_fields_ = [ - ('legal_hold_id', LegalHoldsChangeHoldDetailsDetails._legal_hold_id_validator), - ('name', LegalHoldsChangeHoldDetailsDetails._name_validator), - ('previous_value', LegalHoldsChangeHoldDetailsDetails._previous_value_validator), - ('new_value', LegalHoldsChangeHoldDetailsDetails._new_value_validator), + ('legal_hold_id', LegalHoldsChangeHoldDetailsDetails.legal_hold_id.validator), + ('name', LegalHoldsChangeHoldDetailsDetails.name.validator), + ('previous_value', LegalHoldsChangeHoldDetailsDetails.previous_value.validator), + ('new_value', LegalHoldsChangeHoldDetailsDetails.new_value.validator), ] -LegalHoldsChangeHoldDetailsType._description_validator = bv.String() +LegalHoldsChangeHoldDetailsType.description.validator = bv.String() LegalHoldsChangeHoldDetailsType._all_field_names_ = set(['description']) -LegalHoldsChangeHoldDetailsType._all_fields_ = [('description', LegalHoldsChangeHoldDetailsType._description_validator)] +LegalHoldsChangeHoldDetailsType._all_fields_ = [('description', LegalHoldsChangeHoldDetailsType.description.validator)] -LegalHoldsChangeHoldNameDetails._legal_hold_id_validator = bv.String() -LegalHoldsChangeHoldNameDetails._previous_value_validator = bv.String() -LegalHoldsChangeHoldNameDetails._new_value_validator = bv.String() +LegalHoldsChangeHoldNameDetails.legal_hold_id.validator = bv.String() +LegalHoldsChangeHoldNameDetails.previous_value.validator = bv.String() +LegalHoldsChangeHoldNameDetails.new_value.validator = bv.String() LegalHoldsChangeHoldNameDetails._all_field_names_ = set([ 'legal_hold_id', 'previous_value', 'new_value', ]) LegalHoldsChangeHoldNameDetails._all_fields_ = [ - ('legal_hold_id', LegalHoldsChangeHoldNameDetails._legal_hold_id_validator), - ('previous_value', LegalHoldsChangeHoldNameDetails._previous_value_validator), - ('new_value', LegalHoldsChangeHoldNameDetails._new_value_validator), + ('legal_hold_id', LegalHoldsChangeHoldNameDetails.legal_hold_id.validator), + ('previous_value', LegalHoldsChangeHoldNameDetails.previous_value.validator), + ('new_value', LegalHoldsChangeHoldNameDetails.new_value.validator), ] -LegalHoldsChangeHoldNameType._description_validator = bv.String() +LegalHoldsChangeHoldNameType.description.validator = bv.String() LegalHoldsChangeHoldNameType._all_field_names_ = set(['description']) -LegalHoldsChangeHoldNameType._all_fields_ = [('description', LegalHoldsChangeHoldNameType._description_validator)] +LegalHoldsChangeHoldNameType._all_fields_ = [('description', LegalHoldsChangeHoldNameType.description.validator)] -LegalHoldsExportAHoldDetails._legal_hold_id_validator = bv.String() -LegalHoldsExportAHoldDetails._name_validator = bv.String() -LegalHoldsExportAHoldDetails._export_name_validator = bv.Nullable(bv.String()) +LegalHoldsExportAHoldDetails.legal_hold_id.validator = bv.String() +LegalHoldsExportAHoldDetails.name.validator = bv.String() +LegalHoldsExportAHoldDetails.export_name.validator = bv.Nullable(bv.String()) LegalHoldsExportAHoldDetails._all_field_names_ = set([ 'legal_hold_id', 'name', 'export_name', ]) LegalHoldsExportAHoldDetails._all_fields_ = [ - ('legal_hold_id', LegalHoldsExportAHoldDetails._legal_hold_id_validator), - ('name', LegalHoldsExportAHoldDetails._name_validator), - ('export_name', LegalHoldsExportAHoldDetails._export_name_validator), + ('legal_hold_id', LegalHoldsExportAHoldDetails.legal_hold_id.validator), + ('name', LegalHoldsExportAHoldDetails.name.validator), + ('export_name', LegalHoldsExportAHoldDetails.export_name.validator), ] -LegalHoldsExportAHoldType._description_validator = bv.String() +LegalHoldsExportAHoldType.description.validator = bv.String() LegalHoldsExportAHoldType._all_field_names_ = set(['description']) -LegalHoldsExportAHoldType._all_fields_ = [('description', LegalHoldsExportAHoldType._description_validator)] +LegalHoldsExportAHoldType._all_fields_ = [('description', LegalHoldsExportAHoldType.description.validator)] -LegalHoldsExportCancelledDetails._legal_hold_id_validator = bv.String() -LegalHoldsExportCancelledDetails._name_validator = bv.String() -LegalHoldsExportCancelledDetails._export_name_validator = bv.String() +LegalHoldsExportCancelledDetails.legal_hold_id.validator = bv.String() +LegalHoldsExportCancelledDetails.name.validator = bv.String() +LegalHoldsExportCancelledDetails.export_name.validator = bv.String() LegalHoldsExportCancelledDetails._all_field_names_ = set([ 'legal_hold_id', 'name', 'export_name', ]) LegalHoldsExportCancelledDetails._all_fields_ = [ - ('legal_hold_id', LegalHoldsExportCancelledDetails._legal_hold_id_validator), - ('name', LegalHoldsExportCancelledDetails._name_validator), - ('export_name', LegalHoldsExportCancelledDetails._export_name_validator), + ('legal_hold_id', LegalHoldsExportCancelledDetails.legal_hold_id.validator), + ('name', LegalHoldsExportCancelledDetails.name.validator), + ('export_name', LegalHoldsExportCancelledDetails.export_name.validator), ] -LegalHoldsExportCancelledType._description_validator = bv.String() +LegalHoldsExportCancelledType.description.validator = bv.String() LegalHoldsExportCancelledType._all_field_names_ = set(['description']) -LegalHoldsExportCancelledType._all_fields_ = [('description', LegalHoldsExportCancelledType._description_validator)] +LegalHoldsExportCancelledType._all_fields_ = [('description', LegalHoldsExportCancelledType.description.validator)] -LegalHoldsExportDownloadedDetails._legal_hold_id_validator = bv.String() -LegalHoldsExportDownloadedDetails._name_validator = bv.String() -LegalHoldsExportDownloadedDetails._export_name_validator = bv.String() -LegalHoldsExportDownloadedDetails._part_validator = bv.Nullable(bv.String()) -LegalHoldsExportDownloadedDetails._file_name_validator = bv.Nullable(bv.String()) +LegalHoldsExportDownloadedDetails.legal_hold_id.validator = bv.String() +LegalHoldsExportDownloadedDetails.name.validator = bv.String() +LegalHoldsExportDownloadedDetails.export_name.validator = bv.String() +LegalHoldsExportDownloadedDetails.part.validator = bv.Nullable(bv.String()) +LegalHoldsExportDownloadedDetails.file_name.validator = bv.Nullable(bv.String()) LegalHoldsExportDownloadedDetails._all_field_names_ = set([ 'legal_hold_id', 'name', @@ -106188,79 +73158,79 @@ def __repr__(self): 'file_name', ]) LegalHoldsExportDownloadedDetails._all_fields_ = [ - ('legal_hold_id', LegalHoldsExportDownloadedDetails._legal_hold_id_validator), - ('name', LegalHoldsExportDownloadedDetails._name_validator), - ('export_name', LegalHoldsExportDownloadedDetails._export_name_validator), - ('part', LegalHoldsExportDownloadedDetails._part_validator), - ('file_name', LegalHoldsExportDownloadedDetails._file_name_validator), + ('legal_hold_id', LegalHoldsExportDownloadedDetails.legal_hold_id.validator), + ('name', LegalHoldsExportDownloadedDetails.name.validator), + ('export_name', LegalHoldsExportDownloadedDetails.export_name.validator), + ('part', LegalHoldsExportDownloadedDetails.part.validator), + ('file_name', LegalHoldsExportDownloadedDetails.file_name.validator), ] -LegalHoldsExportDownloadedType._description_validator = bv.String() +LegalHoldsExportDownloadedType.description.validator = bv.String() LegalHoldsExportDownloadedType._all_field_names_ = set(['description']) -LegalHoldsExportDownloadedType._all_fields_ = [('description', LegalHoldsExportDownloadedType._description_validator)] +LegalHoldsExportDownloadedType._all_fields_ = [('description', LegalHoldsExportDownloadedType.description.validator)] -LegalHoldsExportRemovedDetails._legal_hold_id_validator = bv.String() -LegalHoldsExportRemovedDetails._name_validator = bv.String() -LegalHoldsExportRemovedDetails._export_name_validator = bv.String() +LegalHoldsExportRemovedDetails.legal_hold_id.validator = bv.String() +LegalHoldsExportRemovedDetails.name.validator = bv.String() +LegalHoldsExportRemovedDetails.export_name.validator = bv.String() LegalHoldsExportRemovedDetails._all_field_names_ = set([ 'legal_hold_id', 'name', 'export_name', ]) LegalHoldsExportRemovedDetails._all_fields_ = [ - ('legal_hold_id', LegalHoldsExportRemovedDetails._legal_hold_id_validator), - ('name', LegalHoldsExportRemovedDetails._name_validator), - ('export_name', LegalHoldsExportRemovedDetails._export_name_validator), + ('legal_hold_id', LegalHoldsExportRemovedDetails.legal_hold_id.validator), + ('name', LegalHoldsExportRemovedDetails.name.validator), + ('export_name', LegalHoldsExportRemovedDetails.export_name.validator), ] -LegalHoldsExportRemovedType._description_validator = bv.String() +LegalHoldsExportRemovedType.description.validator = bv.String() LegalHoldsExportRemovedType._all_field_names_ = set(['description']) -LegalHoldsExportRemovedType._all_fields_ = [('description', LegalHoldsExportRemovedType._description_validator)] +LegalHoldsExportRemovedType._all_fields_ = [('description', LegalHoldsExportRemovedType.description.validator)] -LegalHoldsReleaseAHoldDetails._legal_hold_id_validator = bv.String() -LegalHoldsReleaseAHoldDetails._name_validator = bv.String() +LegalHoldsReleaseAHoldDetails.legal_hold_id.validator = bv.String() +LegalHoldsReleaseAHoldDetails.name.validator = bv.String() LegalHoldsReleaseAHoldDetails._all_field_names_ = set([ 'legal_hold_id', 'name', ]) LegalHoldsReleaseAHoldDetails._all_fields_ = [ - ('legal_hold_id', LegalHoldsReleaseAHoldDetails._legal_hold_id_validator), - ('name', LegalHoldsReleaseAHoldDetails._name_validator), + ('legal_hold_id', LegalHoldsReleaseAHoldDetails.legal_hold_id.validator), + ('name', LegalHoldsReleaseAHoldDetails.name.validator), ] -LegalHoldsReleaseAHoldType._description_validator = bv.String() +LegalHoldsReleaseAHoldType.description.validator = bv.String() LegalHoldsReleaseAHoldType._all_field_names_ = set(['description']) -LegalHoldsReleaseAHoldType._all_fields_ = [('description', LegalHoldsReleaseAHoldType._description_validator)] +LegalHoldsReleaseAHoldType._all_fields_ = [('description', LegalHoldsReleaseAHoldType.description.validator)] -LegalHoldsRemoveMembersDetails._legal_hold_id_validator = bv.String() -LegalHoldsRemoveMembersDetails._name_validator = bv.String() +LegalHoldsRemoveMembersDetails.legal_hold_id.validator = bv.String() +LegalHoldsRemoveMembersDetails.name.validator = bv.String() LegalHoldsRemoveMembersDetails._all_field_names_ = set([ 'legal_hold_id', 'name', ]) LegalHoldsRemoveMembersDetails._all_fields_ = [ - ('legal_hold_id', LegalHoldsRemoveMembersDetails._legal_hold_id_validator), - ('name', LegalHoldsRemoveMembersDetails._name_validator), + ('legal_hold_id', LegalHoldsRemoveMembersDetails.legal_hold_id.validator), + ('name', LegalHoldsRemoveMembersDetails.name.validator), ] -LegalHoldsRemoveMembersType._description_validator = bv.String() +LegalHoldsRemoveMembersType.description.validator = bv.String() LegalHoldsRemoveMembersType._all_field_names_ = set(['description']) -LegalHoldsRemoveMembersType._all_fields_ = [('description', LegalHoldsRemoveMembersType._description_validator)] +LegalHoldsRemoveMembersType._all_fields_ = [('description', LegalHoldsRemoveMembersType.description.validator)] -LegalHoldsReportAHoldDetails._legal_hold_id_validator = bv.String() -LegalHoldsReportAHoldDetails._name_validator = bv.String() +LegalHoldsReportAHoldDetails.legal_hold_id.validator = bv.String() +LegalHoldsReportAHoldDetails.name.validator = bv.String() LegalHoldsReportAHoldDetails._all_field_names_ = set([ 'legal_hold_id', 'name', ]) LegalHoldsReportAHoldDetails._all_fields_ = [ - ('legal_hold_id', LegalHoldsReportAHoldDetails._legal_hold_id_validator), - ('name', LegalHoldsReportAHoldDetails._name_validator), + ('legal_hold_id', LegalHoldsReportAHoldDetails.legal_hold_id.validator), + ('name', LegalHoldsReportAHoldDetails.name.validator), ] -LegalHoldsReportAHoldType._description_validator = bv.String() +LegalHoldsReportAHoldType.description.validator = bv.String() LegalHoldsReportAHoldType._all_field_names_ = set(['description']) -LegalHoldsReportAHoldType._all_fields_ = [('description', LegalHoldsReportAHoldType._description_validator)] +LegalHoldsReportAHoldType._all_fields_ = [('description', LegalHoldsReportAHoldType.description.validator)] LinkedDeviceLogInfo._desktop_device_session_validator = DesktopDeviceSessionLogInfo_validator LinkedDeviceLogInfo._legacy_device_session_validator = LegacyDeviceSessionLogInfo_validator @@ -106290,23 +73260,23 @@ def __repr__(self): LockStatus.unlocked = LockStatus('unlocked') LockStatus.other = LockStatus('other') -LoginFailDetails._is_emm_managed_validator = bv.Nullable(bv.Boolean()) -LoginFailDetails._login_method_validator = LoginMethod_validator -LoginFailDetails._error_details_validator = FailureDetailsLogInfo_validator +LoginFailDetails.is_emm_managed.validator = bv.Nullable(bv.Boolean()) +LoginFailDetails.login_method.validator = LoginMethod_validator +LoginFailDetails.error_details.validator = FailureDetailsLogInfo_validator LoginFailDetails._all_field_names_ = set([ 'is_emm_managed', 'login_method', 'error_details', ]) LoginFailDetails._all_fields_ = [ - ('is_emm_managed', LoginFailDetails._is_emm_managed_validator), - ('login_method', LoginFailDetails._login_method_validator), - ('error_details', LoginFailDetails._error_details_validator), + ('is_emm_managed', LoginFailDetails.is_emm_managed.validator), + ('login_method', LoginFailDetails.login_method.validator), + ('error_details', LoginFailDetails.error_details.validator), ] -LoginFailType._description_validator = bv.String() +LoginFailType.description.validator = bv.String() LoginFailType._all_field_names_ = set(['description']) -LoginFailType._all_fields_ = [('description', LoginFailType._description_validator)] +LoginFailType._all_fields_ = [('description', LoginFailType.description.validator)] LoginMethod._apple_oauth_validator = bv.Void() LoginMethod._first_party_token_exchange_validator = bv.Void() @@ -106339,140 +73309,140 @@ def __repr__(self): LoginMethod.web_session = LoginMethod('web_session') LoginMethod.other = LoginMethod('other') -LoginSuccessDetails._is_emm_managed_validator = bv.Nullable(bv.Boolean()) -LoginSuccessDetails._login_method_validator = LoginMethod_validator +LoginSuccessDetails.is_emm_managed.validator = bv.Nullable(bv.Boolean()) +LoginSuccessDetails.login_method.validator = LoginMethod_validator LoginSuccessDetails._all_field_names_ = set([ 'is_emm_managed', 'login_method', ]) LoginSuccessDetails._all_fields_ = [ - ('is_emm_managed', LoginSuccessDetails._is_emm_managed_validator), - ('login_method', LoginSuccessDetails._login_method_validator), + ('is_emm_managed', LoginSuccessDetails.is_emm_managed.validator), + ('login_method', LoginSuccessDetails.login_method.validator), ] -LoginSuccessType._description_validator = bv.String() +LoginSuccessType.description.validator = bv.String() LoginSuccessType._all_field_names_ = set(['description']) -LoginSuccessType._all_fields_ = [('description', LoginSuccessType._description_validator)] +LoginSuccessType._all_fields_ = [('description', LoginSuccessType.description.validator)] -LogoutDetails._login_id_validator = bv.Nullable(bv.String()) +LogoutDetails.login_id.validator = bv.Nullable(bv.String()) LogoutDetails._all_field_names_ = set(['login_id']) -LogoutDetails._all_fields_ = [('login_id', LogoutDetails._login_id_validator)] +LogoutDetails._all_fields_ = [('login_id', LogoutDetails.login_id.validator)] -LogoutType._description_validator = bv.String() +LogoutType.description.validator = bv.String() LogoutType._all_field_names_ = set(['description']) -LogoutType._all_fields_ = [('description', LogoutType._description_validator)] +LogoutType._all_fields_ = [('description', LogoutType.description.validator)] -MemberAddExternalIdDetails._new_value_validator = team_common.MemberExternalId_validator +MemberAddExternalIdDetails.new_value.validator = team_common.MemberExternalId_validator MemberAddExternalIdDetails._all_field_names_ = set(['new_value']) -MemberAddExternalIdDetails._all_fields_ = [('new_value', MemberAddExternalIdDetails._new_value_validator)] +MemberAddExternalIdDetails._all_fields_ = [('new_value', MemberAddExternalIdDetails.new_value.validator)] -MemberAddExternalIdType._description_validator = bv.String() +MemberAddExternalIdType.description.validator = bv.String() MemberAddExternalIdType._all_field_names_ = set(['description']) -MemberAddExternalIdType._all_fields_ = [('description', MemberAddExternalIdType._description_validator)] +MemberAddExternalIdType._all_fields_ = [('description', MemberAddExternalIdType.description.validator)] -MemberAddNameDetails._new_value_validator = UserNameLogInfo_validator +MemberAddNameDetails.new_value.validator = UserNameLogInfo_validator MemberAddNameDetails._all_field_names_ = set(['new_value']) -MemberAddNameDetails._all_fields_ = [('new_value', MemberAddNameDetails._new_value_validator)] +MemberAddNameDetails._all_fields_ = [('new_value', MemberAddNameDetails.new_value.validator)] -MemberAddNameType._description_validator = bv.String() +MemberAddNameType.description.validator = bv.String() MemberAddNameType._all_field_names_ = set(['description']) -MemberAddNameType._all_fields_ = [('description', MemberAddNameType._description_validator)] +MemberAddNameType._all_fields_ = [('description', MemberAddNameType.description.validator)] -MemberChangeAdminRoleDetails._new_value_validator = bv.Nullable(AdminRole_validator) -MemberChangeAdminRoleDetails._previous_value_validator = bv.Nullable(AdminRole_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), + ('new_value', MemberChangeAdminRoleDetails.new_value.validator), + ('previous_value', MemberChangeAdminRoleDetails.previous_value.validator), ] -MemberChangeAdminRoleType._description_validator = bv.String() +MemberChangeAdminRoleType.description.validator = bv.String() MemberChangeAdminRoleType._all_field_names_ = set(['description']) -MemberChangeAdminRoleType._all_fields_ = [('description', MemberChangeAdminRoleType._description_validator)] +MemberChangeAdminRoleType._all_fields_ = [('description', MemberChangeAdminRoleType.description.validator)] -MemberChangeEmailDetails._new_value_validator = EmailAddress_validator -MemberChangeEmailDetails._previous_value_validator = bv.Nullable(EmailAddress_validator) +MemberChangeEmailDetails.new_value.validator = EmailAddress_validator +MemberChangeEmailDetails.previous_value.validator = bv.Nullable(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), + ('new_value', MemberChangeEmailDetails.new_value.validator), + ('previous_value', MemberChangeEmailDetails.previous_value.validator), ] -MemberChangeEmailType._description_validator = bv.String() +MemberChangeEmailType.description.validator = bv.String() MemberChangeEmailType._all_field_names_ = set(['description']) -MemberChangeEmailType._all_fields_ = [('description', MemberChangeEmailType._description_validator)] +MemberChangeEmailType._all_fields_ = [('description', MemberChangeEmailType.description.validator)] -MemberChangeExternalIdDetails._new_value_validator = team_common.MemberExternalId_validator -MemberChangeExternalIdDetails._previous_value_validator = team_common.MemberExternalId_validator +MemberChangeExternalIdDetails.new_value.validator = team_common.MemberExternalId_validator +MemberChangeExternalIdDetails.previous_value.validator = team_common.MemberExternalId_validator MemberChangeExternalIdDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) MemberChangeExternalIdDetails._all_fields_ = [ - ('new_value', MemberChangeExternalIdDetails._new_value_validator), - ('previous_value', MemberChangeExternalIdDetails._previous_value_validator), + ('new_value', MemberChangeExternalIdDetails.new_value.validator), + ('previous_value', MemberChangeExternalIdDetails.previous_value.validator), ] -MemberChangeExternalIdType._description_validator = bv.String() +MemberChangeExternalIdType.description.validator = bv.String() MemberChangeExternalIdType._all_field_names_ = set(['description']) -MemberChangeExternalIdType._all_fields_ = [('description', MemberChangeExternalIdType._description_validator)] +MemberChangeExternalIdType._all_fields_ = [('description', MemberChangeExternalIdType.description.validator)] -MemberChangeMembershipTypeDetails._prev_value_validator = TeamMembershipType_validator -MemberChangeMembershipTypeDetails._new_value_validator = TeamMembershipType_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), + ('prev_value', MemberChangeMembershipTypeDetails.prev_value.validator), + ('new_value', MemberChangeMembershipTypeDetails.new_value.validator), ] -MemberChangeMembershipTypeType._description_validator = bv.String() +MemberChangeMembershipTypeType.description.validator = bv.String() MemberChangeMembershipTypeType._all_field_names_ = set(['description']) -MemberChangeMembershipTypeType._all_fields_ = [('description', MemberChangeMembershipTypeType._description_validator)] +MemberChangeMembershipTypeType._all_fields_ = [('description', MemberChangeMembershipTypeType.description.validator)] -MemberChangeNameDetails._new_value_validator = UserNameLogInfo_validator -MemberChangeNameDetails._previous_value_validator = bv.Nullable(UserNameLogInfo_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), + ('new_value', MemberChangeNameDetails.new_value.validator), + ('previous_value', MemberChangeNameDetails.previous_value.validator), ] -MemberChangeNameType._description_validator = bv.String() +MemberChangeNameType.description.validator = bv.String() MemberChangeNameType._all_field_names_ = set(['description']) -MemberChangeNameType._all_fields_ = [('description', MemberChangeNameType._description_validator)] +MemberChangeNameType._all_fields_ = [('description', MemberChangeNameType.description.validator)] -MemberChangeResellerRoleDetails._new_value_validator = ResellerRole_validator -MemberChangeResellerRoleDetails._previous_value_validator = ResellerRole_validator +MemberChangeResellerRoleDetails.new_value.validator = ResellerRole_validator +MemberChangeResellerRoleDetails.previous_value.validator = ResellerRole_validator MemberChangeResellerRoleDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) MemberChangeResellerRoleDetails._all_fields_ = [ - ('new_value', MemberChangeResellerRoleDetails._new_value_validator), - ('previous_value', MemberChangeResellerRoleDetails._previous_value_validator), + ('new_value', MemberChangeResellerRoleDetails.new_value.validator), + ('previous_value', MemberChangeResellerRoleDetails.previous_value.validator), ] -MemberChangeResellerRoleType._description_validator = bv.String() +MemberChangeResellerRoleType.description.validator = bv.String() MemberChangeResellerRoleType._all_field_names_ = set(['description']) -MemberChangeResellerRoleType._all_fields_ = [('description', MemberChangeResellerRoleType._description_validator)] +MemberChangeResellerRoleType._all_fields_ = [('description', MemberChangeResellerRoleType.description.validator)] -MemberChangeStatusDetails._previous_value_validator = bv.Nullable(MemberStatus_validator) -MemberChangeStatusDetails._new_value_validator = MemberStatus_validator -MemberChangeStatusDetails._action_validator = bv.Nullable(ActionDetails_validator) -MemberChangeStatusDetails._new_team_validator = bv.Nullable(bv.String()) -MemberChangeStatusDetails._previous_team_validator = bv.Nullable(bv.String()) +MemberChangeStatusDetails.previous_value.validator = bv.Nullable(MemberStatus_validator) +MemberChangeStatusDetails.new_value.validator = MemberStatus_validator +MemberChangeStatusDetails.action.validator = bv.Nullable(ActionDetails_validator) +MemberChangeStatusDetails.new_team.validator = bv.Nullable(bv.String()) +MemberChangeStatusDetails.previous_team.validator = bv.Nullable(bv.String()) MemberChangeStatusDetails._all_field_names_ = set([ 'previous_value', 'new_value', @@ -106481,37 +73451,37 @@ def __repr__(self): 'previous_team', ]) MemberChangeStatusDetails._all_fields_ = [ - ('previous_value', MemberChangeStatusDetails._previous_value_validator), - ('new_value', MemberChangeStatusDetails._new_value_validator), - ('action', MemberChangeStatusDetails._action_validator), - ('new_team', MemberChangeStatusDetails._new_team_validator), - ('previous_team', MemberChangeStatusDetails._previous_team_validator), + ('previous_value', MemberChangeStatusDetails.previous_value.validator), + ('new_value', MemberChangeStatusDetails.new_value.validator), + ('action', MemberChangeStatusDetails.action.validator), + ('new_team', MemberChangeStatusDetails.new_team.validator), + ('previous_team', MemberChangeStatusDetails.previous_team.validator), ] -MemberChangeStatusType._description_validator = bv.String() +MemberChangeStatusType.description.validator = bv.String() MemberChangeStatusType._all_field_names_ = set(['description']) -MemberChangeStatusType._all_fields_ = [('description', MemberChangeStatusType._description_validator)] +MemberChangeStatusType._all_fields_ = [('description', MemberChangeStatusType.description.validator)] MemberDeleteManualContactsDetails._all_field_names_ = set([]) MemberDeleteManualContactsDetails._all_fields_ = [] -MemberDeleteManualContactsType._description_validator = bv.String() +MemberDeleteManualContactsType.description.validator = bv.String() MemberDeleteManualContactsType._all_field_names_ = set(['description']) -MemberDeleteManualContactsType._all_fields_ = [('description', MemberDeleteManualContactsType._description_validator)] +MemberDeleteManualContactsType._all_fields_ = [('description', MemberDeleteManualContactsType.description.validator)] MemberDeleteProfilePhotoDetails._all_field_names_ = set([]) MemberDeleteProfilePhotoDetails._all_fields_ = [] -MemberDeleteProfilePhotoType._description_validator = bv.String() +MemberDeleteProfilePhotoType.description.validator = bv.String() MemberDeleteProfilePhotoType._all_field_names_ = set(['description']) -MemberDeleteProfilePhotoType._all_fields_ = [('description', MemberDeleteProfilePhotoType._description_validator)] +MemberDeleteProfilePhotoType._all_fields_ = [('description', MemberDeleteProfilePhotoType.description.validator)] MemberPermanentlyDeleteAccountContentsDetails._all_field_names_ = set([]) MemberPermanentlyDeleteAccountContentsDetails._all_fields_ = [] -MemberPermanentlyDeleteAccountContentsType._description_validator = bv.String() +MemberPermanentlyDeleteAccountContentsType.description.validator = bv.String() MemberPermanentlyDeleteAccountContentsType._all_field_names_ = set(['description']) -MemberPermanentlyDeleteAccountContentsType._all_fields_ = [('description', MemberPermanentlyDeleteAccountContentsType._description_validator)] +MemberPermanentlyDeleteAccountContentsType._all_fields_ = [('description', MemberPermanentlyDeleteAccountContentsType.description.validator)] MemberRemoveActionType._delete_validator = bv.Void() MemberRemoveActionType._leave_validator = bv.Void() @@ -106532,28 +73502,28 @@ def __repr__(self): MemberRemoveActionType.offboard_and_retain_team_folders = MemberRemoveActionType('offboard_and_retain_team_folders') MemberRemoveActionType.other = MemberRemoveActionType('other') -MemberRemoveExternalIdDetails._previous_value_validator = team_common.MemberExternalId_validator +MemberRemoveExternalIdDetails.previous_value.validator = team_common.MemberExternalId_validator MemberRemoveExternalIdDetails._all_field_names_ = set(['previous_value']) -MemberRemoveExternalIdDetails._all_fields_ = [('previous_value', MemberRemoveExternalIdDetails._previous_value_validator)] +MemberRemoveExternalIdDetails._all_fields_ = [('previous_value', MemberRemoveExternalIdDetails.previous_value.validator)] -MemberRemoveExternalIdType._description_validator = bv.String() +MemberRemoveExternalIdType.description.validator = bv.String() MemberRemoveExternalIdType._all_field_names_ = set(['description']) -MemberRemoveExternalIdType._all_fields_ = [('description', MemberRemoveExternalIdType._description_validator)] +MemberRemoveExternalIdType._all_fields_ = [('description', MemberRemoveExternalIdType.description.validator)] -MemberRequestsChangePolicyDetails._new_value_validator = MemberRequestsPolicy_validator -MemberRequestsChangePolicyDetails._previous_value_validator = bv.Nullable(MemberRequestsPolicy_validator) +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), + ('new_value', MemberRequestsChangePolicyDetails.new_value.validator), + ('previous_value', MemberRequestsChangePolicyDetails.previous_value.validator), ] -MemberRequestsChangePolicyType._description_validator = bv.String() +MemberRequestsChangePolicyType.description.validator = bv.String() MemberRequestsChangePolicyType._all_field_names_ = set(['description']) -MemberRequestsChangePolicyType._all_fields_ = [('description', MemberRequestsChangePolicyType._description_validator)] +MemberRequestsChangePolicyType._all_fields_ = [('description', MemberRequestsChangePolicyType.description.validator)] MemberRequestsPolicy._auto_accept_validator = bv.Void() MemberRequestsPolicy._disabled_validator = bv.Void() @@ -106587,116 +73557,116 @@ def __repr__(self): MemberSendInvitePolicy.specific_members = MemberSendInvitePolicy('specific_members') MemberSendInvitePolicy.other = MemberSendInvitePolicy('other') -MemberSendInvitePolicyChangedDetails._new_value_validator = MemberSendInvitePolicy_validator -MemberSendInvitePolicyChangedDetails._previous_value_validator = MemberSendInvitePolicy_validator +MemberSendInvitePolicyChangedDetails.new_value.validator = MemberSendInvitePolicy_validator +MemberSendInvitePolicyChangedDetails.previous_value.validator = MemberSendInvitePolicy_validator MemberSendInvitePolicyChangedDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) MemberSendInvitePolicyChangedDetails._all_fields_ = [ - ('new_value', MemberSendInvitePolicyChangedDetails._new_value_validator), - ('previous_value', MemberSendInvitePolicyChangedDetails._previous_value_validator), + ('new_value', MemberSendInvitePolicyChangedDetails.new_value.validator), + ('previous_value', MemberSendInvitePolicyChangedDetails.previous_value.validator), ] -MemberSendInvitePolicyChangedType._description_validator = bv.String() +MemberSendInvitePolicyChangedType.description.validator = bv.String() MemberSendInvitePolicyChangedType._all_field_names_ = set(['description']) -MemberSendInvitePolicyChangedType._all_fields_ = [('description', MemberSendInvitePolicyChangedType._description_validator)] +MemberSendInvitePolicyChangedType._all_fields_ = [('description', MemberSendInvitePolicyChangedType.description.validator)] MemberSetProfilePhotoDetails._all_field_names_ = set([]) MemberSetProfilePhotoDetails._all_fields_ = [] -MemberSetProfilePhotoType._description_validator = bv.String() +MemberSetProfilePhotoType.description.validator = bv.String() MemberSetProfilePhotoType._all_field_names_ = set(['description']) -MemberSetProfilePhotoType._all_fields_ = [('description', MemberSetProfilePhotoType._description_validator)] +MemberSetProfilePhotoType._all_fields_ = [('description', MemberSetProfilePhotoType.description.validator)] -MemberSpaceLimitsAddCustomQuotaDetails._new_value_validator = bv.UInt64() +MemberSpaceLimitsAddCustomQuotaDetails.new_value.validator = bv.UInt64() MemberSpaceLimitsAddCustomQuotaDetails._all_field_names_ = set(['new_value']) -MemberSpaceLimitsAddCustomQuotaDetails._all_fields_ = [('new_value', MemberSpaceLimitsAddCustomQuotaDetails._new_value_validator)] +MemberSpaceLimitsAddCustomQuotaDetails._all_fields_ = [('new_value', MemberSpaceLimitsAddCustomQuotaDetails.new_value.validator)] -MemberSpaceLimitsAddCustomQuotaType._description_validator = bv.String() +MemberSpaceLimitsAddCustomQuotaType.description.validator = bv.String() MemberSpaceLimitsAddCustomQuotaType._all_field_names_ = set(['description']) -MemberSpaceLimitsAddCustomQuotaType._all_fields_ = [('description', MemberSpaceLimitsAddCustomQuotaType._description_validator)] +MemberSpaceLimitsAddCustomQuotaType._all_fields_ = [('description', MemberSpaceLimitsAddCustomQuotaType.description.validator)] MemberSpaceLimitsAddExceptionDetails._all_field_names_ = set([]) MemberSpaceLimitsAddExceptionDetails._all_fields_ = [] -MemberSpaceLimitsAddExceptionType._description_validator = bv.String() +MemberSpaceLimitsAddExceptionType.description.validator = bv.String() MemberSpaceLimitsAddExceptionType._all_field_names_ = set(['description']) -MemberSpaceLimitsAddExceptionType._all_fields_ = [('description', MemberSpaceLimitsAddExceptionType._description_validator)] +MemberSpaceLimitsAddExceptionType._all_fields_ = [('description', MemberSpaceLimitsAddExceptionType.description.validator)] -MemberSpaceLimitsChangeCapsTypePolicyDetails._previous_value_validator = SpaceCapsType_validator -MemberSpaceLimitsChangeCapsTypePolicyDetails._new_value_validator = SpaceCapsType_validator +MemberSpaceLimitsChangeCapsTypePolicyDetails.previous_value.validator = SpaceCapsType_validator +MemberSpaceLimitsChangeCapsTypePolicyDetails.new_value.validator = SpaceCapsType_validator MemberSpaceLimitsChangeCapsTypePolicyDetails._all_field_names_ = set([ 'previous_value', 'new_value', ]) MemberSpaceLimitsChangeCapsTypePolicyDetails._all_fields_ = [ - ('previous_value', MemberSpaceLimitsChangeCapsTypePolicyDetails._previous_value_validator), - ('new_value', MemberSpaceLimitsChangeCapsTypePolicyDetails._new_value_validator), + ('previous_value', MemberSpaceLimitsChangeCapsTypePolicyDetails.previous_value.validator), + ('new_value', MemberSpaceLimitsChangeCapsTypePolicyDetails.new_value.validator), ] -MemberSpaceLimitsChangeCapsTypePolicyType._description_validator = bv.String() +MemberSpaceLimitsChangeCapsTypePolicyType.description.validator = bv.String() MemberSpaceLimitsChangeCapsTypePolicyType._all_field_names_ = set(['description']) -MemberSpaceLimitsChangeCapsTypePolicyType._all_fields_ = [('description', MemberSpaceLimitsChangeCapsTypePolicyType._description_validator)] +MemberSpaceLimitsChangeCapsTypePolicyType._all_fields_ = [('description', MemberSpaceLimitsChangeCapsTypePolicyType.description.validator)] -MemberSpaceLimitsChangeCustomQuotaDetails._previous_value_validator = bv.UInt64() -MemberSpaceLimitsChangeCustomQuotaDetails._new_value_validator = bv.UInt64() +MemberSpaceLimitsChangeCustomQuotaDetails.previous_value.validator = bv.UInt64() +MemberSpaceLimitsChangeCustomQuotaDetails.new_value.validator = bv.UInt64() MemberSpaceLimitsChangeCustomQuotaDetails._all_field_names_ = set([ 'previous_value', 'new_value', ]) MemberSpaceLimitsChangeCustomQuotaDetails._all_fields_ = [ - ('previous_value', MemberSpaceLimitsChangeCustomQuotaDetails._previous_value_validator), - ('new_value', MemberSpaceLimitsChangeCustomQuotaDetails._new_value_validator), + ('previous_value', MemberSpaceLimitsChangeCustomQuotaDetails.previous_value.validator), + ('new_value', MemberSpaceLimitsChangeCustomQuotaDetails.new_value.validator), ] -MemberSpaceLimitsChangeCustomQuotaType._description_validator = bv.String() +MemberSpaceLimitsChangeCustomQuotaType.description.validator = bv.String() MemberSpaceLimitsChangeCustomQuotaType._all_field_names_ = set(['description']) -MemberSpaceLimitsChangeCustomQuotaType._all_fields_ = [('description', MemberSpaceLimitsChangeCustomQuotaType._description_validator)] +MemberSpaceLimitsChangeCustomQuotaType._all_fields_ = [('description', MemberSpaceLimitsChangeCustomQuotaType.description.validator)] -MemberSpaceLimitsChangePolicyDetails._previous_value_validator = bv.Nullable(bv.UInt64()) -MemberSpaceLimitsChangePolicyDetails._new_value_validator = bv.Nullable(bv.UInt64()) +MemberSpaceLimitsChangePolicyDetails.previous_value.validator = bv.Nullable(bv.UInt64()) +MemberSpaceLimitsChangePolicyDetails.new_value.validator = bv.Nullable(bv.UInt64()) MemberSpaceLimitsChangePolicyDetails._all_field_names_ = set([ 'previous_value', 'new_value', ]) MemberSpaceLimitsChangePolicyDetails._all_fields_ = [ - ('previous_value', MemberSpaceLimitsChangePolicyDetails._previous_value_validator), - ('new_value', MemberSpaceLimitsChangePolicyDetails._new_value_validator), + ('previous_value', MemberSpaceLimitsChangePolicyDetails.previous_value.validator), + ('new_value', MemberSpaceLimitsChangePolicyDetails.new_value.validator), ] -MemberSpaceLimitsChangePolicyType._description_validator = bv.String() +MemberSpaceLimitsChangePolicyType.description.validator = bv.String() MemberSpaceLimitsChangePolicyType._all_field_names_ = set(['description']) -MemberSpaceLimitsChangePolicyType._all_fields_ = [('description', MemberSpaceLimitsChangePolicyType._description_validator)] +MemberSpaceLimitsChangePolicyType._all_fields_ = [('description', MemberSpaceLimitsChangePolicyType.description.validator)] -MemberSpaceLimitsChangeStatusDetails._previous_value_validator = SpaceLimitsStatus_validator -MemberSpaceLimitsChangeStatusDetails._new_value_validator = SpaceLimitsStatus_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), + ('previous_value', MemberSpaceLimitsChangeStatusDetails.previous_value.validator), + ('new_value', MemberSpaceLimitsChangeStatusDetails.new_value.validator), ] -MemberSpaceLimitsChangeStatusType._description_validator = bv.String() +MemberSpaceLimitsChangeStatusType.description.validator = bv.String() MemberSpaceLimitsChangeStatusType._all_field_names_ = set(['description']) -MemberSpaceLimitsChangeStatusType._all_fields_ = [('description', MemberSpaceLimitsChangeStatusType._description_validator)] +MemberSpaceLimitsChangeStatusType._all_fields_ = [('description', MemberSpaceLimitsChangeStatusType.description.validator)] MemberSpaceLimitsRemoveCustomQuotaDetails._all_field_names_ = set([]) MemberSpaceLimitsRemoveCustomQuotaDetails._all_fields_ = [] -MemberSpaceLimitsRemoveCustomQuotaType._description_validator = bv.String() +MemberSpaceLimitsRemoveCustomQuotaType.description.validator = bv.String() MemberSpaceLimitsRemoveCustomQuotaType._all_field_names_ = set(['description']) -MemberSpaceLimitsRemoveCustomQuotaType._all_fields_ = [('description', MemberSpaceLimitsRemoveCustomQuotaType._description_validator)] +MemberSpaceLimitsRemoveCustomQuotaType._all_fields_ = [('description', MemberSpaceLimitsRemoveCustomQuotaType.description.validator)] MemberSpaceLimitsRemoveExceptionDetails._all_field_names_ = set([]) MemberSpaceLimitsRemoveExceptionDetails._all_fields_ = [] -MemberSpaceLimitsRemoveExceptionType._description_validator = bv.String() +MemberSpaceLimitsRemoveExceptionType.description.validator = bv.String() MemberSpaceLimitsRemoveExceptionType._all_field_names_ = set(['description']) -MemberSpaceLimitsRemoveExceptionType._all_fields_ = [('description', MemberSpaceLimitsRemoveExceptionType._description_validator)] +MemberSpaceLimitsRemoveExceptionType._all_fields_ = [('description', MemberSpaceLimitsRemoveExceptionType.description.validator)] MemberStatus._active_validator = bv.Void() MemberStatus._invited_validator = bv.Void() @@ -106723,28 +73693,28 @@ def __repr__(self): MemberStatus.suspended = MemberStatus('suspended') MemberStatus.other = MemberStatus('other') -MemberSuggestDetails._suggested_members_validator = bv.List(EmailAddress_validator) +MemberSuggestDetails.suggested_members.validator = bv.List(EmailAddress_validator) MemberSuggestDetails._all_field_names_ = set(['suggested_members']) -MemberSuggestDetails._all_fields_ = [('suggested_members', MemberSuggestDetails._suggested_members_validator)] +MemberSuggestDetails._all_fields_ = [('suggested_members', MemberSuggestDetails.suggested_members.validator)] -MemberSuggestType._description_validator = bv.String() +MemberSuggestType.description.validator = bv.String() MemberSuggestType._all_field_names_ = set(['description']) -MemberSuggestType._all_fields_ = [('description', MemberSuggestType._description_validator)] +MemberSuggestType._all_fields_ = [('description', MemberSuggestType.description.validator)] -MemberSuggestionsChangePolicyDetails._new_value_validator = MemberSuggestionsPolicy_validator -MemberSuggestionsChangePolicyDetails._previous_value_validator = bv.Nullable(MemberSuggestionsPolicy_validator) +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), + ('new_value', MemberSuggestionsChangePolicyDetails.new_value.validator), + ('previous_value', MemberSuggestionsChangePolicyDetails.previous_value.validator), ] -MemberSuggestionsChangePolicyType._description_validator = bv.String() +MemberSuggestionsChangePolicyType.description.validator = bv.String() MemberSuggestionsChangePolicyType._all_field_names_ = set(['description']) -MemberSuggestionsChangePolicyType._all_fields_ = [('description', MemberSuggestionsChangePolicyType._description_validator)] +MemberSuggestionsChangePolicyType._all_fields_ = [('description', MemberSuggestionsChangePolicyType.description.validator)] MemberSuggestionsPolicy._disabled_validator = bv.Void() MemberSuggestionsPolicy._enabled_validator = bv.Void() @@ -106762,24 +73732,24 @@ def __repr__(self): MemberTransferAccountContentsDetails._all_field_names_ = set([]) MemberTransferAccountContentsDetails._all_fields_ = [] -MemberTransferAccountContentsType._description_validator = bv.String() +MemberTransferAccountContentsType.description.validator = bv.String() MemberTransferAccountContentsType._all_field_names_ = set(['description']) -MemberTransferAccountContentsType._all_fields_ = [('description', MemberTransferAccountContentsType._description_validator)] +MemberTransferAccountContentsType._all_fields_ = [('description', MemberTransferAccountContentsType.description.validator)] -MicrosoftOfficeAddinChangePolicyDetails._new_value_validator = MicrosoftOfficeAddinPolicy_validator -MicrosoftOfficeAddinChangePolicyDetails._previous_value_validator = bv.Nullable(MicrosoftOfficeAddinPolicy_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), + ('new_value', MicrosoftOfficeAddinChangePolicyDetails.new_value.validator), + ('previous_value', MicrosoftOfficeAddinChangePolicyDetails.previous_value.validator), ] -MicrosoftOfficeAddinChangePolicyType._description_validator = bv.String() +MicrosoftOfficeAddinChangePolicyType.description.validator = bv.String() MicrosoftOfficeAddinChangePolicyType._all_field_names_ = set(['description']) -MicrosoftOfficeAddinChangePolicyType._all_fields_ = [('description', MicrosoftOfficeAddinChangePolicyType._description_validator)] +MicrosoftOfficeAddinChangePolicyType._all_fields_ = [('description', MicrosoftOfficeAddinChangePolicyType.description.validator)] MicrosoftOfficeAddinPolicy._disabled_validator = bv.Void() MicrosoftOfficeAddinPolicy._enabled_validator = bv.Void() @@ -106794,16 +73764,16 @@ def __repr__(self): MicrosoftOfficeAddinPolicy.enabled = MicrosoftOfficeAddinPolicy('enabled') MicrosoftOfficeAddinPolicy.other = MicrosoftOfficeAddinPolicy('other') -MissingDetails._source_event_fields_validator = bv.Nullable(bv.String()) +MissingDetails.source_event_fields.validator = bv.Nullable(bv.String()) MissingDetails._all_field_names_ = set(['source_event_fields']) -MissingDetails._all_fields_ = [('source_event_fields', MissingDetails._source_event_fields_validator)] - -MobileDeviceSessionLogInfo._session_info_validator = bv.Nullable(MobileSessionLogInfo_validator) -MobileDeviceSessionLogInfo._device_name_validator = bv.String() -MobileDeviceSessionLogInfo._client_type_validator = team.MobileClientPlatform_validator -MobileDeviceSessionLogInfo._client_version_validator = bv.Nullable(bv.String()) -MobileDeviceSessionLogInfo._os_version_validator = bv.Nullable(bv.String()) -MobileDeviceSessionLogInfo._last_carrier_validator = bv.Nullable(bv.String()) +MissingDetails._all_fields_ = [('source_event_fields', MissingDetails.source_event_fields.validator)] + +MobileDeviceSessionLogInfo.session_info.validator = bv.Nullable(MobileSessionLogInfo_validator) +MobileDeviceSessionLogInfo.device_name.validator = bv.String() +MobileDeviceSessionLogInfo.client_type.validator = team.MobileClientPlatform_validator +MobileDeviceSessionLogInfo.client_version.validator = bv.Nullable(bv.String()) +MobileDeviceSessionLogInfo.os_version.validator = bv.Nullable(bv.String()) +MobileDeviceSessionLogInfo.last_carrier.validator = bv.Nullable(bv.String()) MobileDeviceSessionLogInfo._field_names_ = set([ 'session_info', 'device_name', @@ -106814,12 +73784,12 @@ def __repr__(self): ]) MobileDeviceSessionLogInfo._all_field_names_ = DeviceSessionLogInfo._all_field_names_.union(MobileDeviceSessionLogInfo._field_names_) MobileDeviceSessionLogInfo._fields_ = [ - ('session_info', MobileDeviceSessionLogInfo._session_info_validator), - ('device_name', MobileDeviceSessionLogInfo._device_name_validator), - ('client_type', MobileDeviceSessionLogInfo._client_type_validator), - ('client_version', MobileDeviceSessionLogInfo._client_version_validator), - ('os_version', MobileDeviceSessionLogInfo._os_version_validator), - ('last_carrier', MobileDeviceSessionLogInfo._last_carrier_validator), + ('session_info', MobileDeviceSessionLogInfo.session_info.validator), + ('device_name', MobileDeviceSessionLogInfo.device_name.validator), + ('client_type', MobileDeviceSessionLogInfo.client_type.validator), + ('client_version', MobileDeviceSessionLogInfo.client_version.validator), + ('os_version', MobileDeviceSessionLogInfo.os_version.validator), + ('last_carrier', MobileDeviceSessionLogInfo.last_carrier.validator), ] MobileDeviceSessionLogInfo._all_fields_ = DeviceSessionLogInfo._all_fields_ + MobileDeviceSessionLogInfo._fields_ @@ -106828,34 +73798,34 @@ def __repr__(self): MobileSessionLogInfo._fields_ = [] MobileSessionLogInfo._all_fields_ = SessionLogInfo._all_fields_ + MobileSessionLogInfo._fields_ -NamespaceRelativePathLogInfo._ns_id_validator = bv.Nullable(NamespaceId_validator) -NamespaceRelativePathLogInfo._relative_path_validator = bv.Nullable(FilePath_validator) -NamespaceRelativePathLogInfo._is_shared_namespace_validator = bv.Nullable(bv.Boolean()) +NamespaceRelativePathLogInfo.ns_id.validator = bv.Nullable(NamespaceId_validator) +NamespaceRelativePathLogInfo.relative_path.validator = bv.Nullable(FilePath_validator) +NamespaceRelativePathLogInfo.is_shared_namespace.validator = bv.Nullable(bv.Boolean()) NamespaceRelativePathLogInfo._all_field_names_ = set([ 'ns_id', 'relative_path', 'is_shared_namespace', ]) NamespaceRelativePathLogInfo._all_fields_ = [ - ('ns_id', NamespaceRelativePathLogInfo._ns_id_validator), - ('relative_path', NamespaceRelativePathLogInfo._relative_path_validator), - ('is_shared_namespace', NamespaceRelativePathLogInfo._is_shared_namespace_validator), + ('ns_id', NamespaceRelativePathLogInfo.ns_id.validator), + ('relative_path', NamespaceRelativePathLogInfo.relative_path.validator), + ('is_shared_namespace', NamespaceRelativePathLogInfo.is_shared_namespace.validator), ] -NetworkControlChangePolicyDetails._new_value_validator = NetworkControlPolicy_validator -NetworkControlChangePolicyDetails._previous_value_validator = bv.Nullable(NetworkControlPolicy_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), + ('new_value', NetworkControlChangePolicyDetails.new_value.validator), + ('previous_value', NetworkControlChangePolicyDetails.previous_value.validator), ] -NetworkControlChangePolicyType._description_validator = bv.String() +NetworkControlChangePolicyType.description.validator = bv.String() NetworkControlChangePolicyType._all_field_names_ = set(['description']) -NetworkControlChangePolicyType._all_fields_ = [('description', NetworkControlChangePolicyType._description_validator)] +NetworkControlChangePolicyType._all_fields_ = [('description', NetworkControlChangePolicyType.description.validator)] NetworkControlPolicy._disabled_validator = bv.Void() NetworkControlPolicy._enabled_validator = bv.Void() @@ -106870,78 +73840,78 @@ def __repr__(self): NetworkControlPolicy.enabled = NetworkControlPolicy('enabled') NetworkControlPolicy.other = NetworkControlPolicy('other') -NoExpirationLinkGenCreateReportDetails._start_date_validator = common.DropboxTimestamp_validator -NoExpirationLinkGenCreateReportDetails._end_date_validator = common.DropboxTimestamp_validator +NoExpirationLinkGenCreateReportDetails.start_date.validator = common.DropboxTimestamp_validator +NoExpirationLinkGenCreateReportDetails.end_date.validator = common.DropboxTimestamp_validator NoExpirationLinkGenCreateReportDetails._all_field_names_ = set([ 'start_date', 'end_date', ]) NoExpirationLinkGenCreateReportDetails._all_fields_ = [ - ('start_date', NoExpirationLinkGenCreateReportDetails._start_date_validator), - ('end_date', NoExpirationLinkGenCreateReportDetails._end_date_validator), + ('start_date', NoExpirationLinkGenCreateReportDetails.start_date.validator), + ('end_date', NoExpirationLinkGenCreateReportDetails.end_date.validator), ] -NoExpirationLinkGenCreateReportType._description_validator = bv.String() +NoExpirationLinkGenCreateReportType.description.validator = bv.String() NoExpirationLinkGenCreateReportType._all_field_names_ = set(['description']) -NoExpirationLinkGenCreateReportType._all_fields_ = [('description', NoExpirationLinkGenCreateReportType._description_validator)] +NoExpirationLinkGenCreateReportType._all_fields_ = [('description', NoExpirationLinkGenCreateReportType.description.validator)] -NoExpirationLinkGenReportFailedDetails._failure_reason_validator = team.TeamReportFailureReason_validator +NoExpirationLinkGenReportFailedDetails.failure_reason.validator = team.TeamReportFailureReason_validator NoExpirationLinkGenReportFailedDetails._all_field_names_ = set(['failure_reason']) -NoExpirationLinkGenReportFailedDetails._all_fields_ = [('failure_reason', NoExpirationLinkGenReportFailedDetails._failure_reason_validator)] +NoExpirationLinkGenReportFailedDetails._all_fields_ = [('failure_reason', NoExpirationLinkGenReportFailedDetails.failure_reason.validator)] -NoExpirationLinkGenReportFailedType._description_validator = bv.String() +NoExpirationLinkGenReportFailedType.description.validator = bv.String() NoExpirationLinkGenReportFailedType._all_field_names_ = set(['description']) -NoExpirationLinkGenReportFailedType._all_fields_ = [('description', NoExpirationLinkGenReportFailedType._description_validator)] +NoExpirationLinkGenReportFailedType._all_fields_ = [('description', NoExpirationLinkGenReportFailedType.description.validator)] -NoPasswordLinkGenCreateReportDetails._start_date_validator = common.DropboxTimestamp_validator -NoPasswordLinkGenCreateReportDetails._end_date_validator = common.DropboxTimestamp_validator +NoPasswordLinkGenCreateReportDetails.start_date.validator = common.DropboxTimestamp_validator +NoPasswordLinkGenCreateReportDetails.end_date.validator = common.DropboxTimestamp_validator NoPasswordLinkGenCreateReportDetails._all_field_names_ = set([ 'start_date', 'end_date', ]) NoPasswordLinkGenCreateReportDetails._all_fields_ = [ - ('start_date', NoPasswordLinkGenCreateReportDetails._start_date_validator), - ('end_date', NoPasswordLinkGenCreateReportDetails._end_date_validator), + ('start_date', NoPasswordLinkGenCreateReportDetails.start_date.validator), + ('end_date', NoPasswordLinkGenCreateReportDetails.end_date.validator), ] -NoPasswordLinkGenCreateReportType._description_validator = bv.String() +NoPasswordLinkGenCreateReportType.description.validator = bv.String() NoPasswordLinkGenCreateReportType._all_field_names_ = set(['description']) -NoPasswordLinkGenCreateReportType._all_fields_ = [('description', NoPasswordLinkGenCreateReportType._description_validator)] +NoPasswordLinkGenCreateReportType._all_fields_ = [('description', NoPasswordLinkGenCreateReportType.description.validator)] -NoPasswordLinkGenReportFailedDetails._failure_reason_validator = team.TeamReportFailureReason_validator +NoPasswordLinkGenReportFailedDetails.failure_reason.validator = team.TeamReportFailureReason_validator NoPasswordLinkGenReportFailedDetails._all_field_names_ = set(['failure_reason']) -NoPasswordLinkGenReportFailedDetails._all_fields_ = [('failure_reason', NoPasswordLinkGenReportFailedDetails._failure_reason_validator)] +NoPasswordLinkGenReportFailedDetails._all_fields_ = [('failure_reason', NoPasswordLinkGenReportFailedDetails.failure_reason.validator)] -NoPasswordLinkGenReportFailedType._description_validator = bv.String() +NoPasswordLinkGenReportFailedType.description.validator = bv.String() NoPasswordLinkGenReportFailedType._all_field_names_ = set(['description']) -NoPasswordLinkGenReportFailedType._all_fields_ = [('description', NoPasswordLinkGenReportFailedType._description_validator)] +NoPasswordLinkGenReportFailedType._all_fields_ = [('description', NoPasswordLinkGenReportFailedType.description.validator)] -NoPasswordLinkViewCreateReportDetails._start_date_validator = common.DropboxTimestamp_validator -NoPasswordLinkViewCreateReportDetails._end_date_validator = common.DropboxTimestamp_validator +NoPasswordLinkViewCreateReportDetails.start_date.validator = common.DropboxTimestamp_validator +NoPasswordLinkViewCreateReportDetails.end_date.validator = common.DropboxTimestamp_validator NoPasswordLinkViewCreateReportDetails._all_field_names_ = set([ 'start_date', 'end_date', ]) NoPasswordLinkViewCreateReportDetails._all_fields_ = [ - ('start_date', NoPasswordLinkViewCreateReportDetails._start_date_validator), - ('end_date', NoPasswordLinkViewCreateReportDetails._end_date_validator), + ('start_date', NoPasswordLinkViewCreateReportDetails.start_date.validator), + ('end_date', NoPasswordLinkViewCreateReportDetails.end_date.validator), ] -NoPasswordLinkViewCreateReportType._description_validator = bv.String() +NoPasswordLinkViewCreateReportType.description.validator = bv.String() NoPasswordLinkViewCreateReportType._all_field_names_ = set(['description']) -NoPasswordLinkViewCreateReportType._all_fields_ = [('description', NoPasswordLinkViewCreateReportType._description_validator)] +NoPasswordLinkViewCreateReportType._all_fields_ = [('description', NoPasswordLinkViewCreateReportType.description.validator)] -NoPasswordLinkViewReportFailedDetails._failure_reason_validator = team.TeamReportFailureReason_validator +NoPasswordLinkViewReportFailedDetails.failure_reason.validator = team.TeamReportFailureReason_validator NoPasswordLinkViewReportFailedDetails._all_field_names_ = set(['failure_reason']) -NoPasswordLinkViewReportFailedDetails._all_fields_ = [('failure_reason', NoPasswordLinkViewReportFailedDetails._failure_reason_validator)] +NoPasswordLinkViewReportFailedDetails._all_fields_ = [('failure_reason', NoPasswordLinkViewReportFailedDetails.failure_reason.validator)] -NoPasswordLinkViewReportFailedType._description_validator = bv.String() +NoPasswordLinkViewReportFailedType.description.validator = bv.String() NoPasswordLinkViewReportFailedType._all_field_names_ = set(['description']) -NoPasswordLinkViewReportFailedType._all_fields_ = [('description', NoPasswordLinkViewReportFailedType._description_validator)] +NoPasswordLinkViewReportFailedType._all_fields_ = [('description', NoPasswordLinkViewReportFailedType.description.validator)] -UserLogInfo._account_id_validator = bv.Nullable(users_common.AccountId_validator) -UserLogInfo._display_name_validator = bv.Nullable(common.DisplayNameLegacy_validator) -UserLogInfo._email_validator = bv.Nullable(EmailAddress_validator) +UserLogInfo.account_id.validator = bv.Nullable(users_common.AccountId_validator) +UserLogInfo.display_name.validator = bv.Nullable(common.DisplayNameLegacy_validator) +UserLogInfo.email.validator = bv.Nullable(EmailAddress_validator) UserLogInfo._field_names_ = set([ 'account_id', 'display_name', @@ -106949,9 +73919,9 @@ def __repr__(self): ]) 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), + ('account_id', UserLogInfo.account_id.validator), + ('display_name', UserLogInfo.display_name.validator), + ('email', UserLogInfo.email.validator), ] UserLogInfo._all_fields_ = UserLogInfo._fields_ @@ -106972,93 +73942,93 @@ def __repr__(self): NonTeamMemberLogInfo._fields_ = [] NonTeamMemberLogInfo._all_fields_ = UserLogInfo._all_fields_ + NonTeamMemberLogInfo._fields_ -NonTrustedTeamDetails._team_validator = bv.String() +NonTrustedTeamDetails.team.validator = bv.String() NonTrustedTeamDetails._all_field_names_ = set(['team']) -NonTrustedTeamDetails._all_fields_ = [('team', NonTrustedTeamDetails._team_validator)] +NonTrustedTeamDetails._all_fields_ = [('team', NonTrustedTeamDetails.team.validator)] NoteAclInviteOnlyDetails._all_field_names_ = set([]) NoteAclInviteOnlyDetails._all_fields_ = [] -NoteAclInviteOnlyType._description_validator = bv.String() +NoteAclInviteOnlyType.description.validator = bv.String() NoteAclInviteOnlyType._all_field_names_ = set(['description']) -NoteAclInviteOnlyType._all_fields_ = [('description', NoteAclInviteOnlyType._description_validator)] +NoteAclInviteOnlyType._all_fields_ = [('description', NoteAclInviteOnlyType.description.validator)] NoteAclLinkDetails._all_field_names_ = set([]) NoteAclLinkDetails._all_fields_ = [] -NoteAclLinkType._description_validator = bv.String() +NoteAclLinkType.description.validator = bv.String() NoteAclLinkType._all_field_names_ = set(['description']) -NoteAclLinkType._all_fields_ = [('description', NoteAclLinkType._description_validator)] +NoteAclLinkType._all_fields_ = [('description', NoteAclLinkType.description.validator)] NoteAclTeamLinkDetails._all_field_names_ = set([]) NoteAclTeamLinkDetails._all_fields_ = [] -NoteAclTeamLinkType._description_validator = bv.String() +NoteAclTeamLinkType.description.validator = bv.String() NoteAclTeamLinkType._all_field_names_ = set(['description']) -NoteAclTeamLinkType._all_fields_ = [('description', NoteAclTeamLinkType._description_validator)] +NoteAclTeamLinkType._all_fields_ = [('description', NoteAclTeamLinkType.description.validator)] NoteShareReceiveDetails._all_field_names_ = set([]) NoteShareReceiveDetails._all_fields_ = [] -NoteShareReceiveType._description_validator = bv.String() +NoteShareReceiveType.description.validator = bv.String() NoteShareReceiveType._all_field_names_ = set(['description']) -NoteShareReceiveType._all_fields_ = [('description', NoteShareReceiveType._description_validator)] +NoteShareReceiveType._all_fields_ = [('description', NoteShareReceiveType.description.validator)] NoteSharedDetails._all_field_names_ = set([]) NoteSharedDetails._all_fields_ = [] -NoteSharedType._description_validator = bv.String() +NoteSharedType.description.validator = bv.String() NoteSharedType._all_field_names_ = set(['description']) -NoteSharedType._all_fields_ = [('description', NoteSharedType._description_validator)] +NoteSharedType._all_fields_ = [('description', NoteSharedType.description.validator)] OpenNoteSharedDetails._all_field_names_ = set([]) OpenNoteSharedDetails._all_fields_ = [] -OpenNoteSharedType._description_validator = bv.String() +OpenNoteSharedType.description.validator = bv.String() OpenNoteSharedType._all_field_names_ = set(['description']) -OpenNoteSharedType._all_fields_ = [('description', OpenNoteSharedType._description_validator)] +OpenNoteSharedType._all_fields_ = [('description', OpenNoteSharedType.description.validator)] -OrganizationDetails._organization_validator = bv.String() +OrganizationDetails.organization.validator = bv.String() OrganizationDetails._all_field_names_ = set(['organization']) -OrganizationDetails._all_fields_ = [('organization', OrganizationDetails._organization_validator)] +OrganizationDetails._all_fields_ = [('organization', OrganizationDetails.organization.validator)] -OrganizationName._organization_validator = bv.String() +OrganizationName.organization.validator = bv.String() OrganizationName._all_field_names_ = set(['organization']) -OrganizationName._all_fields_ = [('organization', OrganizationName._organization_validator)] +OrganizationName._all_fields_ = [('organization', OrganizationName.organization.validator)] -OriginLogInfo._geo_location_validator = bv.Nullable(GeoLocationLogInfo_validator) -OriginLogInfo._access_method_validator = AccessMethodLogInfo_validator +OriginLogInfo.geo_location.validator = bv.Nullable(GeoLocationLogInfo_validator) +OriginLogInfo.access_method.validator = AccessMethodLogInfo_validator OriginLogInfo._all_field_names_ = set([ 'geo_location', 'access_method', ]) OriginLogInfo._all_fields_ = [ - ('geo_location', OriginLogInfo._geo_location_validator), - ('access_method', OriginLogInfo._access_method_validator), + ('geo_location', OriginLogInfo.geo_location.validator), + ('access_method', OriginLogInfo.access_method.validator), ] -OutdatedLinkViewCreateReportDetails._start_date_validator = common.DropboxTimestamp_validator -OutdatedLinkViewCreateReportDetails._end_date_validator = common.DropboxTimestamp_validator +OutdatedLinkViewCreateReportDetails.start_date.validator = common.DropboxTimestamp_validator +OutdatedLinkViewCreateReportDetails.end_date.validator = common.DropboxTimestamp_validator OutdatedLinkViewCreateReportDetails._all_field_names_ = set([ 'start_date', 'end_date', ]) OutdatedLinkViewCreateReportDetails._all_fields_ = [ - ('start_date', OutdatedLinkViewCreateReportDetails._start_date_validator), - ('end_date', OutdatedLinkViewCreateReportDetails._end_date_validator), + ('start_date', OutdatedLinkViewCreateReportDetails.start_date.validator), + ('end_date', OutdatedLinkViewCreateReportDetails.end_date.validator), ] -OutdatedLinkViewCreateReportType._description_validator = bv.String() +OutdatedLinkViewCreateReportType.description.validator = bv.String() OutdatedLinkViewCreateReportType._all_field_names_ = set(['description']) -OutdatedLinkViewCreateReportType._all_fields_ = [('description', OutdatedLinkViewCreateReportType._description_validator)] +OutdatedLinkViewCreateReportType._all_fields_ = [('description', OutdatedLinkViewCreateReportType.description.validator)] -OutdatedLinkViewReportFailedDetails._failure_reason_validator = team.TeamReportFailureReason_validator +OutdatedLinkViewReportFailedDetails.failure_reason.validator = team.TeamReportFailureReason_validator OutdatedLinkViewReportFailedDetails._all_field_names_ = set(['failure_reason']) -OutdatedLinkViewReportFailedDetails._all_fields_ = [('failure_reason', OutdatedLinkViewReportFailedDetails._failure_reason_validator)] +OutdatedLinkViewReportFailedDetails._all_fields_ = [('failure_reason', OutdatedLinkViewReportFailedDetails.failure_reason.validator)] -OutdatedLinkViewReportFailedType._description_validator = bv.String() +OutdatedLinkViewReportFailedType.description.validator = bv.String() OutdatedLinkViewReportFailedType._all_field_names_ = set(['description']) -OutdatedLinkViewReportFailedType._all_fields_ = [('description', OutdatedLinkViewReportFailedType._description_validator)] +OutdatedLinkViewReportFailedType._all_fields_ = [('description', OutdatedLinkViewReportFailedType.description.validator)] PaperAccessType._commenter_validator = bv.Void() PaperAccessType._editor_validator = bv.Void() @@ -107079,154 +74049,154 @@ def __repr__(self): PaperAdminExportStartDetails._all_field_names_ = set([]) PaperAdminExportStartDetails._all_fields_ = [] -PaperAdminExportStartType._description_validator = bv.String() +PaperAdminExportStartType.description.validator = bv.String() PaperAdminExportStartType._all_field_names_ = set(['description']) -PaperAdminExportStartType._all_fields_ = [('description', PaperAdminExportStartType._description_validator)] +PaperAdminExportStartType._all_fields_ = [('description', PaperAdminExportStartType.description.validator)] -PaperChangeDeploymentPolicyDetails._new_value_validator = team_policies.PaperDeploymentPolicy_validator -PaperChangeDeploymentPolicyDetails._previous_value_validator = bv.Nullable(team_policies.PaperDeploymentPolicy_validator) +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), + ('new_value', PaperChangeDeploymentPolicyDetails.new_value.validator), + ('previous_value', PaperChangeDeploymentPolicyDetails.previous_value.validator), ] -PaperChangeDeploymentPolicyType._description_validator = bv.String() +PaperChangeDeploymentPolicyType.description.validator = bv.String() PaperChangeDeploymentPolicyType._all_field_names_ = set(['description']) -PaperChangeDeploymentPolicyType._all_fields_ = [('description', PaperChangeDeploymentPolicyType._description_validator)] +PaperChangeDeploymentPolicyType._all_fields_ = [('description', PaperChangeDeploymentPolicyType.description.validator)] -PaperChangeMemberLinkPolicyDetails._new_value_validator = PaperMemberPolicy_validator +PaperChangeMemberLinkPolicyDetails.new_value.validator = PaperMemberPolicy_validator PaperChangeMemberLinkPolicyDetails._all_field_names_ = set(['new_value']) -PaperChangeMemberLinkPolicyDetails._all_fields_ = [('new_value', PaperChangeMemberLinkPolicyDetails._new_value_validator)] +PaperChangeMemberLinkPolicyDetails._all_fields_ = [('new_value', PaperChangeMemberLinkPolicyDetails.new_value.validator)] -PaperChangeMemberLinkPolicyType._description_validator = bv.String() +PaperChangeMemberLinkPolicyType.description.validator = bv.String() PaperChangeMemberLinkPolicyType._all_field_names_ = set(['description']) -PaperChangeMemberLinkPolicyType._all_fields_ = [('description', PaperChangeMemberLinkPolicyType._description_validator)] +PaperChangeMemberLinkPolicyType._all_fields_ = [('description', PaperChangeMemberLinkPolicyType.description.validator)] -PaperChangeMemberPolicyDetails._new_value_validator = PaperMemberPolicy_validator -PaperChangeMemberPolicyDetails._previous_value_validator = bv.Nullable(PaperMemberPolicy_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), + ('new_value', PaperChangeMemberPolicyDetails.new_value.validator), + ('previous_value', PaperChangeMemberPolicyDetails.previous_value.validator), ] -PaperChangeMemberPolicyType._description_validator = bv.String() +PaperChangeMemberPolicyType.description.validator = bv.String() PaperChangeMemberPolicyType._all_field_names_ = set(['description']) -PaperChangeMemberPolicyType._all_fields_ = [('description', PaperChangeMemberPolicyType._description_validator)] +PaperChangeMemberPolicyType._all_fields_ = [('description', PaperChangeMemberPolicyType.description.validator)] -PaperChangePolicyDetails._new_value_validator = team_policies.PaperEnabledPolicy_validator -PaperChangePolicyDetails._previous_value_validator = bv.Nullable(team_policies.PaperEnabledPolicy_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), + ('new_value', PaperChangePolicyDetails.new_value.validator), + ('previous_value', PaperChangePolicyDetails.previous_value.validator), ] -PaperChangePolicyType._description_validator = bv.String() +PaperChangePolicyType.description.validator = bv.String() PaperChangePolicyType._all_field_names_ = set(['description']) -PaperChangePolicyType._all_fields_ = [('description', PaperChangePolicyType._description_validator)] +PaperChangePolicyType._all_fields_ = [('description', PaperChangePolicyType.description.validator)] -PaperContentAddMemberDetails._event_uuid_validator = bv.String() +PaperContentAddMemberDetails.event_uuid.validator = bv.String() PaperContentAddMemberDetails._all_field_names_ = set(['event_uuid']) -PaperContentAddMemberDetails._all_fields_ = [('event_uuid', PaperContentAddMemberDetails._event_uuid_validator)] +PaperContentAddMemberDetails._all_fields_ = [('event_uuid', PaperContentAddMemberDetails.event_uuid.validator)] -PaperContentAddMemberType._description_validator = bv.String() +PaperContentAddMemberType.description.validator = bv.String() PaperContentAddMemberType._all_field_names_ = set(['description']) -PaperContentAddMemberType._all_fields_ = [('description', PaperContentAddMemberType._description_validator)] +PaperContentAddMemberType._all_fields_ = [('description', PaperContentAddMemberType.description.validator)] -PaperContentAddToFolderDetails._event_uuid_validator = bv.String() -PaperContentAddToFolderDetails._target_asset_index_validator = bv.UInt64() -PaperContentAddToFolderDetails._parent_asset_index_validator = bv.UInt64() +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), + ('event_uuid', PaperContentAddToFolderDetails.event_uuid.validator), + ('target_asset_index', PaperContentAddToFolderDetails.target_asset_index.validator), + ('parent_asset_index', PaperContentAddToFolderDetails.parent_asset_index.validator), ] -PaperContentAddToFolderType._description_validator = bv.String() +PaperContentAddToFolderType.description.validator = bv.String() PaperContentAddToFolderType._all_field_names_ = set(['description']) -PaperContentAddToFolderType._all_fields_ = [('description', PaperContentAddToFolderType._description_validator)] +PaperContentAddToFolderType._all_fields_ = [('description', PaperContentAddToFolderType.description.validator)] -PaperContentArchiveDetails._event_uuid_validator = bv.String() +PaperContentArchiveDetails.event_uuid.validator = bv.String() PaperContentArchiveDetails._all_field_names_ = set(['event_uuid']) -PaperContentArchiveDetails._all_fields_ = [('event_uuid', PaperContentArchiveDetails._event_uuid_validator)] +PaperContentArchiveDetails._all_fields_ = [('event_uuid', PaperContentArchiveDetails.event_uuid.validator)] -PaperContentArchiveType._description_validator = bv.String() +PaperContentArchiveType.description.validator = bv.String() PaperContentArchiveType._all_field_names_ = set(['description']) -PaperContentArchiveType._all_fields_ = [('description', PaperContentArchiveType._description_validator)] +PaperContentArchiveType._all_fields_ = [('description', PaperContentArchiveType.description.validator)] -PaperContentCreateDetails._event_uuid_validator = bv.String() +PaperContentCreateDetails.event_uuid.validator = bv.String() PaperContentCreateDetails._all_field_names_ = set(['event_uuid']) -PaperContentCreateDetails._all_fields_ = [('event_uuid', PaperContentCreateDetails._event_uuid_validator)] +PaperContentCreateDetails._all_fields_ = [('event_uuid', PaperContentCreateDetails.event_uuid.validator)] -PaperContentCreateType._description_validator = bv.String() +PaperContentCreateType.description.validator = bv.String() PaperContentCreateType._all_field_names_ = set(['description']) -PaperContentCreateType._all_fields_ = [('description', PaperContentCreateType._description_validator)] +PaperContentCreateType._all_fields_ = [('description', PaperContentCreateType.description.validator)] -PaperContentPermanentlyDeleteDetails._event_uuid_validator = bv.String() +PaperContentPermanentlyDeleteDetails.event_uuid.validator = bv.String() PaperContentPermanentlyDeleteDetails._all_field_names_ = set(['event_uuid']) -PaperContentPermanentlyDeleteDetails._all_fields_ = [('event_uuid', PaperContentPermanentlyDeleteDetails._event_uuid_validator)] +PaperContentPermanentlyDeleteDetails._all_fields_ = [('event_uuid', PaperContentPermanentlyDeleteDetails.event_uuid.validator)] -PaperContentPermanentlyDeleteType._description_validator = bv.String() +PaperContentPermanentlyDeleteType.description.validator = bv.String() PaperContentPermanentlyDeleteType._all_field_names_ = set(['description']) -PaperContentPermanentlyDeleteType._all_fields_ = [('description', PaperContentPermanentlyDeleteType._description_validator)] +PaperContentPermanentlyDeleteType._all_fields_ = [('description', PaperContentPermanentlyDeleteType.description.validator)] -PaperContentRemoveFromFolderDetails._event_uuid_validator = bv.String() -PaperContentRemoveFromFolderDetails._target_asset_index_validator = bv.Nullable(bv.UInt64()) -PaperContentRemoveFromFolderDetails._parent_asset_index_validator = bv.Nullable(bv.UInt64()) +PaperContentRemoveFromFolderDetails.event_uuid.validator = bv.String() +PaperContentRemoveFromFolderDetails.target_asset_index.validator = bv.Nullable(bv.UInt64()) +PaperContentRemoveFromFolderDetails.parent_asset_index.validator = bv.Nullable(bv.UInt64()) PaperContentRemoveFromFolderDetails._all_field_names_ = set([ 'event_uuid', 'target_asset_index', 'parent_asset_index', ]) PaperContentRemoveFromFolderDetails._all_fields_ = [ - ('event_uuid', PaperContentRemoveFromFolderDetails._event_uuid_validator), - ('target_asset_index', PaperContentRemoveFromFolderDetails._target_asset_index_validator), - ('parent_asset_index', PaperContentRemoveFromFolderDetails._parent_asset_index_validator), + ('event_uuid', PaperContentRemoveFromFolderDetails.event_uuid.validator), + ('target_asset_index', PaperContentRemoveFromFolderDetails.target_asset_index.validator), + ('parent_asset_index', PaperContentRemoveFromFolderDetails.parent_asset_index.validator), ] -PaperContentRemoveFromFolderType._description_validator = bv.String() +PaperContentRemoveFromFolderType.description.validator = bv.String() PaperContentRemoveFromFolderType._all_field_names_ = set(['description']) -PaperContentRemoveFromFolderType._all_fields_ = [('description', PaperContentRemoveFromFolderType._description_validator)] +PaperContentRemoveFromFolderType._all_fields_ = [('description', PaperContentRemoveFromFolderType.description.validator)] -PaperContentRemoveMemberDetails._event_uuid_validator = bv.String() +PaperContentRemoveMemberDetails.event_uuid.validator = bv.String() PaperContentRemoveMemberDetails._all_field_names_ = set(['event_uuid']) -PaperContentRemoveMemberDetails._all_fields_ = [('event_uuid', PaperContentRemoveMemberDetails._event_uuid_validator)] +PaperContentRemoveMemberDetails._all_fields_ = [('event_uuid', PaperContentRemoveMemberDetails.event_uuid.validator)] -PaperContentRemoveMemberType._description_validator = bv.String() +PaperContentRemoveMemberType.description.validator = bv.String() PaperContentRemoveMemberType._all_field_names_ = set(['description']) -PaperContentRemoveMemberType._all_fields_ = [('description', PaperContentRemoveMemberType._description_validator)] +PaperContentRemoveMemberType._all_fields_ = [('description', PaperContentRemoveMemberType.description.validator)] -PaperContentRenameDetails._event_uuid_validator = bv.String() +PaperContentRenameDetails.event_uuid.validator = bv.String() PaperContentRenameDetails._all_field_names_ = set(['event_uuid']) -PaperContentRenameDetails._all_fields_ = [('event_uuid', PaperContentRenameDetails._event_uuid_validator)] +PaperContentRenameDetails._all_fields_ = [('event_uuid', PaperContentRenameDetails.event_uuid.validator)] -PaperContentRenameType._description_validator = bv.String() +PaperContentRenameType.description.validator = bv.String() PaperContentRenameType._all_field_names_ = set(['description']) -PaperContentRenameType._all_fields_ = [('description', PaperContentRenameType._description_validator)] +PaperContentRenameType._all_fields_ = [('description', PaperContentRenameType.description.validator)] -PaperContentRestoreDetails._event_uuid_validator = bv.String() +PaperContentRestoreDetails.event_uuid.validator = bv.String() PaperContentRestoreDetails._all_field_names_ = set(['event_uuid']) -PaperContentRestoreDetails._all_fields_ = [('event_uuid', PaperContentRestoreDetails._event_uuid_validator)] +PaperContentRestoreDetails._all_fields_ = [('event_uuid', PaperContentRestoreDetails.event_uuid.validator)] -PaperContentRestoreType._description_validator = bv.String() +PaperContentRestoreType.description.validator = bv.String() PaperContentRestoreType._all_field_names_ = set(['description']) -PaperContentRestoreType._all_fields_ = [('description', PaperContentRestoreType._description_validator)] +PaperContentRestoreType._all_fields_ = [('description', PaperContentRestoreType.description.validator)] PaperDefaultFolderPolicy._everyone_in_team_validator = bv.Void() PaperDefaultFolderPolicy._invite_only_validator = bv.Void() @@ -107241,20 +74211,20 @@ def __repr__(self): PaperDefaultFolderPolicy.invite_only = PaperDefaultFolderPolicy('invite_only') PaperDefaultFolderPolicy.other = PaperDefaultFolderPolicy('other') -PaperDefaultFolderPolicyChangedDetails._new_value_validator = PaperDefaultFolderPolicy_validator -PaperDefaultFolderPolicyChangedDetails._previous_value_validator = PaperDefaultFolderPolicy_validator +PaperDefaultFolderPolicyChangedDetails.new_value.validator = PaperDefaultFolderPolicy_validator +PaperDefaultFolderPolicyChangedDetails.previous_value.validator = PaperDefaultFolderPolicy_validator PaperDefaultFolderPolicyChangedDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) PaperDefaultFolderPolicyChangedDetails._all_fields_ = [ - ('new_value', PaperDefaultFolderPolicyChangedDetails._new_value_validator), - ('previous_value', PaperDefaultFolderPolicyChangedDetails._previous_value_validator), + ('new_value', PaperDefaultFolderPolicyChangedDetails.new_value.validator), + ('previous_value', PaperDefaultFolderPolicyChangedDetails.previous_value.validator), ] -PaperDefaultFolderPolicyChangedType._description_validator = bv.String() +PaperDefaultFolderPolicyChangedType.description.validator = bv.String() PaperDefaultFolderPolicyChangedType._all_field_names_ = set(['description']) -PaperDefaultFolderPolicyChangedType._all_fields_ = [('description', PaperDefaultFolderPolicyChangedType._description_validator)] +PaperDefaultFolderPolicyChangedType._all_fields_ = [('description', PaperDefaultFolderPolicyChangedType.description.validator)] PaperDesktopPolicy._disabled_validator = bv.Void() PaperDesktopPolicy._enabled_validator = bv.Void() @@ -107269,277 +74239,277 @@ def __repr__(self): PaperDesktopPolicy.enabled = PaperDesktopPolicy('enabled') PaperDesktopPolicy.other = PaperDesktopPolicy('other') -PaperDesktopPolicyChangedDetails._new_value_validator = PaperDesktopPolicy_validator -PaperDesktopPolicyChangedDetails._previous_value_validator = PaperDesktopPolicy_validator +PaperDesktopPolicyChangedDetails.new_value.validator = PaperDesktopPolicy_validator +PaperDesktopPolicyChangedDetails.previous_value.validator = PaperDesktopPolicy_validator PaperDesktopPolicyChangedDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) PaperDesktopPolicyChangedDetails._all_fields_ = [ - ('new_value', PaperDesktopPolicyChangedDetails._new_value_validator), - ('previous_value', PaperDesktopPolicyChangedDetails._previous_value_validator), + ('new_value', PaperDesktopPolicyChangedDetails.new_value.validator), + ('previous_value', PaperDesktopPolicyChangedDetails.previous_value.validator), ] -PaperDesktopPolicyChangedType._description_validator = bv.String() +PaperDesktopPolicyChangedType.description.validator = bv.String() PaperDesktopPolicyChangedType._all_field_names_ = set(['description']) -PaperDesktopPolicyChangedType._all_fields_ = [('description', PaperDesktopPolicyChangedType._description_validator)] +PaperDesktopPolicyChangedType._all_fields_ = [('description', PaperDesktopPolicyChangedType.description.validator)] -PaperDocAddCommentDetails._event_uuid_validator = bv.String() -PaperDocAddCommentDetails._comment_text_validator = bv.Nullable(bv.String()) +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), + ('event_uuid', PaperDocAddCommentDetails.event_uuid.validator), + ('comment_text', PaperDocAddCommentDetails.comment_text.validator), ] -PaperDocAddCommentType._description_validator = bv.String() +PaperDocAddCommentType.description.validator = bv.String() PaperDocAddCommentType._all_field_names_ = set(['description']) -PaperDocAddCommentType._all_fields_ = [('description', PaperDocAddCommentType._description_validator)] +PaperDocAddCommentType._all_fields_ = [('description', PaperDocAddCommentType.description.validator)] -PaperDocChangeMemberRoleDetails._event_uuid_validator = bv.String() -PaperDocChangeMemberRoleDetails._access_type_validator = PaperAccessType_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), + ('event_uuid', PaperDocChangeMemberRoleDetails.event_uuid.validator), + ('access_type', PaperDocChangeMemberRoleDetails.access_type.validator), ] -PaperDocChangeMemberRoleType._description_validator = bv.String() +PaperDocChangeMemberRoleType.description.validator = bv.String() PaperDocChangeMemberRoleType._all_field_names_ = set(['description']) -PaperDocChangeMemberRoleType._all_fields_ = [('description', PaperDocChangeMemberRoleType._description_validator)] +PaperDocChangeMemberRoleType._all_fields_ = [('description', PaperDocChangeMemberRoleType.description.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.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), + ('event_uuid', PaperDocChangeSharingPolicyDetails.event_uuid.validator), + ('public_sharing_policy', PaperDocChangeSharingPolicyDetails.public_sharing_policy.validator), + ('team_sharing_policy', PaperDocChangeSharingPolicyDetails.team_sharing_policy.validator), ] -PaperDocChangeSharingPolicyType._description_validator = bv.String() +PaperDocChangeSharingPolicyType.description.validator = bv.String() PaperDocChangeSharingPolicyType._all_field_names_ = set(['description']) -PaperDocChangeSharingPolicyType._all_fields_ = [('description', PaperDocChangeSharingPolicyType._description_validator)] +PaperDocChangeSharingPolicyType._all_fields_ = [('description', PaperDocChangeSharingPolicyType.description.validator)] -PaperDocChangeSubscriptionDetails._event_uuid_validator = bv.String() -PaperDocChangeSubscriptionDetails._new_subscription_level_validator = bv.String() -PaperDocChangeSubscriptionDetails._previous_subscription_level_validator = bv.Nullable(bv.String()) +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), + ('event_uuid', PaperDocChangeSubscriptionDetails.event_uuid.validator), + ('new_subscription_level', PaperDocChangeSubscriptionDetails.new_subscription_level.validator), + ('previous_subscription_level', PaperDocChangeSubscriptionDetails.previous_subscription_level.validator), ] -PaperDocChangeSubscriptionType._description_validator = bv.String() +PaperDocChangeSubscriptionType.description.validator = bv.String() PaperDocChangeSubscriptionType._all_field_names_ = set(['description']) -PaperDocChangeSubscriptionType._all_fields_ = [('description', PaperDocChangeSubscriptionType._description_validator)] +PaperDocChangeSubscriptionType._all_fields_ = [('description', PaperDocChangeSubscriptionType.description.validator)] -PaperDocDeleteCommentDetails._event_uuid_validator = bv.String() -PaperDocDeleteCommentDetails._comment_text_validator = bv.Nullable(bv.String()) +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), + ('event_uuid', PaperDocDeleteCommentDetails.event_uuid.validator), + ('comment_text', PaperDocDeleteCommentDetails.comment_text.validator), ] -PaperDocDeleteCommentType._description_validator = bv.String() +PaperDocDeleteCommentType.description.validator = bv.String() PaperDocDeleteCommentType._all_field_names_ = set(['description']) -PaperDocDeleteCommentType._all_fields_ = [('description', PaperDocDeleteCommentType._description_validator)] +PaperDocDeleteCommentType._all_fields_ = [('description', PaperDocDeleteCommentType.description.validator)] -PaperDocDeletedDetails._event_uuid_validator = bv.String() +PaperDocDeletedDetails.event_uuid.validator = bv.String() PaperDocDeletedDetails._all_field_names_ = set(['event_uuid']) -PaperDocDeletedDetails._all_fields_ = [('event_uuid', PaperDocDeletedDetails._event_uuid_validator)] +PaperDocDeletedDetails._all_fields_ = [('event_uuid', PaperDocDeletedDetails.event_uuid.validator)] -PaperDocDeletedType._description_validator = bv.String() +PaperDocDeletedType.description.validator = bv.String() PaperDocDeletedType._all_field_names_ = set(['description']) -PaperDocDeletedType._all_fields_ = [('description', PaperDocDeletedType._description_validator)] +PaperDocDeletedType._all_fields_ = [('description', PaperDocDeletedType.description.validator)] -PaperDocDownloadDetails._event_uuid_validator = bv.String() -PaperDocDownloadDetails._export_file_format_validator = PaperDownloadFormat_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), + ('event_uuid', PaperDocDownloadDetails.event_uuid.validator), + ('export_file_format', PaperDocDownloadDetails.export_file_format.validator), ] -PaperDocDownloadType._description_validator = bv.String() +PaperDocDownloadType.description.validator = bv.String() PaperDocDownloadType._all_field_names_ = set(['description']) -PaperDocDownloadType._all_fields_ = [('description', PaperDocDownloadType._description_validator)] +PaperDocDownloadType._all_fields_ = [('description', PaperDocDownloadType.description.validator)] -PaperDocEditCommentDetails._event_uuid_validator = bv.String() -PaperDocEditCommentDetails._comment_text_validator = bv.Nullable(bv.String()) +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), + ('event_uuid', PaperDocEditCommentDetails.event_uuid.validator), + ('comment_text', PaperDocEditCommentDetails.comment_text.validator), ] -PaperDocEditCommentType._description_validator = bv.String() +PaperDocEditCommentType.description.validator = bv.String() PaperDocEditCommentType._all_field_names_ = set(['description']) -PaperDocEditCommentType._all_fields_ = [('description', PaperDocEditCommentType._description_validator)] +PaperDocEditCommentType._all_fields_ = [('description', PaperDocEditCommentType.description.validator)] -PaperDocEditDetails._event_uuid_validator = bv.String() +PaperDocEditDetails.event_uuid.validator = bv.String() PaperDocEditDetails._all_field_names_ = set(['event_uuid']) -PaperDocEditDetails._all_fields_ = [('event_uuid', PaperDocEditDetails._event_uuid_validator)] +PaperDocEditDetails._all_fields_ = [('event_uuid', PaperDocEditDetails.event_uuid.validator)] -PaperDocEditType._description_validator = bv.String() +PaperDocEditType.description.validator = bv.String() PaperDocEditType._all_field_names_ = set(['description']) -PaperDocEditType._all_fields_ = [('description', PaperDocEditType._description_validator)] +PaperDocEditType._all_fields_ = [('description', PaperDocEditType.description.validator)] -PaperDocFollowedDetails._event_uuid_validator = bv.String() +PaperDocFollowedDetails.event_uuid.validator = bv.String() PaperDocFollowedDetails._all_field_names_ = set(['event_uuid']) -PaperDocFollowedDetails._all_fields_ = [('event_uuid', PaperDocFollowedDetails._event_uuid_validator)] +PaperDocFollowedDetails._all_fields_ = [('event_uuid', PaperDocFollowedDetails.event_uuid.validator)] -PaperDocFollowedType._description_validator = bv.String() +PaperDocFollowedType.description.validator = bv.String() PaperDocFollowedType._all_field_names_ = set(['description']) -PaperDocFollowedType._all_fields_ = [('description', PaperDocFollowedType._description_validator)] +PaperDocFollowedType._all_fields_ = [('description', PaperDocFollowedType.description.validator)] -PaperDocMentionDetails._event_uuid_validator = bv.String() +PaperDocMentionDetails.event_uuid.validator = bv.String() PaperDocMentionDetails._all_field_names_ = set(['event_uuid']) -PaperDocMentionDetails._all_fields_ = [('event_uuid', PaperDocMentionDetails._event_uuid_validator)] +PaperDocMentionDetails._all_fields_ = [('event_uuid', PaperDocMentionDetails.event_uuid.validator)] -PaperDocMentionType._description_validator = bv.String() +PaperDocMentionType.description.validator = bv.String() PaperDocMentionType._all_field_names_ = set(['description']) -PaperDocMentionType._all_fields_ = [('description', PaperDocMentionType._description_validator)] +PaperDocMentionType._all_fields_ = [('description', PaperDocMentionType.description.validator)] -PaperDocOwnershipChangedDetails._event_uuid_validator = bv.String() -PaperDocOwnershipChangedDetails._old_owner_user_id_validator = bv.Nullable(users_common.AccountId_validator) -PaperDocOwnershipChangedDetails._new_owner_user_id_validator = users_common.AccountId_validator +PaperDocOwnershipChangedDetails.event_uuid.validator = bv.String() +PaperDocOwnershipChangedDetails.old_owner_user_id.validator = bv.Nullable(users_common.AccountId_validator) +PaperDocOwnershipChangedDetails.new_owner_user_id.validator = users_common.AccountId_validator PaperDocOwnershipChangedDetails._all_field_names_ = set([ 'event_uuid', 'old_owner_user_id', 'new_owner_user_id', ]) PaperDocOwnershipChangedDetails._all_fields_ = [ - ('event_uuid', PaperDocOwnershipChangedDetails._event_uuid_validator), - ('old_owner_user_id', PaperDocOwnershipChangedDetails._old_owner_user_id_validator), - ('new_owner_user_id', PaperDocOwnershipChangedDetails._new_owner_user_id_validator), + ('event_uuid', PaperDocOwnershipChangedDetails.event_uuid.validator), + ('old_owner_user_id', PaperDocOwnershipChangedDetails.old_owner_user_id.validator), + ('new_owner_user_id', PaperDocOwnershipChangedDetails.new_owner_user_id.validator), ] -PaperDocOwnershipChangedType._description_validator = bv.String() +PaperDocOwnershipChangedType.description.validator = bv.String() PaperDocOwnershipChangedType._all_field_names_ = set(['description']) -PaperDocOwnershipChangedType._all_fields_ = [('description', PaperDocOwnershipChangedType._description_validator)] +PaperDocOwnershipChangedType._all_fields_ = [('description', PaperDocOwnershipChangedType.description.validator)] -PaperDocRequestAccessDetails._event_uuid_validator = bv.String() +PaperDocRequestAccessDetails.event_uuid.validator = bv.String() PaperDocRequestAccessDetails._all_field_names_ = set(['event_uuid']) -PaperDocRequestAccessDetails._all_fields_ = [('event_uuid', PaperDocRequestAccessDetails._event_uuid_validator)] +PaperDocRequestAccessDetails._all_fields_ = [('event_uuid', PaperDocRequestAccessDetails.event_uuid.validator)] -PaperDocRequestAccessType._description_validator = bv.String() +PaperDocRequestAccessType.description.validator = bv.String() PaperDocRequestAccessType._all_field_names_ = set(['description']) -PaperDocRequestAccessType._all_fields_ = [('description', PaperDocRequestAccessType._description_validator)] +PaperDocRequestAccessType._all_fields_ = [('description', PaperDocRequestAccessType.description.validator)] -PaperDocResolveCommentDetails._event_uuid_validator = bv.String() -PaperDocResolveCommentDetails._comment_text_validator = bv.Nullable(bv.String()) +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), + ('event_uuid', PaperDocResolveCommentDetails.event_uuid.validator), + ('comment_text', PaperDocResolveCommentDetails.comment_text.validator), ] -PaperDocResolveCommentType._description_validator = bv.String() +PaperDocResolveCommentType.description.validator = bv.String() PaperDocResolveCommentType._all_field_names_ = set(['description']) -PaperDocResolveCommentType._all_fields_ = [('description', PaperDocResolveCommentType._description_validator)] +PaperDocResolveCommentType._all_fields_ = [('description', PaperDocResolveCommentType.description.validator)] -PaperDocRevertDetails._event_uuid_validator = bv.String() +PaperDocRevertDetails.event_uuid.validator = bv.String() PaperDocRevertDetails._all_field_names_ = set(['event_uuid']) -PaperDocRevertDetails._all_fields_ = [('event_uuid', PaperDocRevertDetails._event_uuid_validator)] +PaperDocRevertDetails._all_fields_ = [('event_uuid', PaperDocRevertDetails.event_uuid.validator)] -PaperDocRevertType._description_validator = bv.String() +PaperDocRevertType.description.validator = bv.String() PaperDocRevertType._all_field_names_ = set(['description']) -PaperDocRevertType._all_fields_ = [('description', PaperDocRevertType._description_validator)] +PaperDocRevertType._all_fields_ = [('description', PaperDocRevertType.description.validator)] -PaperDocSlackShareDetails._event_uuid_validator = bv.String() +PaperDocSlackShareDetails.event_uuid.validator = bv.String() PaperDocSlackShareDetails._all_field_names_ = set(['event_uuid']) -PaperDocSlackShareDetails._all_fields_ = [('event_uuid', PaperDocSlackShareDetails._event_uuid_validator)] +PaperDocSlackShareDetails._all_fields_ = [('event_uuid', PaperDocSlackShareDetails.event_uuid.validator)] -PaperDocSlackShareType._description_validator = bv.String() +PaperDocSlackShareType.description.validator = bv.String() PaperDocSlackShareType._all_field_names_ = set(['description']) -PaperDocSlackShareType._all_fields_ = [('description', PaperDocSlackShareType._description_validator)] +PaperDocSlackShareType._all_fields_ = [('description', PaperDocSlackShareType.description.validator)] -PaperDocTeamInviteDetails._event_uuid_validator = bv.String() +PaperDocTeamInviteDetails.event_uuid.validator = bv.String() PaperDocTeamInviteDetails._all_field_names_ = set(['event_uuid']) -PaperDocTeamInviteDetails._all_fields_ = [('event_uuid', PaperDocTeamInviteDetails._event_uuid_validator)] +PaperDocTeamInviteDetails._all_fields_ = [('event_uuid', PaperDocTeamInviteDetails.event_uuid.validator)] -PaperDocTeamInviteType._description_validator = bv.String() +PaperDocTeamInviteType.description.validator = bv.String() PaperDocTeamInviteType._all_field_names_ = set(['description']) -PaperDocTeamInviteType._all_fields_ = [('description', PaperDocTeamInviteType._description_validator)] +PaperDocTeamInviteType._all_fields_ = [('description', PaperDocTeamInviteType.description.validator)] -PaperDocTrashedDetails._event_uuid_validator = bv.String() +PaperDocTrashedDetails.event_uuid.validator = bv.String() PaperDocTrashedDetails._all_field_names_ = set(['event_uuid']) -PaperDocTrashedDetails._all_fields_ = [('event_uuid', PaperDocTrashedDetails._event_uuid_validator)] +PaperDocTrashedDetails._all_fields_ = [('event_uuid', PaperDocTrashedDetails.event_uuid.validator)] -PaperDocTrashedType._description_validator = bv.String() +PaperDocTrashedType.description.validator = bv.String() PaperDocTrashedType._all_field_names_ = set(['description']) -PaperDocTrashedType._all_fields_ = [('description', PaperDocTrashedType._description_validator)] +PaperDocTrashedType._all_fields_ = [('description', PaperDocTrashedType.description.validator)] -PaperDocUnresolveCommentDetails._event_uuid_validator = bv.String() -PaperDocUnresolveCommentDetails._comment_text_validator = bv.Nullable(bv.String()) +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), + ('event_uuid', PaperDocUnresolveCommentDetails.event_uuid.validator), + ('comment_text', PaperDocUnresolveCommentDetails.comment_text.validator), ] -PaperDocUnresolveCommentType._description_validator = bv.String() +PaperDocUnresolveCommentType.description.validator = bv.String() PaperDocUnresolveCommentType._all_field_names_ = set(['description']) -PaperDocUnresolveCommentType._all_fields_ = [('description', PaperDocUnresolveCommentType._description_validator)] +PaperDocUnresolveCommentType._all_fields_ = [('description', PaperDocUnresolveCommentType.description.validator)] -PaperDocUntrashedDetails._event_uuid_validator = bv.String() +PaperDocUntrashedDetails.event_uuid.validator = bv.String() PaperDocUntrashedDetails._all_field_names_ = set(['event_uuid']) -PaperDocUntrashedDetails._all_fields_ = [('event_uuid', PaperDocUntrashedDetails._event_uuid_validator)] +PaperDocUntrashedDetails._all_fields_ = [('event_uuid', PaperDocUntrashedDetails.event_uuid.validator)] -PaperDocUntrashedType._description_validator = bv.String() +PaperDocUntrashedType.description.validator = bv.String() PaperDocUntrashedType._all_field_names_ = set(['description']) -PaperDocUntrashedType._all_fields_ = [('description', PaperDocUntrashedType._description_validator)] +PaperDocUntrashedType._all_fields_ = [('description', PaperDocUntrashedType.description.validator)] -PaperDocViewDetails._event_uuid_validator = bv.String() +PaperDocViewDetails.event_uuid.validator = bv.String() PaperDocViewDetails._all_field_names_ = set(['event_uuid']) -PaperDocViewDetails._all_fields_ = [('event_uuid', PaperDocViewDetails._event_uuid_validator)] +PaperDocViewDetails._all_fields_ = [('event_uuid', PaperDocViewDetails.event_uuid.validator)] -PaperDocViewType._description_validator = bv.String() +PaperDocViewType.description.validator = bv.String() PaperDocViewType._all_field_names_ = set(['description']) -PaperDocViewType._all_fields_ = [('description', PaperDocViewType._description_validator)] +PaperDocViewType._all_fields_ = [('description', PaperDocViewType.description.validator)] -PaperDocumentLogInfo._doc_id_validator = bv.String() -PaperDocumentLogInfo._doc_title_validator = bv.String() +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), + ('doc_id', PaperDocumentLogInfo.doc_id.validator), + ('doc_title', PaperDocumentLogInfo.doc_title.validator), ] PaperDownloadFormat._docx_validator = bv.Void() @@ -107564,93 +74534,93 @@ def __repr__(self): PaperEnabledUsersGroupAdditionDetails._all_field_names_ = set([]) PaperEnabledUsersGroupAdditionDetails._all_fields_ = [] -PaperEnabledUsersGroupAdditionType._description_validator = bv.String() +PaperEnabledUsersGroupAdditionType.description.validator = bv.String() PaperEnabledUsersGroupAdditionType._all_field_names_ = set(['description']) -PaperEnabledUsersGroupAdditionType._all_fields_ = [('description', PaperEnabledUsersGroupAdditionType._description_validator)] +PaperEnabledUsersGroupAdditionType._all_fields_ = [('description', PaperEnabledUsersGroupAdditionType.description.validator)] PaperEnabledUsersGroupRemovalDetails._all_field_names_ = set([]) PaperEnabledUsersGroupRemovalDetails._all_fields_ = [] -PaperEnabledUsersGroupRemovalType._description_validator = bv.String() +PaperEnabledUsersGroupRemovalType.description.validator = bv.String() PaperEnabledUsersGroupRemovalType._all_field_names_ = set(['description']) -PaperEnabledUsersGroupRemovalType._all_fields_ = [('description', PaperEnabledUsersGroupRemovalType._description_validator)] +PaperEnabledUsersGroupRemovalType._all_fields_ = [('description', PaperEnabledUsersGroupRemovalType.description.validator)] -PaperExternalViewAllowDetails._event_uuid_validator = bv.String() +PaperExternalViewAllowDetails.event_uuid.validator = bv.String() PaperExternalViewAllowDetails._all_field_names_ = set(['event_uuid']) -PaperExternalViewAllowDetails._all_fields_ = [('event_uuid', PaperExternalViewAllowDetails._event_uuid_validator)] +PaperExternalViewAllowDetails._all_fields_ = [('event_uuid', PaperExternalViewAllowDetails.event_uuid.validator)] -PaperExternalViewAllowType._description_validator = bv.String() +PaperExternalViewAllowType.description.validator = bv.String() PaperExternalViewAllowType._all_field_names_ = set(['description']) -PaperExternalViewAllowType._all_fields_ = [('description', PaperExternalViewAllowType._description_validator)] +PaperExternalViewAllowType._all_fields_ = [('description', PaperExternalViewAllowType.description.validator)] -PaperExternalViewDefaultTeamDetails._event_uuid_validator = bv.String() +PaperExternalViewDefaultTeamDetails.event_uuid.validator = bv.String() PaperExternalViewDefaultTeamDetails._all_field_names_ = set(['event_uuid']) -PaperExternalViewDefaultTeamDetails._all_fields_ = [('event_uuid', PaperExternalViewDefaultTeamDetails._event_uuid_validator)] +PaperExternalViewDefaultTeamDetails._all_fields_ = [('event_uuid', PaperExternalViewDefaultTeamDetails.event_uuid.validator)] -PaperExternalViewDefaultTeamType._description_validator = bv.String() +PaperExternalViewDefaultTeamType.description.validator = bv.String() PaperExternalViewDefaultTeamType._all_field_names_ = set(['description']) -PaperExternalViewDefaultTeamType._all_fields_ = [('description', PaperExternalViewDefaultTeamType._description_validator)] +PaperExternalViewDefaultTeamType._all_fields_ = [('description', PaperExternalViewDefaultTeamType.description.validator)] -PaperExternalViewForbidDetails._event_uuid_validator = bv.String() +PaperExternalViewForbidDetails.event_uuid.validator = bv.String() PaperExternalViewForbidDetails._all_field_names_ = set(['event_uuid']) -PaperExternalViewForbidDetails._all_fields_ = [('event_uuid', PaperExternalViewForbidDetails._event_uuid_validator)] +PaperExternalViewForbidDetails._all_fields_ = [('event_uuid', PaperExternalViewForbidDetails.event_uuid.validator)] -PaperExternalViewForbidType._description_validator = bv.String() +PaperExternalViewForbidType.description.validator = bv.String() PaperExternalViewForbidType._all_field_names_ = set(['description']) -PaperExternalViewForbidType._all_fields_ = [('description', PaperExternalViewForbidType._description_validator)] +PaperExternalViewForbidType._all_fields_ = [('description', PaperExternalViewForbidType.description.validator)] -PaperFolderChangeSubscriptionDetails._event_uuid_validator = bv.String() -PaperFolderChangeSubscriptionDetails._new_subscription_level_validator = bv.String() -PaperFolderChangeSubscriptionDetails._previous_subscription_level_validator = bv.Nullable(bv.String()) +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), + ('event_uuid', PaperFolderChangeSubscriptionDetails.event_uuid.validator), + ('new_subscription_level', PaperFolderChangeSubscriptionDetails.new_subscription_level.validator), + ('previous_subscription_level', PaperFolderChangeSubscriptionDetails.previous_subscription_level.validator), ] -PaperFolderChangeSubscriptionType._description_validator = bv.String() +PaperFolderChangeSubscriptionType.description.validator = bv.String() PaperFolderChangeSubscriptionType._all_field_names_ = set(['description']) -PaperFolderChangeSubscriptionType._all_fields_ = [('description', PaperFolderChangeSubscriptionType._description_validator)] +PaperFolderChangeSubscriptionType._all_fields_ = [('description', PaperFolderChangeSubscriptionType.description.validator)] -PaperFolderDeletedDetails._event_uuid_validator = bv.String() +PaperFolderDeletedDetails.event_uuid.validator = bv.String() PaperFolderDeletedDetails._all_field_names_ = set(['event_uuid']) -PaperFolderDeletedDetails._all_fields_ = [('event_uuid', PaperFolderDeletedDetails._event_uuid_validator)] +PaperFolderDeletedDetails._all_fields_ = [('event_uuid', PaperFolderDeletedDetails.event_uuid.validator)] -PaperFolderDeletedType._description_validator = bv.String() +PaperFolderDeletedType.description.validator = bv.String() PaperFolderDeletedType._all_field_names_ = set(['description']) -PaperFolderDeletedType._all_fields_ = [('description', PaperFolderDeletedType._description_validator)] +PaperFolderDeletedType._all_fields_ = [('description', PaperFolderDeletedType.description.validator)] -PaperFolderFollowedDetails._event_uuid_validator = bv.String() +PaperFolderFollowedDetails.event_uuid.validator = bv.String() PaperFolderFollowedDetails._all_field_names_ = set(['event_uuid']) -PaperFolderFollowedDetails._all_fields_ = [('event_uuid', PaperFolderFollowedDetails._event_uuid_validator)] +PaperFolderFollowedDetails._all_fields_ = [('event_uuid', PaperFolderFollowedDetails.event_uuid.validator)] -PaperFolderFollowedType._description_validator = bv.String() +PaperFolderFollowedType.description.validator = bv.String() PaperFolderFollowedType._all_field_names_ = set(['description']) -PaperFolderFollowedType._all_fields_ = [('description', PaperFolderFollowedType._description_validator)] +PaperFolderFollowedType._all_fields_ = [('description', PaperFolderFollowedType.description.validator)] -PaperFolderLogInfo._folder_id_validator = bv.String() -PaperFolderLogInfo._folder_name_validator = bv.String() +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), + ('folder_id', PaperFolderLogInfo.folder_id.validator), + ('folder_name', PaperFolderLogInfo.folder_name.validator), ] -PaperFolderTeamInviteDetails._event_uuid_validator = bv.String() +PaperFolderTeamInviteDetails.event_uuid.validator = bv.String() PaperFolderTeamInviteDetails._all_field_names_ = set(['event_uuid']) -PaperFolderTeamInviteDetails._all_fields_ = [('event_uuid', PaperFolderTeamInviteDetails._event_uuid_validator)] +PaperFolderTeamInviteDetails._all_fields_ = [('event_uuid', PaperFolderTeamInviteDetails.event_uuid.validator)] -PaperFolderTeamInviteType._description_validator = bv.String() +PaperFolderTeamInviteType.description.validator = bv.String() PaperFolderTeamInviteType._all_field_names_ = set(['description']) -PaperFolderTeamInviteType._all_fields_ = [('description', PaperFolderTeamInviteType._description_validator)] +PaperFolderTeamInviteType._all_fields_ = [('description', PaperFolderTeamInviteType.description.validator)] PaperMemberPolicy._anyone_with_link_validator = bv.Void() PaperMemberPolicy._only_team_validator = bv.Void() @@ -107668,47 +74638,47 @@ def __repr__(self): PaperMemberPolicy.team_and_explicitly_shared = PaperMemberPolicy('team_and_explicitly_shared') PaperMemberPolicy.other = PaperMemberPolicy('other') -PaperPublishedLinkChangePermissionDetails._event_uuid_validator = bv.String() -PaperPublishedLinkChangePermissionDetails._new_permission_level_validator = bv.String() -PaperPublishedLinkChangePermissionDetails._previous_permission_level_validator = bv.String() +PaperPublishedLinkChangePermissionDetails.event_uuid.validator = bv.String() +PaperPublishedLinkChangePermissionDetails.new_permission_level.validator = bv.String() +PaperPublishedLinkChangePermissionDetails.previous_permission_level.validator = bv.String() PaperPublishedLinkChangePermissionDetails._all_field_names_ = set([ 'event_uuid', 'new_permission_level', 'previous_permission_level', ]) PaperPublishedLinkChangePermissionDetails._all_fields_ = [ - ('event_uuid', PaperPublishedLinkChangePermissionDetails._event_uuid_validator), - ('new_permission_level', PaperPublishedLinkChangePermissionDetails._new_permission_level_validator), - ('previous_permission_level', PaperPublishedLinkChangePermissionDetails._previous_permission_level_validator), + ('event_uuid', PaperPublishedLinkChangePermissionDetails.event_uuid.validator), + ('new_permission_level', PaperPublishedLinkChangePermissionDetails.new_permission_level.validator), + ('previous_permission_level', PaperPublishedLinkChangePermissionDetails.previous_permission_level.validator), ] -PaperPublishedLinkChangePermissionType._description_validator = bv.String() +PaperPublishedLinkChangePermissionType.description.validator = bv.String() PaperPublishedLinkChangePermissionType._all_field_names_ = set(['description']) -PaperPublishedLinkChangePermissionType._all_fields_ = [('description', PaperPublishedLinkChangePermissionType._description_validator)] +PaperPublishedLinkChangePermissionType._all_fields_ = [('description', PaperPublishedLinkChangePermissionType.description.validator)] -PaperPublishedLinkCreateDetails._event_uuid_validator = bv.String() +PaperPublishedLinkCreateDetails.event_uuid.validator = bv.String() PaperPublishedLinkCreateDetails._all_field_names_ = set(['event_uuid']) -PaperPublishedLinkCreateDetails._all_fields_ = [('event_uuid', PaperPublishedLinkCreateDetails._event_uuid_validator)] +PaperPublishedLinkCreateDetails._all_fields_ = [('event_uuid', PaperPublishedLinkCreateDetails.event_uuid.validator)] -PaperPublishedLinkCreateType._description_validator = bv.String() +PaperPublishedLinkCreateType.description.validator = bv.String() PaperPublishedLinkCreateType._all_field_names_ = set(['description']) -PaperPublishedLinkCreateType._all_fields_ = [('description', PaperPublishedLinkCreateType._description_validator)] +PaperPublishedLinkCreateType._all_fields_ = [('description', PaperPublishedLinkCreateType.description.validator)] -PaperPublishedLinkDisabledDetails._event_uuid_validator = bv.String() +PaperPublishedLinkDisabledDetails.event_uuid.validator = bv.String() PaperPublishedLinkDisabledDetails._all_field_names_ = set(['event_uuid']) -PaperPublishedLinkDisabledDetails._all_fields_ = [('event_uuid', PaperPublishedLinkDisabledDetails._event_uuid_validator)] +PaperPublishedLinkDisabledDetails._all_fields_ = [('event_uuid', PaperPublishedLinkDisabledDetails.event_uuid.validator)] -PaperPublishedLinkDisabledType._description_validator = bv.String() +PaperPublishedLinkDisabledType.description.validator = bv.String() PaperPublishedLinkDisabledType._all_field_names_ = set(['description']) -PaperPublishedLinkDisabledType._all_fields_ = [('description', PaperPublishedLinkDisabledType._description_validator)] +PaperPublishedLinkDisabledType._all_fields_ = [('description', PaperPublishedLinkDisabledType.description.validator)] -PaperPublishedLinkViewDetails._event_uuid_validator = bv.String() +PaperPublishedLinkViewDetails.event_uuid.validator = bv.String() PaperPublishedLinkViewDetails._all_field_names_ = set(['event_uuid']) -PaperPublishedLinkViewDetails._all_fields_ = [('event_uuid', PaperPublishedLinkViewDetails._event_uuid_validator)] +PaperPublishedLinkViewDetails._all_fields_ = [('event_uuid', PaperPublishedLinkViewDetails.event_uuid.validator)] -PaperPublishedLinkViewType._description_validator = bv.String() +PaperPublishedLinkViewType.description.validator = bv.String() PaperPublishedLinkViewType._all_field_names_ = set(['description']) -PaperPublishedLinkViewType._all_fields_ = [('description', PaperPublishedLinkViewType._description_validator)] +PaperPublishedLinkViewType._all_fields_ = [('description', PaperPublishedLinkViewType.description.validator)] ParticipantLogInfo._group_validator = GroupLogInfo_validator ParticipantLogInfo._user_validator = UserLogInfo_validator @@ -107740,72 +74710,72 @@ def __repr__(self): PasswordChangeDetails._all_field_names_ = set([]) PasswordChangeDetails._all_fields_ = [] -PasswordChangeType._description_validator = bv.String() +PasswordChangeType.description.validator = bv.String() PasswordChangeType._all_field_names_ = set(['description']) -PasswordChangeType._all_fields_ = [('description', PasswordChangeType._description_validator)] +PasswordChangeType._all_fields_ = [('description', PasswordChangeType.description.validator)] PasswordResetAllDetails._all_field_names_ = set([]) PasswordResetAllDetails._all_fields_ = [] -PasswordResetAllType._description_validator = bv.String() +PasswordResetAllType.description.validator = bv.String() PasswordResetAllType._all_field_names_ = set(['description']) -PasswordResetAllType._all_fields_ = [('description', PasswordResetAllType._description_validator)] +PasswordResetAllType._all_fields_ = [('description', PasswordResetAllType.description.validator)] PasswordResetDetails._all_field_names_ = set([]) PasswordResetDetails._all_fields_ = [] -PasswordResetType._description_validator = bv.String() +PasswordResetType.description.validator = bv.String() PasswordResetType._all_field_names_ = set(['description']) -PasswordResetType._all_fields_ = [('description', PasswordResetType._description_validator)] +PasswordResetType._all_fields_ = [('description', PasswordResetType.description.validator)] -PasswordStrengthRequirementsChangePolicyDetails._previous_value_validator = team_policies.PasswordStrengthPolicy_validator -PasswordStrengthRequirementsChangePolicyDetails._new_value_validator = team_policies.PasswordStrengthPolicy_validator +PasswordStrengthRequirementsChangePolicyDetails.previous_value.validator = team_policies.PasswordStrengthPolicy_validator +PasswordStrengthRequirementsChangePolicyDetails.new_value.validator = team_policies.PasswordStrengthPolicy_validator PasswordStrengthRequirementsChangePolicyDetails._all_field_names_ = set([ 'previous_value', 'new_value', ]) PasswordStrengthRequirementsChangePolicyDetails._all_fields_ = [ - ('previous_value', PasswordStrengthRequirementsChangePolicyDetails._previous_value_validator), - ('new_value', PasswordStrengthRequirementsChangePolicyDetails._new_value_validator), + ('previous_value', PasswordStrengthRequirementsChangePolicyDetails.previous_value.validator), + ('new_value', PasswordStrengthRequirementsChangePolicyDetails.new_value.validator), ] -PasswordStrengthRequirementsChangePolicyType._description_validator = bv.String() +PasswordStrengthRequirementsChangePolicyType.description.validator = bv.String() PasswordStrengthRequirementsChangePolicyType._all_field_names_ = set(['description']) -PasswordStrengthRequirementsChangePolicyType._all_fields_ = [('description', PasswordStrengthRequirementsChangePolicyType._description_validator)] +PasswordStrengthRequirementsChangePolicyType._all_fields_ = [('description', PasswordStrengthRequirementsChangePolicyType.description.validator)] -PathLogInfo._contextual_validator = bv.Nullable(FilePath_validator) -PathLogInfo._namespace_relative_validator = NamespaceRelativePathLogInfo_validator +PathLogInfo.contextual.validator = bv.Nullable(FilePath_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), + ('contextual', PathLogInfo.contextual.validator), + ('namespace_relative', PathLogInfo.namespace_relative.validator), ] -PendingSecondaryEmailAddedDetails._secondary_email_validator = EmailAddress_validator +PendingSecondaryEmailAddedDetails.secondary_email.validator = EmailAddress_validator PendingSecondaryEmailAddedDetails._all_field_names_ = set(['secondary_email']) -PendingSecondaryEmailAddedDetails._all_fields_ = [('secondary_email', PendingSecondaryEmailAddedDetails._secondary_email_validator)] +PendingSecondaryEmailAddedDetails._all_fields_ = [('secondary_email', PendingSecondaryEmailAddedDetails.secondary_email.validator)] -PendingSecondaryEmailAddedType._description_validator = bv.String() +PendingSecondaryEmailAddedType.description.validator = bv.String() PendingSecondaryEmailAddedType._all_field_names_ = set(['description']) -PendingSecondaryEmailAddedType._all_fields_ = [('description', PendingSecondaryEmailAddedType._description_validator)] +PendingSecondaryEmailAddedType._all_fields_ = [('description', PendingSecondaryEmailAddedType.description.validator)] -PermanentDeleteChangePolicyDetails._new_value_validator = ContentPermanentDeletePolicy_validator -PermanentDeleteChangePolicyDetails._previous_value_validator = bv.Nullable(ContentPermanentDeletePolicy_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), + ('new_value', PermanentDeleteChangePolicyDetails.new_value.validator), + ('previous_value', PermanentDeleteChangePolicyDetails.previous_value.validator), ] -PermanentDeleteChangePolicyType._description_validator = bv.String() +PermanentDeleteChangePolicyType.description.validator = bv.String() PermanentDeleteChangePolicyType._all_field_names_ = set(['description']) -PermanentDeleteChangePolicyType._all_fields_ = [('description', PermanentDeleteChangePolicyType._description_validator)] +PermanentDeleteChangePolicyType._all_fields_ = [('description', PermanentDeleteChangePolicyType.description.validator)] PlacementRestriction._australia_only_validator = bv.Void() PlacementRestriction._europe_only_validator = bv.Void() @@ -107836,48 +74806,48 @@ def __repr__(self): PolicyType.retention = PolicyType('retention') PolicyType.other = PolicyType('other') -PrimaryTeamRequestAcceptedDetails._secondary_team_validator = bv.String() -PrimaryTeamRequestAcceptedDetails._sent_by_validator = bv.String() +PrimaryTeamRequestAcceptedDetails.secondary_team.validator = bv.String() +PrimaryTeamRequestAcceptedDetails.sent_by.validator = bv.String() PrimaryTeamRequestAcceptedDetails._all_field_names_ = set([ 'secondary_team', 'sent_by', ]) PrimaryTeamRequestAcceptedDetails._all_fields_ = [ - ('secondary_team', PrimaryTeamRequestAcceptedDetails._secondary_team_validator), - ('sent_by', PrimaryTeamRequestAcceptedDetails._sent_by_validator), + ('secondary_team', PrimaryTeamRequestAcceptedDetails.secondary_team.validator), + ('sent_by', PrimaryTeamRequestAcceptedDetails.sent_by.validator), ] -PrimaryTeamRequestCanceledDetails._secondary_team_validator = bv.String() -PrimaryTeamRequestCanceledDetails._sent_by_validator = bv.String() +PrimaryTeamRequestCanceledDetails.secondary_team.validator = bv.String() +PrimaryTeamRequestCanceledDetails.sent_by.validator = bv.String() PrimaryTeamRequestCanceledDetails._all_field_names_ = set([ 'secondary_team', 'sent_by', ]) PrimaryTeamRequestCanceledDetails._all_fields_ = [ - ('secondary_team', PrimaryTeamRequestCanceledDetails._secondary_team_validator), - ('sent_by', PrimaryTeamRequestCanceledDetails._sent_by_validator), + ('secondary_team', PrimaryTeamRequestCanceledDetails.secondary_team.validator), + ('sent_by', PrimaryTeamRequestCanceledDetails.sent_by.validator), ] -PrimaryTeamRequestExpiredDetails._secondary_team_validator = bv.String() -PrimaryTeamRequestExpiredDetails._sent_by_validator = bv.String() +PrimaryTeamRequestExpiredDetails.secondary_team.validator = bv.String() +PrimaryTeamRequestExpiredDetails.sent_by.validator = bv.String() PrimaryTeamRequestExpiredDetails._all_field_names_ = set([ 'secondary_team', 'sent_by', ]) PrimaryTeamRequestExpiredDetails._all_fields_ = [ - ('secondary_team', PrimaryTeamRequestExpiredDetails._secondary_team_validator), - ('sent_by', PrimaryTeamRequestExpiredDetails._sent_by_validator), + ('secondary_team', PrimaryTeamRequestExpiredDetails.secondary_team.validator), + ('sent_by', PrimaryTeamRequestExpiredDetails.sent_by.validator), ] -PrimaryTeamRequestReminderDetails._secondary_team_validator = bv.String() -PrimaryTeamRequestReminderDetails._sent_to_validator = bv.String() +PrimaryTeamRequestReminderDetails.secondary_team.validator = bv.String() +PrimaryTeamRequestReminderDetails.sent_to.validator = bv.String() PrimaryTeamRequestReminderDetails._all_field_names_ = set([ 'secondary_team', 'sent_to', ]) PrimaryTeamRequestReminderDetails._all_fields_ = [ - ('secondary_team', PrimaryTeamRequestReminderDetails._secondary_team_validator), - ('sent_to', PrimaryTeamRequestReminderDetails._sent_to_validator), + ('secondary_team', PrimaryTeamRequestReminderDetails.secondary_team.validator), + ('sent_to', PrimaryTeamRequestReminderDetails.sent_to.validator), ] QuickActionType._delete_shared_link_validator = bv.Void() @@ -107905,26 +74875,26 @@ def __repr__(self): QuickActionType.unlink_session = QuickActionType('unlink_session') QuickActionType.other = QuickActionType('other') -RelocateAssetReferencesLogInfo._src_asset_index_validator = bv.UInt64() -RelocateAssetReferencesLogInfo._dest_asset_index_validator = bv.UInt64() +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), + ('src_asset_index', RelocateAssetReferencesLogInfo.src_asset_index.validator), + ('dest_asset_index', RelocateAssetReferencesLogInfo.dest_asset_index.validator), ] -ResellerLogInfo._reseller_name_validator = bv.String() -ResellerLogInfo._reseller_email_validator = EmailAddress_validator +ResellerLogInfo.reseller_name.validator = bv.String() +ResellerLogInfo.reseller_email.validator = EmailAddress_validator ResellerLogInfo._all_field_names_ = set([ 'reseller_name', 'reseller_email', ]) ResellerLogInfo._all_fields_ = [ - ('reseller_name', ResellerLogInfo._reseller_name_validator), - ('reseller_email', ResellerLogInfo._reseller_email_validator), + ('reseller_name', ResellerLogInfo.reseller_name.validator), + ('reseller_email', ResellerLogInfo.reseller_email.validator), ] ResellerRole._not_reseller_validator = bv.Void() @@ -107940,20 +74910,20 @@ def __repr__(self): ResellerRole.reseller_admin = ResellerRole('reseller_admin') ResellerRole.other = ResellerRole('other') -ResellerSupportChangePolicyDetails._new_value_validator = ResellerSupportPolicy_validator -ResellerSupportChangePolicyDetails._previous_value_validator = ResellerSupportPolicy_validator +ResellerSupportChangePolicyDetails.new_value.validator = ResellerSupportPolicy_validator +ResellerSupportChangePolicyDetails.previous_value.validator = ResellerSupportPolicy_validator ResellerSupportChangePolicyDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) ResellerSupportChangePolicyDetails._all_fields_ = [ - ('new_value', ResellerSupportChangePolicyDetails._new_value_validator), - ('previous_value', ResellerSupportChangePolicyDetails._previous_value_validator), + ('new_value', ResellerSupportChangePolicyDetails.new_value.validator), + ('previous_value', ResellerSupportChangePolicyDetails.previous_value.validator), ] -ResellerSupportChangePolicyType._description_validator = bv.String() +ResellerSupportChangePolicyType.description.validator = bv.String() ResellerSupportChangePolicyType._all_field_names_ = set(['description']) -ResellerSupportChangePolicyType._all_fields_ = [('description', ResellerSupportChangePolicyType._description_validator)] +ResellerSupportChangePolicyType._all_fields_ = [('description', ResellerSupportChangePolicyType.description.validator)] ResellerSupportPolicy._disabled_validator = bv.Void() ResellerSupportPolicy._enabled_validator = bv.Void() @@ -107971,24 +74941,24 @@ def __repr__(self): ResellerSupportSessionEndDetails._all_field_names_ = set([]) ResellerSupportSessionEndDetails._all_fields_ = [] -ResellerSupportSessionEndType._description_validator = bv.String() +ResellerSupportSessionEndType.description.validator = bv.String() ResellerSupportSessionEndType._all_field_names_ = set(['description']) -ResellerSupportSessionEndType._all_fields_ = [('description', ResellerSupportSessionEndType._description_validator)] +ResellerSupportSessionEndType._all_fields_ = [('description', ResellerSupportSessionEndType.description.validator)] ResellerSupportSessionStartDetails._all_field_names_ = set([]) ResellerSupportSessionStartDetails._all_fields_ = [] -ResellerSupportSessionStartType._description_validator = bv.String() +ResellerSupportSessionStartType.description.validator = bv.String() ResellerSupportSessionStartType._all_field_names_ = set(['description']) -ResellerSupportSessionStartType._all_fields_ = [('description', ResellerSupportSessionStartType._description_validator)] +ResellerSupportSessionStartType._all_fields_ = [('description', ResellerSupportSessionStartType.description.validator)] -RewindFolderDetails._rewind_folder_target_ts_ms_validator = common.DropboxTimestamp_validator +RewindFolderDetails.rewind_folder_target_ts_ms.validator = common.DropboxTimestamp_validator RewindFolderDetails._all_field_names_ = set(['rewind_folder_target_ts_ms']) -RewindFolderDetails._all_fields_ = [('rewind_folder_target_ts_ms', RewindFolderDetails._rewind_folder_target_ts_ms_validator)] +RewindFolderDetails._all_fields_ = [('rewind_folder_target_ts_ms', RewindFolderDetails.rewind_folder_target_ts_ms.validator)] -RewindFolderType._description_validator = bv.String() +RewindFolderType.description.validator = bv.String() RewindFolderType._all_field_names_ = set(['description']) -RewindFolderType._all_fields_ = [('description', RewindFolderType._description_validator)] +RewindFolderType._all_fields_ = [('description', RewindFolderType.description.validator)] RewindPolicy._admins_only_validator = bv.Void() RewindPolicy._everyone_validator = bv.Void() @@ -108003,36 +74973,36 @@ def __repr__(self): RewindPolicy.everyone = RewindPolicy('everyone') RewindPolicy.other = RewindPolicy('other') -RewindPolicyChangedDetails._new_value_validator = RewindPolicy_validator -RewindPolicyChangedDetails._previous_value_validator = RewindPolicy_validator +RewindPolicyChangedDetails.new_value.validator = RewindPolicy_validator +RewindPolicyChangedDetails.previous_value.validator = RewindPolicy_validator RewindPolicyChangedDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) RewindPolicyChangedDetails._all_fields_ = [ - ('new_value', RewindPolicyChangedDetails._new_value_validator), - ('previous_value', RewindPolicyChangedDetails._previous_value_validator), + ('new_value', RewindPolicyChangedDetails.new_value.validator), + ('previous_value', RewindPolicyChangedDetails.previous_value.validator), ] -RewindPolicyChangedType._description_validator = bv.String() +RewindPolicyChangedType.description.validator = bv.String() RewindPolicyChangedType._all_field_names_ = set(['description']) -RewindPolicyChangedType._all_fields_ = [('description', RewindPolicyChangedType._description_validator)] +RewindPolicyChangedType._all_fields_ = [('description', RewindPolicyChangedType.description.validator)] -SecondaryEmailDeletedDetails._secondary_email_validator = EmailAddress_validator +SecondaryEmailDeletedDetails.secondary_email.validator = EmailAddress_validator SecondaryEmailDeletedDetails._all_field_names_ = set(['secondary_email']) -SecondaryEmailDeletedDetails._all_fields_ = [('secondary_email', SecondaryEmailDeletedDetails._secondary_email_validator)] +SecondaryEmailDeletedDetails._all_fields_ = [('secondary_email', SecondaryEmailDeletedDetails.secondary_email.validator)] -SecondaryEmailDeletedType._description_validator = bv.String() +SecondaryEmailDeletedType.description.validator = bv.String() SecondaryEmailDeletedType._all_field_names_ = set(['description']) -SecondaryEmailDeletedType._all_fields_ = [('description', SecondaryEmailDeletedType._description_validator)] +SecondaryEmailDeletedType._all_fields_ = [('description', SecondaryEmailDeletedType.description.validator)] -SecondaryEmailVerifiedDetails._secondary_email_validator = EmailAddress_validator +SecondaryEmailVerifiedDetails.secondary_email.validator = EmailAddress_validator SecondaryEmailVerifiedDetails._all_field_names_ = set(['secondary_email']) -SecondaryEmailVerifiedDetails._all_fields_ = [('secondary_email', SecondaryEmailVerifiedDetails._secondary_email_validator)] +SecondaryEmailVerifiedDetails._all_fields_ = [('secondary_email', SecondaryEmailVerifiedDetails.secondary_email.validator)] -SecondaryEmailVerifiedType._description_validator = bv.String() +SecondaryEmailVerifiedType.description.validator = bv.String() SecondaryEmailVerifiedType._all_field_names_ = set(['description']) -SecondaryEmailVerifiedType._all_fields_ = [('description', SecondaryEmailVerifiedType._description_validator)] +SecondaryEmailVerifiedType._all_fields_ = [('description', SecondaryEmailVerifiedType.description.validator)] SecondaryMailsPolicy._disabled_validator = bv.Void() SecondaryMailsPolicy._enabled_validator = bv.Void() @@ -108047,50 +75017,50 @@ def __repr__(self): SecondaryMailsPolicy.enabled = SecondaryMailsPolicy('enabled') SecondaryMailsPolicy.other = SecondaryMailsPolicy('other') -SecondaryMailsPolicyChangedDetails._previous_value_validator = SecondaryMailsPolicy_validator -SecondaryMailsPolicyChangedDetails._new_value_validator = SecondaryMailsPolicy_validator +SecondaryMailsPolicyChangedDetails.previous_value.validator = SecondaryMailsPolicy_validator +SecondaryMailsPolicyChangedDetails.new_value.validator = SecondaryMailsPolicy_validator SecondaryMailsPolicyChangedDetails._all_field_names_ = set([ 'previous_value', 'new_value', ]) SecondaryMailsPolicyChangedDetails._all_fields_ = [ - ('previous_value', SecondaryMailsPolicyChangedDetails._previous_value_validator), - ('new_value', SecondaryMailsPolicyChangedDetails._new_value_validator), + ('previous_value', SecondaryMailsPolicyChangedDetails.previous_value.validator), + ('new_value', SecondaryMailsPolicyChangedDetails.new_value.validator), ] -SecondaryMailsPolicyChangedType._description_validator = bv.String() +SecondaryMailsPolicyChangedType.description.validator = bv.String() SecondaryMailsPolicyChangedType._all_field_names_ = set(['description']) -SecondaryMailsPolicyChangedType._all_fields_ = [('description', SecondaryMailsPolicyChangedType._description_validator)] +SecondaryMailsPolicyChangedType._all_fields_ = [('description', SecondaryMailsPolicyChangedType.description.validator)] -SecondaryTeamRequestAcceptedDetails._primary_team_validator = bv.String() -SecondaryTeamRequestAcceptedDetails._sent_by_validator = bv.String() +SecondaryTeamRequestAcceptedDetails.primary_team.validator = bv.String() +SecondaryTeamRequestAcceptedDetails.sent_by.validator = bv.String() SecondaryTeamRequestAcceptedDetails._all_field_names_ = set([ 'primary_team', 'sent_by', ]) SecondaryTeamRequestAcceptedDetails._all_fields_ = [ - ('primary_team', SecondaryTeamRequestAcceptedDetails._primary_team_validator), - ('sent_by', SecondaryTeamRequestAcceptedDetails._sent_by_validator), + ('primary_team', SecondaryTeamRequestAcceptedDetails.primary_team.validator), + ('sent_by', SecondaryTeamRequestAcceptedDetails.sent_by.validator), ] -SecondaryTeamRequestCanceledDetails._sent_to_validator = bv.String() -SecondaryTeamRequestCanceledDetails._sent_by_validator = bv.String() +SecondaryTeamRequestCanceledDetails.sent_to.validator = bv.String() +SecondaryTeamRequestCanceledDetails.sent_by.validator = bv.String() SecondaryTeamRequestCanceledDetails._all_field_names_ = set([ 'sent_to', 'sent_by', ]) SecondaryTeamRequestCanceledDetails._all_fields_ = [ - ('sent_to', SecondaryTeamRequestCanceledDetails._sent_to_validator), - ('sent_by', SecondaryTeamRequestCanceledDetails._sent_by_validator), + ('sent_to', SecondaryTeamRequestCanceledDetails.sent_to.validator), + ('sent_by', SecondaryTeamRequestCanceledDetails.sent_by.validator), ] -SecondaryTeamRequestExpiredDetails._sent_to_validator = bv.String() +SecondaryTeamRequestExpiredDetails.sent_to.validator = bv.String() SecondaryTeamRequestExpiredDetails._all_field_names_ = set(['sent_to']) -SecondaryTeamRequestExpiredDetails._all_fields_ = [('sent_to', SecondaryTeamRequestExpiredDetails._sent_to_validator)] +SecondaryTeamRequestExpiredDetails._all_fields_ = [('sent_to', SecondaryTeamRequestExpiredDetails.sent_to.validator)] -SecondaryTeamRequestReminderDetails._sent_to_validator = bv.String() +SecondaryTeamRequestReminderDetails.sent_to.validator = bv.String() SecondaryTeamRequestReminderDetails._all_field_names_ = set(['sent_to']) -SecondaryTeamRequestReminderDetails._all_fields_ = [('sent_to', SecondaryTeamRequestReminderDetails._sent_to_validator)] +SecondaryTeamRequestReminderDetails._all_fields_ = [('sent_to', SecondaryTeamRequestReminderDetails.sent_to.validator)] SendForSignaturePolicy._disabled_validator = bv.Void() SendForSignaturePolicy._enabled_validator = bv.Void() @@ -108105,25 +75075,25 @@ def __repr__(self): SendForSignaturePolicy.enabled = SendForSignaturePolicy('enabled') SendForSignaturePolicy.other = SendForSignaturePolicy('other') -SendForSignaturePolicyChangedDetails._new_value_validator = SendForSignaturePolicy_validator -SendForSignaturePolicyChangedDetails._previous_value_validator = SendForSignaturePolicy_validator +SendForSignaturePolicyChangedDetails.new_value.validator = SendForSignaturePolicy_validator +SendForSignaturePolicyChangedDetails.previous_value.validator = SendForSignaturePolicy_validator SendForSignaturePolicyChangedDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) SendForSignaturePolicyChangedDetails._all_fields_ = [ - ('new_value', SendForSignaturePolicyChangedDetails._new_value_validator), - ('previous_value', SendForSignaturePolicyChangedDetails._previous_value_validator), + ('new_value', SendForSignaturePolicyChangedDetails.new_value.validator), + ('previous_value', SendForSignaturePolicyChangedDetails.previous_value.validator), ] -SendForSignaturePolicyChangedType._description_validator = bv.String() +SendForSignaturePolicyChangedType.description.validator = bv.String() SendForSignaturePolicyChangedType._all_field_names_ = set(['description']) -SendForSignaturePolicyChangedType._all_fields_ = [('description', SendForSignaturePolicyChangedType._description_validator)] +SendForSignaturePolicyChangedType._all_fields_ = [('description', SendForSignaturePolicyChangedType.description.validator)] -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.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', @@ -108131,38 +75101,38 @@ def __repr__(self): '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), + ('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), ] -SfAddGroupType._description_validator = bv.String() +SfAddGroupType.description.validator = bv.String() SfAddGroupType._all_field_names_ = set(['description']) -SfAddGroupType._all_fields_ = [('description', SfAddGroupType._description_validator)] +SfAddGroupType._all_fields_ = [('description', SfAddGroupType.description.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.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), + ('target_asset_index', SfAllowNonMembersToViewSharedLinksDetails.target_asset_index.validator), + ('original_folder_name', SfAllowNonMembersToViewSharedLinksDetails.original_folder_name.validator), + ('shared_folder_type', SfAllowNonMembersToViewSharedLinksDetails.shared_folder_type.validator), ] -SfAllowNonMembersToViewSharedLinksType._description_validator = bv.String() +SfAllowNonMembersToViewSharedLinksType.description.validator = bv.String() SfAllowNonMembersToViewSharedLinksType._all_field_names_ = set(['description']) -SfAllowNonMembersToViewSharedLinksType._all_fields_ = [('description', SfAllowNonMembersToViewSharedLinksType._description_validator)] +SfAllowNonMembersToViewSharedLinksType._all_fields_ = [('description', SfAllowNonMembersToViewSharedLinksType.description.validator)] -SfExternalInviteWarnDetails._target_asset_index_validator = bv.UInt64() -SfExternalInviteWarnDetails._original_folder_name_validator = bv.String() -SfExternalInviteWarnDetails._new_sharing_permission_validator = bv.Nullable(bv.String()) -SfExternalInviteWarnDetails._previous_sharing_permission_validator = bv.Nullable(bv.String()) +SfExternalInviteWarnDetails.target_asset_index.validator = bv.UInt64() +SfExternalInviteWarnDetails.original_folder_name.validator = bv.String() +SfExternalInviteWarnDetails.new_sharing_permission.validator = bv.Nullable(bv.String()) +SfExternalInviteWarnDetails.previous_sharing_permission.validator = bv.Nullable(bv.String()) SfExternalInviteWarnDetails._all_field_names_ = set([ 'target_asset_index', 'original_folder_name', @@ -108170,20 +75140,20 @@ def __repr__(self): 'previous_sharing_permission', ]) SfExternalInviteWarnDetails._all_fields_ = [ - ('target_asset_index', SfExternalInviteWarnDetails._target_asset_index_validator), - ('original_folder_name', SfExternalInviteWarnDetails._original_folder_name_validator), - ('new_sharing_permission', SfExternalInviteWarnDetails._new_sharing_permission_validator), - ('previous_sharing_permission', SfExternalInviteWarnDetails._previous_sharing_permission_validator), + ('target_asset_index', SfExternalInviteWarnDetails.target_asset_index.validator), + ('original_folder_name', SfExternalInviteWarnDetails.original_folder_name.validator), + ('new_sharing_permission', SfExternalInviteWarnDetails.new_sharing_permission.validator), + ('previous_sharing_permission', SfExternalInviteWarnDetails.previous_sharing_permission.validator), ] -SfExternalInviteWarnType._description_validator = bv.String() +SfExternalInviteWarnType.description.validator = bv.String() SfExternalInviteWarnType._all_field_names_ = set(['description']) -SfExternalInviteWarnType._all_fields_ = [('description', SfExternalInviteWarnType._description_validator)] +SfExternalInviteWarnType._all_fields_ = [('description', SfExternalInviteWarnType.description.validator)] -SfFbInviteChangeRoleDetails._target_asset_index_validator = bv.UInt64() -SfFbInviteChangeRoleDetails._original_folder_name_validator = bv.String() -SfFbInviteChangeRoleDetails._previous_sharing_permission_validator = bv.Nullable(bv.String()) -SfFbInviteChangeRoleDetails._new_sharing_permission_validator = bv.Nullable(bv.String()) +SfFbInviteChangeRoleDetails.target_asset_index.validator = bv.UInt64() +SfFbInviteChangeRoleDetails.original_folder_name.validator = bv.String() +SfFbInviteChangeRoleDetails.previous_sharing_permission.validator = bv.Nullable(bv.String()) +SfFbInviteChangeRoleDetails.new_sharing_permission.validator = bv.Nullable(bv.String()) SfFbInviteChangeRoleDetails._all_field_names_ = set([ 'target_asset_index', 'original_folder_name', @@ -108191,76 +75161,76 @@ def __repr__(self): 'new_sharing_permission', ]) SfFbInviteChangeRoleDetails._all_fields_ = [ - ('target_asset_index', SfFbInviteChangeRoleDetails._target_asset_index_validator), - ('original_folder_name', SfFbInviteChangeRoleDetails._original_folder_name_validator), - ('previous_sharing_permission', SfFbInviteChangeRoleDetails._previous_sharing_permission_validator), - ('new_sharing_permission', SfFbInviteChangeRoleDetails._new_sharing_permission_validator), + ('target_asset_index', SfFbInviteChangeRoleDetails.target_asset_index.validator), + ('original_folder_name', SfFbInviteChangeRoleDetails.original_folder_name.validator), + ('previous_sharing_permission', SfFbInviteChangeRoleDetails.previous_sharing_permission.validator), + ('new_sharing_permission', SfFbInviteChangeRoleDetails.new_sharing_permission.validator), ] -SfFbInviteChangeRoleType._description_validator = bv.String() +SfFbInviteChangeRoleType.description.validator = bv.String() SfFbInviteChangeRoleType._all_field_names_ = set(['description']) -SfFbInviteChangeRoleType._all_fields_ = [('description', SfFbInviteChangeRoleType._description_validator)] +SfFbInviteChangeRoleType._all_fields_ = [('description', SfFbInviteChangeRoleType.description.validator)] -SfFbInviteDetails._target_asset_index_validator = bv.UInt64() -SfFbInviteDetails._original_folder_name_validator = bv.String() -SfFbInviteDetails._sharing_permission_validator = bv.Nullable(bv.String()) +SfFbInviteDetails.target_asset_index.validator = bv.UInt64() +SfFbInviteDetails.original_folder_name.validator = bv.String() +SfFbInviteDetails.sharing_permission.validator = bv.Nullable(bv.String()) SfFbInviteDetails._all_field_names_ = set([ 'target_asset_index', 'original_folder_name', 'sharing_permission', ]) SfFbInviteDetails._all_fields_ = [ - ('target_asset_index', SfFbInviteDetails._target_asset_index_validator), - ('original_folder_name', SfFbInviteDetails._original_folder_name_validator), - ('sharing_permission', SfFbInviteDetails._sharing_permission_validator), + ('target_asset_index', SfFbInviteDetails.target_asset_index.validator), + ('original_folder_name', SfFbInviteDetails.original_folder_name.validator), + ('sharing_permission', SfFbInviteDetails.sharing_permission.validator), ] -SfFbInviteType._description_validator = bv.String() +SfFbInviteType.description.validator = bv.String() SfFbInviteType._all_field_names_ = set(['description']) -SfFbInviteType._all_fields_ = [('description', SfFbInviteType._description_validator)] +SfFbInviteType._all_fields_ = [('description', SfFbInviteType.description.validator)] -SfFbUninviteDetails._target_asset_index_validator = bv.UInt64() -SfFbUninviteDetails._original_folder_name_validator = bv.String() +SfFbUninviteDetails.target_asset_index.validator = bv.UInt64() +SfFbUninviteDetails.original_folder_name.validator = bv.String() SfFbUninviteDetails._all_field_names_ = set([ 'target_asset_index', 'original_folder_name', ]) SfFbUninviteDetails._all_fields_ = [ - ('target_asset_index', SfFbUninviteDetails._target_asset_index_validator), - ('original_folder_name', SfFbUninviteDetails._original_folder_name_validator), + ('target_asset_index', SfFbUninviteDetails.target_asset_index.validator), + ('original_folder_name', SfFbUninviteDetails.original_folder_name.validator), ] -SfFbUninviteType._description_validator = bv.String() +SfFbUninviteType.description.validator = bv.String() SfFbUninviteType._all_field_names_ = set(['description']) -SfFbUninviteType._all_fields_ = [('description', SfFbUninviteType._description_validator)] +SfFbUninviteType._all_fields_ = [('description', SfFbUninviteType.description.validator)] -SfInviteGroupDetails._target_asset_index_validator = bv.UInt64() +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)] +SfInviteGroupDetails._all_fields_ = [('target_asset_index', SfInviteGroupDetails.target_asset_index.validator)] -SfInviteGroupType._description_validator = bv.String() +SfInviteGroupType.description.validator = bv.String() SfInviteGroupType._all_field_names_ = set(['description']) -SfInviteGroupType._all_fields_ = [('description', SfInviteGroupType._description_validator)] +SfInviteGroupType._all_fields_ = [('description', SfInviteGroupType.description.validator)] -SfTeamGrantAccessDetails._target_asset_index_validator = bv.UInt64() -SfTeamGrantAccessDetails._original_folder_name_validator = bv.String() +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), + ('target_asset_index', SfTeamGrantAccessDetails.target_asset_index.validator), + ('original_folder_name', SfTeamGrantAccessDetails.original_folder_name.validator), ] -SfTeamGrantAccessType._description_validator = bv.String() +SfTeamGrantAccessType.description.validator = bv.String() SfTeamGrantAccessType._all_field_names_ = set(['description']) -SfTeamGrantAccessType._all_fields_ = [('description', SfTeamGrantAccessType._description_validator)] +SfTeamGrantAccessType._all_fields_ = [('description', SfTeamGrantAccessType.description.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.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', @@ -108268,49 +75238,49 @@ def __repr__(self): '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), + ('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), ] -SfTeamInviteChangeRoleType._description_validator = bv.String() +SfTeamInviteChangeRoleType.description.validator = bv.String() SfTeamInviteChangeRoleType._all_field_names_ = set(['description']) -SfTeamInviteChangeRoleType._all_fields_ = [('description', SfTeamInviteChangeRoleType._description_validator)] +SfTeamInviteChangeRoleType._all_fields_ = [('description', SfTeamInviteChangeRoleType.description.validator)] -SfTeamInviteDetails._target_asset_index_validator = bv.UInt64() -SfTeamInviteDetails._original_folder_name_validator = bv.String() -SfTeamInviteDetails._sharing_permission_validator = bv.Nullable(bv.String()) +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), + ('target_asset_index', SfTeamInviteDetails.target_asset_index.validator), + ('original_folder_name', SfTeamInviteDetails.original_folder_name.validator), + ('sharing_permission', SfTeamInviteDetails.sharing_permission.validator), ] -SfTeamInviteType._description_validator = bv.String() +SfTeamInviteType.description.validator = bv.String() SfTeamInviteType._all_field_names_ = set(['description']) -SfTeamInviteType._all_fields_ = [('description', SfTeamInviteType._description_validator)] +SfTeamInviteType._all_fields_ = [('description', SfTeamInviteType.description.validator)] -SfTeamJoinDetails._target_asset_index_validator = bv.UInt64() -SfTeamJoinDetails._original_folder_name_validator = bv.String() +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), + ('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.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', @@ -108318,185 +75288,185 @@ def __repr__(self): '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), + ('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), ] -SfTeamJoinFromOobLinkType._description_validator = bv.String() +SfTeamJoinFromOobLinkType.description.validator = bv.String() SfTeamJoinFromOobLinkType._all_field_names_ = set(['description']) -SfTeamJoinFromOobLinkType._all_fields_ = [('description', SfTeamJoinFromOobLinkType._description_validator)] +SfTeamJoinFromOobLinkType._all_fields_ = [('description', SfTeamJoinFromOobLinkType.description.validator)] -SfTeamJoinType._description_validator = bv.String() +SfTeamJoinType.description.validator = bv.String() SfTeamJoinType._all_field_names_ = set(['description']) -SfTeamJoinType._all_fields_ = [('description', SfTeamJoinType._description_validator)] +SfTeamJoinType._all_fields_ = [('description', SfTeamJoinType.description.validator)] -SfTeamUninviteDetails._target_asset_index_validator = bv.UInt64() -SfTeamUninviteDetails._original_folder_name_validator = bv.String() +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), + ('target_asset_index', SfTeamUninviteDetails.target_asset_index.validator), + ('original_folder_name', SfTeamUninviteDetails.original_folder_name.validator), ] -SfTeamUninviteType._description_validator = bv.String() +SfTeamUninviteType.description.validator = bv.String() SfTeamUninviteType._all_field_names_ = set(['description']) -SfTeamUninviteType._all_fields_ = [('description', SfTeamUninviteType._description_validator)] +SfTeamUninviteType._all_fields_ = [('description', SfTeamUninviteType.description.validator)] -SharedContentAddInviteesDetails._shared_content_access_level_validator = sharing.AccessLevel_validator -SharedContentAddInviteesDetails._invitees_validator = bv.List(EmailAddress_validator) +SharedContentAddInviteesDetails.shared_content_access_level.validator = sharing.AccessLevel_validator +SharedContentAddInviteesDetails.invitees.validator = bv.List(EmailAddress_validator) SharedContentAddInviteesDetails._all_field_names_ = set([ 'shared_content_access_level', 'invitees', ]) SharedContentAddInviteesDetails._all_fields_ = [ - ('shared_content_access_level', SharedContentAddInviteesDetails._shared_content_access_level_validator), - ('invitees', SharedContentAddInviteesDetails._invitees_validator), + ('shared_content_access_level', SharedContentAddInviteesDetails.shared_content_access_level.validator), + ('invitees', SharedContentAddInviteesDetails.invitees.validator), ] -SharedContentAddInviteesType._description_validator = bv.String() +SharedContentAddInviteesType.description.validator = bv.String() SharedContentAddInviteesType._all_field_names_ = set(['description']) -SharedContentAddInviteesType._all_fields_ = [('description', SharedContentAddInviteesType._description_validator)] +SharedContentAddInviteesType._all_fields_ = [('description', SharedContentAddInviteesType.description.validator)] -SharedContentAddLinkExpiryDetails._new_value_validator = bv.Nullable(common.DropboxTimestamp_validator) +SharedContentAddLinkExpiryDetails.new_value.validator = bv.Nullable(common.DropboxTimestamp_validator) SharedContentAddLinkExpiryDetails._all_field_names_ = set(['new_value']) -SharedContentAddLinkExpiryDetails._all_fields_ = [('new_value', SharedContentAddLinkExpiryDetails._new_value_validator)] +SharedContentAddLinkExpiryDetails._all_fields_ = [('new_value', SharedContentAddLinkExpiryDetails.new_value.validator)] -SharedContentAddLinkExpiryType._description_validator = bv.String() +SharedContentAddLinkExpiryType.description.validator = bv.String() SharedContentAddLinkExpiryType._all_field_names_ = set(['description']) -SharedContentAddLinkExpiryType._all_fields_ = [('description', SharedContentAddLinkExpiryType._description_validator)] +SharedContentAddLinkExpiryType._all_fields_ = [('description', SharedContentAddLinkExpiryType.description.validator)] SharedContentAddLinkPasswordDetails._all_field_names_ = set([]) SharedContentAddLinkPasswordDetails._all_fields_ = [] -SharedContentAddLinkPasswordType._description_validator = bv.String() +SharedContentAddLinkPasswordType.description.validator = bv.String() SharedContentAddLinkPasswordType._all_field_names_ = set(['description']) -SharedContentAddLinkPasswordType._all_fields_ = [('description', SharedContentAddLinkPasswordType._description_validator)] +SharedContentAddLinkPasswordType._all_fields_ = [('description', SharedContentAddLinkPasswordType.description.validator)] -SharedContentAddMemberDetails._shared_content_access_level_validator = sharing.AccessLevel_validator +SharedContentAddMemberDetails.shared_content_access_level.validator = sharing.AccessLevel_validator SharedContentAddMemberDetails._all_field_names_ = set(['shared_content_access_level']) -SharedContentAddMemberDetails._all_fields_ = [('shared_content_access_level', SharedContentAddMemberDetails._shared_content_access_level_validator)] +SharedContentAddMemberDetails._all_fields_ = [('shared_content_access_level', SharedContentAddMemberDetails.shared_content_access_level.validator)] -SharedContentAddMemberType._description_validator = bv.String() +SharedContentAddMemberType.description.validator = bv.String() SharedContentAddMemberType._all_field_names_ = set(['description']) -SharedContentAddMemberType._all_fields_ = [('description', SharedContentAddMemberType._description_validator)] +SharedContentAddMemberType._all_fields_ = [('description', SharedContentAddMemberType.description.validator)] -SharedContentChangeDownloadsPolicyDetails._new_value_validator = DownloadPolicyType_validator -SharedContentChangeDownloadsPolicyDetails._previous_value_validator = bv.Nullable(DownloadPolicyType_validator) +SharedContentChangeDownloadsPolicyDetails.new_value.validator = DownloadPolicyType_validator +SharedContentChangeDownloadsPolicyDetails.previous_value.validator = bv.Nullable(DownloadPolicyType_validator) SharedContentChangeDownloadsPolicyDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) SharedContentChangeDownloadsPolicyDetails._all_fields_ = [ - ('new_value', SharedContentChangeDownloadsPolicyDetails._new_value_validator), - ('previous_value', SharedContentChangeDownloadsPolicyDetails._previous_value_validator), + ('new_value', SharedContentChangeDownloadsPolicyDetails.new_value.validator), + ('previous_value', SharedContentChangeDownloadsPolicyDetails.previous_value.validator), ] -SharedContentChangeDownloadsPolicyType._description_validator = bv.String() +SharedContentChangeDownloadsPolicyType.description.validator = bv.String() SharedContentChangeDownloadsPolicyType._all_field_names_ = set(['description']) -SharedContentChangeDownloadsPolicyType._all_fields_ = [('description', SharedContentChangeDownloadsPolicyType._description_validator)] +SharedContentChangeDownloadsPolicyType._all_fields_ = [('description', SharedContentChangeDownloadsPolicyType.description.validator)] -SharedContentChangeInviteeRoleDetails._previous_access_level_validator = bv.Nullable(sharing.AccessLevel_validator) -SharedContentChangeInviteeRoleDetails._new_access_level_validator = sharing.AccessLevel_validator -SharedContentChangeInviteeRoleDetails._invitee_validator = EmailAddress_validator +SharedContentChangeInviteeRoleDetails.previous_access_level.validator = bv.Nullable(sharing.AccessLevel_validator) +SharedContentChangeInviteeRoleDetails.new_access_level.validator = sharing.AccessLevel_validator +SharedContentChangeInviteeRoleDetails.invitee.validator = EmailAddress_validator SharedContentChangeInviteeRoleDetails._all_field_names_ = set([ 'previous_access_level', 'new_access_level', 'invitee', ]) SharedContentChangeInviteeRoleDetails._all_fields_ = [ - ('previous_access_level', SharedContentChangeInviteeRoleDetails._previous_access_level_validator), - ('new_access_level', SharedContentChangeInviteeRoleDetails._new_access_level_validator), - ('invitee', SharedContentChangeInviteeRoleDetails._invitee_validator), + ('previous_access_level', SharedContentChangeInviteeRoleDetails.previous_access_level.validator), + ('new_access_level', SharedContentChangeInviteeRoleDetails.new_access_level.validator), + ('invitee', SharedContentChangeInviteeRoleDetails.invitee.validator), ] -SharedContentChangeInviteeRoleType._description_validator = bv.String() +SharedContentChangeInviteeRoleType.description.validator = bv.String() SharedContentChangeInviteeRoleType._all_field_names_ = set(['description']) -SharedContentChangeInviteeRoleType._all_fields_ = [('description', SharedContentChangeInviteeRoleType._description_validator)] +SharedContentChangeInviteeRoleType._all_fields_ = [('description', SharedContentChangeInviteeRoleType.description.validator)] -SharedContentChangeLinkAudienceDetails._new_value_validator = sharing.LinkAudience_validator -SharedContentChangeLinkAudienceDetails._previous_value_validator = bv.Nullable(sharing.LinkAudience_validator) +SharedContentChangeLinkAudienceDetails.new_value.validator = sharing.LinkAudience_validator +SharedContentChangeLinkAudienceDetails.previous_value.validator = bv.Nullable(sharing.LinkAudience_validator) SharedContentChangeLinkAudienceDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) SharedContentChangeLinkAudienceDetails._all_fields_ = [ - ('new_value', SharedContentChangeLinkAudienceDetails._new_value_validator), - ('previous_value', SharedContentChangeLinkAudienceDetails._previous_value_validator), + ('new_value', SharedContentChangeLinkAudienceDetails.new_value.validator), + ('previous_value', SharedContentChangeLinkAudienceDetails.previous_value.validator), ] -SharedContentChangeLinkAudienceType._description_validator = bv.String() +SharedContentChangeLinkAudienceType.description.validator = bv.String() SharedContentChangeLinkAudienceType._all_field_names_ = set(['description']) -SharedContentChangeLinkAudienceType._all_fields_ = [('description', SharedContentChangeLinkAudienceType._description_validator)] +SharedContentChangeLinkAudienceType._all_fields_ = [('description', SharedContentChangeLinkAudienceType.description.validator)] -SharedContentChangeLinkExpiryDetails._new_value_validator = bv.Nullable(common.DropboxTimestamp_validator) -SharedContentChangeLinkExpiryDetails._previous_value_validator = bv.Nullable(common.DropboxTimestamp_validator) +SharedContentChangeLinkExpiryDetails.new_value.validator = bv.Nullable(common.DropboxTimestamp_validator) +SharedContentChangeLinkExpiryDetails.previous_value.validator = bv.Nullable(common.DropboxTimestamp_validator) SharedContentChangeLinkExpiryDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) SharedContentChangeLinkExpiryDetails._all_fields_ = [ - ('new_value', SharedContentChangeLinkExpiryDetails._new_value_validator), - ('previous_value', SharedContentChangeLinkExpiryDetails._previous_value_validator), + ('new_value', SharedContentChangeLinkExpiryDetails.new_value.validator), + ('previous_value', SharedContentChangeLinkExpiryDetails.previous_value.validator), ] -SharedContentChangeLinkExpiryType._description_validator = bv.String() +SharedContentChangeLinkExpiryType.description.validator = bv.String() SharedContentChangeLinkExpiryType._all_field_names_ = set(['description']) -SharedContentChangeLinkExpiryType._all_fields_ = [('description', SharedContentChangeLinkExpiryType._description_validator)] +SharedContentChangeLinkExpiryType._all_fields_ = [('description', SharedContentChangeLinkExpiryType.description.validator)] SharedContentChangeLinkPasswordDetails._all_field_names_ = set([]) SharedContentChangeLinkPasswordDetails._all_fields_ = [] -SharedContentChangeLinkPasswordType._description_validator = bv.String() +SharedContentChangeLinkPasswordType.description.validator = bv.String() SharedContentChangeLinkPasswordType._all_field_names_ = set(['description']) -SharedContentChangeLinkPasswordType._all_fields_ = [('description', SharedContentChangeLinkPasswordType._description_validator)] +SharedContentChangeLinkPasswordType._all_fields_ = [('description', SharedContentChangeLinkPasswordType.description.validator)] -SharedContentChangeMemberRoleDetails._previous_access_level_validator = bv.Nullable(sharing.AccessLevel_validator) -SharedContentChangeMemberRoleDetails._new_access_level_validator = sharing.AccessLevel_validator +SharedContentChangeMemberRoleDetails.previous_access_level.validator = bv.Nullable(sharing.AccessLevel_validator) +SharedContentChangeMemberRoleDetails.new_access_level.validator = sharing.AccessLevel_validator SharedContentChangeMemberRoleDetails._all_field_names_ = set([ 'previous_access_level', 'new_access_level', ]) SharedContentChangeMemberRoleDetails._all_fields_ = [ - ('previous_access_level', SharedContentChangeMemberRoleDetails._previous_access_level_validator), - ('new_access_level', SharedContentChangeMemberRoleDetails._new_access_level_validator), + ('previous_access_level', SharedContentChangeMemberRoleDetails.previous_access_level.validator), + ('new_access_level', SharedContentChangeMemberRoleDetails.new_access_level.validator), ] -SharedContentChangeMemberRoleType._description_validator = bv.String() +SharedContentChangeMemberRoleType.description.validator = bv.String() SharedContentChangeMemberRoleType._all_field_names_ = set(['description']) -SharedContentChangeMemberRoleType._all_fields_ = [('description', SharedContentChangeMemberRoleType._description_validator)] +SharedContentChangeMemberRoleType._all_fields_ = [('description', SharedContentChangeMemberRoleType.description.validator)] -SharedContentChangeViewerInfoPolicyDetails._new_value_validator = sharing.ViewerInfoPolicy_validator -SharedContentChangeViewerInfoPolicyDetails._previous_value_validator = bv.Nullable(sharing.ViewerInfoPolicy_validator) +SharedContentChangeViewerInfoPolicyDetails.new_value.validator = sharing.ViewerInfoPolicy_validator +SharedContentChangeViewerInfoPolicyDetails.previous_value.validator = bv.Nullable(sharing.ViewerInfoPolicy_validator) SharedContentChangeViewerInfoPolicyDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) SharedContentChangeViewerInfoPolicyDetails._all_fields_ = [ - ('new_value', SharedContentChangeViewerInfoPolicyDetails._new_value_validator), - ('previous_value', SharedContentChangeViewerInfoPolicyDetails._previous_value_validator), + ('new_value', SharedContentChangeViewerInfoPolicyDetails.new_value.validator), + ('previous_value', SharedContentChangeViewerInfoPolicyDetails.previous_value.validator), ] -SharedContentChangeViewerInfoPolicyType._description_validator = bv.String() +SharedContentChangeViewerInfoPolicyType.description.validator = bv.String() SharedContentChangeViewerInfoPolicyType._all_field_names_ = set(['description']) -SharedContentChangeViewerInfoPolicyType._all_fields_ = [('description', SharedContentChangeViewerInfoPolicyType._description_validator)] +SharedContentChangeViewerInfoPolicyType._all_fields_ = [('description', SharedContentChangeViewerInfoPolicyType.description.validator)] -SharedContentClaimInvitationDetails._shared_content_link_validator = bv.Nullable(bv.String()) +SharedContentClaimInvitationDetails.shared_content_link.validator = bv.Nullable(bv.String()) SharedContentClaimInvitationDetails._all_field_names_ = set(['shared_content_link']) -SharedContentClaimInvitationDetails._all_fields_ = [('shared_content_link', SharedContentClaimInvitationDetails._shared_content_link_validator)] +SharedContentClaimInvitationDetails._all_fields_ = [('shared_content_link', SharedContentClaimInvitationDetails.shared_content_link.validator)] -SharedContentClaimInvitationType._description_validator = bv.String() +SharedContentClaimInvitationType.description.validator = bv.String() SharedContentClaimInvitationType._all_field_names_ = set(['description']) -SharedContentClaimInvitationType._all_fields_ = [('description', SharedContentClaimInvitationType._description_validator)] +SharedContentClaimInvitationType._all_fields_ = [('description', SharedContentClaimInvitationType.description.validator)] -SharedContentCopyDetails._shared_content_link_validator = bv.String() -SharedContentCopyDetails._shared_content_owner_validator = bv.Nullable(UserLogInfo_validator) -SharedContentCopyDetails._shared_content_access_level_validator = sharing.AccessLevel_validator -SharedContentCopyDetails._destination_path_validator = FilePath_validator +SharedContentCopyDetails.shared_content_link.validator = bv.String() +SharedContentCopyDetails.shared_content_owner.validator = bv.Nullable(UserLogInfo_validator) +SharedContentCopyDetails.shared_content_access_level.validator = sharing.AccessLevel_validator +SharedContentCopyDetails.destination_path.validator = FilePath_validator SharedContentCopyDetails._all_field_names_ = set([ 'shared_content_link', 'shared_content_owner', @@ -108504,202 +75474,202 @@ def __repr__(self): 'destination_path', ]) SharedContentCopyDetails._all_fields_ = [ - ('shared_content_link', SharedContentCopyDetails._shared_content_link_validator), - ('shared_content_owner', SharedContentCopyDetails._shared_content_owner_validator), - ('shared_content_access_level', SharedContentCopyDetails._shared_content_access_level_validator), - ('destination_path', SharedContentCopyDetails._destination_path_validator), + ('shared_content_link', SharedContentCopyDetails.shared_content_link.validator), + ('shared_content_owner', SharedContentCopyDetails.shared_content_owner.validator), + ('shared_content_access_level', SharedContentCopyDetails.shared_content_access_level.validator), + ('destination_path', SharedContentCopyDetails.destination_path.validator), ] -SharedContentCopyType._description_validator = bv.String() +SharedContentCopyType.description.validator = bv.String() SharedContentCopyType._all_field_names_ = set(['description']) -SharedContentCopyType._all_fields_ = [('description', SharedContentCopyType._description_validator)] +SharedContentCopyType._all_fields_ = [('description', SharedContentCopyType.description.validator)] -SharedContentDownloadDetails._shared_content_link_validator = bv.String() -SharedContentDownloadDetails._shared_content_owner_validator = bv.Nullable(UserLogInfo_validator) -SharedContentDownloadDetails._shared_content_access_level_validator = sharing.AccessLevel_validator +SharedContentDownloadDetails.shared_content_link.validator = bv.String() +SharedContentDownloadDetails.shared_content_owner.validator = bv.Nullable(UserLogInfo_validator) +SharedContentDownloadDetails.shared_content_access_level.validator = sharing.AccessLevel_validator SharedContentDownloadDetails._all_field_names_ = set([ 'shared_content_link', 'shared_content_owner', 'shared_content_access_level', ]) SharedContentDownloadDetails._all_fields_ = [ - ('shared_content_link', SharedContentDownloadDetails._shared_content_link_validator), - ('shared_content_owner', SharedContentDownloadDetails._shared_content_owner_validator), - ('shared_content_access_level', SharedContentDownloadDetails._shared_content_access_level_validator), + ('shared_content_link', SharedContentDownloadDetails.shared_content_link.validator), + ('shared_content_owner', SharedContentDownloadDetails.shared_content_owner.validator), + ('shared_content_access_level', SharedContentDownloadDetails.shared_content_access_level.validator), ] -SharedContentDownloadType._description_validator = bv.String() +SharedContentDownloadType.description.validator = bv.String() SharedContentDownloadType._all_field_names_ = set(['description']) -SharedContentDownloadType._all_fields_ = [('description', SharedContentDownloadType._description_validator)] +SharedContentDownloadType._all_fields_ = [('description', SharedContentDownloadType.description.validator)] SharedContentRelinquishMembershipDetails._all_field_names_ = set([]) SharedContentRelinquishMembershipDetails._all_fields_ = [] -SharedContentRelinquishMembershipType._description_validator = bv.String() +SharedContentRelinquishMembershipType.description.validator = bv.String() SharedContentRelinquishMembershipType._all_field_names_ = set(['description']) -SharedContentRelinquishMembershipType._all_fields_ = [('description', SharedContentRelinquishMembershipType._description_validator)] +SharedContentRelinquishMembershipType._all_fields_ = [('description', SharedContentRelinquishMembershipType.description.validator)] -SharedContentRemoveInviteesDetails._invitees_validator = bv.List(EmailAddress_validator) +SharedContentRemoveInviteesDetails.invitees.validator = bv.List(EmailAddress_validator) SharedContentRemoveInviteesDetails._all_field_names_ = set(['invitees']) -SharedContentRemoveInviteesDetails._all_fields_ = [('invitees', SharedContentRemoveInviteesDetails._invitees_validator)] +SharedContentRemoveInviteesDetails._all_fields_ = [('invitees', SharedContentRemoveInviteesDetails.invitees.validator)] -SharedContentRemoveInviteesType._description_validator = bv.String() +SharedContentRemoveInviteesType.description.validator = bv.String() SharedContentRemoveInviteesType._all_field_names_ = set(['description']) -SharedContentRemoveInviteesType._all_fields_ = [('description', SharedContentRemoveInviteesType._description_validator)] +SharedContentRemoveInviteesType._all_fields_ = [('description', SharedContentRemoveInviteesType.description.validator)] -SharedContentRemoveLinkExpiryDetails._previous_value_validator = bv.Nullable(common.DropboxTimestamp_validator) +SharedContentRemoveLinkExpiryDetails.previous_value.validator = bv.Nullable(common.DropboxTimestamp_validator) SharedContentRemoveLinkExpiryDetails._all_field_names_ = set(['previous_value']) -SharedContentRemoveLinkExpiryDetails._all_fields_ = [('previous_value', SharedContentRemoveLinkExpiryDetails._previous_value_validator)] +SharedContentRemoveLinkExpiryDetails._all_fields_ = [('previous_value', SharedContentRemoveLinkExpiryDetails.previous_value.validator)] -SharedContentRemoveLinkExpiryType._description_validator = bv.String() +SharedContentRemoveLinkExpiryType.description.validator = bv.String() SharedContentRemoveLinkExpiryType._all_field_names_ = set(['description']) -SharedContentRemoveLinkExpiryType._all_fields_ = [('description', SharedContentRemoveLinkExpiryType._description_validator)] +SharedContentRemoveLinkExpiryType._all_fields_ = [('description', SharedContentRemoveLinkExpiryType.description.validator)] SharedContentRemoveLinkPasswordDetails._all_field_names_ = set([]) SharedContentRemoveLinkPasswordDetails._all_fields_ = [] -SharedContentRemoveLinkPasswordType._description_validator = bv.String() +SharedContentRemoveLinkPasswordType.description.validator = bv.String() SharedContentRemoveLinkPasswordType._all_field_names_ = set(['description']) -SharedContentRemoveLinkPasswordType._all_fields_ = [('description', SharedContentRemoveLinkPasswordType._description_validator)] +SharedContentRemoveLinkPasswordType._all_fields_ = [('description', SharedContentRemoveLinkPasswordType.description.validator)] -SharedContentRemoveMemberDetails._shared_content_access_level_validator = bv.Nullable(sharing.AccessLevel_validator) +SharedContentRemoveMemberDetails.shared_content_access_level.validator = bv.Nullable(sharing.AccessLevel_validator) SharedContentRemoveMemberDetails._all_field_names_ = set(['shared_content_access_level']) -SharedContentRemoveMemberDetails._all_fields_ = [('shared_content_access_level', SharedContentRemoveMemberDetails._shared_content_access_level_validator)] +SharedContentRemoveMemberDetails._all_fields_ = [('shared_content_access_level', SharedContentRemoveMemberDetails.shared_content_access_level.validator)] -SharedContentRemoveMemberType._description_validator = bv.String() +SharedContentRemoveMemberType.description.validator = bv.String() SharedContentRemoveMemberType._all_field_names_ = set(['description']) -SharedContentRemoveMemberType._all_fields_ = [('description', SharedContentRemoveMemberType._description_validator)] +SharedContentRemoveMemberType._all_fields_ = [('description', SharedContentRemoveMemberType.description.validator)] -SharedContentRequestAccessDetails._shared_content_link_validator = bv.Nullable(bv.String()) +SharedContentRequestAccessDetails.shared_content_link.validator = bv.Nullable(bv.String()) SharedContentRequestAccessDetails._all_field_names_ = set(['shared_content_link']) -SharedContentRequestAccessDetails._all_fields_ = [('shared_content_link', SharedContentRequestAccessDetails._shared_content_link_validator)] +SharedContentRequestAccessDetails._all_fields_ = [('shared_content_link', SharedContentRequestAccessDetails.shared_content_link.validator)] -SharedContentRequestAccessType._description_validator = bv.String() +SharedContentRequestAccessType.description.validator = bv.String() SharedContentRequestAccessType._all_field_names_ = set(['description']) -SharedContentRequestAccessType._all_fields_ = [('description', SharedContentRequestAccessType._description_validator)] +SharedContentRequestAccessType._all_fields_ = [('description', SharedContentRequestAccessType.description.validator)] -SharedContentRestoreInviteesDetails._shared_content_access_level_validator = sharing.AccessLevel_validator -SharedContentRestoreInviteesDetails._invitees_validator = bv.List(EmailAddress_validator) +SharedContentRestoreInviteesDetails.shared_content_access_level.validator = sharing.AccessLevel_validator +SharedContentRestoreInviteesDetails.invitees.validator = bv.List(EmailAddress_validator) SharedContentRestoreInviteesDetails._all_field_names_ = set([ 'shared_content_access_level', 'invitees', ]) SharedContentRestoreInviteesDetails._all_fields_ = [ - ('shared_content_access_level', SharedContentRestoreInviteesDetails._shared_content_access_level_validator), - ('invitees', SharedContentRestoreInviteesDetails._invitees_validator), + ('shared_content_access_level', SharedContentRestoreInviteesDetails.shared_content_access_level.validator), + ('invitees', SharedContentRestoreInviteesDetails.invitees.validator), ] -SharedContentRestoreInviteesType._description_validator = bv.String() +SharedContentRestoreInviteesType.description.validator = bv.String() SharedContentRestoreInviteesType._all_field_names_ = set(['description']) -SharedContentRestoreInviteesType._all_fields_ = [('description', SharedContentRestoreInviteesType._description_validator)] +SharedContentRestoreInviteesType._all_fields_ = [('description', SharedContentRestoreInviteesType.description.validator)] -SharedContentRestoreMemberDetails._shared_content_access_level_validator = sharing.AccessLevel_validator +SharedContentRestoreMemberDetails.shared_content_access_level.validator = sharing.AccessLevel_validator SharedContentRestoreMemberDetails._all_field_names_ = set(['shared_content_access_level']) -SharedContentRestoreMemberDetails._all_fields_ = [('shared_content_access_level', SharedContentRestoreMemberDetails._shared_content_access_level_validator)] +SharedContentRestoreMemberDetails._all_fields_ = [('shared_content_access_level', SharedContentRestoreMemberDetails.shared_content_access_level.validator)] -SharedContentRestoreMemberType._description_validator = bv.String() +SharedContentRestoreMemberType.description.validator = bv.String() SharedContentRestoreMemberType._all_field_names_ = set(['description']) -SharedContentRestoreMemberType._all_fields_ = [('description', SharedContentRestoreMemberType._description_validator)] +SharedContentRestoreMemberType._all_fields_ = [('description', SharedContentRestoreMemberType.description.validator)] SharedContentUnshareDetails._all_field_names_ = set([]) SharedContentUnshareDetails._all_fields_ = [] -SharedContentUnshareType._description_validator = bv.String() +SharedContentUnshareType.description.validator = bv.String() SharedContentUnshareType._all_field_names_ = set(['description']) -SharedContentUnshareType._all_fields_ = [('description', SharedContentUnshareType._description_validator)] +SharedContentUnshareType._all_fields_ = [('description', SharedContentUnshareType.description.validator)] -SharedContentViewDetails._shared_content_link_validator = bv.String() -SharedContentViewDetails._shared_content_owner_validator = bv.Nullable(UserLogInfo_validator) -SharedContentViewDetails._shared_content_access_level_validator = sharing.AccessLevel_validator +SharedContentViewDetails.shared_content_link.validator = bv.String() +SharedContentViewDetails.shared_content_owner.validator = bv.Nullable(UserLogInfo_validator) +SharedContentViewDetails.shared_content_access_level.validator = sharing.AccessLevel_validator SharedContentViewDetails._all_field_names_ = set([ 'shared_content_link', 'shared_content_owner', 'shared_content_access_level', ]) SharedContentViewDetails._all_fields_ = [ - ('shared_content_link', SharedContentViewDetails._shared_content_link_validator), - ('shared_content_owner', SharedContentViewDetails._shared_content_owner_validator), - ('shared_content_access_level', SharedContentViewDetails._shared_content_access_level_validator), + ('shared_content_link', SharedContentViewDetails.shared_content_link.validator), + ('shared_content_owner', SharedContentViewDetails.shared_content_owner.validator), + ('shared_content_access_level', SharedContentViewDetails.shared_content_access_level.validator), ] -SharedContentViewType._description_validator = bv.String() +SharedContentViewType.description.validator = bv.String() SharedContentViewType._all_field_names_ = set(['description']) -SharedContentViewType._all_fields_ = [('description', SharedContentViewType._description_validator)] +SharedContentViewType._all_fields_ = [('description', SharedContentViewType.description.validator)] -SharedFolderChangeLinkPolicyDetails._new_value_validator = sharing.SharedLinkPolicy_validator -SharedFolderChangeLinkPolicyDetails._previous_value_validator = bv.Nullable(sharing.SharedLinkPolicy_validator) +SharedFolderChangeLinkPolicyDetails.new_value.validator = sharing.SharedLinkPolicy_validator +SharedFolderChangeLinkPolicyDetails.previous_value.validator = bv.Nullable(sharing.SharedLinkPolicy_validator) SharedFolderChangeLinkPolicyDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) SharedFolderChangeLinkPolicyDetails._all_fields_ = [ - ('new_value', SharedFolderChangeLinkPolicyDetails._new_value_validator), - ('previous_value', SharedFolderChangeLinkPolicyDetails._previous_value_validator), + ('new_value', SharedFolderChangeLinkPolicyDetails.new_value.validator), + ('previous_value', SharedFolderChangeLinkPolicyDetails.previous_value.validator), ] -SharedFolderChangeLinkPolicyType._description_validator = bv.String() +SharedFolderChangeLinkPolicyType.description.validator = bv.String() SharedFolderChangeLinkPolicyType._all_field_names_ = set(['description']) -SharedFolderChangeLinkPolicyType._all_fields_ = [('description', SharedFolderChangeLinkPolicyType._description_validator)] +SharedFolderChangeLinkPolicyType._all_fields_ = [('description', SharedFolderChangeLinkPolicyType.description.validator)] -SharedFolderChangeMembersInheritancePolicyDetails._new_value_validator = SharedFolderMembersInheritancePolicy_validator -SharedFolderChangeMembersInheritancePolicyDetails._previous_value_validator = bv.Nullable(SharedFolderMembersInheritancePolicy_validator) +SharedFolderChangeMembersInheritancePolicyDetails.new_value.validator = SharedFolderMembersInheritancePolicy_validator +SharedFolderChangeMembersInheritancePolicyDetails.previous_value.validator = bv.Nullable(SharedFolderMembersInheritancePolicy_validator) SharedFolderChangeMembersInheritancePolicyDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) SharedFolderChangeMembersInheritancePolicyDetails._all_fields_ = [ - ('new_value', SharedFolderChangeMembersInheritancePolicyDetails._new_value_validator), - ('previous_value', SharedFolderChangeMembersInheritancePolicyDetails._previous_value_validator), + ('new_value', SharedFolderChangeMembersInheritancePolicyDetails.new_value.validator), + ('previous_value', SharedFolderChangeMembersInheritancePolicyDetails.previous_value.validator), ] -SharedFolderChangeMembersInheritancePolicyType._description_validator = bv.String() +SharedFolderChangeMembersInheritancePolicyType.description.validator = bv.String() SharedFolderChangeMembersInheritancePolicyType._all_field_names_ = set(['description']) -SharedFolderChangeMembersInheritancePolicyType._all_fields_ = [('description', SharedFolderChangeMembersInheritancePolicyType._description_validator)] +SharedFolderChangeMembersInheritancePolicyType._all_fields_ = [('description', SharedFolderChangeMembersInheritancePolicyType.description.validator)] -SharedFolderChangeMembersManagementPolicyDetails._new_value_validator = sharing.AclUpdatePolicy_validator -SharedFolderChangeMembersManagementPolicyDetails._previous_value_validator = bv.Nullable(sharing.AclUpdatePolicy_validator) +SharedFolderChangeMembersManagementPolicyDetails.new_value.validator = sharing.AclUpdatePolicy_validator +SharedFolderChangeMembersManagementPolicyDetails.previous_value.validator = bv.Nullable(sharing.AclUpdatePolicy_validator) SharedFolderChangeMembersManagementPolicyDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) SharedFolderChangeMembersManagementPolicyDetails._all_fields_ = [ - ('new_value', SharedFolderChangeMembersManagementPolicyDetails._new_value_validator), - ('previous_value', SharedFolderChangeMembersManagementPolicyDetails._previous_value_validator), + ('new_value', SharedFolderChangeMembersManagementPolicyDetails.new_value.validator), + ('previous_value', SharedFolderChangeMembersManagementPolicyDetails.previous_value.validator), ] -SharedFolderChangeMembersManagementPolicyType._description_validator = bv.String() +SharedFolderChangeMembersManagementPolicyType.description.validator = bv.String() SharedFolderChangeMembersManagementPolicyType._all_field_names_ = set(['description']) -SharedFolderChangeMembersManagementPolicyType._all_fields_ = [('description', SharedFolderChangeMembersManagementPolicyType._description_validator)] +SharedFolderChangeMembersManagementPolicyType._all_fields_ = [('description', SharedFolderChangeMembersManagementPolicyType.description.validator)] -SharedFolderChangeMembersPolicyDetails._new_value_validator = sharing.MemberPolicy_validator -SharedFolderChangeMembersPolicyDetails._previous_value_validator = bv.Nullable(sharing.MemberPolicy_validator) +SharedFolderChangeMembersPolicyDetails.new_value.validator = sharing.MemberPolicy_validator +SharedFolderChangeMembersPolicyDetails.previous_value.validator = bv.Nullable(sharing.MemberPolicy_validator) SharedFolderChangeMembersPolicyDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) SharedFolderChangeMembersPolicyDetails._all_fields_ = [ - ('new_value', SharedFolderChangeMembersPolicyDetails._new_value_validator), - ('previous_value', SharedFolderChangeMembersPolicyDetails._previous_value_validator), + ('new_value', SharedFolderChangeMembersPolicyDetails.new_value.validator), + ('previous_value', SharedFolderChangeMembersPolicyDetails.previous_value.validator), ] -SharedFolderChangeMembersPolicyType._description_validator = bv.String() +SharedFolderChangeMembersPolicyType.description.validator = bv.String() SharedFolderChangeMembersPolicyType._all_field_names_ = set(['description']) -SharedFolderChangeMembersPolicyType._all_fields_ = [('description', SharedFolderChangeMembersPolicyType._description_validator)] +SharedFolderChangeMembersPolicyType._all_fields_ = [('description', SharedFolderChangeMembersPolicyType.description.validator)] -SharedFolderCreateDetails._target_ns_id_validator = bv.Nullable(NamespaceId_validator) +SharedFolderCreateDetails.target_ns_id.validator = bv.Nullable(NamespaceId_validator) SharedFolderCreateDetails._all_field_names_ = set(['target_ns_id']) -SharedFolderCreateDetails._all_fields_ = [('target_ns_id', SharedFolderCreateDetails._target_ns_id_validator)] +SharedFolderCreateDetails._all_fields_ = [('target_ns_id', SharedFolderCreateDetails.target_ns_id.validator)] -SharedFolderCreateType._description_validator = bv.String() +SharedFolderCreateType.description.validator = bv.String() SharedFolderCreateType._all_field_names_ = set(['description']) -SharedFolderCreateType._all_fields_ = [('description', SharedFolderCreateType._description_validator)] +SharedFolderCreateType._all_fields_ = [('description', SharedFolderCreateType.description.validator)] SharedFolderDeclineInvitationDetails._all_field_names_ = set([]) SharedFolderDeclineInvitationDetails._all_fields_ = [] -SharedFolderDeclineInvitationType._description_validator = bv.String() +SharedFolderDeclineInvitationType.description.validator = bv.String() SharedFolderDeclineInvitationType._all_field_names_ = set(['description']) -SharedFolderDeclineInvitationType._all_fields_ = [('description', SharedFolderDeclineInvitationType._description_validator)] +SharedFolderDeclineInvitationType._all_fields_ = [('description', SharedFolderDeclineInvitationType.description.validator)] SharedFolderMembersInheritancePolicy._dont_inherit_members_validator = bv.Void() SharedFolderMembersInheritancePolicy._inherit_members_validator = bv.Void() @@ -108717,14 +75687,14 @@ def __repr__(self): SharedFolderMountDetails._all_field_names_ = set([]) SharedFolderMountDetails._all_fields_ = [] -SharedFolderMountType._description_validator = bv.String() +SharedFolderMountType.description.validator = bv.String() SharedFolderMountType._all_field_names_ = set(['description']) -SharedFolderMountType._all_fields_ = [('description', SharedFolderMountType._description_validator)] +SharedFolderMountType._all_fields_ = [('description', SharedFolderMountType.description.validator)] -SharedFolderNestDetails._previous_parent_ns_id_validator = bv.Nullable(NamespaceId_validator) -SharedFolderNestDetails._new_parent_ns_id_validator = bv.Nullable(NamespaceId_validator) -SharedFolderNestDetails._previous_ns_path_validator = bv.Nullable(FilePath_validator) -SharedFolderNestDetails._new_ns_path_validator = bv.Nullable(FilePath_validator) +SharedFolderNestDetails.previous_parent_ns_id.validator = bv.Nullable(NamespaceId_validator) +SharedFolderNestDetails.new_parent_ns_id.validator = bv.Nullable(NamespaceId_validator) +SharedFolderNestDetails.previous_ns_path.validator = bv.Nullable(FilePath_validator) +SharedFolderNestDetails.new_ns_path.validator = bv.Nullable(FilePath_validator) SharedFolderNestDetails._all_field_names_ = set([ 'previous_parent_ns_id', 'new_parent_ns_id', @@ -108732,37 +75702,37 @@ def __repr__(self): 'new_ns_path', ]) SharedFolderNestDetails._all_fields_ = [ - ('previous_parent_ns_id', SharedFolderNestDetails._previous_parent_ns_id_validator), - ('new_parent_ns_id', SharedFolderNestDetails._new_parent_ns_id_validator), - ('previous_ns_path', SharedFolderNestDetails._previous_ns_path_validator), - ('new_ns_path', SharedFolderNestDetails._new_ns_path_validator), + ('previous_parent_ns_id', SharedFolderNestDetails.previous_parent_ns_id.validator), + ('new_parent_ns_id', SharedFolderNestDetails.new_parent_ns_id.validator), + ('previous_ns_path', SharedFolderNestDetails.previous_ns_path.validator), + ('new_ns_path', SharedFolderNestDetails.new_ns_path.validator), ] -SharedFolderNestType._description_validator = bv.String() +SharedFolderNestType.description.validator = bv.String() SharedFolderNestType._all_field_names_ = set(['description']) -SharedFolderNestType._all_fields_ = [('description', SharedFolderNestType._description_validator)] +SharedFolderNestType._all_fields_ = [('description', SharedFolderNestType.description.validator)] -SharedFolderTransferOwnershipDetails._previous_owner_email_validator = bv.Nullable(EmailAddress_validator) -SharedFolderTransferOwnershipDetails._new_owner_email_validator = EmailAddress_validator +SharedFolderTransferOwnershipDetails.previous_owner_email.validator = bv.Nullable(EmailAddress_validator) +SharedFolderTransferOwnershipDetails.new_owner_email.validator = EmailAddress_validator SharedFolderTransferOwnershipDetails._all_field_names_ = set([ 'previous_owner_email', 'new_owner_email', ]) SharedFolderTransferOwnershipDetails._all_fields_ = [ - ('previous_owner_email', SharedFolderTransferOwnershipDetails._previous_owner_email_validator), - ('new_owner_email', SharedFolderTransferOwnershipDetails._new_owner_email_validator), + ('previous_owner_email', SharedFolderTransferOwnershipDetails.previous_owner_email.validator), + ('new_owner_email', SharedFolderTransferOwnershipDetails.new_owner_email.validator), ] -SharedFolderTransferOwnershipType._description_validator = bv.String() +SharedFolderTransferOwnershipType.description.validator = bv.String() SharedFolderTransferOwnershipType._all_field_names_ = set(['description']) -SharedFolderTransferOwnershipType._all_fields_ = [('description', SharedFolderTransferOwnershipType._description_validator)] +SharedFolderTransferOwnershipType._all_fields_ = [('description', SharedFolderTransferOwnershipType.description.validator)] SharedFolderUnmountDetails._all_field_names_ = set([]) SharedFolderUnmountDetails._all_fields_ = [] -SharedFolderUnmountType._description_validator = bv.String() +SharedFolderUnmountType.description.validator = bv.String() SharedFolderUnmountType._all_field_names_ = set(['description']) -SharedFolderUnmountType._all_fields_ = [('description', SharedFolderUnmountType._description_validator)] +SharedFolderUnmountType._all_fields_ = [('description', SharedFolderUnmountType.description.validator)] SharedLinkAccessLevel._none_validator = bv.Void() SharedLinkAccessLevel._reader_validator = bv.Void() @@ -108780,151 +75750,151 @@ def __repr__(self): SharedLinkAccessLevel.writer = SharedLinkAccessLevel('writer') SharedLinkAccessLevel.other = SharedLinkAccessLevel('other') -SharedLinkAddExpiryDetails._new_value_validator = common.DropboxTimestamp_validator +SharedLinkAddExpiryDetails.new_value.validator = common.DropboxTimestamp_validator SharedLinkAddExpiryDetails._all_field_names_ = set(['new_value']) -SharedLinkAddExpiryDetails._all_fields_ = [('new_value', SharedLinkAddExpiryDetails._new_value_validator)] +SharedLinkAddExpiryDetails._all_fields_ = [('new_value', SharedLinkAddExpiryDetails.new_value.validator)] -SharedLinkAddExpiryType._description_validator = bv.String() +SharedLinkAddExpiryType.description.validator = bv.String() SharedLinkAddExpiryType._all_field_names_ = set(['description']) -SharedLinkAddExpiryType._all_fields_ = [('description', SharedLinkAddExpiryType._description_validator)] +SharedLinkAddExpiryType._all_fields_ = [('description', SharedLinkAddExpiryType.description.validator)] -SharedLinkChangeExpiryDetails._new_value_validator = bv.Nullable(common.DropboxTimestamp_validator) -SharedLinkChangeExpiryDetails._previous_value_validator = bv.Nullable(common.DropboxTimestamp_validator) +SharedLinkChangeExpiryDetails.new_value.validator = bv.Nullable(common.DropboxTimestamp_validator) +SharedLinkChangeExpiryDetails.previous_value.validator = bv.Nullable(common.DropboxTimestamp_validator) SharedLinkChangeExpiryDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) SharedLinkChangeExpiryDetails._all_fields_ = [ - ('new_value', SharedLinkChangeExpiryDetails._new_value_validator), - ('previous_value', SharedLinkChangeExpiryDetails._previous_value_validator), + ('new_value', SharedLinkChangeExpiryDetails.new_value.validator), + ('previous_value', SharedLinkChangeExpiryDetails.previous_value.validator), ] -SharedLinkChangeExpiryType._description_validator = bv.String() +SharedLinkChangeExpiryType.description.validator = bv.String() SharedLinkChangeExpiryType._all_field_names_ = set(['description']) -SharedLinkChangeExpiryType._all_fields_ = [('description', SharedLinkChangeExpiryType._description_validator)] +SharedLinkChangeExpiryType._all_fields_ = [('description', SharedLinkChangeExpiryType.description.validator)] -SharedLinkChangeVisibilityDetails._new_value_validator = SharedLinkVisibility_validator -SharedLinkChangeVisibilityDetails._previous_value_validator = bv.Nullable(SharedLinkVisibility_validator) +SharedLinkChangeVisibilityDetails.new_value.validator = SharedLinkVisibility_validator +SharedLinkChangeVisibilityDetails.previous_value.validator = bv.Nullable(SharedLinkVisibility_validator) SharedLinkChangeVisibilityDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) SharedLinkChangeVisibilityDetails._all_fields_ = [ - ('new_value', SharedLinkChangeVisibilityDetails._new_value_validator), - ('previous_value', SharedLinkChangeVisibilityDetails._previous_value_validator), + ('new_value', SharedLinkChangeVisibilityDetails.new_value.validator), + ('previous_value', SharedLinkChangeVisibilityDetails.previous_value.validator), ] -SharedLinkChangeVisibilityType._description_validator = bv.String() +SharedLinkChangeVisibilityType.description.validator = bv.String() SharedLinkChangeVisibilityType._all_field_names_ = set(['description']) -SharedLinkChangeVisibilityType._all_fields_ = [('description', SharedLinkChangeVisibilityType._description_validator)] +SharedLinkChangeVisibilityType._all_fields_ = [('description', SharedLinkChangeVisibilityType.description.validator)] -SharedLinkCopyDetails._shared_link_owner_validator = bv.Nullable(UserLogInfo_validator) +SharedLinkCopyDetails.shared_link_owner.validator = bv.Nullable(UserLogInfo_validator) SharedLinkCopyDetails._all_field_names_ = set(['shared_link_owner']) -SharedLinkCopyDetails._all_fields_ = [('shared_link_owner', SharedLinkCopyDetails._shared_link_owner_validator)] +SharedLinkCopyDetails._all_fields_ = [('shared_link_owner', SharedLinkCopyDetails.shared_link_owner.validator)] -SharedLinkCopyType._description_validator = bv.String() +SharedLinkCopyType.description.validator = bv.String() SharedLinkCopyType._all_field_names_ = set(['description']) -SharedLinkCopyType._all_fields_ = [('description', SharedLinkCopyType._description_validator)] +SharedLinkCopyType._all_fields_ = [('description', SharedLinkCopyType.description.validator)] -SharedLinkCreateDetails._shared_link_access_level_validator = bv.Nullable(SharedLinkAccessLevel_validator) +SharedLinkCreateDetails.shared_link_access_level.validator = bv.Nullable(SharedLinkAccessLevel_validator) SharedLinkCreateDetails._all_field_names_ = set(['shared_link_access_level']) -SharedLinkCreateDetails._all_fields_ = [('shared_link_access_level', SharedLinkCreateDetails._shared_link_access_level_validator)] +SharedLinkCreateDetails._all_fields_ = [('shared_link_access_level', SharedLinkCreateDetails.shared_link_access_level.validator)] -SharedLinkCreateType._description_validator = bv.String() +SharedLinkCreateType.description.validator = bv.String() SharedLinkCreateType._all_field_names_ = set(['description']) -SharedLinkCreateType._all_fields_ = [('description', SharedLinkCreateType._description_validator)] +SharedLinkCreateType._all_fields_ = [('description', SharedLinkCreateType.description.validator)] -SharedLinkDisableDetails._shared_link_owner_validator = bv.Nullable(UserLogInfo_validator) +SharedLinkDisableDetails.shared_link_owner.validator = bv.Nullable(UserLogInfo_validator) SharedLinkDisableDetails._all_field_names_ = set(['shared_link_owner']) -SharedLinkDisableDetails._all_fields_ = [('shared_link_owner', SharedLinkDisableDetails._shared_link_owner_validator)] +SharedLinkDisableDetails._all_fields_ = [('shared_link_owner', SharedLinkDisableDetails.shared_link_owner.validator)] -SharedLinkDisableType._description_validator = bv.String() +SharedLinkDisableType.description.validator = bv.String() SharedLinkDisableType._all_field_names_ = set(['description']) -SharedLinkDisableType._all_fields_ = [('description', SharedLinkDisableType._description_validator)] +SharedLinkDisableType._all_fields_ = [('description', SharedLinkDisableType.description.validator)] -SharedLinkDownloadDetails._shared_link_owner_validator = bv.Nullable(UserLogInfo_validator) +SharedLinkDownloadDetails.shared_link_owner.validator = bv.Nullable(UserLogInfo_validator) SharedLinkDownloadDetails._all_field_names_ = set(['shared_link_owner']) -SharedLinkDownloadDetails._all_fields_ = [('shared_link_owner', SharedLinkDownloadDetails._shared_link_owner_validator)] +SharedLinkDownloadDetails._all_fields_ = [('shared_link_owner', SharedLinkDownloadDetails.shared_link_owner.validator)] -SharedLinkDownloadType._description_validator = bv.String() +SharedLinkDownloadType.description.validator = bv.String() SharedLinkDownloadType._all_field_names_ = set(['description']) -SharedLinkDownloadType._all_fields_ = [('description', SharedLinkDownloadType._description_validator)] +SharedLinkDownloadType._all_fields_ = [('description', SharedLinkDownloadType.description.validator)] -SharedLinkRemoveExpiryDetails._previous_value_validator = bv.Nullable(common.DropboxTimestamp_validator) +SharedLinkRemoveExpiryDetails.previous_value.validator = bv.Nullable(common.DropboxTimestamp_validator) SharedLinkRemoveExpiryDetails._all_field_names_ = set(['previous_value']) -SharedLinkRemoveExpiryDetails._all_fields_ = [('previous_value', SharedLinkRemoveExpiryDetails._previous_value_validator)] +SharedLinkRemoveExpiryDetails._all_fields_ = [('previous_value', SharedLinkRemoveExpiryDetails.previous_value.validator)] -SharedLinkRemoveExpiryType._description_validator = bv.String() +SharedLinkRemoveExpiryType.description.validator = bv.String() SharedLinkRemoveExpiryType._all_field_names_ = set(['description']) -SharedLinkRemoveExpiryType._all_fields_ = [('description', SharedLinkRemoveExpiryType._description_validator)] +SharedLinkRemoveExpiryType._all_fields_ = [('description', SharedLinkRemoveExpiryType.description.validator)] -SharedLinkSettingsAddExpirationDetails._shared_content_access_level_validator = sharing.AccessLevel_validator -SharedLinkSettingsAddExpirationDetails._shared_content_link_validator = bv.Nullable(bv.String()) -SharedLinkSettingsAddExpirationDetails._new_value_validator = bv.Nullable(common.DropboxTimestamp_validator) +SharedLinkSettingsAddExpirationDetails.shared_content_access_level.validator = sharing.AccessLevel_validator +SharedLinkSettingsAddExpirationDetails.shared_content_link.validator = bv.Nullable(bv.String()) +SharedLinkSettingsAddExpirationDetails.new_value.validator = bv.Nullable(common.DropboxTimestamp_validator) SharedLinkSettingsAddExpirationDetails._all_field_names_ = set([ 'shared_content_access_level', 'shared_content_link', 'new_value', ]) SharedLinkSettingsAddExpirationDetails._all_fields_ = [ - ('shared_content_access_level', SharedLinkSettingsAddExpirationDetails._shared_content_access_level_validator), - ('shared_content_link', SharedLinkSettingsAddExpirationDetails._shared_content_link_validator), - ('new_value', SharedLinkSettingsAddExpirationDetails._new_value_validator), + ('shared_content_access_level', SharedLinkSettingsAddExpirationDetails.shared_content_access_level.validator), + ('shared_content_link', SharedLinkSettingsAddExpirationDetails.shared_content_link.validator), + ('new_value', SharedLinkSettingsAddExpirationDetails.new_value.validator), ] -SharedLinkSettingsAddExpirationType._description_validator = bv.String() +SharedLinkSettingsAddExpirationType.description.validator = bv.String() SharedLinkSettingsAddExpirationType._all_field_names_ = set(['description']) -SharedLinkSettingsAddExpirationType._all_fields_ = [('description', SharedLinkSettingsAddExpirationType._description_validator)] +SharedLinkSettingsAddExpirationType._all_fields_ = [('description', SharedLinkSettingsAddExpirationType.description.validator)] -SharedLinkSettingsAddPasswordDetails._shared_content_access_level_validator = sharing.AccessLevel_validator -SharedLinkSettingsAddPasswordDetails._shared_content_link_validator = bv.Nullable(bv.String()) +SharedLinkSettingsAddPasswordDetails.shared_content_access_level.validator = sharing.AccessLevel_validator +SharedLinkSettingsAddPasswordDetails.shared_content_link.validator = bv.Nullable(bv.String()) SharedLinkSettingsAddPasswordDetails._all_field_names_ = set([ 'shared_content_access_level', 'shared_content_link', ]) SharedLinkSettingsAddPasswordDetails._all_fields_ = [ - ('shared_content_access_level', SharedLinkSettingsAddPasswordDetails._shared_content_access_level_validator), - ('shared_content_link', SharedLinkSettingsAddPasswordDetails._shared_content_link_validator), + ('shared_content_access_level', SharedLinkSettingsAddPasswordDetails.shared_content_access_level.validator), + ('shared_content_link', SharedLinkSettingsAddPasswordDetails.shared_content_link.validator), ] -SharedLinkSettingsAddPasswordType._description_validator = bv.String() +SharedLinkSettingsAddPasswordType.description.validator = bv.String() SharedLinkSettingsAddPasswordType._all_field_names_ = set(['description']) -SharedLinkSettingsAddPasswordType._all_fields_ = [('description', SharedLinkSettingsAddPasswordType._description_validator)] +SharedLinkSettingsAddPasswordType._all_fields_ = [('description', SharedLinkSettingsAddPasswordType.description.validator)] -SharedLinkSettingsAllowDownloadDisabledDetails._shared_content_access_level_validator = sharing.AccessLevel_validator -SharedLinkSettingsAllowDownloadDisabledDetails._shared_content_link_validator = bv.Nullable(bv.String()) +SharedLinkSettingsAllowDownloadDisabledDetails.shared_content_access_level.validator = sharing.AccessLevel_validator +SharedLinkSettingsAllowDownloadDisabledDetails.shared_content_link.validator = bv.Nullable(bv.String()) SharedLinkSettingsAllowDownloadDisabledDetails._all_field_names_ = set([ 'shared_content_access_level', 'shared_content_link', ]) SharedLinkSettingsAllowDownloadDisabledDetails._all_fields_ = [ - ('shared_content_access_level', SharedLinkSettingsAllowDownloadDisabledDetails._shared_content_access_level_validator), - ('shared_content_link', SharedLinkSettingsAllowDownloadDisabledDetails._shared_content_link_validator), + ('shared_content_access_level', SharedLinkSettingsAllowDownloadDisabledDetails.shared_content_access_level.validator), + ('shared_content_link', SharedLinkSettingsAllowDownloadDisabledDetails.shared_content_link.validator), ] -SharedLinkSettingsAllowDownloadDisabledType._description_validator = bv.String() +SharedLinkSettingsAllowDownloadDisabledType.description.validator = bv.String() SharedLinkSettingsAllowDownloadDisabledType._all_field_names_ = set(['description']) -SharedLinkSettingsAllowDownloadDisabledType._all_fields_ = [('description', SharedLinkSettingsAllowDownloadDisabledType._description_validator)] +SharedLinkSettingsAllowDownloadDisabledType._all_fields_ = [('description', SharedLinkSettingsAllowDownloadDisabledType.description.validator)] -SharedLinkSettingsAllowDownloadEnabledDetails._shared_content_access_level_validator = sharing.AccessLevel_validator -SharedLinkSettingsAllowDownloadEnabledDetails._shared_content_link_validator = bv.Nullable(bv.String()) +SharedLinkSettingsAllowDownloadEnabledDetails.shared_content_access_level.validator = sharing.AccessLevel_validator +SharedLinkSettingsAllowDownloadEnabledDetails.shared_content_link.validator = bv.Nullable(bv.String()) SharedLinkSettingsAllowDownloadEnabledDetails._all_field_names_ = set([ 'shared_content_access_level', 'shared_content_link', ]) SharedLinkSettingsAllowDownloadEnabledDetails._all_fields_ = [ - ('shared_content_access_level', SharedLinkSettingsAllowDownloadEnabledDetails._shared_content_access_level_validator), - ('shared_content_link', SharedLinkSettingsAllowDownloadEnabledDetails._shared_content_link_validator), + ('shared_content_access_level', SharedLinkSettingsAllowDownloadEnabledDetails.shared_content_access_level.validator), + ('shared_content_link', SharedLinkSettingsAllowDownloadEnabledDetails.shared_content_link.validator), ] -SharedLinkSettingsAllowDownloadEnabledType._description_validator = bv.String() +SharedLinkSettingsAllowDownloadEnabledType.description.validator = bv.String() SharedLinkSettingsAllowDownloadEnabledType._all_field_names_ = set(['description']) -SharedLinkSettingsAllowDownloadEnabledType._all_fields_ = [('description', SharedLinkSettingsAllowDownloadEnabledType._description_validator)] +SharedLinkSettingsAllowDownloadEnabledType._all_fields_ = [('description', SharedLinkSettingsAllowDownloadEnabledType.description.validator)] -SharedLinkSettingsChangeAudienceDetails._shared_content_access_level_validator = sharing.AccessLevel_validator -SharedLinkSettingsChangeAudienceDetails._shared_content_link_validator = bv.Nullable(bv.String()) -SharedLinkSettingsChangeAudienceDetails._new_value_validator = sharing.LinkAudience_validator -SharedLinkSettingsChangeAudienceDetails._previous_value_validator = bv.Nullable(sharing.LinkAudience_validator) +SharedLinkSettingsChangeAudienceDetails.shared_content_access_level.validator = sharing.AccessLevel_validator +SharedLinkSettingsChangeAudienceDetails.shared_content_link.validator = bv.Nullable(bv.String()) +SharedLinkSettingsChangeAudienceDetails.new_value.validator = sharing.LinkAudience_validator +SharedLinkSettingsChangeAudienceDetails.previous_value.validator = bv.Nullable(sharing.LinkAudience_validator) SharedLinkSettingsChangeAudienceDetails._all_field_names_ = set([ 'shared_content_access_level', 'shared_content_link', @@ -108932,20 +75902,20 @@ def __repr__(self): 'previous_value', ]) SharedLinkSettingsChangeAudienceDetails._all_fields_ = [ - ('shared_content_access_level', SharedLinkSettingsChangeAudienceDetails._shared_content_access_level_validator), - ('shared_content_link', SharedLinkSettingsChangeAudienceDetails._shared_content_link_validator), - ('new_value', SharedLinkSettingsChangeAudienceDetails._new_value_validator), - ('previous_value', SharedLinkSettingsChangeAudienceDetails._previous_value_validator), + ('shared_content_access_level', SharedLinkSettingsChangeAudienceDetails.shared_content_access_level.validator), + ('shared_content_link', SharedLinkSettingsChangeAudienceDetails.shared_content_link.validator), + ('new_value', SharedLinkSettingsChangeAudienceDetails.new_value.validator), + ('previous_value', SharedLinkSettingsChangeAudienceDetails.previous_value.validator), ] -SharedLinkSettingsChangeAudienceType._description_validator = bv.String() +SharedLinkSettingsChangeAudienceType.description.validator = bv.String() SharedLinkSettingsChangeAudienceType._all_field_names_ = set(['description']) -SharedLinkSettingsChangeAudienceType._all_fields_ = [('description', SharedLinkSettingsChangeAudienceType._description_validator)] +SharedLinkSettingsChangeAudienceType._all_fields_ = [('description', SharedLinkSettingsChangeAudienceType.description.validator)] -SharedLinkSettingsChangeExpirationDetails._shared_content_access_level_validator = sharing.AccessLevel_validator -SharedLinkSettingsChangeExpirationDetails._shared_content_link_validator = bv.Nullable(bv.String()) -SharedLinkSettingsChangeExpirationDetails._new_value_validator = bv.Nullable(common.DropboxTimestamp_validator) -SharedLinkSettingsChangeExpirationDetails._previous_value_validator = bv.Nullable(common.DropboxTimestamp_validator) +SharedLinkSettingsChangeExpirationDetails.shared_content_access_level.validator = sharing.AccessLevel_validator +SharedLinkSettingsChangeExpirationDetails.shared_content_link.validator = bv.Nullable(bv.String()) +SharedLinkSettingsChangeExpirationDetails.new_value.validator = bv.Nullable(common.DropboxTimestamp_validator) +SharedLinkSettingsChangeExpirationDetails.previous_value.validator = bv.Nullable(common.DropboxTimestamp_validator) SharedLinkSettingsChangeExpirationDetails._all_field_names_ = set([ 'shared_content_access_level', 'shared_content_link', @@ -108953,86 +75923,86 @@ def __repr__(self): 'previous_value', ]) SharedLinkSettingsChangeExpirationDetails._all_fields_ = [ - ('shared_content_access_level', SharedLinkSettingsChangeExpirationDetails._shared_content_access_level_validator), - ('shared_content_link', SharedLinkSettingsChangeExpirationDetails._shared_content_link_validator), - ('new_value', SharedLinkSettingsChangeExpirationDetails._new_value_validator), - ('previous_value', SharedLinkSettingsChangeExpirationDetails._previous_value_validator), + ('shared_content_access_level', SharedLinkSettingsChangeExpirationDetails.shared_content_access_level.validator), + ('shared_content_link', SharedLinkSettingsChangeExpirationDetails.shared_content_link.validator), + ('new_value', SharedLinkSettingsChangeExpirationDetails.new_value.validator), + ('previous_value', SharedLinkSettingsChangeExpirationDetails.previous_value.validator), ] -SharedLinkSettingsChangeExpirationType._description_validator = bv.String() +SharedLinkSettingsChangeExpirationType.description.validator = bv.String() SharedLinkSettingsChangeExpirationType._all_field_names_ = set(['description']) -SharedLinkSettingsChangeExpirationType._all_fields_ = [('description', SharedLinkSettingsChangeExpirationType._description_validator)] +SharedLinkSettingsChangeExpirationType._all_fields_ = [('description', SharedLinkSettingsChangeExpirationType.description.validator)] -SharedLinkSettingsChangePasswordDetails._shared_content_access_level_validator = sharing.AccessLevel_validator -SharedLinkSettingsChangePasswordDetails._shared_content_link_validator = bv.Nullable(bv.String()) +SharedLinkSettingsChangePasswordDetails.shared_content_access_level.validator = sharing.AccessLevel_validator +SharedLinkSettingsChangePasswordDetails.shared_content_link.validator = bv.Nullable(bv.String()) SharedLinkSettingsChangePasswordDetails._all_field_names_ = set([ 'shared_content_access_level', 'shared_content_link', ]) SharedLinkSettingsChangePasswordDetails._all_fields_ = [ - ('shared_content_access_level', SharedLinkSettingsChangePasswordDetails._shared_content_access_level_validator), - ('shared_content_link', SharedLinkSettingsChangePasswordDetails._shared_content_link_validator), + ('shared_content_access_level', SharedLinkSettingsChangePasswordDetails.shared_content_access_level.validator), + ('shared_content_link', SharedLinkSettingsChangePasswordDetails.shared_content_link.validator), ] -SharedLinkSettingsChangePasswordType._description_validator = bv.String() +SharedLinkSettingsChangePasswordType.description.validator = bv.String() SharedLinkSettingsChangePasswordType._all_field_names_ = set(['description']) -SharedLinkSettingsChangePasswordType._all_fields_ = [('description', SharedLinkSettingsChangePasswordType._description_validator)] +SharedLinkSettingsChangePasswordType._all_fields_ = [('description', SharedLinkSettingsChangePasswordType.description.validator)] -SharedLinkSettingsRemoveExpirationDetails._shared_content_access_level_validator = sharing.AccessLevel_validator -SharedLinkSettingsRemoveExpirationDetails._shared_content_link_validator = bv.Nullable(bv.String()) -SharedLinkSettingsRemoveExpirationDetails._previous_value_validator = bv.Nullable(common.DropboxTimestamp_validator) +SharedLinkSettingsRemoveExpirationDetails.shared_content_access_level.validator = sharing.AccessLevel_validator +SharedLinkSettingsRemoveExpirationDetails.shared_content_link.validator = bv.Nullable(bv.String()) +SharedLinkSettingsRemoveExpirationDetails.previous_value.validator = bv.Nullable(common.DropboxTimestamp_validator) SharedLinkSettingsRemoveExpirationDetails._all_field_names_ = set([ 'shared_content_access_level', 'shared_content_link', 'previous_value', ]) SharedLinkSettingsRemoveExpirationDetails._all_fields_ = [ - ('shared_content_access_level', SharedLinkSettingsRemoveExpirationDetails._shared_content_access_level_validator), - ('shared_content_link', SharedLinkSettingsRemoveExpirationDetails._shared_content_link_validator), - ('previous_value', SharedLinkSettingsRemoveExpirationDetails._previous_value_validator), + ('shared_content_access_level', SharedLinkSettingsRemoveExpirationDetails.shared_content_access_level.validator), + ('shared_content_link', SharedLinkSettingsRemoveExpirationDetails.shared_content_link.validator), + ('previous_value', SharedLinkSettingsRemoveExpirationDetails.previous_value.validator), ] -SharedLinkSettingsRemoveExpirationType._description_validator = bv.String() +SharedLinkSettingsRemoveExpirationType.description.validator = bv.String() SharedLinkSettingsRemoveExpirationType._all_field_names_ = set(['description']) -SharedLinkSettingsRemoveExpirationType._all_fields_ = [('description', SharedLinkSettingsRemoveExpirationType._description_validator)] +SharedLinkSettingsRemoveExpirationType._all_fields_ = [('description', SharedLinkSettingsRemoveExpirationType.description.validator)] -SharedLinkSettingsRemovePasswordDetails._shared_content_access_level_validator = sharing.AccessLevel_validator -SharedLinkSettingsRemovePasswordDetails._shared_content_link_validator = bv.Nullable(bv.String()) +SharedLinkSettingsRemovePasswordDetails.shared_content_access_level.validator = sharing.AccessLevel_validator +SharedLinkSettingsRemovePasswordDetails.shared_content_link.validator = bv.Nullable(bv.String()) SharedLinkSettingsRemovePasswordDetails._all_field_names_ = set([ 'shared_content_access_level', 'shared_content_link', ]) SharedLinkSettingsRemovePasswordDetails._all_fields_ = [ - ('shared_content_access_level', SharedLinkSettingsRemovePasswordDetails._shared_content_access_level_validator), - ('shared_content_link', SharedLinkSettingsRemovePasswordDetails._shared_content_link_validator), + ('shared_content_access_level', SharedLinkSettingsRemovePasswordDetails.shared_content_access_level.validator), + ('shared_content_link', SharedLinkSettingsRemovePasswordDetails.shared_content_link.validator), ] -SharedLinkSettingsRemovePasswordType._description_validator = bv.String() +SharedLinkSettingsRemovePasswordType.description.validator = bv.String() SharedLinkSettingsRemovePasswordType._all_field_names_ = set(['description']) -SharedLinkSettingsRemovePasswordType._all_fields_ = [('description', SharedLinkSettingsRemovePasswordType._description_validator)] +SharedLinkSettingsRemovePasswordType._all_fields_ = [('description', SharedLinkSettingsRemovePasswordType.description.validator)] -SharedLinkShareDetails._shared_link_owner_validator = bv.Nullable(UserLogInfo_validator) -SharedLinkShareDetails._external_users_validator = bv.Nullable(bv.List(ExternalUserLogInfo_validator)) +SharedLinkShareDetails.shared_link_owner.validator = bv.Nullable(UserLogInfo_validator) +SharedLinkShareDetails.external_users.validator = bv.Nullable(bv.List(ExternalUserLogInfo_validator)) SharedLinkShareDetails._all_field_names_ = set([ 'shared_link_owner', 'external_users', ]) SharedLinkShareDetails._all_fields_ = [ - ('shared_link_owner', SharedLinkShareDetails._shared_link_owner_validator), - ('external_users', SharedLinkShareDetails._external_users_validator), + ('shared_link_owner', SharedLinkShareDetails.shared_link_owner.validator), + ('external_users', SharedLinkShareDetails.external_users.validator), ] -SharedLinkShareType._description_validator = bv.String() +SharedLinkShareType.description.validator = bv.String() SharedLinkShareType._all_field_names_ = set(['description']) -SharedLinkShareType._all_fields_ = [('description', SharedLinkShareType._description_validator)] +SharedLinkShareType._all_fields_ = [('description', SharedLinkShareType.description.validator)] -SharedLinkViewDetails._shared_link_owner_validator = bv.Nullable(UserLogInfo_validator) +SharedLinkViewDetails.shared_link_owner.validator = bv.Nullable(UserLogInfo_validator) SharedLinkViewDetails._all_field_names_ = set(['shared_link_owner']) -SharedLinkViewDetails._all_fields_ = [('shared_link_owner', SharedLinkViewDetails._shared_link_owner_validator)] +SharedLinkViewDetails._all_fields_ = [('shared_link_owner', SharedLinkViewDetails.shared_link_owner.validator)] -SharedLinkViewType._description_validator = bv.String() +SharedLinkViewType.description.validator = bv.String() SharedLinkViewType._all_field_names_ = set(['description']) -SharedLinkViewType._all_fields_ = [('description', SharedLinkViewType._description_validator)] +SharedLinkViewType._all_fields_ = [('description', SharedLinkViewType.description.validator)] SharedLinkVisibility._no_one_validator = bv.Void() SharedLinkVisibility._password_validator = bv.Void() @@ -109056,54 +76026,54 @@ def __repr__(self): SharedNoteOpenedDetails._all_field_names_ = set([]) SharedNoteOpenedDetails._all_fields_ = [] -SharedNoteOpenedType._description_validator = bv.String() +SharedNoteOpenedType.description.validator = bv.String() SharedNoteOpenedType._all_field_names_ = set(['description']) -SharedNoteOpenedType._all_fields_ = [('description', SharedNoteOpenedType._description_validator)] +SharedNoteOpenedType._all_fields_ = [('description', SharedNoteOpenedType.description.validator)] -SharingChangeFolderJoinPolicyDetails._new_value_validator = SharingFolderJoinPolicy_validator -SharingChangeFolderJoinPolicyDetails._previous_value_validator = bv.Nullable(SharingFolderJoinPolicy_validator) +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), + ('new_value', SharingChangeFolderJoinPolicyDetails.new_value.validator), + ('previous_value', SharingChangeFolderJoinPolicyDetails.previous_value.validator), ] -SharingChangeFolderJoinPolicyType._description_validator = bv.String() +SharingChangeFolderJoinPolicyType.description.validator = bv.String() SharingChangeFolderJoinPolicyType._all_field_names_ = set(['description']) -SharingChangeFolderJoinPolicyType._all_fields_ = [('description', SharingChangeFolderJoinPolicyType._description_validator)] +SharingChangeFolderJoinPolicyType._all_fields_ = [('description', SharingChangeFolderJoinPolicyType.description.validator)] -SharingChangeLinkPolicyDetails._new_value_validator = SharingLinkPolicy_validator -SharingChangeLinkPolicyDetails._previous_value_validator = bv.Nullable(SharingLinkPolicy_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), + ('new_value', SharingChangeLinkPolicyDetails.new_value.validator), + ('previous_value', SharingChangeLinkPolicyDetails.previous_value.validator), ] -SharingChangeLinkPolicyType._description_validator = bv.String() +SharingChangeLinkPolicyType.description.validator = bv.String() SharingChangeLinkPolicyType._all_field_names_ = set(['description']) -SharingChangeLinkPolicyType._all_fields_ = [('description', SharingChangeLinkPolicyType._description_validator)] +SharingChangeLinkPolicyType._all_fields_ = [('description', SharingChangeLinkPolicyType.description.validator)] -SharingChangeMemberPolicyDetails._new_value_validator = SharingMemberPolicy_validator -SharingChangeMemberPolicyDetails._previous_value_validator = bv.Nullable(SharingMemberPolicy_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), + ('new_value', SharingChangeMemberPolicyDetails.new_value.validator), + ('previous_value', SharingChangeMemberPolicyDetails.previous_value.validator), ] -SharingChangeMemberPolicyType._description_validator = bv.String() +SharingChangeMemberPolicyType.description.validator = bv.String() SharingChangeMemberPolicyType._all_field_names_ = set(['description']) -SharingChangeMemberPolicyType._all_fields_ = [('description', SharingChangeMemberPolicyType._description_validator)] +SharingChangeMemberPolicyType._all_fields_ = [('description', SharingChangeMemberPolicyType.description.validator)] SharingFolderJoinPolicy._from_anyone_validator = bv.Void() SharingFolderJoinPolicy._from_team_only_validator = bv.Void() @@ -109150,130 +76120,130 @@ def __repr__(self): SharingMemberPolicy.forbid_with_exclusions = SharingMemberPolicy('forbid_with_exclusions') SharingMemberPolicy.other = SharingMemberPolicy('other') -ShmodelDisableDownloadsDetails._shared_link_owner_validator = bv.Nullable(UserLogInfo_validator) +ShmodelDisableDownloadsDetails.shared_link_owner.validator = bv.Nullable(UserLogInfo_validator) ShmodelDisableDownloadsDetails._all_field_names_ = set(['shared_link_owner']) -ShmodelDisableDownloadsDetails._all_fields_ = [('shared_link_owner', ShmodelDisableDownloadsDetails._shared_link_owner_validator)] +ShmodelDisableDownloadsDetails._all_fields_ = [('shared_link_owner', ShmodelDisableDownloadsDetails.shared_link_owner.validator)] -ShmodelDisableDownloadsType._description_validator = bv.String() +ShmodelDisableDownloadsType.description.validator = bv.String() ShmodelDisableDownloadsType._all_field_names_ = set(['description']) -ShmodelDisableDownloadsType._all_fields_ = [('description', ShmodelDisableDownloadsType._description_validator)] +ShmodelDisableDownloadsType._all_fields_ = [('description', ShmodelDisableDownloadsType.description.validator)] -ShmodelEnableDownloadsDetails._shared_link_owner_validator = bv.Nullable(UserLogInfo_validator) +ShmodelEnableDownloadsDetails.shared_link_owner.validator = bv.Nullable(UserLogInfo_validator) ShmodelEnableDownloadsDetails._all_field_names_ = set(['shared_link_owner']) -ShmodelEnableDownloadsDetails._all_fields_ = [('shared_link_owner', ShmodelEnableDownloadsDetails._shared_link_owner_validator)] +ShmodelEnableDownloadsDetails._all_fields_ = [('shared_link_owner', ShmodelEnableDownloadsDetails.shared_link_owner.validator)] -ShmodelEnableDownloadsType._description_validator = bv.String() +ShmodelEnableDownloadsType.description.validator = bv.String() ShmodelEnableDownloadsType._all_field_names_ = set(['description']) -ShmodelEnableDownloadsType._all_fields_ = [('description', ShmodelEnableDownloadsType._description_validator)] +ShmodelEnableDownloadsType._all_fields_ = [('description', ShmodelEnableDownloadsType.description.validator)] ShmodelGroupShareDetails._all_field_names_ = set([]) ShmodelGroupShareDetails._all_fields_ = [] -ShmodelGroupShareType._description_validator = bv.String() +ShmodelGroupShareType.description.validator = bv.String() ShmodelGroupShareType._all_field_names_ = set(['description']) -ShmodelGroupShareType._all_fields_ = [('description', ShmodelGroupShareType._description_validator)] +ShmodelGroupShareType._all_fields_ = [('description', ShmodelGroupShareType.description.validator)] -ShowcaseAccessGrantedDetails._event_uuid_validator = bv.String() +ShowcaseAccessGrantedDetails.event_uuid.validator = bv.String() ShowcaseAccessGrantedDetails._all_field_names_ = set(['event_uuid']) -ShowcaseAccessGrantedDetails._all_fields_ = [('event_uuid', ShowcaseAccessGrantedDetails._event_uuid_validator)] +ShowcaseAccessGrantedDetails._all_fields_ = [('event_uuid', ShowcaseAccessGrantedDetails.event_uuid.validator)] -ShowcaseAccessGrantedType._description_validator = bv.String() +ShowcaseAccessGrantedType.description.validator = bv.String() ShowcaseAccessGrantedType._all_field_names_ = set(['description']) -ShowcaseAccessGrantedType._all_fields_ = [('description', ShowcaseAccessGrantedType._description_validator)] +ShowcaseAccessGrantedType._all_fields_ = [('description', ShowcaseAccessGrantedType.description.validator)] -ShowcaseAddMemberDetails._event_uuid_validator = bv.String() +ShowcaseAddMemberDetails.event_uuid.validator = bv.String() ShowcaseAddMemberDetails._all_field_names_ = set(['event_uuid']) -ShowcaseAddMemberDetails._all_fields_ = [('event_uuid', ShowcaseAddMemberDetails._event_uuid_validator)] +ShowcaseAddMemberDetails._all_fields_ = [('event_uuid', ShowcaseAddMemberDetails.event_uuid.validator)] -ShowcaseAddMemberType._description_validator = bv.String() +ShowcaseAddMemberType.description.validator = bv.String() ShowcaseAddMemberType._all_field_names_ = set(['description']) -ShowcaseAddMemberType._all_fields_ = [('description', ShowcaseAddMemberType._description_validator)] +ShowcaseAddMemberType._all_fields_ = [('description', ShowcaseAddMemberType.description.validator)] -ShowcaseArchivedDetails._event_uuid_validator = bv.String() +ShowcaseArchivedDetails.event_uuid.validator = bv.String() ShowcaseArchivedDetails._all_field_names_ = set(['event_uuid']) -ShowcaseArchivedDetails._all_fields_ = [('event_uuid', ShowcaseArchivedDetails._event_uuid_validator)] +ShowcaseArchivedDetails._all_fields_ = [('event_uuid', ShowcaseArchivedDetails.event_uuid.validator)] -ShowcaseArchivedType._description_validator = bv.String() +ShowcaseArchivedType.description.validator = bv.String() ShowcaseArchivedType._all_field_names_ = set(['description']) -ShowcaseArchivedType._all_fields_ = [('description', ShowcaseArchivedType._description_validator)] +ShowcaseArchivedType._all_fields_ = [('description', ShowcaseArchivedType.description.validator)] -ShowcaseChangeDownloadPolicyDetails._new_value_validator = ShowcaseDownloadPolicy_validator -ShowcaseChangeDownloadPolicyDetails._previous_value_validator = ShowcaseDownloadPolicy_validator +ShowcaseChangeDownloadPolicyDetails.new_value.validator = ShowcaseDownloadPolicy_validator +ShowcaseChangeDownloadPolicyDetails.previous_value.validator = ShowcaseDownloadPolicy_validator ShowcaseChangeDownloadPolicyDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) ShowcaseChangeDownloadPolicyDetails._all_fields_ = [ - ('new_value', ShowcaseChangeDownloadPolicyDetails._new_value_validator), - ('previous_value', ShowcaseChangeDownloadPolicyDetails._previous_value_validator), + ('new_value', ShowcaseChangeDownloadPolicyDetails.new_value.validator), + ('previous_value', ShowcaseChangeDownloadPolicyDetails.previous_value.validator), ] -ShowcaseChangeDownloadPolicyType._description_validator = bv.String() +ShowcaseChangeDownloadPolicyType.description.validator = bv.String() ShowcaseChangeDownloadPolicyType._all_field_names_ = set(['description']) -ShowcaseChangeDownloadPolicyType._all_fields_ = [('description', ShowcaseChangeDownloadPolicyType._description_validator)] +ShowcaseChangeDownloadPolicyType._all_fields_ = [('description', ShowcaseChangeDownloadPolicyType.description.validator)] -ShowcaseChangeEnabledPolicyDetails._new_value_validator = ShowcaseEnabledPolicy_validator -ShowcaseChangeEnabledPolicyDetails._previous_value_validator = ShowcaseEnabledPolicy_validator +ShowcaseChangeEnabledPolicyDetails.new_value.validator = ShowcaseEnabledPolicy_validator +ShowcaseChangeEnabledPolicyDetails.previous_value.validator = ShowcaseEnabledPolicy_validator ShowcaseChangeEnabledPolicyDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) ShowcaseChangeEnabledPolicyDetails._all_fields_ = [ - ('new_value', ShowcaseChangeEnabledPolicyDetails._new_value_validator), - ('previous_value', ShowcaseChangeEnabledPolicyDetails._previous_value_validator), + ('new_value', ShowcaseChangeEnabledPolicyDetails.new_value.validator), + ('previous_value', ShowcaseChangeEnabledPolicyDetails.previous_value.validator), ] -ShowcaseChangeEnabledPolicyType._description_validator = bv.String() +ShowcaseChangeEnabledPolicyType.description.validator = bv.String() ShowcaseChangeEnabledPolicyType._all_field_names_ = set(['description']) -ShowcaseChangeEnabledPolicyType._all_fields_ = [('description', ShowcaseChangeEnabledPolicyType._description_validator)] +ShowcaseChangeEnabledPolicyType._all_fields_ = [('description', ShowcaseChangeEnabledPolicyType.description.validator)] -ShowcaseChangeExternalSharingPolicyDetails._new_value_validator = ShowcaseExternalSharingPolicy_validator -ShowcaseChangeExternalSharingPolicyDetails._previous_value_validator = ShowcaseExternalSharingPolicy_validator +ShowcaseChangeExternalSharingPolicyDetails.new_value.validator = ShowcaseExternalSharingPolicy_validator +ShowcaseChangeExternalSharingPolicyDetails.previous_value.validator = ShowcaseExternalSharingPolicy_validator ShowcaseChangeExternalSharingPolicyDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) ShowcaseChangeExternalSharingPolicyDetails._all_fields_ = [ - ('new_value', ShowcaseChangeExternalSharingPolicyDetails._new_value_validator), - ('previous_value', ShowcaseChangeExternalSharingPolicyDetails._previous_value_validator), + ('new_value', ShowcaseChangeExternalSharingPolicyDetails.new_value.validator), + ('previous_value', ShowcaseChangeExternalSharingPolicyDetails.previous_value.validator), ] -ShowcaseChangeExternalSharingPolicyType._description_validator = bv.String() +ShowcaseChangeExternalSharingPolicyType.description.validator = bv.String() ShowcaseChangeExternalSharingPolicyType._all_field_names_ = set(['description']) -ShowcaseChangeExternalSharingPolicyType._all_fields_ = [('description', ShowcaseChangeExternalSharingPolicyType._description_validator)] +ShowcaseChangeExternalSharingPolicyType._all_fields_ = [('description', ShowcaseChangeExternalSharingPolicyType.description.validator)] -ShowcaseCreatedDetails._event_uuid_validator = bv.String() +ShowcaseCreatedDetails.event_uuid.validator = bv.String() ShowcaseCreatedDetails._all_field_names_ = set(['event_uuid']) -ShowcaseCreatedDetails._all_fields_ = [('event_uuid', ShowcaseCreatedDetails._event_uuid_validator)] +ShowcaseCreatedDetails._all_fields_ = [('event_uuid', ShowcaseCreatedDetails.event_uuid.validator)] -ShowcaseCreatedType._description_validator = bv.String() +ShowcaseCreatedType.description.validator = bv.String() ShowcaseCreatedType._all_field_names_ = set(['description']) -ShowcaseCreatedType._all_fields_ = [('description', ShowcaseCreatedType._description_validator)] +ShowcaseCreatedType._all_fields_ = [('description', ShowcaseCreatedType.description.validator)] -ShowcaseDeleteCommentDetails._event_uuid_validator = bv.String() -ShowcaseDeleteCommentDetails._comment_text_validator = bv.Nullable(bv.String()) +ShowcaseDeleteCommentDetails.event_uuid.validator = bv.String() +ShowcaseDeleteCommentDetails.comment_text.validator = bv.Nullable(bv.String()) ShowcaseDeleteCommentDetails._all_field_names_ = set([ 'event_uuid', 'comment_text', ]) ShowcaseDeleteCommentDetails._all_fields_ = [ - ('event_uuid', ShowcaseDeleteCommentDetails._event_uuid_validator), - ('comment_text', ShowcaseDeleteCommentDetails._comment_text_validator), + ('event_uuid', ShowcaseDeleteCommentDetails.event_uuid.validator), + ('comment_text', ShowcaseDeleteCommentDetails.comment_text.validator), ] -ShowcaseDeleteCommentType._description_validator = bv.String() +ShowcaseDeleteCommentType.description.validator = bv.String() ShowcaseDeleteCommentType._all_field_names_ = set(['description']) -ShowcaseDeleteCommentType._all_fields_ = [('description', ShowcaseDeleteCommentType._description_validator)] +ShowcaseDeleteCommentType._all_fields_ = [('description', ShowcaseDeleteCommentType.description.validator)] -ShowcaseDocumentLogInfo._showcase_id_validator = bv.String() -ShowcaseDocumentLogInfo._showcase_title_validator = bv.String() +ShowcaseDocumentLogInfo.showcase_id.validator = bv.String() +ShowcaseDocumentLogInfo.showcase_title.validator = bv.String() ShowcaseDocumentLogInfo._all_field_names_ = set([ 'showcase_id', 'showcase_title', ]) ShowcaseDocumentLogInfo._all_fields_ = [ - ('showcase_id', ShowcaseDocumentLogInfo._showcase_id_validator), - ('showcase_title', ShowcaseDocumentLogInfo._showcase_title_validator), + ('showcase_id', ShowcaseDocumentLogInfo.showcase_id.validator), + ('showcase_title', ShowcaseDocumentLogInfo.showcase_title.validator), ] ShowcaseDownloadPolicy._disabled_validator = bv.Void() @@ -109289,28 +76259,28 @@ def __repr__(self): ShowcaseDownloadPolicy.enabled = ShowcaseDownloadPolicy('enabled') ShowcaseDownloadPolicy.other = ShowcaseDownloadPolicy('other') -ShowcaseEditCommentDetails._event_uuid_validator = bv.String() -ShowcaseEditCommentDetails._comment_text_validator = bv.Nullable(bv.String()) +ShowcaseEditCommentDetails.event_uuid.validator = bv.String() +ShowcaseEditCommentDetails.comment_text.validator = bv.Nullable(bv.String()) ShowcaseEditCommentDetails._all_field_names_ = set([ 'event_uuid', 'comment_text', ]) ShowcaseEditCommentDetails._all_fields_ = [ - ('event_uuid', ShowcaseEditCommentDetails._event_uuid_validator), - ('comment_text', ShowcaseEditCommentDetails._comment_text_validator), + ('event_uuid', ShowcaseEditCommentDetails.event_uuid.validator), + ('comment_text', ShowcaseEditCommentDetails.comment_text.validator), ] -ShowcaseEditCommentType._description_validator = bv.String() +ShowcaseEditCommentType.description.validator = bv.String() ShowcaseEditCommentType._all_field_names_ = set(['description']) -ShowcaseEditCommentType._all_fields_ = [('description', ShowcaseEditCommentType._description_validator)] +ShowcaseEditCommentType._all_fields_ = [('description', ShowcaseEditCommentType.description.validator)] -ShowcaseEditedDetails._event_uuid_validator = bv.String() +ShowcaseEditedDetails.event_uuid.validator = bv.String() ShowcaseEditedDetails._all_field_names_ = set(['event_uuid']) -ShowcaseEditedDetails._all_fields_ = [('event_uuid', ShowcaseEditedDetails._event_uuid_validator)] +ShowcaseEditedDetails._all_fields_ = [('event_uuid', ShowcaseEditedDetails.event_uuid.validator)] -ShowcaseEditedType._description_validator = bv.String() +ShowcaseEditedType.description.validator = bv.String() ShowcaseEditedType._all_field_names_ = set(['description']) -ShowcaseEditedType._all_fields_ = [('description', ShowcaseEditedType._description_validator)] +ShowcaseEditedType._all_fields_ = [('description', ShowcaseEditedType.description.validator)] ShowcaseEnabledPolicy._disabled_validator = bv.Void() ShowcaseEnabledPolicy._enabled_validator = bv.Void() @@ -109338,230 +76308,230 @@ def __repr__(self): ShowcaseExternalSharingPolicy.enabled = ShowcaseExternalSharingPolicy('enabled') ShowcaseExternalSharingPolicy.other = ShowcaseExternalSharingPolicy('other') -ShowcaseFileAddedDetails._event_uuid_validator = bv.String() +ShowcaseFileAddedDetails.event_uuid.validator = bv.String() ShowcaseFileAddedDetails._all_field_names_ = set(['event_uuid']) -ShowcaseFileAddedDetails._all_fields_ = [('event_uuid', ShowcaseFileAddedDetails._event_uuid_validator)] +ShowcaseFileAddedDetails._all_fields_ = [('event_uuid', ShowcaseFileAddedDetails.event_uuid.validator)] -ShowcaseFileAddedType._description_validator = bv.String() +ShowcaseFileAddedType.description.validator = bv.String() ShowcaseFileAddedType._all_field_names_ = set(['description']) -ShowcaseFileAddedType._all_fields_ = [('description', ShowcaseFileAddedType._description_validator)] +ShowcaseFileAddedType._all_fields_ = [('description', ShowcaseFileAddedType.description.validator)] -ShowcaseFileDownloadDetails._event_uuid_validator = bv.String() -ShowcaseFileDownloadDetails._download_type_validator = bv.String() +ShowcaseFileDownloadDetails.event_uuid.validator = bv.String() +ShowcaseFileDownloadDetails.download_type.validator = bv.String() ShowcaseFileDownloadDetails._all_field_names_ = set([ 'event_uuid', 'download_type', ]) ShowcaseFileDownloadDetails._all_fields_ = [ - ('event_uuid', ShowcaseFileDownloadDetails._event_uuid_validator), - ('download_type', ShowcaseFileDownloadDetails._download_type_validator), + ('event_uuid', ShowcaseFileDownloadDetails.event_uuid.validator), + ('download_type', ShowcaseFileDownloadDetails.download_type.validator), ] -ShowcaseFileDownloadType._description_validator = bv.String() +ShowcaseFileDownloadType.description.validator = bv.String() ShowcaseFileDownloadType._all_field_names_ = set(['description']) -ShowcaseFileDownloadType._all_fields_ = [('description', ShowcaseFileDownloadType._description_validator)] +ShowcaseFileDownloadType._all_fields_ = [('description', ShowcaseFileDownloadType.description.validator)] -ShowcaseFileRemovedDetails._event_uuid_validator = bv.String() +ShowcaseFileRemovedDetails.event_uuid.validator = bv.String() ShowcaseFileRemovedDetails._all_field_names_ = set(['event_uuid']) -ShowcaseFileRemovedDetails._all_fields_ = [('event_uuid', ShowcaseFileRemovedDetails._event_uuid_validator)] +ShowcaseFileRemovedDetails._all_fields_ = [('event_uuid', ShowcaseFileRemovedDetails.event_uuid.validator)] -ShowcaseFileRemovedType._description_validator = bv.String() +ShowcaseFileRemovedType.description.validator = bv.String() ShowcaseFileRemovedType._all_field_names_ = set(['description']) -ShowcaseFileRemovedType._all_fields_ = [('description', ShowcaseFileRemovedType._description_validator)] +ShowcaseFileRemovedType._all_fields_ = [('description', ShowcaseFileRemovedType.description.validator)] -ShowcaseFileViewDetails._event_uuid_validator = bv.String() +ShowcaseFileViewDetails.event_uuid.validator = bv.String() ShowcaseFileViewDetails._all_field_names_ = set(['event_uuid']) -ShowcaseFileViewDetails._all_fields_ = [('event_uuid', ShowcaseFileViewDetails._event_uuid_validator)] +ShowcaseFileViewDetails._all_fields_ = [('event_uuid', ShowcaseFileViewDetails.event_uuid.validator)] -ShowcaseFileViewType._description_validator = bv.String() +ShowcaseFileViewType.description.validator = bv.String() ShowcaseFileViewType._all_field_names_ = set(['description']) -ShowcaseFileViewType._all_fields_ = [('description', ShowcaseFileViewType._description_validator)] +ShowcaseFileViewType._all_fields_ = [('description', ShowcaseFileViewType.description.validator)] -ShowcasePermanentlyDeletedDetails._event_uuid_validator = bv.String() +ShowcasePermanentlyDeletedDetails.event_uuid.validator = bv.String() ShowcasePermanentlyDeletedDetails._all_field_names_ = set(['event_uuid']) -ShowcasePermanentlyDeletedDetails._all_fields_ = [('event_uuid', ShowcasePermanentlyDeletedDetails._event_uuid_validator)] +ShowcasePermanentlyDeletedDetails._all_fields_ = [('event_uuid', ShowcasePermanentlyDeletedDetails.event_uuid.validator)] -ShowcasePermanentlyDeletedType._description_validator = bv.String() +ShowcasePermanentlyDeletedType.description.validator = bv.String() ShowcasePermanentlyDeletedType._all_field_names_ = set(['description']) -ShowcasePermanentlyDeletedType._all_fields_ = [('description', ShowcasePermanentlyDeletedType._description_validator)] +ShowcasePermanentlyDeletedType._all_fields_ = [('description', ShowcasePermanentlyDeletedType.description.validator)] -ShowcasePostCommentDetails._event_uuid_validator = bv.String() -ShowcasePostCommentDetails._comment_text_validator = bv.Nullable(bv.String()) +ShowcasePostCommentDetails.event_uuid.validator = bv.String() +ShowcasePostCommentDetails.comment_text.validator = bv.Nullable(bv.String()) ShowcasePostCommentDetails._all_field_names_ = set([ 'event_uuid', 'comment_text', ]) ShowcasePostCommentDetails._all_fields_ = [ - ('event_uuid', ShowcasePostCommentDetails._event_uuid_validator), - ('comment_text', ShowcasePostCommentDetails._comment_text_validator), + ('event_uuid', ShowcasePostCommentDetails.event_uuid.validator), + ('comment_text', ShowcasePostCommentDetails.comment_text.validator), ] -ShowcasePostCommentType._description_validator = bv.String() +ShowcasePostCommentType.description.validator = bv.String() ShowcasePostCommentType._all_field_names_ = set(['description']) -ShowcasePostCommentType._all_fields_ = [('description', ShowcasePostCommentType._description_validator)] +ShowcasePostCommentType._all_fields_ = [('description', ShowcasePostCommentType.description.validator)] -ShowcaseRemoveMemberDetails._event_uuid_validator = bv.String() +ShowcaseRemoveMemberDetails.event_uuid.validator = bv.String() ShowcaseRemoveMemberDetails._all_field_names_ = set(['event_uuid']) -ShowcaseRemoveMemberDetails._all_fields_ = [('event_uuid', ShowcaseRemoveMemberDetails._event_uuid_validator)] +ShowcaseRemoveMemberDetails._all_fields_ = [('event_uuid', ShowcaseRemoveMemberDetails.event_uuid.validator)] -ShowcaseRemoveMemberType._description_validator = bv.String() +ShowcaseRemoveMemberType.description.validator = bv.String() ShowcaseRemoveMemberType._all_field_names_ = set(['description']) -ShowcaseRemoveMemberType._all_fields_ = [('description', ShowcaseRemoveMemberType._description_validator)] +ShowcaseRemoveMemberType._all_fields_ = [('description', ShowcaseRemoveMemberType.description.validator)] -ShowcaseRenamedDetails._event_uuid_validator = bv.String() +ShowcaseRenamedDetails.event_uuid.validator = bv.String() ShowcaseRenamedDetails._all_field_names_ = set(['event_uuid']) -ShowcaseRenamedDetails._all_fields_ = [('event_uuid', ShowcaseRenamedDetails._event_uuid_validator)] +ShowcaseRenamedDetails._all_fields_ = [('event_uuid', ShowcaseRenamedDetails.event_uuid.validator)] -ShowcaseRenamedType._description_validator = bv.String() +ShowcaseRenamedType.description.validator = bv.String() ShowcaseRenamedType._all_field_names_ = set(['description']) -ShowcaseRenamedType._all_fields_ = [('description', ShowcaseRenamedType._description_validator)] +ShowcaseRenamedType._all_fields_ = [('description', ShowcaseRenamedType.description.validator)] -ShowcaseRequestAccessDetails._event_uuid_validator = bv.String() +ShowcaseRequestAccessDetails.event_uuid.validator = bv.String() ShowcaseRequestAccessDetails._all_field_names_ = set(['event_uuid']) -ShowcaseRequestAccessDetails._all_fields_ = [('event_uuid', ShowcaseRequestAccessDetails._event_uuid_validator)] +ShowcaseRequestAccessDetails._all_fields_ = [('event_uuid', ShowcaseRequestAccessDetails.event_uuid.validator)] -ShowcaseRequestAccessType._description_validator = bv.String() +ShowcaseRequestAccessType.description.validator = bv.String() ShowcaseRequestAccessType._all_field_names_ = set(['description']) -ShowcaseRequestAccessType._all_fields_ = [('description', ShowcaseRequestAccessType._description_validator)] +ShowcaseRequestAccessType._all_fields_ = [('description', ShowcaseRequestAccessType.description.validator)] -ShowcaseResolveCommentDetails._event_uuid_validator = bv.String() -ShowcaseResolveCommentDetails._comment_text_validator = bv.Nullable(bv.String()) +ShowcaseResolveCommentDetails.event_uuid.validator = bv.String() +ShowcaseResolveCommentDetails.comment_text.validator = bv.Nullable(bv.String()) ShowcaseResolveCommentDetails._all_field_names_ = set([ 'event_uuid', 'comment_text', ]) ShowcaseResolveCommentDetails._all_fields_ = [ - ('event_uuid', ShowcaseResolveCommentDetails._event_uuid_validator), - ('comment_text', ShowcaseResolveCommentDetails._comment_text_validator), + ('event_uuid', ShowcaseResolveCommentDetails.event_uuid.validator), + ('comment_text', ShowcaseResolveCommentDetails.comment_text.validator), ] -ShowcaseResolveCommentType._description_validator = bv.String() +ShowcaseResolveCommentType.description.validator = bv.String() ShowcaseResolveCommentType._all_field_names_ = set(['description']) -ShowcaseResolveCommentType._all_fields_ = [('description', ShowcaseResolveCommentType._description_validator)] +ShowcaseResolveCommentType._all_fields_ = [('description', ShowcaseResolveCommentType.description.validator)] -ShowcaseRestoredDetails._event_uuid_validator = bv.String() +ShowcaseRestoredDetails.event_uuid.validator = bv.String() ShowcaseRestoredDetails._all_field_names_ = set(['event_uuid']) -ShowcaseRestoredDetails._all_fields_ = [('event_uuid', ShowcaseRestoredDetails._event_uuid_validator)] +ShowcaseRestoredDetails._all_fields_ = [('event_uuid', ShowcaseRestoredDetails.event_uuid.validator)] -ShowcaseRestoredType._description_validator = bv.String() +ShowcaseRestoredType.description.validator = bv.String() ShowcaseRestoredType._all_field_names_ = set(['description']) -ShowcaseRestoredType._all_fields_ = [('description', ShowcaseRestoredType._description_validator)] +ShowcaseRestoredType._all_fields_ = [('description', ShowcaseRestoredType.description.validator)] -ShowcaseTrashedDeprecatedDetails._event_uuid_validator = bv.String() +ShowcaseTrashedDeprecatedDetails.event_uuid.validator = bv.String() ShowcaseTrashedDeprecatedDetails._all_field_names_ = set(['event_uuid']) -ShowcaseTrashedDeprecatedDetails._all_fields_ = [('event_uuid', ShowcaseTrashedDeprecatedDetails._event_uuid_validator)] +ShowcaseTrashedDeprecatedDetails._all_fields_ = [('event_uuid', ShowcaseTrashedDeprecatedDetails.event_uuid.validator)] -ShowcaseTrashedDeprecatedType._description_validator = bv.String() +ShowcaseTrashedDeprecatedType.description.validator = bv.String() ShowcaseTrashedDeprecatedType._all_field_names_ = set(['description']) -ShowcaseTrashedDeprecatedType._all_fields_ = [('description', ShowcaseTrashedDeprecatedType._description_validator)] +ShowcaseTrashedDeprecatedType._all_fields_ = [('description', ShowcaseTrashedDeprecatedType.description.validator)] -ShowcaseTrashedDetails._event_uuid_validator = bv.String() +ShowcaseTrashedDetails.event_uuid.validator = bv.String() ShowcaseTrashedDetails._all_field_names_ = set(['event_uuid']) -ShowcaseTrashedDetails._all_fields_ = [('event_uuid', ShowcaseTrashedDetails._event_uuid_validator)] +ShowcaseTrashedDetails._all_fields_ = [('event_uuid', ShowcaseTrashedDetails.event_uuid.validator)] -ShowcaseTrashedType._description_validator = bv.String() +ShowcaseTrashedType.description.validator = bv.String() ShowcaseTrashedType._all_field_names_ = set(['description']) -ShowcaseTrashedType._all_fields_ = [('description', ShowcaseTrashedType._description_validator)] +ShowcaseTrashedType._all_fields_ = [('description', ShowcaseTrashedType.description.validator)] -ShowcaseUnresolveCommentDetails._event_uuid_validator = bv.String() -ShowcaseUnresolveCommentDetails._comment_text_validator = bv.Nullable(bv.String()) +ShowcaseUnresolveCommentDetails.event_uuid.validator = bv.String() +ShowcaseUnresolveCommentDetails.comment_text.validator = bv.Nullable(bv.String()) ShowcaseUnresolveCommentDetails._all_field_names_ = set([ 'event_uuid', 'comment_text', ]) ShowcaseUnresolveCommentDetails._all_fields_ = [ - ('event_uuid', ShowcaseUnresolveCommentDetails._event_uuid_validator), - ('comment_text', ShowcaseUnresolveCommentDetails._comment_text_validator), + ('event_uuid', ShowcaseUnresolveCommentDetails.event_uuid.validator), + ('comment_text', ShowcaseUnresolveCommentDetails.comment_text.validator), ] -ShowcaseUnresolveCommentType._description_validator = bv.String() +ShowcaseUnresolveCommentType.description.validator = bv.String() ShowcaseUnresolveCommentType._all_field_names_ = set(['description']) -ShowcaseUnresolveCommentType._all_fields_ = [('description', ShowcaseUnresolveCommentType._description_validator)] +ShowcaseUnresolveCommentType._all_fields_ = [('description', ShowcaseUnresolveCommentType.description.validator)] -ShowcaseUntrashedDeprecatedDetails._event_uuid_validator = bv.String() +ShowcaseUntrashedDeprecatedDetails.event_uuid.validator = bv.String() ShowcaseUntrashedDeprecatedDetails._all_field_names_ = set(['event_uuid']) -ShowcaseUntrashedDeprecatedDetails._all_fields_ = [('event_uuid', ShowcaseUntrashedDeprecatedDetails._event_uuid_validator)] +ShowcaseUntrashedDeprecatedDetails._all_fields_ = [('event_uuid', ShowcaseUntrashedDeprecatedDetails.event_uuid.validator)] -ShowcaseUntrashedDeprecatedType._description_validator = bv.String() +ShowcaseUntrashedDeprecatedType.description.validator = bv.String() ShowcaseUntrashedDeprecatedType._all_field_names_ = set(['description']) -ShowcaseUntrashedDeprecatedType._all_fields_ = [('description', ShowcaseUntrashedDeprecatedType._description_validator)] +ShowcaseUntrashedDeprecatedType._all_fields_ = [('description', ShowcaseUntrashedDeprecatedType.description.validator)] -ShowcaseUntrashedDetails._event_uuid_validator = bv.String() +ShowcaseUntrashedDetails.event_uuid.validator = bv.String() ShowcaseUntrashedDetails._all_field_names_ = set(['event_uuid']) -ShowcaseUntrashedDetails._all_fields_ = [('event_uuid', ShowcaseUntrashedDetails._event_uuid_validator)] +ShowcaseUntrashedDetails._all_fields_ = [('event_uuid', ShowcaseUntrashedDetails.event_uuid.validator)] -ShowcaseUntrashedType._description_validator = bv.String() +ShowcaseUntrashedType.description.validator = bv.String() ShowcaseUntrashedType._all_field_names_ = set(['description']) -ShowcaseUntrashedType._all_fields_ = [('description', ShowcaseUntrashedType._description_validator)] +ShowcaseUntrashedType._all_fields_ = [('description', ShowcaseUntrashedType.description.validator)] -ShowcaseViewDetails._event_uuid_validator = bv.String() +ShowcaseViewDetails.event_uuid.validator = bv.String() ShowcaseViewDetails._all_field_names_ = set(['event_uuid']) -ShowcaseViewDetails._all_fields_ = [('event_uuid', ShowcaseViewDetails._event_uuid_validator)] +ShowcaseViewDetails._all_fields_ = [('event_uuid', ShowcaseViewDetails.event_uuid.validator)] -ShowcaseViewType._description_validator = bv.String() +ShowcaseViewType.description.validator = bv.String() ShowcaseViewType._all_field_names_ = set(['description']) -ShowcaseViewType._all_fields_ = [('description', ShowcaseViewType._description_validator)] +ShowcaseViewType._all_fields_ = [('description', ShowcaseViewType.description.validator)] SignInAsSessionEndDetails._all_field_names_ = set([]) SignInAsSessionEndDetails._all_fields_ = [] -SignInAsSessionEndType._description_validator = bv.String() +SignInAsSessionEndType.description.validator = bv.String() SignInAsSessionEndType._all_field_names_ = set(['description']) -SignInAsSessionEndType._all_fields_ = [('description', SignInAsSessionEndType._description_validator)] +SignInAsSessionEndType._all_fields_ = [('description', SignInAsSessionEndType.description.validator)] SignInAsSessionStartDetails._all_field_names_ = set([]) SignInAsSessionStartDetails._all_fields_ = [] -SignInAsSessionStartType._description_validator = bv.String() +SignInAsSessionStartType.description.validator = bv.String() SignInAsSessionStartType._all_field_names_ = set(['description']) -SignInAsSessionStartType._all_fields_ = [('description', SignInAsSessionStartType._description_validator)] +SignInAsSessionStartType._all_fields_ = [('description', SignInAsSessionStartType.description.validator)] -SmartSyncChangePolicyDetails._new_value_validator = bv.Nullable(team_policies.SmartSyncPolicy_validator) -SmartSyncChangePolicyDetails._previous_value_validator = bv.Nullable(team_policies.SmartSyncPolicy_validator) +SmartSyncChangePolicyDetails.new_value.validator = bv.Nullable(team_policies.SmartSyncPolicy_validator) +SmartSyncChangePolicyDetails.previous_value.validator = bv.Nullable(team_policies.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), + ('new_value', SmartSyncChangePolicyDetails.new_value.validator), + ('previous_value', SmartSyncChangePolicyDetails.previous_value.validator), ] -SmartSyncChangePolicyType._description_validator = bv.String() +SmartSyncChangePolicyType.description.validator = bv.String() SmartSyncChangePolicyType._all_field_names_ = set(['description']) -SmartSyncChangePolicyType._all_fields_ = [('description', SmartSyncChangePolicyType._description_validator)] +SmartSyncChangePolicyType._all_fields_ = [('description', SmartSyncChangePolicyType.description.validator)] SmartSyncCreateAdminPrivilegeReportDetails._all_field_names_ = set([]) SmartSyncCreateAdminPrivilegeReportDetails._all_fields_ = [] -SmartSyncCreateAdminPrivilegeReportType._description_validator = bv.String() +SmartSyncCreateAdminPrivilegeReportType.description.validator = bv.String() SmartSyncCreateAdminPrivilegeReportType._all_field_names_ = set(['description']) -SmartSyncCreateAdminPrivilegeReportType._all_fields_ = [('description', SmartSyncCreateAdminPrivilegeReportType._description_validator)] +SmartSyncCreateAdminPrivilegeReportType._all_fields_ = [('description', SmartSyncCreateAdminPrivilegeReportType.description.validator)] -SmartSyncNotOptOutDetails._previous_value_validator = SmartSyncOptOutPolicy_validator -SmartSyncNotOptOutDetails._new_value_validator = SmartSyncOptOutPolicy_validator +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), + ('previous_value', SmartSyncNotOptOutDetails.previous_value.validator), + ('new_value', SmartSyncNotOptOutDetails.new_value.validator), ] -SmartSyncNotOptOutType._description_validator = bv.String() +SmartSyncNotOptOutType.description.validator = bv.String() SmartSyncNotOptOutType._all_field_names_ = set(['description']) -SmartSyncNotOptOutType._all_fields_ = [('description', SmartSyncNotOptOutType._description_validator)] +SmartSyncNotOptOutType._all_fields_ = [('description', SmartSyncNotOptOutType.description.validator)] -SmartSyncOptOutDetails._previous_value_validator = SmartSyncOptOutPolicy_validator -SmartSyncOptOutDetails._new_value_validator = SmartSyncOptOutPolicy_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), + ('previous_value', SmartSyncOptOutDetails.previous_value.validator), + ('new_value', SmartSyncOptOutDetails.new_value.validator), ] SmartSyncOptOutPolicy._default_validator = bv.Void() @@ -109577,24 +76547,24 @@ def __repr__(self): SmartSyncOptOutPolicy.opted_out = SmartSyncOptOutPolicy('opted_out') SmartSyncOptOutPolicy.other = SmartSyncOptOutPolicy('other') -SmartSyncOptOutType._description_validator = bv.String() +SmartSyncOptOutType.description.validator = bv.String() SmartSyncOptOutType._all_field_names_ = set(['description']) -SmartSyncOptOutType._all_fields_ = [('description', SmartSyncOptOutType._description_validator)] +SmartSyncOptOutType._all_fields_ = [('description', SmartSyncOptOutType.description.validator)] -SmarterSmartSyncPolicyChangedDetails._previous_value_validator = team_policies.SmarterSmartSyncPolicyState_validator -SmarterSmartSyncPolicyChangedDetails._new_value_validator = team_policies.SmarterSmartSyncPolicyState_validator +SmarterSmartSyncPolicyChangedDetails.previous_value.validator = team_policies.SmarterSmartSyncPolicyState_validator +SmarterSmartSyncPolicyChangedDetails.new_value.validator = team_policies.SmarterSmartSyncPolicyState_validator SmarterSmartSyncPolicyChangedDetails._all_field_names_ = set([ 'previous_value', 'new_value', ]) SmarterSmartSyncPolicyChangedDetails._all_fields_ = [ - ('previous_value', SmarterSmartSyncPolicyChangedDetails._previous_value_validator), - ('new_value', SmarterSmartSyncPolicyChangedDetails._new_value_validator), + ('previous_value', SmarterSmartSyncPolicyChangedDetails.previous_value.validator), + ('new_value', SmarterSmartSyncPolicyChangedDetails.new_value.validator), ] -SmarterSmartSyncPolicyChangedType._description_validator = bv.String() +SmarterSmartSyncPolicyChangedType.description.validator = bv.String() SmarterSmartSyncPolicyChangedType._all_field_names_ = set(['description']) -SmarterSmartSyncPolicyChangedType._all_fields_ = [('description', SmarterSmartSyncPolicyChangedType._description_validator)] +SmarterSmartSyncPolicyChangedType._all_fields_ = [('description', SmarterSmartSyncPolicyChangedType.description.validator)] SpaceCapsType._hard_validator = bv.Void() SpaceCapsType._off_validator = bv.Void() @@ -109628,166 +76598,166 @@ def __repr__(self): SpaceLimitsStatus.within_quota = SpaceLimitsStatus('within_quota') SpaceLimitsStatus.other = SpaceLimitsStatus('other') -SsoAddCertDetails._certificate_details_validator = Certificate_validator +SsoAddCertDetails.certificate_details.validator = Certificate_validator SsoAddCertDetails._all_field_names_ = set(['certificate_details']) -SsoAddCertDetails._all_fields_ = [('certificate_details', SsoAddCertDetails._certificate_details_validator)] +SsoAddCertDetails._all_fields_ = [('certificate_details', SsoAddCertDetails.certificate_details.validator)] -SsoAddCertType._description_validator = bv.String() +SsoAddCertType.description.validator = bv.String() SsoAddCertType._all_field_names_ = set(['description']) -SsoAddCertType._all_fields_ = [('description', SsoAddCertType._description_validator)] +SsoAddCertType._all_fields_ = [('description', SsoAddCertType.description.validator)] -SsoAddLoginUrlDetails._new_value_validator = bv.String() +SsoAddLoginUrlDetails.new_value.validator = bv.String() SsoAddLoginUrlDetails._all_field_names_ = set(['new_value']) -SsoAddLoginUrlDetails._all_fields_ = [('new_value', SsoAddLoginUrlDetails._new_value_validator)] +SsoAddLoginUrlDetails._all_fields_ = [('new_value', SsoAddLoginUrlDetails.new_value.validator)] -SsoAddLoginUrlType._description_validator = bv.String() +SsoAddLoginUrlType.description.validator = bv.String() SsoAddLoginUrlType._all_field_names_ = set(['description']) -SsoAddLoginUrlType._all_fields_ = [('description', SsoAddLoginUrlType._description_validator)] +SsoAddLoginUrlType._all_fields_ = [('description', SsoAddLoginUrlType.description.validator)] -SsoAddLogoutUrlDetails._new_value_validator = bv.Nullable(bv.String()) +SsoAddLogoutUrlDetails.new_value.validator = bv.Nullable(bv.String()) SsoAddLogoutUrlDetails._all_field_names_ = set(['new_value']) -SsoAddLogoutUrlDetails._all_fields_ = [('new_value', SsoAddLogoutUrlDetails._new_value_validator)] +SsoAddLogoutUrlDetails._all_fields_ = [('new_value', SsoAddLogoutUrlDetails.new_value.validator)] -SsoAddLogoutUrlType._description_validator = bv.String() +SsoAddLogoutUrlType.description.validator = bv.String() SsoAddLogoutUrlType._all_field_names_ = set(['description']) -SsoAddLogoutUrlType._all_fields_ = [('description', SsoAddLogoutUrlType._description_validator)] +SsoAddLogoutUrlType._all_fields_ = [('description', SsoAddLogoutUrlType.description.validator)] -SsoChangeCertDetails._previous_certificate_details_validator = bv.Nullable(Certificate_validator) -SsoChangeCertDetails._new_certificate_details_validator = Certificate_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), + ('previous_certificate_details', SsoChangeCertDetails.previous_certificate_details.validator), + ('new_certificate_details', SsoChangeCertDetails.new_certificate_details.validator), ] -SsoChangeCertType._description_validator = bv.String() +SsoChangeCertType.description.validator = bv.String() SsoChangeCertType._all_field_names_ = set(['description']) -SsoChangeCertType._all_fields_ = [('description', SsoChangeCertType._description_validator)] +SsoChangeCertType._all_fields_ = [('description', SsoChangeCertType.description.validator)] -SsoChangeLoginUrlDetails._previous_value_validator = bv.String() -SsoChangeLoginUrlDetails._new_value_validator = bv.String() +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), + ('previous_value', SsoChangeLoginUrlDetails.previous_value.validator), + ('new_value', SsoChangeLoginUrlDetails.new_value.validator), ] -SsoChangeLoginUrlType._description_validator = bv.String() +SsoChangeLoginUrlType.description.validator = bv.String() SsoChangeLoginUrlType._all_field_names_ = set(['description']) -SsoChangeLoginUrlType._all_fields_ = [('description', SsoChangeLoginUrlType._description_validator)] +SsoChangeLoginUrlType._all_fields_ = [('description', SsoChangeLoginUrlType.description.validator)] -SsoChangeLogoutUrlDetails._previous_value_validator = bv.Nullable(bv.String()) -SsoChangeLogoutUrlDetails._new_value_validator = bv.Nullable(bv.String()) +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), + ('previous_value', SsoChangeLogoutUrlDetails.previous_value.validator), + ('new_value', SsoChangeLogoutUrlDetails.new_value.validator), ] -SsoChangeLogoutUrlType._description_validator = bv.String() +SsoChangeLogoutUrlType.description.validator = bv.String() SsoChangeLogoutUrlType._all_field_names_ = set(['description']) -SsoChangeLogoutUrlType._all_fields_ = [('description', SsoChangeLogoutUrlType._description_validator)] +SsoChangeLogoutUrlType._all_fields_ = [('description', SsoChangeLogoutUrlType.description.validator)] -SsoChangePolicyDetails._new_value_validator = team_policies.SsoPolicy_validator -SsoChangePolicyDetails._previous_value_validator = bv.Nullable(team_policies.SsoPolicy_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), + ('new_value', SsoChangePolicyDetails.new_value.validator), + ('previous_value', SsoChangePolicyDetails.previous_value.validator), ] -SsoChangePolicyType._description_validator = bv.String() +SsoChangePolicyType.description.validator = bv.String() SsoChangePolicyType._all_field_names_ = set(['description']) -SsoChangePolicyType._all_fields_ = [('description', SsoChangePolicyType._description_validator)] +SsoChangePolicyType._all_fields_ = [('description', SsoChangePolicyType.description.validator)] -SsoChangeSamlIdentityModeDetails._previous_value_validator = bv.Int64() -SsoChangeSamlIdentityModeDetails._new_value_validator = bv.Int64() +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), + ('previous_value', SsoChangeSamlIdentityModeDetails.previous_value.validator), + ('new_value', SsoChangeSamlIdentityModeDetails.new_value.validator), ] -SsoChangeSamlIdentityModeType._description_validator = bv.String() +SsoChangeSamlIdentityModeType.description.validator = bv.String() SsoChangeSamlIdentityModeType._all_field_names_ = set(['description']) -SsoChangeSamlIdentityModeType._all_fields_ = [('description', SsoChangeSamlIdentityModeType._description_validator)] +SsoChangeSamlIdentityModeType._all_fields_ = [('description', SsoChangeSamlIdentityModeType.description.validator)] -SsoErrorDetails._error_details_validator = FailureDetailsLogInfo_validator +SsoErrorDetails.error_details.validator = FailureDetailsLogInfo_validator SsoErrorDetails._all_field_names_ = set(['error_details']) -SsoErrorDetails._all_fields_ = [('error_details', SsoErrorDetails._error_details_validator)] +SsoErrorDetails._all_fields_ = [('error_details', SsoErrorDetails.error_details.validator)] -SsoErrorType._description_validator = bv.String() +SsoErrorType.description.validator = bv.String() SsoErrorType._all_field_names_ = set(['description']) -SsoErrorType._all_fields_ = [('description', SsoErrorType._description_validator)] +SsoErrorType._all_fields_ = [('description', SsoErrorType.description.validator)] SsoRemoveCertDetails._all_field_names_ = set([]) SsoRemoveCertDetails._all_fields_ = [] -SsoRemoveCertType._description_validator = bv.String() +SsoRemoveCertType.description.validator = bv.String() SsoRemoveCertType._all_field_names_ = set(['description']) -SsoRemoveCertType._all_fields_ = [('description', SsoRemoveCertType._description_validator)] +SsoRemoveCertType._all_fields_ = [('description', SsoRemoveCertType.description.validator)] -SsoRemoveLoginUrlDetails._previous_value_validator = bv.String() +SsoRemoveLoginUrlDetails.previous_value.validator = bv.String() SsoRemoveLoginUrlDetails._all_field_names_ = set(['previous_value']) -SsoRemoveLoginUrlDetails._all_fields_ = [('previous_value', SsoRemoveLoginUrlDetails._previous_value_validator)] +SsoRemoveLoginUrlDetails._all_fields_ = [('previous_value', SsoRemoveLoginUrlDetails.previous_value.validator)] -SsoRemoveLoginUrlType._description_validator = bv.String() +SsoRemoveLoginUrlType.description.validator = bv.String() SsoRemoveLoginUrlType._all_field_names_ = set(['description']) -SsoRemoveLoginUrlType._all_fields_ = [('description', SsoRemoveLoginUrlType._description_validator)] +SsoRemoveLoginUrlType._all_fields_ = [('description', SsoRemoveLoginUrlType.description.validator)] -SsoRemoveLogoutUrlDetails._previous_value_validator = bv.String() +SsoRemoveLogoutUrlDetails.previous_value.validator = bv.String() SsoRemoveLogoutUrlDetails._all_field_names_ = set(['previous_value']) -SsoRemoveLogoutUrlDetails._all_fields_ = [('previous_value', SsoRemoveLogoutUrlDetails._previous_value_validator)] +SsoRemoveLogoutUrlDetails._all_fields_ = [('previous_value', SsoRemoveLogoutUrlDetails.previous_value.validator)] -SsoRemoveLogoutUrlType._description_validator = bv.String() +SsoRemoveLogoutUrlType.description.validator = bv.String() SsoRemoveLogoutUrlType._all_field_names_ = set(['description']) -SsoRemoveLogoutUrlType._all_fields_ = [('description', SsoRemoveLogoutUrlType._description_validator)] +SsoRemoveLogoutUrlType._all_fields_ = [('description', SsoRemoveLogoutUrlType.description.validator)] -StartedEnterpriseAdminSessionDetails._federation_extra_details_validator = FedExtraDetails_validator +StartedEnterpriseAdminSessionDetails.federation_extra_details.validator = FedExtraDetails_validator StartedEnterpriseAdminSessionDetails._all_field_names_ = set(['federation_extra_details']) -StartedEnterpriseAdminSessionDetails._all_fields_ = [('federation_extra_details', StartedEnterpriseAdminSessionDetails._federation_extra_details_validator)] +StartedEnterpriseAdminSessionDetails._all_fields_ = [('federation_extra_details', StartedEnterpriseAdminSessionDetails.federation_extra_details.validator)] -StartedEnterpriseAdminSessionType._description_validator = bv.String() +StartedEnterpriseAdminSessionType.description.validator = bv.String() StartedEnterpriseAdminSessionType._all_field_names_ = set(['description']) -StartedEnterpriseAdminSessionType._all_fields_ = [('description', StartedEnterpriseAdminSessionType._description_validator)] +StartedEnterpriseAdminSessionType._all_fields_ = [('description', StartedEnterpriseAdminSessionType.description.validator)] -TeamActivityCreateReportDetails._start_date_validator = common.DropboxTimestamp_validator -TeamActivityCreateReportDetails._end_date_validator = common.DropboxTimestamp_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), + ('start_date', TeamActivityCreateReportDetails.start_date.validator), + ('end_date', TeamActivityCreateReportDetails.end_date.validator), ] -TeamActivityCreateReportFailDetails._failure_reason_validator = team.TeamReportFailureReason_validator +TeamActivityCreateReportFailDetails.failure_reason.validator = team.TeamReportFailureReason_validator TeamActivityCreateReportFailDetails._all_field_names_ = set(['failure_reason']) -TeamActivityCreateReportFailDetails._all_fields_ = [('failure_reason', TeamActivityCreateReportFailDetails._failure_reason_validator)] +TeamActivityCreateReportFailDetails._all_fields_ = [('failure_reason', TeamActivityCreateReportFailDetails.failure_reason.validator)] -TeamActivityCreateReportFailType._description_validator = bv.String() +TeamActivityCreateReportFailType.description.validator = bv.String() TeamActivityCreateReportFailType._all_field_names_ = set(['description']) -TeamActivityCreateReportFailType._all_fields_ = [('description', TeamActivityCreateReportFailType._description_validator)] +TeamActivityCreateReportFailType._all_fields_ = [('description', TeamActivityCreateReportFailType.description.validator)] -TeamActivityCreateReportType._description_validator = bv.String() +TeamActivityCreateReportType.description.validator = bv.String() TeamActivityCreateReportType._all_field_names_ = set(['description']) -TeamActivityCreateReportType._all_fields_ = [('description', TeamActivityCreateReportType._description_validator)] +TeamActivityCreateReportType._all_fields_ = [('description', TeamActivityCreateReportType.description.validator)] TeamBrandingPolicy._disabled_validator = bv.Void() TeamBrandingPolicy._enabled_validator = bv.Void() @@ -109802,35 +76772,35 @@ def __repr__(self): TeamBrandingPolicy.enabled = TeamBrandingPolicy('enabled') TeamBrandingPolicy.other = TeamBrandingPolicy('other') -TeamBrandingPolicyChangedDetails._new_value_validator = TeamBrandingPolicy_validator -TeamBrandingPolicyChangedDetails._previous_value_validator = TeamBrandingPolicy_validator +TeamBrandingPolicyChangedDetails.new_value.validator = TeamBrandingPolicy_validator +TeamBrandingPolicyChangedDetails.previous_value.validator = TeamBrandingPolicy_validator TeamBrandingPolicyChangedDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) TeamBrandingPolicyChangedDetails._all_fields_ = [ - ('new_value', TeamBrandingPolicyChangedDetails._new_value_validator), - ('previous_value', TeamBrandingPolicyChangedDetails._previous_value_validator), + ('new_value', TeamBrandingPolicyChangedDetails.new_value.validator), + ('previous_value', TeamBrandingPolicyChangedDetails.previous_value.validator), ] -TeamBrandingPolicyChangedType._description_validator = bv.String() +TeamBrandingPolicyChangedType.description.validator = bv.String() TeamBrandingPolicyChangedType._all_field_names_ = set(['description']) -TeamBrandingPolicyChangedType._all_fields_ = [('description', TeamBrandingPolicyChangedType._description_validator)] +TeamBrandingPolicyChangedType._all_fields_ = [('description', TeamBrandingPolicyChangedType.description.validator)] -TeamDetails._team_validator = bv.String() +TeamDetails.team.validator = bv.String() TeamDetails._all_field_names_ = set(['team']) -TeamDetails._all_fields_ = [('team', TeamDetails._team_validator)] - -TeamEvent._timestamp_validator = common.DropboxTimestamp_validator -TeamEvent._event_category_validator = EventCategory_validator -TeamEvent._actor_validator = bv.Nullable(ActorLogInfo_validator) -TeamEvent._origin_validator = bv.Nullable(OriginLogInfo_validator) -TeamEvent._involve_non_team_member_validator = bv.Nullable(bv.Boolean()) -TeamEvent._context_validator = bv.Nullable(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 +TeamDetails._all_fields_ = [('team', TeamDetails.team.validator)] + +TeamEvent.timestamp.validator = common.DropboxTimestamp_validator +TeamEvent.event_category.validator = EventCategory_validator +TeamEvent.actor.validator = bv.Nullable(ActorLogInfo_validator) +TeamEvent.origin.validator = bv.Nullable(OriginLogInfo_validator) +TeamEvent.involve_non_team_member.validator = bv.Nullable(bv.Boolean()) +TeamEvent.context.validator = bv.Nullable(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', @@ -109844,16 +76814,16 @@ def __repr__(self): '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), + ('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), ] TeamExtensionsPolicy._disabled_validator = bv.Void() @@ -109869,82 +76839,82 @@ def __repr__(self): TeamExtensionsPolicy.enabled = TeamExtensionsPolicy('enabled') TeamExtensionsPolicy.other = TeamExtensionsPolicy('other') -TeamExtensionsPolicyChangedDetails._new_value_validator = TeamExtensionsPolicy_validator -TeamExtensionsPolicyChangedDetails._previous_value_validator = TeamExtensionsPolicy_validator +TeamExtensionsPolicyChangedDetails.new_value.validator = TeamExtensionsPolicy_validator +TeamExtensionsPolicyChangedDetails.previous_value.validator = TeamExtensionsPolicy_validator TeamExtensionsPolicyChangedDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) TeamExtensionsPolicyChangedDetails._all_fields_ = [ - ('new_value', TeamExtensionsPolicyChangedDetails._new_value_validator), - ('previous_value', TeamExtensionsPolicyChangedDetails._previous_value_validator), + ('new_value', TeamExtensionsPolicyChangedDetails.new_value.validator), + ('previous_value', TeamExtensionsPolicyChangedDetails.previous_value.validator), ] -TeamExtensionsPolicyChangedType._description_validator = bv.String() +TeamExtensionsPolicyChangedType.description.validator = bv.String() TeamExtensionsPolicyChangedType._all_field_names_ = set(['description']) -TeamExtensionsPolicyChangedType._all_fields_ = [('description', TeamExtensionsPolicyChangedType._description_validator)] +TeamExtensionsPolicyChangedType._all_fields_ = [('description', TeamExtensionsPolicyChangedType.description.validator)] -TeamFolderChangeStatusDetails._new_value_validator = team.TeamFolderStatus_validator -TeamFolderChangeStatusDetails._previous_value_validator = bv.Nullable(team.TeamFolderStatus_validator) +TeamFolderChangeStatusDetails.new_value.validator = team.TeamFolderStatus_validator +TeamFolderChangeStatusDetails.previous_value.validator = bv.Nullable(team.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), + ('new_value', TeamFolderChangeStatusDetails.new_value.validator), + ('previous_value', TeamFolderChangeStatusDetails.previous_value.validator), ] -TeamFolderChangeStatusType._description_validator = bv.String() +TeamFolderChangeStatusType.description.validator = bv.String() TeamFolderChangeStatusType._all_field_names_ = set(['description']) -TeamFolderChangeStatusType._all_fields_ = [('description', TeamFolderChangeStatusType._description_validator)] +TeamFolderChangeStatusType._all_fields_ = [('description', TeamFolderChangeStatusType.description.validator)] TeamFolderCreateDetails._all_field_names_ = set([]) TeamFolderCreateDetails._all_fields_ = [] -TeamFolderCreateType._description_validator = bv.String() +TeamFolderCreateType.description.validator = bv.String() TeamFolderCreateType._all_field_names_ = set(['description']) -TeamFolderCreateType._all_fields_ = [('description', TeamFolderCreateType._description_validator)] +TeamFolderCreateType._all_fields_ = [('description', TeamFolderCreateType.description.validator)] -TeamFolderDowngradeDetails._target_asset_index_validator = bv.UInt64() +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)] +TeamFolderDowngradeDetails._all_fields_ = [('target_asset_index', TeamFolderDowngradeDetails.target_asset_index.validator)] -TeamFolderDowngradeType._description_validator = bv.String() +TeamFolderDowngradeType.description.validator = bv.String() TeamFolderDowngradeType._all_field_names_ = set(['description']) -TeamFolderDowngradeType._all_fields_ = [('description', TeamFolderDowngradeType._description_validator)] +TeamFolderDowngradeType._all_fields_ = [('description', TeamFolderDowngradeType.description.validator)] TeamFolderPermanentlyDeleteDetails._all_field_names_ = set([]) TeamFolderPermanentlyDeleteDetails._all_fields_ = [] -TeamFolderPermanentlyDeleteType._description_validator = bv.String() +TeamFolderPermanentlyDeleteType.description.validator = bv.String() TeamFolderPermanentlyDeleteType._all_field_names_ = set(['description']) -TeamFolderPermanentlyDeleteType._all_fields_ = [('description', TeamFolderPermanentlyDeleteType._description_validator)] +TeamFolderPermanentlyDeleteType._all_fields_ = [('description', TeamFolderPermanentlyDeleteType.description.validator)] -TeamFolderRenameDetails._previous_folder_name_validator = bv.String() -TeamFolderRenameDetails._new_folder_name_validator = bv.String() +TeamFolderRenameDetails.previous_folder_name.validator = bv.String() +TeamFolderRenameDetails.new_folder_name.validator = bv.String() TeamFolderRenameDetails._all_field_names_ = set([ 'previous_folder_name', 'new_folder_name', ]) TeamFolderRenameDetails._all_fields_ = [ - ('previous_folder_name', TeamFolderRenameDetails._previous_folder_name_validator), - ('new_folder_name', TeamFolderRenameDetails._new_folder_name_validator), + ('previous_folder_name', TeamFolderRenameDetails.previous_folder_name.validator), + ('new_folder_name', TeamFolderRenameDetails.new_folder_name.validator), ] -TeamFolderRenameType._description_validator = bv.String() +TeamFolderRenameType.description.validator = bv.String() TeamFolderRenameType._all_field_names_ = set(['description']) -TeamFolderRenameType._all_fields_ = [('description', TeamFolderRenameType._description_validator)] +TeamFolderRenameType._all_fields_ = [('description', TeamFolderRenameType.description.validator)] -TeamInviteDetails._invite_method_validator = InviteMethod_validator -TeamInviteDetails._additional_license_purchase_validator = bv.Nullable(bv.Boolean()) +TeamInviteDetails.invite_method.validator = InviteMethod_validator +TeamInviteDetails.additional_license_purchase.validator = bv.Nullable(bv.Boolean()) TeamInviteDetails._all_field_names_ = set([ 'invite_method', 'additional_license_purchase', ]) TeamInviteDetails._all_fields_ = [ - ('invite_method', TeamInviteDetails._invite_method_validator), - ('additional_license_purchase', TeamInviteDetails._additional_license_purchase_validator), + ('invite_method', TeamInviteDetails.invite_method.validator), + ('additional_license_purchase', TeamInviteDetails.additional_license_purchase.validator), ] TeamLinkedAppLogInfo._field_names_ = set([]) @@ -109952,13 +76922,13 @@ def __repr__(self): TeamLinkedAppLogInfo._fields_ = [] TeamLinkedAppLogInfo._all_fields_ = AppLogInfo._all_fields_ + TeamLinkedAppLogInfo._fields_ -TeamLogInfo._display_name_validator = bv.String() +TeamLogInfo.display_name.validator = bv.String() TeamLogInfo._all_field_names_ = set(['display_name']) -TeamLogInfo._all_fields_ = [('display_name', TeamLogInfo._display_name_validator)] +TeamLogInfo._all_fields_ = [('display_name', TeamLogInfo.display_name.validator)] -TeamMemberLogInfo._team_member_id_validator = bv.Nullable(team_common.TeamMemberId_validator) -TeamMemberLogInfo._member_external_id_validator = bv.Nullable(team_common.MemberExternalId_validator) -TeamMemberLogInfo._team_validator = bv.Nullable(TeamLogInfo_validator) +TeamMemberLogInfo.team_member_id.validator = bv.Nullable(team_common.TeamMemberId_validator) +TeamMemberLogInfo.member_external_id.validator = bv.Nullable(team_common.MemberExternalId_validator) +TeamMemberLogInfo.team.validator = bv.Nullable(TeamLogInfo_validator) TeamMemberLogInfo._field_names_ = set([ 'team_member_id', 'member_external_id', @@ -109966,9 +76936,9 @@ def __repr__(self): ]) 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), - ('team', TeamMemberLogInfo._team_validator), + ('team_member_id', TeamMemberLogInfo.team_member_id.validator), + ('member_external_id', TeamMemberLogInfo.member_external_id.validator), + ('team', TeamMemberLogInfo.team.validator), ] TeamMemberLogInfo._all_fields_ = UserLogInfo._all_fields_ + TeamMemberLogInfo._fields_ @@ -109985,17 +76955,17 @@ def __repr__(self): TeamMembershipType.full = TeamMembershipType('full') TeamMembershipType.other = TeamMembershipType('other') -TeamMergeFromDetails._team_name_validator = bv.String() +TeamMergeFromDetails.team_name.validator = bv.String() TeamMergeFromDetails._all_field_names_ = set(['team_name']) -TeamMergeFromDetails._all_fields_ = [('team_name', TeamMergeFromDetails._team_name_validator)] +TeamMergeFromDetails._all_fields_ = [('team_name', TeamMergeFromDetails.team_name.validator)] -TeamMergeFromType._description_validator = bv.String() +TeamMergeFromType.description.validator = bv.String() TeamMergeFromType._all_field_names_ = set(['description']) -TeamMergeFromType._all_fields_ = [('description', TeamMergeFromType._description_validator)] +TeamMergeFromType._all_fields_ = [('description', TeamMergeFromType.description.validator)] -TeamMergeRequestAcceptedDetails._request_accepted_details_validator = TeamMergeRequestAcceptedExtraDetails_validator +TeamMergeRequestAcceptedDetails.request_accepted_details.validator = TeamMergeRequestAcceptedExtraDetails_validator TeamMergeRequestAcceptedDetails._all_field_names_ = set(['request_accepted_details']) -TeamMergeRequestAcceptedDetails._all_fields_ = [('request_accepted_details', TeamMergeRequestAcceptedDetails._request_accepted_details_validator)] +TeamMergeRequestAcceptedDetails._all_fields_ = [('request_accepted_details', TeamMergeRequestAcceptedDetails.request_accepted_details.validator)] TeamMergeRequestAcceptedExtraDetails._primary_team_validator = PrimaryTeamRequestAcceptedDetails_validator TeamMergeRequestAcceptedExtraDetails._secondary_team_validator = SecondaryTeamRequestAcceptedDetails_validator @@ -110008,51 +76978,51 @@ def __repr__(self): TeamMergeRequestAcceptedExtraDetails.other = TeamMergeRequestAcceptedExtraDetails('other') -TeamMergeRequestAcceptedShownToPrimaryTeamDetails._secondary_team_validator = bv.String() -TeamMergeRequestAcceptedShownToPrimaryTeamDetails._sent_by_validator = bv.String() +TeamMergeRequestAcceptedShownToPrimaryTeamDetails.secondary_team.validator = bv.String() +TeamMergeRequestAcceptedShownToPrimaryTeamDetails.sent_by.validator = bv.String() TeamMergeRequestAcceptedShownToPrimaryTeamDetails._all_field_names_ = set([ 'secondary_team', 'sent_by', ]) TeamMergeRequestAcceptedShownToPrimaryTeamDetails._all_fields_ = [ - ('secondary_team', TeamMergeRequestAcceptedShownToPrimaryTeamDetails._secondary_team_validator), - ('sent_by', TeamMergeRequestAcceptedShownToPrimaryTeamDetails._sent_by_validator), + ('secondary_team', TeamMergeRequestAcceptedShownToPrimaryTeamDetails.secondary_team.validator), + ('sent_by', TeamMergeRequestAcceptedShownToPrimaryTeamDetails.sent_by.validator), ] -TeamMergeRequestAcceptedShownToPrimaryTeamType._description_validator = bv.String() +TeamMergeRequestAcceptedShownToPrimaryTeamType.description.validator = bv.String() TeamMergeRequestAcceptedShownToPrimaryTeamType._all_field_names_ = set(['description']) -TeamMergeRequestAcceptedShownToPrimaryTeamType._all_fields_ = [('description', TeamMergeRequestAcceptedShownToPrimaryTeamType._description_validator)] +TeamMergeRequestAcceptedShownToPrimaryTeamType._all_fields_ = [('description', TeamMergeRequestAcceptedShownToPrimaryTeamType.description.validator)] -TeamMergeRequestAcceptedShownToSecondaryTeamDetails._primary_team_validator = bv.String() -TeamMergeRequestAcceptedShownToSecondaryTeamDetails._sent_by_validator = bv.String() +TeamMergeRequestAcceptedShownToSecondaryTeamDetails.primary_team.validator = bv.String() +TeamMergeRequestAcceptedShownToSecondaryTeamDetails.sent_by.validator = bv.String() TeamMergeRequestAcceptedShownToSecondaryTeamDetails._all_field_names_ = set([ 'primary_team', 'sent_by', ]) TeamMergeRequestAcceptedShownToSecondaryTeamDetails._all_fields_ = [ - ('primary_team', TeamMergeRequestAcceptedShownToSecondaryTeamDetails._primary_team_validator), - ('sent_by', TeamMergeRequestAcceptedShownToSecondaryTeamDetails._sent_by_validator), + ('primary_team', TeamMergeRequestAcceptedShownToSecondaryTeamDetails.primary_team.validator), + ('sent_by', TeamMergeRequestAcceptedShownToSecondaryTeamDetails.sent_by.validator), ] -TeamMergeRequestAcceptedShownToSecondaryTeamType._description_validator = bv.String() +TeamMergeRequestAcceptedShownToSecondaryTeamType.description.validator = bv.String() TeamMergeRequestAcceptedShownToSecondaryTeamType._all_field_names_ = set(['description']) -TeamMergeRequestAcceptedShownToSecondaryTeamType._all_fields_ = [('description', TeamMergeRequestAcceptedShownToSecondaryTeamType._description_validator)] +TeamMergeRequestAcceptedShownToSecondaryTeamType._all_fields_ = [('description', TeamMergeRequestAcceptedShownToSecondaryTeamType.description.validator)] -TeamMergeRequestAcceptedType._description_validator = bv.String() +TeamMergeRequestAcceptedType.description.validator = bv.String() TeamMergeRequestAcceptedType._all_field_names_ = set(['description']) -TeamMergeRequestAcceptedType._all_fields_ = [('description', TeamMergeRequestAcceptedType._description_validator)] +TeamMergeRequestAcceptedType._all_fields_ = [('description', TeamMergeRequestAcceptedType.description.validator)] -TeamMergeRequestAutoCanceledDetails._details_validator = bv.Nullable(bv.String()) +TeamMergeRequestAutoCanceledDetails.details.validator = bv.Nullable(bv.String()) TeamMergeRequestAutoCanceledDetails._all_field_names_ = set(['details']) -TeamMergeRequestAutoCanceledDetails._all_fields_ = [('details', TeamMergeRequestAutoCanceledDetails._details_validator)] +TeamMergeRequestAutoCanceledDetails._all_fields_ = [('details', TeamMergeRequestAutoCanceledDetails.details.validator)] -TeamMergeRequestAutoCanceledType._description_validator = bv.String() +TeamMergeRequestAutoCanceledType.description.validator = bv.String() TeamMergeRequestAutoCanceledType._all_field_names_ = set(['description']) -TeamMergeRequestAutoCanceledType._all_fields_ = [('description', TeamMergeRequestAutoCanceledType._description_validator)] +TeamMergeRequestAutoCanceledType._all_fields_ = [('description', TeamMergeRequestAutoCanceledType.description.validator)] -TeamMergeRequestCanceledDetails._request_canceled_details_validator = TeamMergeRequestCanceledExtraDetails_validator +TeamMergeRequestCanceledDetails.request_canceled_details.validator = TeamMergeRequestCanceledExtraDetails_validator TeamMergeRequestCanceledDetails._all_field_names_ = set(['request_canceled_details']) -TeamMergeRequestCanceledDetails._all_fields_ = [('request_canceled_details', TeamMergeRequestCanceledDetails._request_canceled_details_validator)] +TeamMergeRequestCanceledDetails._all_fields_ = [('request_canceled_details', TeamMergeRequestCanceledDetails.request_canceled_details.validator)] TeamMergeRequestCanceledExtraDetails._primary_team_validator = PrimaryTeamRequestCanceledDetails_validator TeamMergeRequestCanceledExtraDetails._secondary_team_validator = SecondaryTeamRequestCanceledDetails_validator @@ -110065,43 +77035,43 @@ def __repr__(self): TeamMergeRequestCanceledExtraDetails.other = TeamMergeRequestCanceledExtraDetails('other') -TeamMergeRequestCanceledShownToPrimaryTeamDetails._secondary_team_validator = bv.String() -TeamMergeRequestCanceledShownToPrimaryTeamDetails._sent_by_validator = bv.String() +TeamMergeRequestCanceledShownToPrimaryTeamDetails.secondary_team.validator = bv.String() +TeamMergeRequestCanceledShownToPrimaryTeamDetails.sent_by.validator = bv.String() TeamMergeRequestCanceledShownToPrimaryTeamDetails._all_field_names_ = set([ 'secondary_team', 'sent_by', ]) TeamMergeRequestCanceledShownToPrimaryTeamDetails._all_fields_ = [ - ('secondary_team', TeamMergeRequestCanceledShownToPrimaryTeamDetails._secondary_team_validator), - ('sent_by', TeamMergeRequestCanceledShownToPrimaryTeamDetails._sent_by_validator), + ('secondary_team', TeamMergeRequestCanceledShownToPrimaryTeamDetails.secondary_team.validator), + ('sent_by', TeamMergeRequestCanceledShownToPrimaryTeamDetails.sent_by.validator), ] -TeamMergeRequestCanceledShownToPrimaryTeamType._description_validator = bv.String() +TeamMergeRequestCanceledShownToPrimaryTeamType.description.validator = bv.String() TeamMergeRequestCanceledShownToPrimaryTeamType._all_field_names_ = set(['description']) -TeamMergeRequestCanceledShownToPrimaryTeamType._all_fields_ = [('description', TeamMergeRequestCanceledShownToPrimaryTeamType._description_validator)] +TeamMergeRequestCanceledShownToPrimaryTeamType._all_fields_ = [('description', TeamMergeRequestCanceledShownToPrimaryTeamType.description.validator)] -TeamMergeRequestCanceledShownToSecondaryTeamDetails._sent_to_validator = bv.String() -TeamMergeRequestCanceledShownToSecondaryTeamDetails._sent_by_validator = bv.String() +TeamMergeRequestCanceledShownToSecondaryTeamDetails.sent_to.validator = bv.String() +TeamMergeRequestCanceledShownToSecondaryTeamDetails.sent_by.validator = bv.String() TeamMergeRequestCanceledShownToSecondaryTeamDetails._all_field_names_ = set([ 'sent_to', 'sent_by', ]) TeamMergeRequestCanceledShownToSecondaryTeamDetails._all_fields_ = [ - ('sent_to', TeamMergeRequestCanceledShownToSecondaryTeamDetails._sent_to_validator), - ('sent_by', TeamMergeRequestCanceledShownToSecondaryTeamDetails._sent_by_validator), + ('sent_to', TeamMergeRequestCanceledShownToSecondaryTeamDetails.sent_to.validator), + ('sent_by', TeamMergeRequestCanceledShownToSecondaryTeamDetails.sent_by.validator), ] -TeamMergeRequestCanceledShownToSecondaryTeamType._description_validator = bv.String() +TeamMergeRequestCanceledShownToSecondaryTeamType.description.validator = bv.String() TeamMergeRequestCanceledShownToSecondaryTeamType._all_field_names_ = set(['description']) -TeamMergeRequestCanceledShownToSecondaryTeamType._all_fields_ = [('description', TeamMergeRequestCanceledShownToSecondaryTeamType._description_validator)] +TeamMergeRequestCanceledShownToSecondaryTeamType._all_fields_ = [('description', TeamMergeRequestCanceledShownToSecondaryTeamType.description.validator)] -TeamMergeRequestCanceledType._description_validator = bv.String() +TeamMergeRequestCanceledType.description.validator = bv.String() TeamMergeRequestCanceledType._all_field_names_ = set(['description']) -TeamMergeRequestCanceledType._all_fields_ = [('description', TeamMergeRequestCanceledType._description_validator)] +TeamMergeRequestCanceledType._all_fields_ = [('description', TeamMergeRequestCanceledType.description.validator)] -TeamMergeRequestExpiredDetails._request_expired_details_validator = TeamMergeRequestExpiredExtraDetails_validator +TeamMergeRequestExpiredDetails.request_expired_details.validator = TeamMergeRequestExpiredExtraDetails_validator TeamMergeRequestExpiredDetails._all_field_names_ = set(['request_expired_details']) -TeamMergeRequestExpiredDetails._all_fields_ = [('request_expired_details', TeamMergeRequestExpiredDetails._request_expired_details_validator)] +TeamMergeRequestExpiredDetails._all_fields_ = [('request_expired_details', TeamMergeRequestExpiredDetails.request_expired_details.validator)] TeamMergeRequestExpiredExtraDetails._primary_team_validator = PrimaryTeamRequestExpiredDetails_validator TeamMergeRequestExpiredExtraDetails._secondary_team_validator = SecondaryTeamRequestExpiredDetails_validator @@ -110114,59 +77084,59 @@ def __repr__(self): TeamMergeRequestExpiredExtraDetails.other = TeamMergeRequestExpiredExtraDetails('other') -TeamMergeRequestExpiredShownToPrimaryTeamDetails._secondary_team_validator = bv.String() -TeamMergeRequestExpiredShownToPrimaryTeamDetails._sent_by_validator = bv.String() +TeamMergeRequestExpiredShownToPrimaryTeamDetails.secondary_team.validator = bv.String() +TeamMergeRequestExpiredShownToPrimaryTeamDetails.sent_by.validator = bv.String() TeamMergeRequestExpiredShownToPrimaryTeamDetails._all_field_names_ = set([ 'secondary_team', 'sent_by', ]) TeamMergeRequestExpiredShownToPrimaryTeamDetails._all_fields_ = [ - ('secondary_team', TeamMergeRequestExpiredShownToPrimaryTeamDetails._secondary_team_validator), - ('sent_by', TeamMergeRequestExpiredShownToPrimaryTeamDetails._sent_by_validator), + ('secondary_team', TeamMergeRequestExpiredShownToPrimaryTeamDetails.secondary_team.validator), + ('sent_by', TeamMergeRequestExpiredShownToPrimaryTeamDetails.sent_by.validator), ] -TeamMergeRequestExpiredShownToPrimaryTeamType._description_validator = bv.String() +TeamMergeRequestExpiredShownToPrimaryTeamType.description.validator = bv.String() TeamMergeRequestExpiredShownToPrimaryTeamType._all_field_names_ = set(['description']) -TeamMergeRequestExpiredShownToPrimaryTeamType._all_fields_ = [('description', TeamMergeRequestExpiredShownToPrimaryTeamType._description_validator)] +TeamMergeRequestExpiredShownToPrimaryTeamType._all_fields_ = [('description', TeamMergeRequestExpiredShownToPrimaryTeamType.description.validator)] -TeamMergeRequestExpiredShownToSecondaryTeamDetails._sent_to_validator = bv.String() +TeamMergeRequestExpiredShownToSecondaryTeamDetails.sent_to.validator = bv.String() TeamMergeRequestExpiredShownToSecondaryTeamDetails._all_field_names_ = set(['sent_to']) -TeamMergeRequestExpiredShownToSecondaryTeamDetails._all_fields_ = [('sent_to', TeamMergeRequestExpiredShownToSecondaryTeamDetails._sent_to_validator)] +TeamMergeRequestExpiredShownToSecondaryTeamDetails._all_fields_ = [('sent_to', TeamMergeRequestExpiredShownToSecondaryTeamDetails.sent_to.validator)] -TeamMergeRequestExpiredShownToSecondaryTeamType._description_validator = bv.String() +TeamMergeRequestExpiredShownToSecondaryTeamType.description.validator = bv.String() TeamMergeRequestExpiredShownToSecondaryTeamType._all_field_names_ = set(['description']) -TeamMergeRequestExpiredShownToSecondaryTeamType._all_fields_ = [('description', TeamMergeRequestExpiredShownToSecondaryTeamType._description_validator)] +TeamMergeRequestExpiredShownToSecondaryTeamType._all_fields_ = [('description', TeamMergeRequestExpiredShownToSecondaryTeamType.description.validator)] -TeamMergeRequestExpiredType._description_validator = bv.String() +TeamMergeRequestExpiredType.description.validator = bv.String() TeamMergeRequestExpiredType._all_field_names_ = set(['description']) -TeamMergeRequestExpiredType._all_fields_ = [('description', TeamMergeRequestExpiredType._description_validator)] +TeamMergeRequestExpiredType._all_fields_ = [('description', TeamMergeRequestExpiredType.description.validator)] -TeamMergeRequestRejectedShownToPrimaryTeamDetails._secondary_team_validator = bv.String() -TeamMergeRequestRejectedShownToPrimaryTeamDetails._sent_by_validator = bv.String() +TeamMergeRequestRejectedShownToPrimaryTeamDetails.secondary_team.validator = bv.String() +TeamMergeRequestRejectedShownToPrimaryTeamDetails.sent_by.validator = bv.String() TeamMergeRequestRejectedShownToPrimaryTeamDetails._all_field_names_ = set([ 'secondary_team', 'sent_by', ]) TeamMergeRequestRejectedShownToPrimaryTeamDetails._all_fields_ = [ - ('secondary_team', TeamMergeRequestRejectedShownToPrimaryTeamDetails._secondary_team_validator), - ('sent_by', TeamMergeRequestRejectedShownToPrimaryTeamDetails._sent_by_validator), + ('secondary_team', TeamMergeRequestRejectedShownToPrimaryTeamDetails.secondary_team.validator), + ('sent_by', TeamMergeRequestRejectedShownToPrimaryTeamDetails.sent_by.validator), ] -TeamMergeRequestRejectedShownToPrimaryTeamType._description_validator = bv.String() +TeamMergeRequestRejectedShownToPrimaryTeamType.description.validator = bv.String() TeamMergeRequestRejectedShownToPrimaryTeamType._all_field_names_ = set(['description']) -TeamMergeRequestRejectedShownToPrimaryTeamType._all_fields_ = [('description', TeamMergeRequestRejectedShownToPrimaryTeamType._description_validator)] +TeamMergeRequestRejectedShownToPrimaryTeamType._all_fields_ = [('description', TeamMergeRequestRejectedShownToPrimaryTeamType.description.validator)] -TeamMergeRequestRejectedShownToSecondaryTeamDetails._sent_by_validator = bv.String() +TeamMergeRequestRejectedShownToSecondaryTeamDetails.sent_by.validator = bv.String() TeamMergeRequestRejectedShownToSecondaryTeamDetails._all_field_names_ = set(['sent_by']) -TeamMergeRequestRejectedShownToSecondaryTeamDetails._all_fields_ = [('sent_by', TeamMergeRequestRejectedShownToSecondaryTeamDetails._sent_by_validator)] +TeamMergeRequestRejectedShownToSecondaryTeamDetails._all_fields_ = [('sent_by', TeamMergeRequestRejectedShownToSecondaryTeamDetails.sent_by.validator)] -TeamMergeRequestRejectedShownToSecondaryTeamType._description_validator = bv.String() +TeamMergeRequestRejectedShownToSecondaryTeamType.description.validator = bv.String() TeamMergeRequestRejectedShownToSecondaryTeamType._all_field_names_ = set(['description']) -TeamMergeRequestRejectedShownToSecondaryTeamType._all_fields_ = [('description', TeamMergeRequestRejectedShownToSecondaryTeamType._description_validator)] +TeamMergeRequestRejectedShownToSecondaryTeamType._all_fields_ = [('description', TeamMergeRequestRejectedShownToSecondaryTeamType.description.validator)] -TeamMergeRequestReminderDetails._request_reminder_details_validator = TeamMergeRequestReminderExtraDetails_validator +TeamMergeRequestReminderDetails.request_reminder_details.validator = TeamMergeRequestReminderExtraDetails_validator TeamMergeRequestReminderDetails._all_field_names_ = set(['request_reminder_details']) -TeamMergeRequestReminderDetails._all_fields_ = [('request_reminder_details', TeamMergeRequestReminderDetails._request_reminder_details_validator)] +TeamMergeRequestReminderDetails._all_fields_ = [('request_reminder_details', TeamMergeRequestReminderDetails.request_reminder_details.validator)] TeamMergeRequestReminderExtraDetails._primary_team_validator = PrimaryTeamRequestReminderDetails_validator TeamMergeRequestReminderExtraDetails._secondary_team_validator = SecondaryTeamRequestReminderDetails_validator @@ -110179,154 +77149,154 @@ def __repr__(self): TeamMergeRequestReminderExtraDetails.other = TeamMergeRequestReminderExtraDetails('other') -TeamMergeRequestReminderShownToPrimaryTeamDetails._secondary_team_validator = bv.String() -TeamMergeRequestReminderShownToPrimaryTeamDetails._sent_to_validator = bv.String() +TeamMergeRequestReminderShownToPrimaryTeamDetails.secondary_team.validator = bv.String() +TeamMergeRequestReminderShownToPrimaryTeamDetails.sent_to.validator = bv.String() TeamMergeRequestReminderShownToPrimaryTeamDetails._all_field_names_ = set([ 'secondary_team', 'sent_to', ]) TeamMergeRequestReminderShownToPrimaryTeamDetails._all_fields_ = [ - ('secondary_team', TeamMergeRequestReminderShownToPrimaryTeamDetails._secondary_team_validator), - ('sent_to', TeamMergeRequestReminderShownToPrimaryTeamDetails._sent_to_validator), + ('secondary_team', TeamMergeRequestReminderShownToPrimaryTeamDetails.secondary_team.validator), + ('sent_to', TeamMergeRequestReminderShownToPrimaryTeamDetails.sent_to.validator), ] -TeamMergeRequestReminderShownToPrimaryTeamType._description_validator = bv.String() +TeamMergeRequestReminderShownToPrimaryTeamType.description.validator = bv.String() TeamMergeRequestReminderShownToPrimaryTeamType._all_field_names_ = set(['description']) -TeamMergeRequestReminderShownToPrimaryTeamType._all_fields_ = [('description', TeamMergeRequestReminderShownToPrimaryTeamType._description_validator)] +TeamMergeRequestReminderShownToPrimaryTeamType._all_fields_ = [('description', TeamMergeRequestReminderShownToPrimaryTeamType.description.validator)] -TeamMergeRequestReminderShownToSecondaryTeamDetails._sent_to_validator = bv.String() +TeamMergeRequestReminderShownToSecondaryTeamDetails.sent_to.validator = bv.String() TeamMergeRequestReminderShownToSecondaryTeamDetails._all_field_names_ = set(['sent_to']) -TeamMergeRequestReminderShownToSecondaryTeamDetails._all_fields_ = [('sent_to', TeamMergeRequestReminderShownToSecondaryTeamDetails._sent_to_validator)] +TeamMergeRequestReminderShownToSecondaryTeamDetails._all_fields_ = [('sent_to', TeamMergeRequestReminderShownToSecondaryTeamDetails.sent_to.validator)] -TeamMergeRequestReminderShownToSecondaryTeamType._description_validator = bv.String() +TeamMergeRequestReminderShownToSecondaryTeamType.description.validator = bv.String() TeamMergeRequestReminderShownToSecondaryTeamType._all_field_names_ = set(['description']) -TeamMergeRequestReminderShownToSecondaryTeamType._all_fields_ = [('description', TeamMergeRequestReminderShownToSecondaryTeamType._description_validator)] +TeamMergeRequestReminderShownToSecondaryTeamType._all_fields_ = [('description', TeamMergeRequestReminderShownToSecondaryTeamType.description.validator)] -TeamMergeRequestReminderType._description_validator = bv.String() +TeamMergeRequestReminderType.description.validator = bv.String() TeamMergeRequestReminderType._all_field_names_ = set(['description']) -TeamMergeRequestReminderType._all_fields_ = [('description', TeamMergeRequestReminderType._description_validator)] +TeamMergeRequestReminderType._all_fields_ = [('description', TeamMergeRequestReminderType.description.validator)] -TeamMergeRequestRevokedDetails._team_validator = bv.String() +TeamMergeRequestRevokedDetails.team.validator = bv.String() TeamMergeRequestRevokedDetails._all_field_names_ = set(['team']) -TeamMergeRequestRevokedDetails._all_fields_ = [('team', TeamMergeRequestRevokedDetails._team_validator)] +TeamMergeRequestRevokedDetails._all_fields_ = [('team', TeamMergeRequestRevokedDetails.team.validator)] -TeamMergeRequestRevokedType._description_validator = bv.String() +TeamMergeRequestRevokedType.description.validator = bv.String() TeamMergeRequestRevokedType._all_field_names_ = set(['description']) -TeamMergeRequestRevokedType._all_fields_ = [('description', TeamMergeRequestRevokedType._description_validator)] +TeamMergeRequestRevokedType._all_fields_ = [('description', TeamMergeRequestRevokedType.description.validator)] -TeamMergeRequestSentShownToPrimaryTeamDetails._secondary_team_validator = bv.String() -TeamMergeRequestSentShownToPrimaryTeamDetails._sent_to_validator = bv.String() +TeamMergeRequestSentShownToPrimaryTeamDetails.secondary_team.validator = bv.String() +TeamMergeRequestSentShownToPrimaryTeamDetails.sent_to.validator = bv.String() TeamMergeRequestSentShownToPrimaryTeamDetails._all_field_names_ = set([ 'secondary_team', 'sent_to', ]) TeamMergeRequestSentShownToPrimaryTeamDetails._all_fields_ = [ - ('secondary_team', TeamMergeRequestSentShownToPrimaryTeamDetails._secondary_team_validator), - ('sent_to', TeamMergeRequestSentShownToPrimaryTeamDetails._sent_to_validator), + ('secondary_team', TeamMergeRequestSentShownToPrimaryTeamDetails.secondary_team.validator), + ('sent_to', TeamMergeRequestSentShownToPrimaryTeamDetails.sent_to.validator), ] -TeamMergeRequestSentShownToPrimaryTeamType._description_validator = bv.String() +TeamMergeRequestSentShownToPrimaryTeamType.description.validator = bv.String() TeamMergeRequestSentShownToPrimaryTeamType._all_field_names_ = set(['description']) -TeamMergeRequestSentShownToPrimaryTeamType._all_fields_ = [('description', TeamMergeRequestSentShownToPrimaryTeamType._description_validator)] +TeamMergeRequestSentShownToPrimaryTeamType._all_fields_ = [('description', TeamMergeRequestSentShownToPrimaryTeamType.description.validator)] -TeamMergeRequestSentShownToSecondaryTeamDetails._sent_to_validator = bv.String() +TeamMergeRequestSentShownToSecondaryTeamDetails.sent_to.validator = bv.String() TeamMergeRequestSentShownToSecondaryTeamDetails._all_field_names_ = set(['sent_to']) -TeamMergeRequestSentShownToSecondaryTeamDetails._all_fields_ = [('sent_to', TeamMergeRequestSentShownToSecondaryTeamDetails._sent_to_validator)] +TeamMergeRequestSentShownToSecondaryTeamDetails._all_fields_ = [('sent_to', TeamMergeRequestSentShownToSecondaryTeamDetails.sent_to.validator)] -TeamMergeRequestSentShownToSecondaryTeamType._description_validator = bv.String() +TeamMergeRequestSentShownToSecondaryTeamType.description.validator = bv.String() TeamMergeRequestSentShownToSecondaryTeamType._all_field_names_ = set(['description']) -TeamMergeRequestSentShownToSecondaryTeamType._all_fields_ = [('description', TeamMergeRequestSentShownToSecondaryTeamType._description_validator)] +TeamMergeRequestSentShownToSecondaryTeamType._all_fields_ = [('description', TeamMergeRequestSentShownToSecondaryTeamType.description.validator)] -TeamMergeToDetails._team_name_validator = bv.String() +TeamMergeToDetails.team_name.validator = bv.String() TeamMergeToDetails._all_field_names_ = set(['team_name']) -TeamMergeToDetails._all_fields_ = [('team_name', TeamMergeToDetails._team_name_validator)] +TeamMergeToDetails._all_fields_ = [('team_name', TeamMergeToDetails.team_name.validator)] -TeamMergeToType._description_validator = bv.String() +TeamMergeToType.description.validator = bv.String() TeamMergeToType._all_field_names_ = set(['description']) -TeamMergeToType._all_fields_ = [('description', TeamMergeToType._description_validator)] +TeamMergeToType._all_fields_ = [('description', TeamMergeToType.description.validator)] -TeamName._team_display_name_validator = bv.String() -TeamName._team_legal_name_validator = bv.String() +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), + ('team_display_name', TeamName.team_display_name.validator), + ('team_legal_name', TeamName.team_legal_name.validator), ] TeamProfileAddBackgroundDetails._all_field_names_ = set([]) TeamProfileAddBackgroundDetails._all_fields_ = [] -TeamProfileAddBackgroundType._description_validator = bv.String() +TeamProfileAddBackgroundType.description.validator = bv.String() TeamProfileAddBackgroundType._all_field_names_ = set(['description']) -TeamProfileAddBackgroundType._all_fields_ = [('description', TeamProfileAddBackgroundType._description_validator)] +TeamProfileAddBackgroundType._all_fields_ = [('description', TeamProfileAddBackgroundType.description.validator)] TeamProfileAddLogoDetails._all_field_names_ = set([]) TeamProfileAddLogoDetails._all_fields_ = [] -TeamProfileAddLogoType._description_validator = bv.String() +TeamProfileAddLogoType.description.validator = bv.String() TeamProfileAddLogoType._all_field_names_ = set(['description']) -TeamProfileAddLogoType._all_fields_ = [('description', TeamProfileAddLogoType._description_validator)] +TeamProfileAddLogoType._all_fields_ = [('description', TeamProfileAddLogoType.description.validator)] TeamProfileChangeBackgroundDetails._all_field_names_ = set([]) TeamProfileChangeBackgroundDetails._all_fields_ = [] -TeamProfileChangeBackgroundType._description_validator = bv.String() +TeamProfileChangeBackgroundType.description.validator = bv.String() TeamProfileChangeBackgroundType._all_field_names_ = set(['description']) -TeamProfileChangeBackgroundType._all_fields_ = [('description', TeamProfileChangeBackgroundType._description_validator)] +TeamProfileChangeBackgroundType._all_fields_ = [('description', TeamProfileChangeBackgroundType.description.validator)] -TeamProfileChangeDefaultLanguageDetails._new_value_validator = common.LanguageCode_validator -TeamProfileChangeDefaultLanguageDetails._previous_value_validator = common.LanguageCode_validator +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), + ('new_value', TeamProfileChangeDefaultLanguageDetails.new_value.validator), + ('previous_value', TeamProfileChangeDefaultLanguageDetails.previous_value.validator), ] -TeamProfileChangeDefaultLanguageType._description_validator = bv.String() +TeamProfileChangeDefaultLanguageType.description.validator = bv.String() TeamProfileChangeDefaultLanguageType._all_field_names_ = set(['description']) -TeamProfileChangeDefaultLanguageType._all_fields_ = [('description', TeamProfileChangeDefaultLanguageType._description_validator)] +TeamProfileChangeDefaultLanguageType._all_fields_ = [('description', TeamProfileChangeDefaultLanguageType.description.validator)] TeamProfileChangeLogoDetails._all_field_names_ = set([]) TeamProfileChangeLogoDetails._all_fields_ = [] -TeamProfileChangeLogoType._description_validator = bv.String() +TeamProfileChangeLogoType.description.validator = bv.String() TeamProfileChangeLogoType._all_field_names_ = set(['description']) -TeamProfileChangeLogoType._all_fields_ = [('description', TeamProfileChangeLogoType._description_validator)] +TeamProfileChangeLogoType._all_fields_ = [('description', TeamProfileChangeLogoType.description.validator)] -TeamProfileChangeNameDetails._previous_value_validator = bv.Nullable(TeamName_validator) -TeamProfileChangeNameDetails._new_value_validator = TeamName_validator +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), + ('previous_value', TeamProfileChangeNameDetails.previous_value.validator), + ('new_value', TeamProfileChangeNameDetails.new_value.validator), ] -TeamProfileChangeNameType._description_validator = bv.String() +TeamProfileChangeNameType.description.validator = bv.String() TeamProfileChangeNameType._all_field_names_ = set(['description']) -TeamProfileChangeNameType._all_fields_ = [('description', TeamProfileChangeNameType._description_validator)] +TeamProfileChangeNameType._all_fields_ = [('description', TeamProfileChangeNameType.description.validator)] TeamProfileRemoveBackgroundDetails._all_field_names_ = set([]) TeamProfileRemoveBackgroundDetails._all_fields_ = [] -TeamProfileRemoveBackgroundType._description_validator = bv.String() +TeamProfileRemoveBackgroundType.description.validator = bv.String() TeamProfileRemoveBackgroundType._all_field_names_ = set(['description']) -TeamProfileRemoveBackgroundType._all_fields_ = [('description', TeamProfileRemoveBackgroundType._description_validator)] +TeamProfileRemoveBackgroundType._all_fields_ = [('description', TeamProfileRemoveBackgroundType.description.validator)] TeamProfileRemoveLogoDetails._all_field_names_ = set([]) TeamProfileRemoveLogoDetails._all_fields_ = [] -TeamProfileRemoveLogoType._description_validator = bv.String() +TeamProfileRemoveLogoType.description.validator = bv.String() TeamProfileRemoveLogoType._all_field_names_ = set(['description']) -TeamProfileRemoveLogoType._all_fields_ = [('description', TeamProfileRemoveLogoType._description_validator)] +TeamProfileRemoveLogoType._all_fields_ = [('description', TeamProfileRemoveLogoType.description.validator)] TeamSelectiveSyncPolicy._disabled_validator = bv.Void() TeamSelectiveSyncPolicy._enabled_validator = bv.Void() @@ -110341,111 +77311,111 @@ def __repr__(self): TeamSelectiveSyncPolicy.enabled = TeamSelectiveSyncPolicy('enabled') TeamSelectiveSyncPolicy.other = TeamSelectiveSyncPolicy('other') -TeamSelectiveSyncPolicyChangedDetails._new_value_validator = TeamSelectiveSyncPolicy_validator -TeamSelectiveSyncPolicyChangedDetails._previous_value_validator = TeamSelectiveSyncPolicy_validator +TeamSelectiveSyncPolicyChangedDetails.new_value.validator = TeamSelectiveSyncPolicy_validator +TeamSelectiveSyncPolicyChangedDetails.previous_value.validator = TeamSelectiveSyncPolicy_validator TeamSelectiveSyncPolicyChangedDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) TeamSelectiveSyncPolicyChangedDetails._all_fields_ = [ - ('new_value', TeamSelectiveSyncPolicyChangedDetails._new_value_validator), - ('previous_value', TeamSelectiveSyncPolicyChangedDetails._previous_value_validator), + ('new_value', TeamSelectiveSyncPolicyChangedDetails.new_value.validator), + ('previous_value', TeamSelectiveSyncPolicyChangedDetails.previous_value.validator), ] -TeamSelectiveSyncPolicyChangedType._description_validator = bv.String() +TeamSelectiveSyncPolicyChangedType.description.validator = bv.String() TeamSelectiveSyncPolicyChangedType._all_field_names_ = set(['description']) -TeamSelectiveSyncPolicyChangedType._all_fields_ = [('description', TeamSelectiveSyncPolicyChangedType._description_validator)] +TeamSelectiveSyncPolicyChangedType._all_fields_ = [('description', TeamSelectiveSyncPolicyChangedType.description.validator)] -TeamSelectiveSyncSettingsChangedDetails._previous_value_validator = files.SyncSetting_validator -TeamSelectiveSyncSettingsChangedDetails._new_value_validator = files.SyncSetting_validator +TeamSelectiveSyncSettingsChangedDetails.previous_value.validator = files.SyncSetting_validator +TeamSelectiveSyncSettingsChangedDetails.new_value.validator = files.SyncSetting_validator TeamSelectiveSyncSettingsChangedDetails._all_field_names_ = set([ 'previous_value', 'new_value', ]) TeamSelectiveSyncSettingsChangedDetails._all_fields_ = [ - ('previous_value', TeamSelectiveSyncSettingsChangedDetails._previous_value_validator), - ('new_value', TeamSelectiveSyncSettingsChangedDetails._new_value_validator), + ('previous_value', TeamSelectiveSyncSettingsChangedDetails.previous_value.validator), + ('new_value', TeamSelectiveSyncSettingsChangedDetails.new_value.validator), ] -TeamSelectiveSyncSettingsChangedType._description_validator = bv.String() +TeamSelectiveSyncSettingsChangedType.description.validator = bv.String() TeamSelectiveSyncSettingsChangedType._all_field_names_ = set(['description']) -TeamSelectiveSyncSettingsChangedType._all_fields_ = [('description', TeamSelectiveSyncSettingsChangedType._description_validator)] +TeamSelectiveSyncSettingsChangedType._all_fields_ = [('description', TeamSelectiveSyncSettingsChangedType.description.validator)] -TeamSharingWhitelistSubjectsChangedDetails._added_whitelist_subjects_validator = bv.List(bv.String()) -TeamSharingWhitelistSubjectsChangedDetails._removed_whitelist_subjects_validator = bv.List(bv.String()) +TeamSharingWhitelistSubjectsChangedDetails.added_whitelist_subjects.validator = bv.List(bv.String()) +TeamSharingWhitelistSubjectsChangedDetails.removed_whitelist_subjects.validator = bv.List(bv.String()) TeamSharingWhitelistSubjectsChangedDetails._all_field_names_ = set([ 'added_whitelist_subjects', 'removed_whitelist_subjects', ]) TeamSharingWhitelistSubjectsChangedDetails._all_fields_ = [ - ('added_whitelist_subjects', TeamSharingWhitelistSubjectsChangedDetails._added_whitelist_subjects_validator), - ('removed_whitelist_subjects', TeamSharingWhitelistSubjectsChangedDetails._removed_whitelist_subjects_validator), + ('added_whitelist_subjects', TeamSharingWhitelistSubjectsChangedDetails.added_whitelist_subjects.validator), + ('removed_whitelist_subjects', TeamSharingWhitelistSubjectsChangedDetails.removed_whitelist_subjects.validator), ] -TeamSharingWhitelistSubjectsChangedType._description_validator = bv.String() +TeamSharingWhitelistSubjectsChangedType.description.validator = bv.String() TeamSharingWhitelistSubjectsChangedType._all_field_names_ = set(['description']) -TeamSharingWhitelistSubjectsChangedType._all_fields_ = [('description', TeamSharingWhitelistSubjectsChangedType._description_validator)] +TeamSharingWhitelistSubjectsChangedType._all_fields_ = [('description', TeamSharingWhitelistSubjectsChangedType.description.validator)] TfaAddBackupPhoneDetails._all_field_names_ = set([]) TfaAddBackupPhoneDetails._all_fields_ = [] -TfaAddBackupPhoneType._description_validator = bv.String() +TfaAddBackupPhoneType.description.validator = bv.String() TfaAddBackupPhoneType._all_field_names_ = set(['description']) -TfaAddBackupPhoneType._all_fields_ = [('description', TfaAddBackupPhoneType._description_validator)] +TfaAddBackupPhoneType._all_fields_ = [('description', TfaAddBackupPhoneType.description.validator)] TfaAddExceptionDetails._all_field_names_ = set([]) TfaAddExceptionDetails._all_fields_ = [] -TfaAddExceptionType._description_validator = bv.String() +TfaAddExceptionType.description.validator = bv.String() TfaAddExceptionType._all_field_names_ = set(['description']) -TfaAddExceptionType._all_fields_ = [('description', TfaAddExceptionType._description_validator)] +TfaAddExceptionType._all_fields_ = [('description', TfaAddExceptionType.description.validator)] TfaAddSecurityKeyDetails._all_field_names_ = set([]) TfaAddSecurityKeyDetails._all_fields_ = [] -TfaAddSecurityKeyType._description_validator = bv.String() +TfaAddSecurityKeyType.description.validator = bv.String() TfaAddSecurityKeyType._all_field_names_ = set(['description']) -TfaAddSecurityKeyType._all_fields_ = [('description', TfaAddSecurityKeyType._description_validator)] +TfaAddSecurityKeyType._all_fields_ = [('description', TfaAddSecurityKeyType.description.validator)] TfaChangeBackupPhoneDetails._all_field_names_ = set([]) TfaChangeBackupPhoneDetails._all_fields_ = [] -TfaChangeBackupPhoneType._description_validator = bv.String() +TfaChangeBackupPhoneType.description.validator = bv.String() TfaChangeBackupPhoneType._all_field_names_ = set(['description']) -TfaChangeBackupPhoneType._all_fields_ = [('description', TfaChangeBackupPhoneType._description_validator)] +TfaChangeBackupPhoneType._all_fields_ = [('description', TfaChangeBackupPhoneType.description.validator)] -TfaChangePolicyDetails._new_value_validator = team_policies.TwoStepVerificationPolicy_validator -TfaChangePolicyDetails._previous_value_validator = bv.Nullable(team_policies.TwoStepVerificationPolicy_validator) +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), + ('new_value', TfaChangePolicyDetails.new_value.validator), + ('previous_value', TfaChangePolicyDetails.previous_value.validator), ] -TfaChangePolicyType._description_validator = bv.String() +TfaChangePolicyType.description.validator = bv.String() TfaChangePolicyType._all_field_names_ = set(['description']) -TfaChangePolicyType._all_fields_ = [('description', TfaChangePolicyType._description_validator)] +TfaChangePolicyType._all_fields_ = [('description', TfaChangePolicyType.description.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.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), + ('new_value', TfaChangeStatusDetails.new_value.validator), + ('previous_value', TfaChangeStatusDetails.previous_value.validator), + ('used_rescue_code', TfaChangeStatusDetails.used_rescue_code.validator), ] -TfaChangeStatusType._description_validator = bv.String() +TfaChangeStatusType.description.validator = bv.String() TfaChangeStatusType._all_field_names_ = set(['description']) -TfaChangeStatusType._all_fields_ = [('description', TfaChangeStatusType._description_validator)] +TfaChangeStatusType._all_fields_ = [('description', TfaChangeStatusType.description.validator)] TfaConfiguration._authenticator_validator = bv.Void() TfaConfiguration._disabled_validator = bv.Void() @@ -110469,30 +77439,30 @@ def __repr__(self): TfaRemoveBackupPhoneDetails._all_field_names_ = set([]) TfaRemoveBackupPhoneDetails._all_fields_ = [] -TfaRemoveBackupPhoneType._description_validator = bv.String() +TfaRemoveBackupPhoneType.description.validator = bv.String() TfaRemoveBackupPhoneType._all_field_names_ = set(['description']) -TfaRemoveBackupPhoneType._all_fields_ = [('description', TfaRemoveBackupPhoneType._description_validator)] +TfaRemoveBackupPhoneType._all_fields_ = [('description', TfaRemoveBackupPhoneType.description.validator)] TfaRemoveExceptionDetails._all_field_names_ = set([]) TfaRemoveExceptionDetails._all_fields_ = [] -TfaRemoveExceptionType._description_validator = bv.String() +TfaRemoveExceptionType.description.validator = bv.String() TfaRemoveExceptionType._all_field_names_ = set(['description']) -TfaRemoveExceptionType._all_fields_ = [('description', TfaRemoveExceptionType._description_validator)] +TfaRemoveExceptionType._all_fields_ = [('description', TfaRemoveExceptionType.description.validator)] TfaRemoveSecurityKeyDetails._all_field_names_ = set([]) TfaRemoveSecurityKeyDetails._all_fields_ = [] -TfaRemoveSecurityKeyType._description_validator = bv.String() +TfaRemoveSecurityKeyType.description.validator = bv.String() TfaRemoveSecurityKeyType._all_field_names_ = set(['description']) -TfaRemoveSecurityKeyType._all_fields_ = [('description', TfaRemoveSecurityKeyType._description_validator)] +TfaRemoveSecurityKeyType._all_fields_ = [('description', TfaRemoveSecurityKeyType.description.validator)] TfaResetDetails._all_field_names_ = set([]) TfaResetDetails._all_fields_ = [] -TfaResetType._description_validator = bv.String() +TfaResetType.description.validator = bv.String() TfaResetType._all_field_names_ = set(['description']) -TfaResetType._all_fields_ = [('description', TfaResetType._description_validator)] +TfaResetType._all_fields_ = [('description', TfaResetType.description.validator)] TimeUnit._days_validator = bv.Void() TimeUnit._hours_validator = bv.Void() @@ -110525,16 +77495,16 @@ def __repr__(self): TimeUnit.years = TimeUnit('years') TimeUnit.other = TimeUnit('other') -TrustedNonTeamMemberLogInfo._trusted_non_team_member_type_validator = TrustedNonTeamMemberType_validator -TrustedNonTeamMemberLogInfo._team_validator = bv.Nullable(TeamLogInfo_validator) +TrustedNonTeamMemberLogInfo.trusted_non_team_member_type.validator = TrustedNonTeamMemberType_validator +TrustedNonTeamMemberLogInfo.team.validator = bv.Nullable(TeamLogInfo_validator) TrustedNonTeamMemberLogInfo._field_names_ = set([ 'trusted_non_team_member_type', 'team', ]) TrustedNonTeamMemberLogInfo._all_field_names_ = UserLogInfo._all_field_names_.union(TrustedNonTeamMemberLogInfo._field_names_) TrustedNonTeamMemberLogInfo._fields_ = [ - ('trusted_non_team_member_type', TrustedNonTeamMemberLogInfo._trusted_non_team_member_type_validator), - ('team', TrustedNonTeamMemberLogInfo._team_validator), + ('trusted_non_team_member_type', TrustedNonTeamMemberLogInfo.trusted_non_team_member_type.validator), + ('team', TrustedNonTeamMemberLogInfo.team.validator), ] TrustedNonTeamMemberLogInfo._all_fields_ = UserLogInfo._all_fields_ + TrustedNonTeamMemberLogInfo._fields_ @@ -110589,20 +77559,20 @@ def __repr__(self): TrustedTeamsRequestState.unlinked = TrustedTeamsRequestState('unlinked') TrustedTeamsRequestState.other = TrustedTeamsRequestState('other') -TwoAccountChangePolicyDetails._new_value_validator = TwoAccountPolicy_validator -TwoAccountChangePolicyDetails._previous_value_validator = bv.Nullable(TwoAccountPolicy_validator) +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), + ('new_value', TwoAccountChangePolicyDetails.new_value.validator), + ('previous_value', TwoAccountChangePolicyDetails.previous_value.validator), ] -TwoAccountChangePolicyType._description_validator = bv.String() +TwoAccountChangePolicyType.description.validator = bv.String() TwoAccountChangePolicyType._all_field_names_ = set(['description']) -TwoAccountChangePolicyType._all_fields_ = [('description', TwoAccountChangePolicyType._description_validator)] +TwoAccountChangePolicyType._all_fields_ = [('description', TwoAccountChangePolicyType.description.validator)] TwoAccountPolicy._disabled_validator = bv.Void() TwoAccountPolicy._enabled_validator = bv.Void() @@ -110622,18 +77592,18 @@ def __repr__(self): 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.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), + ('given_name', UserNameLogInfo.given_name.validator), + ('surname', UserNameLogInfo.surname.validator), + ('locale', UserNameLogInfo.locale.validator), ] UserOrTeamLinkedAppLogInfo._field_names_ = set([]) @@ -110641,20 +77611,20 @@ def __repr__(self): UserOrTeamLinkedAppLogInfo._fields_ = [] UserOrTeamLinkedAppLogInfo._all_fields_ = AppLogInfo._all_fields_ + UserOrTeamLinkedAppLogInfo._fields_ -ViewerInfoPolicyChangedDetails._previous_value_validator = PassPolicy_validator -ViewerInfoPolicyChangedDetails._new_value_validator = PassPolicy_validator +ViewerInfoPolicyChangedDetails.previous_value.validator = PassPolicy_validator +ViewerInfoPolicyChangedDetails.new_value.validator = PassPolicy_validator ViewerInfoPolicyChangedDetails._all_field_names_ = set([ 'previous_value', 'new_value', ]) ViewerInfoPolicyChangedDetails._all_fields_ = [ - ('previous_value', ViewerInfoPolicyChangedDetails._previous_value_validator), - ('new_value', ViewerInfoPolicyChangedDetails._new_value_validator), + ('previous_value', ViewerInfoPolicyChangedDetails.previous_value.validator), + ('new_value', ViewerInfoPolicyChangedDetails.new_value.validator), ] -ViewerInfoPolicyChangedType._description_validator = bv.String() +ViewerInfoPolicyChangedType.description.validator = bv.String() ViewerInfoPolicyChangedType._all_field_names_ = set(['description']) -ViewerInfoPolicyChangedType._all_fields_ = [('description', ViewerInfoPolicyChangedType._description_validator)] +ViewerInfoPolicyChangedType._all_fields_ = [('description', ViewerInfoPolicyChangedType.description.validator)] WatermarkingPolicy._disabled_validator = bv.Void() WatermarkingPolicy._enabled_validator = bv.Void() @@ -110669,25 +77639,25 @@ def __repr__(self): WatermarkingPolicy.enabled = WatermarkingPolicy('enabled') WatermarkingPolicy.other = WatermarkingPolicy('other') -WatermarkingPolicyChangedDetails._new_value_validator = WatermarkingPolicy_validator -WatermarkingPolicyChangedDetails._previous_value_validator = WatermarkingPolicy_validator +WatermarkingPolicyChangedDetails.new_value.validator = WatermarkingPolicy_validator +WatermarkingPolicyChangedDetails.previous_value.validator = WatermarkingPolicy_validator WatermarkingPolicyChangedDetails._all_field_names_ = set([ 'new_value', 'previous_value', ]) WatermarkingPolicyChangedDetails._all_fields_ = [ - ('new_value', WatermarkingPolicyChangedDetails._new_value_validator), - ('previous_value', WatermarkingPolicyChangedDetails._previous_value_validator), + ('new_value', WatermarkingPolicyChangedDetails.new_value.validator), + ('previous_value', WatermarkingPolicyChangedDetails.previous_value.validator), ] -WatermarkingPolicyChangedType._description_validator = bv.String() +WatermarkingPolicyChangedType.description.validator = bv.String() WatermarkingPolicyChangedType._all_field_names_ = set(['description']) -WatermarkingPolicyChangedType._all_fields_ = [('description', WatermarkingPolicyChangedType._description_validator)] +WatermarkingPolicyChangedType._all_fields_ = [('description', WatermarkingPolicyChangedType.description.validator)] -WebDeviceSessionLogInfo._session_info_validator = bv.Nullable(WebSessionLogInfo_validator) -WebDeviceSessionLogInfo._user_agent_validator = bv.String() -WebDeviceSessionLogInfo._os_validator = bv.String() -WebDeviceSessionLogInfo._browser_validator = bv.String() +WebDeviceSessionLogInfo.session_info.validator = bv.Nullable(WebSessionLogInfo_validator) +WebDeviceSessionLogInfo.user_agent.validator = bv.String() +WebDeviceSessionLogInfo.os.validator = bv.String() +WebDeviceSessionLogInfo.browser.validator = bv.String() WebDeviceSessionLogInfo._field_names_ = set([ 'session_info', 'user_agent', @@ -110696,10 +77666,10 @@ def __repr__(self): ]) WebDeviceSessionLogInfo._all_field_names_ = DeviceSessionLogInfo._all_field_names_.union(WebDeviceSessionLogInfo._field_names_) WebDeviceSessionLogInfo._fields_ = [ - ('session_info', WebDeviceSessionLogInfo._session_info_validator), - ('user_agent', WebDeviceSessionLogInfo._user_agent_validator), - ('os', WebDeviceSessionLogInfo._os_validator), - ('browser', WebDeviceSessionLogInfo._browser_validator), + ('session_info', WebDeviceSessionLogInfo.session_info.validator), + ('user_agent', WebDeviceSessionLogInfo.user_agent.validator), + ('os', WebDeviceSessionLogInfo.os.validator), + ('browser', WebDeviceSessionLogInfo.browser.validator), ] WebDeviceSessionLogInfo._all_fields_ = DeviceSessionLogInfo._all_fields_ + WebDeviceSessionLogInfo._fields_ @@ -110708,50 +77678,50 @@ def __repr__(self): WebSessionLogInfo._fields_ = [] WebSessionLogInfo._all_fields_ = SessionLogInfo._all_fields_ + WebSessionLogInfo._fields_ -WebSessionsChangeActiveSessionLimitDetails._previous_value_validator = bv.String() -WebSessionsChangeActiveSessionLimitDetails._new_value_validator = bv.String() +WebSessionsChangeActiveSessionLimitDetails.previous_value.validator = bv.String() +WebSessionsChangeActiveSessionLimitDetails.new_value.validator = bv.String() WebSessionsChangeActiveSessionLimitDetails._all_field_names_ = set([ 'previous_value', 'new_value', ]) WebSessionsChangeActiveSessionLimitDetails._all_fields_ = [ - ('previous_value', WebSessionsChangeActiveSessionLimitDetails._previous_value_validator), - ('new_value', WebSessionsChangeActiveSessionLimitDetails._new_value_validator), + ('previous_value', WebSessionsChangeActiveSessionLimitDetails.previous_value.validator), + ('new_value', WebSessionsChangeActiveSessionLimitDetails.new_value.validator), ] -WebSessionsChangeActiveSessionLimitType._description_validator = bv.String() +WebSessionsChangeActiveSessionLimitType.description.validator = bv.String() WebSessionsChangeActiveSessionLimitType._all_field_names_ = set(['description']) -WebSessionsChangeActiveSessionLimitType._all_fields_ = [('description', WebSessionsChangeActiveSessionLimitType._description_validator)] +WebSessionsChangeActiveSessionLimitType._all_fields_ = [('description', WebSessionsChangeActiveSessionLimitType.description.validator)] -WebSessionsChangeFixedLengthPolicyDetails._new_value_validator = bv.Nullable(WebSessionsFixedLengthPolicy_validator) -WebSessionsChangeFixedLengthPolicyDetails._previous_value_validator = bv.Nullable(WebSessionsFixedLengthPolicy_validator) +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), + ('new_value', WebSessionsChangeFixedLengthPolicyDetails.new_value.validator), + ('previous_value', WebSessionsChangeFixedLengthPolicyDetails.previous_value.validator), ] -WebSessionsChangeFixedLengthPolicyType._description_validator = bv.String() +WebSessionsChangeFixedLengthPolicyType.description.validator = bv.String() WebSessionsChangeFixedLengthPolicyType._all_field_names_ = set(['description']) -WebSessionsChangeFixedLengthPolicyType._all_fields_ = [('description', WebSessionsChangeFixedLengthPolicyType._description_validator)] +WebSessionsChangeFixedLengthPolicyType._all_fields_ = [('description', WebSessionsChangeFixedLengthPolicyType.description.validator)] -WebSessionsChangeIdleLengthPolicyDetails._new_value_validator = bv.Nullable(WebSessionsIdleLengthPolicy_validator) -WebSessionsChangeIdleLengthPolicyDetails._previous_value_validator = bv.Nullable(WebSessionsIdleLengthPolicy_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), + ('new_value', WebSessionsChangeIdleLengthPolicyDetails.new_value.validator), + ('previous_value', WebSessionsChangeIdleLengthPolicyDetails.previous_value.validator), ] -WebSessionsChangeIdleLengthPolicyType._description_validator = bv.String() +WebSessionsChangeIdleLengthPolicyType.description.validator = bv.String() WebSessionsChangeIdleLengthPolicyType._all_field_names_ = set(['description']) -WebSessionsChangeIdleLengthPolicyType._all_fields_ = [('description', WebSessionsChangeIdleLengthPolicyType._description_validator)] +WebSessionsChangeIdleLengthPolicyType._all_fields_ = [('description', WebSessionsChangeIdleLengthPolicyType.description.validator)] WebSessionsFixedLengthPolicy._defined_validator = DurationLogInfo_validator WebSessionsFixedLengthPolicy._undefined_validator = bv.Void() @@ -110777,6 +77747,7 @@ def __repr__(self): WebSessionsIdleLengthPolicy.undefined = WebSessionsIdleLengthPolicy('undefined') WebSessionsIdleLengthPolicy.other = WebSessionsIdleLengthPolicy('other') +GetTeamEventsArg.limit.default = 1000 get_events = bb.Route( 'get_events', 1, diff --git a/dropbox/team_policies.py b/dropbox/team_policies.py index a725f745..9bbac122 100644 --- a/dropbox/team_policies.py +++ b/dropbox/team_policies.py @@ -3,14 +3,9 @@ # @generated # flake8: noqa # pylint: skip-file -try: - from . import stone_validators as bv - from . import stone_base as bb -except (ImportError, 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 +from __future__ import unicode_literals +from stone.backends.python_rsrc import stone_base as bb +from stone.backends.python_rsrc import stone_validators as bv class CameraUploadsPolicyState(bb.Union): """ @@ -59,9 +54,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(CameraUploadsPolicyState, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'CameraUploadsPolicyState(%r, %r)' % (self._tag, self._value) - CameraUploadsPolicyState_validator = bv.Union(CameraUploadsPolicyState) class ComputerBackupPolicyState(bb.Union): @@ -123,9 +115,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ComputerBackupPolicyState, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ComputerBackupPolicyState(%r, %r)' % (self._tag, self._value) - ComputerBackupPolicyState_validator = bv.Union(ComputerBackupPolicyState) class EmmState(bb.Union): @@ -184,9 +173,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(EmmState, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'EmmState(%r, %r)' % (self._tag, self._value) - EmmState_validator = bv.Union(EmmState) class FileLockingPolicyState(bb.Union): @@ -236,9 +222,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileLockingPolicyState, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileLockingPolicyState(%r, %r)' % (self._tag, self._value) - FileLockingPolicyState_validator = bv.Union(FileLockingPolicyState) class GroupCreation(bb.Union): @@ -278,9 +261,6 @@ def is_admins_only(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GroupCreation, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GroupCreation(%r, %r)' % (self._tag, self._value) - GroupCreation_validator = bv.Union(GroupCreation) class OfficeAddInPolicy(bb.Union): @@ -328,9 +308,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(OfficeAddInPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'OfficeAddInPolicy(%r, %r)' % (self._tag, self._value) - OfficeAddInPolicy_validator = bv.Union(OfficeAddInPolicy) class PaperDefaultFolderPolicy(bb.Union): @@ -380,9 +357,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDefaultFolderPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDefaultFolderPolicy(%r, %r)' % (self._tag, self._value) - PaperDefaultFolderPolicy_validator = bv.Union(PaperDefaultFolderPolicy) class PaperDeploymentPolicy(bb.Union): @@ -433,9 +407,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDeploymentPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDeploymentPolicy(%r, %r)' % (self._tag, self._value) - PaperDeploymentPolicy_validator = bv.Union(PaperDeploymentPolicy) class PaperDesktopPolicy(bb.Union): @@ -485,9 +456,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperDesktopPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperDesktopPolicy(%r, %r)' % (self._tag, self._value) - PaperDesktopPolicy_validator = bv.Union(PaperDesktopPolicy) class PaperEnabledPolicy(bb.Union): @@ -546,9 +514,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperEnabledPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperEnabledPolicy(%r, %r)' % (self._tag, self._value) - PaperEnabledPolicy_validator = bv.Union(PaperEnabledPolicy) class PasswordControlMode(bb.Union): @@ -596,9 +561,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PasswordControlMode, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PasswordControlMode(%r, %r)' % (self._tag, self._value) - PasswordControlMode_validator = bv.Union(PasswordControlMode) class PasswordStrengthPolicy(bb.Union): @@ -660,9 +622,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PasswordStrengthPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PasswordStrengthPolicy(%r, %r)' % (self._tag, self._value) - PasswordStrengthPolicy_validator = bv.Union(PasswordStrengthPolicy) class RolloutMethod(bb.Union): @@ -713,9 +672,6 @@ def is_add_member_to_exceptions(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(RolloutMethod, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'RolloutMethod(%r, %r)' % (self._tag, self._value) - RolloutMethod_validator = bv.Union(RolloutMethod) class SharedFolderJoinPolicy(bb.Union): @@ -768,9 +724,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderJoinPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderJoinPolicy(%r, %r)' % (self._tag, self._value) - SharedFolderJoinPolicy_validator = bv.Union(SharedFolderJoinPolicy) class SharedFolderMemberPolicy(bb.Union): @@ -822,9 +775,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedFolderMemberPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedFolderMemberPolicy(%r, %r)' % (self._tag, self._value) - SharedFolderMemberPolicy_validator = bv.Union(SharedFolderMemberPolicy) class SharedLinkCreatePolicy(bb.Union): @@ -892,9 +842,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkCreatePolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SharedLinkCreatePolicy(%r, %r)' % (self._tag, self._value) - SharedLinkCreatePolicy_validator = bv.Union(SharedLinkCreatePolicy) class ShowcaseDownloadPolicy(bb.Union): @@ -944,9 +891,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseDownloadPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseDownloadPolicy(%r, %r)' % (self._tag, self._value) - ShowcaseDownloadPolicy_validator = bv.Union(ShowcaseDownloadPolicy) class ShowcaseEnabledPolicy(bb.Union): @@ -994,9 +938,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseEnabledPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseEnabledPolicy(%r, %r)' % (self._tag, self._value) - ShowcaseEnabledPolicy_validator = bv.Union(ShowcaseEnabledPolicy) class ShowcaseExternalSharingPolicy(bb.Union): @@ -1046,9 +987,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(ShowcaseExternalSharingPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'ShowcaseExternalSharingPolicy(%r, %r)' % (self._tag, self._value) - ShowcaseExternalSharingPolicy_validator = bv.Union(ShowcaseExternalSharingPolicy) class SmartSyncPolicy(bb.Union): @@ -1098,9 +1036,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SmartSyncPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SmartSyncPolicy(%r, %r)' % (self._tag, self._value) - SmartSyncPolicy_validator = bv.Union(SmartSyncPolicy) class SmarterSmartSyncPolicyState(bb.Union): @@ -1150,9 +1085,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SmarterSmartSyncPolicyState, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SmarterSmartSyncPolicyState(%r, %r)' % (self._tag, self._value) - SmarterSmartSyncPolicyState_validator = bv.Union(SmarterSmartSyncPolicyState) class SsoPolicy(bb.Union): @@ -1214,9 +1146,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SsoPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SsoPolicy(%r, %r)' % (self._tag, self._value) - SsoPolicy_validator = bv.Union(SsoPolicy) class SuggestMembersPolicy(bb.Union): @@ -1266,9 +1195,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SuggestMembersPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SuggestMembersPolicy(%r, %r)' % (self._tag, self._value) - SuggestMembersPolicy_validator = bv.Union(SuggestMembersPolicy) class TeamMemberPolicies(bb.Struct): @@ -1292,13 +1218,9 @@ class TeamMemberPolicies(bb.Struct): __slots__ = [ '_sharing_value', - '_sharing_present', '_emm_state_value', - '_emm_state_present', '_office_addin_value', - '_office_addin_present', '_suggest_members_policy_value', - '_suggest_members_policy_present', ] _has_required_fields = True @@ -1308,14 +1230,10 @@ def __init__(self, emm_state=None, office_addin=None, suggest_members_policy=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 - self._suggest_members_policy_value = None - self._suggest_members_policy_present = False + self._sharing_value = bb.NOT_SET + self._emm_state_value = bb.NOT_SET + self._office_addin_value = bb.NOT_SET + self._suggest_members_policy_value = bb.NOT_SET if sharing is not None: self.sharing = sharing if emm_state is not None: @@ -1325,115 +1243,21 @@ def __init__(self, if suggest_members_policy is not None: self.suggest_members_policy = suggest_members_policy - @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 + # Instance attribute type: TeamSharingPolicies (validator is set below) + sharing = bb.Attribute("sharing", user_defined=True) - @office_addin.deleter - def office_addin(self): - self._office_addin_value = None - self._office_addin_present = False + # Instance attribute type: EmmState (validator is set below) + emm_state = bb.Attribute("emm_state", user_defined=True) - @property - def suggest_members_policy(self): - """ - The team policy on if teammembers are allowed to suggest users for - admins to invite to the team. - - :rtype: SuggestMembersPolicy - """ - if self._suggest_members_policy_present: - return self._suggest_members_policy_value - else: - raise AttributeError("missing required field 'suggest_members_policy'") - - @suggest_members_policy.setter - def suggest_members_policy(self, val): - self._suggest_members_policy_validator.validate_type_only(val) - self._suggest_members_policy_value = val - self._suggest_members_policy_present = True + # Instance attribute type: OfficeAddInPolicy (validator is set below) + office_addin = bb.Attribute("office_addin", user_defined=True) - @suggest_members_policy.deleter - def suggest_members_policy(self): - self._suggest_members_policy_value = None - self._suggest_members_policy_present = False + # Instance attribute type: SuggestMembersPolicy (validator is set below) + suggest_members_policy = bb.Attribute("suggest_members_policy", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamMemberPolicies, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamMemberPolicies(sharing={!r}, emm_state={!r}, office_addin={!r}, suggest_members_policy={!r})'.format( - self._sharing_value, - self._emm_state_value, - self._office_addin_value, - self._suggest_members_policy_value, - ) - TeamMemberPolicies_validator = bv.Struct(TeamMemberPolicies) class TeamSharingPolicies(bb.Struct): @@ -1450,11 +1274,8 @@ class TeamSharingPolicies(bb.Struct): __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 @@ -1463,12 +1284,9 @@ 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 + self._shared_folder_member_policy_value = bb.NOT_SET + self._shared_folder_join_policy_value = bb.NOT_SET + self._shared_link_create_policy_value = bb.NOT_SET 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: @@ -1476,85 +1294,18 @@ def __init__(self, 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'") + # Instance attribute type: SharedFolderMemberPolicy (validator is set below) + shared_folder_member_policy = bb.Attribute("shared_folder_member_policy", user_defined=True) - @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 + # Instance attribute type: SharedFolderJoinPolicy (validator is set below) + shared_folder_join_policy = bb.Attribute("shared_folder_join_policy", user_defined=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 + # Instance attribute type: SharedLinkCreatePolicy (validator is set below) + shared_link_create_policy = bb.Attribute("shared_link_create_policy", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamSharingPolicies, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -1604,9 +1355,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TwoStepVerificationPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TwoStepVerificationPolicy(%r, %r)' % (self._tag, self._value) - TwoStepVerificationPolicy_validator = bv.Union(TwoStepVerificationPolicy) class TwoStepVerificationState(bb.Union): @@ -1668,9 +1416,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(TwoStepVerificationState, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TwoStepVerificationState(%r, %r)' % (self._tag, self._value) - TwoStepVerificationState_validator = bv.Union(TwoStepVerificationState) CameraUploadsPolicyState._disabled_validator = bv.Void() @@ -1987,10 +1732,10 @@ def __repr__(self): SuggestMembersPolicy.enabled = SuggestMembersPolicy('enabled') SuggestMembersPolicy.other = SuggestMembersPolicy('other') -TeamMemberPolicies._sharing_validator = TeamSharingPolicies_validator -TeamMemberPolicies._emm_state_validator = EmmState_validator -TeamMemberPolicies._office_addin_validator = OfficeAddInPolicy_validator -TeamMemberPolicies._suggest_members_policy_validator = SuggestMembersPolicy_validator +TeamMemberPolicies.sharing.validator = TeamSharingPolicies_validator +TeamMemberPolicies.emm_state.validator = EmmState_validator +TeamMemberPolicies.office_addin.validator = OfficeAddInPolicy_validator +TeamMemberPolicies.suggest_members_policy.validator = SuggestMembersPolicy_validator TeamMemberPolicies._all_field_names_ = set([ 'sharing', 'emm_state', @@ -1998,24 +1743,24 @@ def __repr__(self): 'suggest_members_policy', ]) TeamMemberPolicies._all_fields_ = [ - ('sharing', TeamMemberPolicies._sharing_validator), - ('emm_state', TeamMemberPolicies._emm_state_validator), - ('office_addin', TeamMemberPolicies._office_addin_validator), - ('suggest_members_policy', TeamMemberPolicies._suggest_members_policy_validator), + ('sharing', TeamMemberPolicies.sharing.validator), + ('emm_state', TeamMemberPolicies.emm_state.validator), + ('office_addin', TeamMemberPolicies.office_addin.validator), + ('suggest_members_policy', TeamMemberPolicies.suggest_members_policy.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.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), + ('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() diff --git a/dropbox/users.py b/dropbox/users.py index 11368945..c5188366 100644 --- a/dropbox/users.py +++ b/dropbox/users.py @@ -7,27 +7,14 @@ This namespace contains endpoints and data types for user management. """ -try: - from . import stone_validators as bv - from . import stone_base as bb -except (ImportError, 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, - team_common, - team_policies, - users_common, - ) -except (ImportError, SystemError, ValueError): - import common - import team_common - import team_policies - import users_common +from __future__ import unicode_literals +from stone.backends.python_rsrc import stone_base as bb +from stone.backends.python_rsrc import stone_validators as bv + +from dropbox import common +from dropbox import team_common +from dropbox import team_policies +from dropbox import users_common class Account(bb.Struct): """ @@ -48,17 +35,11 @@ class Account(bb.Struct): __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 @@ -70,18 +51,12 @@ def __init__(self, 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 + self._account_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._email_value = bb.NOT_SET + self._email_verified_value = bb.NOT_SET + self._profile_photo_url_value = bb.NOT_SET + self._disabled_value = bb.NOT_SET if account_id is not None: self.account_id = account_id if name is not None: @@ -95,162 +70,27 @@ def __init__(self, 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 + # Instance attribute type: str (validator is set below) + account_id = bb.Attribute("account_id") - @account_id.deleter - def account_id(self): - self._account_id_value = None - self._account_id_present = False + # Instance attribute type: Name (validator is set below) + name = bb.Attribute("name", user_defined=True) - @property - def name(self): - """ - Details of a user's name. + # Instance attribute type: str (validator is set below) + email = bb.Attribute("email") - :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 email 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 email. - - :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 email 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 + # Instance attribute type: bool (validator is set below) + email_verified = bb.Attribute("email_verified") - @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 + # Instance attribute type: str (validator is set below) + profile_photo_url = bb.Attribute("profile_photo_url", nullable=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 + # Instance attribute type: bool (validator is set below) + disabled = bb.Attribute("disabled") def _process_custom_annotations(self, annotation_type, field_path, processor): super(Account, self)._process_custom_annotations(annotation_type, field_path, processor) - 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): @@ -267,9 +107,7 @@ class BasicAccount(Account): __slots__ = [ '_is_teammate_value', - '_is_teammate_present', '_team_member_id_value', - '_team_member_id_present', ] _has_required_fields = True @@ -289,81 +127,22 @@ def __init__(self, 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 + self._is_teammate_value = bb.NOT_SET + self._team_member_id_value = bb.NOT_SET 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 + # Instance attribute type: bool (validator is set below) + is_teammate = bb.Attribute("is_teammate") - @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 + # Instance attribute type: str (validator is set below) + team_member_id = bb.Attribute("team_member_id", nullable=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(BasicAccount, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 FileLockingValue(bb.Union): @@ -428,9 +207,6 @@ def get_enabled(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileLockingValue, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'FileLockingValue(%r, %r)' % (self._tag, self._value) - FileLockingValue_validator = bv.Union(FileLockingValue) class FullAccount(Account): @@ -458,21 +234,13 @@ class FullAccount(Account): __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', '_root_info_value', - '_root_info_present', ] _has_required_fields = True @@ -498,22 +266,14 @@ def __init__(self, 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 - self._root_info_value = None - self._root_info_present = False + self._country_value = bb.NOT_SET + self._locale_value = bb.NOT_SET + self._referral_link_value = bb.NOT_SET + self._team_value = bb.NOT_SET + self._team_member_id_value = bb.NOT_SET + self._is_paired_value = bb.NOT_SET + self._account_type_value = bb.NOT_SET + self._root_info_value = bb.NOT_SET if country is not None: self.country = country if locale is not None: @@ -531,225 +291,33 @@ def __init__(self, if root_info is not None: self.root_info = root_info - @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 + # Instance attribute type: str (validator is set below) + country = bb.Attribute("country", nullable=True) - @locale.deleter - def locale(self): - self._locale_value = None - self._locale_present = False + # Instance attribute type: str (validator is set below) + locale = bb.Attribute("locale") - @property - def referral_link(self): - """ - The user's `referral link `_. + # Instance attribute type: str (validator is set below) + referral_link = bb.Attribute("referral_link") - :rtype: str - """ - if self._referral_link_present: - return self._referral_link_value - else: - raise AttributeError("missing required field 'referral_link'") + # Instance attribute type: FullTeam (validator is set below) + team = bb.Attribute("team", nullable=True, user_defined=True) - @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 + # Instance attribute type: str (validator is set below) + team_member_id = bb.Attribute("team_member_id", nullable=True) - @referral_link.deleter - def referral_link(self): - self._referral_link_value = None - self._referral_link_present = False + # Instance attribute type: bool (validator is set below) + is_paired = bb.Attribute("is_paired") - @property - def team(self): - """ - If this account is a member of a team, information about that team. + # Instance attribute type: users_common.AccountType (validator is set below) + account_type = bb.Attribute("account_type", user_defined=True) - :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 - """ - 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 - - @property - def root_info(self): - """ - The root info for this account. - - :rtype: common.RootInfo - """ - if self._root_info_present: - return self._root_info_value - else: - raise AttributeError("missing required field 'root_info'") - - @root_info.setter - def root_info(self, val): - self._root_info_validator.validate_type_only(val) - self._root_info_value = val - self._root_info_present = True - - @root_info.deleter - def root_info(self): - self._root_info_value = None - self._root_info_present = False + # Instance attribute type: common.RootInfo (validator is set below) + root_info = bb.Attribute("root_info", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FullAccount, self)._process_custom_annotations(annotation_type, field_path, processor) - 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}, root_info={!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._root_info_value, - self._profile_photo_url_value, - self._country_value, - self._team_value, - self._team_member_id_value, - ) - FullAccount_validator = bv.Struct(FullAccount) class Team(bb.Struct): @@ -762,9 +330,7 @@ class Team(bb.Struct): __slots__ = [ '_id_value', - '_id_present', '_name_value', - '_name_present', ] _has_required_fields = True @@ -772,70 +338,22 @@ class Team(bb.Struct): def __init__(self, id=None, name=None): - self._id_value = None - self._id_present = False - self._name_value = None - self._name_present = False + self._id_value = bb.NOT_SET + self._name_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + id = bb.Attribute("id") - @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 + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(Team, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'Team(id={!r}, name={!r})'.format( - self._id_value, - self._name_value, - ) - Team_validator = bv.Struct(Team) class FullTeam(Team): @@ -849,9 +367,7 @@ class FullTeam(Team): __slots__ = [ '_sharing_policies_value', - '_sharing_policies_present', '_office_addin_policy_value', - '_office_addin_policy_present', ] _has_required_fields = True @@ -863,72 +379,22 @@ def __init__(self, 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 + self._sharing_policies_value = bb.NOT_SET + self._office_addin_policy_value = bb.NOT_SET 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 - """ - if self._sharing_policies_present: - return self._sharing_policies_value - else: - raise AttributeError("missing required field 'sharing_policies'") + # Instance attribute type: team_policies.TeamSharingPolicies (validator is set below) + sharing_policies = bb.Attribute("sharing_policies", user_defined=True) - @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 - """ - 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 + # Instance attribute type: team_policies.OfficeAddInPolicy (validator is set below) + office_addin_policy = bb.Attribute("office_addin_policy", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(FullTeam, self)._process_custom_annotations(annotation_type, field_path, processor) - 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(bb.Struct): @@ -938,49 +404,22 @@ class GetAccountArg(bb.Struct): __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 + self._account_id_value = bb.NOT_SET 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 + # Instance attribute type: str (validator is set below) + account_id = bb.Attribute("account_id") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetAccountArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetAccountArg(account_id={!r})'.format( - self._account_id_value, - ) - GetAccountArg_validator = bv.Struct(GetAccountArg) class GetAccountBatchArg(bb.Struct): @@ -991,50 +430,22 @@ class GetAccountBatchArg(bb.Struct): __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 + self._account_ids_value = bb.NOT_SET 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 + # Instance attribute type: list of [str] (validator is set below) + account_ids = bb.Attribute("account_ids") def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetAccountBatchArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetAccountBatchArg(account_ids={!r})'.format( - self._account_ids_value, - ) - GetAccountBatchArg_validator = bv.Struct(GetAccountBatchArg) class GetAccountBatchError(bb.Union): @@ -1095,9 +506,6 @@ def get_no_account(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetAccountBatchError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetAccountBatchError(%r, %r)' % (self._tag, self._value) - GetAccountBatchError_validator = bv.Union(GetAccountBatchError) class GetAccountError(bb.Union): @@ -1135,9 +543,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(GetAccountError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'GetAccountError(%r, %r)' % (self._tag, self._value) - GetAccountError_validator = bv.Union(GetAccountError) class IndividualSpaceAllocation(bb.Struct): @@ -1148,49 +553,22 @@ class IndividualSpaceAllocation(bb.Struct): __slots__ = [ '_allocated_value', - '_allocated_present', ] _has_required_fields = True def __init__(self, allocated=None): - self._allocated_value = None - self._allocated_present = False + self._allocated_value = bb.NOT_SET if allocated is not None: self.allocated = allocated - @property - def allocated(self): - """ - The total space allocated to the user's account (bytes). - - :rtype: int - """ - 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 + # Instance attribute type: int (validator is set below) + allocated = bb.Attribute("allocated") def _process_custom_annotations(self, annotation_type, field_path, processor): super(IndividualSpaceAllocation, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'IndividualSpaceAllocation(allocated={!r})'.format( - self._allocated_value, - ) - IndividualSpaceAllocation_validator = bv.Struct(IndividualSpaceAllocation) class Name(bb.Struct): @@ -1210,15 +588,10 @@ class Name(bb.Struct): __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 @@ -1229,16 +602,11 @@ def __init__(self, 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 + self._given_name_value = bb.NOT_SET + self._surname_value = bb.NOT_SET + self._familiar_name_value = bb.NOT_SET + self._display_name_value = bb.NOT_SET + self._abbreviated_name_value = bb.NOT_SET if given_name is not None: self.given_name = given_name if surname is not None: @@ -1250,137 +618,24 @@ def __init__(self, if abbreviated_name is not None: self.abbreviated_name = abbreviated_name - @property - def given_name(self): - """ - Also known as a first name. + # Instance attribute type: str (validator is set below) + given_name = bb.Attribute("given_name") - :rtype: str - """ - if self._given_name_present: - return self._given_name_value - else: - raise AttributeError("missing required field 'given_name'") + # Instance attribute type: str (validator is set below) + surname = bb.Attribute("surname") - @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 + # Instance attribute type: str (validator is set below) + familiar_name = bb.Attribute("familiar_name") - @given_name.deleter - def given_name(self): - self._given_name_value = None - self._given_name_present = False + # Instance attribute type: str (validator is set below) + display_name = bb.Attribute("display_name") - @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 + # Instance attribute type: str (validator is set below) + abbreviated_name = bb.Attribute("abbreviated_name") def _process_custom_annotations(self, annotation_type, field_path, processor): super(Name, self)._process_custom_annotations(annotation_type, field_path, processor) - 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 PaperAsFilesValue(bb.Union): @@ -1448,9 +703,6 @@ def get_enabled(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(PaperAsFilesValue, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'PaperAsFilesValue(%r, %r)' % (self._tag, self._value) - PaperAsFilesValue_validator = bv.Union(PaperAsFilesValue) class SpaceAllocation(bb.Union): @@ -1544,9 +796,6 @@ def get_team(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(SpaceAllocation, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SpaceAllocation(%r, %r)' % (self._tag, self._value) - SpaceAllocation_validator = bv.Union(SpaceAllocation) class SpaceUsage(bb.Struct): @@ -1559,9 +808,7 @@ class SpaceUsage(bb.Struct): __slots__ = [ '_used_value', - '_used_present', '_allocation_value', - '_allocation_present', ] _has_required_fields = True @@ -1569,70 +816,22 @@ class SpaceUsage(bb.Struct): def __init__(self, used=None, allocation=None): - self._used_value = None - self._used_present = False - self._allocation_value = None - self._allocation_present = False + self._used_value = bb.NOT_SET + self._allocation_value = bb.NOT_SET 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: int - """ - 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 + # Instance attribute type: int (validator is set below) + used = bb.Attribute("used") - @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 + # Instance attribute type: SpaceAllocation (validator is set below) + allocation = bb.Attribute("allocation", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(SpaceUsage, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'SpaceUsage(used={!r}, allocation={!r})'.format( - self._used_value, - self._allocation_value, - ) - SpaceUsage_validator = bv.Struct(SpaceUsage) class TeamSpaceAllocation(bb.Struct): @@ -1654,15 +853,10 @@ class TeamSpaceAllocation(bb.Struct): __slots__ = [ '_used_value', - '_used_present', '_allocated_value', - '_allocated_present', '_user_within_team_space_allocated_value', - '_user_within_team_space_allocated_present', '_user_within_team_space_limit_type_value', - '_user_within_team_space_limit_type_present', '_user_within_team_space_used_cached_value', - '_user_within_team_space_used_cached_present', ] _has_required_fields = True @@ -1673,16 +867,11 @@ def __init__(self, user_within_team_space_allocated=None, user_within_team_space_limit_type=None, user_within_team_space_used_cached=None): - self._used_value = None - self._used_present = False - self._allocated_value = None - self._allocated_present = False - self._user_within_team_space_allocated_value = None - self._user_within_team_space_allocated_present = False - self._user_within_team_space_limit_type_value = None - self._user_within_team_space_limit_type_present = False - self._user_within_team_space_used_cached_value = None - self._user_within_team_space_used_cached_present = False + self._used_value = bb.NOT_SET + self._allocated_value = bb.NOT_SET + self._user_within_team_space_allocated_value = bb.NOT_SET + self._user_within_team_space_limit_type_value = bb.NOT_SET + self._user_within_team_space_used_cached_value = bb.NOT_SET if used is not None: self.used = used if allocated is not None: @@ -1694,137 +883,24 @@ def __init__(self, if user_within_team_space_used_cached is not None: self.user_within_team_space_used_cached = user_within_team_space_used_cached - @property - def used(self): - """ - The total space currently used by the user's team (bytes). - - :rtype: int - """ - 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: int - """ - 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 - - @property - def user_within_team_space_allocated(self): - """ - The total space allocated to the user within its team allocated space (0 - means that no restriction is imposed on the user's quota within its - team). - - :rtype: int - """ - if self._user_within_team_space_allocated_present: - return self._user_within_team_space_allocated_value - else: - raise AttributeError("missing required field 'user_within_team_space_allocated'") - - @user_within_team_space_allocated.setter - def user_within_team_space_allocated(self, val): - val = self._user_within_team_space_allocated_validator.validate(val) - self._user_within_team_space_allocated_value = val - self._user_within_team_space_allocated_present = True - - @user_within_team_space_allocated.deleter - def user_within_team_space_allocated(self): - self._user_within_team_space_allocated_value = None - self._user_within_team_space_allocated_present = False - - @property - def user_within_team_space_limit_type(self): - """ - The type of the space limit imposed on the team member (off, alert_only, - stop_sync). - - :rtype: team_common.MemberSpaceLimitType - """ - if self._user_within_team_space_limit_type_present: - return self._user_within_team_space_limit_type_value - else: - raise AttributeError("missing required field 'user_within_team_space_limit_type'") + # Instance attribute type: int (validator is set below) + used = bb.Attribute("used") - @user_within_team_space_limit_type.setter - def user_within_team_space_limit_type(self, val): - self._user_within_team_space_limit_type_validator.validate_type_only(val) - self._user_within_team_space_limit_type_value = val - self._user_within_team_space_limit_type_present = True + # Instance attribute type: int (validator is set below) + allocated = bb.Attribute("allocated") - @user_within_team_space_limit_type.deleter - def user_within_team_space_limit_type(self): - self._user_within_team_space_limit_type_value = None - self._user_within_team_space_limit_type_present = False + # Instance attribute type: int (validator is set below) + user_within_team_space_allocated = bb.Attribute("user_within_team_space_allocated") - @property - def user_within_team_space_used_cached(self): - """ - An accurate cached calculation of a team member's total space usage - (bytes). + # Instance attribute type: team_common.MemberSpaceLimitType (validator is set below) + user_within_team_space_limit_type = bb.Attribute("user_within_team_space_limit_type", user_defined=True) - :rtype: int - """ - if self._user_within_team_space_used_cached_present: - return self._user_within_team_space_used_cached_value - else: - raise AttributeError("missing required field 'user_within_team_space_used_cached'") - - @user_within_team_space_used_cached.setter - def user_within_team_space_used_cached(self, val): - val = self._user_within_team_space_used_cached_validator.validate(val) - self._user_within_team_space_used_cached_value = val - self._user_within_team_space_used_cached_present = True - - @user_within_team_space_used_cached.deleter - def user_within_team_space_used_cached(self): - self._user_within_team_space_used_cached_value = None - self._user_within_team_space_used_cached_present = False + # Instance attribute type: int (validator is set below) + user_within_team_space_used_cached = bb.Attribute("user_within_team_space_used_cached") def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamSpaceAllocation, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'TeamSpaceAllocation(used={!r}, allocated={!r}, user_within_team_space_allocated={!r}, user_within_team_space_limit_type={!r}, user_within_team_space_used_cached={!r})'.format( - self._used_value, - self._allocated_value, - self._user_within_team_space_allocated_value, - self._user_within_team_space_limit_type_value, - self._user_within_team_space_used_cached_value, - ) - TeamSpaceAllocation_validator = bv.Struct(TeamSpaceAllocation) class UserFeature(bb.Union): @@ -1876,9 +952,6 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserFeature, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UserFeature(%r, %r)' % (self._tag, self._value) - UserFeature_validator = bv.Union(UserFeature) class UserFeatureValue(bb.Union): @@ -1963,9 +1036,6 @@ def get_file_locking(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserFeatureValue, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UserFeatureValue(%r, %r)' % (self._tag, self._value) - UserFeatureValue_validator = bv.Union(UserFeatureValue) class UserFeaturesGetValuesBatchArg(bb.Struct): @@ -1977,50 +1047,22 @@ class UserFeaturesGetValuesBatchArg(bb.Struct): __slots__ = [ '_features_value', - '_features_present', ] _has_required_fields = True def __init__(self, features=None): - self._features_value = None - self._features_present = False + self._features_value = bb.NOT_SET if features is not None: self.features = features - @property - def features(self): - """ - A list of features in :class:`UserFeature`. If the list is empty, this - route will return :class:`UserFeaturesGetValuesBatchError`. - - :rtype: list of [UserFeature] - """ - 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 + # Instance attribute type: list of [UserFeature] (validator is set below) + features = bb.Attribute("features") def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserFeaturesGetValuesBatchArg, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UserFeaturesGetValuesBatchArg(features={!r})'.format( - self._features_value, - ) - UserFeaturesGetValuesBatchArg_validator = bv.Struct(UserFeaturesGetValuesBatchArg) class UserFeaturesGetValuesBatchError(bb.Union): @@ -2059,65 +1101,37 @@ def is_other(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserFeaturesGetValuesBatchError, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UserFeaturesGetValuesBatchError(%r, %r)' % (self._tag, self._value) - UserFeaturesGetValuesBatchError_validator = bv.Union(UserFeaturesGetValuesBatchError) class UserFeaturesGetValuesBatchResult(bb.Struct): __slots__ = [ '_values_value', - '_values_present', ] _has_required_fields = True def __init__(self, values=None): - self._values_value = None - self._values_present = False + self._values_value = bb.NOT_SET if values is not None: self.values = values - @property - def values(self): - """ - :rtype: list of [UserFeatureValue] - """ - 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 + # Instance attribute type: list of [UserFeatureValue] (validator is set below) + values = bb.Attribute("values") def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserFeaturesGetValuesBatchResult, self)._process_custom_annotations(annotation_type, field_path, processor) - def __repr__(self): - return 'UserFeaturesGetValuesBatchResult(values={!r})'.format( - self._values_value, - ) - UserFeaturesGetValuesBatchResult_validator = bv.Struct(UserFeaturesGetValuesBatchResult) 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.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', @@ -2127,23 +1141,23 @@ def __repr__(self): '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), + ('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.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), + ('is_teammate', BasicAccount.is_teammate.validator), + ('team_member_id', BasicAccount.team_member_id.validator), ] FileLockingValue._enabled_validator = bv.Boolean() @@ -2155,14 +1169,14 @@ def __repr__(self): FileLockingValue.other = FileLockingValue('other') -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._root_info_validator = common.RootInfo_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.root_info.validator = common.RootInfo_validator FullAccount._all_field_names_ = Account._all_field_names_.union(set([ 'country', 'locale', @@ -2174,45 +1188,45 @@ def __repr__(self): 'root_info', ])) 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), - ('root_info', FullAccount._root_info_validator), + ('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), + ('root_info', FullAccount.root_info.validator), ] -Team._id_validator = bv.String() -Team._name_validator = bv.String() +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), + ('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.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), + ('sharing_policies', FullTeam.sharing_policies.validator), + ('office_addin_policy', FullTeam.office_addin_policy.validator), ] -GetAccountArg._account_id_validator = users_common.AccountId_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)] +GetAccountArg._all_fields_ = [('account_id', GetAccountArg.account_id.validator)] -GetAccountBatchArg._account_ids_validator = bv.List(users_common.AccountId_validator, min_items=1) +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)] +GetAccountBatchArg._all_fields_ = [('account_ids', GetAccountBatchArg.account_ids.validator)] GetAccountBatchError._no_account_validator = users_common.AccountId_validator GetAccountBatchError._other_validator = bv.Void() @@ -2233,15 +1247,15 @@ def __repr__(self): GetAccountError.no_account = GetAccountError('no_account') GetAccountError.other = GetAccountError('other') -IndividualSpaceAllocation._allocated_validator = bv.UInt64() +IndividualSpaceAllocation.allocated.validator = bv.UInt64() IndividualSpaceAllocation._all_field_names_ = set(['allocated']) -IndividualSpaceAllocation._all_fields_ = [('allocated', IndividualSpaceAllocation._allocated_validator)] +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.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', @@ -2250,11 +1264,11 @@ def __repr__(self): '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), + ('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), ] PaperAsFilesValue._enabled_validator = bv.Boolean() @@ -2277,22 +1291,22 @@ def __repr__(self): SpaceAllocation.other = SpaceAllocation('other') -SpaceUsage._used_validator = bv.UInt64() -SpaceUsage._allocation_validator = SpaceAllocation_validator +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), + ('used', SpaceUsage.used.validator), + ('allocation', SpaceUsage.allocation.validator), ] -TeamSpaceAllocation._used_validator = bv.UInt64() -TeamSpaceAllocation._allocated_validator = bv.UInt64() -TeamSpaceAllocation._user_within_team_space_allocated_validator = bv.UInt64() -TeamSpaceAllocation._user_within_team_space_limit_type_validator = team_common.MemberSpaceLimitType_validator -TeamSpaceAllocation._user_within_team_space_used_cached_validator = bv.UInt64() +TeamSpaceAllocation.used.validator = bv.UInt64() +TeamSpaceAllocation.allocated.validator = bv.UInt64() +TeamSpaceAllocation.user_within_team_space_allocated.validator = bv.UInt64() +TeamSpaceAllocation.user_within_team_space_limit_type.validator = team_common.MemberSpaceLimitType_validator +TeamSpaceAllocation.user_within_team_space_used_cached.validator = bv.UInt64() TeamSpaceAllocation._all_field_names_ = set([ 'used', 'allocated', @@ -2301,11 +1315,11 @@ def __repr__(self): 'user_within_team_space_used_cached', ]) TeamSpaceAllocation._all_fields_ = [ - ('used', TeamSpaceAllocation._used_validator), - ('allocated', TeamSpaceAllocation._allocated_validator), - ('user_within_team_space_allocated', TeamSpaceAllocation._user_within_team_space_allocated_validator), - ('user_within_team_space_limit_type', TeamSpaceAllocation._user_within_team_space_limit_type_validator), - ('user_within_team_space_used_cached', TeamSpaceAllocation._user_within_team_space_used_cached_validator), + ('used', TeamSpaceAllocation.used.validator), + ('allocated', TeamSpaceAllocation.allocated.validator), + ('user_within_team_space_allocated', TeamSpaceAllocation.user_within_team_space_allocated.validator), + ('user_within_team_space_limit_type', TeamSpaceAllocation.user_within_team_space_limit_type.validator), + ('user_within_team_space_used_cached', TeamSpaceAllocation.user_within_team_space_used_cached.validator), ] UserFeature._paper_as_files_validator = bv.Void() @@ -2332,9 +1346,9 @@ def __repr__(self): UserFeatureValue.other = UserFeatureValue('other') -UserFeaturesGetValuesBatchArg._features_validator = bv.List(UserFeature_validator) +UserFeaturesGetValuesBatchArg.features.validator = bv.List(UserFeature_validator) UserFeaturesGetValuesBatchArg._all_field_names_ = set(['features']) -UserFeaturesGetValuesBatchArg._all_fields_ = [('features', UserFeaturesGetValuesBatchArg._features_validator)] +UserFeaturesGetValuesBatchArg._all_fields_ = [('features', UserFeaturesGetValuesBatchArg.features.validator)] UserFeaturesGetValuesBatchError._empty_features_list_validator = bv.Void() UserFeaturesGetValuesBatchError._other_validator = bv.Void() @@ -2346,9 +1360,9 @@ def __repr__(self): UserFeaturesGetValuesBatchError.empty_features_list = UserFeaturesGetValuesBatchError('empty_features_list') UserFeaturesGetValuesBatchError.other = UserFeaturesGetValuesBatchError('other') -UserFeaturesGetValuesBatchResult._values_validator = bv.List(UserFeatureValue_validator) +UserFeaturesGetValuesBatchResult.values.validator = bv.List(UserFeatureValue_validator) UserFeaturesGetValuesBatchResult._all_field_names_ = set(['values']) -UserFeaturesGetValuesBatchResult._all_fields_ = [('values', UserFeaturesGetValuesBatchResult._values_validator)] +UserFeaturesGetValuesBatchResult._all_fields_ = [('values', UserFeaturesGetValuesBatchResult.values.validator)] features_get_values = bb.Route( 'features/get_values', diff --git a/dropbox/users_common.py b/dropbox/users_common.py index 51483c2a..81e70bac 100644 --- a/dropbox/users_common.py +++ b/dropbox/users_common.py @@ -7,14 +7,9 @@ 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 (ImportError, 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 +from __future__ import unicode_literals +from stone.backends.python_rsrc import stone_base as bb +from stone.backends.python_rsrc import stone_validators as bv class AccountType(bb.Union): """ @@ -64,9 +59,6 @@ def is_business(self): def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccountType, self)._process_custom_annotations(annotation_type, field_path, processor) - 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) diff --git a/generate_base_client.py b/generate_base_client.py index f9b5b38a..66d89f34 100755 --- a/generate_base_client.py +++ b/generate_base_client.py @@ -50,7 +50,7 @@ def main(): subprocess.check_output( (['python', '-m', 'stone.cli', 'python_types', dropbox_pkg_path] + specs + ['-a', 'host', '-a', 'style'] + - ['--', '-r', 'dropbox.dropbox.Dropbox.{ns}_{route}'])) + ['--', '-r', 'dropbox.dropbox_client.Dropbox.{ns}_{route}', '-p', 'dropbox'])) if verbose: print('Generating Python client') diff --git a/requirements.txt b/requirements.txt index a8710b5c..424c847b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,4 +6,4 @@ six==1.14.0 sphinx twine wheel -stone==1.* +stone>=2.* diff --git a/setup.py b/setup.py index c61fb719..e8e0584e 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ from setuptools import setup -dbx_mod_path = os.path.join(os.path.dirname(__file__), 'dropbox/dropbox.py') +dbx_mod_path = os.path.join(os.path.dirname(__file__), 'dropbox/dropbox_client.py') line = '= "UNKNOWN"' for line in open(dbx_mod_path): if line.startswith('__version__'): diff --git a/test/requirements.txt b/test/requirements.txt index 3d299653..174a5340 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -2,3 +2,4 @@ pytest mock pytest-mock coverage +stone>=2.* \ No newline at end of file diff --git a/test/test_dropbox_unit.py b/test/test_dropbox_unit.py index c756f8d1..8c0fa0a3 100644 --- a/test/test_dropbox_unit.py +++ b/test/test_dropbox_unit.py @@ -6,7 +6,7 @@ # Tests OAuth Flow from dropbox import DropboxOAuth2Flow, session, Dropbox, create_session -from dropbox.dropbox import BadInputException, DropboxTeam +from dropbox.dropbox_client import BadInputException, DropboxTeam from dropbox.exceptions import AuthError from dropbox.oauth import OAuth2FlowNoRedirectResult, DropboxOAuth2FlowNoRedirect from datetime import datetime, timedelta diff --git a/tox.ini b/tox.ini index f1d186e4..ac2631b8 100644 --- a/tox.ini +++ b/tox.ini @@ -8,6 +8,10 @@ skip_missing_interpreters = true # See ignore = E128,E301,E302,E305,E402,W503,W504 max-line-length = 100 +per-file-ignores = + dropbox/stone_base.py: F401, F403 + dropbox/stone_validators.py: F401, F403 + dropbox/stone_serializers.py: F401, F403 [testenv:test_integration] From 7177fd120c811aa844b594adb1714d2f5a49e9b6 Mon Sep 17 00:00:00 2001 From: yuxiang-he Date: Thu, 19 Nov 2020 15:42:54 -0800 Subject: [PATCH 08/90] change update_version.sh to reflect the renaming of dropbox/dropbox.py to dropbox/dropbox_client.py (#294) --- scripts/update_version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update_version.sh b/scripts/update_version.sh index ea085f05..c487b4f0 100755 --- a/scripts/update_version.sh +++ b/scripts/update_version.sh @@ -12,7 +12,7 @@ else git reset --hard HEAD git checkout -b "tmp-release-${NEW_VERSION}" - perl -pi -e "s/^__version__ = .*$/__version__ = '$1'/g" dropbox/dropbox.py + perl -pi -e "s/^__version__ = .*$/__version__ = '$1'/g" dropbox/dropbox_client.py perl -pi -e 's/(\?branch=)main$/\1\v'$1'/g ;' -e 's/(\?version=)latest$/\1\stable/g ;' -e 's/(\/en\/)latest(\/)$/\1\stable\2/g ;' -e 's/(\[Latest) (Documentation\])$/\1 Release \2/g ;' README.rst git add -u From c6718977157442d6aca7db1b6347ba420263b431 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Dec 2020 17:38:48 -0600 Subject: [PATCH 09/90] Bump peter-evans/create-pull-request from v3.4.1 to v3.5.1 (#297) Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from v3.4.1 to v3.5.1. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v3.4.1...ce699aa2d108e9d04fde047a71e44b2bf444b6dc) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/spec_update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spec_update.yml b/.github/workflows/spec_update.yml index 61481aca..e3437768 100644 --- a/.github/workflows/spec_update.yml +++ b/.github/workflows/spec_update.yml @@ -54,7 +54,7 @@ jobs: pip install -r requirements.txt python generate_base_client.py - name: Create Pull Request - uses: peter-evans/create-pull-request@v3.4.1 + uses: peter-evans/create-pull-request@v3.5.1 if: steps.git-diff-num.outputs.num-diff != 0 with: token: ${{ secrets.SPEC_UPDATE_TOKEN }} From 84448bbb806d40c4ef5f6f36e985ca2f19e48d3f Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Thu, 3 Dec 2020 17:43:36 -0600 Subject: [PATCH 10/90] Fix links in release notes to be absolute (#287) Co-authored-by: Karandeep Johar --- scripts/release_note_generator.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/release_note_generator.sh b/scripts/release_note_generator.sh index cb6e945d..be7d47d3 100644 --- a/scripts/release_note_generator.sh +++ b/scripts/release_note_generator.sh @@ -5,5 +5,5 @@ echo "Getting commit history since $last_version" num_commits=$(git rev-list --count $last_version..HEAD) echo "Found $num_commits commits since last revision" git_log=$(git log -n $num_commits --pretty="format:* %s %n") -linked_log=$(echo "Release Notes: \n\n$git_log" | sed -e 's/#\([0-9]*\)/[#\1](github.com\/dropbox\/dropbox-sdk-python\/pull\/\1)/g') +linked_log=$(echo "Release Notes: \n\n$git_log" | sed -e 's/#\([0-9]*\)/[#\1](https:\/\/github.com\/dropbox\/dropbox-sdk-python\/pull\/\1)/g') echo "\n\n$linked_log" \ No newline at end of file From 81950abddf50bd9c7c9cc8f47559bb031bee8ca2 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Thu, 3 Dec 2020 15:54:20 -0800 Subject: [PATCH 11/90] Automated Spec Update (#296) 8f960cb69b5209b30f0007a95da4d7486c1a58d4 Change Notes: Common Namespace: - Update Comments - Update Examples Team Log Namespace: - Add AdminAlertCategoryEnum, AdminAlertSeverityEnum unions - Add AdminAlertingTriggeredAlertDetails, GovernancePolicyAddFolderFailedDetails, GovernancePolocyExportCreatedDetails, GovernancePolicyExportRemovedDetails, GovernancePolicyReportCreatedDetails, GovernancePolicyZipPartDownloadedDetails, AdminAlertingTriggeredAlertType, GovernancePolicyAddFolderFailedType, GovernancePolicyExportCreatedType, GovernancePolicyExportCreatedType, GovernancePolicyExportRemovedType, GovernancePolicyReportCreatedType, GovernancePolicyZipPartDownloadType structs - Update EventDetails union to add admin_alerting_triggered_alert_details, governance_policy_add_folder_failed_details, governance_policy_export_created_details, governance_policy_export_removed_details, governance_policy_report_created_details, governance_policy_zip_part_downloaded_details - Update EventType union to include admin_alerting_triggered_alert, governance_policy_add_folder_failed, governance_policy_export_created, governance_policy_export_removed, governance_policy_report_created, governance_policy_zip_part_downloaded, admin_alerting_triggered_alert, governance_policy_add_folder_failed, governance_policy_export_created, governance_policy_export_removed, governance_policy_report_created, governance_policy_zip_part_downloaded Co-authored-by: DropboxBot Co-authored-by: Brad Rogers --- dropbox/common.py | 4 +- dropbox/team_log.py | 1313 +++++++++++++++++++++++++++++++++++++++++++ spec | 2 +- 3 files changed, 1316 insertions(+), 3 deletions(-) diff --git a/dropbox/common.py b/dropbox/common.py index 6b9efcaf..775b99ae 100644 --- a/dropbox/common.py +++ b/dropbox/common.py @@ -125,7 +125,7 @@ class PathRootError(bb.Union): :ivar RootInfo PathRootError.invalid_root: The root namespace id in Dropbox-API-Path-Root header is not valid. The value of this error is - use's latest root info. + the user's latest root info. :ivar common.PathRootError.no_permission: You don't have permission to access the namespace id in Dropbox-API-Path-Root header. """ @@ -174,7 +174,7 @@ def is_other(self): def get_invalid_root(self): """ The root namespace id in Dropbox-API-Path-Root header is not valid. The - value of this error is use's latest root info. + value of this error is the user's latest root info. Only call this if :meth:`is_invalid_root` is true. diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 87f8d02c..348a9a34 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -1070,6 +1070,168 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ActorLogInfo_validator = bv.Union(ActorLogInfo) +class AdminAlertCategoryEnum(bb.Union): + """ + Alert category + + This class acts as a tagged union. Only 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 + account_takeover = None + # Attribute is overwritten below the class definition + data_loss_protection = None + # Attribute is overwritten below the class definition + malware_sharing = None + # Attribute is overwritten below the class definition + massive_file_operation = None + # Attribute is overwritten below the class definition + na = None + # Attribute is overwritten below the class definition + threat_management = None + # Attribute is overwritten below the class definition + other = None + + def is_account_takeover(self): + """ + Check if the union tag is ``account_takeover``. + + :rtype: bool + """ + return self._tag == 'account_takeover' + + def is_data_loss_protection(self): + """ + Check if the union tag is ``data_loss_protection``. + + :rtype: bool + """ + return self._tag == 'data_loss_protection' + + def is_malware_sharing(self): + """ + Check if the union tag is ``malware_sharing``. + + :rtype: bool + """ + return self._tag == 'malware_sharing' + + def is_massive_file_operation(self): + """ + Check if the union tag is ``massive_file_operation``. + + :rtype: bool + """ + return self._tag == 'massive_file_operation' + + def is_na(self): + """ + Check if the union tag is ``na``. + + :rtype: bool + """ + return self._tag == 'na' + + def is_threat_management(self): + """ + Check if the union tag is ``threat_management``. + + :rtype: bool + """ + return self._tag == 'threat_management' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AdminAlertCategoryEnum, self)._process_custom_annotations(annotation_type, field_path, processor) + +AdminAlertCategoryEnum_validator = bv.Union(AdminAlertCategoryEnum) + +class AdminAlertSeverityEnum(bb.Union): + """ + Alert severity + + This class acts as a tagged union. Only 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 + high = None + # Attribute is overwritten below the class definition + info = None + # Attribute is overwritten below the class definition + low = None + # Attribute is overwritten below the class definition + medium = None + # Attribute is overwritten below the class definition + na = None + # Attribute is overwritten below the class definition + other = None + + def is_high(self): + """ + Check if the union tag is ``high``. + + :rtype: bool + """ + return self._tag == 'high' + + def is_info(self): + """ + Check if the union tag is ``info``. + + :rtype: bool + """ + return self._tag == 'info' + + def is_low(self): + """ + Check if the union tag is ``low``. + + :rtype: bool + """ + return self._tag == 'low' + + def is_medium(self): + """ + Check if the union tag is ``medium``. + + :rtype: bool + """ + return self._tag == 'medium' + + def is_na(self): + """ + Check if the union tag is ``na``. + + :rtype: bool + """ + return self._tag == 'na' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AdminAlertSeverityEnum, self)._process_custom_annotations(annotation_type, field_path, processor) + +AdminAlertSeverityEnum_validator = bv.Union(AdminAlertSeverityEnum) + class AdminAlertingAlertConfiguration(bb.Struct): """ Alert configurations @@ -1213,6 +1375,85 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminAlertingChangedAlertConfigType_validator = bv.Struct(AdminAlertingChangedAlertConfigType) +class AdminAlertingTriggeredAlertDetails(bb.Struct): + """ + Triggered security alert. + + :ivar team_log.AdminAlertingTriggeredAlertDetails.alert_name: Alert name. + :ivar team_log.AdminAlertingTriggeredAlertDetails.alert_severity: Alert + severity. + :ivar team_log.AdminAlertingTriggeredAlertDetails.alert_category: Alert + category. + :ivar team_log.AdminAlertingTriggeredAlertDetails.alert_instance_id: Alert + ID. + """ + + __slots__ = [ + '_alert_name_value', + '_alert_severity_value', + '_alert_category_value', + '_alert_instance_id_value', + ] + + _has_required_fields = True + + def __init__(self, + alert_name=None, + alert_severity=None, + alert_category=None, + alert_instance_id=None): + self._alert_name_value = bb.NOT_SET + self._alert_severity_value = bb.NOT_SET + self._alert_category_value = bb.NOT_SET + self._alert_instance_id_value = bb.NOT_SET + if alert_name is not None: + self.alert_name = alert_name + if alert_severity is not None: + self.alert_severity = alert_severity + if alert_category is not None: + self.alert_category = alert_category + if alert_instance_id is not None: + self.alert_instance_id = alert_instance_id + + # Instance attribute type: str (validator is set below) + alert_name = bb.Attribute("alert_name") + + # Instance attribute type: AdminAlertSeverityEnum (validator is set below) + alert_severity = bb.Attribute("alert_severity", user_defined=True) + + # Instance attribute type: AdminAlertCategoryEnum (validator is set below) + alert_category = bb.Attribute("alert_category", user_defined=True) + + # Instance attribute type: str (validator is set below) + alert_instance_id = bb.Attribute("alert_instance_id") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AdminAlertingTriggeredAlertDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +AdminAlertingTriggeredAlertDetails_validator = bv.Struct(AdminAlertingTriggeredAlertDetails) + +class AdminAlertingTriggeredAlertType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AdminAlertingTriggeredAlertType, self)._process_custom_annotations(annotation_type, field_path, processor) + +AdminAlertingTriggeredAlertType_validator = bv.Struct(AdminAlertingTriggeredAlertType) + class AdminRole(bb.Union): """ This class acts as a tagged union. Only one of the ``is_*`` methods will @@ -6586,6 +6827,17 @@ def admin_alerting_changed_alert_config_details(cls, val): """ return cls('admin_alerting_changed_alert_config_details', val) + @classmethod + def admin_alerting_triggered_alert_details(cls, val): + """ + Create an instance of this class set to the + ``admin_alerting_triggered_alert_details`` tag with value ``val``. + + :param AdminAlertingTriggeredAlertDetails val: + :rtype: EventDetails + """ + return cls('admin_alerting_triggered_alert_details', val) + @classmethod def app_link_team_details(cls, val): """ @@ -6751,6 +7003,17 @@ def governance_policy_add_folders_details(cls, val): """ return cls('governance_policy_add_folders_details', val) + @classmethod + def governance_policy_add_folder_failed_details(cls, val): + """ + Create an instance of this class set to the + ``governance_policy_add_folder_failed_details`` tag with value ``val``. + + :param GovernancePolicyAddFolderFailedDetails val: + :rtype: EventDetails + """ + return cls('governance_policy_add_folder_failed_details', val) + @classmethod def governance_policy_create_details(cls, val): """ @@ -6795,6 +7058,28 @@ def governance_policy_edit_duration_details(cls, val): """ return cls('governance_policy_edit_duration_details', val) + @classmethod + def governance_policy_export_created_details(cls, val): + """ + Create an instance of this class set to the + ``governance_policy_export_created_details`` tag with value ``val``. + + :param GovernancePolicyExportCreatedDetails val: + :rtype: EventDetails + """ + return cls('governance_policy_export_created_details', val) + + @classmethod + def governance_policy_export_removed_details(cls, val): + """ + Create an instance of this class set to the + ``governance_policy_export_removed_details`` tag with value ``val``. + + :param GovernancePolicyExportRemovedDetails val: + :rtype: EventDetails + """ + return cls('governance_policy_export_removed_details', val) + @classmethod def governance_policy_remove_folders_details(cls, val): """ @@ -6806,6 +7091,29 @@ def governance_policy_remove_folders_details(cls, val): """ return cls('governance_policy_remove_folders_details', val) + @classmethod + def governance_policy_report_created_details(cls, val): + """ + Create an instance of this class set to the + ``governance_policy_report_created_details`` tag with value ``val``. + + :param GovernancePolicyReportCreatedDetails val: + :rtype: EventDetails + """ + return cls('governance_policy_report_created_details', val) + + @classmethod + def governance_policy_zip_part_downloaded_details(cls, val): + """ + Create an instance of this class set to the + ``governance_policy_zip_part_downloaded_details`` tag with value + ``val``. + + :param GovernancePolicyZipPartDownloadedDetails val: + :rtype: EventDetails + """ + return cls('governance_policy_zip_part_downloaded_details', val) + @classmethod def legal_holds_activate_a_hold_details(cls, val): """ @@ -11587,6 +11895,14 @@ def is_admin_alerting_changed_alert_config_details(self): """ return self._tag == 'admin_alerting_changed_alert_config_details' + def is_admin_alerting_triggered_alert_details(self): + """ + Check if the union tag is ``admin_alerting_triggered_alert_details``. + + :rtype: bool + """ + return self._tag == 'admin_alerting_triggered_alert_details' + def is_app_link_team_details(self): """ Check if the union tag is ``app_link_team_details``. @@ -11707,6 +12023,14 @@ def is_governance_policy_add_folders_details(self): """ return self._tag == 'governance_policy_add_folders_details' + def is_governance_policy_add_folder_failed_details(self): + """ + Check if the union tag is ``governance_policy_add_folder_failed_details``. + + :rtype: bool + """ + return self._tag == 'governance_policy_add_folder_failed_details' + def is_governance_policy_create_details(self): """ Check if the union tag is ``governance_policy_create_details``. @@ -11739,6 +12063,22 @@ def is_governance_policy_edit_duration_details(self): """ return self._tag == 'governance_policy_edit_duration_details' + def is_governance_policy_export_created_details(self): + """ + Check if the union tag is ``governance_policy_export_created_details``. + + :rtype: bool + """ + return self._tag == 'governance_policy_export_created_details' + + def is_governance_policy_export_removed_details(self): + """ + Check if the union tag is ``governance_policy_export_removed_details``. + + :rtype: bool + """ + return self._tag == 'governance_policy_export_removed_details' + def is_governance_policy_remove_folders_details(self): """ Check if the union tag is ``governance_policy_remove_folders_details``. @@ -11747,6 +12087,22 @@ def is_governance_policy_remove_folders_details(self): """ return self._tag == 'governance_policy_remove_folders_details' + def is_governance_policy_report_created_details(self): + """ + Check if the union tag is ``governance_policy_report_created_details``. + + :rtype: bool + """ + return self._tag == 'governance_policy_report_created_details' + + def is_governance_policy_zip_part_downloaded_details(self): + """ + Check if the union tag is ``governance_policy_zip_part_downloaded_details``. + + :rtype: bool + """ + return self._tag == 'governance_policy_zip_part_downloaded_details' + def is_legal_holds_activate_a_hold_details(self): """ Check if the union tag is ``legal_holds_activate_a_hold_details``. @@ -15197,6 +15553,16 @@ def get_admin_alerting_changed_alert_config_details(self): raise AttributeError("tag 'admin_alerting_changed_alert_config_details' not set") return self._value + def get_admin_alerting_triggered_alert_details(self): + """ + Only call this if :meth:`is_admin_alerting_triggered_alert_details` is true. + + :rtype: AdminAlertingTriggeredAlertDetails + """ + if not self.is_admin_alerting_triggered_alert_details(): + raise AttributeError("tag 'admin_alerting_triggered_alert_details' not set") + return self._value + def get_app_link_team_details(self): """ Only call this if :meth:`is_app_link_team_details` is true. @@ -15347,6 +15713,16 @@ def get_governance_policy_add_folders_details(self): raise AttributeError("tag 'governance_policy_add_folders_details' not set") return self._value + def get_governance_policy_add_folder_failed_details(self): + """ + Only call this if :meth:`is_governance_policy_add_folder_failed_details` is true. + + :rtype: GovernancePolicyAddFolderFailedDetails + """ + if not self.is_governance_policy_add_folder_failed_details(): + raise AttributeError("tag 'governance_policy_add_folder_failed_details' not set") + return self._value + def get_governance_policy_create_details(self): """ Only call this if :meth:`is_governance_policy_create_details` is true. @@ -15387,6 +15763,26 @@ def get_governance_policy_edit_duration_details(self): raise AttributeError("tag 'governance_policy_edit_duration_details' not set") return self._value + def get_governance_policy_export_created_details(self): + """ + Only call this if :meth:`is_governance_policy_export_created_details` is true. + + :rtype: GovernancePolicyExportCreatedDetails + """ + if not self.is_governance_policy_export_created_details(): + raise AttributeError("tag 'governance_policy_export_created_details' not set") + return self._value + + def get_governance_policy_export_removed_details(self): + """ + Only call this if :meth:`is_governance_policy_export_removed_details` is true. + + :rtype: GovernancePolicyExportRemovedDetails + """ + if not self.is_governance_policy_export_removed_details(): + raise AttributeError("tag 'governance_policy_export_removed_details' not set") + return self._value + def get_governance_policy_remove_folders_details(self): """ Only call this if :meth:`is_governance_policy_remove_folders_details` is true. @@ -15397,6 +15793,26 @@ def get_governance_policy_remove_folders_details(self): raise AttributeError("tag 'governance_policy_remove_folders_details' not set") return self._value + def get_governance_policy_report_created_details(self): + """ + Only call this if :meth:`is_governance_policy_report_created_details` is true. + + :rtype: GovernancePolicyReportCreatedDetails + """ + if not self.is_governance_policy_report_created_details(): + raise AttributeError("tag 'governance_policy_report_created_details' not set") + return self._value + + def get_governance_policy_zip_part_downloaded_details(self): + """ + Only call this if :meth:`is_governance_policy_zip_part_downloaded_details` is true. + + :rtype: GovernancePolicyZipPartDownloadedDetails + """ + if not self.is_governance_policy_zip_part_downloaded_details(): + raise AttributeError("tag 'governance_policy_zip_part_downloaded_details' not set") + return self._value + def get_legal_holds_activate_a_hold_details(self): """ Only call this if :meth:`is_legal_holds_activate_a_hold_details` is true. @@ -19706,6 +20122,9 @@ class EventType(bb.Union): :ivar AdminAlertingChangedAlertConfigType EventType.admin_alerting_changed_alert_config: (admin_alerting) Changed an alert setting + :ivar AdminAlertingTriggeredAlertType + EventType.admin_alerting_triggered_alert: (admin_alerting) Triggered + security alert :ivar AppLinkTeamType EventType.app_link_team: (apps) Linked app for team :ivar AppLinkUserType EventType.app_link_user: (apps) Linked app for member :ivar AppUnlinkTeamType EventType.app_unlink_team: (apps) Unlinked app for @@ -19736,6 +20155,9 @@ class EventType(bb.Union): :ivar GovernancePolicyAddFoldersType EventType.governance_policy_add_folders: (data_governance) Added folders to policy + :ivar GovernancePolicyAddFolderFailedType + EventType.governance_policy_add_folder_failed: (data_governance) + Couldn't add a folder to a policy :ivar GovernancePolicyCreateType EventType.governance_policy_create: (data_governance) Activated a new policy :ivar GovernancePolicyDeleteType EventType.governance_policy_delete: @@ -19746,9 +20168,21 @@ class EventType(bb.Union): :ivar GovernancePolicyEditDurationType EventType.governance_policy_edit_duration: (data_governance) Changed policy duration + :ivar GovernancePolicyExportCreatedType + EventType.governance_policy_export_created: (data_governance) Created a + policy download + :ivar GovernancePolicyExportRemovedType + EventType.governance_policy_export_removed: (data_governance) Removed a + policy download :ivar GovernancePolicyRemoveFoldersType EventType.governance_policy_remove_folders: (data_governance) Removed folders from policy + :ivar GovernancePolicyReportCreatedType + EventType.governance_policy_report_created: (data_governance) Created a + summary report for a policy + :ivar GovernancePolicyZipPartDownloadedType + EventType.governance_policy_zip_part_downloaded: (data_governance) + Downloaded content from a policy :ivar LegalHoldsActivateAHoldType EventType.legal_holds_activate_a_hold: (data_governance) Activated a hold :ivar LegalHoldsAddMembersType EventType.legal_holds_add_members: @@ -20805,6 +21239,17 @@ def admin_alerting_changed_alert_config(cls, val): """ return cls('admin_alerting_changed_alert_config', val) + @classmethod + def admin_alerting_triggered_alert(cls, val): + """ + Create an instance of this class set to the + ``admin_alerting_triggered_alert`` tag with value ``val``. + + :param AdminAlertingTriggeredAlertType val: + :rtype: EventType + """ + return cls('admin_alerting_triggered_alert', val) + @classmethod def app_link_team(cls, val): """ @@ -20970,6 +21415,17 @@ def governance_policy_add_folders(cls, val): """ return cls('governance_policy_add_folders', val) + @classmethod + def governance_policy_add_folder_failed(cls, val): + """ + Create an instance of this class set to the + ``governance_policy_add_folder_failed`` tag with value ``val``. + + :param GovernancePolicyAddFolderFailedType val: + :rtype: EventType + """ + return cls('governance_policy_add_folder_failed', val) + @classmethod def governance_policy_create(cls, val): """ @@ -21014,6 +21470,28 @@ def governance_policy_edit_duration(cls, val): """ return cls('governance_policy_edit_duration', val) + @classmethod + def governance_policy_export_created(cls, val): + """ + Create an instance of this class set to the + ``governance_policy_export_created`` tag with value ``val``. + + :param GovernancePolicyExportCreatedType val: + :rtype: EventType + """ + return cls('governance_policy_export_created', val) + + @classmethod + def governance_policy_export_removed(cls, val): + """ + Create an instance of this class set to the + ``governance_policy_export_removed`` tag with value ``val``. + + :param GovernancePolicyExportRemovedType val: + :rtype: EventType + """ + return cls('governance_policy_export_removed', val) + @classmethod def governance_policy_remove_folders(cls, val): """ @@ -21025,6 +21503,28 @@ def governance_policy_remove_folders(cls, val): """ return cls('governance_policy_remove_folders', val) + @classmethod + def governance_policy_report_created(cls, val): + """ + Create an instance of this class set to the + ``governance_policy_report_created`` tag with value ``val``. + + :param GovernancePolicyReportCreatedType val: + :rtype: EventType + """ + return cls('governance_policy_report_created', val) + + @classmethod + def governance_policy_zip_part_downloaded(cls, val): + """ + Create an instance of this class set to the + ``governance_policy_zip_part_downloaded`` tag with value ``val``. + + :param GovernancePolicyZipPartDownloadedType val: + :rtype: EventType + """ + return cls('governance_policy_zip_part_downloaded', val) + @classmethod def legal_holds_activate_a_hold(cls, val): """ @@ -25757,6 +26257,14 @@ def is_admin_alerting_changed_alert_config(self): """ return self._tag == 'admin_alerting_changed_alert_config' + def is_admin_alerting_triggered_alert(self): + """ + Check if the union tag is ``admin_alerting_triggered_alert``. + + :rtype: bool + """ + return self._tag == 'admin_alerting_triggered_alert' + def is_app_link_team(self): """ Check if the union tag is ``app_link_team``. @@ -25877,6 +26385,14 @@ def is_governance_policy_add_folders(self): """ return self._tag == 'governance_policy_add_folders' + def is_governance_policy_add_folder_failed(self): + """ + Check if the union tag is ``governance_policy_add_folder_failed``. + + :rtype: bool + """ + return self._tag == 'governance_policy_add_folder_failed' + def is_governance_policy_create(self): """ Check if the union tag is ``governance_policy_create``. @@ -25909,6 +26425,22 @@ def is_governance_policy_edit_duration(self): """ return self._tag == 'governance_policy_edit_duration' + def is_governance_policy_export_created(self): + """ + Check if the union tag is ``governance_policy_export_created``. + + :rtype: bool + """ + return self._tag == 'governance_policy_export_created' + + def is_governance_policy_export_removed(self): + """ + Check if the union tag is ``governance_policy_export_removed``. + + :rtype: bool + """ + return self._tag == 'governance_policy_export_removed' + def is_governance_policy_remove_folders(self): """ Check if the union tag is ``governance_policy_remove_folders``. @@ -25917,6 +26449,22 @@ def is_governance_policy_remove_folders(self): """ return self._tag == 'governance_policy_remove_folders' + def is_governance_policy_report_created(self): + """ + Check if the union tag is ``governance_policy_report_created``. + + :rtype: bool + """ + return self._tag == 'governance_policy_report_created' + + def is_governance_policy_zip_part_downloaded(self): + """ + Check if the union tag is ``governance_policy_zip_part_downloaded``. + + :rtype: bool + """ + return self._tag == 'governance_policy_zip_part_downloaded' + def is_legal_holds_activate_a_hold(self): """ Check if the union tag is ``legal_holds_activate_a_hold``. @@ -29361,6 +29909,18 @@ def get_admin_alerting_changed_alert_config(self): raise AttributeError("tag 'admin_alerting_changed_alert_config' not set") return self._value + def get_admin_alerting_triggered_alert(self): + """ + (admin_alerting) Triggered security alert + + Only call this if :meth:`is_admin_alerting_triggered_alert` is true. + + :rtype: AdminAlertingTriggeredAlertType + """ + if not self.is_admin_alerting_triggered_alert(): + raise AttributeError("tag 'admin_alerting_triggered_alert' not set") + return self._value + def get_app_link_team(self): """ (apps) Linked app for team @@ -29542,6 +30102,18 @@ def get_governance_policy_add_folders(self): raise AttributeError("tag 'governance_policy_add_folders' not set") return self._value + def get_governance_policy_add_folder_failed(self): + """ + (data_governance) Couldn't add a folder to a policy + + Only call this if :meth:`is_governance_policy_add_folder_failed` is true. + + :rtype: GovernancePolicyAddFolderFailedType + """ + if not self.is_governance_policy_add_folder_failed(): + raise AttributeError("tag 'governance_policy_add_folder_failed' not set") + return self._value + def get_governance_policy_create(self): """ (data_governance) Activated a new policy @@ -29590,6 +30162,30 @@ def get_governance_policy_edit_duration(self): raise AttributeError("tag 'governance_policy_edit_duration' not set") return self._value + def get_governance_policy_export_created(self): + """ + (data_governance) Created a policy download + + Only call this if :meth:`is_governance_policy_export_created` is true. + + :rtype: GovernancePolicyExportCreatedType + """ + if not self.is_governance_policy_export_created(): + raise AttributeError("tag 'governance_policy_export_created' not set") + return self._value + + def get_governance_policy_export_removed(self): + """ + (data_governance) Removed a policy download + + Only call this if :meth:`is_governance_policy_export_removed` is true. + + :rtype: GovernancePolicyExportRemovedType + """ + if not self.is_governance_policy_export_removed(): + raise AttributeError("tag 'governance_policy_export_removed' not set") + return self._value + def get_governance_policy_remove_folders(self): """ (data_governance) Removed folders from policy @@ -29602,6 +30198,30 @@ def get_governance_policy_remove_folders(self): raise AttributeError("tag 'governance_policy_remove_folders' not set") return self._value + def get_governance_policy_report_created(self): + """ + (data_governance) Created a summary report for a policy + + Only call this if :meth:`is_governance_policy_report_created` is true. + + :rtype: GovernancePolicyReportCreatedType + """ + if not self.is_governance_policy_report_created(): + raise AttributeError("tag 'governance_policy_report_created' not set") + return self._value + + def get_governance_policy_zip_part_downloaded(self): + """ + (data_governance) Downloaded content from a policy + + Only call this if :meth:`is_governance_policy_zip_part_downloaded` is true. + + :rtype: GovernancePolicyZipPartDownloadedType + """ + if not self.is_governance_policy_zip_part_downloaded(): + raise AttributeError("tag 'governance_policy_zip_part_downloaded' not set") + return self._value + def get_legal_holds_activate_a_hold(self): """ (data_governance) Activated a hold @@ -34832,6 +35452,8 @@ class EventTypeArg(bb.Union): :ivar team_log.EventTypeArg.admin_alerting_changed_alert_config: (admin_alerting) Changed an alert setting + :ivar team_log.EventTypeArg.admin_alerting_triggered_alert: (admin_alerting) + Triggered security alert :ivar team_log.EventTypeArg.app_link_team: (apps) Linked app for team :ivar team_log.EventTypeArg.app_link_user: (apps) Linked app for member :ivar team_log.EventTypeArg.app_unlink_team: (apps) Unlinked app for team @@ -34857,6 +35479,8 @@ class EventTypeArg(bb.Union): file comment :ivar team_log.EventTypeArg.governance_policy_add_folders: (data_governance) Added folders to policy + :ivar team_log.EventTypeArg.governance_policy_add_folder_failed: + (data_governance) Couldn't add a folder to a policy :ivar team_log.EventTypeArg.governance_policy_create: (data_governance) Activated a new policy :ivar team_log.EventTypeArg.governance_policy_delete: (data_governance) @@ -34865,8 +35489,16 @@ class EventTypeArg(bb.Union): (data_governance) Edited policy :ivar team_log.EventTypeArg.governance_policy_edit_duration: (data_governance) Changed policy duration + :ivar team_log.EventTypeArg.governance_policy_export_created: + (data_governance) Created a policy download + :ivar team_log.EventTypeArg.governance_policy_export_removed: + (data_governance) Removed a policy download :ivar team_log.EventTypeArg.governance_policy_remove_folders: (data_governance) Removed folders from policy + :ivar team_log.EventTypeArg.governance_policy_report_created: + (data_governance) Created a summary report for a policy + :ivar team_log.EventTypeArg.governance_policy_zip_part_downloaded: + (data_governance) Downloaded content from a policy :ivar team_log.EventTypeArg.legal_holds_activate_a_hold: (data_governance) Activated a hold :ivar team_log.EventTypeArg.legal_holds_add_members: (data_governance) Added @@ -35763,6 +36395,8 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition admin_alerting_changed_alert_config = None # Attribute is overwritten below the class definition + admin_alerting_triggered_alert = None + # Attribute is overwritten below the class definition app_link_team = None # Attribute is overwritten below the class definition app_link_user = None @@ -35793,6 +36427,8 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition governance_policy_add_folders = None # Attribute is overwritten below the class definition + governance_policy_add_folder_failed = None + # Attribute is overwritten below the class definition governance_policy_create = None # Attribute is overwritten below the class definition governance_policy_delete = None @@ -35801,8 +36437,16 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition governance_policy_edit_duration = None # Attribute is overwritten below the class definition + governance_policy_export_created = None + # Attribute is overwritten below the class definition + governance_policy_export_removed = None + # Attribute is overwritten below the class definition governance_policy_remove_folders = None # Attribute is overwritten below the class definition + governance_policy_report_created = None + # Attribute is overwritten below the class definition + governance_policy_zip_part_downloaded = None + # Attribute is overwritten below the class definition legal_holds_activate_a_hold = None # Attribute is overwritten below the class definition legal_holds_add_members = None @@ -36669,6 +37313,14 @@ def is_admin_alerting_changed_alert_config(self): """ return self._tag == 'admin_alerting_changed_alert_config' + def is_admin_alerting_triggered_alert(self): + """ + Check if the union tag is ``admin_alerting_triggered_alert``. + + :rtype: bool + """ + return self._tag == 'admin_alerting_triggered_alert' + def is_app_link_team(self): """ Check if the union tag is ``app_link_team``. @@ -36789,6 +37441,14 @@ def is_governance_policy_add_folders(self): """ return self._tag == 'governance_policy_add_folders' + def is_governance_policy_add_folder_failed(self): + """ + Check if the union tag is ``governance_policy_add_folder_failed``. + + :rtype: bool + """ + return self._tag == 'governance_policy_add_folder_failed' + def is_governance_policy_create(self): """ Check if the union tag is ``governance_policy_create``. @@ -36821,6 +37481,22 @@ def is_governance_policy_edit_duration(self): """ return self._tag == 'governance_policy_edit_duration' + def is_governance_policy_export_created(self): + """ + Check if the union tag is ``governance_policy_export_created``. + + :rtype: bool + """ + return self._tag == 'governance_policy_export_created' + + def is_governance_policy_export_removed(self): + """ + Check if the union tag is ``governance_policy_export_removed``. + + :rtype: bool + """ + return self._tag == 'governance_policy_export_removed' + def is_governance_policy_remove_folders(self): """ Check if the union tag is ``governance_policy_remove_folders``. @@ -36829,6 +37505,22 @@ def is_governance_policy_remove_folders(self): """ return self._tag == 'governance_policy_remove_folders' + def is_governance_policy_report_created(self): + """ + Check if the union tag is ``governance_policy_report_created``. + + :rtype: bool + """ + return self._tag == 'governance_policy_report_created' + + def is_governance_policy_zip_part_downloaded(self): + """ + Check if the union tag is ``governance_policy_zip_part_downloaded``. + + :rtype: bool + """ + return self._tag == 'governance_policy_zip_part_downloaded' + def is_legal_holds_activate_a_hold(self): """ Check if the union tag is ``legal_holds_activate_a_hold``. @@ -43997,6 +44689,93 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GoogleSsoPolicy_validator = bv.Union(GoogleSsoPolicy) +class GovernancePolicyAddFolderFailedDetails(bb.Struct): + """ + Couldn't add a folder to a policy. + + :ivar team_log.GovernancePolicyAddFolderFailedDetails.governance_policy_id: + Policy ID. + :ivar team_log.GovernancePolicyAddFolderFailedDetails.name: Policy name. + :ivar team_log.GovernancePolicyAddFolderFailedDetails.policy_type: Policy + type. + :ivar team_log.GovernancePolicyAddFolderFailedDetails.folder: Folder. + :ivar team_log.GovernancePolicyAddFolderFailedDetails.reason: Reason. + """ + + __slots__ = [ + '_governance_policy_id_value', + '_name_value', + '_policy_type_value', + '_folder_value', + '_reason_value', + ] + + _has_required_fields = True + + def __init__(self, + governance_policy_id=None, + name=None, + folder=None, + policy_type=None, + reason=None): + self._governance_policy_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._policy_type_value = bb.NOT_SET + self._folder_value = bb.NOT_SET + self._reason_value = bb.NOT_SET + if governance_policy_id is not None: + self.governance_policy_id = governance_policy_id + if name is not None: + self.name = name + if policy_type is not None: + self.policy_type = policy_type + if folder is not None: + self.folder = folder + if reason is not None: + self.reason = reason + + # Instance attribute type: str (validator is set below) + governance_policy_id = bb.Attribute("governance_policy_id") + + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") + + # Instance attribute type: PolicyType (validator is set below) + policy_type = bb.Attribute("policy_type", nullable=True, user_defined=True) + + # Instance attribute type: str (validator is set below) + folder = bb.Attribute("folder") + + # Instance attribute type: str (validator is set below) + reason = bb.Attribute("reason", nullable=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(GovernancePolicyAddFolderFailedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +GovernancePolicyAddFolderFailedDetails_validator = bv.Struct(GovernancePolicyAddFolderFailedDetails) + +class GovernancePolicyAddFolderFailedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(GovernancePolicyAddFolderFailedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +GovernancePolicyAddFolderFailedType_validator = bv.Struct(GovernancePolicyAddFolderFailedType) + class GovernancePolicyAddFoldersDetails(bb.Struct): """ Added folders to policy. @@ -44409,6 +45188,164 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GovernancePolicyEditDurationType_validator = bv.Struct(GovernancePolicyEditDurationType) +class GovernancePolicyExportCreatedDetails(bb.Struct): + """ + Created a policy download. + + :ivar team_log.GovernancePolicyExportCreatedDetails.governance_policy_id: + Policy ID. + :ivar team_log.GovernancePolicyExportCreatedDetails.name: Policy name. + :ivar team_log.GovernancePolicyExportCreatedDetails.policy_type: Policy + type. + :ivar team_log.GovernancePolicyExportCreatedDetails.export_name: Export + name. + """ + + __slots__ = [ + '_governance_policy_id_value', + '_name_value', + '_policy_type_value', + '_export_name_value', + ] + + _has_required_fields = True + + def __init__(self, + governance_policy_id=None, + name=None, + export_name=None, + policy_type=None): + self._governance_policy_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._policy_type_value = bb.NOT_SET + self._export_name_value = bb.NOT_SET + if governance_policy_id is not None: + self.governance_policy_id = governance_policy_id + if name is not None: + self.name = name + if policy_type is not None: + self.policy_type = policy_type + if export_name is not None: + self.export_name = export_name + + # Instance attribute type: str (validator is set below) + governance_policy_id = bb.Attribute("governance_policy_id") + + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") + + # Instance attribute type: PolicyType (validator is set below) + policy_type = bb.Attribute("policy_type", nullable=True, user_defined=True) + + # Instance attribute type: str (validator is set below) + export_name = bb.Attribute("export_name") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(GovernancePolicyExportCreatedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +GovernancePolicyExportCreatedDetails_validator = bv.Struct(GovernancePolicyExportCreatedDetails) + +class GovernancePolicyExportCreatedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(GovernancePolicyExportCreatedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +GovernancePolicyExportCreatedType_validator = bv.Struct(GovernancePolicyExportCreatedType) + +class GovernancePolicyExportRemovedDetails(bb.Struct): + """ + Removed a policy download. + + :ivar team_log.GovernancePolicyExportRemovedDetails.governance_policy_id: + Policy ID. + :ivar team_log.GovernancePolicyExportRemovedDetails.name: Policy name. + :ivar team_log.GovernancePolicyExportRemovedDetails.policy_type: Policy + type. + :ivar team_log.GovernancePolicyExportRemovedDetails.export_name: Export + name. + """ + + __slots__ = [ + '_governance_policy_id_value', + '_name_value', + '_policy_type_value', + '_export_name_value', + ] + + _has_required_fields = True + + def __init__(self, + governance_policy_id=None, + name=None, + export_name=None, + policy_type=None): + self._governance_policy_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._policy_type_value = bb.NOT_SET + self._export_name_value = bb.NOT_SET + if governance_policy_id is not None: + self.governance_policy_id = governance_policy_id + if name is not None: + self.name = name + if policy_type is not None: + self.policy_type = policy_type + if export_name is not None: + self.export_name = export_name + + # Instance attribute type: str (validator is set below) + governance_policy_id = bb.Attribute("governance_policy_id") + + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") + + # Instance attribute type: PolicyType (validator is set below) + policy_type = bb.Attribute("policy_type", nullable=True, user_defined=True) + + # Instance attribute type: str (validator is set below) + export_name = bb.Attribute("export_name") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(GovernancePolicyExportRemovedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +GovernancePolicyExportRemovedDetails_validator = bv.Struct(GovernancePolicyExportRemovedDetails) + +class GovernancePolicyExportRemovedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(GovernancePolicyExportRemovedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +GovernancePolicyExportRemovedType_validator = bv.Struct(GovernancePolicyExportRemovedType) + class GovernancePolicyRemoveFoldersDetails(bb.Struct): """ Removed folders from policy. @@ -44496,6 +45433,164 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GovernancePolicyRemoveFoldersType_validator = bv.Struct(GovernancePolicyRemoveFoldersType) +class GovernancePolicyReportCreatedDetails(bb.Struct): + """ + Created a summary report for a policy. + + :ivar team_log.GovernancePolicyReportCreatedDetails.governance_policy_id: + Policy ID. + :ivar team_log.GovernancePolicyReportCreatedDetails.name: Policy name. + :ivar team_log.GovernancePolicyReportCreatedDetails.policy_type: Policy + type. + """ + + __slots__ = [ + '_governance_policy_id_value', + '_name_value', + '_policy_type_value', + ] + + _has_required_fields = True + + def __init__(self, + governance_policy_id=None, + name=None, + policy_type=None): + self._governance_policy_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._policy_type_value = bb.NOT_SET + if governance_policy_id is not None: + self.governance_policy_id = governance_policy_id + if name is not None: + self.name = name + if policy_type is not None: + self.policy_type = policy_type + + # Instance attribute type: str (validator is set below) + governance_policy_id = bb.Attribute("governance_policy_id") + + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") + + # Instance attribute type: PolicyType (validator is set below) + policy_type = bb.Attribute("policy_type", nullable=True, user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(GovernancePolicyReportCreatedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +GovernancePolicyReportCreatedDetails_validator = bv.Struct(GovernancePolicyReportCreatedDetails) + +class GovernancePolicyReportCreatedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(GovernancePolicyReportCreatedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +GovernancePolicyReportCreatedType_validator = bv.Struct(GovernancePolicyReportCreatedType) + +class GovernancePolicyZipPartDownloadedDetails(bb.Struct): + """ + Downloaded content from a policy. + + :ivar + team_log.GovernancePolicyZipPartDownloadedDetails.governance_policy_id: + Policy ID. + :ivar team_log.GovernancePolicyZipPartDownloadedDetails.name: Policy name. + :ivar team_log.GovernancePolicyZipPartDownloadedDetails.policy_type: Policy + type. + :ivar team_log.GovernancePolicyZipPartDownloadedDetails.export_name: Export + name. + :ivar team_log.GovernancePolicyZipPartDownloadedDetails.part: Part. + """ + + __slots__ = [ + '_governance_policy_id_value', + '_name_value', + '_policy_type_value', + '_export_name_value', + '_part_value', + ] + + _has_required_fields = True + + def __init__(self, + governance_policy_id=None, + name=None, + export_name=None, + policy_type=None, + part=None): + self._governance_policy_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._policy_type_value = bb.NOT_SET + self._export_name_value = bb.NOT_SET + self._part_value = bb.NOT_SET + if governance_policy_id is not None: + self.governance_policy_id = governance_policy_id + if name is not None: + self.name = name + if policy_type is not None: + self.policy_type = policy_type + if export_name is not None: + self.export_name = export_name + if part is not None: + self.part = part + + # Instance attribute type: str (validator is set below) + governance_policy_id = bb.Attribute("governance_policy_id") + + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") + + # Instance attribute type: PolicyType (validator is set below) + policy_type = bb.Attribute("policy_type", nullable=True, user_defined=True) + + # Instance attribute type: str (validator is set below) + export_name = bb.Attribute("export_name") + + # Instance attribute type: str (validator is set below) + part = bb.Attribute("part", nullable=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(GovernancePolicyZipPartDownloadedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +GovernancePolicyZipPartDownloadedDetails_validator = bv.Struct(GovernancePolicyZipPartDownloadedDetails) + +class GovernancePolicyZipPartDownloadedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(GovernancePolicyZipPartDownloadedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +GovernancePolicyZipPartDownloadedType_validator = bv.Struct(GovernancePolicyZipPartDownloadedType) + class GroupAddExternalIdDetails(bb.Struct): """ Added external ID for group. @@ -67302,6 +68397,53 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ActorLogInfo.dropbox = ActorLogInfo('dropbox') ActorLogInfo.other = ActorLogInfo('other') +AdminAlertCategoryEnum._account_takeover_validator = bv.Void() +AdminAlertCategoryEnum._data_loss_protection_validator = bv.Void() +AdminAlertCategoryEnum._malware_sharing_validator = bv.Void() +AdminAlertCategoryEnum._massive_file_operation_validator = bv.Void() +AdminAlertCategoryEnum._na_validator = bv.Void() +AdminAlertCategoryEnum._threat_management_validator = bv.Void() +AdminAlertCategoryEnum._other_validator = bv.Void() +AdminAlertCategoryEnum._tagmap = { + 'account_takeover': AdminAlertCategoryEnum._account_takeover_validator, + 'data_loss_protection': AdminAlertCategoryEnum._data_loss_protection_validator, + 'malware_sharing': AdminAlertCategoryEnum._malware_sharing_validator, + 'massive_file_operation': AdminAlertCategoryEnum._massive_file_operation_validator, + 'na': AdminAlertCategoryEnum._na_validator, + 'threat_management': AdminAlertCategoryEnum._threat_management_validator, + 'other': AdminAlertCategoryEnum._other_validator, +} + +AdminAlertCategoryEnum.account_takeover = AdminAlertCategoryEnum('account_takeover') +AdminAlertCategoryEnum.data_loss_protection = AdminAlertCategoryEnum('data_loss_protection') +AdminAlertCategoryEnum.malware_sharing = AdminAlertCategoryEnum('malware_sharing') +AdminAlertCategoryEnum.massive_file_operation = AdminAlertCategoryEnum('massive_file_operation') +AdminAlertCategoryEnum.na = AdminAlertCategoryEnum('na') +AdminAlertCategoryEnum.threat_management = AdminAlertCategoryEnum('threat_management') +AdminAlertCategoryEnum.other = AdminAlertCategoryEnum('other') + +AdminAlertSeverityEnum._high_validator = bv.Void() +AdminAlertSeverityEnum._info_validator = bv.Void() +AdminAlertSeverityEnum._low_validator = bv.Void() +AdminAlertSeverityEnum._medium_validator = bv.Void() +AdminAlertSeverityEnum._na_validator = bv.Void() +AdminAlertSeverityEnum._other_validator = bv.Void() +AdminAlertSeverityEnum._tagmap = { + 'high': AdminAlertSeverityEnum._high_validator, + 'info': AdminAlertSeverityEnum._info_validator, + 'low': AdminAlertSeverityEnum._low_validator, + 'medium': AdminAlertSeverityEnum._medium_validator, + 'na': AdminAlertSeverityEnum._na_validator, + 'other': AdminAlertSeverityEnum._other_validator, +} + +AdminAlertSeverityEnum.high = AdminAlertSeverityEnum('high') +AdminAlertSeverityEnum.info = AdminAlertSeverityEnum('info') +AdminAlertSeverityEnum.low = AdminAlertSeverityEnum('low') +AdminAlertSeverityEnum.medium = AdminAlertSeverityEnum('medium') +AdminAlertSeverityEnum.na = AdminAlertSeverityEnum('na') +AdminAlertSeverityEnum.other = AdminAlertSeverityEnum('other') + AdminAlertingAlertConfiguration.alert_state.validator = AdminAlertingAlertStatePolicy_validator AdminAlertingAlertConfiguration._all_field_names_ = set(['alert_state']) AdminAlertingAlertConfiguration._all_fields_ = [('alert_state', AdminAlertingAlertConfiguration.alert_state.validator)] @@ -67337,6 +68479,27 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminAlertingChangedAlertConfigType._all_field_names_ = set(['description']) AdminAlertingChangedAlertConfigType._all_fields_ = [('description', AdminAlertingChangedAlertConfigType.description.validator)] +AdminAlertingTriggeredAlertDetails.alert_name.validator = bv.String() +AdminAlertingTriggeredAlertDetails.alert_severity.validator = AdminAlertSeverityEnum_validator +AdminAlertingTriggeredAlertDetails.alert_category.validator = AdminAlertCategoryEnum_validator +AdminAlertingTriggeredAlertDetails.alert_instance_id.validator = bv.String() +AdminAlertingTriggeredAlertDetails._all_field_names_ = set([ + 'alert_name', + 'alert_severity', + 'alert_category', + 'alert_instance_id', +]) +AdminAlertingTriggeredAlertDetails._all_fields_ = [ + ('alert_name', AdminAlertingTriggeredAlertDetails.alert_name.validator), + ('alert_severity', AdminAlertingTriggeredAlertDetails.alert_severity.validator), + ('alert_category', AdminAlertingTriggeredAlertDetails.alert_category.validator), + ('alert_instance_id', AdminAlertingTriggeredAlertDetails.alert_instance_id.validator), +] + +AdminAlertingTriggeredAlertType.description.validator = bv.String() +AdminAlertingTriggeredAlertType._all_field_names_ = set(['description']) +AdminAlertingTriggeredAlertType._all_fields_ = [('description', AdminAlertingTriggeredAlertType.description.validator)] + AdminRole._limited_admin_validator = bv.Void() AdminRole._member_only_validator = bv.Void() AdminRole._support_admin_validator = bv.Void() @@ -68560,6 +69723,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventCategory.other = EventCategory('other') EventDetails._admin_alerting_changed_alert_config_details_validator = AdminAlertingChangedAlertConfigDetails_validator +EventDetails._admin_alerting_triggered_alert_details_validator = AdminAlertingTriggeredAlertDetails_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 @@ -68575,11 +69739,16 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._file_unlike_comment_details_validator = FileUnlikeCommentDetails_validator EventDetails._file_unresolve_comment_details_validator = FileUnresolveCommentDetails_validator EventDetails._governance_policy_add_folders_details_validator = GovernancePolicyAddFoldersDetails_validator +EventDetails._governance_policy_add_folder_failed_details_validator = GovernancePolicyAddFolderFailedDetails_validator EventDetails._governance_policy_create_details_validator = GovernancePolicyCreateDetails_validator EventDetails._governance_policy_delete_details_validator = GovernancePolicyDeleteDetails_validator EventDetails._governance_policy_edit_details_details_validator = GovernancePolicyEditDetailsDetails_validator EventDetails._governance_policy_edit_duration_details_validator = GovernancePolicyEditDurationDetails_validator +EventDetails._governance_policy_export_created_details_validator = GovernancePolicyExportCreatedDetails_validator +EventDetails._governance_policy_export_removed_details_validator = GovernancePolicyExportRemovedDetails_validator EventDetails._governance_policy_remove_folders_details_validator = GovernancePolicyRemoveFoldersDetails_validator +EventDetails._governance_policy_report_created_details_validator = GovernancePolicyReportCreatedDetails_validator +EventDetails._governance_policy_zip_part_downloaded_details_validator = GovernancePolicyZipPartDownloadedDetails_validator EventDetails._legal_holds_activate_a_hold_details_validator = LegalHoldsActivateAHoldDetails_validator EventDetails._legal_holds_add_members_details_validator = LegalHoldsAddMembersDetails_validator EventDetails._legal_holds_change_hold_details_details_validator = LegalHoldsChangeHoldDetailsDetails_validator @@ -69012,6 +70181,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._other_validator = bv.Void() EventDetails._tagmap = { 'admin_alerting_changed_alert_config_details': EventDetails._admin_alerting_changed_alert_config_details_validator, + 'admin_alerting_triggered_alert_details': EventDetails._admin_alerting_triggered_alert_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, @@ -69027,11 +70197,16 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'file_unlike_comment_details': EventDetails._file_unlike_comment_details_validator, 'file_unresolve_comment_details': EventDetails._file_unresolve_comment_details_validator, 'governance_policy_add_folders_details': EventDetails._governance_policy_add_folders_details_validator, + 'governance_policy_add_folder_failed_details': EventDetails._governance_policy_add_folder_failed_details_validator, 'governance_policy_create_details': EventDetails._governance_policy_create_details_validator, 'governance_policy_delete_details': EventDetails._governance_policy_delete_details_validator, 'governance_policy_edit_details_details': EventDetails._governance_policy_edit_details_details_validator, 'governance_policy_edit_duration_details': EventDetails._governance_policy_edit_duration_details_validator, + 'governance_policy_export_created_details': EventDetails._governance_policy_export_created_details_validator, + 'governance_policy_export_removed_details': EventDetails._governance_policy_export_removed_details_validator, 'governance_policy_remove_folders_details': EventDetails._governance_policy_remove_folders_details_validator, + 'governance_policy_report_created_details': EventDetails._governance_policy_report_created_details_validator, + 'governance_policy_zip_part_downloaded_details': EventDetails._governance_policy_zip_part_downloaded_details_validator, 'legal_holds_activate_a_hold_details': EventDetails._legal_holds_activate_a_hold_details_validator, 'legal_holds_add_members_details': EventDetails._legal_holds_add_members_details_validator, 'legal_holds_change_hold_details_details': EventDetails._legal_holds_change_hold_details_details_validator, @@ -69467,6 +70642,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails.other = EventDetails('other') EventType._admin_alerting_changed_alert_config_validator = AdminAlertingChangedAlertConfigType_validator +EventType._admin_alerting_triggered_alert_validator = AdminAlertingTriggeredAlertType_validator EventType._app_link_team_validator = AppLinkTeamType_validator EventType._app_link_user_validator = AppLinkUserType_validator EventType._app_unlink_team_validator = AppUnlinkTeamType_validator @@ -69482,11 +70658,16 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._file_unlike_comment_validator = FileUnlikeCommentType_validator EventType._file_unresolve_comment_validator = FileUnresolveCommentType_validator EventType._governance_policy_add_folders_validator = GovernancePolicyAddFoldersType_validator +EventType._governance_policy_add_folder_failed_validator = GovernancePolicyAddFolderFailedType_validator EventType._governance_policy_create_validator = GovernancePolicyCreateType_validator EventType._governance_policy_delete_validator = GovernancePolicyDeleteType_validator EventType._governance_policy_edit_details_validator = GovernancePolicyEditDetailsType_validator EventType._governance_policy_edit_duration_validator = GovernancePolicyEditDurationType_validator +EventType._governance_policy_export_created_validator = GovernancePolicyExportCreatedType_validator +EventType._governance_policy_export_removed_validator = GovernancePolicyExportRemovedType_validator EventType._governance_policy_remove_folders_validator = GovernancePolicyRemoveFoldersType_validator +EventType._governance_policy_report_created_validator = GovernancePolicyReportCreatedType_validator +EventType._governance_policy_zip_part_downloaded_validator = GovernancePolicyZipPartDownloadedType_validator EventType._legal_holds_activate_a_hold_validator = LegalHoldsActivateAHoldType_validator EventType._legal_holds_add_members_validator = LegalHoldsAddMembersType_validator EventType._legal_holds_change_hold_details_validator = LegalHoldsChangeHoldDetailsType_validator @@ -69918,6 +71099,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._other_validator = bv.Void() EventType._tagmap = { 'admin_alerting_changed_alert_config': EventType._admin_alerting_changed_alert_config_validator, + 'admin_alerting_triggered_alert': EventType._admin_alerting_triggered_alert_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, @@ -69933,11 +71115,16 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'file_unlike_comment': EventType._file_unlike_comment_validator, 'file_unresolve_comment': EventType._file_unresolve_comment_validator, 'governance_policy_add_folders': EventType._governance_policy_add_folders_validator, + 'governance_policy_add_folder_failed': EventType._governance_policy_add_folder_failed_validator, 'governance_policy_create': EventType._governance_policy_create_validator, 'governance_policy_delete': EventType._governance_policy_delete_validator, 'governance_policy_edit_details': EventType._governance_policy_edit_details_validator, 'governance_policy_edit_duration': EventType._governance_policy_edit_duration_validator, + 'governance_policy_export_created': EventType._governance_policy_export_created_validator, + 'governance_policy_export_removed': EventType._governance_policy_export_removed_validator, 'governance_policy_remove_folders': EventType._governance_policy_remove_folders_validator, + 'governance_policy_report_created': EventType._governance_policy_report_created_validator, + 'governance_policy_zip_part_downloaded': EventType._governance_policy_zip_part_downloaded_validator, 'legal_holds_activate_a_hold': EventType._legal_holds_activate_a_hold_validator, 'legal_holds_add_members': EventType._legal_holds_add_members_validator, 'legal_holds_change_hold_details': EventType._legal_holds_change_hold_details_validator, @@ -70372,6 +71559,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType.other = EventType('other') EventTypeArg._admin_alerting_changed_alert_config_validator = bv.Void() +EventTypeArg._admin_alerting_triggered_alert_validator = bv.Void() EventTypeArg._app_link_team_validator = bv.Void() EventTypeArg._app_link_user_validator = bv.Void() EventTypeArg._app_unlink_team_validator = bv.Void() @@ -70387,11 +71575,16 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._file_unlike_comment_validator = bv.Void() EventTypeArg._file_unresolve_comment_validator = bv.Void() EventTypeArg._governance_policy_add_folders_validator = bv.Void() +EventTypeArg._governance_policy_add_folder_failed_validator = bv.Void() EventTypeArg._governance_policy_create_validator = bv.Void() EventTypeArg._governance_policy_delete_validator = bv.Void() EventTypeArg._governance_policy_edit_details_validator = bv.Void() EventTypeArg._governance_policy_edit_duration_validator = bv.Void() +EventTypeArg._governance_policy_export_created_validator = bv.Void() +EventTypeArg._governance_policy_export_removed_validator = bv.Void() EventTypeArg._governance_policy_remove_folders_validator = bv.Void() +EventTypeArg._governance_policy_report_created_validator = bv.Void() +EventTypeArg._governance_policy_zip_part_downloaded_validator = bv.Void() EventTypeArg._legal_holds_activate_a_hold_validator = bv.Void() EventTypeArg._legal_holds_add_members_validator = bv.Void() EventTypeArg._legal_holds_change_hold_details_validator = bv.Void() @@ -70823,6 +72016,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._other_validator = bv.Void() EventTypeArg._tagmap = { 'admin_alerting_changed_alert_config': EventTypeArg._admin_alerting_changed_alert_config_validator, + 'admin_alerting_triggered_alert': EventTypeArg._admin_alerting_triggered_alert_validator, 'app_link_team': EventTypeArg._app_link_team_validator, 'app_link_user': EventTypeArg._app_link_user_validator, 'app_unlink_team': EventTypeArg._app_unlink_team_validator, @@ -70838,11 +72032,16 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'file_unlike_comment': EventTypeArg._file_unlike_comment_validator, 'file_unresolve_comment': EventTypeArg._file_unresolve_comment_validator, 'governance_policy_add_folders': EventTypeArg._governance_policy_add_folders_validator, + 'governance_policy_add_folder_failed': EventTypeArg._governance_policy_add_folder_failed_validator, 'governance_policy_create': EventTypeArg._governance_policy_create_validator, 'governance_policy_delete': EventTypeArg._governance_policy_delete_validator, 'governance_policy_edit_details': EventTypeArg._governance_policy_edit_details_validator, 'governance_policy_edit_duration': EventTypeArg._governance_policy_edit_duration_validator, + 'governance_policy_export_created': EventTypeArg._governance_policy_export_created_validator, + 'governance_policy_export_removed': EventTypeArg._governance_policy_export_removed_validator, 'governance_policy_remove_folders': EventTypeArg._governance_policy_remove_folders_validator, + 'governance_policy_report_created': EventTypeArg._governance_policy_report_created_validator, + 'governance_policy_zip_part_downloaded': EventTypeArg._governance_policy_zip_part_downloaded_validator, 'legal_holds_activate_a_hold': EventTypeArg._legal_holds_activate_a_hold_validator, 'legal_holds_add_members': EventTypeArg._legal_holds_add_members_validator, 'legal_holds_change_hold_details': EventTypeArg._legal_holds_change_hold_details_validator, @@ -71275,6 +72474,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): } EventTypeArg.admin_alerting_changed_alert_config = EventTypeArg('admin_alerting_changed_alert_config') +EventTypeArg.admin_alerting_triggered_alert = EventTypeArg('admin_alerting_triggered_alert') EventTypeArg.app_link_team = EventTypeArg('app_link_team') EventTypeArg.app_link_user = EventTypeArg('app_link_user') EventTypeArg.app_unlink_team = EventTypeArg('app_unlink_team') @@ -71290,11 +72490,16 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.file_unlike_comment = EventTypeArg('file_unlike_comment') EventTypeArg.file_unresolve_comment = EventTypeArg('file_unresolve_comment') EventTypeArg.governance_policy_add_folders = EventTypeArg('governance_policy_add_folders') +EventTypeArg.governance_policy_add_folder_failed = EventTypeArg('governance_policy_add_folder_failed') EventTypeArg.governance_policy_create = EventTypeArg('governance_policy_create') EventTypeArg.governance_policy_delete = EventTypeArg('governance_policy_delete') EventTypeArg.governance_policy_edit_details = EventTypeArg('governance_policy_edit_details') EventTypeArg.governance_policy_edit_duration = EventTypeArg('governance_policy_edit_duration') +EventTypeArg.governance_policy_export_created = EventTypeArg('governance_policy_export_created') +EventTypeArg.governance_policy_export_removed = EventTypeArg('governance_policy_export_removed') EventTypeArg.governance_policy_remove_folders = EventTypeArg('governance_policy_remove_folders') +EventTypeArg.governance_policy_report_created = EventTypeArg('governance_policy_report_created') +EventTypeArg.governance_policy_zip_part_downloaded = EventTypeArg('governance_policy_zip_part_downloaded') EventTypeArg.legal_holds_activate_a_hold = EventTypeArg('legal_holds_activate_a_hold') EventTypeArg.legal_holds_add_members = EventTypeArg('legal_holds_add_members') EventTypeArg.legal_holds_change_hold_details = EventTypeArg('legal_holds_change_hold_details') @@ -72516,6 +73721,30 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GoogleSsoPolicy.enabled = GoogleSsoPolicy('enabled') GoogleSsoPolicy.other = GoogleSsoPolicy('other') +GovernancePolicyAddFolderFailedDetails.governance_policy_id.validator = bv.String() +GovernancePolicyAddFolderFailedDetails.name.validator = bv.String() +GovernancePolicyAddFolderFailedDetails.policy_type.validator = bv.Nullable(PolicyType_validator) +GovernancePolicyAddFolderFailedDetails.folder.validator = bv.String() +GovernancePolicyAddFolderFailedDetails.reason.validator = bv.Nullable(bv.String()) +GovernancePolicyAddFolderFailedDetails._all_field_names_ = set([ + 'governance_policy_id', + 'name', + 'policy_type', + 'folder', + 'reason', +]) +GovernancePolicyAddFolderFailedDetails._all_fields_ = [ + ('governance_policy_id', GovernancePolicyAddFolderFailedDetails.governance_policy_id.validator), + ('name', GovernancePolicyAddFolderFailedDetails.name.validator), + ('policy_type', GovernancePolicyAddFolderFailedDetails.policy_type.validator), + ('folder', GovernancePolicyAddFolderFailedDetails.folder.validator), + ('reason', GovernancePolicyAddFolderFailedDetails.reason.validator), +] + +GovernancePolicyAddFolderFailedType.description.validator = bv.String() +GovernancePolicyAddFolderFailedType._all_field_names_ = set(['description']) +GovernancePolicyAddFolderFailedType._all_fields_ = [('description', GovernancePolicyAddFolderFailedType.description.validator)] + GovernancePolicyAddFoldersDetails.governance_policy_id.validator = bv.String() GovernancePolicyAddFoldersDetails.name.validator = bv.String() GovernancePolicyAddFoldersDetails.policy_type.validator = bv.Nullable(PolicyType_validator) @@ -72630,6 +73859,48 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GovernancePolicyEditDurationType._all_field_names_ = set(['description']) GovernancePolicyEditDurationType._all_fields_ = [('description', GovernancePolicyEditDurationType.description.validator)] +GovernancePolicyExportCreatedDetails.governance_policy_id.validator = bv.String() +GovernancePolicyExportCreatedDetails.name.validator = bv.String() +GovernancePolicyExportCreatedDetails.policy_type.validator = bv.Nullable(PolicyType_validator) +GovernancePolicyExportCreatedDetails.export_name.validator = bv.String() +GovernancePolicyExportCreatedDetails._all_field_names_ = set([ + 'governance_policy_id', + 'name', + 'policy_type', + 'export_name', +]) +GovernancePolicyExportCreatedDetails._all_fields_ = [ + ('governance_policy_id', GovernancePolicyExportCreatedDetails.governance_policy_id.validator), + ('name', GovernancePolicyExportCreatedDetails.name.validator), + ('policy_type', GovernancePolicyExportCreatedDetails.policy_type.validator), + ('export_name', GovernancePolicyExportCreatedDetails.export_name.validator), +] + +GovernancePolicyExportCreatedType.description.validator = bv.String() +GovernancePolicyExportCreatedType._all_field_names_ = set(['description']) +GovernancePolicyExportCreatedType._all_fields_ = [('description', GovernancePolicyExportCreatedType.description.validator)] + +GovernancePolicyExportRemovedDetails.governance_policy_id.validator = bv.String() +GovernancePolicyExportRemovedDetails.name.validator = bv.String() +GovernancePolicyExportRemovedDetails.policy_type.validator = bv.Nullable(PolicyType_validator) +GovernancePolicyExportRemovedDetails.export_name.validator = bv.String() +GovernancePolicyExportRemovedDetails._all_field_names_ = set([ + 'governance_policy_id', + 'name', + 'policy_type', + 'export_name', +]) +GovernancePolicyExportRemovedDetails._all_fields_ = [ + ('governance_policy_id', GovernancePolicyExportRemovedDetails.governance_policy_id.validator), + ('name', GovernancePolicyExportRemovedDetails.name.validator), + ('policy_type', GovernancePolicyExportRemovedDetails.policy_type.validator), + ('export_name', GovernancePolicyExportRemovedDetails.export_name.validator), +] + +GovernancePolicyExportRemovedType.description.validator = bv.String() +GovernancePolicyExportRemovedType._all_field_names_ = set(['description']) +GovernancePolicyExportRemovedType._all_fields_ = [('description', GovernancePolicyExportRemovedType.description.validator)] + GovernancePolicyRemoveFoldersDetails.governance_policy_id.validator = bv.String() GovernancePolicyRemoveFoldersDetails.name.validator = bv.String() GovernancePolicyRemoveFoldersDetails.policy_type.validator = bv.Nullable(PolicyType_validator) @@ -72654,6 +73925,48 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GovernancePolicyRemoveFoldersType._all_field_names_ = set(['description']) GovernancePolicyRemoveFoldersType._all_fields_ = [('description', GovernancePolicyRemoveFoldersType.description.validator)] +GovernancePolicyReportCreatedDetails.governance_policy_id.validator = bv.String() +GovernancePolicyReportCreatedDetails.name.validator = bv.String() +GovernancePolicyReportCreatedDetails.policy_type.validator = bv.Nullable(PolicyType_validator) +GovernancePolicyReportCreatedDetails._all_field_names_ = set([ + 'governance_policy_id', + 'name', + 'policy_type', +]) +GovernancePolicyReportCreatedDetails._all_fields_ = [ + ('governance_policy_id', GovernancePolicyReportCreatedDetails.governance_policy_id.validator), + ('name', GovernancePolicyReportCreatedDetails.name.validator), + ('policy_type', GovernancePolicyReportCreatedDetails.policy_type.validator), +] + +GovernancePolicyReportCreatedType.description.validator = bv.String() +GovernancePolicyReportCreatedType._all_field_names_ = set(['description']) +GovernancePolicyReportCreatedType._all_fields_ = [('description', GovernancePolicyReportCreatedType.description.validator)] + +GovernancePolicyZipPartDownloadedDetails.governance_policy_id.validator = bv.String() +GovernancePolicyZipPartDownloadedDetails.name.validator = bv.String() +GovernancePolicyZipPartDownloadedDetails.policy_type.validator = bv.Nullable(PolicyType_validator) +GovernancePolicyZipPartDownloadedDetails.export_name.validator = bv.String() +GovernancePolicyZipPartDownloadedDetails.part.validator = bv.Nullable(bv.String()) +GovernancePolicyZipPartDownloadedDetails._all_field_names_ = set([ + 'governance_policy_id', + 'name', + 'policy_type', + 'export_name', + 'part', +]) +GovernancePolicyZipPartDownloadedDetails._all_fields_ = [ + ('governance_policy_id', GovernancePolicyZipPartDownloadedDetails.governance_policy_id.validator), + ('name', GovernancePolicyZipPartDownloadedDetails.name.validator), + ('policy_type', GovernancePolicyZipPartDownloadedDetails.policy_type.validator), + ('export_name', GovernancePolicyZipPartDownloadedDetails.export_name.validator), + ('part', GovernancePolicyZipPartDownloadedDetails.part.validator), +] + +GovernancePolicyZipPartDownloadedType.description.validator = bv.String() +GovernancePolicyZipPartDownloadedType._all_field_names_ = set(['description']) +GovernancePolicyZipPartDownloadedType._all_fields_ = [('description', GovernancePolicyZipPartDownloadedType.description.validator)] + GroupAddExternalIdDetails.new_value.validator = team_common.GroupExternalId_validator GroupAddExternalIdDetails._all_field_names_ = set(['new_value']) GroupAddExternalIdDetails._all_fields_ = [('new_value', GroupAddExternalIdDetails.new_value.validator)] diff --git a/spec b/spec index f1637822..8f960cb6 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit f16378220aab09f7412206785b6bae0ab119a7c9 +Subproject commit 8f960cb69b5209b30f0007a95da4d7486c1a58d4 From 2293afad8262518b1026d15c10f9ff2734370107 Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Thu, 3 Dec 2020 22:17:35 -0600 Subject: [PATCH 12/90] Add stone to setup.py (#300) --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index e8e0584e..a4f3dcdd 100644 --- a/setup.py +++ b/setup.py @@ -27,6 +27,7 @@ install_reqs = [ 'requests >= 2.16.2', 'six >= 1.12.0', + 'stone >= 2.*', ] setup_requires = [ From 5af34a44a9f377439e20cc0dcba7f66050844423 Mon Sep 17 00:00:00 2001 From: yuxiang-he Date: Wed, 23 Dec 2020 18:30:09 -0800 Subject: [PATCH 13/90] Fix CI matrix Python version (#311) * fix typo for specifying Python version using matrix.python * use call count instead of `assert_called_once()` in tests for python 3.5 support --- .github/workflows/ci.yml | 2 +- test/test_dropbox_unit.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71a55871..d3c98234 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: - name: Setup Python environment uses: actions/setup-python@v2.1.4 with: - python-version: ${{ matrix.python }} + python-version: ${{ matrix.python-version }} - name: Install Requirements run: | python -m pip install --upgrade pip diff --git a/test/test_dropbox_unit.py b/test/test_dropbox_unit.py index 8c0fa0a3..aaa112ad 100644 --- a/test/test_dropbox_unit.py +++ b/test/test_dropbox_unit.py @@ -212,7 +212,7 @@ def test_NoRedirect_whole_flow(self, auth_flow_offline_with_scopes): assert auth_result.account_id == ACCOUNT_ID assert auth_result.scope == " ".join(SCOPE_LIST) - auth_flow_offline_with_scopes.requests_session.post.assert_called_once() + assert auth_flow_offline_with_scopes.requests_session.post.call_count == 1 token_call_args = auth_flow_offline_with_scopes.requests_session.post.call_args_list assert len(token_call_args) == 1 first_call_args = token_call_args[0] @@ -330,7 +330,7 @@ def test_check_refresh_with_expired_offline_token(self, session_instance): app_secret=APP_SECRET, session=session_instance) dbx.check_and_refresh_access_token() - session_instance.post.assert_called_once() + assert session_instance.post.call_count == 1 def test_check_refresh_with_only_refresh(self, session_instance): # Test Offline Case w/ only refresh @@ -339,7 +339,7 @@ def test_check_refresh_with_only_refresh(self, session_instance): app_secret=APP_SECRET, session=session_instance) dbx.check_and_refresh_access_token() - session_instance.post.assert_called_once() + assert session_instance.post.call_count == 1 def test_check_refresh_with_invalid_grant(self, invalid_grant_session_instance): dbx = Dropbox(oauth2_refresh_token=REFRESH_TOKEN, @@ -348,7 +348,7 @@ def test_check_refresh_with_invalid_grant(self, invalid_grant_session_instance): session=invalid_grant_session_instance) with pytest.raises(AuthError) as e: dbx.check_and_refresh_access_token() - invalid_grant_session_instance.post.assert_called_once() + assert invalid_grant_session_instance.post.call_count == 1 assert e.error.is_invalid_access_token() def test_team_client_refresh(self, session_instance): @@ -357,7 +357,7 @@ def test_team_client_refresh(self, session_instance): app_secret=APP_SECRET, session=session_instance) dbx.check_and_refresh_access_token() - session_instance.post.assert_called_once() + assert session_instance.post.call_count == 1 def test_team_client_as_admin(self, session_instance): dbx = DropboxTeam(oauth2_refresh_token=REFRESH_TOKEN, From b21934d82c2d7a3608c0cd765fd8bde0b61629d3 Mon Sep 17 00:00:00 2001 From: yuxiang-he Date: Mon, 28 Dec 2020 16:18:04 -0800 Subject: [PATCH 14/90] Reorganize test directory (#312) --- .github/workflows/ci.yml | 2 +- .github/workflows/coverage.yml | 2 +- test/{ => fixtures}/Costa Rican Frog.jpg | Bin test/{ => fixtures}/dropbox_song.mp3 | Bin test/{ => fixtures}/foo.txt | 0 test/{ => integration}/test_dropbox.py | 2 +- test/{ => unit}/test_dropbox_unit.py | 0 tox.ini | 8 ++++---- 8 files changed, 7 insertions(+), 7 deletions(-) rename test/{ => fixtures}/Costa Rican Frog.jpg (100%) rename test/{ => fixtures}/dropbox_song.mp3 (100%) rename test/{ => fixtures}/foo.txt (100%) rename test/{ => integration}/test_dropbox.py (99%) rename test/{ => unit}/test_dropbox_unit.py (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d3c98234..84df31fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: flake8 setup.py dropbox example test - name: Run Unit Tests run: | - pytest test/test_dropbox_unit.py + pytest test/unit/test_dropbox_unit.py Docs: runs-on: macos-latest steps: diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 9c3dc4e8..6ee679b4 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -25,7 +25,7 @@ jobs: python setup.py install - name: Generate Unit Test Coverage run: | - coverage run --rcfile=.coveragerc -m pytest test/test_dropbox_unit.py + coverage run --rcfile=.coveragerc -m pytest test/unit/test_dropbox_unit.py coverage xml - name: Publish Coverage uses: codecov/codecov-action@v1.0.15 diff --git a/test/Costa Rican Frog.jpg b/test/fixtures/Costa Rican Frog.jpg similarity index 100% rename from test/Costa Rican Frog.jpg rename to test/fixtures/Costa Rican Frog.jpg diff --git a/test/dropbox_song.mp3 b/test/fixtures/dropbox_song.mp3 similarity index 100% rename from test/dropbox_song.mp3 rename to test/fixtures/dropbox_song.mp3 diff --git a/test/foo.txt b/test/fixtures/foo.txt similarity index 100% rename from test/foo.txt rename to test/fixtures/foo.txt diff --git a/test/test_dropbox.py b/test/integration/test_dropbox.py similarity index 99% rename from test/test_dropbox.py rename to test/integration/test_dropbox.py index c4573cc0..d5c4084a 100644 --- a/test/test_dropbox.py +++ b/test/integration/test_dropbox.py @@ -24,7 +24,7 @@ session, stone_serializers, ) -from dropbox.dropbox import PATH_ROOT_HEADER, SELECT_USER_HEADER +from dropbox.dropbox_client import PATH_ROOT_HEADER, SELECT_USER_HEADER from dropbox.exceptions import ( ApiError, AuthError, diff --git a/test/test_dropbox_unit.py b/test/unit/test_dropbox_unit.py similarity index 100% rename from test/test_dropbox_unit.py rename to test/unit/test_dropbox_unit.py diff --git a/tox.ini b/tox.ini index ac2631b8..c8fefaf2 100644 --- a/tox.ini +++ b/tox.ini @@ -17,7 +17,7 @@ per-file-ignores = [testenv:test_integration] commands = - pytest {posargs} + pytest test/integration/test_dropbox.py passenv = DROPBOX_REFRESH_TOKEN @@ -57,7 +57,7 @@ usedevelop = true [testenv:coverage] commands = - coverage run --rcfile=.coveragerc -m pytest test/test_dropbox_unit.py + coverage run --rcfile=.coveragerc -m pytest test/unit/test_dropbox_unit.py coverage report deps = @@ -66,7 +66,7 @@ deps = [testenv:codecov] commands = - coverage run --rcfile=.coveragerc -m pytest test/test_dropbox_unit.py + coverage run --rcfile=.coveragerc -m pytest test/unit/test_dropbox_unit.py coverage xml deps = @@ -75,7 +75,7 @@ deps = [testenv:test_unit] commands = - pytest test/test_dropbox_unit.py + pytest test/unit/test_dropbox_unit.py deps = -rtest/requirements.txt From 9204111a0845e6dc72228ee58c4a8fb04d664eba Mon Sep 17 00:00:00 2001 From: yuxiang-he Date: Wed, 30 Dec 2020 14:22:37 -0800 Subject: [PATCH 15/90] Add support for app authentication (#305) --- dropbox/account.py | 3 +- dropbox/auth.py | 6 +- dropbox/check.py | 6 +- dropbox/contacts.py | 6 +- dropbox/dropbox_client.py | 30 +++- dropbox/file_properties.py | 48 ++++--- dropbox/file_requests.py | 27 ++-- dropbox/files.py | 186 ++++++++++++++++-------- dropbox/paper.py | 51 ++++--- dropbox/sharing.py | 129 +++++++++++------ dropbox/team.py | 237 ++++++++++++++++++++----------- dropbox/team_log.py | 6 +- dropbox/users.py | 15 +- generate_base_client.py | 2 +- test/integration/test_dropbox.py | 27 +++- test/unit/test_dropbox_unit.py | 4 + 16 files changed, 535 insertions(+), 248 deletions(-) diff --git a/dropbox/account.py b/dropbox/account.py index c37dc0e9..1748637f 100644 --- a/dropbox/account.py +++ b/dropbox/account.py @@ -248,7 +248,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SetProfilePhotoArg_validator, SetProfilePhotoResult_validator, SetProfilePhotoError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) diff --git a/dropbox/auth.py b/dropbox/auth.py index 505af356..4c85bd9d 100644 --- a/dropbox/auth.py +++ b/dropbox/auth.py @@ -679,7 +679,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TokenFromOAuth1Arg_validator, TokenFromOAuth1Result_validator, TokenFromOAuth1Error_validator, - {'host': u'api', + {'auth': u'app', + 'host': u'api', 'style': u'rpc'}, ) token_revoke = bb.Route( @@ -689,7 +690,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), bv.Void(), bv.Void(), - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) diff --git a/dropbox/check.py b/dropbox/check.py index 801fd88b..45ebf659 100644 --- a/dropbox/check.py +++ b/dropbox/check.py @@ -80,7 +80,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EchoArg_validator, EchoResult_validator, bv.Void(), - {'host': u'api', + {'auth': u'app', + 'host': u'api', 'style': u'rpc'}, ) user = bb.Route( @@ -90,7 +91,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EchoArg_validator, EchoResult_validator, bv.Void(), - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) diff --git a/dropbox/contacts.py b/dropbox/contacts.py index 63b50e35..47fe3359 100644 --- a/dropbox/contacts.py +++ b/dropbox/contacts.py @@ -115,7 +115,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), bv.Void(), bv.Void(), - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) delete_manual_contacts_batch = bb.Route( @@ -125,7 +126,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DeleteManualContactsArg_validator, bv.Void(), DeleteManualContactsError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) diff --git a/dropbox/dropbox_client.py b/dropbox/dropbox_client.py index 2f561a93..1fcbb0d2 100644 --- a/dropbox/dropbox_client.py +++ b/dropbox/dropbox_client.py @@ -8,6 +8,7 @@ # before release. __version__ = '0.0.0' +import base64 import contextlib import json import logging @@ -59,6 +60,11 @@ SELECT_USER_HEADER = 'Dropbox-API-Select-User' +USER_AUTH = 'user' +TEAM_AUTH = 'team' +APP_AUTH = 'app' +NO_AUTH = 'noauth' + class RouteResult(object): """The successful result of a call to a route.""" @@ -293,6 +299,7 @@ def request(self, self.check_and_refresh_access_token() host = route.attrs['host'] or 'api' + auth_type = route.attrs['auth'] route_name = namespace + '/' + route.name if route.version > 1: route_name += '_v{}'.format(route.version) @@ -315,6 +322,7 @@ def request(self, route_name, route_style, serialized_arg, + auth_type, request_binary, timeout=timeout) decoded_obj_result = json.loads(res.obj_result) @@ -407,6 +415,7 @@ def request_json_object(self, route_name, route_style, request_arg, + auth_type, request_binary, timeout=None): """ @@ -418,6 +427,7 @@ def request_json_object(self, :param route_style: The style of the route. :param str request_arg: A JSON-serializable Python object representing the argument for the route. + :param auth_type str :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 @@ -432,6 +442,7 @@ def request_json_object(self, route_name, route_style, serialized_arg, + auth_type, request_binary, timeout=timeout) # This can throw a ValueError if the result is not deserializable, @@ -447,6 +458,7 @@ def request_json_string_with_retry(self, route_name, route_style, request_json_arg, + auth_type, request_binary, timeout=None): """ @@ -465,6 +477,7 @@ def request_json_string_with_retry(self, route_name, route_style, request_json_arg, + auth_type, request_binary, timeout=timeout) except AuthError as e: @@ -507,6 +520,7 @@ def request_json_string(self, func_name, route_style, request_json_arg, + auth_type, request_binary, timeout=None): """ @@ -529,10 +543,24 @@ def request_json_string(self, url = self._get_route_url(fq_hostname, func_name) headers = {'User-Agent': self._user_agent} - if host != HOST_NOTIFY: + if auth_type == USER_AUTH or auth_type == TEAM_AUTH: headers['Authorization'] = 'Bearer %s' % self._oauth2_access_token if self._headers: headers.update(self._headers) + elif auth_type == APP_AUTH: + if self._app_key is None or self._app_secret is None: + raise BadInputException( + 'Client id and client secret are required for routes with app auth') + auth_header = base64.b64encode( + "{}:{}".format(self._app_key, self._app_secret).encode("utf-8") + ) + headers['Authorization'] = 'Basic {}'.format(auth_header.decode("utf-8")) + if self._headers: + headers.update(self._headers) + elif auth_type == NO_AUTH: + pass + else: + raise BadInputException('Unhandled auth type: {}'.format(auth_type)) # The contents of the body of the HTTP request body = None diff --git a/dropbox/file_properties.py b/dropbox/file_properties.py index 6d989d64..34710398 100644 --- a/dropbox/file_properties.py +++ b/dropbox/file_properties.py @@ -2106,7 +2106,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AddPropertiesArg_validator, bv.Void(), AddPropertiesError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) properties_overwrite = bb.Route( @@ -2116,7 +2117,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): OverwritePropertyGroupArg_validator, bv.Void(), InvalidPropertyGroupError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) properties_remove = bb.Route( @@ -2126,7 +2128,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RemovePropertiesArg_validator, bv.Void(), RemovePropertiesError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) properties_search = bb.Route( @@ -2136,7 +2139,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PropertiesSearchArg_validator, PropertiesSearchResult_validator, PropertiesSearchError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) properties_search_continue = bb.Route( @@ -2146,7 +2150,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PropertiesSearchContinueArg_validator, PropertiesSearchResult_validator, PropertiesSearchContinueError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) properties_update = bb.Route( @@ -2156,7 +2161,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UpdatePropertiesArg_validator, bv.Void(), UpdatePropertiesError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) templates_add_for_team = bb.Route( @@ -2166,7 +2172,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AddTemplateArg_validator, AddTemplateResult_validator, ModifyTemplateError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) templates_add_for_user = bb.Route( @@ -2176,7 +2183,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AddTemplateArg_validator, AddTemplateResult_validator, ModifyTemplateError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) templates_get_for_team = bb.Route( @@ -2186,7 +2194,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetTemplateArg_validator, GetTemplateResult_validator, TemplateError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) templates_get_for_user = bb.Route( @@ -2196,7 +2205,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetTemplateArg_validator, GetTemplateResult_validator, TemplateError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) templates_list_for_team = bb.Route( @@ -2206,7 +2216,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), ListTemplateResult_validator, TemplateError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) templates_list_for_user = bb.Route( @@ -2216,7 +2227,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), ListTemplateResult_validator, TemplateError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) templates_remove_for_team = bb.Route( @@ -2226,7 +2238,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RemoveTemplateArg_validator, bv.Void(), TemplateError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) templates_remove_for_user = bb.Route( @@ -2236,7 +2249,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RemoveTemplateArg_validator, bv.Void(), TemplateError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) templates_update_for_team = bb.Route( @@ -2246,7 +2260,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UpdateTemplateArg_validator, UpdateTemplateResult_validator, ModifyTemplateError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) templates_update_for_user = bb.Route( @@ -2256,7 +2271,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UpdateTemplateArg_validator, UpdateTemplateResult_validator, ModifyTemplateError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) diff --git a/dropbox/file_requests.py b/dropbox/file_requests.py index 9f769558..a0260281 100644 --- a/dropbox/file_requests.py +++ b/dropbox/file_requests.py @@ -1287,7 +1287,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), CountFileRequestsResult_validator, CountFileRequestsError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) create = bb.Route( @@ -1297,7 +1298,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CreateFileRequestArgs_validator, FileRequest_validator, CreateFileRequestError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) delete = bb.Route( @@ -1307,7 +1309,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DeleteFileRequestArgs_validator, DeleteFileRequestsResult_validator, DeleteFileRequestError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) delete_all_closed = bb.Route( @@ -1317,7 +1320,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), DeleteAllClosedFileRequestsResult_validator, DeleteAllClosedFileRequestsError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) get = bb.Route( @@ -1327,7 +1331,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetFileRequestArgs_validator, FileRequest_validator, GetFileRequestError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) list_v2 = bb.Route( @@ -1337,7 +1342,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFileRequestsArg_validator, ListFileRequestsV2Result_validator, ListFileRequestsError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) list = bb.Route( @@ -1347,7 +1353,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), ListFileRequestsResult_validator, ListFileRequestsError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) list_continue = bb.Route( @@ -1357,7 +1364,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFileRequestsContinueArg_validator, ListFileRequestsV2Result_validator, ListFileRequestsContinueError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) update = bb.Route( @@ -1367,7 +1375,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UpdateFileRequestArgs_validator, FileRequest_validator, UpdateFileRequestError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) diff --git a/dropbox/files.py b/dropbox/files.py index 4457b344..ffe28889 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -11719,7 +11719,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AlphaGetMetadataArg_validator, Metadata_validator, AlphaGetMetadataError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) alpha_upload = bb.Route( @@ -11729,7 +11730,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CommitInfoWithProperties_validator, FileMetadata_validator, UploadErrorWithProperties_validator, - {'host': u'content', + {'auth': u'user', + 'host': u'content', 'style': u'upload'}, ) copy_v2 = bb.Route( @@ -11739,7 +11741,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RelocationArg_validator, RelocationResult_validator, RelocationError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) copy = bb.Route( @@ -11749,7 +11752,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RelocationArg_validator, Metadata_validator, RelocationError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) copy_batch_v2 = bb.Route( @@ -11759,7 +11763,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CopyBatchArg_validator, RelocationBatchV2Launch_validator, bv.Void(), - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) copy_batch = bb.Route( @@ -11769,7 +11774,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RelocationBatchArg_validator, RelocationBatchLaunch_validator, bv.Void(), - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) copy_batch_check_v2 = bb.Route( @@ -11779,7 +11785,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, RelocationBatchV2JobStatus_validator, async_.PollError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) copy_batch_check = bb.Route( @@ -11789,7 +11796,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, RelocationBatchJobStatus_validator, async_.PollError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) copy_reference_get = bb.Route( @@ -11799,7 +11807,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetCopyReferenceArg_validator, GetCopyReferenceResult_validator, GetCopyReferenceError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) copy_reference_save = bb.Route( @@ -11809,7 +11818,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SaveCopyReferenceArg_validator, SaveCopyReferenceResult_validator, SaveCopyReferenceError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) create_folder_v2 = bb.Route( @@ -11819,7 +11829,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CreateFolderArg_validator, CreateFolderResult_validator, CreateFolderError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) create_folder = bb.Route( @@ -11829,7 +11840,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CreateFolderArg_validator, FolderMetadata_validator, CreateFolderError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) create_folder_batch = bb.Route( @@ -11839,7 +11851,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CreateFolderBatchArg_validator, CreateFolderBatchLaunch_validator, bv.Void(), - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) create_folder_batch_check = bb.Route( @@ -11849,7 +11862,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, CreateFolderBatchJobStatus_validator, async_.PollError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) delete_v2 = bb.Route( @@ -11859,7 +11873,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DeleteArg_validator, DeleteResult_validator, DeleteError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) delete = bb.Route( @@ -11869,7 +11884,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DeleteArg_validator, Metadata_validator, DeleteError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) delete_batch = bb.Route( @@ -11879,7 +11895,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DeleteBatchArg_validator, DeleteBatchLaunch_validator, bv.Void(), - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) delete_batch_check = bb.Route( @@ -11889,7 +11906,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, DeleteBatchJobStatus_validator, async_.PollError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) download = bb.Route( @@ -11899,7 +11917,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DownloadArg_validator, FileMetadata_validator, DownloadError_validator, - {'host': u'content', + {'auth': u'user', + 'host': u'content', 'style': u'download'}, ) download_zip = bb.Route( @@ -11909,7 +11928,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DownloadZipArg_validator, DownloadZipResult_validator, DownloadZipError_validator, - {'host': u'content', + {'auth': u'user', + 'host': u'content', 'style': u'download'}, ) export = bb.Route( @@ -11919,7 +11939,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ExportArg_validator, ExportResult_validator, ExportError_validator, - {'host': u'content', + {'auth': u'user', + 'host': u'content', 'style': u'download'}, ) get_file_lock_batch = bb.Route( @@ -11929,7 +11950,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LockFileBatchArg_validator, LockFileBatchResult_validator, LockFileError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) get_metadata = bb.Route( @@ -11939,7 +11961,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetMetadataArg_validator, Metadata_validator, GetMetadataError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) get_preview = bb.Route( @@ -11949,7 +11972,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PreviewArg_validator, FileMetadata_validator, PreviewError_validator, - {'host': u'content', + {'auth': u'user', + 'host': u'content', 'style': u'download'}, ) get_temporary_link = bb.Route( @@ -11959,7 +11983,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetTemporaryLinkArg_validator, GetTemporaryLinkResult_validator, GetTemporaryLinkError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) get_temporary_upload_link = bb.Route( @@ -11969,7 +11994,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetTemporaryUploadLinkArg_validator, GetTemporaryUploadLinkResult_validator, bv.Void(), - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) get_thumbnail = bb.Route( @@ -11979,7 +12005,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ThumbnailArg_validator, FileMetadata_validator, ThumbnailError_validator, - {'host': u'content', + {'auth': u'user', + 'host': u'content', 'style': u'download'}, ) get_thumbnail_v2 = bb.Route( @@ -11989,7 +12016,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ThumbnailV2Arg_validator, PreviewResult_validator, ThumbnailV2Error_validator, - {'host': u'content', + {'auth': u'app, user', + 'host': u'content', 'style': u'download'}, ) get_thumbnail_batch = bb.Route( @@ -11999,7 +12027,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetThumbnailBatchArg_validator, GetThumbnailBatchResult_validator, GetThumbnailBatchError_validator, - {'host': u'content', + {'auth': u'user', + 'host': u'content', 'style': u'rpc'}, ) list_folder = bb.Route( @@ -12009,7 +12038,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFolderArg_validator, ListFolderResult_validator, ListFolderError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) list_folder_continue = bb.Route( @@ -12019,7 +12049,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFolderContinueArg_validator, ListFolderResult_validator, ListFolderContinueError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) list_folder_get_latest_cursor = bb.Route( @@ -12029,7 +12060,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFolderArg_validator, ListFolderGetLatestCursorResult_validator, ListFolderError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) list_folder_longpoll = bb.Route( @@ -12039,7 +12071,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFolderLongpollArg_validator, ListFolderLongpollResult_validator, ListFolderLongpollError_validator, - {'host': u'notify', + {'auth': u'noauth', + 'host': u'notify', 'style': u'rpc'}, ) list_revisions = bb.Route( @@ -12049,7 +12082,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListRevisionsArg_validator, ListRevisionsResult_validator, ListRevisionsError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) lock_file_batch = bb.Route( @@ -12059,7 +12093,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LockFileBatchArg_validator, LockFileBatchResult_validator, LockFileError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) move_v2 = bb.Route( @@ -12069,7 +12104,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RelocationArg_validator, RelocationResult_validator, RelocationError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) move = bb.Route( @@ -12079,7 +12115,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RelocationArg_validator, Metadata_validator, RelocationError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) move_batch_v2 = bb.Route( @@ -12089,7 +12126,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MoveBatchArg_validator, RelocationBatchV2Launch_validator, bv.Void(), - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) move_batch = bb.Route( @@ -12099,7 +12137,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RelocationBatchArg_validator, RelocationBatchLaunch_validator, bv.Void(), - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) move_batch_check_v2 = bb.Route( @@ -12109,7 +12148,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, RelocationBatchV2JobStatus_validator, async_.PollError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) move_batch_check = bb.Route( @@ -12119,7 +12159,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, RelocationBatchJobStatus_validator, async_.PollError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) permanently_delete = bb.Route( @@ -12129,7 +12170,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DeleteArg_validator, bv.Void(), DeleteError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) properties_add = bb.Route( @@ -12139,7 +12181,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): file_properties.AddPropertiesArg_validator, bv.Void(), file_properties.AddPropertiesError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) properties_overwrite = bb.Route( @@ -12149,7 +12192,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): file_properties.OverwritePropertyGroupArg_validator, bv.Void(), file_properties.InvalidPropertyGroupError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) properties_remove = bb.Route( @@ -12159,7 +12203,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): file_properties.RemovePropertiesArg_validator, bv.Void(), file_properties.RemovePropertiesError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) properties_template_get = bb.Route( @@ -12169,7 +12214,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): file_properties.GetTemplateArg_validator, file_properties.GetTemplateResult_validator, file_properties.TemplateError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) properties_template_list = bb.Route( @@ -12179,7 +12225,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), file_properties.ListTemplateResult_validator, file_properties.TemplateError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) properties_update = bb.Route( @@ -12189,7 +12236,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): file_properties.UpdatePropertiesArg_validator, bv.Void(), file_properties.UpdatePropertiesError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) restore = bb.Route( @@ -12199,7 +12247,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RestoreArg_validator, FileMetadata_validator, RestoreError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) save_url = bb.Route( @@ -12209,7 +12258,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SaveUrlArg_validator, SaveUrlResult_validator, SaveUrlError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) save_url_check_job_status = bb.Route( @@ -12219,7 +12269,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, SaveUrlJobStatus_validator, async_.PollError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) search = bb.Route( @@ -12229,7 +12280,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SearchArg_validator, SearchResult_validator, SearchError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) search_v2 = bb.Route( @@ -12239,7 +12291,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SearchV2Arg_validator, SearchV2Result_validator, SearchError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) search_continue_v2 = bb.Route( @@ -12249,7 +12302,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SearchV2ContinueArg_validator, SearchV2Result_validator, SearchError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) unlock_file_batch = bb.Route( @@ -12259,7 +12313,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UnlockFileBatchArg_validator, LockFileBatchResult_validator, LockFileError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) upload = bb.Route( @@ -12269,7 +12324,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CommitInfo_validator, FileMetadata_validator, UploadError_validator, - {'host': u'content', + {'auth': u'user', + 'host': u'content', 'style': u'upload'}, ) upload_session_append_v2 = bb.Route( @@ -12279,7 +12335,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadSessionAppendArg_validator, bv.Void(), UploadSessionLookupError_validator, - {'host': u'content', + {'auth': u'user', + 'host': u'content', 'style': u'upload'}, ) upload_session_append = bb.Route( @@ -12289,7 +12346,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadSessionCursor_validator, bv.Void(), UploadSessionLookupError_validator, - {'host': u'content', + {'auth': u'user', + 'host': u'content', 'style': u'upload'}, ) upload_session_finish = bb.Route( @@ -12299,7 +12357,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadSessionFinishArg_validator, FileMetadata_validator, UploadSessionFinishError_validator, - {'host': u'content', + {'auth': u'user', + 'host': u'content', 'style': u'upload'}, ) upload_session_finish_batch = bb.Route( @@ -12309,7 +12368,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadSessionFinishBatchArg_validator, UploadSessionFinishBatchLaunch_validator, bv.Void(), - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) upload_session_finish_batch_check = bb.Route( @@ -12319,7 +12379,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, UploadSessionFinishBatchJobStatus_validator, async_.PollError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) upload_session_start = bb.Route( @@ -12329,7 +12390,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadSessionStartArg_validator, UploadSessionStartResult_validator, UploadSessionStartError_validator, - {'host': u'content', + {'auth': u'user', + 'host': u'content', 'style': u'upload'}, ) diff --git a/dropbox/paper.py b/dropbox/paper.py index dcf67664..1bf7e97b 100644 --- a/dropbox/paper.py +++ b/dropbox/paper.py @@ -2981,7 +2981,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RefPaperDoc_validator, bv.Void(), DocLookupError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) docs_create = bb.Route( @@ -2991,7 +2992,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PaperDocCreateArgs_validator, PaperDocCreateUpdateResult_validator, PaperDocCreateError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'upload'}, ) docs_download = bb.Route( @@ -3001,7 +3003,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PaperDocExport_validator, PaperDocExportResult_validator, DocLookupError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'download'}, ) docs_folder_users_list = bb.Route( @@ -3011,7 +3014,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListUsersOnFolderArgs_validator, ListUsersOnFolderResponse_validator, DocLookupError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) docs_folder_users_list_continue = bb.Route( @@ -3021,7 +3025,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListUsersOnFolderContinueArgs_validator, ListUsersOnFolderResponse_validator, ListUsersCursorError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) docs_get_folder_info = bb.Route( @@ -3031,7 +3036,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RefPaperDoc_validator, FoldersContainingPaperDoc_validator, DocLookupError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) docs_list = bb.Route( @@ -3041,7 +3047,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListPaperDocsArgs_validator, ListPaperDocsResponse_validator, bv.Void(), - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) docs_list_continue = bb.Route( @@ -3051,7 +3058,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListPaperDocsContinueArgs_validator, ListPaperDocsResponse_validator, ListDocsCursorError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) docs_permanently_delete = bb.Route( @@ -3061,7 +3069,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RefPaperDoc_validator, bv.Void(), DocLookupError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) docs_sharing_policy_get = bb.Route( @@ -3071,7 +3080,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RefPaperDoc_validator, SharingPolicy_validator, DocLookupError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) docs_sharing_policy_set = bb.Route( @@ -3081,7 +3091,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PaperDocSharingPolicy_validator, bv.Void(), DocLookupError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) docs_update = bb.Route( @@ -3091,7 +3102,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PaperDocUpdateArgs_validator, PaperDocCreateUpdateResult_validator, PaperDocUpdateError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'upload'}, ) docs_users_add = bb.Route( @@ -3101,7 +3113,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AddPaperDocUser_validator, bv.List(AddPaperDocUserMemberResult_validator), DocLookupError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) docs_users_list = bb.Route( @@ -3111,7 +3124,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListUsersOnPaperDocArgs_validator, ListUsersOnPaperDocResponse_validator, DocLookupError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) docs_users_list_continue = bb.Route( @@ -3121,7 +3135,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListUsersOnPaperDocContinueArgs_validator, ListUsersOnPaperDocResponse_validator, ListUsersCursorError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) docs_users_remove = bb.Route( @@ -3131,7 +3146,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RemovePaperDocUser_validator, bv.Void(), DocLookupError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) folders_create = bb.Route( @@ -3141,7 +3157,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PaperFolderCreateArg_validator, PaperFolderCreateResult_validator, PaperFolderCreateError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) diff --git a/dropbox/sharing.py b/dropbox/sharing.py index dc2d9a1e..ac17ee79 100644 --- a/dropbox/sharing.py +++ b/dropbox/sharing.py @@ -12952,7 +12952,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AddFileMemberArgs_validator, bv.List(FileMemberActionResult_validator), AddFileMemberError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) add_folder_member = bb.Route( @@ -12962,7 +12963,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AddFolderMemberArg_validator, bv.Void(), AddFolderMemberError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) change_file_member_access = bb.Route( @@ -12972,7 +12974,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ChangeFileMemberAccessArgs_validator, FileMemberActionResult_validator, FileMemberActionError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) check_job_status = bb.Route( @@ -12982,7 +12985,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, JobStatus_validator, async_.PollError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) check_remove_member_job_status = bb.Route( @@ -12992,7 +12996,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, RemoveMemberJobStatus_validator, async_.PollError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) check_share_job_status = bb.Route( @@ -13002,7 +13007,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, ShareFolderJobStatus_validator, async_.PollError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) create_shared_link = bb.Route( @@ -13012,7 +13018,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CreateSharedLinkArg_validator, PathLinkMetadata_validator, CreateSharedLinkError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) create_shared_link_with_settings = bb.Route( @@ -13022,7 +13029,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CreateSharedLinkWithSettingsArg_validator, SharedLinkMetadata_validator, CreateSharedLinkWithSettingsError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) get_file_metadata = bb.Route( @@ -13032,7 +13040,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetFileMetadataArg_validator, SharedFileMetadata_validator, GetFileMetadataError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) get_file_metadata_batch = bb.Route( @@ -13042,7 +13051,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetFileMetadataBatchArg_validator, bv.List(GetFileMetadataBatchResult_validator), SharingUserError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) get_folder_metadata = bb.Route( @@ -13052,7 +13062,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetMetadataArgs_validator, SharedFolderMetadata_validator, SharedFolderAccessError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) get_shared_link_file = bb.Route( @@ -13062,7 +13073,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetSharedLinkFileArg_validator, SharedLinkMetadata_validator, GetSharedLinkFileError_validator, - {'host': u'content', + {'auth': u'user', + 'host': u'content', 'style': u'download'}, ) get_shared_link_metadata = bb.Route( @@ -13072,7 +13084,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetSharedLinkMetadataArg_validator, SharedLinkMetadata_validator, SharedLinkError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) get_shared_links = bb.Route( @@ -13082,7 +13095,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetSharedLinksArg_validator, GetSharedLinksResult_validator, GetSharedLinksError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) list_file_members = bb.Route( @@ -13092,7 +13106,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFileMembersArg_validator, SharedFileMembers_validator, ListFileMembersError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) list_file_members_batch = bb.Route( @@ -13102,7 +13117,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFileMembersBatchArg_validator, bv.List(ListFileMembersBatchResult_validator), SharingUserError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) list_file_members_continue = bb.Route( @@ -13112,7 +13128,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFileMembersContinueArg_validator, SharedFileMembers_validator, ListFileMembersContinueError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) list_folder_members = bb.Route( @@ -13122,7 +13139,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFolderMembersArgs_validator, SharedFolderMembers_validator, SharedFolderAccessError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) list_folder_members_continue = bb.Route( @@ -13132,7 +13150,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFolderMembersContinueArg_validator, SharedFolderMembers_validator, ListFolderMembersContinueError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) list_folders = bb.Route( @@ -13142,7 +13161,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFoldersArgs_validator, ListFoldersResult_validator, bv.Void(), - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) list_folders_continue = bb.Route( @@ -13152,7 +13172,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFoldersContinueArg_validator, ListFoldersResult_validator, ListFoldersContinueError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) list_mountable_folders = bb.Route( @@ -13162,7 +13183,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFoldersArgs_validator, ListFoldersResult_validator, bv.Void(), - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) list_mountable_folders_continue = bb.Route( @@ -13172,7 +13194,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFoldersContinueArg_validator, ListFoldersResult_validator, ListFoldersContinueError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) list_received_files = bb.Route( @@ -13182,7 +13205,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFilesArg_validator, ListFilesResult_validator, SharingUserError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) list_received_files_continue = bb.Route( @@ -13192,7 +13216,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFilesContinueArg_validator, ListFilesResult_validator, ListFilesContinueError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) list_shared_links = bb.Route( @@ -13202,7 +13227,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListSharedLinksArg_validator, ListSharedLinksResult_validator, ListSharedLinksError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) modify_shared_link_settings = bb.Route( @@ -13212,7 +13238,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ModifySharedLinkSettingsArgs_validator, SharedLinkMetadata_validator, ModifySharedLinkSettingsError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) mount_folder = bb.Route( @@ -13222,7 +13249,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MountFolderArg_validator, SharedFolderMetadata_validator, MountFolderError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) relinquish_file_membership = bb.Route( @@ -13232,7 +13260,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RelinquishFileMembershipArg_validator, bv.Void(), RelinquishFileMembershipError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) relinquish_folder_membership = bb.Route( @@ -13242,7 +13271,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RelinquishFolderMembershipArg_validator, async_.LaunchEmptyResult_validator, RelinquishFolderMembershipError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) remove_file_member = bb.Route( @@ -13252,7 +13282,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RemoveFileMemberArg_validator, FileMemberActionIndividualResult_validator, RemoveFileMemberError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) remove_file_member_2 = bb.Route( @@ -13262,7 +13293,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RemoveFileMemberArg_validator, FileMemberRemoveActionResult_validator, RemoveFileMemberError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) remove_folder_member = bb.Route( @@ -13272,7 +13304,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RemoveFolderMemberArg_validator, async_.LaunchResultBase_validator, RemoveFolderMemberError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) revoke_shared_link = bb.Route( @@ -13282,7 +13315,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RevokeSharedLinkArg_validator, bv.Void(), RevokeSharedLinkError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) set_access_inheritance = bb.Route( @@ -13292,7 +13326,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SetAccessInheritanceArg_validator, ShareFolderLaunch_validator, SetAccessInheritanceError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) share_folder = bb.Route( @@ -13302,7 +13337,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ShareFolderArg_validator, ShareFolderLaunch_validator, ShareFolderError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) transfer_folder = bb.Route( @@ -13312,7 +13348,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TransferFolderArg_validator, bv.Void(), TransferFolderError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) unmount_folder = bb.Route( @@ -13322,7 +13359,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UnmountFolderArg_validator, bv.Void(), UnmountFolderError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) unshare_file = bb.Route( @@ -13332,7 +13370,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UnshareFileArg_validator, bv.Void(), UnshareFileError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) unshare_folder = bb.Route( @@ -13342,7 +13381,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UnshareFolderArg_validator, async_.LaunchEmptyResult_validator, UnshareFolderError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) update_file_member = bb.Route( @@ -13352,7 +13392,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UpdateFileMemberArgs_validator, MemberAccessLevelResult_validator, FileMemberActionError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) update_folder_member = bb.Route( @@ -13362,7 +13403,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UpdateFolderMemberArg_validator, MemberAccessLevelResult_validator, UpdateFolderMemberError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) update_folder_policy = bb.Route( @@ -13372,7 +13414,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UpdateFolderPolicyArg_validator, SharedFolderMetadata_validator, UpdateFolderPolicyError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) diff --git a/dropbox/team.py b/dropbox/team.py index 864cf163..0ba5ad80 100644 --- a/dropbox/team.py +++ b/dropbox/team.py @@ -15342,7 +15342,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListMemberDevicesArg_validator, ListMemberDevicesResult_validator, ListMemberDevicesError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) devices_list_members_devices = bb.Route( @@ -15352,7 +15353,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListMembersDevicesArg_validator, ListMembersDevicesResult_validator, ListMembersDevicesError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) devices_list_team_devices = bb.Route( @@ -15362,7 +15364,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListTeamDevicesArg_validator, ListTeamDevicesResult_validator, ListTeamDevicesError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) devices_revoke_device_session = bb.Route( @@ -15372,7 +15375,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RevokeDeviceSessionArg_validator, bv.Void(), RevokeDeviceSessionError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) devices_revoke_device_session_batch = bb.Route( @@ -15382,7 +15386,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RevokeDeviceSessionBatchArg_validator, RevokeDeviceSessionBatchResult_validator, RevokeDeviceSessionBatchError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) features_get_values = bb.Route( @@ -15392,7 +15397,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): FeaturesGetValuesBatchArg_validator, FeaturesGetValuesBatchResult_validator, FeaturesGetValuesBatchError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) get_info = bb.Route( @@ -15402,7 +15408,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), TeamGetInfoResult_validator, bv.Void(), - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) groups_create = bb.Route( @@ -15412,7 +15419,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupCreateArg_validator, GroupFullInfo_validator, GroupCreateError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) groups_delete = bb.Route( @@ -15422,7 +15430,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupSelector_validator, async_.LaunchEmptyResult_validator, GroupDeleteError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) groups_get_info = bb.Route( @@ -15432,7 +15441,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupsSelector_validator, GroupsGetInfoResult_validator, GroupsGetInfoError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) groups_job_status_get = bb.Route( @@ -15442,7 +15452,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, async_.PollEmptyResult_validator, GroupsPollError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) groups_list = bb.Route( @@ -15452,7 +15463,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupsListArg_validator, GroupsListResult_validator, bv.Void(), - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) groups_list_continue = bb.Route( @@ -15462,7 +15474,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupsListContinueArg_validator, GroupsListResult_validator, GroupsListContinueError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) groups_members_add = bb.Route( @@ -15472,7 +15485,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupMembersAddArg_validator, GroupMembersChangeResult_validator, GroupMembersAddError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) groups_members_list = bb.Route( @@ -15482,7 +15496,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupsMembersListArg_validator, GroupsMembersListResult_validator, GroupSelectorError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) groups_members_list_continue = bb.Route( @@ -15492,7 +15507,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupsMembersListContinueArg_validator, GroupsMembersListResult_validator, GroupsMembersListContinueError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) groups_members_remove = bb.Route( @@ -15502,7 +15518,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupMembersRemoveArg_validator, GroupMembersChangeResult_validator, GroupMembersRemoveError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) groups_members_set_access_type = bb.Route( @@ -15512,7 +15529,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupMembersSetAccessTypeArg_validator, GroupsGetInfoResult_validator, GroupMemberSetAccessTypeError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) groups_update = bb.Route( @@ -15522,7 +15540,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupUpdateArgs_validator, GroupFullInfo_validator, GroupUpdateError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) legal_holds_create_policy = bb.Route( @@ -15532,7 +15551,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LegalHoldsPolicyCreateArg_validator, LegalHoldsPolicyCreateResult_validator, LegalHoldsPolicyCreateError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) legal_holds_get_policy = bb.Route( @@ -15542,7 +15562,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LegalHoldsGetPolicyArg_validator, LegalHoldsGetPolicyResult_validator, LegalHoldsGetPolicyError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) legal_holds_list_held_revisions = bb.Route( @@ -15552,7 +15573,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LegalHoldsListHeldRevisionsArg_validator, LegalHoldsListHeldRevisionResult_validator, LegalHoldsListHeldRevisionsError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) legal_holds_list_held_revisions_continue = bb.Route( @@ -15562,7 +15584,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LegalHoldsListHeldRevisionsContinueArg_validator, LegalHoldsListHeldRevisionResult_validator, LegalHoldsListHeldRevisionsError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) legal_holds_list_policies = bb.Route( @@ -15572,7 +15595,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LegalHoldsListPoliciesArg_validator, LegalHoldsListPoliciesResult_validator, LegalHoldsListPoliciesError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) legal_holds_release_policy = bb.Route( @@ -15582,7 +15606,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LegalHoldsPolicyReleaseArg_validator, bv.Void(), LegalHoldsPolicyReleaseError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) legal_holds_update_policy = bb.Route( @@ -15592,7 +15617,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LegalHoldsPolicyUpdateArg_validator, LegalHoldsPolicyUpdateResult_validator, LegalHoldsPolicyUpdateError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) linked_apps_list_member_linked_apps = bb.Route( @@ -15602,7 +15628,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListMemberAppsArg_validator, ListMemberAppsResult_validator, ListMemberAppsError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) linked_apps_list_members_linked_apps = bb.Route( @@ -15612,7 +15639,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListMembersAppsArg_validator, ListMembersAppsResult_validator, ListMembersAppsError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) linked_apps_list_team_linked_apps = bb.Route( @@ -15622,7 +15650,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListTeamAppsArg_validator, ListTeamAppsResult_validator, ListTeamAppsError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) linked_apps_revoke_linked_app = bb.Route( @@ -15632,7 +15661,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RevokeLinkedApiAppArg_validator, bv.Void(), RevokeLinkedAppError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) linked_apps_revoke_linked_app_batch = bb.Route( @@ -15642,7 +15672,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RevokeLinkedApiAppBatchArg_validator, RevokeLinkedAppBatchResult_validator, RevokeLinkedAppBatchError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) member_space_limits_excluded_users_add = bb.Route( @@ -15652,7 +15683,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ExcludedUsersUpdateArg_validator, ExcludedUsersUpdateResult_validator, ExcludedUsersUpdateError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) member_space_limits_excluded_users_list = bb.Route( @@ -15662,7 +15694,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ExcludedUsersListArg_validator, ExcludedUsersListResult_validator, ExcludedUsersListError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) member_space_limits_excluded_users_list_continue = bb.Route( @@ -15672,7 +15705,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ExcludedUsersListContinueArg_validator, ExcludedUsersListResult_validator, ExcludedUsersListContinueError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) member_space_limits_excluded_users_remove = bb.Route( @@ -15682,7 +15716,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ExcludedUsersUpdateArg_validator, ExcludedUsersUpdateResult_validator, ExcludedUsersUpdateError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) member_space_limits_get_custom_quota = bb.Route( @@ -15692,7 +15727,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CustomQuotaUsersArg_validator, bv.List(CustomQuotaResult_validator), CustomQuotaError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) member_space_limits_remove_custom_quota = bb.Route( @@ -15702,7 +15738,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CustomQuotaUsersArg_validator, bv.List(RemoveCustomQuotaResult_validator), CustomQuotaError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) member_space_limits_set_custom_quota = bb.Route( @@ -15712,7 +15749,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SetCustomQuotaArg_validator, bv.List(CustomQuotaResult_validator), SetCustomQuotaError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) members_add = bb.Route( @@ -15722,7 +15760,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersAddArg_validator, MembersAddLaunch_validator, bv.Void(), - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) members_add_job_status_get = bb.Route( @@ -15732,7 +15771,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, MembersAddJobStatus_validator, async_.PollError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) members_delete_profile_photo = bb.Route( @@ -15742,7 +15782,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersDeleteProfilePhotoArg_validator, TeamMemberInfo_validator, MembersDeleteProfilePhotoError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) members_get_info = bb.Route( @@ -15752,7 +15793,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersGetInfoArgs_validator, MembersGetInfoResult_validator, MembersGetInfoError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) members_list = bb.Route( @@ -15762,7 +15804,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersListArg_validator, MembersListResult_validator, MembersListError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) members_list_continue = bb.Route( @@ -15772,7 +15815,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersListContinueArg_validator, MembersListResult_validator, MembersListContinueError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) members_move_former_member_files = bb.Route( @@ -15782,7 +15826,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersDataTransferArg_validator, async_.LaunchEmptyResult_validator, MembersTransferFormerMembersFilesError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) members_move_former_member_files_job_status_check = bb.Route( @@ -15792,7 +15837,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, async_.PollEmptyResult_validator, async_.PollError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) members_recover = bb.Route( @@ -15802,7 +15848,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersRecoverArg_validator, bv.Void(), MembersRecoverError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) members_remove = bb.Route( @@ -15812,7 +15859,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersRemoveArg_validator, async_.LaunchEmptyResult_validator, MembersRemoveError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) members_remove_job_status_get = bb.Route( @@ -15822,7 +15870,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, async_.PollEmptyResult_validator, async_.PollError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) members_secondary_emails_add = bb.Route( @@ -15832,7 +15881,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AddSecondaryEmailsArg_validator, AddSecondaryEmailsResult_validator, AddSecondaryEmailsError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) members_secondary_emails_delete = bb.Route( @@ -15842,7 +15892,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DeleteSecondaryEmailsArg_validator, DeleteSecondaryEmailsResult_validator, bv.Void(), - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) members_secondary_emails_resend_verification_emails = bb.Route( @@ -15852,7 +15903,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ResendVerificationEmailArg_validator, ResendVerificationEmailResult_validator, bv.Void(), - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) members_send_welcome_email = bb.Route( @@ -15862,7 +15914,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UserSelectorArg_validator, bv.Void(), MembersSendWelcomeError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) members_set_admin_permissions = bb.Route( @@ -15872,7 +15925,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersSetPermissionsArg_validator, MembersSetPermissionsResult_validator, MembersSetPermissionsError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) members_set_profile = bb.Route( @@ -15882,7 +15936,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersSetProfileArg_validator, TeamMemberInfo_validator, MembersSetProfileError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) members_set_profile_photo = bb.Route( @@ -15892,7 +15947,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersSetProfilePhotoArg_validator, TeamMemberInfo_validator, MembersSetProfilePhotoError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) members_suspend = bb.Route( @@ -15902,7 +15958,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersDeactivateArg_validator, bv.Void(), MembersSuspendError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) members_unsuspend = bb.Route( @@ -15912,7 +15969,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersUnsuspendArg_validator, bv.Void(), MembersUnsuspendError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) namespaces_list = bb.Route( @@ -15922,7 +15980,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamNamespacesListArg_validator, TeamNamespacesListResult_validator, TeamNamespacesListError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) namespaces_list_continue = bb.Route( @@ -15932,7 +15991,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamNamespacesListContinueArg_validator, TeamNamespacesListResult_validator, TeamNamespacesListContinueError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) properties_template_add = bb.Route( @@ -15942,7 +16002,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): file_properties.AddTemplateArg_validator, file_properties.AddTemplateResult_validator, file_properties.ModifyTemplateError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) properties_template_get = bb.Route( @@ -15952,7 +16013,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): file_properties.GetTemplateArg_validator, file_properties.GetTemplateResult_validator, file_properties.TemplateError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) properties_template_list = bb.Route( @@ -15962,7 +16024,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), file_properties.ListTemplateResult_validator, file_properties.TemplateError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) properties_template_update = bb.Route( @@ -15972,7 +16035,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): file_properties.UpdateTemplateArg_validator, file_properties.UpdateTemplateResult_validator, file_properties.ModifyTemplateError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) reports_get_activity = bb.Route( @@ -15982,7 +16046,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DateRange_validator, GetActivityReport_validator, DateRangeError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) reports_get_devices = bb.Route( @@ -15992,7 +16057,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DateRange_validator, GetDevicesReport_validator, DateRangeError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) reports_get_membership = bb.Route( @@ -16002,7 +16068,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DateRange_validator, GetMembershipReport_validator, DateRangeError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) reports_get_storage = bb.Route( @@ -16012,7 +16079,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DateRange_validator, GetStorageReport_validator, DateRangeError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) team_folder_activate = bb.Route( @@ -16022,7 +16090,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamFolderIdArg_validator, TeamFolderMetadata_validator, TeamFolderActivateError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) team_folder_archive = bb.Route( @@ -16032,7 +16101,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamFolderArchiveArg_validator, TeamFolderArchiveLaunch_validator, TeamFolderArchiveError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) team_folder_archive_check = bb.Route( @@ -16042,7 +16112,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, TeamFolderArchiveJobStatus_validator, async_.PollError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) team_folder_create = bb.Route( @@ -16052,7 +16123,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamFolderCreateArg_validator, TeamFolderMetadata_validator, TeamFolderCreateError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) team_folder_get_info = bb.Route( @@ -16062,7 +16134,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamFolderIdListArg_validator, bv.List(TeamFolderGetInfoItem_validator), bv.Void(), - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) team_folder_list = bb.Route( @@ -16072,7 +16145,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamFolderListArg_validator, TeamFolderListResult_validator, TeamFolderListError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) team_folder_list_continue = bb.Route( @@ -16082,7 +16156,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamFolderListContinueArg_validator, TeamFolderListResult_validator, TeamFolderListContinueError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) team_folder_permanently_delete = bb.Route( @@ -16092,7 +16167,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamFolderIdArg_validator, bv.Void(), TeamFolderPermanentlyDeleteError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) team_folder_rename = bb.Route( @@ -16102,7 +16178,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamFolderRenameArg_validator, TeamFolderMetadata_validator, TeamFolderRenameError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) team_folder_update_sync_settings = bb.Route( @@ -16112,7 +16189,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamFolderUpdateSyncSettingsArg_validator, TeamFolderMetadata_validator, TeamFolderUpdateSyncSettingsError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) token_get_authenticated_admin = bb.Route( @@ -16122,7 +16200,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), TokenGetAuthenticatedAdminResult_validator, TokenGetAuthenticatedAdminError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 348a9a34..178b4f53 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -79068,7 +79068,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetTeamEventsArg_validator, GetTeamEventsResult_validator, GetTeamEventsError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) get_events_continue = bb.Route( @@ -79078,7 +79079,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetTeamEventsContinueArg_validator, GetTeamEventsResult_validator, GetTeamEventsContinueError_validator, - {'host': u'api', + {'auth': u'team', + 'host': u'api', 'style': u'rpc'}, ) diff --git a/dropbox/users.py b/dropbox/users.py index c5188366..7e2f85e0 100644 --- a/dropbox/users.py +++ b/dropbox/users.py @@ -1371,7 +1371,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UserFeaturesGetValuesBatchArg_validator, UserFeaturesGetValuesBatchResult_validator, UserFeaturesGetValuesBatchError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) get_account = bb.Route( @@ -1381,7 +1382,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetAccountArg_validator, BasicAccount_validator, GetAccountError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) get_account_batch = bb.Route( @@ -1391,7 +1393,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetAccountBatchArg_validator, GetAccountBatchResult_validator, GetAccountBatchError_validator, - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) get_current_account = bb.Route( @@ -1401,7 +1404,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), FullAccount_validator, bv.Void(), - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) get_space_usage = bb.Route( @@ -1411,7 +1415,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), SpaceUsage_validator, bv.Void(), - {'host': u'api', + {'auth': u'user', + 'host': u'api', 'style': u'rpc'}, ) diff --git a/generate_base_client.py b/generate_base_client.py index 66d89f34..63c67958 100755 --- a/generate_base_client.py +++ b/generate_base_client.py @@ -49,7 +49,7 @@ def main(): print('Generating Python types') subprocess.check_output( (['python', '-m', 'stone.cli', 'python_types', dropbox_pkg_path] + - specs + ['-a', 'host', '-a', 'style'] + + specs + ['-a', 'host', '-a', 'style', '-a', 'auth'] + ['--', '-r', 'dropbox.dropbox_client.Dropbox.{ns}_{route}', '-p', 'dropbox'])) if verbose: diff --git a/test/integration/test_dropbox.py b/test/integration/test_dropbox.py index d5c4084a..d23b509c 100644 --- a/test/integration/test_dropbox.py +++ b/test/integration/test_dropbox.py @@ -40,7 +40,7 @@ PathRoot_validator, ) -def _token_from_env_or_die(env_name='DROPBOX_TOKEN'): +def _value_from_env_or_die(env_name='DROPBOX_TOKEN'): oauth2_token = os.environ.get(env_name) if oauth2_token is None: print('Set {} environment variable to a valid token.'.format(env_name), @@ -51,7 +51,7 @@ def _token_from_env_or_die(env_name='DROPBOX_TOKEN'): def dbx_from_env(f): @functools.wraps(f) def wrapped(self, *args, **kwargs): - oauth2_token = _token_from_env_or_die() + oauth2_token = _value_from_env_or_die() args += (Dropbox(oauth2_token),) return f(self, *args, **kwargs) return wrapped @@ -59,9 +59,9 @@ def wrapped(self, *args, **kwargs): def refresh_dbx_from_env(f): @functools.wraps(f) def wrapped(self, *args, **kwargs): - refresh_token = _token_from_env_or_die("DROPBOX_REFRESH_TOKEN") - app_key = _token_from_env_or_die("DROPBOX_APP_KEY") - app_secret = _token_from_env_or_die("DROPBOX_APP_SECRET") + refresh_token = _value_from_env_or_die("DROPBOX_REFRESH_TOKEN") + app_key = _value_from_env_or_die("DROPBOX_APP_KEY") + app_secret = _value_from_env_or_die("DROPBOX_APP_SECRET") args += (Dropbox(oauth2_refresh_token=refresh_token, app_key=app_key, app_secret=app_secret),) return f(self, *args, **kwargs) @@ -70,11 +70,22 @@ def wrapped(self, *args, **kwargs): def dbx_team_from_env(f): @functools.wraps(f) def wrapped(self, *args, **kwargs): - team_oauth2_token = _token_from_env_or_die('DROPBOX_TEAM_TOKEN') + team_oauth2_token = _value_from_env_or_die('DROPBOX_TEAM_TOKEN') args += (DropboxTeam(team_oauth2_token),) return f(self, *args, **kwargs) return wrapped + +def dbx_app_auth_from_env(f): + @functools.wraps(f) + def wrapped(self, *args, **kwargs): + app_key = _value_from_env_or_die("DROPBOX_APP_KEY") + app_secret = _value_from_env_or_die("DROPBOX_APP_SECRET") + args += (Dropbox(oauth2_access_token="foo", app_key=app_key, app_secret=app_secret),) + return f(self, *args, **kwargs) + return wrapped + + MALFORMED_TOKEN = 'asdf' INVALID_TOKEN = 'z' * 62 @@ -120,6 +131,10 @@ def test_bad_auth(self): def test_refresh(self, dbx): dbx.users_get_current_account() + @dbx_app_auth_from_env + def test_app_auth(self, dbx_app_auth): + dbx_app_auth.check_app(query="hello world") + @refresh_dbx_from_env def test_downscope(self, dbx): dbx.users_get_current_account() diff --git a/test/unit/test_dropbox_unit.py b/test/unit/test_dropbox_unit.py index aaa112ad..5d5f82b3 100644 --- a/test/unit/test_dropbox_unit.py +++ b/test/unit/test_dropbox_unit.py @@ -290,6 +290,10 @@ def test_Dropbox_with_only_refresh(self, session_instance): app_secret=APP_SECRET, session=session_instance) + def test_Dropbox_with_only_app_key_and_secret(self, session_instance): + with pytest.raises(BadInputException): + Dropbox(app_key=APP_KEY, app_secret=APP_SECRET) + def test_check_refresh_with_legacy_token(self, session_instance): dbx = Dropbox(oauth2_access_token=ACCESS_TOKEN, session=session_instance) dbx.check_and_refresh_access_token() From fc481aeb2384046945316ae3b1e9c7eaf0d200ef Mon Sep 17 00:00:00 2001 From: yuxiang-he Date: Wed, 6 Jan 2021 12:18:05 -0800 Subject: [PATCH 16/90] Convert integration tests to use pytest instead of unittest (#313) * convert integration test to use pytest instead of unittest --- test/integration/test_dropbox.py | 255 ++++++++++++++----------------- tox.ini | 4 +- 2 files changed, 115 insertions(+), 144 deletions(-) diff --git a/test/integration/test_dropbox.py b/test/integration/test_dropbox.py index d23b509c..91493816 100644 --- a/test/integration/test_dropbox.py +++ b/test/integration/test_dropbox.py @@ -3,14 +3,12 @@ from __future__ import absolute_import, division, print_function, unicode_literals import datetime -import functools import os import random import re -import six import string import sys -import unittest +import pytest try: from io import BytesIO @@ -41,49 +39,40 @@ ) def _value_from_env_or_die(env_name='DROPBOX_TOKEN'): - oauth2_token = os.environ.get(env_name) - if oauth2_token is None: + value = os.environ.get(env_name) + if value is None: print('Set {} environment variable to a valid token.'.format(env_name), file=sys.stderr) sys.exit(1) - return oauth2_token - -def dbx_from_env(f): - @functools.wraps(f) - def wrapped(self, *args, **kwargs): - oauth2_token = _value_from_env_or_die() - args += (Dropbox(oauth2_token),) - return f(self, *args, **kwargs) - return wrapped - -def refresh_dbx_from_env(f): - @functools.wraps(f) - def wrapped(self, *args, **kwargs): - refresh_token = _value_from_env_or_die("DROPBOX_REFRESH_TOKEN") - app_key = _value_from_env_or_die("DROPBOX_APP_KEY") - app_secret = _value_from_env_or_die("DROPBOX_APP_SECRET") - args += (Dropbox(oauth2_refresh_token=refresh_token, - app_key=app_key, app_secret=app_secret),) - return f(self, *args, **kwargs) - return wrapped - -def dbx_team_from_env(f): - @functools.wraps(f) - def wrapped(self, *args, **kwargs): - team_oauth2_token = _value_from_env_or_die('DROPBOX_TEAM_TOKEN') - args += (DropboxTeam(team_oauth2_token),) - return f(self, *args, **kwargs) - return wrapped - - -def dbx_app_auth_from_env(f): - @functools.wraps(f) - def wrapped(self, *args, **kwargs): - app_key = _value_from_env_or_die("DROPBOX_APP_KEY") - app_secret = _value_from_env_or_die("DROPBOX_APP_SECRET") - args += (Dropbox(oauth2_access_token="foo", app_key=app_key, app_secret=app_secret),) - return f(self, *args, **kwargs) - return wrapped + return value + + +@pytest.fixture() +def dbx_from_env(): + oauth2_token = _value_from_env_or_die() + return Dropbox(oauth2_token) + + +@pytest.fixture() +def refresh_dbx_from_env(): + refresh_token = _value_from_env_or_die("DROPBOX_REFRESH_TOKEN") + app_key = _value_from_env_or_die("DROPBOX_APP_KEY") + app_secret = _value_from_env_or_die("DROPBOX_APP_SECRET") + return Dropbox(oauth2_refresh_token=refresh_token, + app_key=app_key, app_secret=app_secret) + + +@pytest.fixture() +def dbx_team_from_env(): + team_oauth2_token = _value_from_env_or_die('DROPBOX_TEAM_TOKEN') + return DropboxTeam(team_oauth2_token) + + +@pytest.fixture() +def dbx_app_auth_from_env(): + app_key = _value_from_env_or_die("DROPBOX_APP_KEY") + app_secret = _value_from_env_or_die("DROPBOX_APP_SECRET") + return Dropbox(oauth2_access_token="foo", app_key=app_key, app_secret=app_secret) MALFORMED_TOKEN = 'asdf' @@ -92,188 +81,170 @@ def wrapped(self, *args, **kwargs): # Need bytes type for Python3 DUMMY_PAYLOAD = string.ascii_letters.encode('ascii') -class TestDropbox(unittest.TestCase): + +@pytest.mark.usefixtures("dbx_from_env", "refresh_dbx_from_env", "dbx_app_auth_from_env") +class TestDropbox: def test_default_oauth2_urls(self): flow_obj = DropboxOAuth2Flow('dummy_app_key', 'dummy_app_secret', 'http://localhost/dummy', 'dummy_session', 'dbx-auth-csrf-token') - six.assertRegex( - self, - flow_obj._get_authorize_url('http://localhost/redirect', 'state', 'legacy'), + assert re.match( r'^https://{}/oauth2/authorize\?'.format(re.escape(session.WEB_HOST)), + flow_obj._get_authorize_url('http://localhost/redirect', 'state', 'legacy'), ) - self.assertEqual( - flow_obj.build_url('/oauth2/authorize'), - 'https://{}/oauth2/authorize'.format(session.API_HOST), - ) + assert flow_obj.build_url( + '/oauth2/authorize' + ) == 'https://{}/oauth2/authorize'.format(session.API_HOST) - self.assertEqual( - flow_obj.build_url('/oauth2/authorize', host=session.WEB_HOST), - 'https://{}/oauth2/authorize'.format(session.WEB_HOST), - ) + assert flow_obj.build_url( + '/oauth2/authorize', host=session.WEB_HOST + ) == 'https://{}/oauth2/authorize'.format(session.WEB_HOST) def test_bad_auth(self): # Test malformed token malformed_token_dbx = Dropbox(MALFORMED_TOKEN) - with self.assertRaises(BadInputError) as cm: + with pytest.raises(BadInputError) as cm: malformed_token_dbx.files_list_folder('') - self.assertIn('token is malformed', cm.exception.message) + assert 'token is malformed' in cm.value.message # Test reasonable-looking invalid token invalid_token_dbx = Dropbox(INVALID_TOKEN) - with self.assertRaises(AuthError) as cm: + with pytest.raises(AuthError) as cm: invalid_token_dbx.files_list_folder('') - self.assertTrue(cm.exception.error.is_invalid_access_token()) + assert cm.value.error.is_invalid_access_token() - @refresh_dbx_from_env - def test_refresh(self, dbx): - dbx.users_get_current_account() + def test_refresh(self, refresh_dbx_from_env): + refresh_dbx_from_env.users_get_current_account() - @dbx_app_auth_from_env - def test_app_auth(self, dbx_app_auth): - dbx_app_auth.check_app(query="hello world") + def test_app_auth(self, dbx_app_auth_from_env): + dbx_app_auth_from_env.check_app(query="hello world") - @refresh_dbx_from_env - def test_downscope(self, dbx): - dbx.users_get_current_account() - dbx.refresh_access_token(scope=['files.metadata.read']) - with self.assertRaises(AuthError): + def test_downscope(self, refresh_dbx_from_env): + refresh_dbx_from_env.users_get_current_account() + refresh_dbx_from_env.refresh_access_token(scope=['files.metadata.read']) + with pytest.raises(AuthError): # Should fail because downscoped to not include needed scope - dbx.users_get_current_account() + refresh_dbx_from_env.users_get_current_account() - @dbx_from_env - def test_rpc(self, dbx): - dbx.files_list_folder('') + def test_rpc(self, dbx_from_env): + dbx_from_env.files_list_folder('') # Test API error random_folder_path = '/' + \ ''.join(random.sample(string.ascii_letters, 15)) - with self.assertRaises(ApiError) as cm: - dbx.files_list_folder(random_folder_path) - self.assertIsInstance(cm.exception.error, ListFolderError) + with pytest.raises(ApiError) as cm: + dbx_from_env.files_list_folder(random_folder_path) + assert isinstance(cm.value.error, ListFolderError) - @dbx_from_env - def test_upload_download(self, dbx): + def test_upload_download(self, dbx_from_env): # Upload file timestamp = str(datetime.datetime.utcnow()) random_filename = ''.join(random.sample(string.ascii_letters, 15)) random_path = '/Test/%s/%s' % (timestamp, random_filename) test_contents = DUMMY_PAYLOAD - dbx.files_upload(test_contents, random_path) + dbx_from_env.files_upload(test_contents, random_path) # Download file - _, resp = dbx.files_download(random_path) - self.assertEqual(DUMMY_PAYLOAD, resp.content) + _, resp = dbx_from_env.files_download(random_path) + assert DUMMY_PAYLOAD == resp.content # Cleanup folder - dbx.files_delete('/Test/%s' % timestamp) + dbx_from_env.files_delete('/Test/%s' % timestamp) - @dbx_from_env - def test_bad_upload_types(self, dbx): - with self.assertRaises(TypeError): - dbx.files_upload(BytesIO(b'test'), '/Test') + def test_bad_upload_types(self, dbx_from_env): + with pytest.raises(TypeError): + dbx_from_env.files_upload(BytesIO(b'test'), '/Test') - @dbx_from_env - def test_clone_when_user_linked(self, dbx): - new_dbx = dbx.clone() - self.assertIsNot(dbx, new_dbx) - self.assertIsInstance(new_dbx, dbx.__class__) + def test_clone_when_user_linked(self, dbx_from_env): + new_dbx = dbx_from_env.clone() + assert dbx_from_env is not new_dbx + assert isinstance(new_dbx, dbx_from_env.__class__) - @dbx_from_env - def test_with_path_root_constructor(self, dbx): + def test_with_path_root_constructor(self, dbx_from_env): # Verify valid mode types for path_root in ( PathRoot.home, PathRoot.root("123"), PathRoot.namespace_id("123"), ): - dbx_new = dbx.with_path_root(path_root) - self.assertIsNot(dbx_new, dbx) + dbx_new = dbx_from_env.with_path_root(path_root) + assert dbx_new is not dbx_from_env expected = stone_serializers.json_encode(PathRoot_validator, path_root) - self.assertEqual(dbx_new._headers.get(PATH_ROOT_HEADER), expected) + assert dbx_new._headers.get(PATH_ROOT_HEADER) == expected # verify invalid mode raises ValueError - with self.assertRaises(ValueError): - dbx.with_path_root(None) + with pytest.raises(ValueError): + dbx_from_env.with_path_root(None) - @dbx_from_env - def test_path_root(self, dbx): - root_info = dbx.users_get_current_account().root_info + def test_path_root(self, dbx_from_env): + root_info = dbx_from_env.users_get_current_account().root_info root_ns = root_info.root_namespace_id home_ns = root_info.home_namespace_id # verify home mode - dbxpr = dbx.with_path_root(PathRoot.home) + dbxpr = dbx_from_env.with_path_root(PathRoot.home) dbxpr.files_list_folder('') # verify root mode - dbxpr = dbx.with_path_root(PathRoot.root(root_ns)) + dbxpr = dbx_from_env.with_path_root(PathRoot.root(root_ns)) dbxpr.files_list_folder('') # verify namespace_id mode - dbxpr = dbx.with_path_root(PathRoot.namespace_id(home_ns)) + dbxpr = dbx_from_env.with_path_root(PathRoot.namespace_id(home_ns)) dbxpr.files_list_folder('') - @dbx_from_env - def test_path_root_err(self, dbx): + def test_path_root_err(self, dbx_from_env): # verify invalid namespace return is_no_permission error - dbxpr = dbx.with_path_root(PathRoot.namespace_id("1234567890")) - with self.assertRaises(PathRootError) as cm: + dbxpr = dbx_from_env.with_path_root(PathRoot.namespace_id("1234567890")) + with pytest.raises(PathRootError) as cm: dbxpr.files_list_folder('') - self.assertTrue(cm.exception.error.is_no_permission()) + assert cm.value.error.is_no_permission() - dbxpr = dbx.with_path_root(PathRoot.root("1234567890")) - with self.assertRaises(PathRootError) as cm: + dbxpr = dbx_from_env.with_path_root(PathRoot.root("1234567890")) + with pytest.raises(PathRootError) as cm: dbxpr.files_list_folder('') - self.assertTrue(cm.exception.error.is_invalid_root()) + assert cm.value.error.is_invalid_root() - @dbx_from_env - def test_versioned_route(self, dbx): + def test_versioned_route(self, dbx_from_env): # Upload a test file path = '/test.txt' - dbx.files_upload(DUMMY_PAYLOAD, path) + dbx_from_env.files_upload(DUMMY_PAYLOAD, path) # Delete the file with v2 route - resp = dbx.files_delete_v2(path) + resp = dbx_from_env.files_delete_v2(path) # Verify response type is of v2 route - self.assertIsInstance(resp, DeleteResult) + assert isinstance(resp, DeleteResult) -class TestDropboxTeam(unittest.TestCase): - @dbx_team_from_env - def test_team(self, dbxt): - dbxt.team_groups_list() - r = dbxt.team_members_list() +@pytest.mark.usefixtures("dbx_team_from_env") +class TestDropboxTeam: + def test_team(self, dbx_team_from_env): + dbx_team_from_env.team_groups_list() + r = dbx_team_from_env.team_members_list() if r.members: # Only test assuming a member if there is a member team_member_id = r.members[0].profile.team_member_id - dbxt.as_user(team_member_id).files_list_folder('') + dbx_team_from_env.as_user(team_member_id).files_list_folder('') - @dbx_team_from_env - def test_as_user(self, dbxt): - dbx_as_user = dbxt.as_user('1') + def test_as_user(self, dbx_team_from_env): + dbx_as_user = dbx_team_from_env.as_user('1') path_root = PathRoot.root("123") dbx_new = dbx_as_user.with_path_root(path_root) - self.assertIsInstance(dbx_new, Dropbox) - self.assertEqual(dbx_new._headers.get(SELECT_USER_HEADER), '1') + assert isinstance(dbx_new, Dropbox) + assert dbx_new._headers.get(SELECT_USER_HEADER) == '1' expected = stone_serializers.json_encode(PathRoot_validator, path_root) - self.assertEqual(dbx_new._headers.get(PATH_ROOT_HEADER), expected) - - @dbx_team_from_env - def test_as_admin(self, dbxt): - dbx_as_admin = dbxt.as_admin('1') - self.assertIsInstance(dbx_as_admin, Dropbox) + assert dbx_new._headers.get(PATH_ROOT_HEADER) == expected - @dbx_team_from_env - def test_clone_when_team_linked(self, dbxt): - new_dbxt = dbxt.clone() - self.assertIsNot(dbxt, new_dbxt) - self.assertIsInstance(new_dbxt, dbxt.__class__) + def test_as_admin(self, dbx_team_from_env): + dbx_as_admin = dbx_team_from_env.as_admin('1') + assert isinstance(dbx_as_admin, Dropbox) -if __name__ == '__main__': - unittest.main() + def test_clone_when_team_linked(self, dbx_team_from_env): + new_dbxt = dbx_team_from_env.clone() + assert dbx_team_from_env is not new_dbxt + assert isinstance(new_dbxt, dbx_team_from_env.__class__) diff --git a/tox.ini b/tox.ini index c8fefaf2..472327b9 100644 --- a/tox.ini +++ b/tox.ini @@ -17,7 +17,7 @@ per-file-ignores = [testenv:test_integration] commands = - pytest test/integration/test_dropbox.py + pytest test/integration/ passenv = DROPBOX_REFRESH_TOKEN @@ -75,7 +75,7 @@ deps = [testenv:test_unit] commands = - pytest test/unit/test_dropbox_unit.py + pytest test/unit/ deps = -rtest/requirements.txt From d09e69c3de525739ef8feefd9904132425dcb53a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Jan 2021 12:22:13 -0800 Subject: [PATCH 17/90] Bump actions/setup-python from v2.1.4 to v2.2.1 (#306) Bumps [actions/setup-python](https://github.com/actions/setup-python) from v2.1.4 to v2.2.1. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v2.1.4...3105fb18c05ddd93efea5f9e0bef7a03a6e9e7df) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brad Rogers --- .github/workflows/ci.yml | 4 ++-- .github/workflows/coverage.yml | 2 +- .github/workflows/pypiupload.yml | 2 +- .github/workflows/spec_update.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84df31fc..1794e6b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup Python environment - uses: actions/setup-python@v2.1.4 + uses: actions/setup-python@v2.2.1 with: python-version: ${{ matrix.python-version }} - name: Install Requirements @@ -42,7 +42,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup Python environment - uses: actions/setup-python@v2.1.4 + uses: actions/setup-python@v2.2.1 with: python-version: '3.7' - name: Install Requirements diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 6ee679b4..36585f26 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup Python environment - uses: actions/setup-python@v2.1.4 + uses: actions/setup-python@v2.2.1 with: python-version: '3.7' - name: Install Requirements diff --git a/.github/workflows/pypiupload.yml b/.github/workflows/pypiupload.yml index 9e59b603..b13cfeb7 100644 --- a/.github/workflows/pypiupload.yml +++ b/.github/workflows/pypiupload.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Publish to PyPi - uses: actions/setup-python@v2.1.4 + uses: actions/setup-python@v2.2.1 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/spec_update.yml b/.github/workflows/spec_update.yml index e3437768..b2d2899a 100644 --- a/.github/workflows/spec_update.yml +++ b/.github/workflows/spec_update.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup Python environment - uses: actions/setup-python@v2.1.4 + uses: actions/setup-python@v2.2.1 with: python-version: 2.7 - name: Get current time From f8a7f0114fc0b96d0d69a969256c7045cb98d398 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Jan 2021 12:50:10 -0800 Subject: [PATCH 18/90] Bump codecov/codecov-action from v1.0.15 to v1.2.1 (#315) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.15 to v1.2.1. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v1.0.15...e156083f13aff6830c92fc5faa23505779fbf649) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 36585f26..27e9c623 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -28,7 +28,7 @@ jobs: coverage run --rcfile=.coveragerc -m pytest test/unit/test_dropbox_unit.py coverage xml - name: Publish Coverage - uses: codecov/codecov-action@v1.0.15 + uses: codecov/codecov-action@v1.2.1 with: flags: unit fail_ci_if_error: true \ No newline at end of file From e6cda9a611293b56faf8d0e11b648a322d500e48 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Mon, 25 Jan 2021 13:04:32 -0800 Subject: [PATCH 19/90] Automated Spec Update (#317) cce31b9a2e810b260c4f9fa6250030d00e968533 Change Notes: Files Namespace: - Update Comments - Update Legacy Scopes Shared Links Namespace: - Update Comments - Update Legacy Scopes Sharing Files Namespace: - Update Comments - Update Legacy Scopes Team Namespace: - Update Comments - Update Legacy Scopes Team Devices Namespace: - Update Comments - Update Legacy Scopes Team Linked Apps Namespace: - Update Comments - Update Legacy Scopes d5bb651e5b0236ccacd3860d6ce04508d7fd2c28 files namespace: Update comments team_legal_holds namespace: Update union LegalHoldsPolicyUpdateError team_log_generated namespce: Update union PolicyType Update comments Co-authored-by: Pranay Sowdaboina Co-authored-by: DropboxBot Co-authored-by: Pranay Sowdaboina Co-authored-by: Brad Rogers --- dropbox/base.py | 3 +- dropbox/base_team.py | 6 +- dropbox/files.py | 3 +- dropbox/team.py | 15 ++++ dropbox/team_log.py | 161 ++++++++++++++++++------------------------- spec | 2 +- 6 files changed, 90 insertions(+), 100 deletions(-) diff --git a/dropbox/base.py b/dropbox/base.py index 74d956b4..bfc3597e 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -2630,8 +2630,7 @@ def files_search_v2(self, be returned across pages. Some results may not be returned. :param str query: The string to search for. May match across multiple - fields based on the request arguments. Query string may be rewritten - to improve relevance of results. + fields based on the request arguments. :param Nullable[:class:`dropbox.files.SearchOptions`] options: Options for more targeted search results. :param Nullable[:class:`dropbox.files.SearchMatchFieldOptions`] diff --git a/dropbox/base_team.py b/dropbox/base_team.py index f0704cc8..7b44b034 100644 --- a/dropbox/base_team.py +++ b/dropbox/base_team.py @@ -1834,7 +1834,8 @@ def team_properties_template_add(self, def team_properties_template_get(self, template_id): """ - Permission : Team member file access. + Permission : Team member file access. The scope for the route is + files.team_metadata.write. :param str template_id: An identifier for template added by route See :meth:`team_templates_add_for_user` or @@ -1860,7 +1861,8 @@ def team_properties_template_get(self, def team_properties_template_list(self): """ - Permission : Team member file access. + Permission : Team member file access. The scope for the route is + files.team_metadata.write. :rtype: :class:`dropbox.team.ListTemplateResult` :raises: :class:`.exceptions.ApiError` diff --git a/dropbox/files.py b/dropbox/files.py index ffe28889..c81c6ad4 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -7205,8 +7205,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): class SearchV2Arg(bb.Struct): """ :ivar files.SearchV2Arg.query: The string to search for. May match across - multiple fields based on the request arguments. Query string may be - rewritten to improve relevance of results. + multiple fields based on the request arguments. :ivar files.SearchV2Arg.options: Options for more targeted search results. :ivar files.SearchV2Arg.match_field_options: Options for search results match fields. diff --git a/dropbox/team.py b/dropbox/team.py index 0ba5ad80..75e96ad9 100644 --- a/dropbox/team.py +++ b/dropbox/team.py @@ -5343,6 +5343,8 @@ class LegalHoldsPolicyUpdateError(LegalHoldsError): return true. To get the associated value of a tag (if one exists), use the corresponding ``get_*`` method. + :ivar team.LegalHoldsPolicyUpdateError.transient_error: Temporary + infrastructure failure, please retry. :ivar team.LegalHoldsPolicyUpdateError.inactive_legal_hold: Trying to release an inactive legal hold. :ivar @@ -5361,6 +5363,8 @@ class LegalHoldsPolicyUpdateError(LegalHoldsError): hold policy does not exist for ``LegalHoldsPolicyUpdateArg.id``. """ + # Attribute is overwritten below the class definition + transient_error = None # Attribute is overwritten below the class definition inactive_legal_hold = None # Attribute is overwritten below the class definition @@ -5376,6 +5380,14 @@ class LegalHoldsPolicyUpdateError(LegalHoldsError): # Attribute is overwritten below the class definition legal_hold_policy_not_found = None + def is_transient_error(self): + """ + Check if the union tag is ``transient_error``. + + :rtype: bool + """ + return self._tag == 'transient_error' + def is_inactive_legal_hold(self): """ Check if the union tag is ``inactive_legal_hold``. @@ -13743,6 +13755,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('members', LegalHoldsPolicyUpdateArg.members.validator), ] +LegalHoldsPolicyUpdateError._transient_error_validator = bv.Void() LegalHoldsPolicyUpdateError._inactive_legal_hold_validator = bv.Void() LegalHoldsPolicyUpdateError._legal_hold_performing_another_operation_validator = bv.Void() LegalHoldsPolicyUpdateError._invalid_members_validator = bv.Void() @@ -13751,6 +13764,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LegalHoldsPolicyUpdateError._name_must_be_unique_validator = bv.Void() LegalHoldsPolicyUpdateError._legal_hold_policy_not_found_validator = bv.Void() LegalHoldsPolicyUpdateError._tagmap = { + 'transient_error': LegalHoldsPolicyUpdateError._transient_error_validator, 'inactive_legal_hold': LegalHoldsPolicyUpdateError._inactive_legal_hold_validator, 'legal_hold_performing_another_operation': LegalHoldsPolicyUpdateError._legal_hold_performing_another_operation_validator, 'invalid_members': LegalHoldsPolicyUpdateError._invalid_members_validator, @@ -13761,6 +13775,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): } LegalHoldsPolicyUpdateError._tagmap.update(LegalHoldsError._tagmap) +LegalHoldsPolicyUpdateError.transient_error = LegalHoldsPolicyUpdateError('transient_error') LegalHoldsPolicyUpdateError.inactive_legal_hold = LegalHoldsPolicyUpdateError('inactive_legal_hold') LegalHoldsPolicyUpdateError.legal_hold_performing_another_operation = LegalHoldsPolicyUpdateError('legal_hold_performing_another_operation') LegalHoldsPolicyUpdateError.invalid_members = LegalHoldsPolicyUpdateError('invalid_members') diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 178b4f53..73f2267c 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -1737,10 +1737,8 @@ class AppLogInfo(bb.Struct): """ App's logged information. - :ivar team_log.AppLogInfo.app_id: App unique ID. Might be missing due to - historical data gap. - :ivar team_log.AppLogInfo.display_name: App display name. Might be missing - due to historical data gap. + :ivar team_log.AppLogInfo.app_id: App unique ID. + :ivar team_log.AppLogInfo.display_name: App display name. """ __slots__ = [ @@ -3998,11 +3996,11 @@ class DeviceSessionLogInfo(bb.Struct): Device's session logged information. :ivar team_log.DeviceSessionLogInfo.ip_address: The IP address of the last - activity from this session. Might be missing due to historical data gap. + activity from this session. :ivar team_log.DeviceSessionLogInfo.created: The time this session was - created. Might be missing due to historical data gap. + created. :ivar team_log.DeviceSessionLogInfo.updated: The time of the last activity - from this session. Might be missing due to historical data gap. + from this session. """ __slots__ = [ @@ -4046,7 +4044,7 @@ class DesktopDeviceSessionLogInfo(DeviceSessionLogInfo): Information about linked Dropbox desktop client sessions :ivar team_log.DesktopDeviceSessionLogInfo.session_info: Desktop session - unique id. Might be missing due to historical data gap. + unique id. :ivar team_log.DesktopDeviceSessionLogInfo.host_name: Name of the hosting desktop. :ivar team_log.DesktopDeviceSessionLogInfo.client_type: The Dropbox desktop @@ -4130,8 +4128,7 @@ class SessionLogInfo(bb.Struct): """ Session's logged information. - :ivar team_log.SessionLogInfo.session_id: Session ID. Might be missing due - to historical data gap. + :ivar team_log.SessionLogInfo.session_id: Session ID. """ __slots__ = [ @@ -4699,7 +4696,7 @@ class DeviceDeleteOnUnlinkFailDetails(bb.Struct): Failed to delete all files from unlinked device. :ivar team_log.DeviceDeleteOnUnlinkFailDetails.session_info: Session unique - id. Might be missing due to historical data gap. + id. :ivar team_log.DeviceDeleteOnUnlinkFailDetails.display_name: The device name. Might be missing due to historical data gap. :ivar team_log.DeviceDeleteOnUnlinkFailDetails.num_failures: The number of @@ -4769,7 +4766,7 @@ class DeviceDeleteOnUnlinkSuccessDetails(bb.Struct): Deleted all files from unlinked device. :ivar team_log.DeviceDeleteOnUnlinkSuccessDetails.session_info: Session - unique id. Might be missing due to historical data gap. + unique id. :ivar team_log.DeviceDeleteOnUnlinkSuccessDetails.display_name: The device name. Might be missing due to historical data gap. """ @@ -41305,7 +41302,7 @@ class FailureDetailsLogInfo(bb.Struct): Provides details about a failure :ivar team_log.FailureDetailsLogInfo.user_friendly_message: A user friendly - explanation of the error. Might be missing due to historical data gap. + explanation of the error. :ivar team_log.FailureDetailsLogInfo.technical_error_message: A technical explanation of the error. This is relevant for some errors. """ @@ -41691,8 +41688,7 @@ class FileAddCommentDetails(bb.Struct): """ Added file comment. - :ivar team_log.FileAddCommentDetails.comment_text: Comment text. Might be - missing due to historical data gap. + :ivar team_log.FileAddCommentDetails.comment_text: Comment text. """ __slots__ = [ @@ -42044,8 +42040,7 @@ class FileDeleteCommentDetails(bb.Struct): """ Deleted file comment. - :ivar team_log.FileDeleteCommentDetails.comment_text: Comment text. Might be - missing due to historical data gap. + :ivar team_log.FileDeleteCommentDetails.comment_text: Comment text. """ __slots__ = [ @@ -42174,8 +42169,7 @@ class FileEditCommentDetails(bb.Struct): """ Edited file comment. - :ivar team_log.FileEditCommentDetails.comment_text: Comment text. Might be - missing due to historical data gap. + :ivar team_log.FileEditCommentDetails.comment_text: Comment text. :ivar team_log.FileEditCommentDetails.previous_comment_text: Previous comment text. """ @@ -42314,8 +42308,7 @@ class FileLikeCommentDetails(bb.Struct): """ Liked file comment. - :ivar team_log.FileLikeCommentDetails.comment_text: Comment text. Might be - missing due to historical data gap. + :ivar team_log.FileLikeCommentDetails.comment_text: Comment text. """ __slots__ = [ @@ -42485,10 +42478,8 @@ class FileOrFolderLogInfo(bb.Struct): Generic information relevant both for files and folders :ivar team_log.FileOrFolderLogInfo.path: Path relative to event context. - :ivar team_log.FileOrFolderLogInfo.display_name: Display name. Might be - missing due to historical data gap. - :ivar team_log.FileOrFolderLogInfo.file_id: Unique ID. Might be missing due - to historical data gap. + :ivar team_log.FileOrFolderLogInfo.display_name: Display name. + :ivar team_log.FileOrFolderLogInfo.file_id: Unique ID. :ivar team_log.FileOrFolderLogInfo.file_size: File or folder size in bytes. """ @@ -42938,8 +42929,7 @@ class FileRequestDeadline(bb.Struct): :ivar team_log.FileRequestDeadline.deadline: The deadline for this file request. Might be missing due to historical data gap. :ivar team_log.FileRequestDeadline.allow_late_uploads: If set, allow uploads - after the deadline has passed. Might be missing due to historical data - gap. + after the deadline has passed. """ __slots__ = [ @@ -43036,8 +43026,7 @@ class FileRequestDetails(bb.Struct): :ivar team_log.FileRequestDetails.asset_index: Asset position in the Assets list. - :ivar team_log.FileRequestDetails.deadline: File request deadline. Might be - missing due to historical data gap. + :ivar team_log.FileRequestDetails.deadline: File request deadline. """ __slots__ = [ @@ -43079,9 +43068,9 @@ class FileRequestReceiveFileDetails(bb.Struct): :ivar team_log.FileRequestReceiveFileDetails.submitted_file_names: Submitted file names. :ivar team_log.FileRequestReceiveFileDetails.submitter_name: The name as - provided by the submitter. Might be missing due to historical data gap. + provided by the submitter. :ivar team_log.FileRequestReceiveFileDetails.submitter_email: The email as - provided by the submitter. Might be missing due to historical data gap. + provided by the submitter. """ __slots__ = [ @@ -43348,8 +43337,7 @@ class FileResolveCommentDetails(bb.Struct): """ Resolved file comment. - :ivar team_log.FileResolveCommentDetails.comment_text: Comment text. Might - be missing due to historical data gap. + :ivar team_log.FileResolveCommentDetails.comment_text: Comment text. """ __slots__ = [ @@ -43923,8 +43911,7 @@ class FileUnlikeCommentDetails(bb.Struct): """ Unliked file comment. - :ivar team_log.FileUnlikeCommentDetails.comment_text: Comment text. Might be - missing due to historical data gap. + :ivar team_log.FileUnlikeCommentDetails.comment_text: Comment text. """ __slots__ = [ @@ -43973,8 +43960,7 @@ class FileUnresolveCommentDetails(bb.Struct): """ Unresolved file comment. - :ivar team_log.FileUnresolveCommentDetails.comment_text: Comment text. Might - be missing due to historical data gap. + :ivar team_log.FileUnresolveCommentDetails.comment_text: Comment text. """ __slots__ = [ @@ -45861,7 +45847,7 @@ class GroupCreateDetails(bb.Struct): Created group. :ivar team_log.GroupCreateDetails.is_company_managed: Is company managed - group. Might be missing due to historical data gap. + group. :ivar team_log.GroupCreateDetails.join_policy: Group join policy. """ @@ -45920,7 +45906,7 @@ class GroupDeleteDetails(bb.Struct): Deleted group. :ivar team_log.GroupDeleteDetails.is_company_managed: Is company managed - group. Might be missing due to historical data gap. + group. """ __slots__ = [ @@ -46054,7 +46040,7 @@ class GroupJoinPolicyUpdatedDetails(bb.Struct): Updated group join policy. :ivar team_log.GroupJoinPolicyUpdatedDetails.is_company_managed: Is company - managed group. Might be missing due to historical data gap. + managed group. :ivar team_log.GroupJoinPolicyUpdatedDetails.join_policy: Group join policy. """ @@ -46112,11 +46098,9 @@ class GroupLogInfo(bb.Struct): """ Group's logged information. - :ivar team_log.GroupLogInfo.group_id: The unique id of this group. Might be - missing due to historical data gap. + :ivar team_log.GroupLogInfo.group_id: The unique id of this group. :ivar team_log.GroupLogInfo.display_name: The name of this group. - :ivar team_log.GroupLogInfo.external_id: External group ID. Might be missing - due to historical data gap. + :ivar team_log.GroupLogInfo.external_id: External group ID. """ __slots__ = [ @@ -47062,7 +47046,6 @@ class LegacyDeviceSessionLogInfo(DeviceSessionLogInfo): Information on sessions, in legacy format :ivar team_log.LegacyDeviceSessionLogInfo.session_info: Session unique id. - Might be missing due to historical data gap. :ivar team_log.LegacyDeviceSessionLogInfo.display_name: The device name. Might be missing due to historical data gap. :ivar team_log.LegacyDeviceSessionLogInfo.is_emm_managed: Is device managed @@ -50285,7 +50268,7 @@ class MobileDeviceSessionLogInfo(DeviceSessionLogInfo): Information about linked Dropbox mobile client sessions :ivar team_log.MobileDeviceSessionLogInfo.session_info: Mobile session - unique id. Might be missing due to historical data gap. + unique id. :ivar team_log.MobileDeviceSessionLogInfo.device_name: The device name. :ivar team_log.MobileDeviceSessionLogInfo.client_type: The mobile application type. @@ -50386,13 +50369,11 @@ class NamespaceRelativePathLogInfo(bb.Struct): """ Namespace relative path details. - :ivar team_log.NamespaceRelativePathLogInfo.ns_id: Namespace ID. Might be - missing due to historical data gap. + :ivar team_log.NamespaceRelativePathLogInfo.ns_id: Namespace ID. :ivar team_log.NamespaceRelativePathLogInfo.relative_path: A path relative - to the specified namespace ID. Might be missing due to historical data - gap. + to the specified namespace ID. :ivar team_log.NamespaceRelativePathLogInfo.is_shared_namespace: True if the - namespace is shared. Might be missing due to historical data gap. + namespace is shared. """ __slots__ = [ @@ -50871,12 +50852,9 @@ class UserLogInfo(bb.Struct): """ User's logged information. - :ivar team_log.UserLogInfo.account_id: User unique ID. Might be missing due - to historical data gap. - :ivar team_log.UserLogInfo.display_name: User display name. Might be missing - due to historical data gap. - :ivar team_log.UserLogInfo.email: User email address. Might be missing due - to historical data gap. + :ivar team_log.UserLogInfo.account_id: User unique ID. + :ivar team_log.UserLogInfo.display_name: User display name. + :ivar team_log.UserLogInfo.email: User email address. """ __slots__ = [ @@ -52443,8 +52421,7 @@ class PaperDocAddCommentDetails(bb.Struct): :ivar team_log.PaperDocAddCommentDetails.event_uuid: Event unique identifier. - :ivar team_log.PaperDocAddCommentDetails.comment_text: Comment text. Might - be missing due to historical data gap. + :ivar team_log.PaperDocAddCommentDetails.comment_text: Comment text. """ __slots__ = [ @@ -52564,10 +52541,9 @@ class PaperDocChangeSharingPolicyDetails(bb.Struct): :ivar team_log.PaperDocChangeSharingPolicyDetails.event_uuid: Event unique identifier. :ivar team_log.PaperDocChangeSharingPolicyDetails.public_sharing_policy: - Sharing policy with external users. Might be missing due to historical - data gap. + Sharing policy with external users. :ivar team_log.PaperDocChangeSharingPolicyDetails.team_sharing_policy: - Sharing policy with team. Might be missing due to historical data gap. + Sharing policy with team. """ __slots__ = [ @@ -52707,7 +52683,6 @@ class PaperDocDeleteCommentDetails(bb.Struct): :ivar team_log.PaperDocDeleteCommentDetails.event_uuid: Event unique identifier. :ivar team_log.PaperDocDeleteCommentDetails.comment_text: Comment text. - Might be missing due to historical data gap. """ __slots__ = [ @@ -52874,8 +52849,7 @@ class PaperDocEditCommentDetails(bb.Struct): :ivar team_log.PaperDocEditCommentDetails.event_uuid: Event unique identifier. - :ivar team_log.PaperDocEditCommentDetails.comment_text: Comment text. Might - be missing due to historical data gap. + :ivar team_log.PaperDocEditCommentDetails.comment_text: Comment text. """ __slots__ = [ @@ -53201,7 +53175,6 @@ class PaperDocResolveCommentDetails(bb.Struct): :ivar team_log.PaperDocResolveCommentDetails.event_uuid: Event unique identifier. :ivar team_log.PaperDocResolveCommentDetails.comment_text: Comment text. - Might be missing due to historical data gap. """ __slots__ = [ @@ -53459,7 +53432,6 @@ class PaperDocUnresolveCommentDetails(bb.Struct): :ivar team_log.PaperDocUnresolveCommentDetails.event_uuid: Event unique identifier. :ivar team_log.PaperDocUnresolveCommentDetails.comment_text: Comment text. - Might be missing due to historical data gap. """ __slots__ = [ @@ -54807,7 +54779,7 @@ class PathLogInfo(bb.Struct): Path's details. :ivar team_log.PathLogInfo.contextual: Fully qualified path relative to - event's context. Might be missing due to historical data gap. + event's context. :ivar team_log.PathLogInfo.namespace_relative: Path relative to the namespace containing the content. """ @@ -55024,10 +54996,20 @@ class PolicyType(bb.Union): _catch_all = 'other' # Attribute is overwritten below the class definition + disposition = None + # Attribute is overwritten below the class definition retention = None # Attribute is overwritten below the class definition other = None + def is_disposition(self): + """ + Check if the union tag is ``disposition``. + + :rtype: bool + """ + return self._tag == 'disposition' + def is_retention(self): """ Check if the union tag is ``retention``. @@ -56200,7 +56182,6 @@ class SfAddGroupDetails(bb.Struct): :ivar team_log.SfAddGroupDetails.original_folder_name: Original shared folder name. :ivar team_log.SfAddGroupDetails.sharing_permission: Sharing permission. - Might be missing due to historical data gap. :ivar team_log.SfAddGroupDetails.team_name: Team name. """ @@ -56280,7 +56261,7 @@ class SfAllowNonMembersToViewSharedLinksDetails(bb.Struct): team_log.SfAllowNonMembersToViewSharedLinksDetails.original_folder_name: Original shared folder name. :ivar team_log.SfAllowNonMembersToViewSharedLinksDetails.shared_folder_type: - Shared folder type. Might be missing due to historical data gap. + Shared folder type. """ __slots__ = [ @@ -56350,10 +56331,9 @@ class SfExternalInviteWarnDetails(bb.Struct): :ivar team_log.SfExternalInviteWarnDetails.original_folder_name: Original shared folder name. :ivar team_log.SfExternalInviteWarnDetails.new_sharing_permission: New - sharing permission. Might be missing due to historical data gap. + sharing permission. :ivar team_log.SfExternalInviteWarnDetails.previous_sharing_permission: - Previous sharing permission. Might be missing due to historical data - gap. + Previous sharing permission. """ __slots__ = [ @@ -56431,10 +56411,9 @@ class SfFbInviteChangeRoleDetails(bb.Struct): :ivar team_log.SfFbInviteChangeRoleDetails.original_folder_name: Original shared folder name. :ivar team_log.SfFbInviteChangeRoleDetails.previous_sharing_permission: - Previous sharing permission. Might be missing due to historical data - gap. + Previous sharing permission. :ivar team_log.SfFbInviteChangeRoleDetails.new_sharing_permission: New - sharing permission. Might be missing due to historical data gap. + sharing permission. """ __slots__ = [ @@ -56512,7 +56491,6 @@ class SfFbInviteDetails(bb.Struct): :ivar team_log.SfFbInviteDetails.original_folder_name: Original shared folder name. :ivar team_log.SfFbInviteDetails.sharing_permission: Sharing permission. - Might be missing due to historical data gap. """ __slots__ = [ @@ -56752,10 +56730,9 @@ class SfTeamInviteChangeRoleDetails(bb.Struct): :ivar team_log.SfTeamInviteChangeRoleDetails.original_folder_name: Original shared folder name. :ivar team_log.SfTeamInviteChangeRoleDetails.new_sharing_permission: New - sharing permission. Might be missing due to historical data gap. + sharing permission. :ivar team_log.SfTeamInviteChangeRoleDetails.previous_sharing_permission: - Previous sharing permission. Might be missing due to historical data - gap. + Previous sharing permission. """ __slots__ = [ @@ -56833,7 +56810,6 @@ class SfTeamInviteDetails(bb.Struct): :ivar team_log.SfTeamInviteDetails.original_folder_name: Original shared folder name. :ivar team_log.SfTeamInviteDetails.sharing_permission: Sharing permission. - Might be missing due to historical data gap. """ __slots__ = [ @@ -56943,7 +56919,7 @@ class SfTeamJoinFromOobLinkDetails(bb.Struct): :ivar team_log.SfTeamJoinFromOobLinkDetails.token_key: Shared link token key. :ivar team_log.SfTeamJoinFromOobLinkDetails.sharing_permission: Sharing - permission. Might be missing due to historical data gap. + permission. """ __slots__ = [ @@ -57654,7 +57630,7 @@ class SharedContentChangeViewerInfoPolicyDetails(bb.Struct): :ivar team_log.SharedContentChangeViewerInfoPolicyDetails.new_value: New viewer info policy. :ivar team_log.SharedContentChangeViewerInfoPolicyDetails.previous_value: - Previous view info policy. Might be missing due to historical data gap. + Previous view info policy. """ __slots__ = [ @@ -58660,7 +58636,6 @@ class SharedFolderCreateDetails(bb.Struct): Created shared folder. :ivar team_log.SharedFolderCreateDetails.target_ns_id: Target namespace ID. - Might be missing due to historical data gap. """ __slots__ = [ @@ -58836,13 +58811,12 @@ class SharedFolderNestDetails(bb.Struct): Changed parent of shared folder. :ivar team_log.SharedFolderNestDetails.previous_parent_ns_id: Previous - parent namespace ID. Might be missing due to historical data gap. + parent namespace ID. :ivar team_log.SharedFolderNestDetails.new_parent_ns_id: New parent - namespace ID. Might be missing due to historical data gap. + namespace ID. :ivar team_log.SharedFolderNestDetails.previous_ns_path: Previous namespace - path. Might be missing due to historical data gap. + path. :ivar team_log.SharedFolderNestDetails.new_ns_path: New namespace path. - Might be missing due to historical data gap. """ __slots__ = [ @@ -63020,7 +62994,7 @@ class SsoAddLogoutUrlDetails(bb.Struct): Added sign-out URL for SSO. :ivar team_log.SsoAddLogoutUrlDetails.new_value: New single sign-on logout - URL. Might be missing due to historical data gap. + URL. """ __slots__ = [ @@ -63192,7 +63166,7 @@ class SsoChangeLogoutUrlDetails(bb.Struct): :ivar team_log.SsoChangeLogoutUrlDetails.previous_value: Previous single sign-on logout URL. Might be missing due to historical data gap. :ivar team_log.SsoChangeLogoutUrlDetails.new_value: New single sign-on - logout URL. Might be missing due to historical data gap. + logout URL. """ __slots__ = [ @@ -64415,8 +64389,7 @@ class TeamMemberLogInfo(UserLogInfo): """ Team member's logged information. - :ivar team_log.TeamMemberLogInfo.team_member_id: Team member ID. Might be - missing due to historical data gap. + :ivar team_log.TeamMemberLogInfo.team_member_id: Team member ID. :ivar team_log.TeamMemberLogInfo.member_external_id: Team member external ID. :ivar team_log.TeamMemberLogInfo.team: Details about this user’s team @@ -67802,7 +67775,6 @@ class WebDeviceSessionLogInfo(DeviceSessionLogInfo): Information on active web sessions :ivar team_log.WebDeviceSessionLogInfo.session_info: Web session unique id. - Might be missing due to historical data gap. :ivar team_log.WebDeviceSessionLogInfo.user_agent: Information on the hosting device. :ivar team_log.WebDeviceSessionLogInfo.os: Information on the hosting @@ -76109,13 +76081,16 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PlacementRestriction.none = PlacementRestriction('none') PlacementRestriction.other = PlacementRestriction('other') +PolicyType._disposition_validator = bv.Void() PolicyType._retention_validator = bv.Void() PolicyType._other_validator = bv.Void() PolicyType._tagmap = { + 'disposition': PolicyType._disposition_validator, 'retention': PolicyType._retention_validator, 'other': PolicyType._other_validator, } +PolicyType.disposition = PolicyType('disposition') PolicyType.retention = PolicyType('retention') PolicyType.other = PolicyType('other') diff --git a/spec b/spec index 8f960cb6..cce31b9a 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 8f960cb69b5209b30f0007a95da4d7486c1a58d4 +Subproject commit cce31b9a2e810b260c4f9fa6250030d00e968533 From 6afe7d8e5b00e6200f4d744550c3eeb8c9e9267b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Jan 2021 12:27:17 -0800 Subject: [PATCH 20/90] Bump peter-evans/create-pull-request from v3.5.1 to v3.7.0 (#318) Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from v3.5.1 to v3.7.0. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v3.5.1...2455e1596942c2902952003bbb574afbbe2ab2e6) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/spec_update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spec_update.yml b/.github/workflows/spec_update.yml index b2d2899a..eb27f234 100644 --- a/.github/workflows/spec_update.yml +++ b/.github/workflows/spec_update.yml @@ -54,7 +54,7 @@ jobs: pip install -r requirements.txt python generate_base_client.py - name: Create Pull Request - uses: peter-evans/create-pull-request@v3.5.1 + uses: peter-evans/create-pull-request@v3.7.0 if: steps.git-diff-num.outputs.num-diff != 0 with: token: ${{ secrets.SPEC_UPDATE_TOKEN }} From 472ba20b76c946a9034aa39bf575471994ce57a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Feb 2021 10:11:52 -0800 Subject: [PATCH 21/90] Bump peter-evans/create-pull-request from v3.7.0 to v3.8.2 (#322) Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from v3.7.0 to v3.8.2. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v3.7.0...052fc72b4198ba9fbc81b818c6e1859f747d49a8) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/spec_update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spec_update.yml b/.github/workflows/spec_update.yml index eb27f234..d8de3fc6 100644 --- a/.github/workflows/spec_update.yml +++ b/.github/workflows/spec_update.yml @@ -54,7 +54,7 @@ jobs: pip install -r requirements.txt python generate_base_client.py - name: Create Pull Request - uses: peter-evans/create-pull-request@v3.7.0 + uses: peter-evans/create-pull-request@v3.8.2 if: steps.git-diff-num.outputs.num-diff != 0 with: token: ${{ secrets.SPEC_UPDATE_TOKEN }} From 250b116f77b8f22351c1e2e0eb625d0d19f86f2c Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 10 Feb 2021 11:16:06 -0800 Subject: [PATCH 22/90] Automated Spec Update (#323) 0ba804f8549058d48474fb9f77638a2ee3889993 Change Notes: Files Namespace: - Update ExportInfo struct to include export_options - Update ExportError union to include invalid_export_format - Update ExportArg struct to include export_format - Update ExportMetadata to include paper_revision - Update GetTemporaryLinkError union to include not_allowed - Update Comments Team Log Generated Namespace: - Add RecipicientsConfiguration, ObjectLabelAddedDetails, ObjectLabelRemoveDetails, ObjectLabelUpdatedValueDetails, ObjectLabelAddedType, ObjectLabelRemoved, and ObjectLabelUpdatedValue structs - Add AlertRecipientsSettingType, AdminAlertingAlertSensitivity, and LabelType unions - Update AdminAlertSeverityEnum to include sensitivity_level and recipients_settings - Update PlacementRestriction union to include uk_only - Update EventDetails union to include object_label_added_details, object_label_removed_details and object_label_updated_value_details - Update EventType union to include object_label_added, object_label_removed and object_label_updated_value - Update EventTypeArg union to include object_label_added, object_label_removed, and object_label_updated_value - Update Examples Co-authored-by: DropboxBot --- dropbox/base.py | 66 ++-- dropbox/files.py | 106 +++++- dropbox/team_log.py | 775 +++++++++++++++++++++++++++++++++++++++++++- spec | 2 +- 4 files changed, 908 insertions(+), 41 deletions(-) diff --git a/dropbox/base.py b/dropbox/base.py index bfc3597e..a660fcdd 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -1372,13 +1372,19 @@ def files_download_zip_to_file(self, return r[0] def files_export(self, - path): + path, + export_format=None): """ Export a file from a user's Dropbox. This route only supports exporting files that cannot be downloaded directly and whose ``ExportResult.file_metadata`` has ``ExportInfo.export_as`` populated. :param str path: The path of the file to be exported. + :param Nullable[str] export_format: The file format to which the file + should be exported. This must be one of the formats listed in the + file's export_options returned by :meth:`files_get_metadata`. If + none is specified, the default format (specified in export_as in + file metadata) will be used. :rtype: (:class:`dropbox.files.ExportResult`, :class:`requests.models.Response`) :raises: :class:`.exceptions.ApiError` @@ -1392,7 +1398,8 @@ def files_export(self, `_ context manager to ensure this. """ - arg = files.ExportArg(path) + arg = files.ExportArg(path, + export_format) r = self.request( files.export, 'files', @@ -1403,7 +1410,8 @@ def files_export(self, def files_export_to_file(self, download_path, - path): + path, + export_format=None): """ Export a file from a user's Dropbox. This route only supports exporting files that cannot be downloaded directly and whose @@ -1411,13 +1419,19 @@ def files_export_to_file(self, :param str download_path: Path on local machine to save file. :param str path: The path of the file to be exported. + :param Nullable[str] export_format: The file format to which the file + should be exported. This must be one of the formats listed in the + file's export_options returned by :meth:`files_get_metadata`. If + none is specified, the default format (specified in export_as in + file metadata) will be used. :rtype: :class:`dropbox.files.ExportResult` :raises: :class:`.exceptions.ApiError` If this raises, ApiError will contain: :class:`dropbox.files.ExportError` """ - arg = files.ExportArg(path) + arg = files.ExportArg(path, + export_format) r = self.request( files.export, 'files', @@ -1647,9 +1661,9 @@ def files_get_thumbnail(self, mode=files.ThumbnailMode.strict): """ 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. + the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm + 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 @@ -1694,9 +1708,9 @@ def files_get_thumbnail_to_file(self, mode=files.ThumbnailMode.strict): """ 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. + the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm + 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. @@ -1734,7 +1748,10 @@ def files_get_thumbnail_v2(self, size=files.ThumbnailSize.w64h64, mode=files.ThumbnailMode.strict): """ - Get a thumbnail for a file. + Get a thumbnail for an image. This method currently supports files with + the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm + and bmp. Photos that are larger than 20MB in size won't be converted to + a thumbnail. :param resource: Information specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a @@ -1781,7 +1798,10 @@ def files_get_thumbnail_to_file_v2(self, size=files.ThumbnailSize.w64h64, mode=files.ThumbnailMode.strict): """ - Get a thumbnail for a file. + Get a thumbnail for an image. This method currently supports files with + the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm + 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 resource: Information specifying which file to preview. This @@ -1821,8 +1841,9 @@ def files_get_thumbnail_batch(self, """ 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. + file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. + Photos that are larger than 20MB in size won't be converted to a + thumbnail. :param List[:class:`dropbox.files.ThumbnailArg`] entries: List of files to get thumbnails. @@ -2826,7 +2847,7 @@ def files_upload_session_append(self, :param bytes f: Contents to upload. :param str session_id: The upload session ID (returned by :meth:`files_upload_session_start`). - :param int offset: The amount of data that has been uploaded so far. We + :param int offset: Offset in bytes at which data should be appended. We use this to make sure upload data isn't lost or duplicated in the event of a network error. :rtype: None @@ -2958,15 +2979,14 @@ def files_upload_session_start(self, :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. The maximum size of a file one can upload to an upload session is 350 GB. An - upload session can be used for a maximum of 48 hours. Attempting to use - an ``UploadSessionStartResult.session_id`` with + upload session can be used for a maximum of 7 days. 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``. Calls to - this endpoint will count as data transport calls for any Dropbox - Business teams with a limit on the number of data transport calls - allowed per month. For more information, see the `Data transport limit - page + :meth:`files_upload_session_finish` more than 7 days after its creation + will return a ``UploadSessionLookupError.not_found``. Calls to this + endpoint will count as data transport calls for any Dropbox Business + teams with a limit on the number of data transport calls allowed per + month. For more information, see the `Data transport limit page `_. By default, upload sessions require you to send content of the file in sequential order via consecutive :meth:`files_upload_session_start`, diff --git a/dropbox/files.py b/dropbox/files.py index c81c6ad4..8b8e472c 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -1785,23 +1785,37 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): class ExportArg(bb.Struct): """ :ivar files.ExportArg.path: The path of the file to be exported. + :ivar files.ExportArg.export_format: The file format to which the file + should be exported. This must be one of the formats listed in the file's + export_options returned by + :meth:`dropbox.dropbox_client.Dropbox.files_get_metadata`. If none is + specified, the default format (specified in export_as in file metadata) + will be used. """ __slots__ = [ '_path_value', + '_export_format_value', ] _has_required_fields = True def __init__(self, - path=None): + path=None, + export_format=None): self._path_value = bb.NOT_SET + self._export_format_value = bb.NOT_SET if path is not None: self.path = path + if export_format is not None: + self.export_format = export_format # Instance attribute type: str (validator is set below) path = bb.Attribute("path") + # Instance attribute type: str (validator is set below) + export_format = bb.Attribute("export_format", nullable=True) + def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExportArg, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -1815,6 +1829,8 @@ class ExportError(bb.Union): :ivar files.ExportError.non_exportable: This file type cannot be exported. Use :meth:`dropbox.dropbox_client.Dropbox.files_download` instead. + :ivar files.ExportError.invalid_export_format: The specified export format + is not a valid option for this file type. :ivar files.ExportError.retry_error: The exportable content is not yet available. Please retry later. """ @@ -1823,6 +1839,8 @@ class ExportError(bb.Union): # Attribute is overwritten below the class definition non_exportable = None # Attribute is overwritten below the class definition + invalid_export_format = None + # Attribute is overwritten below the class definition retry_error = None # Attribute is overwritten below the class definition other = None @@ -1854,6 +1872,14 @@ def is_non_exportable(self): """ return self._tag == 'non_exportable' + def is_invalid_export_format(self): + """ + Check if the union tag is ``invalid_export_format``. + + :rtype: bool + """ + return self._tag == 'invalid_export_format' + def is_retry_error(self): """ Check if the union tag is ``retry_error``. @@ -1891,23 +1917,34 @@ class ExportInfo(bb.Struct): :ivar files.ExportInfo.export_as: Format to which the file can be exported to. + :ivar files.ExportInfo.export_options: Additional formats to which the file + can be exported. These values can be specified as the export_format in + /files/export. """ __slots__ = [ '_export_as_value', + '_export_options_value', ] _has_required_fields = False def __init__(self, - export_as=None): + export_as=None, + export_options=None): self._export_as_value = bb.NOT_SET + self._export_options_value = bb.NOT_SET if export_as is not None: self.export_as = export_as + if export_options is not None: + self.export_options = export_options # Instance attribute type: str (validator is set below) export_as = bb.Attribute("export_as", nullable=True) + # Instance attribute type: list of [str] (validator is set below) + export_options = bb.Attribute("export_options", nullable=True) + def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExportInfo, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -1922,12 +1959,15 @@ class ExportMetadata(bb.Struct): content. This field can be used to verify data integrity. Similar to content hash. For more information see our `Content hash `_ page. + :ivar files.ExportMetadata.paper_revision: If the file is a Paper doc, this + gives the latest doc revision. """ __slots__ = [ '_name_value', '_size_value', '_export_hash_value', + '_paper_revision_value', ] _has_required_fields = True @@ -1935,16 +1975,20 @@ class ExportMetadata(bb.Struct): def __init__(self, name=None, size=None, - export_hash=None): + export_hash=None, + paper_revision=None): self._name_value = bb.NOT_SET self._size_value = bb.NOT_SET self._export_hash_value = bb.NOT_SET + self._paper_revision_value = bb.NOT_SET if name is not None: self.name = name if size is not None: self.size = size if export_hash is not None: self.export_hash = export_hash + if paper_revision is not None: + self.paper_revision = paper_revision # Instance attribute type: str (validator is set below) name = bb.Attribute("name") @@ -1955,6 +1999,9 @@ def __init__(self, # Instance attribute type: str (validator is set below) export_hash = bb.Attribute("export_hash", nullable=True) + # Instance attribute type: int (validator is set below) + paper_revision = bb.Attribute("paper_revision", nullable=True) + def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExportMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -2864,6 +2911,10 @@ class GetTemporaryLinkError(bb.Union): :ivar files.GetTemporaryLinkError.unsupported_file: Cannot get temporary link to this file type; use :meth:`dropbox.dropbox_client.Dropbox.files_export` instead. + :ivar files.GetTemporaryLinkError.not_allowed: The user is not allowed to + request a temporary link to the specified file. For example, this can + occur if the file is restricted or if the user's links are `banned + `_. """ _catch_all = 'other' @@ -2872,6 +2923,8 @@ class GetTemporaryLinkError(bb.Union): # Attribute is overwritten below the class definition unsupported_file = None # Attribute is overwritten below the class definition + not_allowed = None + # Attribute is overwritten below the class definition other = None @classmethod @@ -2909,6 +2962,14 @@ def is_unsupported_file(self): """ return self._tag == 'unsupported_file' + def is_not_allowed(self): + """ + Check if the union tag is ``not_allowed``. + + :rtype: bool + """ + return self._tag == 'not_allowed' + def is_other(self): """ Check if the union tag is ``other``. @@ -8389,8 +8450,8 @@ class UploadSessionCursor(bb.Struct): """ :ivar files.UploadSessionCursor.session_id: The upload session ID (returned by :meth:`dropbox.dropbox_client.Dropbox.files_upload_session_start`). - :ivar files.UploadSessionCursor.offset: The amount of data that has been - uploaded so far. We use this to make sure upload data isn't lost or + :ivar files.UploadSessionCursor.offset: Offset in bytes at which data should + be appended. We use this to make sure upload data isn't lost or duplicated in the event of a network error. """ @@ -8889,7 +8950,7 @@ class UploadSessionLookupError(bb.Union): corresponding ``get_*`` method. :ivar files.UploadSessionLookupError.not_found: The upload session ID was - not found or has expired. Upload sessions are valid for 48 hours. + not found or has expired. Upload sessions are valid for 7 days. :ivar UploadSessionOffsetError UploadSessionLookupError.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 @@ -9169,7 +9230,7 @@ class UploadSessionType(bb.Union): return true. To get the associated value of a tag (if one exists), use the corresponding ``get_*`` method. - :ivar files.UploadSessionType.sequential: Pieces of content are uploaded + :ivar files.UploadSessionType.sequential: Pieces of data are uploaded sequentially one after another. This is the default behavior. :ivar files.UploadSessionType.concurrent: Pieces of data can be uploaded in concurrent RPCs in any order. @@ -9975,40 +10036,60 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DownloadZipResult._all_fields_ = [('metadata', DownloadZipResult.metadata.validator)] ExportArg.path.validator = ReadPath_validator -ExportArg._all_field_names_ = set(['path']) -ExportArg._all_fields_ = [('path', ExportArg.path.validator)] +ExportArg.export_format.validator = bv.Nullable(bv.String()) +ExportArg._all_field_names_ = set([ + 'path', + 'export_format', +]) +ExportArg._all_fields_ = [ + ('path', ExportArg.path.validator), + ('export_format', ExportArg.export_format.validator), +] ExportError._path_validator = LookupError_validator ExportError._non_exportable_validator = bv.Void() +ExportError._invalid_export_format_validator = bv.Void() ExportError._retry_error_validator = bv.Void() ExportError._other_validator = bv.Void() ExportError._tagmap = { 'path': ExportError._path_validator, 'non_exportable': ExportError._non_exportable_validator, + 'invalid_export_format': ExportError._invalid_export_format_validator, 'retry_error': ExportError._retry_error_validator, 'other': ExportError._other_validator, } ExportError.non_exportable = ExportError('non_exportable') +ExportError.invalid_export_format = ExportError('invalid_export_format') ExportError.retry_error = ExportError('retry_error') ExportError.other = ExportError('other') ExportInfo.export_as.validator = bv.Nullable(bv.String()) -ExportInfo._all_field_names_ = set(['export_as']) -ExportInfo._all_fields_ = [('export_as', ExportInfo.export_as.validator)] +ExportInfo.export_options.validator = bv.Nullable(bv.List(bv.String())) +ExportInfo._all_field_names_ = set([ + 'export_as', + 'export_options', +]) +ExportInfo._all_fields_ = [ + ('export_as', ExportInfo.export_as.validator), + ('export_options', ExportInfo.export_options.validator), +] ExportMetadata.name.validator = bv.String() ExportMetadata.size.validator = bv.UInt64() ExportMetadata.export_hash.validator = bv.Nullable(Sha256HexHash_validator) +ExportMetadata.paper_revision.validator = bv.Nullable(bv.Int64()) ExportMetadata._all_field_names_ = set([ 'name', 'size', 'export_hash', + 'paper_revision', ]) ExportMetadata._all_fields_ = [ ('name', ExportMetadata.name.validator), ('size', ExportMetadata.size.validator), ('export_hash', ExportMetadata.export_hash.validator), + ('paper_revision', ExportMetadata.paper_revision.validator), ] ExportResult.export_metadata.validator = ExportMetadata_validator @@ -10239,16 +10320,19 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetTemporaryLinkError._path_validator = LookupError_validator GetTemporaryLinkError._email_not_verified_validator = bv.Void() GetTemporaryLinkError._unsupported_file_validator = bv.Void() +GetTemporaryLinkError._not_allowed_validator = bv.Void() GetTemporaryLinkError._other_validator = bv.Void() GetTemporaryLinkError._tagmap = { 'path': GetTemporaryLinkError._path_validator, 'email_not_verified': GetTemporaryLinkError._email_not_verified_validator, 'unsupported_file': GetTemporaryLinkError._unsupported_file_validator, + 'not_allowed': GetTemporaryLinkError._not_allowed_validator, 'other': GetTemporaryLinkError._other_validator, } GetTemporaryLinkError.email_not_verified = GetTemporaryLinkError('email_not_verified') GetTemporaryLinkError.unsupported_file = GetTemporaryLinkError('unsupported_file') +GetTemporaryLinkError.not_allowed = GetTemporaryLinkError('not_allowed') GetTemporaryLinkError.other = GetTemporaryLinkError('other') GetTemporaryLinkResult.metadata.validator = FileMetadata_validator diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 73f2267c..7f8e326e 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -1237,28 +1237,134 @@ class AdminAlertingAlertConfiguration(bb.Struct): Alert configurations :ivar team_log.AdminAlertingAlertConfiguration.alert_state: Alert state. + :ivar team_log.AdminAlertingAlertConfiguration.sensitivity_level: + Sensitivity level. + :ivar team_log.AdminAlertingAlertConfiguration.recipients_settings: + Recipient settings. """ __slots__ = [ '_alert_state_value', + '_sensitivity_level_value', + '_recipients_settings_value', ] - _has_required_fields = True + _has_required_fields = False def __init__(self, - alert_state=None): + alert_state=None, + sensitivity_level=None, + recipients_settings=None): self._alert_state_value = bb.NOT_SET + self._sensitivity_level_value = bb.NOT_SET + self._recipients_settings_value = bb.NOT_SET if alert_state is not None: self.alert_state = alert_state + if sensitivity_level is not None: + self.sensitivity_level = sensitivity_level + if recipients_settings is not None: + self.recipients_settings = recipients_settings # Instance attribute type: AdminAlertingAlertStatePolicy (validator is set below) - alert_state = bb.Attribute("alert_state", user_defined=True) + alert_state = bb.Attribute("alert_state", nullable=True, user_defined=True) + + # Instance attribute type: AdminAlertingAlertSensitivity (validator is set below) + sensitivity_level = bb.Attribute("sensitivity_level", nullable=True, user_defined=True) + + # Instance attribute type: RecipientsConfiguration (validator is set below) + recipients_settings = bb.Attribute("recipients_settings", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(AdminAlertingAlertConfiguration, self)._process_custom_annotations(annotation_type, field_path, processor) AdminAlertingAlertConfiguration_validator = bv.Struct(AdminAlertingAlertConfiguration) +class AdminAlertingAlertSensitivity(bb.Union): + """ + Alert sensitivity + + This class acts as a tagged union. Only 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 + high = None + # Attribute is overwritten below the class definition + highest = None + # Attribute is overwritten below the class definition + invalid = None + # Attribute is overwritten below the class definition + low = None + # Attribute is overwritten below the class definition + lowest = None + # Attribute is overwritten below the class definition + medium = None + # Attribute is overwritten below the class definition + other = None + + def is_high(self): + """ + Check if the union tag is ``high``. + + :rtype: bool + """ + return self._tag == 'high' + + def is_highest(self): + """ + Check if the union tag is ``highest``. + + :rtype: bool + """ + return self._tag == 'highest' + + def is_invalid(self): + """ + Check if the union tag is ``invalid``. + + :rtype: bool + """ + return self._tag == 'invalid' + + def is_low(self): + """ + Check if the union tag is ``low``. + + :rtype: bool + """ + return self._tag == 'low' + + def is_lowest(self): + """ + Check if the union tag is ``lowest``. + + :rtype: bool + """ + return self._tag == 'lowest' + + def is_medium(self): + """ + Check if the union tag is ``medium``. + + :rtype: bool + """ + return self._tag == 'medium' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AdminAlertingAlertSensitivity, self)._process_custom_annotations(annotation_type, field_path, processor) + +AdminAlertingAlertSensitivity_validator = bv.Union(AdminAlertingAlertSensitivity) + class AdminAlertingAlertStatePolicy(bb.Union): """ Policy for controlling whether an alert can be triggered or not @@ -1528,6 +1634,72 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminRole_validator = bv.Union(AdminRole) +class AlertRecipientsSettingType(bb.Union): + """ + Alert recipients setting 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. + """ + + _catch_all = 'other' + # Attribute is overwritten below the class definition + custom_list = None + # Attribute is overwritten below the class definition + invalid = None + # Attribute is overwritten below the class definition + none = None + # Attribute is overwritten below the class definition + team_admins = None + # Attribute is overwritten below the class definition + other = None + + def is_custom_list(self): + """ + Check if the union tag is ``custom_list``. + + :rtype: bool + """ + return self._tag == 'custom_list' + + def is_invalid(self): + """ + Check if the union tag is ``invalid``. + + :rtype: bool + """ + return self._tag == 'invalid' + + def is_none(self): + """ + Check if the union tag is ``none``. + + :rtype: bool + """ + return self._tag == 'none' + + def is_team_admins(self): + """ + Check if the union tag is ``team_admins``. + + :rtype: bool + """ + return self._tag == 'team_admins' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AlertRecipientsSettingType, self)._process_custom_annotations(annotation_type, field_path, processor) + +AlertRecipientsSettingType_validator = bv.Union(AlertRecipientsSettingType) + class AllowDownloadDisabledDetails(bb.Struct): """ Disabled downloads. @@ -7767,6 +7939,39 @@ def folder_overview_item_unpinned_details(cls, val): """ return cls('folder_overview_item_unpinned_details', val) + @classmethod + def object_label_added_details(cls, val): + """ + Create an instance of this class set to the + ``object_label_added_details`` tag with value ``val``. + + :param ObjectLabelAddedDetails val: + :rtype: EventDetails + """ + return cls('object_label_added_details', val) + + @classmethod + def object_label_removed_details(cls, val): + """ + Create an instance of this class set to the + ``object_label_removed_details`` tag with value ``val``. + + :param ObjectLabelRemovedDetails val: + :rtype: EventDetails + """ + return cls('object_label_removed_details', val) + + @classmethod + def object_label_updated_value_details(cls, val): + """ + Create an instance of this class set to the + ``object_label_updated_value_details`` tag with value ``val``. + + :param ObjectLabelUpdatedValueDetails val: + :rtype: EventDetails + """ + return cls('object_label_updated_value_details', val) + @classmethod def rewind_folder_details(cls, val): """ @@ -12572,6 +12777,30 @@ def is_folder_overview_item_unpinned_details(self): """ return self._tag == 'folder_overview_item_unpinned_details' + def is_object_label_added_details(self): + """ + Check if the union tag is ``object_label_added_details``. + + :rtype: bool + """ + return self._tag == 'object_label_added_details' + + def is_object_label_removed_details(self): + """ + Check if the union tag is ``object_label_removed_details``. + + :rtype: bool + """ + return self._tag == 'object_label_removed_details' + + def is_object_label_updated_value_details(self): + """ + Check if the union tag is ``object_label_updated_value_details``. + + :rtype: bool + """ + return self._tag == 'object_label_updated_value_details' + def is_rewind_folder_details(self): """ Check if the union tag is ``rewind_folder_details``. @@ -16400,6 +16629,36 @@ def get_folder_overview_item_unpinned_details(self): raise AttributeError("tag 'folder_overview_item_unpinned_details' not set") return self._value + def get_object_label_added_details(self): + """ + Only call this if :meth:`is_object_label_added_details` is true. + + :rtype: ObjectLabelAddedDetails + """ + if not self.is_object_label_added_details(): + raise AttributeError("tag 'object_label_added_details' not set") + return self._value + + def get_object_label_removed_details(self): + """ + Only call this if :meth:`is_object_label_removed_details` is true. + + :rtype: ObjectLabelRemovedDetails + """ + if not self.is_object_label_removed_details(): + raise AttributeError("tag 'object_label_removed_details' not set") + return self._value + + def get_object_label_updated_value_details(self): + """ + Only call this if :meth:`is_object_label_updated_value_details` is true. + + :rtype: ObjectLabelUpdatedValueDetails + """ + if not self.is_object_label_updated_value_details(): + raise AttributeError("tag 'object_label_updated_value_details' not set") + return self._value + def get_rewind_folder_details(self): """ Only call this if :meth:`is_rewind_folder_details` is true. @@ -20318,6 +20577,12 @@ class EventType(bb.Union): :ivar FolderOverviewItemUnpinnedType EventType.folder_overview_item_unpinned: (file_operations) Unpinned item from folder overview + :ivar ObjectLabelAddedType EventType.object_label_added: (file_operations) + Added a label + :ivar ObjectLabelRemovedType EventType.object_label_removed: + (file_operations) Removed a label + :ivar ObjectLabelUpdatedValueType EventType.object_label_updated_value: + (file_operations) Updated a label's value :ivar RewindFolderType EventType.rewind_folder: (file_operations) Rewound a folder :ivar FileRequestChangeType EventType.file_request_change: (file_requests) @@ -22173,6 +22438,39 @@ def folder_overview_item_unpinned(cls, val): """ return cls('folder_overview_item_unpinned', val) + @classmethod + def object_label_added(cls, val): + """ + Create an instance of this class set to the ``object_label_added`` tag + with value ``val``. + + :param ObjectLabelAddedType val: + :rtype: EventType + """ + return cls('object_label_added', val) + + @classmethod + def object_label_removed(cls, val): + """ + Create an instance of this class set to the ``object_label_removed`` tag + with value ``val``. + + :param ObjectLabelRemovedType val: + :rtype: EventType + """ + return cls('object_label_removed', val) + + @classmethod + def object_label_updated_value(cls, val): + """ + Create an instance of this class set to the + ``object_label_updated_value`` tag with value ``val``. + + :param ObjectLabelUpdatedValueType val: + :rtype: EventType + """ + return cls('object_label_updated_value', val) + @classmethod def rewind_folder(cls, val): """ @@ -26934,6 +27232,30 @@ def is_folder_overview_item_unpinned(self): """ return self._tag == 'folder_overview_item_unpinned' + def is_object_label_added(self): + """ + Check if the union tag is ``object_label_added``. + + :rtype: bool + """ + return self._tag == 'object_label_added' + + def is_object_label_removed(self): + """ + Check if the union tag is ``object_label_removed``. + + :rtype: bool + """ + return self._tag == 'object_label_removed' + + def is_object_label_updated_value(self): + """ + Check if the union tag is ``object_label_updated_value``. + + :rtype: bool + """ + return self._tag == 'object_label_updated_value' + def is_rewind_folder(self): """ Check if the union tag is ``rewind_folder``. @@ -30931,6 +31253,42 @@ def get_folder_overview_item_unpinned(self): raise AttributeError("tag 'folder_overview_item_unpinned' not set") return self._value + def get_object_label_added(self): + """ + (file_operations) Added a label + + Only call this if :meth:`is_object_label_added` is true. + + :rtype: ObjectLabelAddedType + """ + if not self.is_object_label_added(): + raise AttributeError("tag 'object_label_added' not set") + return self._value + + def get_object_label_removed(self): + """ + (file_operations) Removed a label + + Only call this if :meth:`is_object_label_removed` is true. + + :rtype: ObjectLabelRemovedType + """ + if not self.is_object_label_removed(): + raise AttributeError("tag 'object_label_removed' not set") + return self._value + + def get_object_label_updated_value(self): + """ + (file_operations) Updated a label's value + + Only call this if :meth:`is_object_label_updated_value` is true. + + :rtype: ObjectLabelUpdatedValueType + """ + if not self.is_object_label_updated_value(): + raise AttributeError("tag 'object_label_updated_value' not set") + return self._value + def get_rewind_folder(self): """ (file_operations) Rewound a folder @@ -35614,6 +35972,12 @@ class EventTypeArg(bb.Union): Pinned item to folder overview :ivar team_log.EventTypeArg.folder_overview_item_unpinned: (file_operations) Unpinned item from folder overview + :ivar team_log.EventTypeArg.object_label_added: (file_operations) Added a + label + :ivar team_log.EventTypeArg.object_label_removed: (file_operations) Removed + a label + :ivar team_log.EventTypeArg.object_label_updated_value: (file_operations) + Updated a label's value :ivar team_log.EventTypeArg.rewind_folder: (file_operations) Rewound a folder :ivar team_log.EventTypeArg.file_request_change: (file_requests) Changed @@ -36562,6 +36926,12 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition folder_overview_item_unpinned = None # Attribute is overwritten below the class definition + object_label_added = None + # Attribute is overwritten below the class definition + object_label_removed = None + # Attribute is overwritten below the class definition + object_label_updated_value = None + # Attribute is overwritten below the class definition rewind_folder = None # Attribute is overwritten below the class definition file_request_change = None @@ -37990,6 +38360,30 @@ def is_folder_overview_item_unpinned(self): """ return self._tag == 'folder_overview_item_unpinned' + def is_object_label_added(self): + """ + Check if the union tag is ``object_label_added``. + + :rtype: bool + """ + return self._tag == 'object_label_added' + + def is_object_label_removed(self): + """ + Check if the union tag is ``object_label_removed``. + + :rtype: bool + """ + return self._tag == 'object_label_removed' + + def is_object_label_updated_value(self): + """ + Check if the union tag is ``object_label_updated_value``. + + :rtype: bool + """ + return self._tag == 'object_label_updated_value' + def is_rewind_folder(self): """ Check if the union tag is ``rewind_folder``. @@ -47041,6 +47435,42 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): JoinTeamDetails_validator = bv.Struct(JoinTeamDetails) +class LabelType(bb.Union): + """ + Label 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. + """ + + _catch_all = 'other' + # Attribute is overwritten below the class definition + personal_information = None + # Attribute is overwritten below the class definition + other = None + + def is_personal_information(self): + """ + Check if the union tag is ``personal_information``. + + :rtype: bool + """ + return self._tag == 'personal_information' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(LabelType, self)._process_custom_annotations(annotation_type, field_path, processor) + +LabelType_validator = bv.Union(LabelType) + class LegacyDeviceSessionLogInfo(DeviceSessionLogInfo): """ Information on sessions, in legacy format @@ -51144,6 +51574,156 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): NoteSharedType_validator = bv.Struct(NoteSharedType) +class ObjectLabelAddedDetails(bb.Struct): + """ + Added a label. + + :ivar team_log.ObjectLabelAddedDetails.label_type: Labels mark a file or + folder. + """ + + __slots__ = [ + '_label_type_value', + ] + + _has_required_fields = True + + def __init__(self, + label_type=None): + self._label_type_value = bb.NOT_SET + if label_type is not None: + self.label_type = label_type + + # Instance attribute type: LabelType (validator is set below) + label_type = bb.Attribute("label_type", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ObjectLabelAddedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +ObjectLabelAddedDetails_validator = bv.Struct(ObjectLabelAddedDetails) + +class ObjectLabelAddedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ObjectLabelAddedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +ObjectLabelAddedType_validator = bv.Struct(ObjectLabelAddedType) + +class ObjectLabelRemovedDetails(bb.Struct): + """ + Removed a label. + + :ivar team_log.ObjectLabelRemovedDetails.label_type: Labels mark a file or + folder. + """ + + __slots__ = [ + '_label_type_value', + ] + + _has_required_fields = True + + def __init__(self, + label_type=None): + self._label_type_value = bb.NOT_SET + if label_type is not None: + self.label_type = label_type + + # Instance attribute type: LabelType (validator is set below) + label_type = bb.Attribute("label_type", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ObjectLabelRemovedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +ObjectLabelRemovedDetails_validator = bv.Struct(ObjectLabelRemovedDetails) + +class ObjectLabelRemovedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ObjectLabelRemovedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +ObjectLabelRemovedType_validator = bv.Struct(ObjectLabelRemovedType) + +class ObjectLabelUpdatedValueDetails(bb.Struct): + """ + Updated a label's value. + + :ivar team_log.ObjectLabelUpdatedValueDetails.label_type: Labels mark a file + or folder. + """ + + __slots__ = [ + '_label_type_value', + ] + + _has_required_fields = True + + def __init__(self, + label_type=None): + self._label_type_value = bb.NOT_SET + if label_type is not None: + self.label_type = label_type + + # Instance attribute type: LabelType (validator is set below) + label_type = bb.Attribute("label_type", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ObjectLabelUpdatedValueDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +ObjectLabelUpdatedValueDetails_validator = bv.Struct(ObjectLabelUpdatedValueDetails) + +class ObjectLabelUpdatedValueType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ObjectLabelUpdatedValueType, self)._process_custom_annotations(annotation_type, field_path, processor) + +ObjectLabelUpdatedValueType_validator = bv.Struct(ObjectLabelUpdatedValueType) + class OpenNoteSharedDetails(bb.Struct): """ Opened shared Paper doc. @@ -54940,6 +55520,8 @@ class PlacementRestriction(bb.Union): # Attribute is overwritten below the class definition none = None # Attribute is overwritten below the class definition + uk_only = None + # Attribute is overwritten below the class definition other = None def is_australia_only(self): @@ -54974,6 +55556,14 @@ def is_none(self): """ return self._tag == 'none' + def is_uk_only(self): + """ + Check if the union tag is ``uk_only``. + + :rtype: bool + """ + return self._tag == 'uk_only' + def is_other(self): """ Check if the union tag is ``other``. @@ -55269,6 +55859,53 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): QuickActionType_validator = bv.Union(QuickActionType) +class RecipientsConfiguration(bb.Struct): + """ + Recipients Configuration + + :ivar team_log.RecipientsConfiguration.recipient_setting_type: Recipients + setting type. + :ivar team_log.RecipientsConfiguration.emails: A list of user emails to + notify. + :ivar team_log.RecipientsConfiguration.groups: A list of groups to notify. + """ + + __slots__ = [ + '_recipient_setting_type_value', + '_emails_value', + '_groups_value', + ] + + _has_required_fields = False + + def __init__(self, + recipient_setting_type=None, + emails=None, + groups=None): + self._recipient_setting_type_value = bb.NOT_SET + self._emails_value = bb.NOT_SET + self._groups_value = bb.NOT_SET + if recipient_setting_type is not None: + self.recipient_setting_type = recipient_setting_type + if emails is not None: + self.emails = emails + if groups is not None: + self.groups = groups + + # Instance attribute type: AlertRecipientsSettingType (validator is set below) + recipient_setting_type = bb.Attribute("recipient_setting_type", nullable=True, user_defined=True) + + # Instance attribute type: list of [str] (validator is set below) + emails = bb.Attribute("emails", nullable=True) + + # Instance attribute type: list of [str] (validator is set below) + groups = bb.Attribute("groups", nullable=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(RecipientsConfiguration, self)._process_custom_annotations(annotation_type, field_path, processor) + +RecipientsConfiguration_validator = bv.Struct(RecipientsConfiguration) + class RelocateAssetReferencesLogInfo(bb.Struct): """ Provides the indices of the source asset and the destination asset for a @@ -68416,9 +69053,44 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminAlertSeverityEnum.na = AdminAlertSeverityEnum('na') AdminAlertSeverityEnum.other = AdminAlertSeverityEnum('other') -AdminAlertingAlertConfiguration.alert_state.validator = AdminAlertingAlertStatePolicy_validator -AdminAlertingAlertConfiguration._all_field_names_ = set(['alert_state']) -AdminAlertingAlertConfiguration._all_fields_ = [('alert_state', AdminAlertingAlertConfiguration.alert_state.validator)] +AdminAlertingAlertConfiguration.alert_state.validator = bv.Nullable(AdminAlertingAlertStatePolicy_validator) +AdminAlertingAlertConfiguration.sensitivity_level.validator = bv.Nullable(AdminAlertingAlertSensitivity_validator) +AdminAlertingAlertConfiguration.recipients_settings.validator = bv.Nullable(RecipientsConfiguration_validator) +AdminAlertingAlertConfiguration._all_field_names_ = set([ + 'alert_state', + 'sensitivity_level', + 'recipients_settings', +]) +AdminAlertingAlertConfiguration._all_fields_ = [ + ('alert_state', AdminAlertingAlertConfiguration.alert_state.validator), + ('sensitivity_level', AdminAlertingAlertConfiguration.sensitivity_level.validator), + ('recipients_settings', AdminAlertingAlertConfiguration.recipients_settings.validator), +] + +AdminAlertingAlertSensitivity._high_validator = bv.Void() +AdminAlertingAlertSensitivity._highest_validator = bv.Void() +AdminAlertingAlertSensitivity._invalid_validator = bv.Void() +AdminAlertingAlertSensitivity._low_validator = bv.Void() +AdminAlertingAlertSensitivity._lowest_validator = bv.Void() +AdminAlertingAlertSensitivity._medium_validator = bv.Void() +AdminAlertingAlertSensitivity._other_validator = bv.Void() +AdminAlertingAlertSensitivity._tagmap = { + 'high': AdminAlertingAlertSensitivity._high_validator, + 'highest': AdminAlertingAlertSensitivity._highest_validator, + 'invalid': AdminAlertingAlertSensitivity._invalid_validator, + 'low': AdminAlertingAlertSensitivity._low_validator, + 'lowest': AdminAlertingAlertSensitivity._lowest_validator, + 'medium': AdminAlertingAlertSensitivity._medium_validator, + 'other': AdminAlertingAlertSensitivity._other_validator, +} + +AdminAlertingAlertSensitivity.high = AdminAlertingAlertSensitivity('high') +AdminAlertingAlertSensitivity.highest = AdminAlertingAlertSensitivity('highest') +AdminAlertingAlertSensitivity.invalid = AdminAlertingAlertSensitivity('invalid') +AdminAlertingAlertSensitivity.low = AdminAlertingAlertSensitivity('low') +AdminAlertingAlertSensitivity.lowest = AdminAlertingAlertSensitivity('lowest') +AdminAlertingAlertSensitivity.medium = AdminAlertingAlertSensitivity('medium') +AdminAlertingAlertSensitivity.other = AdminAlertingAlertSensitivity('other') AdminAlertingAlertStatePolicy._off_validator = bv.Void() AdminAlertingAlertStatePolicy._on_validator = bv.Void() @@ -68494,6 +69166,25 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminRole.user_management_admin = AdminRole('user_management_admin') AdminRole.other = AdminRole('other') +AlertRecipientsSettingType._custom_list_validator = bv.Void() +AlertRecipientsSettingType._invalid_validator = bv.Void() +AlertRecipientsSettingType._none_validator = bv.Void() +AlertRecipientsSettingType._team_admins_validator = bv.Void() +AlertRecipientsSettingType._other_validator = bv.Void() +AlertRecipientsSettingType._tagmap = { + 'custom_list': AlertRecipientsSettingType._custom_list_validator, + 'invalid': AlertRecipientsSettingType._invalid_validator, + 'none': AlertRecipientsSettingType._none_validator, + 'team_admins': AlertRecipientsSettingType._team_admins_validator, + 'other': AlertRecipientsSettingType._other_validator, +} + +AlertRecipientsSettingType.custom_list = AlertRecipientsSettingType('custom_list') +AlertRecipientsSettingType.invalid = AlertRecipientsSettingType('invalid') +AlertRecipientsSettingType.none = AlertRecipientsSettingType('none') +AlertRecipientsSettingType.team_admins = AlertRecipientsSettingType('team_admins') +AlertRecipientsSettingType.other = AlertRecipientsSettingType('other') + AllowDownloadDisabledDetails._all_field_names_ = set([]) AllowDownloadDisabledDetails._all_fields_ = [] @@ -69780,6 +70471,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._folder_overview_description_changed_details_validator = FolderOverviewDescriptionChangedDetails_validator EventDetails._folder_overview_item_pinned_details_validator = FolderOverviewItemPinnedDetails_validator EventDetails._folder_overview_item_unpinned_details_validator = FolderOverviewItemUnpinnedDetails_validator +EventDetails._object_label_added_details_validator = ObjectLabelAddedDetails_validator +EventDetails._object_label_removed_details_validator = ObjectLabelRemovedDetails_validator +EventDetails._object_label_updated_value_details_validator = ObjectLabelUpdatedValueDetails_validator EventDetails._rewind_folder_details_validator = RewindFolderDetails_validator EventDetails._file_request_change_details_validator = FileRequestChangeDetails_validator EventDetails._file_request_close_details_validator = FileRequestCloseDetails_validator @@ -70238,6 +70932,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'folder_overview_description_changed_details': EventDetails._folder_overview_description_changed_details_validator, 'folder_overview_item_pinned_details': EventDetails._folder_overview_item_pinned_details_validator, 'folder_overview_item_unpinned_details': EventDetails._folder_overview_item_unpinned_details_validator, + 'object_label_added_details': EventDetails._object_label_added_details_validator, + 'object_label_removed_details': EventDetails._object_label_removed_details_validator, + 'object_label_updated_value_details': EventDetails._object_label_updated_value_details_validator, 'rewind_folder_details': EventDetails._rewind_folder_details_validator, 'file_request_change_details': EventDetails._file_request_change_details_validator, 'file_request_close_details': EventDetails._file_request_close_details_validator, @@ -70699,6 +71396,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._folder_overview_description_changed_validator = FolderOverviewDescriptionChangedType_validator EventType._folder_overview_item_pinned_validator = FolderOverviewItemPinnedType_validator EventType._folder_overview_item_unpinned_validator = FolderOverviewItemUnpinnedType_validator +EventType._object_label_added_validator = ObjectLabelAddedType_validator +EventType._object_label_removed_validator = ObjectLabelRemovedType_validator +EventType._object_label_updated_value_validator = ObjectLabelUpdatedValueType_validator EventType._rewind_folder_validator = RewindFolderType_validator EventType._file_request_change_validator = FileRequestChangeType_validator EventType._file_request_close_validator = FileRequestCloseType_validator @@ -71156,6 +71856,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'folder_overview_description_changed': EventType._folder_overview_description_changed_validator, 'folder_overview_item_pinned': EventType._folder_overview_item_pinned_validator, 'folder_overview_item_unpinned': EventType._folder_overview_item_unpinned_validator, + 'object_label_added': EventType._object_label_added_validator, + 'object_label_removed': EventType._object_label_removed_validator, + 'object_label_updated_value': EventType._object_label_updated_value_validator, 'rewind_folder': EventType._rewind_folder_validator, 'file_request_change': EventType._file_request_change_validator, 'file_request_close': EventType._file_request_close_validator, @@ -71616,6 +72319,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._folder_overview_description_changed_validator = bv.Void() EventTypeArg._folder_overview_item_pinned_validator = bv.Void() EventTypeArg._folder_overview_item_unpinned_validator = bv.Void() +EventTypeArg._object_label_added_validator = bv.Void() +EventTypeArg._object_label_removed_validator = bv.Void() +EventTypeArg._object_label_updated_value_validator = bv.Void() EventTypeArg._rewind_folder_validator = bv.Void() EventTypeArg._file_request_change_validator = bv.Void() EventTypeArg._file_request_close_validator = bv.Void() @@ -72073,6 +72779,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'folder_overview_description_changed': EventTypeArg._folder_overview_description_changed_validator, 'folder_overview_item_pinned': EventTypeArg._folder_overview_item_pinned_validator, 'folder_overview_item_unpinned': EventTypeArg._folder_overview_item_unpinned_validator, + 'object_label_added': EventTypeArg._object_label_added_validator, + 'object_label_removed': EventTypeArg._object_label_removed_validator, + 'object_label_updated_value': EventTypeArg._object_label_updated_value_validator, 'rewind_folder': EventTypeArg._rewind_folder_validator, 'file_request_change': EventTypeArg._file_request_change_validator, 'file_request_close': EventTypeArg._file_request_close_validator, @@ -72531,6 +73240,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.folder_overview_description_changed = EventTypeArg('folder_overview_description_changed') EventTypeArg.folder_overview_item_pinned = EventTypeArg('folder_overview_item_pinned') EventTypeArg.folder_overview_item_unpinned = EventTypeArg('folder_overview_item_unpinned') +EventTypeArg.object_label_added = EventTypeArg('object_label_added') +EventTypeArg.object_label_removed = EventTypeArg('object_label_removed') +EventTypeArg.object_label_updated_value = EventTypeArg('object_label_updated_value') EventTypeArg.rewind_folder = EventTypeArg('rewind_folder') EventTypeArg.file_request_change = EventTypeArg('file_request_change') EventTypeArg.file_request_close = EventTypeArg('file_request_close') @@ -74285,6 +74997,16 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('has_linked_shared_folders', JoinTeamDetails.has_linked_shared_folders.validator), ] +LabelType._personal_information_validator = bv.Void() +LabelType._other_validator = bv.Void() +LabelType._tagmap = { + 'personal_information': LabelType._personal_information_validator, + 'other': LabelType._other_validator, +} + +LabelType.personal_information = LabelType('personal_information') +LabelType.other = LabelType('other') + LegacyDeviceSessionLogInfo.session_info.validator = bv.Nullable(SessionLogInfo_validator) LegacyDeviceSessionLogInfo.display_name.validator = bv.Nullable(bv.String()) LegacyDeviceSessionLogInfo.is_emm_managed.validator = bv.Nullable(bv.Boolean()) @@ -75266,6 +75988,30 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): NoteSharedType._all_field_names_ = set(['description']) NoteSharedType._all_fields_ = [('description', NoteSharedType.description.validator)] +ObjectLabelAddedDetails.label_type.validator = LabelType_validator +ObjectLabelAddedDetails._all_field_names_ = set(['label_type']) +ObjectLabelAddedDetails._all_fields_ = [('label_type', ObjectLabelAddedDetails.label_type.validator)] + +ObjectLabelAddedType.description.validator = bv.String() +ObjectLabelAddedType._all_field_names_ = set(['description']) +ObjectLabelAddedType._all_fields_ = [('description', ObjectLabelAddedType.description.validator)] + +ObjectLabelRemovedDetails.label_type.validator = LabelType_validator +ObjectLabelRemovedDetails._all_field_names_ = set(['label_type']) +ObjectLabelRemovedDetails._all_fields_ = [('label_type', ObjectLabelRemovedDetails.label_type.validator)] + +ObjectLabelRemovedType.description.validator = bv.String() +ObjectLabelRemovedType._all_field_names_ = set(['description']) +ObjectLabelRemovedType._all_fields_ = [('description', ObjectLabelRemovedType.description.validator)] + +ObjectLabelUpdatedValueDetails.label_type.validator = LabelType_validator +ObjectLabelUpdatedValueDetails._all_field_names_ = set(['label_type']) +ObjectLabelUpdatedValueDetails._all_fields_ = [('label_type', ObjectLabelUpdatedValueDetails.label_type.validator)] + +ObjectLabelUpdatedValueType.description.validator = bv.String() +ObjectLabelUpdatedValueType._all_field_names_ = set(['description']) +ObjectLabelUpdatedValueType._all_fields_ = [('description', ObjectLabelUpdatedValueType.description.validator)] + OpenNoteSharedDetails._all_field_names_ = set([]) OpenNoteSharedDetails._all_fields_ = [] @@ -76066,12 +76812,14 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PlacementRestriction._europe_only_validator = bv.Void() PlacementRestriction._japan_only_validator = bv.Void() PlacementRestriction._none_validator = bv.Void() +PlacementRestriction._uk_only_validator = bv.Void() PlacementRestriction._other_validator = bv.Void() PlacementRestriction._tagmap = { 'australia_only': PlacementRestriction._australia_only_validator, 'europe_only': PlacementRestriction._europe_only_validator, 'japan_only': PlacementRestriction._japan_only_validator, 'none': PlacementRestriction._none_validator, + 'uk_only': PlacementRestriction._uk_only_validator, 'other': PlacementRestriction._other_validator, } @@ -76079,6 +76827,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PlacementRestriction.europe_only = PlacementRestriction('europe_only') PlacementRestriction.japan_only = PlacementRestriction('japan_only') PlacementRestriction.none = PlacementRestriction('none') +PlacementRestriction.uk_only = PlacementRestriction('uk_only') PlacementRestriction.other = PlacementRestriction('other') PolicyType._disposition_validator = bv.Void() @@ -76163,6 +76912,20 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): QuickActionType.unlink_session = QuickActionType('unlink_session') QuickActionType.other = QuickActionType('other') +RecipientsConfiguration.recipient_setting_type.validator = bv.Nullable(AlertRecipientsSettingType_validator) +RecipientsConfiguration.emails.validator = bv.Nullable(bv.List(EmailAddress_validator)) +RecipientsConfiguration.groups.validator = bv.Nullable(bv.List(bv.String())) +RecipientsConfiguration._all_field_names_ = set([ + 'recipient_setting_type', + 'emails', + 'groups', +]) +RecipientsConfiguration._all_fields_ = [ + ('recipient_setting_type', RecipientsConfiguration.recipient_setting_type.validator), + ('emails', RecipientsConfiguration.emails.validator), + ('groups', RecipientsConfiguration.groups.validator), +] + RelocateAssetReferencesLogInfo.src_asset_index.validator = bv.UInt64() RelocateAssetReferencesLogInfo.dest_asset_index.validator = bv.UInt64() RelocateAssetReferencesLogInfo._all_field_names_ = set([ diff --git a/spec b/spec index cce31b9a..0ba804f8 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit cce31b9a2e810b260c4f9fa6250030d00e968533 +Subproject commit 0ba804f8549058d48474fb9f77638a2ee3889993 From b817a01b26d15c412940dcbec070cfc7c51947bd Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Fri, 19 Feb 2021 10:41:45 -0800 Subject: [PATCH 23/90] Automated Spec Update (#324) 822caa80810d2248730a0c6c61309d45f0063f29 Change Notes: Files Namespace: - Add paper/create, paper/update routes - Add PaperCreateArg, PaperCreateResult, PaperCreateArg, PaperCreateResult, PaperUpdateArg, PaperUpdateResult structs - Add ImportFormat, PaperContentError, PaperCreateError, PaperDocUpdatePolicy, PaperUpdateError unions - Update Comments Team Log Generated Namespace: - Add GovernancePolicyContentDisposedDetails, GovernancePolicyContentDisposedType structs - Add DispositionActionType union - Update ClassificationType union to include pii - Update EventDetails union to include governance_policy_content_disposed_details - Update EventType union to include governance_policy_content_disposed - Update EventTypeArg uniont to include governance_policy_content_disposed - Update Comments Team Reports Namespace: - Deprecate reports/get_storage, reports/get_activity, reports/get_membership, reports/get_devices routes Co-authored-by: jorges26 Co-authored-by: DropboxBot Co-authored-by: jorges26 --- dropbox/base.py | 67 +++++ dropbox/base_team.py | 12 +- dropbox/files.py | 686 ++++++++++++++++++++++++++++++++++++++++++- dropbox/team_log.py | 254 +++++++++++++++- spec | 2 +- 5 files changed, 1014 insertions(+), 7 deletions(-) diff --git a/dropbox/base.py b/dropbox/base.py index a660fcdd..907060b2 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -2335,6 +2335,73 @@ def files_move_batch_check(self, ) return r + def files_paper_create(self, + f, + path, + import_format): + """ + Creates a new Paper doc with the provided content. + + :param bytes f: Contents to upload. + :param str path: The fully qualified path to the location in the user's + Dropbox where the Paper Doc should be created. This should include + the document's title and end with .paper. + :param import_format: The format of the provided data. + :type import_format: :class:`dropbox.files.ImportFormat` + :rtype: :class:`dropbox.files.PaperCreateResult` + :raises: :class:`.exceptions.ApiError` + + If this raises, ApiError will contain: + :class:`dropbox.files.PaperCreateError` + """ + arg = files.PaperCreateArg(path, + import_format) + r = self.request( + files.paper_create, + 'files', + arg, + f, + ) + return r + + def files_paper_update(self, + f, + path, + import_format, + doc_update_policy, + paper_revision=None): + """ + Updates an existing Paper doc with the provided content. + + :param bytes f: Contents to upload. + :param str path: Path in the user's Dropbox to update. The path must + correspond to a Paper doc or an error will be returned. + :param import_format: The format of the provided data. + :type import_format: :class:`dropbox.files.ImportFormat` + :param doc_update_policy: How the provided content should be applied to + the doc. + :type doc_update_policy: :class:`dropbox.files.PaperDocUpdatePolicy` + :param Nullable[int] paper_revision: The latest doc revision. Required + when doc_update_policy is update. This value must match the current + revision of the doc or error revision_mismatch will be returned. + :rtype: :class:`dropbox.files.PaperUpdateResult` + :raises: :class:`.exceptions.ApiError` + + If this raises, ApiError will contain: + :class:`dropbox.files.PaperUpdateError` + """ + arg = files.PaperUpdateArg(path, + import_format, + doc_update_policy, + paper_revision) + r = self.request( + files.paper_update, + 'files', + arg, + f, + ) + return r + def files_permanently_delete(self, path, parent_rev=None): diff --git a/dropbox/base_team.py b/dropbox/base_team.py index 7b44b034..d6483e9e 100644 --- a/dropbox/base_team.py +++ b/dropbox/base_team.py @@ -1927,7 +1927,8 @@ def team_reports_get_activity(self, start_date=None, end_date=None): """ - Retrieves reporting data about a team's user activity. + Retrieves reporting data about a team's user activity. Deprecated: Will + be removed on July 1st 2021. :param Nullable[datetime] start_date: Optional starting date (inclusive). If start_date is None or too long ago, this field will @@ -1957,7 +1958,8 @@ def team_reports_get_devices(self, start_date=None, end_date=None): """ - Retrieves reporting data about a team's linked devices. + Retrieves reporting data about a team's linked devices. Deprecated: Will + be removed on July 1st 2021. :param Nullable[datetime] start_date: Optional starting date (inclusive). If start_date is None or too long ago, this field will @@ -1987,7 +1989,8 @@ def team_reports_get_membership(self, start_date=None, end_date=None): """ - Retrieves reporting data about a team's membership. + Retrieves reporting data about a team's membership. Deprecated: Will be + removed on July 1st 2021. :param Nullable[datetime] start_date: Optional starting date (inclusive). If start_date is None or too long ago, this field will @@ -2017,7 +2020,8 @@ def team_reports_get_storage(self, start_date=None, end_date=None): """ - Retrieves reporting data about a team's storage usage. + Retrieves reporting data about a team's storage usage. Deprecated: Will + be removed on July 1st 2021. :param Nullable[datetime] start_date: Optional starting date (inclusive). If start_date is None or too long ago, this field will diff --git a/dropbox/files.py b/dropbox/files.py index 8b8e472c..aade9a54 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -1960,7 +1960,8 @@ class ExportMetadata(bb.Struct): content hash. For more information see our `Content hash `_ page. :ivar files.ExportMetadata.paper_revision: If the file is a Paper doc, this - gives the latest doc revision. + gives the latest doc revision which can be used in + :meth:`dropbox.dropbox_client.Dropbox.files_paper_update`. """ __slots__ = [ @@ -3378,6 +3379,69 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): HighlightSpan_validator = bv.Struct(HighlightSpan) +class ImportFormat(bb.Union): + """ + The import format of the incoming Paper doc content. + + This class acts as a tagged union. Only 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 files.ImportFormat.html: The provided data is interpreted as standard + HTML. + :ivar files.ImportFormat.markdown: The provided data is interpreted as + markdown. + :ivar files.ImportFormat.plain_text: The provided data is interpreted as + plain text. + """ + + _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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(ImportFormat, self)._process_custom_annotations(annotation_type, field_path, processor) + +ImportFormat_validator = bv.Union(ImportFormat) + class ListFolderArg(bb.Struct): """ :ivar files.ListFolderArg.path: A unique identifier for the file. @@ -4902,6 +4966,466 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MoveIntoVaultError_validator = bv.Union(MoveIntoVaultError) +class PaperContentError(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 files.PaperContentError.insufficient_permissions: Your account does + not have permissions to edit Paper docs. + :ivar files.PaperContentError.content_malformed: The provided content was + malformed and cannot be imported to Paper. + :ivar files.PaperContentError.doc_length_exceeded: The Paper doc would be + too large, split the content into multiple docs. + :ivar files.PaperContentError.image_size_exceeded: The imported document + contains an image that is too large. The current limit is 1MB. This only + applies to HTML with data URI. + """ + + _catch_all = 'other' + # Attribute is overwritten below the class definition + insufficient_permissions = None + # Attribute is overwritten below the class definition + content_malformed = 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 + other = None + + def is_insufficient_permissions(self): + """ + Check if the union tag is ``insufficient_permissions``. + + :rtype: bool + """ + return self._tag == 'insufficient_permissions' + + def is_content_malformed(self): + """ + Check if the union tag is ``content_malformed``. + + :rtype: bool + """ + return self._tag == 'content_malformed' + + 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_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(PaperContentError, self)._process_custom_annotations(annotation_type, field_path, processor) + +PaperContentError_validator = bv.Union(PaperContentError) + +class PaperCreateArg(bb.Struct): + """ + :ivar files.PaperCreateArg.path: The fully qualified path to the location in + the user's Dropbox where the Paper Doc should be created. This should + include the document's title and end with .paper. + :ivar files.PaperCreateArg.import_format: The format of the provided data. + """ + + __slots__ = [ + '_path_value', + '_import_format_value', + ] + + _has_required_fields = True + + def __init__(self, + path=None, + import_format=None): + self._path_value = bb.NOT_SET + self._import_format_value = bb.NOT_SET + if path is not None: + self.path = path + if import_format is not None: + self.import_format = import_format + + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") + + # Instance attribute type: ImportFormat (validator is set below) + import_format = bb.Attribute("import_format", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(PaperCreateArg, self)._process_custom_annotations(annotation_type, field_path, processor) + +PaperCreateArg_validator = bv.Struct(PaperCreateArg) + +class PaperCreateError(PaperContentError): + """ + This class acts as a tagged union. Only 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 files.PaperCreateError.invalid_path: The file could not be saved to + the specified location. + :ivar files.PaperCreateError.email_unverified: The user's email must be + verified to create Paper docs. + :ivar files.PaperCreateError.invalid_file_extension: The file path must end + in .paper. + :ivar files.PaperCreateError.paper_disabled: Paper is disabled for your + team. + """ + + # Attribute is overwritten below the class definition + invalid_path = None + # Attribute is overwritten below the class definition + email_unverified = None + # Attribute is overwritten below the class definition + invalid_file_extension = None + # Attribute is overwritten below the class definition + paper_disabled = None + + def is_invalid_path(self): + """ + Check if the union tag is ``invalid_path``. + + :rtype: bool + """ + return self._tag == 'invalid_path' + + def is_email_unverified(self): + """ + Check if the union tag is ``email_unverified``. + + :rtype: bool + """ + return self._tag == 'email_unverified' + + def is_invalid_file_extension(self): + """ + Check if the union tag is ``invalid_file_extension``. + + :rtype: bool + """ + return self._tag == 'invalid_file_extension' + + def is_paper_disabled(self): + """ + Check if the union tag is ``paper_disabled``. + + :rtype: bool + """ + return self._tag == 'paper_disabled' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(PaperCreateError, self)._process_custom_annotations(annotation_type, field_path, processor) + +PaperCreateError_validator = bv.Union(PaperCreateError) + +class PaperCreateResult(bb.Struct): + """ + :ivar files.PaperCreateResult.url: URL to open the Paper Doc. + :ivar files.PaperCreateResult.result_path: The fully qualified path the + Paper Doc was actually created at. + :ivar files.PaperCreateResult.file_id: The id to use in Dropbox APIs when + referencing the Paper Doc. + :ivar files.PaperCreateResult.paper_revision: The current doc revision. + """ + + __slots__ = [ + '_url_value', + '_result_path_value', + '_file_id_value', + '_paper_revision_value', + ] + + _has_required_fields = True + + def __init__(self, + url=None, + result_path=None, + file_id=None, + paper_revision=None): + self._url_value = bb.NOT_SET + self._result_path_value = bb.NOT_SET + self._file_id_value = bb.NOT_SET + self._paper_revision_value = bb.NOT_SET + if url is not None: + self.url = url + if result_path is not None: + self.result_path = result_path + if file_id is not None: + self.file_id = file_id + if paper_revision is not None: + self.paper_revision = paper_revision + + # Instance attribute type: str (validator is set below) + url = bb.Attribute("url") + + # Instance attribute type: str (validator is set below) + result_path = bb.Attribute("result_path") + + # Instance attribute type: str (validator is set below) + file_id = bb.Attribute("file_id") + + # Instance attribute type: int (validator is set below) + paper_revision = bb.Attribute("paper_revision") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(PaperCreateResult, self)._process_custom_annotations(annotation_type, field_path, processor) + +PaperCreateResult_validator = bv.Struct(PaperCreateResult) + +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 files.PaperDocUpdatePolicy.update: Sets the doc content to the + provided content if the provided paper_revision matches the latest doc + revision. Otherwise, returns an error. + :ivar files.PaperDocUpdatePolicy.overwrite: Sets the doc content to the + provided content without checking paper_revision. + :ivar files.PaperDocUpdatePolicy.prepend: Adds the provided content to the + beginning of the doc without checking paper_revision. + :ivar files.PaperDocUpdatePolicy.append: Adds the provided content to the + end of the doc without checking paper_revision. + """ + + _catch_all = 'other' + # Attribute is overwritten below the class definition + update = None + # Attribute is overwritten below the class definition + overwrite = None + # Attribute is overwritten below the class definition + prepend = None + # Attribute is overwritten below the class definition + append = None + # Attribute is overwritten below the class definition + other = None + + def is_update(self): + """ + Check if the union tag is ``update``. + + :rtype: bool + """ + return self._tag == 'update' + + def is_overwrite(self): + """ + Check if the union tag is ``overwrite``. + + :rtype: bool + """ + return self._tag == 'overwrite' + + def is_prepend(self): + """ + Check if the union tag is ``prepend``. + + :rtype: bool + """ + return self._tag == 'prepend' + + def is_append(self): + """ + Check if the union tag is ``append``. + + :rtype: bool + """ + return self._tag == 'append' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(PaperDocUpdatePolicy, self)._process_custom_annotations(annotation_type, field_path, processor) + +PaperDocUpdatePolicy_validator = bv.Union(PaperDocUpdatePolicy) + +class PaperUpdateArg(bb.Struct): + """ + :ivar files.PaperUpdateArg.path: Path in the user's Dropbox to update. The + path must correspond to a Paper doc or an error will be returned. + :ivar files.PaperUpdateArg.import_format: The format of the provided data. + :ivar files.PaperUpdateArg.doc_update_policy: How the provided content + should be applied to the doc. + :ivar files.PaperUpdateArg.paper_revision: The latest doc revision. Required + when doc_update_policy is update. This value must match the current + revision of the doc or error revision_mismatch will be returned. + """ + + __slots__ = [ + '_path_value', + '_import_format_value', + '_doc_update_policy_value', + '_paper_revision_value', + ] + + _has_required_fields = True + + def __init__(self, + path=None, + import_format=None, + doc_update_policy=None, + paper_revision=None): + self._path_value = bb.NOT_SET + self._import_format_value = bb.NOT_SET + self._doc_update_policy_value = bb.NOT_SET + self._paper_revision_value = bb.NOT_SET + if path is not None: + self.path = path + if import_format is not None: + self.import_format = import_format + if doc_update_policy is not None: + self.doc_update_policy = doc_update_policy + if paper_revision is not None: + self.paper_revision = paper_revision + + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") + + # Instance attribute type: ImportFormat (validator is set below) + import_format = bb.Attribute("import_format", user_defined=True) + + # Instance attribute type: PaperDocUpdatePolicy (validator is set below) + doc_update_policy = bb.Attribute("doc_update_policy", user_defined=True) + + # Instance attribute type: int (validator is set below) + paper_revision = bb.Attribute("paper_revision", nullable=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(PaperUpdateArg, self)._process_custom_annotations(annotation_type, field_path, processor) + +PaperUpdateArg_validator = bv.Struct(PaperUpdateArg) + +class PaperUpdateError(PaperContentError): + """ + This class acts as a tagged union. Only 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 files.PaperUpdateError.revision_mismatch: The provided revision does + not match the document head. + :ivar files.PaperUpdateError.doc_archived: This operation is not allowed on + archived Paper docs. + :ivar files.PaperUpdateError.doc_deleted: This operation is not allowed on + deleted Paper docs. + """ + + # Attribute is overwritten below the class definition + revision_mismatch = None + # Attribute is overwritten below the class definition + doc_archived = None + # Attribute is overwritten below the class definition + doc_deleted = None + + @classmethod + def path(cls, val): + """ + Create an instance of this class set to the ``path`` tag with value + ``val``. + + :param LookupError val: + :rtype: PaperUpdateError + """ + return cls('path', val) + + def is_path(self): + """ + Check if the union tag is ``path``. + + :rtype: bool + """ + return self._tag == 'path' + + def is_revision_mismatch(self): + """ + Check if the union tag is ``revision_mismatch``. + + :rtype: bool + """ + return self._tag == 'revision_mismatch' + + 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 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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(PaperUpdateError, self)._process_custom_annotations(annotation_type, field_path, processor) + +PaperUpdateError_validator = bv.Union(PaperUpdateError) + +class PaperUpdateResult(bb.Struct): + """ + :ivar files.PaperUpdateResult.paper_revision: The current doc revision. + """ + + __slots__ = [ + '_paper_revision_value', + ] + + _has_required_fields = True + + def __init__(self, + paper_revision=None): + self._paper_revision_value = bb.NOT_SET + if paper_revision is not None: + self.paper_revision = paper_revision + + # Instance attribute type: int (validator is set below) + paper_revision = bb.Attribute("paper_revision") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(PaperUpdateResult, self)._process_custom_annotations(annotation_type, field_path, processor) + +PaperUpdateResult_validator = bv.Struct(PaperUpdateResult) + class PathOrLink(bb.Union): """ This class acts as a tagged union. Only one of the ``is_*`` methods will @@ -10423,6 +10947,22 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('is_highlighted', HighlightSpan.is_highlighted.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') + ListFolderArg.path.validator = PathROrId_validator ListFolderArg.recursive.validator = bv.Boolean() ListFolderArg.include_media_info.validator = bv.Boolean() @@ -10761,6 +11301,126 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MoveIntoVaultError.is_shared_folder = MoveIntoVaultError('is_shared_folder') MoveIntoVaultError.other = MoveIntoVaultError('other') +PaperContentError._insufficient_permissions_validator = bv.Void() +PaperContentError._content_malformed_validator = bv.Void() +PaperContentError._doc_length_exceeded_validator = bv.Void() +PaperContentError._image_size_exceeded_validator = bv.Void() +PaperContentError._other_validator = bv.Void() +PaperContentError._tagmap = { + 'insufficient_permissions': PaperContentError._insufficient_permissions_validator, + 'content_malformed': PaperContentError._content_malformed_validator, + 'doc_length_exceeded': PaperContentError._doc_length_exceeded_validator, + 'image_size_exceeded': PaperContentError._image_size_exceeded_validator, + 'other': PaperContentError._other_validator, +} + +PaperContentError.insufficient_permissions = PaperContentError('insufficient_permissions') +PaperContentError.content_malformed = PaperContentError('content_malformed') +PaperContentError.doc_length_exceeded = PaperContentError('doc_length_exceeded') +PaperContentError.image_size_exceeded = PaperContentError('image_size_exceeded') +PaperContentError.other = PaperContentError('other') + +PaperCreateArg.path.validator = Path_validator +PaperCreateArg.import_format.validator = ImportFormat_validator +PaperCreateArg._all_field_names_ = set([ + 'path', + 'import_format', +]) +PaperCreateArg._all_fields_ = [ + ('path', PaperCreateArg.path.validator), + ('import_format', PaperCreateArg.import_format.validator), +] + +PaperCreateError._invalid_path_validator = bv.Void() +PaperCreateError._email_unverified_validator = bv.Void() +PaperCreateError._invalid_file_extension_validator = bv.Void() +PaperCreateError._paper_disabled_validator = bv.Void() +PaperCreateError._tagmap = { + 'invalid_path': PaperCreateError._invalid_path_validator, + 'email_unverified': PaperCreateError._email_unverified_validator, + 'invalid_file_extension': PaperCreateError._invalid_file_extension_validator, + 'paper_disabled': PaperCreateError._paper_disabled_validator, +} +PaperCreateError._tagmap.update(PaperContentError._tagmap) + +PaperCreateError.invalid_path = PaperCreateError('invalid_path') +PaperCreateError.email_unverified = PaperCreateError('email_unverified') +PaperCreateError.invalid_file_extension = PaperCreateError('invalid_file_extension') +PaperCreateError.paper_disabled = PaperCreateError('paper_disabled') + +PaperCreateResult.url.validator = bv.String() +PaperCreateResult.result_path.validator = bv.String() +PaperCreateResult.file_id.validator = FileId_validator +PaperCreateResult.paper_revision.validator = bv.Int64() +PaperCreateResult._all_field_names_ = set([ + 'url', + 'result_path', + 'file_id', + 'paper_revision', +]) +PaperCreateResult._all_fields_ = [ + ('url', PaperCreateResult.url.validator), + ('result_path', PaperCreateResult.result_path.validator), + ('file_id', PaperCreateResult.file_id.validator), + ('paper_revision', PaperCreateResult.paper_revision.validator), +] + +PaperDocUpdatePolicy._update_validator = bv.Void() +PaperDocUpdatePolicy._overwrite_validator = bv.Void() +PaperDocUpdatePolicy._prepend_validator = bv.Void() +PaperDocUpdatePolicy._append_validator = bv.Void() +PaperDocUpdatePolicy._other_validator = bv.Void() +PaperDocUpdatePolicy._tagmap = { + 'update': PaperDocUpdatePolicy._update_validator, + 'overwrite': PaperDocUpdatePolicy._overwrite_validator, + 'prepend': PaperDocUpdatePolicy._prepend_validator, + 'append': PaperDocUpdatePolicy._append_validator, + 'other': PaperDocUpdatePolicy._other_validator, +} + +PaperDocUpdatePolicy.update = PaperDocUpdatePolicy('update') +PaperDocUpdatePolicy.overwrite = PaperDocUpdatePolicy('overwrite') +PaperDocUpdatePolicy.prepend = PaperDocUpdatePolicy('prepend') +PaperDocUpdatePolicy.append = PaperDocUpdatePolicy('append') +PaperDocUpdatePolicy.other = PaperDocUpdatePolicy('other') + +PaperUpdateArg.path.validator = WritePathOrId_validator +PaperUpdateArg.import_format.validator = ImportFormat_validator +PaperUpdateArg.doc_update_policy.validator = PaperDocUpdatePolicy_validator +PaperUpdateArg.paper_revision.validator = bv.Nullable(bv.Int64()) +PaperUpdateArg._all_field_names_ = set([ + 'path', + 'import_format', + 'doc_update_policy', + 'paper_revision', +]) +PaperUpdateArg._all_fields_ = [ + ('path', PaperUpdateArg.path.validator), + ('import_format', PaperUpdateArg.import_format.validator), + ('doc_update_policy', PaperUpdateArg.doc_update_policy.validator), + ('paper_revision', PaperUpdateArg.paper_revision.validator), +] + +PaperUpdateError._path_validator = LookupError_validator +PaperUpdateError._revision_mismatch_validator = bv.Void() +PaperUpdateError._doc_archived_validator = bv.Void() +PaperUpdateError._doc_deleted_validator = bv.Void() +PaperUpdateError._tagmap = { + 'path': PaperUpdateError._path_validator, + 'revision_mismatch': PaperUpdateError._revision_mismatch_validator, + 'doc_archived': PaperUpdateError._doc_archived_validator, + 'doc_deleted': PaperUpdateError._doc_deleted_validator, +} +PaperUpdateError._tagmap.update(PaperContentError._tagmap) + +PaperUpdateError.revision_mismatch = PaperUpdateError('revision_mismatch') +PaperUpdateError.doc_archived = PaperUpdateError('doc_archived') +PaperUpdateError.doc_deleted = PaperUpdateError('doc_deleted') + +PaperUpdateResult.paper_revision.validator = bv.Int64() +PaperUpdateResult._all_field_names_ = set(['paper_revision']) +PaperUpdateResult._all_fields_ = [('paper_revision', PaperUpdateResult.paper_revision.validator)] + PathOrLink._path_validator = ReadPath_validator PathOrLink._link_validator = SharedLinkFileInfo_validator PathOrLink._other_validator = bv.Void() @@ -12246,6 +12906,28 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'host': u'api', 'style': u'rpc'}, ) +paper_create = bb.Route( + 'paper/create', + 1, + False, + PaperCreateArg_validator, + PaperCreateResult_validator, + PaperCreateError_validator, + {'auth': u'user', + 'host': u'api', + 'style': u'upload'}, +) +paper_update = bb.Route( + 'paper/update', + 1, + False, + PaperUpdateArg_validator, + PaperUpdateResult_validator, + PaperUpdateError_validator, + {'auth': u'user', + 'host': u'api', + 'style': u'upload'}, +) permanently_delete = bb.Route( 'permanently_delete', 1, @@ -12520,6 +13202,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'move_batch': move_batch, 'move_batch/check:2': move_batch_check_v2, 'move_batch/check': move_batch_check, + 'paper/create': paper_create, + 'paper/update': paper_update, 'permanently_delete': permanently_delete, 'properties/add': properties_add, 'properties/overwrite': properties_overwrite, diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 7f8e326e..c6148d1f 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -3389,7 +3389,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): class ClassificationType(bb.Union): """ - The type of classification (currently only PII) + The type of classification (currently only personal information) This class acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the associated value of a tag (if one exists), use the @@ -3398,10 +3398,20 @@ class ClassificationType(bb.Union): _catch_all = 'other' # Attribute is overwritten below the class definition + personal_information = None + # Attribute is overwritten below the class definition pii = None # Attribute is overwritten below the class definition other = None + def is_personal_information(self): + """ + Check if the union tag is ``personal_information``. + + :rtype: bool + """ + return self._tag == 'personal_information' + def is_pii(self): """ Check if the union tag is ``pii``. @@ -5531,6 +5541,50 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DisabledDomainInvitesType_validator = bv.Struct(DisabledDomainInvitesType) +class DispositionActionType(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 + automatic_delete = None + # Attribute is overwritten below the class definition + automatic_permanently_delete = None + # Attribute is overwritten below the class definition + other = None + + def is_automatic_delete(self): + """ + Check if the union tag is ``automatic_delete``. + + :rtype: bool + """ + return self._tag == 'automatic_delete' + + def is_automatic_permanently_delete(self): + """ + Check if the union tag is ``automatic_permanently_delete``. + + :rtype: bool + """ + return self._tag == 'automatic_permanently_delete' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(DispositionActionType, self)._process_custom_annotations(annotation_type, field_path, processor) + +DispositionActionType_validator = bv.Union(DispositionActionType) + class DomainInvitesApproveRequestToJoinTeamDetails(bb.Struct): """ Approved user's request to join team. @@ -7183,6 +7237,17 @@ def governance_policy_add_folder_failed_details(cls, val): """ return cls('governance_policy_add_folder_failed_details', val) + @classmethod + def governance_policy_content_disposed_details(cls, val): + """ + Create an instance of this class set to the + ``governance_policy_content_disposed_details`` tag with value ``val``. + + :param GovernancePolicyContentDisposedDetails val: + :rtype: EventDetails + """ + return cls('governance_policy_content_disposed_details', val) + @classmethod def governance_policy_create_details(cls, val): """ @@ -12233,6 +12298,14 @@ def is_governance_policy_add_folder_failed_details(self): """ return self._tag == 'governance_policy_add_folder_failed_details' + def is_governance_policy_content_disposed_details(self): + """ + Check if the union tag is ``governance_policy_content_disposed_details``. + + :rtype: bool + """ + return self._tag == 'governance_policy_content_disposed_details' + def is_governance_policy_create_details(self): """ Check if the union tag is ``governance_policy_create_details``. @@ -15949,6 +16022,16 @@ def get_governance_policy_add_folder_failed_details(self): raise AttributeError("tag 'governance_policy_add_folder_failed_details' not set") return self._value + def get_governance_policy_content_disposed_details(self): + """ + Only call this if :meth:`is_governance_policy_content_disposed_details` is true. + + :rtype: GovernancePolicyContentDisposedDetails + """ + if not self.is_governance_policy_content_disposed_details(): + raise AttributeError("tag 'governance_policy_content_disposed_details' not set") + return self._value + def get_governance_policy_create_details(self): """ Only call this if :meth:`is_governance_policy_create_details` is true. @@ -20414,6 +20497,9 @@ class EventType(bb.Union): :ivar GovernancePolicyAddFolderFailedType EventType.governance_policy_add_folder_failed: (data_governance) Couldn't add a folder to a policy + :ivar GovernancePolicyContentDisposedType + EventType.governance_policy_content_disposed: (data_governance) Content + disposed :ivar GovernancePolicyCreateType EventType.governance_policy_create: (data_governance) Activated a new policy :ivar GovernancePolicyDeleteType EventType.governance_policy_delete: @@ -21688,6 +21774,17 @@ def governance_policy_add_folder_failed(cls, val): """ return cls('governance_policy_add_folder_failed', val) + @classmethod + def governance_policy_content_disposed(cls, val): + """ + Create an instance of this class set to the + ``governance_policy_content_disposed`` tag with value ``val``. + + :param GovernancePolicyContentDisposedType val: + :rtype: EventType + """ + return cls('governance_policy_content_disposed', val) + @classmethod def governance_policy_create(cls, val): """ @@ -26688,6 +26785,14 @@ def is_governance_policy_add_folder_failed(self): """ return self._tag == 'governance_policy_add_folder_failed' + def is_governance_policy_content_disposed(self): + """ + Check if the union tag is ``governance_policy_content_disposed``. + + :rtype: bool + """ + return self._tag == 'governance_policy_content_disposed' + def is_governance_policy_create(self): """ Check if the union tag is ``governance_policy_create``. @@ -30433,6 +30538,18 @@ def get_governance_policy_add_folder_failed(self): raise AttributeError("tag 'governance_policy_add_folder_failed' not set") return self._value + def get_governance_policy_content_disposed(self): + """ + (data_governance) Content disposed + + Only call this if :meth:`is_governance_policy_content_disposed` is true. + + :rtype: GovernancePolicyContentDisposedType + """ + if not self.is_governance_policy_content_disposed(): + raise AttributeError("tag 'governance_policy_content_disposed' not set") + return self._value + def get_governance_policy_create(self): """ (data_governance) Activated a new policy @@ -35836,6 +35953,8 @@ class EventTypeArg(bb.Union): Added folders to policy :ivar team_log.EventTypeArg.governance_policy_add_folder_failed: (data_governance) Couldn't add a folder to a policy + :ivar team_log.EventTypeArg.governance_policy_content_disposed: + (data_governance) Content disposed :ivar team_log.EventTypeArg.governance_policy_create: (data_governance) Activated a new policy :ivar team_log.EventTypeArg.governance_policy_delete: (data_governance) @@ -36790,6 +36909,8 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition governance_policy_add_folder_failed = None # Attribute is overwritten below the class definition + governance_policy_content_disposed = None + # Attribute is overwritten below the class definition governance_policy_create = None # Attribute is overwritten below the class definition governance_policy_delete = None @@ -37816,6 +37937,14 @@ def is_governance_policy_add_folder_failed(self): """ return self._tag == 'governance_policy_add_folder_failed' + def is_governance_policy_content_disposed(self): + """ + Check if the union tag is ``governance_policy_content_disposed``. + + :rtype: bool + """ + return self._tag == 'governance_policy_content_disposed' + def is_governance_policy_create(self): """ Check if the union tag is ``governance_policy_create``. @@ -45233,6 +45362,85 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GovernancePolicyAddFoldersType_validator = bv.Struct(GovernancePolicyAddFoldersType) +class GovernancePolicyContentDisposedDetails(bb.Struct): + """ + Content disposed. + + :ivar team_log.GovernancePolicyContentDisposedDetails.governance_policy_id: + Policy ID. + :ivar team_log.GovernancePolicyContentDisposedDetails.name: Policy name. + :ivar team_log.GovernancePolicyContentDisposedDetails.policy_type: Policy + type. + :ivar team_log.GovernancePolicyContentDisposedDetails.disposition_type: + Disposition type. + """ + + __slots__ = [ + '_governance_policy_id_value', + '_name_value', + '_policy_type_value', + '_disposition_type_value', + ] + + _has_required_fields = True + + def __init__(self, + governance_policy_id=None, + name=None, + disposition_type=None, + policy_type=None): + self._governance_policy_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._policy_type_value = bb.NOT_SET + self._disposition_type_value = bb.NOT_SET + if governance_policy_id is not None: + self.governance_policy_id = governance_policy_id + if name is not None: + self.name = name + if policy_type is not None: + self.policy_type = policy_type + if disposition_type is not None: + self.disposition_type = disposition_type + + # Instance attribute type: str (validator is set below) + governance_policy_id = bb.Attribute("governance_policy_id") + + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") + + # Instance attribute type: PolicyType (validator is set below) + policy_type = bb.Attribute("policy_type", nullable=True, user_defined=True) + + # Instance attribute type: DispositionActionType (validator is set below) + disposition_type = bb.Attribute("disposition_type", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(GovernancePolicyContentDisposedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +GovernancePolicyContentDisposedDetails_validator = bv.Struct(GovernancePolicyContentDisposedDetails) + +class GovernancePolicyContentDisposedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(GovernancePolicyContentDisposedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +GovernancePolicyContentDisposedType_validator = bv.Struct(GovernancePolicyContentDisposedType) + class GovernancePolicyCreateDetails(bb.Struct): """ Activated a new policy. @@ -69579,13 +69787,16 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ClassificationPolicyEnumWrapper.enabled = ClassificationPolicyEnumWrapper('enabled') ClassificationPolicyEnumWrapper.other = ClassificationPolicyEnumWrapper('other') +ClassificationType._personal_information_validator = bv.Void() ClassificationType._pii_validator = bv.Void() ClassificationType._other_validator = bv.Void() ClassificationType._tagmap = { + 'personal_information': ClassificationType._personal_information_validator, 'pii': ClassificationType._pii_validator, 'other': ClassificationType._other_validator, } +ClassificationType.personal_information = ClassificationType('personal_information') ClassificationType.pii = ClassificationType('pii') ClassificationType.other = ClassificationType('other') @@ -70076,6 +70287,19 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DisabledDomainInvitesType._all_field_names_ = set(['description']) DisabledDomainInvitesType._all_fields_ = [('description', DisabledDomainInvitesType.description.validator)] +DispositionActionType._automatic_delete_validator = bv.Void() +DispositionActionType._automatic_permanently_delete_validator = bv.Void() +DispositionActionType._other_validator = bv.Void() +DispositionActionType._tagmap = { + 'automatic_delete': DispositionActionType._automatic_delete_validator, + 'automatic_permanently_delete': DispositionActionType._automatic_permanently_delete_validator, + 'other': DispositionActionType._other_validator, +} + +DispositionActionType.automatic_delete = DispositionActionType('automatic_delete') +DispositionActionType.automatic_permanently_delete = DispositionActionType('automatic_permanently_delete') +DispositionActionType.other = DispositionActionType('other') + DomainInvitesApproveRequestToJoinTeamDetails._all_field_names_ = set([]) DomainInvitesApproveRequestToJoinTeamDetails._all_fields_ = [] @@ -70403,6 +70627,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._file_unresolve_comment_details_validator = FileUnresolveCommentDetails_validator EventDetails._governance_policy_add_folders_details_validator = GovernancePolicyAddFoldersDetails_validator EventDetails._governance_policy_add_folder_failed_details_validator = GovernancePolicyAddFolderFailedDetails_validator +EventDetails._governance_policy_content_disposed_details_validator = GovernancePolicyContentDisposedDetails_validator EventDetails._governance_policy_create_details_validator = GovernancePolicyCreateDetails_validator EventDetails._governance_policy_delete_details_validator = GovernancePolicyDeleteDetails_validator EventDetails._governance_policy_edit_details_details_validator = GovernancePolicyEditDetailsDetails_validator @@ -70864,6 +71089,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'file_unresolve_comment_details': EventDetails._file_unresolve_comment_details_validator, 'governance_policy_add_folders_details': EventDetails._governance_policy_add_folders_details_validator, 'governance_policy_add_folder_failed_details': EventDetails._governance_policy_add_folder_failed_details_validator, + 'governance_policy_content_disposed_details': EventDetails._governance_policy_content_disposed_details_validator, 'governance_policy_create_details': EventDetails._governance_policy_create_details_validator, 'governance_policy_delete_details': EventDetails._governance_policy_delete_details_validator, 'governance_policy_edit_details_details': EventDetails._governance_policy_edit_details_details_validator, @@ -71328,6 +71554,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._file_unresolve_comment_validator = FileUnresolveCommentType_validator EventType._governance_policy_add_folders_validator = GovernancePolicyAddFoldersType_validator EventType._governance_policy_add_folder_failed_validator = GovernancePolicyAddFolderFailedType_validator +EventType._governance_policy_content_disposed_validator = GovernancePolicyContentDisposedType_validator EventType._governance_policy_create_validator = GovernancePolicyCreateType_validator EventType._governance_policy_delete_validator = GovernancePolicyDeleteType_validator EventType._governance_policy_edit_details_validator = GovernancePolicyEditDetailsType_validator @@ -71788,6 +72015,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'file_unresolve_comment': EventType._file_unresolve_comment_validator, 'governance_policy_add_folders': EventType._governance_policy_add_folders_validator, 'governance_policy_add_folder_failed': EventType._governance_policy_add_folder_failed_validator, + 'governance_policy_content_disposed': EventType._governance_policy_content_disposed_validator, 'governance_policy_create': EventType._governance_policy_create_validator, 'governance_policy_delete': EventType._governance_policy_delete_validator, 'governance_policy_edit_details': EventType._governance_policy_edit_details_validator, @@ -72251,6 +72479,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._file_unresolve_comment_validator = bv.Void() EventTypeArg._governance_policy_add_folders_validator = bv.Void() EventTypeArg._governance_policy_add_folder_failed_validator = bv.Void() +EventTypeArg._governance_policy_content_disposed_validator = bv.Void() EventTypeArg._governance_policy_create_validator = bv.Void() EventTypeArg._governance_policy_delete_validator = bv.Void() EventTypeArg._governance_policy_edit_details_validator = bv.Void() @@ -72711,6 +72940,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'file_unresolve_comment': EventTypeArg._file_unresolve_comment_validator, 'governance_policy_add_folders': EventTypeArg._governance_policy_add_folders_validator, 'governance_policy_add_folder_failed': EventTypeArg._governance_policy_add_folder_failed_validator, + 'governance_policy_content_disposed': EventTypeArg._governance_policy_content_disposed_validator, 'governance_policy_create': EventTypeArg._governance_policy_create_validator, 'governance_policy_delete': EventTypeArg._governance_policy_delete_validator, 'governance_policy_edit_details': EventTypeArg._governance_policy_edit_details_validator, @@ -73172,6 +73402,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.file_unresolve_comment = EventTypeArg('file_unresolve_comment') EventTypeArg.governance_policy_add_folders = EventTypeArg('governance_policy_add_folders') EventTypeArg.governance_policy_add_folder_failed = EventTypeArg('governance_policy_add_folder_failed') +EventTypeArg.governance_policy_content_disposed = EventTypeArg('governance_policy_content_disposed') EventTypeArg.governance_policy_create = EventTypeArg('governance_policy_create') EventTypeArg.governance_policy_delete = EventTypeArg('governance_policy_delete') EventTypeArg.governance_policy_edit_details = EventTypeArg('governance_policy_edit_details') @@ -74450,6 +74681,27 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GovernancePolicyAddFoldersType._all_field_names_ = set(['description']) GovernancePolicyAddFoldersType._all_fields_ = [('description', GovernancePolicyAddFoldersType.description.validator)] +GovernancePolicyContentDisposedDetails.governance_policy_id.validator = bv.String() +GovernancePolicyContentDisposedDetails.name.validator = bv.String() +GovernancePolicyContentDisposedDetails.policy_type.validator = bv.Nullable(PolicyType_validator) +GovernancePolicyContentDisposedDetails.disposition_type.validator = DispositionActionType_validator +GovernancePolicyContentDisposedDetails._all_field_names_ = set([ + 'governance_policy_id', + 'name', + 'policy_type', + 'disposition_type', +]) +GovernancePolicyContentDisposedDetails._all_fields_ = [ + ('governance_policy_id', GovernancePolicyContentDisposedDetails.governance_policy_id.validator), + ('name', GovernancePolicyContentDisposedDetails.name.validator), + ('policy_type', GovernancePolicyContentDisposedDetails.policy_type.validator), + ('disposition_type', GovernancePolicyContentDisposedDetails.disposition_type.validator), +] + +GovernancePolicyContentDisposedType.description.validator = bv.String() +GovernancePolicyContentDisposedType._all_field_names_ = set(['description']) +GovernancePolicyContentDisposedType._all_fields_ = [('description', GovernancePolicyContentDisposedType.description.validator)] + GovernancePolicyCreateDetails.governance_policy_id.validator = bv.String() GovernancePolicyCreateDetails.name.validator = bv.String() GovernancePolicyCreateDetails.policy_type.validator = bv.Nullable(PolicyType_validator) diff --git a/spec b/spec index 0ba804f8..822caa80 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 0ba804f8549058d48474fb9f77638a2ee3889993 +Subproject commit 822caa80810d2248730a0c6c61309d45f0063f29 From e6c5930721f17a3806641c937adc11bd85143182 Mon Sep 17 00:00:00 2001 From: mtruong-dbx <77769746+mtruong-dbx@users.noreply.github.com> Date: Tue, 23 Feb 2021 09:35:52 -0800 Subject: [PATCH 24/90] Fix DropboxOAuth2Flow Documentation Parameters (#325) --- dropbox/oauth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dropbox/oauth.py b/dropbox/oauth.py index f874c1da..52ed398c 100644 --- a/dropbox/oauth.py +++ b/dropbox/oauth.py @@ -365,7 +365,6 @@ def __init__(self, consumer_key, redirect_uri, session, 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 @@ -374,6 +373,7 @@ def __init__(self, consumer_key, redirect_uri, 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 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". From 073f079578646c096bae884c0efc57146769ce94 Mon Sep 17 00:00:00 2001 From: Eugene Che Date: Tue, 23 Feb 2021 16:11:30 -0800 Subject: [PATCH 25/90] Fix and update build step for Python2.7 (#326) * Pin pytest runner version * Update workflow step naming --- .github/workflows/pypiupload.yml | 2 +- setup.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypiupload.yml b/.github/workflows/pypiupload.yml index b13cfeb7..3ff68779 100644 --- a/.github/workflows/pypiupload.yml +++ b/.github/workflows/pypiupload.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Publish to PyPi + - name: Setup Python uses: actions/setup-python@v2.2.1 with: python-version: ${{ matrix.python-version }} diff --git a/setup.py b/setup.py index a4f3dcdd..6ced38d0 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,9 @@ ] setup_requires = [ - 'pytest-runner', + # Pin pytest-runner to 5.2.0, since 5.3.0 uses `find_namespaces` directive, not supported in + # Python 2.7 + 'pytest-runner == 5.2.0', ] test_reqs = [ From 096827136d360097220e81871c7bac6301ec15d4 Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Fri, 26 Feb 2021 12:43:21 -0800 Subject: [PATCH 26/90] Update dropbox reference to link to the new name to fix documentation (#328) --- docs/api/dropbox.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/dropbox.rst b/docs/api/dropbox.rst index f9c3120b..97d25a0c 100644 --- a/docs/api/dropbox.rst +++ b/docs/api/dropbox.rst @@ -1,6 +1,6 @@ :mod:`dropbox.dropbox` -- Dropbox ================================= -.. automodule:: dropbox.dropbox +.. automodule:: dropbox.dropbox_client :members: :show-inheritance: :inherited-members: From 74e51e1a0815791ca22ade0b444d84d10a7725b0 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 3 Mar 2021 14:52:36 -0800 Subject: [PATCH 27/90] Automated Spec Update (#330) 9303b45bbfa3d1d3de75a2da609ac47c179d18ba Co-authored-by: DropboxBot --- dropbox/base.py | 19 ++++++++++++------- dropbox/team_log.py | 13 +++++++++++++ spec | 2 +- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/dropbox/base.py b/dropbox/base.py index 907060b2..2e4e41c1 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -90,7 +90,10 @@ def auth_token_from_oauth1(self, def auth_token_revoke(self): """ - Disables the access token used to authenticate the call. + Disables the access token used to authenticate the call. If there is a + corresponding refresh token for the access token, this disables that + refresh token, as well as any other access tokens for that refresh + token. :rtype: None """ @@ -1317,9 +1320,10 @@ def files_download_zip(self, path): """ Download a folder from the user's Dropbox, as a zip file. The folder - must be less than 20 GB in size and have fewer than 10,000 total files. - The input cannot be a single file. Any single file must be less than 4GB - in size. + must be less than 20 GB in size and any single file within must be less + than 4 GB in size. The resulting zip must have fewer than 10,000 total + file and folder entries, including the top level folder. The input + cannot be a single file. :param str path: The path of the folder to download. :rtype: (:class:`dropbox.files.DownloadZipResult`, @@ -1349,9 +1353,10 @@ def files_download_zip_to_file(self, path): """ Download a folder from the user's Dropbox, as a zip file. The folder - must be less than 20 GB in size and have fewer than 10,000 total files. - The input cannot be a single file. Any single file must be less than 4GB - in size. + must be less than 20 GB in size and any single file within must be less + than 4 GB in size. The resulting zip must have fewer than 10,000 total + file and folder entries, including the top level folder. The input + cannot be a single file. :param str download_path: Path on local machine to save file. :param str path: The path of the folder to download. diff --git a/dropbox/team_log.py b/dropbox/team_log.py index c6148d1f..e831ac20 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -1569,6 +1569,8 @@ class AdminRole(bb.Union): _catch_all = 'other' # Attribute is overwritten below the class definition + billing_admin = None + # Attribute is overwritten below the class definition limited_admin = None # Attribute is overwritten below the class definition member_only = None @@ -1581,6 +1583,14 @@ class AdminRole(bb.Union): # Attribute is overwritten below the class definition other = None + def is_billing_admin(self): + """ + Check if the union tag is ``billing_admin``. + + :rtype: bool + """ + return self._tag == 'billing_admin' + def is_limited_admin(self): """ Check if the union tag is ``limited_admin``. @@ -69352,6 +69362,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminAlertingTriggeredAlertType._all_field_names_ = set(['description']) AdminAlertingTriggeredAlertType._all_fields_ = [('description', AdminAlertingTriggeredAlertType.description.validator)] +AdminRole._billing_admin_validator = bv.Void() AdminRole._limited_admin_validator = bv.Void() AdminRole._member_only_validator = bv.Void() AdminRole._support_admin_validator = bv.Void() @@ -69359,6 +69370,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminRole._user_management_admin_validator = bv.Void() AdminRole._other_validator = bv.Void() AdminRole._tagmap = { + 'billing_admin': AdminRole._billing_admin_validator, 'limited_admin': AdminRole._limited_admin_validator, 'member_only': AdminRole._member_only_validator, 'support_admin': AdminRole._support_admin_validator, @@ -69367,6 +69379,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'other': AdminRole._other_validator, } +AdminRole.billing_admin = AdminRole('billing_admin') AdminRole.limited_admin = AdminRole('limited_admin') AdminRole.member_only = AdminRole('member_only') AdminRole.support_admin = AdminRole('support_admin') diff --git a/spec b/spec index 822caa80..9303b45b 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 822caa80810d2248730a0c6c61309d45f0063f29 +Subproject commit 9303b45bbfa3d1d3de75a2da609ac47c179d18ba From 1569026333daf7f28086fabd92550a6d2437b294 Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Fri, 5 Mar 2021 10:46:43 -0800 Subject: [PATCH 28/90] Move requirements.txt and test/requirements.txt as source of truth (#329) --- setup.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/setup.py b/setup.py index 6ced38d0..8880904d 100644 --- a/setup.py +++ b/setup.py @@ -24,11 +24,12 @@ break version = eval(line.split('=', 1)[1].strip()) # pylint: disable=eval-used -install_reqs = [ - 'requests >= 2.16.2', - 'six >= 1.12.0', - 'stone >= 2.*', -] +# WARNING: This imposes limitations on test/requirements.txt such that the +# full Pip syntax is not supported. See also +# . +install_reqs = [] +with open('requirements.txt') as f: + install_reqs += f.read().splitlines() setup_requires = [ # Pin pytest-runner to 5.2.0, since 5.3.0 uses `find_namespaces` directive, not supported in @@ -36,13 +37,10 @@ 'pytest-runner == 5.2.0', ] -test_reqs = [ - 'pytest', -] - # WARNING: This imposes limitations on test/requirements.txt such that the # full Pip syntax is not supported. See also # . +test_reqs = [] with open('test/requirements.txt') as f: test_reqs += f.read().splitlines() From dff9e023049795817cbd6c22e4fd8e0fc09d161a Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Tue, 9 Mar 2021 11:14:17 -0800 Subject: [PATCH 29/90] Fix setup.py dependencies by removing pull from requirements.txt (#333) * Fix setup.py dependencies by removing pull from requirements.txt * Update requirements --- requirements.txt | 8 +++++--- setup.py | 13 ++++++------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/requirements.txt b/requirements.txt index 424c847b..14e43fa5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,11 @@ +# Dependencies required for installation (keep in sync with setup.py) +requests >= 2.16.2 +six >= 1.12.0 +stone >= 2.* +# Other dependencies for development ply pytest pytest-runner -requests -six==1.14.0 sphinx twine wheel -stone>=2.* diff --git a/setup.py b/setup.py index 8880904d..01687d60 100644 --- a/setup.py +++ b/setup.py @@ -24,12 +24,11 @@ break version = eval(line.split('=', 1)[1].strip()) # pylint: disable=eval-used -# WARNING: This imposes limitations on test/requirements.txt such that the -# full Pip syntax is not supported. See also -# . -install_reqs = [] -with open('requirements.txt') as f: - install_reqs += f.read().splitlines() +install_reqs = [ + 'requests >= 2.16.2', + 'six >= 1.12.0', + 'stone >= 2.*', +] setup_requires = [ # Pin pytest-runner to 5.2.0, since 5.3.0 uses `find_namespaces` directive, not supported in @@ -64,7 +63,7 @@ url='http://www.dropbox.com/developers', # From classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', From 3f8c7aaf27aa9427fc8939e4de0a860bb5d57aea Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Tue, 9 Mar 2021 12:34:37 -0800 Subject: [PATCH 30/90] Fix status classifier in setup.py (#334) --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 01687d60..d5468ff3 100644 --- a/setup.py +++ b/setup.py @@ -63,7 +63,7 @@ url='http://www.dropbox.com/developers', # From classifiers=[ - 'Development Status :: 5 - Stable', + 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', From fc72aaa95fa474171c3b4a42ee08f06841e65108 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 24 Mar 2021 16:03:42 -0700 Subject: [PATCH 31/90] Automated Spec Update (#337) b395c3e9a318665b48e20a087cfeb6109fc3132d Change Notes: Team Log Generated Namespace: - Update ClassificationPolicyEnumWrapper to include member_and_team_folders and team_folders - Update Examples Team Member Namespace: - Update Comments Co-authored-by: Brent Bumann Co-authored-by: DropboxBot Co-authored-by: Brent Bumann --- dropbox/team.py | 3 ++- dropbox/team_log.py | 26 ++++++++++++++++++++++++++ spec | 2 +- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/dropbox/team.py b/dropbox/team.py index 75e96ad9..b6a38810 100644 --- a/dropbox/team.py +++ b/dropbox/team.py @@ -591,7 +591,8 @@ class AdminTier(bb.Union): :ivar team.AdminTier.user_management_admin: User can do most user provisioning, de-provisioning and management. :ivar team.AdminTier.support_admin: User can do a limited set of common - support tasks for existing users. + support tasks for existing users. Note: Dropbox is adding new types of + admin roles; these may display as support_admin. :ivar team.AdminTier.member_only: User is not an admin of the team. """ diff --git a/dropbox/team_log.py b/dropbox/team_log.py index e831ac20..30dd70ce 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -3366,6 +3366,10 @@ class ClassificationPolicyEnumWrapper(bb.Union): # Attribute is overwritten below the class definition enabled = None # Attribute is overwritten below the class definition + member_and_team_folders = None + # Attribute is overwritten below the class definition + team_folders = None + # Attribute is overwritten below the class definition other = None def is_disabled(self): @@ -3384,6 +3388,22 @@ def is_enabled(self): """ return self._tag == 'enabled' + def is_member_and_team_folders(self): + """ + Check if the union tag is ``member_and_team_folders``. + + :rtype: bool + """ + return self._tag == 'member_and_team_folders' + + def is_team_folders(self): + """ + Check if the union tag is ``team_folders``. + + :rtype: bool + """ + return self._tag == 'team_folders' + def is_other(self): """ Check if the union tag is ``other``. @@ -69789,15 +69809,21 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ClassificationPolicyEnumWrapper._disabled_validator = bv.Void() ClassificationPolicyEnumWrapper._enabled_validator = bv.Void() +ClassificationPolicyEnumWrapper._member_and_team_folders_validator = bv.Void() +ClassificationPolicyEnumWrapper._team_folders_validator = bv.Void() ClassificationPolicyEnumWrapper._other_validator = bv.Void() ClassificationPolicyEnumWrapper._tagmap = { 'disabled': ClassificationPolicyEnumWrapper._disabled_validator, 'enabled': ClassificationPolicyEnumWrapper._enabled_validator, + 'member_and_team_folders': ClassificationPolicyEnumWrapper._member_and_team_folders_validator, + 'team_folders': ClassificationPolicyEnumWrapper._team_folders_validator, 'other': ClassificationPolicyEnumWrapper._other_validator, } ClassificationPolicyEnumWrapper.disabled = ClassificationPolicyEnumWrapper('disabled') ClassificationPolicyEnumWrapper.enabled = ClassificationPolicyEnumWrapper('enabled') +ClassificationPolicyEnumWrapper.member_and_team_folders = ClassificationPolicyEnumWrapper('member_and_team_folders') +ClassificationPolicyEnumWrapper.team_folders = ClassificationPolicyEnumWrapper('team_folders') ClassificationPolicyEnumWrapper.other = ClassificationPolicyEnumWrapper('other') ClassificationType._personal_information_validator = bv.Void() diff --git a/spec b/spec index 9303b45b..b395c3e9 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 9303b45bbfa3d1d3de75a2da609ac47c179d18ba +Subproject commit b395c3e9a318665b48e20a087cfeb6109fc3132d From 68f9345a6a1a14092b3962e7fa5eb80446fdbd5c Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Thu, 8 Apr 2021 14:47:45 -0700 Subject: [PATCH 32/90] Automated Spec Update (#340) 397eca2ba6c0fbc453fb8832ad5c562c89fd6502 Change Notes: Shared Links Namespace: - Update Comments Team Log Generated Namespace: - Update AdminAlertCategoryEnum union to include information_governance - Add AdminConsoleAppPermission union - Add AdminConsoleAppPolicy union - Update AdminRole union to include compliance_admin, content_admin, reporting_admin, security_admin - Add AppBlockedByPermissionsDetails struct - Add AppPermissionsChangedDetails struct - Update EventDetails union to include app_blocked_by_permissions_details, app_permissions_changed_details - Add AppBlockedByPermissionsType struct - Add AppPermissionsChangedType struct - Update EventType union to include app_blocked_by_permissions, app_permissions_changed - Update EventTypeArg union to include app_blocked_by_permissions, app_permissions_changed Co-authored-by: DropboxBot --- dropbox/sharing.py | 6 +- dropbox/team_log.py | 510 ++++++++++++++++++++++++++++++++++++++++++++ spec | 2 +- 3 files changed, 515 insertions(+), 3 deletions(-) diff --git a/dropbox/sharing.py b/dropbox/sharing.py index ac17ee79..1737eb97 100644 --- a/dropbox/sharing.py +++ b/dropbox/sharing.py @@ -1303,8 +1303,10 @@ class CreateSharedLinkWithSettingsError(bb.Union): :ivar SharedLinkSettingsError CreateSharedLinkWithSettingsError.settings_error: There is an error with the given settings. - :ivar sharing.CreateSharedLinkWithSettingsError.access_denied: Access to the - requested path is forbidden. + :ivar sharing.CreateSharedLinkWithSettingsError.access_denied: The user is + not allowed to create a shared link to the specified file. For example, + this can occur if the file is restricted or if the user's links are + `banned `_. """ _catch_all = None diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 30dd70ce..eb214838 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -1085,6 +1085,8 @@ class AdminAlertCategoryEnum(bb.Union): # Attribute is overwritten below the class definition data_loss_protection = None # Attribute is overwritten below the class definition + information_governance = None + # Attribute is overwritten below the class definition malware_sharing = None # Attribute is overwritten below the class definition massive_file_operation = None @@ -1111,6 +1113,14 @@ def is_data_loss_protection(self): """ return self._tag == 'data_loss_protection' + def is_information_governance(self): + """ + Check if the union tag is ``information_governance``. + + :rtype: bool + """ + return self._tag == 'information_governance' + def is_malware_sharing(self): """ Check if the union tag is ``malware_sharing``. @@ -1560,6 +1570,104 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminAlertingTriggeredAlertType_validator = bv.Struct(AdminAlertingTriggeredAlertType) +class AdminConsoleAppPermission(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_for_listed_apps = None + # Attribute is overwritten below the class definition + default_for_unlisted_apps = None + # Attribute is overwritten below the class definition + other = None + + def is_default_for_listed_apps(self): + """ + Check if the union tag is ``default_for_listed_apps``. + + :rtype: bool + """ + return self._tag == 'default_for_listed_apps' + + def is_default_for_unlisted_apps(self): + """ + Check if the union tag is ``default_for_unlisted_apps``. + + :rtype: bool + """ + return self._tag == 'default_for_unlisted_apps' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AdminConsoleAppPermission, self)._process_custom_annotations(annotation_type, field_path, processor) + +AdminConsoleAppPermission_validator = bv.Union(AdminConsoleAppPermission) + +class AdminConsoleAppPolicy(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 + allow = None + # Attribute is overwritten below the class definition + block = None + # Attribute is overwritten below the class definition + default = 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_block(self): + """ + Check if the union tag is ``block``. + + :rtype: bool + """ + return self._tag == 'block' + + def is_default(self): + """ + Check if the union tag is ``default``. + + :rtype: bool + """ + return self._tag == 'default' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AdminConsoleAppPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) + +AdminConsoleAppPolicy_validator = bv.Union(AdminConsoleAppPolicy) + class AdminRole(bb.Union): """ This class acts as a tagged union. Only one of the ``is_*`` methods will @@ -1571,10 +1679,18 @@ class AdminRole(bb.Union): # Attribute is overwritten below the class definition billing_admin = None # Attribute is overwritten below the class definition + compliance_admin = None + # Attribute is overwritten below the class definition + content_admin = None + # Attribute is overwritten below the class definition limited_admin = None # Attribute is overwritten below the class definition member_only = None # Attribute is overwritten below the class definition + reporting_admin = None + # Attribute is overwritten below the class definition + security_admin = None + # Attribute is overwritten below the class definition support_admin = None # Attribute is overwritten below the class definition team_admin = None @@ -1591,6 +1707,22 @@ def is_billing_admin(self): """ return self._tag == 'billing_admin' + def is_compliance_admin(self): + """ + Check if the union tag is ``compliance_admin``. + + :rtype: bool + """ + return self._tag == 'compliance_admin' + + def is_content_admin(self): + """ + Check if the union tag is ``content_admin``. + + :rtype: bool + """ + return self._tag == 'content_admin' + def is_limited_admin(self): """ Check if the union tag is ``limited_admin``. @@ -1607,6 +1739,22 @@ def is_member_only(self): """ return self._tag == 'member_only' + def is_reporting_admin(self): + """ + Check if the union tag is ``reporting_admin``. + + :rtype: bool + """ + return self._tag == 'reporting_admin' + + def is_security_admin(self): + """ + Check if the union tag is ``security_admin``. + + :rtype: bool + """ + return self._tag == 'security_admin' + def is_support_admin(self): """ Check if the union tag is ``support_admin``. @@ -1817,6 +1965,56 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ApiSessionLogInfo_validator = bv.Struct(ApiSessionLogInfo) +class AppBlockedByPermissionsDetails(bb.Struct): + """ + Failed to connect app for member. + + :ivar team_log.AppBlockedByPermissionsDetails.app_info: Relevant application + details. + """ + + __slots__ = [ + '_app_info_value', + ] + + _has_required_fields = True + + def __init__(self, + app_info=None): + self._app_info_value = bb.NOT_SET + if app_info is not None: + self.app_info = app_info + + # Instance attribute type: AppLogInfo (validator is set below) + app_info = bb.Attribute("app_info", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AppBlockedByPermissionsDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +AppBlockedByPermissionsDetails_validator = bv.Struct(AppBlockedByPermissionsDetails) + +class AppBlockedByPermissionsType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AppBlockedByPermissionsType, self)._process_custom_annotations(annotation_type, field_path, processor) + +AppBlockedByPermissionsType_validator = bv.Struct(AppBlockedByPermissionsType) + class AppLinkTeamDetails(bb.Struct): """ Linked app for team. @@ -1951,6 +2149,83 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AppLogInfo_validator = bv.StructTree(AppLogInfo) +class AppPermissionsChangedDetails(bb.Struct): + """ + Changed app permissions. + + :ivar team_log.AppPermissionsChangedDetails.app_name: Name of the app. + :ivar team_log.AppPermissionsChangedDetails.permission: Permission that was + changed. + :ivar team_log.AppPermissionsChangedDetails.previous_value: Previous policy. + :ivar team_log.AppPermissionsChangedDetails.new_value: New policy. + """ + + __slots__ = [ + '_app_name_value', + '_permission_value', + '_previous_value_value', + '_new_value_value', + ] + + _has_required_fields = True + + def __init__(self, + previous_value=None, + new_value=None, + app_name=None, + permission=None): + self._app_name_value = bb.NOT_SET + self._permission_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET + if app_name is not None: + self.app_name = app_name + if permission is not None: + self.permission = permission + if previous_value is not None: + self.previous_value = previous_value + if new_value is not None: + self.new_value = new_value + + # Instance attribute type: str (validator is set below) + app_name = bb.Attribute("app_name", nullable=True) + + # Instance attribute type: AdminConsoleAppPermission (validator is set below) + permission = bb.Attribute("permission", nullable=True, user_defined=True) + + # Instance attribute type: AdminConsoleAppPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) + + # Instance attribute type: AdminConsoleAppPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AppPermissionsChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +AppPermissionsChangedDetails_validator = bv.Struct(AppPermissionsChangedDetails) + +class AppPermissionsChangedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AppPermissionsChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +AppPermissionsChangedType_validator = bv.Struct(AppPermissionsChangedType) + class AppUnlinkTeamDetails(bb.Struct): """ Unlinked app for team. @@ -7091,6 +7366,17 @@ def admin_alerting_triggered_alert_details(cls, val): """ return cls('admin_alerting_triggered_alert_details', val) + @classmethod + def app_blocked_by_permissions_details(cls, val): + """ + Create an instance of this class set to the + ``app_blocked_by_permissions_details`` tag with value ``val``. + + :param AppBlockedByPermissionsDetails val: + :rtype: EventDetails + """ + return cls('app_blocked_by_permissions_details', val) + @classmethod def app_link_team_details(cls, val): """ @@ -10877,6 +11163,17 @@ def allow_download_enabled_details(cls, val): """ return cls('allow_download_enabled_details', val) + @classmethod + def app_permissions_changed_details(cls, val): + """ + Create an instance of this class set to the + ``app_permissions_changed_details`` tag with value ``val``. + + :param AppPermissionsChangedDetails val: + :rtype: EventDetails + """ + return cls('app_permissions_changed_details', val) + @classmethod def camera_uploads_policy_changed_details(cls, val): """ @@ -12200,6 +12497,14 @@ def is_admin_alerting_triggered_alert_details(self): """ return self._tag == 'admin_alerting_triggered_alert_details' + def is_app_blocked_by_permissions_details(self): + """ + Check if the union tag is ``app_blocked_by_permissions_details``. + + :rtype: bool + """ + return self._tag == 'app_blocked_by_permissions_details' + def is_app_link_team_details(self): """ Check if the union tag is ``app_link_team_details``. @@ -14936,6 +15241,14 @@ def is_allow_download_enabled_details(self): """ return self._tag == 'allow_download_enabled_details' + def is_app_permissions_changed_details(self): + """ + Check if the union tag is ``app_permissions_changed_details``. + + :rtype: bool + """ + return self._tag == 'app_permissions_changed_details' + def is_camera_uploads_policy_changed_details(self): """ Check if the union tag is ``camera_uploads_policy_changed_details``. @@ -15892,6 +16205,16 @@ def get_admin_alerting_triggered_alert_details(self): raise AttributeError("tag 'admin_alerting_triggered_alert_details' not set") return self._value + def get_app_blocked_by_permissions_details(self): + """ + Only call this if :meth:`is_app_blocked_by_permissions_details` is true. + + :rtype: AppBlockedByPermissionsDetails + """ + if not self.is_app_blocked_by_permissions_details(): + raise AttributeError("tag 'app_blocked_by_permissions_details' not set") + return self._value + def get_app_link_team_details(self): """ Only call this if :meth:`is_app_link_team_details` is true. @@ -19312,6 +19635,16 @@ def get_allow_download_enabled_details(self): raise AttributeError("tag 'allow_download_enabled_details' not set") return self._value + def get_app_permissions_changed_details(self): + """ + Only call this if :meth:`is_app_permissions_changed_details` is true. + + :rtype: AppPermissionsChangedDetails + """ + if not self.is_app_permissions_changed_details(): + raise AttributeError("tag 'app_permissions_changed_details' not set") + return self._value + def get_camera_uploads_policy_changed_details(self): """ Only call this if :meth:`is_camera_uploads_policy_changed_details` is true. @@ -20494,6 +20827,8 @@ class EventType(bb.Union): :ivar AdminAlertingTriggeredAlertType EventType.admin_alerting_triggered_alert: (admin_alerting) Triggered security alert + :ivar AppBlockedByPermissionsType EventType.app_blocked_by_permissions: + (apps) Failed to connect app for member :ivar AppLinkTeamType EventType.app_link_team: (apps) Linked app for team :ivar AppLinkUserType EventType.app_link_user: (apps) Linked app for member :ivar AppUnlinkTeamType EventType.app_unlink_team: (apps) Unlinked app for @@ -21281,6 +21616,8 @@ class EventType(bb.Union): (team_policies) Disabled downloads (deprecated, no longer logged) :ivar AllowDownloadEnabledType EventType.allow_download_enabled: (team_policies) Enabled downloads (deprecated, no longer logged) + :ivar AppPermissionsChangedType EventType.app_permissions_changed: + (team_policies) Changed app permissions :ivar CameraUploadsPolicyChangedType EventType.camera_uploads_policy_changed: (team_policies) Changed camera uploads setting for team @@ -21628,6 +21965,17 @@ def admin_alerting_triggered_alert(cls, val): """ return cls('admin_alerting_triggered_alert', val) + @classmethod + def app_blocked_by_permissions(cls, val): + """ + Create an instance of this class set to the + ``app_blocked_by_permissions`` tag with value ``val``. + + :param AppBlockedByPermissionsType val: + :rtype: EventType + """ + return cls('app_blocked_by_permissions', val) + @classmethod def app_link_team(cls, val): """ @@ -25394,6 +25742,17 @@ def allow_download_enabled(cls, val): """ return cls('allow_download_enabled', val) + @classmethod + def app_permissions_changed(cls, val): + """ + Create an instance of this class set to the ``app_permissions_changed`` + tag with value ``val``. + + :param AppPermissionsChangedType val: + :rtype: EventType + """ + return cls('app_permissions_changed', val) + @classmethod def camera_uploads_policy_changed(cls, val): """ @@ -26687,6 +27046,14 @@ def is_admin_alerting_triggered_alert(self): """ return self._tag == 'admin_alerting_triggered_alert' + def is_app_blocked_by_permissions(self): + """ + Check if the union tag is ``app_blocked_by_permissions``. + + :rtype: bool + """ + return self._tag == 'app_blocked_by_permissions' + def is_app_link_team(self): """ Check if the union tag is ``app_link_team``. @@ -29423,6 +29790,14 @@ def is_allow_download_enabled(self): """ return self._tag == 'allow_download_enabled' + def is_app_permissions_changed(self): + """ + Check if the union tag is ``app_permissions_changed``. + + :rtype: bool + """ + return self._tag == 'app_permissions_changed' + def is_camera_uploads_policy_changed(self): """ Check if the union tag is ``camera_uploads_policy_changed``. @@ -30375,6 +30750,18 @@ def get_admin_alerting_triggered_alert(self): raise AttributeError("tag 'admin_alerting_triggered_alert' not set") return self._value + def get_app_blocked_by_permissions(self): + """ + (apps) Failed to connect app for member + + Only call this if :meth:`is_app_blocked_by_permissions` is true. + + :rtype: AppBlockedByPermissionsType + """ + if not self.is_app_blocked_by_permissions(): + raise AttributeError("tag 'app_blocked_by_permissions' not set") + return self._value + def get_app_link_team(self): """ (apps) Linked app for team @@ -34523,6 +34910,18 @@ def get_allow_download_enabled(self): raise AttributeError("tag 'allow_download_enabled' not set") return self._value + def get_app_permissions_changed(self): + """ + (team_policies) Changed app permissions + + Only call this if :meth:`is_app_permissions_changed` is true. + + :rtype: AppPermissionsChangedType + """ + if not self.is_app_permissions_changed(): + raise AttributeError("tag 'app_permissions_changed' not set") + return self._value + def get_camera_uploads_policy_changed(self): """ (team_policies) Changed camera uploads setting for team @@ -35956,6 +36355,8 @@ class EventTypeArg(bb.Union): (admin_alerting) Changed an alert setting :ivar team_log.EventTypeArg.admin_alerting_triggered_alert: (admin_alerting) Triggered security alert + :ivar team_log.EventTypeArg.app_blocked_by_permissions: (apps) Failed to + connect app for member :ivar team_log.EventTypeArg.app_link_team: (apps) Linked app for team :ivar team_log.EventTypeArg.app_link_user: (apps) Linked app for member :ivar team_log.EventTypeArg.app_unlink_team: (apps) Unlinked app for team @@ -36631,6 +37032,8 @@ class EventTypeArg(bb.Union): Disabled downloads (deprecated, no longer logged) :ivar team_log.EventTypeArg.allow_download_enabled: (team_policies) Enabled downloads (deprecated, no longer logged) + :ivar team_log.EventTypeArg.app_permissions_changed: (team_policies) Changed + app permissions :ivar team_log.EventTypeArg.camera_uploads_policy_changed: (team_policies) Changed camera uploads setting for team :ivar team_log.EventTypeArg.classification_change_policy: (team_policies) @@ -36907,6 +37310,8 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition admin_alerting_triggered_alert = None # Attribute is overwritten below the class definition + app_blocked_by_permissions = None + # Attribute is overwritten below the class definition app_link_team = None # Attribute is overwritten below the class definition app_link_user = None @@ -37591,6 +37996,8 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition allow_download_enabled = None # Attribute is overwritten below the class definition + app_permissions_changed = None + # Attribute is overwritten below the class definition camera_uploads_policy_changed = None # Attribute is overwritten below the class definition classification_change_policy = None @@ -37839,6 +38246,14 @@ def is_admin_alerting_triggered_alert(self): """ return self._tag == 'admin_alerting_triggered_alert' + def is_app_blocked_by_permissions(self): + """ + Check if the union tag is ``app_blocked_by_permissions``. + + :rtype: bool + """ + return self._tag == 'app_blocked_by_permissions' + def is_app_link_team(self): """ Check if the union tag is ``app_link_team``. @@ -40575,6 +40990,14 @@ def is_allow_download_enabled(self): """ return self._tag == 'allow_download_enabled' + def is_app_permissions_changed(self): + """ + Check if the union tag is ``app_permissions_changed``. + + :rtype: bool + """ + return self._tag == 'app_permissions_changed' + def is_camera_uploads_policy_changed(self): """ Check if the union tag is ``camera_uploads_policy_changed``. @@ -69246,6 +69669,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminAlertCategoryEnum._account_takeover_validator = bv.Void() AdminAlertCategoryEnum._data_loss_protection_validator = bv.Void() +AdminAlertCategoryEnum._information_governance_validator = bv.Void() AdminAlertCategoryEnum._malware_sharing_validator = bv.Void() AdminAlertCategoryEnum._massive_file_operation_validator = bv.Void() AdminAlertCategoryEnum._na_validator = bv.Void() @@ -69254,6 +69678,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminAlertCategoryEnum._tagmap = { 'account_takeover': AdminAlertCategoryEnum._account_takeover_validator, 'data_loss_protection': AdminAlertCategoryEnum._data_loss_protection_validator, + 'information_governance': AdminAlertCategoryEnum._information_governance_validator, 'malware_sharing': AdminAlertCategoryEnum._malware_sharing_validator, 'massive_file_operation': AdminAlertCategoryEnum._massive_file_operation_validator, 'na': AdminAlertCategoryEnum._na_validator, @@ -69263,6 +69688,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminAlertCategoryEnum.account_takeover = AdminAlertCategoryEnum('account_takeover') AdminAlertCategoryEnum.data_loss_protection = AdminAlertCategoryEnum('data_loss_protection') +AdminAlertCategoryEnum.information_governance = AdminAlertCategoryEnum('information_governance') AdminAlertCategoryEnum.malware_sharing = AdminAlertCategoryEnum('malware_sharing') AdminAlertCategoryEnum.massive_file_operation = AdminAlertCategoryEnum('massive_file_operation') AdminAlertCategoryEnum.na = AdminAlertCategoryEnum('na') @@ -69382,17 +69808,54 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminAlertingTriggeredAlertType._all_field_names_ = set(['description']) AdminAlertingTriggeredAlertType._all_fields_ = [('description', AdminAlertingTriggeredAlertType.description.validator)] +AdminConsoleAppPermission._default_for_listed_apps_validator = bv.Void() +AdminConsoleAppPermission._default_for_unlisted_apps_validator = bv.Void() +AdminConsoleAppPermission._other_validator = bv.Void() +AdminConsoleAppPermission._tagmap = { + 'default_for_listed_apps': AdminConsoleAppPermission._default_for_listed_apps_validator, + 'default_for_unlisted_apps': AdminConsoleAppPermission._default_for_unlisted_apps_validator, + 'other': AdminConsoleAppPermission._other_validator, +} + +AdminConsoleAppPermission.default_for_listed_apps = AdminConsoleAppPermission('default_for_listed_apps') +AdminConsoleAppPermission.default_for_unlisted_apps = AdminConsoleAppPermission('default_for_unlisted_apps') +AdminConsoleAppPermission.other = AdminConsoleAppPermission('other') + +AdminConsoleAppPolicy._allow_validator = bv.Void() +AdminConsoleAppPolicy._block_validator = bv.Void() +AdminConsoleAppPolicy._default_validator = bv.Void() +AdminConsoleAppPolicy._other_validator = bv.Void() +AdminConsoleAppPolicy._tagmap = { + 'allow': AdminConsoleAppPolicy._allow_validator, + 'block': AdminConsoleAppPolicy._block_validator, + 'default': AdminConsoleAppPolicy._default_validator, + 'other': AdminConsoleAppPolicy._other_validator, +} + +AdminConsoleAppPolicy.allow = AdminConsoleAppPolicy('allow') +AdminConsoleAppPolicy.block = AdminConsoleAppPolicy('block') +AdminConsoleAppPolicy.default = AdminConsoleAppPolicy('default') +AdminConsoleAppPolicy.other = AdminConsoleAppPolicy('other') + AdminRole._billing_admin_validator = bv.Void() +AdminRole._compliance_admin_validator = bv.Void() +AdminRole._content_admin_validator = bv.Void() AdminRole._limited_admin_validator = bv.Void() AdminRole._member_only_validator = bv.Void() +AdminRole._reporting_admin_validator = bv.Void() +AdminRole._security_admin_validator = bv.Void() AdminRole._support_admin_validator = bv.Void() AdminRole._team_admin_validator = bv.Void() AdminRole._user_management_admin_validator = bv.Void() AdminRole._other_validator = bv.Void() AdminRole._tagmap = { 'billing_admin': AdminRole._billing_admin_validator, + 'compliance_admin': AdminRole._compliance_admin_validator, + 'content_admin': AdminRole._content_admin_validator, 'limited_admin': AdminRole._limited_admin_validator, 'member_only': AdminRole._member_only_validator, + 'reporting_admin': AdminRole._reporting_admin_validator, + 'security_admin': AdminRole._security_admin_validator, 'support_admin': AdminRole._support_admin_validator, 'team_admin': AdminRole._team_admin_validator, 'user_management_admin': AdminRole._user_management_admin_validator, @@ -69400,8 +69863,12 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): } AdminRole.billing_admin = AdminRole('billing_admin') +AdminRole.compliance_admin = AdminRole('compliance_admin') +AdminRole.content_admin = AdminRole('content_admin') AdminRole.limited_admin = AdminRole('limited_admin') AdminRole.member_only = AdminRole('member_only') +AdminRole.reporting_admin = AdminRole('reporting_admin') +AdminRole.security_admin = AdminRole('security_admin') AdminRole.support_admin = AdminRole('support_admin') AdminRole.team_admin = AdminRole('team_admin') AdminRole.user_management_admin = AdminRole('user_management_admin') @@ -69444,6 +69911,14 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ApiSessionLogInfo._all_field_names_ = set(['request_id']) ApiSessionLogInfo._all_fields_ = [('request_id', ApiSessionLogInfo.request_id.validator)] +AppBlockedByPermissionsDetails.app_info.validator = AppLogInfo_validator +AppBlockedByPermissionsDetails._all_field_names_ = set(['app_info']) +AppBlockedByPermissionsDetails._all_fields_ = [('app_info', AppBlockedByPermissionsDetails.app_info.validator)] + +AppBlockedByPermissionsType.description.validator = bv.String() +AppBlockedByPermissionsType._all_field_names_ = set(['description']) +AppBlockedByPermissionsType._all_fields_ = [('description', AppBlockedByPermissionsType.description.validator)] + AppLinkTeamDetails.app_info.validator = AppLogInfo_validator AppLinkTeamDetails._all_field_names_ = set(['app_info']) AppLinkTeamDetails._all_fields_ = [('app_info', AppLinkTeamDetails.app_info.validator)] @@ -69485,6 +69960,27 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): } AppLogInfo._is_catch_all_ = True +AppPermissionsChangedDetails.app_name.validator = bv.Nullable(bv.String()) +AppPermissionsChangedDetails.permission.validator = bv.Nullable(AdminConsoleAppPermission_validator) +AppPermissionsChangedDetails.previous_value.validator = AdminConsoleAppPolicy_validator +AppPermissionsChangedDetails.new_value.validator = AdminConsoleAppPolicy_validator +AppPermissionsChangedDetails._all_field_names_ = set([ + 'app_name', + 'permission', + 'previous_value', + 'new_value', +]) +AppPermissionsChangedDetails._all_fields_ = [ + ('app_name', AppPermissionsChangedDetails.app_name.validator), + ('permission', AppPermissionsChangedDetails.permission.validator), + ('previous_value', AppPermissionsChangedDetails.previous_value.validator), + ('new_value', AppPermissionsChangedDetails.new_value.validator), +] + +AppPermissionsChangedType.description.validator = bv.String() +AppPermissionsChangedType._all_field_names_ = set(['description']) +AppPermissionsChangedType._all_fields_ = [('description', AppPermissionsChangedType.description.validator)] + AppUnlinkTeamDetails.app_info.validator = AppLogInfo_validator AppUnlinkTeamDetails._all_field_names_ = set(['app_info']) AppUnlinkTeamDetails._all_fields_ = [('app_info', AppUnlinkTeamDetails.app_info.validator)] @@ -70650,6 +71146,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._admin_alerting_changed_alert_config_details_validator = AdminAlertingChangedAlertConfigDetails_validator EventDetails._admin_alerting_triggered_alert_details_validator = AdminAlertingTriggeredAlertDetails_validator +EventDetails._app_blocked_by_permissions_details_validator = AppBlockedByPermissionsDetails_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 @@ -70992,6 +71489,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 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._app_permissions_changed_details_validator = AppPermissionsChangedDetails_validator EventDetails._camera_uploads_policy_changed_details_validator = CameraUploadsPolicyChangedDetails_validator EventDetails._classification_change_policy_details_validator = ClassificationChangePolicyDetails_validator EventDetails._computer_backup_policy_changed_details_validator = ComputerBackupPolicyChangedDetails_validator @@ -71112,6 +71610,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._tagmap = { 'admin_alerting_changed_alert_config_details': EventDetails._admin_alerting_changed_alert_config_details_validator, 'admin_alerting_triggered_alert_details': EventDetails._admin_alerting_triggered_alert_details_validator, + 'app_blocked_by_permissions_details': EventDetails._app_blocked_by_permissions_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, @@ -71454,6 +71953,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): '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, + 'app_permissions_changed_details': EventDetails._app_permissions_changed_details_validator, 'camera_uploads_policy_changed_details': EventDetails._camera_uploads_policy_changed_details_validator, 'classification_change_policy_details': EventDetails._classification_change_policy_details_validator, 'computer_backup_policy_changed_details': EventDetails._computer_backup_policy_changed_details_validator, @@ -71577,6 +72077,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._admin_alerting_changed_alert_config_validator = AdminAlertingChangedAlertConfigType_validator EventType._admin_alerting_triggered_alert_validator = AdminAlertingTriggeredAlertType_validator +EventType._app_blocked_by_permissions_validator = AppBlockedByPermissionsType_validator EventType._app_link_team_validator = AppLinkTeamType_validator EventType._app_link_user_validator = AppLinkUserType_validator EventType._app_unlink_team_validator = AppUnlinkTeamType_validator @@ -71919,6 +72420,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._account_capture_change_policy_validator = AccountCaptureChangePolicyType_validator EventType._allow_download_disabled_validator = AllowDownloadDisabledType_validator EventType._allow_download_enabled_validator = AllowDownloadEnabledType_validator +EventType._app_permissions_changed_validator = AppPermissionsChangedType_validator EventType._camera_uploads_policy_changed_validator = CameraUploadsPolicyChangedType_validator EventType._classification_change_policy_validator = ClassificationChangePolicyType_validator EventType._computer_backup_policy_changed_validator = ComputerBackupPolicyChangedType_validator @@ -72038,6 +72540,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._tagmap = { 'admin_alerting_changed_alert_config': EventType._admin_alerting_changed_alert_config_validator, 'admin_alerting_triggered_alert': EventType._admin_alerting_triggered_alert_validator, + 'app_blocked_by_permissions': EventType._app_blocked_by_permissions_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, @@ -72380,6 +72883,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): '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, + 'app_permissions_changed': EventType._app_permissions_changed_validator, 'camera_uploads_policy_changed': EventType._camera_uploads_policy_changed_validator, 'classification_change_policy': EventType._classification_change_policy_validator, 'computer_backup_policy_changed': EventType._computer_backup_policy_changed_validator, @@ -72502,6 +73006,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._admin_alerting_changed_alert_config_validator = bv.Void() EventTypeArg._admin_alerting_triggered_alert_validator = bv.Void() +EventTypeArg._app_blocked_by_permissions_validator = bv.Void() EventTypeArg._app_link_team_validator = bv.Void() EventTypeArg._app_link_user_validator = bv.Void() EventTypeArg._app_unlink_team_validator = bv.Void() @@ -72844,6 +73349,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._account_capture_change_policy_validator = bv.Void() EventTypeArg._allow_download_disabled_validator = bv.Void() EventTypeArg._allow_download_enabled_validator = bv.Void() +EventTypeArg._app_permissions_changed_validator = bv.Void() EventTypeArg._camera_uploads_policy_changed_validator = bv.Void() EventTypeArg._classification_change_policy_validator = bv.Void() EventTypeArg._computer_backup_policy_changed_validator = bv.Void() @@ -72963,6 +73469,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._tagmap = { 'admin_alerting_changed_alert_config': EventTypeArg._admin_alerting_changed_alert_config_validator, 'admin_alerting_triggered_alert': EventTypeArg._admin_alerting_triggered_alert_validator, + 'app_blocked_by_permissions': EventTypeArg._app_blocked_by_permissions_validator, 'app_link_team': EventTypeArg._app_link_team_validator, 'app_link_user': EventTypeArg._app_link_user_validator, 'app_unlink_team': EventTypeArg._app_unlink_team_validator, @@ -73305,6 +73812,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'account_capture_change_policy': EventTypeArg._account_capture_change_policy_validator, 'allow_download_disabled': EventTypeArg._allow_download_disabled_validator, 'allow_download_enabled': EventTypeArg._allow_download_enabled_validator, + 'app_permissions_changed': EventTypeArg._app_permissions_changed_validator, 'camera_uploads_policy_changed': EventTypeArg._camera_uploads_policy_changed_validator, 'classification_change_policy': EventTypeArg._classification_change_policy_validator, 'computer_backup_policy_changed': EventTypeArg._computer_backup_policy_changed_validator, @@ -73425,6 +73933,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.admin_alerting_changed_alert_config = EventTypeArg('admin_alerting_changed_alert_config') EventTypeArg.admin_alerting_triggered_alert = EventTypeArg('admin_alerting_triggered_alert') +EventTypeArg.app_blocked_by_permissions = EventTypeArg('app_blocked_by_permissions') EventTypeArg.app_link_team = EventTypeArg('app_link_team') EventTypeArg.app_link_user = EventTypeArg('app_link_user') EventTypeArg.app_unlink_team = EventTypeArg('app_unlink_team') @@ -73767,6 +74276,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.account_capture_change_policy = EventTypeArg('account_capture_change_policy') EventTypeArg.allow_download_disabled = EventTypeArg('allow_download_disabled') EventTypeArg.allow_download_enabled = EventTypeArg('allow_download_enabled') +EventTypeArg.app_permissions_changed = EventTypeArg('app_permissions_changed') EventTypeArg.camera_uploads_policy_changed = EventTypeArg('camera_uploads_policy_changed') EventTypeArg.classification_change_policy = EventTypeArg('classification_change_policy') EventTypeArg.computer_backup_policy_changed = EventTypeArg('computer_backup_policy_changed') diff --git a/spec b/spec index b395c3e9..397eca2b 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit b395c3e9a318665b48e20a087cfeb6109fc3132d +Subproject commit 397eca2ba6c0fbc453fb8832ad5c562c89fd6502 From a812d565542f0a38b0aa25dee62ac3c7a87049d6 Mon Sep 17 00:00:00 2001 From: mtruong-dbx <77769746+mtruong-dbx@users.noreply.github.com> Date: Thu, 8 Apr 2021 15:28:57 -0700 Subject: [PATCH 33/90] Update Release Notes Generator to Fetch Latest Tags (#341) --- scripts/release_note_generator.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/release_note_generator.sh b/scripts/release_note_generator.sh index be7d47d3..53e60523 100644 --- a/scripts/release_note_generator.sh +++ b/scripts/release_note_generator.sh @@ -1,5 +1,6 @@ #!/bin/sh +git fetch origin --tags last_version=$(git tag --sort v:refname | tail -n 2 | head -n 1) echo "Getting commit history since $last_version" num_commits=$(git rev-list --count $last_version..HEAD) From c081d1fbd902705c6d01a0a096b5a2eb6d97cd33 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Apr 2021 14:30:18 -0700 Subject: [PATCH 34/90] Bump codecov/codecov-action from v1.2.1 to v1.3.2 (#339) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.2.1 to v1.3.2. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v1.2.1...9b0b9bbe2c64e9ed41413180dd7398450dfeee14) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brad Rogers --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 27e9c623..c0aee896 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -28,7 +28,7 @@ jobs: coverage run --rcfile=.coveragerc -m pytest test/unit/test_dropbox_unit.py coverage xml - name: Publish Coverage - uses: codecov/codecov-action@v1.2.1 + uses: codecov/codecov-action@v1.3.2 with: flags: unit fail_ci_if_error: true \ No newline at end of file From 9ad41fb0b4bb6f30022d6b0257b6e6762812a84d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Apr 2021 14:34:40 -0700 Subject: [PATCH 35/90] Bump actions/setup-python from v2.2.1 to v2.2.2 (#342) Bumps [actions/setup-python](https://github.com/actions/setup-python) from v2.2.1 to v2.2.2. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v2.2.1...dc73133d4da04e56a135ae2246682783cc7c7cb6) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brad Rogers --- .github/workflows/ci.yml | 4 ++-- .github/workflows/coverage.yml | 2 +- .github/workflows/pypiupload.yml | 2 +- .github/workflows/spec_update.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1794e6b8..00cd7197 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup Python environment - uses: actions/setup-python@v2.2.1 + uses: actions/setup-python@v2.2.2 with: python-version: ${{ matrix.python-version }} - name: Install Requirements @@ -42,7 +42,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup Python environment - uses: actions/setup-python@v2.2.1 + uses: actions/setup-python@v2.2.2 with: python-version: '3.7' - name: Install Requirements diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index c0aee896..28e1f52e 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup Python environment - uses: actions/setup-python@v2.2.1 + uses: actions/setup-python@v2.2.2 with: python-version: '3.7' - name: Install Requirements diff --git a/.github/workflows/pypiupload.yml b/.github/workflows/pypiupload.yml index 3ff68779..3c7f1675 100644 --- a/.github/workflows/pypiupload.yml +++ b/.github/workflows/pypiupload.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup Python - uses: actions/setup-python@v2.2.1 + uses: actions/setup-python@v2.2.2 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/spec_update.yml b/.github/workflows/spec_update.yml index d8de3fc6..f28e2895 100644 --- a/.github/workflows/spec_update.yml +++ b/.github/workflows/spec_update.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup Python environment - uses: actions/setup-python@v2.2.1 + uses: actions/setup-python@v2.2.2 with: python-version: 2.7 - name: Get current time From 0ed955035dc5c2aa85ccbf773df21c40b35d74ba Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 14 Apr 2021 14:44:27 -0700 Subject: [PATCH 36/90] Automated Spec Update (#344) 01bee3a2c93573383fac8430a43c2a5ac250b7d7 Change Notes: Team Members Namespace: - Add members/get_available_team_member_roles route - Add MembersGetAvailableTeamMemberRolesResult and TeamMemberRole structs Co-authored-by: DropboxBot Co-authored-by: Brad Rogers --- dropbox/base_team.py | 45 +++++++ dropbox/team.py | 312 +++++++++++++++++++++++++++++++++++++++++++ spec | 2 +- 3 files changed, 358 insertions(+), 1 deletion(-) diff --git a/dropbox/base_team.py b/dropbox/base_team.py index d6483e9e..07825526 100644 --- a/dropbox/base_team.py +++ b/dropbox/base_team.py @@ -1276,6 +1276,23 @@ def team_members_delete_profile_photo(self, ) return r + def team_members_get_available_team_member_roles(self): + """ + Get available TeamMemberRoles for the connected team. To be used with + :meth:`team_members_set_admin_permissions_v2`. Permission : Team member + management. + + :rtype: :class:`dropbox.team.MembersGetAvailableTeamMemberRolesResult` + """ + arg = None + r = self.request( + team.members_get_available_team_member_roles, + 'team', + arg, + None, + ) + return r + def team_members_get_info(self, members): """ @@ -1607,6 +1624,34 @@ def team_members_send_welcome_email(self, ) return None + def team_members_set_admin_permissions_v2(self, + user, + new_roles=None): + """ + 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 Nullable[List[str]] new_roles: The new roles for the member. Send + empty list to make user member only. For now, only up to one role is + allowed. + :rtype: :class:`dropbox.team.MembersSetPermissions2Result` + :raises: :class:`.exceptions.ApiError` + + If this raises, ApiError will contain: + :class:`dropbox.team.MembersSetPermissions2Error` + """ + arg = team.MembersSetPermissions2Arg(user, + new_roles) + r = self.request( + team.members_set_admin_permissions_v2, + 'team', + arg, + None, + ) + return r + def team_members_set_admin_permissions(self, user, new_role): diff --git a/dropbox/team.py b/dropbox/team.py index b6a38810..07c00162 100644 --- a/dropbox/team.py +++ b/dropbox/team.py @@ -7421,6 +7421,34 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersDeleteProfilePhotoError_validator = bv.Union(MembersDeleteProfilePhotoError) +class MembersGetAvailableTeamMemberRolesResult(bb.Struct): + """ + Available TeamMemberRole for the connected team. To be used with + :meth:`dropbox.dropbox_client.Dropbox.team_members_set_admin_permissions`. + + :ivar team.MembersGetAvailableTeamMemberRolesResult.roles: Available roles. + """ + + __slots__ = [ + '_roles_value', + ] + + _has_required_fields = True + + def __init__(self, + roles=None): + self._roles_value = bb.NOT_SET + if roles is not None: + self.roles = roles + + # Instance attribute type: list of [TeamMemberRole] (validator is set below) + roles = bb.Attribute("roles") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(MembersGetAvailableTeamMemberRolesResult, self)._process_custom_annotations(annotation_type, field_path, processor) + +MembersGetAvailableTeamMemberRolesResult_validator = bv.Struct(MembersGetAvailableTeamMemberRolesResult) + class MembersGetInfoArgs(bb.Struct): """ :ivar team.MembersGetInfoArgs.members: List of team members. @@ -8225,6 +8253,157 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersSendWelcomeError_validator = bv.Union(MembersSendWelcomeError) +class MembersSetPermissions2Arg(bb.Struct): + """ + Exactly one of team_member_id, email, or external_id must be provided to + identify the user account. + + :ivar team.MembersSetPermissions2Arg.user: Identity of user whose role will + be set. + :ivar team.MembersSetPermissions2Arg.new_roles: The new roles for the + member. Send empty list to make user member only. For now, only up to + one role is allowed. + """ + + __slots__ = [ + '_user_value', + '_new_roles_value', + ] + + _has_required_fields = True + + def __init__(self, + user=None, + new_roles=None): + self._user_value = bb.NOT_SET + self._new_roles_value = bb.NOT_SET + if user is not None: + self.user = user + if new_roles is not None: + self.new_roles = new_roles + + # Instance attribute type: UserSelectorArg (validator is set below) + user = bb.Attribute("user", user_defined=True) + + # Instance attribute type: list of [str] (validator is set below) + new_roles = bb.Attribute("new_roles", nullable=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(MembersSetPermissions2Arg, self)._process_custom_annotations(annotation_type, field_path, processor) + +MembersSetPermissions2Arg_validator = bv.Struct(MembersSetPermissions2Arg) + +class MembersSetPermissions2Error(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 team.MembersSetPermissions2Error.last_admin: Cannot remove the admin + setting of the last admin. + :ivar team.MembersSetPermissions2Error.user_not_in_team: The user is not a + member of the team. + :ivar team.MembersSetPermissions2Error.cannot_set_permissions: Cannot + remove/grant permissions. This can happen if the team member is + suspended. + :ivar team.MembersSetPermissions2Error.role_not_found: No matching role + found. At least one of the provided new_roles does not exist on this + team. + """ + + _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 + role_not_found = 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_role_not_found(self): + """ + Check if the union tag is ``role_not_found``. + + :rtype: bool + """ + return self._tag == 'role_not_found' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(MembersSetPermissions2Error, self)._process_custom_annotations(annotation_type, field_path, processor) + +MembersSetPermissions2Error_validator = bv.Union(MembersSetPermissions2Error) + +class MembersSetPermissions2Result(bb.Struct): + """ + :ivar team.MembersSetPermissions2Result.team_member_id: The member ID of the + user to which the change was applied. + :ivar team.MembersSetPermissions2Result.roles: The roles after the change. + Empty in case the user become a non-admin. + """ + + __slots__ = [ + '_team_member_id_value', + '_roles_value', + ] + + _has_required_fields = True + + def __init__(self, + team_member_id=None, + roles=None): + self._team_member_id_value = bb.NOT_SET + self._roles_value = bb.NOT_SET + if team_member_id is not None: + self.team_member_id = team_member_id + if roles is not None: + self.roles = roles + + # Instance attribute type: str (validator is set below) + team_member_id = bb.Attribute("team_member_id") + + # Instance attribute type: list of [TeamMemberRole] (validator is set below) + roles = bb.Attribute("roles", nullable=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(MembersSetPermissions2Result, self)._process_custom_annotations(annotation_type, field_path, processor) + +MembersSetPermissions2Result_validator = bv.Struct(MembersSetPermissions2Result) + class MembersSetPermissionsArg(bb.Struct): """ Exactly one of team_member_id, email, or external_id must be provided to @@ -11297,6 +11476,54 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamMemberProfile_validator = bv.Struct(TeamMemberProfile) +class TeamMemberRole(bb.Struct): + """ + A role which can be attached to a team member. This replaces AdminTier; each + AdminTier corresponds to a new TeamMemberRole with a matching name. + + :ivar team.TeamMemberRole.role_id: A string containing encoded role ID. For + roles defined by Dropbox, this is the same across all teams. + :ivar team.TeamMemberRole.name: The role display name. + :ivar team.TeamMemberRole.description: Role description. Describes which + permissions come with this role. + """ + + __slots__ = [ + '_role_id_value', + '_name_value', + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + role_id=None, + name=None, + description=None): + self._role_id_value = bb.NOT_SET + self._name_value = bb.NOT_SET + self._description_value = bb.NOT_SET + if role_id is not None: + self.role_id = role_id + if name is not None: + self.name = name + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + role_id = bb.Attribute("role_id") + + # Instance attribute type: str (validator is set below) + name = bb.Attribute("name") + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamMemberRole, self)._process_custom_annotations(annotation_type, field_path, processor) + +TeamMemberRole_validator = bv.Struct(TeamMemberRole) + class TeamMemberStatus(bb.Union): """ The user's status as a member of a specific team. @@ -12592,6 +12819,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): Path_validator = bv.String(pattern=u'(/(.|[\\r\\n])*)?') SecondaryEmail_validator = secondary_emails.SecondaryEmail_validator SecondaryEmail = secondary_emails.SecondaryEmail +TeamMemberRoleId_validator = bv.String(max_length=128, pattern=u'pid_dbtmr:.*') UserQuota_validator = bv.UInt32(min_value=15) DeviceSession.session_id.validator = bv.String() DeviceSession.ip_address.validator = bv.Nullable(bv.String()) @@ -14210,6 +14438,10 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersDeleteProfilePhotoError.set_profile_disallowed = MembersDeleteProfilePhotoError('set_profile_disallowed') MembersDeleteProfilePhotoError.other = MembersDeleteProfilePhotoError('other') +MembersGetAvailableTeamMemberRolesResult.roles.validator = bv.List(TeamMemberRole_validator) +MembersGetAvailableTeamMemberRolesResult._all_field_names_ = set(['roles']) +MembersGetAvailableTeamMemberRolesResult._all_fields_ = [('roles', MembersGetAvailableTeamMemberRolesResult.roles.validator)] + MembersGetInfoArgs.members.validator = bv.List(UserSelectorArg_validator) MembersGetInfoArgs._all_field_names_ = set(['members']) MembersGetInfoArgs._all_fields_ = [('members', MembersGetInfoArgs.members.validator)] @@ -14401,6 +14633,48 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersSendWelcomeError.other = MembersSendWelcomeError('other') +MembersSetPermissions2Arg.user.validator = UserSelectorArg_validator +MembersSetPermissions2Arg.new_roles.validator = bv.Nullable(bv.List(TeamMemberRoleId_validator, max_items=1)) +MembersSetPermissions2Arg._all_field_names_ = set([ + 'user', + 'new_roles', +]) +MembersSetPermissions2Arg._all_fields_ = [ + ('user', MembersSetPermissions2Arg.user.validator), + ('new_roles', MembersSetPermissions2Arg.new_roles.validator), +] + +MembersSetPermissions2Error._last_admin_validator = bv.Void() +MembersSetPermissions2Error._user_not_in_team_validator = bv.Void() +MembersSetPermissions2Error._cannot_set_permissions_validator = bv.Void() +MembersSetPermissions2Error._role_not_found_validator = bv.Void() +MembersSetPermissions2Error._other_validator = bv.Void() +MembersSetPermissions2Error._tagmap = { + 'last_admin': MembersSetPermissions2Error._last_admin_validator, + 'user_not_in_team': MembersSetPermissions2Error._user_not_in_team_validator, + 'cannot_set_permissions': MembersSetPermissions2Error._cannot_set_permissions_validator, + 'role_not_found': MembersSetPermissions2Error._role_not_found_validator, + 'other': MembersSetPermissions2Error._other_validator, +} +MembersSetPermissions2Error._tagmap.update(UserSelectorError._tagmap) + +MembersSetPermissions2Error.last_admin = MembersSetPermissions2Error('last_admin') +MembersSetPermissions2Error.user_not_in_team = MembersSetPermissions2Error('user_not_in_team') +MembersSetPermissions2Error.cannot_set_permissions = MembersSetPermissions2Error('cannot_set_permissions') +MembersSetPermissions2Error.role_not_found = MembersSetPermissions2Error('role_not_found') +MembersSetPermissions2Error.other = MembersSetPermissions2Error('other') + +MembersSetPermissions2Result.team_member_id.validator = team_common.TeamMemberId_validator +MembersSetPermissions2Result.roles.validator = bv.Nullable(bv.List(TeamMemberRole_validator)) +MembersSetPermissions2Result._all_field_names_ = set([ + 'team_member_id', + 'roles', +]) +MembersSetPermissions2Result._all_fields_ = [ + ('team_member_id', MembersSetPermissions2Result.team_member_id.validator), + ('roles', MembersSetPermissions2Result.roles.validator), +] + MembersSetPermissionsArg.user.validator = UserSelectorArg_validator MembersSetPermissionsArg.new_role.validator = AdminTier_validator MembersSetPermissionsArg._all_field_names_ = set([ @@ -15091,6 +15365,20 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('member_folder_id', TeamMemberProfile.member_folder_id.validator), ] +TeamMemberRole.role_id.validator = TeamMemberRoleId_validator +TeamMemberRole.name.validator = bv.String(max_length=32) +TeamMemberRole.description.validator = bv.String(max_length=256) +TeamMemberRole._all_field_names_ = set([ + 'role_id', + 'name', + 'description', +]) +TeamMemberRole._all_fields_ = [ + ('role_id', TeamMemberRole.role_id.validator), + ('name', TeamMemberRole.name.validator), + ('description', TeamMemberRole.description.validator), +] + TeamMemberStatus._active_validator = bv.Void() TeamMemberStatus._invited_validator = bv.Void() TeamMemberStatus._suspended_validator = bv.Void() @@ -15802,6 +16090,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'host': u'api', 'style': u'rpc'}, ) +members_get_available_team_member_roles = bb.Route( + 'members/get_available_team_member_roles', + 1, + False, + bv.Void(), + MembersGetAvailableTeamMemberRolesResult_validator, + bv.Void(), + {'auth': u'team', + 'host': u'api', + 'style': u'rpc'}, +) members_get_info = bb.Route( 'members/get_info', 1, @@ -15934,6 +16233,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'host': u'api', 'style': u'rpc'}, ) +members_set_admin_permissions_v2 = bb.Route( + 'members/set_admin_permissions', + 2, + False, + MembersSetPermissions2Arg_validator, + MembersSetPermissions2Result_validator, + MembersSetPermissions2Error_validator, + {'auth': u'team', + 'host': u'api', + 'style': u'rpc'}, +) members_set_admin_permissions = bb.Route( 'members/set_admin_permissions', 1, @@ -16263,6 +16573,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'members/add': members_add, 'members/add/job_status/get': members_add_job_status_get, 'members/delete_profile_photo': members_delete_profile_photo, + 'members/get_available_team_member_roles': members_get_available_team_member_roles, 'members/get_info': members_get_info, 'members/list': members_list, 'members/list/continue': members_list_continue, @@ -16275,6 +16586,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'members/secondary_emails/delete': members_secondary_emails_delete, 'members/secondary_emails/resend_verification_emails': members_secondary_emails_resend_verification_emails, 'members/send_welcome_email': members_send_welcome_email, + 'members/set_admin_permissions:2': members_set_admin_permissions_v2, 'members/set_admin_permissions': members_set_admin_permissions, 'members/set_profile': members_set_profile, 'members/set_profile_photo': members_set_profile_photo, diff --git a/spec b/spec index 397eca2b..01bee3a2 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 397eca2ba6c0fbc453fb8832ad5c562c89fd6502 +Subproject commit 01bee3a2c93573383fac8430a43c2a5ac250b7d7 From de474e161f5062e0e2398f829763cf39eb394efb Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Fri, 7 May 2021 12:04:46 -0700 Subject: [PATCH 37/90] Automated Spec Update (#351) 85f2eff045cf6df883f269ed6ecd9b39457077ed Change Notes: team_log_generated Namespace - Add MemberTransferredInternalFields structs team_members Namespace - Add members/set_profile_photo:2, members/delete_profile_photo:2, members/add/job_status/get:2, members/add:2, members/list/continue:2, members/get_info:2, members/set_profile:2, members/list:2 routes - Add TeamMemberInfoV2, TeamMemberInfoV2Result, MembersListV2Result, MembersGetInfoV2Arg, MembersGetInfoArgs, MembersGetInfoV2Result, MemberAddArgBase, MemberAddArg extends MemberAddArgBase, MemberAddV2Arg extends MemberAddArgBase, MembersAddArgBase, MembersAddV2Arg extends MembersAddArgBase, MembersAddArg extends MembersAddArgBase structs - Add MembersGetInfoItemV2 extends MembersGetInfoItemBase, MemberAddV2Result extends MemberAddResultBase, MembersAddLaunchV2Result extends async.LaunchResultBase, MembersAddJobStatusV2Result extends async.PollResultBase unions - Remove MembersGetInfoArgs, MemberAddArg, MembersAddArg structs Co-authored-by: Eugene Che Co-authored-by: DropboxBot Co-authored-by: Eugene Che --- dropbox/base_team.py | 221 ++++++++- dropbox/team.py | 1122 +++++++++++++++++++++++++++++++++++------- dropbox/team_log.py | 49 ++ spec | 2 +- 4 files changed, 1214 insertions(+), 180 deletions(-) diff --git a/dropbox/base_team.py b/dropbox/base_team.py index 07825526..665f18fb 100644 --- a/dropbox/base_team.py +++ b/dropbox/base_team.py @@ -1197,6 +1197,36 @@ def team_member_space_limits_set_custom_quota(self, ) return r + def team_members_add_v2(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[:class:`dropbox.team.MemberAddV2Arg`] new_members: Details + of new members to be added to the team. + :rtype: :class:`dropbox.team.MembersAddLaunchV2Result` + """ + arg = team.MembersAddV2Arg(new_members, + force_async) + r = self.request( + team.members_add_v2, + 'team', + arg, + None, + ) + return r + def team_members_add(self, new_members, force_async=False): @@ -1215,8 +1245,6 @@ def team_members_add(self, :param List[:class:`dropbox.team.MemberAddArg`] 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, @@ -1229,6 +1257,30 @@ def team_members_add(self, ) return r + def team_members_add_job_status_get_v2(self, + async_job_id): + """ + Once an async_job_id is returned from :meth:`team_members_add_v2` , 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.MembersAddJobStatusV2Result` + :raises: :class:`.exceptions.ApiError` + + If this raises, ApiError will contain: + :class:`dropbox.team.PollError` + """ + arg = async_.PollArg(async_job_id) + r = self.request( + team.members_add_job_status_get_v2, + 'team', + arg, + None, + ) + return r + def team_members_add_job_status_get(self, async_job_id): """ @@ -1253,6 +1305,29 @@ def team_members_add_job_status_get(self, ) return r + def team_members_delete_profile_photo_v2(self, + user): + """ + Deletes a team member's profile photo. Permission : Team member + management. + + :param user: Identity of the user whose profile photo will be deleted. + :type user: :class:`dropbox.team.UserSelectorArg` + :rtype: :class:`dropbox.team.TeamMemberInfoV2Result` + :raises: :class:`.exceptions.ApiError` + + If this raises, ApiError will contain: + :class:`dropbox.team.MembersDeleteProfilePhotoError` + """ + arg = team.MembersDeleteProfilePhotoArg(user) + r = self.request( + team.members_delete_profile_photo_v2, + 'team', + arg, + None, + ) + return r + def team_members_delete_profile_photo(self, user): """ @@ -1293,6 +1368,31 @@ def team_members_get_available_team_member_roles(self): ) return r + def team_members_get_info_v2(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[:class:`dropbox.team.UserSelectorArg`] members: List of team + members. + :rtype: :class:`dropbox.team.MembersGetInfoV2Result` + :raises: :class:`.exceptions.ApiError` + + If this raises, ApiError will contain: + :class:`dropbox.team.MembersGetInfoError` + """ + arg = team.MembersGetInfoV2Arg(members) + r = self.request( + team.members_get_info_v2, + 'team', + arg, + None, + ) + return r + def team_members_get_info(self, members): """ @@ -1318,6 +1418,30 @@ def team_members_get_info(self, ) return r + def team_members_list_v2(self, + limit=1000, + include_removed=False): + """ + Lists members of a team. Permission : Team information. + + :param int limit: Number of results to return per call. + :param bool include_removed: Whether to return removed members. + :rtype: :class:`dropbox.team.MembersListV2Result` + :raises: :class:`.exceptions.ApiError` + + If this raises, ApiError will contain: + :class:`dropbox.team.MembersListError` + """ + arg = team.MembersListArg(limit, + include_removed) + r = self.request( + team.members_list_v2, + 'team', + arg, + None, + ) + return r + def team_members_list(self, limit=1000, include_removed=False): @@ -1342,6 +1466,30 @@ def team_members_list(self, ) return r + def team_members_list_continue_v2(self, + cursor): + """ + Once a cursor has been retrieved from :meth:`team_members_list_v2`, 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.MembersListV2Result` + :raises: :class:`.exceptions.ApiError` + + If this raises, ApiError will contain: + :class:`dropbox.team.MembersListContinueError` + """ + arg = team.MembersListContinueArg(cursor) + r = self.request( + team.members_list_continue_v2, + 'team', + arg, + None, + ) + return r + def team_members_list_continue(self, cursor): """ @@ -1679,6 +1827,48 @@ def team_members_set_admin_permissions(self, ) return r + def team_members_set_profile_v2(self, + user, + new_email=None, + new_external_id=None, + new_given_name=None, + new_surname=None, + new_persistent_id=None, + new_is_directory_restricted=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[str] new_email: New email for member. + :param Nullable[str] new_external_id: New external ID for member. + :param Nullable[str] new_given_name: New given name for member. + :param Nullable[str] new_surname: New surname for member. + :param Nullable[str] new_persistent_id: New persistent ID. This field + only available to teams using persistent ID SAML configuration. + :param Nullable[bool] new_is_directory_restricted: New value for whether + the user is a directory restricted user. + :rtype: :class:`dropbox.team.TeamMemberInfoV2Result` + :raises: :class:`.exceptions.ApiError` + + If this raises, ApiError will contain: + :class:`dropbox.team.MembersSetProfileError` + """ + arg = team.MembersSetProfileArg(user, + new_email, + new_external_id, + new_given_name, + new_surname, + new_persistent_id, + new_is_directory_restricted) + r = self.request( + team.members_set_profile_v2, + 'team', + arg, + None, + ) + return r + def team_members_set_profile(self, user, new_email=None, @@ -1721,6 +1911,33 @@ def team_members_set_profile(self, ) return r + def team_members_set_profile_photo_v2(self, + user, + photo): + """ + Updates a team member's profile photo. Permission : Team member + management. + + :param user: Identity of the user whose profile photo will be set. + :type user: :class:`dropbox.team.UserSelectorArg` + :param photo: Image to set as the member's new profile photo. + :type photo: :class:`dropbox.team.PhotoSourceArg` + :rtype: :class:`dropbox.team.TeamMemberInfoV2Result` + :raises: :class:`.exceptions.ApiError` + + If this raises, ApiError will contain: + :class:`dropbox.team.MembersSetProfilePhotoError` + """ + arg = team.MembersSetProfilePhotoArg(user, + photo) + r = self.request( + team.members_set_profile_photo_v2, + 'team', + arg, + None, + ) + return r + def team_members_set_profile_photo(self, user, photo): diff --git a/dropbox/team.py b/dropbox/team.py index 07c00162..1fba1e66 100644 --- a/dropbox/team.py +++ b/dropbox/team.py @@ -6259,19 +6259,21 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MemberAccess_validator = bv.Struct(MemberAccess) -class MemberAddArg(bb.Struct): - """ - :ivar team.MemberAddArg.member_given_name: Member's first name. - :ivar team.MemberAddArg.member_surname: Member's last name. - :ivar team.MemberAddArg.member_external_id: External ID for member. - :ivar team.MemberAddArg.member_persistent_id: Persistent ID for member. This - field is only available to teams using persistent ID SAML configuration. - :ivar team.MemberAddArg.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. - :ivar team.MemberAddArg.is_directory_restricted: Whether a user is directory - restricted. +class MemberAddArgBase(bb.Struct): + """ + :ivar team.MemberAddArgBase.member_given_name: Member's first name. + :ivar team.MemberAddArgBase.member_surname: Member's last name. + :ivar team.MemberAddArgBase.member_external_id: External ID for member. + :ivar team.MemberAddArgBase.member_persistent_id: Persistent ID for member. + This field is only available to teams using persistent ID SAML + configuration. + :ivar team.MemberAddArgBase.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. + :ivar team.MemberAddArgBase.is_directory_restricted: Whether a user is + directory restricted. """ __slots__ = [ @@ -6281,7 +6283,6 @@ class MemberAddArg(bb.Struct): '_member_external_id_value', '_member_persistent_id_value', '_send_welcome_email_value', - '_role_value', '_is_directory_restricted_value', ] @@ -6294,7 +6295,6 @@ def __init__(self, member_external_id=None, member_persistent_id=None, send_welcome_email=None, - role=None, is_directory_restricted=None): self._member_email_value = bb.NOT_SET self._member_given_name_value = bb.NOT_SET @@ -6302,7 +6302,6 @@ def __init__(self, self._member_external_id_value = bb.NOT_SET self._member_persistent_id_value = bb.NOT_SET self._send_welcome_email_value = bb.NOT_SET - self._role_value = bb.NOT_SET self._is_directory_restricted_value = bb.NOT_SET if member_email is not None: self.member_email = member_email @@ -6316,8 +6315,6 @@ def __init__(self, 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 if is_directory_restricted is not None: self.is_directory_restricted = is_directory_restricted @@ -6339,70 +6336,86 @@ def __init__(self, # Instance attribute type: bool (validator is set below) send_welcome_email = bb.Attribute("send_welcome_email") - # Instance attribute type: AdminTier (validator is set below) - role = bb.Attribute("role", user_defined=True) - # Instance attribute type: bool (validator is set below) is_directory_restricted = bb.Attribute("is_directory_restricted", nullable=True) + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(MemberAddArgBase, self)._process_custom_annotations(annotation_type, field_path, processor) + +MemberAddArgBase_validator = bv.Struct(MemberAddArgBase) + +class MemberAddArg(MemberAddArgBase): + + __slots__ = [ + '_role_value', + ] + + _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, + is_directory_restricted=None, + role=None): + super(MemberAddArg, self).__init__(member_email, + member_given_name, + member_surname, + member_external_id, + member_persistent_id, + send_welcome_email, + is_directory_restricted) + self._role_value = bb.NOT_SET + if role is not None: + self.role = role + + # Instance attribute type: AdminTier (validator is set below) + role = bb.Attribute("role", user_defined=True) + def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberAddArg, self)._process_custom_annotations(annotation_type, field_path, processor) MemberAddArg_validator = bv.Struct(MemberAddArg) -class MemberAddResult(bb.Union): +class MemberAddResultBase(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 MemberAddResult.success: Describes a user that was - successfully added to the team. - :ivar str team.MemberAddResult.team_license_limit: Team is already full. The - organization has no available licenses. - :ivar str team.MemberAddResult.free_team_member_limit_reached: Team is + :ivar str team.MemberAddResultBase.team_license_limit: Team is already full. + The organization has no available licenses. + :ivar str team.MemberAddResultBase.free_team_member_limit_reached: Team is already full. The free team member limit has been reached. - :ivar str team.MemberAddResult.user_already_on_team: User is already on this - team. The provided email address is associated with a user who is + :ivar str team.MemberAddResultBase.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 team.MemberAddResult.user_on_another_team: User is already on + :ivar str team.MemberAddResultBase.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 team.MemberAddResult.user_already_paired: User is already paired. - :ivar str team.MemberAddResult.user_migration_failed: User migration has + :ivar str team.MemberAddResultBase.user_already_paired: User is already + paired. + :ivar str team.MemberAddResultBase.user_migration_failed: User migration has failed. - :ivar str team.MemberAddResult.duplicate_external_member_id: A user with the - given external member ID already exists on the team (including in + :ivar str team.MemberAddResultBase.duplicate_external_member_id: A user with + the given external member ID already exists on the team (including in recoverable state). - :ivar str team.MemberAddResult.duplicate_member_persistent_id: A user with - the given persistent ID already exists on the team (including in + :ivar str team.MemberAddResultBase.duplicate_member_persistent_id: A user + with the given persistent ID already exists on the team (including in recoverable state). - :ivar str team.MemberAddResult.persistent_id_disabled: Persistent ID is only - available to teams with persistent ID SAML configuration. Please contact - Dropbox for more information. - :ivar str team.MemberAddResult.user_creation_failed: User creation has + :ivar str team.MemberAddResultBase.persistent_id_disabled: Persistent ID is + only available to teams with persistent ID SAML configuration. Please + contact Dropbox for more information. + :ivar str team.MemberAddResultBase.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): """ @@ -6410,7 +6423,7 @@ def team_license_limit(cls, val): with value ``val``. :param str val: - :rtype: MemberAddResult + :rtype: MemberAddResultBase """ return cls('team_license_limit', val) @@ -6421,7 +6434,7 @@ def free_team_member_limit_reached(cls, val): ``free_team_member_limit_reached`` tag with value ``val``. :param str val: - :rtype: MemberAddResult + :rtype: MemberAddResultBase """ return cls('free_team_member_limit_reached', val) @@ -6432,7 +6445,7 @@ def user_already_on_team(cls, val): with value ``val``. :param str val: - :rtype: MemberAddResult + :rtype: MemberAddResultBase """ return cls('user_already_on_team', val) @@ -6443,7 +6456,7 @@ def user_on_another_team(cls, val): with value ``val``. :param str val: - :rtype: MemberAddResult + :rtype: MemberAddResultBase """ return cls('user_on_another_team', val) @@ -6454,7 +6467,7 @@ def user_already_paired(cls, val): with value ``val``. :param str val: - :rtype: MemberAddResult + :rtype: MemberAddResultBase """ return cls('user_already_paired', val) @@ -6465,7 +6478,7 @@ def user_migration_failed(cls, val): tag with value ``val``. :param str val: - :rtype: MemberAddResult + :rtype: MemberAddResultBase """ return cls('user_migration_failed', val) @@ -6476,7 +6489,7 @@ def duplicate_external_member_id(cls, val): ``duplicate_external_member_id`` tag with value ``val``. :param str val: - :rtype: MemberAddResult + :rtype: MemberAddResultBase """ return cls('duplicate_external_member_id', val) @@ -6487,7 +6500,7 @@ def duplicate_member_persistent_id(cls, val): ``duplicate_member_persistent_id`` tag with value ``val``. :param str val: - :rtype: MemberAddResult + :rtype: MemberAddResultBase """ return cls('duplicate_member_persistent_id', val) @@ -6498,7 +6511,7 @@ def persistent_id_disabled(cls, val): tag with value ``val``. :param str val: - :rtype: MemberAddResult + :rtype: MemberAddResultBase """ return cls('persistent_id_disabled', val) @@ -6509,18 +6522,10 @@ def user_creation_failed(cls, val): with value ``val``. :param str val: - :rtype: MemberAddResult + :rtype: MemberAddResultBase """ 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``. @@ -6601,18 +6606,6 @@ def is_user_creation_failed(self): """ 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. @@ -6740,11 +6733,161 @@ def get_user_creation_failed(self): raise AttributeError("tag 'user_creation_failed' not set") return self._value + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(MemberAddResultBase, self)._process_custom_annotations(annotation_type, field_path, processor) + +MemberAddResultBase_validator = bv.Union(MemberAddResultBase) + +class MemberAddResult(MemberAddResultBase): + """ + 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 MemberAddResult.success: Describes a user that was + successfully added to the team. + """ + + @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) + + def is_success(self): + """ + Check if the union tag is ``success``. + + :rtype: bool + """ + return self._tag == 'success' + + 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 _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberAddResult, self)._process_custom_annotations(annotation_type, field_path, processor) MemberAddResult_validator = bv.Union(MemberAddResult) +class MemberAddV2Arg(MemberAddArgBase): + + __slots__ = [ + '_role_ids_value', + ] + + _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, + is_directory_restricted=None, + role_ids=None): + super(MemberAddV2Arg, self).__init__(member_email, + member_given_name, + member_surname, + member_external_id, + member_persistent_id, + send_welcome_email, + is_directory_restricted) + self._role_ids_value = bb.NOT_SET + if role_ids is not None: + self.role_ids = role_ids + + # Instance attribute type: list of [str] (validator is set below) + role_ids = bb.Attribute("role_ids", nullable=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(MemberAddV2Arg, self)._process_custom_annotations(annotation_type, field_path, processor) + +MemberAddV2Arg_validator = bv.Struct(MemberAddV2Arg) + +class MemberAddV2Result(MemberAddResultBase): + """ + 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 TeamMemberInfoV2 MemberAddV2Result.success: Describes a user that was + successfully added to the 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 TeamMemberInfoV2 val: + :rtype: MemberAddV2Result + """ + return cls('success', val) + + def is_success(self): + """ + Check if the union tag is ``success``. + + :rtype: bool + """ + return self._tag == 'success' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def get_success(self): + """ + Describes a user that was successfully added to the team. + + Only call this if :meth:`is_success` is true. + + :rtype: TeamMemberInfoV2 + """ + if not self.is_success(): + raise AttributeError("tag 'success' not set") + return self._value + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(MemberAddV2Result, self)._process_custom_annotations(annotation_type, field_path, processor) + +MemberAddV2Result_validator = bv.Union(MemberAddV2Result) + class MemberDevices(bb.Struct): """ Information on devices of a team's member. @@ -7064,17 +7207,40 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MemberSelectorError_validator = bv.Union(MemberSelectorError) -class MembersAddArg(bb.Struct): +class MembersAddArgBase(bb.Struct): + """ + :ivar team.MembersAddArgBase.force_async: Whether to force the add to happen + asynchronously. + """ + + __slots__ = [ + '_force_async_value', + ] + + _has_required_fields = False + + def __init__(self, + force_async=None): + self._force_async_value = bb.NOT_SET + if force_async is not None: + self.force_async = force_async + + # Instance attribute type: bool (validator is set below) + force_async = bb.Attribute("force_async") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(MembersAddArgBase, self)._process_custom_annotations(annotation_type, field_path, processor) + +MembersAddArgBase_validator = bv.Struct(MembersAddArgBase) + +class MembersAddArg(MembersAddArgBase): """ :ivar team.MembersAddArg.new_members: Details of new members to be added to the team. - :ivar team.MembersAddArg.force_async: Whether to force the add to happen - asynchronously. """ __slots__ = [ '_new_members_value', - '_force_async_value', ] _has_required_fields = True @@ -7082,19 +7248,14 @@ class MembersAddArg(bb.Struct): def __init__(self, new_members=None, force_async=None): + super(MembersAddArg, self).__init__(force_async) self._new_members_value = bb.NOT_SET - self._force_async_value = bb.NOT_SET if new_members is not None: self.new_members = new_members - if force_async is not None: - self.force_async = force_async # Instance attribute type: list of [MemberAddArg] (validator is set below) new_members = bb.Attribute("new_members") - # Instance attribute type: bool (validator is set below) - force_async = bb.Attribute("force_async") - def _process_custom_annotations(self, annotation_type, field_path, processor): super(MembersAddArg, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -7185,6 +7346,103 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersAddJobStatus_validator = bv.Union(MembersAddJobStatus) +class MembersAddJobStatusV2Result(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 [MemberAddV2Result] team.MembersAddJobStatusV2Result.complete: + The asynchronous job has finished. For each member that was specified in + the parameter :type:`MembersAddArg` that was provided to + :route:`members/add:2`, a corresponding item is returned in this list. + :ivar str team.MembersAddJobStatusV2Result.failed: The asynchronous job + returned an error. The string contains an error message. + """ + + _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 list of [MemberAddV2Result] val: + :rtype: MembersAddJobStatusV2Result + """ + 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: MembersAddJobStatusV2Result + """ + 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 asynchronous job has finished. For each member that was specified in + the parameter :class:`MembersAddArg` that was provided to + :meth:`dropbox.dropbox_client.Dropbox.team_members_add`, a corresponding + item is returned in this list. + + Only call this if :meth:`is_complete` is true. + + :rtype: list of [MemberAddV2Result] + """ + 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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(MembersAddJobStatusV2Result, self)._process_custom_annotations(annotation_type, field_path, processor) + +MembersAddJobStatusV2Result_validator = bv.Union(MembersAddJobStatusV2Result) + class MembersAddLaunch(async_.LaunchResultBase): """ This class acts as a tagged union. Only one of the ``is_*`` methods will @@ -7226,6 +7484,87 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersAddLaunch_validator = bv.Union(MembersAddLaunch) +class MembersAddLaunchV2Result(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. + """ + + _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 list of [MemberAddV2Result] val: + :rtype: MembersAddLaunchV2Result + """ + 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: list of [MemberAddV2Result] + """ + if not self.is_complete(): + raise AttributeError("tag 'complete' not set") + return self._value + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(MembersAddLaunchV2Result, self)._process_custom_annotations(annotation_type, field_path, processor) + +MembersAddLaunchV2Result_validator = bv.Union(MembersAddLaunchV2Result) + +class MembersAddV2Arg(MembersAddArgBase): + """ + :ivar team.MembersAddV2Arg.new_members: Details of new members to be added + to the team. + """ + + __slots__ = [ + '_new_members_value', + ] + + _has_required_fields = True + + def __init__(self, + new_members=None, + force_async=None): + super(MembersAddV2Arg, self).__init__(force_async) + self._new_members_value = bb.NOT_SET + if new_members is not None: + self.new_members = new_members + + # Instance attribute type: list of [MemberAddV2Arg] (validator is set below) + new_members = bb.Attribute("new_members") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(MembersAddV2Arg, self)._process_custom_annotations(annotation_type, field_path, processor) + +MembersAddV2Arg_validator = bv.Struct(MembersAddV2Arg) + class MembersDeactivateBaseArg(bb.Struct): """ Exactly one of team_member_id, email, or external_id must be provided to @@ -7498,21 +7837,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersGetInfoError_validator = bv.Union(MembersGetInfoError) -class MembersGetInfoItem(bb.Union): +class MembersGetInfoItemBase(bb.Union): """ - Describes a result obtained for a single user whose id was specified in the - parameter of :meth:`dropbox.dropbox_client.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 team.MembersGetInfoItem.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 MembersGetInfoItem.member_info: Info about a team - member. + :ivar str team.MembersGetInfoItemBase.id_not_found: An ID that was provided + as a parameter to :route:`members/get_info` or + :route:`members/get_info:2`, 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. """ _catch_all = None @@ -7524,10 +7859,52 @@ def id_not_found(cls, val): value ``val``. :param str val: - :rtype: MembersGetInfoItem + :rtype: MembersGetInfoItemBase """ return cls('id_not_found', 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 get_id_not_found(self): + """ + An ID that was provided as a parameter to + :meth:`dropbox.dropbox_client.Dropbox.team_members_get_info` or + :meth:`dropbox.dropbox_client.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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(MembersGetInfoItemBase, self)._process_custom_annotations(annotation_type, field_path, processor) + +MembersGetInfoItemBase_validator = bv.Union(MembersGetInfoItemBase) + +class MembersGetInfoItem(MembersGetInfoItemBase): + """ + Describes a result obtained for a single user whose id was specified in the + parameter of :meth:`dropbox.dropbox_client.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 TeamMemberInfo MembersGetInfoItem.member_info: Info about a team + member. + """ + @classmethod def member_info(cls, val): """ @@ -7539,13 +7916,58 @@ def member_info(cls, val): """ return cls('member_info', val) - def is_id_not_found(self): + def is_member_info(self): + """ + Check if the union tag is ``member_info``. + + :rtype: bool + """ + return self._tag == 'member_info' + + 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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(MembersGetInfoItem, self)._process_custom_annotations(annotation_type, field_path, processor) + +MembersGetInfoItem_validator = bv.Union(MembersGetInfoItem) + +class MembersGetInfoItemV2(MembersGetInfoItemBase): + """ + Describes a result obtained for a single user whose id was specified in the + parameter of :meth:`dropbox.dropbox_client.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 TeamMemberInfoV2 MembersGetInfoItemV2.member_info: Info about a team + member. + """ + + _catch_all = 'other' + # Attribute is overwritten below the class definition + other = None + + @classmethod + def member_info(cls, val): """ - Check if the union tag is ``id_not_found``. + Create an instance of this class set to the ``member_info`` tag with + value ``val``. - :rtype: bool + :param TeamMemberInfoV2 val: + :rtype: MembersGetInfoItemV2 """ - return self._tag == 'id_not_found' + return cls('member_info', val) def is_member_info(self): """ @@ -7555,20 +7977,13 @@ def is_member_info(self): """ return self._tag == 'member_info' - def get_id_not_found(self): + def is_other(self): """ - An ID that was provided as a parameter to - :meth:`dropbox.dropbox_client.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. + Check if the union tag is ``other``. - :rtype: str + :rtype: bool """ - if not self.is_id_not_found(): - raise AttributeError("tag 'id_not_found' not set") - return self._value + return self._tag == 'other' def get_member_info(self): """ @@ -7576,16 +7991,66 @@ def get_member_info(self): Only call this if :meth:`is_member_info` is true. - :rtype: TeamMemberInfo + :rtype: TeamMemberInfoV2 """ if not self.is_member_info(): raise AttributeError("tag 'member_info' not set") return self._value def _process_custom_annotations(self, annotation_type, field_path, processor): - super(MembersGetInfoItem, self)._process_custom_annotations(annotation_type, field_path, processor) + super(MembersGetInfoItemV2, self)._process_custom_annotations(annotation_type, field_path, processor) -MembersGetInfoItem_validator = bv.Union(MembersGetInfoItem) +MembersGetInfoItemV2_validator = bv.Union(MembersGetInfoItemV2) + +class MembersGetInfoV2Arg(bb.Struct): + """ + :ivar team.MembersGetInfoV2Arg.members: List of team members. + """ + + __slots__ = [ + '_members_value', + ] + + _has_required_fields = True + + def __init__(self, + members=None): + self._members_value = bb.NOT_SET + if members is not None: + self.members = members + + # Instance attribute type: list of [UserSelectorArg] (validator is set below) + members = bb.Attribute("members") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(MembersGetInfoV2Arg, self)._process_custom_annotations(annotation_type, field_path, processor) + +MembersGetInfoV2Arg_validator = bv.Struct(MembersGetInfoV2Arg) + +class MembersGetInfoV2Result(bb.Struct): + """ + :ivar team.MembersGetInfoV2Result.members_info: List of team members info. + """ + + __slots__ = [ + '_members_info_value', + ] + + _has_required_fields = True + + def __init__(self, + members_info=None): + self._members_info_value = bb.NOT_SET + if members_info is not None: + self.members_info = members_info + + # Instance attribute type: list of [MembersGetInfoItemV2] (validator is set below) + members_info = bb.Attribute("members_info") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(MembersGetInfoV2Result, self)._process_custom_annotations(annotation_type, field_path, processor) + +MembersGetInfoV2Result_validator = bv.Struct(MembersGetInfoV2Result) class MembersInfo(bb.Struct): """ @@ -7792,6 +8257,54 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersListResult_validator = bv.Struct(MembersListResult) +class MembersListV2Result(bb.Struct): + """ + :ivar team.MembersListV2Result.members: List of team members. + :ivar team.MembersListV2Result.cursor: Pass the cursor into + :meth:`dropbox.dropbox_client.Dropbox.team_members_list_continue` to + obtain the additional members. + :ivar team.MembersListV2Result.has_more: Is true if there are additional + team members that have not been returned yet. An additional call to + :meth:`dropbox.dropbox_client.Dropbox.team_members_list_continue` can + retrieve them. + """ + + __slots__ = [ + '_members_value', + '_cursor_value', + '_has_more_value', + ] + + _has_required_fields = True + + def __init__(self, + members=None, + cursor=None, + has_more=None): + self._members_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET + self._has_more_value = bb.NOT_SET + 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 + + # Instance attribute type: list of [TeamMemberInfoV2] (validator is set below) + members = bb.Attribute("members") + + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") + + # Instance attribute type: bool (validator is set below) + has_more = bb.Attribute("has_more") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(MembersListV2Result, self)._process_custom_annotations(annotation_type, field_path, processor) + +MembersListV2Result_validator = bv.Struct(MembersListV2Result) + class MembersRecoverArg(bb.Struct): """ Exactly one of team_member_id, email, or external_id must be provided to @@ -11408,6 +11921,72 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamMemberInfo_validator = bv.Struct(TeamMemberInfo) +class TeamMemberInfoV2(bb.Struct): + """ + Information about a team member. + + :ivar team.TeamMemberInfoV2.profile: Profile of a user as a member of a + team. + :ivar team.TeamMemberInfoV2.roles: The user's roles in the team. + """ + + __slots__ = [ + '_profile_value', + '_roles_value', + ] + + _has_required_fields = True + + def __init__(self, + profile=None, + roles=None): + self._profile_value = bb.NOT_SET + self._roles_value = bb.NOT_SET + if profile is not None: + self.profile = profile + if roles is not None: + self.roles = roles + + # Instance attribute type: TeamMemberProfile (validator is set below) + profile = bb.Attribute("profile", user_defined=True) + + # Instance attribute type: list of [TeamMemberRole] (validator is set below) + roles = bb.Attribute("roles", nullable=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamMemberInfoV2, self)._process_custom_annotations(annotation_type, field_path, processor) + +TeamMemberInfoV2_validator = bv.Struct(TeamMemberInfoV2) + +class TeamMemberInfoV2Result(bb.Struct): + """ + Information about a team member, after the change, like at + :meth:`dropbox.dropbox_client.Dropbox.team_members_set_profile`. + + :ivar team.TeamMemberInfoV2Result.member_info: Member info, after the + change. + """ + + __slots__ = [ + '_member_info_value', + ] + + _has_required_fields = True + + def __init__(self, + member_info=None): + self._member_info_value = bb.NOT_SET + if member_info is not None: + self.member_info = member_info + + # Instance attribute type: TeamMemberInfoV2 (validator is set below) + member_info = bb.Attribute("member_info", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamMemberInfoV2Result, self)._process_custom_annotations(annotation_type, field_path, processor) + +TeamMemberInfoV2Result_validator = bv.Struct(TeamMemberInfoV2Result) + class TeamMemberProfile(MemberProfile): """ Profile of a user as a member of a team. @@ -14221,59 +14800,78 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('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.is_directory_restricted.validator = bv.Nullable(bv.Boolean()) -MemberAddArg._all_field_names_ = set([ +MemberAddArgBase.member_email.validator = common.EmailAddress_validator +MemberAddArgBase.member_given_name.validator = bv.Nullable(common.OptionalNamePart_validator) +MemberAddArgBase.member_surname.validator = bv.Nullable(common.OptionalNamePart_validator) +MemberAddArgBase.member_external_id.validator = bv.Nullable(team_common.MemberExternalId_validator) +MemberAddArgBase.member_persistent_id.validator = bv.Nullable(bv.String()) +MemberAddArgBase.send_welcome_email.validator = bv.Boolean() +MemberAddArgBase.is_directory_restricted.validator = bv.Nullable(bv.Boolean()) +MemberAddArgBase._all_field_names_ = set([ 'member_email', 'member_given_name', 'member_surname', 'member_external_id', 'member_persistent_id', 'send_welcome_email', - 'role', 'is_directory_restricted', ]) -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), - ('is_directory_restricted', MemberAddArg.is_directory_restricted.validator), +MemberAddArgBase._all_fields_ = [ + ('member_email', MemberAddArgBase.member_email.validator), + ('member_given_name', MemberAddArgBase.member_given_name.validator), + ('member_surname', MemberAddArgBase.member_surname.validator), + ('member_external_id', MemberAddArgBase.member_external_id.validator), + ('member_persistent_id', MemberAddArgBase.member_persistent_id.validator), + ('send_welcome_email', MemberAddArgBase.send_welcome_email.validator), + ('is_directory_restricted', MemberAddArgBase.is_directory_restricted.validator), ] +MemberAddArg.role.validator = AdminTier_validator +MemberAddArg._all_field_names_ = MemberAddArgBase._all_field_names_.union(set(['role'])) +MemberAddArg._all_fields_ = MemberAddArgBase._all_fields_ + [('role', MemberAddArg.role.validator)] + +MemberAddResultBase._team_license_limit_validator = common.EmailAddress_validator +MemberAddResultBase._free_team_member_limit_reached_validator = common.EmailAddress_validator +MemberAddResultBase._user_already_on_team_validator = common.EmailAddress_validator +MemberAddResultBase._user_on_another_team_validator = common.EmailAddress_validator +MemberAddResultBase._user_already_paired_validator = common.EmailAddress_validator +MemberAddResultBase._user_migration_failed_validator = common.EmailAddress_validator +MemberAddResultBase._duplicate_external_member_id_validator = common.EmailAddress_validator +MemberAddResultBase._duplicate_member_persistent_id_validator = common.EmailAddress_validator +MemberAddResultBase._persistent_id_disabled_validator = common.EmailAddress_validator +MemberAddResultBase._user_creation_failed_validator = common.EmailAddress_validator +MemberAddResultBase._tagmap = { + 'team_license_limit': MemberAddResultBase._team_license_limit_validator, + 'free_team_member_limit_reached': MemberAddResultBase._free_team_member_limit_reached_validator, + 'user_already_on_team': MemberAddResultBase._user_already_on_team_validator, + 'user_on_another_team': MemberAddResultBase._user_on_another_team_validator, + 'user_already_paired': MemberAddResultBase._user_already_paired_validator, + 'user_migration_failed': MemberAddResultBase._user_migration_failed_validator, + 'duplicate_external_member_id': MemberAddResultBase._duplicate_external_member_id_validator, + 'duplicate_member_persistent_id': MemberAddResultBase._duplicate_member_persistent_id_validator, + 'persistent_id_disabled': MemberAddResultBase._persistent_id_disabled_validator, + 'user_creation_failed': MemberAddResultBase._user_creation_failed_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, } +MemberAddResult._tagmap.update(MemberAddResultBase._tagmap) + +MemberAddV2Arg.role_ids.validator = bv.Nullable(bv.List(TeamMemberRoleId_validator, max_items=1)) +MemberAddV2Arg._all_field_names_ = MemberAddArgBase._all_field_names_.union(set(['role_ids'])) +MemberAddV2Arg._all_fields_ = MemberAddArgBase._all_fields_ + [('role_ids', MemberAddV2Arg.role_ids.validator)] + +MemberAddV2Result._success_validator = TeamMemberInfoV2_validator +MemberAddV2Result._other_validator = bv.Void() +MemberAddV2Result._tagmap = { + 'success': MemberAddV2Result._success_validator, + 'other': MemberAddV2Result._other_validator, +} +MemberAddV2Result._tagmap.update(MemberAddResultBase._tagmap) + +MemberAddV2Result.other = MemberAddV2Result('other') MemberDevices.team_member_id.validator = bv.String() MemberDevices.web_sessions.validator = bv.Nullable(bv.List(ActiveWebSession_validator)) @@ -14368,16 +14966,13 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MemberSelectorError.user_not_in_team = MemberSelectorError('user_not_in_team') +MembersAddArgBase.force_async.validator = bv.Boolean() +MembersAddArgBase._all_field_names_ = set(['force_async']) +MembersAddArgBase._all_fields_ = [('force_async', MembersAddArgBase.force_async.validator)] + 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), -] +MembersAddArg._all_field_names_ = MembersAddArgBase._all_field_names_.union(set(['new_members'])) +MembersAddArg._all_fields_ = MembersAddArgBase._all_fields_ + [('new_members', MembersAddArg.new_members.validator)] MembersAddJobStatus._complete_validator = bv.List(MemberAddResult_validator) MembersAddJobStatus._failed_validator = bv.String() @@ -14387,12 +14982,38 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): } MembersAddJobStatus._tagmap.update(async_.PollResultBase._tagmap) +MembersAddJobStatusV2Result._complete_validator = bv.List(MemberAddV2Result_validator) +MembersAddJobStatusV2Result._failed_validator = bv.String() +MembersAddJobStatusV2Result._other_validator = bv.Void() +MembersAddJobStatusV2Result._tagmap = { + 'complete': MembersAddJobStatusV2Result._complete_validator, + 'failed': MembersAddJobStatusV2Result._failed_validator, + 'other': MembersAddJobStatusV2Result._other_validator, +} +MembersAddJobStatusV2Result._tagmap.update(async_.PollResultBase._tagmap) + +MembersAddJobStatusV2Result.other = MembersAddJobStatusV2Result('other') + MembersAddLaunch._complete_validator = bv.List(MemberAddResult_validator) MembersAddLaunch._tagmap = { 'complete': MembersAddLaunch._complete_validator, } MembersAddLaunch._tagmap.update(async_.LaunchResultBase._tagmap) +MembersAddLaunchV2Result._complete_validator = bv.List(MemberAddV2Result_validator) +MembersAddLaunchV2Result._other_validator = bv.Void() +MembersAddLaunchV2Result._tagmap = { + 'complete': MembersAddLaunchV2Result._complete_validator, + 'other': MembersAddLaunchV2Result._other_validator, +} +MembersAddLaunchV2Result._tagmap.update(async_.LaunchResultBase._tagmap) + +MembersAddLaunchV2Result.other = MembersAddLaunchV2Result('other') + +MembersAddV2Arg.new_members.validator = bv.List(MemberAddV2Arg_validator) +MembersAddV2Arg._all_field_names_ = MembersAddArgBase._all_field_names_.union(set(['new_members'])) +MembersAddV2Arg._all_fields_ = MembersAddArgBase._all_fields_ + [('new_members', MembersAddV2Arg.new_members.validator)] + MembersDeactivateBaseArg.user.validator = UserSelectorArg_validator MembersDeactivateBaseArg._all_field_names_ = set(['user']) MembersDeactivateBaseArg._all_fields_ = [('user', MembersDeactivateBaseArg.user.validator)] @@ -14453,12 +15074,34 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersGetInfoError.other = MembersGetInfoError('other') -MembersGetInfoItem._id_not_found_validator = bv.String() +MembersGetInfoItemBase._id_not_found_validator = bv.String() +MembersGetInfoItemBase._tagmap = { + 'id_not_found': MembersGetInfoItemBase._id_not_found_validator, +} + MembersGetInfoItem._member_info_validator = TeamMemberInfo_validator MembersGetInfoItem._tagmap = { - 'id_not_found': MembersGetInfoItem._id_not_found_validator, 'member_info': MembersGetInfoItem._member_info_validator, } +MembersGetInfoItem._tagmap.update(MembersGetInfoItemBase._tagmap) + +MembersGetInfoItemV2._member_info_validator = TeamMemberInfoV2_validator +MembersGetInfoItemV2._other_validator = bv.Void() +MembersGetInfoItemV2._tagmap = { + 'member_info': MembersGetInfoItemV2._member_info_validator, + 'other': MembersGetInfoItemV2._other_validator, +} +MembersGetInfoItemV2._tagmap.update(MembersGetInfoItemBase._tagmap) + +MembersGetInfoItemV2.other = MembersGetInfoItemV2('other') + +MembersGetInfoV2Arg.members.validator = bv.List(UserSelectorArg_validator) +MembersGetInfoV2Arg._all_field_names_ = set(['members']) +MembersGetInfoV2Arg._all_fields_ = [('members', MembersGetInfoV2Arg.members.validator)] + +MembersGetInfoV2Result.members_info.validator = bv.List(MembersGetInfoItemV2_validator) +MembersGetInfoV2Result._all_field_names_ = set(['members_info']) +MembersGetInfoV2Result._all_fields_ = [('members_info', MembersGetInfoV2Result.members_info.validator)] MembersInfo.team_member_ids.validator = bv.List(team_common.TeamMemberId_validator) MembersInfo.permanently_deleted_users.validator = bv.UInt64() @@ -14517,6 +15160,20 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('has_more', MembersListResult.has_more.validator), ] +MembersListV2Result.members.validator = bv.List(TeamMemberInfoV2_validator) +MembersListV2Result.cursor.validator = bv.String() +MembersListV2Result.has_more.validator = bv.Boolean() +MembersListV2Result._all_field_names_ = set([ + 'members', + 'cursor', + 'has_more', +]) +MembersListV2Result._all_fields_ = [ + ('members', MembersListV2Result.members.validator), + ('cursor', MembersListV2Result.cursor.validator), + ('has_more', MembersListV2Result.has_more.validator), +] + MembersRecoverArg.user.validator = UserSelectorArg_validator MembersRecoverArg._all_field_names_ = set(['user']) MembersRecoverArg._all_fields_ = [('user', MembersRecoverArg.user.validator)] @@ -15354,6 +16011,21 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('role', TeamMemberInfo.role.validator), ] +TeamMemberInfoV2.profile.validator = TeamMemberProfile_validator +TeamMemberInfoV2.roles.validator = bv.Nullable(bv.List(TeamMemberRole_validator)) +TeamMemberInfoV2._all_field_names_ = set([ + 'profile', + 'roles', +]) +TeamMemberInfoV2._all_fields_ = [ + ('profile', TeamMemberInfoV2.profile.validator), + ('roles', TeamMemberInfoV2.roles.validator), +] + +TeamMemberInfoV2Result.member_info.validator = TeamMemberInfoV2_validator +TeamMemberInfoV2Result._all_field_names_ = set(['member_info']) +TeamMemberInfoV2Result._all_fields_ = [('member_info', TeamMemberInfoV2Result.member_info.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([ @@ -15626,9 +16298,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListTeamDevicesArg.include_web_sessions.default = True ListTeamDevicesArg.include_desktop_clients.default = True ListTeamDevicesArg.include_mobile_clients.default = True -MemberAddArg.send_welcome_email.default = True +MemberAddArgBase.send_welcome_email.default = True MemberAddArg.role.default = AdminTier.member_only -MembersAddArg.force_async.default = False +MembersAddArgBase.force_async.default = False MembersDeactivateArg.wipe_data.default = True MembersListArg.limit.default = 1000 MembersListArg.include_removed.default = False @@ -16057,6 +16729,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'host': u'api', 'style': u'rpc'}, ) +members_add_v2 = bb.Route( + 'members/add', + 2, + False, + MembersAddV2Arg_validator, + MembersAddLaunchV2Result_validator, + bv.Void(), + {'auth': u'team', + 'host': u'api', + 'style': u'rpc'}, +) members_add = bb.Route( 'members/add', 1, @@ -16068,6 +16751,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'host': u'api', 'style': u'rpc'}, ) +members_add_job_status_get_v2 = bb.Route( + 'members/add/job_status/get', + 2, + False, + async_.PollArg_validator, + MembersAddJobStatusV2Result_validator, + async_.PollError_validator, + {'auth': u'team', + 'host': u'api', + 'style': u'rpc'}, +) members_add_job_status_get = bb.Route( 'members/add/job_status/get', 1, @@ -16079,6 +16773,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'host': u'api', 'style': u'rpc'}, ) +members_delete_profile_photo_v2 = bb.Route( + 'members/delete_profile_photo', + 2, + False, + MembersDeleteProfilePhotoArg_validator, + TeamMemberInfoV2Result_validator, + MembersDeleteProfilePhotoError_validator, + {'auth': u'team', + 'host': u'api', + 'style': u'rpc'}, +) members_delete_profile_photo = bb.Route( 'members/delete_profile_photo', 1, @@ -16101,6 +16806,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'host': u'api', 'style': u'rpc'}, ) +members_get_info_v2 = bb.Route( + 'members/get_info', + 2, + False, + MembersGetInfoV2Arg_validator, + MembersGetInfoV2Result_validator, + MembersGetInfoError_validator, + {'auth': u'team', + 'host': u'api', + 'style': u'rpc'}, +) members_get_info = bb.Route( 'members/get_info', 1, @@ -16112,6 +16828,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'host': u'api', 'style': u'rpc'}, ) +members_list_v2 = bb.Route( + 'members/list', + 2, + False, + MembersListArg_validator, + MembersListV2Result_validator, + MembersListError_validator, + {'auth': u'team', + 'host': u'api', + 'style': u'rpc'}, +) members_list = bb.Route( 'members/list', 1, @@ -16123,6 +16850,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'host': u'api', 'style': u'rpc'}, ) +members_list_continue_v2 = bb.Route( + 'members/list/continue', + 2, + False, + MembersListContinueArg_validator, + MembersListV2Result_validator, + MembersListContinueError_validator, + {'auth': u'team', + 'host': u'api', + 'style': u'rpc'}, +) members_list_continue = bb.Route( 'members/list/continue', 1, @@ -16255,6 +16993,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'host': u'api', 'style': u'rpc'}, ) +members_set_profile_v2 = bb.Route( + 'members/set_profile', + 2, + False, + MembersSetProfileArg_validator, + TeamMemberInfoV2Result_validator, + MembersSetProfileError_validator, + {'auth': u'team', + 'host': u'api', + 'style': u'rpc'}, +) members_set_profile = bb.Route( 'members/set_profile', 1, @@ -16266,6 +17015,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'host': u'api', 'style': u'rpc'}, ) +members_set_profile_photo_v2 = bb.Route( + 'members/set_profile_photo', + 2, + False, + MembersSetProfilePhotoArg_validator, + TeamMemberInfoV2Result_validator, + MembersSetProfilePhotoError_validator, + {'auth': u'team', + 'host': u'api', + 'style': u'rpc'}, +) members_set_profile_photo = bb.Route( 'members/set_profile_photo', 1, @@ -16570,12 +17330,18 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): '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:2': members_add_v2, 'members/add': members_add, + 'members/add/job_status/get:2': members_add_job_status_get_v2, 'members/add/job_status/get': members_add_job_status_get, + 'members/delete_profile_photo:2': members_delete_profile_photo_v2, 'members/delete_profile_photo': members_delete_profile_photo, 'members/get_available_team_member_roles': members_get_available_team_member_roles, + 'members/get_info:2': members_get_info_v2, 'members/get_info': members_get_info, + 'members/list:2': members_list_v2, 'members/list': members_list, + 'members/list/continue:2': members_list_continue_v2, 'members/list/continue': members_list_continue, 'members/move_former_member_files': members_move_former_member_files, 'members/move_former_member_files/job_status/check': members_move_former_member_files_job_status_check, @@ -16588,7 +17354,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'members/send_welcome_email': members_send_welcome_email, 'members/set_admin_permissions:2': members_set_admin_permissions_v2, 'members/set_admin_permissions': members_set_admin_permissions, + 'members/set_profile:2': members_set_profile_v2, 'members/set_profile': members_set_profile, + 'members/set_profile_photo:2': members_set_profile_photo_v2, 'members/set_profile_photo': members_set_profile_photo, 'members/suspend': members_suspend, 'members/unsuspend': members_unsuspend, diff --git a/dropbox/team_log.py b/dropbox/team_log.py index eb214838..517f7310 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -51218,6 +51218,44 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MemberTransferAccountContentsType_validator = bv.Struct(MemberTransferAccountContentsType) +class MemberTransferredInternalFields(bb.Struct): + """ + Internal only - fields for target team computations + + :ivar team_log.MemberTransferredInternalFields.source_team_id: Internal only + - team user was moved from. + :ivar team_log.MemberTransferredInternalFields.target_team_id: Internal only + - team user was moved to. + """ + + __slots__ = [ + '_source_team_id_value', + '_target_team_id_value', + ] + + _has_required_fields = True + + def __init__(self, + source_team_id=None, + target_team_id=None): + self._source_team_id_value = bb.NOT_SET + self._target_team_id_value = bb.NOT_SET + if source_team_id is not None: + self.source_team_id = source_team_id + if target_team_id is not None: + self.target_team_id = target_team_id + + # Instance attribute type: str (validator is set below) + source_team_id = bb.Attribute("source_team_id") + + # Instance attribute type: str (validator is set below) + target_team_id = bb.Attribute("target_team_id") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(MemberTransferredInternalFields, self)._process_custom_annotations(annotation_type, field_path, processor) + +MemberTransferredInternalFields_validator = bv.Struct(MemberTransferredInternalFields) + class MicrosoftOfficeAddinChangePolicyDetails(bb.Struct): """ Enabled/disabled Microsoft Office add-in. @@ -76544,6 +76582,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MemberTransferAccountContentsType._all_field_names_ = set(['description']) MemberTransferAccountContentsType._all_fields_ = [('description', MemberTransferAccountContentsType.description.validator)] +MemberTransferredInternalFields.source_team_id.validator = team_common.TeamId_validator +MemberTransferredInternalFields.target_team_id.validator = team_common.TeamId_validator +MemberTransferredInternalFields._all_field_names_ = set([ + 'source_team_id', + 'target_team_id', +]) +MemberTransferredInternalFields._all_fields_ = [ + ('source_team_id', MemberTransferredInternalFields.source_team_id.validator), + ('target_team_id', MemberTransferredInternalFields.target_team_id.validator), +] + MicrosoftOfficeAddinChangePolicyDetails.new_value.validator = MicrosoftOfficeAddinPolicy_validator MicrosoftOfficeAddinChangePolicyDetails.previous_value.validator = bv.Nullable(MicrosoftOfficeAddinPolicy_validator) MicrosoftOfficeAddinChangePolicyDetails._all_field_names_ = set([ diff --git a/spec b/spec index 01bee3a2..85f2eff0 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 01bee3a2c93573383fac8430a43c2a5ac250b7d7 +Subproject commit 85f2eff045cf6df883f269ed6ecd9b39457077ed From 7cdab3c1a555cd05f6987925b6480c300683169f Mon Sep 17 00:00:00 2001 From: Brent Bumann Date: Fri, 7 May 2021 15:20:14 -0700 Subject: [PATCH 38/90] Refresh access token when using a very old short-lived access token with unknown expiration (#352) Co-authored-by: Brent Bumann --- dropbox/dropbox_client.py | 7 ++++--- test/unit/test_dropbox_unit.py | 12 ++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/dropbox/dropbox_client.py b/dropbox/dropbox_client.py index 1fcbb0d2..480682aa 100644 --- a/dropbox/dropbox_client.py +++ b/dropbox/dropbox_client.py @@ -358,9 +358,10 @@ def check_and_refresh_access_token(self): :return: """ can_refresh = self._oauth2_refresh_token and self._app_key - needs_refresh = self._oauth2_access_token_expiration and \ - (datetime.utcnow() + timedelta(seconds=TOKEN_EXPIRATION_BUFFER)) >= \ - self._oauth2_access_token_expiration + needs_refresh = self._oauth2_refresh_token and \ + (not self._oauth2_access_token_expiration or + (datetime.utcnow() + timedelta(seconds=TOKEN_EXPIRATION_BUFFER)) >= + self._oauth2_access_token_expiration) needs_token = not self._oauth2_access_token if (needs_refresh or needs_token) and can_refresh: self.refresh_access_token(scope=self._scope) diff --git a/test/unit/test_dropbox_unit.py b/test/unit/test_dropbox_unit.py index 5d5f82b3..d631a753 100644 --- a/test/unit/test_dropbox_unit.py +++ b/test/unit/test_dropbox_unit.py @@ -345,6 +345,18 @@ def test_check_refresh_with_only_refresh(self, session_instance): dbx.check_and_refresh_access_token() assert session_instance.post.call_count == 1 + def test_refresh_token_with_no_expiration(self, session_instance): + # Test refresh token is refreshed when not given expiration + dbx = Dropbox(oauth2_access_token=ACCESS_TOKEN, + oauth2_refresh_token=REFRESH_TOKEN, + oauth2_access_token_expiration=None, + app_key=APP_KEY, + app_secret=APP_SECRET, + session=session_instance) + dbx.check_and_refresh_access_token() + assert session_instance.post.call_count == 1 + assert dbx._oauth2_access_token_expiration + def test_check_refresh_with_invalid_grant(self, invalid_grant_session_instance): dbx = Dropbox(oauth2_refresh_token=REFRESH_TOKEN, app_key=APP_KEY, From d81a2342be0b5bf2629fdcecd4fba3a8cc9cc2f7 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Tue, 11 May 2021 17:08:29 -0700 Subject: [PATCH 39/90] Automated Spec Update (#354) 4d5bb48ac801df6410ddc9c2cad0d9f5bb0a2365 Change Notes: Team Log Namespace: - Add user_defined_tag to LabelType union Co-authored-by: DropboxBot --- dropbox/team_log.py | 13 +++++++++++++ spec | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 517f7310..14435578 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -48109,6 +48109,8 @@ class LabelType(bb.Union): # Attribute is overwritten below the class definition personal_information = None # Attribute is overwritten below the class definition + user_defined_tag = None + # Attribute is overwritten below the class definition other = None def is_personal_information(self): @@ -48119,6 +48121,14 @@ def is_personal_information(self): """ return self._tag == 'personal_information' + def is_user_defined_tag(self): + """ + Check if the union tag is ``user_defined_tag``. + + :rtype: bool + """ + return self._tag == 'user_defined_tag' + def is_other(self): """ Check if the union tag is ``other``. @@ -75837,13 +75847,16 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ] LabelType._personal_information_validator = bv.Void() +LabelType._user_defined_tag_validator = bv.Void() LabelType._other_validator = bv.Void() LabelType._tagmap = { 'personal_information': LabelType._personal_information_validator, + 'user_defined_tag': LabelType._user_defined_tag_validator, 'other': LabelType._other_validator, } LabelType.personal_information = LabelType('personal_information') +LabelType.user_defined_tag = LabelType('user_defined_tag') LabelType.other = LabelType('other') LegacyDeviceSessionLogInfo.session_info.validator = bv.Nullable(SessionLogInfo_validator) diff --git a/spec b/spec index 85f2eff0..4d5bb48a 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 85f2eff045cf6df883f269ed6ecd9b39457077ed +Subproject commit 4d5bb48ac801df6410ddc9c2cad0d9f5bb0a2365 From 13bf19853a8e418dd2bba3e8857619c53206a3c1 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 26 May 2021 15:23:24 -0700 Subject: [PATCH 40/90] Automated Spec Update (#362) 9745cde3e1ee181953a0f97cb10bfffc7076a35f Change Notes: team_log_generated Namespace - Add AdminAlertingAlertStateChangedDetails, OrganizeFolderWithTidyDetails, AdminAlertingAlertStateChangedType, OrganizeFolderWithTidyType structs - Add AdminAlertGeneralStateEnum unions - Update EventDetails union to include organize_folder_with_tidy_details - Update EventType union to include admin_alerting_alert_state_changed, organize_folder_with_tidy - Update EventTypeArg union to include admin_alerting_alert_state_changed, organize_folder_with_tidy Co-authored-by: jorges26 Co-authored-by: DropboxBot Co-authored-by: jorges26 --- dropbox/team_log.py | 434 ++++++++++++++++++++++++++++++++++++++++++++ spec | 2 +- 2 files changed, 435 insertions(+), 1 deletion(-) diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 14435578..e593dc2f 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -1166,6 +1166,82 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminAlertCategoryEnum_validator = bv.Union(AdminAlertCategoryEnum) +class AdminAlertGeneralStateEnum(bb.Union): + """ + Alert state + + This class acts as a tagged union. Only 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 + active = None + # Attribute is overwritten below the class definition + dismissed = None + # Attribute is overwritten below the class definition + in_progress = None + # Attribute is overwritten below the class definition + na = None + # Attribute is overwritten below the class definition + resolved = 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_dismissed(self): + """ + Check if the union tag is ``dismissed``. + + :rtype: bool + """ + return self._tag == 'dismissed' + + def is_in_progress(self): + """ + Check if the union tag is ``in_progress``. + + :rtype: bool + """ + return self._tag == 'in_progress' + + def is_na(self): + """ + Check if the union tag is ``na``. + + :rtype: bool + """ + return self._tag == 'na' + + def is_resolved(self): + """ + Check if the union tag is ``resolved``. + + :rtype: bool + """ + return self._tag == 'resolved' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AdminAlertGeneralStateEnum, self)._process_custom_annotations(annotation_type, field_path, processor) + +AdminAlertGeneralStateEnum_validator = bv.Union(AdminAlertGeneralStateEnum) + class AdminAlertSeverityEnum(bb.Union): """ Alert severity @@ -1375,6 +1451,105 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminAlertingAlertSensitivity_validator = bv.Union(AdminAlertingAlertSensitivity) +class AdminAlertingAlertStateChangedDetails(bb.Struct): + """ + Changed an alert state. + + :ivar team_log.AdminAlertingAlertStateChangedDetails.alert_name: Alert name. + :ivar team_log.AdminAlertingAlertStateChangedDetails.alert_severity: Alert + severity. + :ivar team_log.AdminAlertingAlertStateChangedDetails.alert_category: Alert + category. + :ivar team_log.AdminAlertingAlertStateChangedDetails.alert_instance_id: + Alert ID. + :ivar team_log.AdminAlertingAlertStateChangedDetails.previous_value: Alert + state before the change. + :ivar team_log.AdminAlertingAlertStateChangedDetails.new_value: Alert state + after the change. + """ + + __slots__ = [ + '_alert_name_value', + '_alert_severity_value', + '_alert_category_value', + '_alert_instance_id_value', + '_previous_value_value', + '_new_value_value', + ] + + _has_required_fields = True + + def __init__(self, + alert_name=None, + alert_severity=None, + alert_category=None, + alert_instance_id=None, + previous_value=None, + new_value=None): + self._alert_name_value = bb.NOT_SET + self._alert_severity_value = bb.NOT_SET + self._alert_category_value = bb.NOT_SET + self._alert_instance_id_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET + if alert_name is not None: + self.alert_name = alert_name + if alert_severity is not None: + self.alert_severity = alert_severity + if alert_category is not None: + self.alert_category = alert_category + if alert_instance_id is not None: + self.alert_instance_id = alert_instance_id + if previous_value is not None: + self.previous_value = previous_value + if new_value is not None: + self.new_value = new_value + + # Instance attribute type: str (validator is set below) + alert_name = bb.Attribute("alert_name") + + # Instance attribute type: AdminAlertSeverityEnum (validator is set below) + alert_severity = bb.Attribute("alert_severity", user_defined=True) + + # Instance attribute type: AdminAlertCategoryEnum (validator is set below) + alert_category = bb.Attribute("alert_category", user_defined=True) + + # Instance attribute type: str (validator is set below) + alert_instance_id = bb.Attribute("alert_instance_id") + + # Instance attribute type: AdminAlertGeneralStateEnum (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) + + # Instance attribute type: AdminAlertGeneralStateEnum (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AdminAlertingAlertStateChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +AdminAlertingAlertStateChangedDetails_validator = bv.Struct(AdminAlertingAlertStateChangedDetails) + +class AdminAlertingAlertStateChangedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AdminAlertingAlertStateChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +AdminAlertingAlertStateChangedType_validator = bv.Struct(AdminAlertingAlertStateChangedType) + class AdminAlertingAlertStatePolicy(bb.Union): """ Policy for controlling whether an alert can be triggered or not @@ -7344,6 +7519,17 @@ class EventDetails(bb.Union): # Attribute is overwritten below the class definition other = None + @classmethod + def admin_alerting_alert_state_changed_details(cls, val): + """ + Create an instance of this class set to the + ``admin_alerting_alert_state_changed_details`` tag with value ``val``. + + :param AdminAlertingAlertStateChangedDetails val: + :rtype: EventDetails + """ + return cls('admin_alerting_alert_state_changed_details', val) + @classmethod def admin_alerting_changed_alert_config_details(cls, val): """ @@ -8353,6 +8539,17 @@ def object_label_updated_value_details(cls, val): """ return cls('object_label_updated_value_details', val) + @classmethod + def organize_folder_with_tidy_details(cls, val): + """ + Create an instance of this class set to the + ``organize_folder_with_tidy_details`` tag with value ``val``. + + :param OrganizeFolderWithTidyDetails val: + :rtype: EventDetails + """ + return cls('organize_folder_with_tidy_details', val) + @classmethod def rewind_folder_details(cls, val): """ @@ -12481,6 +12678,14 @@ def missing_details(cls, val): """ return cls('missing_details', val) + def is_admin_alerting_alert_state_changed_details(self): + """ + Check if the union tag is ``admin_alerting_alert_state_changed_details``. + + :rtype: bool + """ + return self._tag == 'admin_alerting_alert_state_changed_details' + def is_admin_alerting_changed_alert_config_details(self): """ Check if the union tag is ``admin_alerting_changed_alert_config_details``. @@ -13209,6 +13414,14 @@ def is_object_label_updated_value_details(self): """ return self._tag == 'object_label_updated_value_details' + def is_organize_folder_with_tidy_details(self): + """ + Check if the union tag is ``organize_folder_with_tidy_details``. + + :rtype: bool + """ + return self._tag == 'organize_folder_with_tidy_details' + def is_rewind_folder_details(self): """ Check if the union tag is ``rewind_folder_details``. @@ -16185,6 +16398,16 @@ def is_other(self): """ return self._tag == 'other' + def get_admin_alerting_alert_state_changed_details(self): + """ + Only call this if :meth:`is_admin_alerting_alert_state_changed_details` is true. + + :rtype: AdminAlertingAlertStateChangedDetails + """ + if not self.is_admin_alerting_alert_state_changed_details(): + raise AttributeError("tag 'admin_alerting_alert_state_changed_details' not set") + return self._value + def get_admin_alerting_changed_alert_config_details(self): """ Only call this if :meth:`is_admin_alerting_changed_alert_config_details` is true. @@ -17095,6 +17318,16 @@ def get_object_label_updated_value_details(self): raise AttributeError("tag 'object_label_updated_value_details' not set") return self._value + def get_organize_folder_with_tidy_details(self): + """ + Only call this if :meth:`is_organize_folder_with_tidy_details` is true. + + :rtype: OrganizeFolderWithTidyDetails + """ + if not self.is_organize_folder_with_tidy_details(): + raise AttributeError("tag 'organize_folder_with_tidy_details' not set") + return self._value + def get_rewind_folder_details(self): """ Only call this if :meth:`is_rewind_folder_details` is true. @@ -20821,6 +21054,9 @@ class EventType(bb.Union): return true. To get the associated value of a tag (if one exists), use the corresponding ``get_*`` method. + :ivar AdminAlertingAlertStateChangedType + EventType.admin_alerting_alert_state_changed: (admin_alerting) Changed + an alert state :ivar AdminAlertingChangedAlertConfigType EventType.admin_alerting_changed_alert_config: (admin_alerting) Changed an alert setting @@ -21034,6 +21270,8 @@ class EventType(bb.Union): (file_operations) Removed a label :ivar ObjectLabelUpdatedValueType EventType.object_label_updated_value: (file_operations) Updated a label's value + :ivar OrganizeFolderWithTidyType EventType.organize_folder_with_tidy: + (file_operations) Organized a folder with the Tidy Up action :ivar RewindFolderType EventType.rewind_folder: (file_operations) Rewound a folder :ivar FileRequestChangeType EventType.file_request_change: (file_requests) @@ -21943,6 +22181,17 @@ class EventType(bb.Union): # Attribute is overwritten below the class definition other = None + @classmethod + def admin_alerting_alert_state_changed(cls, val): + """ + Create an instance of this class set to the + ``admin_alerting_alert_state_changed`` tag with value ``val``. + + :param AdminAlertingAlertStateChangedType val: + :rtype: EventType + """ + return cls('admin_alerting_alert_state_changed', val) + @classmethod def admin_alerting_changed_alert_config(cls, val): """ @@ -22946,6 +23195,17 @@ def object_label_updated_value(cls, val): """ return cls('object_label_updated_value', val) + @classmethod + def organize_folder_with_tidy(cls, val): + """ + Create an instance of this class set to the + ``organize_folder_with_tidy`` tag with value ``val``. + + :param OrganizeFolderWithTidyType val: + :rtype: EventType + """ + return cls('organize_folder_with_tidy', val) + @classmethod def rewind_folder(cls, val): """ @@ -27030,6 +27290,14 @@ def team_merge_request_sent_shown_to_secondary_team(cls, val): """ return cls('team_merge_request_sent_shown_to_secondary_team', val) + def is_admin_alerting_alert_state_changed(self): + """ + Check if the union tag is ``admin_alerting_alert_state_changed``. + + :rtype: bool + """ + return self._tag == 'admin_alerting_alert_state_changed' + def is_admin_alerting_changed_alert_config(self): """ Check if the union tag is ``admin_alerting_changed_alert_config``. @@ -27758,6 +28026,14 @@ def is_object_label_updated_value(self): """ return self._tag == 'object_label_updated_value' + def is_organize_folder_with_tidy(self): + """ + Check if the union tag is ``organize_folder_with_tidy``. + + :rtype: bool + """ + return self._tag == 'organize_folder_with_tidy' + def is_rewind_folder(self): """ Check if the union tag is ``rewind_folder``. @@ -30726,6 +31002,18 @@ def is_other(self): """ return self._tag == 'other' + def get_admin_alerting_alert_state_changed(self): + """ + (admin_alerting) Changed an alert state + + Only call this if :meth:`is_admin_alerting_alert_state_changed` is true. + + :rtype: AdminAlertingAlertStateChangedType + """ + if not self.is_admin_alerting_alert_state_changed(): + raise AttributeError("tag 'admin_alerting_alert_state_changed' not set") + return self._value + def get_admin_alerting_changed_alert_config(self): """ (admin_alerting) Changed an alert setting @@ -31823,6 +32111,18 @@ def get_object_label_updated_value(self): raise AttributeError("tag 'object_label_updated_value' not set") return self._value + def get_organize_folder_with_tidy(self): + """ + (file_operations) Organized a folder with the Tidy Up action + + Only call this if :meth:`is_organize_folder_with_tidy` is true. + + :rtype: OrganizeFolderWithTidyType + """ + if not self.is_organize_folder_with_tidy(): + raise AttributeError("tag 'organize_folder_with_tidy' not set") + return self._value + def get_rewind_folder(self): """ (file_operations) Rewound a folder @@ -36351,6 +36651,8 @@ class EventTypeArg(bb.Union): return true. To get the associated value of a tag (if one exists), use the corresponding ``get_*`` method. + :ivar team_log.EventTypeArg.admin_alerting_alert_state_changed: + (admin_alerting) Changed an alert state :ivar team_log.EventTypeArg.admin_alerting_changed_alert_config: (admin_alerting) Changed an alert setting :ivar team_log.EventTypeArg.admin_alerting_triggered_alert: (admin_alerting) @@ -36528,6 +36830,8 @@ class EventTypeArg(bb.Union): a label :ivar team_log.EventTypeArg.object_label_updated_value: (file_operations) Updated a label's value + :ivar team_log.EventTypeArg.organize_folder_with_tidy: (file_operations) + Organized a folder with the Tidy Up action :ivar team_log.EventTypeArg.rewind_folder: (file_operations) Rewound a folder :ivar team_log.EventTypeArg.file_request_change: (file_requests) Changed @@ -37306,6 +37610,8 @@ class EventTypeArg(bb.Union): _catch_all = 'other' # Attribute is overwritten below the class definition + admin_alerting_alert_state_changed = None + # Attribute is overwritten below the class definition admin_alerting_changed_alert_config = None # Attribute is overwritten below the class definition admin_alerting_triggered_alert = None @@ -37488,6 +37794,8 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition object_label_updated_value = None # Attribute is overwritten below the class definition + organize_folder_with_tidy = None + # Attribute is overwritten below the class definition rewind_folder = None # Attribute is overwritten below the class definition file_request_change = None @@ -38230,6 +38538,14 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition other = None + def is_admin_alerting_alert_state_changed(self): + """ + Check if the union tag is ``admin_alerting_alert_state_changed``. + + :rtype: bool + """ + return self._tag == 'admin_alerting_alert_state_changed' + def is_admin_alerting_changed_alert_config(self): """ Check if the union tag is ``admin_alerting_changed_alert_config``. @@ -38958,6 +39274,14 @@ def is_object_label_updated_value(self): """ return self._tag == 'object_label_updated_value' + def is_organize_folder_with_tidy(self): + """ + Check if the union tag is ``organize_folder_with_tidy``. + + :rtype: bool + """ + return self._tag == 'organize_folder_with_tidy' + def is_rewind_folder(self): """ Check if the union tag is ``rewind_folder``. @@ -52528,6 +52852,46 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): OrganizationName_validator = bv.Struct(OrganizationName) +class OrganizeFolderWithTidyDetails(bb.Struct): + """ + Organized a folder with the Tidy Up action. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(OrganizeFolderWithTidyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +OrganizeFolderWithTidyDetails_validator = bv.Struct(OrganizeFolderWithTidyDetails) + +class OrganizeFolderWithTidyType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(OrganizeFolderWithTidyType, self)._process_custom_annotations(annotation_type, field_path, processor) + +OrganizeFolderWithTidyType_validator = bv.Struct(OrganizeFolderWithTidyType) + class OriginLogInfo(bb.Struct): """ The origin from which the actor performed the action. @@ -69743,6 +70107,28 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminAlertCategoryEnum.threat_management = AdminAlertCategoryEnum('threat_management') AdminAlertCategoryEnum.other = AdminAlertCategoryEnum('other') +AdminAlertGeneralStateEnum._active_validator = bv.Void() +AdminAlertGeneralStateEnum._dismissed_validator = bv.Void() +AdminAlertGeneralStateEnum._in_progress_validator = bv.Void() +AdminAlertGeneralStateEnum._na_validator = bv.Void() +AdminAlertGeneralStateEnum._resolved_validator = bv.Void() +AdminAlertGeneralStateEnum._other_validator = bv.Void() +AdminAlertGeneralStateEnum._tagmap = { + 'active': AdminAlertGeneralStateEnum._active_validator, + 'dismissed': AdminAlertGeneralStateEnum._dismissed_validator, + 'in_progress': AdminAlertGeneralStateEnum._in_progress_validator, + 'na': AdminAlertGeneralStateEnum._na_validator, + 'resolved': AdminAlertGeneralStateEnum._resolved_validator, + 'other': AdminAlertGeneralStateEnum._other_validator, +} + +AdminAlertGeneralStateEnum.active = AdminAlertGeneralStateEnum('active') +AdminAlertGeneralStateEnum.dismissed = AdminAlertGeneralStateEnum('dismissed') +AdminAlertGeneralStateEnum.in_progress = AdminAlertGeneralStateEnum('in_progress') +AdminAlertGeneralStateEnum.na = AdminAlertGeneralStateEnum('na') +AdminAlertGeneralStateEnum.resolved = AdminAlertGeneralStateEnum('resolved') +AdminAlertGeneralStateEnum.other = AdminAlertGeneralStateEnum('other') + AdminAlertSeverityEnum._high_validator = bv.Void() AdminAlertSeverityEnum._info_validator = bv.Void() AdminAlertSeverityEnum._low_validator = bv.Void() @@ -69804,6 +70190,33 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminAlertingAlertSensitivity.medium = AdminAlertingAlertSensitivity('medium') AdminAlertingAlertSensitivity.other = AdminAlertingAlertSensitivity('other') +AdminAlertingAlertStateChangedDetails.alert_name.validator = bv.String() +AdminAlertingAlertStateChangedDetails.alert_severity.validator = AdminAlertSeverityEnum_validator +AdminAlertingAlertStateChangedDetails.alert_category.validator = AdminAlertCategoryEnum_validator +AdminAlertingAlertStateChangedDetails.alert_instance_id.validator = bv.String() +AdminAlertingAlertStateChangedDetails.previous_value.validator = AdminAlertGeneralStateEnum_validator +AdminAlertingAlertStateChangedDetails.new_value.validator = AdminAlertGeneralStateEnum_validator +AdminAlertingAlertStateChangedDetails._all_field_names_ = set([ + 'alert_name', + 'alert_severity', + 'alert_category', + 'alert_instance_id', + 'previous_value', + 'new_value', +]) +AdminAlertingAlertStateChangedDetails._all_fields_ = [ + ('alert_name', AdminAlertingAlertStateChangedDetails.alert_name.validator), + ('alert_severity', AdminAlertingAlertStateChangedDetails.alert_severity.validator), + ('alert_category', AdminAlertingAlertStateChangedDetails.alert_category.validator), + ('alert_instance_id', AdminAlertingAlertStateChangedDetails.alert_instance_id.validator), + ('previous_value', AdminAlertingAlertStateChangedDetails.previous_value.validator), + ('new_value', AdminAlertingAlertStateChangedDetails.new_value.validator), +] + +AdminAlertingAlertStateChangedType.description.validator = bv.String() +AdminAlertingAlertStateChangedType._all_field_names_ = set(['description']) +AdminAlertingAlertStateChangedType._all_fields_ = [('description', AdminAlertingAlertStateChangedType.description.validator)] + AdminAlertingAlertStatePolicy._off_validator = bv.Void() AdminAlertingAlertStatePolicy._on_validator = bv.Void() AdminAlertingAlertStatePolicy._other_validator = bv.Void() @@ -71192,6 +71605,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventCategory.trusted_teams = EventCategory('trusted_teams') EventCategory.other = EventCategory('other') +EventDetails._admin_alerting_alert_state_changed_details_validator = AdminAlertingAlertStateChangedDetails_validator EventDetails._admin_alerting_changed_alert_config_details_validator = AdminAlertingChangedAlertConfigDetails_validator EventDetails._admin_alerting_triggered_alert_details_validator = AdminAlertingTriggeredAlertDetails_validator EventDetails._app_blocked_by_permissions_details_validator = AppBlockedByPermissionsDetails_validator @@ -71283,6 +71697,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._object_label_added_details_validator = ObjectLabelAddedDetails_validator EventDetails._object_label_removed_details_validator = ObjectLabelRemovedDetails_validator EventDetails._object_label_updated_value_details_validator = ObjectLabelUpdatedValueDetails_validator +EventDetails._organize_folder_with_tidy_details_validator = OrganizeFolderWithTidyDetails_validator EventDetails._rewind_folder_details_validator = RewindFolderDetails_validator EventDetails._file_request_change_details_validator = FileRequestChangeDetails_validator EventDetails._file_request_close_details_validator = FileRequestCloseDetails_validator @@ -71656,6 +72071,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._missing_details_validator = MissingDetails_validator EventDetails._other_validator = bv.Void() EventDetails._tagmap = { + 'admin_alerting_alert_state_changed_details': EventDetails._admin_alerting_alert_state_changed_details_validator, 'admin_alerting_changed_alert_config_details': EventDetails._admin_alerting_changed_alert_config_details_validator, 'admin_alerting_triggered_alert_details': EventDetails._admin_alerting_triggered_alert_details_validator, 'app_blocked_by_permissions_details': EventDetails._app_blocked_by_permissions_details_validator, @@ -71747,6 +72163,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'object_label_added_details': EventDetails._object_label_added_details_validator, 'object_label_removed_details': EventDetails._object_label_removed_details_validator, 'object_label_updated_value_details': EventDetails._object_label_updated_value_details_validator, + 'organize_folder_with_tidy_details': EventDetails._organize_folder_with_tidy_details_validator, 'rewind_folder_details': EventDetails._rewind_folder_details_validator, 'file_request_change_details': EventDetails._file_request_change_details_validator, 'file_request_close_details': EventDetails._file_request_close_details_validator, @@ -72123,6 +72540,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails.other = EventDetails('other') +EventType._admin_alerting_alert_state_changed_validator = AdminAlertingAlertStateChangedType_validator EventType._admin_alerting_changed_alert_config_validator = AdminAlertingChangedAlertConfigType_validator EventType._admin_alerting_triggered_alert_validator = AdminAlertingTriggeredAlertType_validator EventType._app_blocked_by_permissions_validator = AppBlockedByPermissionsType_validator @@ -72214,6 +72632,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._object_label_added_validator = ObjectLabelAddedType_validator EventType._object_label_removed_validator = ObjectLabelRemovedType_validator EventType._object_label_updated_value_validator = ObjectLabelUpdatedValueType_validator +EventType._organize_folder_with_tidy_validator = OrganizeFolderWithTidyType_validator EventType._rewind_folder_validator = RewindFolderType_validator EventType._file_request_change_validator = FileRequestChangeType_validator EventType._file_request_close_validator = FileRequestCloseType_validator @@ -72586,6 +73005,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._team_merge_request_sent_shown_to_secondary_team_validator = TeamMergeRequestSentShownToSecondaryTeamType_validator EventType._other_validator = bv.Void() EventType._tagmap = { + 'admin_alerting_alert_state_changed': EventType._admin_alerting_alert_state_changed_validator, 'admin_alerting_changed_alert_config': EventType._admin_alerting_changed_alert_config_validator, 'admin_alerting_triggered_alert': EventType._admin_alerting_triggered_alert_validator, 'app_blocked_by_permissions': EventType._app_blocked_by_permissions_validator, @@ -72677,6 +73097,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'object_label_added': EventType._object_label_added_validator, 'object_label_removed': EventType._object_label_removed_validator, 'object_label_updated_value': EventType._object_label_updated_value_validator, + 'organize_folder_with_tidy': EventType._organize_folder_with_tidy_validator, 'rewind_folder': EventType._rewind_folder_validator, 'file_request_change': EventType._file_request_change_validator, 'file_request_close': EventType._file_request_close_validator, @@ -73052,6 +73473,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType.other = EventType('other') +EventTypeArg._admin_alerting_alert_state_changed_validator = bv.Void() EventTypeArg._admin_alerting_changed_alert_config_validator = bv.Void() EventTypeArg._admin_alerting_triggered_alert_validator = bv.Void() EventTypeArg._app_blocked_by_permissions_validator = bv.Void() @@ -73143,6 +73565,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._object_label_added_validator = bv.Void() EventTypeArg._object_label_removed_validator = bv.Void() EventTypeArg._object_label_updated_value_validator = bv.Void() +EventTypeArg._organize_folder_with_tidy_validator = bv.Void() EventTypeArg._rewind_folder_validator = bv.Void() EventTypeArg._file_request_change_validator = bv.Void() EventTypeArg._file_request_close_validator = bv.Void() @@ -73515,6 +73938,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._team_merge_request_sent_shown_to_secondary_team_validator = bv.Void() EventTypeArg._other_validator = bv.Void() EventTypeArg._tagmap = { + 'admin_alerting_alert_state_changed': EventTypeArg._admin_alerting_alert_state_changed_validator, 'admin_alerting_changed_alert_config': EventTypeArg._admin_alerting_changed_alert_config_validator, 'admin_alerting_triggered_alert': EventTypeArg._admin_alerting_triggered_alert_validator, 'app_blocked_by_permissions': EventTypeArg._app_blocked_by_permissions_validator, @@ -73606,6 +74030,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'object_label_added': EventTypeArg._object_label_added_validator, 'object_label_removed': EventTypeArg._object_label_removed_validator, 'object_label_updated_value': EventTypeArg._object_label_updated_value_validator, + 'organize_folder_with_tidy': EventTypeArg._organize_folder_with_tidy_validator, 'rewind_folder': EventTypeArg._rewind_folder_validator, 'file_request_change': EventTypeArg._file_request_change_validator, 'file_request_close': EventTypeArg._file_request_close_validator, @@ -73979,6 +74404,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'other': EventTypeArg._other_validator, } +EventTypeArg.admin_alerting_alert_state_changed = EventTypeArg('admin_alerting_alert_state_changed') EventTypeArg.admin_alerting_changed_alert_config = EventTypeArg('admin_alerting_changed_alert_config') EventTypeArg.admin_alerting_triggered_alert = EventTypeArg('admin_alerting_triggered_alert') EventTypeArg.app_blocked_by_permissions = EventTypeArg('app_blocked_by_permissions') @@ -74070,6 +74496,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.object_label_added = EventTypeArg('object_label_added') EventTypeArg.object_label_removed = EventTypeArg('object_label_removed') EventTypeArg.object_label_updated_value = EventTypeArg('object_label_updated_value') +EventTypeArg.organize_folder_with_tidy = EventTypeArg('organize_folder_with_tidy') EventTypeArg.rewind_folder = EventTypeArg('rewind_folder') EventTypeArg.file_request_change = EventTypeArg('file_request_change') EventTypeArg.file_request_close = EventTypeArg('file_request_close') @@ -76890,6 +77317,13 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): OrganizationName._all_field_names_ = set(['organization']) OrganizationName._all_fields_ = [('organization', OrganizationName.organization.validator)] +OrganizeFolderWithTidyDetails._all_field_names_ = set([]) +OrganizeFolderWithTidyDetails._all_fields_ = [] + +OrganizeFolderWithTidyType.description.validator = bv.String() +OrganizeFolderWithTidyType._all_field_names_ = set(['description']) +OrganizeFolderWithTidyType._all_fields_ = [('description', OrganizeFolderWithTidyType.description.validator)] + OriginLogInfo.geo_location.validator = bv.Nullable(GeoLocationLogInfo_validator) OriginLogInfo.access_method.validator = AccessMethodLogInfo_validator OriginLogInfo._all_field_names_ = set([ diff --git a/spec b/spec index 4d5bb48a..9745cde3 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 4d5bb48ac801df6410ddc9c2cad0d9f5bb0a2365 +Subproject commit 9745cde3e1ee181953a0f97cb10bfffc7076a35f From 7b5231200b5b4c6acbbc3cc357c6aff507d56082 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 16 Jun 2021 16:36:35 -0700 Subject: [PATCH 41/90] Automated Spec Update (#365) 9923a5075753fa7521c9a180407420b5d893e163 Change Notes: shared_content_links Namespace: - Update Comments shared_links Namespace: - Update SharedLinkSettings struct to include require_password - Update Comments team_log_generated Namespace: - Add ChangeLinkExpirationPolicy, DefaultLinkExpirationDaysPolicy and EnforceLinkPasswordPolicy unions - Update LabelType union to include test_only - Add ApplyNamingConventionDetails, UserTagsAddedDetails, UserTagsRemovedDetails, SharingChangeLinkAllowChangeExpirationPolicyDetails, SharingChangeLinkDefaultExpirationPolicyDetails, SharingChangeLinkEnforcePasswordPolicyDetails, ApplyNamingConventionType, UserTagsAddedType, UserTagsRemovedType, SharingChangeLinkAllowChangeExpirationPolicyType, SharingChangeLinkDefaultExpirationPolicyType and SharingChangeLinkEnforcePasswordPolicyType structs - Update EventDetails union to include apply_naming_convention_details, user_tags_added_details, user_tags_removed_details, sharing_change_link_allow_change_expiration_policy_details, sharing_change_link_default_expiration_policy_details and sharing_change_link_enforce_password_policy_details - Update EventType union to include apply_naming_convention, user_tags_added, user_tags_removed, sharing_change_link_allow_change_expiration_policy, sharing_change_link_default_expiration_policy and sharing_change_link_enforce_password_policy - Update EventTypeArg union to include apply_naming_convention, user_tags_added, user_tags_removed, sharing_change_link_allow_change_expiration_policy, sharing_change_link_default_expiration_policy and sharing_change_link_enforce_password_policy - Update Examples Co-authored-by: DropboxBot --- dropbox/sharing.py | 49 +- dropbox/team_log.py | 1162 +++++++++++++++++++++++++++++++++++++++++++ spec | 2 +- 3 files changed, 1194 insertions(+), 19 deletions(-) diff --git a/dropbox/sharing.py b/dropbox/sharing.py index 1737eb97..2cb79962 100644 --- a/dropbox/sharing.py +++ b/dropbox/sharing.py @@ -4026,8 +4026,9 @@ class LinkAudience(bb.Union): merely points the user to the content, and does not grant additional rights to the user. Members of the content who use this link can only access the content with their pre-existing access rights. - :ivar sharing.LinkAudience.password: A link-specific password is required to - access the link. Login is not required. + :ivar sharing.LinkAudience.password: Use `require_password` instead. A + link-specific password is required to access the link. Login is not + required. :ivar sharing.LinkAudience.members: Link is accessible only by members of the content. """ @@ -9096,11 +9097,10 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): class SharedLinkSettings(bb.Struct): """ - :ivar sharing.SharedLinkSettings.requested_visibility: The requested access - for this shared link. - :ivar sharing.SharedLinkSettings.link_password: If ``requested_visibility`` - is ``RequestedVisibility.password`` this is needed to specify the - password to access the link. + :ivar sharing.SharedLinkSettings.require_password: Boolean flag to enable or + disable password protection. + :ivar sharing.SharedLinkSettings.link_password: If ``require_password`` is + true, this is needed to specify the password to access the link. :ivar sharing.SharedLinkSettings.expires: Expiration time of the shared link. By default the link won't expire. :ivar sharing.SharedLinkSettings.audience: The new audience who can benefit @@ -9112,31 +9112,36 @@ class SharedLinkSettings(bb.Struct): :ivar sharing.SharedLinkSettings.access: Requested access level you want the audience to gain from this link. Note, modifying access level for an existing link is not supported. + :ivar sharing.SharedLinkSettings.requested_visibility: Use ``audience`` + instead. The requested access for this shared link. """ __slots__ = [ - '_requested_visibility_value', + '_require_password_value', '_link_password_value', '_expires_value', '_audience_value', '_access_value', + '_requested_visibility_value', ] _has_required_fields = False def __init__(self, - requested_visibility=None, + require_password=None, link_password=None, expires=None, audience=None, - access=None): - self._requested_visibility_value = bb.NOT_SET + access=None, + requested_visibility=None): + self._require_password_value = bb.NOT_SET self._link_password_value = bb.NOT_SET self._expires_value = bb.NOT_SET self._audience_value = bb.NOT_SET self._access_value = bb.NOT_SET - if requested_visibility is not None: - self.requested_visibility = requested_visibility + self._requested_visibility_value = bb.NOT_SET + if require_password is not None: + self.require_password = require_password if link_password is not None: self.link_password = link_password if expires is not None: @@ -9145,9 +9150,11 @@ def __init__(self, self.audience = audience if access is not None: self.access = access + if requested_visibility is not None: + self.requested_visibility = requested_visibility - # Instance attribute type: RequestedVisibility (validator is set below) - requested_visibility = bb.Attribute("requested_visibility", nullable=True, user_defined=True) + # Instance attribute type: bool (validator is set below) + require_password = bb.Attribute("require_password", nullable=True) # Instance attribute type: str (validator is set below) link_password = bb.Attribute("link_password", nullable=True) @@ -9161,6 +9168,9 @@ def __init__(self, # Instance attribute type: RequestedLinkAccessLevel (validator is set below) access = bb.Attribute("access", nullable=True, user_defined=True) + # Instance attribute type: RequestedVisibility (validator is set below) + requested_visibility = bb.Attribute("requested_visibility", nullable=True, user_defined=True) + def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettings, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -12594,24 +12604,27 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SharedLinkPolicy.members = SharedLinkPolicy('members') SharedLinkPolicy.other = SharedLinkPolicy('other') -SharedLinkSettings.requested_visibility.validator = bv.Nullable(RequestedVisibility_validator) +SharedLinkSettings.require_password.validator = bv.Nullable(bv.Boolean()) SharedLinkSettings.link_password.validator = bv.Nullable(bv.String()) SharedLinkSettings.expires.validator = bv.Nullable(common.DropboxTimestamp_validator) SharedLinkSettings.audience.validator = bv.Nullable(LinkAudience_validator) SharedLinkSettings.access.validator = bv.Nullable(RequestedLinkAccessLevel_validator) +SharedLinkSettings.requested_visibility.validator = bv.Nullable(RequestedVisibility_validator) SharedLinkSettings._all_field_names_ = set([ - 'requested_visibility', + 'require_password', 'link_password', 'expires', 'audience', 'access', + 'requested_visibility', ]) SharedLinkSettings._all_fields_ = [ - ('requested_visibility', SharedLinkSettings.requested_visibility.validator), + ('require_password', SharedLinkSettings.require_password.validator), ('link_password', SharedLinkSettings.link_password.validator), ('expires', SharedLinkSettings.expires.validator), ('audience', SharedLinkSettings.audience.validator), ('access', SharedLinkSettings.access.validator), + ('requested_visibility', SharedLinkSettings.requested_visibility.validator), ] SharedLinkSettingsError._invalid_settings_validator = bv.Void() diff --git a/dropbox/team_log.py b/dropbox/team_log.py index e593dc2f..cba1a0a8 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -2499,6 +2499,46 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AppUnlinkUserType_validator = bv.Struct(AppUnlinkUserType) +class ApplyNamingConventionDetails(bb.Struct): + """ + Applied a Naming Convention rule. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ApplyNamingConventionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +ApplyNamingConventionDetails_validator = bv.Struct(ApplyNamingConventionDetails) + +class ApplyNamingConventionType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ApplyNamingConventionType, self)._process_custom_annotations(annotation_type, field_path, processor) + +ApplyNamingConventionType_validator = bv.Struct(ApplyNamingConventionType) + class AssetLogInfo(bb.Union): """ Asset details. @@ -3491,6 +3531,53 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): Certificate_validator = bv.Struct(Certificate) +class ChangeLinkExpirationPolicy(bb.Union): + """ + Policy for deciding whether the team's default expiration days policy must + be enforced when an externally shared is updated + + This class acts as a tagged union. Only 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 + allowed = None + # Attribute is overwritten below the class definition + not_allowed = None + # Attribute is overwritten below the class definition + other = None + + def is_allowed(self): + """ + Check if the union tag is ``allowed``. + + :rtype: bool + """ + return self._tag == 'allowed' + + def is_not_allowed(self): + """ + Check if the union tag is ``not_allowed``. + + :rtype: bool + """ + return self._tag == 'not_allowed' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ChangeLinkExpirationPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) + +ChangeLinkExpirationPolicy_validator = bv.Union(ChangeLinkExpirationPolicy) + class ChangedEnterpriseAdminRoleDetails(bb.Struct): """ Changed enterprise admin role. @@ -4603,6 +4690,113 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DataPlacementRestrictionSatisfyPolicyType_validator = bv.Struct(DataPlacementRestrictionSatisfyPolicyType) +class DefaultLinkExpirationDaysPolicy(bb.Union): + """ + Policy for the default number of days until an externally shared link + expires + + This class acts as a tagged union. Only 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 + day_1 = None + # Attribute is overwritten below the class definition + day_180 = None + # Attribute is overwritten below the class definition + day_3 = None + # Attribute is overwritten below the class definition + day_30 = None + # Attribute is overwritten below the class definition + day_7 = None + # Attribute is overwritten below the class definition + day_90 = None + # Attribute is overwritten below the class definition + none = None + # Attribute is overwritten below the class definition + year_1 = None + # Attribute is overwritten below the class definition + other = None + + def is_day_1(self): + """ + Check if the union tag is ``day_1``. + + :rtype: bool + """ + return self._tag == 'day_1' + + def is_day_180(self): + """ + Check if the union tag is ``day_180``. + + :rtype: bool + """ + return self._tag == 'day_180' + + def is_day_3(self): + """ + Check if the union tag is ``day_3``. + + :rtype: bool + """ + return self._tag == 'day_3' + + def is_day_30(self): + """ + Check if the union tag is ``day_30``. + + :rtype: bool + """ + return self._tag == 'day_30' + + def is_day_7(self): + """ + Check if the union tag is ``day_7``. + + :rtype: bool + """ + return self._tag == 'day_7' + + def is_day_90(self): + """ + Check if the union tag is ``day_90``. + + :rtype: bool + """ + return self._tag == 'day_90' + + def is_none(self): + """ + Check if the union tag is ``none``. + + :rtype: bool + """ + return self._tag == 'none' + + def is_year_1(self): + """ + Check if the union tag is ``year_1``. + + :rtype: bool + """ + return self._tag == 'year_1' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(DefaultLinkExpirationDaysPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) + +DefaultLinkExpirationDaysPolicy_validator = bv.Union(DefaultLinkExpirationDaysPolicy) + class DeleteTeamInviteLinkDetails(bb.Struct): """ Deleted team invite link. @@ -7130,6 +7324,53 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EndedEnterpriseAdminSessionType_validator = bv.Struct(EndedEnterpriseAdminSessionType) +class EnforceLinkPasswordPolicy(bb.Union): + """ + Policy for deciding whether password must be enforced when an externally + shared link is updated + + This class acts as a tagged union. Only 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 + optional = None + # Attribute is overwritten below the class definition + required = None + # Attribute is overwritten below the class definition + other = None + + 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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(EnforceLinkPasswordPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) + +EnforceLinkPasswordPolicy_validator = bv.Union(EnforceLinkPasswordPolicy) + class EnterpriseSettingsLockingDetails(bb.Struct): """ Changed who can update a setting. @@ -8297,6 +8538,17 @@ def enabled_domain_invites_details(cls, val): """ return cls('enabled_domain_invites_details', val) + @classmethod + def apply_naming_convention_details(cls, val): + """ + Create an instance of this class set to the + ``apply_naming_convention_details`` tag with value ``val``. + + :param ApplyNamingConventionDetails val: + :rtype: EventDetails + """ + return cls('apply_naming_convention_details', val) + @classmethod def create_folder_details(cls, val): """ @@ -8561,6 +8813,28 @@ def rewind_folder_details(cls, val): """ return cls('rewind_folder_details', val) + @classmethod + def user_tags_added_details(cls, val): + """ + Create an instance of this class set to the ``user_tags_added_details`` + tag with value ``val``. + + :param UserTagsAddedDetails val: + :rtype: EventDetails + """ + return cls('user_tags_added_details', val) + + @classmethod + def user_tags_removed_details(cls, val): + """ + Create an instance of this class set to the + ``user_tags_removed_details`` tag with value ``val``. + + :param UserTagsRemovedDetails val: + :rtype: EventDetails + """ + return cls('user_tags_removed_details', val) + @classmethod def file_request_change_details(cls, val): """ @@ -11933,6 +12207,42 @@ def sharing_change_folder_join_policy_details(cls, val): """ return cls('sharing_change_folder_join_policy_details', val) + @classmethod + def sharing_change_link_allow_change_expiration_policy_details(cls, val): + """ + Create an instance of this class set to the + ``sharing_change_link_allow_change_expiration_policy_details`` tag with + value ``val``. + + :param SharingChangeLinkAllowChangeExpirationPolicyDetails val: + :rtype: EventDetails + """ + return cls('sharing_change_link_allow_change_expiration_policy_details', val) + + @classmethod + def sharing_change_link_default_expiration_policy_details(cls, val): + """ + Create an instance of this class set to the + ``sharing_change_link_default_expiration_policy_details`` tag with value + ``val``. + + :param SharingChangeLinkDefaultExpirationPolicyDetails val: + :rtype: EventDetails + """ + return cls('sharing_change_link_default_expiration_policy_details', val) + + @classmethod + def sharing_change_link_enforce_password_policy_details(cls, val): + """ + Create an instance of this class set to the + ``sharing_change_link_enforce_password_policy_details`` tag with value + ``val``. + + :param SharingChangeLinkEnforcePasswordPolicyDetails val: + :rtype: EventDetails + """ + return cls('sharing_change_link_enforce_password_policy_details', val) + @classmethod def sharing_change_link_policy_details(cls, val): """ @@ -13238,6 +13548,14 @@ def is_enabled_domain_invites_details(self): """ return self._tag == 'enabled_domain_invites_details' + def is_apply_naming_convention_details(self): + """ + Check if the union tag is ``apply_naming_convention_details``. + + :rtype: bool + """ + return self._tag == 'apply_naming_convention_details' + def is_create_folder_details(self): """ Check if the union tag is ``create_folder_details``. @@ -13430,6 +13748,22 @@ def is_rewind_folder_details(self): """ return self._tag == 'rewind_folder_details' + def is_user_tags_added_details(self): + """ + Check if the union tag is ``user_tags_added_details``. + + :rtype: bool + """ + return self._tag == 'user_tags_added_details' + + def is_user_tags_removed_details(self): + """ + Check if the union tag is ``user_tags_removed_details``. + + :rtype: bool + """ + return self._tag == 'user_tags_removed_details' + def is_file_request_change_details(self): """ Check if the union tag is ``file_request_change_details``. @@ -15862,6 +16196,30 @@ def is_sharing_change_folder_join_policy_details(self): """ return self._tag == 'sharing_change_folder_join_policy_details' + def is_sharing_change_link_allow_change_expiration_policy_details(self): + """ + Check if the union tag is ``sharing_change_link_allow_change_expiration_policy_details``. + + :rtype: bool + """ + return self._tag == 'sharing_change_link_allow_change_expiration_policy_details' + + def is_sharing_change_link_default_expiration_policy_details(self): + """ + Check if the union tag is ``sharing_change_link_default_expiration_policy_details``. + + :rtype: bool + """ + return self._tag == 'sharing_change_link_default_expiration_policy_details' + + def is_sharing_change_link_enforce_password_policy_details(self): + """ + Check if the union tag is ``sharing_change_link_enforce_password_policy_details``. + + :rtype: bool + """ + return self._tag == 'sharing_change_link_enforce_password_policy_details' + def is_sharing_change_link_policy_details(self): """ Check if the union tag is ``sharing_change_link_policy_details``. @@ -17098,6 +17456,16 @@ def get_enabled_domain_invites_details(self): raise AttributeError("tag 'enabled_domain_invites_details' not set") return self._value + def get_apply_naming_convention_details(self): + """ + Only call this if :meth:`is_apply_naming_convention_details` is true. + + :rtype: ApplyNamingConventionDetails + """ + if not self.is_apply_naming_convention_details(): + raise AttributeError("tag 'apply_naming_convention_details' not set") + return self._value + def get_create_folder_details(self): """ Only call this if :meth:`is_create_folder_details` is true. @@ -17338,6 +17706,26 @@ def get_rewind_folder_details(self): raise AttributeError("tag 'rewind_folder_details' not set") return self._value + def get_user_tags_added_details(self): + """ + Only call this if :meth:`is_user_tags_added_details` is true. + + :rtype: UserTagsAddedDetails + """ + if not self.is_user_tags_added_details(): + raise AttributeError("tag 'user_tags_added_details' not set") + return self._value + + def get_user_tags_removed_details(self): + """ + Only call this if :meth:`is_user_tags_removed_details` is true. + + :rtype: UserTagsRemovedDetails + """ + if not self.is_user_tags_removed_details(): + raise AttributeError("tag 'user_tags_removed_details' not set") + return self._value + def get_file_request_change_details(self): """ Only call this if :meth:`is_file_request_change_details` is true. @@ -20378,6 +20766,36 @@ def get_sharing_change_folder_join_policy_details(self): raise AttributeError("tag 'sharing_change_folder_join_policy_details' not set") return self._value + def get_sharing_change_link_allow_change_expiration_policy_details(self): + """ + Only call this if :meth:`is_sharing_change_link_allow_change_expiration_policy_details` is true. + + :rtype: SharingChangeLinkAllowChangeExpirationPolicyDetails + """ + if not self.is_sharing_change_link_allow_change_expiration_policy_details(): + raise AttributeError("tag 'sharing_change_link_allow_change_expiration_policy_details' not set") + return self._value + + def get_sharing_change_link_default_expiration_policy_details(self): + """ + Only call this if :meth:`is_sharing_change_link_default_expiration_policy_details` is true. + + :rtype: SharingChangeLinkDefaultExpirationPolicyDetails + """ + if not self.is_sharing_change_link_default_expiration_policy_details(): + raise AttributeError("tag 'sharing_change_link_default_expiration_policy_details' not set") + return self._value + + def get_sharing_change_link_enforce_password_policy_details(self): + """ + Only call this if :meth:`is_sharing_change_link_enforce_password_policy_details` is true. + + :rtype: SharingChangeLinkEnforcePasswordPolicyDetails + """ + if not self.is_sharing_change_link_enforce_password_policy_details(): + raise AttributeError("tag 'sharing_change_link_enforce_password_policy_details' not set") + return self._value + def get_sharing_change_link_policy_details(self): """ Only call this if :meth:`is_sharing_change_link_policy_details` is true. @@ -21224,6 +21642,8 @@ class EventType(bb.Union): from list of verified team domains :ivar EnabledDomainInvitesType EventType.enabled_domain_invites: (domains) Enabled domain invites (deprecated, no longer logged) + :ivar ApplyNamingConventionType EventType.apply_naming_convention: + (file_operations) Applied a Naming Convention rule :ivar CreateFolderType EventType.create_folder: (file_operations) Created folders (deprecated, no longer logged) :ivar FileAddType EventType.file_add: (file_operations) Added files and/or @@ -21274,6 +21694,10 @@ class EventType(bb.Union): (file_operations) Organized a folder with the Tidy Up action :ivar RewindFolderType EventType.rewind_folder: (file_operations) Rewound a folder + :ivar UserTagsAddedType EventType.user_tags_added: (file_operations) Tagged + a file + :ivar UserTagsRemovedType EventType.user_tags_removed: (file_operations) + Removed tags :ivar FileRequestChangeType EventType.file_request_change: (file_requests) Changed file request :ivar FileRequestCloseType EventType.file_request_close: (file_requests) @@ -22000,6 +22424,17 @@ class EventType(bb.Union): :ivar SharingChangeFolderJoinPolicyType EventType.sharing_change_folder_join_policy: (team_policies) Changed whether team members can join shared folders owned outside team + :ivar SharingChangeLinkAllowChangeExpirationPolicyType + EventType.sharing_change_link_allow_change_expiration_policy: + (team_policies) Changed the password requirement for the links shared + outside of the team + :ivar SharingChangeLinkDefaultExpirationPolicyType + EventType.sharing_change_link_default_expiration_policy: (team_policies) + Changed the default expiration for the links shared outside of the team + :ivar SharingChangeLinkEnforcePasswordPolicyType + EventType.sharing_change_link_enforce_password_policy: (team_policies) + Changed the allow remove or change expiration policy for the links + shared outside of the team :ivar SharingChangeLinkPolicyType EventType.sharing_change_link_policy: (team_policies) Changed whether members can share links outside team, and if links are accessible only by team members or anyone by default @@ -22953,6 +23388,17 @@ def enabled_domain_invites(cls, val): """ return cls('enabled_domain_invites', val) + @classmethod + def apply_naming_convention(cls, val): + """ + Create an instance of this class set to the ``apply_naming_convention`` + tag with value ``val``. + + :param ApplyNamingConventionType val: + :rtype: EventType + """ + return cls('apply_naming_convention', val) + @classmethod def create_folder(cls, val): """ @@ -23217,6 +23663,28 @@ def rewind_folder(cls, val): """ return cls('rewind_folder', val) + @classmethod + def user_tags_added(cls, val): + """ + Create an instance of this class set to the ``user_tags_added`` tag with + value ``val``. + + :param UserTagsAddedType val: + :rtype: EventType + """ + return cls('user_tags_added', val) + + @classmethod + def user_tags_removed(cls, val): + """ + Create an instance of this class set to the ``user_tags_removed`` tag + with value ``val``. + + :param UserTagsRemovedType val: + :rtype: EventType + """ + return cls('user_tags_removed', val) + @classmethod def file_request_change(cls, val): """ @@ -26563,6 +27031,41 @@ def sharing_change_folder_join_policy(cls, val): """ return cls('sharing_change_folder_join_policy', val) + @classmethod + def sharing_change_link_allow_change_expiration_policy(cls, val): + """ + Create an instance of this class set to the + ``sharing_change_link_allow_change_expiration_policy`` tag with value + ``val``. + + :param SharingChangeLinkAllowChangeExpirationPolicyType val: + :rtype: EventType + """ + return cls('sharing_change_link_allow_change_expiration_policy', val) + + @classmethod + def sharing_change_link_default_expiration_policy(cls, val): + """ + Create an instance of this class set to the + ``sharing_change_link_default_expiration_policy`` tag with value + ``val``. + + :param SharingChangeLinkDefaultExpirationPolicyType val: + :rtype: EventType + """ + return cls('sharing_change_link_default_expiration_policy', val) + + @classmethod + def sharing_change_link_enforce_password_policy(cls, val): + """ + Create an instance of this class set to the + ``sharing_change_link_enforce_password_policy`` tag with value ``val``. + + :param SharingChangeLinkEnforcePasswordPolicyType val: + :rtype: EventType + """ + return cls('sharing_change_link_enforce_password_policy', val) + @classmethod def sharing_change_link_policy(cls, val): """ @@ -27850,6 +28353,14 @@ def is_enabled_domain_invites(self): """ return self._tag == 'enabled_domain_invites' + def is_apply_naming_convention(self): + """ + Check if the union tag is ``apply_naming_convention``. + + :rtype: bool + """ + return self._tag == 'apply_naming_convention' + def is_create_folder(self): """ Check if the union tag is ``create_folder``. @@ -28042,6 +28553,22 @@ def is_rewind_folder(self): """ return self._tag == 'rewind_folder' + def is_user_tags_added(self): + """ + Check if the union tag is ``user_tags_added``. + + :rtype: bool + """ + return self._tag == 'user_tags_added' + + def is_user_tags_removed(self): + """ + Check if the union tag is ``user_tags_removed``. + + :rtype: bool + """ + return self._tag == 'user_tags_removed' + def is_file_request_change(self): """ Check if the union tag is ``file_request_change``. @@ -30474,6 +31001,30 @@ def is_sharing_change_folder_join_policy(self): """ return self._tag == 'sharing_change_folder_join_policy' + def is_sharing_change_link_allow_change_expiration_policy(self): + """ + Check if the union tag is ``sharing_change_link_allow_change_expiration_policy``. + + :rtype: bool + """ + return self._tag == 'sharing_change_link_allow_change_expiration_policy' + + def is_sharing_change_link_default_expiration_policy(self): + """ + Check if the union tag is ``sharing_change_link_default_expiration_policy``. + + :rtype: bool + """ + return self._tag == 'sharing_change_link_default_expiration_policy' + + def is_sharing_change_link_enforce_password_policy(self): + """ + Check if the union tag is ``sharing_change_link_enforce_password_policy``. + + :rtype: bool + """ + return self._tag == 'sharing_change_link_enforce_password_policy' + def is_sharing_change_link_policy(self): """ Check if the union tag is ``sharing_change_link_policy``. @@ -31847,6 +32398,18 @@ def get_enabled_domain_invites(self): raise AttributeError("tag 'enabled_domain_invites' not set") return self._value + def get_apply_naming_convention(self): + """ + (file_operations) Applied a Naming Convention rule + + Only call this if :meth:`is_apply_naming_convention` is true. + + :rtype: ApplyNamingConventionType + """ + if not self.is_apply_naming_convention(): + raise AttributeError("tag 'apply_naming_convention' not set") + return self._value + def get_create_folder(self): """ (file_operations) Created folders (deprecated, no longer logged) @@ -32135,6 +32698,30 @@ def get_rewind_folder(self): raise AttributeError("tag 'rewind_folder' not set") return self._value + def get_user_tags_added(self): + """ + (file_operations) Tagged a file + + Only call this if :meth:`is_user_tags_added` is true. + + :rtype: UserTagsAddedType + """ + if not self.is_user_tags_added(): + raise AttributeError("tag 'user_tags_added' not set") + return self._value + + def get_user_tags_removed(self): + """ + (file_operations) Removed tags + + Only call this if :meth:`is_user_tags_removed` is true. + + :rtype: UserTagsRemovedType + """ + if not self.is_user_tags_removed(): + raise AttributeError("tag 'user_tags_removed' not set") + return self._value + def get_file_request_change(self): """ (file_requests) Changed file request @@ -35838,6 +36425,45 @@ def get_sharing_change_folder_join_policy(self): raise AttributeError("tag 'sharing_change_folder_join_policy' not set") return self._value + def get_sharing_change_link_allow_change_expiration_policy(self): + """ + (team_policies) Changed the password requirement for the links shared + outside of the team + + Only call this if :meth:`is_sharing_change_link_allow_change_expiration_policy` is true. + + :rtype: SharingChangeLinkAllowChangeExpirationPolicyType + """ + if not self.is_sharing_change_link_allow_change_expiration_policy(): + raise AttributeError("tag 'sharing_change_link_allow_change_expiration_policy' not set") + return self._value + + def get_sharing_change_link_default_expiration_policy(self): + """ + (team_policies) Changed the default expiration for the links shared + outside of the team + + Only call this if :meth:`is_sharing_change_link_default_expiration_policy` is true. + + :rtype: SharingChangeLinkDefaultExpirationPolicyType + """ + if not self.is_sharing_change_link_default_expiration_policy(): + raise AttributeError("tag 'sharing_change_link_default_expiration_policy' not set") + return self._value + + def get_sharing_change_link_enforce_password_policy(self): + """ + (team_policies) Changed the allow remove or change expiration policy for + the links shared outside of the team + + Only call this if :meth:`is_sharing_change_link_enforce_password_policy` is true. + + :rtype: SharingChangeLinkEnforcePasswordPolicyType + """ + if not self.is_sharing_change_link_enforce_password_policy(): + raise AttributeError("tag 'sharing_change_link_enforce_password_policy' not set") + return self._value + def get_sharing_change_link_policy(self): """ (team_policies) Changed whether members can share links outside team, @@ -36787,6 +37413,8 @@ class EventTypeArg(bb.Union): Removed domain from list of verified team domains :ivar team_log.EventTypeArg.enabled_domain_invites: (domains) Enabled domain invites (deprecated, no longer logged) + :ivar team_log.EventTypeArg.apply_naming_convention: (file_operations) + Applied a Naming Convention rule :ivar team_log.EventTypeArg.create_folder: (file_operations) Created folders (deprecated, no longer logged) :ivar team_log.EventTypeArg.file_add: (file_operations) Added files and/or @@ -36834,6 +37462,9 @@ class EventTypeArg(bb.Union): Organized a folder with the Tidy Up action :ivar team_log.EventTypeArg.rewind_folder: (file_operations) Rewound a folder + :ivar team_log.EventTypeArg.user_tags_added: (file_operations) Tagged a file + :ivar team_log.EventTypeArg.user_tags_removed: (file_operations) Removed + tags :ivar team_log.EventTypeArg.file_request_change: (file_requests) Changed file request :ivar team_log.EventTypeArg.file_request_close: (file_requests) Closed file @@ -37450,6 +38081,16 @@ class EventTypeArg(bb.Union): :ivar team_log.EventTypeArg.sharing_change_folder_join_policy: (team_policies) Changed whether team members can join shared folders owned outside team + :ivar + team_log.EventTypeArg.sharing_change_link_allow_change_expiration_policy: + (team_policies) Changed the password requirement for the links shared + outside of the team + :ivar team_log.EventTypeArg.sharing_change_link_default_expiration_policy: + (team_policies) Changed the default expiration for the links shared + outside of the team + :ivar team_log.EventTypeArg.sharing_change_link_enforce_password_policy: + (team_policies) Changed the allow remove or change expiration policy for + the links shared outside of the team :ivar team_log.EventTypeArg.sharing_change_link_policy: (team_policies) Changed whether members can share links outside team, and if links are accessible only by team members or anyone by default @@ -37750,6 +38391,8 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition enabled_domain_invites = None # Attribute is overwritten below the class definition + apply_naming_convention = None + # Attribute is overwritten below the class definition create_folder = None # Attribute is overwritten below the class definition file_add = None @@ -37798,6 +38441,10 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition rewind_folder = None # Attribute is overwritten below the class definition + user_tags_added = None + # Attribute is overwritten below the class definition + user_tags_removed = None + # Attribute is overwritten below the class definition file_request_change = None # Attribute is overwritten below the class definition file_request_close = None @@ -38406,6 +39053,12 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition sharing_change_folder_join_policy = None # Attribute is overwritten below the class definition + sharing_change_link_allow_change_expiration_policy = None + # Attribute is overwritten below the class definition + sharing_change_link_default_expiration_policy = None + # Attribute is overwritten below the class definition + sharing_change_link_enforce_password_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 @@ -39098,6 +39751,14 @@ def is_enabled_domain_invites(self): """ return self._tag == 'enabled_domain_invites' + def is_apply_naming_convention(self): + """ + Check if the union tag is ``apply_naming_convention``. + + :rtype: bool + """ + return self._tag == 'apply_naming_convention' + def is_create_folder(self): """ Check if the union tag is ``create_folder``. @@ -39290,6 +39951,22 @@ def is_rewind_folder(self): """ return self._tag == 'rewind_folder' + def is_user_tags_added(self): + """ + Check if the union tag is ``user_tags_added``. + + :rtype: bool + """ + return self._tag == 'user_tags_added' + + def is_user_tags_removed(self): + """ + Check if the union tag is ``user_tags_removed``. + + :rtype: bool + """ + return self._tag == 'user_tags_removed' + def is_file_request_change(self): """ Check if the union tag is ``file_request_change``. @@ -41722,6 +42399,30 @@ def is_sharing_change_folder_join_policy(self): """ return self._tag == 'sharing_change_folder_join_policy' + def is_sharing_change_link_allow_change_expiration_policy(self): + """ + Check if the union tag is ``sharing_change_link_allow_change_expiration_policy``. + + :rtype: bool + """ + return self._tag == 'sharing_change_link_allow_change_expiration_policy' + + def is_sharing_change_link_default_expiration_policy(self): + """ + Check if the union tag is ``sharing_change_link_default_expiration_policy``. + + :rtype: bool + """ + return self._tag == 'sharing_change_link_default_expiration_policy' + + def is_sharing_change_link_enforce_password_policy(self): + """ + Check if the union tag is ``sharing_change_link_enforce_password_policy``. + + :rtype: bool + """ + return self._tag == 'sharing_change_link_enforce_password_policy' + def is_sharing_change_link_policy(self): """ Check if the union tag is ``sharing_change_link_policy``. @@ -48433,6 +49134,8 @@ class LabelType(bb.Union): # Attribute is overwritten below the class definition personal_information = None # Attribute is overwritten below the class definition + test_only = None + # Attribute is overwritten below the class definition user_defined_tag = None # Attribute is overwritten below the class definition other = None @@ -48445,6 +49148,14 @@ def is_personal_information(self): """ return self._tag == 'personal_information' + def is_test_only(self): + """ + Check if the union tag is ``test_only``. + + :rtype: bool + """ + return self._tag == 'test_only' + def is_user_defined_tag(self): """ Check if the union tag is ``user_defined_tag``. @@ -62064,6 +62775,189 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SharingChangeFolderJoinPolicyType_validator = bv.Struct(SharingChangeFolderJoinPolicyType) +class SharingChangeLinkAllowChangeExpirationPolicyDetails(bb.Struct): + """ + Changed the password requirement for the links shared outside of the team. + + :ivar + team_log.SharingChangeLinkAllowChangeExpirationPolicyDetails.new_value: + To. + :ivar + team_log.SharingChangeLinkAllowChangeExpirationPolicyDetails.previous_value: + From. + """ + + __slots__ = [ + '_new_value_value', + '_previous_value_value', + ] + + _has_required_fields = True + + def __init__(self, + new_value=None, + previous_value=None): + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + if new_value is not None: + self.new_value = new_value + if previous_value is not None: + self.previous_value = previous_value + + # Instance attribute type: EnforceLinkPasswordPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) + + # Instance attribute type: EnforceLinkPasswordPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(SharingChangeLinkAllowChangeExpirationPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +SharingChangeLinkAllowChangeExpirationPolicyDetails_validator = bv.Struct(SharingChangeLinkAllowChangeExpirationPolicyDetails) + +class SharingChangeLinkAllowChangeExpirationPolicyType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(SharingChangeLinkAllowChangeExpirationPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) + +SharingChangeLinkAllowChangeExpirationPolicyType_validator = bv.Struct(SharingChangeLinkAllowChangeExpirationPolicyType) + +class SharingChangeLinkDefaultExpirationPolicyDetails(bb.Struct): + """ + Changed the default expiration for the links shared outside of the team. + + :ivar team_log.SharingChangeLinkDefaultExpirationPolicyDetails.new_value: + To. + :ivar + team_log.SharingChangeLinkDefaultExpirationPolicyDetails.previous_value: + From. + """ + + __slots__ = [ + '_new_value_value', + '_previous_value_value', + ] + + _has_required_fields = True + + def __init__(self, + new_value=None, + previous_value=None): + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + if new_value is not None: + self.new_value = new_value + if previous_value is not None: + self.previous_value = previous_value + + # Instance attribute type: DefaultLinkExpirationDaysPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) + + # Instance attribute type: DefaultLinkExpirationDaysPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(SharingChangeLinkDefaultExpirationPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +SharingChangeLinkDefaultExpirationPolicyDetails_validator = bv.Struct(SharingChangeLinkDefaultExpirationPolicyDetails) + +class SharingChangeLinkDefaultExpirationPolicyType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(SharingChangeLinkDefaultExpirationPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) + +SharingChangeLinkDefaultExpirationPolicyType_validator = bv.Struct(SharingChangeLinkDefaultExpirationPolicyType) + +class SharingChangeLinkEnforcePasswordPolicyDetails(bb.Struct): + """ + Changed the allow remove or change expiration policy for the links shared + outside of the team. + + :ivar team_log.SharingChangeLinkEnforcePasswordPolicyDetails.new_value: To. + :ivar team_log.SharingChangeLinkEnforcePasswordPolicyDetails.previous_value: + From. + """ + + __slots__ = [ + '_new_value_value', + '_previous_value_value', + ] + + _has_required_fields = True + + def __init__(self, + new_value=None, + previous_value=None): + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + if new_value is not None: + self.new_value = new_value + if previous_value is not None: + self.previous_value = previous_value + + # Instance attribute type: ChangeLinkExpirationPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) + + # Instance attribute type: ChangeLinkExpirationPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", nullable=True, user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(SharingChangeLinkEnforcePasswordPolicyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +SharingChangeLinkEnforcePasswordPolicyDetails_validator = bv.Struct(SharingChangeLinkEnforcePasswordPolicyDetails) + +class SharingChangeLinkEnforcePasswordPolicyType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(SharingChangeLinkEnforcePasswordPolicyType, self)._process_custom_annotations(annotation_type, field_path, processor) + +SharingChangeLinkEnforcePasswordPolicyType_validator = bv.Struct(SharingChangeLinkEnforcePasswordPolicyType) + class SharingChangeLinkPolicyDetails(bb.Struct): """ Changed whether members can share links outside team, and if links are @@ -69314,6 +70208,104 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UserOrTeamLinkedAppLogInfo_validator = bv.Struct(UserOrTeamLinkedAppLogInfo) +class UserTagsAddedDetails(bb.Struct): + """ + Tagged a file. + + :ivar team_log.UserTagsAddedDetails.values: values. + """ + + __slots__ = [ + '_values_value', + ] + + _has_required_fields = True + + def __init__(self, + values=None): + self._values_value = bb.NOT_SET + if values is not None: + self.values = values + + # Instance attribute type: list of [str] (validator is set below) + values = bb.Attribute("values") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(UserTagsAddedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +UserTagsAddedDetails_validator = bv.Struct(UserTagsAddedDetails) + +class UserTagsAddedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(UserTagsAddedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +UserTagsAddedType_validator = bv.Struct(UserTagsAddedType) + +class UserTagsRemovedDetails(bb.Struct): + """ + Removed tags. + + :ivar team_log.UserTagsRemovedDetails.values: values. + """ + + __slots__ = [ + '_values_value', + ] + + _has_required_fields = True + + def __init__(self, + values=None): + self._values_value = bb.NOT_SET + if values is not None: + self.values = values + + # Instance attribute type: list of [str] (validator is set below) + values = bb.Attribute("values") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(UserTagsRemovedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +UserTagsRemovedDetails_validator = bv.Struct(UserTagsRemovedDetails) + +class UserTagsRemovedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(UserTagsRemovedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +UserTagsRemovedType_validator = bv.Struct(UserTagsRemovedType) + class ViewerInfoPolicyChangedDetails(bb.Struct): """ Changed team policy for viewer info. @@ -70458,6 +71450,13 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AppUnlinkUserType._all_field_names_ = set(['description']) AppUnlinkUserType._all_fields_ = [('description', AppUnlinkUserType.description.validator)] +ApplyNamingConventionDetails._all_field_names_ = set([]) +ApplyNamingConventionDetails._all_fields_ = [] + +ApplyNamingConventionType.description.validator = bv.String() +ApplyNamingConventionType._all_field_names_ = set(['description']) +ApplyNamingConventionType._all_fields_ = [('description', ApplyNamingConventionType.description.validator)] + AssetLogInfo._file_validator = FileLogInfo_validator AssetLogInfo._folder_validator = FolderLogInfo_validator AssetLogInfo._paper_document_validator = PaperDocumentLogInfo_validator @@ -70692,6 +71691,19 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('common_name', Certificate.common_name.validator), ] +ChangeLinkExpirationPolicy._allowed_validator = bv.Void() +ChangeLinkExpirationPolicy._not_allowed_validator = bv.Void() +ChangeLinkExpirationPolicy._other_validator = bv.Void() +ChangeLinkExpirationPolicy._tagmap = { + 'allowed': ChangeLinkExpirationPolicy._allowed_validator, + 'not_allowed': ChangeLinkExpirationPolicy._not_allowed_validator, + 'other': ChangeLinkExpirationPolicy._other_validator, +} + +ChangeLinkExpirationPolicy.allowed = ChangeLinkExpirationPolicy('allowed') +ChangeLinkExpirationPolicy.not_allowed = ChangeLinkExpirationPolicy('not_allowed') +ChangeLinkExpirationPolicy.other = ChangeLinkExpirationPolicy('other') + ChangedEnterpriseAdminRoleDetails.previous_value.validator = FedAdminRole_validator ChangedEnterpriseAdminRoleDetails.new_value.validator = FedAdminRole_validator ChangedEnterpriseAdminRoleDetails.team_name.validator = bv.String() @@ -70933,6 +71945,37 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DataPlacementRestrictionSatisfyPolicyType._all_field_names_ = set(['description']) DataPlacementRestrictionSatisfyPolicyType._all_fields_ = [('description', DataPlacementRestrictionSatisfyPolicyType.description.validator)] +DefaultLinkExpirationDaysPolicy._day_1_validator = bv.Void() +DefaultLinkExpirationDaysPolicy._day_180_validator = bv.Void() +DefaultLinkExpirationDaysPolicy._day_3_validator = bv.Void() +DefaultLinkExpirationDaysPolicy._day_30_validator = bv.Void() +DefaultLinkExpirationDaysPolicy._day_7_validator = bv.Void() +DefaultLinkExpirationDaysPolicy._day_90_validator = bv.Void() +DefaultLinkExpirationDaysPolicy._none_validator = bv.Void() +DefaultLinkExpirationDaysPolicy._year_1_validator = bv.Void() +DefaultLinkExpirationDaysPolicy._other_validator = bv.Void() +DefaultLinkExpirationDaysPolicy._tagmap = { + 'day_1': DefaultLinkExpirationDaysPolicy._day_1_validator, + 'day_180': DefaultLinkExpirationDaysPolicy._day_180_validator, + 'day_3': DefaultLinkExpirationDaysPolicy._day_3_validator, + 'day_30': DefaultLinkExpirationDaysPolicy._day_30_validator, + 'day_7': DefaultLinkExpirationDaysPolicy._day_7_validator, + 'day_90': DefaultLinkExpirationDaysPolicy._day_90_validator, + 'none': DefaultLinkExpirationDaysPolicy._none_validator, + 'year_1': DefaultLinkExpirationDaysPolicy._year_1_validator, + 'other': DefaultLinkExpirationDaysPolicy._other_validator, +} + +DefaultLinkExpirationDaysPolicy.day_1 = DefaultLinkExpirationDaysPolicy('day_1') +DefaultLinkExpirationDaysPolicy.day_180 = DefaultLinkExpirationDaysPolicy('day_180') +DefaultLinkExpirationDaysPolicy.day_3 = DefaultLinkExpirationDaysPolicy('day_3') +DefaultLinkExpirationDaysPolicy.day_30 = DefaultLinkExpirationDaysPolicy('day_30') +DefaultLinkExpirationDaysPolicy.day_7 = DefaultLinkExpirationDaysPolicy('day_7') +DefaultLinkExpirationDaysPolicy.day_90 = DefaultLinkExpirationDaysPolicy('day_90') +DefaultLinkExpirationDaysPolicy.none = DefaultLinkExpirationDaysPolicy('none') +DefaultLinkExpirationDaysPolicy.year_1 = DefaultLinkExpirationDaysPolicy('year_1') +DefaultLinkExpirationDaysPolicy.other = DefaultLinkExpirationDaysPolicy('other') + DeleteTeamInviteLinkDetails.link_url.validator = bv.String() DeleteTeamInviteLinkDetails._all_field_names_ = set(['link_url']) DeleteTeamInviteLinkDetails._all_fields_ = [('link_url', DeleteTeamInviteLinkDetails.link_url.validator)] @@ -71511,6 +72554,19 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EndedEnterpriseAdminSessionType._all_field_names_ = set(['description']) EndedEnterpriseAdminSessionType._all_fields_ = [('description', EndedEnterpriseAdminSessionType.description.validator)] +EnforceLinkPasswordPolicy._optional_validator = bv.Void() +EnforceLinkPasswordPolicy._required_validator = bv.Void() +EnforceLinkPasswordPolicy._other_validator = bv.Void() +EnforceLinkPasswordPolicy._tagmap = { + 'optional': EnforceLinkPasswordPolicy._optional_validator, + 'required': EnforceLinkPasswordPolicy._required_validator, + 'other': EnforceLinkPasswordPolicy._other_validator, +} + +EnforceLinkPasswordPolicy.optional = EnforceLinkPasswordPolicy('optional') +EnforceLinkPasswordPolicy.required = EnforceLinkPasswordPolicy('required') +EnforceLinkPasswordPolicy.other = EnforceLinkPasswordPolicy('other') + EnterpriseSettingsLockingDetails.team_name.validator = bv.String() EnterpriseSettingsLockingDetails.settings_page_name.validator = bv.String() EnterpriseSettingsLockingDetails.previous_settings_page_locking_state.validator = bv.String() @@ -71675,6 +72731,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 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._apply_naming_convention_details_validator = ApplyNamingConventionDetails_validator EventDetails._create_folder_details_validator = CreateFolderDetails_validator EventDetails._file_add_details_validator = FileAddDetails_validator EventDetails._file_copy_details_validator = FileCopyDetails_validator @@ -71699,6 +72756,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._object_label_updated_value_details_validator = ObjectLabelUpdatedValueDetails_validator EventDetails._organize_folder_with_tidy_details_validator = OrganizeFolderWithTidyDetails_validator EventDetails._rewind_folder_details_validator = RewindFolderDetails_validator +EventDetails._user_tags_added_details_validator = UserTagsAddedDetails_validator +EventDetails._user_tags_removed_details_validator = UserTagsRemovedDetails_validator EventDetails._file_request_change_details_validator = FileRequestChangeDetails_validator EventDetails._file_request_close_details_validator = FileRequestCloseDetails_validator EventDetails._file_request_create_details_validator = FileRequestCreateDetails_validator @@ -72003,6 +73062,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._rewind_policy_changed_details_validator = RewindPolicyChangedDetails_validator EventDetails._send_for_signature_policy_changed_details_validator = SendForSignaturePolicyChangedDetails_validator EventDetails._sharing_change_folder_join_policy_details_validator = SharingChangeFolderJoinPolicyDetails_validator +EventDetails._sharing_change_link_allow_change_expiration_policy_details_validator = SharingChangeLinkAllowChangeExpirationPolicyDetails_validator +EventDetails._sharing_change_link_default_expiration_policy_details_validator = SharingChangeLinkDefaultExpirationPolicyDetails_validator +EventDetails._sharing_change_link_enforce_password_policy_details_validator = SharingChangeLinkEnforcePasswordPolicyDetails_validator EventDetails._sharing_change_link_policy_details_validator = SharingChangeLinkPolicyDetails_validator EventDetails._sharing_change_member_policy_details_validator = SharingChangeMemberPolicyDetails_validator EventDetails._showcase_change_download_policy_details_validator = ShowcaseChangeDownloadPolicyDetails_validator @@ -72141,6 +73203,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): '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, + 'apply_naming_convention_details': EventDetails._apply_naming_convention_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, @@ -72165,6 +73228,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'object_label_updated_value_details': EventDetails._object_label_updated_value_details_validator, 'organize_folder_with_tidy_details': EventDetails._organize_folder_with_tidy_details_validator, 'rewind_folder_details': EventDetails._rewind_folder_details_validator, + 'user_tags_added_details': EventDetails._user_tags_added_details_validator, + 'user_tags_removed_details': EventDetails._user_tags_removed_details_validator, 'file_request_change_details': EventDetails._file_request_change_details_validator, 'file_request_close_details': EventDetails._file_request_close_details_validator, 'file_request_create_details': EventDetails._file_request_create_details_validator, @@ -72469,6 +73534,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'rewind_policy_changed_details': EventDetails._rewind_policy_changed_details_validator, 'send_for_signature_policy_changed_details': EventDetails._send_for_signature_policy_changed_details_validator, 'sharing_change_folder_join_policy_details': EventDetails._sharing_change_folder_join_policy_details_validator, + 'sharing_change_link_allow_change_expiration_policy_details': EventDetails._sharing_change_link_allow_change_expiration_policy_details_validator, + 'sharing_change_link_default_expiration_policy_details': EventDetails._sharing_change_link_default_expiration_policy_details_validator, + 'sharing_change_link_enforce_password_policy_details': EventDetails._sharing_change_link_enforce_password_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, 'showcase_change_download_policy_details': EventDetails._showcase_change_download_policy_details_validator, @@ -72610,6 +73678,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._domain_verification_add_domain_success_validator = DomainVerificationAddDomainSuccessType_validator EventType._domain_verification_remove_domain_validator = DomainVerificationRemoveDomainType_validator EventType._enabled_domain_invites_validator = EnabledDomainInvitesType_validator +EventType._apply_naming_convention_validator = ApplyNamingConventionType_validator EventType._create_folder_validator = CreateFolderType_validator EventType._file_add_validator = FileAddType_validator EventType._file_copy_validator = FileCopyType_validator @@ -72634,6 +73703,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._object_label_updated_value_validator = ObjectLabelUpdatedValueType_validator EventType._organize_folder_with_tidy_validator = OrganizeFolderWithTidyType_validator EventType._rewind_folder_validator = RewindFolderType_validator +EventType._user_tags_added_validator = UserTagsAddedType_validator +EventType._user_tags_removed_validator = UserTagsRemovedType_validator EventType._file_request_change_validator = FileRequestChangeType_validator EventType._file_request_close_validator = FileRequestCloseType_validator EventType._file_request_create_validator = FileRequestCreateType_validator @@ -72938,6 +74009,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._rewind_policy_changed_validator = RewindPolicyChangedType_validator EventType._send_for_signature_policy_changed_validator = SendForSignaturePolicyChangedType_validator EventType._sharing_change_folder_join_policy_validator = SharingChangeFolderJoinPolicyType_validator +EventType._sharing_change_link_allow_change_expiration_policy_validator = SharingChangeLinkAllowChangeExpirationPolicyType_validator +EventType._sharing_change_link_default_expiration_policy_validator = SharingChangeLinkDefaultExpirationPolicyType_validator +EventType._sharing_change_link_enforce_password_policy_validator = SharingChangeLinkEnforcePasswordPolicyType_validator EventType._sharing_change_link_policy_validator = SharingChangeLinkPolicyType_validator EventType._sharing_change_member_policy_validator = SharingChangeMemberPolicyType_validator EventType._showcase_change_download_policy_validator = ShowcaseChangeDownloadPolicyType_validator @@ -73075,6 +74149,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): '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, + 'apply_naming_convention': EventType._apply_naming_convention_validator, 'create_folder': EventType._create_folder_validator, 'file_add': EventType._file_add_validator, 'file_copy': EventType._file_copy_validator, @@ -73099,6 +74174,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'object_label_updated_value': EventType._object_label_updated_value_validator, 'organize_folder_with_tidy': EventType._organize_folder_with_tidy_validator, 'rewind_folder': EventType._rewind_folder_validator, + 'user_tags_added': EventType._user_tags_added_validator, + 'user_tags_removed': EventType._user_tags_removed_validator, 'file_request_change': EventType._file_request_change_validator, 'file_request_close': EventType._file_request_close_validator, 'file_request_create': EventType._file_request_create_validator, @@ -73403,6 +74480,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'rewind_policy_changed': EventType._rewind_policy_changed_validator, 'send_for_signature_policy_changed': EventType._send_for_signature_policy_changed_validator, 'sharing_change_folder_join_policy': EventType._sharing_change_folder_join_policy_validator, + 'sharing_change_link_allow_change_expiration_policy': EventType._sharing_change_link_allow_change_expiration_policy_validator, + 'sharing_change_link_default_expiration_policy': EventType._sharing_change_link_default_expiration_policy_validator, + 'sharing_change_link_enforce_password_policy': EventType._sharing_change_link_enforce_password_policy_validator, 'sharing_change_link_policy': EventType._sharing_change_link_policy_validator, 'sharing_change_member_policy': EventType._sharing_change_member_policy_validator, 'showcase_change_download_policy': EventType._showcase_change_download_policy_validator, @@ -73543,6 +74623,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._domain_verification_add_domain_success_validator = bv.Void() EventTypeArg._domain_verification_remove_domain_validator = bv.Void() EventTypeArg._enabled_domain_invites_validator = bv.Void() +EventTypeArg._apply_naming_convention_validator = bv.Void() EventTypeArg._create_folder_validator = bv.Void() EventTypeArg._file_add_validator = bv.Void() EventTypeArg._file_copy_validator = bv.Void() @@ -73567,6 +74648,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._object_label_updated_value_validator = bv.Void() EventTypeArg._organize_folder_with_tidy_validator = bv.Void() EventTypeArg._rewind_folder_validator = bv.Void() +EventTypeArg._user_tags_added_validator = bv.Void() +EventTypeArg._user_tags_removed_validator = bv.Void() EventTypeArg._file_request_change_validator = bv.Void() EventTypeArg._file_request_close_validator = bv.Void() EventTypeArg._file_request_create_validator = bv.Void() @@ -73871,6 +74954,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._rewind_policy_changed_validator = bv.Void() EventTypeArg._send_for_signature_policy_changed_validator = bv.Void() EventTypeArg._sharing_change_folder_join_policy_validator = bv.Void() +EventTypeArg._sharing_change_link_allow_change_expiration_policy_validator = bv.Void() +EventTypeArg._sharing_change_link_default_expiration_policy_validator = bv.Void() +EventTypeArg._sharing_change_link_enforce_password_policy_validator = bv.Void() EventTypeArg._sharing_change_link_policy_validator = bv.Void() EventTypeArg._sharing_change_member_policy_validator = bv.Void() EventTypeArg._showcase_change_download_policy_validator = bv.Void() @@ -74008,6 +75094,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'domain_verification_add_domain_success': EventTypeArg._domain_verification_add_domain_success_validator, 'domain_verification_remove_domain': EventTypeArg._domain_verification_remove_domain_validator, 'enabled_domain_invites': EventTypeArg._enabled_domain_invites_validator, + 'apply_naming_convention': EventTypeArg._apply_naming_convention_validator, 'create_folder': EventTypeArg._create_folder_validator, 'file_add': EventTypeArg._file_add_validator, 'file_copy': EventTypeArg._file_copy_validator, @@ -74032,6 +75119,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'object_label_updated_value': EventTypeArg._object_label_updated_value_validator, 'organize_folder_with_tidy': EventTypeArg._organize_folder_with_tidy_validator, 'rewind_folder': EventTypeArg._rewind_folder_validator, + 'user_tags_added': EventTypeArg._user_tags_added_validator, + 'user_tags_removed': EventTypeArg._user_tags_removed_validator, 'file_request_change': EventTypeArg._file_request_change_validator, 'file_request_close': EventTypeArg._file_request_close_validator, 'file_request_create': EventTypeArg._file_request_create_validator, @@ -74336,6 +75425,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'rewind_policy_changed': EventTypeArg._rewind_policy_changed_validator, 'send_for_signature_policy_changed': EventTypeArg._send_for_signature_policy_changed_validator, 'sharing_change_folder_join_policy': EventTypeArg._sharing_change_folder_join_policy_validator, + 'sharing_change_link_allow_change_expiration_policy': EventTypeArg._sharing_change_link_allow_change_expiration_policy_validator, + 'sharing_change_link_default_expiration_policy': EventTypeArg._sharing_change_link_default_expiration_policy_validator, + 'sharing_change_link_enforce_password_policy': EventTypeArg._sharing_change_link_enforce_password_policy_validator, 'sharing_change_link_policy': EventTypeArg._sharing_change_link_policy_validator, 'sharing_change_member_policy': EventTypeArg._sharing_change_member_policy_validator, 'showcase_change_download_policy': EventTypeArg._showcase_change_download_policy_validator, @@ -74474,6 +75566,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.domain_verification_add_domain_success = EventTypeArg('domain_verification_add_domain_success') EventTypeArg.domain_verification_remove_domain = EventTypeArg('domain_verification_remove_domain') EventTypeArg.enabled_domain_invites = EventTypeArg('enabled_domain_invites') +EventTypeArg.apply_naming_convention = EventTypeArg('apply_naming_convention') EventTypeArg.create_folder = EventTypeArg('create_folder') EventTypeArg.file_add = EventTypeArg('file_add') EventTypeArg.file_copy = EventTypeArg('file_copy') @@ -74498,6 +75591,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.object_label_updated_value = EventTypeArg('object_label_updated_value') EventTypeArg.organize_folder_with_tidy = EventTypeArg('organize_folder_with_tidy') EventTypeArg.rewind_folder = EventTypeArg('rewind_folder') +EventTypeArg.user_tags_added = EventTypeArg('user_tags_added') +EventTypeArg.user_tags_removed = EventTypeArg('user_tags_removed') EventTypeArg.file_request_change = EventTypeArg('file_request_change') EventTypeArg.file_request_close = EventTypeArg('file_request_close') EventTypeArg.file_request_create = EventTypeArg('file_request_create') @@ -74802,6 +75897,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.rewind_policy_changed = EventTypeArg('rewind_policy_changed') EventTypeArg.send_for_signature_policy_changed = EventTypeArg('send_for_signature_policy_changed') EventTypeArg.sharing_change_folder_join_policy = EventTypeArg('sharing_change_folder_join_policy') +EventTypeArg.sharing_change_link_allow_change_expiration_policy = EventTypeArg('sharing_change_link_allow_change_expiration_policy') +EventTypeArg.sharing_change_link_default_expiration_policy = EventTypeArg('sharing_change_link_default_expiration_policy') +EventTypeArg.sharing_change_link_enforce_password_policy = EventTypeArg('sharing_change_link_enforce_password_policy') EventTypeArg.sharing_change_link_policy = EventTypeArg('sharing_change_link_policy') EventTypeArg.sharing_change_member_policy = EventTypeArg('sharing_change_member_policy') EventTypeArg.showcase_change_download_policy = EventTypeArg('showcase_change_download_policy') @@ -76274,15 +77372,18 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ] LabelType._personal_information_validator = bv.Void() +LabelType._test_only_validator = bv.Void() LabelType._user_defined_tag_validator = bv.Void() LabelType._other_validator = bv.Void() LabelType._tagmap = { 'personal_information': LabelType._personal_information_validator, + 'test_only': LabelType._test_only_validator, 'user_defined_tag': LabelType._user_defined_tag_validator, 'other': LabelType._other_validator, } LabelType.personal_information = LabelType('personal_information') +LabelType.test_only = LabelType('test_only') LabelType.user_defined_tag = LabelType('user_defined_tag') LabelType.other = LabelType('other') @@ -79393,6 +80494,51 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SharingChangeFolderJoinPolicyType._all_field_names_ = set(['description']) SharingChangeFolderJoinPolicyType._all_fields_ = [('description', SharingChangeFolderJoinPolicyType.description.validator)] +SharingChangeLinkAllowChangeExpirationPolicyDetails.new_value.validator = EnforceLinkPasswordPolicy_validator +SharingChangeLinkAllowChangeExpirationPolicyDetails.previous_value.validator = bv.Nullable(EnforceLinkPasswordPolicy_validator) +SharingChangeLinkAllowChangeExpirationPolicyDetails._all_field_names_ = set([ + 'new_value', + 'previous_value', +]) +SharingChangeLinkAllowChangeExpirationPolicyDetails._all_fields_ = [ + ('new_value', SharingChangeLinkAllowChangeExpirationPolicyDetails.new_value.validator), + ('previous_value', SharingChangeLinkAllowChangeExpirationPolicyDetails.previous_value.validator), +] + +SharingChangeLinkAllowChangeExpirationPolicyType.description.validator = bv.String() +SharingChangeLinkAllowChangeExpirationPolicyType._all_field_names_ = set(['description']) +SharingChangeLinkAllowChangeExpirationPolicyType._all_fields_ = [('description', SharingChangeLinkAllowChangeExpirationPolicyType.description.validator)] + +SharingChangeLinkDefaultExpirationPolicyDetails.new_value.validator = DefaultLinkExpirationDaysPolicy_validator +SharingChangeLinkDefaultExpirationPolicyDetails.previous_value.validator = bv.Nullable(DefaultLinkExpirationDaysPolicy_validator) +SharingChangeLinkDefaultExpirationPolicyDetails._all_field_names_ = set([ + 'new_value', + 'previous_value', +]) +SharingChangeLinkDefaultExpirationPolicyDetails._all_fields_ = [ + ('new_value', SharingChangeLinkDefaultExpirationPolicyDetails.new_value.validator), + ('previous_value', SharingChangeLinkDefaultExpirationPolicyDetails.previous_value.validator), +] + +SharingChangeLinkDefaultExpirationPolicyType.description.validator = bv.String() +SharingChangeLinkDefaultExpirationPolicyType._all_field_names_ = set(['description']) +SharingChangeLinkDefaultExpirationPolicyType._all_fields_ = [('description', SharingChangeLinkDefaultExpirationPolicyType.description.validator)] + +SharingChangeLinkEnforcePasswordPolicyDetails.new_value.validator = ChangeLinkExpirationPolicy_validator +SharingChangeLinkEnforcePasswordPolicyDetails.previous_value.validator = bv.Nullable(ChangeLinkExpirationPolicy_validator) +SharingChangeLinkEnforcePasswordPolicyDetails._all_field_names_ = set([ + 'new_value', + 'previous_value', +]) +SharingChangeLinkEnforcePasswordPolicyDetails._all_fields_ = [ + ('new_value', SharingChangeLinkEnforcePasswordPolicyDetails.new_value.validator), + ('previous_value', SharingChangeLinkEnforcePasswordPolicyDetails.previous_value.validator), +] + +SharingChangeLinkEnforcePasswordPolicyType.description.validator = bv.String() +SharingChangeLinkEnforcePasswordPolicyType._all_field_names_ = set(['description']) +SharingChangeLinkEnforcePasswordPolicyType._all_fields_ = [('description', SharingChangeLinkEnforcePasswordPolicyType.description.validator)] + SharingChangeLinkPolicyDetails.new_value.validator = SharingLinkPolicy_validator SharingChangeLinkPolicyDetails.previous_value.validator = bv.Nullable(SharingLinkPolicy_validator) SharingChangeLinkPolicyDetails._all_field_names_ = set([ @@ -80959,6 +82105,22 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UserOrTeamLinkedAppLogInfo._fields_ = [] UserOrTeamLinkedAppLogInfo._all_fields_ = AppLogInfo._all_fields_ + UserOrTeamLinkedAppLogInfo._fields_ +UserTagsAddedDetails.values.validator = bv.List(bv.String()) +UserTagsAddedDetails._all_field_names_ = set(['values']) +UserTagsAddedDetails._all_fields_ = [('values', UserTagsAddedDetails.values.validator)] + +UserTagsAddedType.description.validator = bv.String() +UserTagsAddedType._all_field_names_ = set(['description']) +UserTagsAddedType._all_fields_ = [('description', UserTagsAddedType.description.validator)] + +UserTagsRemovedDetails.values.validator = bv.List(bv.String()) +UserTagsRemovedDetails._all_field_names_ = set(['values']) +UserTagsRemovedDetails._all_fields_ = [('values', UserTagsRemovedDetails.values.validator)] + +UserTagsRemovedType.description.validator = bv.String() +UserTagsRemovedType._all_field_names_ = set(['description']) +UserTagsRemovedType._all_fields_ = [('description', UserTagsRemovedType.description.validator)] + ViewerInfoPolicyChangedDetails.previous_value.validator = PassPolicy_validator ViewerInfoPolicyChangedDetails.new_value.validator = PassPolicy_validator ViewerInfoPolicyChangedDetails._all_field_names_ = set([ diff --git a/spec b/spec index 9745cde3..9923a507 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 9745cde3e1ee181953a0f97cb10bfffc7076a35f +Subproject commit 9923a5075753fa7521c9a180407420b5d893e163 From 22561b78abf9fd9a5ee640a6ece8c1bc603f54c5 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 23 Jun 2021 12:51:13 -0700 Subject: [PATCH 42/90] Automated Spec Update (#366) 444efadbf5a13253dcc8faf6d752df705e001402 Change Notes: - Add release note generator script files Namespace - Update comments sharing_files Namespace - Update comments team_legal_holds Namespace - Update comments team_log_generated Namespace - Add InviteAcceptanceEmailPolicyChangedDetails, InviteAcceptanceEmailPolicyChangedType structs - Add InviteAcceptanceEmailPolicy unions - Update EventDetails union to include invite_acceptance_email_policy_changed_details - Update EventType union to include invite_acceptance_email_policy_changed, and invite_acceptance_email_policy_changed team_secondary_mails Namespace - Update comments Co-authored-by: DropboxBot --- dropbox/base.py | 4 +- dropbox/sharing.py | 4 +- dropbox/team.py | 14 +-- dropbox/team_log.py | 217 ++++++++++++++++++++++++++++++++++++++++++++ spec | 2 +- 5 files changed, 229 insertions(+), 12 deletions(-) diff --git a/dropbox/base.py b/dropbox/base.py index 2e4e41c1..86245b24 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -1628,7 +1628,7 @@ def files_get_temporary_upload_link(self, https://content.dropboxapi.com/apitul/1/bNi2uIYF51cVBND --header "Content-Type: application/octet-stream" --data-binary @local_file.txt A successful temporary upload link consumption request returns the - content hash of the uploaded data in JSON format. Example succesful + content hash of the uploaded data in JSON format. Example successful temporary upload link consumption response: {"content-hash": "599d71033d700ac892a0e48fa61b125d2f5994"} An unsuccessful temporary upload link consumption request returns any of the following status @@ -3827,7 +3827,7 @@ def sharing_add_file_member(self, :param str file: File to which to add members. :param List[:class:`dropbox.sharing.MemberSelector`] 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 being directly added to the membership if that email is the user's main account email. :param Nullable[str] custom_message: Message to send to added members in their invitation. diff --git a/dropbox/sharing.py b/dropbox/sharing.py index 2cb79962..8da24338 100644 --- a/dropbox/sharing.py +++ b/dropbox/sharing.py @@ -205,8 +205,8 @@ class AddFileMemberArgs(bb.Struct): :ivar sharing.AddFileMemberArgs.file: File to which to add members. :ivar sharing.AddFileMemberArgs.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. + email address is given, this may result in a user being directly added + to the membership if that email is the user's main account email. :ivar sharing.AddFileMemberArgs.custom_message: Message to send to added members in their invitation. :ivar sharing.AddFileMemberArgs.quiet: Whether added members should be diff --git a/dropbox/team.py b/dropbox/team.py index 1fba1e66..6f5b65c9 100644 --- a/dropbox/team.py +++ b/dropbox/team.py @@ -152,7 +152,7 @@ class AddSecondaryEmailResult(bb.Union): Result of trying to add a secondary email to a user. 'success' is the only value indicating that a secondary email was successfully added to a user. The other values explain the type of error that occurred, and include the - email for which the error occured. + email for which the error occurred. This class acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the associated value of a tag (if one exists), use the @@ -1082,7 +1082,7 @@ class DeleteSecondaryEmailResult(bb.Union): Result of trying to delete a secondary email address. 'success' is the only value indicating that a secondary email was successfully deleted. The other values explain the type of error that occurred, and include the email for - which the error occured. + which the error occurred. This class acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the associated value of a tag (if one exists), use the @@ -4462,7 +4462,7 @@ class LegalHoldPolicy(bb.Struct): :ivar team.LegalHoldPolicy.activation_time: The time at which the legal hold was activated. :ivar team.LegalHoldPolicy.members: Team members IDs and number of - permanetly deleted members under hold. + permanently deleted members under hold. :ivar team.LegalHoldPolicy.status: The current state of the hold. :ivar team.LegalHoldPolicy.start_date: Start date of the legal hold policy. :ivar team.LegalHoldPolicy.end_date: End date of the legal hold policy. @@ -9982,7 +9982,7 @@ class ResendSecondaryEmailResult(bb.Union): Result of trying to resend verification email to a secondary email address. 'success' is the only value indicating that a verification email was successfully sent. The other values explain the type of error that occurred, - and include the email for which the error occured. + and include the email for which the error occurred. This class acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the associated value of a tag (if one exists), use the @@ -12620,7 +12620,7 @@ class UserAddResult(bb.Union): Result of trying to add secondary emails to a user. 'success' is the only value indicating that a user was successfully retrieved for adding secondary emails. The other values explain the type of error that occurred, and - include the user for which the error occured. + include the user for which the error occurred. This class acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the associated value of a tag (if one exists), use the @@ -12880,7 +12880,7 @@ class UserDeleteResult(bb.Union): Result of trying to delete a user's secondary emails. 'success' is the only value indicating that a user was successfully retrieved for deleting secondary emails. The other values explain the type of error that occurred, - and include the user for which the error occured. + and include the user for which the error occurred. This class acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the associated value of a tag (if one exists), use the @@ -13007,7 +13007,7 @@ class UserResendResult(bb.Union): Result of trying to resend verification emails to a user. 'success' is the only value indicating that a user was successfully retrieved for sending verification emails. The other values explain the type of error that - occurred, and include the user for which the error occured. + occurred, and include the user for which the error occurred. This class acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the associated value of a tag (if one exists), use the diff --git a/dropbox/team_log.py b/dropbox/team_log.py index cba1a0a8..4645200a 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -11952,6 +11952,18 @@ def integration_policy_changed_details(cls, val): """ return cls('integration_policy_changed_details', val) + @classmethod + def invite_acceptance_email_policy_changed_details(cls, val): + """ + Create an instance of this class set to the + ``invite_acceptance_email_policy_changed_details`` tag with value + ``val``. + + :param InviteAcceptanceEmailPolicyChangedDetails val: + :rtype: EventDetails + """ + return cls('invite_acceptance_email_policy_changed_details', val) + @classmethod def member_requests_change_policy_details(cls, val): """ @@ -16012,6 +16024,14 @@ def is_integration_policy_changed_details(self): """ return self._tag == 'integration_policy_changed_details' + def is_invite_acceptance_email_policy_changed_details(self): + """ + Check if the union tag is ``invite_acceptance_email_policy_changed_details``. + + :rtype: bool + """ + return self._tag == 'invite_acceptance_email_policy_changed_details' + def is_member_requests_change_policy_details(self): """ Check if the union tag is ``member_requests_change_policy_details``. @@ -20536,6 +20556,16 @@ def get_integration_policy_changed_details(self): raise AttributeError("tag 'integration_policy_changed_details' not set") return self._value + def get_invite_acceptance_email_policy_changed_details(self): + """ + Only call this if :meth:`is_invite_acceptance_email_policy_changed_details` is true. + + :rtype: InviteAcceptanceEmailPolicyChangedDetails + """ + if not self.is_invite_acceptance_email_policy_changed_details(): + raise AttributeError("tag 'invite_acceptance_email_policy_changed_details' not set") + return self._value + def get_member_requests_change_policy_details(self): """ Only call this if :meth:`is_member_requests_change_policy_details` is true. @@ -22354,6 +22384,9 @@ class EventType(bb.Union): who can create groups :ivar IntegrationPolicyChangedType EventType.integration_policy_changed: (team_policies) Changed integration policy for team + :ivar InviteAcceptanceEmailPolicyChangedType + EventType.invite_acceptance_email_policy_changed: (team_policies) + Changed invite accept email policy for team :ivar MemberRequestsChangePolicyType EventType.member_requests_change_policy: (team_policies) Changed whether users can find team when not invited @@ -26778,6 +26811,17 @@ def integration_policy_changed(cls, val): """ return cls('integration_policy_changed', val) + @classmethod + def invite_acceptance_email_policy_changed(cls, val): + """ + Create an instance of this class set to the + ``invite_acceptance_email_policy_changed`` tag with value ``val``. + + :param InviteAcceptanceEmailPolicyChangedType val: + :rtype: EventType + """ + return cls('invite_acceptance_email_policy_changed', val) + @classmethod def member_requests_change_policy(cls, val): """ @@ -30817,6 +30861,14 @@ def is_integration_policy_changed(self): """ return self._tag == 'integration_policy_changed' + def is_invite_acceptance_email_policy_changed(self): + """ + Check if the union tag is ``invite_acceptance_email_policy_changed``. + + :rtype: bool + """ + return self._tag == 'invite_acceptance_email_policy_changed' + def is_member_requests_change_policy(self): """ Check if the union tag is ``member_requests_change_policy``. @@ -36142,6 +36194,18 @@ def get_integration_policy_changed(self): raise AttributeError("tag 'integration_policy_changed' not set") return self._value + def get_invite_acceptance_email_policy_changed(self): + """ + (team_policies) Changed invite accept email policy for team + + Only call this if :meth:`is_invite_acceptance_email_policy_changed` is true. + + :rtype: InviteAcceptanceEmailPolicyChangedType + """ + if not self.is_invite_acceptance_email_policy_changed(): + raise AttributeError("tag 'invite_acceptance_email_policy_changed' not set") + return self._value + def get_member_requests_change_policy(self): """ (team_policies) Changed whether users can find team when not invited @@ -38030,6 +38094,8 @@ class EventTypeArg(bb.Union): (team_policies) Changed who can create groups :ivar team_log.EventTypeArg.integration_policy_changed: (team_policies) Changed integration policy for team + :ivar team_log.EventTypeArg.invite_acceptance_email_policy_changed: + (team_policies) Changed invite accept email policy for team :ivar team_log.EventTypeArg.member_requests_change_policy: (team_policies) Changed whether users can find team when not invited :ivar team_log.EventTypeArg.member_send_invite_policy_changed: @@ -39007,6 +39073,8 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition integration_policy_changed = None # Attribute is overwritten below the class definition + invite_acceptance_email_policy_changed = None + # Attribute is overwritten below the class definition member_requests_change_policy = None # Attribute is overwritten below the class definition member_send_invite_policy_changed = None @@ -42215,6 +42283,14 @@ def is_integration_policy_changed(self): """ return self._tag == 'integration_policy_changed' + def is_invite_acceptance_email_policy_changed(self): + """ + Check if the union tag is ``invite_acceptance_email_policy_changed``. + + :rtype: bool + """ + return self._tag == 'invite_acceptance_email_policy_changed' + def is_member_requests_change_policy(self): """ Check if the union tag is ``member_requests_change_policy``. @@ -48946,6 +49022,112 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): IntegrationPolicyChangedType_validator = bv.Struct(IntegrationPolicyChangedType) +class InviteAcceptanceEmailPolicy(bb.Union): + """ + Policy for deciding whether team admins receive email when an invitation to + join the team is accepted + + This class acts as a tagged union. Only 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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(InviteAcceptanceEmailPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) + +InviteAcceptanceEmailPolicy_validator = bv.Union(InviteAcceptanceEmailPolicy) + +class InviteAcceptanceEmailPolicyChangedDetails(bb.Struct): + """ + Changed invite accept email policy for team. + + :ivar team_log.InviteAcceptanceEmailPolicyChangedDetails.new_value: To. + :ivar team_log.InviteAcceptanceEmailPolicyChangedDetails.previous_value: + From. + """ + + __slots__ = [ + '_new_value_value', + '_previous_value_value', + ] + + _has_required_fields = True + + def __init__(self, + new_value=None, + previous_value=None): + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + if new_value is not None: + self.new_value = new_value + if previous_value is not None: + self.previous_value = previous_value + + # Instance attribute type: InviteAcceptanceEmailPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) + + # Instance attribute type: InviteAcceptanceEmailPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(InviteAcceptanceEmailPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +InviteAcceptanceEmailPolicyChangedDetails_validator = bv.Struct(InviteAcceptanceEmailPolicyChangedDetails) + +class InviteAcceptanceEmailPolicyChangedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(InviteAcceptanceEmailPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +InviteAcceptanceEmailPolicyChangedType_validator = bv.Struct(InviteAcceptanceEmailPolicyChangedType) + class InviteMethod(bb.Union): """ This class acts as a tagged union. Only one of the ``is_*`` methods will @@ -73039,6 +73221,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._google_sso_change_policy_details_validator = GoogleSsoChangePolicyDetails_validator EventDetails._group_user_management_change_policy_details_validator = GroupUserManagementChangePolicyDetails_validator EventDetails._integration_policy_changed_details_validator = IntegrationPolicyChangedDetails_validator +EventDetails._invite_acceptance_email_policy_changed_details_validator = InviteAcceptanceEmailPolicyChangedDetails_validator EventDetails._member_requests_change_policy_details_validator = MemberRequestsChangePolicyDetails_validator EventDetails._member_send_invite_policy_changed_details_validator = MemberSendInvitePolicyChangedDetails_validator EventDetails._member_space_limits_add_exception_details_validator = MemberSpaceLimitsAddExceptionDetails_validator @@ -73511,6 +73694,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): '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, 'integration_policy_changed_details': EventDetails._integration_policy_changed_details_validator, + 'invite_acceptance_email_policy_changed_details': EventDetails._invite_acceptance_email_policy_changed_details_validator, 'member_requests_change_policy_details': EventDetails._member_requests_change_policy_details_validator, 'member_send_invite_policy_changed_details': EventDetails._member_send_invite_policy_changed_details_validator, 'member_space_limits_add_exception_details': EventDetails._member_space_limits_add_exception_details_validator, @@ -73986,6 +74170,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._google_sso_change_policy_validator = GoogleSsoChangePolicyType_validator EventType._group_user_management_change_policy_validator = GroupUserManagementChangePolicyType_validator EventType._integration_policy_changed_validator = IntegrationPolicyChangedType_validator +EventType._invite_acceptance_email_policy_changed_validator = InviteAcceptanceEmailPolicyChangedType_validator EventType._member_requests_change_policy_validator = MemberRequestsChangePolicyType_validator EventType._member_send_invite_policy_changed_validator = MemberSendInvitePolicyChangedType_validator EventType._member_space_limits_add_exception_validator = MemberSpaceLimitsAddExceptionType_validator @@ -74457,6 +74642,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'google_sso_change_policy': EventType._google_sso_change_policy_validator, 'group_user_management_change_policy': EventType._group_user_management_change_policy_validator, 'integration_policy_changed': EventType._integration_policy_changed_validator, + 'invite_acceptance_email_policy_changed': EventType._invite_acceptance_email_policy_changed_validator, 'member_requests_change_policy': EventType._member_requests_change_policy_validator, 'member_send_invite_policy_changed': EventType._member_send_invite_policy_changed_validator, 'member_space_limits_add_exception': EventType._member_space_limits_add_exception_validator, @@ -74931,6 +75117,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._google_sso_change_policy_validator = bv.Void() EventTypeArg._group_user_management_change_policy_validator = bv.Void() EventTypeArg._integration_policy_changed_validator = bv.Void() +EventTypeArg._invite_acceptance_email_policy_changed_validator = bv.Void() EventTypeArg._member_requests_change_policy_validator = bv.Void() EventTypeArg._member_send_invite_policy_changed_validator = bv.Void() EventTypeArg._member_space_limits_add_exception_validator = bv.Void() @@ -75402,6 +75589,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'google_sso_change_policy': EventTypeArg._google_sso_change_policy_validator, 'group_user_management_change_policy': EventTypeArg._group_user_management_change_policy_validator, 'integration_policy_changed': EventTypeArg._integration_policy_changed_validator, + 'invite_acceptance_email_policy_changed': EventTypeArg._invite_acceptance_email_policy_changed_validator, 'member_requests_change_policy': EventTypeArg._member_requests_change_policy_validator, 'member_send_invite_policy_changed': EventTypeArg._member_send_invite_policy_changed_validator, 'member_space_limits_add_exception': EventTypeArg._member_space_limits_add_exception_validator, @@ -75874,6 +76062,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.google_sso_change_policy = EventTypeArg('google_sso_change_policy') EventTypeArg.group_user_management_change_policy = EventTypeArg('group_user_management_change_policy') EventTypeArg.integration_policy_changed = EventTypeArg('integration_policy_changed') +EventTypeArg.invite_acceptance_email_policy_changed = EventTypeArg('invite_acceptance_email_policy_changed') EventTypeArg.member_requests_change_policy = EventTypeArg('member_requests_change_policy') EventTypeArg.member_send_invite_policy_changed = EventTypeArg('member_send_invite_policy_changed') EventTypeArg.member_space_limits_add_exception = EventTypeArg('member_space_limits_add_exception') @@ -77320,6 +77509,34 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): IntegrationPolicyChangedType._all_field_names_ = set(['description']) IntegrationPolicyChangedType._all_fields_ = [('description', IntegrationPolicyChangedType.description.validator)] +InviteAcceptanceEmailPolicy._disabled_validator = bv.Void() +InviteAcceptanceEmailPolicy._enabled_validator = bv.Void() +InviteAcceptanceEmailPolicy._other_validator = bv.Void() +InviteAcceptanceEmailPolicy._tagmap = { + 'disabled': InviteAcceptanceEmailPolicy._disabled_validator, + 'enabled': InviteAcceptanceEmailPolicy._enabled_validator, + 'other': InviteAcceptanceEmailPolicy._other_validator, +} + +InviteAcceptanceEmailPolicy.disabled = InviteAcceptanceEmailPolicy('disabled') +InviteAcceptanceEmailPolicy.enabled = InviteAcceptanceEmailPolicy('enabled') +InviteAcceptanceEmailPolicy.other = InviteAcceptanceEmailPolicy('other') + +InviteAcceptanceEmailPolicyChangedDetails.new_value.validator = InviteAcceptanceEmailPolicy_validator +InviteAcceptanceEmailPolicyChangedDetails.previous_value.validator = InviteAcceptanceEmailPolicy_validator +InviteAcceptanceEmailPolicyChangedDetails._all_field_names_ = set([ + 'new_value', + 'previous_value', +]) +InviteAcceptanceEmailPolicyChangedDetails._all_fields_ = [ + ('new_value', InviteAcceptanceEmailPolicyChangedDetails.new_value.validator), + ('previous_value', InviteAcceptanceEmailPolicyChangedDetails.previous_value.validator), +] + +InviteAcceptanceEmailPolicyChangedType.description.validator = bv.String() +InviteAcceptanceEmailPolicyChangedType._all_field_names_ = set(['description']) +InviteAcceptanceEmailPolicyChangedType._all_fields_ = [('description', InviteAcceptanceEmailPolicyChangedType.description.validator)] + InviteMethod._auto_approve_validator = bv.Void() InviteMethod._invite_link_validator = bv.Void() InviteMethod._member_invite_validator = bv.Void() diff --git a/spec b/spec index 9923a507..444efadb 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 9923a5075753fa7521c9a180407420b5d893e163 +Subproject commit 444efadbf5a13253dcc8faf6d752df705e001402 From 4ed82373d161ca68c559ec9308dc6c392dd51651 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Thu, 1 Jul 2021 12:06:08 -0400 Subject: [PATCH 43/90] Automated Spec Update (#368) 4c2256e55c765e545d478018f3eb8f823de52925 Change Notes: files Namespace - Update list_folder route to include auth - Update list_folder/continue route to include auth - Update list_folder/get_latest_cursor route to include auth sharing_files Namespace - Update Comments - Add UpdateFileMemberArgs struct - Remove change_file_member_access route - Remove ChangeFileMemberAccessArgs and UpdateFileMemberArgs structs 973bd9fef7e3eea8de85bd20494333bbffe17999 Co-authored-by: DropboxBot --- dropbox/base.py | 38 ++------------ dropbox/files.py | 6 +-- dropbox/sharing.py | 126 ++++++++++++++++----------------------------- spec | 2 +- 4 files changed, 52 insertions(+), 120 deletions(-) diff --git a/dropbox/base.py b/dropbox/base.py index 86245b24..6b838505 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -3895,39 +3895,6 @@ def sharing_add_folder_member(self, ) 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:`.exceptions.ApiError` - - If this raises, ApiError will contain: - :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): """ @@ -5024,6 +4991,11 @@ def sharing_update_file_member(self, """ Changes a member's access on a shared file. + :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.MemberAccessLevelResult` :raises: :class:`.exceptions.ApiError` diff --git a/dropbox/files.py b/dropbox/files.py index aade9a54..04bcda1a 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -12781,7 +12781,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFolderArg_validator, ListFolderResult_validator, ListFolderError_validator, - {'auth': u'user', + {'auth': u'app, user', 'host': u'api', 'style': u'rpc'}, ) @@ -12792,7 +12792,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFolderContinueArg_validator, ListFolderResult_validator, ListFolderContinueError_validator, - {'auth': u'user', + {'auth': u'app, user', 'host': u'api', 'style': u'rpc'}, ) @@ -12803,7 +12803,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFolderArg_validator, ListFolderGetLatestCursorResult_validator, ListFolderError_validator, - {'auth': u'user', + {'auth': u'app, user', 'host': u'api', 'style': u'rpc'}, ) diff --git a/dropbox/sharing.py b/dropbox/sharing.py index 8da24338..c7cf3b78 100644 --- a/dropbox/sharing.py +++ b/dropbox/sharing.py @@ -1030,55 +1030,6 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AudienceRestrictingSharedFolder_validator = bv.Struct(AudienceRestrictingSharedFolder) -class ChangeFileMemberAccessArgs(bb.Struct): - """ - Arguments for - :meth:`dropbox.dropbox_client.Dropbox.sharing_change_file_member_access`. - - :ivar sharing.ChangeFileMemberAccessArgs.file: File for which we are - changing a member's access. - :ivar sharing.ChangeFileMemberAccessArgs.member: The member whose access we - are changing. - :ivar sharing.ChangeFileMemberAccessArgs.access_level: The new access level - for the member. - """ - - __slots__ = [ - '_file_value', - '_member_value', - '_access_level_value', - ] - - _has_required_fields = True - - def __init__(self, - file=None, - member=None, - access_level=None): - self._file_value = bb.NOT_SET - self._member_value = bb.NOT_SET - self._access_level_value = bb.NOT_SET - 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 - - # Instance attribute type: str (validator is set below) - file = bb.Attribute("file") - - # Instance attribute type: MemberSelector (validator is set below) - member = bb.Attribute("member", user_defined=True) - - # Instance attribute type: AccessLevel (validator is set below) - access_level = bb.Attribute("access_level", user_defined=True) - - def _process_custom_annotations(self, annotation_type, field_path, processor): - super(ChangeFileMemberAccessArgs, self)._process_custom_annotations(annotation_type, field_path, processor) - -ChangeFileMemberAccessArgs_validator = bv.Struct(ChangeFileMemberAccessArgs) - class LinkMetadata(bb.Struct): """ Metadata for a shared link. This can be either a :class:`PathLinkMetadata` @@ -2229,8 +2180,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): class FileMemberActionResult(bb.Struct): """ Per-member result for - :meth:`dropbox.dropbox_client.Dropbox.sharing_add_file_member` or - :meth:`dropbox.dropbox_client.Dropbox.sharing_change_file_member_access`. + :meth:`dropbox.dropbox_client.Dropbox.sharing_add_file_member`. :ivar sharing.FileMemberActionResult.member: One of specified input members. :ivar sharing.FileMemberActionResult.result: The outcome of the action on @@ -9907,13 +9857,23 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UnshareFolderError_validator = bv.Union(UnshareFolderError) -class UpdateFileMemberArgs(ChangeFileMemberAccessArgs): +class UpdateFileMemberArgs(bb.Struct): """ Arguments for :meth:`dropbox.dropbox_client.Dropbox.sharing_update_file_member`. + + :ivar sharing.UpdateFileMemberArgs.file: File for which we are changing a + member's access. + :ivar sharing.UpdateFileMemberArgs.member: The member whose access we are + changing. + :ivar sharing.UpdateFileMemberArgs.access_level: The new access level for + the member. """ __slots__ = [ + '_file_value', + '_member_value', + '_access_level_value', ] _has_required_fields = True @@ -9922,9 +9882,24 @@ def __init__(self, file=None, member=None, access_level=None): - super(UpdateFileMemberArgs, self).__init__(file, - member, - access_level) + self._file_value = bb.NOT_SET + self._member_value = bb.NOT_SET + self._access_level_value = bb.NOT_SET + 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 + + # Instance attribute type: str (validator is set below) + file = bb.Attribute("file") + + # Instance attribute type: MemberSelector (validator is set below) + member = bb.Attribute("member", user_defined=True) + + # Instance attribute type: AccessLevel (validator is set below) + access_level = bb.Attribute("access_level", user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(UpdateFileMemberArgs, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -10838,20 +10813,6 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('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) @@ -12784,8 +12745,19 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 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_ + [] +UpdateFileMemberArgs.file.validator = PathOrId_validator +UpdateFileMemberArgs.member.validator = MemberSelector_validator +UpdateFileMemberArgs.access_level.validator = AccessLevel_validator +UpdateFileMemberArgs._all_field_names_ = set([ + 'file', + 'member', + 'access_level', +]) +UpdateFileMemberArgs._all_fields_ = [ + ('file', UpdateFileMemberArgs.file.validator), + ('member', UpdateFileMemberArgs.member.validator), + ('access_level', UpdateFileMemberArgs.access_level.validator), +] UpdateFolderMemberArg.shared_folder_id.validator = common.SharedFolderId_validator UpdateFolderMemberArg.member.validator = MemberSelector_validator @@ -12982,17 +12954,6 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'host': u'api', 'style': u'rpc'}, ) -change_file_member_access = bb.Route( - 'change_file_member_access', - 1, - True, - ChangeFileMemberAccessArgs_validator, - FileMemberActionResult_validator, - FileMemberActionError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, -) check_job_status = bb.Route( 'check_job_status', 1, @@ -13437,7 +13398,6 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 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, diff --git a/spec b/spec index 444efadb..4c2256e5 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 444efadbf5a13253dcc8faf6d752df705e001402 +Subproject commit 4c2256e55c765e545d478018f3eb8f823de52925 From cdccfc5b248994e87285282bb10191865075763f Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Fri, 2 Jul 2021 12:03:39 -0400 Subject: [PATCH 44/90] Automated Spec Update (#370) 87a8e08baac15deb3adae9771e6a9786189e5073 Change Notes: files Namespace - Update list_folder route to remove auth - Update list_folder/continue route to remove auth - Update list_folder/get_latest_cursor route to remove auth 14ee35013933afb346ba37b3dfafa08ef800244a Co-authored-by: DropboxBot --- dropbox/files.py | 6 +++--- spec | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dropbox/files.py b/dropbox/files.py index 04bcda1a..aade9a54 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -12781,7 +12781,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFolderArg_validator, ListFolderResult_validator, ListFolderError_validator, - {'auth': u'app, user', + {'auth': u'user', 'host': u'api', 'style': u'rpc'}, ) @@ -12792,7 +12792,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFolderContinueArg_validator, ListFolderResult_validator, ListFolderContinueError_validator, - {'auth': u'app, user', + {'auth': u'user', 'host': u'api', 'style': u'rpc'}, ) @@ -12803,7 +12803,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFolderArg_validator, ListFolderGetLatestCursorResult_validator, ListFolderError_validator, - {'auth': u'app, user', + {'auth': u'user', 'host': u'api', 'style': u'rpc'}, ) diff --git a/spec b/spec index 4c2256e5..87a8e08b 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 4c2256e55c765e545d478018f3eb8f823de52925 +Subproject commit 87a8e08baac15deb3adae9771e6a9786189e5073 From a5295619a6b91d9b50a87ec43d3e5afe9d476c3d Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Thu, 8 Jul 2021 13:51:46 -0400 Subject: [PATCH 45/90] Automated Spec Update (#372) f549acb7a174cafc5b7c4f9d8815f7dd5d48a0da Change Notes: shared_links Namespace - Add LinkAudienceOption, VisibilityPolicy structs - Add VisibilityPolicyDisallowedReason, LinkAudienceDisallowedReason, AlphaResolvedVisibility unions Co-authored-by: Eugene Che Co-authored-by: DropboxBot Co-authored-by: Eugene Che --- dropbox/sharing.py | 799 +++++++++++++++++++++++++++++++++++++-------- spec | 2 +- 2 files changed, 658 insertions(+), 143 deletions(-) diff --git a/dropbox/sharing.py b/dropbox/sharing.py index c7cf3b78..979331fc 100644 --- a/dropbox/sharing.py +++ b/dropbox/sharing.py @@ -912,6 +912,160 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AddMemberSelectorError_validator = bv.Union(AddMemberSelectorError) +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 sharing.RequestedVisibility.public: Anyone who has received the link + can access it. No login required. + :ivar sharing.RequestedVisibility.team_only: Only members of the same team + can access the link. Login is required. + :ivar sharing.RequestedVisibility.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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(RequestedVisibility, self)._process_custom_annotations(annotation_type, field_path, processor) + +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 sharing.ResolvedVisibility.team_and_password: Only members of the same + team who have the link-specific password can access the link. Login is + required. + :ivar sharing.ResolvedVisibility.shared_folder_only: Only members of the + shared folder containing the linked file can access the link. Login is + required. + :ivar sharing.ResolvedVisibility.no_one: The link merely points the user to + the content, and does not grant any additional rights. Existing members + of the content who use this link can only access the content with their + pre-existing access rights. Either on the file directly, or inherited + from a parent folder. + :ivar sharing.ResolvedVisibility.only_you: Only the current user can view + this link. + """ + + _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 + no_one = None + # Attribute is overwritten below the class definition + only_you = 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_no_one(self): + """ + Check if the union tag is ``no_one``. + + :rtype: bool + """ + return self._tag == 'no_one' + + def is_only_you(self): + """ + Check if the union tag is ``only_you``. + + :rtype: bool + """ + return self._tag == 'only_you' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ResolvedVisibility, self)._process_custom_annotations(annotation_type, field_path, processor) + +ResolvedVisibility_validator = bv.Union(ResolvedVisibility) + +class AlphaResolvedVisibility(ResolvedVisibility): + """ + check documentation for ResolvedVisibility. + + This class acts as a tagged union. Only 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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(AlphaResolvedVisibility, self)._process_custom_annotations(annotation_type, field_path, processor) + +AlphaResolvedVisibility_validator = bv.Union(AlphaResolvedVisibility) + class AudienceExceptionContentInfo(bb.Struct): """ Information about the content that has a link audience different than that @@ -4050,6 +4204,166 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LinkAudience_validator = bv.Union(LinkAudience) +class VisibilityPolicyDisallowedReason(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 sharing.VisibilityPolicyDisallowedReason.delete_and_recreate: The user + needs to delete and recreate the link to change the visibility policy. + :ivar sharing.VisibilityPolicyDisallowedReason.restricted_by_shared_folder: + The parent shared folder restricts sharing of links outside the shared + folder. To change the visibility policy, remove the restriction from the + parent shared folder. + :ivar sharing.VisibilityPolicyDisallowedReason.restricted_by_team: The team + policy prevents links being shared outside the team. + :ivar sharing.VisibilityPolicyDisallowedReason.user_not_on_team: The user + needs to be on a team to set this policy. + :ivar sharing.VisibilityPolicyDisallowedReason.user_account_type: The user + is a basic user or is on a limited team. + :ivar sharing.VisibilityPolicyDisallowedReason.permission_denied: The user + does not have permission. + """ + + _catch_all = 'other' + # Attribute is overwritten below the class definition + delete_and_recreate = None + # Attribute is overwritten below the class definition + restricted_by_shared_folder = None + # Attribute is overwritten below the class definition + restricted_by_team = None + # Attribute is overwritten below the class definition + user_not_on_team = None + # Attribute is overwritten below the class definition + user_account_type = None + # Attribute is overwritten below the class definition + permission_denied = None + # Attribute is overwritten below the class definition + other = None + + def is_delete_and_recreate(self): + """ + Check if the union tag is ``delete_and_recreate``. + + :rtype: bool + """ + return self._tag == 'delete_and_recreate' + + def is_restricted_by_shared_folder(self): + """ + Check if the union tag is ``restricted_by_shared_folder``. + + :rtype: bool + """ + return self._tag == 'restricted_by_shared_folder' + + 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_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_user_account_type(self): + """ + Check if the union tag is ``user_account_type``. + + :rtype: bool + """ + return self._tag == 'user_account_type' + + def is_permission_denied(self): + """ + Check if the union tag is ``permission_denied``. + + :rtype: bool + """ + return self._tag == 'permission_denied' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(VisibilityPolicyDisallowedReason, self)._process_custom_annotations(annotation_type, field_path, processor) + +VisibilityPolicyDisallowedReason_validator = bv.Union(VisibilityPolicyDisallowedReason) + +class LinkAudienceDisallowedReason(VisibilityPolicyDisallowedReason): + """ + check documentation for VisibilityPolicyDisallowedReason. + + This class acts as a tagged union. Only 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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(LinkAudienceDisallowedReason, self)._process_custom_annotations(annotation_type, field_path, processor) + +LinkAudienceDisallowedReason_validator = bv.Union(LinkAudienceDisallowedReason) + +class LinkAudienceOption(bb.Struct): + """ + :ivar sharing.LinkAudienceOption.audience: Specifies who can access the + link. + :ivar sharing.LinkAudienceOption.allowed: Whether the user calling this API + can select this audience option. + :ivar sharing.LinkAudienceOption.disallowed_reason: If ``allowed`` is + ``False``, this will provide the reason that the user is not permitted + to set the visibility to this policy. + """ + + __slots__ = [ + '_audience_value', + '_allowed_value', + '_disallowed_reason_value', + ] + + _has_required_fields = True + + def __init__(self, + audience=None, + allowed=None, + disallowed_reason=None): + self._audience_value = bb.NOT_SET + self._allowed_value = bb.NOT_SET + self._disallowed_reason_value = bb.NOT_SET + if audience is not None: + self.audience = audience + if allowed is not None: + self.allowed = allowed + if disallowed_reason is not None: + self.disallowed_reason = disallowed_reason + + # Instance attribute type: LinkAudience (validator is set below) + audience = bb.Attribute("audience", user_defined=True) + + # Instance attribute type: bool (validator is set below) + allowed = bb.Attribute("allowed") + + # Instance attribute type: LinkAudienceDisallowedReason (validator is set below) + disallowed_reason = bb.Attribute("disallowed_reason", nullable=True, user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(LinkAudienceOption, self)._process_custom_annotations(annotation_type, field_path, processor) + +LinkAudienceOption_validator = bv.Struct(LinkAudienceOption) + class LinkExpiry(bb.Union): """ This class acts as a tagged union. Only one of the ``is_*`` methods will @@ -4263,6 +4577,35 @@ class LinkPermissions(bb.Struct): not depend on who is calling this API. In particular, `link_access_level` does not take into account the API caller's current permissions to the content. + :ivar sharing.LinkPermissions.visibility_policies: A list of policies that + the user might be able to set for the visibility. + :ivar sharing.LinkPermissions.can_set_expiry: Whether the user can set the + expiry settings of the link. This refers to the ability to create a new + expiry and modify an existing expiry. + :ivar sharing.LinkPermissions.can_remove_expiry: Whether the user can remove + the expiry of the link. + :ivar sharing.LinkPermissions.allow_download: Whether the link can be + downloaded or not. + :ivar sharing.LinkPermissions.can_allow_download: Whether the user can allow + downloads via the link. This refers to the ability to remove a + no-download restriction on the link. + :ivar sharing.LinkPermissions.can_disallow_download: Whether the user can + disallow downloads via the link. This refers to the ability to impose a + no-download restriction on the link. + :ivar sharing.LinkPermissions.allow_comments: Whether comments are enabled + for the linked file. This takes the team commenting policy into account. + :ivar sharing.LinkPermissions.team_restricts_comments: Whether the team has + disabled commenting globally. + :ivar sharing.LinkPermissions.audience_options: A list of link audience + options the user might be able to set as the new audience. + :ivar sharing.LinkPermissions.can_set_password: Whether the user can set a + password for the link. + :ivar sharing.LinkPermissions.can_remove_password: Whether the user can + remove the password of the link. + :ivar sharing.LinkPermissions.require_password: Whether the user is required + to provide a password to view the link. + :ivar sharing.LinkPermissions.can_use_extended_sharing_controls: Whether the + user can use extended sharing controls, based on their account type. """ __slots__ = [ @@ -4272,23 +4615,62 @@ class LinkPermissions(bb.Struct): '_revoke_failure_reason_value', '_effective_audience_value', '_link_access_level_value', + '_visibility_policies_value', + '_can_set_expiry_value', + '_can_remove_expiry_value', + '_allow_download_value', + '_can_allow_download_value', + '_can_disallow_download_value', + '_allow_comments_value', + '_team_restricts_comments_value', + '_audience_options_value', + '_can_set_password_value', + '_can_remove_password_value', + '_require_password_value', + '_can_use_extended_sharing_controls_value', ] _has_required_fields = True def __init__(self, can_revoke=None, + visibility_policies=None, + can_set_expiry=None, + can_remove_expiry=None, + allow_download=None, + can_allow_download=None, + can_disallow_download=None, + allow_comments=None, + team_restricts_comments=None, resolved_visibility=None, requested_visibility=None, revoke_failure_reason=None, effective_audience=None, - link_access_level=None): + link_access_level=None, + audience_options=None, + can_set_password=None, + can_remove_password=None, + require_password=None, + can_use_extended_sharing_controls=None): self._resolved_visibility_value = bb.NOT_SET self._requested_visibility_value = bb.NOT_SET self._can_revoke_value = bb.NOT_SET self._revoke_failure_reason_value = bb.NOT_SET self._effective_audience_value = bb.NOT_SET self._link_access_level_value = bb.NOT_SET + self._visibility_policies_value = bb.NOT_SET + self._can_set_expiry_value = bb.NOT_SET + self._can_remove_expiry_value = bb.NOT_SET + self._allow_download_value = bb.NOT_SET + self._can_allow_download_value = bb.NOT_SET + self._can_disallow_download_value = bb.NOT_SET + self._allow_comments_value = bb.NOT_SET + self._team_restricts_comments_value = bb.NOT_SET + self._audience_options_value = bb.NOT_SET + self._can_set_password_value = bb.NOT_SET + self._can_remove_password_value = bb.NOT_SET + self._require_password_value = bb.NOT_SET + self._can_use_extended_sharing_controls_value = bb.NOT_SET if resolved_visibility is not None: self.resolved_visibility = resolved_visibility if requested_visibility is not None: @@ -4301,6 +4683,32 @@ def __init__(self, self.effective_audience = effective_audience if link_access_level is not None: self.link_access_level = link_access_level + if visibility_policies is not None: + self.visibility_policies = visibility_policies + if can_set_expiry is not None: + self.can_set_expiry = can_set_expiry + if can_remove_expiry is not None: + self.can_remove_expiry = can_remove_expiry + if allow_download is not None: + self.allow_download = allow_download + if can_allow_download is not None: + self.can_allow_download = can_allow_download + if can_disallow_download is not None: + self.can_disallow_download = can_disallow_download + if allow_comments is not None: + self.allow_comments = allow_comments + if team_restricts_comments is not None: + self.team_restricts_comments = team_restricts_comments + if audience_options is not None: + self.audience_options = audience_options + if can_set_password is not None: + self.can_set_password = can_set_password + if can_remove_password is not None: + self.can_remove_password = can_remove_password + if require_password is not None: + self.require_password = require_password + if can_use_extended_sharing_controls is not None: + self.can_use_extended_sharing_controls = can_use_extended_sharing_controls # Instance attribute type: ResolvedVisibility (validator is set below) resolved_visibility = bb.Attribute("resolved_visibility", nullable=True, user_defined=True) @@ -4320,6 +4728,45 @@ def __init__(self, # Instance attribute type: LinkAccessLevel (validator is set below) link_access_level = bb.Attribute("link_access_level", nullable=True, user_defined=True) + # Instance attribute type: list of [VisibilityPolicy] (validator is set below) + visibility_policies = bb.Attribute("visibility_policies") + + # Instance attribute type: bool (validator is set below) + can_set_expiry = bb.Attribute("can_set_expiry") + + # Instance attribute type: bool (validator is set below) + can_remove_expiry = bb.Attribute("can_remove_expiry") + + # Instance attribute type: bool (validator is set below) + allow_download = bb.Attribute("allow_download") + + # Instance attribute type: bool (validator is set below) + can_allow_download = bb.Attribute("can_allow_download") + + # Instance attribute type: bool (validator is set below) + can_disallow_download = bb.Attribute("can_disallow_download") + + # Instance attribute type: bool (validator is set below) + allow_comments = bb.Attribute("allow_comments") + + # Instance attribute type: bool (validator is set below) + team_restricts_comments = bb.Attribute("team_restricts_comments") + + # Instance attribute type: list of [LinkAudienceOption] (validator is set below) + audience_options = bb.Attribute("audience_options", nullable=True) + + # Instance attribute type: bool (validator is set below) + can_set_password = bb.Attribute("can_set_password", nullable=True) + + # Instance attribute type: bool (validator is set below) + can_remove_password = bb.Attribute("can_remove_password", nullable=True) + + # Instance attribute type: bool (validator is set below) + require_password = bb.Attribute("require_password", nullable=True) + + # Instance attribute type: bool (validator is set below) + can_use_extended_sharing_controls = bb.Attribute("can_use_extended_sharing_controls", nullable=True) + def _process_custom_annotations(self, annotation_type, field_path, processor): super(LinkPermissions, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -7245,119 +7692,6 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RequestedLinkAccessLevel_validator = bv.Union(RequestedLinkAccessLevel) -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 sharing.RequestedVisibility.public: Anyone who has received the link - can access it. No login required. - :ivar sharing.RequestedVisibility.team_only: Only members of the same team - can access the link. Login is required. - :ivar sharing.RequestedVisibility.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 _process_custom_annotations(self, annotation_type, field_path, processor): - super(RequestedVisibility, self)._process_custom_annotations(annotation_type, field_path, processor) - -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 sharing.ResolvedVisibility.team_and_password: Only members of the same - team who have the link-specific password can access the link. Login is - required. - :ivar sharing.ResolvedVisibility.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 _process_custom_annotations(self, annotation_type, field_path, processor): - super(ResolvedVisibility, self)._process_custom_annotations(annotation_type, field_path, processor) - -ResolvedVisibility_validator = bv.Union(ResolvedVisibility) - class RevokeSharedLinkArg(bb.Struct): """ :ivar sharing.RevokeSharedLinkArg.url: URL of the shared link. @@ -9064,6 +9398,8 @@ class SharedLinkSettings(bb.Struct): existing link is not supported. :ivar sharing.SharedLinkSettings.requested_visibility: Use ``audience`` instead. The requested access for this shared link. + :ivar sharing.SharedLinkSettings.allow_download: Boolean flag to allow or + not download capabilities for shared links. """ __slots__ = [ @@ -9073,6 +9409,7 @@ class SharedLinkSettings(bb.Struct): '_audience_value', '_access_value', '_requested_visibility_value', + '_allow_download_value', ] _has_required_fields = False @@ -9083,13 +9420,15 @@ def __init__(self, expires=None, audience=None, access=None, - requested_visibility=None): + requested_visibility=None, + allow_download=None): self._require_password_value = bb.NOT_SET self._link_password_value = bb.NOT_SET self._expires_value = bb.NOT_SET self._audience_value = bb.NOT_SET self._access_value = bb.NOT_SET self._requested_visibility_value = bb.NOT_SET + self._allow_download_value = bb.NOT_SET if require_password is not None: self.require_password = require_password if link_password is not None: @@ -9102,6 +9441,8 @@ def __init__(self, self.access = access if requested_visibility is not None: self.requested_visibility = requested_visibility + if allow_download is not None: + self.allow_download = allow_download # Instance attribute type: bool (validator is set below) require_password = bb.Attribute("require_password", nullable=True) @@ -9121,6 +9462,9 @@ def __init__(self, # Instance attribute type: RequestedVisibility (validator is set below) requested_visibility = bb.Attribute("requested_visibility", nullable=True, user_defined=True) + # Instance attribute type: bool (validator is set below) + allow_download = bb.Attribute("allow_download", nullable=True) + def _process_custom_annotations(self, annotation_type, field_path, processor): super(SharedLinkSettings, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -10597,6 +10941,65 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): Visibility_validator = bv.Union(Visibility) +class VisibilityPolicy(bb.Struct): + """ + :ivar sharing.VisibilityPolicy.policy: This is the value to submit when + saving the visibility setting. + :ivar sharing.VisibilityPolicy.resolved_policy: This is what the effective + policy would be, if you selected this option. The resolved policy is + obtained after considering external effects such as shared folder + settings and team policy. This value is guaranteed to be provided. + :ivar sharing.VisibilityPolicy.allowed: Whether the user is permitted to set + the visibility to this policy. + :ivar sharing.VisibilityPolicy.disallowed_reason: If ``allowed`` is + ``False``, this will provide the reason that the user is not permitted + to set the visibility to this policy. + """ + + __slots__ = [ + '_policy_value', + '_resolved_policy_value', + '_allowed_value', + '_disallowed_reason_value', + ] + + _has_required_fields = True + + def __init__(self, + policy=None, + resolved_policy=None, + allowed=None, + disallowed_reason=None): + self._policy_value = bb.NOT_SET + self._resolved_policy_value = bb.NOT_SET + self._allowed_value = bb.NOT_SET + self._disallowed_reason_value = bb.NOT_SET + if policy is not None: + self.policy = policy + if resolved_policy is not None: + self.resolved_policy = resolved_policy + if allowed is not None: + self.allowed = allowed + if disallowed_reason is not None: + self.disallowed_reason = disallowed_reason + + # Instance attribute type: RequestedVisibility (validator is set below) + policy = bb.Attribute("policy", user_defined=True) + + # Instance attribute type: AlphaResolvedVisibility (validator is set below) + resolved_policy = bb.Attribute("resolved_policy", user_defined=True) + + # Instance attribute type: bool (validator is set below) + allowed = bb.Attribute("allowed") + + # Instance attribute type: VisibilityPolicyDisallowedReason (validator is set below) + disallowed_reason = bb.Attribute("disallowed_reason", nullable=True, user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(VisibilityPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) + +VisibilityPolicy_validator = bv.Struct(VisibilityPolicy) + DropboxId_validator = bv.String(min_length=1) GetSharedLinkFileArg_validator = GetSharedLinkMetadataArg_validator GetSharedLinkFileArg = GetSharedLinkMetadataArg @@ -10784,6 +11187,43 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AddMemberSelectorError.group_not_on_team = AddMemberSelectorError('group_not_on_team') AddMemberSelectorError.other = AddMemberSelectorError('other') +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._no_one_validator = bv.Void() +ResolvedVisibility._only_you_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, + 'no_one': ResolvedVisibility._no_one_validator, + 'only_you': ResolvedVisibility._only_you_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.no_one = ResolvedVisibility('no_one') +ResolvedVisibility.only_you = ResolvedVisibility('only_you') +ResolvedVisibility.other = ResolvedVisibility('other') + +AlphaResolvedVisibility._tagmap = { +} +AlphaResolvedVisibility._tagmap.update(ResolvedVisibility._tagmap) + AudienceExceptionContentInfo.name.validator = bv.String() AudienceExceptionContentInfo._all_field_names_ = set(['name']) AudienceExceptionContentInfo._all_fields_ = [('name', AudienceExceptionContentInfo.name.validator)] @@ -11474,6 +11914,49 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LinkAudience.members = LinkAudience('members') LinkAudience.other = LinkAudience('other') +VisibilityPolicyDisallowedReason._delete_and_recreate_validator = bv.Void() +VisibilityPolicyDisallowedReason._restricted_by_shared_folder_validator = bv.Void() +VisibilityPolicyDisallowedReason._restricted_by_team_validator = bv.Void() +VisibilityPolicyDisallowedReason._user_not_on_team_validator = bv.Void() +VisibilityPolicyDisallowedReason._user_account_type_validator = bv.Void() +VisibilityPolicyDisallowedReason._permission_denied_validator = bv.Void() +VisibilityPolicyDisallowedReason._other_validator = bv.Void() +VisibilityPolicyDisallowedReason._tagmap = { + 'delete_and_recreate': VisibilityPolicyDisallowedReason._delete_and_recreate_validator, + 'restricted_by_shared_folder': VisibilityPolicyDisallowedReason._restricted_by_shared_folder_validator, + 'restricted_by_team': VisibilityPolicyDisallowedReason._restricted_by_team_validator, + 'user_not_on_team': VisibilityPolicyDisallowedReason._user_not_on_team_validator, + 'user_account_type': VisibilityPolicyDisallowedReason._user_account_type_validator, + 'permission_denied': VisibilityPolicyDisallowedReason._permission_denied_validator, + 'other': VisibilityPolicyDisallowedReason._other_validator, +} + +VisibilityPolicyDisallowedReason.delete_and_recreate = VisibilityPolicyDisallowedReason('delete_and_recreate') +VisibilityPolicyDisallowedReason.restricted_by_shared_folder = VisibilityPolicyDisallowedReason('restricted_by_shared_folder') +VisibilityPolicyDisallowedReason.restricted_by_team = VisibilityPolicyDisallowedReason('restricted_by_team') +VisibilityPolicyDisallowedReason.user_not_on_team = VisibilityPolicyDisallowedReason('user_not_on_team') +VisibilityPolicyDisallowedReason.user_account_type = VisibilityPolicyDisallowedReason('user_account_type') +VisibilityPolicyDisallowedReason.permission_denied = VisibilityPolicyDisallowedReason('permission_denied') +VisibilityPolicyDisallowedReason.other = VisibilityPolicyDisallowedReason('other') + +LinkAudienceDisallowedReason._tagmap = { +} +LinkAudienceDisallowedReason._tagmap.update(VisibilityPolicyDisallowedReason._tagmap) + +LinkAudienceOption.audience.validator = LinkAudience_validator +LinkAudienceOption.allowed.validator = bv.Boolean() +LinkAudienceOption.disallowed_reason.validator = bv.Nullable(LinkAudienceDisallowedReason_validator) +LinkAudienceOption._all_field_names_ = set([ + 'audience', + 'allowed', + 'disallowed_reason', +]) +LinkAudienceOption._all_fields_ = [ + ('audience', LinkAudienceOption.audience.validator), + ('allowed', LinkAudienceOption.allowed.validator), + ('disallowed_reason', LinkAudienceOption.disallowed_reason.validator), +] + LinkExpiry._remove_expiry_validator = bv.Void() LinkExpiry._set_expiry_validator = common.DropboxTimestamp_validator LinkExpiry._other_validator = bv.Void() @@ -11518,6 +12001,19 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LinkPermissions.revoke_failure_reason.validator = bv.Nullable(SharedLinkAccessFailureReason_validator) LinkPermissions.effective_audience.validator = bv.Nullable(LinkAudience_validator) LinkPermissions.link_access_level.validator = bv.Nullable(LinkAccessLevel_validator) +LinkPermissions.visibility_policies.validator = bv.List(VisibilityPolicy_validator) +LinkPermissions.can_set_expiry.validator = bv.Boolean() +LinkPermissions.can_remove_expiry.validator = bv.Boolean() +LinkPermissions.allow_download.validator = bv.Boolean() +LinkPermissions.can_allow_download.validator = bv.Boolean() +LinkPermissions.can_disallow_download.validator = bv.Boolean() +LinkPermissions.allow_comments.validator = bv.Boolean() +LinkPermissions.team_restricts_comments.validator = bv.Boolean() +LinkPermissions.audience_options.validator = bv.Nullable(bv.List(LinkAudienceOption_validator)) +LinkPermissions.can_set_password.validator = bv.Nullable(bv.Boolean()) +LinkPermissions.can_remove_password.validator = bv.Nullable(bv.Boolean()) +LinkPermissions.require_password.validator = bv.Nullable(bv.Boolean()) +LinkPermissions.can_use_extended_sharing_controls.validator = bv.Nullable(bv.Boolean()) LinkPermissions._all_field_names_ = set([ 'resolved_visibility', 'requested_visibility', @@ -11525,6 +12021,19 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'revoke_failure_reason', 'effective_audience', 'link_access_level', + 'visibility_policies', + 'can_set_expiry', + 'can_remove_expiry', + 'allow_download', + 'can_allow_download', + 'can_disallow_download', + 'allow_comments', + 'team_restricts_comments', + 'audience_options', + 'can_set_password', + 'can_remove_password', + 'require_password', + 'can_use_extended_sharing_controls', ]) LinkPermissions._all_fields_ = [ ('resolved_visibility', LinkPermissions.resolved_visibility.validator), @@ -11533,6 +12042,19 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('revoke_failure_reason', LinkPermissions.revoke_failure_reason.validator), ('effective_audience', LinkPermissions.effective_audience.validator), ('link_access_level', LinkPermissions.link_access_level.validator), + ('visibility_policies', LinkPermissions.visibility_policies.validator), + ('can_set_expiry', LinkPermissions.can_set_expiry.validator), + ('can_remove_expiry', LinkPermissions.can_remove_expiry.validator), + ('allow_download', LinkPermissions.allow_download.validator), + ('can_allow_download', LinkPermissions.can_allow_download.validator), + ('can_disallow_download', LinkPermissions.can_disallow_download.validator), + ('allow_comments', LinkPermissions.allow_comments.validator), + ('team_restricts_comments', LinkPermissions.team_restricts_comments.validator), + ('audience_options', LinkPermissions.audience_options.validator), + ('can_set_password', LinkPermissions.can_set_password.validator), + ('can_remove_password', LinkPermissions.can_remove_password.validator), + ('require_password', LinkPermissions.require_password.validator), + ('can_use_extended_sharing_controls', LinkPermissions.can_use_extended_sharing_controls.validator), ] LinkSettings.access_level.validator = bv.Nullable(AccessLevel_validator) @@ -12144,33 +12666,6 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RequestedLinkAccessLevel.max = RequestedLinkAccessLevel('max') RequestedLinkAccessLevel.other = RequestedLinkAccessLevel('other') -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)] @@ -12571,6 +13066,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SharedLinkSettings.audience.validator = bv.Nullable(LinkAudience_validator) SharedLinkSettings.access.validator = bv.Nullable(RequestedLinkAccessLevel_validator) SharedLinkSettings.requested_visibility.validator = bv.Nullable(RequestedVisibility_validator) +SharedLinkSettings.allow_download.validator = bv.Nullable(bv.Boolean()) SharedLinkSettings._all_field_names_ = set([ 'require_password', 'link_password', @@ -12578,6 +13074,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'audience', 'access', 'requested_visibility', + 'allow_download', ]) SharedLinkSettings._all_fields_ = [ ('require_password', SharedLinkSettings.require_password.validator), @@ -12586,6 +13083,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('audience', SharedLinkSettings.audience.validator), ('access', SharedLinkSettings.access.validator), ('requested_visibility', SharedLinkSettings.requested_visibility.validator), + ('allow_download', SharedLinkSettings.allow_download.validator), ] SharedLinkSettingsError._invalid_settings_validator = bv.Void() @@ -12912,6 +13410,23 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): Visibility.shared_folder_only = Visibility('shared_folder_only') Visibility.other = Visibility('other') +VisibilityPolicy.policy.validator = RequestedVisibility_validator +VisibilityPolicy.resolved_policy.validator = AlphaResolvedVisibility_validator +VisibilityPolicy.allowed.validator = bv.Boolean() +VisibilityPolicy.disallowed_reason.validator = bv.Nullable(VisibilityPolicyDisallowedReason_validator) +VisibilityPolicy._all_field_names_ = set([ + 'policy', + 'resolved_policy', + 'allowed', + 'disallowed_reason', +]) +VisibilityPolicy._all_fields_ = [ + ('policy', VisibilityPolicy.policy.validator), + ('resolved_policy', VisibilityPolicy.resolved_policy.validator), + ('allowed', VisibilityPolicy.allowed.validator), + ('disallowed_reason', VisibilityPolicy.disallowed_reason.validator), +] + AddFileMemberArgs.quiet.default = False AddFileMemberArgs.access_level.default = AccessLevel.viewer AddFileMemberArgs.add_message_as_comment.default = False diff --git a/spec b/spec index 87a8e08b..f549acb7 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 87a8e08baac15deb3adae9771e6a9786189e5073 +Subproject commit f549acb7a174cafc5b7c4f9d8815f7dd5d48a0da From fa606b8e8c2dedabf3482f92de11ffbd4741b3d1 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 14 Jul 2021 13:11:29 -0400 Subject: [PATCH 46/90] Automated Spec Update (#373) b343fc634be6702d3e58c2eaaf6cb622e8642512 Change Notes: shared_links Namespace: - Update comments Co-authored-by: Scott Erickson Co-authored-by: DropboxBot Co-authored-by: Scott Erickson --- dropbox/base.py | 18 +++++++----------- dropbox/sharing.py | 2 -- spec | 2 +- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/dropbox/base.py b/dropbox/base.py index 6b838505..82ae034b 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -3967,17 +3967,14 @@ def sharing_create_shared_link(self, 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`. + path, that link is returned. 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. + :type short_url: bool :param Nullable[:class:`dropbox.sharing.PendingUploadMode`] pending_upload: If it's okay to share a path that does not yet exist, set this to either ``PendingUploadMode.file`` or @@ -4224,8 +4221,7 @@ def sharing_get_shared_links(self, 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. + are never returned in this case. :param Nullable[str] path: See :meth:`sharing_get_shared_links` description. diff --git a/dropbox/sharing.py b/dropbox/sharing.py index 979331fc..ebc01e38 100644 --- a/dropbox/sharing.py +++ b/dropbox/sharing.py @@ -1257,8 +1257,6 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): class CreateSharedLinkArg(bb.Struct): """ :ivar sharing.CreateSharedLinkArg.path: The path to share. - :ivar sharing.CreateSharedLinkArg.short_url: Whether to return a shortened - URL. :ivar sharing.CreateSharedLinkArg.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 diff --git a/spec b/spec index f549acb7..b343fc63 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit f549acb7a174cafc5b7c4f9d8815f7dd5d48a0da +Subproject commit b343fc634be6702d3e58c2eaaf6cb622e8642512 From 10d92dad30958e578f899c0ec9d3ae1c69df6830 Mon Sep 17 00:00:00 2001 From: mtruong-dbx <77769746+mtruong-dbx@users.noreply.github.com> Date: Wed, 21 Jul 2021 14:37:31 -0700 Subject: [PATCH 47/90] Add Support for Multi-Auth (#371) --- dropbox/dropbox_client.py | 11 +++++++---- test/integration/test_dropbox.py | 29 +++++++++++++++++++++++++---- test/unit/test_dropbox_unit.py | 3 +-- tox.ini | 1 + 4 files changed, 34 insertions(+), 10 deletions(-) diff --git a/dropbox/dropbox_client.py b/dropbox/dropbox_client.py index 480682aa..afe664a6 100644 --- a/dropbox/dropbox_client.py +++ b/dropbox/dropbox_client.py @@ -182,8 +182,10 @@ def __init__(self, refresh will request all available scopes for application """ - if not (oauth2_access_token or oauth2_refresh_token): - raise BadInputException('OAuth2 access token or refresh token must be set') + if not (oauth2_access_token or oauth2_refresh_token or (app_key and app_secret)): + raise BadInputException( + 'OAuth2 access token or refresh token or app key/secret must be set' + ) if headers is not None and not isinstance(headers, dict): raise BadInputException('Expected dict, got {}'.format(headers)) @@ -544,11 +546,12 @@ def request_json_string(self, url = self._get_route_url(fq_hostname, func_name) headers = {'User-Agent': self._user_agent} - if auth_type == USER_AUTH or auth_type == TEAM_AUTH: + auth_types = auth_type.replace(' ', '').split(',') + if (USER_AUTH in auth_types or TEAM_AUTH in auth_types) and self._oauth2_access_token: headers['Authorization'] = 'Bearer %s' % self._oauth2_access_token if self._headers: headers.update(self._headers) - elif auth_type == APP_AUTH: + elif APP_AUTH in auth_types: if self._app_key is None or self._app_secret is None: raise BadInputException( 'Client id and client secret are required for routes with app auth') diff --git a/test/integration/test_dropbox.py b/test/integration/test_dropbox.py index 91493816..9920b1d5 100644 --- a/test/integration/test_dropbox.py +++ b/test/integration/test_dropbox.py @@ -32,6 +32,8 @@ from dropbox.files import ( DeleteResult, ListFolderError, + PathOrLink, + SharedLinkFileInfo, ) from dropbox.common import ( PathRoot, @@ -41,7 +43,7 @@ def _value_from_env_or_die(env_name='DROPBOX_TOKEN'): value = os.environ.get(env_name) if value is None: - print('Set {} environment variable to a valid token.'.format(env_name), + print('Set {} environment variable to a valid value.'.format(env_name), file=sys.stderr) sys.exit(1) return value @@ -72,7 +74,12 @@ def dbx_team_from_env(): def dbx_app_auth_from_env(): app_key = _value_from_env_or_die("DROPBOX_APP_KEY") app_secret = _value_from_env_or_die("DROPBOX_APP_SECRET") - return Dropbox(oauth2_access_token="foo", app_key=app_key, app_secret=app_secret) + return Dropbox(app_key=app_key, app_secret=app_secret) + + +@pytest.fixture() +def dbx_share_url_from_env(): + return _value_from_env_or_die("DROPBOX_SHARED_LINK") MALFORMED_TOKEN = 'asdf' @@ -82,9 +89,10 @@ def dbx_app_auth_from_env(): DUMMY_PAYLOAD = string.ascii_letters.encode('ascii') -@pytest.mark.usefixtures("dbx_from_env", "refresh_dbx_from_env", "dbx_app_auth_from_env") +@pytest.mark.usefixtures( + "dbx_from_env", "refresh_dbx_from_env", "dbx_app_auth_from_env", "dbx_share_url_from_env" +) class TestDropbox: - def test_default_oauth2_urls(self): flow_obj = DropboxOAuth2Flow('dummy_app_key', 'dummy_app_secret', 'http://localhost/dummy', 'dummy_session', 'dbx-auth-csrf-token') @@ -115,6 +123,19 @@ def test_bad_auth(self): invalid_token_dbx.files_list_folder('') assert cm.value.error.is_invalid_access_token() + def test_multi_auth(self, dbx_from_env, dbx_app_auth_from_env, dbx_share_url_from_env): + # Test for user (with oauth token) + preview_result, resp = dbx_from_env.files_get_thumbnail_v2( + PathOrLink.link(SharedLinkFileInfo(url=dbx_share_url_from_env)) + ) + assert resp.status_code == 200 + + # Test for app (with app key and secret) + preview_result, resp = dbx_from_env.files_get_thumbnail_v2( + PathOrLink.link(SharedLinkFileInfo(url=dbx_share_url_from_env)) + ) + assert resp.status_code == 200 + def test_refresh(self, refresh_dbx_from_env): refresh_dbx_from_env.users_get_current_account() diff --git a/test/unit/test_dropbox_unit.py b/test/unit/test_dropbox_unit.py index d631a753..dfbbcc22 100644 --- a/test/unit/test_dropbox_unit.py +++ b/test/unit/test_dropbox_unit.py @@ -291,8 +291,7 @@ def test_Dropbox_with_only_refresh(self, session_instance): session=session_instance) def test_Dropbox_with_only_app_key_and_secret(self, session_instance): - with pytest.raises(BadInputException): - Dropbox(app_key=APP_KEY, app_secret=APP_SECRET) + Dropbox(app_key=APP_KEY, app_secret=APP_SECRET) def test_check_refresh_with_legacy_token(self, session_instance): dbx = Dropbox(oauth2_access_token=ACCESS_TOKEN, session=session_instance) diff --git a/tox.ini b/tox.ini index 472327b9..203030f2 100644 --- a/tox.ini +++ b/tox.ini @@ -27,6 +27,7 @@ passenv = DROPBOX_TEAM_TOKEN DROPBOX_TOKEN DROPBOX_WEB_HOST + DROPBOX_SHARED_LINK deps = pip From f17bc1404c9b9dde93f5f55afc9aab031f664fe7 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Thu, 29 Jul 2021 13:27:55 -0400 Subject: [PATCH 48/90] Automated Spec Update (#376) cd86d1f4e456af1e6730ecaf079e9dbdeb72be04 Change Notes: Team Log Generated Namespace: - Update Comments Co-authored-by: DropboxBot --- dropbox/team_log.py | 32 ++++++++++++++++---------------- spec | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 4645200a..64cb0140 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -3534,7 +3534,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): class ChangeLinkExpirationPolicy(bb.Union): """ Policy for deciding whether the team's default expiration days policy must - be enforced when an externally shared is updated + be enforced when an externally shared link is updated This class acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the associated value of a tag (if one exists), use the @@ -22459,15 +22459,15 @@ class EventType(bb.Union): whether team members can join shared folders owned outside team :ivar SharingChangeLinkAllowChangeExpirationPolicyType EventType.sharing_change_link_allow_change_expiration_policy: - (team_policies) Changed the password requirement for the links shared - outside of the team + (team_policies) Changed the allow remove or change expiration policy for + the links shared outside of the team :ivar SharingChangeLinkDefaultExpirationPolicyType EventType.sharing_change_link_default_expiration_policy: (team_policies) Changed the default expiration for the links shared outside of the team :ivar SharingChangeLinkEnforcePasswordPolicyType EventType.sharing_change_link_enforce_password_policy: (team_policies) - Changed the allow remove or change expiration policy for the links - shared outside of the team + Changed the password requirement for the links shared outside of the + team :ivar SharingChangeLinkPolicyType EventType.sharing_change_link_policy: (team_policies) Changed whether members can share links outside team, and if links are accessible only by team members or anyone by default @@ -36491,8 +36491,8 @@ def get_sharing_change_folder_join_policy(self): def get_sharing_change_link_allow_change_expiration_policy(self): """ - (team_policies) Changed the password requirement for the links shared - outside of the team + (team_policies) Changed the allow remove or change expiration policy for + the links shared outside of the team Only call this if :meth:`is_sharing_change_link_allow_change_expiration_policy` is true. @@ -36517,8 +36517,8 @@ def get_sharing_change_link_default_expiration_policy(self): def get_sharing_change_link_enforce_password_policy(self): """ - (team_policies) Changed the allow remove or change expiration policy for - the links shared outside of the team + (team_policies) Changed the password requirement for the links shared + outside of the team Only call this if :meth:`is_sharing_change_link_enforce_password_policy` is true. @@ -38149,14 +38149,14 @@ class EventTypeArg(bb.Union): owned outside team :ivar team_log.EventTypeArg.sharing_change_link_allow_change_expiration_policy: - (team_policies) Changed the password requirement for the links shared - outside of the team + (team_policies) Changed the allow remove or change expiration policy for + the links shared outside of the team :ivar team_log.EventTypeArg.sharing_change_link_default_expiration_policy: (team_policies) Changed the default expiration for the links shared outside of the team :ivar team_log.EventTypeArg.sharing_change_link_enforce_password_policy: - (team_policies) Changed the allow remove or change expiration policy for - the links shared outside of the team + (team_policies) Changed the password requirement for the links shared + outside of the team :ivar team_log.EventTypeArg.sharing_change_link_policy: (team_policies) Changed whether members can share links outside team, and if links are accessible only by team members or anyone by default @@ -62959,7 +62959,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): class SharingChangeLinkAllowChangeExpirationPolicyDetails(bb.Struct): """ - Changed the password requirement for the links shared outside of the team. + Changed the allow remove or change expiration policy for the links shared + outside of the team. :ivar team_log.SharingChangeLinkAllowChangeExpirationPolicyDetails.new_value: @@ -63082,8 +63083,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): class SharingChangeLinkEnforcePasswordPolicyDetails(bb.Struct): """ - Changed the allow remove or change expiration policy for the links shared - outside of the team. + Changed the password requirement for the links shared outside of the team. :ivar team_log.SharingChangeLinkEnforcePasswordPolicyDetails.new_value: To. :ivar team_log.SharingChangeLinkEnforcePasswordPolicyDetails.previous_value: diff --git a/spec b/spec index b343fc63..cd86d1f4 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit b343fc634be6702d3e58c2eaaf6cb622e8642512 +Subproject commit cd86d1f4e456af1e6730ecaf079e9dbdeb72be04 From 17a4f59fe8ea2c01fc8928cce02b0585671fc974 Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Mon, 2 Aug 2021 13:08:49 -0700 Subject: [PATCH 49/90] Add integration tests to the test suite (#377) * Add integration tests to the test suite --- .github/workflows/ci.yml | 45 ++++++++++++++++++- .github/workflows/coverage.yml | 38 ++++++++++++++++ test/integration/test_dropbox.py | 74 ++++++++++++++++++++++++-------- 3 files changed, 138 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00cd7197..d61f4ec1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,4 +58,47 @@ jobs: - name: Test Dist Generation run: | python setup.py sdist bdist_wheel - twine check dist/* \ No newline at end of file + twine check dist/* + Integration: + continue-on-error: true + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, windows-latest] + python-version: [2.7, 3.5, 3.6, 3.7, 3.8, pypy2, pypy3] + exclude: + - os: windows-latest + python-version: 3.6 + include: + - os: linux + python-version: 3.4 + steps: + - uses: actions/checkout@v2.3.4 + - name: Setup Python environment + uses: actions/setup-python@v2.2.2 + with: + python-version: ${{ matrix.python-version }} + - name: Install Requirements + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + pip install -r requirements.txt + pip install -r test/requirements.txt + python setup.py install + - name: Run Integration Tests + env: + LEGACY_USER_DROPBOX_TOKEN: ${{ secrets.LEGACY_USER_DROPBOX_TOKEN }} + LEGACY_USER_CLIENT_ID: ${{ secrets.LEGACY_USER_CLIENT_ID }} + LEGACY_USER_CLIENT_SECRET: ${{ secrets.LEGACY_USER_CLIENT_SECRET }} + LEGACY_USER_REFRESH_TOKEN: ${{ secrets.LEGACY_USER_REFRESH_TOKEN }} + SCOPED_USER_DROPBOX_TOKEN: ${{ secrets.SCOPED_USER_DROPBOX_TOKEN }} + SCOPED_USER_CLIENT_ID: ${{ secrets.SCOPED_USER_CLIENT_ID }} + SCOPED_USER_CLIENT_SECRET: ${{ secrets.SCOPED_USER_CLIENT_SECRET }} + SCOPED_USER_REFRESH_TOKEN: ${{ secrets.SCOPED_USER_REFRESH_TOKEN }} + SCOPED_TEAM_DROPBOX_TOKEN: ${{ secrets.SCOPED_TEAM_DROPBOX_TOKEN }} + SCOPED_TEAM_CLIENT_ID: ${{ secrets.SCOPED_TEAM_CLIENT_ID }} + SCOPED_TEAM_CLIENT_SECRET: ${{ secrets.SCOPED_TEAM_CLIENT_SECRET }} + SCOPED_TEAM_REFRESH_TOKEN: ${{ secrets.SCOPED_TEAM_REFRESH_TOKEN }} + DROPBOX_SHARED_LINK: ${{ secrets.DROPBOX_SHARED_LINK }} + run: | + pytest test/integration/test_dropbox.py \ No newline at end of file diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 28e1f52e..87cf19d1 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -31,4 +31,42 @@ jobs: uses: codecov/codecov-action@v1.3.2 with: flags: unit + fail_ci_if_error: true + IntegrationCoverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup Python environment + uses: actions/setup-python@v2.2.2 + with: + python-version: '3.7' + - name: Install Requirements + run: | + python -m pip install --upgrade pip + pip install coverage pytest + pip install -r requirements.txt + pip install -r test/requirements.txt + python setup.py install + - name: Generate Unit Test Coverage + env: + LEGACY_USER_DROPBOX_TOKEN: ${{ secrets.LEGACY_USER_DROPBOX_TOKEN }} + LEGACY_USER_CLIENT_ID: ${{ secrets.LEGACY_USER_CLIENT_ID }} + LEGACY_USER_CLIENT_SECRET: ${{ secrets.LEGACY_USER_CLIENT_SECRET }} + LEGACY_USER_REFRESH_TOKEN: ${{ secrets.LEGACY_USER_REFRESH_TOKEN }} + SCOPED_USER_DROPBOX_TOKEN: ${{ secrets.SCOPED_USER_DROPBOX_TOKEN }} + SCOPED_USER_CLIENT_ID: ${{ secrets.SCOPED_USER_CLIENT_ID }} + SCOPED_USER_CLIENT_SECRET: ${{ secrets.SCOPED_USER_CLIENT_SECRET }} + SCOPED_USER_REFRESH_TOKEN: ${{ secrets.SCOPED_USER_REFRESH_TOKEN }} + SCOPED_TEAM_DROPBOX_TOKEN: ${{ secrets.SCOPED_TEAM_DROPBOX_TOKEN }} + SCOPED_TEAM_CLIENT_ID: ${{ secrets.SCOPED_TEAM_CLIENT_ID }} + SCOPED_TEAM_CLIENT_SECRET: ${{ secrets.SCOPED_TEAM_CLIENT_SECRET }} + SCOPED_TEAM_REFRESH_TOKEN: ${{ secrets.SCOPED_TEAM_REFRESH_TOKEN }} + DROPBOX_SHARED_LINK: ${{ secrets.DROPBOX_SHARED_LINK }} + run: | + coverage run --rcfile=.coveragerc -m pytest test/integration/test_dropbox.py + coverage xml + - name: Publish Coverage + uses: codecov/codecov-action@v1.3.2 + with: + flags: integration fail_ci_if_error: true \ No newline at end of file diff --git a/test/integration/test_dropbox.py b/test/integration/test_dropbox.py index 9920b1d5..a7824e6e 100644 --- a/test/integration/test_dropbox.py +++ b/test/integration/test_dropbox.py @@ -40,7 +40,24 @@ PathRoot_validator, ) -def _value_from_env_or_die(env_name='DROPBOX_TOKEN'): +# Key Types +REFRESH_TOKEN_KEY = "REFRESH_TOKEN" +ACCESS_TOKEN_KEY = "DROPBOX_TOKEN" +CLIENT_ID_KEY = "CLIENT_ID" +CLIENT_SECRET_KEY = "CLIENT_SECRET" +# App Types +SCOPED_KEY = "SCOPED" +LEGACY_KEY = "LEGACY" +# User Types +USER_KEY = "USER" +TEAM_KEY = "TEAM" +# Misc types +SHARED_LINK_KEY = "DROPBOX_SHARED_LINK" + +def format_env_name(app_type=SCOPED_KEY, user_type=USER_KEY, key_type=ACCESS_TOKEN_KEY): + return '{}_{}_{}'.format(app_type, user_type, key_type) + +def _value_from_env_or_die(env_name): value = os.environ.get(env_name) if value is None: print('Set {} environment variable to a valid value.'.format(env_name), @@ -51,35 +68,36 @@ def _value_from_env_or_die(env_name='DROPBOX_TOKEN'): @pytest.fixture() def dbx_from_env(): - oauth2_token = _value_from_env_or_die() + oauth2_token = _value_from_env_or_die(format_env_name()) return Dropbox(oauth2_token) @pytest.fixture() def refresh_dbx_from_env(): - refresh_token = _value_from_env_or_die("DROPBOX_REFRESH_TOKEN") - app_key = _value_from_env_or_die("DROPBOX_APP_KEY") - app_secret = _value_from_env_or_die("DROPBOX_APP_SECRET") + refresh_token = _value_from_env_or_die(format_env_name(SCOPED_KEY, USER_KEY, REFRESH_TOKEN_KEY)) + app_key = _value_from_env_or_die(format_env_name(SCOPED_KEY, USER_KEY, CLIENT_ID_KEY)) + app_secret = _value_from_env_or_die(format_env_name(SCOPED_KEY, USER_KEY, CLIENT_SECRET_KEY)) return Dropbox(oauth2_refresh_token=refresh_token, app_key=app_key, app_secret=app_secret) @pytest.fixture() def dbx_team_from_env(): - team_oauth2_token = _value_from_env_or_die('DROPBOX_TEAM_TOKEN') + team_oauth2_token = _value_from_env_or_die( + format_env_name(SCOPED_KEY, TEAM_KEY, ACCESS_TOKEN_KEY)) return DropboxTeam(team_oauth2_token) @pytest.fixture() def dbx_app_auth_from_env(): - app_key = _value_from_env_or_die("DROPBOX_APP_KEY") - app_secret = _value_from_env_or_die("DROPBOX_APP_SECRET") + app_key = _value_from_env_or_die(format_env_name(SCOPED_KEY, USER_KEY, CLIENT_ID_KEY)) + app_secret = _value_from_env_or_die(format_env_name(SCOPED_KEY, USER_KEY, CLIENT_SECRET_KEY)) return Dropbox(app_key=app_key, app_secret=app_secret) @pytest.fixture() def dbx_share_url_from_env(): - return _value_from_env_or_die("DROPBOX_SHARED_LINK") + return _value_from_env_or_die(SHARED_LINK_KEY) MALFORMED_TOKEN = 'asdf' @@ -88,9 +106,31 @@ def dbx_share_url_from_env(): # Need bytes type for Python3 DUMMY_PAYLOAD = string.ascii_letters.encode('ascii') +RANDOM_FOLDER = random.sample(string.ascii_letters, 15) +TIMESTAMP = str(datetime.datetime.utcnow()) +STATIC_FILE = "/test.txt" + +@pytest.fixture(scope='module', autouse=True) +def pytest_setup(): + print("Setup") + dbx = Dropbox(_value_from_env_or_die(format_env_name())) + + try: + dbx.files_delete(STATIC_FILE) + except Exception: + print("File not found") + + try: + dbx.files_delete('/Test/%s' % TIMESTAMP) + except Exception: + print("File not found") + @pytest.mark.usefixtures( - "dbx_from_env", "refresh_dbx_from_env", "dbx_app_auth_from_env", "dbx_share_url_from_env" + "dbx_from_env", + "refresh_dbx_from_env", + "dbx_app_auth_from_env", + "dbx_share_url_from_env" ) class TestDropbox: def test_default_oauth2_urls(self): @@ -154,16 +194,15 @@ def test_rpc(self, dbx_from_env): # Test API error random_folder_path = '/' + \ - ''.join(random.sample(string.ascii_letters, 15)) + ''.join(RANDOM_FOLDER) with pytest.raises(ApiError) as cm: dbx_from_env.files_list_folder(random_folder_path) assert isinstance(cm.value.error, ListFolderError) def test_upload_download(self, dbx_from_env): # Upload file - timestamp = str(datetime.datetime.utcnow()) - random_filename = ''.join(random.sample(string.ascii_letters, 15)) - random_path = '/Test/%s/%s' % (timestamp, random_filename) + random_filename = ''.join(RANDOM_FOLDER) + random_path = '/Test/%s/%s' % (TIMESTAMP, random_filename) test_contents = DUMMY_PAYLOAD dbx_from_env.files_upload(test_contents, random_path) @@ -172,7 +211,7 @@ def test_upload_download(self, dbx_from_env): assert DUMMY_PAYLOAD == resp.content # Cleanup folder - dbx_from_env.files_delete('/Test/%s' % timestamp) + dbx_from_env.files_delete('/Test/%s' % TIMESTAMP) def test_bad_upload_types(self, dbx_from_env): with pytest.raises(TypeError): @@ -231,11 +270,10 @@ def test_path_root_err(self, dbx_from_env): def test_versioned_route(self, dbx_from_env): # Upload a test file - path = '/test.txt' - dbx_from_env.files_upload(DUMMY_PAYLOAD, path) + dbx_from_env.files_upload(DUMMY_PAYLOAD, STATIC_FILE) # Delete the file with v2 route - resp = dbx_from_env.files_delete_v2(path) + resp = dbx_from_env.files_delete_v2(STATIC_FILE) # Verify response type is of v2 route assert isinstance(resp, DeleteResult) From fb80ea33b15e0ada06bebd1059e500ab5b99ff9c Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 11 Aug 2021 18:48:18 -0400 Subject: [PATCH 50/90] Automated Spec Update (#378) e57f8a4da1b070bed3ac5d4d3ec325fcd3630686 Change Notes: sharing_files Namespace - Update Comments sharing_folders Namespace - Update Comments team_folders Namespace - Update Comments team_log_generated Namespace - Add ExternalDriveBackupPolicy union - Add ExternalDriveBackupPolicyChangedDetails and ExternalDriveBackupPolicyChangedType structs - Update EventDetails union to include external_drive_backup_policy_changed_details - Update EventType union to include external_drive_backup_policy_changed - Update EventTypeArg union to include external_drive_backup_policy_changed team_policies Namespace - Add ExternalDriveBackupPolicyState union Co-authored-by: DropboxBot --- dropbox/base.py | 8 +- dropbox/base_team.py | 11 +- dropbox/sharing.py | 11 +- dropbox/team_log.py | 216 +++++++++++++++++++++++++++++++++++++++ dropbox/team_policies.py | 62 +++++++++++ spec | 2 +- 6 files changed, 298 insertions(+), 12 deletions(-) diff --git a/dropbox/base.py b/dropbox/base.py index 82ae034b..f6b0f941 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -4668,7 +4668,8 @@ def sharing_relinquish_folder_membership(self, :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. + relinquishing membership. This must be set to false when the folder + is within a team folder or another shared folder. :rtype: :class:`dropbox.sharing.LaunchEmptyResult` :raises: :class:`.exceptions.ApiError` @@ -4758,8 +4759,9 @@ def sharing_remove_folder_member(self, :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. + Otherwise, it will be removed from their Dropbox. This must be set + to false when removing a group, or when the folder is within a team + folder or another shared folder. :rtype: :class:`dropbox.sharing.LaunchResultBase` :raises: :class:`.exceptions.ApiError` diff --git a/dropbox/base_team.py b/dropbox/base_team.py index 665f18fb..b29d4430 100644 --- a/dropbox/base_team.py +++ b/dropbox/base_team.py @@ -2332,7 +2332,8 @@ def team_team_folder_archive(self, 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. + and file members. This endpoint cannot be used for teams that have a + shared team space. Permission : Team member file access. :param bool force_async_off: Whether to force the archive to happen synchronously. @@ -2375,8 +2376,9 @@ def team_team_folder_create(self, name, sync_setting=None): """ - Creates a new, active, team folder with no members. Permission : Team - member file access. + Creates a new, active, team folder with no members. This endpoint can + only be used for teams that do not already have a shared team space. + Permission : Team member file access. :param str name: Name for the new team folder. :param Nullable[:class:`dropbox.team.SyncSettingArg`] sync_setting: The @@ -2464,7 +2466,8 @@ def team_team_folder_list_continue(self, def team_team_folder_permanently_delete(self, team_folder_id): """ - Permanently deletes an archived team folder. Permission : Team member + Permanently deletes an archived team folder. This endpoint cannot be + used for teams that have a shared team space. Permission : Team member file access. :param str team_folder_id: The ID of the team folder. diff --git a/dropbox/sharing.py b/dropbox/sharing.py index ebc01e38..240ef8cd 100644 --- a/dropbox/sharing.py +++ b/dropbox/sharing.py @@ -7034,7 +7034,8 @@ class RelinquishFolderMembershipArg(bb.Struct): :ivar sharing.RelinquishFolderMembershipArg.shared_folder_id: The ID for the shared folder. :ivar sharing.RelinquishFolderMembershipArg.leave_a_copy: Keep a copy of the - folder's contents upon relinquishing membership. + folder's contents upon relinquishing membership. This must be set to + false when the folder is within a team folder or another shared folder. """ __slots__ = [ @@ -7366,8 +7367,9 @@ class RemoveFolderMemberArg(bb.Struct): folder. :ivar sharing.RemoveFolderMemberArg.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. + mounted. Otherwise, it will be removed from their Dropbox. This must be + set to false when removing a group, or when the folder is within a team + folder or another shared folder. """ __slots__ = [ @@ -10689,7 +10691,8 @@ class UserFileMembershipInfo(UserMembershipInfo): last seen timestamp. :ivar sharing.UserFileMembershipInfo.time_last_seen: The UTC timestamp of - when the user has last seen the content, if they have. + when the user has last seen the content. Only populated if the user has + seen the content and the caller has a plan that includes viewer history. :ivar sharing.UserFileMembershipInfo.platform_type: The platform on which the user has last seen the content, or unknown. """ diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 64cb0140..106ac5e2 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -11852,6 +11852,17 @@ def extended_version_history_change_policy_details(cls, val): """ return cls('extended_version_history_change_policy_details', val) + @classmethod + def external_drive_backup_policy_changed_details(cls, val): + """ + Create an instance of this class set to the + ``external_drive_backup_policy_changed_details`` tag with value ``val``. + + :param ExternalDriveBackupPolicyChangedDetails val: + :rtype: EventDetails + """ + return cls('external_drive_backup_policy_changed_details', val) + @classmethod def file_comments_change_policy_details(cls, val): """ @@ -15952,6 +15963,14 @@ def is_extended_version_history_change_policy_details(self): """ return self._tag == 'extended_version_history_change_policy_details' + def is_external_drive_backup_policy_changed_details(self): + """ + Check if the union tag is ``external_drive_backup_policy_changed_details``. + + :rtype: bool + """ + return self._tag == 'external_drive_backup_policy_changed_details' + def is_file_comments_change_policy_details(self): """ Check if the union tag is ``file_comments_change_policy_details``. @@ -20466,6 +20485,16 @@ def get_extended_version_history_change_policy_details(self): raise AttributeError("tag 'extended_version_history_change_policy_details' not set") return self._value + def get_external_drive_backup_policy_changed_details(self): + """ + Only call this if :meth:`is_external_drive_backup_policy_changed_details` is true. + + :rtype: ExternalDriveBackupPolicyChangedDetails + """ + if not self.is_external_drive_backup_policy_changed_details(): + raise AttributeError("tag 'external_drive_backup_policy_changed_details' not set") + return self._value + def get_file_comments_change_policy_details(self): """ Only call this if :meth:`is_file_comments_change_policy_details` is true. @@ -22362,6 +22391,9 @@ class EventType(bb.Union): :ivar ExtendedVersionHistoryChangePolicyType EventType.extended_version_history_change_policy: (team_policies) Accepted/opted out of extended version history + :ivar ExternalDriveBackupPolicyChangedType + EventType.external_drive_backup_policy_changed: (team_policies) Changed + external drive backup policy for team :ivar FileCommentsChangePolicyType EventType.file_comments_change_policy: (team_policies) Enabled/disabled commenting on team files :ivar FileLockingPolicyChangedType EventType.file_locking_policy_changed: @@ -26712,6 +26744,17 @@ def extended_version_history_change_policy(cls, val): """ return cls('extended_version_history_change_policy', val) + @classmethod + def external_drive_backup_policy_changed(cls, val): + """ + Create an instance of this class set to the + ``external_drive_backup_policy_changed`` tag with value ``val``. + + :param ExternalDriveBackupPolicyChangedType val: + :rtype: EventType + """ + return cls('external_drive_backup_policy_changed', val) + @classmethod def file_comments_change_policy(cls, val): """ @@ -30789,6 +30832,14 @@ def is_extended_version_history_change_policy(self): """ return self._tag == 'extended_version_history_change_policy' + def is_external_drive_backup_policy_changed(self): + """ + Check if the union tag is ``external_drive_backup_policy_changed``. + + :rtype: bool + """ + return self._tag == 'external_drive_backup_policy_changed' + def is_file_comments_change_policy(self): """ Check if the union tag is ``file_comments_change_policy``. @@ -36084,6 +36135,18 @@ def get_extended_version_history_change_policy(self): raise AttributeError("tag 'extended_version_history_change_policy' not set") return self._value + def get_external_drive_backup_policy_changed(self): + """ + (team_policies) Changed external drive backup policy for team + + Only call this if :meth:`is_external_drive_backup_policy_changed` is true. + + :rtype: ExternalDriveBackupPolicyChangedType + """ + if not self.is_external_drive_backup_policy_changed(): + raise AttributeError("tag 'external_drive_backup_policy_changed' not set") + return self._value + def get_file_comments_change_policy(self): """ (team_policies) Enabled/disabled commenting on team files @@ -38075,6 +38138,8 @@ class EventTypeArg(bb.Union): members from EMM exception list :ivar team_log.EventTypeArg.extended_version_history_change_policy: (team_policies) Accepted/opted out of extended version history + :ivar team_log.EventTypeArg.external_drive_backup_policy_changed: + (team_policies) Changed external drive backup policy for team :ivar team_log.EventTypeArg.file_comments_change_policy: (team_policies) Enabled/disabled commenting on team files :ivar team_log.EventTypeArg.file_locking_policy_changed: (team_policies) @@ -39055,6 +39120,8 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition extended_version_history_change_policy = None # Attribute is overwritten below the class definition + external_drive_backup_policy_changed = None + # Attribute is overwritten below the class definition file_comments_change_policy = None # Attribute is overwritten below the class definition file_locking_policy_changed = None @@ -42211,6 +42278,14 @@ def is_extended_version_history_change_policy(self): """ return self._tag == 'extended_version_history_change_policy' + def is_external_drive_backup_policy_changed(self): + """ + Check if the union tag is ``external_drive_backup_policy_changed``. + + :rtype: bool + """ + return self._tag == 'external_drive_backup_policy_changed' + def is_file_comments_change_policy(self): """ Check if the union tag is ``file_comments_change_policy``. @@ -43247,6 +43322,112 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ExtendedVersionHistoryPolicy_validator = bv.Union(ExtendedVersionHistoryPolicy) +class ExternalDriveBackupPolicy(bb.Union): + """ + Policy for controlling team access to external drive backup feature + + This class acts as a tagged union. Only 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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(ExternalDriveBackupPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) + +ExternalDriveBackupPolicy_validator = bv.Union(ExternalDriveBackupPolicy) + +class ExternalDriveBackupPolicyChangedDetails(bb.Struct): + """ + Changed external drive backup policy for team. + + :ivar team_log.ExternalDriveBackupPolicyChangedDetails.new_value: New + external drive backup policy. + :ivar team_log.ExternalDriveBackupPolicyChangedDetails.previous_value: + Previous external drive backup policy. + """ + + __slots__ = [ + '_new_value_value', + '_previous_value_value', + ] + + _has_required_fields = True + + def __init__(self, + new_value=None, + previous_value=None): + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + if new_value is not None: + self.new_value = new_value + if previous_value is not None: + self.previous_value = previous_value + + # Instance attribute type: ExternalDriveBackupPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) + + # Instance attribute type: ExternalDriveBackupPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ExternalDriveBackupPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +ExternalDriveBackupPolicyChangedDetails_validator = bv.Struct(ExternalDriveBackupPolicyChangedDetails) + +class ExternalDriveBackupPolicyChangedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ExternalDriveBackupPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +ExternalDriveBackupPolicyChangedType_validator = bv.Struct(ExternalDriveBackupPolicyChangedType) + class ExternalSharingCreateReportDetails(bb.Struct): """ Created External sharing report. @@ -73212,6 +73393,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 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._external_drive_backup_policy_changed_details_validator = ExternalDriveBackupPolicyChangedDetails_validator EventDetails._file_comments_change_policy_details_validator = FileCommentsChangePolicyDetails_validator EventDetails._file_locking_policy_changed_details_validator = FileLockingPolicyChangedDetails_validator EventDetails._file_requests_change_policy_details_validator = FileRequestsChangePolicyDetails_validator @@ -73685,6 +73867,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): '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, + 'external_drive_backup_policy_changed_details': EventDetails._external_drive_backup_policy_changed_details_validator, 'file_comments_change_policy_details': EventDetails._file_comments_change_policy_details_validator, 'file_locking_policy_changed_details': EventDetails._file_locking_policy_changed_details_validator, 'file_requests_change_policy_details': EventDetails._file_requests_change_policy_details_validator, @@ -74161,6 +74344,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._emm_change_policy_validator = EmmChangePolicyType_validator EventType._emm_remove_exception_validator = EmmRemoveExceptionType_validator EventType._extended_version_history_change_policy_validator = ExtendedVersionHistoryChangePolicyType_validator +EventType._external_drive_backup_policy_changed_validator = ExternalDriveBackupPolicyChangedType_validator EventType._file_comments_change_policy_validator = FileCommentsChangePolicyType_validator EventType._file_locking_policy_changed_validator = FileLockingPolicyChangedType_validator EventType._file_requests_change_policy_validator = FileRequestsChangePolicyType_validator @@ -74633,6 +74817,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): '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, + 'external_drive_backup_policy_changed': EventType._external_drive_backup_policy_changed_validator, 'file_comments_change_policy': EventType._file_comments_change_policy_validator, 'file_locking_policy_changed': EventType._file_locking_policy_changed_validator, 'file_requests_change_policy': EventType._file_requests_change_policy_validator, @@ -75108,6 +75293,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._emm_change_policy_validator = bv.Void() EventTypeArg._emm_remove_exception_validator = bv.Void() EventTypeArg._extended_version_history_change_policy_validator = bv.Void() +EventTypeArg._external_drive_backup_policy_changed_validator = bv.Void() EventTypeArg._file_comments_change_policy_validator = bv.Void() EventTypeArg._file_locking_policy_changed_validator = bv.Void() EventTypeArg._file_requests_change_policy_validator = bv.Void() @@ -75580,6 +75766,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'emm_change_policy': EventTypeArg._emm_change_policy_validator, 'emm_remove_exception': EventTypeArg._emm_remove_exception_validator, 'extended_version_history_change_policy': EventTypeArg._extended_version_history_change_policy_validator, + 'external_drive_backup_policy_changed': EventTypeArg._external_drive_backup_policy_changed_validator, 'file_comments_change_policy': EventTypeArg._file_comments_change_policy_validator, 'file_locking_policy_changed': EventTypeArg._file_locking_policy_changed_validator, 'file_requests_change_policy': EventTypeArg._file_requests_change_policy_validator, @@ -76053,6 +76240,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.emm_change_policy = EventTypeArg('emm_change_policy') EventTypeArg.emm_remove_exception = EventTypeArg('emm_remove_exception') EventTypeArg.extended_version_history_change_policy = EventTypeArg('extended_version_history_change_policy') +EventTypeArg.external_drive_backup_policy_changed = EventTypeArg('external_drive_backup_policy_changed') EventTypeArg.file_comments_change_policy = EventTypeArg('file_comments_change_policy') EventTypeArg.file_locking_policy_changed = EventTypeArg('file_locking_policy_changed') EventTypeArg.file_requests_change_policy = EventTypeArg('file_requests_change_policy') @@ -76205,6 +76393,34 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ExtendedVersionHistoryPolicy.implicitly_unlimited = ExtendedVersionHistoryPolicy('implicitly_unlimited') ExtendedVersionHistoryPolicy.other = ExtendedVersionHistoryPolicy('other') +ExternalDriveBackupPolicy._disabled_validator = bv.Void() +ExternalDriveBackupPolicy._enabled_validator = bv.Void() +ExternalDriveBackupPolicy._other_validator = bv.Void() +ExternalDriveBackupPolicy._tagmap = { + 'disabled': ExternalDriveBackupPolicy._disabled_validator, + 'enabled': ExternalDriveBackupPolicy._enabled_validator, + 'other': ExternalDriveBackupPolicy._other_validator, +} + +ExternalDriveBackupPolicy.disabled = ExternalDriveBackupPolicy('disabled') +ExternalDriveBackupPolicy.enabled = ExternalDriveBackupPolicy('enabled') +ExternalDriveBackupPolicy.other = ExternalDriveBackupPolicy('other') + +ExternalDriveBackupPolicyChangedDetails.new_value.validator = ExternalDriveBackupPolicy_validator +ExternalDriveBackupPolicyChangedDetails.previous_value.validator = ExternalDriveBackupPolicy_validator +ExternalDriveBackupPolicyChangedDetails._all_field_names_ = set([ + 'new_value', + 'previous_value', +]) +ExternalDriveBackupPolicyChangedDetails._all_fields_ = [ + ('new_value', ExternalDriveBackupPolicyChangedDetails.new_value.validator), + ('previous_value', ExternalDriveBackupPolicyChangedDetails.previous_value.validator), +] + +ExternalDriveBackupPolicyChangedType.description.validator = bv.String() +ExternalDriveBackupPolicyChangedType._all_field_names_ = set(['description']) +ExternalDriveBackupPolicyChangedType._all_fields_ = [('description', ExternalDriveBackupPolicyChangedType.description.validator)] + ExternalSharingCreateReportDetails._all_field_names_ = set([]) ExternalSharingCreateReportDetails._all_fields_ = [] diff --git a/dropbox/team_policies.py b/dropbox/team_policies.py index 9bbac122..6ca263ad 100644 --- a/dropbox/team_policies.py +++ b/dropbox/team_policies.py @@ -175,6 +175,55 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EmmState_validator = bv.Union(EmmState) +class ExternalDriveBackupPolicyState(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_policies.ExternalDriveBackupPolicyState.disabled: External Drive + Backup feature is disabled. + :ivar team_policies.ExternalDriveBackupPolicyState.enabled: External Drive + Backup feature 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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(ExternalDriveBackupPolicyState, self)._process_custom_annotations(annotation_type, field_path, processor) + +ExternalDriveBackupPolicyState_validator = bv.Union(ExternalDriveBackupPolicyState) + class FileLockingPolicyState(bb.Union): """ This class acts as a tagged union. Only one of the ``is_*`` methods will @@ -1463,6 +1512,19 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EmmState.required = EmmState('required') EmmState.other = EmmState('other') +ExternalDriveBackupPolicyState._disabled_validator = bv.Void() +ExternalDriveBackupPolicyState._enabled_validator = bv.Void() +ExternalDriveBackupPolicyState._other_validator = bv.Void() +ExternalDriveBackupPolicyState._tagmap = { + 'disabled': ExternalDriveBackupPolicyState._disabled_validator, + 'enabled': ExternalDriveBackupPolicyState._enabled_validator, + 'other': ExternalDriveBackupPolicyState._other_validator, +} + +ExternalDriveBackupPolicyState.disabled = ExternalDriveBackupPolicyState('disabled') +ExternalDriveBackupPolicyState.enabled = ExternalDriveBackupPolicyState('enabled') +ExternalDriveBackupPolicyState.other = ExternalDriveBackupPolicyState('other') + FileLockingPolicyState._disabled_validator = bv.Void() FileLockingPolicyState._enabled_validator = bv.Void() FileLockingPolicyState._other_validator = bv.Void() diff --git a/spec b/spec index cd86d1f4..e57f8a4d 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit cd86d1f4e456af1e6730ecaf079e9dbdeb72be04 +Subproject commit e57f8a4da1b070bed3ac5d4d3ec325fcd3630686 From cc8b186752aad193cccd7c3b78bfb8dae5a42faa Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 18 Aug 2021 13:30:58 -0400 Subject: [PATCH 51/90] Automated Spec Update (#379) 837cc8789d6a620442a1b404a3cf8446979b7203 Change Notes: team_log Namespace: - Add CaptureTranscriptPolicy union - Add CaptureTranscriptPolicyChangedDetails, CaptureTranscriptPolicyChangedType struct - Update EventDetails, EventType, EventTypeArg union Co-authored-by: Scott Erickson Co-authored-by: DropboxBot Co-authored-by: Scott Erickson --- dropbox/team_log.py | 227 ++++++++++++++++++++++++++++++++++++++++++++ spec | 2 +- 2 files changed, 228 insertions(+), 1 deletion(-) diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 106ac5e2..a7e3dcbb 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -3450,6 +3450,120 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CameraUploadsPolicyChangedType_validator = bv.Struct(CameraUploadsPolicyChangedType) +class CaptureTranscriptPolicy(bb.Union): + """ + Policy for deciding whether team users can transcription in Capture + + This class acts as a tagged union. Only 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 + disabled = None + # Attribute is overwritten below the class definition + enabled = 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_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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(CaptureTranscriptPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) + +CaptureTranscriptPolicy_validator = bv.Union(CaptureTranscriptPolicy) + +class CaptureTranscriptPolicyChangedDetails(bb.Struct): + """ + Changed Capture transcription policy for team. + + :ivar team_log.CaptureTranscriptPolicyChangedDetails.new_value: To. + :ivar team_log.CaptureTranscriptPolicyChangedDetails.previous_value: From. + """ + + __slots__ = [ + '_new_value_value', + '_previous_value_value', + ] + + _has_required_fields = True + + def __init__(self, + new_value=None, + previous_value=None): + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + if new_value is not None: + self.new_value = new_value + if previous_value is not None: + self.previous_value = previous_value + + # Instance attribute type: CaptureTranscriptPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) + + # Instance attribute type: CaptureTranscriptPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(CaptureTranscriptPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +CaptureTranscriptPolicyChangedDetails_validator = bv.Struct(CaptureTranscriptPolicyChangedDetails) + +class CaptureTranscriptPolicyChangedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(CaptureTranscriptPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +CaptureTranscriptPolicyChangedType_validator = bv.Struct(CaptureTranscriptPolicyChangedType) + class Certificate(bb.Struct): """ Certificate details. @@ -11656,6 +11770,17 @@ def camera_uploads_policy_changed_details(cls, val): """ return cls('camera_uploads_policy_changed_details', val) + @classmethod + def capture_transcript_policy_changed_details(cls, val): + """ + Create an instance of this class set to the + ``capture_transcript_policy_changed_details`` tag with value ``val``. + + :param CaptureTranscriptPolicyChangedDetails val: + :rtype: EventDetails + """ + return cls('capture_transcript_policy_changed_details', val) + @classmethod def classification_change_policy_details(cls, val): """ @@ -15827,6 +15952,14 @@ def is_camera_uploads_policy_changed_details(self): """ return self._tag == 'camera_uploads_policy_changed_details' + def is_capture_transcript_policy_changed_details(self): + """ + Check if the union tag is ``capture_transcript_policy_changed_details``. + + :rtype: bool + """ + return self._tag == 'capture_transcript_policy_changed_details' + def is_classification_change_policy_details(self): """ Check if the union tag is ``classification_change_policy_details``. @@ -20315,6 +20448,16 @@ def get_camera_uploads_policy_changed_details(self): raise AttributeError("tag 'camera_uploads_policy_changed_details' not set") return self._value + def get_capture_transcript_policy_changed_details(self): + """ + Only call this if :meth:`is_capture_transcript_policy_changed_details` is true. + + :rtype: CaptureTranscriptPolicyChangedDetails + """ + if not self.is_capture_transcript_policy_changed_details(): + raise AttributeError("tag 'capture_transcript_policy_changed_details' not set") + return self._value + def get_classification_change_policy_details(self): """ Only call this if :meth:`is_classification_change_policy_details` is true. @@ -22342,6 +22485,9 @@ class EventType(bb.Union): :ivar CameraUploadsPolicyChangedType EventType.camera_uploads_policy_changed: (team_policies) Changed camera uploads setting for team + :ivar CaptureTranscriptPolicyChangedType + EventType.capture_transcript_policy_changed: (team_policies) Changed + Capture transcription policy for team :ivar ClassificationChangePolicyType EventType.classification_change_policy: (team_policies) Changed classification policy for team :ivar ComputerBackupPolicyChangedType @@ -26557,6 +26703,17 @@ def camera_uploads_policy_changed(cls, val): """ return cls('camera_uploads_policy_changed', val) + @classmethod + def capture_transcript_policy_changed(cls, val): + """ + Create an instance of this class set to the + ``capture_transcript_policy_changed`` tag with value ``val``. + + :param CaptureTranscriptPolicyChangedType val: + :rtype: EventType + """ + return cls('capture_transcript_policy_changed', val) + @classmethod def classification_change_policy(cls, val): """ @@ -30696,6 +30853,14 @@ def is_camera_uploads_policy_changed(self): """ return self._tag == 'camera_uploads_policy_changed' + def is_capture_transcript_policy_changed(self): + """ + Check if the union tag is ``capture_transcript_policy_changed``. + + :rtype: bool + """ + return self._tag == 'capture_transcript_policy_changed' + def is_classification_change_policy(self): """ Check if the union tag is ``classification_change_policy``. @@ -35924,6 +36089,18 @@ def get_camera_uploads_policy_changed(self): raise AttributeError("tag 'camera_uploads_policy_changed' not set") return self._value + def get_capture_transcript_policy_changed(self): + """ + (team_policies) Changed Capture transcription policy for team + + Only call this if :meth:`is_capture_transcript_policy_changed` is true. + + :rtype: CaptureTranscriptPolicyChangedType + """ + if not self.is_capture_transcript_policy_changed(): + raise AttributeError("tag 'capture_transcript_policy_changed' not set") + return self._value + def get_classification_change_policy(self): """ (team_policies) Changed classification policy for team @@ -38098,6 +38275,8 @@ class EventTypeArg(bb.Union): app permissions :ivar team_log.EventTypeArg.camera_uploads_policy_changed: (team_policies) Changed camera uploads setting for team + :ivar team_log.EventTypeArg.capture_transcript_policy_changed: + (team_policies) Changed Capture transcription policy for team :ivar team_log.EventTypeArg.classification_change_policy: (team_policies) Changed classification policy for team :ivar team_log.EventTypeArg.computer_backup_policy_changed: (team_policies) @@ -39086,6 +39265,8 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition camera_uploads_policy_changed = None # Attribute is overwritten below the class definition + capture_transcript_policy_changed = None + # Attribute is overwritten below the class definition classification_change_policy = None # Attribute is overwritten below the class definition computer_backup_policy_changed = None @@ -42142,6 +42323,14 @@ def is_camera_uploads_policy_changed(self): """ return self._tag == 'camera_uploads_policy_changed' + def is_capture_transcript_policy_changed(self): + """ + Check if the union tag is ``capture_transcript_policy_changed``. + + :rtype: bool + """ + return self._tag == 'capture_transcript_policy_changed' + def is_classification_change_policy(self): """ Check if the union tag is ``classification_change_policy``. @@ -72028,6 +72217,37 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CameraUploadsPolicyChangedType._all_field_names_ = set(['description']) CameraUploadsPolicyChangedType._all_fields_ = [('description', CameraUploadsPolicyChangedType.description.validator)] +CaptureTranscriptPolicy._default_validator = bv.Void() +CaptureTranscriptPolicy._disabled_validator = bv.Void() +CaptureTranscriptPolicy._enabled_validator = bv.Void() +CaptureTranscriptPolicy._other_validator = bv.Void() +CaptureTranscriptPolicy._tagmap = { + 'default': CaptureTranscriptPolicy._default_validator, + 'disabled': CaptureTranscriptPolicy._disabled_validator, + 'enabled': CaptureTranscriptPolicy._enabled_validator, + 'other': CaptureTranscriptPolicy._other_validator, +} + +CaptureTranscriptPolicy.default = CaptureTranscriptPolicy('default') +CaptureTranscriptPolicy.disabled = CaptureTranscriptPolicy('disabled') +CaptureTranscriptPolicy.enabled = CaptureTranscriptPolicy('enabled') +CaptureTranscriptPolicy.other = CaptureTranscriptPolicy('other') + +CaptureTranscriptPolicyChangedDetails.new_value.validator = CaptureTranscriptPolicy_validator +CaptureTranscriptPolicyChangedDetails.previous_value.validator = CaptureTranscriptPolicy_validator +CaptureTranscriptPolicyChangedDetails._all_field_names_ = set([ + 'new_value', + 'previous_value', +]) +CaptureTranscriptPolicyChangedDetails._all_fields_ = [ + ('new_value', CaptureTranscriptPolicyChangedDetails.new_value.validator), + ('previous_value', CaptureTranscriptPolicyChangedDetails.previous_value.validator), +] + +CaptureTranscriptPolicyChangedType.description.validator = bv.String() +CaptureTranscriptPolicyChangedType._all_field_names_ = set(['description']) +CaptureTranscriptPolicyChangedType._all_fields_ = [('description', CaptureTranscriptPolicyChangedType.description.validator)] + Certificate.subject.validator = bv.String() Certificate.issuer.validator = bv.String() Certificate.issue_date.validator = bv.String() @@ -73376,6 +73596,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._allow_download_enabled_details_validator = AllowDownloadEnabledDetails_validator EventDetails._app_permissions_changed_details_validator = AppPermissionsChangedDetails_validator EventDetails._camera_uploads_policy_changed_details_validator = CameraUploadsPolicyChangedDetails_validator +EventDetails._capture_transcript_policy_changed_details_validator = CaptureTranscriptPolicyChangedDetails_validator EventDetails._classification_change_policy_details_validator = ClassificationChangePolicyDetails_validator EventDetails._computer_backup_policy_changed_details_validator = ComputerBackupPolicyChangedDetails_validator EventDetails._content_administration_policy_changed_details_validator = ContentAdministrationPolicyChangedDetails_validator @@ -73850,6 +74071,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'allow_download_enabled_details': EventDetails._allow_download_enabled_details_validator, 'app_permissions_changed_details': EventDetails._app_permissions_changed_details_validator, 'camera_uploads_policy_changed_details': EventDetails._camera_uploads_policy_changed_details_validator, + 'capture_transcript_policy_changed_details': EventDetails._capture_transcript_policy_changed_details_validator, 'classification_change_policy_details': EventDetails._classification_change_policy_details_validator, 'computer_backup_policy_changed_details': EventDetails._computer_backup_policy_changed_details_validator, 'content_administration_policy_changed_details': EventDetails._content_administration_policy_changed_details_validator, @@ -74327,6 +74549,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._allow_download_enabled_validator = AllowDownloadEnabledType_validator EventType._app_permissions_changed_validator = AppPermissionsChangedType_validator EventType._camera_uploads_policy_changed_validator = CameraUploadsPolicyChangedType_validator +EventType._capture_transcript_policy_changed_validator = CaptureTranscriptPolicyChangedType_validator EventType._classification_change_policy_validator = ClassificationChangePolicyType_validator EventType._computer_backup_policy_changed_validator = ComputerBackupPolicyChangedType_validator EventType._content_administration_policy_changed_validator = ContentAdministrationPolicyChangedType_validator @@ -74800,6 +75023,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'allow_download_enabled': EventType._allow_download_enabled_validator, 'app_permissions_changed': EventType._app_permissions_changed_validator, 'camera_uploads_policy_changed': EventType._camera_uploads_policy_changed_validator, + 'capture_transcript_policy_changed': EventType._capture_transcript_policy_changed_validator, 'classification_change_policy': EventType._classification_change_policy_validator, 'computer_backup_policy_changed': EventType._computer_backup_policy_changed_validator, 'content_administration_policy_changed': EventType._content_administration_policy_changed_validator, @@ -75276,6 +75500,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._allow_download_enabled_validator = bv.Void() EventTypeArg._app_permissions_changed_validator = bv.Void() EventTypeArg._camera_uploads_policy_changed_validator = bv.Void() +EventTypeArg._capture_transcript_policy_changed_validator = bv.Void() EventTypeArg._classification_change_policy_validator = bv.Void() EventTypeArg._computer_backup_policy_changed_validator = bv.Void() EventTypeArg._content_administration_policy_changed_validator = bv.Void() @@ -75749,6 +75974,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'allow_download_enabled': EventTypeArg._allow_download_enabled_validator, 'app_permissions_changed': EventTypeArg._app_permissions_changed_validator, 'camera_uploads_policy_changed': EventTypeArg._camera_uploads_policy_changed_validator, + 'capture_transcript_policy_changed': EventTypeArg._capture_transcript_policy_changed_validator, 'classification_change_policy': EventTypeArg._classification_change_policy_validator, 'computer_backup_policy_changed': EventTypeArg._computer_backup_policy_changed_validator, 'content_administration_policy_changed': EventTypeArg._content_administration_policy_changed_validator, @@ -76223,6 +76449,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.allow_download_enabled = EventTypeArg('allow_download_enabled') EventTypeArg.app_permissions_changed = EventTypeArg('app_permissions_changed') EventTypeArg.camera_uploads_policy_changed = EventTypeArg('camera_uploads_policy_changed') +EventTypeArg.capture_transcript_policy_changed = EventTypeArg('capture_transcript_policy_changed') EventTypeArg.classification_change_policy = EventTypeArg('classification_change_policy') EventTypeArg.computer_backup_policy_changed = EventTypeArg('computer_backup_policy_changed') EventTypeArg.content_administration_policy_changed = EventTypeArg('content_administration_policy_changed') diff --git a/spec b/spec index e57f8a4d..837cc878 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit e57f8a4da1b070bed3ac5d4d3ec325fcd3630686 +Subproject commit 837cc8789d6a620442a1b404a3cf8446979b7203 From 6f03744066622dbe16bd3176d0fefb32dd03bb1a Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Thu, 26 Aug 2021 13:54:25 -0400 Subject: [PATCH 52/90] Automated Spec Update (#382) d439f00c77d82184d4d14c783166f372c8f03dd1 Change Notes: files Namespace Add api_proxy_dev_check_api_v2_service namespace Add api_proxy_dev_check_api_v2_types namespace Co-authored-by: Eugene Che Co-authored-by: DropboxBot Co-authored-by: Eugene Che --- dropbox/files.py | 23 ++++++++++++++++------- spec | 2 +- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/dropbox/files.py b/dropbox/files.py index aade9a54..d33deb7a 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -10120,10 +10120,14 @@ class WriteMode(bb.Union): :ivar files.WriteMode.overwrite: Always overwrite the existing file. The autorename strategy is the same as it is for ``add``. :ivar str files.WriteMode.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". + existing file's "rev". The supplied value should be the latest known + "rev" of the file, for example, from :type:`FileMetadata`, from when the + file was last downloaded by the app. This will cause the file on the + Dropbox servers to be overwritten if the given "rev" matches the + existing file's current "rev" on the Dropbox servers. 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 @@ -10170,9 +10174,14 @@ def is_update(self): 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". + supplied value should be the latest known "rev" of the file, for + example, from :class:`FileMetadata`, from when the file was last + downloaded by the app. This will cause the file on the Dropbox servers + to be overwritten if the given "rev" matches the existing file's current + "rev" on the Dropbox servers. 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. diff --git a/spec b/spec index 837cc878..d439f00c 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 837cc8789d6a620442a1b404a3cf8446979b7203 +Subproject commit d439f00c77d82184d4d14c783166f372c8f03dd1 From 507069790bd26ce65aa614107aa585f10d73caf0 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 8 Sep 2021 14:44:06 -0400 Subject: [PATCH 53/90] Automated Spec Update (#383) 55ae3f7008099fe4776e12265ccb9c9214305ce9 Change Notes: team_log_generated Namespace: - Add EmailIngestPolicy union - Add EmailIngestReceiveFileDetails, EmailIngestPolicyChangedDetails, EmailIngestReceiveFileType, and EmailIngestPolicyChangedType structs - Update EventDetails union to include email_ingest_receive_file_details and email_ingest_policy_changed_details - Update EventType union to include email_ingest_receive_file and email_ingest_policy_changed - Update EventTypeArg to include email_ingest_receive_file and email_ingest_policy_changed Co-authored-by: Brent Bumann Co-authored-by: DropboxBot Co-authored-by: Brent Bumann --- dropbox/team_log.py | 408 ++++++++++++++++++++++++++++++++++++++++++++ spec | 2 +- 2 files changed, 409 insertions(+), 1 deletion(-) diff --git a/dropbox/team_log.py b/dropbox/team_log.py index a7e3dcbb..724fff5c 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -6998,6 +6998,200 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DurationLogInfo_validator = bv.Struct(DurationLogInfo) +class EmailIngestPolicy(bb.Union): + """ + Email ingest 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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(EmailIngestPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) + +EmailIngestPolicy_validator = bv.Union(EmailIngestPolicy) + +class EmailIngestPolicyChangedDetails(bb.Struct): + """ + Changed email to my dropbox policy for team. + + :ivar team_log.EmailIngestPolicyChangedDetails.new_value: New email to my + dropbox policy. + :ivar team_log.EmailIngestPolicyChangedDetails.previous_value: Previous + email to my dropbox policy. + """ + + __slots__ = [ + '_new_value_value', + '_previous_value_value', + ] + + _has_required_fields = True + + def __init__(self, + new_value=None, + previous_value=None): + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + if new_value is not None: + self.new_value = new_value + if previous_value is not None: + self.previous_value = previous_value + + # Instance attribute type: EmailIngestPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) + + # Instance attribute type: EmailIngestPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(EmailIngestPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +EmailIngestPolicyChangedDetails_validator = bv.Struct(EmailIngestPolicyChangedDetails) + +class EmailIngestPolicyChangedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(EmailIngestPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +EmailIngestPolicyChangedType_validator = bv.Struct(EmailIngestPolicyChangedType) + +class EmailIngestReceiveFileDetails(bb.Struct): + """ + Received files via Email to my Dropbox. + + :ivar team_log.EmailIngestReceiveFileDetails.inbox_name: Inbox name. + :ivar team_log.EmailIngestReceiveFileDetails.attachment_names: Submitted + file names. + :ivar team_log.EmailIngestReceiveFileDetails.subject: Subject of the email. + :ivar team_log.EmailIngestReceiveFileDetails.from_name: The name as provided + by the submitter. + :ivar team_log.EmailIngestReceiveFileDetails.from_email: The email as + provided by the submitter. + """ + + __slots__ = [ + '_inbox_name_value', + '_attachment_names_value', + '_subject_value', + '_from_name_value', + '_from_email_value', + ] + + _has_required_fields = True + + def __init__(self, + inbox_name=None, + attachment_names=None, + subject=None, + from_name=None, + from_email=None): + self._inbox_name_value = bb.NOT_SET + self._attachment_names_value = bb.NOT_SET + self._subject_value = bb.NOT_SET + self._from_name_value = bb.NOT_SET + self._from_email_value = bb.NOT_SET + if inbox_name is not None: + self.inbox_name = inbox_name + if attachment_names is not None: + self.attachment_names = attachment_names + if subject is not None: + self.subject = subject + if from_name is not None: + self.from_name = from_name + if from_email is not None: + self.from_email = from_email + + # Instance attribute type: str (validator is set below) + inbox_name = bb.Attribute("inbox_name") + + # Instance attribute type: list of [str] (validator is set below) + attachment_names = bb.Attribute("attachment_names") + + # Instance attribute type: str (validator is set below) + subject = bb.Attribute("subject", nullable=True) + + # Instance attribute type: str (validator is set below) + from_name = bb.Attribute("from_name", nullable=True) + + # Instance attribute type: str (validator is set below) + from_email = bb.Attribute("from_email", nullable=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(EmailIngestReceiveFileDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +EmailIngestReceiveFileDetails_validator = bv.Struct(EmailIngestReceiveFileDetails) + +class EmailIngestReceiveFileType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(EmailIngestReceiveFileType, self)._process_custom_annotations(annotation_type, field_path, processor) + +EmailIngestReceiveFileType_validator = bv.Struct(EmailIngestReceiveFileType) + class EmmAddExceptionDetails(bb.Struct): """ Added members to EMM exception list. @@ -8949,6 +9143,17 @@ def user_tags_removed_details(cls, val): """ return cls('user_tags_removed_details', val) + @classmethod + def email_ingest_receive_file_details(cls, val): + """ + Create an instance of this class set to the + ``email_ingest_receive_file_details`` tag with value ``val``. + + :param EmailIngestReceiveFileDetails val: + :rtype: EventDetails + """ + return cls('email_ingest_receive_file_details', val) + @classmethod def file_request_change_details(cls, val): """ @@ -11932,6 +12137,17 @@ def directory_restrictions_remove_members_details(cls, val): """ return cls('directory_restrictions_remove_members_details', val) + @classmethod + def email_ingest_policy_changed_details(cls, val): + """ + Create an instance of this class set to the + ``email_ingest_policy_changed_details`` tag with value ``val``. + + :param EmailIngestPolicyChangedDetails val: + :rtype: EventDetails + """ + return cls('email_ingest_policy_changed_details', val) + @classmethod def emm_add_exception_details(cls, val): """ @@ -13912,6 +14128,14 @@ def is_user_tags_removed_details(self): """ return self._tag == 'user_tags_removed_details' + def is_email_ingest_receive_file_details(self): + """ + Check if the union tag is ``email_ingest_receive_file_details``. + + :rtype: bool + """ + return self._tag == 'email_ingest_receive_file_details' + def is_file_request_change_details(self): """ Check if the union tag is ``file_request_change_details``. @@ -16064,6 +16288,14 @@ def is_directory_restrictions_remove_members_details(self): """ return self._tag == 'directory_restrictions_remove_members_details' + def is_email_ingest_policy_changed_details(self): + """ + Check if the union tag is ``email_ingest_policy_changed_details``. + + :rtype: bool + """ + return self._tag == 'email_ingest_policy_changed_details' + def is_emm_add_exception_details(self): """ Check if the union tag is ``emm_add_exception_details``. @@ -17898,6 +18130,16 @@ def get_user_tags_removed_details(self): raise AttributeError("tag 'user_tags_removed_details' not set") return self._value + def get_email_ingest_receive_file_details(self): + """ + Only call this if :meth:`is_email_ingest_receive_file_details` is true. + + :rtype: EmailIngestReceiveFileDetails + """ + if not self.is_email_ingest_receive_file_details(): + raise AttributeError("tag 'email_ingest_receive_file_details' not set") + return self._value + def get_file_request_change_details(self): """ Only call this if :meth:`is_file_request_change_details` is true. @@ -20588,6 +20830,16 @@ def get_directory_restrictions_remove_members_details(self): raise AttributeError("tag 'directory_restrictions_remove_members_details' not set") return self._value + def get_email_ingest_policy_changed_details(self): + """ + Only call this if :meth:`is_email_ingest_policy_changed_details` is true. + + :rtype: EmailIngestPolicyChangedDetails + """ + if not self.is_email_ingest_policy_changed_details(): + raise AttributeError("tag 'email_ingest_policy_changed_details' not set") + return self._value + def get_emm_add_exception_details(self): """ Only call this if :meth:`is_emm_add_exception_details` is true. @@ -21900,6 +22152,8 @@ class EventType(bb.Union): a file :ivar UserTagsRemovedType EventType.user_tags_removed: (file_operations) Removed tags + :ivar EmailIngestReceiveFileType EventType.email_ingest_receive_file: + (file_requests) Received files via Email to my Dropbox :ivar FileRequestChangeType EventType.file_request_change: (file_requests) Changed file request :ivar FileRequestCloseType EventType.file_request_close: (file_requests) @@ -22528,6 +22782,8 @@ class EventType(bb.Union): :ivar DirectoryRestrictionsRemoveMembersType EventType.directory_restrictions_remove_members: (team_policies) Removed members from directory restrictions list + :ivar EmailIngestPolicyChangedType EventType.email_ingest_policy_changed: + (team_policies) Changed email to my dropbox policy for team :ivar EmmAddExceptionType EventType.emm_add_exception: (team_policies) Added members to EMM exception list :ivar EmmChangePolicyType EventType.emm_change_policy: (team_policies) @@ -23896,6 +24152,17 @@ def user_tags_removed(cls, val): """ return cls('user_tags_removed', val) + @classmethod + def email_ingest_receive_file(cls, val): + """ + Create an instance of this class set to the + ``email_ingest_receive_file`` tag with value ``val``. + + :param EmailIngestReceiveFileType val: + :rtype: EventType + """ + return cls('email_ingest_receive_file', val) + @classmethod def file_request_change(cls, val): """ @@ -26857,6 +27124,17 @@ def directory_restrictions_remove_members(cls, val): """ return cls('directory_restrictions_remove_members', val) + @classmethod + def email_ingest_policy_changed(cls, val): + """ + Create an instance of this class set to the + ``email_ingest_policy_changed`` tag with value ``val``. + + :param EmailIngestPolicyChangedType val: + :rtype: EventType + """ + return cls('email_ingest_policy_changed', val) + @classmethod def emm_add_exception(cls, val): """ @@ -28813,6 +29091,14 @@ def is_user_tags_removed(self): """ return self._tag == 'user_tags_removed' + def is_email_ingest_receive_file(self): + """ + Check if the union tag is ``email_ingest_receive_file``. + + :rtype: bool + """ + return self._tag == 'email_ingest_receive_file' + def is_file_request_change(self): """ Check if the union tag is ``file_request_change``. @@ -30965,6 +31251,14 @@ def is_directory_restrictions_remove_members(self): """ return self._tag == 'directory_restrictions_remove_members' + def is_email_ingest_policy_changed(self): + """ + Check if the union tag is ``email_ingest_policy_changed``. + + :rtype: bool + """ + return self._tag == 'email_ingest_policy_changed' + def is_emm_add_exception(self): """ Check if the union tag is ``emm_add_exception``. @@ -32990,6 +33284,18 @@ def get_user_tags_removed(self): raise AttributeError("tag 'user_tags_removed' not set") return self._value + def get_email_ingest_receive_file(self): + """ + (file_requests) Received files via Email to my Dropbox + + Only call this if :meth:`is_email_ingest_receive_file` is true. + + :rtype: EmailIngestReceiveFileType + """ + if not self.is_email_ingest_receive_file(): + raise AttributeError("tag 'email_ingest_receive_file' not set") + return self._value + def get_file_request_change(self): """ (file_requests) Changed file request @@ -36263,6 +36569,18 @@ def get_directory_restrictions_remove_members(self): raise AttributeError("tag 'directory_restrictions_remove_members' not set") return self._value + def get_email_ingest_policy_changed(self): + """ + (team_policies) Changed email to my dropbox policy for team + + Only call this if :meth:`is_email_ingest_policy_changed` is true. + + :rtype: EmailIngestPolicyChangedType + """ + if not self.is_email_ingest_policy_changed(): + raise AttributeError("tag 'email_ingest_policy_changed' not set") + return self._value + def get_emm_add_exception(self): """ (team_policies) Added members to EMM exception list @@ -37769,6 +38087,8 @@ class EventTypeArg(bb.Union): :ivar team_log.EventTypeArg.user_tags_added: (file_operations) Tagged a file :ivar team_log.EventTypeArg.user_tags_removed: (file_operations) Removed tags + :ivar team_log.EventTypeArg.email_ingest_receive_file: (file_requests) + Received files via Email to my Dropbox :ivar team_log.EventTypeArg.file_request_change: (file_requests) Changed file request :ivar team_log.EventTypeArg.file_request_close: (file_requests) Closed file @@ -38309,6 +38629,8 @@ class EventTypeArg(bb.Union): (team_policies) Added members to directory restrictions list :ivar team_log.EventTypeArg.directory_restrictions_remove_members: (team_policies) Removed members from directory restrictions list + :ivar team_log.EventTypeArg.email_ingest_policy_changed: (team_policies) + Changed email to my dropbox policy for team :ivar team_log.EventTypeArg.emm_add_exception: (team_policies) Added members to EMM exception list :ivar team_log.EventTypeArg.emm_change_policy: (team_policies) @@ -38755,6 +39077,8 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition user_tags_removed = None # Attribute is overwritten below the class definition + email_ingest_receive_file = None + # Attribute is overwritten below the class definition file_request_change = None # Attribute is overwritten below the class definition file_request_close = None @@ -39293,6 +39617,8 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition directory_restrictions_remove_members = None # Attribute is overwritten below the class definition + email_ingest_policy_changed = None + # Attribute is overwritten below the class definition emm_add_exception = None # Attribute is overwritten below the class definition emm_change_policy = None @@ -40283,6 +40609,14 @@ def is_user_tags_removed(self): """ return self._tag == 'user_tags_removed' + def is_email_ingest_receive_file(self): + """ + Check if the union tag is ``email_ingest_receive_file``. + + :rtype: bool + """ + return self._tag == 'email_ingest_receive_file' + def is_file_request_change(self): """ Check if the union tag is ``file_request_change``. @@ -42435,6 +42769,14 @@ def is_directory_restrictions_remove_members(self): """ return self._tag == 'directory_restrictions_remove_members' + def is_email_ingest_policy_changed(self): + """ + Check if the union tag is ``email_ingest_policy_changed``. + + :rtype: bool + """ + return self._tag == 'email_ingest_policy_changed' + def is_emm_add_exception(self): """ Check if the union tag is ``emm_add_exception``. @@ -73057,6 +73399,58 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('amount', DurationLogInfo.amount.validator), ] +EmailIngestPolicy._disabled_validator = bv.Void() +EmailIngestPolicy._enabled_validator = bv.Void() +EmailIngestPolicy._other_validator = bv.Void() +EmailIngestPolicy._tagmap = { + 'disabled': EmailIngestPolicy._disabled_validator, + 'enabled': EmailIngestPolicy._enabled_validator, + 'other': EmailIngestPolicy._other_validator, +} + +EmailIngestPolicy.disabled = EmailIngestPolicy('disabled') +EmailIngestPolicy.enabled = EmailIngestPolicy('enabled') +EmailIngestPolicy.other = EmailIngestPolicy('other') + +EmailIngestPolicyChangedDetails.new_value.validator = EmailIngestPolicy_validator +EmailIngestPolicyChangedDetails.previous_value.validator = EmailIngestPolicy_validator +EmailIngestPolicyChangedDetails._all_field_names_ = set([ + 'new_value', + 'previous_value', +]) +EmailIngestPolicyChangedDetails._all_fields_ = [ + ('new_value', EmailIngestPolicyChangedDetails.new_value.validator), + ('previous_value', EmailIngestPolicyChangedDetails.previous_value.validator), +] + +EmailIngestPolicyChangedType.description.validator = bv.String() +EmailIngestPolicyChangedType._all_field_names_ = set(['description']) +EmailIngestPolicyChangedType._all_fields_ = [('description', EmailIngestPolicyChangedType.description.validator)] + +EmailIngestReceiveFileDetails.inbox_name.validator = bv.String() +EmailIngestReceiveFileDetails.attachment_names.validator = bv.List(bv.String()) +EmailIngestReceiveFileDetails.subject.validator = bv.Nullable(bv.String()) +EmailIngestReceiveFileDetails.from_name.validator = bv.Nullable(common.DisplayNameLegacy_validator) +EmailIngestReceiveFileDetails.from_email.validator = bv.Nullable(EmailAddress_validator) +EmailIngestReceiveFileDetails._all_field_names_ = set([ + 'inbox_name', + 'attachment_names', + 'subject', + 'from_name', + 'from_email', +]) +EmailIngestReceiveFileDetails._all_fields_ = [ + ('inbox_name', EmailIngestReceiveFileDetails.inbox_name.validator), + ('attachment_names', EmailIngestReceiveFileDetails.attachment_names.validator), + ('subject', EmailIngestReceiveFileDetails.subject.validator), + ('from_name', EmailIngestReceiveFileDetails.from_name.validator), + ('from_email', EmailIngestReceiveFileDetails.from_email.validator), +] + +EmailIngestReceiveFileType.description.validator = bv.String() +EmailIngestReceiveFileType._all_field_names_ = set(['description']) +EmailIngestReceiveFileType._all_fields_ = [('description', EmailIngestReceiveFileType.description.validator)] + EmmAddExceptionDetails._all_field_names_ = set([]) EmmAddExceptionDetails._all_fields_ = [] @@ -73341,6 +73735,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._rewind_folder_details_validator = RewindFolderDetails_validator EventDetails._user_tags_added_details_validator = UserTagsAddedDetails_validator EventDetails._user_tags_removed_details_validator = UserTagsRemovedDetails_validator +EventDetails._email_ingest_receive_file_details_validator = EmailIngestReceiveFileDetails_validator EventDetails._file_request_change_details_validator = FileRequestChangeDetails_validator EventDetails._file_request_close_details_validator = FileRequestCloseDetails_validator EventDetails._file_request_create_details_validator = FileRequestCreateDetails_validator @@ -73610,6 +74005,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._device_approvals_remove_exception_details_validator = DeviceApprovalsRemoveExceptionDetails_validator EventDetails._directory_restrictions_add_members_details_validator = DirectoryRestrictionsAddMembersDetails_validator EventDetails._directory_restrictions_remove_members_details_validator = DirectoryRestrictionsRemoveMembersDetails_validator +EventDetails._email_ingest_policy_changed_details_validator = EmailIngestPolicyChangedDetails_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 @@ -73816,6 +74212,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'rewind_folder_details': EventDetails._rewind_folder_details_validator, 'user_tags_added_details': EventDetails._user_tags_added_details_validator, 'user_tags_removed_details': EventDetails._user_tags_removed_details_validator, + 'email_ingest_receive_file_details': EventDetails._email_ingest_receive_file_details_validator, 'file_request_change_details': EventDetails._file_request_change_details_validator, 'file_request_close_details': EventDetails._file_request_close_details_validator, 'file_request_create_details': EventDetails._file_request_create_details_validator, @@ -74085,6 +74482,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'device_approvals_remove_exception_details': EventDetails._device_approvals_remove_exception_details_validator, 'directory_restrictions_add_members_details': EventDetails._directory_restrictions_add_members_details_validator, 'directory_restrictions_remove_members_details': EventDetails._directory_restrictions_remove_members_details_validator, + 'email_ingest_policy_changed_details': EventDetails._email_ingest_policy_changed_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, @@ -74294,6 +74692,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._rewind_folder_validator = RewindFolderType_validator EventType._user_tags_added_validator = UserTagsAddedType_validator EventType._user_tags_removed_validator = UserTagsRemovedType_validator +EventType._email_ingest_receive_file_validator = EmailIngestReceiveFileType_validator EventType._file_request_change_validator = FileRequestChangeType_validator EventType._file_request_close_validator = FileRequestCloseType_validator EventType._file_request_create_validator = FileRequestCreateType_validator @@ -74563,6 +74962,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._device_approvals_remove_exception_validator = DeviceApprovalsRemoveExceptionType_validator EventType._directory_restrictions_add_members_validator = DirectoryRestrictionsAddMembersType_validator EventType._directory_restrictions_remove_members_validator = DirectoryRestrictionsRemoveMembersType_validator +EventType._email_ingest_policy_changed_validator = EmailIngestPolicyChangedType_validator EventType._emm_add_exception_validator = EmmAddExceptionType_validator EventType._emm_change_policy_validator = EmmChangePolicyType_validator EventType._emm_remove_exception_validator = EmmRemoveExceptionType_validator @@ -74768,6 +75168,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'rewind_folder': EventType._rewind_folder_validator, 'user_tags_added': EventType._user_tags_added_validator, 'user_tags_removed': EventType._user_tags_removed_validator, + 'email_ingest_receive_file': EventType._email_ingest_receive_file_validator, 'file_request_change': EventType._file_request_change_validator, 'file_request_close': EventType._file_request_close_validator, 'file_request_create': EventType._file_request_create_validator, @@ -75037,6 +75438,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'device_approvals_remove_exception': EventType._device_approvals_remove_exception_validator, 'directory_restrictions_add_members': EventType._directory_restrictions_add_members_validator, 'directory_restrictions_remove_members': EventType._directory_restrictions_remove_members_validator, + 'email_ingest_policy_changed': EventType._email_ingest_policy_changed_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, @@ -75245,6 +75647,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._rewind_folder_validator = bv.Void() EventTypeArg._user_tags_added_validator = bv.Void() EventTypeArg._user_tags_removed_validator = bv.Void() +EventTypeArg._email_ingest_receive_file_validator = bv.Void() EventTypeArg._file_request_change_validator = bv.Void() EventTypeArg._file_request_close_validator = bv.Void() EventTypeArg._file_request_create_validator = bv.Void() @@ -75514,6 +75917,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._device_approvals_remove_exception_validator = bv.Void() EventTypeArg._directory_restrictions_add_members_validator = bv.Void() EventTypeArg._directory_restrictions_remove_members_validator = bv.Void() +EventTypeArg._email_ingest_policy_changed_validator = bv.Void() EventTypeArg._emm_add_exception_validator = bv.Void() EventTypeArg._emm_change_policy_validator = bv.Void() EventTypeArg._emm_remove_exception_validator = bv.Void() @@ -75719,6 +76123,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'rewind_folder': EventTypeArg._rewind_folder_validator, 'user_tags_added': EventTypeArg._user_tags_added_validator, 'user_tags_removed': EventTypeArg._user_tags_removed_validator, + 'email_ingest_receive_file': EventTypeArg._email_ingest_receive_file_validator, 'file_request_change': EventTypeArg._file_request_change_validator, 'file_request_close': EventTypeArg._file_request_close_validator, 'file_request_create': EventTypeArg._file_request_create_validator, @@ -75988,6 +76393,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'device_approvals_remove_exception': EventTypeArg._device_approvals_remove_exception_validator, 'directory_restrictions_add_members': EventTypeArg._directory_restrictions_add_members_validator, 'directory_restrictions_remove_members': EventTypeArg._directory_restrictions_remove_members_validator, + 'email_ingest_policy_changed': EventTypeArg._email_ingest_policy_changed_validator, 'emm_add_exception': EventTypeArg._emm_add_exception_validator, 'emm_change_policy': EventTypeArg._emm_change_policy_validator, 'emm_remove_exception': EventTypeArg._emm_remove_exception_validator, @@ -76194,6 +76600,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.rewind_folder = EventTypeArg('rewind_folder') EventTypeArg.user_tags_added = EventTypeArg('user_tags_added') EventTypeArg.user_tags_removed = EventTypeArg('user_tags_removed') +EventTypeArg.email_ingest_receive_file = EventTypeArg('email_ingest_receive_file') EventTypeArg.file_request_change = EventTypeArg('file_request_change') EventTypeArg.file_request_close = EventTypeArg('file_request_close') EventTypeArg.file_request_create = EventTypeArg('file_request_create') @@ -76463,6 +76870,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.device_approvals_remove_exception = EventTypeArg('device_approvals_remove_exception') EventTypeArg.directory_restrictions_add_members = EventTypeArg('directory_restrictions_add_members') EventTypeArg.directory_restrictions_remove_members = EventTypeArg('directory_restrictions_remove_members') +EventTypeArg.email_ingest_policy_changed = EventTypeArg('email_ingest_policy_changed') EventTypeArg.emm_add_exception = EventTypeArg('emm_add_exception') EventTypeArg.emm_change_policy = EventTypeArg('emm_change_policy') EventTypeArg.emm_remove_exception = EventTypeArg('emm_remove_exception') diff --git a/spec b/spec index d439f00c..55ae3f70 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit d439f00c77d82184d4d14c783166f372c8f03dd1 +Subproject commit 55ae3f7008099fe4776e12265ccb9c9214305ce9 From d1fcec445221321d3cbdb5e109d329222c1e10e4 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 22 Sep 2021 18:30:23 -0400 Subject: [PATCH 54/90] Automated Spec Update (#386) 2026d2d9a589c1679f82507e4699252a2c3764ba Change Notes: team_log Namespace: - Update Comments common: - Update EmailAddress regex Co-authored-by: Scott Erickson Co-authored-by: DropboxBot Co-authored-by: Scott Erickson --- dropbox/common.py | 2 +- dropbox/team_log.py | 16 +++++++--------- spec | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/dropbox/common.py b/dropbox/common.py index 775b99ae..69b276e6 100644 --- a/dropbox/common.py +++ b/dropbox/common.py @@ -287,7 +287,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DisplayName_validator = bv.String(pattern=u'[^/:?*<>"|]*') DisplayNameLegacy_validator = bv.String() 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}$") +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'[^/:?*<>"|]*') diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 724fff5c..a83b76dc 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -7000,7 +7000,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): class EmailIngestPolicy(bb.Union): """ - Email ingest policy + Policy for deciding whether a team can use Email to my Dropbox feature This class acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the associated value of a tag (if one exists), use the @@ -7046,12 +7046,10 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): class EmailIngestPolicyChangedDetails(bb.Struct): """ - Changed email to my dropbox policy for team. + Changed email to my Dropbox policy for team. - :ivar team_log.EmailIngestPolicyChangedDetails.new_value: New email to my - dropbox policy. - :ivar team_log.EmailIngestPolicyChangedDetails.previous_value: Previous - email to my dropbox policy. + :ivar team_log.EmailIngestPolicyChangedDetails.new_value: To. + :ivar team_log.EmailIngestPolicyChangedDetails.previous_value: From. """ __slots__ = [ @@ -22783,7 +22781,7 @@ class EventType(bb.Union): EventType.directory_restrictions_remove_members: (team_policies) Removed members from directory restrictions list :ivar EmailIngestPolicyChangedType EventType.email_ingest_policy_changed: - (team_policies) Changed email to my dropbox policy for team + (team_policies) Changed email to my Dropbox policy for team :ivar EmmAddExceptionType EventType.emm_add_exception: (team_policies) Added members to EMM exception list :ivar EmmChangePolicyType EventType.emm_change_policy: (team_policies) @@ -36571,7 +36569,7 @@ def get_directory_restrictions_remove_members(self): def get_email_ingest_policy_changed(self): """ - (team_policies) Changed email to my dropbox policy for team + (team_policies) Changed email to my Dropbox policy for team Only call this if :meth:`is_email_ingest_policy_changed` is true. @@ -38630,7 +38628,7 @@ class EventTypeArg(bb.Union): :ivar team_log.EventTypeArg.directory_restrictions_remove_members: (team_policies) Removed members from directory restrictions list :ivar team_log.EventTypeArg.email_ingest_policy_changed: (team_policies) - Changed email to my dropbox policy for team + Changed email to my Dropbox policy for team :ivar team_log.EventTypeArg.emm_add_exception: (team_policies) Added members to EMM exception list :ivar team_log.EventTypeArg.emm_change_policy: (team_policies) diff --git a/spec b/spec index 55ae3f70..2026d2d9 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 55ae3f7008099fe4776e12265ccb9c9214305ce9 +Subproject commit 2026d2d9a589c1679f82507e4699252a2c3764ba From 45ccf50f8330cfc57aa7848e8bd90149593b1c5d Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 29 Sep 2021 15:49:46 -0400 Subject: [PATCH 55/90] Automated Spec Update (#388) 65585e4d2e93fd84087b48bbaf1bbf396a4b1126 Change Notes: files Namespace - Add upload_session/finish_batch:2 route Co-authored-by: DropboxBot --- dropbox/base.py | 33 +++++++++++++++++++++++++++++++++ dropbox/files.py | 12 ++++++++++++ spec | 2 +- 3 files changed, 46 insertions(+), 1 deletion(-) diff --git a/dropbox/base.py b/dropbox/base.py index f6b0f941..81d734b2 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -3015,6 +3015,39 @@ def files_upload_session_finish_batch(self, ) return r + def files_upload_session_finish_batch_v2(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 of each upload session. The + maximum size of a file one can upload to an upload session is 350 GB. We + allow up to 1000 entries in a single request. Calls to this endpoint + will count as data transport calls for any Dropbox Business teams with a + limit on the number of data transport calls allowed per month. For more + information, see the `Data transport limit page + `_. + + :param List[:class:`dropbox.files.UploadSessionFinishArg`] entries: + Commit information for each file in the batch. + :rtype: :class:`dropbox.files.UploadSessionFinishBatchResult` + """ + arg = files.UploadSessionFinishBatchArg(entries) + r = self.request( + files.upload_session_finish_batch_v2, + 'files', + arg, + None, + ) + return r + def files_upload_session_finish_batch_check(self, async_job_id): """ diff --git a/dropbox/files.py b/dropbox/files.py index d33deb7a..97ff47f8 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -13146,6 +13146,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'host': u'api', 'style': u'rpc'}, ) +upload_session_finish_batch_v2 = bb.Route( + 'upload_session/finish_batch', + 2, + False, + UploadSessionFinishBatchArg_validator, + UploadSessionFinishBatchResult_validator, + bv.Void(), + {'auth': u'user', + 'host': u'api', + 'style': u'rpc'}, +) upload_session_finish_batch_check = bb.Route( 'upload_session/finish_batch/check', 1, @@ -13232,6 +13243,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'upload_session/append': upload_session_append, 'upload_session/finish': upload_session_finish, 'upload_session/finish_batch': upload_session_finish_batch, + 'upload_session/finish_batch:2': upload_session_finish_batch_v2, 'upload_session/finish_batch/check': upload_session_finish_batch_check, 'upload_session/start': upload_session_start, } diff --git a/spec b/spec index 2026d2d9..65585e4d 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 2026d2d9a589c1679f82507e4699252a2c3764ba +Subproject commit 65585e4d2e93fd84087b48bbaf1bbf396a4b1126 From 2dc18a1680e6c0c47941b27f5d30778455735ef7 Mon Sep 17 00:00:00 2001 From: Brent Bumann Date: Fri, 15 Oct 2021 15:02:57 -0700 Subject: [PATCH 56/90] Fix CI test environment (#391) Co-authored-by: Brent Bumann --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d61f4ec1..7ecf98c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,13 +11,13 @@ jobs: strategy: matrix: os: [macos-latest, windows-latest] - python-version: [2.7, 3.5, 3.6, 3.7, 3.8, pypy2, pypy3] + python-version: [2.7, 3.5, 3.6, 3.7, 3.8, pypy-2.7, pypy-3.7] exclude: - os: windows-latest python-version: 3.6 include: - - os: linux - python-version: 3.4 + - os: ubuntu-latest + python-version: 3.7 steps: - uses: actions/checkout@v2 - name: Setup Python environment @@ -65,13 +65,13 @@ jobs: strategy: matrix: os: [macos-latest, windows-latest] - python-version: [2.7, 3.5, 3.6, 3.7, 3.8, pypy2, pypy3] + python-version: [2.7, 3.5, 3.6, 3.7, 3.8, pypy-2.7, pypy-3.7] exclude: - os: windows-latest python-version: 3.6 include: - - os: linux - python-version: 3.4 + - os: ubuntu-latest + python-version: 3.7 steps: - uses: actions/checkout@v2.3.4 - name: Setup Python environment From 0f718077ffe558feccb07c7b44503c4e04d4d55c Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Thu, 21 Oct 2021 16:50:48 -0400 Subject: [PATCH 57/90] Automated Spec Update (#392) 72d0718154d13756b31b5a0e0948abcae35dab84 Change Notes: files Namespace - Remove upload_session/finish_batch team_log_generated Namespace - Update SharedContentUnshareDetails struct example Co-authored-by: Eugene Che 956339f6ff8113095999e38a17bcb7927475ab7b Change Notes: team_log_generated Namespace - Update SharingLinkPolicy union to include default_no_one team_policies Namespace - Update SharedLinkCreatePolicy union to include default_no_one Co-authored-by: DropboxBot --- dropbox/base.py | 4 ++++ dropbox/files.py | 2 +- dropbox/team_log.py | 13 +++++++++++++ dropbox/team_policies.py | 16 ++++++++++++++++ spec | 2 +- 5 files changed, 35 insertions(+), 2 deletions(-) diff --git a/dropbox/base.py b/dropbox/base.py index 81d734b2..84a32a98 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -3006,6 +3006,10 @@ def files_upload_session_finish_batch(self, Commit information for each file in the batch. :rtype: :class:`dropbox.files.UploadSessionFinishBatchLaunch` """ + warnings.warn( + 'upload_session/finish_batch is deprecated. Use upload_session/finish_batch.', + DeprecationWarning, + ) arg = files.UploadSessionFinishBatchArg(entries) r = self.request( files.upload_session_finish_batch, diff --git a/dropbox/files.py b/dropbox/files.py index 97ff47f8..df868c61 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -13138,7 +13138,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): upload_session_finish_batch = bb.Route( 'upload_session/finish_batch', 1, - False, + True, UploadSessionFinishBatchArg_validator, UploadSessionFinishBatchLaunch_validator, bv.Void(), diff --git a/dropbox/team_log.py b/dropbox/team_log.py index a83b76dc..8fde487c 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -64030,6 +64030,8 @@ class SharingLinkPolicy(bb.Union): _catch_all = 'other' # Attribute is overwritten below the class definition + default_no_one = None + # Attribute is overwritten below the class definition default_private = None # Attribute is overwritten below the class definition default_public = None @@ -64038,6 +64040,14 @@ class SharingLinkPolicy(bb.Union): # Attribute is overwritten below the class definition other = None + def is_default_no_one(self): + """ + Check if the union tag is ``default_no_one``. + + :rtype: bool + """ + return self._tag == 'default_no_one' + def is_default_private(self): """ Check if the union tag is ``default_private``. @@ -81648,17 +81658,20 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SharingFolderJoinPolicy.from_team_only = SharingFolderJoinPolicy('from_team_only') SharingFolderJoinPolicy.other = SharingFolderJoinPolicy('other') +SharingLinkPolicy._default_no_one_validator = bv.Void() SharingLinkPolicy._default_private_validator = bv.Void() SharingLinkPolicy._default_public_validator = bv.Void() SharingLinkPolicy._only_private_validator = bv.Void() SharingLinkPolicy._other_validator = bv.Void() SharingLinkPolicy._tagmap = { + 'default_no_one': SharingLinkPolicy._default_no_one_validator, 'default_private': SharingLinkPolicy._default_private_validator, 'default_public': SharingLinkPolicy._default_public_validator, 'only_private': SharingLinkPolicy._only_private_validator, 'other': SharingLinkPolicy._other_validator, } +SharingLinkPolicy.default_no_one = SharingLinkPolicy('default_no_one') SharingLinkPolicy.default_private = SharingLinkPolicy('default_private') SharingLinkPolicy.default_public = SharingLinkPolicy('default_public') SharingLinkPolicy.only_private = SharingLinkPolicy('only_private') diff --git a/dropbox/team_policies.py b/dropbox/team_policies.py index 6ca263ad..79c8bdb4 100644 --- a/dropbox/team_policies.py +++ b/dropbox/team_policies.py @@ -844,6 +844,9 @@ class SharedLinkCreatePolicy(bb.Union): :ivar team_policies.SharedLinkCreatePolicy.team_only: Only members of the same team can access all shared links. Login will be required to access all shared links. + :ivar team_policies.SharedLinkCreatePolicy.default_no_one: Only people + invited can access newly created links. Login will be required to access + the shared links unless overridden. """ _catch_all = 'other' @@ -854,6 +857,8 @@ class SharedLinkCreatePolicy(bb.Union): # Attribute is overwritten below the class definition team_only = None # Attribute is overwritten below the class definition + default_no_one = None + # Attribute is overwritten below the class definition other = None def is_default_public(self): @@ -880,6 +885,14 @@ def is_team_only(self): """ return self._tag == 'team_only' + def is_default_no_one(self): + """ + Check if the union tag is ``default_no_one``. + + :rtype: bool + """ + return self._tag == 'default_no_one' + def is_other(self): """ Check if the union tag is ``other``. @@ -1687,17 +1700,20 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SharedLinkCreatePolicy._default_public_validator = bv.Void() SharedLinkCreatePolicy._default_team_only_validator = bv.Void() SharedLinkCreatePolicy._team_only_validator = bv.Void() +SharedLinkCreatePolicy._default_no_one_validator = bv.Void() SharedLinkCreatePolicy._other_validator = bv.Void() SharedLinkCreatePolicy._tagmap = { 'default_public': SharedLinkCreatePolicy._default_public_validator, 'default_team_only': SharedLinkCreatePolicy._default_team_only_validator, 'team_only': SharedLinkCreatePolicy._team_only_validator, + 'default_no_one': SharedLinkCreatePolicy._default_no_one_validator, 'other': SharedLinkCreatePolicy._other_validator, } SharedLinkCreatePolicy.default_public = SharedLinkCreatePolicy('default_public') SharedLinkCreatePolicy.default_team_only = SharedLinkCreatePolicy('default_team_only') SharedLinkCreatePolicy.team_only = SharedLinkCreatePolicy('team_only') +SharedLinkCreatePolicy.default_no_one = SharedLinkCreatePolicy('default_no_one') SharedLinkCreatePolicy.other = SharedLinkCreatePolicy('other') ShowcaseDownloadPolicy._disabled_validator = bv.Void() diff --git a/spec b/spec index 65585e4d..72d07181 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 65585e4d2e93fd84087b48bbaf1bbf396a4b1126 +Subproject commit 72d0718154d13756b31b5a0e0948abcae35dab84 From 0eddf8b0ab1f24769d76944d73c4c46b9d44d544 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 3 Nov 2021 19:44:03 -0400 Subject: [PATCH 58/90] Automated Spec Update (#394) 6e0a08f15d3f28359208e079656780789361a95f Change Notes: files Namespace - Update list_folder route to include app auth - Update list_folder/continue route to include app auth - Update Examples Add file_tagging Namespace Co-authored-by: DropboxBot --- dropbox/base.py | 70 +++++++ dropbox/files.py | 532 ++++++++++++++++++++++++++++++++++++++++++++++- spec | 2 +- 3 files changed, 601 insertions(+), 3 deletions(-) diff --git a/dropbox/base.py b/dropbox/base.py index 84a32a98..b1ec2c63 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -2775,6 +2775,76 @@ def files_search_continue_v2(self, ) return r + def files_tags_add(self, + path, + tag_text): + """ + Add a tag to an item. A tag is a string. No more than 20 tags can be + added to a given item. + + :param str path: Path to the item to be tagged. + :param str tag_text: The value of the tag to add. + :rtype: None + :raises: :class:`.exceptions.ApiError` + + If this raises, ApiError will contain: + :class:`dropbox.files.AddTagError` + """ + arg = files.AddTagArg(path, + tag_text) + r = self.request( + files.tags_add, + 'files', + arg, + None, + ) + return None + + def files_tags_get(self, + paths): + """ + Get list of tags assigned to items. + + :param List[str] paths: Path to the items. + :rtype: :class:`dropbox.files.GetTagsResult` + :raises: :class:`.exceptions.ApiError` + + If this raises, ApiError will contain: + :class:`dropbox.files.BaseTagError` + """ + arg = files.GetTagsArg(paths) + r = self.request( + files.tags_get, + 'files', + arg, + None, + ) + return r + + def files_tags_remove(self, + path, + tag_text): + """ + Remove a tag from an item. + + :param str path: Path to the item to tag. + :param str tag_text: The tag to remove. + :rtype: None + :raises: :class:`.exceptions.ApiError` + + If this raises, ApiError will contain: + :class:`dropbox.files.RemoveTagError` + """ + arg = files.RemoveTagArg(path, + tag_text) + r = self.request( + files.tags_remove, + 'files', + arg, + None, + ) + return None + def files_unlock_file_batch(self, entries): """ diff --git a/dropbox/files.py b/dropbox/files.py index df868c61..fdb5cb64 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -16,6 +16,171 @@ from dropbox import file_properties from dropbox import users_common +class AddTagArg(bb.Struct): + """ + :ivar files.AddTagArg.path: Path to the item to be tagged. + :ivar files.AddTagArg.tag_text: The value of the tag to add. + """ + + __slots__ = [ + '_path_value', + '_tag_text_value', + ] + + _has_required_fields = True + + def __init__(self, + path=None, + tag_text=None): + self._path_value = bb.NOT_SET + self._tag_text_value = bb.NOT_SET + if path is not None: + self.path = path + if tag_text is not None: + self.tag_text = tag_text + + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") + + # Instance attribute type: str (validator is set below) + tag_text = bb.Attribute("tag_text") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AddTagArg, self)._process_custom_annotations(annotation_type, field_path, processor) + +AddTagArg_validator = bv.Struct(AddTagArg) + +class BaseError(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 files.BaseError.unknown: Action failed. + :ivar files.BaseError.transient: Action failed. Try again. + :ivar files.BaseError.input_validation: Action failed due to wrong params. + :ivar files.BaseError.cancelled: Action cancelled. + """ + + _catch_all = 'other' + # Attribute is overwritten below the class definition + unknown = None + # Attribute is overwritten below the class definition + transient = None + # Attribute is overwritten below the class definition + input_validation = None + # Attribute is overwritten below the class definition + cancelled = None + # Attribute is overwritten below the class definition + other = None + + def is_unknown(self): + """ + Check if the union tag is ``unknown``. + + :rtype: bool + """ + return self._tag == 'unknown' + + def is_transient(self): + """ + Check if the union tag is ``transient``. + + :rtype: bool + """ + return self._tag == 'transient' + + def is_input_validation(self): + """ + Check if the union tag is ``input_validation``. + + :rtype: bool + """ + return self._tag == 'input_validation' + + def is_cancelled(self): + """ + Check if the union tag is ``cancelled``. + + :rtype: bool + """ + return self._tag == 'cancelled' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(BaseError, self)._process_custom_annotations(annotation_type, field_path, processor) + +BaseError_validator = bv.Union(BaseError) + +class BaseTagError(BaseError): + """ + This class acts as a tagged union. Only 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 files.BaseTagError.feature_not_supported: Tags are not turned on for + your team. Please turn on the feature. + :ivar files.BaseTagError.path_not_found: Path not found. + """ + + # Attribute is overwritten below the class definition + feature_not_supported = None + # Attribute is overwritten below the class definition + path_not_found = None + + def is_feature_not_supported(self): + """ + Check if the union tag is ``feature_not_supported``. + + :rtype: bool + """ + return self._tag == 'feature_not_supported' + + def is_path_not_found(self): + """ + Check if the union tag is ``path_not_found``. + + :rtype: bool + """ + return self._tag == 'path_not_found' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(BaseTagError, self)._process_custom_annotations(annotation_type, field_path, processor) + +BaseTagError_validator = bv.Union(BaseTagError) + +class AddTagError(BaseTagError): + """ + This class acts as a tagged union. Only 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 files.AddTagError.too_many_tags: Item already has max supported tags. + """ + + # Attribute is overwritten below the class definition + too_many_tags = None + + def is_too_many_tags(self): + """ + Check if the union tag is ``too_many_tags``. + + :rtype: bool + """ + return self._tag == 'too_many_tags' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AddTagError, self)._process_custom_annotations(annotation_type, field_path, processor) + +AddTagError_validator = bv.Union(AddTagError) + class GetMetadataArg(bb.Struct): """ :ivar files.GetMetadataArg.path: The path of a file or folder on Dropbox. @@ -2873,6 +3038,57 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetCopyReferenceResult_validator = bv.Struct(GetCopyReferenceResult) +class GetTagsArg(bb.Struct): + """ + :ivar files.GetTagsArg.paths: Path to the items. + """ + + __slots__ = [ + '_paths_value', + ] + + _has_required_fields = True + + def __init__(self, + paths=None): + self._paths_value = bb.NOT_SET + if paths is not None: + self.paths = paths + + # Instance attribute type: list of [str] (validator is set below) + paths = bb.Attribute("paths") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(GetTagsArg, self)._process_custom_annotations(annotation_type, field_path, processor) + +GetTagsArg_validator = bv.Struct(GetTagsArg) + +class GetTagsResult(bb.Struct): + """ + :ivar files.GetTagsResult.paths_to_tags: List of paths and their + corresponding tags. + """ + + __slots__ = [ + '_paths_to_tags_value', + ] + + _has_required_fields = True + + def __init__(self, + paths_to_tags=None): + self._paths_to_tags_value = bb.NOT_SET + if paths_to_tags is not None: + self.paths_to_tags = paths_to_tags + + # Instance attribute type: list of [PathToTags] (validator is set below) + paths_to_tags = bb.Attribute("paths_to_tags") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(GetTagsResult, self)._process_custom_annotations(annotation_type, field_path, processor) + +GetTagsResult_validator = bv.Struct(GetTagsResult) + class GetTemporaryLinkArg(bb.Struct): """ :ivar files.GetTemporaryLinkArg.path: The path to the file you want a @@ -5508,6 +5724,40 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PathOrLink_validator = bv.Union(PathOrLink) +class PathToTags(bb.Struct): + """ + :ivar files.PathToTags.path: Path of the item. + :ivar files.PathToTags.tags: Tags assigned to this item. + """ + + __slots__ = [ + '_path_value', + '_tags_value', + ] + + _has_required_fields = True + + def __init__(self, + path=None, + tags=None): + self._path_value = bb.NOT_SET + self._tags_value = bb.NOT_SET + if path is not None: + self.path = path + if tags is not None: + self.tags = tags + + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") + + # Instance attribute type: list of [Tag] (validator is set below) + tags = bb.Attribute("tags") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(PathToTags, self)._process_custom_annotations(annotation_type, field_path, processor) + +PathToTags_validator = bv.Struct(PathToTags) + class PhotoMetadata(MediaMetadata): """ Metadata for a photo. @@ -6598,6 +6848,66 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RelocationResult_validator = bv.Struct(RelocationResult) +class RemoveTagArg(bb.Struct): + """ + :ivar files.RemoveTagArg.path: Path to the item to tag. + :ivar files.RemoveTagArg.tag_text: The tag to remove. + """ + + __slots__ = [ + '_path_value', + '_tag_text_value', + ] + + _has_required_fields = True + + def __init__(self, + path=None, + tag_text=None): + self._path_value = bb.NOT_SET + self._tag_text_value = bb.NOT_SET + if path is not None: + self.path = path + if tag_text is not None: + self.tag_text = tag_text + + # Instance attribute type: str (validator is set below) + path = bb.Attribute("path") + + # Instance attribute type: str (validator is set below) + tag_text = bb.Attribute("tag_text") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(RemoveTagArg, self)._process_custom_annotations(annotation_type, field_path, processor) + +RemoveTagArg_validator = bv.Struct(RemoveTagArg) + +class RemoveTagError(BaseTagError): + """ + This class acts as a tagged union. Only 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 files.RemoveTagError.tag_not_exists_for_this_path: That tag doesn't + exist at this path. + """ + + # Attribute is overwritten below the class definition + tag_not_exists_for_this_path = None + + def is_tag_not_exists_for_this_path(self): + """ + Check if the union tag is ``tag_not_exists_for_this_path``. + + :rtype: bool + """ + return self._tag == 'tag_not_exists_for_this_path' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(RemoveTagError, self)._process_custom_annotations(annotation_type, field_path, processor) + +RemoveTagError_validator = bv.Union(RemoveTagError) + class RestoreArg(bb.Struct): """ :ivar files.RestoreArg.path: The path to save the restored file. @@ -8262,6 +8572,65 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SyncSettingsError_validator = bv.Union(SyncSettingsError) +class Tag(bb.Union): + """ + Tag that can be added in multiple ways. + + This class acts as a tagged union. Only 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 UserGeneratedTag Tag.user_generated_tag: Tag generated by the user. + """ + + _catch_all = 'other' + # Attribute is overwritten below the class definition + other = None + + @classmethod + def user_generated_tag(cls, val): + """ + Create an instance of this class set to the ``user_generated_tag`` tag + with value ``val``. + + :param UserGeneratedTag val: + :rtype: Tag + """ + return cls('user_generated_tag', val) + + def is_user_generated_tag(self): + """ + Check if the union tag is ``user_generated_tag``. + + :rtype: bool + """ + return self._tag == 'user_generated_tag' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def get_user_generated_tag(self): + """ + Tag generated by the user. + + Only call this if :meth:`is_user_generated_tag` is true. + + :rtype: UserGeneratedTag + """ + if not self.is_user_generated_tag(): + raise AttributeError("tag 'user_generated_tag' not set") + return self._value + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(Tag, self)._process_custom_annotations(annotation_type, field_path, processor) + +Tag_validator = bv.Union(Tag) + class ThumbnailArg(bb.Struct): """ :ivar files.ThumbnailArg.path: The path to the image file you want to @@ -9835,6 +10204,28 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadWriteFailed_validator = bv.Struct(UploadWriteFailed) +class UserGeneratedTag(bb.Struct): + + __slots__ = [ + '_tag_text_value', + ] + + _has_required_fields = True + + def __init__(self, + tag_text=None): + self._tag_text_value = bb.NOT_SET + if tag_text is not None: + self.tag_text = tag_text + + # Instance attribute type: str (validator is set below) + tag_text = bb.Attribute("tag_text") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(UserGeneratedTag, self)._process_custom_annotations(annotation_type, field_path, processor) + +UserGeneratedTag_validator = bv.Struct(UserGeneratedTag) + class VideoMetadata(MediaMetadata): """ Metadata for a video. @@ -10211,8 +10602,58 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SearchV2Cursor_validator = bv.String(min_length=1) Sha256HexHash_validator = bv.String(min_length=64, max_length=64) SharedLinkUrl_validator = bv.String() +TagText_validator = bv.String(min_length=1, max_length=32, pattern=u'[A-Za-z0-9_]+') WritePath_validator = bv.String(pattern=u'(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)') WritePathOrId_validator = bv.String(pattern=u'(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)') +AddTagArg.path.validator = Path_validator +AddTagArg.tag_text.validator = TagText_validator +AddTagArg._all_field_names_ = set([ + 'path', + 'tag_text', +]) +AddTagArg._all_fields_ = [ + ('path', AddTagArg.path.validator), + ('tag_text', AddTagArg.tag_text.validator), +] + +BaseError._unknown_validator = bv.Void() +BaseError._transient_validator = bv.Void() +BaseError._input_validation_validator = bv.Void() +BaseError._cancelled_validator = bv.Void() +BaseError._other_validator = bv.Void() +BaseError._tagmap = { + 'unknown': BaseError._unknown_validator, + 'transient': BaseError._transient_validator, + 'input_validation': BaseError._input_validation_validator, + 'cancelled': BaseError._cancelled_validator, + 'other': BaseError._other_validator, +} + +BaseError.unknown = BaseError('unknown') +BaseError.transient = BaseError('transient') +BaseError.input_validation = BaseError('input_validation') +BaseError.cancelled = BaseError('cancelled') +BaseError.other = BaseError('other') + +BaseTagError._feature_not_supported_validator = bv.Void() +BaseTagError._path_not_found_validator = bv.Void() +BaseTagError._tagmap = { + 'feature_not_supported': BaseTagError._feature_not_supported_validator, + 'path_not_found': BaseTagError._path_not_found_validator, +} +BaseTagError._tagmap.update(BaseError._tagmap) + +BaseTagError.feature_not_supported = BaseTagError('feature_not_supported') +BaseTagError.path_not_found = BaseTagError('path_not_found') + +AddTagError._too_many_tags_validator = bv.Void() +AddTagError._tagmap = { + 'too_many_tags': AddTagError._too_many_tags_validator, +} +AddTagError._tagmap.update(BaseTagError._tagmap) + +AddTagError.too_many_tags = AddTagError('too_many_tags') + GetMetadataArg.path.validator = ReadPath_validator GetMetadataArg.include_media_info.validator = bv.Boolean() GetMetadataArg.include_deleted.validator = bv.Boolean() @@ -10846,6 +11287,14 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('expires', GetCopyReferenceResult.expires.validator), ] +GetTagsArg.paths.validator = bv.List(Path_validator) +GetTagsArg._all_field_names_ = set(['paths']) +GetTagsArg._all_fields_ = [('paths', GetTagsArg.paths.validator)] + +GetTagsResult.paths_to_tags.validator = bv.List(PathToTags_validator) +GetTagsResult._all_field_names_ = set(['paths_to_tags']) +GetTagsResult._all_fields_ = [('paths_to_tags', GetTagsResult.paths_to_tags.validator)] + GetTemporaryLinkArg.path.validator = ReadPath_validator GetTemporaryLinkArg._all_field_names_ = set(['path']) GetTemporaryLinkArg._all_fields_ = [('path', GetTemporaryLinkArg.path.validator)] @@ -11441,6 +11890,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PathOrLink.other = PathOrLink('other') +PathToTags.path.validator = Path_validator +PathToTags.tags.validator = bv.List(Tag_validator) +PathToTags._all_field_names_ = set([ + 'path', + 'tags', +]) +PathToTags._all_fields_ = [ + ('path', PathToTags.path.validator), + ('tags', PathToTags.tags.validator), +] + PhotoMetadata._field_names_ = set([]) PhotoMetadata._all_field_names_ = MediaMetadata._all_field_names_.union(PhotoMetadata._field_names_) PhotoMetadata._fields_ = [] @@ -11641,6 +12101,25 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RelocationResult._all_field_names_ = FileOpsResult._all_field_names_.union(set(['metadata'])) RelocationResult._all_fields_ = FileOpsResult._all_fields_ + [('metadata', RelocationResult.metadata.validator)] +RemoveTagArg.path.validator = Path_validator +RemoveTagArg.tag_text.validator = TagText_validator +RemoveTagArg._all_field_names_ = set([ + 'path', + 'tag_text', +]) +RemoveTagArg._all_fields_ = [ + ('path', RemoveTagArg.path.validator), + ('tag_text', RemoveTagArg.tag_text.validator), +] + +RemoveTagError._tag_not_exists_for_this_path_validator = bv.Void() +RemoveTagError._tagmap = { + 'tag_not_exists_for_this_path': RemoveTagError._tag_not_exists_for_this_path_validator, +} +RemoveTagError._tagmap.update(BaseTagError._tagmap) + +RemoveTagError.tag_not_exists_for_this_path = RemoveTagError('tag_not_exists_for_this_path') + RestoreArg.path.validator = WritePath_validator RestoreArg.rev.validator = Rev_validator RestoreArg._all_field_names_ = set([ @@ -12031,6 +12510,15 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SyncSettingsError.unsupported_configuration = SyncSettingsError('unsupported_configuration') SyncSettingsError.other = SyncSettingsError('other') +Tag._user_generated_tag_validator = UserGeneratedTag_validator +Tag._other_validator = bv.Void() +Tag._tagmap = { + 'user_generated_tag': Tag._user_generated_tag_validator, + 'other': Tag._other_validator, +} + +Tag.other = Tag('other') + ThumbnailArg.path.validator = ReadPath_validator ThumbnailArg.format.validator = ThumbnailFormat_validator ThumbnailArg.size.validator = ThumbnailSize_validator @@ -12356,6 +12844,10 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('upload_session_id', UploadWriteFailed.upload_session_id.validator), ] +UserGeneratedTag.tag_text.validator = TagText_validator +UserGeneratedTag._all_field_names_ = set(['tag_text']) +UserGeneratedTag._all_fields_ = [('tag_text', UserGeneratedTag.tag_text.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_) @@ -12790,7 +13282,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFolderArg_validator, ListFolderResult_validator, ListFolderError_validator, - {'auth': u'user', + {'auth': u'app, user', 'host': u'api', 'style': u'rpc'}, ) @@ -12801,7 +13293,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFolderContinueArg_validator, ListFolderResult_validator, ListFolderContinueError_validator, - {'auth': u'user', + {'auth': u'app, user', 'host': u'api', 'style': u'rpc'}, ) @@ -13080,6 +13572,39 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'host': u'api', 'style': u'rpc'}, ) +tags_add = bb.Route( + 'tags/add', + 1, + False, + AddTagArg_validator, + bv.Void(), + AddTagError_validator, + {'auth': u'user', + 'host': u'api', + 'style': u'rpc'}, +) +tags_get = bb.Route( + 'tags/get', + 1, + False, + GetTagsArg_validator, + GetTagsResult_validator, + BaseTagError_validator, + {'auth': u'user', + 'host': u'api', + 'style': u'rpc'}, +) +tags_remove = bb.Route( + 'tags/remove', + 1, + False, + RemoveTagArg_validator, + bv.Void(), + RemoveTagError_validator, + {'auth': u'user', + 'host': u'api', + 'style': u'rpc'}, +) unlock_file_batch = bb.Route( 'unlock_file_batch', 1, @@ -13237,6 +13762,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'search': search, 'search:2': search_v2, 'search/continue:2': search_continue_v2, + 'tags/add': tags_add, + 'tags/get': tags_get, + 'tags/remove': tags_remove, 'unlock_file_batch': unlock_file_batch, 'upload': upload, 'upload_session/append:2': upload_session_append_v2, diff --git a/spec b/spec index 72d07181..6e0a08f1 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 72d0718154d13756b31b5a0e0948abcae35dab84 +Subproject commit 6e0a08f15d3f28359208e079656780789361a95f From cc17caf7dc325708309aa52807621c6c48d7e349 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 17 Nov 2021 14:29:15 -0500 Subject: [PATCH 59/90] Automated Spec Update (#396) 28dfbe46c05026fdd867e4fea67cd0ea9acfbca9 Change Notes: file_tagging Namespace - Add BaseTagError unions - Remove BaseError, BaseTagError extends BaseError unions - Update RemoveTagError extends BaseTagError union to remove tag_not_exists_for_this_path - Update RemoveTagError extends BaseTagError union to include tag_not_present - Update Comments Co-authored-by: DropboxBot Co-authored-by: Brent Bumann --- dropbox/files.py | 139 +++++++++++------------------------------------ spec | 2 +- 2 files changed, 34 insertions(+), 107 deletions(-) diff --git a/dropbox/files.py b/dropbox/files.py index fdb5cb64..1b3895fc 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -50,61 +50,35 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AddTagArg_validator = bv.Struct(AddTagArg) -class BaseError(bb.Union): +class BaseTagError(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 files.BaseError.unknown: Action failed. - :ivar files.BaseError.transient: Action failed. Try again. - :ivar files.BaseError.input_validation: Action failed due to wrong params. - :ivar files.BaseError.cancelled: Action cancelled. """ _catch_all = 'other' # Attribute is overwritten below the class definition - unknown = None - # Attribute is overwritten below the class definition - transient = None - # Attribute is overwritten below the class definition - input_validation = None - # Attribute is overwritten below the class definition - cancelled = None - # Attribute is overwritten below the class definition other = None - def is_unknown(self): - """ - Check if the union tag is ``unknown``. - - :rtype: bool - """ - return self._tag == 'unknown' - - def is_transient(self): - """ - Check if the union tag is ``transient``. - - :rtype: bool - """ - return self._tag == 'transient' - - def is_input_validation(self): + @classmethod + def path(cls, val): """ - Check if the union tag is ``input_validation``. + Create an instance of this class set to the ``path`` tag with value + ``val``. - :rtype: bool + :param LookupError val: + :rtype: BaseTagError """ - return self._tag == 'input_validation' + return cls('path', val) - def is_cancelled(self): + def is_path(self): """ - Check if the union tag is ``cancelled``. + Check if the union tag is ``path``. :rtype: bool """ - return self._tag == 'cancelled' + return self._tag == 'path' def is_other(self): """ @@ -114,42 +88,15 @@ def is_other(self): """ return self._tag == 'other' - def _process_custom_annotations(self, annotation_type, field_path, processor): - super(BaseError, self)._process_custom_annotations(annotation_type, field_path, processor) - -BaseError_validator = bv.Union(BaseError) - -class BaseTagError(BaseError): - """ - This class acts as a tagged union. Only 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 files.BaseTagError.feature_not_supported: Tags are not turned on for - your team. Please turn on the feature. - :ivar files.BaseTagError.path_not_found: Path not found. - """ - - # Attribute is overwritten below the class definition - feature_not_supported = None - # Attribute is overwritten below the class definition - path_not_found = None - - def is_feature_not_supported(self): - """ - Check if the union tag is ``feature_not_supported``. - - :rtype: bool - """ - return self._tag == 'feature_not_supported' - - def is_path_not_found(self): + def get_path(self): """ - Check if the union tag is ``path_not_found``. + Only call this if :meth:`is_path` is true. - :rtype: bool + :rtype: LookupError """ - return self._tag == 'path_not_found' + if not self.is_path(): + raise AttributeError("tag 'path' not set") + return self._value def _process_custom_annotations(self, annotation_type, field_path, processor): super(BaseTagError, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -162,7 +109,8 @@ class AddTagError(BaseTagError): return true. To get the associated value of a tag (if one exists), use the corresponding ``get_*`` method. - :ivar files.AddTagError.too_many_tags: Item already has max supported tags. + :ivar files.AddTagError.too_many_tags: The item already has the maximum + supported number of tags. """ # Attribute is overwritten below the class definition @@ -6888,20 +6836,20 @@ class RemoveTagError(BaseTagError): return true. To get the associated value of a tag (if one exists), use the corresponding ``get_*`` method. - :ivar files.RemoveTagError.tag_not_exists_for_this_path: That tag doesn't - exist at this path. + :ivar files.RemoveTagError.tag_not_present: That tag doesn't exist at this + path. """ # Attribute is overwritten below the class definition - tag_not_exists_for_this_path = None + tag_not_present = None - def is_tag_not_exists_for_this_path(self): + def is_tag_not_present(self): """ - Check if the union tag is ``tag_not_exists_for_this_path``. + Check if the union tag is ``tag_not_present``. :rtype: bool """ - return self._tag == 'tag_not_exists_for_this_path' + return self._tag == 'tag_not_present' def _process_custom_annotations(self, annotation_type, field_path, processor): super(RemoveTagError, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -10616,35 +10564,14 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('tag_text', AddTagArg.tag_text.validator), ] -BaseError._unknown_validator = bv.Void() -BaseError._transient_validator = bv.Void() -BaseError._input_validation_validator = bv.Void() -BaseError._cancelled_validator = bv.Void() -BaseError._other_validator = bv.Void() -BaseError._tagmap = { - 'unknown': BaseError._unknown_validator, - 'transient': BaseError._transient_validator, - 'input_validation': BaseError._input_validation_validator, - 'cancelled': BaseError._cancelled_validator, - 'other': BaseError._other_validator, -} - -BaseError.unknown = BaseError('unknown') -BaseError.transient = BaseError('transient') -BaseError.input_validation = BaseError('input_validation') -BaseError.cancelled = BaseError('cancelled') -BaseError.other = BaseError('other') - -BaseTagError._feature_not_supported_validator = bv.Void() -BaseTagError._path_not_found_validator = bv.Void() +BaseTagError._path_validator = LookupError_validator +BaseTagError._other_validator = bv.Void() BaseTagError._tagmap = { - 'feature_not_supported': BaseTagError._feature_not_supported_validator, - 'path_not_found': BaseTagError._path_not_found_validator, + 'path': BaseTagError._path_validator, + 'other': BaseTagError._other_validator, } -BaseTagError._tagmap.update(BaseError._tagmap) -BaseTagError.feature_not_supported = BaseTagError('feature_not_supported') -BaseTagError.path_not_found = BaseTagError('path_not_found') +BaseTagError.other = BaseTagError('other') AddTagError._too_many_tags_validator = bv.Void() AddTagError._tagmap = { @@ -12112,13 +12039,13 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('tag_text', RemoveTagArg.tag_text.validator), ] -RemoveTagError._tag_not_exists_for_this_path_validator = bv.Void() +RemoveTagError._tag_not_present_validator = bv.Void() RemoveTagError._tagmap = { - 'tag_not_exists_for_this_path': RemoveTagError._tag_not_exists_for_this_path_validator, + 'tag_not_present': RemoveTagError._tag_not_present_validator, } RemoveTagError._tagmap.update(BaseTagError._tagmap) -RemoveTagError.tag_not_exists_for_this_path = RemoveTagError('tag_not_exists_for_this_path') +RemoveTagError.tag_not_present = RemoveTagError('tag_not_present') RestoreArg.path.validator = WritePath_validator RestoreArg.rev.validator = Rev_validator diff --git a/spec b/spec index 6e0a08f1..28dfbe46 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 6e0a08f15d3f28359208e079656780789361a95f +Subproject commit 28dfbe46c05026fdd867e4fea67cd0ea9acfbca9 From 34f276e8c95aabaca24aa2febf17fe1697d05b61 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 24 Nov 2021 14:31:06 -0500 Subject: [PATCH 60/90] Automated Spec Update (#398) bca5f1448ac6f65a17c9df95a5175cf7b878ad90 Change Notes: check_api_v2_service Namespace check_api_v2_types Namespace sharing_folders Namespace team_log_generated Namespace - Add UndoNamingConventionDetails, UndoOrganizeFolderWithTidyDetails, UndoNamingConventionType, UndoOrganizeFolderWithTidyType structs --- dropbox/sharing.py | 15 +++ dropbox/team_log.py | 273 ++++++++++++++++++++++++++++++++++++++++++-- spec | 2 +- 3 files changed, 281 insertions(+), 9 deletions(-) diff --git a/dropbox/sharing.py b/dropbox/sharing.py index 240ef8cd..6c7f7ab8 100644 --- a/dropbox/sharing.py +++ b/dropbox/sharing.py @@ -8260,6 +8260,8 @@ class SharePathError(bb.Union): folder inside a Mac OS X package. :ivar sharing.SharePathError.is_vault: We do not support sharing the Vault folder. + :ivar sharing.SharePathError.is_vault_locked: We do not support sharing a + folder inside a locked Vault. :ivar sharing.SharePathError.is_family: We do not support sharing the Family folder. """ @@ -8292,6 +8294,8 @@ class SharePathError(bb.Union): # Attribute is overwritten below the class definition is_vault = None # Attribute is overwritten below the class definition + is_vault_locked = None + # Attribute is overwritten below the class definition is_family = None # Attribute is overwritten below the class definition other = None @@ -8419,6 +8423,14 @@ def is_is_vault(self): """ return self._tag == 'is_vault' + def is_is_vault_locked(self): + """ + Check if the union tag is ``is_vault_locked``. + + :rtype: bool + """ + return self._tag == 'is_vault_locked' + def is_is_family(self): """ Check if the union tag is ``is_family``. @@ -12793,6 +12805,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SharePathError._is_osx_package_validator = bv.Void() SharePathError._inside_osx_package_validator = bv.Void() SharePathError._is_vault_validator = bv.Void() +SharePathError._is_vault_locked_validator = bv.Void() SharePathError._is_family_validator = bv.Void() SharePathError._other_validator = bv.Void() SharePathError._tagmap = { @@ -12810,6 +12823,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'is_osx_package': SharePathError._is_osx_package_validator, 'inside_osx_package': SharePathError._inside_osx_package_validator, 'is_vault': SharePathError._is_vault_validator, + 'is_vault_locked': SharePathError._is_vault_locked_validator, 'is_family': SharePathError._is_family_validator, 'other': SharePathError._other_validator, } @@ -12827,6 +12841,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SharePathError.is_osx_package = SharePathError('is_osx_package') SharePathError.inside_osx_package = SharePathError('inside_osx_package') SharePathError.is_vault = SharePathError('is_vault') +SharePathError.is_vault_locked = SharePathError('is_vault_locked') SharePathError.is_family = SharePathError('is_family') SharePathError.other = SharePathError('other') diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 8fde487c..11bdcd88 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -2501,7 +2501,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): class ApplyNamingConventionDetails(bb.Struct): """ - Applied a Naming Convention rule. + Applied naming convention. """ __slots__ = [ @@ -9119,6 +9119,28 @@ def rewind_folder_details(cls, val): """ return cls('rewind_folder_details', val) + @classmethod + def undo_naming_convention_details(cls, val): + """ + Create an instance of this class set to the + ``undo_naming_convention_details`` tag with value ``val``. + + :param UndoNamingConventionDetails val: + :rtype: EventDetails + """ + return cls('undo_naming_convention_details', val) + + @classmethod + def undo_organize_folder_with_tidy_details(cls, val): + """ + Create an instance of this class set to the + ``undo_organize_folder_with_tidy_details`` tag with value ``val``. + + :param UndoOrganizeFolderWithTidyDetails val: + :rtype: EventDetails + """ + return cls('undo_organize_folder_with_tidy_details', val) + @classmethod def user_tags_added_details(cls, val): """ @@ -14110,6 +14132,22 @@ def is_rewind_folder_details(self): """ return self._tag == 'rewind_folder_details' + def is_undo_naming_convention_details(self): + """ + Check if the union tag is ``undo_naming_convention_details``. + + :rtype: bool + """ + return self._tag == 'undo_naming_convention_details' + + def is_undo_organize_folder_with_tidy_details(self): + """ + Check if the union tag is ``undo_organize_folder_with_tidy_details``. + + :rtype: bool + """ + return self._tag == 'undo_organize_folder_with_tidy_details' + def is_user_tags_added_details(self): """ Check if the union tag is ``user_tags_added_details``. @@ -18108,6 +18146,26 @@ def get_rewind_folder_details(self): raise AttributeError("tag 'rewind_folder_details' not set") return self._value + def get_undo_naming_convention_details(self): + """ + Only call this if :meth:`is_undo_naming_convention_details` is true. + + :rtype: UndoNamingConventionDetails + """ + if not self.is_undo_naming_convention_details(): + raise AttributeError("tag 'undo_naming_convention_details' not set") + return self._value + + def get_undo_organize_folder_with_tidy_details(self): + """ + Only call this if :meth:`is_undo_organize_folder_with_tidy_details` is true. + + :rtype: UndoOrganizeFolderWithTidyDetails + """ + if not self.is_undo_organize_folder_with_tidy_details(): + raise AttributeError("tag 'undo_organize_folder_with_tidy_details' not set") + return self._value + def get_user_tags_added_details(self): """ Only call this if :meth:`is_user_tags_added_details` is true. @@ -22095,7 +22153,7 @@ class EventType(bb.Union): :ivar EnabledDomainInvitesType EventType.enabled_domain_invites: (domains) Enabled domain invites (deprecated, no longer logged) :ivar ApplyNamingConventionType EventType.apply_naming_convention: - (file_operations) Applied a Naming Convention rule + (file_operations) Applied naming convention :ivar CreateFolderType EventType.create_folder: (file_operations) Created folders (deprecated, no longer logged) :ivar FileAddType EventType.file_add: (file_operations) Added files and/or @@ -22143,9 +22201,14 @@ class EventType(bb.Union): :ivar ObjectLabelUpdatedValueType EventType.object_label_updated_value: (file_operations) Updated a label's value :ivar OrganizeFolderWithTidyType EventType.organize_folder_with_tidy: - (file_operations) Organized a folder with the Tidy Up action + (file_operations) Organized a folder with multi-file organize :ivar RewindFolderType EventType.rewind_folder: (file_operations) Rewound a folder + :ivar UndoNamingConventionType EventType.undo_naming_convention: + (file_operations) Reverted naming convention + :ivar UndoOrganizeFolderWithTidyType + EventType.undo_organize_folder_with_tidy: (file_operations) Removed + multi-file organize :ivar UserTagsAddedType EventType.user_tags_added: (file_operations) Tagged a file :ivar UserTagsRemovedType EventType.user_tags_removed: (file_operations) @@ -24128,6 +24191,28 @@ def rewind_folder(cls, val): """ return cls('rewind_folder', val) + @classmethod + def undo_naming_convention(cls, val): + """ + Create an instance of this class set to the ``undo_naming_convention`` + tag with value ``val``. + + :param UndoNamingConventionType val: + :rtype: EventType + """ + return cls('undo_naming_convention', val) + + @classmethod + def undo_organize_folder_with_tidy(cls, val): + """ + Create an instance of this class set to the + ``undo_organize_folder_with_tidy`` tag with value ``val``. + + :param UndoOrganizeFolderWithTidyType val: + :rtype: EventType + """ + return cls('undo_organize_folder_with_tidy', val) + @classmethod def user_tags_added(cls, val): """ @@ -29073,6 +29158,22 @@ def is_rewind_folder(self): """ return self._tag == 'rewind_folder' + def is_undo_naming_convention(self): + """ + Check if the union tag is ``undo_naming_convention``. + + :rtype: bool + """ + return self._tag == 'undo_naming_convention' + + def is_undo_organize_folder_with_tidy(self): + """ + Check if the union tag is ``undo_organize_folder_with_tidy``. + + :rtype: bool + """ + return self._tag == 'undo_organize_folder_with_tidy' + def is_user_tags_added(self): """ Check if the union tag is ``user_tags_added``. @@ -32960,7 +33061,7 @@ def get_enabled_domain_invites(self): def get_apply_naming_convention(self): """ - (file_operations) Applied a Naming Convention rule + (file_operations) Applied naming convention Only call this if :meth:`is_apply_naming_convention` is true. @@ -33236,7 +33337,7 @@ def get_object_label_updated_value(self): def get_organize_folder_with_tidy(self): """ - (file_operations) Organized a folder with the Tidy Up action + (file_operations) Organized a folder with multi-file organize Only call this if :meth:`is_organize_folder_with_tidy` is true. @@ -33258,6 +33359,30 @@ def get_rewind_folder(self): raise AttributeError("tag 'rewind_folder' not set") return self._value + def get_undo_naming_convention(self): + """ + (file_operations) Reverted naming convention + + Only call this if :meth:`is_undo_naming_convention` is true. + + :rtype: UndoNamingConventionType + """ + if not self.is_undo_naming_convention(): + raise AttributeError("tag 'undo_naming_convention' not set") + return self._value + + def get_undo_organize_folder_with_tidy(self): + """ + (file_operations) Removed multi-file organize + + Only call this if :meth:`is_undo_organize_folder_with_tidy` is true. + + :rtype: UndoOrganizeFolderWithTidyType + """ + if not self.is_undo_organize_folder_with_tidy(): + raise AttributeError("tag 'undo_organize_folder_with_tidy' not set") + return self._value + def get_user_tags_added(self): """ (file_operations) Tagged a file @@ -38034,7 +38159,7 @@ class EventTypeArg(bb.Union): :ivar team_log.EventTypeArg.enabled_domain_invites: (domains) Enabled domain invites (deprecated, no longer logged) :ivar team_log.EventTypeArg.apply_naming_convention: (file_operations) - Applied a Naming Convention rule + Applied naming convention :ivar team_log.EventTypeArg.create_folder: (file_operations) Created folders (deprecated, no longer logged) :ivar team_log.EventTypeArg.file_add: (file_operations) Added files and/or @@ -38079,9 +38204,13 @@ class EventTypeArg(bb.Union): :ivar team_log.EventTypeArg.object_label_updated_value: (file_operations) Updated a label's value :ivar team_log.EventTypeArg.organize_folder_with_tidy: (file_operations) - Organized a folder with the Tidy Up action + Organized a folder with multi-file organize :ivar team_log.EventTypeArg.rewind_folder: (file_operations) Rewound a folder + :ivar team_log.EventTypeArg.undo_naming_convention: (file_operations) + Reverted naming convention + :ivar team_log.EventTypeArg.undo_organize_folder_with_tidy: + (file_operations) Removed multi-file organize :ivar team_log.EventTypeArg.user_tags_added: (file_operations) Tagged a file :ivar team_log.EventTypeArg.user_tags_removed: (file_operations) Removed tags @@ -39071,6 +39200,10 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition rewind_folder = None # Attribute is overwritten below the class definition + undo_naming_convention = None + # Attribute is overwritten below the class definition + undo_organize_folder_with_tidy = None + # Attribute is overwritten below the class definition user_tags_added = None # Attribute is overwritten below the class definition user_tags_removed = None @@ -40591,6 +40724,22 @@ def is_rewind_folder(self): """ return self._tag == 'rewind_folder' + def is_undo_naming_convention(self): + """ + Check if the union tag is ``undo_naming_convention``. + + :rtype: bool + """ + return self._tag == 'undo_naming_convention' + + def is_undo_organize_folder_with_tidy(self): + """ + Check if the union tag is ``undo_organize_folder_with_tidy``. + + :rtype: bool + """ + return self._tag == 'undo_organize_folder_with_tidy' + def is_user_tags_added(self): """ Check if the union tag is ``user_tags_added``. @@ -54457,7 +54606,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): class OrganizeFolderWithTidyDetails(bb.Struct): """ - Organized a folder with the Tidy Up action. + Organized a folder with multi-file organize. """ __slots__ = [ @@ -71021,6 +71170,86 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TwoAccountPolicy_validator = bv.Union(TwoAccountPolicy) +class UndoNamingConventionDetails(bb.Struct): + """ + Reverted naming convention. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(UndoNamingConventionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +UndoNamingConventionDetails_validator = bv.Struct(UndoNamingConventionDetails) + +class UndoNamingConventionType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(UndoNamingConventionType, self)._process_custom_annotations(annotation_type, field_path, processor) + +UndoNamingConventionType_validator = bv.Struct(UndoNamingConventionType) + +class UndoOrganizeFolderWithTidyDetails(bb.Struct): + """ + Removed multi-file organize. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(UndoOrganizeFolderWithTidyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +UndoOrganizeFolderWithTidyDetails_validator = bv.Struct(UndoOrganizeFolderWithTidyDetails) + +class UndoOrganizeFolderWithTidyType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(UndoOrganizeFolderWithTidyType, self)._process_custom_annotations(annotation_type, field_path, processor) + +UndoOrganizeFolderWithTidyType_validator = bv.Struct(UndoOrganizeFolderWithTidyType) + class UserLinkedAppLogInfo(AppLogInfo): """ User linked app @@ -73741,6 +73970,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._object_label_updated_value_details_validator = ObjectLabelUpdatedValueDetails_validator EventDetails._organize_folder_with_tidy_details_validator = OrganizeFolderWithTidyDetails_validator EventDetails._rewind_folder_details_validator = RewindFolderDetails_validator +EventDetails._undo_naming_convention_details_validator = UndoNamingConventionDetails_validator +EventDetails._undo_organize_folder_with_tidy_details_validator = UndoOrganizeFolderWithTidyDetails_validator EventDetails._user_tags_added_details_validator = UserTagsAddedDetails_validator EventDetails._user_tags_removed_details_validator = UserTagsRemovedDetails_validator EventDetails._email_ingest_receive_file_details_validator = EmailIngestReceiveFileDetails_validator @@ -74218,6 +74449,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'object_label_updated_value_details': EventDetails._object_label_updated_value_details_validator, 'organize_folder_with_tidy_details': EventDetails._organize_folder_with_tidy_details_validator, 'rewind_folder_details': EventDetails._rewind_folder_details_validator, + 'undo_naming_convention_details': EventDetails._undo_naming_convention_details_validator, + 'undo_organize_folder_with_tidy_details': EventDetails._undo_organize_folder_with_tidy_details_validator, 'user_tags_added_details': EventDetails._user_tags_added_details_validator, 'user_tags_removed_details': EventDetails._user_tags_removed_details_validator, 'email_ingest_receive_file_details': EventDetails._email_ingest_receive_file_details_validator, @@ -74698,6 +74931,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._object_label_updated_value_validator = ObjectLabelUpdatedValueType_validator EventType._organize_folder_with_tidy_validator = OrganizeFolderWithTidyType_validator EventType._rewind_folder_validator = RewindFolderType_validator +EventType._undo_naming_convention_validator = UndoNamingConventionType_validator +EventType._undo_organize_folder_with_tidy_validator = UndoOrganizeFolderWithTidyType_validator EventType._user_tags_added_validator = UserTagsAddedType_validator EventType._user_tags_removed_validator = UserTagsRemovedType_validator EventType._email_ingest_receive_file_validator = EmailIngestReceiveFileType_validator @@ -75174,6 +75409,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'object_label_updated_value': EventType._object_label_updated_value_validator, 'organize_folder_with_tidy': EventType._organize_folder_with_tidy_validator, 'rewind_folder': EventType._rewind_folder_validator, + 'undo_naming_convention': EventType._undo_naming_convention_validator, + 'undo_organize_folder_with_tidy': EventType._undo_organize_folder_with_tidy_validator, 'user_tags_added': EventType._user_tags_added_validator, 'user_tags_removed': EventType._user_tags_removed_validator, 'email_ingest_receive_file': EventType._email_ingest_receive_file_validator, @@ -75653,6 +75890,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._object_label_updated_value_validator = bv.Void() EventTypeArg._organize_folder_with_tidy_validator = bv.Void() EventTypeArg._rewind_folder_validator = bv.Void() +EventTypeArg._undo_naming_convention_validator = bv.Void() +EventTypeArg._undo_organize_folder_with_tidy_validator = bv.Void() EventTypeArg._user_tags_added_validator = bv.Void() EventTypeArg._user_tags_removed_validator = bv.Void() EventTypeArg._email_ingest_receive_file_validator = bv.Void() @@ -76129,6 +76368,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'object_label_updated_value': EventTypeArg._object_label_updated_value_validator, 'organize_folder_with_tidy': EventTypeArg._organize_folder_with_tidy_validator, 'rewind_folder': EventTypeArg._rewind_folder_validator, + 'undo_naming_convention': EventTypeArg._undo_naming_convention_validator, + 'undo_organize_folder_with_tidy': EventTypeArg._undo_organize_folder_with_tidy_validator, 'user_tags_added': EventTypeArg._user_tags_added_validator, 'user_tags_removed': EventTypeArg._user_tags_removed_validator, 'email_ingest_receive_file': EventTypeArg._email_ingest_receive_file_validator, @@ -76606,6 +76847,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.object_label_updated_value = EventTypeArg('object_label_updated_value') EventTypeArg.organize_folder_with_tidy = EventTypeArg('organize_folder_with_tidy') EventTypeArg.rewind_folder = EventTypeArg('rewind_folder') +EventTypeArg.undo_naming_convention = EventTypeArg('undo_naming_convention') +EventTypeArg.undo_organize_folder_with_tidy = EventTypeArg('undo_organize_folder_with_tidy') EventTypeArg.user_tags_added = EventTypeArg('user_tags_added') EventTypeArg.user_tags_removed = EventTypeArg('user_tags_removed') EventTypeArg.email_ingest_receive_file = EventTypeArg('email_ingest_receive_file') @@ -83160,6 +83403,20 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TwoAccountPolicy.enabled = TwoAccountPolicy('enabled') TwoAccountPolicy.other = TwoAccountPolicy('other') +UndoNamingConventionDetails._all_field_names_ = set([]) +UndoNamingConventionDetails._all_fields_ = [] + +UndoNamingConventionType.description.validator = bv.String() +UndoNamingConventionType._all_field_names_ = set(['description']) +UndoNamingConventionType._all_fields_ = [('description', UndoNamingConventionType.description.validator)] + +UndoOrganizeFolderWithTidyDetails._all_field_names_ = set([]) +UndoOrganizeFolderWithTidyDetails._all_fields_ = [] + +UndoOrganizeFolderWithTidyType.description.validator = bv.String() +UndoOrganizeFolderWithTidyType._all_field_names_ = set(['description']) +UndoOrganizeFolderWithTidyType._all_fields_ = [('description', UndoOrganizeFolderWithTidyType.description.validator)] + UserLinkedAppLogInfo._field_names_ = set([]) UserLinkedAppLogInfo._all_field_names_ = AppLogInfo._all_field_names_.union(UserLinkedAppLogInfo._field_names_) UserLinkedAppLogInfo._fields_ = [] diff --git a/spec b/spec index 28dfbe46..bca5f144 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 28dfbe46c05026fdd867e4fea67cd0ea9acfbca9 +Subproject commit bca5f1448ac6f65a17c9df95a5175cf7b878ad90 From 015437429be224732990041164a21a0501235db1 Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Wed, 8 Dec 2021 09:22:59 -0800 Subject: [PATCH 61/90] [Dependabot] Reduce frequency to monthly to reduce noise (#400) --- .github/dependabot.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 15f7908a..2f26c381 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,9 +8,9 @@ updates: - package-ecosystem: "pip" # See documentation for possible values directory: "/" # Location of package manifests schedule: - interval: "daily" + interval: "monthly" - package-ecosystem: "github-actions" directory: "/" schedule: - interval: "daily" \ No newline at end of file + interval: "monthly" From 62e49c1030ef4f68ddc4d5d71543a4f9e6fb631c Mon Sep 17 00:00:00 2001 From: Brent Bumann Date: Wed, 19 Jan 2022 10:38:07 -0800 Subject: [PATCH 62/90] Ensure Dropbox error is thrown in refresh access token (#407) Ensure Dropbox error is thrown in refresh access token --- dropbox/dropbox_client.py | 87 ++++++++++++++++++-------------- test/integration/test_dropbox.py | 2 +- 2 files changed, 51 insertions(+), 38 deletions(-) diff --git a/dropbox/dropbox_client.py b/dropbox/dropbox_client.py index afe664a6..b1fdec89 100644 --- a/dropbox/dropbox_client.py +++ b/dropbox/dropbox_client.py @@ -376,7 +376,6 @@ def refresh_access_token(self, host=API_HOST, scope=None): :param scope: list of permission scopes for access token :return: """ - if scope is not None and (len(scope) == 0 or not isinstance(scope, list)): raise BadInputException("Scope list must be of type list") @@ -401,12 +400,7 @@ def refresh_access_token(self, host=API_HOST, scope=None): if self._timeout: timeout = self._timeout res = self._session.post(url, data=body, timeout=timeout) - if res.status_code == 400 and res.json()['error'] == 'invalid_grant': - request_id = res.headers.get('x-dropbox-request-id') - err = stone_serializers.json_compat_obj_decode( - AuthError_validator, 'invalid_access_token') - raise AuthError(request_id, err) - res.raise_for_status() + self.raise_dropbox_error_for_resp(res) token_content = res.json() self._oauth2_access_token = token_content["access_token"] @@ -596,53 +590,72 @@ def request_json_string(self, verify=True, timeout=timeout, ) - + self.raise_dropbox_error_for_resp(r) 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: + if r.status_code in (403, 404, 409): + raw_resp = r.content.decode('utf-8') + return RouteErrorResult(request_id, raw_resp) + + 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) + + def raise_dropbox_error_for_resp(self, res): + """Checks for errors from a res and handles appropiately. + + :param res: Response of an api request. + """ + request_id = res.headers.get('x-dropbox-request-id') + if res.status_code >= 500: + raise InternalServerError(request_id, res.status_code, res.text) + elif res.status_code == 400: + try: + if res.json()['error'] == 'invalid_grant': + request_id = res.headers.get('x-dropbox-request-id') + err = stone_serializers.json_compat_obj_decode( + AuthError_validator, 'invalid_access_token') + raise AuthError(request_id, err) + else: + raise BadInputError(request_id, res.text) + except ValueError: + raise BadInputError(request_id, res.text) + elif res.status_code == 401: + assert res.headers.get('content-type') == 'application/json', ( + 'Expected content-type to be application/json, got %r' % + res.headers.get('content-type')) err = stone_serializers.json_compat_obj_decode( - AuthError_validator, r.json()['error']) + AuthError_validator, res.json()['error']) raise AuthError(request_id, err) - elif r.status_code == HTTP_STATUS_INVALID_PATH_ROOT: + elif res.status_code == HTTP_STATUS_INVALID_PATH_ROOT: err = stone_serializers.json_compat_obj_decode( - PathRootError_validator, r.json()['error']) + PathRootError_validator, res.json()['error']) raise PathRootError(request_id, err) - elif r.status_code == 429: + elif res.status_code == 429: err = None - if r.headers.get('content-type') == 'application/json': + if res.headers.get('content-type') == 'application/json': err = stone_serializers.json_compat_obj_decode( - RateLimitError_validator, r.json()['error']) + RateLimitError_validator, res.json()['error']) retry_after = err.retry_after else: - retry_after_str = r.headers.get('retry-after') + retry_after_str = res.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) + elif res.status_code in (403, 404, 409): + # special case handled by requester + return + elif not (200 <= res.status_code <= 299): + raise HttpError(request_id, res.status_code, res.text) def _get_route_url(self, hostname, route_name): """Returns the URL of the route. diff --git a/test/integration/test_dropbox.py b/test/integration/test_dropbox.py index a7824e6e..5aeb3232 100644 --- a/test/integration/test_dropbox.py +++ b/test/integration/test_dropbox.py @@ -153,7 +153,7 @@ def test_default_oauth2_urls(self): def test_bad_auth(self): # Test malformed token malformed_token_dbx = Dropbox(MALFORMED_TOKEN) - with pytest.raises(BadInputError) as cm: + with pytest.raises(BadInputError,) as cm: malformed_token_dbx.files_list_folder('') assert 'token is malformed' in cm.value.message From 2f8899ff9a0738f003f2b70980dfe2e22e89e9a5 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Tue, 25 Jan 2022 13:38:52 -0800 Subject: [PATCH 63/90] Add scope to client docs (#408) Adds the "scope" attribute to the exported clients, so that they appear in the docstrings of routes that have a scope defined. After running: ``` python generate_base_client.py tox -e docs ``` I checked the html build files and scopes are showing up as expected. --- generate_base_client.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/generate_base_client.py b/generate_base_client.py index 63c67958..dfdff9d5 100755 --- a/generate_base_client.py +++ b/generate_base_client.py @@ -57,15 +57,29 @@ def main(): o = subprocess.check_output( (['python', '-m', 'stone.cli', 'python_client', dropbox_pkg_path] + - specs + ['-a', 'host', '-a', 'style', '-a', 'auth'] + - ['--', '-w', 'user,app,noauth', '-m', 'base', '-c', 'DropboxBase', '-t', 'dropbox'])) + specs + ['-a', 'host', '-a', 'style', '-a', 'auth', '-a', 'scope'] + + [ + '--', + '-w', 'user,app,noauth', + '-m', 'base', + '-c', 'DropboxBase', + '-t', 'dropbox', + '-a', 'scope' + ])) if o: print('Output:', o) o = subprocess.check_output( (['python', '-m', 'stone.cli', 'python_client', dropbox_pkg_path] + - specs + ['-a', 'host', '-a', 'style', '-a', 'auth'] + - ['--', '-w', 'team', '-m', 'base_team', '-c', 'DropboxTeamBase', '-t', 'dropbox'])) + specs + ['-a', 'host', '-a', 'style', '-a', 'auth', '-a', 'scope'] + + [ + '--', + '-w', 'team', + '-m', 'base_team', + '-c', 'DropboxTeamBase', + '-t', 'dropbox', + '-a', 'scope' + ])) if o: print('Output:', o) From 09d9ef7ad992d27794dd68305640b31a1fd61601 Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Mon, 31 Jan 2022 13:38:05 -0500 Subject: [PATCH 64/90] [Setup] Update deprecated description-file to use description_file (#410) --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 177f96e3..0ccf0a35 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,7 +3,7 @@ test=pytest [metadata] -description-file=README.rst +description_file=README.rst [tool:pytest] norecursedirs = .tox .venv .venv-* stone From cc10efb12ec576e086c1c1c0decae1425ba76804 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 2 Feb 2022 18:02:50 -0500 Subject: [PATCH 65/90] Automated Spec Update (#412) Change Notes: files Namespace - Add MoveIntoFamilyError unions - Add payload_too_large and cant_move_into_family errors sharing_files Namespace - doc update team_log_generated Namespace - Add DataResidencyMigrationRequestSuccessfulDetails, DataResidencyMigrationRequestUnsuccessfulDetails, DataResidencyMigrationRequestSuccessfulType, DataResidencyMigrationRequestUnsuccessfulType structs - Update ExtendedVersionHistoryPolicy union to include default - Update Examples Team Policies Namespace: - Update ExternalDriveBackupPolicyState union to include default --- dropbox/account.py | 6 +- dropbox/auth.py | 12 +- dropbox/base.py | 507 ++++++++++++++++++++++++++++++- dropbox/base_team.py | 288 ++++++++++++++++++ dropbox/check.py | 16 +- dropbox/common.py | 22 +- dropbox/contacts.py | 12 +- dropbox/file_properties.py | 100 +++---- dropbox/file_requests.py | 56 ++-- dropbox/files.py | 592 +++++++++++++++++++++++-------------- dropbox/paper.py | 102 +++---- dropbox/sharing.py | 272 ++++++++--------- dropbox/team.py | 540 ++++++++++++++++----------------- dropbox/team_log.py | 340 +++++++++++++++++++-- dropbox/team_policies.py | 15 + dropbox/users.py | 30 +- spec | 2 +- 17 files changed, 2067 insertions(+), 845 deletions(-) diff --git a/dropbox/account.py b/dropbox/account.py index 1748637f..8a30b5d7 100644 --- a/dropbox/account.py +++ b/dropbox/account.py @@ -248,9 +248,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SetProfilePhotoArg_validator, SetProfilePhotoResult_validator, SetProfilePhotoError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) ROUTES = { diff --git a/dropbox/auth.py b/dropbox/auth.py index 4c85bd9d..6c122692 100644 --- a/dropbox/auth.py +++ b/dropbox/auth.py @@ -679,9 +679,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TokenFromOAuth1Arg_validator, TokenFromOAuth1Result_validator, TokenFromOAuth1Error_validator, - {'auth': u'app', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'app', + 'host': 'api', + 'style': 'rpc'}, ) token_revoke = bb.Route( 'token/revoke', @@ -690,9 +690,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), bv.Void(), bv.Void(), - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) ROUTES = { diff --git a/dropbox/base.py b/dropbox/base.py index b1ec2c63..009d47ab 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -42,6 +42,9 @@ def account_set_profile_photo(self, """ Sets a user's profile photo. + Route attributes: + scope: account_info.write + :param photo: Image to set as the user's new profile photo. :type photo: :class:`dropbox.account.PhotoSourceArg` :rtype: :class:`dropbox.account.SetProfilePhotoResult` @@ -110,7 +113,7 @@ def auth_token_revoke(self): # Routes in check namespace def check_app(self, - query=u''): + query=''): """ This endpoint performs App Authentication, validating the supplied app key and secret, and returns the supplied string, to allow you to test @@ -132,7 +135,7 @@ def check_app(self, return r def check_user(self, - query=u''): + query=''): """ This endpoint performs User Authentication, validating the supplied access token, and returns the supplied string, to allow you to test your @@ -141,6 +144,9 @@ def check_user(self, least part of the Dropbox API infrastructure is working and that the access token is valid. + Route attributes: + scope: account_info.read + :param str query: The string that you'd like to be echoed back to you. :rtype: :class:`dropbox.check.EchoResult` """ @@ -162,6 +168,9 @@ def contacts_delete_manual_contacts(self): on your team or who you imported. New contacts will be added when you share. + Route attributes: + scope: contacts.write + :rtype: None """ arg = None @@ -178,6 +187,9 @@ def contacts_delete_manual_contacts_batch(self, """ Removes manually added contacts from the given list. + Route attributes: + scope: contacts.write + :param List[str] email_addresses: List of manually added contacts to be deleted. :rtype: None @@ -206,6 +218,9 @@ def file_properties_properties_add(self, :meth:`file_properties_templates_add_for_user` or :meth:`file_properties_templates_add_for_team` to create new templates. + Route attributes: + scope: files.metadata.write + :param str path: A unique identifier for the file or folder. :param List[:class:`dropbox.file_properties.PropertyGroup`] property_groups: The property groups which are to be added to a @@ -238,6 +253,9 @@ def file_properties_properties_overwrite(self, from a property group, whereas :meth:`file_properties_properties_update` will only delete fields that are explicitly marked for deletion. + Route attributes: + scope: files.metadata.write + :param str path: A unique identifier for the file or folder. :param List[:class:`dropbox.file_properties.PropertyGroup`] property_groups: The property groups "snapshot" updates to force @@ -271,6 +289,9 @@ def file_properties_properties_remove(self, see :meth:`file_properties_templates_remove_for_user` or :meth:`file_properties_templates_remove_for_team`. + Route attributes: + scope: files.metadata.write + :param str path: A unique identifier for the file or folder. :param List[str] property_template_ids: A list of identifiers for a template created by :meth:`file_properties_templates_add_for_user` @@ -297,6 +318,9 @@ def file_properties_properties_search(self, """ Search across property templates for particular property field values. + Route attributes: + scope: files.metadata.read + :param List[:class:`dropbox.file_properties.PropertiesSearchQuery`] queries: Queries to search. :param template_filter: Filter results to contain only properties @@ -325,6 +349,9 @@ def file_properties_properties_search_continue(self, :meth:`file_properties_properties_search`, use this to paginate through all search results. + Route attributes: + scope: files.metadata.read + :param str cursor: The cursor returned by your last call to :meth:`file_properties_properties_search` or :meth:`file_properties_properties_search_continue`. @@ -355,6 +382,9 @@ def file_properties_properties_update(self, group, whereas :meth:`file_properties_properties_overwrite` will delete any fields that are omitted from a property group. + Route attributes: + scope: files.metadata.write + :param str path: A unique identifier for the file or folder. :param List[:class:`dropbox.file_properties.PropertyGroupUpdate`] update_property_groups: The property groups "delta" updates to @@ -384,6 +414,9 @@ def file_properties_templates_add_for_user(self, :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. + Route attributes: + scope: files.metadata.write + :rtype: :class:`dropbox.file_properties.AddTemplateResult` :raises: :class:`.exceptions.ApiError` @@ -407,6 +440,9 @@ def file_properties_templates_get_for_user(self, Get the schema for a specified template. This endpoint can't be called on a team member or admin's behalf. + Route attributes: + scope: files.metadata.read + :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`. @@ -431,6 +467,9 @@ def file_properties_templates_list_for_user(self): template use :meth:`file_properties_templates_get_for_user`. This endpoint can't be called on a team member or admin's behalf. + Route attributes: + scope: files.metadata.read + :rtype: :class:`dropbox.file_properties.ListTemplateResult` :raises: :class:`.exceptions.ApiError` @@ -454,6 +493,9 @@ def file_properties_templates_remove_for_user(self, associated with the template will also be removed. This action cannot be undone. + Route attributes: + scope: files.metadata.write + :param str template_id: An identifier for a template created by :meth:`file_properties_templates_add_for_user` or :meth:`file_properties_templates_add_for_team`. @@ -483,6 +525,9 @@ def file_properties_templates_update_for_user(self, templates. This endpoint can't be called on a team member or admin's behalf. + Route attributes: + scope: files.metadata.write + :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`. @@ -520,6 +565,9 @@ def file_requests_count(self): Returns the total number of file requests owned by this user. Includes both open and closed file requests. + Route attributes: + scope: file_requests.read + :rtype: :class:`dropbox.file_requests.CountFileRequestsResult` """ arg = None @@ -540,6 +588,9 @@ def file_requests_create(self, """ Creates a file request for this user. + Route attributes: + scope: file_requests.write + :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 @@ -575,6 +626,9 @@ def file_requests_delete(self, """ Delete a batch of closed file requests. + Route attributes: + scope: file_requests.write + :param List[str] ids: List IDs of the file requests to delete. :rtype: :class:`dropbox.file_requests.DeleteFileRequestsResult` :raises: :class:`.exceptions.ApiError` @@ -595,6 +649,9 @@ def file_requests_delete_all_closed(self): """ Delete all closed file requests owned by this user. + Route attributes: + scope: file_requests.write + :rtype: :class:`dropbox.file_requests.DeleteAllClosedFileRequestsResult` """ arg = None @@ -611,6 +668,9 @@ def file_requests_get(self, """ Returns the specified file request. + Route attributes: + scope: file_requests.read + :param str id: The ID of the file request to retrieve. :rtype: :class:`dropbox.file_requests.FileRequest` """ @@ -630,6 +690,9 @@ def file_requests_list_v2(self, app folder permission, this will only return file requests with destinations in the app folder. + Route attributes: + scope: file_requests.read + :param int limit: The maximum number of file requests that should be returned per request. :rtype: :class:`dropbox.file_requests.ListFileRequestsV2Result` @@ -649,6 +712,9 @@ def file_requests_list(self): app folder permission, this will only return file requests with destinations in the app folder. + Route attributes: + scope: file_requests.read + :rtype: :class:`dropbox.file_requests.ListFileRequestsResult` """ arg = None @@ -668,6 +734,9 @@ def file_requests_list_continue(self, previous call to :meth:`file_requests_list_v2` or :meth:`file_requests_list_continue`. + Route attributes: + scope: file_requests.read + :param str cursor: The cursor returned by the previous API call specified in the endpoint description. :rtype: :class:`dropbox.file_requests.ListFileRequestsV2Result` @@ -695,6 +764,9 @@ def file_requests_update(self, """ Update a file request. + Route attributes: + scope: file_requests.write + :param str id: The ID of the file request to update. :param Nullable[str] title: The new title of the file request. Must not be empty. @@ -738,6 +810,9 @@ def files_alpha_get_metadata(self, compatible with the properties API. Note: Metadata for the root folder is unsupported. + Route attributes: + scope: files.metadata.read + :param Nullable[List[str]] include_property_templates: If set to a valid list of template IDs, ``FileMetadata.property_groups`` is set for files with custom properties. @@ -781,6 +856,9 @@ def files_alpha_upload(self, larger than 150 MB. Instead, create an upload session with :meth:`files_upload_session_start`. + Route attributes: + scope: files.content.write + :param bytes f: Contents to upload. :rtype: :class:`dropbox.files.FileMetadata` """ @@ -813,6 +891,9 @@ def files_copy_v2(self, 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. + Route attributes: + scope: files.content.write + :param bool allow_shared_folder: This flag has no effect. :param bool autorename: If there's a conflict, have the Dropbox server try to autorename the file to avoid the conflict. @@ -848,6 +929,9 @@ def files_copy(self, 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. + Route attributes: + scope: files.content.write + :param bool allow_shared_folder: This flag has no effect. :param bool autorename: If there's a conflict, have the Dropbox server try to autorename the file to avoid the conflict. @@ -889,6 +973,9 @@ def files_copy_batch_v2(self, copy job in background. Please use :meth:`files_copy_batch_check_v2` to check the job status. + Route attributes: + scope: files.content.write + :param List[:class:`dropbox.files.RelocationPath`] entries: List of entries to be moved or copied. Each entry is :class:`dropbox.files.RelocationPath`. @@ -917,6 +1004,9 @@ def files_copy_batch(self, async copy job in background. Please use :meth:`files_copy_batch_check` to check the job status. + Route attributes: + scope: files.content.write + :param bool allow_shared_folder: This flag has no effect. :param bool allow_ownership_transfer: Allow moves by owner even if it would result in an ownership transfer for the content being moved. @@ -945,6 +1035,9 @@ def files_copy_batch_check_v2(self, Returns the status of an asynchronous job for :meth:`files_copy_batch_v2`. It returns list of results for each entry. + Route attributes: + scope: files.content.write + :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.RelocationBatchV2JobStatus` @@ -968,6 +1061,9 @@ def files_copy_batch_check(self, Returns the status of an asynchronous job for :meth:`files_copy_batch`. If success, it returns list of results for each entry. + Route attributes: + scope: files.content.write + :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` @@ -996,6 +1092,9 @@ def files_copy_reference_get(self, used to save that file or folder to another user's Dropbox by passing it to :meth:`files_copy_reference_save`. + Route attributes: + scope: files.content.write + :param str path: The path to the file or folder you want to get a copy reference to. :rtype: :class:`dropbox.files.GetCopyReferenceResult` @@ -1020,6 +1119,9 @@ def files_copy_reference_save(self, Save a copy reference returned by :meth:`files_copy_reference_get` to the user's Dropbox. + Route attributes: + scope: files.content.write + :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. @@ -1045,6 +1147,9 @@ def files_create_folder_v2(self, """ Create a folder at a given path. + Route attributes: + scope: files.content.write + :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. @@ -1070,6 +1175,9 @@ def files_create_folder(self, """ Create a folder at a given path. + Route attributes: + scope: files.content.write + :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. @@ -1105,6 +1213,9 @@ def files_create_folder_batch(self, behaviour by using the ``CreateFolderBatchArg.force_async`` flag. Use :meth:`files_create_folder_batch_check` to check the job status. + Route attributes: + scope: files.content.write + :param List[str] paths: List of paths to be created in the user's Dropbox. Duplicate path arguments in the batch are considered only once. @@ -1132,6 +1243,9 @@ def files_create_folder_batch_check(self, :meth:`files_create_folder_batch`. If success, it returns list of result for each entry. + Route attributes: + scope: files.content.write + :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.CreateFolderBatchJobStatus` @@ -1160,6 +1274,9 @@ def files_delete_v2(self, :class:`dropbox.files.FolderMetadata` for the item at time of deletion, and not a :class:`dropbox.files.DeletedMetadata` object. + Route attributes: + scope: files.content.write + :param str path: Path in the user's Dropbox to delete. :param Nullable[str] parent_rev: Perform delete if given "rev" matches the existing file's latest "rev". This field does not support @@ -1191,6 +1308,9 @@ def files_delete(self, :class:`dropbox.files.FolderMetadata` for the item at time of deletion, and not a :class:`dropbox.files.DeletedMetadata` object. + Route attributes: + scope: files.content.write + :param str path: Path in the user's Dropbox to delete. :param Nullable[str] parent_rev: Perform delete if given "rev" matches the existing file's latest "rev". This field does not support @@ -1222,6 +1342,9 @@ def files_delete_batch(self, returns a job ID immediately and runs the delete batch asynchronously. Use :meth:`files_delete_batch_check` to check the job status. + Route attributes: + scope: files.content.write + :type entries: List[:class:`dropbox.files.DeleteArg`] :rtype: :class:`dropbox.files.DeleteBatchLaunch` """ @@ -1241,6 +1364,9 @@ def files_delete_batch_check(self, :meth:`files_delete_batch`. If success, it returns list of result for each entry. + Route attributes: + scope: files.content.write + :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` @@ -1264,6 +1390,9 @@ def files_download(self, """ Download a file from a user's Dropbox. + Route attributes: + scope: files.content.read + :param str path: The path of the file to download. :param Nullable[str] rev: Please specify revision in ``path`` instead. :rtype: (:class:`dropbox.files.FileMetadata`, @@ -1296,6 +1425,9 @@ def files_download_to_file(self, """ Download a file from a user's Dropbox. + Route attributes: + scope: files.content.read + :param str download_path: Path on local machine to save file. :param str path: The path of the file to download. :param Nullable[str] rev: Please specify revision in ``path`` instead. @@ -1325,6 +1457,9 @@ def files_download_zip(self, file and folder entries, including the top level folder. The input cannot be a single file. + Route attributes: + scope: files.content.read + :param str path: The path of the folder to download. :rtype: (:class:`dropbox.files.DownloadZipResult`, :class:`requests.models.Response`) @@ -1358,6 +1493,9 @@ def files_download_zip_to_file(self, file and folder entries, including the top level folder. The input cannot be a single file. + Route attributes: + scope: files.content.read + :param str download_path: Path on local machine to save file. :param str path: The path of the folder to download. :rtype: :class:`dropbox.files.DownloadZipResult` @@ -1384,6 +1522,9 @@ def files_export(self, files that cannot be downloaded directly and whose ``ExportResult.file_metadata`` has ``ExportInfo.export_as`` populated. + Route attributes: + scope: files.content.read + :param str path: The path of the file to be exported. :param Nullable[str] export_format: The file format to which the file should be exported. This must be one of the formats listed in the @@ -1422,6 +1563,9 @@ def files_export_to_file(self, files that cannot be downloaded directly and whose ``ExportResult.file_metadata`` has ``ExportInfo.export_as`` populated. + Route attributes: + scope: files.content.read + :param str download_path: Path on local machine to save file. :param str path: The path of the file to be exported. :param Nullable[str] export_format: The file format to which the file @@ -1451,6 +1595,9 @@ def files_get_file_lock_batch(self, """ Return the lock metadata for the given list of paths. + Route attributes: + scope: files.content.read + :param List[:class:`dropbox.files.LockFileArg`] entries: List of 'entries'. Each 'entry' contains a path of the file which will be locked or queried. Duplicate path arguments in the batch are @@ -1480,6 +1627,9 @@ def files_get_metadata(self, Returns the metadata for a file or folder. Note: Metadata for the root folder is unsupported. + Route attributes: + scope: files.metadata.read + :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. @@ -1524,6 +1674,9 @@ def files_get_preview(self, extensions: .csv, .ods, .xls, .xlsm, .gsheet, .xlsx. Other formats will return an unsupported extension error. + Route attributes: + scope: files.content.read + :param str path: The path of the file to preview. :param Nullable[str] rev: Please specify revision in ``path`` instead. :rtype: (:class:`dropbox.files.FileMetadata`, @@ -1561,6 +1714,9 @@ def files_get_preview_to_file(self, extensions: .csv, .ods, .xls, .xlsm, .gsheet, .xlsx. Other formats will return an unsupported extension error. + Route attributes: + scope: files.content.read + :param str download_path: Path on local machine to save file. :param str path: The path of the file to preview. :param Nullable[str] rev: Please specify revision in ``path`` instead. @@ -1589,6 +1745,9 @@ def files_get_temporary_link(self, be used to display content directly in the browser. The Content-Type of the link is determined automatically by the file's mime type. + Route attributes: + scope: files.content.read + :param str path: The path to the file you want a temporary link to. :rtype: :class:`dropbox.files.GetTemporaryLinkResult` :raises: :class:`.exceptions.ApiError` @@ -1640,6 +1799,9 @@ def files_get_temporary_upload_link(self, unsuccessful temporary upload link consumption response: Temporary upload link has been recently consumed. + Route attributes: + scope: files.content.write + :param commit_info: Contains the path and other optional modifiers for the future upload commit. Equivalent to the parameters provided to :meth:`files_upload`. @@ -1670,6 +1832,9 @@ def files_get_thumbnail(self, and bmp. Photos that are larger than 20MB in size won't be converted to a thumbnail. + Route attributes: + scope: files.content.read + :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 @@ -1717,6 +1882,9 @@ def files_get_thumbnail_to_file(self, and bmp. Photos that are larger than 20MB in size won't be converted to a thumbnail. + Route attributes: + scope: files.content.read + :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 @@ -1758,6 +1926,9 @@ def files_get_thumbnail_v2(self, and bmp. Photos that are larger than 20MB in size won't be converted to a thumbnail. + Route attributes: + scope: files.content.read + :param resource: Information specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path. @@ -1808,6 +1979,9 @@ def files_get_thumbnail_to_file_v2(self, and bmp. Photos that are larger than 20MB in size won't be converted to a thumbnail. + Route attributes: + scope: files.content.read + :param str download_path: Path on local machine to save file. :param resource: Information specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a @@ -1850,6 +2024,9 @@ def files_get_thumbnail_batch(self, Photos that are larger than 20MB in size won't be converted to a thumbnail. + Route attributes: + scope: files.content.read + :param List[:class:`dropbox.files.ThumbnailArg`] entries: List of files to get thumbnails. :rtype: :class:`dropbox.files.GetThumbnailBatchResult` @@ -1904,6 +2081,9 @@ def files_list_folder(self, user. If your app implements retry logic, please hold off the retry until the previous request finishes. + Route attributes: + scope: files.metadata.read + :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 @@ -1964,6 +2144,9 @@ def files_list_folder_continue(self, this to paginate through all files and retrieve updates to the folder, following the same rules as documented for :meth:`files_list_folder`. + Route attributes: + scope: files.metadata.read + :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` @@ -1999,6 +2182,9 @@ def files_list_folder_get_latest_cursor(self, know about new files and modifications and doesn't need to know about files that already exist in Dropbox. + Route attributes: + scope: files.metadata.read + :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 @@ -2064,6 +2250,9 @@ def files_list_folder_longpoll(self, server-side notifications, check out our `webhooks documentation `_. + Route attributes: + scope: files.metadata.read + :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. @@ -2103,6 +2292,9 @@ def files_list_revisions(self, ``ListRevisionsMode.id``. The ``ListRevisionsMode.id`` mode is useful to retrieve revisions for a given file across moves or renames. + Route attributes: + scope: files.metadata.read + :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. @@ -2133,6 +2325,9 @@ def files_lock_file_batch(self, been locked. Returns a list of the locked file paths and their metadata after this operation. + Route attributes: + scope: files.content.write + :param List[:class:`dropbox.files.LockFileArg`] entries: List of 'entries'. Each 'entry' contains a path of the file which will be locked or queried. Duplicate path arguments in the batch are @@ -2163,6 +2358,9 @@ def files_move_v2(self, the source path is a folder all its contents will be moved. Note that we do not currently support case-only renaming. + Route attributes: + scope: files.content.write + :param bool allow_shared_folder: This flag has no effect. :param bool autorename: If there's a conflict, have the Dropbox server try to autorename the file to avoid the conflict. @@ -2198,6 +2396,9 @@ def files_move(self, 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. + Route attributes: + scope: files.content.write + :param bool allow_shared_folder: This flag has no effect. :param bool autorename: If there's a conflict, have the Dropbox server try to autorename the file to avoid the conflict. @@ -2241,6 +2442,9 @@ def files_move_batch_v2(self, move job in background. Please use :meth:`files_move_batch_check_v2` to check the job status. + Route attributes: + scope: files.content.write + :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. @@ -2268,6 +2472,9 @@ def files_move_batch(self, async moving job in background. Please use :meth:`files_move_batch_check` to check the job status. + Route attributes: + scope: files.content.write + :param bool allow_shared_folder: This flag has no effect. :param bool allow_ownership_transfer: Allow moves by owner even if it would result in an ownership transfer for the content being moved. @@ -2296,6 +2503,9 @@ def files_move_batch_check_v2(self, Returns the status of an asynchronous job for :meth:`files_move_batch_v2`. It returns list of results for each entry. + Route attributes: + scope: files.content.write + :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.RelocationBatchV2JobStatus` @@ -2319,6 +2529,9 @@ def files_move_batch_check(self, Returns the status of an asynchronous job for :meth:`files_move_batch`. If success, it returns list of results for each entry. + Route attributes: + scope: files.content.write + :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` @@ -2347,6 +2560,9 @@ def files_paper_create(self, """ Creates a new Paper doc with the provided content. + Route attributes: + scope: files.content.write + :param bytes f: Contents to upload. :param str path: The fully qualified path to the location in the user's Dropbox where the Paper Doc should be created. This should include @@ -2378,6 +2594,9 @@ def files_paper_update(self, """ Updates an existing Paper doc with the provided content. + Route attributes: + scope: files.content.write + :param bytes f: Contents to upload. :param str path: Path in the user's Dropbox to update. The path must correspond to a Paper doc or an error will be returned. @@ -2417,6 +2636,9 @@ def files_permanently_delete(self, route to successfully delete, then fail to permanently delete. Note: This endpoint is only available for Dropbox Business apps. + Route attributes: + scope: files.permanent_delete + :param str path: Path in the user's Dropbox to delete. :param Nullable[str] parent_rev: Perform delete if given "rev" matches the existing file's latest "rev". This field does not support @@ -2441,6 +2663,9 @@ def files_properties_add(self, path, property_groups): """ + Route attributes: + scope: files.metadata.write + :param str path: A unique identifier for the file or folder. :param List[:class:`dropbox.files.PropertyGroup`] property_groups: The property groups which are to be added to a Dropbox file. No two @@ -2469,6 +2694,9 @@ def files_properties_overwrite(self, path, property_groups): """ + Route attributes: + scope: files.metadata.write + :param str path: A unique identifier for the file or folder. :param List[:class:`dropbox.files.PropertyGroup`] property_groups: The property groups "snapshot" updates to force apply. No two groups in @@ -2497,6 +2725,9 @@ def files_properties_remove(self, path, property_template_ids): """ + Route attributes: + scope: files.metadata.write + :param str path: A unique identifier for the file or folder. :param List[str] property_template_ids: A list of identifiers for a template created by :meth:`files_templates_add_for_user` or @@ -2524,6 +2755,9 @@ def files_properties_remove(self, def files_properties_template_get(self, template_id): """ + Route attributes: + scope: files.metadata.read + :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`. @@ -2547,6 +2781,16 @@ def files_properties_template_get(self, return r def files_properties_template_list(self): + """ + Route attributes: + scope: files.metadata.read + + :rtype: :class:`dropbox.files.ListTemplateResult` + :raises: :class:`.exceptions.ApiError` + + If this raises, ApiError will contain: + :class:`dropbox.files.TemplateError` + """ warnings.warn( 'properties/template/list is deprecated.', DeprecationWarning, @@ -2564,6 +2808,9 @@ def files_properties_update(self, path, update_property_groups): """ + Route attributes: + scope: files.metadata.write + :param str path: A unique identifier for the file or folder. :param List[:class:`dropbox.files.PropertyGroupUpdate`] update_property_groups: The property groups "delta" updates to @@ -2594,6 +2841,9 @@ def files_restore(self, """ Restore a specific revision of a file to the given path. + Route attributes: + scope: files.content.write + :param str path: The path to save the restored file. :param str rev: The revision to restore. :rtype: :class:`dropbox.files.FileMetadata` @@ -2622,6 +2872,9 @@ def files_save_url(self, exists, the file will be renamed to avoid the conflict (e.g. myfile (1).txt). + Route attributes: + scope: files.content.write + :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` @@ -2645,6 +2898,9 @@ def files_save_url_check_job_status(self, """ Check the status of a :meth:`files_save_url` job. + Route attributes: + scope: files.content.write + :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` @@ -2673,6 +2929,9 @@ def files_search(self, in search results within a few seconds and older revisions of existing files may still match your query for up to a few days. + Route attributes: + scope: files.metadata.read + :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. Query string may be @@ -2722,6 +2981,9 @@ def files_search_v2(self, search results due to a short delay in indexing. Duplicate results may be returned across pages. Some results may not be returned. + Route attributes: + scope: files.metadata.read + :param str query: The string to search for. May match across multiple fields based on the request arguments. :param Nullable[:class:`dropbox.files.SearchOptions`] options: Options @@ -2758,6 +3020,9 @@ def files_search_continue_v2(self, search results due to a short delay in indexing. Duplicate results may be returned across pages. Some results may not be returned. + Route attributes: + scope: files.metadata.read + :param str cursor: The cursor returned by your last call to :meth:`files_search_v2`. Used to fetch the next page of results. :rtype: :class:`dropbox.files.SearchV2Result` @@ -2782,6 +3047,9 @@ def files_tags_add(self, Add a tag to an item. A tag is a string. No more than 20 tags can be added to a given item. + Route attributes: + scope: files.metadata.write + :param str path: Path to the item to be tagged. :param str tag_text: The value of the tag to add. :rtype: None @@ -2805,6 +3073,9 @@ def files_tags_get(self, """ Get list of tags assigned to items. + Route attributes: + scope: files.metadata.read + :param List[str] paths: Path to the items. :rtype: :class:`dropbox.files.GetTagsResult` :raises: :class:`.exceptions.ApiError` @@ -2827,6 +3098,9 @@ def files_tags_remove(self, """ Remove a tag from an item. + Route attributes: + scope: files.metadata.write + :param str path: Path to the item to tag. :param str tag_text: The tag to remove. :rtype: None @@ -2853,6 +3127,9 @@ def files_unlock_file_batch(self, response indicates that the file has been unlocked. Returns a list of the unlocked file paths and their metadata after this operation. + Route attributes: + scope: files.content.write + :param List[:class:`dropbox.files.UnlockFileArg`] entries: List of 'entries'. Each 'entry' contains a path of the file which will be unlocked. Duplicate path arguments in the batch are considered only @@ -2890,6 +3167,9 @@ def files_upload(self, information, see the `Data transport limit page `_. + Route attributes: + scope: files.content.write + :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. @@ -2950,6 +3230,9 @@ def files_upload_session_append_v2(self, transport limit page `_. + Route attributes: + scope: files.content.write + :param bytes f: Contents to upload. :param cursor: Contains the upload session ID and the offset. :type cursor: :class:`dropbox.files.UploadSessionCursor` @@ -2986,6 +3269,9 @@ def files_upload_session_append(self, see the `Data transport limit page `_. + Route attributes: + scope: files.content.write + :param bytes f: Contents to upload. :param str session_id: The upload session ID (returned by :meth:`files_upload_session_start`). @@ -3026,6 +3312,9 @@ def files_upload_session_finish(self, page `_. + Route attributes: + scope: files.content.write + :param bytes f: Contents to upload. :param cursor: Contains the upload session ID and the offset. :type cursor: :class:`dropbox.files.UploadSessionCursor` @@ -3072,6 +3361,9 @@ def files_upload_session_finish_batch(self, information, see the `Data transport limit page `_. + Route attributes: + scope: files.content.write + :param List[:class:`dropbox.files.UploadSessionFinishArg`] entries: Commit information for each file in the batch. :rtype: :class:`dropbox.files.UploadSessionFinishBatchLaunch` @@ -3109,6 +3401,9 @@ def files_upload_session_finish_batch_v2(self, information, see the `Data transport limit page `_. + Route attributes: + scope: files.content.write + :param List[:class:`dropbox.files.UploadSessionFinishArg`] entries: Commit information for each file in the batch. :rtype: :class:`dropbox.files.UploadSessionFinishBatchResult` @@ -3129,6 +3424,9 @@ def files_upload_session_finish_batch_check(self, :meth:`files_upload_session_finish_batch`. If success, it returns list of result for each entry. + Route attributes: + scope: files.content.write + :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` @@ -3186,6 +3484,9 @@ def files_upload_session_start(self, ``UploadSessionStartArg.close`` to ``True``, that may contain any remaining data). + Route attributes: + scope: files.content.write + :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 @@ -3226,6 +3527,9 @@ def paper_docs_archive(self, `_ for more information. + Route attributes: + scope: files.content.write + :param str doc_id: The Paper doc ID. :rtype: None :raises: :class:`.exceptions.ApiError` @@ -3260,6 +3564,9 @@ def paper_docs_create(self, `_ for more information. + Route attributes: + scope: files.content.write + :param bytes f: Contents to upload. :param Nullable[str] parent_folder_id: The Paper folder ID where the Paper document should be created. The API user has to have write @@ -3299,6 +3606,9 @@ def paper_docs_download(self, `_ for migration information. + Route attributes: + scope: files.content.read + :type export_format: :class:`dropbox.paper.ExportFormat` :rtype: (:class:`dropbox.paper.PaperDocExportResult`, :class:`requests.models.Response`) @@ -3341,6 +3651,9 @@ def paper_docs_download_to_file(self, `_ for migration information. + Route attributes: + scope: files.content.read + :param str download_path: Path on local machine to save file. :type export_format: :class:`dropbox.paper.ExportFormat` :rtype: :class:`dropbox.paper.PaperDocExportResult` @@ -3380,6 +3693,9 @@ def paper_docs_folder_users_list(self, `_ for migration information. + Route attributes: + scope: sharing.read + :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. @@ -3417,6 +3733,9 @@ def paper_docs_folder_users_list_continue(self, `_ for migration information. + Route attributes: + scope: sharing.read + :param str cursor: The cursor obtained from :meth:`paper_docs_folder_users_list` or :meth:`paper_docs_folder_users_list_continue`. Allows for @@ -3458,6 +3777,9 @@ def paper_docs_get_folder_info(self, `_ for migration information. + Route attributes: + scope: sharing.read + :param str doc_id: The Paper doc ID. :rtype: :class:`dropbox.paper.FoldersContainingPaperDoc` :raises: :class:`.exceptions.ApiError` @@ -3495,6 +3817,9 @@ def paper_docs_list(self, `_ for migration information. + Route attributes: + scope: files.metadata.read + :param filter_by: Allows user to specify how the Paper docs should be filtered. :type filter_by: :class:`dropbox.paper.ListPaperDocsFilterBy` @@ -3537,6 +3862,9 @@ def paper_docs_list_continue(self, `_ for migration information. + Route attributes: + scope: files.metadata.read + :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` @@ -3571,6 +3899,9 @@ def paper_docs_permanently_delete(self, `_ for migration information. + Route attributes: + scope: files.permanent_delete + :param str doc_id: The Paper doc ID. :rtype: None :raises: :class:`.exceptions.ApiError` @@ -3603,6 +3934,9 @@ def paper_docs_sharing_policy_get(self, `_ for migration information. + Route attributes: + scope: sharing.read + :param str doc_id: The Paper doc ID. :rtype: :class:`dropbox.paper.SharingPolicy` :raises: :class:`.exceptions.ApiError` @@ -3639,6 +3973,9 @@ def paper_docs_sharing_policy_set(self, `_ for migration information. + Route attributes: + scope: sharing.write + :param sharing_policy: The default sharing policy to be set for the Paper doc. :type sharing_policy: :class:`dropbox.paper.SharingPolicy` @@ -3678,6 +4015,9 @@ def paper_docs_update(self, `_ for more information. + Route attributes: + scope: files.content.write + :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` @@ -3725,6 +4065,9 @@ def paper_docs_users_add(self, `_ for migration information. + Route attributes: + scope: sharing.write + :param List[:class:`dropbox.paper.AddMember`] members: User which should be added to the Paper doc. Specify only email address or Dropbox account ID. @@ -3771,6 +4114,9 @@ def paper_docs_users_list(self, `_ for migration information. + Route attributes: + scope: sharing.read + :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. @@ -3812,6 +4158,9 @@ def paper_docs_users_list_continue(self, `_ for migration information. + Route attributes: + scope: sharing.read + :param str cursor: The cursor obtained from :meth:`paper_docs_users_list` or :meth:`paper_docs_users_list_continue`. Allows for pagination. @@ -3849,6 +4198,9 @@ def paper_docs_users_remove(self, `_ for migration information. + Route attributes: + scope: sharing.write + :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` @@ -3886,6 +4238,9 @@ def paper_folders_create(self, `_ for migration information. + Route attributes: + scope: files.content.write + :param str name: The name of the new Paper folder. :param Nullable[str] parent_folder_id: The encrypted Paper folder Id where the new Paper folder should be created. The API user has to @@ -3931,6 +4286,9 @@ def sharing_add_file_member(self, """ Adds specified members to a file. + Route attributes: + scope: sharing.write + :param str file: File to which to add members. :param List[:class:`dropbox.sharing.MemberSelector`] members: Members to add. Note that even an email address is given, this may result in a @@ -3938,8 +4296,8 @@ def sharing_add_file_member(self, user's main account email. :param Nullable[str] 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 bool quiet: Whether added members should be notified via email + and 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` @@ -3976,6 +4334,9 @@ def sharing_add_folder_member(self, the functionality for this folder, you will need to call :meth:`sharing_mount_folder` on their behalf. + Route attributes: + scope: sharing.write + :param str shared_folder_id: The ID for the shared folder. :param List[:class:`dropbox.sharing.AddMember`] members: The intended list of members to add. Added members will receive invites to join @@ -4007,6 +4368,9 @@ def sharing_check_job_status(self, """ Returns the status of an asynchronous job. + Route attributes: + scope: sharing.write + :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` @@ -4029,6 +4393,9 @@ def sharing_check_remove_member_job_status(self, """ Returns the status of an asynchronous job for sharing a folder. + Route attributes: + scope: sharing.write + :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` @@ -4051,6 +4418,9 @@ def sharing_check_share_job_status(self, """ Returns the status of an asynchronous job for sharing a folder. + Route attributes: + scope: sharing.write + :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` @@ -4080,6 +4450,9 @@ def sharing_create_shared_link(self, shouldn't rely on this behavior. Instead, if your app needs to revoke a shared link, use :meth:`sharing_revoke_shared_link`. + Route attributes: + scope: sharing.write + :param str path: The path to share. :type short_url: bool :param Nullable[:class:`dropbox.sharing.PendingUploadMode`] @@ -4117,6 +4490,9 @@ def sharing_create_shared_link_with_settings(self, visibility, though, may depend on other aspects such as team and shared folder settings). + Route attributes: + scope: sharing.write + :param str path: The path to be shared by the shared link. :param Nullable[:class:`dropbox.sharing.SharedLinkSettings`] settings: The requested settings for the newly created shared link. @@ -4142,6 +4518,9 @@ def sharing_get_file_metadata(self, """ Returns shared file metadata. + Route attributes: + scope: sharing.read + :param str file: The file to query. :param Nullable[List[:class:`dropbox.sharing.FileAction`]] actions: A list of `FileAction`s corresponding to `FilePermission`s that should @@ -4170,6 +4549,9 @@ def sharing_get_file_metadata_batch(self, """ Returns shared file metadata. + Route attributes: + scope: sharing.read + :param List[str] files: The files to query. :param Nullable[List[:class:`dropbox.sharing.FileAction`]] actions: A list of `FileAction`s corresponding to `FilePermission`s that should @@ -4198,6 +4580,9 @@ def sharing_get_folder_metadata(self, """ Returns shared folder metadata by its folder ID. + Route attributes: + scope: sharing.read + :param str shared_folder_id: The ID for the shared folder. :param Nullable[List[:class:`dropbox.sharing.FolderAction`]] actions: A list of `FolderAction`s corresponding to `FolderPermission`s that @@ -4227,6 +4612,9 @@ def sharing_get_shared_link_file(self, """ Download the shared link's file from a user's Dropbox. + Route attributes: + scope: sharing.read + :param str url: URL of the shared link. :param Nullable[str] path: If the shared link is to a folder, this parameter can be used to retrieve the metadata for a specific file @@ -4265,6 +4653,9 @@ def sharing_get_shared_link_file_to_file(self, """ Download the shared link's file from a user's Dropbox. + Route attributes: + scope: sharing.read + :param str download_path: Path on local machine to save file. :param str url: URL of the shared link. :param Nullable[str] path: If the shared link is to a folder, this @@ -4297,6 +4688,9 @@ def sharing_get_shared_link_metadata(self, """ Get the shared link's metadata. + Route attributes: + scope: sharing.read + :param str url: URL of the shared link. :param Nullable[str] path: If the shared link is to a folder, this parameter can be used to retrieve the metadata for a specific file @@ -4330,6 +4724,9 @@ def sharing_get_shared_links(self, all shared links that allow access to the given path. Collection links are never returned in this case. + Route attributes: + scope: sharing.read + :param Nullable[str] path: See :meth:`sharing_get_shared_links` description. :rtype: :class:`dropbox.sharing.GetSharedLinksResult` @@ -4360,6 +4757,9 @@ def sharing_list_file_members(self, Use to obtain the members who have been invited to a file, both inherited and uninherited members. + Route attributes: + scope: sharing.read + :param str file: The file for which you want to see members. :param Nullable[List[:class:`dropbox.sharing.MemberAction`]] actions: The actions for which to return permissions on a member. @@ -4395,6 +4795,9 @@ def sharing_list_file_members_batch(self, Inherited users and groups are not included in the result, and permissions are not returned for this endpoint. + Route attributes: + scope: sharing.read + :param List[str] files: Files for which to return members. :param int limit: Number of members to return max per query. Defaults to 10 if no limit is specified. @@ -4421,6 +4824,9 @@ def sharing_list_file_members_continue(self, or :meth:`sharing_list_file_members_batch`, use this to paginate through all shared file members. + Route attributes: + scope: sharing.read + :param str cursor: The cursor returned by your last call to :meth:`sharing_list_file_members`, :meth:`sharing_list_file_members_continue`, or @@ -4447,6 +4853,9 @@ def sharing_list_folder_members(self, """ Returns shared folder membership by its folder ID. + Route attributes: + scope: sharing.read + :param str shared_folder_id: The ID for the shared folder. :rtype: :class:`dropbox.sharing.SharedFolderMembers` :raises: :class:`.exceptions.ApiError` @@ -4472,6 +4881,9 @@ def sharing_list_folder_members_continue(self, :meth:`sharing_list_folder_members`, use this to paginate through all shared folder members. + Route attributes: + scope: sharing.read + :param str cursor: The cursor returned by your last call to :meth:`sharing_list_folder_members` or :meth:`sharing_list_folder_members_continue`. @@ -4496,6 +4908,9 @@ def sharing_list_folders(self, """ Return the list of all shared folders the current user has access to. + Route attributes: + scope: sharing.read + :param int limit: The maximum number of results to return per request. :param Nullable[List[:class:`dropbox.sharing.FolderAction`]] actions: A list of `FolderAction`s corresponding to `FolderPermission`s that @@ -4522,6 +4937,9 @@ def sharing_list_folders_continue(self, previous call to :meth:`sharing_list_folders` or :meth:`sharing_list_folders_continue`. + Route attributes: + scope: sharing.read + :param str cursor: The cursor returned by the previous API call specified in the endpoint description. :rtype: :class:`dropbox.sharing.ListFoldersResult` @@ -4546,6 +4964,9 @@ def sharing_list_mountable_folders(self, Return the list of all shared folders the current user can mount or unmount. + Route attributes: + scope: sharing.read + :param int limit: The maximum number of results to return per request. :param Nullable[List[:class:`dropbox.sharing.FolderAction`]] actions: A list of `FolderAction`s corresponding to `FolderPermission`s that @@ -4573,6 +4994,9 @@ def sharing_list_mountable_folders_continue(self, :meth:`sharing_list_mountable_folders` or :meth:`sharing_list_mountable_folders_continue`. + Route attributes: + scope: sharing.read + :param str cursor: The cursor returned by the previous API call specified in the endpoint description. :rtype: :class:`dropbox.sharing.ListFoldersResult` @@ -4598,6 +5022,9 @@ def sharing_list_received_files(self, files the user has received via shared folders, and does not include unclaimed invitations. + Route attributes: + scope: sharing.read + :param int limit: Number of files to return max per query. Defaults to 100 if no limit is specified. :param Nullable[List[:class:`dropbox.sharing.FileAction`]] actions: A @@ -4626,6 +5053,9 @@ def sharing_list_received_files_continue(self, """ Get more results with a cursor from :meth:`sharing_list_received_files`. + Route attributes: + scope: sharing.read + :param str cursor: Cursor in ``ListFilesResult.cursor``. :rtype: :class:`dropbox.sharing.ListFilesResult` :raises: :class:`.exceptions.ApiError` @@ -4658,6 +5088,9 @@ def sharing_list_shared_links(self, parent folders of the given path. Links to parent folders can be suppressed by setting direct_only to true. + Route attributes: + scope: sharing.read + :param Nullable[str] path: See :meth:`sharing_list_shared_links` description. :param Nullable[str] cursor: The cursor returned by your last call to @@ -4695,6 +5128,9 @@ def sharing_modify_shared_link_settings(self, ``LinkPermissions.requested_visibility`` will reflect the requested visibility. + Route attributes: + scope: sharing.write + :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` @@ -4724,6 +5160,9 @@ def sharing_mount_folder(self, a user after they have been added as a member. Once mounted, the shared folder will appear in their Dropbox. + Route attributes: + scope: sharing.write + :param str shared_folder_id: The ID of the shared folder to mount. :rtype: :class:`dropbox.sharing.SharedFolderMetadata` :raises: :class:`.exceptions.ApiError` @@ -4747,6 +5186,9 @@ def sharing_relinquish_file_membership(self, Note that the current user may still have inherited access to this file through the parent folder. + Route attributes: + scope: sharing.write + :param str file: The path or id for the file. :rtype: None :raises: :class:`.exceptions.ApiError` @@ -4773,6 +5215,9 @@ def sharing_relinquish_folder_membership(self, synchronously if leave_a_copy is false, and asynchronously if leave_a_copy is true. + Route attributes: + scope: sharing.write + :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. This must be set to false when the folder @@ -4799,6 +5244,9 @@ def sharing_remove_file_member(self, """ Identical to remove_file_member_2 but with less information returned. + Route attributes: + scope: sharing.write + :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 @@ -4831,6 +5279,9 @@ def sharing_remove_file_member_2(self, """ Removes a specified member from the file. + Route attributes: + scope: sharing.write + :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 @@ -4861,6 +5312,9 @@ def sharing_remove_folder_member(self, Allows an owner or editor (if the ACL update policy allows) of a shared folder to remove another member. + Route attributes: + scope: sharing.write + :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` @@ -4896,6 +5350,9 @@ def sharing_revoke_shared_link(self, :meth:`sharing_list_shared_links` with the file as the ``ListSharedLinksArg.path`` argument. + Route attributes: + scope: sharing.write + :param str url: URL of the shared link. :rtype: None :raises: :class:`.exceptions.ApiError` @@ -4922,6 +5379,9 @@ def sharing_set_access_inheritance(self, :meth:`sharing_check_share_job_status` until the action completes to get the metadata for the folder. + Route attributes: + scope: sharing.write + :param access_inheritance: The access inheritance settings for the folder. :type access_inheritance: :class:`dropbox.sharing.AccessInheritance` @@ -4960,6 +5420,9 @@ def sharing_share_folder(self, :meth:`sharing_check_share_job_status` until the action completes to get the metadata for the folder. + Route attributes: + scope: sharing.write + :param Nullable[List[:class:`dropbox.sharing.FolderAction`]] actions: A list of `FolderAction`s corresponding to `FolderPermission`s that should appear in the response's @@ -4998,6 +5461,9 @@ def sharing_transfer_folder(self, User must have ``AccessLevel.owner`` access to the shared folder to perform a transfer. + Route attributes: + scope: sharing.write + :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. @@ -5023,6 +5489,9 @@ def sharing_unmount_folder(self, The current user unmounts the designated folder. They can re-mount the folder at a later time using :meth:`sharing_mount_folder`. + Route attributes: + scope: sharing.write + :param str shared_folder_id: The ID for the shared folder. :rtype: None :raises: :class:`.exceptions.ApiError` @@ -5044,6 +5513,9 @@ def sharing_unshare_file(self, """ Remove all members from this file. Does not remove inherited members. + Route attributes: + scope: sharing.write + :param str file: The file to unshare. :rtype: None :raises: :class:`.exceptions.ApiError` @@ -5068,6 +5540,9 @@ def sharing_unshare_folder(self, :meth:`sharing_check_job_status` to determine if the action has completed successfully. + Route attributes: + scope: sharing.write + :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 @@ -5096,6 +5571,9 @@ def sharing_update_file_member(self, """ Changes a member's access on a shared file. + Route attributes: + scope: sharing.write + :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` @@ -5126,6 +5604,9 @@ def sharing_update_folder_member(self, Allows an owner or editor of a shared folder to update another member's permissions. + Route attributes: + scope: sharing.write + :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. @@ -5163,6 +5644,9 @@ def sharing_update_folder_policy(self, ``AccessLevel.owner`` access to the shared folder to update its policies. + Route attributes: + scope: sharing.write + :param str shared_folder_id: The ID for the shared folder. :param Nullable[:class:`dropbox.sharing.MemberPolicy`] member_policy: Who can be a member of this shared folder. Only applicable if the @@ -5220,6 +5704,9 @@ def users_features_get_values(self, Get a list of feature values that may be configured for the current account. + Route attributes: + scope: account_info.read + :param List[:class:`dropbox.users.UserFeature`] features: A list of features in :class:`dropbox.users.UserFeature`. If the list is empty, this route will return @@ -5244,6 +5731,9 @@ def users_get_account(self, """ Get information about a user's account. + Route attributes: + scope: sharing.read + :param str account_id: A user's account identifier. :rtype: :class:`dropbox.users.BasicAccount` :raises: :class:`.exceptions.ApiError` @@ -5266,6 +5756,9 @@ def users_get_account_batch(self, Get information about multiple user accounts. At most 300 accounts may be queried per request. + Route attributes: + scope: sharing.read + :param List[str] account_ids: List of user account identifiers. Should not contain any duplicate account IDs. :rtype: List[:class:`dropbox.users.BasicAccount`] @@ -5287,6 +5780,9 @@ def users_get_current_account(self): """ Get information about the current user's account. + Route attributes: + scope: account_info.read + :rtype: :class:`dropbox.users.FullAccount` """ arg = None @@ -5302,6 +5798,9 @@ def users_get_space_usage(self): """ Get the space usage information for the current user's account. + Route attributes: + scope: account_info.read + :rtype: :class:`dropbox.users.SpaceUsage` """ arg = None diff --git a/dropbox/base_team.py b/dropbox/base_team.py index b29d4430..ab308888 100644 --- a/dropbox/base_team.py +++ b/dropbox/base_team.py @@ -58,6 +58,9 @@ def file_properties_templates_add_for_team(self, :meth:`file_properties_properties_add` to add properties to a file or folder. Note: this endpoint will create team-owned templates. + Route attributes: + scope: files.team_metadata.write + :rtype: :class:`dropbox.file_properties.AddTemplateResult` :raises: :class:`.exceptions.ApiError` @@ -80,6 +83,9 @@ def file_properties_templates_get_for_team(self, """ Get the schema for a specified template. + Route attributes: + scope: files.team_metadata.write + :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`. @@ -103,6 +109,9 @@ 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`. + Route attributes: + scope: files.team_metadata.write + :rtype: :class:`dropbox.file_properties.ListTemplateResult` :raises: :class:`.exceptions.ApiError` @@ -126,6 +135,9 @@ def file_properties_templates_remove_for_team(self, associated with the template will also be removed. This action cannot be undone. + Route attributes: + scope: files.team_metadata.write + :param str template_id: An identifier for a template created by :meth:`file_properties_templates_add_for_user` or :meth:`file_properties_templates_add_for_team`. @@ -154,6 +166,9 @@ def file_properties_templates_update_for_team(self, template name, the template description and add optional properties to templates. + Route attributes: + scope: files.team_metadata.write + :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`. @@ -206,6 +221,9 @@ def team_devices_list_member_devices(self, """ List all device sessions of a team's member. + Route attributes: + scope: sessions.list + :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. @@ -240,6 +258,9 @@ def team_devices_list_members_devices(self, List all device sessions of a team. Permission : Team member file access. + Route attributes: + scope: sessions.list + :param Nullable[str] 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 @@ -278,6 +299,9 @@ def team_devices_list_team_devices(self, List all device sessions of a team. Permission : Team member file access. + Route attributes: + scope: sessions.list + :param Nullable[str] 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 @@ -316,6 +340,9 @@ def team_devices_revoke_device_session(self, """ Revoke a device session of a team's member. + Route attributes: + scope: sessions.modify + :type arg: :class:`dropbox.team.RevokeDeviceSessionArg` :rtype: None :raises: :class:`.exceptions.ApiError` @@ -336,6 +363,9 @@ def team_devices_revoke_device_session_batch(self, """ Revoke a list of device sessions of team members. + Route attributes: + scope: sessions.modify + :type revoke_devices: List[:class:`dropbox.team.RevokeDeviceSessionArg`] :rtype: :class:`dropbox.team.RevokeDeviceSessionBatchResult` :raises: :class:`.exceptions.ApiError` @@ -359,6 +389,9 @@ def team_features_get_values(self, your account's capability for what feature you can access or what value you have for certain features. Permission : Team information. + Route attributes: + scope: team_info.read + :param List[:class:`dropbox.team.Feature`] features: A list of features in :class:`dropbox.team.Feature`. If the list is empty, this route will return :class:`dropbox.team.FeaturesGetValuesBatchError`. @@ -381,6 +414,9 @@ def team_get_info(self): """ Retrieves information about a team. + Route attributes: + scope: team_info.read + :rtype: :class:`dropbox.team.TeamGetInfoResult` """ arg = None @@ -401,6 +437,9 @@ def team_groups_create(self, Creates a new, empty group, with a requested name. Permission : Team member management. + Route attributes: + scope: groups.write + :param str group_name: Group name. :param bool add_creator_as_owner: Automatically add the creator of the group. @@ -435,6 +474,9 @@ def team_groups_delete(self, :meth:`team_groups_job_status_get` to determine whether this process has completed. Permission : Team member management. + Route attributes: + scope: groups.write + :param arg: Argument for selecting a single group, either by group_id or by external group ID. :type arg: :class:`dropbox.team.GroupSelector` @@ -459,6 +501,9 @@ def team_groups_get_info(self, field ``GroupFullInfo.members`` is not returned for system-managed groups. Permission : Team Information. + Route attributes: + scope: groups.read + :param arg: Argument for selecting a list of groups, either by group_ids, or external group IDs. :type arg: :class:`dropbox.team.GroupsSelector` @@ -484,6 +529,9 @@ def team_groups_job_status_get(self, use this method to poll the status of granting/revoking group members' access to group-owned resources. Permission : Team member management. + Route attributes: + scope: groups.write + :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` @@ -506,6 +554,9 @@ def team_groups_list(self, """ Lists groups on a team. Permission : Team Information. + Route attributes: + scope: groups.read + :param int limit: Number of results to return per call. :rtype: :class:`dropbox.team.GroupsListResult` """ @@ -524,6 +575,9 @@ def team_groups_list_continue(self, Once a cursor has been retrieved from :meth:`team_groups_list`, use this to paginate through all groups. Permission : Team Information. + Route attributes: + scope: groups.read + :param str cursor: Indicates from what point to get the next set of groups. :rtype: :class:`dropbox.team.GroupsListResult` @@ -551,6 +605,9 @@ def team_groups_members_add(self, :meth:`team_groups_job_status_get` to determine whether this process has completed. Permission : Team member management. + Route attributes: + scope: groups.write + :param group: Group to which users will be added. :type group: :class:`dropbox.team.GroupSelector` :param List[:class:`dropbox.team.MemberAccess`] members: List of users @@ -578,6 +635,9 @@ def team_groups_members_list(self, """ Lists members of a group. Permission : Team Information. + Route attributes: + scope: groups.read + :param group: The group whose members are to be listed. :type group: :class:`dropbox.team.GroupSelector` :param int limit: Number of results to return per call. @@ -604,6 +664,9 @@ def team_groups_members_list_continue(self, use this to paginate through all members of the group. Permission : Team information. + Route attributes: + scope: groups.read + :param str cursor: Indicates from what point to get the next set of groups. :rtype: :class:`dropbox.team.GroupsMembersListResult` @@ -633,6 +696,9 @@ def team_groups_members_remove(self, group, even in cases where this is not possible via the web client. Permission : Team member management. + Route attributes: + scope: groups.write + :param group: Group from which users will be removed. :type group: :class:`dropbox.team.GroupSelector` :param List[:class:`dropbox.team.UserSelectorArg`] users: List of users @@ -663,6 +729,9 @@ def team_groups_members_set_access_type(self, Sets a member's access type in a group. Permission : Team member management. + Route attributes: + scope: groups.write + :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 @@ -697,6 +766,9 @@ def team_groups_update(self, Updates a group's name and/or external ID. Permission : Team member management. + Route attributes: + scope: groups.write + :param group: Specify a group. :type group: :class:`dropbox.team.GroupSelector` :param Nullable[str] new_group_name: Optional argument. Set group name @@ -737,6 +809,9 @@ def team_legal_holds_create_policy(self, Creates new legal hold policy. Note: Legal Holds is a paid add-on. Not all teams have the feature. Permission : Team member file access. + Route attributes: + scope: team_data.member + :param str name: Policy name. :param Nullable[str] description: A description of the legal hold policy. @@ -769,6 +844,9 @@ def team_legal_holds_get_policy(self, Gets a legal hold by Id. Note: Legal Holds is a paid add-on. Not all teams have the feature. Permission : Team member file access. + Route attributes: + scope: team_data.member + :param str id: The legal hold Id. :rtype: :class:`dropbox.team.LegalHoldPolicy` :raises: :class:`.exceptions.ApiError` @@ -792,6 +870,9 @@ def team_legal_holds_list_held_revisions(self, paid add-on. Not all teams have the feature. Permission : Team member file access. + Route attributes: + scope: team_data.member + :param str id: The legal hold Id. :rtype: :class:`dropbox.team.LegalHoldsListHeldRevisionResult` :raises: :class:`.exceptions.ApiError` @@ -816,6 +897,9 @@ def team_legal_holds_list_held_revisions_continue(self, Holds is a paid add-on. Not all teams have the feature. Permission : Team member file access. + Route attributes: + scope: team_data.member + :param str id: The legal hold Id. :param Nullable[str] cursor: The cursor idicates where to continue reading file metadata entries for the next API call. When there are @@ -842,6 +926,9 @@ def team_legal_holds_list_policies(self, Lists legal holds on a team. Note: Legal Holds is a paid add-on. Not all teams have the feature. Permission : Team member file access. + Route attributes: + scope: team_data.member + :param bool include_released: Whether to return holds that were released. :rtype: :class:`dropbox.team.LegalHoldsListPoliciesResult` @@ -865,6 +952,9 @@ def team_legal_holds_release_policy(self, Releases a legal hold by Id. Note: Legal Holds is a paid add-on. Not all teams have the feature. Permission : Team member file access. + Route attributes: + scope: team_data.member + :param str id: The legal hold Id. :rtype: None :raises: :class:`.exceptions.ApiError` @@ -890,6 +980,9 @@ def team_legal_holds_update_policy(self, Updates a legal hold. Note: Legal Holds is a paid add-on. Not all teams have the feature. Permission : Team member file access. + Route attributes: + scope: team_data.member + :param str id: The legal hold Id. :param Nullable[str] name: Policy new name. :param Nullable[str] description: Policy new description. @@ -919,6 +1012,9 @@ def team_linked_apps_list_member_linked_apps(self, List all linked applications of the team member. Note, this endpoint does not list any team-linked applications. + Route attributes: + scope: sessions.list + :param str team_member_id: The team member id. :rtype: :class:`dropbox.team.ListMemberAppsResult` :raises: :class:`.exceptions.ApiError` @@ -941,6 +1037,9 @@ def team_linked_apps_list_members_linked_apps(self, List all applications linked to the team members' accounts. Note, this endpoint does not list any team-linked applications. + Route attributes: + scope: sessions.list + :param Nullable[str] 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 @@ -967,6 +1066,9 @@ def team_linked_apps_list_team_linked_apps(self, List all applications linked to the team members' accounts. Note, this endpoint doesn't list any team-linked applications. + Route attributes: + scope: sessions.list + :param Nullable[str] 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 @@ -998,6 +1100,9 @@ def team_linked_apps_revoke_linked_app(self, """ Revoke a linked application of the team member. + Route attributes: + scope: sessions.modify + :param str app_id: The application's unique id. :param str team_member_id: The unique id of the member owning the device. @@ -1026,6 +1131,9 @@ def team_linked_apps_revoke_linked_app_batch(self, """ Revoke a list of linked applications of the team members. + Route attributes: + scope: sessions.modify + :type revoke_linked_app: List[:class:`dropbox.team.RevokeLinkedApiAppArg`] :rtype: :class:`dropbox.team.RevokeLinkedAppBatchResult` @@ -1048,6 +1156,9 @@ def team_member_space_limits_excluded_users_add(self, """ Add users to member space limits excluded users list. + Route attributes: + scope: members.write + :param Nullable[List[:class:`dropbox.team.UserSelectorArg`]] users: List of users to be added/removed. :rtype: :class:`dropbox.team.ExcludedUsersUpdateResult` @@ -1070,6 +1181,9 @@ def team_member_space_limits_excluded_users_list(self, """ List member space limits excluded users. + Route attributes: + scope: members.read + :param int limit: Number of results to return per call. :rtype: :class:`dropbox.team.ExcludedUsersListResult` :raises: :class:`.exceptions.ApiError` @@ -1091,6 +1205,9 @@ def team_member_space_limits_excluded_users_list_continue(self, """ Continue listing member space limits excluded users. + Route attributes: + scope: members.read + :param str cursor: Indicates from what point to get the next set of users. :rtype: :class:`dropbox.team.ExcludedUsersListResult` @@ -1113,6 +1230,9 @@ def team_member_space_limits_excluded_users_remove(self, """ Remove users from member space limits excluded users list. + Route attributes: + scope: members.write + :param Nullable[List[:class:`dropbox.team.UserSelectorArg`]] users: List of users to be added/removed. :rtype: :class:`dropbox.team.ExcludedUsersUpdateResult` @@ -1136,6 +1256,9 @@ def team_member_space_limits_get_custom_quota(self, 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. + Route attributes: + scope: members.read + :param List[:class:`dropbox.team.UserSelectorArg`] users: List of users. :rtype: List[:class:`dropbox.team.CustomQuotaResult`] :raises: :class:`.exceptions.ApiError` @@ -1158,6 +1281,9 @@ def team_member_space_limits_remove_custom_quota(self, Remove users custom quota. A maximum of 1000 members can be specified in a single call. + Route attributes: + scope: members.write + :param List[:class:`dropbox.team.UserSelectorArg`] users: List of users. :rtype: List[:class:`dropbox.team.RemoveCustomQuotaResult`] :raises: :class:`.exceptions.ApiError` @@ -1180,6 +1306,9 @@ def team_member_space_limits_set_custom_quota(self, Set users custom quota. Custom quota has to be at least 15GB. A maximum of 1000 members can be specified in a single call. + Route attributes: + scope: members.read + :param List[:class:`dropbox.team.UserCustomQuotaArg`] users_and_quotas: List of users and their custom quotas. :rtype: List[:class:`dropbox.team.CustomQuotaResult`] @@ -1213,6 +1342,9 @@ def team_members_add_v2(self, for a user to use in the team invitation and for 'Perform as team member' actions taken on the user before they become 'active'. + Route attributes: + scope: members.write + :param List[:class:`dropbox.team.MemberAddV2Arg`] new_members: Details of new members to be added to the team. :rtype: :class:`dropbox.team.MembersAddLaunchV2Result` @@ -1243,6 +1375,9 @@ def team_members_add(self, for a user to use in the team invitation and for 'Perform as team member' actions taken on the user before they become 'active'. + Route attributes: + scope: members.write + :param List[:class:`dropbox.team.MemberAddArg`] new_members: Details of new members to be added to the team. :rtype: :class:`dropbox.team.MembersAddLaunch` @@ -1264,6 +1399,9 @@ def team_members_add_job_status_get_v2(self, this to poll the status of the asynchronous request. Permission : Team member management. + Route attributes: + scope: members.write + :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.MembersAddJobStatusV2Result` @@ -1288,6 +1426,9 @@ def team_members_add_job_status_get(self, this to poll the status of the asynchronous request. Permission : Team member management. + Route attributes: + scope: members.write + :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` @@ -1311,6 +1452,9 @@ def team_members_delete_profile_photo_v2(self, Deletes a team member's profile photo. Permission : Team member management. + Route attributes: + scope: members.write + :param user: Identity of the user whose profile photo will be deleted. :type user: :class:`dropbox.team.UserSelectorArg` :rtype: :class:`dropbox.team.TeamMemberInfoV2Result` @@ -1334,6 +1478,9 @@ def team_members_delete_profile_photo(self, Deletes a team member's profile photo. Permission : Team member management. + Route attributes: + scope: members.write + :param user: Identity of the user whose profile photo will be deleted. :type user: :class:`dropbox.team.UserSelectorArg` :rtype: :class:`dropbox.team.TeamMemberInfo` @@ -1357,6 +1504,9 @@ def team_members_get_available_team_member_roles(self): :meth:`team_members_set_admin_permissions_v2`. Permission : Team member management. + Route attributes: + scope: members.read + :rtype: :class:`dropbox.team.MembersGetAvailableTeamMemberRolesResult` """ arg = None @@ -1376,6 +1526,9 @@ def team_members_get_info_v2(self, ``MembersGetInfoItem.id_not_found``, for IDs (or emails) that cannot be matched to a valid team member. + Route attributes: + scope: members.read + :param List[:class:`dropbox.team.UserSelectorArg`] members: List of team members. :rtype: :class:`dropbox.team.MembersGetInfoV2Result` @@ -1401,6 +1554,9 @@ def team_members_get_info(self, ``MembersGetInfoItem.id_not_found``, for IDs (or emails) that cannot be matched to a valid team member. + Route attributes: + scope: members.read + :param List[:class:`dropbox.team.UserSelectorArg`] members: List of team members. :rtype: List[:class:`dropbox.team.MembersGetInfoItem`] @@ -1424,6 +1580,9 @@ def team_members_list_v2(self, """ Lists members of a team. Permission : Team information. + Route attributes: + scope: members.read + :param int limit: Number of results to return per call. :param bool include_removed: Whether to return removed members. :rtype: :class:`dropbox.team.MembersListV2Result` @@ -1448,6 +1607,9 @@ def team_members_list(self, """ Lists members of a team. Permission : Team information. + Route attributes: + scope: members.read + :param int limit: Number of results to return per call. :param bool include_removed: Whether to return removed members. :rtype: :class:`dropbox.team.MembersListResult` @@ -1473,6 +1635,9 @@ def team_members_list_continue_v2(self, this to paginate through all team members. Permission : Team information. + Route attributes: + scope: members.read + :param str cursor: Indicates from what point to get the next set of members. :rtype: :class:`dropbox.team.MembersListV2Result` @@ -1497,6 +1662,9 @@ def team_members_list_continue(self, this to paginate through all team members. Permission : Team information. + Route attributes: + scope: members.read + :param str cursor: Indicates from what point to get the next set of members. :rtype: :class:`dropbox.team.MembersListResult` @@ -1525,6 +1693,9 @@ def team_members_move_former_member_files(self, :meth:`team_members_move_former_member_files_job_status_check`. Permission : Team member management. + Route attributes: + scope: members.write + :param transfer_dest_id: Files from the deleted member account will be transferred to this user. :type transfer_dest_id: :class:`dropbox.team.UserSelectorArg` @@ -1555,6 +1726,9 @@ def team_members_move_former_member_files_job_status_check(self, :meth:`team_members_move_former_member_files` , use this to poll the status of the asynchronous request. Permission : Team member management. + Route attributes: + scope: members.write + :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` @@ -1579,6 +1753,9 @@ def team_members_recover(self, one of team_member_id, email, or external_id must be provided to identify the user account. + Route attributes: + scope: members.delete + :param user: Identity of user to recover. :type user: :class:`dropbox.team.UserSelectorArg` :rtype: None @@ -1618,6 +1795,9 @@ def team_members_remove(self, final result of the job, the client should periodically poll :meth:`team_members_remove_job_status_get`. + Route attributes: + scope: members.delete + :param Nullable[:class:`dropbox.team.UserSelectorArg`] transfer_dest_id: If provided, files from the deleted member account will be transferred to this user. @@ -1664,6 +1844,9 @@ def team_members_remove_job_status_get(self, this to poll the status of the asynchronous request. Permission : Team member management. + Route attributes: + scope: members.delete + :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` @@ -1689,6 +1872,9 @@ def team_members_secondary_emails_add(self, each email address not on a verified domain a verification email will be sent. + Route attributes: + scope: members.write + :param List[:class:`dropbox.team.UserSecondaryEmailsArg`] new_secondary_emails: List of users and secondary emails to add. :rtype: :class:`dropbox.team.AddSecondaryEmailsResult` @@ -1713,6 +1899,9 @@ def team_members_secondary_emails_delete(self, Users will be notified of deletions of verified secondary emails at both the secondary email and their primary email. + Route attributes: + scope: members.write + :param List[:class:`dropbox.team.UserSecondaryEmailsArg`] emails_to_delete: List of users and their secondary emails to delete. @@ -1733,6 +1922,9 @@ def team_members_secondary_emails_resend_verification_emails(self, Resend secondary email verification emails. Permission : Team member management. + Route attributes: + scope: members.write + :param List[:class:`dropbox.team.UserSecondaryEmailsArg`] emails_to_resend: List of users and secondary emails to resend verification emails to. @@ -1755,6 +1947,9 @@ def team_members_send_welcome_email(self, provided to identify the user account. No-op if team member is not pending. + Route attributes: + scope: members.write + :param arg: Argument for selecting a single user, either by team_member_id, external_id or email. :type arg: :class:`dropbox.team.UserSelectorArg` @@ -1779,6 +1974,9 @@ def team_members_set_admin_permissions_v2(self, Updates a team member's permissions. Permission : Team member management. + Route attributes: + scope: members.write + :param user: Identity of user whose role will be set. :type user: :class:`dropbox.team.UserSelectorArg` :param Nullable[List[str]] new_roles: The new roles for the member. Send @@ -1807,6 +2005,9 @@ def team_members_set_admin_permissions(self, Updates a team member's permissions. Permission : Team member management. + Route attributes: + scope: members.write + :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. @@ -1838,6 +2039,9 @@ def team_members_set_profile_v2(self, """ Updates a team member's profile. Permission : Team member management. + Route attributes: + scope: members.write + :param user: Identity of user whose profile will be set. :type user: :class:`dropbox.team.UserSelectorArg` :param Nullable[str] new_email: New email for member. @@ -1880,6 +2084,9 @@ def team_members_set_profile(self, """ Updates a team member's profile. Permission : Team member management. + Route attributes: + scope: members.write + :param user: Identity of user whose profile will be set. :type user: :class:`dropbox.team.UserSelectorArg` :param Nullable[str] new_email: New email for member. @@ -1918,6 +2125,9 @@ def team_members_set_profile_photo_v2(self, Updates a team member's profile photo. Permission : Team member management. + Route attributes: + scope: members.write + :param user: Identity of the user whose profile photo will be set. :type user: :class:`dropbox.team.UserSelectorArg` :param photo: Image to set as the member's new profile photo. @@ -1945,6 +2155,9 @@ def team_members_set_profile_photo(self, Updates a team member's profile photo. Permission : Team member management. + Route attributes: + scope: members.write + :param user: Identity of the user whose profile photo will be set. :type user: :class:`dropbox.team.UserSelectorArg` :param photo: Image to set as the member's new profile photo. @@ -1973,6 +2186,9 @@ def team_members_suspend(self, Exactly one of team_member_id, email, or external_id must be provided to identify the user account. + Route attributes: + scope: members.write + :param bool wipe_data: If provided, controls if the user's data will be deleted on their linked devices. :rtype: None @@ -1998,6 +2214,9 @@ def team_members_unsuspend(self, Exactly one of team_member_id, email, or external_id must be provided to identify the user account. + Route attributes: + scope: members.write + :param user: Identity of user to unsuspend. :type user: :class:`dropbox.team.UserSelectorArg` :rtype: None @@ -2025,6 +2244,9 @@ def team_namespaces_list(self, folders may be owned by other users or other teams. Duplicates may occur in the list. + Route attributes: + scope: team_data.member + :param int limit: Specifying a value here has no effect. :rtype: :class:`dropbox.team.TeamNamespacesListResult` :raises: :class:`.exceptions.ApiError` @@ -2048,6 +2270,9 @@ def team_namespaces_list_continue(self, this to paginate through all team-accessible namespaces. Duplicates may occur in the list. + Route attributes: + scope: team_data.member + :param str cursor: Indicates from what point to get the next set of team-accessible namespaces. :rtype: :class:`dropbox.team.TeamNamespacesListResult` @@ -2072,6 +2297,9 @@ def team_properties_template_add(self, """ Permission : Team member file access. + Route attributes: + scope: files.team_metadata.write + :rtype: :class:`dropbox.team.AddTemplateResult` :raises: :class:`.exceptions.ApiError` @@ -2099,6 +2327,9 @@ def team_properties_template_get(self, Permission : Team member file access. The scope for the route is files.team_metadata.write. + Route attributes: + scope: files.team_metadata.write + :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`. @@ -2126,6 +2357,9 @@ def team_properties_template_list(self): Permission : Team member file access. The scope for the route is files.team_metadata.write. + Route attributes: + scope: files.team_metadata.write + :rtype: :class:`dropbox.team.ListTemplateResult` :raises: :class:`.exceptions.ApiError` @@ -2153,6 +2387,9 @@ def team_properties_template_update(self, """ Permission : Team member file access. + Route attributes: + scope: files.team_metadata.write + :param str template_id: An identifier for template added by See :meth:`team_templates_add_for_user` or :meth:`team_templates_add_for_team`. @@ -2192,6 +2429,9 @@ def team_reports_get_activity(self, Retrieves reporting data about a team's user activity. Deprecated: Will be removed on July 1st 2021. + Route attributes: + scope: team_info.read + :param Nullable[datetime] start_date: Optional starting date (inclusive). If start_date is None or too long ago, this field will be set to 6 months ago. @@ -2223,6 +2463,9 @@ def team_reports_get_devices(self, Retrieves reporting data about a team's linked devices. Deprecated: Will be removed on July 1st 2021. + Route attributes: + scope: team_info.read + :param Nullable[datetime] start_date: Optional starting date (inclusive). If start_date is None or too long ago, this field will be set to 6 months ago. @@ -2254,6 +2497,9 @@ def team_reports_get_membership(self, Retrieves reporting data about a team's membership. Deprecated: Will be removed on July 1st 2021. + Route attributes: + scope: team_info.read + :param Nullable[datetime] start_date: Optional starting date (inclusive). If start_date is None or too long ago, this field will be set to 6 months ago. @@ -2285,6 +2531,9 @@ def team_reports_get_storage(self, Retrieves reporting data about a team's storage usage. Deprecated: Will be removed on July 1st 2021. + Route attributes: + scope: team_info.read + :param Nullable[datetime] start_date: Optional starting date (inclusive). If start_date is None or too long ago, this field will be set to 6 months ago. @@ -2315,6 +2564,9 @@ def team_team_folder_activate(self, Sets an archived team folder's status to active. Permission : Team member file access. + Route attributes: + scope: team_data.team_space + :param str team_folder_id: The ID of the team folder. :rtype: :class:`dropbox.team.TeamFolderMetadata` """ @@ -2335,6 +2587,9 @@ def team_team_folder_archive(self, and file members. This endpoint cannot be used for teams that have a shared team space. Permission : Team member file access. + Route attributes: + scope: team_data.team_space + :param bool force_async_off: Whether to force the archive to happen synchronously. :rtype: :class:`dropbox.team.TeamFolderArchiveLaunch` @@ -2355,6 +2610,9 @@ def team_team_folder_archive_check(self, Returns the status of an asynchronous job for archiving a team folder. Permission : Team member file access. + Route attributes: + scope: team_data.team_space + :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` @@ -2380,6 +2638,9 @@ def team_team_folder_create(self, only be used for teams that do not already have a shared team space. Permission : Team member file access. + Route attributes: + scope: team_data.team_space + :param str name: Name for the new team folder. :param Nullable[:class:`dropbox.team.SyncSettingArg`] sync_setting: The sync setting to apply to this team folder. Only permitted if the @@ -2406,6 +2667,9 @@ def team_team_folder_get_info(self, Retrieves metadata for team folders. Permission : Team member file access. + Route attributes: + scope: team_data.team_space + :param List[str] team_folder_ids: The list of team folder IDs. :rtype: List[:class:`dropbox.team.TeamFolderGetInfoItem`] """ @@ -2423,6 +2687,9 @@ def team_team_folder_list(self, """ Lists all team folders. Permission : Team member file access. + Route attributes: + scope: team_data.team_space + :param int limit: The maximum number of results to return per request. :rtype: :class:`dropbox.team.TeamFolderListResult` :raises: :class:`.exceptions.ApiError` @@ -2446,6 +2713,9 @@ def team_team_folder_list_continue(self, this to paginate through all team folders. Permission : Team member file access. + Route attributes: + scope: team_data.team_space + :param str cursor: Indicates from what point to get the next set of team folders. :rtype: :class:`dropbox.team.TeamFolderListResult` @@ -2470,6 +2740,9 @@ def team_team_folder_permanently_delete(self, used for teams that have a shared team space. Permission : Team member file access. + Route attributes: + scope: team_data.team_space + :param str team_folder_id: The ID of the team folder. :rtype: None """ @@ -2489,6 +2762,9 @@ def team_team_folder_rename(self, Changes an active team folder's name. Permission : Team member file access. + Route attributes: + scope: team_data.team_space + :param str name: New team folder name. :rtype: :class:`dropbox.team.TeamFolderMetadata` :raises: :class:`.exceptions.ApiError` @@ -2514,6 +2790,9 @@ def team_team_folder_update_sync_settings(self, Updates the sync settings on a team folder or its contents. Use of this endpoint requires that the team has team selective sync enabled. + Route attributes: + scope: team_data.team_space + :param Nullable[:class:`dropbox.team.SyncSettingArg`] sync_setting: Sync setting to apply to the team folder itself. Only meaningful if the team folder is not a shared team root. @@ -2542,6 +2821,9 @@ 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. + Route attributes: + scope: team_info.read + :rtype: :class:`dropbox.team.TokenGetAuthenticatedAdminResult` :raises: :class:`.exceptions.ApiError` @@ -2579,6 +2861,9 @@ def team_log_get_events(self, `_ to check for this feature. Permission : Team Auditing. + Route attributes: + scope: events.read + :param int limit: The maximal number of results to return per call. Note that some calls may not return ``limit`` number of events, and may even return no events, even with `has_more` set to true. In this @@ -2620,6 +2905,9 @@ def team_log_get_events_continue(self, Once a cursor has been retrieved from :meth:`team_log_get_events`, use this to paginate through all events. Permission : Team Auditing. + Route attributes: + scope: events.read + :param str cursor: Indicates from what point to get the next set of events. :rtype: :class:`dropbox.team_log.GetTeamEventsResult` diff --git a/dropbox/check.py b/dropbox/check.py index 45ebf659..8fc2ed43 100644 --- a/dropbox/check.py +++ b/dropbox/check.py @@ -71,8 +71,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EchoResult._all_field_names_ = set(['result']) EchoResult._all_fields_ = [('result', EchoResult.result.validator)] -EchoArg.query.default = u'' -EchoResult.result.default = u'' +EchoArg.query.default = '' +EchoResult.result.default = '' app = bb.Route( 'app', 1, @@ -80,9 +80,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EchoArg_validator, EchoResult_validator, bv.Void(), - {'auth': u'app', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'app', + 'host': 'api', + 'style': 'rpc'}, ) user = bb.Route( 'user', @@ -91,9 +91,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EchoArg_validator, EchoResult_validator, bv.Void(), - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) ROUTES = { diff --git a/dropbox/common.py b/dropbox/common.py index 69b276e6..41dbd474 100644 --- a/dropbox/common.py +++ b/dropbox/common.py @@ -283,16 +283,16 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UserRootInfo_validator = bv.Struct(UserRootInfo) -Date_validator = bv.Timestamp(u'%Y-%m-%d') -DisplayName_validator = bv.String(pattern=u'[^/:?*<>"|]*') +Date_validator = bv.Timestamp('%Y-%m-%d') +DisplayName_validator = bv.String(pattern='[^/:?*<>"|]*') DisplayNameLegacy_validator = bv.String() -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}$") +DropboxTimestamp_validator = bv.Timestamp('%Y-%m-%dT%H:%M:%SZ') +EmailAddress_validator = bv.String(max_length=255, pattern="^['#&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'[^/:?*<>"|]*') +NamePart_validator = bv.String(min_length=1, max_length=100, pattern='[^/:?*<>"|]*') +NamespaceId_validator = bv.String(pattern='[-_0-9a-zA-Z:]+') +OptionalNamePart_validator = bv.String(max_length=100, pattern='[^/:?*<>"|]*') SessionId_validator = bv.String() SharedFolderId_validator = NamespaceId_validator PathRoot._home_validator = bv.Void() @@ -335,12 +335,12 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RootInfo._all_fields_ = RootInfo._fields_ RootInfo._tag_to_subtype_ = { - (u'team',): TeamRootInfo_validator, - (u'user',): UserRootInfo_validator, + ('team',): TeamRootInfo_validator, + ('user',): UserRootInfo_validator, } RootInfo._pytype_to_tag_and_subtype_ = { - TeamRootInfo: ((u'team',), TeamRootInfo_validator), - UserRootInfo: ((u'user',), UserRootInfo_validator), + TeamRootInfo: (('team',), TeamRootInfo_validator), + UserRootInfo: (('user',), UserRootInfo_validator), } RootInfo._is_catch_all_ = True diff --git a/dropbox/contacts.py b/dropbox/contacts.py index 47fe3359..2654e3ab 100644 --- a/dropbox/contacts.py +++ b/dropbox/contacts.py @@ -115,9 +115,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), bv.Void(), bv.Void(), - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) delete_manual_contacts_batch = bb.Route( 'delete_manual_contacts_batch', @@ -126,9 +126,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DeleteManualContactsArg_validator, bv.Void(), DeleteManualContactsError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) ROUTES = { diff --git a/dropbox/file_properties.py b/dropbox/file_properties.py index 34710398..c6e421cb 100644 --- a/dropbox/file_properties.py +++ b/dropbox/file_properties.py @@ -1704,9 +1704,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UpdateTemplateResult_validator = bv.Struct(UpdateTemplateResult) Id_validator = bv.String(min_length=1) -PathOrId_validator = bv.String(pattern=u'/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/.*)?)') +PathOrId_validator = bv.String(pattern='/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/.*)?)') PropertiesSearchCursor_validator = bv.String(min_length=1) -TemplateId_validator = bv.String(min_length=1, pattern=u'(/|ptid:).*') +TemplateId_validator = bv.String(min_length=1, pattern='(/|ptid:).*') AddPropertiesArg.path.validator = PathOrId_validator AddPropertiesArg.property_groups.validator = bv.List(PropertyGroup_validator) AddPropertiesArg._all_field_names_ = set([ @@ -2106,9 +2106,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AddPropertiesArg_validator, bv.Void(), AddPropertiesError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) properties_overwrite = bb.Route( 'properties/overwrite', @@ -2117,9 +2117,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): OverwritePropertyGroupArg_validator, bv.Void(), InvalidPropertyGroupError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) properties_remove = bb.Route( 'properties/remove', @@ -2128,9 +2128,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RemovePropertiesArg_validator, bv.Void(), RemovePropertiesError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) properties_search = bb.Route( 'properties/search', @@ -2139,9 +2139,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PropertiesSearchArg_validator, PropertiesSearchResult_validator, PropertiesSearchError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) properties_search_continue = bb.Route( 'properties/search/continue', @@ -2150,9 +2150,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PropertiesSearchContinueArg_validator, PropertiesSearchResult_validator, PropertiesSearchContinueError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) properties_update = bb.Route( 'properties/update', @@ -2161,9 +2161,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UpdatePropertiesArg_validator, bv.Void(), UpdatePropertiesError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) templates_add_for_team = bb.Route( 'templates/add_for_team', @@ -2172,9 +2172,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AddTemplateArg_validator, AddTemplateResult_validator, ModifyTemplateError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) templates_add_for_user = bb.Route( 'templates/add_for_user', @@ -2183,9 +2183,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AddTemplateArg_validator, AddTemplateResult_validator, ModifyTemplateError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) templates_get_for_team = bb.Route( 'templates/get_for_team', @@ -2194,9 +2194,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetTemplateArg_validator, GetTemplateResult_validator, TemplateError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) templates_get_for_user = bb.Route( 'templates/get_for_user', @@ -2205,9 +2205,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetTemplateArg_validator, GetTemplateResult_validator, TemplateError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) templates_list_for_team = bb.Route( 'templates/list_for_team', @@ -2216,9 +2216,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), ListTemplateResult_validator, TemplateError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) templates_list_for_user = bb.Route( 'templates/list_for_user', @@ -2227,9 +2227,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), ListTemplateResult_validator, TemplateError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) templates_remove_for_team = bb.Route( 'templates/remove_for_team', @@ -2238,9 +2238,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RemoveTemplateArg_validator, bv.Void(), TemplateError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) templates_remove_for_user = bb.Route( 'templates/remove_for_user', @@ -2249,9 +2249,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RemoveTemplateArg_validator, bv.Void(), TemplateError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) templates_update_for_team = bb.Route( 'templates/update_for_team', @@ -2260,9 +2260,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UpdateTemplateArg_validator, UpdateTemplateResult_validator, ModifyTemplateError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) templates_update_for_user = bb.Route( 'templates/update_for_user', @@ -2271,9 +2271,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UpdateTemplateArg_validator, UpdateTemplateResult_validator, ModifyTemplateError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) ROUTES = { diff --git a/dropbox/file_requests.py b/dropbox/file_requests.py index a0260281..ab931bb7 100644 --- a/dropbox/file_requests.py +++ b/dropbox/file_requests.py @@ -1029,7 +1029,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UpdateFileRequestError_validator = bv.Union(UpdateFileRequestError) -FileRequestId_validator = bv.String(min_length=1, pattern=u'[-_0-9a-zA-Z]+') +FileRequestId_validator = bv.String(min_length=1, pattern='[-_0-9a-zA-Z]+') FileRequestValidationError_validator = bv.Nullable(bv.String()) GeneralFileRequestsError._disabled_for_team_validator = bv.Void() GeneralFileRequestsError._other_validator = bv.Void() @@ -1287,9 +1287,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), CountFileRequestsResult_validator, CountFileRequestsError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) create = bb.Route( 'create', @@ -1298,9 +1298,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CreateFileRequestArgs_validator, FileRequest_validator, CreateFileRequestError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) delete = bb.Route( 'delete', @@ -1309,9 +1309,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DeleteFileRequestArgs_validator, DeleteFileRequestsResult_validator, DeleteFileRequestError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) delete_all_closed = bb.Route( 'delete_all_closed', @@ -1320,9 +1320,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), DeleteAllClosedFileRequestsResult_validator, DeleteAllClosedFileRequestsError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) get = bb.Route( 'get', @@ -1331,9 +1331,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetFileRequestArgs_validator, FileRequest_validator, GetFileRequestError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) list_v2 = bb.Route( 'list', @@ -1342,9 +1342,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFileRequestsArg_validator, ListFileRequestsV2Result_validator, ListFileRequestsError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) list = bb.Route( 'list', @@ -1353,9 +1353,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), ListFileRequestsResult_validator, ListFileRequestsError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) list_continue = bb.Route( 'list/continue', @@ -1364,9 +1364,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFileRequestsContinueArg_validator, ListFileRequestsV2Result_validator, ListFileRequestsContinueError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) update = bb.Route( 'update', @@ -1375,9 +1375,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UpdateFileRequestArgs_validator, FileRequest_validator, UpdateFileRequestError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) ROUTES = { diff --git a/dropbox/files.py b/dropbox/files.py index 1b3895fc..4530b1ab 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -5093,6 +5093,43 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MoveBatchArg_validator = bv.Struct(MoveBatchArg) +class MoveIntoFamilyError(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 files.MoveIntoFamilyError.is_shared_folder: Moving shared folder into + Family Room folder is not allowed. + """ + + _catch_all = 'other' + # Attribute is overwritten below the class definition + is_shared_folder = None + # Attribute is overwritten below the class definition + other = None + + def is_is_shared_folder(self): + """ + Check if the union tag is ``is_shared_folder``. + + :rtype: bool + """ + return self._tag == 'is_shared_folder' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(MoveIntoFamilyError, self)._process_custom_annotations(annotation_type, field_path, processor) + +MoveIntoFamilyError_validator = bv.Union(MoveIntoFamilyError) + class MoveIntoVaultError(bb.Union): """ This class acts as a tagged union. Only one of the ``is_*`` methods will @@ -6041,6 +6078,9 @@ class RelocationError(bb.Union): :ivar MoveIntoVaultError RelocationError.cant_move_into_vault: Some content cannot be moved into Vault under certain circumstances, see detailed error. + :ivar MoveIntoFamilyError RelocationError.cant_move_into_family: Some + content cannot be moved into the Family Room folder under certain + circumstances, see detailed error. """ _catch_all = 'other' @@ -6109,6 +6149,17 @@ def cant_move_into_vault(cls, val): """ return cls('cant_move_into_vault', val) + @classmethod + def cant_move_into_family(cls, val): + """ + Create an instance of this class set to the ``cant_move_into_family`` + tag with value ``val``. + + :param MoveIntoFamilyError val: + :rtype: RelocationError + """ + return cls('cant_move_into_family', val) + def is_from_lookup(self): """ Check if the union tag is ``from_lookup``. @@ -6213,6 +6264,14 @@ def is_cant_move_into_vault(self): """ return self._tag == 'cant_move_into_vault' + def is_cant_move_into_family(self): + """ + Check if the union tag is ``cant_move_into_family``. + + :rtype: bool + """ + return self._tag == 'cant_move_into_family' + def is_other(self): """ Check if the union tag is ``other``. @@ -6264,6 +6323,19 @@ def get_cant_move_into_vault(self): raise AttributeError("tag 'cant_move_into_vault' not set") return self._value + def get_cant_move_into_family(self): + """ + Some content cannot be moved into the Family Room folder under certain + circumstances, see detailed error. + + Only call this if :meth:`is_cant_move_into_family` is true. + + :rtype: MoveIntoFamilyError + """ + if not self.is_cant_move_into_family(): + raise AttributeError("tag 'cant_move_into_family' not set") + return self._value + def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelocationError, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -9155,10 +9227,14 @@ class UploadError(bb.Union): :ivar InvalidPropertyGroupError UploadError.properties_error: The supplied property group is invalid. The file has uploaded without property groups. + :ivar files.UploadError.payload_too_large: The request payload must be at + most 150 MB. """ _catch_all = 'other' # Attribute is overwritten below the class definition + payload_too_large = None + # Attribute is overwritten below the class definition other = None @classmethod @@ -9199,6 +9275,14 @@ def is_properties_error(self): """ return self._tag == 'properties_error' + def is_payload_too_large(self): + """ + Check if the union tag is ``payload_too_large``. + + :rtype: bool + """ + return self._tag == 'payload_too_large' + def is_other(self): """ Check if the union tag is ``other``. @@ -9619,6 +9703,8 @@ class UploadSessionFinishError(bb.Union): Concurrent upload sessions need to be closed before finishing. :ivar files.UploadSessionFinishError.concurrent_session_missing_data: Not all pieces of data were uploaded before trying to finish the session. + :ivar files.UploadSessionFinishError.payload_too_large: The request payload + must be at most 150 MB. """ _catch_all = 'other' @@ -9633,6 +9719,8 @@ class UploadSessionFinishError(bb.Union): # Attribute is overwritten below the class definition concurrent_session_missing_data = None # Attribute is overwritten below the class definition + payload_too_large = None + # Attribute is overwritten below the class definition other = None @classmethod @@ -9732,6 +9820,14 @@ def is_concurrent_session_missing_data(self): """ return self._tag == 'concurrent_session_missing_data' + def is_payload_too_large(self): + """ + Check if the union tag is ``payload_too_large``. + + :rtype: bool + """ + return self._tag == 'payload_too_large' + def is_other(self): """ Check if the union tag is ``other``. @@ -9810,6 +9906,8 @@ class UploadSessionLookupError(bb.Union): :ivar files.UploadSessionLookupError.concurrent_session_invalid_data_size: For concurrent upload sessions, only chunks with size multiple of 4194304 bytes can be uploaded. + :ivar files.UploadSessionLookupError.payload_too_large: The request payload + must be at most 150 MB. """ _catch_all = 'other' @@ -9826,6 +9924,8 @@ class UploadSessionLookupError(bb.Union): # Attribute is overwritten below the class definition concurrent_session_invalid_data_size = None # Attribute is overwritten below the class definition + payload_too_large = None + # Attribute is overwritten below the class definition other = None @classmethod @@ -9895,6 +9995,14 @@ def is_concurrent_session_invalid_data_size(self): """ return self._tag == 'concurrent_session_invalid_data_size' + def is_payload_too_large(self): + """ + Check if the union tag is ``payload_too_large``. + + :rtype: bool + """ + return self._tag == 'payload_too_large' + def is_other(self): """ Check if the union tag is ``other``. @@ -9998,6 +10106,8 @@ class UploadSessionStartError(bb.Union): Uploading data not allowed when starting concurrent upload session. :ivar files.UploadSessionStartError.concurrent_session_close_not_allowed: Can not start a closed concurrent upload session. + :ivar files.UploadSessionStartError.payload_too_large: The request payload + must be at most 150 MB. """ _catch_all = 'other' @@ -10006,6 +10116,8 @@ class UploadSessionStartError(bb.Union): # Attribute is overwritten below the class definition concurrent_session_close_not_allowed = None # Attribute is overwritten below the class definition + payload_too_large = None + # Attribute is overwritten below the class definition other = None def is_concurrent_session_data_not_allowed(self): @@ -10024,6 +10136,14 @@ def is_concurrent_session_close_not_allowed(self): """ return self._tag == 'concurrent_session_close_not_allowed' + def is_payload_too_large(self): + """ + Check if the union tag is ``payload_too_large``. + + :rtype: bool + """ + return self._tag == 'payload_too_large' + def is_other(self): """ Check if the union tag is ``other``. @@ -10537,22 +10657,22 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CopyBatchArg_validator = RelocationBatchArgBase_validator CopyBatchArg = RelocationBatchArgBase -FileId_validator = bv.String(min_length=4, pattern=u'id:.+') +FileId_validator = bv.String(min_length=4, pattern='id:.+') 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]+') +Path_validator = bv.String(pattern='/(.|[\\r\\n])*') +PathOrId_validator = bv.String(pattern='/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/.*)?)') +PathR_validator = bv.String(pattern='(/(.|[\\r\\n])*)?|(ns:[0-9]+(/.*)?)') +PathROrId_validator = bv.String(pattern='(/(.|[\\r\\n])*)?|id:.*|(ns:[0-9]+(/.*)?)') +ReadPath_validator = bv.String(pattern='(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)') +Rev_validator = bv.String(min_length=9, pattern='[0-9a-f]+') SearchV2Cursor_validator = bv.String(min_length=1) Sha256HexHash_validator = bv.String(min_length=64, max_length=64) SharedLinkUrl_validator = bv.String() -TagText_validator = bv.String(min_length=1, max_length=32, pattern=u'[A-Za-z0-9_]+') -WritePath_validator = bv.String(pattern=u'(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)') -WritePathOrId_validator = bv.String(pattern=u'(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)') +TagText_validator = bv.String(min_length=1, max_length=32, pattern='[A-Za-z0-9_]+') +WritePath_validator = bv.String(pattern='(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)') +WritePathOrId_validator = bv.String(pattern='(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)') AddTagArg.path.validator = Path_validator AddTagArg.tag_text.validator = TagText_validator AddTagArg._all_field_names_ = set([ @@ -10863,14 +10983,14 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): Metadata._all_fields_ = Metadata._fields_ Metadata._tag_to_subtype_ = { - (u'file',): FileMetadata_validator, - (u'folder',): FolderMetadata_validator, - (u'deleted',): DeletedMetadata_validator, + ('file',): FileMetadata_validator, + ('folder',): FolderMetadata_validator, + ('deleted',): DeletedMetadata_validator, } Metadata._pytype_to_tag_and_subtype_ = { - FileMetadata: ((u'file',), FileMetadata_validator), - FolderMetadata: ((u'folder',), FolderMetadata_validator), - DeletedMetadata: ((u'deleted',), DeletedMetadata_validator), + FileMetadata: (('file',), FileMetadata_validator), + FolderMetadata: (('folder',), FolderMetadata_validator), + DeletedMetadata: (('deleted',), DeletedMetadata_validator), } Metadata._is_catch_all_ = False @@ -11626,12 +11746,12 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MediaMetadata._all_fields_ = MediaMetadata._fields_ MediaMetadata._tag_to_subtype_ = { - (u'photo',): PhotoMetadata_validator, - (u'video',): VideoMetadata_validator, + ('photo',): PhotoMetadata_validator, + ('video',): VideoMetadata_validator, } MediaMetadata._pytype_to_tag_and_subtype_ = { - PhotoMetadata: ((u'photo',), PhotoMetadata_validator), - VideoMetadata: ((u'video',), VideoMetadata_validator), + PhotoMetadata: (('photo',), PhotoMetadata_validator), + VideoMetadata: (('video',), VideoMetadata_validator), } MediaMetadata._is_catch_all_ = False @@ -11676,6 +11796,16 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MoveBatchArg._all_field_names_ = RelocationBatchArgBase._all_field_names_.union(set(['allow_ownership_transfer'])) MoveBatchArg._all_fields_ = RelocationBatchArgBase._all_fields_ + [('allow_ownership_transfer', MoveBatchArg.allow_ownership_transfer.validator)] +MoveIntoFamilyError._is_shared_folder_validator = bv.Void() +MoveIntoFamilyError._other_validator = bv.Void() +MoveIntoFamilyError._tagmap = { + 'is_shared_folder': MoveIntoFamilyError._is_shared_folder_validator, + 'other': MoveIntoFamilyError._other_validator, +} + +MoveIntoFamilyError.is_shared_folder = MoveIntoFamilyError('is_shared_folder') +MoveIntoFamilyError.other = MoveIntoFamilyError('other') + MoveIntoVaultError._is_shared_folder_validator = bv.Void() MoveIntoVaultError._other_validator = bv.Void() MoveIntoVaultError._tagmap = { @@ -11919,6 +12049,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RelocationError._internal_error_validator = bv.Void() RelocationError._cant_move_shared_folder_validator = bv.Void() RelocationError._cant_move_into_vault_validator = MoveIntoVaultError_validator +RelocationError._cant_move_into_family_validator = MoveIntoFamilyError_validator RelocationError._other_validator = bv.Void() RelocationError._tagmap = { 'from_lookup': RelocationError._from_lookup_validator, @@ -11934,6 +12065,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'internal_error': RelocationError._internal_error_validator, 'cant_move_shared_folder': RelocationError._cant_move_shared_folder_validator, 'cant_move_into_vault': RelocationError._cant_move_into_vault_validator, + 'cant_move_into_family': RelocationError._cant_move_into_family_validator, 'other': RelocationError._other_validator, } @@ -12583,13 +12715,16 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadError._path_validator = UploadWriteFailed_validator UploadError._properties_error_validator = file_properties.InvalidPropertyGroupError_validator +UploadError._payload_too_large_validator = bv.Void() UploadError._other_validator = bv.Void() UploadError._tagmap = { 'path': UploadError._path_validator, 'properties_error': UploadError._properties_error_validator, + 'payload_too_large': UploadError._payload_too_large_validator, 'other': UploadError._other_validator, } +UploadError.payload_too_large = UploadError('payload_too_large') UploadError.other = UploadError('other') UploadErrorWithProperties._tagmap = { @@ -12668,6 +12803,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadSessionFinishError._concurrent_session_data_not_allowed_validator = bv.Void() UploadSessionFinishError._concurrent_session_not_closed_validator = bv.Void() UploadSessionFinishError._concurrent_session_missing_data_validator = bv.Void() +UploadSessionFinishError._payload_too_large_validator = bv.Void() UploadSessionFinishError._other_validator = bv.Void() UploadSessionFinishError._tagmap = { 'lookup_failed': UploadSessionFinishError._lookup_failed_validator, @@ -12678,6 +12814,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'concurrent_session_data_not_allowed': UploadSessionFinishError._concurrent_session_data_not_allowed_validator, 'concurrent_session_not_closed': UploadSessionFinishError._concurrent_session_not_closed_validator, 'concurrent_session_missing_data': UploadSessionFinishError._concurrent_session_missing_data_validator, + 'payload_too_large': UploadSessionFinishError._payload_too_large_validator, 'other': UploadSessionFinishError._other_validator, } @@ -12686,6 +12823,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadSessionFinishError.concurrent_session_data_not_allowed = UploadSessionFinishError('concurrent_session_data_not_allowed') UploadSessionFinishError.concurrent_session_not_closed = UploadSessionFinishError('concurrent_session_not_closed') UploadSessionFinishError.concurrent_session_missing_data = UploadSessionFinishError('concurrent_session_missing_data') +UploadSessionFinishError.payload_too_large = UploadSessionFinishError('payload_too_large') UploadSessionFinishError.other = UploadSessionFinishError('other') UploadSessionLookupError._not_found_validator = bv.Void() @@ -12695,6 +12833,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadSessionLookupError._too_large_validator = bv.Void() UploadSessionLookupError._concurrent_session_invalid_offset_validator = bv.Void() UploadSessionLookupError._concurrent_session_invalid_data_size_validator = bv.Void() +UploadSessionLookupError._payload_too_large_validator = bv.Void() UploadSessionLookupError._other_validator = bv.Void() UploadSessionLookupError._tagmap = { 'not_found': UploadSessionLookupError._not_found_validator, @@ -12704,6 +12843,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'too_large': UploadSessionLookupError._too_large_validator, 'concurrent_session_invalid_offset': UploadSessionLookupError._concurrent_session_invalid_offset_validator, 'concurrent_session_invalid_data_size': UploadSessionLookupError._concurrent_session_invalid_data_size_validator, + 'payload_too_large': UploadSessionLookupError._payload_too_large_validator, 'other': UploadSessionLookupError._other_validator, } @@ -12713,6 +12853,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadSessionLookupError.too_large = UploadSessionLookupError('too_large') UploadSessionLookupError.concurrent_session_invalid_offset = UploadSessionLookupError('concurrent_session_invalid_offset') UploadSessionLookupError.concurrent_session_invalid_data_size = UploadSessionLookupError('concurrent_session_invalid_data_size') +UploadSessionLookupError.payload_too_large = UploadSessionLookupError('payload_too_large') UploadSessionLookupError.other = UploadSessionLookupError('other') UploadSessionOffsetError.correct_offset.validator = bv.UInt64() @@ -12732,15 +12873,18 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadSessionStartError._concurrent_session_data_not_allowed_validator = bv.Void() UploadSessionStartError._concurrent_session_close_not_allowed_validator = bv.Void() +UploadSessionStartError._payload_too_large_validator = bv.Void() UploadSessionStartError._other_validator = bv.Void() UploadSessionStartError._tagmap = { 'concurrent_session_data_not_allowed': UploadSessionStartError._concurrent_session_data_not_allowed_validator, 'concurrent_session_close_not_allowed': UploadSessionStartError._concurrent_session_close_not_allowed_validator, + 'payload_too_large': UploadSessionStartError._payload_too_large_validator, 'other': UploadSessionStartError._other_validator, } UploadSessionStartError.concurrent_session_data_not_allowed = UploadSessionStartError('concurrent_session_data_not_allowed') UploadSessionStartError.concurrent_session_close_not_allowed = UploadSessionStartError('concurrent_session_close_not_allowed') +UploadSessionStartError.payload_too_large = UploadSessionStartError('payload_too_large') UploadSessionStartError.other = UploadSessionStartError('other') UploadSessionStartResult.session_id.validator = bv.String() @@ -12890,9 +13034,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AlphaGetMetadataArg_validator, Metadata_validator, AlphaGetMetadataError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) alpha_upload = bb.Route( 'alpha/upload', @@ -12901,9 +13045,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CommitInfoWithProperties_validator, FileMetadata_validator, UploadErrorWithProperties_validator, - {'auth': u'user', - 'host': u'content', - 'style': u'upload'}, + {'auth': 'user', + 'host': 'content', + 'style': 'upload'}, ) copy_v2 = bb.Route( 'copy', @@ -12912,9 +13056,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RelocationArg_validator, RelocationResult_validator, RelocationError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) copy = bb.Route( 'copy', @@ -12923,9 +13067,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RelocationArg_validator, Metadata_validator, RelocationError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) copy_batch_v2 = bb.Route( 'copy_batch', @@ -12934,9 +13078,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CopyBatchArg_validator, RelocationBatchV2Launch_validator, bv.Void(), - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) copy_batch = bb.Route( 'copy_batch', @@ -12945,9 +13089,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RelocationBatchArg_validator, RelocationBatchLaunch_validator, bv.Void(), - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) copy_batch_check_v2 = bb.Route( 'copy_batch/check', @@ -12956,9 +13100,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, RelocationBatchV2JobStatus_validator, async_.PollError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) copy_batch_check = bb.Route( 'copy_batch/check', @@ -12967,9 +13111,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, RelocationBatchJobStatus_validator, async_.PollError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) copy_reference_get = bb.Route( 'copy_reference/get', @@ -12978,9 +13122,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetCopyReferenceArg_validator, GetCopyReferenceResult_validator, GetCopyReferenceError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) copy_reference_save = bb.Route( 'copy_reference/save', @@ -12989,9 +13133,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SaveCopyReferenceArg_validator, SaveCopyReferenceResult_validator, SaveCopyReferenceError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) create_folder_v2 = bb.Route( 'create_folder', @@ -13000,9 +13144,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CreateFolderArg_validator, CreateFolderResult_validator, CreateFolderError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) create_folder = bb.Route( 'create_folder', @@ -13011,9 +13155,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CreateFolderArg_validator, FolderMetadata_validator, CreateFolderError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) create_folder_batch = bb.Route( 'create_folder_batch', @@ -13022,9 +13166,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CreateFolderBatchArg_validator, CreateFolderBatchLaunch_validator, bv.Void(), - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) create_folder_batch_check = bb.Route( 'create_folder_batch/check', @@ -13033,9 +13177,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, CreateFolderBatchJobStatus_validator, async_.PollError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) delete_v2 = bb.Route( 'delete', @@ -13044,9 +13188,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DeleteArg_validator, DeleteResult_validator, DeleteError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) delete = bb.Route( 'delete', @@ -13055,9 +13199,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DeleteArg_validator, Metadata_validator, DeleteError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) delete_batch = bb.Route( 'delete_batch', @@ -13066,9 +13210,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DeleteBatchArg_validator, DeleteBatchLaunch_validator, bv.Void(), - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) delete_batch_check = bb.Route( 'delete_batch/check', @@ -13077,9 +13221,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, DeleteBatchJobStatus_validator, async_.PollError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) download = bb.Route( 'download', @@ -13088,9 +13232,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DownloadArg_validator, FileMetadata_validator, DownloadError_validator, - {'auth': u'user', - 'host': u'content', - 'style': u'download'}, + {'auth': 'user', + 'host': 'content', + 'style': 'download'}, ) download_zip = bb.Route( 'download_zip', @@ -13099,9 +13243,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DownloadZipArg_validator, DownloadZipResult_validator, DownloadZipError_validator, - {'auth': u'user', - 'host': u'content', - 'style': u'download'}, + {'auth': 'user', + 'host': 'content', + 'style': 'download'}, ) export = bb.Route( 'export', @@ -13110,9 +13254,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ExportArg_validator, ExportResult_validator, ExportError_validator, - {'auth': u'user', - 'host': u'content', - 'style': u'download'}, + {'auth': 'user', + 'host': 'content', + 'style': 'download'}, ) get_file_lock_batch = bb.Route( 'get_file_lock_batch', @@ -13121,9 +13265,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LockFileBatchArg_validator, LockFileBatchResult_validator, LockFileError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) get_metadata = bb.Route( 'get_metadata', @@ -13132,9 +13276,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetMetadataArg_validator, Metadata_validator, GetMetadataError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) get_preview = bb.Route( 'get_preview', @@ -13143,9 +13287,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PreviewArg_validator, FileMetadata_validator, PreviewError_validator, - {'auth': u'user', - 'host': u'content', - 'style': u'download'}, + {'auth': 'user', + 'host': 'content', + 'style': 'download'}, ) get_temporary_link = bb.Route( 'get_temporary_link', @@ -13154,9 +13298,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetTemporaryLinkArg_validator, GetTemporaryLinkResult_validator, GetTemporaryLinkError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) get_temporary_upload_link = bb.Route( 'get_temporary_upload_link', @@ -13165,9 +13309,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetTemporaryUploadLinkArg_validator, GetTemporaryUploadLinkResult_validator, bv.Void(), - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) get_thumbnail = bb.Route( 'get_thumbnail', @@ -13176,9 +13320,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ThumbnailArg_validator, FileMetadata_validator, ThumbnailError_validator, - {'auth': u'user', - 'host': u'content', - 'style': u'download'}, + {'auth': 'user', + 'host': 'content', + 'style': 'download'}, ) get_thumbnail_v2 = bb.Route( 'get_thumbnail', @@ -13187,9 +13331,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ThumbnailV2Arg_validator, PreviewResult_validator, ThumbnailV2Error_validator, - {'auth': u'app, user', - 'host': u'content', - 'style': u'download'}, + {'auth': 'app, user', + 'host': 'content', + 'style': 'download'}, ) get_thumbnail_batch = bb.Route( 'get_thumbnail_batch', @@ -13198,9 +13342,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetThumbnailBatchArg_validator, GetThumbnailBatchResult_validator, GetThumbnailBatchError_validator, - {'auth': u'user', - 'host': u'content', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'content', + 'style': 'rpc'}, ) list_folder = bb.Route( 'list_folder', @@ -13209,9 +13353,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFolderArg_validator, ListFolderResult_validator, ListFolderError_validator, - {'auth': u'app, user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'app, user', + 'host': 'api', + 'style': 'rpc'}, ) list_folder_continue = bb.Route( 'list_folder/continue', @@ -13220,9 +13364,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFolderContinueArg_validator, ListFolderResult_validator, ListFolderContinueError_validator, - {'auth': u'app, user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'app, user', + 'host': 'api', + 'style': 'rpc'}, ) list_folder_get_latest_cursor = bb.Route( 'list_folder/get_latest_cursor', @@ -13231,9 +13375,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFolderArg_validator, ListFolderGetLatestCursorResult_validator, ListFolderError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) list_folder_longpoll = bb.Route( 'list_folder/longpoll', @@ -13242,9 +13386,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFolderLongpollArg_validator, ListFolderLongpollResult_validator, ListFolderLongpollError_validator, - {'auth': u'noauth', - 'host': u'notify', - 'style': u'rpc'}, + {'auth': 'noauth', + 'host': 'notify', + 'style': 'rpc'}, ) list_revisions = bb.Route( 'list_revisions', @@ -13253,9 +13397,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListRevisionsArg_validator, ListRevisionsResult_validator, ListRevisionsError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) lock_file_batch = bb.Route( 'lock_file_batch', @@ -13264,9 +13408,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LockFileBatchArg_validator, LockFileBatchResult_validator, LockFileError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) move_v2 = bb.Route( 'move', @@ -13275,9 +13419,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RelocationArg_validator, RelocationResult_validator, RelocationError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) move = bb.Route( 'move', @@ -13286,9 +13430,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RelocationArg_validator, Metadata_validator, RelocationError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) move_batch_v2 = bb.Route( 'move_batch', @@ -13297,9 +13441,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MoveBatchArg_validator, RelocationBatchV2Launch_validator, bv.Void(), - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) move_batch = bb.Route( 'move_batch', @@ -13308,9 +13452,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RelocationBatchArg_validator, RelocationBatchLaunch_validator, bv.Void(), - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) move_batch_check_v2 = bb.Route( 'move_batch/check', @@ -13319,9 +13463,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, RelocationBatchV2JobStatus_validator, async_.PollError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) move_batch_check = bb.Route( 'move_batch/check', @@ -13330,9 +13474,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, RelocationBatchJobStatus_validator, async_.PollError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) paper_create = bb.Route( 'paper/create', @@ -13341,9 +13485,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PaperCreateArg_validator, PaperCreateResult_validator, PaperCreateError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'upload'}, + {'auth': 'user', + 'host': 'api', + 'style': 'upload'}, ) paper_update = bb.Route( 'paper/update', @@ -13352,9 +13496,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PaperUpdateArg_validator, PaperUpdateResult_validator, PaperUpdateError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'upload'}, + {'auth': 'user', + 'host': 'api', + 'style': 'upload'}, ) permanently_delete = bb.Route( 'permanently_delete', @@ -13363,9 +13507,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DeleteArg_validator, bv.Void(), DeleteError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) properties_add = bb.Route( 'properties/add', @@ -13374,9 +13518,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): file_properties.AddPropertiesArg_validator, bv.Void(), file_properties.AddPropertiesError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) properties_overwrite = bb.Route( 'properties/overwrite', @@ -13385,9 +13529,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): file_properties.OverwritePropertyGroupArg_validator, bv.Void(), file_properties.InvalidPropertyGroupError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) properties_remove = bb.Route( 'properties/remove', @@ -13396,9 +13540,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): file_properties.RemovePropertiesArg_validator, bv.Void(), file_properties.RemovePropertiesError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) properties_template_get = bb.Route( 'properties/template/get', @@ -13407,9 +13551,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): file_properties.GetTemplateArg_validator, file_properties.GetTemplateResult_validator, file_properties.TemplateError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) properties_template_list = bb.Route( 'properties/template/list', @@ -13418,9 +13562,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), file_properties.ListTemplateResult_validator, file_properties.TemplateError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) properties_update = bb.Route( 'properties/update', @@ -13429,9 +13573,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): file_properties.UpdatePropertiesArg_validator, bv.Void(), file_properties.UpdatePropertiesError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) restore = bb.Route( 'restore', @@ -13440,9 +13584,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RestoreArg_validator, FileMetadata_validator, RestoreError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) save_url = bb.Route( 'save_url', @@ -13451,9 +13595,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SaveUrlArg_validator, SaveUrlResult_validator, SaveUrlError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) save_url_check_job_status = bb.Route( 'save_url/check_job_status', @@ -13462,9 +13606,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, SaveUrlJobStatus_validator, async_.PollError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) search = bb.Route( 'search', @@ -13473,9 +13617,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SearchArg_validator, SearchResult_validator, SearchError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) search_v2 = bb.Route( 'search', @@ -13484,9 +13628,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SearchV2Arg_validator, SearchV2Result_validator, SearchError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) search_continue_v2 = bb.Route( 'search/continue', @@ -13495,9 +13639,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SearchV2ContinueArg_validator, SearchV2Result_validator, SearchError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) tags_add = bb.Route( 'tags/add', @@ -13506,9 +13650,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AddTagArg_validator, bv.Void(), AddTagError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) tags_get = bb.Route( 'tags/get', @@ -13517,9 +13661,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetTagsArg_validator, GetTagsResult_validator, BaseTagError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) tags_remove = bb.Route( 'tags/remove', @@ -13528,9 +13672,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RemoveTagArg_validator, bv.Void(), RemoveTagError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) unlock_file_batch = bb.Route( 'unlock_file_batch', @@ -13539,9 +13683,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UnlockFileBatchArg_validator, LockFileBatchResult_validator, LockFileError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) upload = bb.Route( 'upload', @@ -13550,9 +13694,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CommitInfo_validator, FileMetadata_validator, UploadError_validator, - {'auth': u'user', - 'host': u'content', - 'style': u'upload'}, + {'auth': 'user', + 'host': 'content', + 'style': 'upload'}, ) upload_session_append_v2 = bb.Route( 'upload_session/append', @@ -13561,9 +13705,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadSessionAppendArg_validator, bv.Void(), UploadSessionLookupError_validator, - {'auth': u'user', - 'host': u'content', - 'style': u'upload'}, + {'auth': 'user', + 'host': 'content', + 'style': 'upload'}, ) upload_session_append = bb.Route( 'upload_session/append', @@ -13572,9 +13716,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadSessionCursor_validator, bv.Void(), UploadSessionLookupError_validator, - {'auth': u'user', - 'host': u'content', - 'style': u'upload'}, + {'auth': 'user', + 'host': 'content', + 'style': 'upload'}, ) upload_session_finish = bb.Route( 'upload_session/finish', @@ -13583,9 +13727,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadSessionFinishArg_validator, FileMetadata_validator, UploadSessionFinishError_validator, - {'auth': u'user', - 'host': u'content', - 'style': u'upload'}, + {'auth': 'user', + 'host': 'content', + 'style': 'upload'}, ) upload_session_finish_batch = bb.Route( 'upload_session/finish_batch', @@ -13594,9 +13738,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadSessionFinishBatchArg_validator, UploadSessionFinishBatchLaunch_validator, bv.Void(), - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) upload_session_finish_batch_v2 = bb.Route( 'upload_session/finish_batch', @@ -13605,9 +13749,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadSessionFinishBatchArg_validator, UploadSessionFinishBatchResult_validator, bv.Void(), - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) upload_session_finish_batch_check = bb.Route( 'upload_session/finish_batch/check', @@ -13616,9 +13760,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, UploadSessionFinishBatchJobStatus_validator, async_.PollError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) upload_session_start = bb.Route( 'upload_session/start', @@ -13627,9 +13771,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadSessionStartArg_validator, UploadSessionStartResult_validator, UploadSessionStartError_validator, - {'auth': u'user', - 'host': u'content', - 'style': u'upload'}, + {'auth': 'user', + 'host': 'content', + 'style': 'upload'}, ) ROUTES = { diff --git a/dropbox/paper.py b/dropbox/paper.py index 1bf7e97b..b0a932f5 100644 --- a/dropbox/paper.py +++ b/dropbox/paper.py @@ -2981,9 +2981,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RefPaperDoc_validator, bv.Void(), DocLookupError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) docs_create = bb.Route( 'docs/create', @@ -2992,9 +2992,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PaperDocCreateArgs_validator, PaperDocCreateUpdateResult_validator, PaperDocCreateError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'upload'}, + {'auth': 'user', + 'host': 'api', + 'style': 'upload'}, ) docs_download = bb.Route( 'docs/download', @@ -3003,9 +3003,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PaperDocExport_validator, PaperDocExportResult_validator, DocLookupError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'download'}, + {'auth': 'user', + 'host': 'api', + 'style': 'download'}, ) docs_folder_users_list = bb.Route( 'docs/folder_users/list', @@ -3014,9 +3014,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListUsersOnFolderArgs_validator, ListUsersOnFolderResponse_validator, DocLookupError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) docs_folder_users_list_continue = bb.Route( 'docs/folder_users/list/continue', @@ -3025,9 +3025,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListUsersOnFolderContinueArgs_validator, ListUsersOnFolderResponse_validator, ListUsersCursorError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) docs_get_folder_info = bb.Route( 'docs/get_folder_info', @@ -3036,9 +3036,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RefPaperDoc_validator, FoldersContainingPaperDoc_validator, DocLookupError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) docs_list = bb.Route( 'docs/list', @@ -3047,9 +3047,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListPaperDocsArgs_validator, ListPaperDocsResponse_validator, bv.Void(), - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) docs_list_continue = bb.Route( 'docs/list/continue', @@ -3058,9 +3058,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListPaperDocsContinueArgs_validator, ListPaperDocsResponse_validator, ListDocsCursorError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) docs_permanently_delete = bb.Route( 'docs/permanently_delete', @@ -3069,9 +3069,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RefPaperDoc_validator, bv.Void(), DocLookupError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) docs_sharing_policy_get = bb.Route( 'docs/sharing_policy/get', @@ -3080,9 +3080,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RefPaperDoc_validator, SharingPolicy_validator, DocLookupError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) docs_sharing_policy_set = bb.Route( 'docs/sharing_policy/set', @@ -3091,9 +3091,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PaperDocSharingPolicy_validator, bv.Void(), DocLookupError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) docs_update = bb.Route( 'docs/update', @@ -3102,9 +3102,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PaperDocUpdateArgs_validator, PaperDocCreateUpdateResult_validator, PaperDocUpdateError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'upload'}, + {'auth': 'user', + 'host': 'api', + 'style': 'upload'}, ) docs_users_add = bb.Route( 'docs/users/add', @@ -3113,9 +3113,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AddPaperDocUser_validator, bv.List(AddPaperDocUserMemberResult_validator), DocLookupError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) docs_users_list = bb.Route( 'docs/users/list', @@ -3124,9 +3124,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListUsersOnPaperDocArgs_validator, ListUsersOnPaperDocResponse_validator, DocLookupError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) docs_users_list_continue = bb.Route( 'docs/users/list/continue', @@ -3135,9 +3135,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListUsersOnPaperDocContinueArgs_validator, ListUsersOnPaperDocResponse_validator, ListUsersCursorError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) docs_users_remove = bb.Route( 'docs/users/remove', @@ -3146,9 +3146,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RemovePaperDocUser_validator, bv.Void(), DocLookupError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) folders_create = bb.Route( 'folders/create', @@ -3157,9 +3157,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PaperFolderCreateArg_validator, PaperFolderCreateResult_validator, PaperFolderCreateError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) ROUTES = { diff --git a/dropbox/sharing.py b/dropbox/sharing.py index 6c7f7ab8..85eff028 100644 --- a/dropbox/sharing.py +++ b/dropbox/sharing.py @@ -210,7 +210,7 @@ class AddFileMemberArgs(bb.Struct): :ivar sharing.AddFileMemberArgs.custom_message: Message to send to added members in their invitation. :ivar sharing.AddFileMemberArgs.quiet: Whether added members should be - notified via device notifications of their invitation. + notified via email and device notifications of their invitation. :ivar sharing.AddFileMemberArgs.access_level: AccessLevel union object, describing what access level we want to give new members. :ivar sharing.AddFileMemberArgs.add_message_as_comment: If the custom @@ -11018,7 +11018,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 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]+(/.*)?') +PathOrId_validator = bv.String(min_length=1, pattern='((/|id:).*|nspath:[0-9]+:.*)|ns:[0-9]+(/.*)?') ReadPath_validator = files.ReadPath_validator Rev_validator = files.Rev_validator TeamInfo_validator = users.Team_validator @@ -11283,12 +11283,12 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LinkMetadata._all_fields_ = LinkMetadata._fields_ LinkMetadata._tag_to_subtype_ = { - (u'path',): PathLinkMetadata_validator, - (u'collection',): CollectionLinkMetadata_validator, + ('path',): PathLinkMetadata_validator, + ('collection',): CollectionLinkMetadata_validator, } LinkMetadata._pytype_to_tag_and_subtype_ = { - PathLinkMetadata: ((u'path',), PathLinkMetadata_validator), - CollectionLinkMetadata: ((u'collection',), CollectionLinkMetadata_validator), + PathLinkMetadata: (('path',), PathLinkMetadata_validator), + CollectionLinkMetadata: (('collection',), CollectionLinkMetadata_validator), } LinkMetadata._is_catch_all_ = True @@ -11464,12 +11464,12 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SharedLinkMetadata._all_fields_ = SharedLinkMetadata._fields_ SharedLinkMetadata._tag_to_subtype_ = { - (u'file',): FileLinkMetadata_validator, - (u'folder',): FolderLinkMetadata_validator, + ('file',): FileLinkMetadata_validator, + ('folder',): FolderLinkMetadata_validator, } SharedLinkMetadata._pytype_to_tag_and_subtype_ = { - FileLinkMetadata: ((u'file',), FileLinkMetadata_validator), - FolderLinkMetadata: ((u'folder',), FolderLinkMetadata_validator), + FileLinkMetadata: (('file',), FileLinkMetadata_validator), + FolderLinkMetadata: (('folder',), FolderLinkMetadata_validator), } SharedLinkMetadata._is_catch_all_ = True @@ -13470,9 +13470,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AddFileMemberArgs_validator, bv.List(FileMemberActionResult_validator), AddFileMemberError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) add_folder_member = bb.Route( 'add_folder_member', @@ -13481,9 +13481,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AddFolderMemberArg_validator, bv.Void(), AddFolderMemberError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) check_job_status = bb.Route( 'check_job_status', @@ -13492,9 +13492,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, JobStatus_validator, async_.PollError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) check_remove_member_job_status = bb.Route( 'check_remove_member_job_status', @@ -13503,9 +13503,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, RemoveMemberJobStatus_validator, async_.PollError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) check_share_job_status = bb.Route( 'check_share_job_status', @@ -13514,9 +13514,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, ShareFolderJobStatus_validator, async_.PollError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) create_shared_link = bb.Route( 'create_shared_link', @@ -13525,9 +13525,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CreateSharedLinkArg_validator, PathLinkMetadata_validator, CreateSharedLinkError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) create_shared_link_with_settings = bb.Route( 'create_shared_link_with_settings', @@ -13536,9 +13536,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CreateSharedLinkWithSettingsArg_validator, SharedLinkMetadata_validator, CreateSharedLinkWithSettingsError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) get_file_metadata = bb.Route( 'get_file_metadata', @@ -13547,9 +13547,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetFileMetadataArg_validator, SharedFileMetadata_validator, GetFileMetadataError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) get_file_metadata_batch = bb.Route( 'get_file_metadata/batch', @@ -13558,9 +13558,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetFileMetadataBatchArg_validator, bv.List(GetFileMetadataBatchResult_validator), SharingUserError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) get_folder_metadata = bb.Route( 'get_folder_metadata', @@ -13569,9 +13569,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetMetadataArgs_validator, SharedFolderMetadata_validator, SharedFolderAccessError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) get_shared_link_file = bb.Route( 'get_shared_link_file', @@ -13580,9 +13580,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetSharedLinkFileArg_validator, SharedLinkMetadata_validator, GetSharedLinkFileError_validator, - {'auth': u'user', - 'host': u'content', - 'style': u'download'}, + {'auth': 'user', + 'host': 'content', + 'style': 'download'}, ) get_shared_link_metadata = bb.Route( 'get_shared_link_metadata', @@ -13591,9 +13591,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetSharedLinkMetadataArg_validator, SharedLinkMetadata_validator, SharedLinkError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) get_shared_links = bb.Route( 'get_shared_links', @@ -13602,9 +13602,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetSharedLinksArg_validator, GetSharedLinksResult_validator, GetSharedLinksError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) list_file_members = bb.Route( 'list_file_members', @@ -13613,9 +13613,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFileMembersArg_validator, SharedFileMembers_validator, ListFileMembersError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) list_file_members_batch = bb.Route( 'list_file_members/batch', @@ -13624,9 +13624,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFileMembersBatchArg_validator, bv.List(ListFileMembersBatchResult_validator), SharingUserError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) list_file_members_continue = bb.Route( 'list_file_members/continue', @@ -13635,9 +13635,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFileMembersContinueArg_validator, SharedFileMembers_validator, ListFileMembersContinueError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) list_folder_members = bb.Route( 'list_folder_members', @@ -13646,9 +13646,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFolderMembersArgs_validator, SharedFolderMembers_validator, SharedFolderAccessError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) list_folder_members_continue = bb.Route( 'list_folder_members/continue', @@ -13657,9 +13657,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFolderMembersContinueArg_validator, SharedFolderMembers_validator, ListFolderMembersContinueError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) list_folders = bb.Route( 'list_folders', @@ -13668,9 +13668,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFoldersArgs_validator, ListFoldersResult_validator, bv.Void(), - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) list_folders_continue = bb.Route( 'list_folders/continue', @@ -13679,9 +13679,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFoldersContinueArg_validator, ListFoldersResult_validator, ListFoldersContinueError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) list_mountable_folders = bb.Route( 'list_mountable_folders', @@ -13690,9 +13690,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFoldersArgs_validator, ListFoldersResult_validator, bv.Void(), - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) list_mountable_folders_continue = bb.Route( 'list_mountable_folders/continue', @@ -13701,9 +13701,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFoldersContinueArg_validator, ListFoldersResult_validator, ListFoldersContinueError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) list_received_files = bb.Route( 'list_received_files', @@ -13712,9 +13712,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFilesArg_validator, ListFilesResult_validator, SharingUserError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) list_received_files_continue = bb.Route( 'list_received_files/continue', @@ -13723,9 +13723,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListFilesContinueArg_validator, ListFilesResult_validator, ListFilesContinueError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) list_shared_links = bb.Route( 'list_shared_links', @@ -13734,9 +13734,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListSharedLinksArg_validator, ListSharedLinksResult_validator, ListSharedLinksError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) modify_shared_link_settings = bb.Route( 'modify_shared_link_settings', @@ -13745,9 +13745,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ModifySharedLinkSettingsArgs_validator, SharedLinkMetadata_validator, ModifySharedLinkSettingsError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) mount_folder = bb.Route( 'mount_folder', @@ -13756,9 +13756,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MountFolderArg_validator, SharedFolderMetadata_validator, MountFolderError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) relinquish_file_membership = bb.Route( 'relinquish_file_membership', @@ -13767,9 +13767,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RelinquishFileMembershipArg_validator, bv.Void(), RelinquishFileMembershipError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) relinquish_folder_membership = bb.Route( 'relinquish_folder_membership', @@ -13778,9 +13778,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RelinquishFolderMembershipArg_validator, async_.LaunchEmptyResult_validator, RelinquishFolderMembershipError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) remove_file_member = bb.Route( 'remove_file_member', @@ -13789,9 +13789,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RemoveFileMemberArg_validator, FileMemberActionIndividualResult_validator, RemoveFileMemberError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) remove_file_member_2 = bb.Route( 'remove_file_member_2', @@ -13800,9 +13800,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RemoveFileMemberArg_validator, FileMemberRemoveActionResult_validator, RemoveFileMemberError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) remove_folder_member = bb.Route( 'remove_folder_member', @@ -13811,9 +13811,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RemoveFolderMemberArg_validator, async_.LaunchResultBase_validator, RemoveFolderMemberError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) revoke_shared_link = bb.Route( 'revoke_shared_link', @@ -13822,9 +13822,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RevokeSharedLinkArg_validator, bv.Void(), RevokeSharedLinkError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) set_access_inheritance = bb.Route( 'set_access_inheritance', @@ -13833,9 +13833,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SetAccessInheritanceArg_validator, ShareFolderLaunch_validator, SetAccessInheritanceError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) share_folder = bb.Route( 'share_folder', @@ -13844,9 +13844,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ShareFolderArg_validator, ShareFolderLaunch_validator, ShareFolderError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) transfer_folder = bb.Route( 'transfer_folder', @@ -13855,9 +13855,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TransferFolderArg_validator, bv.Void(), TransferFolderError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) unmount_folder = bb.Route( 'unmount_folder', @@ -13866,9 +13866,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UnmountFolderArg_validator, bv.Void(), UnmountFolderError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) unshare_file = bb.Route( 'unshare_file', @@ -13877,9 +13877,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UnshareFileArg_validator, bv.Void(), UnshareFileError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) unshare_folder = bb.Route( 'unshare_folder', @@ -13888,9 +13888,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UnshareFolderArg_validator, async_.LaunchEmptyResult_validator, UnshareFolderError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) update_file_member = bb.Route( 'update_file_member', @@ -13899,9 +13899,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UpdateFileMemberArgs_validator, MemberAccessLevelResult_validator, FileMemberActionError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) update_folder_member = bb.Route( 'update_folder_member', @@ -13910,9 +13910,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UpdateFolderMemberArg_validator, MemberAccessLevelResult_validator, UpdateFolderMemberError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) update_folder_policy = bb.Route( 'update_folder_policy', @@ -13921,9 +13921,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UpdateFolderPolicyArg_validator, SharedFolderMetadata_validator, UpdateFolderPolicyError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) ROUTES = { diff --git a/dropbox/team.py b/dropbox/team.py index 6f5b65c9..8fc33412 100644 --- a/dropbox/team.py +++ b/dropbox/team.py @@ -13383,7 +13383,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UsersSelectorArg_validator = bv.Union(UsersSelectorArg) GroupsGetInfoResult_validator = bv.List(GroupsGetInfoItem_validator) -LegalHoldId_validator = bv.String(pattern=u'^pid_dbhid:.+') +LegalHoldId_validator = bv.String(pattern='^pid_dbhid:.+') LegalHoldPolicyDescription_validator = bv.String(max_length=501) LegalHoldPolicyName_validator = bv.String(max_length=140) LegalHoldsGetPolicyResult_validator = LegalHoldPolicy_validator @@ -13395,10 +13395,10 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListHeldRevisionCursor_validator = bv.String(min_length=1) MembersGetInfoResult_validator = bv.List(MembersGetInfoItem_validator) NumberPerDay_validator = bv.List(bv.Nullable(bv.UInt64())) -Path_validator = bv.String(pattern=u'(/(.|[\\r\\n])*)?') +Path_validator = bv.String(pattern='(/(.|[\\r\\n])*)?') SecondaryEmail_validator = secondary_emails.SecondaryEmail_validator SecondaryEmail = secondary_emails.SecondaryEmail -TeamMemberRoleId_validator = bv.String(max_length=128, pattern=u'pid_dbtmr:.*') +TeamMemberRoleId_validator = bv.String(max_length=128, pattern='pid_dbtmr:.*') UserQuota_validator = bv.UInt32(min_value=15) DeviceSession.session_id.validator = bv.String() DeviceSession.ip_address.validator = bv.Nullable(bv.String()) @@ -16318,9 +16318,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListMemberDevicesArg_validator, ListMemberDevicesResult_validator, ListMemberDevicesError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) devices_list_members_devices = bb.Route( 'devices/list_members_devices', @@ -16329,9 +16329,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListMembersDevicesArg_validator, ListMembersDevicesResult_validator, ListMembersDevicesError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) devices_list_team_devices = bb.Route( 'devices/list_team_devices', @@ -16340,9 +16340,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListTeamDevicesArg_validator, ListTeamDevicesResult_validator, ListTeamDevicesError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) devices_revoke_device_session = bb.Route( 'devices/revoke_device_session', @@ -16351,9 +16351,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RevokeDeviceSessionArg_validator, bv.Void(), RevokeDeviceSessionError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) devices_revoke_device_session_batch = bb.Route( 'devices/revoke_device_session_batch', @@ -16362,9 +16362,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RevokeDeviceSessionBatchArg_validator, RevokeDeviceSessionBatchResult_validator, RevokeDeviceSessionBatchError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) features_get_values = bb.Route( 'features/get_values', @@ -16373,9 +16373,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): FeaturesGetValuesBatchArg_validator, FeaturesGetValuesBatchResult_validator, FeaturesGetValuesBatchError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) get_info = bb.Route( 'get_info', @@ -16384,9 +16384,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), TeamGetInfoResult_validator, bv.Void(), - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) groups_create = bb.Route( 'groups/create', @@ -16395,9 +16395,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupCreateArg_validator, GroupFullInfo_validator, GroupCreateError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) groups_delete = bb.Route( 'groups/delete', @@ -16406,9 +16406,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupSelector_validator, async_.LaunchEmptyResult_validator, GroupDeleteError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) groups_get_info = bb.Route( 'groups/get_info', @@ -16417,9 +16417,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupsSelector_validator, GroupsGetInfoResult_validator, GroupsGetInfoError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) groups_job_status_get = bb.Route( 'groups/job_status/get', @@ -16428,9 +16428,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, async_.PollEmptyResult_validator, GroupsPollError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) groups_list = bb.Route( 'groups/list', @@ -16439,9 +16439,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupsListArg_validator, GroupsListResult_validator, bv.Void(), - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) groups_list_continue = bb.Route( 'groups/list/continue', @@ -16450,9 +16450,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupsListContinueArg_validator, GroupsListResult_validator, GroupsListContinueError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) groups_members_add = bb.Route( 'groups/members/add', @@ -16461,9 +16461,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupMembersAddArg_validator, GroupMembersChangeResult_validator, GroupMembersAddError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) groups_members_list = bb.Route( 'groups/members/list', @@ -16472,9 +16472,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupsMembersListArg_validator, GroupsMembersListResult_validator, GroupSelectorError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) groups_members_list_continue = bb.Route( 'groups/members/list/continue', @@ -16483,9 +16483,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupsMembersListContinueArg_validator, GroupsMembersListResult_validator, GroupsMembersListContinueError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) groups_members_remove = bb.Route( 'groups/members/remove', @@ -16494,9 +16494,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupMembersRemoveArg_validator, GroupMembersChangeResult_validator, GroupMembersRemoveError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) groups_members_set_access_type = bb.Route( 'groups/members/set_access_type', @@ -16505,9 +16505,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupMembersSetAccessTypeArg_validator, GroupsGetInfoResult_validator, GroupMemberSetAccessTypeError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) groups_update = bb.Route( 'groups/update', @@ -16516,9 +16516,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GroupUpdateArgs_validator, GroupFullInfo_validator, GroupUpdateError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) legal_holds_create_policy = bb.Route( 'legal_holds/create_policy', @@ -16527,9 +16527,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LegalHoldsPolicyCreateArg_validator, LegalHoldsPolicyCreateResult_validator, LegalHoldsPolicyCreateError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) legal_holds_get_policy = bb.Route( 'legal_holds/get_policy', @@ -16538,9 +16538,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LegalHoldsGetPolicyArg_validator, LegalHoldsGetPolicyResult_validator, LegalHoldsGetPolicyError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) legal_holds_list_held_revisions = bb.Route( 'legal_holds/list_held_revisions', @@ -16549,9 +16549,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LegalHoldsListHeldRevisionsArg_validator, LegalHoldsListHeldRevisionResult_validator, LegalHoldsListHeldRevisionsError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) legal_holds_list_held_revisions_continue = bb.Route( 'legal_holds/list_held_revisions_continue', @@ -16560,9 +16560,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LegalHoldsListHeldRevisionsContinueArg_validator, LegalHoldsListHeldRevisionResult_validator, LegalHoldsListHeldRevisionsError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) legal_holds_list_policies = bb.Route( 'legal_holds/list_policies', @@ -16571,9 +16571,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LegalHoldsListPoliciesArg_validator, LegalHoldsListPoliciesResult_validator, LegalHoldsListPoliciesError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) legal_holds_release_policy = bb.Route( 'legal_holds/release_policy', @@ -16582,9 +16582,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LegalHoldsPolicyReleaseArg_validator, bv.Void(), LegalHoldsPolicyReleaseError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) legal_holds_update_policy = bb.Route( 'legal_holds/update_policy', @@ -16593,9 +16593,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LegalHoldsPolicyUpdateArg_validator, LegalHoldsPolicyUpdateResult_validator, LegalHoldsPolicyUpdateError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) linked_apps_list_member_linked_apps = bb.Route( 'linked_apps/list_member_linked_apps', @@ -16604,9 +16604,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListMemberAppsArg_validator, ListMemberAppsResult_validator, ListMemberAppsError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) linked_apps_list_members_linked_apps = bb.Route( 'linked_apps/list_members_linked_apps', @@ -16615,9 +16615,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListMembersAppsArg_validator, ListMembersAppsResult_validator, ListMembersAppsError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) linked_apps_list_team_linked_apps = bb.Route( 'linked_apps/list_team_linked_apps', @@ -16626,9 +16626,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ListTeamAppsArg_validator, ListTeamAppsResult_validator, ListTeamAppsError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) linked_apps_revoke_linked_app = bb.Route( 'linked_apps/revoke_linked_app', @@ -16637,9 +16637,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RevokeLinkedApiAppArg_validator, bv.Void(), RevokeLinkedAppError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) linked_apps_revoke_linked_app_batch = bb.Route( 'linked_apps/revoke_linked_app_batch', @@ -16648,9 +16648,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RevokeLinkedApiAppBatchArg_validator, RevokeLinkedAppBatchResult_validator, RevokeLinkedAppBatchError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) member_space_limits_excluded_users_add = bb.Route( 'member_space_limits/excluded_users/add', @@ -16659,9 +16659,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ExcludedUsersUpdateArg_validator, ExcludedUsersUpdateResult_validator, ExcludedUsersUpdateError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) member_space_limits_excluded_users_list = bb.Route( 'member_space_limits/excluded_users/list', @@ -16670,9 +16670,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ExcludedUsersListArg_validator, ExcludedUsersListResult_validator, ExcludedUsersListError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) member_space_limits_excluded_users_list_continue = bb.Route( 'member_space_limits/excluded_users/list/continue', @@ -16681,9 +16681,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ExcludedUsersListContinueArg_validator, ExcludedUsersListResult_validator, ExcludedUsersListContinueError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) member_space_limits_excluded_users_remove = bb.Route( 'member_space_limits/excluded_users/remove', @@ -16692,9 +16692,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ExcludedUsersUpdateArg_validator, ExcludedUsersUpdateResult_validator, ExcludedUsersUpdateError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) member_space_limits_get_custom_quota = bb.Route( 'member_space_limits/get_custom_quota', @@ -16703,9 +16703,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CustomQuotaUsersArg_validator, bv.List(CustomQuotaResult_validator), CustomQuotaError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) member_space_limits_remove_custom_quota = bb.Route( 'member_space_limits/remove_custom_quota', @@ -16714,9 +16714,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CustomQuotaUsersArg_validator, bv.List(RemoveCustomQuotaResult_validator), CustomQuotaError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) member_space_limits_set_custom_quota = bb.Route( 'member_space_limits/set_custom_quota', @@ -16725,9 +16725,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SetCustomQuotaArg_validator, bv.List(CustomQuotaResult_validator), SetCustomQuotaError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_add_v2 = bb.Route( 'members/add', @@ -16736,9 +16736,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersAddV2Arg_validator, MembersAddLaunchV2Result_validator, bv.Void(), - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_add = bb.Route( 'members/add', @@ -16747,9 +16747,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersAddArg_validator, MembersAddLaunch_validator, bv.Void(), - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_add_job_status_get_v2 = bb.Route( 'members/add/job_status/get', @@ -16758,9 +16758,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, MembersAddJobStatusV2Result_validator, async_.PollError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_add_job_status_get = bb.Route( 'members/add/job_status/get', @@ -16769,9 +16769,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, MembersAddJobStatus_validator, async_.PollError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_delete_profile_photo_v2 = bb.Route( 'members/delete_profile_photo', @@ -16780,9 +16780,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersDeleteProfilePhotoArg_validator, TeamMemberInfoV2Result_validator, MembersDeleteProfilePhotoError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_delete_profile_photo = bb.Route( 'members/delete_profile_photo', @@ -16791,9 +16791,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersDeleteProfilePhotoArg_validator, TeamMemberInfo_validator, MembersDeleteProfilePhotoError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_get_available_team_member_roles = bb.Route( 'members/get_available_team_member_roles', @@ -16802,9 +16802,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), MembersGetAvailableTeamMemberRolesResult_validator, bv.Void(), - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_get_info_v2 = bb.Route( 'members/get_info', @@ -16813,9 +16813,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersGetInfoV2Arg_validator, MembersGetInfoV2Result_validator, MembersGetInfoError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_get_info = bb.Route( 'members/get_info', @@ -16824,9 +16824,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersGetInfoArgs_validator, MembersGetInfoResult_validator, MembersGetInfoError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_list_v2 = bb.Route( 'members/list', @@ -16835,9 +16835,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersListArg_validator, MembersListV2Result_validator, MembersListError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_list = bb.Route( 'members/list', @@ -16846,9 +16846,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersListArg_validator, MembersListResult_validator, MembersListError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_list_continue_v2 = bb.Route( 'members/list/continue', @@ -16857,9 +16857,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersListContinueArg_validator, MembersListV2Result_validator, MembersListContinueError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_list_continue = bb.Route( 'members/list/continue', @@ -16868,9 +16868,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersListContinueArg_validator, MembersListResult_validator, MembersListContinueError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_move_former_member_files = bb.Route( 'members/move_former_member_files', @@ -16879,9 +16879,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersDataTransferArg_validator, async_.LaunchEmptyResult_validator, MembersTransferFormerMembersFilesError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_move_former_member_files_job_status_check = bb.Route( 'members/move_former_member_files/job_status/check', @@ -16890,9 +16890,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, async_.PollEmptyResult_validator, async_.PollError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_recover = bb.Route( 'members/recover', @@ -16901,9 +16901,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersRecoverArg_validator, bv.Void(), MembersRecoverError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_remove = bb.Route( 'members/remove', @@ -16912,9 +16912,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersRemoveArg_validator, async_.LaunchEmptyResult_validator, MembersRemoveError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_remove_job_status_get = bb.Route( 'members/remove/job_status/get', @@ -16923,9 +16923,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, async_.PollEmptyResult_validator, async_.PollError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_secondary_emails_add = bb.Route( 'members/secondary_emails/add', @@ -16934,9 +16934,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AddSecondaryEmailsArg_validator, AddSecondaryEmailsResult_validator, AddSecondaryEmailsError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_secondary_emails_delete = bb.Route( 'members/secondary_emails/delete', @@ -16945,9 +16945,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DeleteSecondaryEmailsArg_validator, DeleteSecondaryEmailsResult_validator, bv.Void(), - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_secondary_emails_resend_verification_emails = bb.Route( 'members/secondary_emails/resend_verification_emails', @@ -16956,9 +16956,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ResendVerificationEmailArg_validator, ResendVerificationEmailResult_validator, bv.Void(), - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_send_welcome_email = bb.Route( 'members/send_welcome_email', @@ -16967,9 +16967,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UserSelectorArg_validator, bv.Void(), MembersSendWelcomeError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_set_admin_permissions_v2 = bb.Route( 'members/set_admin_permissions', @@ -16978,9 +16978,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersSetPermissions2Arg_validator, MembersSetPermissions2Result_validator, MembersSetPermissions2Error_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_set_admin_permissions = bb.Route( 'members/set_admin_permissions', @@ -16989,9 +16989,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersSetPermissionsArg_validator, MembersSetPermissionsResult_validator, MembersSetPermissionsError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_set_profile_v2 = bb.Route( 'members/set_profile', @@ -17000,9 +17000,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersSetProfileArg_validator, TeamMemberInfoV2Result_validator, MembersSetProfileError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_set_profile = bb.Route( 'members/set_profile', @@ -17011,9 +17011,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersSetProfileArg_validator, TeamMemberInfo_validator, MembersSetProfileError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_set_profile_photo_v2 = bb.Route( 'members/set_profile_photo', @@ -17022,9 +17022,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersSetProfilePhotoArg_validator, TeamMemberInfoV2Result_validator, MembersSetProfilePhotoError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_set_profile_photo = bb.Route( 'members/set_profile_photo', @@ -17033,9 +17033,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersSetProfilePhotoArg_validator, TeamMemberInfo_validator, MembersSetProfilePhotoError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_suspend = bb.Route( 'members/suspend', @@ -17044,9 +17044,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersDeactivateArg_validator, bv.Void(), MembersSuspendError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) members_unsuspend = bb.Route( 'members/unsuspend', @@ -17055,9 +17055,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersUnsuspendArg_validator, bv.Void(), MembersUnsuspendError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) namespaces_list = bb.Route( 'namespaces/list', @@ -17066,9 +17066,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamNamespacesListArg_validator, TeamNamespacesListResult_validator, TeamNamespacesListError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) namespaces_list_continue = bb.Route( 'namespaces/list/continue', @@ -17077,9 +17077,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamNamespacesListContinueArg_validator, TeamNamespacesListResult_validator, TeamNamespacesListContinueError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) properties_template_add = bb.Route( 'properties/template/add', @@ -17088,9 +17088,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): file_properties.AddTemplateArg_validator, file_properties.AddTemplateResult_validator, file_properties.ModifyTemplateError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) properties_template_get = bb.Route( 'properties/template/get', @@ -17099,9 +17099,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): file_properties.GetTemplateArg_validator, file_properties.GetTemplateResult_validator, file_properties.TemplateError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) properties_template_list = bb.Route( 'properties/template/list', @@ -17110,9 +17110,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), file_properties.ListTemplateResult_validator, file_properties.TemplateError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) properties_template_update = bb.Route( 'properties/template/update', @@ -17121,9 +17121,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): file_properties.UpdateTemplateArg_validator, file_properties.UpdateTemplateResult_validator, file_properties.ModifyTemplateError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) reports_get_activity = bb.Route( 'reports/get_activity', @@ -17132,9 +17132,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DateRange_validator, GetActivityReport_validator, DateRangeError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) reports_get_devices = bb.Route( 'reports/get_devices', @@ -17143,9 +17143,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DateRange_validator, GetDevicesReport_validator, DateRangeError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) reports_get_membership = bb.Route( 'reports/get_membership', @@ -17154,9 +17154,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DateRange_validator, GetMembershipReport_validator, DateRangeError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) reports_get_storage = bb.Route( 'reports/get_storage', @@ -17165,9 +17165,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DateRange_validator, GetStorageReport_validator, DateRangeError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) team_folder_activate = bb.Route( 'team_folder/activate', @@ -17176,9 +17176,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamFolderIdArg_validator, TeamFolderMetadata_validator, TeamFolderActivateError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) team_folder_archive = bb.Route( 'team_folder/archive', @@ -17187,9 +17187,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamFolderArchiveArg_validator, TeamFolderArchiveLaunch_validator, TeamFolderArchiveError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) team_folder_archive_check = bb.Route( 'team_folder/archive/check', @@ -17198,9 +17198,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): async_.PollArg_validator, TeamFolderArchiveJobStatus_validator, async_.PollError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) team_folder_create = bb.Route( 'team_folder/create', @@ -17209,9 +17209,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamFolderCreateArg_validator, TeamFolderMetadata_validator, TeamFolderCreateError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) team_folder_get_info = bb.Route( 'team_folder/get_info', @@ -17220,9 +17220,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamFolderIdListArg_validator, bv.List(TeamFolderGetInfoItem_validator), bv.Void(), - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) team_folder_list = bb.Route( 'team_folder/list', @@ -17231,9 +17231,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamFolderListArg_validator, TeamFolderListResult_validator, TeamFolderListError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) team_folder_list_continue = bb.Route( 'team_folder/list/continue', @@ -17242,9 +17242,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamFolderListContinueArg_validator, TeamFolderListResult_validator, TeamFolderListContinueError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) team_folder_permanently_delete = bb.Route( 'team_folder/permanently_delete', @@ -17253,9 +17253,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamFolderIdArg_validator, bv.Void(), TeamFolderPermanentlyDeleteError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) team_folder_rename = bb.Route( 'team_folder/rename', @@ -17264,9 +17264,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamFolderRenameArg_validator, TeamFolderMetadata_validator, TeamFolderRenameError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) team_folder_update_sync_settings = bb.Route( 'team_folder/update_sync_settings', @@ -17275,9 +17275,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamFolderUpdateSyncSettingsArg_validator, TeamFolderMetadata_validator, TeamFolderUpdateSyncSettingsError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) token_get_authenticated_admin = bb.Route( 'token/get_authenticated_admin', @@ -17286,9 +17286,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), TokenGetAuthenticatedAdminResult_validator, TokenGetAuthenticatedAdminError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) ROUTES = { diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 11bdcd88..98b95650 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -4804,6 +4804,86 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DataPlacementRestrictionSatisfyPolicyType_validator = bv.Struct(DataPlacementRestrictionSatisfyPolicyType) +class DataResidencyMigrationRequestSuccessfulDetails(bb.Struct): + """ + Requested data residency migration for team data. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(DataResidencyMigrationRequestSuccessfulDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +DataResidencyMigrationRequestSuccessfulDetails_validator = bv.Struct(DataResidencyMigrationRequestSuccessfulDetails) + +class DataResidencyMigrationRequestSuccessfulType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(DataResidencyMigrationRequestSuccessfulType, self)._process_custom_annotations(annotation_type, field_path, processor) + +DataResidencyMigrationRequestSuccessfulType_validator = bv.Struct(DataResidencyMigrationRequestSuccessfulType) + +class DataResidencyMigrationRequestUnsuccessfulDetails(bb.Struct): + """ + Request for data residency migration for team data has failed. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(DataResidencyMigrationRequestUnsuccessfulDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +DataResidencyMigrationRequestUnsuccessfulDetails_validator = bv.Struct(DataResidencyMigrationRequestUnsuccessfulDetails) + +class DataResidencyMigrationRequestUnsuccessfulType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(DataResidencyMigrationRequestUnsuccessfulType, self)._process_custom_annotations(annotation_type, field_path, processor) + +DataResidencyMigrationRequestUnsuccessfulType_validator = bv.Struct(DataResidencyMigrationRequestUnsuccessfulType) + class DefaultLinkExpirationDaysPolicy(bb.Union): """ Policy for the default number of days until an externally shared link @@ -12885,6 +12965,30 @@ def web_sessions_change_idle_length_policy_details(cls, val): """ return cls('web_sessions_change_idle_length_policy_details', val) + @classmethod + def data_residency_migration_request_successful_details(cls, val): + """ + Create an instance of this class set to the + ``data_residency_migration_request_successful_details`` tag with value + ``val``. + + :param DataResidencyMigrationRequestSuccessfulDetails val: + :rtype: EventDetails + """ + return cls('data_residency_migration_request_successful_details', val) + + @classmethod + def data_residency_migration_request_unsuccessful_details(cls, val): + """ + Create an instance of this class set to the + ``data_residency_migration_request_unsuccessful_details`` tag with value + ``val``. + + :param DataResidencyMigrationRequestUnsuccessfulDetails val: + :rtype: EventDetails + """ + return cls('data_residency_migration_request_unsuccessful_details', val) + @classmethod def team_merge_from_details(cls, val): """ @@ -16844,6 +16948,22 @@ def is_web_sessions_change_idle_length_policy_details(self): """ return self._tag == 'web_sessions_change_idle_length_policy_details' + def is_data_residency_migration_request_successful_details(self): + """ + Check if the union tag is ``data_residency_migration_request_successful_details``. + + :rtype: bool + """ + return self._tag == 'data_residency_migration_request_successful_details' + + def is_data_residency_migration_request_unsuccessful_details(self): + """ + Check if the union tag is ``data_residency_migration_request_unsuccessful_details``. + + :rtype: bool + """ + return self._tag == 'data_residency_migration_request_unsuccessful_details' + def is_team_merge_from_details(self): """ Check if the union tag is ``team_merge_from_details``. @@ -21536,6 +21656,26 @@ def get_web_sessions_change_idle_length_policy_details(self): raise AttributeError("tag 'web_sessions_change_idle_length_policy_details' not set") return self._value + def get_data_residency_migration_request_successful_details(self): + """ + Only call this if :meth:`is_data_residency_migration_request_successful_details` is true. + + :rtype: DataResidencyMigrationRequestSuccessfulDetails + """ + if not self.is_data_residency_migration_request_successful_details(): + raise AttributeError("tag 'data_residency_migration_request_successful_details' not set") + return self._value + + def get_data_residency_migration_request_unsuccessful_details(self): + """ + Only call this if :meth:`is_data_residency_migration_request_unsuccessful_details` is true. + + :rtype: DataResidencyMigrationRequestUnsuccessfulDetails + """ + if not self.is_data_residency_migration_request_unsuccessful_details(): + raise AttributeError("tag 'data_residency_migration_request_unsuccessful_details' not set") + return self._value + def get_team_merge_from_details(self): """ Only call this if :meth:`is_team_merge_from_details` is true. @@ -23022,6 +23162,12 @@ class EventType(bb.Union): :ivar WebSessionsChangeIdleLengthPolicyType EventType.web_sessions_change_idle_length_policy: (team_policies) Changed how long team members can be idle while signed in to Dropbox.com + :ivar DataResidencyMigrationRequestSuccessfulType + EventType.data_residency_migration_request_successful: (team_profile) + Requested data residency migration for team data + :ivar DataResidencyMigrationRequestUnsuccessfulType + EventType.data_residency_migration_request_unsuccessful: (team_profile) + Request for data residency migration for team data has failed :ivar TeamMergeFromType EventType.team_merge_from: (team_profile) Merged another team into this team :ivar TeamMergeToType EventType.team_merge_to: (team_profile) Merged this @@ -27924,6 +28070,29 @@ def web_sessions_change_idle_length_policy(cls, val): """ return cls('web_sessions_change_idle_length_policy', val) + @classmethod + def data_residency_migration_request_successful(cls, val): + """ + Create an instance of this class set to the + ``data_residency_migration_request_successful`` tag with value ``val``. + + :param DataResidencyMigrationRequestSuccessfulType val: + :rtype: EventType + """ + return cls('data_residency_migration_request_successful', val) + + @classmethod + def data_residency_migration_request_unsuccessful(cls, val): + """ + Create an instance of this class set to the + ``data_residency_migration_request_unsuccessful`` tag with value + ``val``. + + :param DataResidencyMigrationRequestUnsuccessfulType val: + :rtype: EventType + """ + return cls('data_residency_migration_request_unsuccessful', val) + @classmethod def team_merge_from(cls, val): """ @@ -31870,6 +32039,22 @@ def is_web_sessions_change_idle_length_policy(self): """ return self._tag == 'web_sessions_change_idle_length_policy' + def is_data_residency_migration_request_successful(self): + """ + Check if the union tag is ``data_residency_migration_request_successful``. + + :rtype: bool + """ + return self._tag == 'data_residency_migration_request_successful' + + def is_data_residency_migration_request_unsuccessful(self): + """ + Check if the union tag is ``data_residency_migration_request_unsuccessful``. + + :rtype: bool + """ + return self._tag == 'data_residency_migration_request_unsuccessful' + def is_team_merge_from(self): """ Check if the union tag is ``team_merge_from``. @@ -37494,6 +37679,31 @@ def get_web_sessions_change_idle_length_policy(self): raise AttributeError("tag 'web_sessions_change_idle_length_policy' not set") return self._value + def get_data_residency_migration_request_successful(self): + """ + (team_profile) Requested data residency migration for team data + + Only call this if :meth:`is_data_residency_migration_request_successful` is true. + + :rtype: DataResidencyMigrationRequestSuccessfulType + """ + if not self.is_data_residency_migration_request_successful(): + raise AttributeError("tag 'data_residency_migration_request_successful' not set") + return self._value + + def get_data_residency_migration_request_unsuccessful(self): + """ + (team_profile) Request for data residency migration for team data has + failed + + Only call this if :meth:`is_data_residency_migration_request_unsuccessful` is true. + + :rtype: DataResidencyMigrationRequestUnsuccessfulType + """ + if not self.is_data_residency_migration_request_unsuccessful(): + raise AttributeError("tag 'data_residency_migration_request_unsuccessful' not set") + return self._value + def get_team_merge_from(self): """ (team_profile) Merged another team into this team @@ -38901,6 +39111,11 @@ class EventTypeArg(bb.Union): :ivar team_log.EventTypeArg.web_sessions_change_idle_length_policy: (team_policies) Changed how long team members can be idle while signed in to Dropbox.com + :ivar team_log.EventTypeArg.data_residency_migration_request_successful: + (team_profile) Requested data residency migration for team data + :ivar team_log.EventTypeArg.data_residency_migration_request_unsuccessful: + (team_profile) Request for data residency migration for team data has + failed :ivar team_log.EventTypeArg.team_merge_from: (team_profile) Merged another team into this team :ivar team_log.EventTypeArg.team_merge_to: (team_profile) Merged this team @@ -39878,6 +40093,10 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition web_sessions_change_idle_length_policy = None # Attribute is overwritten below the class definition + data_residency_migration_request_successful = None + # Attribute is overwritten below the class definition + data_residency_migration_request_unsuccessful = None + # Attribute is overwritten below the class definition team_merge_from = None # Attribute is overwritten below the class definition team_merge_to = None @@ -43436,6 +43655,22 @@ def is_web_sessions_change_idle_length_policy(self): """ return self._tag == 'web_sessions_change_idle_length_policy' + def is_data_residency_migration_request_successful(self): + """ + Check if the union tag is ``data_residency_migration_request_successful``. + + :rtype: bool + """ + return self._tag == 'data_residency_migration_request_successful' + + def is_data_residency_migration_request_unsuccessful(self): + """ + Check if the union tag is ``data_residency_migration_request_unsuccessful``. + + :rtype: bool + """ + return self._tag == 'data_residency_migration_request_unsuccessful' + def is_team_merge_from(self): """ Check if the union tag is ``team_merge_from``. @@ -44011,12 +44246,22 @@ class ExternalDriveBackupPolicy(bb.Union): _catch_all = 'other' # Attribute is overwritten below the class definition + default = None + # 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_default(self): + """ + Check if the union tag is ``default``. + + :rtype: bool + """ + return self._tag == 'default' + def is_disabled(self): """ Check if the union tag is ``disabled``. @@ -72533,14 +72778,14 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 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, + ('user_or_team_linked_app',): UserOrTeamLinkedAppLogInfo_validator, + ('user_linked_app',): UserLinkedAppLogInfo_validator, + ('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), + UserOrTeamLinkedAppLogInfo: (('user_or_team_linked_app',), UserOrTeamLinkedAppLogInfo_validator), + UserLinkedAppLogInfo: (('user_linked_app',), UserLinkedAppLogInfo_validator), + TeamLinkedAppLogInfo: (('team_linked_app',), TeamLinkedAppLogInfo_validator), } AppLogInfo._is_catch_all_ = True @@ -73107,6 +73352,20 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DataPlacementRestrictionSatisfyPolicyType._all_field_names_ = set(['description']) DataPlacementRestrictionSatisfyPolicyType._all_fields_ = [('description', DataPlacementRestrictionSatisfyPolicyType.description.validator)] +DataResidencyMigrationRequestSuccessfulDetails._all_field_names_ = set([]) +DataResidencyMigrationRequestSuccessfulDetails._all_fields_ = [] + +DataResidencyMigrationRequestSuccessfulType.description.validator = bv.String() +DataResidencyMigrationRequestSuccessfulType._all_field_names_ = set(['description']) +DataResidencyMigrationRequestSuccessfulType._all_fields_ = [('description', DataResidencyMigrationRequestSuccessfulType.description.validator)] + +DataResidencyMigrationRequestUnsuccessfulDetails._all_field_names_ = set([]) +DataResidencyMigrationRequestUnsuccessfulDetails._all_fields_ = [] + +DataResidencyMigrationRequestUnsuccessfulType.description.validator = bv.String() +DataResidencyMigrationRequestUnsuccessfulType._all_field_names_ = set(['description']) +DataResidencyMigrationRequestUnsuccessfulType._all_fields_ = [('description', DataResidencyMigrationRequestUnsuccessfulType.description.validator)] + DefaultLinkExpirationDaysPolicy._day_1_validator = bv.Void() DefaultLinkExpirationDaysPolicy._day_180_validator = bv.Void() DefaultLinkExpirationDaysPolicy._day_3_validator = bv.Void() @@ -73163,16 +73422,16 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DeviceSessionLogInfo._all_fields_ = DeviceSessionLogInfo._fields_ DeviceSessionLogInfo._tag_to_subtype_ = { - (u'desktop_device_session',): DesktopDeviceSessionLogInfo_validator, - (u'mobile_device_session',): MobileDeviceSessionLogInfo_validator, - (u'web_device_session',): WebDeviceSessionLogInfo_validator, - (u'legacy_device_session',): LegacyDeviceSessionLogInfo_validator, + ('desktop_device_session',): DesktopDeviceSessionLogInfo_validator, + ('mobile_device_session',): MobileDeviceSessionLogInfo_validator, + ('web_device_session',): WebDeviceSessionLogInfo_validator, + ('legacy_device_session',): LegacyDeviceSessionLogInfo_validator, } DeviceSessionLogInfo._pytype_to_tag_and_subtype_ = { - DesktopDeviceSessionLogInfo: ((u'desktop_device_session',), DesktopDeviceSessionLogInfo_validator), - MobileDeviceSessionLogInfo: ((u'mobile_device_session',), MobileDeviceSessionLogInfo_validator), - WebDeviceSessionLogInfo: ((u'web_device_session',), WebDeviceSessionLogInfo_validator), - LegacyDeviceSessionLogInfo: ((u'legacy_device_session',), LegacyDeviceSessionLogInfo_validator), + DesktopDeviceSessionLogInfo: (('desktop_device_session',), DesktopDeviceSessionLogInfo_validator), + MobileDeviceSessionLogInfo: (('mobile_device_session',), MobileDeviceSessionLogInfo_validator), + WebDeviceSessionLogInfo: (('web_device_session',), WebDeviceSessionLogInfo_validator), + LegacyDeviceSessionLogInfo: (('legacy_device_session',), LegacyDeviceSessionLogInfo_validator), } DeviceSessionLogInfo._is_catch_all_ = True @@ -73208,14 +73467,14 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SessionLogInfo._all_fields_ = SessionLogInfo._fields_ SessionLogInfo._tag_to_subtype_ = { - (u'web',): WebSessionLogInfo_validator, - (u'desktop',): DesktopSessionLogInfo_validator, - (u'mobile',): MobileSessionLogInfo_validator, + ('web',): WebSessionLogInfo_validator, + ('desktop',): DesktopSessionLogInfo_validator, + ('mobile',): MobileSessionLogInfo_validator, } SessionLogInfo._pytype_to_tag_and_subtype_ = { - WebSessionLogInfo: ((u'web',), WebSessionLogInfo_validator), - DesktopSessionLogInfo: ((u'desktop',), DesktopSessionLogInfo_validator), - MobileSessionLogInfo: ((u'mobile',), MobileSessionLogInfo_validator), + WebSessionLogInfo: (('web',), WebSessionLogInfo_validator), + DesktopSessionLogInfo: (('desktop',), DesktopSessionLogInfo_validator), + MobileSessionLogInfo: (('mobile',), MobileSessionLogInfo_validator), } SessionLogInfo._is_catch_all_ = True @@ -74309,6 +74568,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._web_sessions_change_active_session_limit_details_validator = WebSessionsChangeActiveSessionLimitDetails_validator EventDetails._web_sessions_change_fixed_length_policy_details_validator = WebSessionsChangeFixedLengthPolicyDetails_validator EventDetails._web_sessions_change_idle_length_policy_details_validator = WebSessionsChangeIdleLengthPolicyDetails_validator +EventDetails._data_residency_migration_request_successful_details_validator = DataResidencyMigrationRequestSuccessfulDetails_validator +EventDetails._data_residency_migration_request_unsuccessful_details_validator = DataResidencyMigrationRequestUnsuccessfulDetails_validator EventDetails._team_merge_from_details_validator = TeamMergeFromDetails_validator EventDetails._team_merge_to_details_validator = TeamMergeToDetails_validator EventDetails._team_profile_add_background_details_validator = TeamProfileAddBackgroundDetails_validator @@ -74788,6 +75049,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'web_sessions_change_active_session_limit_details': EventDetails._web_sessions_change_active_session_limit_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, + 'data_residency_migration_request_successful_details': EventDetails._data_residency_migration_request_successful_details_validator, + 'data_residency_migration_request_unsuccessful_details': EventDetails._data_residency_migration_request_unsuccessful_details_validator, 'team_merge_from_details': EventDetails._team_merge_from_details_validator, 'team_merge_to_details': EventDetails._team_merge_to_details_validator, 'team_profile_add_background_details': EventDetails._team_profile_add_background_details_validator, @@ -75270,6 +75533,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._web_sessions_change_active_session_limit_validator = WebSessionsChangeActiveSessionLimitType_validator EventType._web_sessions_change_fixed_length_policy_validator = WebSessionsChangeFixedLengthPolicyType_validator EventType._web_sessions_change_idle_length_policy_validator = WebSessionsChangeIdleLengthPolicyType_validator +EventType._data_residency_migration_request_successful_validator = DataResidencyMigrationRequestSuccessfulType_validator +EventType._data_residency_migration_request_unsuccessful_validator = DataResidencyMigrationRequestUnsuccessfulType_validator EventType._team_merge_from_validator = TeamMergeFromType_validator EventType._team_merge_to_validator = TeamMergeToType_validator EventType._team_profile_add_background_validator = TeamProfileAddBackgroundType_validator @@ -75748,6 +76013,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'web_sessions_change_active_session_limit': EventType._web_sessions_change_active_session_limit_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, + 'data_residency_migration_request_successful': EventType._data_residency_migration_request_successful_validator, + 'data_residency_migration_request_unsuccessful': EventType._data_residency_migration_request_unsuccessful_validator, 'team_merge_from': EventType._team_merge_from_validator, 'team_merge_to': EventType._team_merge_to_validator, 'team_profile_add_background': EventType._team_profile_add_background_validator, @@ -76229,6 +76496,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._web_sessions_change_active_session_limit_validator = bv.Void() EventTypeArg._web_sessions_change_fixed_length_policy_validator = bv.Void() EventTypeArg._web_sessions_change_idle_length_policy_validator = bv.Void() +EventTypeArg._data_residency_migration_request_successful_validator = bv.Void() +EventTypeArg._data_residency_migration_request_unsuccessful_validator = bv.Void() EventTypeArg._team_merge_from_validator = bv.Void() EventTypeArg._team_merge_to_validator = bv.Void() EventTypeArg._team_profile_add_background_validator = bv.Void() @@ -76707,6 +76976,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'web_sessions_change_active_session_limit': EventTypeArg._web_sessions_change_active_session_limit_validator, 'web_sessions_change_fixed_length_policy': EventTypeArg._web_sessions_change_fixed_length_policy_validator, 'web_sessions_change_idle_length_policy': EventTypeArg._web_sessions_change_idle_length_policy_validator, + 'data_residency_migration_request_successful': EventTypeArg._data_residency_migration_request_successful_validator, + 'data_residency_migration_request_unsuccessful': EventTypeArg._data_residency_migration_request_unsuccessful_validator, 'team_merge_from': EventTypeArg._team_merge_from_validator, 'team_merge_to': EventTypeArg._team_merge_to_validator, 'team_profile_add_background': EventTypeArg._team_profile_add_background_validator, @@ -77186,6 +77457,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.web_sessions_change_active_session_limit = EventTypeArg('web_sessions_change_active_session_limit') EventTypeArg.web_sessions_change_fixed_length_policy = EventTypeArg('web_sessions_change_fixed_length_policy') EventTypeArg.web_sessions_change_idle_length_policy = EventTypeArg('web_sessions_change_idle_length_policy') +EventTypeArg.data_residency_migration_request_successful = EventTypeArg('data_residency_migration_request_successful') +EventTypeArg.data_residency_migration_request_unsuccessful = EventTypeArg('data_residency_migration_request_unsuccessful') EventTypeArg.team_merge_from = EventTypeArg('team_merge_from') EventTypeArg.team_merge_to = EventTypeArg('team_merge_to') EventTypeArg.team_profile_add_background = EventTypeArg('team_profile_add_background') @@ -77279,15 +77552,18 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ExtendedVersionHistoryPolicy.implicitly_unlimited = ExtendedVersionHistoryPolicy('implicitly_unlimited') ExtendedVersionHistoryPolicy.other = ExtendedVersionHistoryPolicy('other') +ExternalDriveBackupPolicy._default_validator = bv.Void() ExternalDriveBackupPolicy._disabled_validator = bv.Void() ExternalDriveBackupPolicy._enabled_validator = bv.Void() ExternalDriveBackupPolicy._other_validator = bv.Void() ExternalDriveBackupPolicy._tagmap = { + 'default': ExternalDriveBackupPolicy._default_validator, 'disabled': ExternalDriveBackupPolicy._disabled_validator, 'enabled': ExternalDriveBackupPolicy._enabled_validator, 'other': ExternalDriveBackupPolicy._other_validator, } +ExternalDriveBackupPolicy.default = ExternalDriveBackupPolicy('default') ExternalDriveBackupPolicy.disabled = ExternalDriveBackupPolicy('disabled') ExternalDriveBackupPolicy.enabled = ExternalDriveBackupPolicy('enabled') ExternalDriveBackupPolicy.other = ExternalDriveBackupPolicy('other') @@ -79643,14 +79919,14 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UserLogInfo._all_fields_ = UserLogInfo._fields_ UserLogInfo._tag_to_subtype_ = { - (u'team_member',): TeamMemberLogInfo_validator, - (u'trusted_non_team_member',): TrustedNonTeamMemberLogInfo_validator, - (u'non_team_member',): NonTeamMemberLogInfo_validator, + ('team_member',): TeamMemberLogInfo_validator, + ('trusted_non_team_member',): TrustedNonTeamMemberLogInfo_validator, + ('non_team_member',): NonTeamMemberLogInfo_validator, } UserLogInfo._pytype_to_tag_and_subtype_ = { - TeamMemberLogInfo: ((u'team_member',), TeamMemberLogInfo_validator), - TrustedNonTeamMemberLogInfo: ((u'trusted_non_team_member',), TrustedNonTeamMemberLogInfo_validator), - NonTeamMemberLogInfo: ((u'non_team_member',), NonTeamMemberLogInfo_validator), + TeamMemberLogInfo: (('team_member',), TeamMemberLogInfo_validator), + TrustedNonTeamMemberLogInfo: (('trusted_non_team_member',), TrustedNonTeamMemberLogInfo_validator), + NonTeamMemberLogInfo: (('non_team_member',), NonTeamMemberLogInfo_validator), } UserLogInfo._is_catch_all_ = True @@ -83601,9 +83877,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetTeamEventsArg_validator, GetTeamEventsResult_validator, GetTeamEventsError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) get_events_continue = bb.Route( 'get_events/continue', @@ -83612,9 +83888,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetTeamEventsContinueArg_validator, GetTeamEventsResult_validator, GetTeamEventsContinueError_validator, - {'auth': u'team', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, ) ROUTES = { diff --git a/dropbox/team_policies.py b/dropbox/team_policies.py index 79c8bdb4..c85e5af1 100644 --- a/dropbox/team_policies.py +++ b/dropbox/team_policies.py @@ -185,6 +185,8 @@ class ExternalDriveBackupPolicyState(bb.Union): Backup feature is disabled. :ivar team_policies.ExternalDriveBackupPolicyState.enabled: External Drive Backup feature is enabled. + :ivar team_policies.ExternalDriveBackupPolicyState.default: External Drive + Backup default value based on team tier. """ _catch_all = 'other' @@ -193,6 +195,8 @@ class ExternalDriveBackupPolicyState(bb.Union): # Attribute is overwritten below the class definition enabled = None # Attribute is overwritten below the class definition + default = None + # Attribute is overwritten below the class definition other = None def is_disabled(self): @@ -211,6 +215,14 @@ def is_enabled(self): """ return self._tag == 'enabled' + def is_default(self): + """ + Check if the union tag is ``default``. + + :rtype: bool + """ + return self._tag == 'default' + def is_other(self): """ Check if the union tag is ``other``. @@ -1527,15 +1539,18 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ExternalDriveBackupPolicyState._disabled_validator = bv.Void() ExternalDriveBackupPolicyState._enabled_validator = bv.Void() +ExternalDriveBackupPolicyState._default_validator = bv.Void() ExternalDriveBackupPolicyState._other_validator = bv.Void() ExternalDriveBackupPolicyState._tagmap = { 'disabled': ExternalDriveBackupPolicyState._disabled_validator, 'enabled': ExternalDriveBackupPolicyState._enabled_validator, + 'default': ExternalDriveBackupPolicyState._default_validator, 'other': ExternalDriveBackupPolicyState._other_validator, } ExternalDriveBackupPolicyState.disabled = ExternalDriveBackupPolicyState('disabled') ExternalDriveBackupPolicyState.enabled = ExternalDriveBackupPolicyState('enabled') +ExternalDriveBackupPolicyState.default = ExternalDriveBackupPolicyState('default') ExternalDriveBackupPolicyState.other = ExternalDriveBackupPolicyState('other') FileLockingPolicyState._disabled_validator = bv.Void() diff --git a/dropbox/users.py b/dropbox/users.py index 7e2f85e0..676d9f33 100644 --- a/dropbox/users.py +++ b/dropbox/users.py @@ -1371,9 +1371,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UserFeaturesGetValuesBatchArg_validator, UserFeaturesGetValuesBatchResult_validator, UserFeaturesGetValuesBatchError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) get_account = bb.Route( 'get_account', @@ -1382,9 +1382,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetAccountArg_validator, BasicAccount_validator, GetAccountError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) get_account_batch = bb.Route( 'get_account_batch', @@ -1393,9 +1393,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetAccountBatchArg_validator, GetAccountBatchResult_validator, GetAccountBatchError_validator, - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) get_current_account = bb.Route( 'get_current_account', @@ -1404,9 +1404,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), FullAccount_validator, bv.Void(), - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) get_space_usage = bb.Route( 'get_space_usage', @@ -1415,9 +1415,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): bv.Void(), SpaceUsage_validator, bv.Void(), - {'auth': u'user', - 'host': u'api', - 'style': u'rpc'}, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, ) ROUTES = { diff --git a/spec b/spec index bca5f144..13bbef72 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit bca5f1448ac6f65a17c9df95a5175cf7b878ad90 +Subproject commit 13bbef7298d235257ee5576025b5938f748de526 From 735e077cf80078c113b43deb162be2df268d683e Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Wed, 9 Feb 2022 14:08:20 -0800 Subject: [PATCH 66/90] Fix spec update action (#413) * Remove npm install, package lock which don't seem to be for anything * Try using python 3 instead Co-authored-by: Scott Erickson Co-authored-by: Brad Rogers --- .github/workflows/spec_update.yml | 9 +++------ package-lock.json | 3 --- 2 files changed, 3 insertions(+), 9 deletions(-) delete mode 100644 package-lock.json diff --git a/.github/workflows/spec_update.yml b/.github/workflows/spec_update.yml index f28e2895..b62427bc 100644 --- a/.github/workflows/spec_update.yml +++ b/.github/workflows/spec_update.yml @@ -1,5 +1,5 @@ name: Spec Update -on: +on: workflow_dispatch: repository_dispatch: types: [spec_update] @@ -12,16 +12,13 @@ jobs: - name: Setup Python environment uses: actions/setup-python@v2.2.2 with: - python-version: 2.7 + python-version: 3.7 - name: Get current time uses: 1466587594/get-current-time@v2 id: current-time with: format: YYYY_MM_DD utcOffset: "-08:00" - - name: Install SDK - run: | - npm install - name: Update Modules run: | git submodule init @@ -69,4 +66,4 @@ jobs: team-reviewers: | owners maintainers - draft: false \ No newline at end of file + draft: false diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 48e341a0..00000000 --- a/package-lock.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "lockfileVersion": 1 -} From 74350058e5d6803831c6a5b09a0b4536c690d2e1 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 2 Mar 2022 19:57:00 -0500 Subject: [PATCH 67/90] Automated Spec Update (#418) 9daf01c5b7ac6936956f085792c573c06fb3c905 Change Notes: files Namespace - Update UploadArg - content_hash doc string - Add UploadArg extends CommitInfo structs - Add UploadSessionAppendError extends UploadSessionLookupError unions - Remove CommitInfoWithProperties extends CommitInfo structs - Remove UploadErrorWithProperties extends UploadError unions sharing_folders Namespace - Add traverse to AccessLevel team_log_generated Namespace - Example and docstring updates common Namespace - Update comments Co-authored-by: DropboxBot Co-authored-by: Brent Bumann --- dropbox/base.py | 120 +++++---- dropbox/files.py | 601 +++++++++++++++++++++++++++----------------- dropbox/sharing.py | 15 ++ dropbox/team_log.py | 18 +- spec | 2 +- 5 files changed, 457 insertions(+), 299 deletions(-) diff --git a/dropbox/base.py b/dropbox/base.py index 009d47ab..a1c6089a 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -848,31 +848,41 @@ def files_alpha_upload(self, client_modified=None, mute=False, property_groups=None, - strict_conflict=False): + strict_conflict=False, + content_hash=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`. + the behavior of this alpha endpoint is unstable and subject to change. + Do not use this to upload a file larger than 150 MB. Instead, create an + upload session with :meth:`files_upload_session_start`. Route attributes: scope: files.content.write :param bytes f: Contents to upload. + :param Nullable[str] content_hash: A hash of the file content uploaded + in this call. If provided and the uploaded content does not match + this hash, an error will be returned. For more information see our + `Content hash + `_ page. :rtype: :class:`dropbox.files.FileMetadata` + :raises: :class:`.exceptions.ApiError` + + If this raises, ApiError will contain: + :class:`dropbox.files.UploadError` """ warnings.warn( - 'alpha/upload is deprecated. Use alpha/upload.', + 'alpha/upload is deprecated. Use upload.', DeprecationWarning, ) - arg = files.CommitInfoWithProperties(path, - mode, - autorename, - client_modified, - mute, - property_groups, - strict_conflict) + arg = files.UploadArg(path, + mode, + autorename, + client_modified, + mute, + property_groups, + strict_conflict, + content_hash) r = self.request( files.alpha_upload, 'files', @@ -3157,7 +3167,8 @@ def files_upload(self, client_modified=None, mute=False, property_groups=None, - strict_conflict=False): + strict_conflict=False, + content_hash=None): """ 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 @@ -3171,43 +3182,25 @@ def files_upload(self, scope: files.content.write :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[datetime] 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. - :param Nullable[List[:class:`dropbox.files.PropertyGroup`]] - property_groups: List of custom properties to add to file. - :param bool strict_conflict: Be more strict about how each - :class:`dropbox.files.WriteMode` detects conflict. For example, - always return a conflict error when ``mode`` = ``WriteMode.update`` - and the given "rev" doesn't match the existing file's "rev", even if - the existing file has been deleted. This also forces a conflict even - when the target path refers to a file with identical contents. + :param Nullable[str] content_hash: A hash of the file content uploaded + in this call. If provided and the uploaded content does not match + this hash, an error will be returned. For more information see our + `Content hash + `_ page. :rtype: :class:`dropbox.files.FileMetadata` :raises: :class:`.exceptions.ApiError` If this raises, ApiError will contain: :class:`dropbox.files.UploadError` """ - arg = files.CommitInfo(path, - mode, - autorename, - client_modified, - mute, - property_groups, - strict_conflict) + arg = files.UploadArg(path, + mode, + autorename, + client_modified, + mute, + property_groups, + strict_conflict, + content_hash) r = self.request( files.upload, 'files', @@ -3219,7 +3212,8 @@ def files_upload(self, def files_upload_session_append_v2(self, f, cursor, - close=False): + close=False, + content_hash=None): """ 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 @@ -3240,14 +3234,20 @@ def files_upload_session_append_v2(self, point you won't be able to call :meth:`files_upload_session_append_v2` anymore with the current session. + :param Nullable[str] content_hash: A hash of the file content uploaded + in this call. If provided and the uploaded content does not match + this hash, an error will be returned. For more information see our + `Content hash + `_ page. :rtype: None :raises: :class:`.exceptions.ApiError` If this raises, ApiError will contain: - :class:`dropbox.files.UploadSessionLookupError` + :class:`dropbox.files.UploadSessionAppendError` """ arg = files.UploadSessionAppendArg(cursor, - close) + close, + content_hash) r = self.request( files.upload_session_append_v2, 'files', @@ -3282,7 +3282,7 @@ def files_upload_session_append(self, :raises: :class:`.exceptions.ApiError` If this raises, ApiError will contain: - :class:`dropbox.files.UploadSessionLookupError` + :class:`dropbox.files.UploadSessionAppendError` """ warnings.warn( 'upload_session/append is deprecated. Use upload_session/append.', @@ -3301,7 +3301,8 @@ def files_upload_session_append(self, def files_upload_session_finish(self, f, cursor, - commit): + commit, + content_hash=None): """ Finish an upload session and save the uploaded data to the given file path. A single request should not upload more than 150 MB. The maximum @@ -3321,6 +3322,11 @@ def files_upload_session_finish(self, :param commit: Contains the path and other optional modifiers for the commit. :type commit: :class:`dropbox.files.CommitInfo` + :param Nullable[str] content_hash: A hash of the file content uploaded + in this call. If provided and the uploaded content does not match + this hash, an error will be returned. For more information see our + `Content hash + `_ page. :rtype: :class:`dropbox.files.FileMetadata` :raises: :class:`.exceptions.ApiError` @@ -3328,7 +3334,8 @@ def files_upload_session_finish(self, :class:`dropbox.files.UploadSessionFinishError` """ arg = files.UploadSessionFinishArg(cursor, - commit) + commit, + content_hash) r = self.request( files.upload_session_finish, 'files', @@ -3447,7 +3454,8 @@ def files_upload_session_finish_batch_check(self, def files_upload_session_start(self, f, close=False, - session_type=None): + session_type=None, + content_hash=None): """ 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. @@ -3495,6 +3503,11 @@ def files_upload_session_start(self, :param Nullable[:class:`dropbox.files.UploadSessionType`] session_type: Type of upload session you want to start. If not specified, default is ``UploadSessionType.sequential``. + :param Nullable[str] content_hash: A hash of the file content uploaded + in this call. If provided and the uploaded content does not match + this hash, an error will be returned. For more information see our + `Content hash + `_ page. :rtype: :class:`dropbox.files.UploadSessionStartResult` :raises: :class:`.exceptions.ApiError` @@ -3502,7 +3515,8 @@ def files_upload_session_start(self, :class:`dropbox.files.UploadSessionStartError` """ arg = files.UploadSessionStartArg(close, - session_type) + session_type, + content_hash) r = self.request( files.upload_session_start, 'files', diff --git a/dropbox/files.py b/dropbox/files.py index 4530b1ab..bc0e9052 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -412,34 +412,6 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): CommitInfo_validator = bv.Struct(CommitInfo) -class CommitInfoWithProperties(CommitInfo): - - __slots__ = [ - ] - - _has_required_fields = True - - def __init__(self, - path=None, - mode=None, - autorename=None, - client_modified=None, - mute=None, - property_groups=None, - strict_conflict=None): - super(CommitInfoWithProperties, self).__init__(path, - mode, - autorename, - client_modified, - mute, - property_groups, - strict_conflict) - - def _process_custom_annotations(self, annotation_type, field_path, processor): - super(CommitInfoWithProperties, self)._process_custom_annotations(annotation_type, field_path, processor) - -CommitInfoWithProperties_validator = bv.Struct(CommitInfoWithProperties) - class ContentSyncSetting(bb.Struct): """ :ivar files.ContentSyncSetting.id: Id of the item this setting is applied @@ -9216,6 +9188,48 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UnlockFileBatchArg_validator = bv.Struct(UnlockFileBatchArg) +class UploadArg(CommitInfo): + """ + :ivar files.UploadArg.content_hash: A hash of the file content uploaded in + this call. If provided and the uploaded content does not match this + hash, an error will be returned. For more information see our `Content + hash `_ page. + """ + + __slots__ = [ + '_content_hash_value', + ] + + _has_required_fields = True + + def __init__(self, + path=None, + mode=None, + autorename=None, + client_modified=None, + mute=None, + property_groups=None, + strict_conflict=None, + content_hash=None): + super(UploadArg, self).__init__(path, + mode, + autorename, + client_modified, + mute, + property_groups, + strict_conflict) + self._content_hash_value = bb.NOT_SET + if content_hash is not None: + self.content_hash = content_hash + + # Instance attribute type: str (validator is set below) + content_hash = bb.Attribute("content_hash", nullable=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(UploadArg, self)._process_custom_annotations(annotation_type, field_path, processor) + +UploadArg_validator = bv.Struct(UploadArg) + class UploadError(bb.Union): """ This class acts as a tagged union. Only one of the ``is_*`` methods will @@ -9229,12 +9243,16 @@ class UploadError(bb.Union): groups. :ivar files.UploadError.payload_too_large: The request payload must be at most 150 MB. + :ivar files.UploadError.content_hash_mismatch: The content received by the + Dropbox server in this call does not match the provided content hash. """ _catch_all = 'other' # Attribute is overwritten below the class definition payload_too_large = None # Attribute is overwritten below the class definition + content_hash_mismatch = None + # Attribute is overwritten below the class definition other = None @classmethod @@ -9283,6 +9301,14 @@ def is_payload_too_large(self): """ return self._tag == 'payload_too_large' + def is_content_hash_mismatch(self): + """ + Check if the union tag is ``content_hash_mismatch``. + + :rtype: bool + """ + return self._tag == 'content_hash_mismatch' + def is_other(self): """ Check if the union tag is ``other``. @@ -9321,18 +9347,6 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 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. - """ - - def _process_custom_annotations(self, annotation_type, field_path, processor): - super(UploadErrorWithProperties, self)._process_custom_annotations(annotation_type, field_path, processor) - -UploadErrorWithProperties_validator = bv.Union(UploadErrorWithProperties) - class UploadSessionAppendArg(bb.Struct): """ :ivar files.UploadSessionAppendArg.cursor: Contains the upload session ID @@ -9341,24 +9355,34 @@ class UploadSessionAppendArg(bb.Struct): be closed, at which point you won't be able to call :meth:`dropbox.dropbox_client.Dropbox.files_upload_session_append` anymore with the current session. + :ivar files.UploadSessionAppendArg.content_hash: A hash of the file content + uploaded in this call. If provided and the uploaded content does not + match this hash, an error will be returned. For more information see our + `Content hash + `_ page. """ __slots__ = [ '_cursor_value', '_close_value', + '_content_hash_value', ] _has_required_fields = True def __init__(self, cursor=None, - close=None): + close=None, + content_hash=None): self._cursor_value = bb.NOT_SET self._close_value = bb.NOT_SET + self._content_hash_value = bb.NOT_SET if cursor is not None: self.cursor = cursor if close is not None: self.close = close + if content_hash is not None: + self.content_hash = content_hash # Instance attribute type: UploadSessionCursor (validator is set below) cursor = bb.Attribute("cursor", user_defined=True) @@ -9366,11 +9390,192 @@ def __init__(self, # Instance attribute type: bool (validator is set below) close = bb.Attribute("close") + # Instance attribute type: str (validator is set below) + content_hash = bb.Attribute("content_hash", nullable=True) + def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadSessionAppendArg, self)._process_custom_annotations(annotation_type, field_path, processor) UploadSessionAppendArg_validator = bv.Struct(UploadSessionAppendArg) +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 files.UploadSessionLookupError.not_found: The upload session ID was + not found or has expired. Upload sessions are valid for 7 days. + :ivar UploadSessionOffsetError UploadSessionLookupError.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 files.UploadSessionLookupError.closed: You are attempting to append + data to an upload session that has already been closed (i.e. committed). + :ivar files.UploadSessionLookupError.not_closed: The session must be closed + before calling upload_session/finish_batch. + :ivar files.UploadSessionLookupError.too_large: You can not append to the + upload session because the size of a file should not reach the max file + size limit (i.e. 350GB). + :ivar files.UploadSessionLookupError.concurrent_session_invalid_offset: For + concurrent upload sessions, offset needs to be multiple of 4194304 + bytes. + :ivar files.UploadSessionLookupError.concurrent_session_invalid_data_size: + For concurrent upload sessions, only chunks with size multiple of + 4194304 bytes can be uploaded. + :ivar files.UploadSessionLookupError.payload_too_large: The request payload + must be at most 150 MB. + """ + + _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 + too_large = None + # Attribute is overwritten below the class definition + concurrent_session_invalid_offset = None + # Attribute is overwritten below the class definition + concurrent_session_invalid_data_size = None + # Attribute is overwritten below the class definition + payload_too_large = 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_too_large(self): + """ + Check if the union tag is ``too_large``. + + :rtype: bool + """ + return self._tag == 'too_large' + + def is_concurrent_session_invalid_offset(self): + """ + Check if the union tag is ``concurrent_session_invalid_offset``. + + :rtype: bool + """ + return self._tag == 'concurrent_session_invalid_offset' + + def is_concurrent_session_invalid_data_size(self): + """ + Check if the union tag is ``concurrent_session_invalid_data_size``. + + :rtype: bool + """ + return self._tag == 'concurrent_session_invalid_data_size' + + def is_payload_too_large(self): + """ + Check if the union tag is ``payload_too_large``. + + :rtype: bool + """ + return self._tag == 'payload_too_large' + + 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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(UploadSessionLookupError, self)._process_custom_annotations(annotation_type, field_path, processor) + +UploadSessionLookupError_validator = bv.Union(UploadSessionLookupError) + +class UploadSessionAppendError(UploadSessionLookupError): + """ + This class acts as a tagged union. Only 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 files.UploadSessionAppendError.content_hash_mismatch: The content + received by the Dropbox server in this call does not match the provided + content hash. + """ + + # Attribute is overwritten below the class definition + content_hash_mismatch = None + + def is_content_hash_mismatch(self): + """ + Check if the union tag is ``content_hash_mismatch``. + + :rtype: bool + """ + return self._tag == 'content_hash_mismatch' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(UploadSessionAppendError, self)._process_custom_annotations(annotation_type, field_path, processor) + +UploadSessionAppendError_validator = bv.Union(UploadSessionAppendError) + class UploadSessionCursor(bb.Struct): """ :ivar files.UploadSessionCursor.session_id: The upload session ID (returned @@ -9414,24 +9619,34 @@ class UploadSessionFinishArg(bb.Struct): and the offset. :ivar files.UploadSessionFinishArg.commit: Contains the path and other optional modifiers for the commit. + :ivar files.UploadSessionFinishArg.content_hash: A hash of the file content + uploaded in this call. If provided and the uploaded content does not + match this hash, an error will be returned. For more information see our + `Content hash + `_ page. """ __slots__ = [ '_cursor_value', '_commit_value', + '_content_hash_value', ] _has_required_fields = True def __init__(self, cursor=None, - commit=None): + commit=None, + content_hash=None): self._cursor_value = bb.NOT_SET self._commit_value = bb.NOT_SET + self._content_hash_value = bb.NOT_SET if cursor is not None: self.cursor = cursor if commit is not None: self.commit = commit + if content_hash is not None: + self.content_hash = content_hash # Instance attribute type: UploadSessionCursor (validator is set below) cursor = bb.Attribute("cursor", user_defined=True) @@ -9439,6 +9654,9 @@ def __init__(self, # Instance attribute type: CommitInfo (validator is set below) commit = bb.Attribute("commit", user_defined=True) + # Instance attribute type: str (validator is set below) + content_hash = bb.Attribute("content_hash", nullable=True) + def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadSessionFinishArg, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -9705,6 +9923,9 @@ class UploadSessionFinishError(bb.Union): all pieces of data were uploaded before trying to finish the session. :ivar files.UploadSessionFinishError.payload_too_large: The request payload must be at most 150 MB. + :ivar files.UploadSessionFinishError.content_hash_mismatch: The content + received by the Dropbox server in this call does not match the provided + content hash. """ _catch_all = 'other' @@ -9721,6 +9942,8 @@ class UploadSessionFinishError(bb.Union): # Attribute is overwritten below the class definition payload_too_large = None # Attribute is overwritten below the class definition + content_hash_mismatch = None + # Attribute is overwritten below the class definition other = None @classmethod @@ -9828,6 +10051,14 @@ def is_payload_too_large(self): """ return self._tag == 'payload_too_large' + def is_content_hash_mismatch(self): + """ + Check if the union tag is ``content_hash_mismatch``. + + :rtype: bool + """ + return self._tag == 'content_hash_mismatch' + def is_other(self): """ Check if the union tag is ``other``. @@ -9880,157 +10111,6 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 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 files.UploadSessionLookupError.not_found: The upload session ID was - not found or has expired. Upload sessions are valid for 7 days. - :ivar UploadSessionOffsetError UploadSessionLookupError.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 files.UploadSessionLookupError.closed: You are attempting to append - data to an upload session that has already been closed (i.e. committed). - :ivar files.UploadSessionLookupError.not_closed: The session must be closed - before calling upload_session/finish_batch. - :ivar files.UploadSessionLookupError.too_large: You can not append to the - upload session because the size of a file should not reach the max file - size limit (i.e. 350GB). - :ivar files.UploadSessionLookupError.concurrent_session_invalid_offset: For - concurrent upload sessions, offset needs to be multiple of 4194304 - bytes. - :ivar files.UploadSessionLookupError.concurrent_session_invalid_data_size: - For concurrent upload sessions, only chunks with size multiple of - 4194304 bytes can be uploaded. - :ivar files.UploadSessionLookupError.payload_too_large: The request payload - must be at most 150 MB. - """ - - _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 - too_large = None - # Attribute is overwritten below the class definition - concurrent_session_invalid_offset = None - # Attribute is overwritten below the class definition - concurrent_session_invalid_data_size = None - # Attribute is overwritten below the class definition - payload_too_large = 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_too_large(self): - """ - Check if the union tag is ``too_large``. - - :rtype: bool - """ - return self._tag == 'too_large' - - def is_concurrent_session_invalid_offset(self): - """ - Check if the union tag is ``concurrent_session_invalid_offset``. - - :rtype: bool - """ - return self._tag == 'concurrent_session_invalid_offset' - - def is_concurrent_session_invalid_data_size(self): - """ - Check if the union tag is ``concurrent_session_invalid_data_size``. - - :rtype: bool - """ - return self._tag == 'concurrent_session_invalid_data_size' - - def is_payload_too_large(self): - """ - Check if the union tag is ``payload_too_large``. - - :rtype: bool - """ - return self._tag == 'payload_too_large' - - 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 _process_custom_annotations(self, annotation_type, field_path, processor): - super(UploadSessionLookupError, self)._process_custom_annotations(annotation_type, field_path, processor) - -UploadSessionLookupError_validator = bv.Union(UploadSessionLookupError) - class UploadSessionOffsetError(bb.Struct): """ :ivar files.UploadSessionOffsetError.correct_offset: The offset up to which @@ -10066,24 +10146,34 @@ class UploadSessionStartArg(bb.Struct): :ivar files.UploadSessionStartArg.session_type: Type of upload session you want to start. If not specified, default is ``UploadSessionType.sequential``. + :ivar files.UploadSessionStartArg.content_hash: A hash of the file content + uploaded in this call. If provided and the uploaded content does not + match this hash, an error will be returned. For more information see our + `Content hash + `_ page. """ __slots__ = [ '_close_value', '_session_type_value', + '_content_hash_value', ] _has_required_fields = False def __init__(self, close=None, - session_type=None): + session_type=None, + content_hash=None): self._close_value = bb.NOT_SET self._session_type_value = bb.NOT_SET + self._content_hash_value = bb.NOT_SET if close is not None: self.close = close if session_type is not None: self.session_type = session_type + if content_hash is not None: + self.content_hash = content_hash # Instance attribute type: bool (validator is set below) close = bb.Attribute("close") @@ -10091,6 +10181,9 @@ def __init__(self, # Instance attribute type: UploadSessionType (validator is set below) session_type = bb.Attribute("session_type", nullable=True, user_defined=True) + # Instance attribute type: str (validator is set below) + content_hash = bb.Attribute("content_hash", nullable=True) + def _process_custom_annotations(self, annotation_type, field_path, processor): super(UploadSessionStartArg, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -10108,6 +10201,9 @@ class UploadSessionStartError(bb.Union): Can not start a closed concurrent upload session. :ivar files.UploadSessionStartError.payload_too_large: The request payload must be at most 150 MB. + :ivar files.UploadSessionStartError.content_hash_mismatch: The content + received by the Dropbox server in this call does not match the provided + content hash. """ _catch_all = 'other' @@ -10118,6 +10214,8 @@ class UploadSessionStartError(bb.Union): # Attribute is overwritten below the class definition payload_too_large = None # Attribute is overwritten below the class definition + content_hash_mismatch = None + # Attribute is overwritten below the class definition other = None def is_concurrent_session_data_not_allowed(self): @@ -10144,6 +10242,14 @@ def is_payload_too_large(self): """ return self._tag == 'payload_too_large' + def is_content_hash_mismatch(self): + """ + Check if the union tag is ``content_hash_mismatch``. + + :rtype: bool + """ + return self._tag == 'content_hash_mismatch' + def is_other(self): """ Check if the union tag is ``other``. @@ -10762,9 +10868,6 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('strict_conflict', CommitInfo.strict_conflict.validator), ] -CommitInfoWithProperties._all_field_names_ = CommitInfo._all_field_names_.union(set([])) -CommitInfoWithProperties._all_fields_ = CommitInfo._all_fields_ + [] - ContentSyncSetting.id.validator = FileId_validator ContentSyncSetting.sync_setting.validator = SyncSetting_validator ContentSyncSetting._all_field_names_ = set([ @@ -12713,35 +12816,79 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UnlockFileBatchArg._all_field_names_ = set(['entries']) UnlockFileBatchArg._all_fields_ = [('entries', UnlockFileBatchArg.entries.validator)] +UploadArg.content_hash.validator = bv.Nullable(Sha256HexHash_validator) +UploadArg._all_field_names_ = CommitInfo._all_field_names_.union(set(['content_hash'])) +UploadArg._all_fields_ = CommitInfo._all_fields_ + [('content_hash', UploadArg.content_hash.validator)] + UploadError._path_validator = UploadWriteFailed_validator UploadError._properties_error_validator = file_properties.InvalidPropertyGroupError_validator UploadError._payload_too_large_validator = bv.Void() +UploadError._content_hash_mismatch_validator = bv.Void() UploadError._other_validator = bv.Void() UploadError._tagmap = { 'path': UploadError._path_validator, 'properties_error': UploadError._properties_error_validator, 'payload_too_large': UploadError._payload_too_large_validator, + 'content_hash_mismatch': UploadError._content_hash_mismatch_validator, 'other': UploadError._other_validator, } UploadError.payload_too_large = UploadError('payload_too_large') +UploadError.content_hash_mismatch = UploadError('content_hash_mismatch') UploadError.other = UploadError('other') -UploadErrorWithProperties._tagmap = { -} -UploadErrorWithProperties._tagmap.update(UploadError._tagmap) - UploadSessionAppendArg.cursor.validator = UploadSessionCursor_validator UploadSessionAppendArg.close.validator = bv.Boolean() +UploadSessionAppendArg.content_hash.validator = bv.Nullable(Sha256HexHash_validator) UploadSessionAppendArg._all_field_names_ = set([ 'cursor', 'close', + 'content_hash', ]) UploadSessionAppendArg._all_fields_ = [ ('cursor', UploadSessionAppendArg.cursor.validator), ('close', UploadSessionAppendArg.close.validator), + ('content_hash', UploadSessionAppendArg.content_hash.validator), ] +UploadSessionLookupError._not_found_validator = bv.Void() +UploadSessionLookupError._incorrect_offset_validator = UploadSessionOffsetError_validator +UploadSessionLookupError._closed_validator = bv.Void() +UploadSessionLookupError._not_closed_validator = bv.Void() +UploadSessionLookupError._too_large_validator = bv.Void() +UploadSessionLookupError._concurrent_session_invalid_offset_validator = bv.Void() +UploadSessionLookupError._concurrent_session_invalid_data_size_validator = bv.Void() +UploadSessionLookupError._payload_too_large_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, + 'too_large': UploadSessionLookupError._too_large_validator, + 'concurrent_session_invalid_offset': UploadSessionLookupError._concurrent_session_invalid_offset_validator, + 'concurrent_session_invalid_data_size': UploadSessionLookupError._concurrent_session_invalid_data_size_validator, + 'payload_too_large': UploadSessionLookupError._payload_too_large_validator, + 'other': UploadSessionLookupError._other_validator, +} + +UploadSessionLookupError.not_found = UploadSessionLookupError('not_found') +UploadSessionLookupError.closed = UploadSessionLookupError('closed') +UploadSessionLookupError.not_closed = UploadSessionLookupError('not_closed') +UploadSessionLookupError.too_large = UploadSessionLookupError('too_large') +UploadSessionLookupError.concurrent_session_invalid_offset = UploadSessionLookupError('concurrent_session_invalid_offset') +UploadSessionLookupError.concurrent_session_invalid_data_size = UploadSessionLookupError('concurrent_session_invalid_data_size') +UploadSessionLookupError.payload_too_large = UploadSessionLookupError('payload_too_large') +UploadSessionLookupError.other = UploadSessionLookupError('other') + +UploadSessionAppendError._content_hash_mismatch_validator = bv.Void() +UploadSessionAppendError._tagmap = { + 'content_hash_mismatch': UploadSessionAppendError._content_hash_mismatch_validator, +} +UploadSessionAppendError._tagmap.update(UploadSessionLookupError._tagmap) + +UploadSessionAppendError.content_hash_mismatch = UploadSessionAppendError('content_hash_mismatch') + UploadSessionCursor.session_id.validator = bv.String() UploadSessionCursor.offset.validator = bv.UInt64() UploadSessionCursor._all_field_names_ = set([ @@ -12755,13 +12902,16 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadSessionFinishArg.cursor.validator = UploadSessionCursor_validator UploadSessionFinishArg.commit.validator = CommitInfo_validator +UploadSessionFinishArg.content_hash.validator = bv.Nullable(Sha256HexHash_validator) UploadSessionFinishArg._all_field_names_ = set([ 'cursor', 'commit', + 'content_hash', ]) UploadSessionFinishArg._all_fields_ = [ ('cursor', UploadSessionFinishArg.cursor.validator), ('commit', UploadSessionFinishArg.commit.validator), + ('content_hash', UploadSessionFinishArg.content_hash.validator), ] UploadSessionFinishBatchArg.entries.validator = bv.List(UploadSessionFinishArg_validator, max_items=1000) @@ -12804,6 +12954,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadSessionFinishError._concurrent_session_not_closed_validator = bv.Void() UploadSessionFinishError._concurrent_session_missing_data_validator = bv.Void() UploadSessionFinishError._payload_too_large_validator = bv.Void() +UploadSessionFinishError._content_hash_mismatch_validator = bv.Void() UploadSessionFinishError._other_validator = bv.Void() UploadSessionFinishError._tagmap = { 'lookup_failed': UploadSessionFinishError._lookup_failed_validator, @@ -12815,6 +12966,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'concurrent_session_not_closed': UploadSessionFinishError._concurrent_session_not_closed_validator, 'concurrent_session_missing_data': UploadSessionFinishError._concurrent_session_missing_data_validator, 'payload_too_large': UploadSessionFinishError._payload_too_large_validator, + 'content_hash_mismatch': UploadSessionFinishError._content_hash_mismatch_validator, 'other': UploadSessionFinishError._other_validator, } @@ -12824,67 +12976,44 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadSessionFinishError.concurrent_session_not_closed = UploadSessionFinishError('concurrent_session_not_closed') UploadSessionFinishError.concurrent_session_missing_data = UploadSessionFinishError('concurrent_session_missing_data') UploadSessionFinishError.payload_too_large = UploadSessionFinishError('payload_too_large') +UploadSessionFinishError.content_hash_mismatch = UploadSessionFinishError('content_hash_mismatch') 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._too_large_validator = bv.Void() -UploadSessionLookupError._concurrent_session_invalid_offset_validator = bv.Void() -UploadSessionLookupError._concurrent_session_invalid_data_size_validator = bv.Void() -UploadSessionLookupError._payload_too_large_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, - 'too_large': UploadSessionLookupError._too_large_validator, - 'concurrent_session_invalid_offset': UploadSessionLookupError._concurrent_session_invalid_offset_validator, - 'concurrent_session_invalid_data_size': UploadSessionLookupError._concurrent_session_invalid_data_size_validator, - 'payload_too_large': UploadSessionLookupError._payload_too_large_validator, - 'other': UploadSessionLookupError._other_validator, -} - -UploadSessionLookupError.not_found = UploadSessionLookupError('not_found') -UploadSessionLookupError.closed = UploadSessionLookupError('closed') -UploadSessionLookupError.not_closed = UploadSessionLookupError('not_closed') -UploadSessionLookupError.too_large = UploadSessionLookupError('too_large') -UploadSessionLookupError.concurrent_session_invalid_offset = UploadSessionLookupError('concurrent_session_invalid_offset') -UploadSessionLookupError.concurrent_session_invalid_data_size = UploadSessionLookupError('concurrent_session_invalid_data_size') -UploadSessionLookupError.payload_too_large = UploadSessionLookupError('payload_too_large') -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.session_type.validator = bv.Nullable(UploadSessionType_validator) +UploadSessionStartArg.content_hash.validator = bv.Nullable(Sha256HexHash_validator) UploadSessionStartArg._all_field_names_ = set([ 'close', 'session_type', + 'content_hash', ]) UploadSessionStartArg._all_fields_ = [ ('close', UploadSessionStartArg.close.validator), ('session_type', UploadSessionStartArg.session_type.validator), + ('content_hash', UploadSessionStartArg.content_hash.validator), ] UploadSessionStartError._concurrent_session_data_not_allowed_validator = bv.Void() UploadSessionStartError._concurrent_session_close_not_allowed_validator = bv.Void() UploadSessionStartError._payload_too_large_validator = bv.Void() +UploadSessionStartError._content_hash_mismatch_validator = bv.Void() UploadSessionStartError._other_validator = bv.Void() UploadSessionStartError._tagmap = { 'concurrent_session_data_not_allowed': UploadSessionStartError._concurrent_session_data_not_allowed_validator, 'concurrent_session_close_not_allowed': UploadSessionStartError._concurrent_session_close_not_allowed_validator, 'payload_too_large': UploadSessionStartError._payload_too_large_validator, + 'content_hash_mismatch': UploadSessionStartError._content_hash_mismatch_validator, 'other': UploadSessionStartError._other_validator, } UploadSessionStartError.concurrent_session_data_not_allowed = UploadSessionStartError('concurrent_session_data_not_allowed') UploadSessionStartError.concurrent_session_close_not_allowed = UploadSessionStartError('concurrent_session_close_not_allowed') UploadSessionStartError.payload_too_large = UploadSessionStartError('payload_too_large') +UploadSessionStartError.content_hash_mismatch = UploadSessionStartError('content_hash_mismatch') UploadSessionStartError.other = UploadSessionStartError('other') UploadSessionStartResult.session_id.validator = bv.String() @@ -13042,9 +13171,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'alpha/upload', 1, True, - CommitInfoWithProperties_validator, + UploadArg_validator, FileMetadata_validator, - UploadErrorWithProperties_validator, + UploadError_validator, {'auth': 'user', 'host': 'content', 'style': 'upload'}, @@ -13691,7 +13820,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'upload', 1, False, - CommitInfo_validator, + UploadArg_validator, FileMetadata_validator, UploadError_validator, {'auth': 'user', @@ -13704,7 +13833,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): False, UploadSessionAppendArg_validator, bv.Void(), - UploadSessionLookupError_validator, + UploadSessionAppendError_validator, {'auth': 'user', 'host': 'content', 'style': 'upload'}, @@ -13715,7 +13844,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): True, UploadSessionCursor_validator, bv.Void(), - UploadSessionLookupError_validator, + UploadSessionAppendError_validator, {'auth': 'user', 'host': 'content', 'style': 'upload'}, diff --git a/dropbox/sharing.py b/dropbox/sharing.py index 85eff028..c0a1ed73 100644 --- a/dropbox/sharing.py +++ b/dropbox/sharing.py @@ -88,6 +88,8 @@ class AccessLevel(bb.Union): folder. :ivar sharing.AccessLevel.viewer_no_comment: The collaborator can only view the shared folder and does not have any access to comments. + :ivar sharing.AccessLevel.traverse: The collaborator can only view the + shared folder that they have access to. """ _catch_all = 'other' @@ -100,6 +102,8 @@ class AccessLevel(bb.Union): # Attribute is overwritten below the class definition viewer_no_comment = None # Attribute is overwritten below the class definition + traverse = None + # Attribute is overwritten below the class definition other = None def is_owner(self): @@ -134,6 +138,14 @@ def is_viewer_no_comment(self): """ return self._tag == 'viewer_no_comment' + def is_traverse(self): + """ + Check if the union tag is ``traverse``. + + :rtype: bool + """ + return self._tag == 'traverse' + def is_other(self): """ Check if the union tag is ``other``. @@ -11040,12 +11052,14 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AccessLevel._editor_validator = bv.Void() AccessLevel._viewer_validator = bv.Void() AccessLevel._viewer_no_comment_validator = bv.Void() +AccessLevel._traverse_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, + 'traverse': AccessLevel._traverse_validator, 'other': AccessLevel._other_validator, } @@ -11053,6 +11067,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AccessLevel.editor = AccessLevel('editor') AccessLevel.viewer = AccessLevel('viewer') AccessLevel.viewer_no_comment = AccessLevel('viewer_no_comment') +AccessLevel.traverse = AccessLevel('traverse') AccessLevel.other = AccessLevel('other') AclUpdatePolicy._owner_validator = bv.Void() diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 98b95650..08ca6d00 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -7080,7 +7080,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): class EmailIngestPolicy(bb.Union): """ - Policy for deciding whether a team can use Email to my Dropbox feature + Policy for deciding whether a team can use Email to Dropbox feature This class acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the associated value of a tag (if one exists), use the @@ -7126,7 +7126,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): class EmailIngestPolicyChangedDetails(bb.Struct): """ - Changed email to my Dropbox policy for team. + Changed email to Dropbox policy for team. :ivar team_log.EmailIngestPolicyChangedDetails.new_value: To. :ivar team_log.EmailIngestPolicyChangedDetails.previous_value: From. @@ -7184,7 +7184,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): class EmailIngestReceiveFileDetails(bb.Struct): """ - Received files via Email to my Dropbox. + Received files via Email to Dropbox. :ivar team_log.EmailIngestReceiveFileDetails.inbox_name: Inbox name. :ivar team_log.EmailIngestReceiveFileDetails.attachment_names: Submitted @@ -22354,7 +22354,7 @@ class EventType(bb.Union): :ivar UserTagsRemovedType EventType.user_tags_removed: (file_operations) Removed tags :ivar EmailIngestReceiveFileType EventType.email_ingest_receive_file: - (file_requests) Received files via Email to my Dropbox + (file_requests) Received files via Email to Dropbox :ivar FileRequestChangeType EventType.file_request_change: (file_requests) Changed file request :ivar FileRequestCloseType EventType.file_request_close: (file_requests) @@ -22984,7 +22984,7 @@ class EventType(bb.Union): EventType.directory_restrictions_remove_members: (team_policies) Removed members from directory restrictions list :ivar EmailIngestPolicyChangedType EventType.email_ingest_policy_changed: - (team_policies) Changed email to my Dropbox policy for team + (team_policies) Changed email to Dropbox policy for team :ivar EmmAddExceptionType EventType.emm_add_exception: (team_policies) Added members to EMM exception list :ivar EmmChangePolicyType EventType.emm_change_policy: (team_policies) @@ -33594,7 +33594,7 @@ def get_user_tags_removed(self): def get_email_ingest_receive_file(self): """ - (file_requests) Received files via Email to my Dropbox + (file_requests) Received files via Email to Dropbox Only call this if :meth:`is_email_ingest_receive_file` is true. @@ -36879,7 +36879,7 @@ def get_directory_restrictions_remove_members(self): def get_email_ingest_policy_changed(self): """ - (team_policies) Changed email to my Dropbox policy for team + (team_policies) Changed email to Dropbox policy for team Only call this if :meth:`is_email_ingest_policy_changed` is true. @@ -38425,7 +38425,7 @@ class EventTypeArg(bb.Union): :ivar team_log.EventTypeArg.user_tags_removed: (file_operations) Removed tags :ivar team_log.EventTypeArg.email_ingest_receive_file: (file_requests) - Received files via Email to my Dropbox + Received files via Email to Dropbox :ivar team_log.EventTypeArg.file_request_change: (file_requests) Changed file request :ivar team_log.EventTypeArg.file_request_close: (file_requests) Closed file @@ -38967,7 +38967,7 @@ class EventTypeArg(bb.Union): :ivar team_log.EventTypeArg.directory_restrictions_remove_members: (team_policies) Removed members from directory restrictions list :ivar team_log.EventTypeArg.email_ingest_policy_changed: (team_policies) - Changed email to my Dropbox policy for team + Changed email to Dropbox policy for team :ivar team_log.EventTypeArg.emm_add_exception: (team_policies) Added members to EMM exception list :ivar team_log.EventTypeArg.emm_change_policy: (team_policies) diff --git a/spec b/spec index 13bbef72..9daf01c5 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 13bbef7298d235257ee5576025b5938f748de526 +Subproject commit 9daf01c5b7ac6936956f085792c573c06fb3c905 From 5c7dfbff152dfb30b2744a4a10c70b98ffceabbb Mon Sep 17 00:00:00 2001 From: Andrii Oriekhov Date: Thu, 3 Mar 2022 18:52:05 +0200 Subject: [PATCH 68/90] add GitHub URL for PyPi (#417) Co-authored-by: Scott Erickson --- setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.py b/setup.py index d5468ff3..70c63adb 100644 --- a/setup.py +++ b/setup.py @@ -61,6 +61,9 @@ license='MIT License', long_description=README, url='http://www.dropbox.com/developers', + project_urls={ + 'Source': 'https://github.com/dropbox/dropbox-sdk-python', + }, # From classifiers=[ 'Development Status :: 5 - Production/Stable', From aa3543ec4416dc6a5e9b2c79f8a4ac24ea27904a Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 30 Mar 2022 18:41:22 -0400 Subject: [PATCH 69/90] Automated Spec Update (#421) eec4b43685b7af842d320efaaa86db27232cb465 Change Notes: file_properties Namespace - Update Comments file_tagging Namespace - Update Comments files Namespace - Update Metadata struct to include preview_url - Update Comments team_log_generated Namespace - Add DropboxPasswordsPolicyChangedDetails, DropboxPasswordsPolicyChangedType structs - Add DropboxPasswordsPolicy unions Co-authored-by: DropboxBot --- dropbox/base.py | 5 +- dropbox/file_properties.py | 4 +- dropbox/files.py | 32 ++++-- dropbox/team_log.py | 227 +++++++++++++++++++++++++++++++++++++ spec | 2 +- 5 files changed, 258 insertions(+), 12 deletions(-) diff --git a/dropbox/base.py b/dropbox/base.py index a1c6089a..af5e3a3f 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -3054,8 +3054,9 @@ def files_tags_add(self, path, tag_text): """ - Add a tag to an item. A tag is a string. No more than 20 tags can be - added to a given item. + Add a tag to an item. A tag is a string. The strings are automatically + converted to lowercase letters. No more than 20 tags can be added to a + given item. Route attributes: scope: files.metadata.write diff --git a/dropbox/file_properties.py b/dropbox/file_properties.py index c6e421cb..6f2ab143 100644 --- a/dropbox/file_properties.py +++ b/dropbox/file_properties.py @@ -532,8 +532,8 @@ class LookupError(bb.Union): :ivar file_properties.LookupError.not_folder: We were expecting a folder, but the given path refers to something that isn't a folder. :ivar file_properties.LookupError.restricted_content: The file cannot be - transferred because the content is restricted. For example, sometimes - there are legal restrictions due to copyright claims. + transferred because the content is restricted. For example, we might + restrict a file due to legal requirements. """ _catch_all = 'other' diff --git a/dropbox/files.py b/dropbox/files.py index bc0e9052..948fa0bb 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -1533,6 +1533,7 @@ class Metadata(bb.Struct): :ivar files.Metadata.parent_shared_folder_id: Please use ``FileSharingInfo.parent_shared_folder_id`` or ``FolderSharingInfo.parent_shared_folder_id`` instead. + :ivar files.Metadata.preview_url: The preview URL of the file. """ __slots__ = [ @@ -1540,6 +1541,7 @@ class Metadata(bb.Struct): '_path_lower_value', '_path_display_value', '_parent_shared_folder_id_value', + '_preview_url_value', ] _has_required_fields = True @@ -1548,11 +1550,13 @@ def __init__(self, name=None, path_lower=None, path_display=None, - parent_shared_folder_id=None): + parent_shared_folder_id=None, + preview_url=None): self._name_value = bb.NOT_SET self._path_lower_value = bb.NOT_SET self._path_display_value = bb.NOT_SET self._parent_shared_folder_id_value = bb.NOT_SET + self._preview_url_value = bb.NOT_SET if name is not None: self.name = name if path_lower is not None: @@ -1561,6 +1565,8 @@ def __init__(self, self.path_display = path_display if parent_shared_folder_id is not None: self.parent_shared_folder_id = parent_shared_folder_id + if preview_url is not None: + self.preview_url = preview_url # Instance attribute type: str (validator is set below) name = bb.Attribute("name") @@ -1574,6 +1580,9 @@ def __init__(self, # Instance attribute type: str (validator is set below) parent_shared_folder_id = bb.Attribute("parent_shared_folder_id", nullable=True) + # Instance attribute type: str (validator is set below) + preview_url = bb.Attribute("preview_url", nullable=True) + def _process_custom_annotations(self, annotation_type, field_path, processor): super(Metadata, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -1594,11 +1603,13 @@ def __init__(self, name=None, path_lower=None, path_display=None, - parent_shared_folder_id=None): + parent_shared_folder_id=None, + preview_url=None): super(DeletedMetadata, self).__init__(name, path_lower, path_display, - parent_shared_folder_id) + parent_shared_folder_id, + preview_url) def _process_custom_annotations(self, annotation_type, field_path, processor): super(DeletedMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -2489,6 +2500,7 @@ def __init__(self, path_lower=None, path_display=None, parent_shared_folder_id=None, + preview_url=None, media_info=None, symlink_info=None, sharing_info=None, @@ -2501,7 +2513,8 @@ def __init__(self, super(FileMetadata, self).__init__(name, path_lower, path_display, - parent_shared_folder_id) + parent_shared_folder_id, + preview_url) self._id_value = bb.NOT_SET self._client_modified_value = bb.NOT_SET self._server_modified_value = bb.NOT_SET @@ -2732,13 +2745,15 @@ def __init__(self, path_lower=None, path_display=None, parent_shared_folder_id=None, + preview_url=None, shared_folder_id=None, sharing_info=None, property_groups=None): super(FolderMetadata, self).__init__(name, path_lower, path_display, - parent_shared_folder_id) + parent_shared_folder_id, + preview_url) self._id_value = bb.NOT_SET self._shared_folder_id_value = bb.NOT_SET self._sharing_info_value = bb.NOT_SET @@ -4662,8 +4677,8 @@ class LookupError(bb.Union): :ivar files.LookupError.not_folder: We were expecting a folder, but the given path refers to something that isn't a folder. :ivar files.LookupError.restricted_content: The file cannot be transferred - because the content is restricted. For example, sometimes there are - legal restrictions due to copyright claims. + because the content is restricted. For example, we might restrict a file + due to legal requirements. :ivar files.LookupError.unsupported_content_type: This operation is not supported for this content type. :ivar files.LookupError.locked: The given path is locked. @@ -11070,11 +11085,13 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 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.preview_url.validator = bv.Nullable(bv.String()) Metadata._field_names_ = set([ 'name', 'path_lower', 'path_display', 'parent_shared_folder_id', + 'preview_url', ]) Metadata._all_field_names_ = Metadata._field_names_ Metadata._fields_ = [ @@ -11082,6 +11099,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('path_lower', Metadata.path_lower.validator), ('path_display', Metadata.path_display.validator), ('parent_shared_folder_id', Metadata.parent_shared_folder_id.validator), + ('preview_url', Metadata.preview_url.validator), ] Metadata._all_fields_ = Metadata._fields_ diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 08ca6d00..4fe46ec1 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -7042,6 +7042,120 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DropboxPasswordsNewDeviceEnrolledType_validator = bv.Struct(DropboxPasswordsNewDeviceEnrolledType) +class DropboxPasswordsPolicy(bb.Union): + """ + Policy for deciding whether team users can use Dropbox Passwords + + This class acts as a tagged union. Only 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 + disabled = None + # Attribute is overwritten below the class definition + enabled = 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_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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(DropboxPasswordsPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) + +DropboxPasswordsPolicy_validator = bv.Union(DropboxPasswordsPolicy) + +class DropboxPasswordsPolicyChangedDetails(bb.Struct): + """ + Changed Dropbox Passwords policy for team. + + :ivar team_log.DropboxPasswordsPolicyChangedDetails.new_value: To. + :ivar team_log.DropboxPasswordsPolicyChangedDetails.previous_value: From. + """ + + __slots__ = [ + '_new_value_value', + '_previous_value_value', + ] + + _has_required_fields = True + + def __init__(self, + new_value=None, + previous_value=None): + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + if new_value is not None: + self.new_value = new_value + if previous_value is not None: + self.previous_value = previous_value + + # Instance attribute type: DropboxPasswordsPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) + + # Instance attribute type: DropboxPasswordsPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(DropboxPasswordsPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +DropboxPasswordsPolicyChangedDetails_validator = bv.Struct(DropboxPasswordsPolicyChangedDetails) + +class DropboxPasswordsPolicyChangedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(DropboxPasswordsPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +DropboxPasswordsPolicyChangedType_validator = bv.Struct(DropboxPasswordsPolicyChangedType) + class DurationLogInfo(bb.Struct): """ Represents a time duration: unit and amount @@ -12237,6 +12351,17 @@ def directory_restrictions_remove_members_details(cls, val): """ return cls('directory_restrictions_remove_members_details', val) + @classmethod + def dropbox_passwords_policy_changed_details(cls, val): + """ + Create an instance of this class set to the + ``dropbox_passwords_policy_changed_details`` tag with value ``val``. + + :param DropboxPasswordsPolicyChangedDetails val: + :rtype: EventDetails + """ + return cls('dropbox_passwords_policy_changed_details', val) + @classmethod def email_ingest_policy_changed_details(cls, val): """ @@ -16428,6 +16553,14 @@ def is_directory_restrictions_remove_members_details(self): """ return self._tag == 'directory_restrictions_remove_members_details' + def is_dropbox_passwords_policy_changed_details(self): + """ + Check if the union tag is ``dropbox_passwords_policy_changed_details``. + + :rtype: bool + """ + return self._tag == 'dropbox_passwords_policy_changed_details' + def is_email_ingest_policy_changed_details(self): """ Check if the union tag is ``email_ingest_policy_changed_details``. @@ -21006,6 +21139,16 @@ def get_directory_restrictions_remove_members_details(self): raise AttributeError("tag 'directory_restrictions_remove_members_details' not set") return self._value + def get_dropbox_passwords_policy_changed_details(self): + """ + Only call this if :meth:`is_dropbox_passwords_policy_changed_details` is true. + + :rtype: DropboxPasswordsPolicyChangedDetails + """ + if not self.is_dropbox_passwords_policy_changed_details(): + raise AttributeError("tag 'dropbox_passwords_policy_changed_details' not set") + return self._value + def get_email_ingest_policy_changed_details(self): """ Only call this if :meth:`is_email_ingest_policy_changed_details` is true. @@ -22983,6 +23126,9 @@ class EventType(bb.Union): :ivar DirectoryRestrictionsRemoveMembersType EventType.directory_restrictions_remove_members: (team_policies) Removed members from directory restrictions list + :ivar DropboxPasswordsPolicyChangedType + EventType.dropbox_passwords_policy_changed: (team_policies) Changed + Dropbox Passwords policy for team :ivar EmailIngestPolicyChangedType EventType.email_ingest_policy_changed: (team_policies) Changed email to Dropbox policy for team :ivar EmmAddExceptionType EventType.emm_add_exception: (team_policies) Added @@ -27353,6 +27499,17 @@ def directory_restrictions_remove_members(cls, val): """ return cls('directory_restrictions_remove_members', val) + @classmethod + def dropbox_passwords_policy_changed(cls, val): + """ + Create an instance of this class set to the + ``dropbox_passwords_policy_changed`` tag with value ``val``. + + :param DropboxPasswordsPolicyChangedType val: + :rtype: EventType + """ + return cls('dropbox_passwords_policy_changed', val) + @classmethod def email_ingest_policy_changed(cls, val): """ @@ -31519,6 +31676,14 @@ def is_directory_restrictions_remove_members(self): """ return self._tag == 'directory_restrictions_remove_members' + def is_dropbox_passwords_policy_changed(self): + """ + Check if the union tag is ``dropbox_passwords_policy_changed``. + + :rtype: bool + """ + return self._tag == 'dropbox_passwords_policy_changed' + def is_email_ingest_policy_changed(self): """ Check if the union tag is ``email_ingest_policy_changed``. @@ -36877,6 +37042,18 @@ def get_directory_restrictions_remove_members(self): raise AttributeError("tag 'directory_restrictions_remove_members' not set") return self._value + def get_dropbox_passwords_policy_changed(self): + """ + (team_policies) Changed Dropbox Passwords policy for team + + Only call this if :meth:`is_dropbox_passwords_policy_changed` is true. + + :rtype: DropboxPasswordsPolicyChangedType + """ + if not self.is_dropbox_passwords_policy_changed(): + raise AttributeError("tag 'dropbox_passwords_policy_changed' not set") + return self._value + def get_email_ingest_policy_changed(self): """ (team_policies) Changed email to Dropbox policy for team @@ -38966,6 +39143,8 @@ class EventTypeArg(bb.Union): (team_policies) Added members to directory restrictions list :ivar team_log.EventTypeArg.directory_restrictions_remove_members: (team_policies) Removed members from directory restrictions list + :ivar team_log.EventTypeArg.dropbox_passwords_policy_changed: + (team_policies) Changed Dropbox Passwords policy for team :ivar team_log.EventTypeArg.email_ingest_policy_changed: (team_policies) Changed email to Dropbox policy for team :ivar team_log.EventTypeArg.emm_add_exception: (team_policies) Added members @@ -39963,6 +40142,8 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition directory_restrictions_remove_members = None # Attribute is overwritten below the class definition + dropbox_passwords_policy_changed = None + # Attribute is overwritten below the class definition email_ingest_policy_changed = None # Attribute is overwritten below the class definition emm_add_exception = None @@ -43135,6 +43316,14 @@ def is_directory_restrictions_remove_members(self): """ return self._tag == 'directory_restrictions_remove_members' + def is_dropbox_passwords_policy_changed(self): + """ + Check if the union tag is ``dropbox_passwords_policy_changed``. + + :rtype: bool + """ + return self._tag == 'dropbox_passwords_policy_changed' + def is_email_ingest_policy_changed(self): """ Check if the union tag is ``email_ingest_policy_changed``. @@ -73884,6 +74073,37 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DropboxPasswordsNewDeviceEnrolledType._all_field_names_ = set(['description']) DropboxPasswordsNewDeviceEnrolledType._all_fields_ = [('description', DropboxPasswordsNewDeviceEnrolledType.description.validator)] +DropboxPasswordsPolicy._default_validator = bv.Void() +DropboxPasswordsPolicy._disabled_validator = bv.Void() +DropboxPasswordsPolicy._enabled_validator = bv.Void() +DropboxPasswordsPolicy._other_validator = bv.Void() +DropboxPasswordsPolicy._tagmap = { + 'default': DropboxPasswordsPolicy._default_validator, + 'disabled': DropboxPasswordsPolicy._disabled_validator, + 'enabled': DropboxPasswordsPolicy._enabled_validator, + 'other': DropboxPasswordsPolicy._other_validator, +} + +DropboxPasswordsPolicy.default = DropboxPasswordsPolicy('default') +DropboxPasswordsPolicy.disabled = DropboxPasswordsPolicy('disabled') +DropboxPasswordsPolicy.enabled = DropboxPasswordsPolicy('enabled') +DropboxPasswordsPolicy.other = DropboxPasswordsPolicy('other') + +DropboxPasswordsPolicyChangedDetails.new_value.validator = DropboxPasswordsPolicy_validator +DropboxPasswordsPolicyChangedDetails.previous_value.validator = DropboxPasswordsPolicy_validator +DropboxPasswordsPolicyChangedDetails._all_field_names_ = set([ + 'new_value', + 'previous_value', +]) +DropboxPasswordsPolicyChangedDetails._all_fields_ = [ + ('new_value', DropboxPasswordsPolicyChangedDetails.new_value.validator), + ('previous_value', DropboxPasswordsPolicyChangedDetails.previous_value.validator), +] + +DropboxPasswordsPolicyChangedType.description.validator = bv.String() +DropboxPasswordsPolicyChangedType._all_field_names_ = set(['description']) +DropboxPasswordsPolicyChangedType._all_fields_ = [('description', DropboxPasswordsPolicyChangedType.description.validator)] + DurationLogInfo.unit.validator = TimeUnit_validator DurationLogInfo.amount.validator = bv.UInt64() DurationLogInfo._all_field_names_ = set([ @@ -74503,6 +74723,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._device_approvals_remove_exception_details_validator = DeviceApprovalsRemoveExceptionDetails_validator EventDetails._directory_restrictions_add_members_details_validator = DirectoryRestrictionsAddMembersDetails_validator EventDetails._directory_restrictions_remove_members_details_validator = DirectoryRestrictionsRemoveMembersDetails_validator +EventDetails._dropbox_passwords_policy_changed_details_validator = DropboxPasswordsPolicyChangedDetails_validator EventDetails._email_ingest_policy_changed_details_validator = EmailIngestPolicyChangedDetails_validator EventDetails._emm_add_exception_details_validator = EmmAddExceptionDetails_validator EventDetails._emm_change_policy_details_validator = EmmChangePolicyDetails_validator @@ -74984,6 +75205,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'device_approvals_remove_exception_details': EventDetails._device_approvals_remove_exception_details_validator, 'directory_restrictions_add_members_details': EventDetails._directory_restrictions_add_members_details_validator, 'directory_restrictions_remove_members_details': EventDetails._directory_restrictions_remove_members_details_validator, + 'dropbox_passwords_policy_changed_details': EventDetails._dropbox_passwords_policy_changed_details_validator, 'email_ingest_policy_changed_details': EventDetails._email_ingest_policy_changed_details_validator, 'emm_add_exception_details': EventDetails._emm_add_exception_details_validator, 'emm_change_policy_details': EventDetails._emm_change_policy_details_validator, @@ -75468,6 +75690,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._device_approvals_remove_exception_validator = DeviceApprovalsRemoveExceptionType_validator EventType._directory_restrictions_add_members_validator = DirectoryRestrictionsAddMembersType_validator EventType._directory_restrictions_remove_members_validator = DirectoryRestrictionsRemoveMembersType_validator +EventType._dropbox_passwords_policy_changed_validator = DropboxPasswordsPolicyChangedType_validator EventType._email_ingest_policy_changed_validator = EmailIngestPolicyChangedType_validator EventType._emm_add_exception_validator = EmmAddExceptionType_validator EventType._emm_change_policy_validator = EmmChangePolicyType_validator @@ -75948,6 +76171,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'device_approvals_remove_exception': EventType._device_approvals_remove_exception_validator, 'directory_restrictions_add_members': EventType._directory_restrictions_add_members_validator, 'directory_restrictions_remove_members': EventType._directory_restrictions_remove_members_validator, + 'dropbox_passwords_policy_changed': EventType._dropbox_passwords_policy_changed_validator, 'email_ingest_policy_changed': EventType._email_ingest_policy_changed_validator, 'emm_add_exception': EventType._emm_add_exception_validator, 'emm_change_policy': EventType._emm_change_policy_validator, @@ -76431,6 +76655,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._device_approvals_remove_exception_validator = bv.Void() EventTypeArg._directory_restrictions_add_members_validator = bv.Void() EventTypeArg._directory_restrictions_remove_members_validator = bv.Void() +EventTypeArg._dropbox_passwords_policy_changed_validator = bv.Void() EventTypeArg._email_ingest_policy_changed_validator = bv.Void() EventTypeArg._emm_add_exception_validator = bv.Void() EventTypeArg._emm_change_policy_validator = bv.Void() @@ -76911,6 +77136,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'device_approvals_remove_exception': EventTypeArg._device_approvals_remove_exception_validator, 'directory_restrictions_add_members': EventTypeArg._directory_restrictions_add_members_validator, 'directory_restrictions_remove_members': EventTypeArg._directory_restrictions_remove_members_validator, + 'dropbox_passwords_policy_changed': EventTypeArg._dropbox_passwords_policy_changed_validator, 'email_ingest_policy_changed': EventTypeArg._email_ingest_policy_changed_validator, 'emm_add_exception': EventTypeArg._emm_add_exception_validator, 'emm_change_policy': EventTypeArg._emm_change_policy_validator, @@ -77392,6 +77618,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.device_approvals_remove_exception = EventTypeArg('device_approvals_remove_exception') EventTypeArg.directory_restrictions_add_members = EventTypeArg('directory_restrictions_add_members') EventTypeArg.directory_restrictions_remove_members = EventTypeArg('directory_restrictions_remove_members') +EventTypeArg.dropbox_passwords_policy_changed = EventTypeArg('dropbox_passwords_policy_changed') EventTypeArg.email_ingest_policy_changed = EventTypeArg('email_ingest_policy_changed') EventTypeArg.emm_add_exception = EventTypeArg('emm_add_exception') EventTypeArg.emm_change_policy = EventTypeArg('emm_change_policy') diff --git a/spec b/spec index 9daf01c5..eec4b436 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 9daf01c5b7ac6936956f085792c573c06fb3c905 +Subproject commit eec4b43685b7af842d320efaaa86db27232cb465 From c371d43ac9da4eff5a8757af86a27fdda8f8d4f0 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 20 Apr 2022 18:39:23 -0400 Subject: [PATCH 70/90] Automated Spec Update (#424) ef6b1680d9a05ec7475f503149d771e44db913a2 Change Notes: files Namespace - Add upload_session/start_batch routes - Add UploadSessionStartBatchArg, UploadSessionStartBatchResult structs team_log_generated Namespace - Add ExternalDriveBackupEligibilityStatusCheckedDetails, ExternalDriveBackupStatusChangedDetails, ExternalDriveBackupEligibilityStatusCheckedType, ExternalDriveBackupStatusChangedType structs - Add ExternalDriveBackupEligibilityStatus, ExternalDriveBackupStatus unions Co-authored-by: DropboxBot Co-authored-by: Brent Bumann --- dropbox/base.py | 26 +++ dropbox/files.py | 92 ++++++++ dropbox/team_log.py | 516 ++++++++++++++++++++++++++++++++++++++++++++ spec | 2 +- 4 files changed, 635 insertions(+), 1 deletion(-) diff --git a/dropbox/base.py b/dropbox/base.py index af5e3a3f..34290fc9 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -3526,6 +3526,32 @@ def files_upload_session_start(self, ) return r + def files_upload_session_start_batch(self, + num_sessions, + session_type=None): + """ + This route starts batch of upload_sessions. Please refer to + `upload_session/start` usage. + + Route attributes: + scope: files.content.write + + :param Nullable[:class:`dropbox.files.UploadSessionType`] session_type: + Type of upload session you want to start. If not specified, default + is ``UploadSessionType.sequential``. + :param int num_sessions: The number of upload sessions to start. + :rtype: :class:`dropbox.files.UploadSessionStartBatchResult` + """ + arg = files.UploadSessionStartBatchArg(num_sessions, + session_type) + r = self.request( + files.upload_session_start_batch, + 'files', + arg, + None, + ) + return r + # ------------------------------------------ # Routes in paper namespace diff --git a/dropbox/files.py b/dropbox/files.py index 948fa0bb..f0aa1098 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -10204,6 +10204,71 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UploadSessionStartArg_validator = bv.Struct(UploadSessionStartArg) +class UploadSessionStartBatchArg(bb.Struct): + """ + :ivar files.UploadSessionStartBatchArg.session_type: Type of upload session + you want to start. If not specified, default is + ``UploadSessionType.sequential``. + :ivar files.UploadSessionStartBatchArg.num_sessions: The number of upload + sessions to start. + """ + + __slots__ = [ + '_session_type_value', + '_num_sessions_value', + ] + + _has_required_fields = True + + def __init__(self, + num_sessions=None, + session_type=None): + self._session_type_value = bb.NOT_SET + self._num_sessions_value = bb.NOT_SET + if session_type is not None: + self.session_type = session_type + if num_sessions is not None: + self.num_sessions = num_sessions + + # Instance attribute type: UploadSessionType (validator is set below) + session_type = bb.Attribute("session_type", nullable=True, user_defined=True) + + # Instance attribute type: int (validator is set below) + num_sessions = bb.Attribute("num_sessions") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(UploadSessionStartBatchArg, self)._process_custom_annotations(annotation_type, field_path, processor) + +UploadSessionStartBatchArg_validator = bv.Struct(UploadSessionStartBatchArg) + +class UploadSessionStartBatchResult(bb.Struct): + """ + :ivar files.UploadSessionStartBatchResult.session_ids: A List of unique + identifiers for the upload session. Pass each session_id to + :meth:`dropbox.dropbox_client.Dropbox.files_upload_session_append` and + :meth:`dropbox.dropbox_client.Dropbox.files_upload_session_finish`. + """ + + __slots__ = [ + '_session_ids_value', + ] + + _has_required_fields = True + + def __init__(self, + session_ids=None): + self._session_ids_value = bb.NOT_SET + if session_ids is not None: + self.session_ids = session_ids + + # Instance attribute type: list of [str] (validator is set below) + session_ids = bb.Attribute("session_ids") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(UploadSessionStartBatchResult, self)._process_custom_annotations(annotation_type, field_path, processor) + +UploadSessionStartBatchResult_validator = bv.Struct(UploadSessionStartBatchResult) + class UploadSessionStartError(bb.Union): """ This class acts as a tagged union. Only one of the ``is_*`` methods will @@ -13015,6 +13080,21 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('content_hash', UploadSessionStartArg.content_hash.validator), ] +UploadSessionStartBatchArg.session_type.validator = bv.Nullable(UploadSessionType_validator) +UploadSessionStartBatchArg.num_sessions.validator = bv.UInt64(min_value=1, max_value=1000) +UploadSessionStartBatchArg._all_field_names_ = set([ + 'session_type', + 'num_sessions', +]) +UploadSessionStartBatchArg._all_fields_ = [ + ('session_type', UploadSessionStartBatchArg.session_type.validator), + ('num_sessions', UploadSessionStartBatchArg.num_sessions.validator), +] + +UploadSessionStartBatchResult.session_ids.validator = bv.List(bv.String()) +UploadSessionStartBatchResult._all_field_names_ = set(['session_ids']) +UploadSessionStartBatchResult._all_fields_ = [('session_ids', UploadSessionStartBatchResult.session_ids.validator)] + UploadSessionStartError._concurrent_session_data_not_allowed_validator = bv.Void() UploadSessionStartError._concurrent_session_close_not_allowed_validator = bv.Void() UploadSessionStartError._payload_too_large_validator = bv.Void() @@ -13922,6 +14002,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'host': 'content', 'style': 'upload'}, ) +upload_session_start_batch = bb.Route( + 'upload_session/start_batch', + 1, + False, + UploadSessionStartBatchArg_validator, + UploadSessionStartBatchResult_validator, + bv.Void(), + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, +) ROUTES = { 'alpha/get_metadata': alpha_get_metadata, @@ -13992,5 +14083,6 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'upload_session/finish_batch:2': upload_session_finish_batch_v2, 'upload_session/finish_batch/check': upload_session_finish_batch_check, 'upload_session/start': upload_session_start, + 'upload_session/start_batch': upload_session_start_batch, } diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 4fe46ec1..ebbc7381 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -8867,6 +8867,29 @@ def emm_refresh_auth_token_details(cls, val): """ return cls('emm_refresh_auth_token_details', val) + @classmethod + def external_drive_backup_eligibility_status_checked_details(cls, val): + """ + Create an instance of this class set to the + ``external_drive_backup_eligibility_status_checked_details`` tag with + value ``val``. + + :param ExternalDriveBackupEligibilityStatusCheckedDetails val: + :rtype: EventDetails + """ + return cls('external_drive_backup_eligibility_status_checked_details', val) + + @classmethod + def external_drive_backup_status_changed_details(cls, val): + """ + Create an instance of this class set to the + ``external_drive_backup_status_changed_details`` tag with value ``val``. + + :param ExternalDriveBackupStatusChangedDetails val: + :rtype: EventDetails + """ + return cls('external_drive_backup_status_changed_details', val) + @classmethod def account_capture_change_availability_details(cls, val): """ @@ -14041,6 +14064,22 @@ def is_emm_refresh_auth_token_details(self): """ return self._tag == 'emm_refresh_auth_token_details' + def is_external_drive_backup_eligibility_status_checked_details(self): + """ + Check if the union tag is ``external_drive_backup_eligibility_status_checked_details``. + + :rtype: bool + """ + return self._tag == 'external_drive_backup_eligibility_status_checked_details' + + def is_external_drive_backup_status_changed_details(self): + """ + Check if the union tag is ``external_drive_backup_status_changed_details``. + + :rtype: bool + """ + return self._tag == 'external_drive_backup_status_changed_details' + def is_account_capture_change_availability_details(self): """ Check if the union tag is ``account_capture_change_availability_details``. @@ -17999,6 +18038,26 @@ def get_emm_refresh_auth_token_details(self): raise AttributeError("tag 'emm_refresh_auth_token_details' not set") return self._value + def get_external_drive_backup_eligibility_status_checked_details(self): + """ + Only call this if :meth:`is_external_drive_backup_eligibility_status_checked_details` is true. + + :rtype: ExternalDriveBackupEligibilityStatusCheckedDetails + """ + if not self.is_external_drive_backup_eligibility_status_checked_details(): + raise AttributeError("tag 'external_drive_backup_eligibility_status_checked_details' not set") + return self._value + + def get_external_drive_backup_status_changed_details(self): + """ + Only call this if :meth:`is_external_drive_backup_status_changed_details` is true. + + :rtype: ExternalDriveBackupStatusChangedDetails + """ + if not self.is_external_drive_backup_status_changed_details(): + raise AttributeError("tag 'external_drive_backup_status_changed_details' not set") + return self._value + def get_account_capture_change_availability_details(self): """ Only call this if :meth:`is_account_capture_change_availability_details` is true. @@ -22392,6 +22451,12 @@ class EventType(bb.Union): Dropbox Passwords device :ivar EmmRefreshAuthTokenType EventType.emm_refresh_auth_token: (devices) Refreshed auth token used for setting up EMM + :ivar ExternalDriveBackupEligibilityStatusCheckedType + EventType.external_drive_backup_eligibility_status_checked: (devices) + Checked external drive backup eligibility status + :ivar ExternalDriveBackupStatusChangedType + EventType.external_drive_backup_status_changed: (devices) Modified + external drive backup :ivar AccountCaptureChangeAvailabilityType EventType.account_capture_change_availability: (domains) Granted/revoked option to enable account capture on team domains @@ -24041,6 +24106,29 @@ def emm_refresh_auth_token(cls, val): """ return cls('emm_refresh_auth_token', val) + @classmethod + def external_drive_backup_eligibility_status_checked(cls, val): + """ + Create an instance of this class set to the + ``external_drive_backup_eligibility_status_checked`` tag with value + ``val``. + + :param ExternalDriveBackupEligibilityStatusCheckedType val: + :rtype: EventType + """ + return cls('external_drive_backup_eligibility_status_checked', val) + + @classmethod + def external_drive_backup_status_changed(cls, val): + """ + Create an instance of this class set to the + ``external_drive_backup_status_changed`` tag with value ``val``. + + :param ExternalDriveBackupStatusChangedType val: + :rtype: EventType + """ + return cls('external_drive_backup_status_changed', val) + @classmethod def account_capture_change_availability(cls, val): """ @@ -29164,6 +29252,22 @@ def is_emm_refresh_auth_token(self): """ return self._tag == 'emm_refresh_auth_token' + def is_external_drive_backup_eligibility_status_checked(self): + """ + Check if the union tag is ``external_drive_backup_eligibility_status_checked``. + + :rtype: bool + """ + return self._tag == 'external_drive_backup_eligibility_status_checked' + + def is_external_drive_backup_status_changed(self): + """ + Check if the union tag is ``external_drive_backup_status_changed``. + + :rtype: bool + """ + return self._tag == 'external_drive_backup_status_changed' + def is_account_capture_change_availability(self): """ Check if the union tag is ``account_capture_change_availability``. @@ -33225,6 +33329,30 @@ def get_emm_refresh_auth_token(self): raise AttributeError("tag 'emm_refresh_auth_token' not set") return self._value + def get_external_drive_backup_eligibility_status_checked(self): + """ + (devices) Checked external drive backup eligibility status + + Only call this if :meth:`is_external_drive_backup_eligibility_status_checked` is true. + + :rtype: ExternalDriveBackupEligibilityStatusCheckedType + """ + if not self.is_external_drive_backup_eligibility_status_checked(): + raise AttributeError("tag 'external_drive_backup_eligibility_status_checked' not set") + return self._value + + def get_external_drive_backup_status_changed(self): + """ + (devices) Modified external drive backup + + Only call this if :meth:`is_external_drive_backup_status_changed` is true. + + :rtype: ExternalDriveBackupStatusChangedType + """ + if not self.is_external_drive_backup_status_changed(): + raise AttributeError("tag 'external_drive_backup_status_changed' not set") + return self._value + def get_account_capture_change_availability(self): """ (domains) Granted/revoked option to enable account capture on team @@ -38512,6 +38640,11 @@ class EventTypeArg(bb.Union): Enrolled new Dropbox Passwords device :ivar team_log.EventTypeArg.emm_refresh_auth_token: (devices) Refreshed auth token used for setting up EMM + :ivar + team_log.EventTypeArg.external_drive_backup_eligibility_status_checked: + (devices) Checked external drive backup eligibility status + :ivar team_log.EventTypeArg.external_drive_backup_status_changed: (devices) + Modified external drive backup :ivar team_log.EventTypeArg.account_capture_change_availability: (domains) Granted/revoked option to enable account capture on team domains :ivar team_log.EventTypeArg.account_capture_migrate_account: (domains) @@ -39514,6 +39647,10 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition emm_refresh_auth_token = None # Attribute is overwritten below the class definition + external_drive_backup_eligibility_status_checked = None + # Attribute is overwritten below the class definition + external_drive_backup_status_changed = 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 @@ -40804,6 +40941,22 @@ def is_emm_refresh_auth_token(self): """ return self._tag == 'emm_refresh_auth_token' + def is_external_drive_backup_eligibility_status_checked(self): + """ + Check if the union tag is ``external_drive_backup_eligibility_status_checked``. + + :rtype: bool + """ + return self._tag == 'external_drive_backup_eligibility_status_checked' + + def is_external_drive_backup_status_changed(self): + """ + Check if the union tag is ``external_drive_backup_status_changed``. + + :rtype: bool + """ + return self._tag == 'external_drive_backup_status_changed' + def is_account_capture_change_availability(self): """ Check if the union tag is ``account_capture_change_availability``. @@ -44424,6 +44577,124 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ExtendedVersionHistoryPolicy_validator = bv.Union(ExtendedVersionHistoryPolicy) +class ExternalDriveBackupEligibilityStatus(bb.Union): + """ + External Drive Backup eligibility status + + This class acts as a tagged union. Only 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 + exceed_license_cap = None + # Attribute is overwritten below the class definition + success = None + # Attribute is overwritten below the class definition + other = None + + def is_exceed_license_cap(self): + """ + Check if the union tag is ``exceed_license_cap``. + + :rtype: bool + """ + return self._tag == 'exceed_license_cap' + + def is_success(self): + """ + Check if the union tag is ``success``. + + :rtype: bool + """ + return self._tag == 'success' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ExternalDriveBackupEligibilityStatus, self)._process_custom_annotations(annotation_type, field_path, processor) + +ExternalDriveBackupEligibilityStatus_validator = bv.Union(ExternalDriveBackupEligibilityStatus) + +class ExternalDriveBackupEligibilityStatusCheckedDetails(bb.Struct): + """ + Checked external drive backup eligibility status. + + :ivar + team_log.ExternalDriveBackupEligibilityStatusCheckedDetails.desktop_device_session_info: + Device's session logged information. + :ivar team_log.ExternalDriveBackupEligibilityStatusCheckedDetails.status: + Current eligibility status of external drive backup. + :ivar + team_log.ExternalDriveBackupEligibilityStatusCheckedDetails.number_of_external_drive_backup: + Total number of valid external drive backup for all the team members. + """ + + __slots__ = [ + '_desktop_device_session_info_value', + '_status_value', + '_number_of_external_drive_backup_value', + ] + + _has_required_fields = True + + def __init__(self, + desktop_device_session_info=None, + status=None, + number_of_external_drive_backup=None): + self._desktop_device_session_info_value = bb.NOT_SET + self._status_value = bb.NOT_SET + self._number_of_external_drive_backup_value = bb.NOT_SET + if desktop_device_session_info is not None: + self.desktop_device_session_info = desktop_device_session_info + if status is not None: + self.status = status + if number_of_external_drive_backup is not None: + self.number_of_external_drive_backup = number_of_external_drive_backup + + # Instance attribute type: DesktopDeviceSessionLogInfo (validator is set below) + desktop_device_session_info = bb.Attribute("desktop_device_session_info", user_defined=True) + + # Instance attribute type: ExternalDriveBackupEligibilityStatus (validator is set below) + status = bb.Attribute("status", user_defined=True) + + # Instance attribute type: int (validator is set below) + number_of_external_drive_backup = bb.Attribute("number_of_external_drive_backup") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ExternalDriveBackupEligibilityStatusCheckedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +ExternalDriveBackupEligibilityStatusCheckedDetails_validator = bv.Struct(ExternalDriveBackupEligibilityStatusCheckedDetails) + +class ExternalDriveBackupEligibilityStatusCheckedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ExternalDriveBackupEligibilityStatusCheckedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +ExternalDriveBackupEligibilityStatusCheckedType_validator = bv.Struct(ExternalDriveBackupEligibilityStatusCheckedType) + class ExternalDriveBackupPolicy(bb.Union): """ Policy for controlling team access to external drive backup feature @@ -44540,6 +44811,163 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ExternalDriveBackupPolicyChangedType_validator = bv.Struct(ExternalDriveBackupPolicyChangedType) +class ExternalDriveBackupStatus(bb.Union): + """ + External Drive Backup status + + This class acts as a tagged union. Only 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 + broken = None + # Attribute is overwritten below the class definition + created = None + # Attribute is overwritten below the class definition + created_or_broken = None + # Attribute is overwritten below the class definition + deleted = None + # Attribute is overwritten below the class definition + empty = None + # Attribute is overwritten below the class definition + unknown = None + # Attribute is overwritten below the class definition + other = None + + def is_broken(self): + """ + Check if the union tag is ``broken``. + + :rtype: bool + """ + return self._tag == 'broken' + + def is_created(self): + """ + Check if the union tag is ``created``. + + :rtype: bool + """ + return self._tag == 'created' + + def is_created_or_broken(self): + """ + Check if the union tag is ``created_or_broken``. + + :rtype: bool + """ + return self._tag == 'created_or_broken' + + def is_deleted(self): + """ + Check if the union tag is ``deleted``. + + :rtype: bool + """ + return self._tag == 'deleted' + + def is_empty(self): + """ + Check if the union tag is ``empty``. + + :rtype: bool + """ + return self._tag == 'empty' + + def is_unknown(self): + """ + Check if the union tag is ``unknown``. + + :rtype: bool + """ + return self._tag == 'unknown' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ExternalDriveBackupStatus, self)._process_custom_annotations(annotation_type, field_path, processor) + +ExternalDriveBackupStatus_validator = bv.Union(ExternalDriveBackupStatus) + +class ExternalDriveBackupStatusChangedDetails(bb.Struct): + """ + Modified external drive backup. + + :ivar + team_log.ExternalDriveBackupStatusChangedDetails.desktop_device_session_info: + Device's session logged information. + :ivar team_log.ExternalDriveBackupStatusChangedDetails.previous_value: + Previous status of this external drive backup. + :ivar team_log.ExternalDriveBackupStatusChangedDetails.new_value: Next + status of this external drive backup. + """ + + __slots__ = [ + '_desktop_device_session_info_value', + '_previous_value_value', + '_new_value_value', + ] + + _has_required_fields = True + + def __init__(self, + desktop_device_session_info=None, + previous_value=None, + new_value=None): + self._desktop_device_session_info_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + self._new_value_value = bb.NOT_SET + if desktop_device_session_info is not None: + self.desktop_device_session_info = desktop_device_session_info + if previous_value is not None: + self.previous_value = previous_value + if new_value is not None: + self.new_value = new_value + + # Instance attribute type: DesktopDeviceSessionLogInfo (validator is set below) + desktop_device_session_info = bb.Attribute("desktop_device_session_info", user_defined=True) + + # Instance attribute type: ExternalDriveBackupStatus (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) + + # Instance attribute type: ExternalDriveBackupStatus (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ExternalDriveBackupStatusChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +ExternalDriveBackupStatusChangedDetails_validator = bv.Struct(ExternalDriveBackupStatusChangedDetails) + +class ExternalDriveBackupStatusChangedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ExternalDriveBackupStatusChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +ExternalDriveBackupStatusChangedType_validator = bv.Struct(ExternalDriveBackupStatusChangedType) + class ExternalSharingCreateReportDetails(bb.Struct): """ Created External sharing report. @@ -74409,6 +74837,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._dropbox_passwords_exported_details_validator = DropboxPasswordsExportedDetails_validator EventDetails._dropbox_passwords_new_device_enrolled_details_validator = DropboxPasswordsNewDeviceEnrolledDetails_validator EventDetails._emm_refresh_auth_token_details_validator = EmmRefreshAuthTokenDetails_validator +EventDetails._external_drive_backup_eligibility_status_checked_details_validator = ExternalDriveBackupEligibilityStatusCheckedDetails_validator +EventDetails._external_drive_backup_status_changed_details_validator = ExternalDriveBackupStatusChangedDetails_validator EventDetails._account_capture_change_availability_details_validator = AccountCaptureChangeAvailabilityDetails_validator EventDetails._account_capture_migrate_account_details_validator = AccountCaptureMigrateAccountDetails_validator EventDetails._account_capture_notification_emails_sent_details_validator = AccountCaptureNotificationEmailsSentDetails_validator @@ -74891,6 +75321,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'dropbox_passwords_exported_details': EventDetails._dropbox_passwords_exported_details_validator, 'dropbox_passwords_new_device_enrolled_details': EventDetails._dropbox_passwords_new_device_enrolled_details_validator, 'emm_refresh_auth_token_details': EventDetails._emm_refresh_auth_token_details_validator, + 'external_drive_backup_eligibility_status_checked_details': EventDetails._external_drive_backup_eligibility_status_checked_details_validator, + 'external_drive_backup_status_changed_details': EventDetails._external_drive_backup_status_changed_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_notification_emails_sent_details': EventDetails._account_capture_notification_emails_sent_details_validator, @@ -75376,6 +75808,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._dropbox_passwords_exported_validator = DropboxPasswordsExportedType_validator EventType._dropbox_passwords_new_device_enrolled_validator = DropboxPasswordsNewDeviceEnrolledType_validator EventType._emm_refresh_auth_token_validator = EmmRefreshAuthTokenType_validator +EventType._external_drive_backup_eligibility_status_checked_validator = ExternalDriveBackupEligibilityStatusCheckedType_validator +EventType._external_drive_backup_status_changed_validator = ExternalDriveBackupStatusChangedType_validator EventType._account_capture_change_availability_validator = AccountCaptureChangeAvailabilityType_validator EventType._account_capture_migrate_account_validator = AccountCaptureMigrateAccountType_validator EventType._account_capture_notification_emails_sent_validator = AccountCaptureNotificationEmailsSentType_validator @@ -75857,6 +76291,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'dropbox_passwords_exported': EventType._dropbox_passwords_exported_validator, 'dropbox_passwords_new_device_enrolled': EventType._dropbox_passwords_new_device_enrolled_validator, 'emm_refresh_auth_token': EventType._emm_refresh_auth_token_validator, + 'external_drive_backup_eligibility_status_checked': EventType._external_drive_backup_eligibility_status_checked_validator, + 'external_drive_backup_status_changed': EventType._external_drive_backup_status_changed_validator, 'account_capture_change_availability': EventType._account_capture_change_availability_validator, 'account_capture_migrate_account': EventType._account_capture_migrate_account_validator, 'account_capture_notification_emails_sent': EventType._account_capture_notification_emails_sent_validator, @@ -76341,6 +76777,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._dropbox_passwords_exported_validator = bv.Void() EventTypeArg._dropbox_passwords_new_device_enrolled_validator = bv.Void() EventTypeArg._emm_refresh_auth_token_validator = bv.Void() +EventTypeArg._external_drive_backup_eligibility_status_checked_validator = bv.Void() +EventTypeArg._external_drive_backup_status_changed_validator = bv.Void() EventTypeArg._account_capture_change_availability_validator = bv.Void() EventTypeArg._account_capture_migrate_account_validator = bv.Void() EventTypeArg._account_capture_notification_emails_sent_validator = bv.Void() @@ -76822,6 +77260,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'dropbox_passwords_exported': EventTypeArg._dropbox_passwords_exported_validator, 'dropbox_passwords_new_device_enrolled': EventTypeArg._dropbox_passwords_new_device_enrolled_validator, 'emm_refresh_auth_token': EventTypeArg._emm_refresh_auth_token_validator, + 'external_drive_backup_eligibility_status_checked': EventTypeArg._external_drive_backup_eligibility_status_checked_validator, + 'external_drive_backup_status_changed': EventTypeArg._external_drive_backup_status_changed_validator, 'account_capture_change_availability': EventTypeArg._account_capture_change_availability_validator, 'account_capture_migrate_account': EventTypeArg._account_capture_migrate_account_validator, 'account_capture_notification_emails_sent': EventTypeArg._account_capture_notification_emails_sent_validator, @@ -77304,6 +77744,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.dropbox_passwords_exported = EventTypeArg('dropbox_passwords_exported') EventTypeArg.dropbox_passwords_new_device_enrolled = EventTypeArg('dropbox_passwords_new_device_enrolled') EventTypeArg.emm_refresh_auth_token = EventTypeArg('emm_refresh_auth_token') +EventTypeArg.external_drive_backup_eligibility_status_checked = EventTypeArg('external_drive_backup_eligibility_status_checked') +EventTypeArg.external_drive_backup_status_changed = EventTypeArg('external_drive_backup_status_changed') EventTypeArg.account_capture_change_availability = EventTypeArg('account_capture_change_availability') EventTypeArg.account_capture_migrate_account = EventTypeArg('account_capture_migrate_account') EventTypeArg.account_capture_notification_emails_sent = EventTypeArg('account_capture_notification_emails_sent') @@ -77779,6 +78221,37 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ExtendedVersionHistoryPolicy.implicitly_unlimited = ExtendedVersionHistoryPolicy('implicitly_unlimited') ExtendedVersionHistoryPolicy.other = ExtendedVersionHistoryPolicy('other') +ExternalDriveBackupEligibilityStatus._exceed_license_cap_validator = bv.Void() +ExternalDriveBackupEligibilityStatus._success_validator = bv.Void() +ExternalDriveBackupEligibilityStatus._other_validator = bv.Void() +ExternalDriveBackupEligibilityStatus._tagmap = { + 'exceed_license_cap': ExternalDriveBackupEligibilityStatus._exceed_license_cap_validator, + 'success': ExternalDriveBackupEligibilityStatus._success_validator, + 'other': ExternalDriveBackupEligibilityStatus._other_validator, +} + +ExternalDriveBackupEligibilityStatus.exceed_license_cap = ExternalDriveBackupEligibilityStatus('exceed_license_cap') +ExternalDriveBackupEligibilityStatus.success = ExternalDriveBackupEligibilityStatus('success') +ExternalDriveBackupEligibilityStatus.other = ExternalDriveBackupEligibilityStatus('other') + +ExternalDriveBackupEligibilityStatusCheckedDetails.desktop_device_session_info.validator = DesktopDeviceSessionLogInfo_validator +ExternalDriveBackupEligibilityStatusCheckedDetails.status.validator = ExternalDriveBackupEligibilityStatus_validator +ExternalDriveBackupEligibilityStatusCheckedDetails.number_of_external_drive_backup.validator = bv.UInt64() +ExternalDriveBackupEligibilityStatusCheckedDetails._all_field_names_ = set([ + 'desktop_device_session_info', + 'status', + 'number_of_external_drive_backup', +]) +ExternalDriveBackupEligibilityStatusCheckedDetails._all_fields_ = [ + ('desktop_device_session_info', ExternalDriveBackupEligibilityStatusCheckedDetails.desktop_device_session_info.validator), + ('status', ExternalDriveBackupEligibilityStatusCheckedDetails.status.validator), + ('number_of_external_drive_backup', ExternalDriveBackupEligibilityStatusCheckedDetails.number_of_external_drive_backup.validator), +] + +ExternalDriveBackupEligibilityStatusCheckedType.description.validator = bv.String() +ExternalDriveBackupEligibilityStatusCheckedType._all_field_names_ = set(['description']) +ExternalDriveBackupEligibilityStatusCheckedType._all_fields_ = [('description', ExternalDriveBackupEligibilityStatusCheckedType.description.validator)] + ExternalDriveBackupPolicy._default_validator = bv.Void() ExternalDriveBackupPolicy._disabled_validator = bv.Void() ExternalDriveBackupPolicy._enabled_validator = bv.Void() @@ -77810,6 +78283,49 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ExternalDriveBackupPolicyChangedType._all_field_names_ = set(['description']) ExternalDriveBackupPolicyChangedType._all_fields_ = [('description', ExternalDriveBackupPolicyChangedType.description.validator)] +ExternalDriveBackupStatus._broken_validator = bv.Void() +ExternalDriveBackupStatus._created_validator = bv.Void() +ExternalDriveBackupStatus._created_or_broken_validator = bv.Void() +ExternalDriveBackupStatus._deleted_validator = bv.Void() +ExternalDriveBackupStatus._empty_validator = bv.Void() +ExternalDriveBackupStatus._unknown_validator = bv.Void() +ExternalDriveBackupStatus._other_validator = bv.Void() +ExternalDriveBackupStatus._tagmap = { + 'broken': ExternalDriveBackupStatus._broken_validator, + 'created': ExternalDriveBackupStatus._created_validator, + 'created_or_broken': ExternalDriveBackupStatus._created_or_broken_validator, + 'deleted': ExternalDriveBackupStatus._deleted_validator, + 'empty': ExternalDriveBackupStatus._empty_validator, + 'unknown': ExternalDriveBackupStatus._unknown_validator, + 'other': ExternalDriveBackupStatus._other_validator, +} + +ExternalDriveBackupStatus.broken = ExternalDriveBackupStatus('broken') +ExternalDriveBackupStatus.created = ExternalDriveBackupStatus('created') +ExternalDriveBackupStatus.created_or_broken = ExternalDriveBackupStatus('created_or_broken') +ExternalDriveBackupStatus.deleted = ExternalDriveBackupStatus('deleted') +ExternalDriveBackupStatus.empty = ExternalDriveBackupStatus('empty') +ExternalDriveBackupStatus.unknown = ExternalDriveBackupStatus('unknown') +ExternalDriveBackupStatus.other = ExternalDriveBackupStatus('other') + +ExternalDriveBackupStatusChangedDetails.desktop_device_session_info.validator = DesktopDeviceSessionLogInfo_validator +ExternalDriveBackupStatusChangedDetails.previous_value.validator = ExternalDriveBackupStatus_validator +ExternalDriveBackupStatusChangedDetails.new_value.validator = ExternalDriveBackupStatus_validator +ExternalDriveBackupStatusChangedDetails._all_field_names_ = set([ + 'desktop_device_session_info', + 'previous_value', + 'new_value', +]) +ExternalDriveBackupStatusChangedDetails._all_fields_ = [ + ('desktop_device_session_info', ExternalDriveBackupStatusChangedDetails.desktop_device_session_info.validator), + ('previous_value', ExternalDriveBackupStatusChangedDetails.previous_value.validator), + ('new_value', ExternalDriveBackupStatusChangedDetails.new_value.validator), +] + +ExternalDriveBackupStatusChangedType.description.validator = bv.String() +ExternalDriveBackupStatusChangedType._all_field_names_ = set(['description']) +ExternalDriveBackupStatusChangedType._all_fields_ = [('description', ExternalDriveBackupStatusChangedType.description.validator)] + ExternalSharingCreateReportDetails._all_field_names_ = set([]) ExternalSharingCreateReportDetails._all_fields_ = [] diff --git a/spec b/spec index eec4b436..ef6b1680 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit eec4b43685b7af842d320efaaa86db27232cb465 +Subproject commit ef6b1680d9a05ec7475f503149d771e44db913a2 From 005a750c0fefc4781cea0850f311b0fca9019da8 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 18 May 2022 17:47:06 -0400 Subject: [PATCH 71/90] Automated Spec Update (#430) 69f7bb2ea7702db5564f12549efb23956c5d6329 Change Notes: files Namespace - Update examples shared_links Namespace - Update get_shared_link_metadata route to include app and user auth team_folders Namespace - Update team_folder/create, team_folder/rename, team_folder/list, team_folder/list/continue, team_folder/get_info, team_folder/activate, team_folder/archive, team_folder/archive/check, team_folder/permanently_delete, team_folder/update_sync_settings routes to include updated scopes team_legal_holds Namespace - Update legal_holds/create_policy, legal_holds/get_policy, legal_holds/list_policies, legal_holds/list_held_revisions, legal_holds/list_held_revisions_continue, legal_holds/update_policy, legal_holds/release_policy routes to include updated scopes team_log_generated Namespace - Update AdminAlertingAlertConfiguration to include text and excluded_file_extensions - Update PlacementRestriction to include us_s3_only - Update examples Co-authored-by: DropboxBot Co-authored-by: Brent Bumann --- dropbox/base.py | 6 ++++-- dropbox/base_team.py | 34 +++++++++++++++++----------------- dropbox/sharing.py | 2 +- dropbox/team_log.py | 40 +++++++++++++++++++++++++++++++++++++++- spec | 2 +- 5 files changed, 62 insertions(+), 22 deletions(-) diff --git a/dropbox/base.py b/dropbox/base.py index 34290fc9..df8037d9 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -1465,7 +1465,8 @@ def files_download_zip(self, must be less than 20 GB in size and any single file within must be less than 4 GB in size. The resulting zip must have fewer than 10,000 total file and folder entries, including the top level folder. The input - cannot be a single file. + cannot be a single file. Note: this endpoint does not support HTTP range + requests. Route attributes: scope: files.content.read @@ -1501,7 +1502,8 @@ def files_download_zip_to_file(self, must be less than 20 GB in size and any single file within must be less than 4 GB in size. The resulting zip must have fewer than 10,000 total file and folder entries, including the top level folder. The input - cannot be a single file. + cannot be a single file. Note: this endpoint does not support HTTP range + requests. Route attributes: scope: files.content.read diff --git a/dropbox/base_team.py b/dropbox/base_team.py index ab308888..4986e47f 100644 --- a/dropbox/base_team.py +++ b/dropbox/base_team.py @@ -810,7 +810,7 @@ def team_legal_holds_create_policy(self, all teams have the feature. Permission : Team member file access. Route attributes: - scope: team_data.member + scope: team_data.governance.write :param str name: Policy name. :param Nullable[str] description: A description of the legal hold @@ -845,7 +845,7 @@ def team_legal_holds_get_policy(self, teams have the feature. Permission : Team member file access. Route attributes: - scope: team_data.member + scope: team_data.governance.write :param str id: The legal hold Id. :rtype: :class:`dropbox.team.LegalHoldPolicy` @@ -871,7 +871,7 @@ def team_legal_holds_list_held_revisions(self, file access. Route attributes: - scope: team_data.member + scope: team_data.governance.write :param str id: The legal hold Id. :rtype: :class:`dropbox.team.LegalHoldsListHeldRevisionResult` @@ -898,7 +898,7 @@ def team_legal_holds_list_held_revisions_continue(self, Team member file access. Route attributes: - scope: team_data.member + scope: team_data.governance.write :param str id: The legal hold Id. :param Nullable[str] cursor: The cursor idicates where to continue @@ -927,7 +927,7 @@ def team_legal_holds_list_policies(self, teams have the feature. Permission : Team member file access. Route attributes: - scope: team_data.member + scope: team_data.governance.write :param bool include_released: Whether to return holds that were released. @@ -953,7 +953,7 @@ def team_legal_holds_release_policy(self, teams have the feature. Permission : Team member file access. Route attributes: - scope: team_data.member + scope: team_data.governance.write :param str id: The legal hold Id. :rtype: None @@ -981,7 +981,7 @@ def team_legal_holds_update_policy(self, have the feature. Permission : Team member file access. Route attributes: - scope: team_data.member + scope: team_data.governance.write :param str id: The legal hold Id. :param Nullable[str] name: Policy new name. @@ -2565,7 +2565,7 @@ def team_team_folder_activate(self, member file access. Route attributes: - scope: team_data.team_space + scope: team_data.content.write :param str team_folder_id: The ID of the team folder. :rtype: :class:`dropbox.team.TeamFolderMetadata` @@ -2588,7 +2588,7 @@ def team_team_folder_archive(self, shared team space. Permission : Team member file access. Route attributes: - scope: team_data.team_space + scope: team_data.content.write :param bool force_async_off: Whether to force the archive to happen synchronously. @@ -2611,7 +2611,7 @@ def team_team_folder_archive_check(self, Permission : Team member file access. Route attributes: - scope: team_data.team_space + scope: team_data.content.write :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. @@ -2639,7 +2639,7 @@ def team_team_folder_create(self, Permission : Team member file access. Route attributes: - scope: team_data.team_space + scope: team_data.content.write :param str name: Name for the new team folder. :param Nullable[:class:`dropbox.team.SyncSettingArg`] sync_setting: The @@ -2668,7 +2668,7 @@ def team_team_folder_get_info(self, access. Route attributes: - scope: team_data.team_space + scope: team_data.content.read :param List[str] team_folder_ids: The list of team folder IDs. :rtype: List[:class:`dropbox.team.TeamFolderGetInfoItem`] @@ -2688,7 +2688,7 @@ def team_team_folder_list(self, Lists all team folders. Permission : Team member file access. Route attributes: - scope: team_data.team_space + scope: team_data.content.read :param int limit: The maximum number of results to return per request. :rtype: :class:`dropbox.team.TeamFolderListResult` @@ -2714,7 +2714,7 @@ def team_team_folder_list_continue(self, access. Route attributes: - scope: team_data.team_space + scope: team_data.content.read :param str cursor: Indicates from what point to get the next set of team folders. @@ -2741,7 +2741,7 @@ def team_team_folder_permanently_delete(self, file access. Route attributes: - scope: team_data.team_space + scope: team_data.content.write :param str team_folder_id: The ID of the team folder. :rtype: None @@ -2763,7 +2763,7 @@ def team_team_folder_rename(self, access. Route attributes: - scope: team_data.team_space + scope: team_data.content.write :param str name: New team folder name. :rtype: :class:`dropbox.team.TeamFolderMetadata` @@ -2791,7 +2791,7 @@ def team_team_folder_update_sync_settings(self, endpoint requires that the team has team selective sync enabled. Route attributes: - scope: team_data.team_space + scope: team_data.content.write :param Nullable[:class:`dropbox.team.SyncSettingArg`] sync_setting: Sync setting to apply to the team folder itself. Only meaningful if the diff --git a/dropbox/sharing.py b/dropbox/sharing.py index c0a1ed73..e992c242 100644 --- a/dropbox/sharing.py +++ b/dropbox/sharing.py @@ -13606,7 +13606,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetSharedLinkMetadataArg_validator, SharedLinkMetadata_validator, SharedLinkError_validator, - {'auth': 'user', + {'auth': 'app, user', 'host': 'api', 'style': 'rpc'}, ) diff --git a/dropbox/team_log.py b/dropbox/team_log.py index ebbc7381..63ec670e 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -1327,12 +1327,17 @@ class AdminAlertingAlertConfiguration(bb.Struct): Sensitivity level. :ivar team_log.AdminAlertingAlertConfiguration.recipients_settings: Recipient settings. + :ivar team_log.AdminAlertingAlertConfiguration.text: Text. + :ivar team_log.AdminAlertingAlertConfiguration.excluded_file_extensions: + Excluded file extensions. """ __slots__ = [ '_alert_state_value', '_sensitivity_level_value', '_recipients_settings_value', + '_text_value', + '_excluded_file_extensions_value', ] _has_required_fields = False @@ -1340,16 +1345,24 @@ class AdminAlertingAlertConfiguration(bb.Struct): def __init__(self, alert_state=None, sensitivity_level=None, - recipients_settings=None): + recipients_settings=None, + text=None, + excluded_file_extensions=None): self._alert_state_value = bb.NOT_SET self._sensitivity_level_value = bb.NOT_SET self._recipients_settings_value = bb.NOT_SET + self._text_value = bb.NOT_SET + self._excluded_file_extensions_value = bb.NOT_SET if alert_state is not None: self.alert_state = alert_state if sensitivity_level is not None: self.sensitivity_level = sensitivity_level if recipients_settings is not None: self.recipients_settings = recipients_settings + if text is not None: + self.text = text + if excluded_file_extensions is not None: + self.excluded_file_extensions = excluded_file_extensions # Instance attribute type: AdminAlertingAlertStatePolicy (validator is set below) alert_state = bb.Attribute("alert_state", nullable=True, user_defined=True) @@ -1360,6 +1373,12 @@ def __init__(self, # Instance attribute type: RecipientsConfiguration (validator is set below) recipients_settings = bb.Attribute("recipients_settings", nullable=True, user_defined=True) + # Instance attribute type: str (validator is set below) + text = bb.Attribute("text", nullable=True) + + # Instance attribute type: str (validator is set below) + excluded_file_extensions = bb.Attribute("excluded_file_extensions", nullable=True) + def _process_custom_annotations(self, annotation_type, field_path, processor): super(AdminAlertingAlertConfiguration, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -59209,6 +59228,8 @@ class PlacementRestriction(bb.Union): # Attribute is overwritten below the class definition uk_only = None # Attribute is overwritten below the class definition + us_s3_only = None + # Attribute is overwritten below the class definition other = None def is_australia_only(self): @@ -59251,6 +59272,14 @@ def is_uk_only(self): """ return self._tag == 'uk_only' + def is_us_s3_only(self): + """ + Check if the union tag is ``us_s3_only``. + + :rtype: bool + """ + return self._tag == 'us_s3_only' + def is_other(self): """ Check if the union tag is ``other``. @@ -73139,15 +73168,21 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminAlertingAlertConfiguration.alert_state.validator = bv.Nullable(AdminAlertingAlertStatePolicy_validator) AdminAlertingAlertConfiguration.sensitivity_level.validator = bv.Nullable(AdminAlertingAlertSensitivity_validator) AdminAlertingAlertConfiguration.recipients_settings.validator = bv.Nullable(RecipientsConfiguration_validator) +AdminAlertingAlertConfiguration.text.validator = bv.Nullable(bv.String()) +AdminAlertingAlertConfiguration.excluded_file_extensions.validator = bv.Nullable(bv.String()) AdminAlertingAlertConfiguration._all_field_names_ = set([ 'alert_state', 'sensitivity_level', 'recipients_settings', + 'text', + 'excluded_file_extensions', ]) AdminAlertingAlertConfiguration._all_fields_ = [ ('alert_state', AdminAlertingAlertConfiguration.alert_state.validator), ('sensitivity_level', AdminAlertingAlertConfiguration.sensitivity_level.validator), ('recipients_settings', AdminAlertingAlertConfiguration.recipients_settings.validator), + ('text', AdminAlertingAlertConfiguration.text.validator), + ('excluded_file_extensions', AdminAlertingAlertConfiguration.excluded_file_extensions.validator), ] AdminAlertingAlertSensitivity._high_validator = bv.Void() @@ -81549,6 +81584,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PlacementRestriction._japan_only_validator = bv.Void() PlacementRestriction._none_validator = bv.Void() PlacementRestriction._uk_only_validator = bv.Void() +PlacementRestriction._us_s3_only_validator = bv.Void() PlacementRestriction._other_validator = bv.Void() PlacementRestriction._tagmap = { 'australia_only': PlacementRestriction._australia_only_validator, @@ -81556,6 +81592,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'japan_only': PlacementRestriction._japan_only_validator, 'none': PlacementRestriction._none_validator, 'uk_only': PlacementRestriction._uk_only_validator, + 'us_s3_only': PlacementRestriction._us_s3_only_validator, 'other': PlacementRestriction._other_validator, } @@ -81564,6 +81601,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PlacementRestriction.japan_only = PlacementRestriction('japan_only') PlacementRestriction.none = PlacementRestriction('none') PlacementRestriction.uk_only = PlacementRestriction('uk_only') +PlacementRestriction.us_s3_only = PlacementRestriction('us_s3_only') PlacementRestriction.other = PlacementRestriction('other') PolicyType._disposition_validator = bv.Void() diff --git a/spec b/spec index ef6b1680..69f7bb2e 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit ef6b1680d9a05ec7475f503149d771e44db913a2 +Subproject commit 69f7bb2ea7702db5564f12549efb23956c5d6329 From 3fa08e53e45dc69de1bde8923e9ebc2ed009fa8e Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 15 Jun 2022 19:24:42 -0400 Subject: [PATCH 72/90] Automated Spec Update (#435) c26b11df5170dcc03a86046b162c284ed24f7487 Change Notes: files Namespace - Update upload_session/start_batch route to include account_id Co-authored-by: DropboxBot Co-authored-by: Brent Bumann --- dropbox/base.py | 6 +++++- dropbox/files.py | 15 ++++++++++++++- spec | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/dropbox/base.py b/dropbox/base.py index df8037d9..73b7307b 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -3533,7 +3533,11 @@ def files_upload_session_start_batch(self, session_type=None): """ This route starts batch of upload_sessions. Please refer to - `upload_session/start` usage. + `upload_session/start` usage. Calls to this endpoint will count as data + transport calls for any Dropbox Business teams with a limit on the + number of data transport calls allowed per month. For more information, + see the `Data transport limit page + `_. Route attributes: scope: files.content.write diff --git a/dropbox/files.py b/dropbox/files.py index f0aa1098..ecdcba46 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -7941,6 +7941,8 @@ class SearchOptions(bb.Struct): extensions specified. Only supported for active file search. :ivar files.SearchOptions.file_categories: Restricts search to only the file categories specified. Only supported for active file search. + :ivar files.SearchOptions.account_id: Restricts results to the given account + id. """ __slots__ = [ @@ -7951,6 +7953,7 @@ class SearchOptions(bb.Struct): '_filename_only_value', '_file_extensions_value', '_file_categories_value', + '_account_id_value', ] _has_required_fields = False @@ -7962,7 +7965,8 @@ def __init__(self, file_status=None, filename_only=None, file_extensions=None, - file_categories=None): + file_categories=None, + account_id=None): self._path_value = bb.NOT_SET self._max_results_value = bb.NOT_SET self._order_by_value = bb.NOT_SET @@ -7970,6 +7974,7 @@ def __init__(self, self._filename_only_value = bb.NOT_SET self._file_extensions_value = bb.NOT_SET self._file_categories_value = bb.NOT_SET + self._account_id_value = bb.NOT_SET if path is not None: self.path = path if max_results is not None: @@ -7984,6 +7989,8 @@ def __init__(self, self.file_extensions = file_extensions if file_categories is not None: self.file_categories = file_categories + if account_id is not None: + self.account_id = account_id # Instance attribute type: str (validator is set below) path = bb.Attribute("path", nullable=True) @@ -8006,6 +8013,9 @@ def __init__(self, # Instance attribute type: list of [FileCategory] (validator is set below) file_categories = bb.Attribute("file_categories", nullable=True) + # Instance attribute type: str (validator is set below) + account_id = bb.Attribute("account_id", nullable=True) + def _process_custom_annotations(self, annotation_type, field_path, processor): super(SearchOptions, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -12587,6 +12597,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SearchOptions.filename_only.validator = bv.Boolean() SearchOptions.file_extensions.validator = bv.Nullable(bv.List(bv.String())) SearchOptions.file_categories.validator = bv.Nullable(bv.List(FileCategory_validator)) +SearchOptions.account_id.validator = bv.Nullable(users_common.AccountId_validator) SearchOptions._all_field_names_ = set([ 'path', 'max_results', @@ -12595,6 +12606,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'filename_only', 'file_extensions', 'file_categories', + 'account_id', ]) SearchOptions._all_fields_ = [ ('path', SearchOptions.path.validator), @@ -12604,6 +12616,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('filename_only', SearchOptions.filename_only.validator), ('file_extensions', SearchOptions.file_extensions.validator), ('file_categories', SearchOptions.file_categories.validator), + ('account_id', SearchOptions.account_id.validator), ] SearchOrderBy._relevance_validator = bv.Void() diff --git a/spec b/spec index 69f7bb2e..c26b11df 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 69f7bb2ea7702db5564f12549efb23956c5d6329 +Subproject commit c26b11df5170dcc03a86046b162c284ed24f7487 From f3f8729ebd1ad7824509890e37402af91b2b6255 Mon Sep 17 00:00:00 2001 From: Stanislau Arkhipenka <32813217+stanislau-arkhipenka@users.noreply.github.com> Date: Thu, 30 Jun 2022 18:32:49 +0100 Subject: [PATCH 73/90] Add ca_certs argument for oauth and dropbox client (#385) * Add ca_certs argument for oauth and dropbox client * Replace FileNotFoundError with AttributeError New error better represents actual problem (CA not set) And also compatible with python2.7 Co-authored-by: Stanislau Arkhipenka Co-authored-by: Brent Bumann --- dropbox/dropbox_client.py | 11 +++++++---- dropbox/oauth.py | 21 +++++++++++++++------ dropbox/session.py | 19 +++++++++++++++---- test/unit/test_dropbox_unit.py | 17 +++++++++++++++++ 4 files changed, 54 insertions(+), 14 deletions(-) diff --git a/dropbox/dropbox_client.py b/dropbox/dropbox_client.py index b1fdec89..3883cf1f 100644 --- a/dropbox/dropbox_client.py +++ b/dropbox/dropbox_client.py @@ -97,7 +97,7 @@ def __init__(self, request_id, obj_result): self.request_id = request_id self.obj_result = obj_result -def create_session(max_connections=8, proxies=None): +def create_session(max_connections=8, proxies=None, ca_certs=None): """ Creates a session object that can be used by multiple :class:`Dropbox` and :class:`DropboxTeam` instances. This lets you share a connection pool @@ -112,7 +112,7 @@ def create_session(max_connections=8, proxies=None): for more details. """ # We only need as many pool_connections as we have unique hostnames. - session = pinned_session(pool_maxsize=max_connections) + session = pinned_session(pool_maxsize=max_connections, ca_certs=ca_certs) if proxies: session.proxies = proxies return session @@ -151,7 +151,8 @@ def __init__(self, oauth2_access_token_expiration=None, app_key=None, app_secret=None, - scope=None,): + scope=None, + ca_certs=None): """ :param str oauth2_access_token: OAuth2 access token for making client requests. @@ -180,6 +181,8 @@ def __init__(self, Not required if PKCE was used to authorize the token :param list scope: list of scopes to request on refresh. If left blank, refresh will request all available scopes for application + :param str ca_certs: path to CA certificate. If left blank, default certificate location \ + will be used """ if not (oauth2_access_token or oauth2_refresh_token or (app_key and app_secret)): @@ -212,7 +215,7 @@ def __init__(self, .format(session)) self._session = session else: - self._session = create_session() + self._session = create_session(ca_certs=ca_certs) self._headers = headers base_user_agent = 'OfficialDropboxPythonSDKv2/' + __version__ diff --git a/dropbox/oauth.py b/dropbox/oauth.py index 52ed398c..eaf5d462 100644 --- a/dropbox/oauth.py +++ b/dropbox/oauth.py @@ -119,7 +119,8 @@ def __repr__(self): class DropboxOAuth2FlowBase(object): def __init__(self, consumer_key, consumer_secret=None, locale=None, token_access_type=None, - scope=None, include_granted_scopes=None, use_pkce=False, timeout=DEFAULT_TIMEOUT): + scope=None, include_granted_scopes=None, use_pkce=False, timeout=DEFAULT_TIMEOUT, + ca_certs=None): if scope is not None and (len(scope) == 0 or not isinstance(scope, list)): raise BadInputException("Scope list must be of type list") if token_access_type is not None and token_access_type not in TOKEN_ACCESS_TYPES: @@ -134,7 +135,7 @@ def __init__(self, consumer_key, consumer_secret=None, locale=None, token_access self.consumer_secret = consumer_secret self.locale = locale self.token_access_type = token_access_type - self.requests_session = pinned_session() + self.requests_session = pinned_session(ca_certs=ca_certs) self.scope = scope self.include_granted_scopes = include_granted_scopes self._timeout = timeout @@ -273,7 +274,8 @@ class DropboxOAuth2FlowNoRedirect(DropboxOAuth2FlowBase): """ def __init__(self, consumer_key, consumer_secret=None, locale=None, token_access_type=None, - scope=None, include_granted_scopes=None, use_pkce=False, timeout=DEFAULT_TIMEOUT): # noqa: E501; + scope=None, include_granted_scopes=None, use_pkce=False, timeout=DEFAULT_TIMEOUT, + ca_certs=None): # noqa: E501; """ Construct an instance. @@ -306,6 +308,8 @@ def __init__(self, consumer_key, consumer_secret=None, locale=None, token_access 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 100 seconds. + :param str ca_cert: path to CA certificate. If left blank, default certificate location \ + will be used """ super(DropboxOAuth2FlowNoRedirect, self).__init__( consumer_key=consumer_key, @@ -315,7 +319,8 @@ def __init__(self, consumer_key, consumer_secret=None, locale=None, token_access scope=scope, include_granted_scopes=include_granted_scopes, use_pkce=use_pkce, - timeout=timeout + timeout=timeout, + ca_certs=ca_certs ) def start(self): @@ -360,7 +365,8 @@ class DropboxOAuth2Flow(DropboxOAuth2FlowBase): def __init__(self, consumer_key, redirect_uri, session, csrf_token_session_key, consumer_secret=None, locale=None, token_access_type=None, scope=None, - include_granted_scopes=None, use_pkce=False, timeout=DEFAULT_TIMEOUT): + include_granted_scopes=None, use_pkce=False, timeout=DEFAULT_TIMEOUT, + ca_certs=None): """ Construct an instance. @@ -399,6 +405,8 @@ def __init__(self, consumer_key, redirect_uri, session, :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 100 seconds. + :param str ca_cert: path to CA certificate. If left blank, default certificate location \ + will be used """ super(DropboxOAuth2Flow, self).__init__( @@ -409,7 +417,8 @@ def __init__(self, consumer_key, redirect_uri, session, scope=scope, include_granted_scopes=include_granted_scopes, use_pkce=use_pkce, - timeout=timeout + timeout=timeout, + ca_certs=ca_certs ) self.redirect_uri = redirect_uri self.session = session diff --git a/dropbox/session.py b/dropbox/session.py index b793620e..bf54f842 100644 --- a/dropbox/session.py +++ b/dropbox/session.py @@ -32,22 +32,33 @@ # This is the default longest time we'll block on receiving data from the server DEFAULT_TIMEOUT = 100 -_TRUSTED_CERT_FILE = pkg_resources.resource_filename(__name__, 'trusted-certs.crt') +try: + _TRUSTED_CERT_FILE = pkg_resources.resource_filename(__name__, 'trusted-certs.crt') +except NotImplementedError: # Package is used inside python archive + _TRUSTED_CERT_FILE = None + # 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__(self, *args, **kwargs): + self._ca_certs = kwargs.pop("ca_certs", None) or _TRUSTED_CERT_FILE + if not self._ca_certs: + raise AttributeError("CA certificate not set") + super(_SSLAdapter, self).__init__(*args, **kwargs) + 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, + ca_certs=self._ca_certs, ) -def pinned_session(pool_maxsize=8): - http_adapter = _SSLAdapter(pool_connections=4, pool_maxsize=pool_maxsize) +def pinned_session(pool_maxsize=8, ca_certs=None): + http_adapter = _SSLAdapter(pool_connections=4, pool_maxsize=pool_maxsize, ca_certs=ca_certs) _session = requests.session() _session.mount('https://', http_adapter) diff --git a/test/unit/test_dropbox_unit.py b/test/unit/test_dropbox_unit.py index dfbbcc22..259d43de 100644 --- a/test/unit/test_dropbox_unit.py +++ b/test/unit/test_dropbox_unit.py @@ -22,6 +22,7 @@ TEAM_MEMBER_ID = 'dummy_team_member_id' SCOPE_LIST = ['files.metadata.read', 'files.metadata.write'] EXPIRATION = datetime.utcnow() + timedelta(seconds=EXPIRES_IN) +CA_CERTS = "/dummy/path/ca.crt" EXPIRATION_BUFFER = timedelta(minutes=5) @@ -85,6 +86,10 @@ def test_authorization_url(self): assert 'code_challenge_method' not in authorization_url assert 'code_challenge' not in authorization_url + def test_authorization_with_ca_certs(self): + DropboxOAuth2Flow(APP_KEY, APP_SECRET, 'http://localhost/dummy', 'dummy_session', + 'dbx-auth-csrf-token', ca_certs=CA_CERTS) + def test_authorization_url_legacy_default(self): flow_obj = DropboxOAuth2Flow(APP_KEY, APP_SECRET, 'http://localhost/dummy', 'dummy_session', 'dbx-auth-csrf-token') @@ -233,6 +238,14 @@ def session_instance(self, mocker): mocker.patch.object(session_obj, 'post', return_value=post_response) return session_obj + @pytest.fixture(scope='function') + def session_instance_with_ca_certs(self, mocker): + session_obj = create_session(ca_certs=CA_CERTS) + post_response = mock.MagicMock(status_code=200) + post_response.json.return_value = {"access_token": ACCESS_TOKEN, "expires_in": EXPIRES_IN} + mocker.patch.object(session_obj, 'post', return_value=post_response) + return session_obj + @pytest.fixture(scope='function') def invalid_grant_session_instance(self, mocker): session_obj = create_session() @@ -366,6 +379,10 @@ def test_check_refresh_with_invalid_grant(self, invalid_grant_session_instance): assert invalid_grant_session_instance.post.call_count == 1 assert e.error.is_invalid_access_token() + def test_check_Dropbox_with_ca_certs(self, session_instance_with_ca_certs): + Dropbox(oauth2_access_token=ACCESS_TOKEN, oauth2_access_token_expiration=EXPIRATION, + session=session_instance_with_ca_certs) + def test_team_client_refresh(self, session_instance): dbx = DropboxTeam(oauth2_refresh_token=REFRESH_TOKEN, app_key=APP_KEY, From 4a3c7f54d10c79eadd53a538e87f8d30fc158ec5 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 13 Jul 2022 14:04:42 -0400 Subject: [PATCH 74/90] Automated Spec Update (#439) f91238c7508770245030a449d86bd698d30ebfc3 Change Notes: check_api_v2_types Namespace - Update EchoArg struct to include max_length in query arg sharing_files Namespace - Update FileMemberActionResult to include sckey_sha1, invitation_signature team_log_generated Namespace - Add AdminEmailRemindersChangedDetails, AdminEmailRemindersChangedType structs - Add AdminEmailRemindersPolicy unions team_policies Namespace - Add AdminEmailRemindersChangedType struct - Add FileProviderMigrationPolicyState unions Co-authored-by: DropboxBot Co-authored-by: Brent Bumann --- dropbox/base.py | 1 + dropbox/base_team.py | 1 + dropbox/check.py | 2 +- dropbox/openid.py | 282 +++++++++++++++++++++++++++++++++++++++ dropbox/sharing.py | 30 ++++- dropbox/team_log.py | 229 +++++++++++++++++++++++++++++++ dropbox/team_policies.py | 77 +++++++++++ spec | 2 +- 8 files changed, 621 insertions(+), 3 deletions(-) create mode 100644 dropbox/openid.py diff --git a/dropbox/base.py b/dropbox/base.py index 73b7307b..6e2cbf59 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -15,6 +15,7 @@ from dropbox import file_properties from dropbox import file_requests from dropbox import files +from dropbox import openid from dropbox import paper from dropbox import secondary_emails from dropbox import seen_state diff --git a/dropbox/base_team.py b/dropbox/base_team.py index 4986e47f..8b822d58 100644 --- a/dropbox/base_team.py +++ b/dropbox/base_team.py @@ -15,6 +15,7 @@ from dropbox import file_properties from dropbox import file_requests from dropbox import files +from dropbox import openid from dropbox import paper from dropbox import secondary_emails from dropbox import seen_state diff --git a/dropbox/check.py b/dropbox/check.py index 8fc2ed43..29d85034 100644 --- a/dropbox/check.py +++ b/dropbox/check.py @@ -63,7 +63,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EchoResult_validator = bv.Struct(EchoResult) -EchoArg.query.validator = bv.String() +EchoArg.query.validator = bv.String(max_length=500) EchoArg._all_field_names_ = set(['query']) EchoArg._all_fields_ = [('query', EchoArg.query.validator)] diff --git a/dropbox/openid.py b/dropbox/openid.py new file mode 100644 index 00000000..6e6f25e7 --- /dev/null +++ b/dropbox/openid.py @@ -0,0 +1,282 @@ +# -*- coding: utf-8 -*- +# Auto-generated by Stone, do not modify. +# @generated +# flake8: noqa +# pylint: skip-file +from __future__ import unicode_literals +from stone.backends.python_rsrc import stone_base as bb +from stone.backends.python_rsrc import stone_validators as bv + +class AuthError(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 + invalid_token = None + # Attribute is overwritten below the class definition + no_openid_auth = None + # Attribute is overwritten below the class definition + other = None + + def is_invalid_token(self): + """ + Check if the union tag is ``invalid_token``. + + :rtype: bool + """ + return self._tag == 'invalid_token' + + def is_no_openid_auth(self): + """ + Check if the union tag is ``no_openid_auth``. + + :rtype: bool + """ + return self._tag == 'no_openid_auth' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AuthError, self)._process_custom_annotations(annotation_type, field_path, processor) + +AuthError_validator = bv.Union(AuthError) + +class UserInfoArgs(bb.Struct): + """ + This struct is empty. The comment here is intentionally emitted to avoid + indentation issues with Stone. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(UserInfoArgs, self)._process_custom_annotations(annotation_type, field_path, processor) + +UserInfoArgs_validator = bv.Struct(UserInfoArgs) + +class UserInfoError(bb.Struct): + + __slots__ = [ + '_err_value', + '_error_message_value', + ] + + _has_required_fields = False + + def __init__(self, + err=None, + error_message=None): + self._err_value = bb.NOT_SET + self._error_message_value = bb.NOT_SET + if err is not None: + self.err = err + if error_message is not None: + self.error_message = error_message + + # Instance attribute type: ErrUnion (validator is set below) + err = bb.Attribute("err", nullable=True, user_defined=True) + + # Instance attribute type: str (validator is set below) + error_message = bb.Attribute("error_message") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(UserInfoError, self)._process_custom_annotations(annotation_type, field_path, processor) + +UserInfoError_validator = bv.Struct(UserInfoError) + +class UserInfoResult(bb.Struct): + + __slots__ = [ + '_family_name_value', + '_given_name_value', + '_email_value', + '_email_verified_value', + '_iss_value', + '_sub_value', + ] + + _has_required_fields = False + + def __init__(self, + family_name=None, + given_name=None, + email=None, + email_verified=None, + iss=None, + sub=None): + self._family_name_value = bb.NOT_SET + self._given_name_value = bb.NOT_SET + self._email_value = bb.NOT_SET + self._email_verified_value = bb.NOT_SET + self._iss_value = bb.NOT_SET + self._sub_value = bb.NOT_SET + if family_name is not None: + self.family_name = family_name + if given_name is not None: + self.given_name = given_name + if email is not None: + self.email = email + if email_verified is not None: + self.email_verified = email_verified + if iss is not None: + self.iss = iss + if sub is not None: + self.sub = sub + + # Instance attribute type: str (validator is set below) + family_name = bb.Attribute("family_name", nullable=True) + + # Instance attribute type: str (validator is set below) + given_name = bb.Attribute("given_name", nullable=True) + + # Instance attribute type: str (validator is set below) + email = bb.Attribute("email", nullable=True) + + # Instance attribute type: bool (validator is set below) + email_verified = bb.Attribute("email_verified", nullable=True) + + # Instance attribute type: str (validator is set below) + iss = bb.Attribute("iss") + + # Instance attribute type: str (validator is set below) + sub = bb.Attribute("sub") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(UserInfoResult, self)._process_custom_annotations(annotation_type, field_path, processor) + +UserInfoResult_validator = bv.Struct(UserInfoResult) + +class ErrUnion(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 auth_error(cls, val): + """ + Create an instance of this class set to the ``auth_error`` tag with + value ``val``. + + :param AuthError val: + :rtype: ErrUnion + """ + return cls('auth_error', val) + + def is_auth_error(self): + """ + Check if the union tag is ``auth_error``. + + :rtype: bool + """ + return self._tag == 'auth_error' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def get_auth_error(self): + """ + Only call this if :meth:`is_auth_error` is true. + + :rtype: AuthError + """ + if not self.is_auth_error(): + raise AttributeError("tag 'auth_error' not set") + return self._value + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ErrUnion, self)._process_custom_annotations(annotation_type, field_path, processor) + +ErrUnion_validator = bv.Union(ErrUnion) + +AuthError._invalid_token_validator = bv.Void() +AuthError._no_openid_auth_validator = bv.Void() +AuthError._other_validator = bv.Void() +AuthError._tagmap = { + 'invalid_token': AuthError._invalid_token_validator, + 'no_openid_auth': AuthError._no_openid_auth_validator, + 'other': AuthError._other_validator, +} + +AuthError.invalid_token = AuthError('invalid_token') +AuthError.no_openid_auth = AuthError('no_openid_auth') +AuthError.other = AuthError('other') + +UserInfoArgs._all_field_names_ = set([]) +UserInfoArgs._all_fields_ = [] + +UserInfoError.err.validator = bv.Nullable(ErrUnion_validator) +UserInfoError.error_message.validator = bv.String() +UserInfoError._all_field_names_ = set([ + 'err', + 'error_message', +]) +UserInfoError._all_fields_ = [ + ('err', UserInfoError.err.validator), + ('error_message', UserInfoError.error_message.validator), +] + +UserInfoResult.family_name.validator = bv.Nullable(bv.String()) +UserInfoResult.given_name.validator = bv.Nullable(bv.String()) +UserInfoResult.email.validator = bv.Nullable(bv.String()) +UserInfoResult.email_verified.validator = bv.Nullable(bv.Boolean()) +UserInfoResult.iss.validator = bv.String() +UserInfoResult.sub.validator = bv.String() +UserInfoResult._all_field_names_ = set([ + 'family_name', + 'given_name', + 'email', + 'email_verified', + 'iss', + 'sub', +]) +UserInfoResult._all_fields_ = [ + ('family_name', UserInfoResult.family_name.validator), + ('given_name', UserInfoResult.given_name.validator), + ('email', UserInfoResult.email.validator), + ('email_verified', UserInfoResult.email_verified.validator), + ('iss', UserInfoResult.iss.validator), + ('sub', UserInfoResult.sub.validator), +] + +ErrUnion._auth_error_validator = AuthError_validator +ErrUnion._other_validator = bv.Void() +ErrUnion._tagmap = { + 'auth_error': ErrUnion._auth_error_validator, + 'other': ErrUnion._other_validator, +} + +ErrUnion.other = ErrUnion('other') + +UserInfoError.error_message.default = '' +UserInfoResult.iss.default = '' +UserInfoResult.sub.default = '' +ROUTES = { +} + diff --git a/dropbox/sharing.py b/dropbox/sharing.py index e992c242..37547b6c 100644 --- a/dropbox/sharing.py +++ b/dropbox/sharing.py @@ -2349,24 +2349,40 @@ class FileMemberActionResult(bb.Struct): :ivar sharing.FileMemberActionResult.member: One of specified input members. :ivar sharing.FileMemberActionResult.result: The outcome of the action on this member. + :ivar sharing.FileMemberActionResult.sckey_sha1: The SHA-1 encrypted shared + content key. + :ivar sharing.FileMemberActionResult.invitation_signature: The sharing + sender-recipient invitation signatures for the input member_id. A + member_id can be a group and thus have multiple users and multiple + invitation signatures. """ __slots__ = [ '_member_value', '_result_value', + '_sckey_sha1_value', + '_invitation_signature_value', ] _has_required_fields = True def __init__(self, member=None, - result=None): + result=None, + sckey_sha1=None, + invitation_signature=None): self._member_value = bb.NOT_SET self._result_value = bb.NOT_SET + self._sckey_sha1_value = bb.NOT_SET + self._invitation_signature_value = bb.NOT_SET if member is not None: self.member = member if result is not None: self.result = result + if sckey_sha1 is not None: + self.sckey_sha1 = sckey_sha1 + if invitation_signature is not None: + self.invitation_signature = invitation_signature # Instance attribute type: MemberSelector (validator is set below) member = bb.Attribute("member", user_defined=True) @@ -2374,6 +2390,12 @@ def __init__(self, # Instance attribute type: FileMemberActionIndividualResult (validator is set below) result = bb.Attribute("result", user_defined=True) + # Instance attribute type: str (validator is set below) + sckey_sha1 = bb.Attribute("sckey_sha1", nullable=True) + + # Instance attribute type: list of [str] (validator is set below) + invitation_signature = bb.Attribute("invitation_signature", nullable=True) + def _process_custom_annotations(self, annotation_type, field_path, processor): super(FileMemberActionResult, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -11533,13 +11555,19 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): FileMemberActionResult.member.validator = MemberSelector_validator FileMemberActionResult.result.validator = FileMemberActionIndividualResult_validator +FileMemberActionResult.sckey_sha1.validator = bv.Nullable(bv.String()) +FileMemberActionResult.invitation_signature.validator = bv.Nullable(bv.List(bv.String())) FileMemberActionResult._all_field_names_ = set([ 'member', 'result', + 'sckey_sha1', + 'invitation_signature', ]) FileMemberActionResult._all_fields_ = [ ('member', FileMemberActionResult.member.validator), ('result', FileMemberActionResult.result.validator), + ('sckey_sha1', FileMemberActionResult.sckey_sha1.validator), + ('invitation_signature', FileMemberActionResult.invitation_signature.validator), ] FileMemberRemoveActionResult._success_validator = MemberAccessLevelResult_validator diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 63ec670e..11c4feef 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -1862,6 +1862,121 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminConsoleAppPolicy_validator = bv.Union(AdminConsoleAppPolicy) +class AdminEmailRemindersChangedDetails(bb.Struct): + """ + Changed admin email reminder policy for team requests to join. + + :ivar team_log.AdminEmailRemindersChangedDetails.new_value: To. + :ivar team_log.AdminEmailRemindersChangedDetails.previous_value: From. + """ + + __slots__ = [ + '_new_value_value', + '_previous_value_value', + ] + + _has_required_fields = True + + def __init__(self, + new_value=None, + previous_value=None): + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + if new_value is not None: + self.new_value = new_value + if previous_value is not None: + self.previous_value = previous_value + + # Instance attribute type: AdminEmailRemindersPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) + + # Instance attribute type: AdminEmailRemindersPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AdminEmailRemindersChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +AdminEmailRemindersChangedDetails_validator = bv.Struct(AdminEmailRemindersChangedDetails) + +class AdminEmailRemindersChangedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(AdminEmailRemindersChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +AdminEmailRemindersChangedType_validator = bv.Struct(AdminEmailRemindersChangedType) + +class AdminEmailRemindersPolicy(bb.Union): + """ + Policy for deciding whether team admins receive reminder emails for requests + to join the 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. + """ + + _catch_all = 'other' + # Attribute is overwritten below the class definition + default = None + # 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_default(self): + """ + Check if the union tag is ``default``. + + :rtype: bool + """ + return self._tag == 'default' + + 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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(AdminEmailRemindersPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) + +AdminEmailRemindersPolicy_validator = bv.Union(AdminEmailRemindersPolicy) + class AdminRole(bb.Union): """ This class acts as a tagged union. Only one of the ``is_*`` methods will @@ -12187,6 +12302,17 @@ def account_capture_change_policy_details(cls, val): """ return cls('account_capture_change_policy_details', val) + @classmethod + def admin_email_reminders_changed_details(cls, val): + """ + Create an instance of this class set to the + ``admin_email_reminders_changed_details`` tag with value ``val``. + + :param AdminEmailRemindersChangedDetails val: + :rtype: EventDetails + """ + return cls('admin_email_reminders_changed_details', val) + @classmethod def allow_download_disabled_details(cls, val): """ @@ -16467,6 +16593,14 @@ def is_account_capture_change_policy_details(self): """ return self._tag == 'account_capture_change_policy_details' + def is_admin_email_reminders_changed_details(self): + """ + Check if the union tag is ``admin_email_reminders_changed_details``. + + :rtype: bool + """ + return self._tag == 'admin_email_reminders_changed_details' + def is_allow_download_disabled_details(self): """ Check if the union tag is ``allow_download_disabled_details``. @@ -21037,6 +21171,16 @@ def get_account_capture_change_policy_details(self): raise AttributeError("tag 'account_capture_change_policy_details' not set") return self._value + def get_admin_email_reminders_changed_details(self): + """ + Only call this if :meth:`is_admin_email_reminders_changed_details` is true. + + :rtype: AdminEmailRemindersChangedDetails + """ + if not self.is_admin_email_reminders_changed_details(): + raise AttributeError("tag 'admin_email_reminders_changed_details' not set") + return self._value + def get_allow_download_disabled_details(self): """ Only call this if :meth:`is_allow_download_disabled_details` is true. @@ -23158,6 +23302,9 @@ class EventType(bb.Union): :ivar AccountCaptureChangePolicyType EventType.account_capture_change_policy: (team_policies) Changed account capture setting on team domain + :ivar AdminEmailRemindersChangedType + EventType.admin_email_reminders_changed: (team_policies) Changed admin + email reminder policy for team requests to join :ivar AllowDownloadDisabledType EventType.allow_download_disabled: (team_policies) Disabled downloads (deprecated, no longer logged) :ivar AllowDownloadEnabledType EventType.allow_download_enabled: @@ -27408,6 +27555,17 @@ def account_capture_change_policy(cls, val): """ return cls('account_capture_change_policy', val) + @classmethod + def admin_email_reminders_changed(cls, val): + """ + Create an instance of this class set to the + ``admin_email_reminders_changed`` tag with value ``val``. + + :param AdminEmailRemindersChangedType val: + :rtype: EventType + """ + return cls('admin_email_reminders_changed', val) + @classmethod def allow_download_disabled(cls, val): """ @@ -31655,6 +31813,14 @@ def is_account_capture_change_policy(self): """ return self._tag == 'account_capture_change_policy' + def is_admin_email_reminders_changed(self): + """ + Check if the union tag is ``admin_email_reminders_changed``. + + :rtype: bool + """ + return self._tag == 'admin_email_reminders_changed' + def is_allow_download_disabled(self): """ Check if the union tag is ``allow_download_disabled``. @@ -36967,6 +37133,19 @@ def get_account_capture_change_policy(self): raise AttributeError("tag 'account_capture_change_policy' not set") return self._value + def get_admin_email_reminders_changed(self): + """ + (team_policies) Changed admin email reminder policy for team requests to + join + + Only call this if :meth:`is_admin_email_reminders_changed` is true. + + :rtype: AdminEmailRemindersChangedType + """ + if not self.is_admin_email_reminders_changed(): + raise AttributeError("tag 'admin_email_reminders_changed' not set") + return self._value + def get_allow_download_disabled(self): """ (team_policies) Disabled downloads (deprecated, no longer logged) @@ -39253,6 +39432,8 @@ class EventTypeArg(bb.Union): (team_folders) Changed sync default :ivar team_log.EventTypeArg.account_capture_change_policy: (team_policies) Changed account capture setting on team domain + :ivar team_log.EventTypeArg.admin_email_reminders_changed: (team_policies) + Changed admin email reminder policy for team requests to join :ivar team_log.EventTypeArg.allow_download_disabled: (team_policies) Disabled downloads (deprecated, no longer logged) :ivar team_log.EventTypeArg.allow_download_enabled: (team_policies) Enabled @@ -40262,6 +40443,8 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition account_capture_change_policy = None # Attribute is overwritten below the class definition + admin_email_reminders_changed = None + # Attribute is overwritten below the class definition allow_download_disabled = None # Attribute is overwritten below the class definition allow_download_enabled = None @@ -43344,6 +43527,14 @@ def is_account_capture_change_policy(self): """ return self._tag == 'account_capture_change_policy' + def is_admin_email_reminders_changed(self): + """ + Check if the union tag is ``admin_email_reminders_changed``. + + :rtype: bool + """ + return self._tag == 'admin_email_reminders_changed' + def is_allow_download_disabled(self): """ Check if the union tag is ``allow_download_disabled``. @@ -73318,6 +73509,37 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminConsoleAppPolicy.default = AdminConsoleAppPolicy('default') AdminConsoleAppPolicy.other = AdminConsoleAppPolicy('other') +AdminEmailRemindersChangedDetails.new_value.validator = AdminEmailRemindersPolicy_validator +AdminEmailRemindersChangedDetails.previous_value.validator = AdminEmailRemindersPolicy_validator +AdminEmailRemindersChangedDetails._all_field_names_ = set([ + 'new_value', + 'previous_value', +]) +AdminEmailRemindersChangedDetails._all_fields_ = [ + ('new_value', AdminEmailRemindersChangedDetails.new_value.validator), + ('previous_value', AdminEmailRemindersChangedDetails.previous_value.validator), +] + +AdminEmailRemindersChangedType.description.validator = bv.String() +AdminEmailRemindersChangedType._all_field_names_ = set(['description']) +AdminEmailRemindersChangedType._all_fields_ = [('description', AdminEmailRemindersChangedType.description.validator)] + +AdminEmailRemindersPolicy._default_validator = bv.Void() +AdminEmailRemindersPolicy._disabled_validator = bv.Void() +AdminEmailRemindersPolicy._enabled_validator = bv.Void() +AdminEmailRemindersPolicy._other_validator = bv.Void() +AdminEmailRemindersPolicy._tagmap = { + 'default': AdminEmailRemindersPolicy._default_validator, + 'disabled': AdminEmailRemindersPolicy._disabled_validator, + 'enabled': AdminEmailRemindersPolicy._enabled_validator, + 'other': AdminEmailRemindersPolicy._other_validator, +} + +AdminEmailRemindersPolicy.default = AdminEmailRemindersPolicy('default') +AdminEmailRemindersPolicy.disabled = AdminEmailRemindersPolicy('disabled') +AdminEmailRemindersPolicy.enabled = AdminEmailRemindersPolicy('enabled') +AdminEmailRemindersPolicy.other = AdminEmailRemindersPolicy('other') + AdminRole._billing_admin_validator = bv.Void() AdminRole._compliance_admin_validator = bv.Void() AdminRole._content_admin_validator = bv.Void() @@ -75170,6 +75392,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._team_folder_rename_details_validator = TeamFolderRenameDetails_validator EventDetails._team_selective_sync_settings_changed_details_validator = TeamSelectiveSyncSettingsChangedDetails_validator EventDetails._account_capture_change_policy_details_validator = AccountCaptureChangePolicyDetails_validator +EventDetails._admin_email_reminders_changed_details_validator = AdminEmailRemindersChangedDetails_validator EventDetails._allow_download_disabled_details_validator = AllowDownloadDisabledDetails_validator EventDetails._allow_download_enabled_details_validator = AllowDownloadEnabledDetails_validator EventDetails._app_permissions_changed_details_validator = AppPermissionsChangedDetails_validator @@ -75654,6 +75877,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'team_folder_rename_details': EventDetails._team_folder_rename_details_validator, 'team_selective_sync_settings_changed_details': EventDetails._team_selective_sync_settings_changed_details_validator, 'account_capture_change_policy_details': EventDetails._account_capture_change_policy_details_validator, + 'admin_email_reminders_changed_details': EventDetails._admin_email_reminders_changed_details_validator, 'allow_download_disabled_details': EventDetails._allow_download_disabled_details_validator, 'allow_download_enabled_details': EventDetails._allow_download_enabled_details_validator, 'app_permissions_changed_details': EventDetails._app_permissions_changed_details_validator, @@ -76141,6 +76365,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._team_folder_rename_validator = TeamFolderRenameType_validator EventType._team_selective_sync_settings_changed_validator = TeamSelectiveSyncSettingsChangedType_validator EventType._account_capture_change_policy_validator = AccountCaptureChangePolicyType_validator +EventType._admin_email_reminders_changed_validator = AdminEmailRemindersChangedType_validator EventType._allow_download_disabled_validator = AllowDownloadDisabledType_validator EventType._allow_download_enabled_validator = AllowDownloadEnabledType_validator EventType._app_permissions_changed_validator = AppPermissionsChangedType_validator @@ -76624,6 +76849,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'team_folder_rename': EventType._team_folder_rename_validator, 'team_selective_sync_settings_changed': EventType._team_selective_sync_settings_changed_validator, 'account_capture_change_policy': EventType._account_capture_change_policy_validator, + 'admin_email_reminders_changed': EventType._admin_email_reminders_changed_validator, 'allow_download_disabled': EventType._allow_download_disabled_validator, 'allow_download_enabled': EventType._allow_download_enabled_validator, 'app_permissions_changed': EventType._app_permissions_changed_validator, @@ -77110,6 +77336,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._team_folder_rename_validator = bv.Void() EventTypeArg._team_selective_sync_settings_changed_validator = bv.Void() EventTypeArg._account_capture_change_policy_validator = bv.Void() +EventTypeArg._admin_email_reminders_changed_validator = bv.Void() EventTypeArg._allow_download_disabled_validator = bv.Void() EventTypeArg._allow_download_enabled_validator = bv.Void() EventTypeArg._app_permissions_changed_validator = bv.Void() @@ -77593,6 +77820,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'team_folder_rename': EventTypeArg._team_folder_rename_validator, 'team_selective_sync_settings_changed': EventTypeArg._team_selective_sync_settings_changed_validator, 'account_capture_change_policy': EventTypeArg._account_capture_change_policy_validator, + 'admin_email_reminders_changed': EventTypeArg._admin_email_reminders_changed_validator, 'allow_download_disabled': EventTypeArg._allow_download_disabled_validator, 'allow_download_enabled': EventTypeArg._allow_download_enabled_validator, 'app_permissions_changed': EventTypeArg._app_permissions_changed_validator, @@ -78077,6 +78305,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.team_folder_rename = EventTypeArg('team_folder_rename') EventTypeArg.team_selective_sync_settings_changed = EventTypeArg('team_selective_sync_settings_changed') EventTypeArg.account_capture_change_policy = EventTypeArg('account_capture_change_policy') +EventTypeArg.admin_email_reminders_changed = EventTypeArg('admin_email_reminders_changed') EventTypeArg.allow_download_disabled = EventTypeArg('allow_download_disabled') EventTypeArg.allow_download_enabled = EventTypeArg('allow_download_enabled') EventTypeArg.app_permissions_changed = EventTypeArg('app_permissions_changed') diff --git a/dropbox/team_policies.py b/dropbox/team_policies.py index c85e5af1..045a5df1 100644 --- a/dropbox/team_policies.py +++ b/dropbox/team_policies.py @@ -285,6 +285,67 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): FileLockingPolicyState_validator = bv.Union(FileLockingPolicyState) +class FileProviderMigrationPolicyState(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_policies.FileProviderMigrationPolicyState.disabled: Team admin + has opted out of File Provider Migration for team members. + :ivar team_policies.FileProviderMigrationPolicyState.enabled: Team admin has + not opted out of File Provider Migration for team members. + :ivar team_policies.FileProviderMigrationPolicyState.default: Team admin has + default value based on team tier. + """ + + _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 + default = 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_default(self): + """ + Check if the union tag is ``default``. + + :rtype: bool + """ + return self._tag == 'default' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(FileProviderMigrationPolicyState, self)._process_custom_annotations(annotation_type, field_path, processor) + +FileProviderMigrationPolicyState_validator = bv.Union(FileProviderMigrationPolicyState) + class GroupCreation(bb.Union): """ This class acts as a tagged union. Only one of the ``is_*`` methods will @@ -1566,6 +1627,22 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): FileLockingPolicyState.enabled = FileLockingPolicyState('enabled') FileLockingPolicyState.other = FileLockingPolicyState('other') +FileProviderMigrationPolicyState._disabled_validator = bv.Void() +FileProviderMigrationPolicyState._enabled_validator = bv.Void() +FileProviderMigrationPolicyState._default_validator = bv.Void() +FileProviderMigrationPolicyState._other_validator = bv.Void() +FileProviderMigrationPolicyState._tagmap = { + 'disabled': FileProviderMigrationPolicyState._disabled_validator, + 'enabled': FileProviderMigrationPolicyState._enabled_validator, + 'default': FileProviderMigrationPolicyState._default_validator, + 'other': FileProviderMigrationPolicyState._other_validator, +} + +FileProviderMigrationPolicyState.disabled = FileProviderMigrationPolicyState('disabled') +FileProviderMigrationPolicyState.enabled = FileProviderMigrationPolicyState('enabled') +FileProviderMigrationPolicyState.default = FileProviderMigrationPolicyState('default') +FileProviderMigrationPolicyState.other = FileProviderMigrationPolicyState('other') + GroupCreation._admins_and_members_validator = bv.Void() GroupCreation._admins_only_validator = bv.Void() GroupCreation._tagmap = { diff --git a/spec b/spec index c26b11df..f91238c7 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit c26b11df5170dcc03a86046b162c284ed24f7487 +Subproject commit f91238c7508770245030a449d86bd698d30ebfc3 From e1bee85306cab9d9917559c54cdd667771de61b2 Mon Sep 17 00:00:00 2001 From: Dennis Siemensma <16581744+dennissiemensma@users.noreply.github.com> Date: Thu, 4 Aug 2022 02:07:00 +0200 Subject: [PATCH 75/90] Added _ca_certs property to _SSLAdapter to properly support pickling (broke in SDK v11.33) (#440) * Added _ca_certs property to _SSLAdapter to properly support pickling * Added unittest to test session pickling --- dropbox/session.py | 1 + test/unit/test_dropbox_unit.py | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/dropbox/session.py b/dropbox/session.py index bf54f842..cd47292c 100644 --- a/dropbox/session.py +++ b/dropbox/session.py @@ -41,6 +41,7 @@ # 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): + _ca_certs = None def __init__(self, *args, **kwargs): self._ca_certs = kwargs.pop("ca_certs", None) or _TRUSTED_CERT_FILE diff --git a/test/unit/test_dropbox_unit.py b/test/unit/test_dropbox_unit.py index 259d43de..c1fd6058 100644 --- a/test/unit/test_dropbox_unit.py +++ b/test/unit/test_dropbox_unit.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import mock +import pickle import pytest @@ -404,3 +405,10 @@ def test_team_client_as_user(self, session_instance): app_secret=APP_SECRET, session=session_instance) dbx.as_user(TEAM_MEMBER_ID) + + +class TestSession: + def test_pickle_session(self): + session_obj = create_session() + pickled_session = pickle.dumps(session_obj) + pickle.loads(pickled_session) From 93435f784fd5288cce28046e4a2c6489d3290e48 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Tue, 11 Oct 2022 17:39:04 -0400 Subject: [PATCH 76/90] Automated Spec Update (#448) 18963b8a29fe125f6495d36c38eda5db2710d0dd Change Notes: openid_openid_types Namespace - Add OpenIdError, UserInfoError unions - Remove UserInfoError structs - Remove AuthError unions - Update UserInfoArgs struct to include documentation team_policies Namespace - Add examples Co-authored-by: Brent Bumann c36ba27d8d56648555d3068bb3826e1d3a44d92b Co-authored-by: Bruce Zhang Co-authored-by: DropboxBot --- dropbox/base.py | 33 +- dropbox/base_team.py | 120 +++++++ dropbox/files.py | 6 +- dropbox/openid.py | 216 ++++++------ dropbox/sharing.py | 12 +- dropbox/team.py | 705 +++++++++++++++++++++++++++++++++++++++ dropbox/team_log.py | 180 +++++++++- dropbox/team_policies.py | 15 +- spec | 2 +- 9 files changed, 1152 insertions(+), 137 deletions(-) diff --git a/dropbox/base.py b/dropbox/base.py index 6e2cbf59..c91ed484 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -3065,7 +3065,8 @@ def files_tags_add(self, scope: files.metadata.write :param str path: Path to the item to be tagged. - :param str tag_text: The value of the tag to add. + :param str tag_text: The value of the tag to add. Will be automatically + converted to lowercase letters. :rtype: None :raises: :class:`.exceptions.ApiError` @@ -3116,7 +3117,8 @@ def files_tags_remove(self, scope: files.metadata.write :param str path: Path to the item to tag. - :param str tag_text: The tag to remove. + :param str tag_text: The tag to remove. Will be automatically converted + to lowercase letters. :rtype: None :raises: :class:`.exceptions.ApiError` @@ -3559,6 +3561,33 @@ def files_upload_session_start_batch(self, ) return r + # ------------------------------------------ + # Routes in openid namespace + + def openid_userinfo(self): + """ + This route is used for refreshing the info that is found in the id_token + during the OIDC flow. This route doesn't require any arguments and will + use the scopes approved for the given access token. + + Route attributes: + scope: openid + + :rtype: :class:`dropbox.openid.UserInfoResult` + :raises: :class:`.exceptions.ApiError` + + If this raises, ApiError will contain: + :class:`dropbox.openid.UserInfoError` + """ + arg = openid.UserInfoArgs() + r = self.request( + openid.userinfo, + 'openid', + arg, + None, + ) + return r + # ------------------------------------------ # Routes in paper namespace diff --git a/dropbox/base_team.py b/dropbox/base_team.py index 8b822d58..6f711960 100644 --- a/dropbox/base_team.py +++ b/dropbox/base_team.py @@ -205,6 +205,9 @@ def file_properties_templates_update_for_team(self, # ------------------------------------------ # Routes in files namespace + # ------------------------------------------ + # Routes in openid namespace + # ------------------------------------------ # Routes in paper namespace @@ -2559,6 +2562,123 @@ def team_reports_get_storage(self, ) return r + def team_sharing_allowlist_add(self, + domains=None, + emails=None): + """ + Endpoint adds Approve List entries. Changes are effective immediately. + Changes are committed in transaction. In case of single validation error + - all entries are rejected. Valid domains (RFC-1034/5) and emails + (RFC-5322/822) are accepted. Added entries cannot overflow limit of + 10000 entries per team. Maximum 100 entries per call is allowed. + + Route attributes: + scope: team_info.write + + :param Nullable[List[str]] domains: List of domains represented by valid + string representation (RFC-1034/5). + :param Nullable[List[str]] emails: List of emails represented by valid + string representation (RFC-5322/822). + :rtype: :class:`dropbox.team.SharingAllowlistAddResponse` + :raises: :class:`.exceptions.ApiError` + + If this raises, ApiError will contain: + :class:`dropbox.team.SharingAllowlistAddError` + """ + arg = team.SharingAllowlistAddArgs(domains, + emails) + r = self.request( + team.sharing_allowlist_add, + 'team', + arg, + None, + ) + return r + + def team_sharing_allowlist_list(self, + limit=1000): + """ + Lists Approve List entries for given team, from newest to oldest, + returning up to `limit` entries at a time. If there are more than + `limit` entries associated with the current team, more can be fetched by + passing the returned `cursor` to + :meth:`team_sharing_allowlist_list_continue`. + + Route attributes: + scope: team_info.read + + :param int limit: The number of entries to fetch at one time. + :rtype: :class:`dropbox.team.SharingAllowlistListResponse` + """ + arg = team.SharingAllowlistListArg(limit) + r = self.request( + team.sharing_allowlist_list, + 'team', + arg, + None, + ) + return r + + def team_sharing_allowlist_list_continue(self, + cursor): + """ + Lists entries associated with given team, starting from a the cursor. + See :meth:`team_sharing_allowlist_list`. + + Route attributes: + scope: team_info.read + + :param str cursor: The cursor returned from a previous call to + :meth:`team_sharing_allowlist_list` or + :meth:`team_sharing_allowlist_list_continue`. + :rtype: :class:`dropbox.team.SharingAllowlistListResponse` + :raises: :class:`.exceptions.ApiError` + + If this raises, ApiError will contain: + :class:`dropbox.team.SharingAllowlistListContinueError` + """ + arg = team.SharingAllowlistListContinueArg(cursor) + r = self.request( + team.sharing_allowlist_list_continue, + 'team', + arg, + None, + ) + return r + + def team_sharing_allowlist_remove(self, + domains=None, + emails=None): + """ + Endpoint removes Approve List entries. Changes are effective + immediately. Changes are committed in transaction. In case of single + validation error - all entries are rejected. Valid domains (RFC-1034/5) + and emails (RFC-5322/822) are accepted. Entries being removed have to be + present on the list. Maximum 1000 entries per call is allowed. + + Route attributes: + scope: team_info.write + + :param Nullable[List[str]] domains: List of domains represented by valid + string representation (RFC-1034/5). + :param Nullable[List[str]] emails: List of emails represented by valid + string representation (RFC-5322/822). + :rtype: :class:`dropbox.team.SharingAllowlistRemoveResponse` + :raises: :class:`.exceptions.ApiError` + + If this raises, ApiError will contain: + :class:`dropbox.team.SharingAllowlistRemoveError` + """ + arg = team.SharingAllowlistRemoveArgs(domains, + emails) + r = self.request( + team.sharing_allowlist_remove, + 'team', + arg, + None, + ) + return r + def team_team_folder_activate(self, team_folder_id): """ diff --git a/dropbox/files.py b/dropbox/files.py index ecdcba46..10727c8a 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -19,7 +19,8 @@ class AddTagArg(bb.Struct): """ :ivar files.AddTagArg.path: Path to the item to be tagged. - :ivar files.AddTagArg.tag_text: The value of the tag to add. + :ivar files.AddTagArg.tag_text: The value of the tag to add. Will be + automatically converted to lowercase letters. """ __slots__ = [ @@ -6858,7 +6859,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): class RemoveTagArg(bb.Struct): """ :ivar files.RemoveTagArg.path: Path to the item to tag. - :ivar files.RemoveTagArg.tag_text: The tag to remove. + :ivar files.RemoveTagArg.tag_text: The tag to remove. Will be automatically + converted to lowercase letters. """ __slots__ = [ diff --git a/dropbox/openid.py b/dropbox/openid.py index 6e6f25e7..1b540e04 100644 --- a/dropbox/openid.py +++ b/dropbox/openid.py @@ -7,36 +7,29 @@ from stone.backends.python_rsrc import stone_base as bb from stone.backends.python_rsrc import stone_validators as bv -class AuthError(bb.Union): +class OpenIdError(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 openid.OpenIdError.incorrect_openid_scopes: Missing openid claims for + the associated access token. """ _catch_all = 'other' # Attribute is overwritten below the class definition - invalid_token = None - # Attribute is overwritten below the class definition - no_openid_auth = None + incorrect_openid_scopes = None # Attribute is overwritten below the class definition other = None - def is_invalid_token(self): + def is_incorrect_openid_scopes(self): """ - Check if the union tag is ``invalid_token``. + Check if the union tag is ``incorrect_openid_scopes``. :rtype: bool """ - return self._tag == 'invalid_token' - - def is_no_openid_auth(self): - """ - Check if the union tag is ``no_openid_auth``. - - :rtype: bool - """ - return self._tag == 'no_openid_auth' + return self._tag == 'incorrect_openid_scopes' def is_other(self): """ @@ -47,14 +40,13 @@ def is_other(self): return self._tag == 'other' def _process_custom_annotations(self, annotation_type, field_path, processor): - super(AuthError, self)._process_custom_annotations(annotation_type, field_path, processor) + super(OpenIdError, self)._process_custom_annotations(annotation_type, field_path, processor) -AuthError_validator = bv.Union(AuthError) +OpenIdError_validator = bv.Union(OpenIdError) class UserInfoArgs(bb.Struct): """ - This struct is empty. The comment here is intentionally emitted to avoid - indentation issues with Stone. + No Parameters """ __slots__ = [ @@ -70,37 +62,70 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UserInfoArgs_validator = bv.Struct(UserInfoArgs) -class UserInfoError(bb.Struct): +class UserInfoError(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. + """ - __slots__ = [ - '_err_value', - '_error_message_value', - ] + _catch_all = 'other' + # Attribute is overwritten below the class definition + other = None - _has_required_fields = False + @classmethod + def openid_error(cls, val): + """ + Create an instance of this class set to the ``openid_error`` tag with + value ``val``. - def __init__(self, - err=None, - error_message=None): - self._err_value = bb.NOT_SET - self._error_message_value = bb.NOT_SET - if err is not None: - self.err = err - if error_message is not None: - self.error_message = error_message - - # Instance attribute type: ErrUnion (validator is set below) - err = bb.Attribute("err", nullable=True, user_defined=True) + :param OpenIdError val: + :rtype: UserInfoError + """ + return cls('openid_error', val) - # Instance attribute type: str (validator is set below) - error_message = bb.Attribute("error_message") + def is_openid_error(self): + """ + Check if the union tag is ``openid_error``. + + :rtype: bool + """ + return self._tag == 'openid_error' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def get_openid_error(self): + """ + Only call this if :meth:`is_openid_error` is true. + + :rtype: OpenIdError + """ + if not self.is_openid_error(): + raise AttributeError("tag 'openid_error' not set") + return self._value def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserInfoError, self)._process_custom_annotations(annotation_type, field_path, processor) -UserInfoError_validator = bv.Struct(UserInfoError) +UserInfoError_validator = bv.Union(UserInfoError) class UserInfoResult(bb.Struct): + """ + :ivar openid.UserInfoResult.family_name: Last name of user. + :ivar openid.UserInfoResult.given_name: First name of user. + :ivar openid.UserInfoResult.email: Email address of user. + :ivar openid.UserInfoResult.email_verified: If user is email verified. + :ivar openid.UserInfoResult.iss: Issuer of token (in this case Dropbox). + :ivar openid.UserInfoResult.sub: An identifier for the user. This is the + Dropbox account_id, a string value such as + dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc. + """ __slots__ = [ '_family_name_value', @@ -162,85 +187,27 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): UserInfoResult_validator = bv.Struct(UserInfoResult) -class ErrUnion(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 auth_error(cls, val): - """ - Create an instance of this class set to the ``auth_error`` tag with - value ``val``. - - :param AuthError val: - :rtype: ErrUnion - """ - return cls('auth_error', val) - - def is_auth_error(self): - """ - Check if the union tag is ``auth_error``. - - :rtype: bool - """ - return self._tag == 'auth_error' - - def is_other(self): - """ - Check if the union tag is ``other``. - - :rtype: bool - """ - return self._tag == 'other' - - def get_auth_error(self): - """ - Only call this if :meth:`is_auth_error` is true. - - :rtype: AuthError - """ - if not self.is_auth_error(): - raise AttributeError("tag 'auth_error' not set") - return self._value - - def _process_custom_annotations(self, annotation_type, field_path, processor): - super(ErrUnion, self)._process_custom_annotations(annotation_type, field_path, processor) - -ErrUnion_validator = bv.Union(ErrUnion) - -AuthError._invalid_token_validator = bv.Void() -AuthError._no_openid_auth_validator = bv.Void() -AuthError._other_validator = bv.Void() -AuthError._tagmap = { - 'invalid_token': AuthError._invalid_token_validator, - 'no_openid_auth': AuthError._no_openid_auth_validator, - 'other': AuthError._other_validator, +OpenIdError._incorrect_openid_scopes_validator = bv.Void() +OpenIdError._other_validator = bv.Void() +OpenIdError._tagmap = { + 'incorrect_openid_scopes': OpenIdError._incorrect_openid_scopes_validator, + 'other': OpenIdError._other_validator, } -AuthError.invalid_token = AuthError('invalid_token') -AuthError.no_openid_auth = AuthError('no_openid_auth') -AuthError.other = AuthError('other') +OpenIdError.incorrect_openid_scopes = OpenIdError('incorrect_openid_scopes') +OpenIdError.other = OpenIdError('other') UserInfoArgs._all_field_names_ = set([]) UserInfoArgs._all_fields_ = [] -UserInfoError.err.validator = bv.Nullable(ErrUnion_validator) -UserInfoError.error_message.validator = bv.String() -UserInfoError._all_field_names_ = set([ - 'err', - 'error_message', -]) -UserInfoError._all_fields_ = [ - ('err', UserInfoError.err.validator), - ('error_message', UserInfoError.error_message.validator), -] +UserInfoError._openid_error_validator = OpenIdError_validator +UserInfoError._other_validator = bv.Void() +UserInfoError._tagmap = { + 'openid_error': UserInfoError._openid_error_validator, + 'other': UserInfoError._other_validator, +} + +UserInfoError.other = UserInfoError('other') UserInfoResult.family_name.validator = bv.Nullable(bv.String()) UserInfoResult.given_name.validator = bv.Nullable(bv.String()) @@ -265,18 +232,21 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('sub', UserInfoResult.sub.validator), ] -ErrUnion._auth_error_validator = AuthError_validator -ErrUnion._other_validator = bv.Void() -ErrUnion._tagmap = { - 'auth_error': ErrUnion._auth_error_validator, - 'other': ErrUnion._other_validator, -} - -ErrUnion.other = ErrUnion('other') - -UserInfoError.error_message.default = '' UserInfoResult.iss.default = '' UserInfoResult.sub.default = '' +userinfo = bb.Route( + 'userinfo', + 1, + False, + UserInfoArgs_validator, + UserInfoResult_validator, + UserInfoError_validator, + {'auth': 'user', + 'host': 'api', + 'style': 'rpc'}, +) + ROUTES = { + 'userinfo': userinfo, } diff --git a/dropbox/sharing.py b/dropbox/sharing.py index 37547b6c..d66215bc 100644 --- a/dropbox/sharing.py +++ b/dropbox/sharing.py @@ -2264,8 +2264,11 @@ class FileMemberActionIndividualResult(bb.Union): corresponding ``get_*`` method. :ivar Optional[AccessLevel] - sharing.FileMemberActionIndividualResult.success: Member was - successfully removed from this file. If AccessLevel is given, the member + sharing.FileMemberActionIndividualResult.success: Part of the response + for both add_file_member and remove_file_member_v1 (deprecated). For + add_file_member, indicates giving access was successful and at what + AccessLevel. For remove_file_member_v1, indicates member was + successfully removed from the file. If AccessLevel is given, the member still has access via a parent shared folder. :ivar FileMemberActionError FileMemberActionIndividualResult.member_error: User was not able to perform this action. @@ -2313,7 +2316,10 @@ def is_member_error(self): def get_success(self): """ - Member was successfully removed from this file. If AccessLevel is given, + Part of the response for both add_file_member and remove_file_member_v1 + (deprecated). For add_file_member, indicates giving access was + successful and at what AccessLevel. For remove_file_member_v1, indicates + member was successfully removed from the file. If AccessLevel is given, the member still has access via a parent shared folder. Only call this if :meth:`is_success` is true. diff --git a/dropbox/team.py b/dropbox/team.py index 8fc33412..dc25b95a 100644 --- a/dropbox/team.py +++ b/dropbox/team.py @@ -10724,6 +10724,551 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SetCustomQuotaError_validator = bv.Union(SetCustomQuotaError) +class SharingAllowlistAddArgs(bb.Struct): + """ + Structure representing Approve List entries. Domain and emails are + supported. At least one entry of any supported type is required. + + :ivar team.SharingAllowlistAddArgs.domains: List of domains represented by + valid string representation (RFC-1034/5). + :ivar team.SharingAllowlistAddArgs.emails: List of emails represented by + valid string representation (RFC-5322/822). + """ + + __slots__ = [ + '_domains_value', + '_emails_value', + ] + + _has_required_fields = False + + def __init__(self, + domains=None, + emails=None): + self._domains_value = bb.NOT_SET + self._emails_value = bb.NOT_SET + if domains is not None: + self.domains = domains + if emails is not None: + self.emails = emails + + # Instance attribute type: list of [str] (validator is set below) + domains = bb.Attribute("domains", nullable=True) + + # Instance attribute type: list of [str] (validator is set below) + emails = bb.Attribute("emails", nullable=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(SharingAllowlistAddArgs, self)._process_custom_annotations(annotation_type, field_path, processor) + +SharingAllowlistAddArgs_validator = bv.Struct(SharingAllowlistAddArgs) + +class SharingAllowlistAddError(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 team.SharingAllowlistAddError.malformed_entry: One of provided + values is not valid. + :ivar team.SharingAllowlistAddError.no_entries_provided: Neither single + domain nor email provided. + :ivar team.SharingAllowlistAddError.too_many_entries_provided: Too many + entries provided within one call. + :ivar team.SharingAllowlistAddError.team_limit_reached: Team entries limit + reached. + :ivar team.SharingAllowlistAddError.unknown_error: Unknown error. + :ivar str team.SharingAllowlistAddError.entries_already_exist: Entries + already exists. + """ + + _catch_all = 'other' + # Attribute is overwritten below the class definition + no_entries_provided = None + # Attribute is overwritten below the class definition + too_many_entries_provided = None + # Attribute is overwritten below the class definition + team_limit_reached = None + # Attribute is overwritten below the class definition + unknown_error = None + # Attribute is overwritten below the class definition + other = None + + @classmethod + def malformed_entry(cls, val): + """ + Create an instance of this class set to the ``malformed_entry`` tag with + value ``val``. + + :param str val: + :rtype: SharingAllowlistAddError + """ + return cls('malformed_entry', val) + + @classmethod + def entries_already_exist(cls, val): + """ + Create an instance of this class set to the ``entries_already_exist`` + tag with value ``val``. + + :param str val: + :rtype: SharingAllowlistAddError + """ + return cls('entries_already_exist', val) + + def is_malformed_entry(self): + """ + Check if the union tag is ``malformed_entry``. + + :rtype: bool + """ + return self._tag == 'malformed_entry' + + def is_no_entries_provided(self): + """ + Check if the union tag is ``no_entries_provided``. + + :rtype: bool + """ + return self._tag == 'no_entries_provided' + + def is_too_many_entries_provided(self): + """ + Check if the union tag is ``too_many_entries_provided``. + + :rtype: bool + """ + return self._tag == 'too_many_entries_provided' + + def is_team_limit_reached(self): + """ + Check if the union tag is ``team_limit_reached``. + + :rtype: bool + """ + return self._tag == 'team_limit_reached' + + def is_unknown_error(self): + """ + Check if the union tag is ``unknown_error``. + + :rtype: bool + """ + return self._tag == 'unknown_error' + + def is_entries_already_exist(self): + """ + Check if the union tag is ``entries_already_exist``. + + :rtype: bool + """ + return self._tag == 'entries_already_exist' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def get_malformed_entry(self): + """ + One of provided values is not valid. + + Only call this if :meth:`is_malformed_entry` is true. + + :rtype: str + """ + if not self.is_malformed_entry(): + raise AttributeError("tag 'malformed_entry' not set") + return self._value + + def get_entries_already_exist(self): + """ + Entries already exists. + + Only call this if :meth:`is_entries_already_exist` is true. + + :rtype: str + """ + if not self.is_entries_already_exist(): + raise AttributeError("tag 'entries_already_exist' not set") + return self._value + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(SharingAllowlistAddError, self)._process_custom_annotations(annotation_type, field_path, processor) + +SharingAllowlistAddError_validator = bv.Union(SharingAllowlistAddError) + +class SharingAllowlistAddResponse(bb.Struct): + """ + This struct is empty. The comment here is intentionally emitted to avoid + indentation issues with Stone. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(SharingAllowlistAddResponse, self)._process_custom_annotations(annotation_type, field_path, processor) + +SharingAllowlistAddResponse_validator = bv.Struct(SharingAllowlistAddResponse) + +class SharingAllowlistListArg(bb.Struct): + """ + :ivar team.SharingAllowlistListArg.limit: The number of entries to fetch at + one time. + """ + + __slots__ = [ + '_limit_value', + ] + + _has_required_fields = False + + def __init__(self, + limit=None): + self._limit_value = bb.NOT_SET + if limit is not None: + self.limit = limit + + # Instance attribute type: int (validator is set below) + limit = bb.Attribute("limit") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(SharingAllowlistListArg, self)._process_custom_annotations(annotation_type, field_path, processor) + +SharingAllowlistListArg_validator = bv.Struct(SharingAllowlistListArg) + +class SharingAllowlistListContinueArg(bb.Struct): + """ + :ivar team.SharingAllowlistListContinueArg.cursor: The cursor returned from + a previous call to + :meth:`dropbox.dropbox_client.Dropbox.team_sharing_allowlist_list` or + :meth:`dropbox.dropbox_client.Dropbox.team_sharing_allowlist_list_continue`. + """ + + __slots__ = [ + '_cursor_value', + ] + + _has_required_fields = True + + def __init__(self, + cursor=None): + self._cursor_value = bb.NOT_SET + if cursor is not None: + self.cursor = cursor + + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(SharingAllowlistListContinueArg, self)._process_custom_annotations(annotation_type, field_path, processor) + +SharingAllowlistListContinueArg_validator = bv.Struct(SharingAllowlistListContinueArg) + +class SharingAllowlistListContinueError(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.SharingAllowlistListContinueError.invalid_cursor: Provided cursor + is not valid. + """ + + _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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(SharingAllowlistListContinueError, self)._process_custom_annotations(annotation_type, field_path, processor) + +SharingAllowlistListContinueError_validator = bv.Union(SharingAllowlistListContinueError) + +class SharingAllowlistListError(bb.Struct): + """ + This struct is empty. The comment here is intentionally emitted to avoid + indentation issues with Stone. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(SharingAllowlistListError, self)._process_custom_annotations(annotation_type, field_path, processor) + +SharingAllowlistListError_validator = bv.Struct(SharingAllowlistListError) + +class SharingAllowlistListResponse(bb.Struct): + """ + :ivar team.SharingAllowlistListResponse.domains: List of domains represented + by valid string representation (RFC-1034/5). + :ivar team.SharingAllowlistListResponse.emails: List of emails represented + by valid string representation (RFC-5322/822). + :ivar team.SharingAllowlistListResponse.cursor: If this is nonempty, there + are more entries that can be fetched with + :meth:`dropbox.dropbox_client.Dropbox.team_sharing_allowlist_list_continue`. + :ivar team.SharingAllowlistListResponse.has_more: if true indicates that + more entries can be fetched with + :meth:`dropbox.dropbox_client.Dropbox.team_sharing_allowlist_list_continue`. + """ + + __slots__ = [ + '_domains_value', + '_emails_value', + '_cursor_value', + '_has_more_value', + ] + + _has_required_fields = True + + def __init__(self, + domains=None, + emails=None, + cursor=None, + has_more=None): + self._domains_value = bb.NOT_SET + self._emails_value = bb.NOT_SET + self._cursor_value = bb.NOT_SET + self._has_more_value = bb.NOT_SET + if domains is not None: + self.domains = domains + if emails is not None: + self.emails = emails + if cursor is not None: + self.cursor = cursor + if has_more is not None: + self.has_more = has_more + + # Instance attribute type: list of [str] (validator is set below) + domains = bb.Attribute("domains") + + # Instance attribute type: list of [str] (validator is set below) + emails = bb.Attribute("emails") + + # Instance attribute type: str (validator is set below) + cursor = bb.Attribute("cursor") + + # Instance attribute type: bool (validator is set below) + has_more = bb.Attribute("has_more") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(SharingAllowlistListResponse, self)._process_custom_annotations(annotation_type, field_path, processor) + +SharingAllowlistListResponse_validator = bv.Struct(SharingAllowlistListResponse) + +class SharingAllowlistRemoveArgs(bb.Struct): + """ + :ivar team.SharingAllowlistRemoveArgs.domains: List of domains represented + by valid string representation (RFC-1034/5). + :ivar team.SharingAllowlistRemoveArgs.emails: List of emails represented by + valid string representation (RFC-5322/822). + """ + + __slots__ = [ + '_domains_value', + '_emails_value', + ] + + _has_required_fields = False + + def __init__(self, + domains=None, + emails=None): + self._domains_value = bb.NOT_SET + self._emails_value = bb.NOT_SET + if domains is not None: + self.domains = domains + if emails is not None: + self.emails = emails + + # Instance attribute type: list of [str] (validator is set below) + domains = bb.Attribute("domains", nullable=True) + + # Instance attribute type: list of [str] (validator is set below) + emails = bb.Attribute("emails", nullable=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(SharingAllowlistRemoveArgs, self)._process_custom_annotations(annotation_type, field_path, processor) + +SharingAllowlistRemoveArgs_validator = bv.Struct(SharingAllowlistRemoveArgs) + +class SharingAllowlistRemoveError(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 team.SharingAllowlistRemoveError.malformed_entry: One of provided + values is not valid. + :ivar str team.SharingAllowlistRemoveError.entries_do_not_exist: One or more + provided values do not exist. + :ivar team.SharingAllowlistRemoveError.no_entries_provided: Neither single + domain nor email provided. + :ivar team.SharingAllowlistRemoveError.too_many_entries_provided: Too many + entries provided within one call. + :ivar team.SharingAllowlistRemoveError.unknown_error: Unknown error. + """ + + _catch_all = 'other' + # Attribute is overwritten below the class definition + no_entries_provided = None + # Attribute is overwritten below the class definition + too_many_entries_provided = None + # Attribute is overwritten below the class definition + unknown_error = None + # Attribute is overwritten below the class definition + other = None + + @classmethod + def malformed_entry(cls, val): + """ + Create an instance of this class set to the ``malformed_entry`` tag with + value ``val``. + + :param str val: + :rtype: SharingAllowlistRemoveError + """ + return cls('malformed_entry', val) + + @classmethod + def entries_do_not_exist(cls, val): + """ + Create an instance of this class set to the ``entries_do_not_exist`` tag + with value ``val``. + + :param str val: + :rtype: SharingAllowlistRemoveError + """ + return cls('entries_do_not_exist', val) + + def is_malformed_entry(self): + """ + Check if the union tag is ``malformed_entry``. + + :rtype: bool + """ + return self._tag == 'malformed_entry' + + def is_entries_do_not_exist(self): + """ + Check if the union tag is ``entries_do_not_exist``. + + :rtype: bool + """ + return self._tag == 'entries_do_not_exist' + + def is_no_entries_provided(self): + """ + Check if the union tag is ``no_entries_provided``. + + :rtype: bool + """ + return self._tag == 'no_entries_provided' + + def is_too_many_entries_provided(self): + """ + Check if the union tag is ``too_many_entries_provided``. + + :rtype: bool + """ + return self._tag == 'too_many_entries_provided' + + def is_unknown_error(self): + """ + Check if the union tag is ``unknown_error``. + + :rtype: bool + """ + return self._tag == 'unknown_error' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def get_malformed_entry(self): + """ + One of provided values is not valid. + + Only call this if :meth:`is_malformed_entry` is true. + + :rtype: str + """ + if not self.is_malformed_entry(): + raise AttributeError("tag 'malformed_entry' not set") + return self._value + + def get_entries_do_not_exist(self): + """ + One or more provided values do not exist. + + Only call this if :meth:`is_entries_do_not_exist` is true. + + :rtype: str + """ + if not self.is_entries_do_not_exist(): + raise AttributeError("tag 'entries_do_not_exist' not set") + return self._value + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(SharingAllowlistRemoveError, self)._process_custom_annotations(annotation_type, field_path, processor) + +SharingAllowlistRemoveError_validator = bv.Union(SharingAllowlistRemoveError) + +class SharingAllowlistRemoveResponse(bb.Struct): + """ + This struct is empty. The comment here is intentionally emitted to avoid + indentation issues with Stone. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(SharingAllowlistRemoveResponse, self)._process_custom_annotations(annotation_type, field_path, processor) + +SharingAllowlistRemoveResponse_validator = bv.Struct(SharingAllowlistRemoveResponse) + class StorageBucket(bb.Struct): """ Describes the number of users in a specific storage bucket. @@ -15746,6 +16291,115 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SetCustomQuotaError.some_users_are_excluded = SetCustomQuotaError('some_users_are_excluded') +SharingAllowlistAddArgs.domains.validator = bv.Nullable(bv.List(bv.String())) +SharingAllowlistAddArgs.emails.validator = bv.Nullable(bv.List(bv.String())) +SharingAllowlistAddArgs._all_field_names_ = set([ + 'domains', + 'emails', +]) +SharingAllowlistAddArgs._all_fields_ = [ + ('domains', SharingAllowlistAddArgs.domains.validator), + ('emails', SharingAllowlistAddArgs.emails.validator), +] + +SharingAllowlistAddError._malformed_entry_validator = bv.String() +SharingAllowlistAddError._no_entries_provided_validator = bv.Void() +SharingAllowlistAddError._too_many_entries_provided_validator = bv.Void() +SharingAllowlistAddError._team_limit_reached_validator = bv.Void() +SharingAllowlistAddError._unknown_error_validator = bv.Void() +SharingAllowlistAddError._entries_already_exist_validator = bv.String() +SharingAllowlistAddError._other_validator = bv.Void() +SharingAllowlistAddError._tagmap = { + 'malformed_entry': SharingAllowlistAddError._malformed_entry_validator, + 'no_entries_provided': SharingAllowlistAddError._no_entries_provided_validator, + 'too_many_entries_provided': SharingAllowlistAddError._too_many_entries_provided_validator, + 'team_limit_reached': SharingAllowlistAddError._team_limit_reached_validator, + 'unknown_error': SharingAllowlistAddError._unknown_error_validator, + 'entries_already_exist': SharingAllowlistAddError._entries_already_exist_validator, + 'other': SharingAllowlistAddError._other_validator, +} + +SharingAllowlistAddError.no_entries_provided = SharingAllowlistAddError('no_entries_provided') +SharingAllowlistAddError.too_many_entries_provided = SharingAllowlistAddError('too_many_entries_provided') +SharingAllowlistAddError.team_limit_reached = SharingAllowlistAddError('team_limit_reached') +SharingAllowlistAddError.unknown_error = SharingAllowlistAddError('unknown_error') +SharingAllowlistAddError.other = SharingAllowlistAddError('other') + +SharingAllowlistAddResponse._all_field_names_ = set([]) +SharingAllowlistAddResponse._all_fields_ = [] + +SharingAllowlistListArg.limit.validator = bv.UInt32(min_value=1, max_value=1000) +SharingAllowlistListArg._all_field_names_ = set(['limit']) +SharingAllowlistListArg._all_fields_ = [('limit', SharingAllowlistListArg.limit.validator)] + +SharingAllowlistListContinueArg.cursor.validator = bv.String() +SharingAllowlistListContinueArg._all_field_names_ = set(['cursor']) +SharingAllowlistListContinueArg._all_fields_ = [('cursor', SharingAllowlistListContinueArg.cursor.validator)] + +SharingAllowlistListContinueError._invalid_cursor_validator = bv.Void() +SharingAllowlistListContinueError._other_validator = bv.Void() +SharingAllowlistListContinueError._tagmap = { + 'invalid_cursor': SharingAllowlistListContinueError._invalid_cursor_validator, + 'other': SharingAllowlistListContinueError._other_validator, +} + +SharingAllowlistListContinueError.invalid_cursor = SharingAllowlistListContinueError('invalid_cursor') +SharingAllowlistListContinueError.other = SharingAllowlistListContinueError('other') + +SharingAllowlistListError._all_field_names_ = set([]) +SharingAllowlistListError._all_fields_ = [] + +SharingAllowlistListResponse.domains.validator = bv.List(bv.String()) +SharingAllowlistListResponse.emails.validator = bv.List(bv.String()) +SharingAllowlistListResponse.cursor.validator = bv.String() +SharingAllowlistListResponse.has_more.validator = bv.Boolean() +SharingAllowlistListResponse._all_field_names_ = set([ + 'domains', + 'emails', + 'cursor', + 'has_more', +]) +SharingAllowlistListResponse._all_fields_ = [ + ('domains', SharingAllowlistListResponse.domains.validator), + ('emails', SharingAllowlistListResponse.emails.validator), + ('cursor', SharingAllowlistListResponse.cursor.validator), + ('has_more', SharingAllowlistListResponse.has_more.validator), +] + +SharingAllowlistRemoveArgs.domains.validator = bv.Nullable(bv.List(bv.String())) +SharingAllowlistRemoveArgs.emails.validator = bv.Nullable(bv.List(bv.String())) +SharingAllowlistRemoveArgs._all_field_names_ = set([ + 'domains', + 'emails', +]) +SharingAllowlistRemoveArgs._all_fields_ = [ + ('domains', SharingAllowlistRemoveArgs.domains.validator), + ('emails', SharingAllowlistRemoveArgs.emails.validator), +] + +SharingAllowlistRemoveError._malformed_entry_validator = bv.String() +SharingAllowlistRemoveError._entries_do_not_exist_validator = bv.String() +SharingAllowlistRemoveError._no_entries_provided_validator = bv.Void() +SharingAllowlistRemoveError._too_many_entries_provided_validator = bv.Void() +SharingAllowlistRemoveError._unknown_error_validator = bv.Void() +SharingAllowlistRemoveError._other_validator = bv.Void() +SharingAllowlistRemoveError._tagmap = { + 'malformed_entry': SharingAllowlistRemoveError._malformed_entry_validator, + 'entries_do_not_exist': SharingAllowlistRemoveError._entries_do_not_exist_validator, + 'no_entries_provided': SharingAllowlistRemoveError._no_entries_provided_validator, + 'too_many_entries_provided': SharingAllowlistRemoveError._too_many_entries_provided_validator, + 'unknown_error': SharingAllowlistRemoveError._unknown_error_validator, + 'other': SharingAllowlistRemoveError._other_validator, +} + +SharingAllowlistRemoveError.no_entries_provided = SharingAllowlistRemoveError('no_entries_provided') +SharingAllowlistRemoveError.too_many_entries_provided = SharingAllowlistRemoveError('too_many_entries_provided') +SharingAllowlistRemoveError.unknown_error = SharingAllowlistRemoveError('unknown_error') +SharingAllowlistRemoveError.other = SharingAllowlistRemoveError('other') + +SharingAllowlistRemoveResponse._all_field_names_ = set([]) +SharingAllowlistRemoveResponse._all_fields_ = [] + StorageBucket.bucket.validator = bv.String() StorageBucket.users.validator = bv.UInt64() StorageBucket._all_field_names_ = set([ @@ -16308,6 +16962,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): MembersRemoveArg.retain_team_shares.default = False RevokeDesktopClientArg.delete_on_unlink.default = False RevokeLinkedApiAppArg.keep_app_folder.default = True +SharingAllowlistListArg.limit.default = 1000 +SharingAllowlistListResponse.cursor.default = '' +SharingAllowlistListResponse.has_more.default = False TeamFolderArchiveArg.force_async_off.default = False TeamFolderListArg.limit.default = 1000 TeamNamespacesListArg.limit.default = 1000 @@ -17169,6 +17826,50 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'host': 'api', 'style': 'rpc'}, ) +sharing_allowlist_add = bb.Route( + 'sharing_allowlist/add', + 1, + False, + SharingAllowlistAddArgs_validator, + SharingAllowlistAddResponse_validator, + SharingAllowlistAddError_validator, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, +) +sharing_allowlist_list = bb.Route( + 'sharing_allowlist/list', + 1, + False, + SharingAllowlistListArg_validator, + SharingAllowlistListResponse_validator, + SharingAllowlistListError_validator, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, +) +sharing_allowlist_list_continue = bb.Route( + 'sharing_allowlist/list/continue', + 1, + False, + SharingAllowlistListContinueArg_validator, + SharingAllowlistListResponse_validator, + SharingAllowlistListContinueError_validator, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, +) +sharing_allowlist_remove = bb.Route( + 'sharing_allowlist/remove', + 1, + False, + SharingAllowlistRemoveArgs_validator, + SharingAllowlistRemoveResponse_validator, + SharingAllowlistRemoveError_validator, + {'auth': 'team', + 'host': 'api', + 'style': 'rpc'}, +) team_folder_activate = bb.Route( 'team_folder/activate', 1, @@ -17370,6 +18071,10 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'reports/get_devices': reports_get_devices, 'reports/get_membership': reports_get_membership, 'reports/get_storage': reports_get_storage, + 'sharing_allowlist/add': sharing_allowlist_add, + 'sharing_allowlist/list': sharing_allowlist_list, + 'sharing_allowlist/list/continue': sharing_allowlist_list_continue, + 'sharing_allowlist/remove': sharing_allowlist_remove, 'team_folder/activate': team_folder_activate, 'team_folder/archive': team_folder_archive, 'team_folder/archive/check': team_folder_archive_check, diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 11c4feef..e30ecaaf 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -1864,7 +1864,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): class AdminEmailRemindersChangedDetails(bb.Struct): """ - Changed admin email reminder policy for team requests to join. + Changed admin reminder settings for requests to join the team. :ivar team_log.AdminEmailRemindersChangedDetails.new_value: To. :ivar team_log.AdminEmailRemindersChangedDetails.previous_value: From. @@ -12619,6 +12619,18 @@ def file_locking_policy_changed_details(cls, val): """ return cls('file_locking_policy_changed_details', val) + @classmethod + def file_provider_migration_policy_changed_details(cls, val): + """ + Create an instance of this class set to the + ``file_provider_migration_policy_changed_details`` tag with value + ``val``. + + :param FileProviderMigrationPolicyChangedDetails val: + :rtype: EventDetails + """ + return cls('file_provider_migration_policy_changed_details', val) + @classmethod def file_requests_change_policy_details(cls, val): """ @@ -16817,6 +16829,14 @@ def is_file_locking_policy_changed_details(self): """ return self._tag == 'file_locking_policy_changed_details' + def is_file_provider_migration_policy_changed_details(self): + """ + Check if the union tag is ``file_provider_migration_policy_changed_details``. + + :rtype: bool + """ + return self._tag == 'file_provider_migration_policy_changed_details' + def is_file_requests_change_policy_details(self): """ Check if the union tag is ``file_requests_change_policy_details``. @@ -21451,6 +21471,16 @@ def get_file_locking_policy_changed_details(self): raise AttributeError("tag 'file_locking_policy_changed_details' not set") return self._value + def get_file_provider_migration_policy_changed_details(self): + """ + Only call this if :meth:`is_file_provider_migration_policy_changed_details` is true. + + :rtype: FileProviderMigrationPolicyChangedDetails + """ + if not self.is_file_provider_migration_policy_changed_details(): + raise AttributeError("tag 'file_provider_migration_policy_changed_details' not set") + return self._value + def get_file_requests_change_policy_details(self): """ Only call this if :meth:`is_file_requests_change_policy_details` is true. @@ -23304,7 +23334,7 @@ class EventType(bb.Union): capture setting on team domain :ivar AdminEmailRemindersChangedType EventType.admin_email_reminders_changed: (team_policies) Changed admin - email reminder policy for team requests to join + reminder settings for requests to join the team :ivar AllowDownloadDisabledType EventType.allow_download_disabled: (team_policies) Disabled downloads (deprecated, no longer logged) :ivar AllowDownloadEnabledType EventType.allow_download_enabled: @@ -23378,6 +23408,9 @@ class EventType(bb.Union): (team_policies) Enabled/disabled commenting on team files :ivar FileLockingPolicyChangedType EventType.file_locking_policy_changed: (team_policies) Changed file locking policy for team + :ivar FileProviderMigrationPolicyChangedType + EventType.file_provider_migration_policy_changed: (team_policies) + Changed File Provider Migration policy for team :ivar FileRequestsChangePolicyType EventType.file_requests_change_policy: (team_policies) Enabled/disabled file requests :ivar FileRequestsEmailsEnabledType EventType.file_requests_emails_enabled: @@ -27863,6 +27896,17 @@ def file_locking_policy_changed(cls, val): """ return cls('file_locking_policy_changed', val) + @classmethod + def file_provider_migration_policy_changed(cls, val): + """ + Create an instance of this class set to the + ``file_provider_migration_policy_changed`` tag with value ``val``. + + :param FileProviderMigrationPolicyChangedType val: + :rtype: EventType + """ + return cls('file_provider_migration_policy_changed', val) + @classmethod def file_requests_change_policy(cls, val): """ @@ -32037,6 +32081,14 @@ def is_file_locking_policy_changed(self): """ return self._tag == 'file_locking_policy_changed' + def is_file_provider_migration_policy_changed(self): + """ + Check if the union tag is ``file_provider_migration_policy_changed``. + + :rtype: bool + """ + return self._tag == 'file_provider_migration_policy_changed' + def is_file_requests_change_policy(self): """ Check if the union tag is ``file_requests_change_policy``. @@ -37135,8 +37187,8 @@ def get_account_capture_change_policy(self): def get_admin_email_reminders_changed(self): """ - (team_policies) Changed admin email reminder policy for team requests to - join + (team_policies) Changed admin reminder settings for requests to join the + team Only call this if :meth:`is_admin_email_reminders_changed` is true. @@ -37477,6 +37529,18 @@ def get_file_locking_policy_changed(self): raise AttributeError("tag 'file_locking_policy_changed' not set") return self._value + def get_file_provider_migration_policy_changed(self): + """ + (team_policies) Changed File Provider Migration policy for team + + Only call this if :meth:`is_file_provider_migration_policy_changed` is true. + + :rtype: FileProviderMigrationPolicyChangedType + """ + if not self.is_file_provider_migration_policy_changed(): + raise AttributeError("tag 'file_provider_migration_policy_changed' not set") + return self._value + def get_file_requests_change_policy(self): """ (team_policies) Enabled/disabled file requests @@ -39433,7 +39497,7 @@ class EventTypeArg(bb.Union): :ivar team_log.EventTypeArg.account_capture_change_policy: (team_policies) Changed account capture setting on team domain :ivar team_log.EventTypeArg.admin_email_reminders_changed: (team_policies) - Changed admin email reminder policy for team requests to join + Changed admin reminder settings for requests to join the team :ivar team_log.EventTypeArg.allow_download_disabled: (team_policies) Disabled downloads (deprecated, no longer logged) :ivar team_log.EventTypeArg.allow_download_enabled: (team_policies) Enabled @@ -39494,6 +39558,8 @@ class EventTypeArg(bb.Union): Enabled/disabled commenting on team files :ivar team_log.EventTypeArg.file_locking_policy_changed: (team_policies) Changed file locking policy for team + :ivar team_log.EventTypeArg.file_provider_migration_policy_changed: + (team_policies) Changed File Provider Migration policy for team :ivar team_log.EventTypeArg.file_requests_change_policy: (team_policies) Enabled/disabled file requests :ivar team_log.EventTypeArg.file_requests_emails_enabled: (team_policies) @@ -40499,6 +40565,8 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition file_locking_policy_changed = None # Attribute is overwritten below the class definition + file_provider_migration_policy_changed = 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 @@ -43751,6 +43819,14 @@ def is_file_locking_policy_changed(self): """ return self._tag == 'file_locking_policy_changed' + def is_file_provider_migration_policy_changed(self): + """ + Check if the union tag is ``file_provider_migration_policy_changed``. + + :rtype: bool + """ + return self._tag == 'file_provider_migration_policy_changed' + def is_file_requests_change_policy(self): """ Check if the union tag is ``file_requests_change_policy``. @@ -46690,6 +46766,65 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): FilePreviewType_validator = bv.Struct(FilePreviewType) +class FileProviderMigrationPolicyChangedDetails(bb.Struct): + """ + Changed File Provider Migration policy for team. + + :ivar team_log.FileProviderMigrationPolicyChangedDetails.new_value: To. + :ivar team_log.FileProviderMigrationPolicyChangedDetails.previous_value: + From. + """ + + __slots__ = [ + '_new_value_value', + '_previous_value_value', + ] + + _has_required_fields = True + + def __init__(self, + new_value=None, + previous_value=None): + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + if new_value is not None: + self.new_value = new_value + if previous_value is not None: + self.previous_value = previous_value + + # Instance attribute type: team_policies.FileProviderMigrationPolicyState (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) + + # Instance attribute type: team_policies.FileProviderMigrationPolicyState (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(FileProviderMigrationPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +FileProviderMigrationPolicyChangedDetails_validator = bv.Struct(FileProviderMigrationPolicyChangedDetails) + +class FileProviderMigrationPolicyChangedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(FileProviderMigrationPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +FileProviderMigrationPolicyChangedType_validator = bv.Struct(FileProviderMigrationPolicyChangedType) + class FileRenameDetails(bb.Struct): """ Renamed files and/or folders. @@ -69188,6 +69323,8 @@ class TeamMembershipType(bb.Union): # Attribute is overwritten below the class definition full = None # Attribute is overwritten below the class definition + guest = None + # Attribute is overwritten below the class definition other = None def is_free(self): @@ -69206,6 +69343,14 @@ def is_full(self): """ return self._tag == 'full' + def is_guest(self): + """ + Check if the union tag is ``guest``. + + :rtype: bool + """ + return self._tag == 'guest' + def is_other(self): """ Check if the union tag is ``other``. @@ -75420,6 +75565,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._external_drive_backup_policy_changed_details_validator = ExternalDriveBackupPolicyChangedDetails_validator EventDetails._file_comments_change_policy_details_validator = FileCommentsChangePolicyDetails_validator EventDetails._file_locking_policy_changed_details_validator = FileLockingPolicyChangedDetails_validator +EventDetails._file_provider_migration_policy_changed_details_validator = FileProviderMigrationPolicyChangedDetails_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 @@ -75905,6 +76051,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'external_drive_backup_policy_changed_details': EventDetails._external_drive_backup_policy_changed_details_validator, 'file_comments_change_policy_details': EventDetails._file_comments_change_policy_details_validator, 'file_locking_policy_changed_details': EventDetails._file_locking_policy_changed_details_validator, + 'file_provider_migration_policy_changed_details': EventDetails._file_provider_migration_policy_changed_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, @@ -76393,6 +76540,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._external_drive_backup_policy_changed_validator = ExternalDriveBackupPolicyChangedType_validator EventType._file_comments_change_policy_validator = FileCommentsChangePolicyType_validator EventType._file_locking_policy_changed_validator = FileLockingPolicyChangedType_validator +EventType._file_provider_migration_policy_changed_validator = FileProviderMigrationPolicyChangedType_validator EventType._file_requests_change_policy_validator = FileRequestsChangePolicyType_validator EventType._file_requests_emails_enabled_validator = FileRequestsEmailsEnabledType_validator EventType._file_requests_emails_restricted_to_team_only_validator = FileRequestsEmailsRestrictedToTeamOnlyType_validator @@ -76877,6 +77025,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'external_drive_backup_policy_changed': EventType._external_drive_backup_policy_changed_validator, 'file_comments_change_policy': EventType._file_comments_change_policy_validator, 'file_locking_policy_changed': EventType._file_locking_policy_changed_validator, + 'file_provider_migration_policy_changed': EventType._file_provider_migration_policy_changed_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, @@ -77364,6 +77513,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._external_drive_backup_policy_changed_validator = bv.Void() EventTypeArg._file_comments_change_policy_validator = bv.Void() EventTypeArg._file_locking_policy_changed_validator = bv.Void() +EventTypeArg._file_provider_migration_policy_changed_validator = bv.Void() EventTypeArg._file_requests_change_policy_validator = bv.Void() EventTypeArg._file_requests_emails_enabled_validator = bv.Void() EventTypeArg._file_requests_emails_restricted_to_team_only_validator = bv.Void() @@ -77848,6 +77998,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'external_drive_backup_policy_changed': EventTypeArg._external_drive_backup_policy_changed_validator, 'file_comments_change_policy': EventTypeArg._file_comments_change_policy_validator, 'file_locking_policy_changed': EventTypeArg._file_locking_policy_changed_validator, + 'file_provider_migration_policy_changed': EventTypeArg._file_provider_migration_policy_changed_validator, 'file_requests_change_policy': EventTypeArg._file_requests_change_policy_validator, 'file_requests_emails_enabled': EventTypeArg._file_requests_emails_enabled_validator, 'file_requests_emails_restricted_to_team_only': EventTypeArg._file_requests_emails_restricted_to_team_only_validator, @@ -78333,6 +78484,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.external_drive_backup_policy_changed = EventTypeArg('external_drive_backup_policy_changed') EventTypeArg.file_comments_change_policy = EventTypeArg('file_comments_change_policy') EventTypeArg.file_locking_policy_changed = EventTypeArg('file_locking_policy_changed') +EventTypeArg.file_provider_migration_policy_changed = EventTypeArg('file_provider_migration_policy_changed') EventTypeArg.file_requests_change_policy = EventTypeArg('file_requests_change_policy') EventTypeArg.file_requests_emails_enabled = EventTypeArg('file_requests_emails_enabled') EventTypeArg.file_requests_emails_restricted_to_team_only = EventTypeArg('file_requests_emails_restricted_to_team_only') @@ -78899,6 +79051,21 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): FilePreviewType._all_field_names_ = set(['description']) FilePreviewType._all_fields_ = [('description', FilePreviewType.description.validator)] +FileProviderMigrationPolicyChangedDetails.new_value.validator = team_policies.FileProviderMigrationPolicyState_validator +FileProviderMigrationPolicyChangedDetails.previous_value.validator = team_policies.FileProviderMigrationPolicyState_validator +FileProviderMigrationPolicyChangedDetails._all_field_names_ = set([ + 'new_value', + 'previous_value', +]) +FileProviderMigrationPolicyChangedDetails._all_fields_ = [ + ('new_value', FileProviderMigrationPolicyChangedDetails.new_value.validator), + ('previous_value', FileProviderMigrationPolicyChangedDetails.previous_value.validator), +] + +FileProviderMigrationPolicyChangedType.description.validator = bv.String() +FileProviderMigrationPolicyChangedType._all_field_names_ = set(['description']) +FileProviderMigrationPolicyChangedType._all_fields_ = [('description', FileProviderMigrationPolicyChangedType.description.validator)] + 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)] @@ -84046,15 +84213,18 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamMembershipType._free_validator = bv.Void() TeamMembershipType._full_validator = bv.Void() +TeamMembershipType._guest_validator = bv.Void() TeamMembershipType._other_validator = bv.Void() TeamMembershipType._tagmap = { 'free': TeamMembershipType._free_validator, 'full': TeamMembershipType._full_validator, + 'guest': TeamMembershipType._guest_validator, 'other': TeamMembershipType._other_validator, } TeamMembershipType.free = TeamMembershipType('free') TeamMembershipType.full = TeamMembershipType('full') +TeamMembershipType.guest = TeamMembershipType('guest') TeamMembershipType.other = TeamMembershipType('other') TeamMergeFromDetails.team_name.validator = bv.String() diff --git a/dropbox/team_policies.py b/dropbox/team_policies.py index 045a5df1..c6b9fbeb 100644 --- a/dropbox/team_policies.py +++ b/dropbox/team_policies.py @@ -1405,12 +1405,15 @@ class TeamSharingPolicies(bb.Struct): shared folders team members can join. :ivar team_policies.TeamSharingPolicies.shared_link_create_policy: Who can view shared links owned by team members. + :ivar team_policies.TeamSharingPolicies.group_creation_policy: Who can + create groups. """ __slots__ = [ '_shared_folder_member_policy_value', '_shared_folder_join_policy_value', '_shared_link_create_policy_value', + '_group_creation_policy_value', ] _has_required_fields = True @@ -1418,16 +1421,20 @@ class TeamSharingPolicies(bb.Struct): def __init__(self, shared_folder_member_policy=None, shared_folder_join_policy=None, - shared_link_create_policy=None): + shared_link_create_policy=None, + group_creation_policy=None): self._shared_folder_member_policy_value = bb.NOT_SET self._shared_folder_join_policy_value = bb.NOT_SET self._shared_link_create_policy_value = bb.NOT_SET + self._group_creation_policy_value = bb.NOT_SET 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 + if group_creation_policy is not None: + self.group_creation_policy = group_creation_policy # Instance attribute type: SharedFolderMemberPolicy (validator is set below) shared_folder_member_policy = bb.Attribute("shared_folder_member_policy", user_defined=True) @@ -1438,6 +1445,9 @@ def __init__(self, # Instance attribute type: SharedLinkCreatePolicy (validator is set below) shared_link_create_policy = bb.Attribute("shared_link_create_policy", user_defined=True) + # Instance attribute type: GroupCreation (validator is set below) + group_creation_policy = bb.Attribute("group_creation_policy", user_defined=True) + def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamSharingPolicies, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -1922,15 +1932,18 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 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.group_creation_policy.validator = GroupCreation_validator TeamSharingPolicies._all_field_names_ = set([ 'shared_folder_member_policy', 'shared_folder_join_policy', 'shared_link_create_policy', + 'group_creation_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), + ('group_creation_policy', TeamSharingPolicies.group_creation_policy.validator), ] TwoStepVerificationPolicy._require_tfa_enable_validator = bv.Void() diff --git a/spec b/spec index f91238c7..18963b8a 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit f91238c7508770245030a449d86bd698d30ebfc3 +Subproject commit 18963b8a29fe125f6495d36c38eda5db2710d0dd From 9895d705317583cedb9fc11e5aa1f17f6bea303a Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 9 Nov 2022 17:31:03 -0500 Subject: [PATCH 77/90] Automated Spec Update (#452) 3d1080a021a67c335c52361d8f61ec558bb80606 Change Notes: shared_links Namespace Update RequestedLinkAccessLevel union team Namespace Update TeamGetInfoResult struct team_log_generated Namespace Add FolderLinkRestrictionPolicyChangedDetails, FolderLinkRestrictionPolicyChangedType structs Add FolderLinkRestrictionPolicy unions Co-authored-by: DropboxBot --- dropbox/sharing.py | 15 +++ dropbox/team.py | 13 +++ dropbox/team_log.py | 217 ++++++++++++++++++++++++++++++++++++++++++++ spec | 2 +- 4 files changed, 246 insertions(+), 1 deletion(-) diff --git a/dropbox/sharing.py b/dropbox/sharing.py index d66215bc..3564024e 100644 --- a/dropbox/sharing.py +++ b/dropbox/sharing.py @@ -7683,6 +7683,8 @@ class RequestedLinkAccessLevel(bb.Union): edit links yet. :ivar sharing.RequestedLinkAccessLevel.max: Request for the maximum access level you can set the link to. + :ivar sharing.RequestedLinkAccessLevel.default: Request for the default + access level the user has set. """ _catch_all = 'other' @@ -7693,6 +7695,8 @@ class RequestedLinkAccessLevel(bb.Union): # Attribute is overwritten below the class definition max = None # Attribute is overwritten below the class definition + default = None + # Attribute is overwritten below the class definition other = None def is_viewer(self): @@ -7719,6 +7723,14 @@ def is_max(self): """ return self._tag == 'max' + def is_default(self): + """ + Check if the union tag is ``default``. + + :rtype: bool + """ + return self._tag == 'default' + def is_other(self): """ Check if the union tag is ``other``. @@ -12715,17 +12727,20 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RequestedLinkAccessLevel._viewer_validator = bv.Void() RequestedLinkAccessLevel._editor_validator = bv.Void() RequestedLinkAccessLevel._max_validator = bv.Void() +RequestedLinkAccessLevel._default_validator = bv.Void() RequestedLinkAccessLevel._other_validator = bv.Void() RequestedLinkAccessLevel._tagmap = { 'viewer': RequestedLinkAccessLevel._viewer_validator, 'editor': RequestedLinkAccessLevel._editor_validator, 'max': RequestedLinkAccessLevel._max_validator, + 'default': RequestedLinkAccessLevel._default_validator, 'other': RequestedLinkAccessLevel._other_validator, } RequestedLinkAccessLevel.viewer = RequestedLinkAccessLevel('viewer') RequestedLinkAccessLevel.editor = RequestedLinkAccessLevel('editor') RequestedLinkAccessLevel.max = RequestedLinkAccessLevel('max') +RequestedLinkAccessLevel.default = RequestedLinkAccessLevel('default') RequestedLinkAccessLevel.other = RequestedLinkAccessLevel('other') RevokeSharedLinkArg.url.validator = bv.String() diff --git a/dropbox/team.py b/dropbox/team.py index dc25b95a..552f7251 100644 --- a/dropbox/team.py +++ b/dropbox/team.py @@ -12376,6 +12376,8 @@ class TeamGetInfoResult(bb.Struct): available to the team. :ivar team.TeamGetInfoResult.num_provisioned_users: The number of accounts that have been invited or are already active members of the team. + :ivar team.TeamGetInfoResult.num_used_licenses: The number of licenses used + on the team. """ __slots__ = [ @@ -12383,6 +12385,7 @@ class TeamGetInfoResult(bb.Struct): '_team_id_value', '_num_licensed_users_value', '_num_provisioned_users_value', + '_num_used_licenses_value', '_policies_value', ] @@ -12393,11 +12396,13 @@ def __init__(self, team_id=None, num_licensed_users=None, num_provisioned_users=None, + num_used_licenses=None, policies=None): self._name_value = bb.NOT_SET self._team_id_value = bb.NOT_SET self._num_licensed_users_value = bb.NOT_SET self._num_provisioned_users_value = bb.NOT_SET + self._num_used_licenses_value = bb.NOT_SET self._policies_value = bb.NOT_SET if name is not None: self.name = name @@ -12407,6 +12412,8 @@ def __init__(self, self.num_licensed_users = num_licensed_users if num_provisioned_users is not None: self.num_provisioned_users = num_provisioned_users + if num_used_licenses is not None: + self.num_used_licenses = num_used_licenses if policies is not None: self.policies = policies @@ -12422,6 +12429,9 @@ def __init__(self, # Instance attribute type: int (validator is set below) num_provisioned_users = bb.Attribute("num_provisioned_users") + # Instance attribute type: int (validator is set below) + num_used_licenses = bb.Attribute("num_used_licenses") + # Instance attribute type: team_policies.TeamMemberPolicies (validator is set below) policies = bb.Attribute("policies", user_defined=True) @@ -16638,12 +16648,14 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamGetInfoResult.team_id.validator = bv.String() TeamGetInfoResult.num_licensed_users.validator = bv.UInt32() TeamGetInfoResult.num_provisioned_users.validator = bv.UInt32() +TeamGetInfoResult.num_used_licenses.validator = bv.UInt32() TeamGetInfoResult.policies.validator = team_policies.TeamMemberPolicies_validator TeamGetInfoResult._all_field_names_ = set([ 'name', 'team_id', 'num_licensed_users', 'num_provisioned_users', + 'num_used_licenses', 'policies', ]) TeamGetInfoResult._all_fields_ = [ @@ -16651,6 +16663,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('team_id', TeamGetInfoResult.team_id.validator), ('num_licensed_users', TeamGetInfoResult.num_licensed_users.validator), ('num_provisioned_users', TeamGetInfoResult.num_provisioned_users.validator), + ('num_used_licenses', TeamGetInfoResult.num_used_licenses.validator), ('policies', TeamGetInfoResult.policies.validator), ] diff --git a/dropbox/team_log.py b/dropbox/team_log.py index e30ecaaf..3b34d3bd 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -12676,6 +12676,18 @@ def file_transfers_policy_changed_details(cls, val): """ return cls('file_transfers_policy_changed_details', val) + @classmethod + def folder_link_restriction_policy_changed_details(cls, val): + """ + Create an instance of this class set to the + ``folder_link_restriction_policy_changed_details`` tag with value + ``val``. + + :param FolderLinkRestrictionPolicyChangedDetails val: + :rtype: EventDetails + """ + return cls('folder_link_restriction_policy_changed_details', val) + @classmethod def google_sso_change_policy_details(cls, val): """ @@ -16869,6 +16881,14 @@ def is_file_transfers_policy_changed_details(self): """ return self._tag == 'file_transfers_policy_changed_details' + def is_folder_link_restriction_policy_changed_details(self): + """ + Check if the union tag is ``folder_link_restriction_policy_changed_details``. + + :rtype: bool + """ + return self._tag == 'folder_link_restriction_policy_changed_details' + def is_google_sso_change_policy_details(self): """ Check if the union tag is ``google_sso_change_policy_details``. @@ -21521,6 +21541,16 @@ def get_file_transfers_policy_changed_details(self): raise AttributeError("tag 'file_transfers_policy_changed_details' not set") return self._value + def get_folder_link_restriction_policy_changed_details(self): + """ + Only call this if :meth:`is_folder_link_restriction_policy_changed_details` is true. + + :rtype: FolderLinkRestrictionPolicyChangedDetails + """ + if not self.is_folder_link_restriction_policy_changed_details(): + raise AttributeError("tag 'folder_link_restriction_policy_changed_details' not set") + return self._value + def get_google_sso_change_policy_details(self): """ Only call this if :meth:`is_google_sso_change_policy_details` is true. @@ -23422,6 +23452,9 @@ class EventType(bb.Union): :ivar FileTransfersPolicyChangedType EventType.file_transfers_policy_changed: (team_policies) Changed file transfers policy for team + :ivar FolderLinkRestrictionPolicyChangedType + EventType.folder_link_restriction_policy_changed: (team_policies) + Changed folder link restrictions policy for team :ivar GoogleSsoChangePolicyType EventType.google_sso_change_policy: (team_policies) Enabled/disabled Google single sign-on for team :ivar GroupUserManagementChangePolicyType @@ -27951,6 +27984,17 @@ def file_transfers_policy_changed(cls, val): """ return cls('file_transfers_policy_changed', val) + @classmethod + def folder_link_restriction_policy_changed(cls, val): + """ + Create an instance of this class set to the + ``folder_link_restriction_policy_changed`` tag with value ``val``. + + :param FolderLinkRestrictionPolicyChangedType val: + :rtype: EventType + """ + return cls('folder_link_restriction_policy_changed', val) + @classmethod def google_sso_change_policy(cls, val): """ @@ -32121,6 +32165,14 @@ def is_file_transfers_policy_changed(self): """ return self._tag == 'file_transfers_policy_changed' + def is_folder_link_restriction_policy_changed(self): + """ + Check if the union tag is ``folder_link_restriction_policy_changed``. + + :rtype: bool + """ + return self._tag == 'folder_link_restriction_policy_changed' + def is_google_sso_change_policy(self): """ Check if the union tag is ``google_sso_change_policy``. @@ -37591,6 +37643,18 @@ def get_file_transfers_policy_changed(self): raise AttributeError("tag 'file_transfers_policy_changed' not set") return self._value + def get_folder_link_restriction_policy_changed(self): + """ + (team_policies) Changed folder link restrictions policy for team + + Only call this if :meth:`is_folder_link_restriction_policy_changed` is true. + + :rtype: FolderLinkRestrictionPolicyChangedType + """ + if not self.is_folder_link_restriction_policy_changed(): + raise AttributeError("tag 'folder_link_restriction_policy_changed' not set") + return self._value + def get_google_sso_change_policy(self): """ (team_policies) Enabled/disabled Google single sign-on for team @@ -39569,6 +39633,8 @@ class EventTypeArg(bb.Union): longer logged) :ivar team_log.EventTypeArg.file_transfers_policy_changed: (team_policies) Changed file transfers policy for team + :ivar team_log.EventTypeArg.folder_link_restriction_policy_changed: + (team_policies) Changed folder link restrictions policy for team :ivar team_log.EventTypeArg.google_sso_change_policy: (team_policies) Enabled/disabled Google single sign-on for team :ivar team_log.EventTypeArg.group_user_management_change_policy: @@ -40575,6 +40641,8 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition file_transfers_policy_changed = None # Attribute is overwritten below the class definition + folder_link_restriction_policy_changed = 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 @@ -43859,6 +43927,14 @@ def is_file_transfers_policy_changed(self): """ return self._tag == 'file_transfers_policy_changed' + def is_folder_link_restriction_policy_changed(self): + """ + Check if the union tag is ``folder_link_restriction_policy_changed``. + + :rtype: bool + """ + return self._tag == 'folder_link_restriction_policy_changed' + def is_google_sso_change_policy(self): """ Check if the union tag is ``google_sso_change_policy``. @@ -48148,6 +48224,112 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): FileUnresolveCommentType_validator = bv.Struct(FileUnresolveCommentType) +class FolderLinkRestrictionPolicy(bb.Union): + """ + Policy for deciding whether applying link restrictions on all team owned + 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. + """ + + _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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(FolderLinkRestrictionPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) + +FolderLinkRestrictionPolicy_validator = bv.Union(FolderLinkRestrictionPolicy) + +class FolderLinkRestrictionPolicyChangedDetails(bb.Struct): + """ + Changed folder link restrictions policy for team. + + :ivar team_log.FolderLinkRestrictionPolicyChangedDetails.new_value: To. + :ivar team_log.FolderLinkRestrictionPolicyChangedDetails.previous_value: + From. + """ + + __slots__ = [ + '_new_value_value', + '_previous_value_value', + ] + + _has_required_fields = True + + def __init__(self, + new_value=None, + previous_value=None): + self._new_value_value = bb.NOT_SET + self._previous_value_value = bb.NOT_SET + if new_value is not None: + self.new_value = new_value + if previous_value is not None: + self.previous_value = previous_value + + # Instance attribute type: FolderLinkRestrictionPolicy (validator is set below) + new_value = bb.Attribute("new_value", user_defined=True) + + # Instance attribute type: FolderLinkRestrictionPolicy (validator is set below) + previous_value = bb.Attribute("previous_value", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(FolderLinkRestrictionPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +FolderLinkRestrictionPolicyChangedDetails_validator = bv.Struct(FolderLinkRestrictionPolicyChangedDetails) + +class FolderLinkRestrictionPolicyChangedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(FolderLinkRestrictionPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +FolderLinkRestrictionPolicyChangedType_validator = bv.Struct(FolderLinkRestrictionPolicyChangedType) + class FolderLogInfo(FileOrFolderLogInfo): """ Folder's logged information. @@ -75570,6 +75752,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._file_requests_emails_enabled_details_validator = FileRequestsEmailsEnabledDetails_validator EventDetails._file_requests_emails_restricted_to_team_only_details_validator = FileRequestsEmailsRestrictedToTeamOnlyDetails_validator EventDetails._file_transfers_policy_changed_details_validator = FileTransfersPolicyChangedDetails_validator +EventDetails._folder_link_restriction_policy_changed_details_validator = FolderLinkRestrictionPolicyChangedDetails_validator EventDetails._google_sso_change_policy_details_validator = GoogleSsoChangePolicyDetails_validator EventDetails._group_user_management_change_policy_details_validator = GroupUserManagementChangePolicyDetails_validator EventDetails._integration_policy_changed_details_validator = IntegrationPolicyChangedDetails_validator @@ -76056,6 +76239,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): '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, 'file_transfers_policy_changed_details': EventDetails._file_transfers_policy_changed_details_validator, + 'folder_link_restriction_policy_changed_details': EventDetails._folder_link_restriction_policy_changed_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, 'integration_policy_changed_details': EventDetails._integration_policy_changed_details_validator, @@ -76545,6 +76729,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._file_requests_emails_enabled_validator = FileRequestsEmailsEnabledType_validator EventType._file_requests_emails_restricted_to_team_only_validator = FileRequestsEmailsRestrictedToTeamOnlyType_validator EventType._file_transfers_policy_changed_validator = FileTransfersPolicyChangedType_validator +EventType._folder_link_restriction_policy_changed_validator = FolderLinkRestrictionPolicyChangedType_validator EventType._google_sso_change_policy_validator = GoogleSsoChangePolicyType_validator EventType._group_user_management_change_policy_validator = GroupUserManagementChangePolicyType_validator EventType._integration_policy_changed_validator = IntegrationPolicyChangedType_validator @@ -77030,6 +77215,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): '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, 'file_transfers_policy_changed': EventType._file_transfers_policy_changed_validator, + 'folder_link_restriction_policy_changed': EventType._folder_link_restriction_policy_changed_validator, 'google_sso_change_policy': EventType._google_sso_change_policy_validator, 'group_user_management_change_policy': EventType._group_user_management_change_policy_validator, 'integration_policy_changed': EventType._integration_policy_changed_validator, @@ -77518,6 +77704,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._file_requests_emails_enabled_validator = bv.Void() EventTypeArg._file_requests_emails_restricted_to_team_only_validator = bv.Void() EventTypeArg._file_transfers_policy_changed_validator = bv.Void() +EventTypeArg._folder_link_restriction_policy_changed_validator = bv.Void() EventTypeArg._google_sso_change_policy_validator = bv.Void() EventTypeArg._group_user_management_change_policy_validator = bv.Void() EventTypeArg._integration_policy_changed_validator = bv.Void() @@ -78003,6 +78190,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'file_requests_emails_enabled': EventTypeArg._file_requests_emails_enabled_validator, 'file_requests_emails_restricted_to_team_only': EventTypeArg._file_requests_emails_restricted_to_team_only_validator, 'file_transfers_policy_changed': EventTypeArg._file_transfers_policy_changed_validator, + 'folder_link_restriction_policy_changed': EventTypeArg._folder_link_restriction_policy_changed_validator, 'google_sso_change_policy': EventTypeArg._google_sso_change_policy_validator, 'group_user_management_change_policy': EventTypeArg._group_user_management_change_policy_validator, 'integration_policy_changed': EventTypeArg._integration_policy_changed_validator, @@ -78489,6 +78677,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.file_requests_emails_enabled = EventTypeArg('file_requests_emails_enabled') EventTypeArg.file_requests_emails_restricted_to_team_only = EventTypeArg('file_requests_emails_restricted_to_team_only') EventTypeArg.file_transfers_policy_changed = EventTypeArg('file_transfers_policy_changed') +EventTypeArg.folder_link_restriction_policy_changed = EventTypeArg('folder_link_restriction_policy_changed') EventTypeArg.google_sso_change_policy = EventTypeArg('google_sso_change_policy') EventTypeArg.group_user_management_change_policy = EventTypeArg('group_user_management_change_policy') EventTypeArg.integration_policy_changed = EventTypeArg('integration_policy_changed') @@ -79346,6 +79535,34 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): FileUnresolveCommentType._all_field_names_ = set(['description']) FileUnresolveCommentType._all_fields_ = [('description', FileUnresolveCommentType.description.validator)] +FolderLinkRestrictionPolicy._disabled_validator = bv.Void() +FolderLinkRestrictionPolicy._enabled_validator = bv.Void() +FolderLinkRestrictionPolicy._other_validator = bv.Void() +FolderLinkRestrictionPolicy._tagmap = { + 'disabled': FolderLinkRestrictionPolicy._disabled_validator, + 'enabled': FolderLinkRestrictionPolicy._enabled_validator, + 'other': FolderLinkRestrictionPolicy._other_validator, +} + +FolderLinkRestrictionPolicy.disabled = FolderLinkRestrictionPolicy('disabled') +FolderLinkRestrictionPolicy.enabled = FolderLinkRestrictionPolicy('enabled') +FolderLinkRestrictionPolicy.other = FolderLinkRestrictionPolicy('other') + +FolderLinkRestrictionPolicyChangedDetails.new_value.validator = FolderLinkRestrictionPolicy_validator +FolderLinkRestrictionPolicyChangedDetails.previous_value.validator = FolderLinkRestrictionPolicy_validator +FolderLinkRestrictionPolicyChangedDetails._all_field_names_ = set([ + 'new_value', + 'previous_value', +]) +FolderLinkRestrictionPolicyChangedDetails._all_fields_ = [ + ('new_value', FolderLinkRestrictionPolicyChangedDetails.new_value.validator), + ('previous_value', FolderLinkRestrictionPolicyChangedDetails.previous_value.validator), +] + +FolderLinkRestrictionPolicyChangedType.description.validator = bv.String() +FolderLinkRestrictionPolicyChangedType._all_field_names_ = set(['description']) +FolderLinkRestrictionPolicyChangedType._all_fields_ = [('description', FolderLinkRestrictionPolicyChangedType.description.validator)] + FolderLogInfo.file_count.validator = bv.Nullable(bv.UInt64()) FolderLogInfo._all_field_names_ = FileOrFolderLogInfo._all_field_names_.union(set(['file_count'])) FolderLogInfo._all_fields_ = FileOrFolderLogInfo._all_fields_ + [('file_count', FolderLogInfo.file_count.validator)] diff --git a/spec b/spec index 18963b8a..3d1080a0 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 18963b8a29fe125f6495d36c38eda5db2710d0dd +Subproject commit 3d1080a021a67c335c52361d8f61ec558bb80606 From c8aac233bec5b55b8763f947a3f452330e8bdf83 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Wed, 5 Apr 2023 21:03:45 +0530 Subject: [PATCH 78/90] Fix invalid specifier in `stone` requirement (#456) --- requirements.txt | 2 +- setup.py | 2 +- test/requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 14e43fa5..2c55c04b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ # Dependencies required for installation (keep in sync with setup.py) requests >= 2.16.2 six >= 1.12.0 -stone >= 2.* +stone >= 2 # Other dependencies for development ply pytest diff --git a/setup.py b/setup.py index 70c63adb..efbd57de 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ install_reqs = [ 'requests >= 2.16.2', 'six >= 1.12.0', - 'stone >= 2.*', + 'stone >= 2', ] setup_requires = [ diff --git a/test/requirements.txt b/test/requirements.txt index 174a5340..c6433e33 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -2,4 +2,4 @@ pytest mock pytest-mock coverage -stone>=2.* \ No newline at end of file +stone>=2 From 223fe46cec68f32386ac4cc1f46cfc8faf971c23 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Fri, 28 Apr 2023 10:05:30 -0700 Subject: [PATCH 79/90] Update create-pull-request version (#466) Github action not working. Trying updating the version to see if that fixes things. --- .github/workflows/spec_update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spec_update.yml b/.github/workflows/spec_update.yml index b62427bc..f4a60c7c 100644 --- a/.github/workflows/spec_update.yml +++ b/.github/workflows/spec_update.yml @@ -51,7 +51,7 @@ jobs: pip install -r requirements.txt python generate_base_client.py - name: Create Pull Request - uses: peter-evans/create-pull-request@v3.8.2 + uses: peter-evans/create-pull-request@v5.0.0 if: steps.git-diff-num.outputs.num-diff != 0 with: token: ${{ secrets.SPEC_UPDATE_TOKEN }} From 487793dff3c5a8a3a76010799dc4803cabdb70f3 Mon Sep 17 00:00:00 2001 From: Greg Date: Thu, 25 May 2023 13:17:10 -0400 Subject: [PATCH 80/90] Update the commandline-oauth-scopes.py example (#470) --- example/oauth/commandline-oauth-scopes.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/example/oauth/commandline-oauth-scopes.py b/example/oauth/commandline-oauth-scopes.py index 951165f8..7378f59e 100644 --- a/example/oauth/commandline-oauth-scopes.py +++ b/example/oauth/commandline-oauth-scopes.py @@ -23,7 +23,7 @@ try: oauth_result = auth_flow.finish(auth_code) - # Oauth token has files.metadata.read scope only + # authorization has files.metadata.read scope only assert oauth_result.scope == 'files.metadata.read' except Exception as e: print('Error: %s' % (e,)) @@ -33,7 +33,7 @@ auth_flow2 = DropboxOAuth2FlowNoRedirect(APP_KEY, consumer_secret=APP_SECRET, token_access_type='offline', - scope=['files.metadata.write']) + scope=['account_info.read']) authorize_url = auth_flow2.start() print("1. Go to: " + authorize_url) @@ -43,8 +43,8 @@ try: oauth_result = auth_flow2.finish(auth_code) - # Oauth token has files.metadata.write scope only - assert oauth_result.scope == 'files.metadata.write' + # authorization has account_info.read scope only + assert oauth_result.scope == 'account_info.read' except Exception as e: print('Error: %s' % (e,)) exit(1) @@ -66,8 +66,8 @@ try: oauth_result = auth_flow3.finish(auth_code) print(oauth_result) - # Oauth token has all granted user scopes - assert 'files.metadata.write' in oauth_result.scope + # authorization has all granted user scopes + assert 'account_info.read' in oauth_result.scope assert 'files.metadata.read' in oauth_result.scope assert 'files.content.read' in oauth_result.scope assert 'files.content.write' in oauth_result.scope @@ -80,5 +80,6 @@ oauth2_access_token_expiration=oauth_result.expires_at, oauth2_refresh_token=oauth_result.refresh_token, app_key=APP_KEY, - app_secret=APP_SECRET): + app_secret=APP_SECRET) as dbx: + dbx.users_get_current_account() print("Successfully set up client!") From 75596daf316b4a806f18057e2797a15bdf83cf6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20B=C3=A9langer?= Date: Wed, 8 May 2024 15:23:23 -0700 Subject: [PATCH 81/90] Restore CI, including Python 2.7 (#492) * Restores CI to a green state to aid in landing other changes. * Python 2.7 is still covered, but only on Ubuntu and excluding PyPy. Changes are made to `requirements.txt` et al to ensure this works. * Runner versions are pinned to avoid automatic breakage, required statuses are updated to match. * Codecov action is updated, token is now explicitly passed. * Fixes an integration test breaking due to backend changes, to be investigated separately. --- .github/workflows/ci.yml | 62 ++++++++++++++++++++----------- .github/workflows/coverage.yml | 12 +++--- .github/workflows/pypiupload.yml | 15 ++++++-- .github/workflows/spec_update.yml | 2 +- requirements.txt | 7 ++-- setup.py | 7 ++-- test/integration/test_dropbox.py | 9 +++-- test/requirements.txt | 2 +- 8 files changed, 74 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ecf98c9..c0d85f3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,18 +10,27 @@ jobs: # https://github.com/actions/python-versions/blob/main/versions-manifest.json strategy: matrix: - os: [macos-latest, windows-latest] - python-version: [2.7, 3.5, 3.6, 3.7, 3.8, pypy-2.7, pypy-3.7] + os: [macos-13, windows-latest] + python-version: [3.5, 3.6, 3.7, 3.8, pypy-3.7] exclude: - os: windows-latest python-version: 3.6 include: - - os: ubuntu-latest + - os: ubuntu-20.04 python-version: 3.7 + - os: ubuntu-20.04 + python-version: 2.7 steps: - uses: actions/checkout@v2 - - name: Setup Python environment - uses: actions/setup-python@v2.2.2 + - if: ${{ matrix.python-version == '2.7' }} + name: Setup Python environment (2.7) + run: | + sudo apt-get install python-is-python2 + curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py + python get-pip.py + - if: ${{ matrix.python-version != '2.7' }} + name: Setup Python environment + uses: actions/setup-python@v3.1.4 with: python-version: ${{ matrix.python-version }} - name: Install Requirements @@ -30,19 +39,19 @@ jobs: pip install flake8 pytest pip install -r requirements.txt pip install -r test/requirements.txt - python setup.py install + python setup.py install --user - name: Run Linter run: | flake8 setup.py dropbox example test - name: Run Unit Tests run: | - pytest test/unit/test_dropbox_unit.py + pytest -v test/unit/test_dropbox_unit.py Docs: - runs-on: macos-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Setup Python environment - uses: actions/setup-python@v2.2.2 + uses: actions/setup-python@v3.1.4 with: python-version: '3.7' - name: Install Requirements @@ -64,18 +73,27 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest, windows-latest] - python-version: [2.7, 3.5, 3.6, 3.7, 3.8, pypy-2.7, pypy-3.7] - exclude: - - os: windows-latest - python-version: 3.6 - include: - - os: ubuntu-latest - python-version: 3.7 - steps: + os: [macos-13, windows-latest] + python-version: [3.5, 3.6, 3.7, 3.8, pypy-3.7] + exclude: + - os: windows-latest + python-version: 3.6 + include: + - os: ubuntu-20.04 + python-version: 3.7 + - os: ubuntu-20.04 + python-version: 2.7 + steps: - uses: actions/checkout@v2.3.4 - - name: Setup Python environment - uses: actions/setup-python@v2.2.2 + - if: ${{ matrix.python-version == '2.7' }} + name: Setup Python environment (2.7) + run: | + sudo apt-get install python-is-python2 + curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py + python get-pip.py + - if: ${{ matrix.python-version != '2.7' }} + name: Setup Python environment + uses: actions/setup-python@v3.1.4 with: python-version: ${{ matrix.python-version }} - name: Install Requirements @@ -84,7 +102,7 @@ jobs: pip install flake8 pytest pip install -r requirements.txt pip install -r test/requirements.txt - python setup.py install + python setup.py install --user - name: Run Integration Tests env: LEGACY_USER_DROPBOX_TOKEN: ${{ secrets.LEGACY_USER_DROPBOX_TOKEN }} @@ -101,4 +119,4 @@ jobs: SCOPED_TEAM_REFRESH_TOKEN: ${{ secrets.SCOPED_TEAM_REFRESH_TOKEN }} DROPBOX_SHARED_LINK: ${{ secrets.DROPBOX_SHARED_LINK }} run: | - pytest test/integration/test_dropbox.py \ No newline at end of file + pytest -v test/integration/test_dropbox.py diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 87cf19d1..7cab535b 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup Python environment - uses: actions/setup-python@v2.2.2 + uses: actions/setup-python@v3.1.4 with: python-version: '3.7' - name: Install Requirements @@ -28,8 +28,9 @@ jobs: coverage run --rcfile=.coveragerc -m pytest test/unit/test_dropbox_unit.py coverage xml - name: Publish Coverage - uses: codecov/codecov-action@v1.3.2 + uses: codecov/codecov-action@v3.1.6 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: unit fail_ci_if_error: true IntegrationCoverage: @@ -37,7 +38,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup Python environment - uses: actions/setup-python@v2.2.2 + uses: actions/setup-python@v3.1.4 with: python-version: '3.7' - name: Install Requirements @@ -66,7 +67,8 @@ jobs: coverage run --rcfile=.coveragerc -m pytest test/integration/test_dropbox.py coverage xml - name: Publish Coverage - uses: codecov/codecov-action@v1.3.2 + uses: codecov/codecov-action@v3.1.6 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - fail_ci_if_error: true \ No newline at end of file + fail_ci_if_error: true diff --git a/.github/workflows/pypiupload.yml b/.github/workflows/pypiupload.yml index 3c7f1675..874a32b4 100644 --- a/.github/workflows/pypiupload.yml +++ b/.github/workflows/pypiupload.yml @@ -9,15 +9,22 @@ on: jobs: deploy: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: matrix: python-version: [2.7, 3.x] steps: - - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v2.2.2 + - uses: actions/checkout@v2.3.4 + - if: ${{ matrix.python-version == '2.7' }} + name: Setup Python environment (2.7) + run: | + sudo apt-get install python-is-python2 + curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py + python get-pip.py + - if: ${{ matrix.python-version != '2.7' }} + name: Setup Python environment + uses: actions/setup-python@v3.1.4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/spec_update.yml b/.github/workflows/spec_update.yml index f4a60c7c..5010e1a8 100644 --- a/.github/workflows/spec_update.yml +++ b/.github/workflows/spec_update.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup Python environment - uses: actions/setup-python@v2.2.2 + uses: actions/setup-python@v3.1.4 with: python-version: 3.7 - name: Get current time diff --git a/requirements.txt b/requirements.txt index 2c55c04b..2b5b9a8e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,12 @@ # Dependencies required for installation (keep in sync with setup.py) -requests >= 2.16.2 +requests<2.30 +urllib3<2 six >= 1.12.0 -stone >= 2 +stone>=2,<3.3.3 # Other dependencies for development ply pytest -pytest-runner +pytest-runner==5.2.0 sphinx twine wheel diff --git a/setup.py b/setup.py index efbd57de..6e748976 100644 --- a/setup.py +++ b/setup.py @@ -25,15 +25,16 @@ version = eval(line.split('=', 1)[1].strip()) # pylint: disable=eval-used install_reqs = [ - 'requests >= 2.16.2', + 'requests<2.30', + 'urllib3<2', 'six >= 1.12.0', - 'stone >= 2', + 'stone>=2,<3.3.3', ] setup_requires = [ # Pin pytest-runner to 5.2.0, since 5.3.0 uses `find_namespaces` directive, not supported in # Python 2.7 - 'pytest-runner == 5.2.0', + 'pytest-runner==5.2.0', ] # WARNING: This imposes limitations on test/requirements.txt such that the diff --git a/test/integration/test_dropbox.py b/test/integration/test_dropbox.py index 5aeb3232..b950cb90 100644 --- a/test/integration/test_dropbox.py +++ b/test/integration/test_dropbox.py @@ -26,7 +26,7 @@ from dropbox.exceptions import ( ApiError, AuthError, - BadInputError, + # BadInputError, PathRootError, ) from dropbox.files import ( @@ -153,9 +153,12 @@ def test_default_oauth2_urls(self): def test_bad_auth(self): # Test malformed token malformed_token_dbx = Dropbox(MALFORMED_TOKEN) - with pytest.raises(BadInputError,) as cm: + # TODO: backend is no longer returning `BadInputError` + # with pytest.raises(BadInputError,) as cm: + # malformed_token_dbx.files_list_folder('') + # assert 'token is malformed' in cm.value.message + with pytest.raises(AuthError,): malformed_token_dbx.files_list_folder('') - assert 'token is malformed' in cm.value.message # Test reasonable-looking invalid token invalid_token_dbx = Dropbox(INVALID_TOKEN) diff --git a/test/requirements.txt b/test/requirements.txt index c6433e33..9f263bd8 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -2,4 +2,4 @@ pytest mock pytest-mock coverage -stone>=2 +stone>=2,<3.3.3 From 41e4b0015f9de7868c97a50aee3164b4b03da858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20B=C3=A9langer?= Date: Thu, 9 May 2024 14:19:16 -0700 Subject: [PATCH 82/90] Stop providing a hardcoded CA bundle (#489) The SDK no longer provides a CA bundle to verify SSL connections. This also allows us to remove the runtime dependency on `pkg_resources` and thus `setuptools`. The `ca_certs` parameter is still supported, so users can pin with their own CA bundle if they so choose. Otherwise, the default verification mechanism in the `requests` library now applies (this uses `certifi` and/or system certificates, depending on the configuration). Improves integration tests to cover both scenarios (i.e. when a bundle is provided, and when one isn't). --- dropbox/dropbox_client.py | 5 +- dropbox/session.py | 25 +- dropbox/trusted-certs.crt | 1396 ---------------------------- setup.py | 1 - test/integration/expired-certs.crt | 78 ++ test/integration/test_dropbox.py | 116 ++- test/integration/trusted-certs.crt | 248 +++++ 7 files changed, 413 insertions(+), 1456 deletions(-) delete mode 100644 dropbox/trusted-certs.crt create mode 100644 test/integration/expired-certs.crt create mode 100644 test/integration/trusted-certs.crt diff --git a/dropbox/dropbox_client.py b/dropbox/dropbox_client.py index 3883cf1f..3ddf8243 100644 --- a/dropbox/dropbox_client.py +++ b/dropbox/dropbox_client.py @@ -181,8 +181,8 @@ def __init__(self, Not required if PKCE was used to authorize the token :param list scope: list of scopes to request on refresh. If left blank, refresh will request all available scopes for application - :param str ca_certs: path to CA certificate. If left blank, default certificate location \ - will be used + :param str ca_certs: a path to a file of concatenated CA certificates in PEM format. + Has the same meaning as when using :func:`ssl.wrap_socket`. """ if not (oauth2_access_token or oauth2_refresh_token or (app_key and app_secret)): @@ -590,7 +590,6 @@ def request_json_string(self, headers=headers, data=body, stream=stream, - verify=True, timeout=timeout, ) self.raise_dropbox_error_for_resp(r) diff --git a/dropbox/session.py b/dropbox/session.py index cd47292c..c157c7da 100644 --- a/dropbox/session.py +++ b/dropbox/session.py @@ -1,4 +1,3 @@ -import pkg_resources import os import ssl @@ -32,11 +31,6 @@ # This is the default longest time we'll block on receiving data from the server DEFAULT_TIMEOUT = 100 -try: - _TRUSTED_CERT_FILE = pkg_resources.resource_filename(__name__, 'trusted-certs.crt') -except NotImplementedError: # Package is used inside python archive - _TRUSTED_CERT_FILE = None - # 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. @@ -44,9 +38,7 @@ class _SSLAdapter(HTTPAdapter): _ca_certs = None def __init__(self, *args, **kwargs): - self._ca_certs = kwargs.pop("ca_certs", None) or _TRUSTED_CERT_FILE - if not self._ca_certs: - raise AttributeError("CA certificate not set") + self._ca_certs = kwargs.pop("ca_certs", None) super(_SSLAdapter, self).__init__(*args, **kwargs) def init_poolmanager(self, connections, maxsize, block=False, **_): @@ -59,8 +51,19 @@ def init_poolmanager(self, connections, maxsize, block=False, **_): ) def pinned_session(pool_maxsize=8, ca_certs=None): - http_adapter = _SSLAdapter(pool_connections=4, pool_maxsize=pool_maxsize, ca_certs=ca_certs) + # always verify, use cert bundle if provided + _session = requests.session() - _session.mount('https://', http_adapter) + # requests + if ca_certs is not None: + _session.verify = ca_certs + else: + _session.verify = True + + # urllib3 within requests + http_adapter = _SSLAdapter(pool_connections=4, pool_maxsize=pool_maxsize, ca_certs=ca_certs) + _session.mount('https://', http_adapter) return _session + +SSLError = requests.exceptions.SSLError # raised on verification errors diff --git a/dropbox/trusted-certs.crt b/dropbox/trusted-certs.crt deleted file mode 100644 index 00c2f2e7..00000000 --- a/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/setup.py b/setup.py index 6e748976..79304fc2 100644 --- a/setup.py +++ b/setup.py @@ -54,7 +54,6 @@ setup_requires=setup_requires, tests_require=test_reqs, packages=['dropbox'], - package_data={'dropbox': ['trusted-certs.crt']}, zip_safe=False, author_email='dev-platform@dropbox.com', author='Dropbox', diff --git a/test/integration/expired-certs.crt b/test/integration/expired-certs.crt new file mode 100644 index 00000000..b77daad0 --- /dev/null +++ b/test/integration/expired-certs.crt @@ -0,0 +1,78 @@ +# 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----- diff --git a/test/integration/test_dropbox.py b/test/integration/test_dropbox.py index b950cb90..4f1617ff 100644 --- a/test/integration/test_dropbox.py +++ b/test/integration/test_dropbox.py @@ -16,6 +16,7 @@ from StringIO import StringIO as BytesIO from dropbox import ( + create_session, Dropbox, DropboxOAuth2Flow, DropboxTeam, @@ -39,6 +40,7 @@ PathRoot, PathRoot_validator, ) +from dropbox.session import SSLError # Key Types REFRESH_TOKEN_KEY = "REFRESH_TOKEN" @@ -65,34 +67,43 @@ def _value_from_env_or_die(env_name): sys.exit(1) return value +_TRUSTED_CERTS_FILE = os.path.join(os.path.dirname(__file__), "trusted-certs.crt") +_EXPIRED_CERTS_FILE = os.path.join(os.path.dirname(__file__), "expired-certs.crt") + +# enables testing both with and without a manually-provided CA bundle +@pytest.fixture(params=[None, _TRUSTED_CERTS_FILE], ids=["no-pinning", "pinning"]) +def dbx_session(request): + return create_session(ca_certs=request.param) + @pytest.fixture() -def dbx_from_env(): +def dbx_from_env(dbx_session): oauth2_token = _value_from_env_or_die(format_env_name()) - return Dropbox(oauth2_token) + return Dropbox(oauth2_token, session=dbx_session) @pytest.fixture() -def refresh_dbx_from_env(): +def refresh_dbx_from_env(dbx_session): refresh_token = _value_from_env_or_die(format_env_name(SCOPED_KEY, USER_KEY, REFRESH_TOKEN_KEY)) app_key = _value_from_env_or_die(format_env_name(SCOPED_KEY, USER_KEY, CLIENT_ID_KEY)) app_secret = _value_from_env_or_die(format_env_name(SCOPED_KEY, USER_KEY, CLIENT_SECRET_KEY)) return Dropbox(oauth2_refresh_token=refresh_token, - app_key=app_key, app_secret=app_secret) + app_key=app_key, app_secret=app_secret, + session=dbx_session) @pytest.fixture() -def dbx_team_from_env(): +def dbx_team_from_env(dbx_session): team_oauth2_token = _value_from_env_or_die( format_env_name(SCOPED_KEY, TEAM_KEY, ACCESS_TOKEN_KEY)) - return DropboxTeam(team_oauth2_token) + return DropboxTeam(team_oauth2_token, session=dbx_session) @pytest.fixture() -def dbx_app_auth_from_env(): +def dbx_app_auth_from_env(dbx_session): app_key = _value_from_env_or_die(format_env_name(SCOPED_KEY, USER_KEY, CLIENT_ID_KEY)) app_secret = _value_from_env_or_die(format_env_name(SCOPED_KEY, USER_KEY, CLIENT_SECRET_KEY)) - return Dropbox(app_key=app_key, app_secret=app_secret) + return Dropbox(app_key=app_key, app_secret=app_secret, session=dbx_session) @pytest.fixture() @@ -110,7 +121,7 @@ def dbx_share_url_from_env(): TIMESTAMP = str(datetime.datetime.utcnow()) STATIC_FILE = "/test.txt" -@pytest.fixture(scope='module', autouse=True) +@pytest.fixture(scope='module') def pytest_setup(): print("Setup") dbx = Dropbox(_value_from_env_or_die(format_env_name())) @@ -125,47 +136,14 @@ def pytest_setup(): except Exception: print("File not found") - @pytest.mark.usefixtures( + "pytest_setup", "dbx_from_env", "refresh_dbx_from_env", "dbx_app_auth_from_env", - "dbx_share_url_from_env" + "dbx_share_url_from_env", ) class TestDropbox: - def test_default_oauth2_urls(self): - flow_obj = DropboxOAuth2Flow('dummy_app_key', 'dummy_app_secret', - 'http://localhost/dummy', 'dummy_session', 'dbx-auth-csrf-token') - - assert re.match( - r'^https://{}/oauth2/authorize\?'.format(re.escape(session.WEB_HOST)), - flow_obj._get_authorize_url('http://localhost/redirect', 'state', 'legacy'), - ) - - assert flow_obj.build_url( - '/oauth2/authorize' - ) == 'https://{}/oauth2/authorize'.format(session.API_HOST) - - assert flow_obj.build_url( - '/oauth2/authorize', host=session.WEB_HOST - ) == 'https://{}/oauth2/authorize'.format(session.WEB_HOST) - - def test_bad_auth(self): - # Test malformed token - malformed_token_dbx = Dropbox(MALFORMED_TOKEN) - # TODO: backend is no longer returning `BadInputError` - # with pytest.raises(BadInputError,) as cm: - # malformed_token_dbx.files_list_folder('') - # assert 'token is malformed' in cm.value.message - with pytest.raises(AuthError,): - malformed_token_dbx.files_list_folder('') - - # Test reasonable-looking invalid token - invalid_token_dbx = Dropbox(INVALID_TOKEN) - with pytest.raises(AuthError) as cm: - invalid_token_dbx.files_list_folder('') - assert cm.value.error.is_invalid_access_token() - def test_multi_auth(self, dbx_from_env, dbx_app_auth_from_env, dbx_share_url_from_env): # Test for user (with oauth token) preview_result, resp = dbx_from_env.files_get_thumbnail_v2( @@ -280,7 +258,10 @@ def test_versioned_route(self, dbx_from_env): # Verify response type is of v2 route assert isinstance(resp, DeleteResult) -@pytest.mark.usefixtures("dbx_team_from_env") +@pytest.mark.usefixtures( + "pytest_setup", + "dbx_team_from_env", +) class TestDropboxTeam: def test_team(self, dbx_team_from_env): dbx_team_from_env.team_groups_list() @@ -310,3 +291,48 @@ def test_clone_when_team_linked(self, dbx_team_from_env): new_dbxt = dbx_team_from_env.clone() assert dbx_team_from_env is not new_dbxt assert isinstance(new_dbxt, dbx_team_from_env.__class__) + +def test_default_oauth2_urls(): + flow_obj = DropboxOAuth2Flow('dummy_app_key', 'dummy_app_secret', + 'http://localhost/dummy', 'dummy_session', 'dbx-auth-csrf-token') + + assert re.match( + r'^https://{}/oauth2/authorize\?'.format(re.escape(session.WEB_HOST)), + flow_obj._get_authorize_url('http://localhost/redirect', 'state', 'legacy'), + ) + + assert flow_obj.build_url( + '/oauth2/authorize' + ) == 'https://{}/oauth2/authorize'.format(session.API_HOST) + + assert flow_obj.build_url( + '/oauth2/authorize', host=session.WEB_HOST + ) == 'https://{}/oauth2/authorize'.format(session.WEB_HOST) + +def test_bad_auth(dbx_session): + # Test malformed token + malformed_token_dbx = Dropbox(MALFORMED_TOKEN, session=dbx_session) + # TODO: backend is no longer returning `BadInputError` + # with pytest.raises(BadInputError,) as cm: + # malformed_token_dbx.files_list_folder('') + # assert 'token is malformed' in cm.value.message + with pytest.raises(AuthError): + malformed_token_dbx.files_list_folder('') + + # Test reasonable-looking invalid token + invalid_token_dbx = Dropbox(INVALID_TOKEN, session=dbx_session) + with pytest.raises(AuthError) as cm: + invalid_token_dbx.files_list_folder('') + assert cm.value.error.is_invalid_access_token() + +def test_bad_pins(): + # sanity-check: if we're pinning using expired pins, we should fail w/ an SSL error + _dbx = Dropbox("dummy_token", ca_certs=_EXPIRED_CERTS_FILE) + with pytest.raises(SSLError,): + _dbx.files_list_folder('') + +def test_bad_pins_session(): + _session = create_session(ca_certs=_EXPIRED_CERTS_FILE) + _dbx = Dropbox("dummy_token2", session=_session) + with pytest.raises(SSLError,): + _dbx.files_list_folder('') diff --git a/test/integration/trusted-certs.crt b/test/integration/trusted-certs.crt new file mode 100644 index 00000000..69cb3417 --- /dev/null +++ b/test/integration/trusted-certs.crt @@ -0,0 +1,248 @@ +-----BEGIN CERTIFICATE----- +MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsF +ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6 +b24gUm9vdCBDQSAxMB4XDTE1MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTEL +MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJv +b3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4gHHKeNXj +ca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgHFzZM +9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qw +IFAGbHrQgLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6 +VOujw5H5SNz/0egwLX0tdHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L +93FcXmn/6pUCyziKrlA4b9v7LWIbxcceVOF34GfID5yHI9Y/QCB/IIDEgEw+OyQm +jgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3DQEBCwUA +A4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDI +U5PMCCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUs +N+gDS63pYaACbvXy8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vv +o/ufQJVtMVT8QtPHRh8jrdkPSHCa2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU +5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2xJNDd2ZhwLnoQdeXeGADbkpy +rqXRfboQnoZsG4q5WTP468SQvvG5 +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIFQTCCAymgAwIBAgITBmyf0pY1hp8KD+WGePhbJruKNzANBgkqhkiG9w0BAQwF +ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6 +b24gUm9vdCBDQSAyMB4XDTE1MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTEL +MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJv +b3QgQ0EgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK2Wny2cSkxK +gXlRmeyKy2tgURO8TW0G/LAIjd0ZEGrHJgw12MBvIITplLGbhQPDW9tK6Mj4kHbZ +W0/jTOgGNk3Mmqw9DJArktQGGWCsN0R5hYGCrVo34A3MnaZMUnbqQ523BNFQ9lXg +1dKmSYXpN+nKfq5clU1Imj+uIFptiJXZNLhSGkOQsL9sBbm2eLfq0OQ6PBJTYv9K +8nu+NQWpEjTj82R0Yiw9AElaKP4yRLuH3WUnAnE72kr3H9rN9yFVkE8P7K6C4Z9r +2UXTu/Bfh+08LDmG2j/e7HJV63mjrdvdfLC6HM783k81ds8P+HgfajZRRidhW+me +z/CiVX18JYpvL7TFz4QuK/0NURBs+18bvBt+xa47mAExkv8LV/SasrlX6avvDXbR +8O70zoan4G7ptGmh32n2M8ZpLpcTnqWHsFcQgTfJU7O7f/aS0ZzQGPSSbtqDT6Zj +mUyl+17vIWR6IF9sZIUVyzfpYgwLKhbcAS4y2j5L9Z469hdAlO+ekQiG+r5jqFoz +7Mt0Q5X5bGlSNscpb/xVA1wf+5+9R+vnSUeVC06JIglJ4PVhHvG/LopyboBZ/1c6 ++XUyo05f7O0oYtlNc/LMgRdg7c3r3NunysV+Ar3yVAhU/bQtCSwXVEqY0VThUWcI +0u1ufm8/0i2BWSlmy5A5lREedCf+3euvAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMB +Af8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSwDPBMMPQFWAJI/TPlUq9LhONm +UjANBgkqhkiG9w0BAQwFAAOCAgEAqqiAjw54o+Ci1M3m9Zh6O+oAA7CXDpO8Wqj2 +LIxyh6mx/H9z/WNxeKWHWc8w4Q0QshNabYL1auaAn6AFC2jkR2vHat+2/XcycuUY ++gn0oJMsXdKMdYV2ZZAMA3m3MSNjrXiDCYZohMr/+c8mmpJ5581LxedhpxfL86kS +k5Nrp+gvU5LEYFiwzAJRGFuFjWJZY7attN6a+yb3ACfAXVU3dJnJUH/jWS5E4ywl +7uxMMne0nxrpS10gxdr9HIcWxkPo1LsmmkVwXqkLN1PiRnsn/eBG8om3zEK2yygm +btmlyTrIQRNg91CMFa6ybRoVGld45pIq2WWQgj9sAq+uEjonljYE1x2igGOpm/Hl +urR8FLBOybEfdF849lHqm/osohHUqS0nGkWxr7JOcQ3AWEbWaQbLU8uz/mtBzUF+ +fUwPfHJ5elnNXkoOrJupmHN5fLT0zLm4BwyydFy4x2+IoZCn9Kr5v2c69BoVYh63 +n749sSmvZ6ES8lgQGVMDMBu4Gon2nL2XA46jCfMdiyHxtN/kHNGfZQIG6lzWE7OE +76KlXIx3KadowGuuQNKotOrN8I1LOJwZmhsoVLiJkO/KdYE+HvJkJMcYr07/R54H +9jVlpNMKVv/1F2Rs76giJUmTtt8AF9pYfl3uxRuw0dFfIRDH+fO6AgonB8Xx1sfT +4PsJYGw= +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIBtjCCAVugAwIBAgITBmyf1XSXNmY/Owua2eiedgPySjAKBggqhkjOPQQDAjA5 +MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24g +Um9vdCBDQSAzMB4XDTE1MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkG +A1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJvb3Qg +Q0EgMzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCmXp8ZBf8ANm+gBG1bG8lKl +ui2yEujSLtf6ycXYqm0fc4E7O5hrOXwzpcVOho6AF2hiRVd9RFgdszflZwjrZt6j +QjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSr +ttvXBp43rDCGB5Fwx5zEGbF4wDAKBggqhkjOPQQDAgNJADBGAiEA4IWSoxe3jfkr +BqWTrBqYaGFy+uGh0PsceGCmQ5nFuMQCIQCcAu/xlJyzlvnrxir4tiz+OpAUFteM +YyRIHN8wfdVoOw== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIB8jCCAXigAwIBAgITBmyf18G7EEwpQ+Vxe3ssyBrBDjAKBggqhkjOPQQDAzA5 +MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24g +Um9vdCBDQSA0MB4XDTE1MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkG +A1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJvb3Qg +Q0EgNDB2MBAGByqGSM49AgEGBSuBBAAiA2IABNKrijdPo1MN/sGKe0uoe0ZLY7Bi +9i0b2whxIdIA6GO9mif78DluXeo9pcmBqqNbIJhFXRbb/egQbeOc4OO9X4Ri83Bk +M6DLJC9wuoihKqB1+IGuYgbEgds5bimwHvouXKNCMEAwDwYDVR0TAQH/BAUwAwEB +/zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFNPsxzplbszh2naaVvuc84ZtV+WB +MAoGCCqGSM49BAMDA2gAMGUCMDqLIfG9fhGt0O9Yli/W651+kI0rz2ZVwyzjKKlw +CkcO8DdZEv8tmZQoTipPNU0zWgIxAOp1AE47xDqUEpHJWEadIRNyp4iciuRMStuW +1KyLa2tJElMzrdfkviT8tQp21KW8EA== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICETCCAZegAwIBAgIQDfPZN2WjecWVZuqS4iRPNDAKBggqhkjOPQQDAzBKMQsw +CQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xIjAgBgNVBAMTGURp +Z2lDZXJ0IEVDQyBQMzg0IFJvb3QgRzUwHhcNMjEwMTE1MDAwMDAwWhcNNDYwMTE0 +MjM1OTU5WjBKMQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4x +IjAgBgNVBAMTGURpZ2lDZXJ0IEVDQyBQMzg0IFJvb3QgRzUwdjAQBgcqhkjOPQIB +BgUrgQQAIgNiAAT8WR/OmWx/mw62KWNvxoXzCtPWm65XFUwO7V3jCX5tKqOGqrp4 +oKdxvUT6CMBKBtZv3SxKOHTl0L3/ev/lOU69vRceH0Ot1bwn2Eu/dowwMqT7+VPl +2Ko4U12ooDegZwqjQjBAMB0GA1UdDgQWBBSSlvfmutURuvkiLnt+WtnwJeUFGzAO +BgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBl +AjEA/cBN8aSn26cMJhH0Sb0HOGMrRGIGeQjHw9TPmz6rOieqkMf9WaK4MlLbyo4X +CwqQAjBdGuxRidRk3PnlHji9Wy7j5UTkOxh61/CVQI/y68/0+dBlokHysOZ8wTYs +j1453Tc= +-----END CERTIFICATE----- +-----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----- +-----BEGIN CERTIFICATE----- +MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBh +MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH +MjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVT +MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j +b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkqhkiG +9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI +2/Ou8jqJkTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx +1x7e/dfgy5SDN67sH0NO3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQ +q2EGnI/yuum06ZIya7XzV+hdG82MHauVBJVJ8zUtluNJbd134/tJS7SsVQepj5Wz +tCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyMUNGPHgm+F6HmIcr9g+UQ +vIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQABo0IwQDAP +BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV +5uNu5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY +1Yl9PMWLSn/pvtsrF9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4 +NeF22d+mQrvHRAiGfzZ0JFrabA0UWTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NG +Fdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBHQRFXGU7Aj64GxJUTFy8bJZ91 +8rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/iyK5S9kJRaTe +pLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl +MrY= +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICPzCCAcWgAwIBAgIQBVVWvPJepDU1w6QP1atFcjAKBggqhkjOPQQDAzBhMQsw +CQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cu +ZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAe +Fw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVTMRUw +EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x +IDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEczMHYwEAYHKoZIzj0CAQYF +K4EEACIDYgAE3afZu4q4C/sLfyHS8L6+c/MzXRq8NOrexpu80JX28MzQC7phW1FG +fp4tn+6OYwwX7Adw9c+ELkCDnOg/QW07rdOkFFk2eJ0DQ+4QE2xy3q6Ip6FrtUPO +Z9wj/wMco+I+o0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAd +BgNVHQ4EFgQUs9tIpPmhxdiuNkHMEWNpYim8S8YwCgYIKoZIzj0EAwMDaAAwZQIx +AK288mw/EkrRLTnDCgmXc/SINoyIJ7vmiI1Qhadj+Z4y3maTD/HMsQmP3Wyr+mt/ +oAIwOWZbwmSNuJ5Q3KjVSaLtx9zRSX8XAbjIho9OjIgrqJqpisXRAL34VOKa5Vt8 +sycX +-----END CERTIFICATE----- +-----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----- +-----BEGIN CERTIFICATE----- +MIIFXjCCA0agAwIBAgIQCL+ib5o/M2WirPCmOMQBcDANBgkqhkiG9w0BAQwFADBJ +MQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xITAfBgNVBAMT +GERpZ2lDZXJ0IFJTQTQwOTYgUm9vdCBHNTAeFw0yMTAxMTUwMDAwMDBaFw00NjAx +MTQyMzU5NTlaMEkxCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5EaWdpQ2VydCwgSW5j +LjEhMB8GA1UEAxMYRGlnaUNlcnQgUlNBNDA5NiBSb290IEc1MIICIjANBgkqhkiG +9w0BAQEFAAOCAg8AMIICCgKCAgEAqr4NsgZ9JvlH6uQb50JpuJnCue4ksUaQy1kk +UlQ1piTCX5EZyLZC1vNHZZVk54VlZ6mufABP4HgDUK3zf464EeeBYrGL3/JJJgne +Dxa82iibociXL5OQ2iAq44TU/6mesC2/tADemx/IoGNTaIVvTYXGqmP5jbI1dmJ0 +A9yTmGgFns2QZd3SejGrJC1tQC6QP2NsLOv6HoBUjXkCkBSztU9O9YgEQ4DDSLMm +L6xRlTJVJS9BlrBWoQg73JgfcoUsd8qYzDj7jnLJbewF7O1NtzxbFFCF3Zf7WfeQ +EvQTv4NNgLIVZRGXYOXWXOYEtVDmcTO2IJOpaAA4zknbtFw7ctdFXFS/zTwBIx58 +1vhpLKUACmwySLTecC06ExfBf2TL8zDtoT2WZ/GUtWBsW2lo9YIzCaK22fOFsm6g +lPDCxH2hLMpz9a7gUpyiZuYDzurf7RjUuWOL9+j/+7Nbj0PFr7d0lFA1Za7WL/GF +j1OhcPSNMl28lsMewgQEnAQPs11+iSDKXicNiUoSI7T2xN3YH/hoszb4HrzG94S2 +6IpOiDA4wCbYcAoJOjQOa4ISlhwv5p6t2HE1gbGMBm70bmb/S0quvfD+11xfU7sy +PM1i0RSgKR8Q3qlyT7GtZOWDKo+L6oSV7pglmJqzcTzBp1DyrEJiMcKhkMbu4reK +qLW2GzsCAwEAAaNCMEAwHQYDVR0OBBYEFGJtt5FPxOqjYmCPoNC+tY8GfGgAMA4G +A1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBDAUAA4IC +AQBh6PsnbdbiuLMJr6rwsYJM/j0XiU0tFZ377tC7hOyEddtDE96Mn8cp74d0yxNw +gVYAdPyu9Nk63iIIUaWgXIJmtntMqdqPq6wcQZZm1p3eVua/TrGyXl/Aw27UwoSQ +9X2xuhbRKYrInenP0McZOz/P7vfhM65CyJjACJ7zWvPf1Cs7jqgoVhnHTnc8JVTc +uEhI0fknaj7sE6+yBYn9VV/zfY4NnAldLIp+hc744b8RPTKMWtd+PfQzWM+iBZij +s/vOib/9whbdbtyISQ0LoAP/50XpBMHp/aqddfi4H4eD2es501qny5isE4kA/G+V +TuF9EUZt9jhGoxOgLAH1Ys+/HFCRJ3Rdt+xHfNDRdct77tFNIwrDYKV3LYDaZw+O +a3YH8KYP6oSuHnm/CIraCfP07rU289R6Q7qUNeH6wTsblpmkV2PrtaiC9634d9d2 +hvN2U1Zb/CZChM6fg5GRr/S+cBWApdjoabHYkVS4GbJi+aL6Ve0Ev7lEhuTP8ZsA +vxEPvrV0JFH/dzRj7EgjDugR63dt2sqCkb6khJNM2qH+zAaE6CHoVLrm0x1jPcJa +/ObJg55yZKmGWQCMwvcTg7bQpDHGrJGOe6QiVhPGdccjvItb/EY9/l1SKa+v6MnD +dkvoq0cC8poN0yyIgAeGwGMPAkyOBFN2uVhCb3wpcF2/Jw== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICGTCCAZ+gAwIBAgIQCeCTZaz32ci5PhwLBCou8zAKBggqhkjOPQQDAzBOMQsw +CQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJjAkBgNVBAMTHURp +Z2lDZXJ0IFRMUyBFQ0MgUDM4NCBSb290IEc1MB4XDTIxMDExNTAwMDAwMFoXDTQ2 +MDExNDIzNTk1OVowTjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDkRpZ2lDZXJ0LCBJ +bmMuMSYwJAYDVQQDEx1EaWdpQ2VydCBUTFMgRUNDIFAzODQgUm9vdCBHNTB2MBAG +ByqGSM49AgEGBSuBBAAiA2IABMFEoc8Rl1Ca3iOCNQfN0MsYndLxf3c1TzvdlHJS +7cI7+Oz6e2tYIOyZrsn8aLN1udsJ7MgT9U7GCh1mMEy7H0cKPGEQQil8pQgO4CLp +0zVozptjn4S1mU1YoI71VOeVyaNCMEAwHQYDVR0OBBYEFMFRRVBZqz7nLFr6ICIS +B4CIfBFqMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49 +BAMDA2gAMGUCMQCJao1H5+z8blUD2WdsJk6Dxv3J+ysTvLd6jLRl0mlpYxNjOyZQ +LgGheQaRnUi/wr4CMEfDFXuxoJGZSZOoPHzoRgaLLPIxAJSdYsiJvRmEFOml+wG4 +DXZDjC5Ty3zfDBeWUA== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIFZjCCA06gAwIBAgIQCPm0eKj6ftpqMzeJ3nzPijANBgkqhkiG9w0BAQwFADBN +MQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJTAjBgNVBAMT +HERpZ2lDZXJ0IFRMUyBSU0E0MDk2IFJvb3QgRzUwHhcNMjEwMTE1MDAwMDAwWhcN +NDYwMTE0MjM1OTU5WjBNMQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQs +IEluYy4xJTAjBgNVBAMTHERpZ2lDZXJ0IFRMUyBSU0E0MDk2IFJvb3QgRzUwggIi +MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCz0PTJeRGd/fxmgefM1eS87IE+ +ajWOLrfn3q/5B03PMJ3qCQuZvWxX2hhKuHisOjmopkisLnLlvevxGs3npAOpPxG0 +2C+JFvuUAT27L/gTBaF4HI4o4EXgg/RZG5Wzrn4DReW+wkL+7vI8toUTmDKdFqgp +wgscONyfMXdcvyej/Cestyu9dJsXLfKB2l2w4SMXPohKEiPQ6s+d3gMXsUJKoBZM +pG2T6T867jp8nVid9E6P/DsjyG244gXazOvswzH016cpVIDPRFtMbzCe88zdH5RD +nU1/cHAN1DrRN/BsnZvAFJNY781BOHW8EwOVfH/jXOnVDdXifBBiqmvwPXbzP6Po +sMH976pXTayGpxi0KcEsDr9kvimM2AItzVwv8n/vFfQMFawKsPHTDU9qTXeXAaDx +Zre3zu/O7Oyldcqs4+Fj97ihBMi8ez9dLRYiVu1ISf6nL3kwJZu6ay0/nTvEF+cd +Lvvyz6b84xQslpghjLSR6Rlgg/IwKwZzUNWYOwbpx4oMYIwo+FKbbuH2TbsGJJvX +KyY//SovcfXWJL5/MZ4PbeiPT02jP/816t9JXkGPhvnxd3lLG7SjXi/7RgLQZhNe +XoVPzthwiHvOAbWWl9fNff2C+MIkwcoBOU+NosEUQB+cZtUMCUbW8tDRSHZWOkPL +tgoRObqME2wGtZ7P6wIDAQABo0IwQDAdBgNVHQ4EFgQUUTMc7TZArxfTJc1paPKv +TiM+s0EwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcN +AQEMBQADggIBAGCmr1tfV9qJ20tQqcQjNSH/0GEwhJG3PxDPJY7Jv0Y02cEhJhxw +GXIeo8mH/qlDZJY6yFMECrZBu8RHANmfGBg7sg7zNOok992vIGCukihfNudd5N7H +PNtQOa27PShNlnx2xlv0wdsUpasZYgcYQF+Xkdycx6u1UQ3maVNVzDl92sURVXLF +O4uJ+DQtpBflF+aZfTCIITfNMBc9uPK8qHWgQ9w+iUuQrm0D4ByjoJYJu32jtyoQ +REtGBzRj7TG5BO6jm5qu5jF49OokYTurWGT/u4cnYiWB39yhL/btp/96j1EuMPik +AdKFOV8BmZZvWltwGUb+hmA+rYAQCd05JS9Yf7vSdPD3Rh9GOUrYU9DzLjtxpdRv +/PNn5AeP3SYZ4Y1b+qOTEZvpyDrDVWiakuFSdjjo4bq9+0/V77PnSIMx8IIh47a+ +p6tv75/fTM8BuGJqIz3nCU2AG3swpMPdB380vqQmsvZB6Akd4yCYqjdP//fx4ilw +MUc/dNAUFvohigLVigmUdy7yWSiLfFCSCmZ4OIN1xLVaqBHG5cGdZlXPU8Sv13WF +qUITVuwhd4GTWgzqltlJyqEI8pc7bZsEGCREjnwB8twl2F6GmrE52/WRMmrRpnCK +ovfepEWFJqgejF0pW8hL2JpqA15w8oVPbEtoL8pU9ozaMv7Da4M/OMZ+ +-----END CERTIFICATE----- From 5c6809d8b5f216826e6f86f170f818d7e2b1cec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20B=C3=A9langer?= Date: Mon, 13 May 2024 12:22:36 -0700 Subject: [PATCH 83/90] Manual Spec Update (#498) Manual Spec Update c8364404953d875801d496a81f786c5545f78223 --- dropbox/auth.py | 2 +- dropbox/base.py | 6 +- dropbox/base_team.py | 16 +- dropbox/check.py | 2 +- dropbox/files.py | 6 +- dropbox/sharing.py | 54 +- dropbox/team.py | 5 +- dropbox/team_log.py | 2553 ++++++++++++++++++++++++++++++++++++++ dropbox/team_policies.py | 81 +- spec | 2 +- 10 files changed, 2710 insertions(+), 17 deletions(-) diff --git a/dropbox/auth.py b/dropbox/auth.py index 6c122692..d69cf178 100644 --- a/dropbox/auth.py +++ b/dropbox/auth.py @@ -675,7 +675,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): token_from_oauth1 = bb.Route( 'token/from_oauth1', 1, - False, + True, TokenFromOAuth1Arg_validator, TokenFromOAuth1Result_validator, TokenFromOAuth1Error_validator, diff --git a/dropbox/base.py b/dropbox/base.py index c91ed484..8b27e80a 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -82,6 +82,10 @@ def auth_token_from_oauth1(self, If this raises, ApiError will contain: :class:`dropbox.auth.TokenFromOAuth1Error` """ + warnings.warn( + 'token/from_oauth1 is deprecated.', + DeprecationWarning, + ) arg = auth.TokenFromOAuth1Arg(oauth1_token, oauth1_token_secret) r = self.request( @@ -2880,7 +2884,7 @@ def files_save_url(self, url): """ Save the data from a specified URL into a file in user's Dropbox. Note - that the transfer from the URL must complete within 5 minutes, or the + that the transfer from the URL must complete within 15 minutes, or the operation will time out and the job will fail. If the given path already exists, the file will be renamed to avoid the conflict (e.g. myfile (1).txt). diff --git a/dropbox/base_team.py b/dropbox/base_team.py index 6f711960..ff04def4 100644 --- a/dropbox/base_team.py +++ b/dropbox/base_team.py @@ -1257,8 +1257,10 @@ def team_member_space_limits_excluded_users_remove(self, 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. + Get users custom quota. A maximum of 1000 members can be specified in a + single call. Note: to apply a custom space limit, a team admin needs to + set a member space limit for the team first. (the team admin can check + the settings here: https://www.dropbox.com/team/admin/settings/space). Route attributes: scope: members.read @@ -1283,7 +1285,10 @@ 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. + a single call. Note: to apply a custom space limit, a team admin needs + to set a member space limit for the team first. (the team admin can + check the settings here: + https://www.dropbox.com/team/admin/settings/space). Route attributes: scope: members.write @@ -1308,7 +1313,10 @@ def team_member_space_limits_set_custom_quota(self, users_and_quotas): """ Set users custom quota. Custom quota has to be at least 15GB. A maximum - of 1000 members can be specified in a single call. + of 1000 members can be specified in a single call. Note: to apply a + custom space limit, a team admin needs to set a member space limit for + the team first. (the team admin can check the settings here: + https://www.dropbox.com/team/admin/settings/space). Route attributes: scope: members.read diff --git a/dropbox/check.py b/dropbox/check.py index 29d85034..b960e449 100644 --- a/dropbox/check.py +++ b/dropbox/check.py @@ -9,7 +9,7 @@ class EchoArg(bb.Struct): """ - EchoArg contains the arguments to be sent to the Dropbox servers. + Contains the arguments to be sent to the Dropbox servers. :ivar check.EchoArg.query: The string that you'd like to be echoed back to you. diff --git a/dropbox/files.py b/dropbox/files.py index 10727c8a..a930edac 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -10868,7 +10868,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SearchV2Cursor_validator = bv.String(min_length=1) Sha256HexHash_validator = bv.String(min_length=64, max_length=64) SharedLinkUrl_validator = bv.String() -TagText_validator = bv.String(min_length=1, max_length=32, pattern='[A-Za-z0-9_]+') +TagText_validator = bv.String(min_length=1, max_length=32, pattern='[\\w]+') WritePath_validator = bv.String(pattern='(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)') WritePathOrId_validator = bv.String(pattern='(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)') AddTagArg.path.validator = Path_validator @@ -11086,7 +11086,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('parent_rev', DeleteArg.parent_rev.validator), ] -DeleteBatchArg.entries.validator = bv.List(DeleteArg_validator) +DeleteBatchArg.entries.validator = bv.List(DeleteArg_validator, max_items=1000) DeleteBatchArg._all_field_names_ = set(['entries']) DeleteBatchArg._all_fields_ = [('entries', DeleteBatchArg.entries.validator)] @@ -11979,7 +11979,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('rev', MinimalFileLinkMetadata.rev.validator), ] -RelocationBatchArgBase.entries.validator = bv.List(RelocationPath_validator, min_items=1) +RelocationBatchArgBase.entries.validator = bv.List(RelocationPath_validator, min_items=1, max_items=1000) RelocationBatchArgBase.autorename.validator = bv.Boolean() RelocationBatchArgBase._all_field_names_ = set([ 'entries', diff --git a/dropbox/sharing.py b/dropbox/sharing.py index 3564024e..9f81c142 100644 --- a/dropbox/sharing.py +++ b/dropbox/sharing.py @@ -90,6 +90,11 @@ class AccessLevel(bb.Union): the shared folder and does not have any access to comments. :ivar sharing.AccessLevel.traverse: The collaborator can only view the shared folder that they have access to. + :ivar sharing.AccessLevel.no_access: If there is a Righteous Link on the + folder which grants access and the user has visited such link, they are + allowed to perform certain action (i.e. add themselves to the folder) + via the link access even though the user themselves are not a member on + the shared folder yet. """ _catch_all = 'other' @@ -104,6 +109,8 @@ class AccessLevel(bb.Union): # Attribute is overwritten below the class definition traverse = None # Attribute is overwritten below the class definition + no_access = None + # Attribute is overwritten below the class definition other = None def is_owner(self): @@ -146,6 +153,14 @@ def is_traverse(self): """ return self._tag == 'traverse' + 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``. @@ -7909,8 +7924,8 @@ class ShareFolderArgBase(bb.Struct): happen asynchronously. :ivar sharing.ShareFolderArgBase.member_policy: Who can be a member of this shared folder. Only applicable if the current user is on a team. - :ivar sharing.ShareFolderArgBase.path: The path to the folder to share. If - it does not exist, then a new one is created. + :ivar sharing.ShareFolderArgBase.path: The path or the file id to the folder + to share. If it does not exist, then a new one is created. :ivar sharing.ShareFolderArgBase.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 @@ -8815,6 +8830,8 @@ class SharedFolderAccessError(bb.Union): invalid. :ivar sharing.SharedFolderAccessError.not_a_member: The user is not a member of the shared folder thus cannot access it. + :ivar sharing.SharedFolderAccessError.invalid_member: The user does not + exist or their account is disabled. :ivar sharing.SharedFolderAccessError.email_unverified: Never set. :ivar sharing.SharedFolderAccessError.unmounted: The shared folder is unmounted. @@ -8826,6 +8843,8 @@ class SharedFolderAccessError(bb.Union): # Attribute is overwritten below the class definition not_a_member = None # Attribute is overwritten below the class definition + invalid_member = None + # Attribute is overwritten below the class definition email_unverified = None # Attribute is overwritten below the class definition unmounted = None @@ -8848,6 +8867,14 @@ def is_not_a_member(self): """ return self._tag == 'not_a_member' + def is_invalid_member(self): + """ + Check if the union tag is ``invalid_member``. + + :rtype: bool + """ + return self._tag == 'invalid_member' + def is_email_unverified(self): """ Check if the union tag is ``email_unverified``. @@ -9039,6 +9066,8 @@ class SharedFolderMetadataBase(bb.Struct): :ivar sharing.SharedFolderMetadataBase.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 sharing.SharedFolderMetadataBase.path_display: The full path of this + shared folder. Absent for unmounted folders. :ivar sharing.SharedFolderMetadataBase.path_lower: The lower-cased full path of this shared folder. Absent for unmounted folders. :ivar sharing.SharedFolderMetadataBase.parent_folder_name: Display name for @@ -9052,6 +9081,7 @@ class SharedFolderMetadataBase(bb.Struct): '_owner_display_names_value', '_owner_team_value', '_parent_shared_folder_id_value', + '_path_display_value', '_path_lower_value', '_parent_folder_name_value', ] @@ -9065,6 +9095,7 @@ def __init__(self, owner_display_names=None, owner_team=None, parent_shared_folder_id=None, + path_display=None, path_lower=None, parent_folder_name=None): self._access_type_value = bb.NOT_SET @@ -9073,6 +9104,7 @@ def __init__(self, self._owner_display_names_value = bb.NOT_SET self._owner_team_value = bb.NOT_SET self._parent_shared_folder_id_value = bb.NOT_SET + self._path_display_value = bb.NOT_SET self._path_lower_value = bb.NOT_SET self._parent_folder_name_value = bb.NOT_SET if access_type is not None: @@ -9087,6 +9119,8 @@ def __init__(self, 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 parent_folder_name is not None: @@ -9110,6 +9144,9 @@ def __init__(self, # Instance attribute type: str (validator is set below) parent_shared_folder_id = bb.Attribute("parent_shared_folder_id", nullable=True) + # Instance attribute type: str (validator is set below) + path_display = bb.Attribute("path_display", nullable=True) + # Instance attribute type: str (validator is set below) path_lower = bb.Attribute("path_lower", nullable=True) @@ -9169,6 +9206,7 @@ def __init__(self, owner_display_names=None, owner_team=None, parent_shared_folder_id=None, + path_display=None, path_lower=None, parent_folder_name=None, link_metadata=None, @@ -9180,6 +9218,7 @@ def __init__(self, owner_display_names, owner_team, parent_shared_folder_id, + path_display, path_lower, parent_folder_name) self._link_metadata_value = bb.NOT_SET @@ -11093,6 +11132,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AccessLevel._viewer_validator = bv.Void() AccessLevel._viewer_no_comment_validator = bv.Void() AccessLevel._traverse_validator = bv.Void() +AccessLevel._no_access_validator = bv.Void() AccessLevel._other_validator = bv.Void() AccessLevel._tagmap = { 'owner': AccessLevel._owner_validator, @@ -11100,6 +11140,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'viewer': AccessLevel._viewer_validator, 'viewer_no_comment': AccessLevel._viewer_no_comment_validator, 'traverse': AccessLevel._traverse_validator, + 'no_access': AccessLevel._no_access_validator, 'other': AccessLevel._other_validator, } @@ -11108,6 +11149,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AccessLevel.viewer = AccessLevel('viewer') AccessLevel.viewer_no_comment = AccessLevel('viewer_no_comment') AccessLevel.traverse = AccessLevel('traverse') +AccessLevel.no_access = AccessLevel('no_access') AccessLevel.other = AccessLevel('other') AclUpdatePolicy._owner_validator = bv.Void() @@ -12781,7 +12823,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 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.path.validator = files.WritePathOrId_validator ShareFolderArgBase.shared_link_policy.validator = bv.Nullable(SharedLinkPolicy_validator) ShareFolderArgBase.viewer_info_policy.validator = bv.Nullable(ViewerInfoPolicy_validator) ShareFolderArgBase.access_inheritance.validator = AccessInheritance_validator @@ -12986,12 +13028,14 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SharedFolderAccessError._invalid_id_validator = bv.Void() SharedFolderAccessError._not_a_member_validator = bv.Void() +SharedFolderAccessError._invalid_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, + 'invalid_member': SharedFolderAccessError._invalid_member_validator, 'email_unverified': SharedFolderAccessError._email_unverified_validator, 'unmounted': SharedFolderAccessError._unmounted_validator, 'other': SharedFolderAccessError._other_validator, @@ -12999,6 +13043,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SharedFolderAccessError.invalid_id = SharedFolderAccessError('invalid_id') SharedFolderAccessError.not_a_member = SharedFolderAccessError('not_a_member') +SharedFolderAccessError.invalid_member = SharedFolderAccessError('invalid_member') SharedFolderAccessError.email_unverified = SharedFolderAccessError('email_unverified') SharedFolderAccessError.unmounted = SharedFolderAccessError('unmounted') SharedFolderAccessError.other = SharedFolderAccessError('other') @@ -13041,6 +13086,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 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_display.validator = bv.Nullable(bv.String()) SharedFolderMetadataBase.path_lower.validator = bv.Nullable(bv.String()) SharedFolderMetadataBase.parent_folder_name.validator = bv.Nullable(bv.String()) SharedFolderMetadataBase._all_field_names_ = set([ @@ -13050,6 +13096,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'owner_display_names', 'owner_team', 'parent_shared_folder_id', + 'path_display', 'path_lower', 'parent_folder_name', ]) @@ -13060,6 +13107,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('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_display', SharedFolderMetadataBase.path_display.validator), ('path_lower', SharedFolderMetadataBase.path_lower.validator), ('parent_folder_name', SharedFolderMetadataBase.parent_folder_name.validator), ] diff --git a/dropbox/team.py b/dropbox/team.py index 552f7251..7859a456 100644 --- a/dropbox/team.py +++ b/dropbox/team.py @@ -12396,8 +12396,8 @@ def __init__(self, team_id=None, num_licensed_users=None, num_provisioned_users=None, - num_used_licenses=None, - policies=None): + policies=None, + num_used_licenses=None): self._name_value = bb.NOT_SET self._team_id_value = bb.NOT_SET self._num_licensed_users_value = bb.NOT_SET @@ -16980,6 +16980,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): SharingAllowlistListResponse.has_more.default = False TeamFolderArchiveArg.force_async_off.default = False TeamFolderListArg.limit.default = 1000 +TeamGetInfoResult.num_used_licenses.default = 0 TeamNamespacesListArg.limit.default = 1000 devices_list_member_devices = bb.Route( 'devices/list_member_devices', diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 3b34d3bd..8049ee2d 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -573,6 +573,8 @@ class AccountCapturePolicy(bb.Union): # Attribute is overwritten below the class definition invited_users = None # Attribute is overwritten below the class definition + prevent_personal_creation = None + # Attribute is overwritten below the class definition other = None def is_all_users(self): @@ -599,6 +601,14 @@ def is_invited_users(self): """ return self._tag == 'invited_users' + def is_prevent_personal_creation(self): + """ + Check if the union tag is ``prevent_personal_creation``. + + :rtype: bool + """ + return self._tag == 'prevent_personal_creation' + def is_other(self): """ Check if the union tag is ``other``. @@ -2862,6 +2872,86 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AssetLogInfo_validator = bv.Union(AssetLogInfo) +class BackupAdminInvitationSentDetails(bb.Struct): + """ + Invited members to activate Backup. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(BackupAdminInvitationSentDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +BackupAdminInvitationSentDetails_validator = bv.Struct(BackupAdminInvitationSentDetails) + +class BackupAdminInvitationSentType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(BackupAdminInvitationSentType, self)._process_custom_annotations(annotation_type, field_path, processor) + +BackupAdminInvitationSentType_validator = bv.Struct(BackupAdminInvitationSentType) + +class BackupInvitationOpenedDetails(bb.Struct): + """ + Opened Backup invite. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(BackupInvitationOpenedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +BackupInvitationOpenedDetails_validator = bv.Struct(BackupInvitationOpenedDetails) + +class BackupInvitationOpenedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(BackupInvitationOpenedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +BackupInvitationOpenedType_validator = bv.Struct(BackupInvitationOpenedType) + class BackupStatus(bb.Union): """ Backup status @@ -8107,6 +8197,7 @@ class EventCategory(bb.Union): mobile, desktop and Web platforms. :ivar team_log.EventCategory.domains: Events that involve domain management feature: domain verification, invite enforcement and account capture. + :ivar team_log.EventCategory.encryption: Events that involve encryption. :ivar team_log.EventCategory.file_operations: Events that have to do with filesystem operations on files and folders: copy, move, delete, etc. :ivar team_log.EventCategory.file_requests: Events that apply to the file @@ -8155,6 +8246,8 @@ class EventCategory(bb.Union): # Attribute is overwritten below the class definition domains = None # Attribute is overwritten below the class definition + encryption = None + # Attribute is overwritten below the class definition file_operations = None # Attribute is overwritten below the class definition file_requests = None @@ -8237,6 +8330,14 @@ def is_domains(self): """ return self._tag == 'domains' + def is_encryption(self): + """ + Check if the union tag is ``encryption``. + + :rtype: bool + """ + return self._tag == 'encryption' + def is_file_operations(self): """ Check if the union tag is ``file_operations``. @@ -8427,6 +8528,28 @@ def admin_alerting_triggered_alert_details(cls, val): """ return cls('admin_alerting_triggered_alert_details', val) + @classmethod + def ransomware_restore_process_completed_details(cls, val): + """ + Create an instance of this class set to the + ``ransomware_restore_process_completed_details`` tag with value ``val``. + + :param RansomwareRestoreProcessCompletedDetails val: + :rtype: EventDetails + """ + return cls('ransomware_restore_process_completed_details', val) + + @classmethod + def ransomware_restore_process_started_details(cls, val): + """ + Create an instance of this class set to the + ``ransomware_restore_process_started_details`` tag with value ``val``. + + :param RansomwareRestoreProcessStartedDetails val: + :rtype: EventDetails + """ + return cls('ransomware_restore_process_started_details', val) + @classmethod def app_blocked_by_permissions_details(cls, val): """ @@ -9195,6 +9318,85 @@ def enabled_domain_invites_details(cls, val): """ return cls('enabled_domain_invites_details', val) + @classmethod + def team_encryption_key_cancel_key_deletion_details(cls, val): + """ + Create an instance of this class set to the + ``team_encryption_key_cancel_key_deletion_details`` tag with value + ``val``. + + :param TeamEncryptionKeyCancelKeyDeletionDetails val: + :rtype: EventDetails + """ + return cls('team_encryption_key_cancel_key_deletion_details', val) + + @classmethod + def team_encryption_key_create_key_details(cls, val): + """ + Create an instance of this class set to the + ``team_encryption_key_create_key_details`` tag with value ``val``. + + :param TeamEncryptionKeyCreateKeyDetails val: + :rtype: EventDetails + """ + return cls('team_encryption_key_create_key_details', val) + + @classmethod + def team_encryption_key_delete_key_details(cls, val): + """ + Create an instance of this class set to the + ``team_encryption_key_delete_key_details`` tag with value ``val``. + + :param TeamEncryptionKeyDeleteKeyDetails val: + :rtype: EventDetails + """ + return cls('team_encryption_key_delete_key_details', val) + + @classmethod + def team_encryption_key_disable_key_details(cls, val): + """ + Create an instance of this class set to the + ``team_encryption_key_disable_key_details`` tag with value ``val``. + + :param TeamEncryptionKeyDisableKeyDetails val: + :rtype: EventDetails + """ + return cls('team_encryption_key_disable_key_details', val) + + @classmethod + def team_encryption_key_enable_key_details(cls, val): + """ + Create an instance of this class set to the + ``team_encryption_key_enable_key_details`` tag with value ``val``. + + :param TeamEncryptionKeyEnableKeyDetails val: + :rtype: EventDetails + """ + return cls('team_encryption_key_enable_key_details', val) + + @classmethod + def team_encryption_key_rotate_key_details(cls, val): + """ + Create an instance of this class set to the + ``team_encryption_key_rotate_key_details`` tag with value ``val``. + + :param TeamEncryptionKeyRotateKeyDetails val: + :rtype: EventDetails + """ + return cls('team_encryption_key_rotate_key_details', val) + + @classmethod + def team_encryption_key_schedule_key_deletion_details(cls, val): + """ + Create an instance of this class set to the + ``team_encryption_key_schedule_key_deletion_details`` tag with value + ``val``. + + :param TeamEncryptionKeyScheduleKeyDeletionDetails val: + :rtype: EventDetails + """ + return cls('team_encryption_key_schedule_key_deletion_details', val) + @classmethod def apply_naming_convention_details(cls, val): """ @@ -9228,6 +9430,17 @@ def file_add_details(cls, val): """ return cls('file_add_details', val) + @classmethod + def file_add_from_automation_details(cls, val): + """ + Create an instance of this class set to the + ``file_add_from_automation_details`` tag with value ``val``. + + :param FileAddFromAutomationDetails val: + :rtype: EventDetails + """ + return cls('file_add_from_automation_details', val) + @classmethod def file_copy_details(cls, val): """ @@ -9459,6 +9672,17 @@ def organize_folder_with_tidy_details(cls, val): """ return cls('organize_folder_with_tidy_details', val) + @classmethod + def replay_file_delete_details(cls, val): + """ + Create an instance of this class set to the + ``replay_file_delete_details`` tag with value ``val``. + + :param ReplayFileDeleteDetails val: + :rtype: EventDetails + """ + return cls('replay_file_delete_details', val) + @classmethod def rewind_folder_details(cls, val): """ @@ -9857,6 +10081,28 @@ def sso_error_details(cls, val): """ return cls('sso_error_details', val) + @classmethod + def backup_admin_invitation_sent_details(cls, val): + """ + Create an instance of this class set to the + ``backup_admin_invitation_sent_details`` tag with value ``val``. + + :param BackupAdminInvitationSentDetails val: + :rtype: EventDetails + """ + return cls('backup_admin_invitation_sent_details', val) + + @classmethod + def backup_invitation_opened_details(cls, val): + """ + Create an instance of this class set to the + ``backup_invitation_opened_details`` tag with value ``val``. + + :param BackupInvitationOpenedDetails val: + :rtype: EventDetails + """ + return cls('backup_invitation_opened_details', val) + @classmethod def create_team_invite_link_details(cls, val): """ @@ -10906,6 +11152,29 @@ def paper_admin_export_start_details(cls, val): """ return cls('paper_admin_export_start_details', val) + @classmethod + def ransomware_alert_create_report_details(cls, val): + """ + Create an instance of this class set to the + ``ransomware_alert_create_report_details`` tag with value ``val``. + + :param RansomwareAlertCreateReportDetails val: + :rtype: EventDetails + """ + return cls('ransomware_alert_create_report_details', val) + + @classmethod + def ransomware_alert_create_report_failed_details(cls, val): + """ + Create an instance of this class set to the + ``ransomware_alert_create_report_failed_details`` tag with value + ``val``. + + :param RansomwareAlertCreateReportFailedDetails val: + :rtype: EventDetails + """ + return cls('ransomware_alert_create_report_failed_details', val) + @classmethod def smart_sync_create_admin_privilege_report_details(cls, val): """ @@ -11072,6 +11341,50 @@ def open_note_shared_details(cls, val): """ return cls('open_note_shared_details', val) + @classmethod + def replay_file_shared_link_created_details(cls, val): + """ + Create an instance of this class set to the + ``replay_file_shared_link_created_details`` tag with value ``val``. + + :param ReplayFileSharedLinkCreatedDetails val: + :rtype: EventDetails + """ + return cls('replay_file_shared_link_created_details', val) + + @classmethod + def replay_file_shared_link_modified_details(cls, val): + """ + Create an instance of this class set to the + ``replay_file_shared_link_modified_details`` tag with value ``val``. + + :param ReplayFileSharedLinkModifiedDetails val: + :rtype: EventDetails + """ + return cls('replay_file_shared_link_modified_details', val) + + @classmethod + def replay_project_team_add_details(cls, val): + """ + Create an instance of this class set to the + ``replay_project_team_add_details`` tag with value ``val``. + + :param ReplayProjectTeamAddDetails val: + :rtype: EventDetails + """ + return cls('replay_project_team_add_details', val) + + @classmethod + def replay_project_team_delete_details(cls, val): + """ + Create an instance of this class set to the + ``replay_project_team_delete_details`` tag with value ``val``. + + :param ReplayProjectTeamDeleteDetails val: + :rtype: EventDetails + """ + return cls('replay_project_team_delete_details', val) + @classmethod def sf_add_group_details(cls, val): """ @@ -13817,6 +14130,22 @@ def is_admin_alerting_triggered_alert_details(self): """ return self._tag == 'admin_alerting_triggered_alert_details' + def is_ransomware_restore_process_completed_details(self): + """ + Check if the union tag is ``ransomware_restore_process_completed_details``. + + :rtype: bool + """ + return self._tag == 'ransomware_restore_process_completed_details' + + def is_ransomware_restore_process_started_details(self): + """ + Check if the union tag is ``ransomware_restore_process_started_details``. + + :rtype: bool + """ + return self._tag == 'ransomware_restore_process_started_details' + def is_app_blocked_by_permissions_details(self): """ Check if the union tag is ``app_blocked_by_permissions_details``. @@ -14369,6 +14698,62 @@ def is_enabled_domain_invites_details(self): """ return self._tag == 'enabled_domain_invites_details' + def is_team_encryption_key_cancel_key_deletion_details(self): + """ + Check if the union tag is ``team_encryption_key_cancel_key_deletion_details``. + + :rtype: bool + """ + return self._tag == 'team_encryption_key_cancel_key_deletion_details' + + def is_team_encryption_key_create_key_details(self): + """ + Check if the union tag is ``team_encryption_key_create_key_details``. + + :rtype: bool + """ + return self._tag == 'team_encryption_key_create_key_details' + + def is_team_encryption_key_delete_key_details(self): + """ + Check if the union tag is ``team_encryption_key_delete_key_details``. + + :rtype: bool + """ + return self._tag == 'team_encryption_key_delete_key_details' + + def is_team_encryption_key_disable_key_details(self): + """ + Check if the union tag is ``team_encryption_key_disable_key_details``. + + :rtype: bool + """ + return self._tag == 'team_encryption_key_disable_key_details' + + def is_team_encryption_key_enable_key_details(self): + """ + Check if the union tag is ``team_encryption_key_enable_key_details``. + + :rtype: bool + """ + return self._tag == 'team_encryption_key_enable_key_details' + + def is_team_encryption_key_rotate_key_details(self): + """ + Check if the union tag is ``team_encryption_key_rotate_key_details``. + + :rtype: bool + """ + return self._tag == 'team_encryption_key_rotate_key_details' + + def is_team_encryption_key_schedule_key_deletion_details(self): + """ + Check if the union tag is ``team_encryption_key_schedule_key_deletion_details``. + + :rtype: bool + """ + return self._tag == 'team_encryption_key_schedule_key_deletion_details' + def is_apply_naming_convention_details(self): """ Check if the union tag is ``apply_naming_convention_details``. @@ -14393,6 +14778,14 @@ def is_file_add_details(self): """ return self._tag == 'file_add_details' + def is_file_add_from_automation_details(self): + """ + Check if the union tag is ``file_add_from_automation_details``. + + :rtype: bool + """ + return self._tag == 'file_add_from_automation_details' + def is_file_copy_details(self): """ Check if the union tag is ``file_copy_details``. @@ -14561,6 +14954,14 @@ def is_organize_folder_with_tidy_details(self): """ return self._tag == 'organize_folder_with_tidy_details' + def is_replay_file_delete_details(self): + """ + Check if the union tag is ``replay_file_delete_details``. + + :rtype: bool + """ + return self._tag == 'replay_file_delete_details' + def is_rewind_folder_details(self): """ Check if the union tag is ``rewind_folder_details``. @@ -14849,6 +15250,22 @@ def is_sso_error_details(self): """ return self._tag == 'sso_error_details' + def is_backup_admin_invitation_sent_details(self): + """ + Check if the union tag is ``backup_admin_invitation_sent_details``. + + :rtype: bool + """ + return self._tag == 'backup_admin_invitation_sent_details' + + def is_backup_invitation_opened_details(self): + """ + Check if the union tag is ``backup_invitation_opened_details``. + + :rtype: bool + """ + return self._tag == 'backup_invitation_opened_details' + def is_create_team_invite_link_details(self): """ Check if the union tag is ``create_team_invite_link_details``. @@ -15609,6 +16026,22 @@ def is_paper_admin_export_start_details(self): """ return self._tag == 'paper_admin_export_start_details' + def is_ransomware_alert_create_report_details(self): + """ + Check if the union tag is ``ransomware_alert_create_report_details``. + + :rtype: bool + """ + return self._tag == 'ransomware_alert_create_report_details' + + def is_ransomware_alert_create_report_failed_details(self): + """ + Check if the union tag is ``ransomware_alert_create_report_failed_details``. + + :rtype: bool + """ + return self._tag == 'ransomware_alert_create_report_failed_details' + def is_smart_sync_create_admin_privilege_report_details(self): """ Check if the union tag is ``smart_sync_create_admin_privilege_report_details``. @@ -15729,6 +16162,38 @@ def is_open_note_shared_details(self): """ return self._tag == 'open_note_shared_details' + def is_replay_file_shared_link_created_details(self): + """ + Check if the union tag is ``replay_file_shared_link_created_details``. + + :rtype: bool + """ + return self._tag == 'replay_file_shared_link_created_details' + + def is_replay_file_shared_link_modified_details(self): + """ + Check if the union tag is ``replay_file_shared_link_modified_details``. + + :rtype: bool + """ + return self._tag == 'replay_file_shared_link_modified_details' + + def is_replay_project_team_add_details(self): + """ + Check if the union tag is ``replay_project_team_add_details``. + + :rtype: bool + """ + return self._tag == 'replay_project_team_add_details' + + def is_replay_project_team_delete_details(self): + """ + Check if the union tag is ``replay_project_team_delete_details``. + + :rtype: bool + """ + return self._tag == 'replay_project_team_delete_details' + def is_sf_add_group_details(self): """ Check if the union tag is ``sf_add_group_details``. @@ -17711,6 +18176,26 @@ def get_admin_alerting_triggered_alert_details(self): raise AttributeError("tag 'admin_alerting_triggered_alert_details' not set") return self._value + def get_ransomware_restore_process_completed_details(self): + """ + Only call this if :meth:`is_ransomware_restore_process_completed_details` is true. + + :rtype: RansomwareRestoreProcessCompletedDetails + """ + if not self.is_ransomware_restore_process_completed_details(): + raise AttributeError("tag 'ransomware_restore_process_completed_details' not set") + return self._value + + def get_ransomware_restore_process_started_details(self): + """ + Only call this if :meth:`is_ransomware_restore_process_started_details` is true. + + :rtype: RansomwareRestoreProcessStartedDetails + """ + if not self.is_ransomware_restore_process_started_details(): + raise AttributeError("tag 'ransomware_restore_process_started_details' not set") + return self._value + def get_app_blocked_by_permissions_details(self): """ Only call this if :meth:`is_app_blocked_by_permissions_details` is true. @@ -18401,6 +18886,76 @@ def get_enabled_domain_invites_details(self): raise AttributeError("tag 'enabled_domain_invites_details' not set") return self._value + def get_team_encryption_key_cancel_key_deletion_details(self): + """ + Only call this if :meth:`is_team_encryption_key_cancel_key_deletion_details` is true. + + :rtype: TeamEncryptionKeyCancelKeyDeletionDetails + """ + if not self.is_team_encryption_key_cancel_key_deletion_details(): + raise AttributeError("tag 'team_encryption_key_cancel_key_deletion_details' not set") + return self._value + + def get_team_encryption_key_create_key_details(self): + """ + Only call this if :meth:`is_team_encryption_key_create_key_details` is true. + + :rtype: TeamEncryptionKeyCreateKeyDetails + """ + if not self.is_team_encryption_key_create_key_details(): + raise AttributeError("tag 'team_encryption_key_create_key_details' not set") + return self._value + + def get_team_encryption_key_delete_key_details(self): + """ + Only call this if :meth:`is_team_encryption_key_delete_key_details` is true. + + :rtype: TeamEncryptionKeyDeleteKeyDetails + """ + if not self.is_team_encryption_key_delete_key_details(): + raise AttributeError("tag 'team_encryption_key_delete_key_details' not set") + return self._value + + def get_team_encryption_key_disable_key_details(self): + """ + Only call this if :meth:`is_team_encryption_key_disable_key_details` is true. + + :rtype: TeamEncryptionKeyDisableKeyDetails + """ + if not self.is_team_encryption_key_disable_key_details(): + raise AttributeError("tag 'team_encryption_key_disable_key_details' not set") + return self._value + + def get_team_encryption_key_enable_key_details(self): + """ + Only call this if :meth:`is_team_encryption_key_enable_key_details` is true. + + :rtype: TeamEncryptionKeyEnableKeyDetails + """ + if not self.is_team_encryption_key_enable_key_details(): + raise AttributeError("tag 'team_encryption_key_enable_key_details' not set") + return self._value + + def get_team_encryption_key_rotate_key_details(self): + """ + Only call this if :meth:`is_team_encryption_key_rotate_key_details` is true. + + :rtype: TeamEncryptionKeyRotateKeyDetails + """ + if not self.is_team_encryption_key_rotate_key_details(): + raise AttributeError("tag 'team_encryption_key_rotate_key_details' not set") + return self._value + + def get_team_encryption_key_schedule_key_deletion_details(self): + """ + Only call this if :meth:`is_team_encryption_key_schedule_key_deletion_details` is true. + + :rtype: TeamEncryptionKeyScheduleKeyDeletionDetails + """ + if not self.is_team_encryption_key_schedule_key_deletion_details(): + raise AttributeError("tag 'team_encryption_key_schedule_key_deletion_details' not set") + return self._value + def get_apply_naming_convention_details(self): """ Only call this if :meth:`is_apply_naming_convention_details` is true. @@ -18431,6 +18986,16 @@ def get_file_add_details(self): raise AttributeError("tag 'file_add_details' not set") return self._value + def get_file_add_from_automation_details(self): + """ + Only call this if :meth:`is_file_add_from_automation_details` is true. + + :rtype: FileAddFromAutomationDetails + """ + if not self.is_file_add_from_automation_details(): + raise AttributeError("tag 'file_add_from_automation_details' not set") + return self._value + def get_file_copy_details(self): """ Only call this if :meth:`is_file_copy_details` is true. @@ -18641,6 +19206,16 @@ def get_organize_folder_with_tidy_details(self): raise AttributeError("tag 'organize_folder_with_tidy_details' not set") return self._value + def get_replay_file_delete_details(self): + """ + Only call this if :meth:`is_replay_file_delete_details` is true. + + :rtype: ReplayFileDeleteDetails + """ + if not self.is_replay_file_delete_details(): + raise AttributeError("tag 'replay_file_delete_details' not set") + return self._value + def get_rewind_folder_details(self): """ Only call this if :meth:`is_rewind_folder_details` is true. @@ -19001,6 +19576,26 @@ def get_sso_error_details(self): raise AttributeError("tag 'sso_error_details' not set") return self._value + def get_backup_admin_invitation_sent_details(self): + """ + Only call this if :meth:`is_backup_admin_invitation_sent_details` is true. + + :rtype: BackupAdminInvitationSentDetails + """ + if not self.is_backup_admin_invitation_sent_details(): + raise AttributeError("tag 'backup_admin_invitation_sent_details' not set") + return self._value + + def get_backup_invitation_opened_details(self): + """ + Only call this if :meth:`is_backup_invitation_opened_details` is true. + + :rtype: BackupInvitationOpenedDetails + """ + if not self.is_backup_invitation_opened_details(): + raise AttributeError("tag 'backup_invitation_opened_details' not set") + return self._value + def get_create_team_invite_link_details(self): """ Only call this if :meth:`is_create_team_invite_link_details` is true. @@ -19951,6 +20546,26 @@ def get_paper_admin_export_start_details(self): raise AttributeError("tag 'paper_admin_export_start_details' not set") return self._value + def get_ransomware_alert_create_report_details(self): + """ + Only call this if :meth:`is_ransomware_alert_create_report_details` is true. + + :rtype: RansomwareAlertCreateReportDetails + """ + if not self.is_ransomware_alert_create_report_details(): + raise AttributeError("tag 'ransomware_alert_create_report_details' not set") + return self._value + + def get_ransomware_alert_create_report_failed_details(self): + """ + Only call this if :meth:`is_ransomware_alert_create_report_failed_details` is true. + + :rtype: RansomwareAlertCreateReportFailedDetails + """ + if not self.is_ransomware_alert_create_report_failed_details(): + raise AttributeError("tag 'ransomware_alert_create_report_failed_details' not set") + return self._value + def get_smart_sync_create_admin_privilege_report_details(self): """ Only call this if :meth:`is_smart_sync_create_admin_privilege_report_details` is true. @@ -20101,6 +20716,46 @@ def get_open_note_shared_details(self): raise AttributeError("tag 'open_note_shared_details' not set") return self._value + def get_replay_file_shared_link_created_details(self): + """ + Only call this if :meth:`is_replay_file_shared_link_created_details` is true. + + :rtype: ReplayFileSharedLinkCreatedDetails + """ + if not self.is_replay_file_shared_link_created_details(): + raise AttributeError("tag 'replay_file_shared_link_created_details' not set") + return self._value + + def get_replay_file_shared_link_modified_details(self): + """ + Only call this if :meth:`is_replay_file_shared_link_modified_details` is true. + + :rtype: ReplayFileSharedLinkModifiedDetails + """ + if not self.is_replay_file_shared_link_modified_details(): + raise AttributeError("tag 'replay_file_shared_link_modified_details' not set") + return self._value + + def get_replay_project_team_add_details(self): + """ + Only call this if :meth:`is_replay_project_team_add_details` is true. + + :rtype: ReplayProjectTeamAddDetails + """ + if not self.is_replay_project_team_add_details(): + raise AttributeError("tag 'replay_project_team_add_details' not set") + return self._value + + def get_replay_project_team_delete_details(self): + """ + Only call this if :meth:`is_replay_project_team_delete_details` is true. + + :rtype: ReplayProjectTeamDeleteDetails + """ + if not self.is_replay_project_team_delete_details(): + raise AttributeError("tag 'replay_project_team_delete_details' not set") + return self._value + def get_sf_add_group_details(self): """ Only call this if :meth:`is_sf_add_group_details` is true. @@ -22556,6 +23211,12 @@ class EventType(bb.Union): :ivar AdminAlertingTriggeredAlertType EventType.admin_alerting_triggered_alert: (admin_alerting) Triggered security alert + :ivar RansomwareRestoreProcessCompletedType + EventType.ransomware_restore_process_completed: (admin_alerting) + Completed ransomware restore process + :ivar RansomwareRestoreProcessStartedType + EventType.ransomware_restore_process_started: (admin_alerting) Started + ransomware restore process :ivar AppBlockedByPermissionsType EventType.app_blocked_by_permissions: (apps) Failed to connect app for member :ivar AppLinkTeamType EventType.app_link_team: (apps) Linked app for team @@ -22723,12 +23384,35 @@ class EventType(bb.Union): from list of verified team domains :ivar EnabledDomainInvitesType EventType.enabled_domain_invites: (domains) Enabled domain invites (deprecated, no longer logged) + :ivar TeamEncryptionKeyCancelKeyDeletionType + EventType.team_encryption_key_cancel_key_deletion: (encryption) Canceled + team encryption key deletion + :ivar TeamEncryptionKeyCreateKeyType + EventType.team_encryption_key_create_key: (encryption) Created team + encryption key + :ivar TeamEncryptionKeyDeleteKeyType + EventType.team_encryption_key_delete_key: (encryption) Deleted team + encryption key + :ivar TeamEncryptionKeyDisableKeyType + EventType.team_encryption_key_disable_key: (encryption) Disabled team + encryption key + :ivar TeamEncryptionKeyEnableKeyType + EventType.team_encryption_key_enable_key: (encryption) Enabled team + encryption key + :ivar TeamEncryptionKeyRotateKeyType + EventType.team_encryption_key_rotate_key: (encryption) Rotated team + encryption key (deprecated, no longer logged) + :ivar TeamEncryptionKeyScheduleKeyDeletionType + EventType.team_encryption_key_schedule_key_deletion: (encryption) + Scheduled encryption key deletion :ivar ApplyNamingConventionType EventType.apply_naming_convention: (file_operations) Applied naming convention :ivar CreateFolderType EventType.create_folder: (file_operations) Created folders (deprecated, no longer logged) :ivar FileAddType EventType.file_add: (file_operations) Added files and/or folders + :ivar FileAddFromAutomationType EventType.file_add_from_automation: + (file_operations) Added files and/or folders from automation :ivar FileCopyType EventType.file_copy: (file_operations) Copied files and/or folders :ivar FileDeleteType EventType.file_delete: (file_operations) Deleted files @@ -22773,6 +23457,8 @@ class EventType(bb.Union): (file_operations) Updated a label's value :ivar OrganizeFolderWithTidyType EventType.organize_folder_with_tidy: (file_operations) Organized a folder with multi-file organize + :ivar ReplayFileDeleteType EventType.replay_file_delete: (file_operations) + Deleted files in Replay :ivar RewindFolderType EventType.rewind_folder: (file_operations) Rewound a folder :ivar UndoNamingConventionType EventType.undo_naming_convention: @@ -22843,6 +23529,10 @@ class EventType(bb.Union): Started admin sign-in-as session :ivar SsoErrorType EventType.sso_error: (logins) Failed to sign in via SSO (deprecated, replaced by 'Failed to sign in') + :ivar BackupAdminInvitationSentType EventType.backup_admin_invitation_sent: + (members) Invited members to activate Backup + :ivar BackupInvitationOpenedType EventType.backup_invitation_opened: + (members) Opened Backup invite :ivar CreateTeamInviteLinkType EventType.create_team_invite_link: (members) Created team invite link :ivar DeleteTeamInviteLinkType EventType.delete_team_invite_link: (members) @@ -23062,6 +23752,12 @@ class EventType(bb.Union): report: Views of old links :ivar PaperAdminExportStartType EventType.paper_admin_export_start: (reports) Exported all team Paper docs + :ivar RansomwareAlertCreateReportType + EventType.ransomware_alert_create_report: (reports) Created ransomware + report + :ivar RansomwareAlertCreateReportFailedType + EventType.ransomware_alert_create_report_failed: (reports) Couldn't + generate ransomware report :ivar SmartSyncCreateAdminPrivilegeReportType EventType.smart_sync_create_admin_privilege_report: (reports) Created Smart Sync non-admin devices report @@ -23094,6 +23790,16 @@ class EventType(bb.Union): received Paper doc (deprecated, no longer logged) :ivar OpenNoteSharedType EventType.open_note_shared: (sharing) Opened shared Paper doc (deprecated, no longer logged) + :ivar ReplayFileSharedLinkCreatedType + EventType.replay_file_shared_link_created: (sharing) Created shared link + in Replay + :ivar ReplayFileSharedLinkModifiedType + EventType.replay_file_shared_link_modified: (sharing) Modified shared + link in Replay + :ivar ReplayProjectTeamAddType EventType.replay_project_team_add: (sharing) + Added member to Replay Project + :ivar ReplayProjectTeamDeleteType EventType.replay_project_team_delete: + (sharing) Removed member from Replay Project :ivar SfAddGroupType EventType.sf_add_group: (sharing) Added team to shared folder (deprecated, no longer logged) :ivar SfAllowNonMembersToViewSharedLinksType @@ -23766,6 +24472,28 @@ def admin_alerting_triggered_alert(cls, val): """ return cls('admin_alerting_triggered_alert', val) + @classmethod + def ransomware_restore_process_completed(cls, val): + """ + Create an instance of this class set to the + ``ransomware_restore_process_completed`` tag with value ``val``. + + :param RansomwareRestoreProcessCompletedType val: + :rtype: EventType + """ + return cls('ransomware_restore_process_completed', val) + + @classmethod + def ransomware_restore_process_started(cls, val): + """ + Create an instance of this class set to the + ``ransomware_restore_process_started`` tag with value ``val``. + + :param RansomwareRestoreProcessStartedType val: + :rtype: EventType + """ + return cls('ransomware_restore_process_started', val) + @classmethod def app_blocked_by_permissions(cls, val): """ @@ -24528,6 +25256,83 @@ def enabled_domain_invites(cls, val): """ return cls('enabled_domain_invites', val) + @classmethod + def team_encryption_key_cancel_key_deletion(cls, val): + """ + Create an instance of this class set to the + ``team_encryption_key_cancel_key_deletion`` tag with value ``val``. + + :param TeamEncryptionKeyCancelKeyDeletionType val: + :rtype: EventType + """ + return cls('team_encryption_key_cancel_key_deletion', val) + + @classmethod + def team_encryption_key_create_key(cls, val): + """ + Create an instance of this class set to the + ``team_encryption_key_create_key`` tag with value ``val``. + + :param TeamEncryptionKeyCreateKeyType val: + :rtype: EventType + """ + return cls('team_encryption_key_create_key', val) + + @classmethod + def team_encryption_key_delete_key(cls, val): + """ + Create an instance of this class set to the + ``team_encryption_key_delete_key`` tag with value ``val``. + + :param TeamEncryptionKeyDeleteKeyType val: + :rtype: EventType + """ + return cls('team_encryption_key_delete_key', val) + + @classmethod + def team_encryption_key_disable_key(cls, val): + """ + Create an instance of this class set to the + ``team_encryption_key_disable_key`` tag with value ``val``. + + :param TeamEncryptionKeyDisableKeyType val: + :rtype: EventType + """ + return cls('team_encryption_key_disable_key', val) + + @classmethod + def team_encryption_key_enable_key(cls, val): + """ + Create an instance of this class set to the + ``team_encryption_key_enable_key`` tag with value ``val``. + + :param TeamEncryptionKeyEnableKeyType val: + :rtype: EventType + """ + return cls('team_encryption_key_enable_key', val) + + @classmethod + def team_encryption_key_rotate_key(cls, val): + """ + Create an instance of this class set to the + ``team_encryption_key_rotate_key`` tag with value ``val``. + + :param TeamEncryptionKeyRotateKeyType val: + :rtype: EventType + """ + return cls('team_encryption_key_rotate_key', val) + + @classmethod + def team_encryption_key_schedule_key_deletion(cls, val): + """ + Create an instance of this class set to the + ``team_encryption_key_schedule_key_deletion`` tag with value ``val``. + + :param TeamEncryptionKeyScheduleKeyDeletionType val: + :rtype: EventType + """ + return cls('team_encryption_key_schedule_key_deletion', val) + @classmethod def apply_naming_convention(cls, val): """ @@ -24561,6 +25366,17 @@ def file_add(cls, val): """ return cls('file_add', val) + @classmethod + def file_add_from_automation(cls, val): + """ + Create an instance of this class set to the ``file_add_from_automation`` + tag with value ``val``. + + :param FileAddFromAutomationType val: + :rtype: EventType + """ + return cls('file_add_from_automation', val) + @classmethod def file_copy(cls, val): """ @@ -24792,6 +25608,17 @@ def organize_folder_with_tidy(cls, val): """ return cls('organize_folder_with_tidy', val) + @classmethod + def replay_file_delete(cls, val): + """ + Create an instance of this class set to the ``replay_file_delete`` tag + with value ``val``. + + :param ReplayFileDeleteType val: + :rtype: EventType + """ + return cls('replay_file_delete', val) + @classmethod def rewind_folder(cls, val): """ @@ -25188,6 +26015,28 @@ def sso_error(cls, val): """ return cls('sso_error', val) + @classmethod + def backup_admin_invitation_sent(cls, val): + """ + Create an instance of this class set to the + ``backup_admin_invitation_sent`` tag with value ``val``. + + :param BackupAdminInvitationSentType val: + :rtype: EventType + """ + return cls('backup_admin_invitation_sent', val) + + @classmethod + def backup_invitation_opened(cls, val): + """ + Create an instance of this class set to the ``backup_invitation_opened`` + tag with value ``val``. + + :param BackupInvitationOpenedType val: + :rtype: EventType + """ + return cls('backup_invitation_opened', val) + @classmethod def create_team_invite_link(cls, val): """ @@ -26233,6 +27082,28 @@ def paper_admin_export_start(cls, val): """ return cls('paper_admin_export_start', val) + @classmethod + def ransomware_alert_create_report(cls, val): + """ + Create an instance of this class set to the + ``ransomware_alert_create_report`` tag with value ``val``. + + :param RansomwareAlertCreateReportType val: + :rtype: EventType + """ + return cls('ransomware_alert_create_report', val) + + @classmethod + def ransomware_alert_create_report_failed(cls, val): + """ + Create an instance of this class set to the + ``ransomware_alert_create_report_failed`` tag with value ``val``. + + :param RansomwareAlertCreateReportFailedType val: + :rtype: EventType + """ + return cls('ransomware_alert_create_report_failed', val) + @classmethod def smart_sync_create_admin_privilege_report(cls, val): """ @@ -26398,6 +27269,50 @@ def open_note_shared(cls, val): """ return cls('open_note_shared', val) + @classmethod + def replay_file_shared_link_created(cls, val): + """ + Create an instance of this class set to the + ``replay_file_shared_link_created`` tag with value ``val``. + + :param ReplayFileSharedLinkCreatedType val: + :rtype: EventType + """ + return cls('replay_file_shared_link_created', val) + + @classmethod + def replay_file_shared_link_modified(cls, val): + """ + Create an instance of this class set to the + ``replay_file_shared_link_modified`` tag with value ``val``. + + :param ReplayFileSharedLinkModifiedType val: + :rtype: EventType + """ + return cls('replay_file_shared_link_modified', val) + + @classmethod + def replay_project_team_add(cls, val): + """ + Create an instance of this class set to the ``replay_project_team_add`` + tag with value ``val``. + + :param ReplayProjectTeamAddType val: + :rtype: EventType + """ + return cls('replay_project_team_add', val) + + @classmethod + def replay_project_team_delete(cls, val): + """ + Create an instance of this class set to the + ``replay_project_team_delete`` tag with value ``val``. + + :param ReplayProjectTeamDeleteType val: + :rtype: EventType + """ + return cls('replay_project_team_delete', val) + @classmethod def sf_add_group(cls, val): """ @@ -29101,6 +30016,22 @@ def is_admin_alerting_triggered_alert(self): """ return self._tag == 'admin_alerting_triggered_alert' + def is_ransomware_restore_process_completed(self): + """ + Check if the union tag is ``ransomware_restore_process_completed``. + + :rtype: bool + """ + return self._tag == 'ransomware_restore_process_completed' + + def is_ransomware_restore_process_started(self): + """ + Check if the union tag is ``ransomware_restore_process_started``. + + :rtype: bool + """ + return self._tag == 'ransomware_restore_process_started' + def is_app_blocked_by_permissions(self): """ Check if the union tag is ``app_blocked_by_permissions``. @@ -29653,6 +30584,62 @@ def is_enabled_domain_invites(self): """ return self._tag == 'enabled_domain_invites' + def is_team_encryption_key_cancel_key_deletion(self): + """ + Check if the union tag is ``team_encryption_key_cancel_key_deletion``. + + :rtype: bool + """ + return self._tag == 'team_encryption_key_cancel_key_deletion' + + def is_team_encryption_key_create_key(self): + """ + Check if the union tag is ``team_encryption_key_create_key``. + + :rtype: bool + """ + return self._tag == 'team_encryption_key_create_key' + + def is_team_encryption_key_delete_key(self): + """ + Check if the union tag is ``team_encryption_key_delete_key``. + + :rtype: bool + """ + return self._tag == 'team_encryption_key_delete_key' + + def is_team_encryption_key_disable_key(self): + """ + Check if the union tag is ``team_encryption_key_disable_key``. + + :rtype: bool + """ + return self._tag == 'team_encryption_key_disable_key' + + def is_team_encryption_key_enable_key(self): + """ + Check if the union tag is ``team_encryption_key_enable_key``. + + :rtype: bool + """ + return self._tag == 'team_encryption_key_enable_key' + + def is_team_encryption_key_rotate_key(self): + """ + Check if the union tag is ``team_encryption_key_rotate_key``. + + :rtype: bool + """ + return self._tag == 'team_encryption_key_rotate_key' + + def is_team_encryption_key_schedule_key_deletion(self): + """ + Check if the union tag is ``team_encryption_key_schedule_key_deletion``. + + :rtype: bool + """ + return self._tag == 'team_encryption_key_schedule_key_deletion' + def is_apply_naming_convention(self): """ Check if the union tag is ``apply_naming_convention``. @@ -29677,6 +30664,14 @@ def is_file_add(self): """ return self._tag == 'file_add' + def is_file_add_from_automation(self): + """ + Check if the union tag is ``file_add_from_automation``. + + :rtype: bool + """ + return self._tag == 'file_add_from_automation' + def is_file_copy(self): """ Check if the union tag is ``file_copy``. @@ -29845,6 +30840,14 @@ def is_organize_folder_with_tidy(self): """ return self._tag == 'organize_folder_with_tidy' + def is_replay_file_delete(self): + """ + Check if the union tag is ``replay_file_delete``. + + :rtype: bool + """ + return self._tag == 'replay_file_delete' + def is_rewind_folder(self): """ Check if the union tag is ``rewind_folder``. @@ -30133,6 +31136,22 @@ def is_sso_error(self): """ return self._tag == 'sso_error' + def is_backup_admin_invitation_sent(self): + """ + Check if the union tag is ``backup_admin_invitation_sent``. + + :rtype: bool + """ + return self._tag == 'backup_admin_invitation_sent' + + def is_backup_invitation_opened(self): + """ + Check if the union tag is ``backup_invitation_opened``. + + :rtype: bool + """ + return self._tag == 'backup_invitation_opened' + def is_create_team_invite_link(self): """ Check if the union tag is ``create_team_invite_link``. @@ -30893,6 +31912,22 @@ def is_paper_admin_export_start(self): """ return self._tag == 'paper_admin_export_start' + def is_ransomware_alert_create_report(self): + """ + Check if the union tag is ``ransomware_alert_create_report``. + + :rtype: bool + """ + return self._tag == 'ransomware_alert_create_report' + + def is_ransomware_alert_create_report_failed(self): + """ + Check if the union tag is ``ransomware_alert_create_report_failed``. + + :rtype: bool + """ + return self._tag == 'ransomware_alert_create_report_failed' + def is_smart_sync_create_admin_privilege_report(self): """ Check if the union tag is ``smart_sync_create_admin_privilege_report``. @@ -31013,6 +32048,38 @@ def is_open_note_shared(self): """ return self._tag == 'open_note_shared' + def is_replay_file_shared_link_created(self): + """ + Check if the union tag is ``replay_file_shared_link_created``. + + :rtype: bool + """ + return self._tag == 'replay_file_shared_link_created' + + def is_replay_file_shared_link_modified(self): + """ + Check if the union tag is ``replay_file_shared_link_modified``. + + :rtype: bool + """ + return self._tag == 'replay_file_shared_link_modified' + + def is_replay_project_team_add(self): + """ + Check if the union tag is ``replay_project_team_add``. + + :rtype: bool + """ + return self._tag == 'replay_project_team_add' + + def is_replay_project_team_delete(self): + """ + Check if the union tag is ``replay_project_team_delete``. + + :rtype: bool + """ + return self._tag == 'replay_project_team_delete' + def is_sf_add_group(self): """ Check if the union tag is ``sf_add_group``. @@ -32993,6 +34060,30 @@ def get_admin_alerting_triggered_alert(self): raise AttributeError("tag 'admin_alerting_triggered_alert' not set") return self._value + def get_ransomware_restore_process_completed(self): + """ + (admin_alerting) Completed ransomware restore process + + Only call this if :meth:`is_ransomware_restore_process_completed` is true. + + :rtype: RansomwareRestoreProcessCompletedType + """ + if not self.is_ransomware_restore_process_completed(): + raise AttributeError("tag 'ransomware_restore_process_completed' not set") + return self._value + + def get_ransomware_restore_process_started(self): + """ + (admin_alerting) Started ransomware restore process + + Only call this if :meth:`is_ransomware_restore_process_started` is true. + + :rtype: RansomwareRestoreProcessStartedType + """ + if not self.is_ransomware_restore_process_started(): + raise AttributeError("tag 'ransomware_restore_process_started' not set") + return self._value + def get_app_blocked_by_permissions(self): """ (apps) Failed to connect app for member @@ -33826,6 +34917,90 @@ def get_enabled_domain_invites(self): raise AttributeError("tag 'enabled_domain_invites' not set") return self._value + def get_team_encryption_key_cancel_key_deletion(self): + """ + (encryption) Canceled team encryption key deletion + + Only call this if :meth:`is_team_encryption_key_cancel_key_deletion` is true. + + :rtype: TeamEncryptionKeyCancelKeyDeletionType + """ + if not self.is_team_encryption_key_cancel_key_deletion(): + raise AttributeError("tag 'team_encryption_key_cancel_key_deletion' not set") + return self._value + + def get_team_encryption_key_create_key(self): + """ + (encryption) Created team encryption key + + Only call this if :meth:`is_team_encryption_key_create_key` is true. + + :rtype: TeamEncryptionKeyCreateKeyType + """ + if not self.is_team_encryption_key_create_key(): + raise AttributeError("tag 'team_encryption_key_create_key' not set") + return self._value + + def get_team_encryption_key_delete_key(self): + """ + (encryption) Deleted team encryption key + + Only call this if :meth:`is_team_encryption_key_delete_key` is true. + + :rtype: TeamEncryptionKeyDeleteKeyType + """ + if not self.is_team_encryption_key_delete_key(): + raise AttributeError("tag 'team_encryption_key_delete_key' not set") + return self._value + + def get_team_encryption_key_disable_key(self): + """ + (encryption) Disabled team encryption key + + Only call this if :meth:`is_team_encryption_key_disable_key` is true. + + :rtype: TeamEncryptionKeyDisableKeyType + """ + if not self.is_team_encryption_key_disable_key(): + raise AttributeError("tag 'team_encryption_key_disable_key' not set") + return self._value + + def get_team_encryption_key_enable_key(self): + """ + (encryption) Enabled team encryption key + + Only call this if :meth:`is_team_encryption_key_enable_key` is true. + + :rtype: TeamEncryptionKeyEnableKeyType + """ + if not self.is_team_encryption_key_enable_key(): + raise AttributeError("tag 'team_encryption_key_enable_key' not set") + return self._value + + def get_team_encryption_key_rotate_key(self): + """ + (encryption) Rotated team encryption key (deprecated, no longer logged) + + Only call this if :meth:`is_team_encryption_key_rotate_key` is true. + + :rtype: TeamEncryptionKeyRotateKeyType + """ + if not self.is_team_encryption_key_rotate_key(): + raise AttributeError("tag 'team_encryption_key_rotate_key' not set") + return self._value + + def get_team_encryption_key_schedule_key_deletion(self): + """ + (encryption) Scheduled encryption key deletion + + Only call this if :meth:`is_team_encryption_key_schedule_key_deletion` is true. + + :rtype: TeamEncryptionKeyScheduleKeyDeletionType + """ + if not self.is_team_encryption_key_schedule_key_deletion(): + raise AttributeError("tag 'team_encryption_key_schedule_key_deletion' not set") + return self._value + def get_apply_naming_convention(self): """ (file_operations) Applied naming convention @@ -33862,6 +35037,18 @@ def get_file_add(self): raise AttributeError("tag 'file_add' not set") return self._value + def get_file_add_from_automation(self): + """ + (file_operations) Added files and/or folders from automation + + Only call this if :meth:`is_file_add_from_automation` is true. + + :rtype: FileAddFromAutomationType + """ + if not self.is_file_add_from_automation(): + raise AttributeError("tag 'file_add_from_automation' not set") + return self._value + def get_file_copy(self): """ (file_operations) Copied files and/or folders @@ -34114,6 +35301,18 @@ def get_organize_folder_with_tidy(self): raise AttributeError("tag 'organize_folder_with_tidy' not set") return self._value + def get_replay_file_delete(self): + """ + (file_operations) Deleted files in Replay + + Only call this if :meth:`is_replay_file_delete` is true. + + :rtype: ReplayFileDeleteType + """ + if not self.is_replay_file_delete(): + raise AttributeError("tag 'replay_file_delete' not set") + return self._value + def get_rewind_folder(self): """ (file_operations) Rewound a folder @@ -34548,6 +35747,30 @@ def get_sso_error(self): raise AttributeError("tag 'sso_error' not set") return self._value + def get_backup_admin_invitation_sent(self): + """ + (members) Invited members to activate Backup + + Only call this if :meth:`is_backup_admin_invitation_sent` is true. + + :rtype: BackupAdminInvitationSentType + """ + if not self.is_backup_admin_invitation_sent(): + raise AttributeError("tag 'backup_admin_invitation_sent' not set") + return self._value + + def get_backup_invitation_opened(self): + """ + (members) Opened Backup invite + + Only call this if :meth:`is_backup_invitation_opened` is true. + + :rtype: BackupInvitationOpenedType + """ + if not self.is_backup_invitation_opened(): + raise AttributeError("tag 'backup_invitation_opened' not set") + return self._value + def get_create_team_invite_link(self): """ (members) Created team invite link @@ -35698,6 +36921,30 @@ def get_paper_admin_export_start(self): raise AttributeError("tag 'paper_admin_export_start' not set") return self._value + def get_ransomware_alert_create_report(self): + """ + (reports) Created ransomware report + + Only call this if :meth:`is_ransomware_alert_create_report` is true. + + :rtype: RansomwareAlertCreateReportType + """ + if not self.is_ransomware_alert_create_report(): + raise AttributeError("tag 'ransomware_alert_create_report' not set") + return self._value + + def get_ransomware_alert_create_report_failed(self): + """ + (reports) Couldn't generate ransomware report + + Only call this if :meth:`is_ransomware_alert_create_report_failed` is true. + + :rtype: RansomwareAlertCreateReportFailedType + """ + if not self.is_ransomware_alert_create_report_failed(): + raise AttributeError("tag 'ransomware_alert_create_report_failed' not set") + return self._value + def get_smart_sync_create_admin_privilege_report(self): """ (reports) Created Smart Sync non-admin devices report @@ -35881,6 +37128,54 @@ def get_open_note_shared(self): raise AttributeError("tag 'open_note_shared' not set") return self._value + def get_replay_file_shared_link_created(self): + """ + (sharing) Created shared link in Replay + + Only call this if :meth:`is_replay_file_shared_link_created` is true. + + :rtype: ReplayFileSharedLinkCreatedType + """ + if not self.is_replay_file_shared_link_created(): + raise AttributeError("tag 'replay_file_shared_link_created' not set") + return self._value + + def get_replay_file_shared_link_modified(self): + """ + (sharing) Modified shared link in Replay + + Only call this if :meth:`is_replay_file_shared_link_modified` is true. + + :rtype: ReplayFileSharedLinkModifiedType + """ + if not self.is_replay_file_shared_link_modified(): + raise AttributeError("tag 'replay_file_shared_link_modified' not set") + return self._value + + def get_replay_project_team_add(self): + """ + (sharing) Added member to Replay Project + + Only call this if :meth:`is_replay_project_team_add` is true. + + :rtype: ReplayProjectTeamAddType + """ + if not self.is_replay_project_team_add(): + raise AttributeError("tag 'replay_project_team_add' not set") + return self._value + + def get_replay_project_team_delete(self): + """ + (sharing) Removed member from Replay Project + + Only call this if :meth:`is_replay_project_team_delete` is true. + + :rtype: ReplayProjectTeamDeleteType + """ + if not self.is_replay_project_team_delete(): + raise AttributeError("tag 'replay_project_team_delete' not set") + return self._value + def get_sf_add_group(self): """ (sharing) Added team to shared folder (deprecated, no longer logged) @@ -38869,6 +40164,10 @@ class EventTypeArg(bb.Union): (admin_alerting) Changed an alert setting :ivar team_log.EventTypeArg.admin_alerting_triggered_alert: (admin_alerting) Triggered security alert + :ivar team_log.EventTypeArg.ransomware_restore_process_completed: + (admin_alerting) Completed ransomware restore process + :ivar team_log.EventTypeArg.ransomware_restore_process_started: + (admin_alerting) Started ransomware restore process :ivar team_log.EventTypeArg.app_blocked_by_permissions: (apps) Failed to connect app for member :ivar team_log.EventTypeArg.app_link_team: (apps) Linked app for team @@ -39004,12 +40303,28 @@ class EventTypeArg(bb.Union): Removed domain from list of verified team domains :ivar team_log.EventTypeArg.enabled_domain_invites: (domains) Enabled domain invites (deprecated, no longer logged) + :ivar team_log.EventTypeArg.team_encryption_key_cancel_key_deletion: + (encryption) Canceled team encryption key deletion + :ivar team_log.EventTypeArg.team_encryption_key_create_key: (encryption) + Created team encryption key + :ivar team_log.EventTypeArg.team_encryption_key_delete_key: (encryption) + Deleted team encryption key + :ivar team_log.EventTypeArg.team_encryption_key_disable_key: (encryption) + Disabled team encryption key + :ivar team_log.EventTypeArg.team_encryption_key_enable_key: (encryption) + Enabled team encryption key + :ivar team_log.EventTypeArg.team_encryption_key_rotate_key: (encryption) + Rotated team encryption key (deprecated, no longer logged) + :ivar team_log.EventTypeArg.team_encryption_key_schedule_key_deletion: + (encryption) Scheduled encryption key deletion :ivar team_log.EventTypeArg.apply_naming_convention: (file_operations) Applied naming convention :ivar team_log.EventTypeArg.create_folder: (file_operations) Created folders (deprecated, no longer logged) :ivar team_log.EventTypeArg.file_add: (file_operations) Added files and/or folders + :ivar team_log.EventTypeArg.file_add_from_automation: (file_operations) + Added files and/or folders from automation :ivar team_log.EventTypeArg.file_copy: (file_operations) Copied files and/or folders :ivar team_log.EventTypeArg.file_delete: (file_operations) Deleted files @@ -39051,6 +40366,8 @@ class EventTypeArg(bb.Union): Updated a label's value :ivar team_log.EventTypeArg.organize_folder_with_tidy: (file_operations) Organized a folder with multi-file organize + :ivar team_log.EventTypeArg.replay_file_delete: (file_operations) Deleted + files in Replay :ivar team_log.EventTypeArg.rewind_folder: (file_operations) Rewound a folder :ivar team_log.EventTypeArg.undo_naming_convention: (file_operations) @@ -39116,6 +40433,10 @@ class EventTypeArg(bb.Union): sign-in-as session :ivar team_log.EventTypeArg.sso_error: (logins) Failed to sign in via SSO (deprecated, replaced by 'Failed to sign in') + :ivar team_log.EventTypeArg.backup_admin_invitation_sent: (members) Invited + members to activate Backup + :ivar team_log.EventTypeArg.backup_invitation_opened: (members) Opened + Backup invite :ivar team_log.EventTypeArg.create_team_invite_link: (members) Created team invite link :ivar team_log.EventTypeArg.delete_team_invite_link: (members) Deleted team @@ -39302,6 +40623,10 @@ class EventTypeArg(bb.Union): Couldn't create report: Views of old links :ivar team_log.EventTypeArg.paper_admin_export_start: (reports) Exported all team Paper docs + :ivar team_log.EventTypeArg.ransomware_alert_create_report: (reports) + Created ransomware report + :ivar team_log.EventTypeArg.ransomware_alert_create_report_failed: (reports) + Couldn't generate ransomware report :ivar team_log.EventTypeArg.smart_sync_create_admin_privilege_report: (reports) Created Smart Sync non-admin devices report :ivar team_log.EventTypeArg.team_activity_create_report: (reports) Created @@ -39331,6 +40656,14 @@ class EventTypeArg(bb.Union): Paper doc (deprecated, no longer logged) :ivar team_log.EventTypeArg.open_note_shared: (sharing) Opened shared Paper doc (deprecated, no longer logged) + :ivar team_log.EventTypeArg.replay_file_shared_link_created: (sharing) + Created shared link in Replay + :ivar team_log.EventTypeArg.replay_file_shared_link_modified: (sharing) + Modified shared link in Replay + :ivar team_log.EventTypeArg.replay_project_team_add: (sharing) Added member + to Replay Project + :ivar team_log.EventTypeArg.replay_project_team_delete: (sharing) Removed + member from Replay Project :ivar team_log.EventTypeArg.sf_add_group: (sharing) Added team to shared folder (deprecated, no longer logged) :ivar team_log.EventTypeArg.sf_allow_non_members_to_view_shared_links: @@ -39875,6 +41208,10 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition admin_alerting_triggered_alert = None # Attribute is overwritten below the class definition + ransomware_restore_process_completed = None + # Attribute is overwritten below the class definition + ransomware_restore_process_started = None + # Attribute is overwritten below the class definition app_blocked_by_permissions = None # Attribute is overwritten below the class definition app_link_team = None @@ -40013,12 +41350,28 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition enabled_domain_invites = None # Attribute is overwritten below the class definition + team_encryption_key_cancel_key_deletion = None + # Attribute is overwritten below the class definition + team_encryption_key_create_key = None + # Attribute is overwritten below the class definition + team_encryption_key_delete_key = None + # Attribute is overwritten below the class definition + team_encryption_key_disable_key = None + # Attribute is overwritten below the class definition + team_encryption_key_enable_key = None + # Attribute is overwritten below the class definition + team_encryption_key_rotate_key = None + # Attribute is overwritten below the class definition + team_encryption_key_schedule_key_deletion = None + # Attribute is overwritten below the class definition apply_naming_convention = 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_add_from_automation = None + # Attribute is overwritten below the class definition file_copy = None # Attribute is overwritten below the class definition file_delete = None @@ -40061,6 +41414,8 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition organize_folder_with_tidy = None # Attribute is overwritten below the class definition + replay_file_delete = None + # Attribute is overwritten below the class definition rewind_folder = None # Attribute is overwritten below the class definition undo_naming_convention = None @@ -40133,6 +41488,10 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition sso_error = None # Attribute is overwritten below the class definition + backup_admin_invitation_sent = None + # Attribute is overwritten below the class definition + backup_invitation_opened = None + # Attribute is overwritten below the class definition create_team_invite_link = None # Attribute is overwritten below the class definition delete_team_invite_link = None @@ -40323,6 +41682,10 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition paper_admin_export_start = None # Attribute is overwritten below the class definition + ransomware_alert_create_report = None + # Attribute is overwritten below the class definition + ransomware_alert_create_report_failed = 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 @@ -40353,6 +41716,14 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition open_note_shared = None # Attribute is overwritten below the class definition + replay_file_shared_link_created = None + # Attribute is overwritten below the class definition + replay_file_shared_link_modified = None + # Attribute is overwritten below the class definition + replay_project_team_add = None + # Attribute is overwritten below the class definition + replay_project_team_delete = 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 @@ -40863,6 +42234,22 @@ def is_admin_alerting_triggered_alert(self): """ return self._tag == 'admin_alerting_triggered_alert' + def is_ransomware_restore_process_completed(self): + """ + Check if the union tag is ``ransomware_restore_process_completed``. + + :rtype: bool + """ + return self._tag == 'ransomware_restore_process_completed' + + def is_ransomware_restore_process_started(self): + """ + Check if the union tag is ``ransomware_restore_process_started``. + + :rtype: bool + """ + return self._tag == 'ransomware_restore_process_started' + def is_app_blocked_by_permissions(self): """ Check if the union tag is ``app_blocked_by_permissions``. @@ -41415,6 +42802,62 @@ def is_enabled_domain_invites(self): """ return self._tag == 'enabled_domain_invites' + def is_team_encryption_key_cancel_key_deletion(self): + """ + Check if the union tag is ``team_encryption_key_cancel_key_deletion``. + + :rtype: bool + """ + return self._tag == 'team_encryption_key_cancel_key_deletion' + + def is_team_encryption_key_create_key(self): + """ + Check if the union tag is ``team_encryption_key_create_key``. + + :rtype: bool + """ + return self._tag == 'team_encryption_key_create_key' + + def is_team_encryption_key_delete_key(self): + """ + Check if the union tag is ``team_encryption_key_delete_key``. + + :rtype: bool + """ + return self._tag == 'team_encryption_key_delete_key' + + def is_team_encryption_key_disable_key(self): + """ + Check if the union tag is ``team_encryption_key_disable_key``. + + :rtype: bool + """ + return self._tag == 'team_encryption_key_disable_key' + + def is_team_encryption_key_enable_key(self): + """ + Check if the union tag is ``team_encryption_key_enable_key``. + + :rtype: bool + """ + return self._tag == 'team_encryption_key_enable_key' + + def is_team_encryption_key_rotate_key(self): + """ + Check if the union tag is ``team_encryption_key_rotate_key``. + + :rtype: bool + """ + return self._tag == 'team_encryption_key_rotate_key' + + def is_team_encryption_key_schedule_key_deletion(self): + """ + Check if the union tag is ``team_encryption_key_schedule_key_deletion``. + + :rtype: bool + """ + return self._tag == 'team_encryption_key_schedule_key_deletion' + def is_apply_naming_convention(self): """ Check if the union tag is ``apply_naming_convention``. @@ -41439,6 +42882,14 @@ def is_file_add(self): """ return self._tag == 'file_add' + def is_file_add_from_automation(self): + """ + Check if the union tag is ``file_add_from_automation``. + + :rtype: bool + """ + return self._tag == 'file_add_from_automation' + def is_file_copy(self): """ Check if the union tag is ``file_copy``. @@ -41607,6 +43058,14 @@ def is_organize_folder_with_tidy(self): """ return self._tag == 'organize_folder_with_tidy' + def is_replay_file_delete(self): + """ + Check if the union tag is ``replay_file_delete``. + + :rtype: bool + """ + return self._tag == 'replay_file_delete' + def is_rewind_folder(self): """ Check if the union tag is ``rewind_folder``. @@ -41895,6 +43354,22 @@ def is_sso_error(self): """ return self._tag == 'sso_error' + def is_backup_admin_invitation_sent(self): + """ + Check if the union tag is ``backup_admin_invitation_sent``. + + :rtype: bool + """ + return self._tag == 'backup_admin_invitation_sent' + + def is_backup_invitation_opened(self): + """ + Check if the union tag is ``backup_invitation_opened``. + + :rtype: bool + """ + return self._tag == 'backup_invitation_opened' + def is_create_team_invite_link(self): """ Check if the union tag is ``create_team_invite_link``. @@ -42655,6 +44130,22 @@ def is_paper_admin_export_start(self): """ return self._tag == 'paper_admin_export_start' + def is_ransomware_alert_create_report(self): + """ + Check if the union tag is ``ransomware_alert_create_report``. + + :rtype: bool + """ + return self._tag == 'ransomware_alert_create_report' + + def is_ransomware_alert_create_report_failed(self): + """ + Check if the union tag is ``ransomware_alert_create_report_failed``. + + :rtype: bool + """ + return self._tag == 'ransomware_alert_create_report_failed' + def is_smart_sync_create_admin_privilege_report(self): """ Check if the union tag is ``smart_sync_create_admin_privilege_report``. @@ -42775,6 +44266,38 @@ def is_open_note_shared(self): """ return self._tag == 'open_note_shared' + def is_replay_file_shared_link_created(self): + """ + Check if the union tag is ``replay_file_shared_link_created``. + + :rtype: bool + """ + return self._tag == 'replay_file_shared_link_created' + + def is_replay_file_shared_link_modified(self): + """ + Check if the union tag is ``replay_file_shared_link_modified``. + + :rtype: bool + """ + return self._tag == 'replay_file_shared_link_modified' + + def is_replay_project_team_add(self): + """ + Check if the union tag is ``replay_project_team_add``. + + :rtype: bool + """ + return self._tag == 'replay_project_team_add' + + def is_replay_project_team_delete(self): + """ + Check if the union tag is ``replay_project_team_delete``. + + :rtype: bool + """ + return self._tag == 'replay_project_team_delete' + def is_sf_add_group(self): """ Check if the union tag is ``sf_add_group``. @@ -45911,6 +47434,46 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): FileAddDetails_validator = bv.Struct(FileAddDetails) +class FileAddFromAutomationDetails(bb.Struct): + """ + Added files and/or folders from automation. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(FileAddFromAutomationDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +FileAddFromAutomationDetails_validator = bv.Struct(FileAddFromAutomationDetails) + +class FileAddFromAutomationType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(FileAddFromAutomationType, self)._process_custom_annotations(annotation_type, field_path, processor) + +FileAddFromAutomationType_validator = bv.Struct(FileAddFromAutomationType) + class FileAddType(bb.Struct): __slots__ = [ @@ -52750,6 +54313,8 @@ class LoginMethod(bb.Union): # Attribute is overwritten below the class definition google_oauth = None # Attribute is overwritten below the class definition + lenovo_oauth = None + # Attribute is overwritten below the class definition password = None # Attribute is overwritten below the class definition qr_code = None @@ -52786,6 +54351,14 @@ def is_google_oauth(self): """ return self._tag == 'google_oauth' + def is_lenovo_oauth(self): + """ + Check if the union tag is ``lenovo_oauth``. + + :rtype: bool + """ + return self._tag == 'lenovo_oauth' + def is_password(self): """ Check if the union tag is ``password``. @@ -60083,6 +61656,218 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): QuickActionType_validator = bv.Union(QuickActionType) +class RansomwareAlertCreateReportDetails(bb.Struct): + """ + Created ransomware report. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(RansomwareAlertCreateReportDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +RansomwareAlertCreateReportDetails_validator = bv.Struct(RansomwareAlertCreateReportDetails) + +class RansomwareAlertCreateReportFailedDetails(bb.Struct): + """ + Couldn't generate ransomware report. + + :ivar team_log.RansomwareAlertCreateReportFailedDetails.failure_reason: + Failure reason. + """ + + __slots__ = [ + '_failure_reason_value', + ] + + _has_required_fields = True + + def __init__(self, + failure_reason=None): + self._failure_reason_value = bb.NOT_SET + if failure_reason is not None: + self.failure_reason = failure_reason + + # Instance attribute type: team.TeamReportFailureReason (validator is set below) + failure_reason = bb.Attribute("failure_reason", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(RansomwareAlertCreateReportFailedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +RansomwareAlertCreateReportFailedDetails_validator = bv.Struct(RansomwareAlertCreateReportFailedDetails) + +class RansomwareAlertCreateReportFailedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(RansomwareAlertCreateReportFailedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +RansomwareAlertCreateReportFailedType_validator = bv.Struct(RansomwareAlertCreateReportFailedType) + +class RansomwareAlertCreateReportType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(RansomwareAlertCreateReportType, self)._process_custom_annotations(annotation_type, field_path, processor) + +RansomwareAlertCreateReportType_validator = bv.Struct(RansomwareAlertCreateReportType) + +class RansomwareRestoreProcessCompletedDetails(bb.Struct): + """ + Completed ransomware restore process. + + :ivar team_log.RansomwareRestoreProcessCompletedDetails.status: The status + of the restore process. + :ivar + team_log.RansomwareRestoreProcessCompletedDetails.restored_files_count: + Restored files count. + :ivar + team_log.RansomwareRestoreProcessCompletedDetails.restored_files_failed_count: + Restored files failed count. + """ + + __slots__ = [ + '_status_value', + '_restored_files_count_value', + '_restored_files_failed_count_value', + ] + + _has_required_fields = True + + def __init__(self, + status=None, + restored_files_count=None, + restored_files_failed_count=None): + self._status_value = bb.NOT_SET + self._restored_files_count_value = bb.NOT_SET + self._restored_files_failed_count_value = bb.NOT_SET + if status is not None: + self.status = status + if restored_files_count is not None: + self.restored_files_count = restored_files_count + if restored_files_failed_count is not None: + self.restored_files_failed_count = restored_files_failed_count + + # Instance attribute type: str (validator is set below) + status = bb.Attribute("status") + + # Instance attribute type: int (validator is set below) + restored_files_count = bb.Attribute("restored_files_count") + + # Instance attribute type: int (validator is set below) + restored_files_failed_count = bb.Attribute("restored_files_failed_count") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(RansomwareRestoreProcessCompletedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +RansomwareRestoreProcessCompletedDetails_validator = bv.Struct(RansomwareRestoreProcessCompletedDetails) + +class RansomwareRestoreProcessCompletedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(RansomwareRestoreProcessCompletedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +RansomwareRestoreProcessCompletedType_validator = bv.Struct(RansomwareRestoreProcessCompletedType) + +class RansomwareRestoreProcessStartedDetails(bb.Struct): + """ + Started ransomware restore process. + + :ivar team_log.RansomwareRestoreProcessStartedDetails.extension: Ransomware + filename extension. + """ + + __slots__ = [ + '_extension_value', + ] + + _has_required_fields = True + + def __init__(self, + extension=None): + self._extension_value = bb.NOT_SET + if extension is not None: + self.extension = extension + + # Instance attribute type: str (validator is set below) + extension = bb.Attribute("extension") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(RansomwareRestoreProcessStartedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +RansomwareRestoreProcessStartedDetails_validator = bv.Struct(RansomwareRestoreProcessStartedDetails) + +class RansomwareRestoreProcessStartedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(RansomwareRestoreProcessStartedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +RansomwareRestoreProcessStartedType_validator = bv.Struct(RansomwareRestoreProcessStartedType) + class RecipientsConfiguration(bb.Struct): """ Recipients Configuration @@ -60169,6 +61954,206 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RelocateAssetReferencesLogInfo_validator = bv.Struct(RelocateAssetReferencesLogInfo) +class ReplayFileDeleteDetails(bb.Struct): + """ + Deleted files in Replay. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ReplayFileDeleteDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +ReplayFileDeleteDetails_validator = bv.Struct(ReplayFileDeleteDetails) + +class ReplayFileDeleteType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ReplayFileDeleteType, self)._process_custom_annotations(annotation_type, field_path, processor) + +ReplayFileDeleteType_validator = bv.Struct(ReplayFileDeleteType) + +class ReplayFileSharedLinkCreatedDetails(bb.Struct): + """ + Created shared link in Replay. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ReplayFileSharedLinkCreatedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +ReplayFileSharedLinkCreatedDetails_validator = bv.Struct(ReplayFileSharedLinkCreatedDetails) + +class ReplayFileSharedLinkCreatedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ReplayFileSharedLinkCreatedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +ReplayFileSharedLinkCreatedType_validator = bv.Struct(ReplayFileSharedLinkCreatedType) + +class ReplayFileSharedLinkModifiedDetails(bb.Struct): + """ + Modified shared link in Replay. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ReplayFileSharedLinkModifiedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +ReplayFileSharedLinkModifiedDetails_validator = bv.Struct(ReplayFileSharedLinkModifiedDetails) + +class ReplayFileSharedLinkModifiedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ReplayFileSharedLinkModifiedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +ReplayFileSharedLinkModifiedType_validator = bv.Struct(ReplayFileSharedLinkModifiedType) + +class ReplayProjectTeamAddDetails(bb.Struct): + """ + Added member to Replay Project. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ReplayProjectTeamAddDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +ReplayProjectTeamAddDetails_validator = bv.Struct(ReplayProjectTeamAddDetails) + +class ReplayProjectTeamAddType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ReplayProjectTeamAddType, self)._process_custom_annotations(annotation_type, field_path, processor) + +ReplayProjectTeamAddType_validator = bv.Struct(ReplayProjectTeamAddType) + +class ReplayProjectTeamDeleteDetails(bb.Struct): + """ + Removed member from Replay Project. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ReplayProjectTeamDeleteDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +ReplayProjectTeamDeleteDetails_validator = bv.Struct(ReplayProjectTeamDeleteDetails) + +class ReplayProjectTeamDeleteType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ReplayProjectTeamDeleteType, self)._process_custom_annotations(annotation_type, field_path, processor) + +ReplayProjectTeamDeleteType_validator = bv.Struct(ReplayProjectTeamDeleteType) + class ResellerLogInfo(bb.Struct): """ Reseller information. @@ -68874,6 +70859,286 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamDetails_validator = bv.Struct(TeamDetails) +class TeamEncryptionKeyCancelKeyDeletionDetails(bb.Struct): + """ + Canceled team encryption key deletion. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamEncryptionKeyCancelKeyDeletionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +TeamEncryptionKeyCancelKeyDeletionDetails_validator = bv.Struct(TeamEncryptionKeyCancelKeyDeletionDetails) + +class TeamEncryptionKeyCancelKeyDeletionType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamEncryptionKeyCancelKeyDeletionType, self)._process_custom_annotations(annotation_type, field_path, processor) + +TeamEncryptionKeyCancelKeyDeletionType_validator = bv.Struct(TeamEncryptionKeyCancelKeyDeletionType) + +class TeamEncryptionKeyCreateKeyDetails(bb.Struct): + """ + Created team encryption key. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamEncryptionKeyCreateKeyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +TeamEncryptionKeyCreateKeyDetails_validator = bv.Struct(TeamEncryptionKeyCreateKeyDetails) + +class TeamEncryptionKeyCreateKeyType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamEncryptionKeyCreateKeyType, self)._process_custom_annotations(annotation_type, field_path, processor) + +TeamEncryptionKeyCreateKeyType_validator = bv.Struct(TeamEncryptionKeyCreateKeyType) + +class TeamEncryptionKeyDeleteKeyDetails(bb.Struct): + """ + Deleted team encryption key. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamEncryptionKeyDeleteKeyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +TeamEncryptionKeyDeleteKeyDetails_validator = bv.Struct(TeamEncryptionKeyDeleteKeyDetails) + +class TeamEncryptionKeyDeleteKeyType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamEncryptionKeyDeleteKeyType, self)._process_custom_annotations(annotation_type, field_path, processor) + +TeamEncryptionKeyDeleteKeyType_validator = bv.Struct(TeamEncryptionKeyDeleteKeyType) + +class TeamEncryptionKeyDisableKeyDetails(bb.Struct): + """ + Disabled team encryption key. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamEncryptionKeyDisableKeyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +TeamEncryptionKeyDisableKeyDetails_validator = bv.Struct(TeamEncryptionKeyDisableKeyDetails) + +class TeamEncryptionKeyDisableKeyType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamEncryptionKeyDisableKeyType, self)._process_custom_annotations(annotation_type, field_path, processor) + +TeamEncryptionKeyDisableKeyType_validator = bv.Struct(TeamEncryptionKeyDisableKeyType) + +class TeamEncryptionKeyEnableKeyDetails(bb.Struct): + """ + Enabled team encryption key. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamEncryptionKeyEnableKeyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +TeamEncryptionKeyEnableKeyDetails_validator = bv.Struct(TeamEncryptionKeyEnableKeyDetails) + +class TeamEncryptionKeyEnableKeyType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamEncryptionKeyEnableKeyType, self)._process_custom_annotations(annotation_type, field_path, processor) + +TeamEncryptionKeyEnableKeyType_validator = bv.Struct(TeamEncryptionKeyEnableKeyType) + +class TeamEncryptionKeyRotateKeyDetails(bb.Struct): + """ + Rotated team encryption key. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamEncryptionKeyRotateKeyDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +TeamEncryptionKeyRotateKeyDetails_validator = bv.Struct(TeamEncryptionKeyRotateKeyDetails) + +class TeamEncryptionKeyRotateKeyType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamEncryptionKeyRotateKeyType, self)._process_custom_annotations(annotation_type, field_path, processor) + +TeamEncryptionKeyRotateKeyType_validator = bv.Struct(TeamEncryptionKeyRotateKeyType) + +class TeamEncryptionKeyScheduleKeyDeletionDetails(bb.Struct): + """ + Scheduled encryption key deletion. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamEncryptionKeyScheduleKeyDeletionDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +TeamEncryptionKeyScheduleKeyDeletionDetails_validator = bv.Struct(TeamEncryptionKeyScheduleKeyDeletionDetails) + +class TeamEncryptionKeyScheduleKeyDeletionType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(TeamEncryptionKeyScheduleKeyDeletionType, self)._process_custom_annotations(annotation_type, field_path, processor) + +TeamEncryptionKeyScheduleKeyDeletionType_validator = bv.Struct(TeamEncryptionKeyScheduleKeyDeletionType) + class TeamEvent(bb.Struct): """ An audit log event. @@ -73528,17 +75793,20 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AccountCapturePolicy._all_users_validator = bv.Void() AccountCapturePolicy._disabled_validator = bv.Void() AccountCapturePolicy._invited_users_validator = bv.Void() +AccountCapturePolicy._prevent_personal_creation_validator = bv.Void() AccountCapturePolicy._other_validator = bv.Void() AccountCapturePolicy._tagmap = { 'all_users': AccountCapturePolicy._all_users_validator, 'disabled': AccountCapturePolicy._disabled_validator, 'invited_users': AccountCapturePolicy._invited_users_validator, + 'prevent_personal_creation': AccountCapturePolicy._prevent_personal_creation_validator, 'other': AccountCapturePolicy._other_validator, } AccountCapturePolicy.all_users = AccountCapturePolicy('all_users') AccountCapturePolicy.disabled = AccountCapturePolicy('disabled') AccountCapturePolicy.invited_users = AccountCapturePolicy('invited_users') +AccountCapturePolicy.prevent_personal_creation = AccountCapturePolicy('prevent_personal_creation') AccountCapturePolicy.other = AccountCapturePolicy('other') AccountCaptureRelinquishAccountDetails.domain_name.validator = bv.String() @@ -74051,6 +76319,20 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AssetLogInfo.other = AssetLogInfo('other') +BackupAdminInvitationSentDetails._all_field_names_ = set([]) +BackupAdminInvitationSentDetails._all_fields_ = [] + +BackupAdminInvitationSentType.description.validator = bv.String() +BackupAdminInvitationSentType._all_field_names_ = set(['description']) +BackupAdminInvitationSentType._all_fields_ = [('description', BackupAdminInvitationSentType.description.validator)] + +BackupInvitationOpenedDetails._all_field_names_ = set([]) +BackupInvitationOpenedDetails._all_fields_ = [] + +BackupInvitationOpenedType.description.validator = bv.String() +BackupInvitationOpenedType._all_field_names_ = set(['description']) +BackupInvitationOpenedType._all_fields_ = [('description', BackupInvitationOpenedType.description.validator)] + BackupStatus._disabled_validator = bv.Void() BackupStatus._enabled_validator = bv.Void() BackupStatus._other_validator = bv.Void() @@ -75299,6 +77581,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventCategory._data_governance_validator = bv.Void() EventCategory._devices_validator = bv.Void() EventCategory._domains_validator = bv.Void() +EventCategory._encryption_validator = bv.Void() EventCategory._file_operations_validator = bv.Void() EventCategory._file_requests_validator = bv.Void() EventCategory._groups_validator = bv.Void() @@ -75323,6 +77606,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'data_governance': EventCategory._data_governance_validator, 'devices': EventCategory._devices_validator, 'domains': EventCategory._domains_validator, + 'encryption': EventCategory._encryption_validator, 'file_operations': EventCategory._file_operations_validator, 'file_requests': EventCategory._file_requests_validator, 'groups': EventCategory._groups_validator, @@ -75348,6 +77632,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventCategory.data_governance = EventCategory('data_governance') EventCategory.devices = EventCategory('devices') EventCategory.domains = EventCategory('domains') +EventCategory.encryption = EventCategory('encryption') EventCategory.file_operations = EventCategory('file_operations') EventCategory.file_requests = EventCategory('file_requests') EventCategory.groups = EventCategory('groups') @@ -75369,6 +77654,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._admin_alerting_alert_state_changed_details_validator = AdminAlertingAlertStateChangedDetails_validator EventDetails._admin_alerting_changed_alert_config_details_validator = AdminAlertingChangedAlertConfigDetails_validator EventDetails._admin_alerting_triggered_alert_details_validator = AdminAlertingTriggeredAlertDetails_validator +EventDetails._ransomware_restore_process_completed_details_validator = RansomwareRestoreProcessCompletedDetails_validator +EventDetails._ransomware_restore_process_started_details_validator = RansomwareRestoreProcessStartedDetails_validator EventDetails._app_blocked_by_permissions_details_validator = AppBlockedByPermissionsDetails_validator EventDetails._app_link_team_details_validator = AppLinkTeamDetails_validator EventDetails._app_link_user_details_validator = AppLinkUserDetails_validator @@ -75438,9 +77725,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 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._team_encryption_key_cancel_key_deletion_details_validator = TeamEncryptionKeyCancelKeyDeletionDetails_validator +EventDetails._team_encryption_key_create_key_details_validator = TeamEncryptionKeyCreateKeyDetails_validator +EventDetails._team_encryption_key_delete_key_details_validator = TeamEncryptionKeyDeleteKeyDetails_validator +EventDetails._team_encryption_key_disable_key_details_validator = TeamEncryptionKeyDisableKeyDetails_validator +EventDetails._team_encryption_key_enable_key_details_validator = TeamEncryptionKeyEnableKeyDetails_validator +EventDetails._team_encryption_key_rotate_key_details_validator = TeamEncryptionKeyRotateKeyDetails_validator +EventDetails._team_encryption_key_schedule_key_deletion_details_validator = TeamEncryptionKeyScheduleKeyDeletionDetails_validator EventDetails._apply_naming_convention_details_validator = ApplyNamingConventionDetails_validator EventDetails._create_folder_details_validator = CreateFolderDetails_validator EventDetails._file_add_details_validator = FileAddDetails_validator +EventDetails._file_add_from_automation_details_validator = FileAddFromAutomationDetails_validator EventDetails._file_copy_details_validator = FileCopyDetails_validator EventDetails._file_delete_details_validator = FileDeleteDetails_validator EventDetails._file_download_details_validator = FileDownloadDetails_validator @@ -75462,6 +77757,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._object_label_removed_details_validator = ObjectLabelRemovedDetails_validator EventDetails._object_label_updated_value_details_validator = ObjectLabelUpdatedValueDetails_validator EventDetails._organize_folder_with_tidy_details_validator = OrganizeFolderWithTidyDetails_validator +EventDetails._replay_file_delete_details_validator = ReplayFileDeleteDetails_validator EventDetails._rewind_folder_details_validator = RewindFolderDetails_validator EventDetails._undo_naming_convention_details_validator = UndoNamingConventionDetails_validator EventDetails._undo_organize_folder_with_tidy_details_validator = UndoOrganizeFolderWithTidyDetails_validator @@ -75498,6 +77794,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._sign_in_as_session_end_details_validator = SignInAsSessionEndDetails_validator EventDetails._sign_in_as_session_start_details_validator = SignInAsSessionStartDetails_validator EventDetails._sso_error_details_validator = SsoErrorDetails_validator +EventDetails._backup_admin_invitation_sent_details_validator = BackupAdminInvitationSentDetails_validator +EventDetails._backup_invitation_opened_details_validator = BackupInvitationOpenedDetails_validator EventDetails._create_team_invite_link_details_validator = CreateTeamInviteLinkDetails_validator EventDetails._delete_team_invite_link_details_validator = DeleteTeamInviteLinkDetails_validator EventDetails._member_add_external_id_details_validator = MemberAddExternalIdDetails_validator @@ -75593,6 +77891,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._outdated_link_view_create_report_details_validator = OutdatedLinkViewCreateReportDetails_validator EventDetails._outdated_link_view_report_failed_details_validator = OutdatedLinkViewReportFailedDetails_validator EventDetails._paper_admin_export_start_details_validator = PaperAdminExportStartDetails_validator +EventDetails._ransomware_alert_create_report_details_validator = RansomwareAlertCreateReportDetails_validator +EventDetails._ransomware_alert_create_report_failed_details_validator = RansomwareAlertCreateReportFailedDetails_validator EventDetails._smart_sync_create_admin_privilege_report_details_validator = SmartSyncCreateAdminPrivilegeReportDetails_validator EventDetails._team_activity_create_report_details_validator = TeamActivityCreateReportDetails_validator EventDetails._team_activity_create_report_fail_details_validator = TeamActivityCreateReportFailDetails_validator @@ -75608,6 +77908,10 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._note_shared_details_validator = NoteSharedDetails_validator EventDetails._note_share_receive_details_validator = NoteShareReceiveDetails_validator EventDetails._open_note_shared_details_validator = OpenNoteSharedDetails_validator +EventDetails._replay_file_shared_link_created_details_validator = ReplayFileSharedLinkCreatedDetails_validator +EventDetails._replay_file_shared_link_modified_details_validator = ReplayFileSharedLinkModifiedDetails_validator +EventDetails._replay_project_team_add_details_validator = ReplayProjectTeamAddDetails_validator +EventDetails._replay_project_team_delete_details_validator = ReplayProjectTeamDeleteDetails_validator EventDetails._sf_add_group_details_validator = SfAddGroupDetails_validator EventDetails._sf_allow_non_members_to_view_shared_links_details_validator = SfAllowNonMembersToViewSharedLinksDetails_validator EventDetails._sf_external_invite_warn_details_validator = SfExternalInviteWarnDetails_validator @@ -75856,6 +78160,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'admin_alerting_alert_state_changed_details': EventDetails._admin_alerting_alert_state_changed_details_validator, 'admin_alerting_changed_alert_config_details': EventDetails._admin_alerting_changed_alert_config_details_validator, 'admin_alerting_triggered_alert_details': EventDetails._admin_alerting_triggered_alert_details_validator, + 'ransomware_restore_process_completed_details': EventDetails._ransomware_restore_process_completed_details_validator, + 'ransomware_restore_process_started_details': EventDetails._ransomware_restore_process_started_details_validator, 'app_blocked_by_permissions_details': EventDetails._app_blocked_by_permissions_details_validator, 'app_link_team_details': EventDetails._app_link_team_details_validator, 'app_link_user_details': EventDetails._app_link_user_details_validator, @@ -75925,9 +78231,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): '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, + 'team_encryption_key_cancel_key_deletion_details': EventDetails._team_encryption_key_cancel_key_deletion_details_validator, + 'team_encryption_key_create_key_details': EventDetails._team_encryption_key_create_key_details_validator, + 'team_encryption_key_delete_key_details': EventDetails._team_encryption_key_delete_key_details_validator, + 'team_encryption_key_disable_key_details': EventDetails._team_encryption_key_disable_key_details_validator, + 'team_encryption_key_enable_key_details': EventDetails._team_encryption_key_enable_key_details_validator, + 'team_encryption_key_rotate_key_details': EventDetails._team_encryption_key_rotate_key_details_validator, + 'team_encryption_key_schedule_key_deletion_details': EventDetails._team_encryption_key_schedule_key_deletion_details_validator, 'apply_naming_convention_details': EventDetails._apply_naming_convention_details_validator, 'create_folder_details': EventDetails._create_folder_details_validator, 'file_add_details': EventDetails._file_add_details_validator, + 'file_add_from_automation_details': EventDetails._file_add_from_automation_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, @@ -75949,6 +78263,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'object_label_removed_details': EventDetails._object_label_removed_details_validator, 'object_label_updated_value_details': EventDetails._object_label_updated_value_details_validator, 'organize_folder_with_tidy_details': EventDetails._organize_folder_with_tidy_details_validator, + 'replay_file_delete_details': EventDetails._replay_file_delete_details_validator, 'rewind_folder_details': EventDetails._rewind_folder_details_validator, 'undo_naming_convention_details': EventDetails._undo_naming_convention_details_validator, 'undo_organize_folder_with_tidy_details': EventDetails._undo_organize_folder_with_tidy_details_validator, @@ -75985,6 +78300,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): '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_error_details': EventDetails._sso_error_details_validator, + 'backup_admin_invitation_sent_details': EventDetails._backup_admin_invitation_sent_details_validator, + 'backup_invitation_opened_details': EventDetails._backup_invitation_opened_details_validator, 'create_team_invite_link_details': EventDetails._create_team_invite_link_details_validator, 'delete_team_invite_link_details': EventDetails._delete_team_invite_link_details_validator, 'member_add_external_id_details': EventDetails._member_add_external_id_details_validator, @@ -76080,6 +78397,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'outdated_link_view_create_report_details': EventDetails._outdated_link_view_create_report_details_validator, 'outdated_link_view_report_failed_details': EventDetails._outdated_link_view_report_failed_details_validator, 'paper_admin_export_start_details': EventDetails._paper_admin_export_start_details_validator, + 'ransomware_alert_create_report_details': EventDetails._ransomware_alert_create_report_details_validator, + 'ransomware_alert_create_report_failed_details': EventDetails._ransomware_alert_create_report_failed_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, 'team_activity_create_report_fail_details': EventDetails._team_activity_create_report_fail_details_validator, @@ -76095,6 +78414,10 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): '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, + 'replay_file_shared_link_created_details': EventDetails._replay_file_shared_link_created_details_validator, + 'replay_file_shared_link_modified_details': EventDetails._replay_file_shared_link_modified_details_validator, + 'replay_project_team_add_details': EventDetails._replay_project_team_add_details_validator, + 'replay_project_team_delete_details': EventDetails._replay_project_team_delete_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_external_invite_warn_details': EventDetails._sf_external_invite_warn_details_validator, @@ -76346,6 +78669,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._admin_alerting_alert_state_changed_validator = AdminAlertingAlertStateChangedType_validator EventType._admin_alerting_changed_alert_config_validator = AdminAlertingChangedAlertConfigType_validator EventType._admin_alerting_triggered_alert_validator = AdminAlertingTriggeredAlertType_validator +EventType._ransomware_restore_process_completed_validator = RansomwareRestoreProcessCompletedType_validator +EventType._ransomware_restore_process_started_validator = RansomwareRestoreProcessStartedType_validator EventType._app_blocked_by_permissions_validator = AppBlockedByPermissionsType_validator EventType._app_link_team_validator = AppLinkTeamType_validator EventType._app_link_user_validator = AppLinkUserType_validator @@ -76415,9 +78740,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._domain_verification_add_domain_success_validator = DomainVerificationAddDomainSuccessType_validator EventType._domain_verification_remove_domain_validator = DomainVerificationRemoveDomainType_validator EventType._enabled_domain_invites_validator = EnabledDomainInvitesType_validator +EventType._team_encryption_key_cancel_key_deletion_validator = TeamEncryptionKeyCancelKeyDeletionType_validator +EventType._team_encryption_key_create_key_validator = TeamEncryptionKeyCreateKeyType_validator +EventType._team_encryption_key_delete_key_validator = TeamEncryptionKeyDeleteKeyType_validator +EventType._team_encryption_key_disable_key_validator = TeamEncryptionKeyDisableKeyType_validator +EventType._team_encryption_key_enable_key_validator = TeamEncryptionKeyEnableKeyType_validator +EventType._team_encryption_key_rotate_key_validator = TeamEncryptionKeyRotateKeyType_validator +EventType._team_encryption_key_schedule_key_deletion_validator = TeamEncryptionKeyScheduleKeyDeletionType_validator EventType._apply_naming_convention_validator = ApplyNamingConventionType_validator EventType._create_folder_validator = CreateFolderType_validator EventType._file_add_validator = FileAddType_validator +EventType._file_add_from_automation_validator = FileAddFromAutomationType_validator EventType._file_copy_validator = FileCopyType_validator EventType._file_delete_validator = FileDeleteType_validator EventType._file_download_validator = FileDownloadType_validator @@ -76439,6 +78772,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._object_label_removed_validator = ObjectLabelRemovedType_validator EventType._object_label_updated_value_validator = ObjectLabelUpdatedValueType_validator EventType._organize_folder_with_tidy_validator = OrganizeFolderWithTidyType_validator +EventType._replay_file_delete_validator = ReplayFileDeleteType_validator EventType._rewind_folder_validator = RewindFolderType_validator EventType._undo_naming_convention_validator = UndoNamingConventionType_validator EventType._undo_organize_folder_with_tidy_validator = UndoOrganizeFolderWithTidyType_validator @@ -76475,6 +78809,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._sign_in_as_session_end_validator = SignInAsSessionEndType_validator EventType._sign_in_as_session_start_validator = SignInAsSessionStartType_validator EventType._sso_error_validator = SsoErrorType_validator +EventType._backup_admin_invitation_sent_validator = BackupAdminInvitationSentType_validator +EventType._backup_invitation_opened_validator = BackupInvitationOpenedType_validator EventType._create_team_invite_link_validator = CreateTeamInviteLinkType_validator EventType._delete_team_invite_link_validator = DeleteTeamInviteLinkType_validator EventType._member_add_external_id_validator = MemberAddExternalIdType_validator @@ -76570,6 +78906,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._outdated_link_view_create_report_validator = OutdatedLinkViewCreateReportType_validator EventType._outdated_link_view_report_failed_validator = OutdatedLinkViewReportFailedType_validator EventType._paper_admin_export_start_validator = PaperAdminExportStartType_validator +EventType._ransomware_alert_create_report_validator = RansomwareAlertCreateReportType_validator +EventType._ransomware_alert_create_report_failed_validator = RansomwareAlertCreateReportFailedType_validator EventType._smart_sync_create_admin_privilege_report_validator = SmartSyncCreateAdminPrivilegeReportType_validator EventType._team_activity_create_report_validator = TeamActivityCreateReportType_validator EventType._team_activity_create_report_fail_validator = TeamActivityCreateReportFailType_validator @@ -76585,6 +78923,10 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._note_shared_validator = NoteSharedType_validator EventType._note_share_receive_validator = NoteShareReceiveType_validator EventType._open_note_shared_validator = OpenNoteSharedType_validator +EventType._replay_file_shared_link_created_validator = ReplayFileSharedLinkCreatedType_validator +EventType._replay_file_shared_link_modified_validator = ReplayFileSharedLinkModifiedType_validator +EventType._replay_project_team_add_validator = ReplayProjectTeamAddType_validator +EventType._replay_project_team_delete_validator = ReplayProjectTeamDeleteType_validator EventType._sf_add_group_validator = SfAddGroupType_validator EventType._sf_allow_non_members_to_view_shared_links_validator = SfAllowNonMembersToViewSharedLinksType_validator EventType._sf_external_invite_warn_validator = SfExternalInviteWarnType_validator @@ -76832,6 +79174,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'admin_alerting_alert_state_changed': EventType._admin_alerting_alert_state_changed_validator, 'admin_alerting_changed_alert_config': EventType._admin_alerting_changed_alert_config_validator, 'admin_alerting_triggered_alert': EventType._admin_alerting_triggered_alert_validator, + 'ransomware_restore_process_completed': EventType._ransomware_restore_process_completed_validator, + 'ransomware_restore_process_started': EventType._ransomware_restore_process_started_validator, 'app_blocked_by_permissions': EventType._app_blocked_by_permissions_validator, 'app_link_team': EventType._app_link_team_validator, 'app_link_user': EventType._app_link_user_validator, @@ -76901,9 +79245,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): '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, + 'team_encryption_key_cancel_key_deletion': EventType._team_encryption_key_cancel_key_deletion_validator, + 'team_encryption_key_create_key': EventType._team_encryption_key_create_key_validator, + 'team_encryption_key_delete_key': EventType._team_encryption_key_delete_key_validator, + 'team_encryption_key_disable_key': EventType._team_encryption_key_disable_key_validator, + 'team_encryption_key_enable_key': EventType._team_encryption_key_enable_key_validator, + 'team_encryption_key_rotate_key': EventType._team_encryption_key_rotate_key_validator, + 'team_encryption_key_schedule_key_deletion': EventType._team_encryption_key_schedule_key_deletion_validator, 'apply_naming_convention': EventType._apply_naming_convention_validator, 'create_folder': EventType._create_folder_validator, 'file_add': EventType._file_add_validator, + 'file_add_from_automation': EventType._file_add_from_automation_validator, 'file_copy': EventType._file_copy_validator, 'file_delete': EventType._file_delete_validator, 'file_download': EventType._file_download_validator, @@ -76925,6 +79277,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'object_label_removed': EventType._object_label_removed_validator, 'object_label_updated_value': EventType._object_label_updated_value_validator, 'organize_folder_with_tidy': EventType._organize_folder_with_tidy_validator, + 'replay_file_delete': EventType._replay_file_delete_validator, 'rewind_folder': EventType._rewind_folder_validator, 'undo_naming_convention': EventType._undo_naming_convention_validator, 'undo_organize_folder_with_tidy': EventType._undo_organize_folder_with_tidy_validator, @@ -76961,6 +79314,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): '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_error': EventType._sso_error_validator, + 'backup_admin_invitation_sent': EventType._backup_admin_invitation_sent_validator, + 'backup_invitation_opened': EventType._backup_invitation_opened_validator, 'create_team_invite_link': EventType._create_team_invite_link_validator, 'delete_team_invite_link': EventType._delete_team_invite_link_validator, 'member_add_external_id': EventType._member_add_external_id_validator, @@ -77056,6 +79411,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'outdated_link_view_create_report': EventType._outdated_link_view_create_report_validator, 'outdated_link_view_report_failed': EventType._outdated_link_view_report_failed_validator, 'paper_admin_export_start': EventType._paper_admin_export_start_validator, + 'ransomware_alert_create_report': EventType._ransomware_alert_create_report_validator, + 'ransomware_alert_create_report_failed': EventType._ransomware_alert_create_report_failed_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, 'team_activity_create_report_fail': EventType._team_activity_create_report_fail_validator, @@ -77071,6 +79428,10 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'note_shared': EventType._note_shared_validator, 'note_share_receive': EventType._note_share_receive_validator, 'open_note_shared': EventType._open_note_shared_validator, + 'replay_file_shared_link_created': EventType._replay_file_shared_link_created_validator, + 'replay_file_shared_link_modified': EventType._replay_file_shared_link_modified_validator, + 'replay_project_team_add': EventType._replay_project_team_add_validator, + 'replay_project_team_delete': EventType._replay_project_team_delete_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_external_invite_warn': EventType._sf_external_invite_warn_validator, @@ -77321,6 +79682,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._admin_alerting_alert_state_changed_validator = bv.Void() EventTypeArg._admin_alerting_changed_alert_config_validator = bv.Void() EventTypeArg._admin_alerting_triggered_alert_validator = bv.Void() +EventTypeArg._ransomware_restore_process_completed_validator = bv.Void() +EventTypeArg._ransomware_restore_process_started_validator = bv.Void() EventTypeArg._app_blocked_by_permissions_validator = bv.Void() EventTypeArg._app_link_team_validator = bv.Void() EventTypeArg._app_link_user_validator = bv.Void() @@ -77390,9 +79753,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._domain_verification_add_domain_success_validator = bv.Void() EventTypeArg._domain_verification_remove_domain_validator = bv.Void() EventTypeArg._enabled_domain_invites_validator = bv.Void() +EventTypeArg._team_encryption_key_cancel_key_deletion_validator = bv.Void() +EventTypeArg._team_encryption_key_create_key_validator = bv.Void() +EventTypeArg._team_encryption_key_delete_key_validator = bv.Void() +EventTypeArg._team_encryption_key_disable_key_validator = bv.Void() +EventTypeArg._team_encryption_key_enable_key_validator = bv.Void() +EventTypeArg._team_encryption_key_rotate_key_validator = bv.Void() +EventTypeArg._team_encryption_key_schedule_key_deletion_validator = bv.Void() EventTypeArg._apply_naming_convention_validator = bv.Void() EventTypeArg._create_folder_validator = bv.Void() EventTypeArg._file_add_validator = bv.Void() +EventTypeArg._file_add_from_automation_validator = bv.Void() EventTypeArg._file_copy_validator = bv.Void() EventTypeArg._file_delete_validator = bv.Void() EventTypeArg._file_download_validator = bv.Void() @@ -77414,6 +79785,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._object_label_removed_validator = bv.Void() EventTypeArg._object_label_updated_value_validator = bv.Void() EventTypeArg._organize_folder_with_tidy_validator = bv.Void() +EventTypeArg._replay_file_delete_validator = bv.Void() EventTypeArg._rewind_folder_validator = bv.Void() EventTypeArg._undo_naming_convention_validator = bv.Void() EventTypeArg._undo_organize_folder_with_tidy_validator = bv.Void() @@ -77450,6 +79822,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._sign_in_as_session_end_validator = bv.Void() EventTypeArg._sign_in_as_session_start_validator = bv.Void() EventTypeArg._sso_error_validator = bv.Void() +EventTypeArg._backup_admin_invitation_sent_validator = bv.Void() +EventTypeArg._backup_invitation_opened_validator = bv.Void() EventTypeArg._create_team_invite_link_validator = bv.Void() EventTypeArg._delete_team_invite_link_validator = bv.Void() EventTypeArg._member_add_external_id_validator = bv.Void() @@ -77545,6 +79919,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._outdated_link_view_create_report_validator = bv.Void() EventTypeArg._outdated_link_view_report_failed_validator = bv.Void() EventTypeArg._paper_admin_export_start_validator = bv.Void() +EventTypeArg._ransomware_alert_create_report_validator = bv.Void() +EventTypeArg._ransomware_alert_create_report_failed_validator = bv.Void() EventTypeArg._smart_sync_create_admin_privilege_report_validator = bv.Void() EventTypeArg._team_activity_create_report_validator = bv.Void() EventTypeArg._team_activity_create_report_fail_validator = bv.Void() @@ -77560,6 +79936,10 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._note_shared_validator = bv.Void() EventTypeArg._note_share_receive_validator = bv.Void() EventTypeArg._open_note_shared_validator = bv.Void() +EventTypeArg._replay_file_shared_link_created_validator = bv.Void() +EventTypeArg._replay_file_shared_link_modified_validator = bv.Void() +EventTypeArg._replay_project_team_add_validator = bv.Void() +EventTypeArg._replay_project_team_delete_validator = bv.Void() EventTypeArg._sf_add_group_validator = bv.Void() EventTypeArg._sf_allow_non_members_to_view_shared_links_validator = bv.Void() EventTypeArg._sf_external_invite_warn_validator = bv.Void() @@ -77807,6 +80187,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'admin_alerting_alert_state_changed': EventTypeArg._admin_alerting_alert_state_changed_validator, 'admin_alerting_changed_alert_config': EventTypeArg._admin_alerting_changed_alert_config_validator, 'admin_alerting_triggered_alert': EventTypeArg._admin_alerting_triggered_alert_validator, + 'ransomware_restore_process_completed': EventTypeArg._ransomware_restore_process_completed_validator, + 'ransomware_restore_process_started': EventTypeArg._ransomware_restore_process_started_validator, 'app_blocked_by_permissions': EventTypeArg._app_blocked_by_permissions_validator, 'app_link_team': EventTypeArg._app_link_team_validator, 'app_link_user': EventTypeArg._app_link_user_validator, @@ -77876,9 +80258,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'domain_verification_add_domain_success': EventTypeArg._domain_verification_add_domain_success_validator, 'domain_verification_remove_domain': EventTypeArg._domain_verification_remove_domain_validator, 'enabled_domain_invites': EventTypeArg._enabled_domain_invites_validator, + 'team_encryption_key_cancel_key_deletion': EventTypeArg._team_encryption_key_cancel_key_deletion_validator, + 'team_encryption_key_create_key': EventTypeArg._team_encryption_key_create_key_validator, + 'team_encryption_key_delete_key': EventTypeArg._team_encryption_key_delete_key_validator, + 'team_encryption_key_disable_key': EventTypeArg._team_encryption_key_disable_key_validator, + 'team_encryption_key_enable_key': EventTypeArg._team_encryption_key_enable_key_validator, + 'team_encryption_key_rotate_key': EventTypeArg._team_encryption_key_rotate_key_validator, + 'team_encryption_key_schedule_key_deletion': EventTypeArg._team_encryption_key_schedule_key_deletion_validator, 'apply_naming_convention': EventTypeArg._apply_naming_convention_validator, 'create_folder': EventTypeArg._create_folder_validator, 'file_add': EventTypeArg._file_add_validator, + 'file_add_from_automation': EventTypeArg._file_add_from_automation_validator, 'file_copy': EventTypeArg._file_copy_validator, 'file_delete': EventTypeArg._file_delete_validator, 'file_download': EventTypeArg._file_download_validator, @@ -77900,6 +80290,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'object_label_removed': EventTypeArg._object_label_removed_validator, 'object_label_updated_value': EventTypeArg._object_label_updated_value_validator, 'organize_folder_with_tidy': EventTypeArg._organize_folder_with_tidy_validator, + 'replay_file_delete': EventTypeArg._replay_file_delete_validator, 'rewind_folder': EventTypeArg._rewind_folder_validator, 'undo_naming_convention': EventTypeArg._undo_naming_convention_validator, 'undo_organize_folder_with_tidy': EventTypeArg._undo_organize_folder_with_tidy_validator, @@ -77936,6 +80327,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'sign_in_as_session_end': EventTypeArg._sign_in_as_session_end_validator, 'sign_in_as_session_start': EventTypeArg._sign_in_as_session_start_validator, 'sso_error': EventTypeArg._sso_error_validator, + 'backup_admin_invitation_sent': EventTypeArg._backup_admin_invitation_sent_validator, + 'backup_invitation_opened': EventTypeArg._backup_invitation_opened_validator, 'create_team_invite_link': EventTypeArg._create_team_invite_link_validator, 'delete_team_invite_link': EventTypeArg._delete_team_invite_link_validator, 'member_add_external_id': EventTypeArg._member_add_external_id_validator, @@ -78031,6 +80424,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'outdated_link_view_create_report': EventTypeArg._outdated_link_view_create_report_validator, 'outdated_link_view_report_failed': EventTypeArg._outdated_link_view_report_failed_validator, 'paper_admin_export_start': EventTypeArg._paper_admin_export_start_validator, + 'ransomware_alert_create_report': EventTypeArg._ransomware_alert_create_report_validator, + 'ransomware_alert_create_report_failed': EventTypeArg._ransomware_alert_create_report_failed_validator, 'smart_sync_create_admin_privilege_report': EventTypeArg._smart_sync_create_admin_privilege_report_validator, 'team_activity_create_report': EventTypeArg._team_activity_create_report_validator, 'team_activity_create_report_fail': EventTypeArg._team_activity_create_report_fail_validator, @@ -78046,6 +80441,10 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'note_shared': EventTypeArg._note_shared_validator, 'note_share_receive': EventTypeArg._note_share_receive_validator, 'open_note_shared': EventTypeArg._open_note_shared_validator, + 'replay_file_shared_link_created': EventTypeArg._replay_file_shared_link_created_validator, + 'replay_file_shared_link_modified': EventTypeArg._replay_file_shared_link_modified_validator, + 'replay_project_team_add': EventTypeArg._replay_project_team_add_validator, + 'replay_project_team_delete': EventTypeArg._replay_project_team_delete_validator, 'sf_add_group': EventTypeArg._sf_add_group_validator, 'sf_allow_non_members_to_view_shared_links': EventTypeArg._sf_allow_non_members_to_view_shared_links_validator, 'sf_external_invite_warn': EventTypeArg._sf_external_invite_warn_validator, @@ -78294,6 +80693,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.admin_alerting_alert_state_changed = EventTypeArg('admin_alerting_alert_state_changed') EventTypeArg.admin_alerting_changed_alert_config = EventTypeArg('admin_alerting_changed_alert_config') EventTypeArg.admin_alerting_triggered_alert = EventTypeArg('admin_alerting_triggered_alert') +EventTypeArg.ransomware_restore_process_completed = EventTypeArg('ransomware_restore_process_completed') +EventTypeArg.ransomware_restore_process_started = EventTypeArg('ransomware_restore_process_started') EventTypeArg.app_blocked_by_permissions = EventTypeArg('app_blocked_by_permissions') EventTypeArg.app_link_team = EventTypeArg('app_link_team') EventTypeArg.app_link_user = EventTypeArg('app_link_user') @@ -78363,9 +80764,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.domain_verification_add_domain_success = EventTypeArg('domain_verification_add_domain_success') EventTypeArg.domain_verification_remove_domain = EventTypeArg('domain_verification_remove_domain') EventTypeArg.enabled_domain_invites = EventTypeArg('enabled_domain_invites') +EventTypeArg.team_encryption_key_cancel_key_deletion = EventTypeArg('team_encryption_key_cancel_key_deletion') +EventTypeArg.team_encryption_key_create_key = EventTypeArg('team_encryption_key_create_key') +EventTypeArg.team_encryption_key_delete_key = EventTypeArg('team_encryption_key_delete_key') +EventTypeArg.team_encryption_key_disable_key = EventTypeArg('team_encryption_key_disable_key') +EventTypeArg.team_encryption_key_enable_key = EventTypeArg('team_encryption_key_enable_key') +EventTypeArg.team_encryption_key_rotate_key = EventTypeArg('team_encryption_key_rotate_key') +EventTypeArg.team_encryption_key_schedule_key_deletion = EventTypeArg('team_encryption_key_schedule_key_deletion') EventTypeArg.apply_naming_convention = EventTypeArg('apply_naming_convention') EventTypeArg.create_folder = EventTypeArg('create_folder') EventTypeArg.file_add = EventTypeArg('file_add') +EventTypeArg.file_add_from_automation = EventTypeArg('file_add_from_automation') EventTypeArg.file_copy = EventTypeArg('file_copy') EventTypeArg.file_delete = EventTypeArg('file_delete') EventTypeArg.file_download = EventTypeArg('file_download') @@ -78387,6 +80796,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.object_label_removed = EventTypeArg('object_label_removed') EventTypeArg.object_label_updated_value = EventTypeArg('object_label_updated_value') EventTypeArg.organize_folder_with_tidy = EventTypeArg('organize_folder_with_tidy') +EventTypeArg.replay_file_delete = EventTypeArg('replay_file_delete') EventTypeArg.rewind_folder = EventTypeArg('rewind_folder') EventTypeArg.undo_naming_convention = EventTypeArg('undo_naming_convention') EventTypeArg.undo_organize_folder_with_tidy = EventTypeArg('undo_organize_folder_with_tidy') @@ -78423,6 +80833,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.sign_in_as_session_end = EventTypeArg('sign_in_as_session_end') EventTypeArg.sign_in_as_session_start = EventTypeArg('sign_in_as_session_start') EventTypeArg.sso_error = EventTypeArg('sso_error') +EventTypeArg.backup_admin_invitation_sent = EventTypeArg('backup_admin_invitation_sent') +EventTypeArg.backup_invitation_opened = EventTypeArg('backup_invitation_opened') EventTypeArg.create_team_invite_link = EventTypeArg('create_team_invite_link') EventTypeArg.delete_team_invite_link = EventTypeArg('delete_team_invite_link') EventTypeArg.member_add_external_id = EventTypeArg('member_add_external_id') @@ -78518,6 +80930,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.outdated_link_view_create_report = EventTypeArg('outdated_link_view_create_report') EventTypeArg.outdated_link_view_report_failed = EventTypeArg('outdated_link_view_report_failed') EventTypeArg.paper_admin_export_start = EventTypeArg('paper_admin_export_start') +EventTypeArg.ransomware_alert_create_report = EventTypeArg('ransomware_alert_create_report') +EventTypeArg.ransomware_alert_create_report_failed = EventTypeArg('ransomware_alert_create_report_failed') EventTypeArg.smart_sync_create_admin_privilege_report = EventTypeArg('smart_sync_create_admin_privilege_report') EventTypeArg.team_activity_create_report = EventTypeArg('team_activity_create_report') EventTypeArg.team_activity_create_report_fail = EventTypeArg('team_activity_create_report_fail') @@ -78533,6 +80947,10 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.note_shared = EventTypeArg('note_shared') EventTypeArg.note_share_receive = EventTypeArg('note_share_receive') EventTypeArg.open_note_shared = EventTypeArg('open_note_shared') +EventTypeArg.replay_file_shared_link_created = EventTypeArg('replay_file_shared_link_created') +EventTypeArg.replay_file_shared_link_modified = EventTypeArg('replay_file_shared_link_modified') +EventTypeArg.replay_project_team_add = EventTypeArg('replay_project_team_add') +EventTypeArg.replay_project_team_delete = EventTypeArg('replay_project_team_delete') EventTypeArg.sf_add_group = EventTypeArg('sf_add_group') EventTypeArg.sf_allow_non_members_to_view_shared_links = EventTypeArg('sf_allow_non_members_to_view_shared_links') EventTypeArg.sf_external_invite_warn = EventTypeArg('sf_external_invite_warn') @@ -79041,6 +81459,13 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): FileAddDetails._all_field_names_ = set([]) FileAddDetails._all_fields_ = [] +FileAddFromAutomationDetails._all_field_names_ = set([]) +FileAddFromAutomationDetails._all_fields_ = [] + +FileAddFromAutomationType.description.validator = bv.String() +FileAddFromAutomationType._all_field_names_ = set(['description']) +FileAddFromAutomationType._all_fields_ = [('description', FileAddFromAutomationType.description.validator)] + FileAddType.description.validator = bv.String() FileAddType._all_field_names_ = set(['description']) FileAddType._all_fields_ = [('description', FileAddType.description.validator)] @@ -80654,6 +83079,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LoginMethod._apple_oauth_validator = bv.Void() LoginMethod._first_party_token_exchange_validator = bv.Void() LoginMethod._google_oauth_validator = bv.Void() +LoginMethod._lenovo_oauth_validator = bv.Void() LoginMethod._password_validator = bv.Void() LoginMethod._qr_code_validator = bv.Void() LoginMethod._saml_validator = bv.Void() @@ -80664,6 +83090,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'apple_oauth': LoginMethod._apple_oauth_validator, 'first_party_token_exchange': LoginMethod._first_party_token_exchange_validator, 'google_oauth': LoginMethod._google_oauth_validator, + 'lenovo_oauth': LoginMethod._lenovo_oauth_validator, 'password': LoginMethod._password_validator, 'qr_code': LoginMethod._qr_code_validator, 'saml': LoginMethod._saml_validator, @@ -80675,6 +83102,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): LoginMethod.apple_oauth = LoginMethod('apple_oauth') LoginMethod.first_party_token_exchange = LoginMethod('first_party_token_exchange') LoginMethod.google_oauth = LoginMethod('google_oauth') +LoginMethod.lenovo_oauth = LoginMethod('lenovo_oauth') LoginMethod.password = LoginMethod('password') LoginMethod.qr_code = LoginMethod('qr_code') LoginMethod.saml = LoginMethod('saml') @@ -82299,6 +84727,47 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): QuickActionType.unlink_session = QuickActionType('unlink_session') QuickActionType.other = QuickActionType('other') +RansomwareAlertCreateReportDetails._all_field_names_ = set([]) +RansomwareAlertCreateReportDetails._all_fields_ = [] + +RansomwareAlertCreateReportFailedDetails.failure_reason.validator = team.TeamReportFailureReason_validator +RansomwareAlertCreateReportFailedDetails._all_field_names_ = set(['failure_reason']) +RansomwareAlertCreateReportFailedDetails._all_fields_ = [('failure_reason', RansomwareAlertCreateReportFailedDetails.failure_reason.validator)] + +RansomwareAlertCreateReportFailedType.description.validator = bv.String() +RansomwareAlertCreateReportFailedType._all_field_names_ = set(['description']) +RansomwareAlertCreateReportFailedType._all_fields_ = [('description', RansomwareAlertCreateReportFailedType.description.validator)] + +RansomwareAlertCreateReportType.description.validator = bv.String() +RansomwareAlertCreateReportType._all_field_names_ = set(['description']) +RansomwareAlertCreateReportType._all_fields_ = [('description', RansomwareAlertCreateReportType.description.validator)] + +RansomwareRestoreProcessCompletedDetails.status.validator = bv.String() +RansomwareRestoreProcessCompletedDetails.restored_files_count.validator = bv.Int64() +RansomwareRestoreProcessCompletedDetails.restored_files_failed_count.validator = bv.Int64() +RansomwareRestoreProcessCompletedDetails._all_field_names_ = set([ + 'status', + 'restored_files_count', + 'restored_files_failed_count', +]) +RansomwareRestoreProcessCompletedDetails._all_fields_ = [ + ('status', RansomwareRestoreProcessCompletedDetails.status.validator), + ('restored_files_count', RansomwareRestoreProcessCompletedDetails.restored_files_count.validator), + ('restored_files_failed_count', RansomwareRestoreProcessCompletedDetails.restored_files_failed_count.validator), +] + +RansomwareRestoreProcessCompletedType.description.validator = bv.String() +RansomwareRestoreProcessCompletedType._all_field_names_ = set(['description']) +RansomwareRestoreProcessCompletedType._all_fields_ = [('description', RansomwareRestoreProcessCompletedType.description.validator)] + +RansomwareRestoreProcessStartedDetails.extension.validator = bv.String() +RansomwareRestoreProcessStartedDetails._all_field_names_ = set(['extension']) +RansomwareRestoreProcessStartedDetails._all_fields_ = [('extension', RansomwareRestoreProcessStartedDetails.extension.validator)] + +RansomwareRestoreProcessStartedType.description.validator = bv.String() +RansomwareRestoreProcessStartedType._all_field_names_ = set(['description']) +RansomwareRestoreProcessStartedType._all_fields_ = [('description', RansomwareRestoreProcessStartedType.description.validator)] + RecipientsConfiguration.recipient_setting_type.validator = bv.Nullable(AlertRecipientsSettingType_validator) RecipientsConfiguration.emails.validator = bv.Nullable(bv.List(EmailAddress_validator)) RecipientsConfiguration.groups.validator = bv.Nullable(bv.List(bv.String())) @@ -82324,6 +84793,41 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('dest_asset_index', RelocateAssetReferencesLogInfo.dest_asset_index.validator), ] +ReplayFileDeleteDetails._all_field_names_ = set([]) +ReplayFileDeleteDetails._all_fields_ = [] + +ReplayFileDeleteType.description.validator = bv.String() +ReplayFileDeleteType._all_field_names_ = set(['description']) +ReplayFileDeleteType._all_fields_ = [('description', ReplayFileDeleteType.description.validator)] + +ReplayFileSharedLinkCreatedDetails._all_field_names_ = set([]) +ReplayFileSharedLinkCreatedDetails._all_fields_ = [] + +ReplayFileSharedLinkCreatedType.description.validator = bv.String() +ReplayFileSharedLinkCreatedType._all_field_names_ = set(['description']) +ReplayFileSharedLinkCreatedType._all_fields_ = [('description', ReplayFileSharedLinkCreatedType.description.validator)] + +ReplayFileSharedLinkModifiedDetails._all_field_names_ = set([]) +ReplayFileSharedLinkModifiedDetails._all_fields_ = [] + +ReplayFileSharedLinkModifiedType.description.validator = bv.String() +ReplayFileSharedLinkModifiedType._all_field_names_ = set(['description']) +ReplayFileSharedLinkModifiedType._all_fields_ = [('description', ReplayFileSharedLinkModifiedType.description.validator)] + +ReplayProjectTeamAddDetails._all_field_names_ = set([]) +ReplayProjectTeamAddDetails._all_fields_ = [] + +ReplayProjectTeamAddType.description.validator = bv.String() +ReplayProjectTeamAddType._all_field_names_ = set(['description']) +ReplayProjectTeamAddType._all_fields_ = [('description', ReplayProjectTeamAddType.description.validator)] + +ReplayProjectTeamDeleteDetails._all_field_names_ = set([]) +ReplayProjectTeamDeleteDetails._all_fields_ = [] + +ReplayProjectTeamDeleteType.description.validator = bv.String() +ReplayProjectTeamDeleteType._all_field_names_ = set(['description']) +ReplayProjectTeamDeleteType._all_fields_ = [('description', ReplayProjectTeamDeleteType.description.validator)] + ResellerLogInfo.reseller_name.validator = bv.String() ResellerLogInfo.reseller_email.validator = EmailAddress_validator ResellerLogInfo._all_field_names_ = set([ @@ -84277,6 +86781,55 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamDetails._all_field_names_ = set(['team']) TeamDetails._all_fields_ = [('team', TeamDetails.team.validator)] +TeamEncryptionKeyCancelKeyDeletionDetails._all_field_names_ = set([]) +TeamEncryptionKeyCancelKeyDeletionDetails._all_fields_ = [] + +TeamEncryptionKeyCancelKeyDeletionType.description.validator = bv.String() +TeamEncryptionKeyCancelKeyDeletionType._all_field_names_ = set(['description']) +TeamEncryptionKeyCancelKeyDeletionType._all_fields_ = [('description', TeamEncryptionKeyCancelKeyDeletionType.description.validator)] + +TeamEncryptionKeyCreateKeyDetails._all_field_names_ = set([]) +TeamEncryptionKeyCreateKeyDetails._all_fields_ = [] + +TeamEncryptionKeyCreateKeyType.description.validator = bv.String() +TeamEncryptionKeyCreateKeyType._all_field_names_ = set(['description']) +TeamEncryptionKeyCreateKeyType._all_fields_ = [('description', TeamEncryptionKeyCreateKeyType.description.validator)] + +TeamEncryptionKeyDeleteKeyDetails._all_field_names_ = set([]) +TeamEncryptionKeyDeleteKeyDetails._all_fields_ = [] + +TeamEncryptionKeyDeleteKeyType.description.validator = bv.String() +TeamEncryptionKeyDeleteKeyType._all_field_names_ = set(['description']) +TeamEncryptionKeyDeleteKeyType._all_fields_ = [('description', TeamEncryptionKeyDeleteKeyType.description.validator)] + +TeamEncryptionKeyDisableKeyDetails._all_field_names_ = set([]) +TeamEncryptionKeyDisableKeyDetails._all_fields_ = [] + +TeamEncryptionKeyDisableKeyType.description.validator = bv.String() +TeamEncryptionKeyDisableKeyType._all_field_names_ = set(['description']) +TeamEncryptionKeyDisableKeyType._all_fields_ = [('description', TeamEncryptionKeyDisableKeyType.description.validator)] + +TeamEncryptionKeyEnableKeyDetails._all_field_names_ = set([]) +TeamEncryptionKeyEnableKeyDetails._all_fields_ = [] + +TeamEncryptionKeyEnableKeyType.description.validator = bv.String() +TeamEncryptionKeyEnableKeyType._all_field_names_ = set(['description']) +TeamEncryptionKeyEnableKeyType._all_fields_ = [('description', TeamEncryptionKeyEnableKeyType.description.validator)] + +TeamEncryptionKeyRotateKeyDetails._all_field_names_ = set([]) +TeamEncryptionKeyRotateKeyDetails._all_fields_ = [] + +TeamEncryptionKeyRotateKeyType.description.validator = bv.String() +TeamEncryptionKeyRotateKeyType._all_field_names_ = set(['description']) +TeamEncryptionKeyRotateKeyType._all_fields_ = [('description', TeamEncryptionKeyRotateKeyType.description.validator)] + +TeamEncryptionKeyScheduleKeyDeletionDetails._all_field_names_ = set([]) +TeamEncryptionKeyScheduleKeyDeletionDetails._all_fields_ = [] + +TeamEncryptionKeyScheduleKeyDeletionType.description.validator = bv.String() +TeamEncryptionKeyScheduleKeyDeletionType._all_field_names_ = set(['description']) +TeamEncryptionKeyScheduleKeyDeletionType._all_fields_ = [('description', TeamEncryptionKeyScheduleKeyDeletionType.description.validator)] + TeamEvent.timestamp.validator = common.DropboxTimestamp_validator TeamEvent.event_category.validator = EventCategory_validator TeamEvent.actor.validator = bv.Nullable(ActorLogInfo_validator) diff --git a/dropbox/team_policies.py b/dropbox/team_policies.py index c6b9fbeb..319c095a 100644 --- a/dropbox/team_policies.py +++ b/dropbox/team_policies.py @@ -796,6 +796,58 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RolloutMethod_validator = bv.Union(RolloutMethod) +class SharedFolderBlanketLinkRestrictionPolicy(bb.Union): + """ + Policy governing whether shared folder membership is required to access + 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 team_policies.SharedFolderBlanketLinkRestrictionPolicy.members: Only + members of shared folders can access folder content via shared link. + :ivar team_policies.SharedFolderBlanketLinkRestrictionPolicy.anyone: Anyone + can access folder content via shared link. + """ + + _catch_all = 'other' + # Attribute is overwritten below the class definition + members = None + # Attribute is overwritten below the class definition + anyone = None + # Attribute is overwritten below the class definition + other = None + + def is_members(self): + """ + Check if the union tag is ``members``. + + :rtype: bool + """ + return self._tag == 'members' + + 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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(SharedFolderBlanketLinkRestrictionPolicy, self)._process_custom_annotations(annotation_type, field_path, processor) + +SharedFolderBlanketLinkRestrictionPolicy_validator = bv.Union(SharedFolderBlanketLinkRestrictionPolicy) + class SharedFolderJoinPolicy(bb.Union): """ Policy governing which shared folders a team member can join. @@ -1407,6 +1459,9 @@ class TeamSharingPolicies(bb.Struct): view shared links owned by team members. :ivar team_policies.TeamSharingPolicies.group_creation_policy: Who can create groups. + :ivar + team_policies.TeamSharingPolicies.shared_folder_link_restriction_policy: + Who can view links to content in shared folders. """ __slots__ = [ @@ -1414,6 +1469,7 @@ class TeamSharingPolicies(bb.Struct): '_shared_folder_join_policy_value', '_shared_link_create_policy_value', '_group_creation_policy_value', + '_shared_folder_link_restriction_policy_value', ] _has_required_fields = True @@ -1422,11 +1478,13 @@ def __init__(self, shared_folder_member_policy=None, shared_folder_join_policy=None, shared_link_create_policy=None, - group_creation_policy=None): + group_creation_policy=None, + shared_folder_link_restriction_policy=None): self._shared_folder_member_policy_value = bb.NOT_SET self._shared_folder_join_policy_value = bb.NOT_SET self._shared_link_create_policy_value = bb.NOT_SET self._group_creation_policy_value = bb.NOT_SET + self._shared_folder_link_restriction_policy_value = bb.NOT_SET 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: @@ -1435,6 +1493,8 @@ def __init__(self, self.shared_link_create_policy = shared_link_create_policy if group_creation_policy is not None: self.group_creation_policy = group_creation_policy + if shared_folder_link_restriction_policy is not None: + self.shared_folder_link_restriction_policy = shared_folder_link_restriction_policy # Instance attribute type: SharedFolderMemberPolicy (validator is set below) shared_folder_member_policy = bb.Attribute("shared_folder_member_policy", user_defined=True) @@ -1448,6 +1508,9 @@ def __init__(self, # Instance attribute type: GroupCreation (validator is set below) group_creation_policy = bb.Attribute("group_creation_policy", user_defined=True) + # Instance attribute type: SharedFolderBlanketLinkRestrictionPolicy (validator is set below) + shared_folder_link_restriction_policy = bb.Attribute("shared_folder_link_restriction_policy", user_defined=True) + def _process_custom_annotations(self, annotation_type, field_path, processor): super(TeamSharingPolicies, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -1773,6 +1836,19 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): RolloutMethod.unlink_most_inactive = RolloutMethod('unlink_most_inactive') RolloutMethod.add_member_to_exceptions = RolloutMethod('add_member_to_exceptions') +SharedFolderBlanketLinkRestrictionPolicy._members_validator = bv.Void() +SharedFolderBlanketLinkRestrictionPolicy._anyone_validator = bv.Void() +SharedFolderBlanketLinkRestrictionPolicy._other_validator = bv.Void() +SharedFolderBlanketLinkRestrictionPolicy._tagmap = { + 'members': SharedFolderBlanketLinkRestrictionPolicy._members_validator, + 'anyone': SharedFolderBlanketLinkRestrictionPolicy._anyone_validator, + 'other': SharedFolderBlanketLinkRestrictionPolicy._other_validator, +} + +SharedFolderBlanketLinkRestrictionPolicy.members = SharedFolderBlanketLinkRestrictionPolicy('members') +SharedFolderBlanketLinkRestrictionPolicy.anyone = SharedFolderBlanketLinkRestrictionPolicy('anyone') +SharedFolderBlanketLinkRestrictionPolicy.other = SharedFolderBlanketLinkRestrictionPolicy('other') + SharedFolderJoinPolicy._from_team_only_validator = bv.Void() SharedFolderJoinPolicy._from_anyone_validator = bv.Void() SharedFolderJoinPolicy._other_validator = bv.Void() @@ -1933,17 +2009,20 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): TeamSharingPolicies.shared_folder_join_policy.validator = SharedFolderJoinPolicy_validator TeamSharingPolicies.shared_link_create_policy.validator = SharedLinkCreatePolicy_validator TeamSharingPolicies.group_creation_policy.validator = GroupCreation_validator +TeamSharingPolicies.shared_folder_link_restriction_policy.validator = SharedFolderBlanketLinkRestrictionPolicy_validator TeamSharingPolicies._all_field_names_ = set([ 'shared_folder_member_policy', 'shared_folder_join_policy', 'shared_link_create_policy', 'group_creation_policy', + 'shared_folder_link_restriction_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), ('group_creation_policy', TeamSharingPolicies.group_creation_policy.validator), + ('shared_folder_link_restriction_policy', TeamSharingPolicies.shared_folder_link_restriction_policy.validator), ] TwoStepVerificationPolicy._require_tfa_enable_validator = bv.Void() diff --git a/spec b/spec index 3d1080a0..c8364404 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 3d1080a021a67c335c52361d8f61ec558bb80606 +Subproject commit c8364404953d875801d496a81f786c5545f78223 From e2b0ca82ce783d0f1801ee14b2dac35772484dd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20B=C3=A9langer?= Date: Mon, 13 May 2024 14:23:27 -0700 Subject: [PATCH 84/90] Prepare Release Notes for v12 (#499) --- UPGRADING.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UPGRADING.md b/UPGRADING.md index cbae53c4..1b6d029b 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -3,6 +3,10 @@ This document is designed to show you how to upgrade to the latest version of the SDK accomodating any breaking changes introduced by major version updates. If you find any issues with either this guide on upgrading or the changes introduced in the new version, please see [CONTRIBUTING.md](CONTRIBUTING.md) +# Upgrading to v12.0.0 +* The SDK no longer provides its own CA bundle to verify TLS connections. It will continue to verify connections through the `requests` library, which makes use of [`certifi`](https://github.com/certifi/python-certifi). You may still provide your own bundle through the `ca_certs` parameter of the `Dropbox` classes and of the `create_session` function (see the [documentation](https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html) for details). +* This will be the last major version to support Python 2. + # Upgrading from v10.X.X to v11.0.0 The major change that happened in this new version is that we regenerated the client files using Stone 3.2.0, so relative imports are removed from the generated client files. From 3173f6ef48230967be53636a49d49b503e9947b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20B=C3=A9langer?= Date: Mon, 13 May 2024 21:51:50 -0700 Subject: [PATCH 85/90] Remove CI for Python 3.5 (#501) --- .github/workflows/ci.yml | 4 ++-- tox.ini | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0d85f3c..9c98b96b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: os: [macos-13, windows-latest] - python-version: [3.5, 3.6, 3.7, 3.8, pypy-3.7] + python-version: [3.6, 3.7, 3.8, pypy-3.7] exclude: - os: windows-latest python-version: 3.6 @@ -74,7 +74,7 @@ jobs: strategy: matrix: os: [macos-13, windows-latest] - python-version: [3.5, 3.6, 3.7, 3.8, pypy-3.7] + python-version: [3.6, 3.7, 3.8, pypy-3.7] exclude: - os: windows-latest python-version: 3.6 diff --git a/tox.ini b/tox.ini index 203030f2..5c9c5d04 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] -envlist = py{27,34,35,36,37,38,39-dev,py,py3},check,lint,docs,test_unit,coverage +envlist = py{27,36,37,38,39-dev,py,py3},check,lint,docs,test_unit,coverage skip_missing_interpreters = true [flake8] @@ -86,4 +86,4 @@ description = invoke sphinx-build to build the HTML docs extras = docs commands = sphinx-build -b html docs build/html deps = - sphinx \ No newline at end of file + sphinx From 52893f0570271086d804fc8d5a0bf5bcc52bcad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20B=C3=A9langer?= Date: Mon, 13 May 2024 22:04:47 -0700 Subject: [PATCH 86/90] Fix doc generation and PyPI uploads by pinning to Python 3.7 (#500) * Per the [docs](https://blog.readthedocs.com/migrate-configuration-v2/), ReadTheDocs now requires a `version 2` config file. In it, we pin the version used to generate the docs to Python 3.7, which matches what is currently tested (and green) in CI. * PyPI uploads were still configured to run on the latest version of Python (currently 3.12). We pin this back to Python 3.7, which make it less likely to break in mysterious ways. --- .github/workflows/pypiupload.yml | 6 +++--- .readthedocs.yml | 16 ++++++++++++---- docs/conf.py | 2 +- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pypiupload.yml b/.github/workflows/pypiupload.yml index 874a32b4..d8fee157 100644 --- a/.github/workflows/pypiupload.yml +++ b/.github/workflows/pypiupload.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: [2.7, 3.x] + python-version: [2.7, 3.7] steps: - uses: actions/checkout@v2.3.4 @@ -34,9 +34,9 @@ jobs: - name: Build run: | python setup.py bdist_wheel - - name: Build Sources (3.x) + - name: Build Sources (Python 3) run: python setup.py sdist - if: matrix.python-version == '3.x' + if: ${{ matrix.python-version != '2.7' }} - name: Publish env: TWINE_USERNAME: __token__ diff --git a/.readthedocs.yml b/.readthedocs.yml index 3aa8a563..8f1d4411 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,5 +1,13 @@ -# .readthedocs.yml +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details -# Don't build any extra formats -# https://docs.readthedocs.io/en/latest/yaml-config.html#formats -formats: [] +version: 2 + +build: + os: ubuntu-20.04 + tools: + python: "3.7" + +sphinx: + configuration: docs/conf.py diff --git a/docs/conf.py b/docs/conf.py index 76ffb570..0766dc48 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -54,7 +54,7 @@ # General information about the project. project = u'Dropbox for Python' -copyright = u'2015-2019, Dropbox, Inc.' +copyright = u'2015-2024, Dropbox, Inc.' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the From 1d379b47b55e945f0bcf2d5d0b59541ec340a3f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20B=C3=A9langer?= Date: Tue, 14 May 2024 11:46:21 -0700 Subject: [PATCH 87/90] Further fixes to doc generation (#503) --- .readthedocs.yml | 6 ++++++ docs/conf.py | 3 ++- docs/index.rst | 2 +- requirements.txt | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 8f1d4411..103554e8 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -9,5 +9,11 @@ build: tools: python: "3.7" +python: + install: + - requirements: requirements.txt + - method: setuptools + path: . + sphinx: configuration: docs/conf.py diff --git a/docs/conf.py b/docs/conf.py index 0766dc48..cf1ce368 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -38,6 +38,7 @@ extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.mathjax', + 'sphinx_rtd_theme', ] # Add any paths that contain templates here, relative to this directory. @@ -108,7 +109,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = 'sphinx_rtd_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/docs/index.rst b/docs/index.rst index 1e13d716..912bdc0f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -7,7 +7,7 @@ Dropbox for Python Documentation tutorial .. toctree:: - :maxdepth: 2 + :maxdepth: 1 api/async api/auth diff --git a/requirements.txt b/requirements.txt index 2b5b9a8e..d95ccf41 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,5 +8,6 @@ ply pytest pytest-runner==5.2.0 sphinx +sphinx_rtd_theme twine wheel From b474e216a3f2768331eca18a9ec04a4e55421a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20B=C3=A9langer?= Date: Mon, 3 Jun 2024 09:25:43 -0400 Subject: [PATCH 88/90] Fix incorrect pin of `requests` (#505) Reverts the version requirement for requests to what it was prior to #492. --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index d95ccf41..b1e87460 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # Dependencies required for installation (keep in sync with setup.py) -requests<2.30 +requests>=2.16.2 urllib3<2 six >= 1.12.0 stone>=2,<3.3.3 diff --git a/setup.py b/setup.py index 79304fc2..5debf1f1 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ version = eval(line.split('=', 1)[1].strip()) # pylint: disable=eval-used install_reqs = [ - 'requests<2.30', + 'requests>=2.16.2', 'urllib3<2', 'six >= 1.12.0', 'stone>=2,<3.3.3', From c5ea3f8e900512222a234b9f353f0abcbf9f865a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20B=C3=A9langer?= Date: Mon, 3 Jun 2024 12:22:04 -0400 Subject: [PATCH 89/90] Remove the pin for `urllib3` (#507) --- requirements.txt | 1 - setup.py | 1 - 2 files changed, 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index b1e87460..bebcdc16 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ # Dependencies required for installation (keep in sync with setup.py) requests>=2.16.2 -urllib3<2 six >= 1.12.0 stone>=2,<3.3.3 # Other dependencies for development diff --git a/setup.py b/setup.py index 5debf1f1..7255a450 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,6 @@ install_reqs = [ 'requests>=2.16.2', - 'urllib3<2', 'six >= 1.12.0', 'stone>=2,<3.3.3', ] From be4a41c7e7e88aa010784d57da065a25091efb0e Mon Sep 17 00:00:00 2001 From: Greg Date: Fri, 27 Dec 2024 10:44:49 -0500 Subject: [PATCH 90/90] Update updown.py (#477) --- example/updown.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/updown.py b/example/updown.py index d0572490..e088648e 100644 --- a/example/updown.py +++ b/example/updown.py @@ -94,7 +94,7 @@ def main(): else: print(name, 'exists with different stats, downloading') res = download(dbx, folder, subfolder, name) - with open(fullname) as f: + with open(fullname, 'rb') as f: data = f.read() if res == data: print(name, 'is already synced [content match]')