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]