self.profile_photo_url = profile_photo_url # 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) SetProfilePhotoResult_validator = bv.Struct(SetProfilePhotoResult) PhotoSourceArg._base64_data_validator = bv.String() PhotoSourceArg._other_validator = bv.Void() PhotoSourceArg._tagmap = { 'base64_data': PhotoSourceArg._base64_data_validator, 'other': PhotoSourceArg._other_validator, } PhotoSourceArg.other = PhotoSourceArg('other') SetProfilePhotoArg.photo.validator = PhotoSourceArg_validator SetProfilePhotoArg._all_field_names_ = set(['photo']) SetProfilePhotoArg._all_fields_ = [('photo', SetProfilePhotoArg.photo.validator)] SetProfilePhotoError._file_type_error_validator = bv.Void() SetProfilePhotoError._file_size_error_validator = bv.Void() SetProfilePhotoError._dimension_error_validator = bv.Void()
EchoArg._all_field_names_ = set(['query']) EchoArg._all_fields_ = [('query', EchoArg.query.validator)] EchoResult.result.validator = bv.String() EchoResult._all_field_names_ = set(['result']) EchoResult._all_fields_ = [('result', EchoResult.result.validator)] EchoArg.query.default = u'' EchoResult.result.default = u'' app = bb.Route( 'app', 1, False, EchoArg_validator, EchoResult_validator, bv.Void(), { 'auth': u'app', 'host': u'api', 'style': u'rpc' }, ) user = bb.Route( 'user', 1, False, EchoArg_validator, EchoResult_validator, bv.Void(), { 'auth': u'user',
self)._process_custom_annotations(annotation_type, field_path, processor) DeleteManualContactsError_validator = bv.Union(DeleteManualContactsError) 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) ] DeleteManualContactsError._contacts_not_found_validator = bv.List( common.EmailAddress_validator) DeleteManualContactsError._other_validator = bv.Void() DeleteManualContactsError._tagmap = { 'contacts_not_found': DeleteManualContactsError._contacts_not_found_validator, 'other': DeleteManualContactsError._other_validator, } DeleteManualContactsError.other = DeleteManualContactsError('other') delete_manual_contacts = bb.Route( 'delete_manual_contacts', 1, False, bv.Void(), bv.Void(), bv.Void(),
# 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) TokenScopeError_validator = bv.Struct(TokenScopeError) AccessError._invalid_account_type_validator = InvalidAccountTypeError_validator AccessError._paper_access_denied_validator = PaperAccessError_validator AccessError._other_validator = bv.Void() AccessError._tagmap = { 'invalid_account_type': AccessError._invalid_account_type_validator, 'paper_access_denied': AccessError._paper_access_denied_validator, 'other': AccessError._other_validator, } AccessError.other = AccessError('other') AuthError._invalid_access_token_validator = bv.Void() AuthError._invalid_select_user_validator = bv.Void() AuthError._invalid_select_admin_validator = bv.Void() AuthError._user_suspended_validator = bv.Void() AuthError._expired_access_token_validator = bv.Void() AuthError._missing_scope_validator = TokenScopeError_validator AuthError._route_access_denied_validator = bv.Void()
('disabled', Account.disabled.validator), ] BasicAccount.is_teammate.validator = bv.Boolean() BasicAccount.team_member_id.validator = bv.Nullable(bv.String()) BasicAccount._all_field_names_ = Account._all_field_names_.union(set([ 'is_teammate', 'team_member_id', ])) BasicAccount._all_fields_ = Account._all_fields_ + [ ('is_teammate', BasicAccount.is_teammate.validator), ('team_member_id', BasicAccount.team_member_id.validator), ] FileLockingValue._enabled_validator = bv.Boolean() FileLockingValue._other_validator = bv.Void() FileLockingValue._tagmap = { 'enabled': FileLockingValue._enabled_validator, 'other': FileLockingValue._other_validator, } 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
DisplayNameLegacy_validator = bv.String() DropboxTimestamp_validator = bv.Timestamp(u'%Y-%m-%dT%H:%M:%SZ') EmailAddress_validator = bv.String( max_length=255, pattern=u"^['&A-Za-z0-9._%+-]+@[A-Za-z0-9-][A-Za-z0-9.-]*\\.[A-Za-z]{2,15}$" ) # A ISO639-1 code. LanguageCode_validator = bv.String(min_length=2) NamePart_validator = bv.String(min_length=1, max_length=100, pattern=u'[^/:?*<>"|]*') NamespaceId_validator = bv.String(pattern=u'[-_0-9a-zA-Z:]+') OptionalNamePart_validator = bv.String(max_length=100, pattern=u'[^/:?*<>"|]*') SessionId_validator = bv.String() SharedFolderId_validator = NamespaceId_validator PathRoot._home_validator = bv.Void() PathRoot._root_validator = NamespaceId_validator PathRoot._namespace_id_validator = NamespaceId_validator PathRoot._other_validator = bv.Void() PathRoot._tagmap = { 'home': PathRoot._home_validator, 'root': PathRoot._root_validator, 'namespace_id': PathRoot._namespace_id_validator, 'other': PathRoot._other_validator, } PathRoot.home = PathRoot('home') PathRoot.other = PathRoot('other') PathRootError._invalid_root_validator = RootInfo_validator PathRootError._no_permission_validator = bv.Void()
Check if the union tag is ``other``. :rtype: bool """ return self._tag == 'other' def _process_custom_annotations(self, annotation_type, field_path, processor): super(PlatformType, self)._process_custom_annotations(annotation_type, field_path, processor) PlatformType_validator = bv.Union(PlatformType) PlatformType._web_validator = bv.Void() PlatformType._desktop_validator = bv.Void() PlatformType._mobile_ios_validator = bv.Void() PlatformType._mobile_android_validator = bv.Void() PlatformType._api_validator = bv.Void() PlatformType._unknown_validator = bv.Void() PlatformType._mobile_validator = bv.Void() PlatformType._other_validator = bv.Void() PlatformType._tagmap = { 'web': PlatformType._web_validator, 'desktop': PlatformType._desktop_validator, 'mobile_ios': PlatformType._mobile_ios_validator, 'mobile_android': PlatformType._mobile_android_validator, 'api': PlatformType._api_validator, 'unknown': PlatformType._unknown_validator, 'mobile': PlatformType._mobile_validator,
:rtype: bool """ return self._tag == 'other' def _process_custom_annotations(self, annotation_type, field_path, processor): super(PollError, self)._process_custom_annotations(annotation_type, field_path, processor) PollError_validator = bv.Union(PollError) AsyncJobId_validator = bv.String(min_length=1) LaunchResultBase._async_job_id_validator = AsyncJobId_validator LaunchResultBase._tagmap = { 'async_job_id': LaunchResultBase._async_job_id_validator, } LaunchEmptyResult._complete_validator = bv.Void() LaunchEmptyResult._tagmap = { 'complete': LaunchEmptyResult._complete_validator, } LaunchEmptyResult._tagmap.update(LaunchResultBase._tagmap) LaunchEmptyResult.complete = LaunchEmptyResult('complete') PollArg.async_job_id.validator = AsyncJobId_validator PollArg._all_field_names_ = set(['async_job_id']) PollArg._all_fields_ = [('async_job_id', PollArg.async_job_id.validator)] PollResultBase._in_progress_validator = bv.Void() PollResultBase._tagmap = { 'in_progress': PollResultBase._in_progress_validator, }
def is_business(self): """ Check if the union tag is ``business``. :rtype: bool """ return self._tag == 'business' def _process_custom_annotations(self, annotation_type, field_path, processor): super(AccountType, self)._process_custom_annotations(annotation_type, field_path, processor) AccountType_validator = bv.Union(AccountType) AccountId_validator = bv.String(min_length=40, max_length=40) AccountType._basic_validator = bv.Void() AccountType._pro_validator = bv.Void() AccountType._business_validator = bv.Void() AccountType._tagmap = { 'basic': AccountType._basic_validator, 'pro': AccountType._pro_validator, 'business': AccountType._business_validator, } AccountType.basic = AccountType('basic') AccountType.pro = AccountType('pro') AccountType.business = AccountType('business') ROUTES = { }
""" There is an error updating the file request. This class acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the associated value of a tag (if one exists), use the corresponding ``get_*`` method. """ def _process_custom_annotations(self, annotation_type, field_path, processor): super(UpdateFileRequestError, self)._process_custom_annotations(annotation_type, field_path, processor) UpdateFileRequestError_validator = bv.Union(UpdateFileRequestError) FileRequestId_validator = bv.String(min_length=1, pattern=u'[-_0-9a-zA-Z]+') FileRequestValidationError_validator = bv.Nullable(bv.String()) GeneralFileRequestsError._disabled_for_team_validator = bv.Void() GeneralFileRequestsError._other_validator = bv.Void() GeneralFileRequestsError._tagmap = { 'disabled_for_team': GeneralFileRequestsError._disabled_for_team_validator, 'other': GeneralFileRequestsError._other_validator, } GeneralFileRequestsError.disabled_for_team = GeneralFileRequestsError('disabled_for_team') GeneralFileRequestsError.other = GeneralFileRequestsError('other') CountFileRequestsError._tagmap = { } CountFileRequestsError._tagmap.update(GeneralFileRequestsError._tagmap) CountFileRequestsResult.file_request_count.validator = bv.UInt64() CountFileRequestsResult._all_field_names_ = set(['file_request_count'])
def _process_custom_annotations(self, annotation_type, field_path, processor): super(TimeRange, self)._process_custom_annotations(annotation_type, field_path, processor) TimeRange_validator = bv.Struct(TimeRange) GroupExternalId_validator = bv.String() GroupId_validator = bv.String() MemberExternalId_validator = bv.String(max_length=64) ResellerId_validator = bv.String() TeamId_validator = bv.String() TeamMemberId_validator = bv.String() GroupManagementType._user_managed_validator = bv.Void() GroupManagementType._company_managed_validator = bv.Void() GroupManagementType._system_managed_validator = bv.Void() GroupManagementType._other_validator = bv.Void() GroupManagementType._tagmap = { 'user_managed': GroupManagementType._user_managed_validator, 'company_managed': GroupManagementType._company_managed_validator, 'system_managed': GroupManagementType._system_managed_validator, 'other': GroupManagementType._other_validator, } GroupManagementType.user_managed = GroupManagementType('user_managed') GroupManagementType.company_managed = GroupManagementType('company_managed') GroupManagementType.system_managed = GroupManagementType('system_managed') GroupManagementType.other = GroupManagementType('other')