if profile_photo_url is not None: 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()
if result is not None: self.result = result # 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) EchoResult_validator = bv.Struct(EchoResult) EchoArg.query.validator = bv.String() 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,
def __init__(self, root_namespace_id=None, home_namespace_id=None): super(UserRootInfo, self).__init__(root_namespace_id, home_namespace_id) def _process_custom_annotations(self, annotation_type, field_path, processor): super(UserRootInfo, self)._process_custom_annotations(annotation_type, field_path, processor) UserRootInfo_validator = bv.Struct(UserRootInfo) Date_validator = bv.Timestamp(u'%Y-%m-%d') DisplayName_validator = bv.String(pattern=u'[^/:?*<>"|]*') DisplayNameLegacy_validator = bv.String() DropboxTimestamp_validator = bv.Timestamp(u'%Y-%m-%dT%H:%M:%SZ') EmailAddress_validator = bv.String( max_length=255, pattern=u"^['&A-Za-z0-9._%+-]+@[A-Za-z0-9-][A-Za-z0-9.-]*\\.[A-Za-z]{2,15}$" ) # 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
RateLimitReason._too_many_requests_validator = bv.Void() RateLimitReason._too_many_write_operations_validator = bv.Void() RateLimitReason._other_validator = bv.Void() RateLimitReason._tagmap = { 'too_many_requests': RateLimitReason._too_many_requests_validator, 'too_many_write_operations': RateLimitReason._too_many_write_operations_validator, 'other': RateLimitReason._other_validator, } RateLimitReason.too_many_requests = RateLimitReason('too_many_requests') RateLimitReason.too_many_write_operations = RateLimitReason( 'too_many_write_operations') RateLimitReason.other = RateLimitReason('other') TokenFromOAuth1Arg.oauth1_token.validator = bv.String(min_length=1) TokenFromOAuth1Arg.oauth1_token_secret.validator = bv.String(min_length=1) TokenFromOAuth1Arg._all_field_names_ = set([ 'oauth1_token', 'oauth1_token_secret', ]) TokenFromOAuth1Arg._all_fields_ = [ ('oauth1_token', TokenFromOAuth1Arg.oauth1_token.validator), ('oauth1_token_secret', TokenFromOAuth1Arg.oauth1_token_secret.validator), ] TokenFromOAuth1Error._invalid_oauth1_token_info_validator = bv.Void() TokenFromOAuth1Error._app_id_mismatch_validator = bv.Void() TokenFromOAuth1Error._other_validator = bv.Void() TokenFromOAuth1Error._tagmap = { 'invalid_oauth1_token_info':
self._values_value = bb.NOT_SET if values is not None: self.values = values # 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) 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._all_field_names_ = set([ 'account_id', 'name', 'email', 'email_verified', 'profile_photo_url', 'disabled', ]) Account._all_fields_ = [ ('account_id', Account.account_id.validator), ('name', Account.name.validator), ('email', Account.email.validator),
return self._tag == 'internal_error' def is_other(self): """ Check if the union tag is ``other``. :rtype: bool """ return self._tag == 'other' def _process_custom_annotations(self, annotation_type, field_path, processor): super(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'])
return self._tag == 'pro' 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 = { }
class UpdateFileRequestError(FileRequestError): """ There is an error updating the file request. This class acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the associated value of a tag (if one exists), use the corresponding ``get_*`` method. """ def _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)
# Instance attribute type: datetime.datetime (validator is set below) start_time = bb.Attribute("start_time", nullable=True) # 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) 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, }