Esempio n. 1
0
]))
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),
]

GetAccountArg._account_id_validator = bv.String(min_length=40, max_length=40)
GetAccountArg._all_field_names_ = set(['account_id'])
GetAccountArg._all_fields_ = [('account_id', GetAccountArg._account_id_validator)]

GetAccountBatchArg._account_ids_validator = bv.List(bv.String(min_length=40, max_length=40), min_items=1)
GetAccountBatchArg._all_field_names_ = set(['account_ids'])
GetAccountBatchArg._all_fields_ = [('account_ids', GetAccountBatchArg._account_ids_validator)]

GetAccountBatchError._no_account_validator = bv.String(min_length=40, max_length=40)
GetAccountBatchError._other_validator = bv.Void()
GetAccountBatchError._tagmap = {
    'no_account': GetAccountBatchError._no_account_validator,
    'other': GetAccountBatchError._other_validator,
}

GetAccountBatchError.other = GetAccountBatchError('other')

GetAccountError._no_account_validator = bv.Void()
GetAccountError._unknown_validator = bv.Void()
GetAccountError._tagmap = {
Esempio n. 2
0
        self._allocated_present = True

    @allocated.deleter
    def allocated(self):
        self._allocated_value = None
        self._allocated_present = False

    def __repr__(self):
        return 'TeamSpaceAllocation(used={!r}, allocated={!r})'.format(
            self._used_value,
            self._allocated_value,
        )


AccountId_validator = bv.String(min_length=40, max_length=40)
GetAccountBatchResult_validator = bv.List(bv.Struct(BasicAccount))
Account._account_id_validator = AccountId_validator
Account._name_validator = bv.Struct(Name)
Account._email_validator = bv.String()
Account._email_verified_validator = bv.Boolean()
Account._profile_photo_url_validator = bv.Nullable(bv.String())
Account._all_field_names_ = set([
    'account_id',
    'name',
    'email',
    'email_verified',
    'profile_photo_url',
])
Account._all_fields_ = [
    ('account_id', Account._account_id_validator),
    ('name', Account._name_validator),