Пример #1
0
        """
        if not self.is_contacts_not_found():
            raise AttributeError("tag 'contacts_not_found' not set")
        return self._value

    def _process_custom_annotations(self, annotation_type, processor):
        super(DeleteManualContactsError,
              self)._process_custom_annotations(annotation_type, 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._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')
Пример #2
0
    def __repr__(self):
        return 'PropertyType(%r, %r)' % (self._tag, self._value)


PropertyType_validator = bv.Union(PropertyType)

TemplateId_validator = bv.String(min_length=1, pattern=u'(/|ptid:).*')
GetPropertyTemplateArg._template_id_validator = TemplateId_validator
GetPropertyTemplateArg._all_field_names_ = set(['template_id'])
GetPropertyTemplateArg._all_fields_ = [
    ('template_id', GetPropertyTemplateArg._template_id_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),
]

GetPropertyTemplateResult._all_field_names_ = PropertyGroupTemplate._all_field_names_.union(
    set([]))
GetPropertyTemplateResult._all_fields_ = PropertyGroupTemplate._all_fields_ + []
Пример #3
0
    'thirty_days': GracePeriod._thirty_days_validator,
    'always': GracePeriod._always_validator,
    'other': GracePeriod._other_validator,
}

GracePeriod.one_day = GracePeriod('one_day')
GracePeriod.two_days = GracePeriod('two_days')
GracePeriod.seven_days = GracePeriod('seven_days')
GracePeriod.thirty_days = GracePeriod('thirty_days')
GracePeriod.always = GracePeriod('always')
GracePeriod.other = GracePeriod('other')

ListFileRequestsError._tagmap = {}
ListFileRequestsError._tagmap.update(GeneralFileRequestsError._tagmap)

ListFileRequestsResult._file_requests_validator = bv.List(
    FileRequest_validator)
ListFileRequestsResult._all_field_names_ = set(['file_requests'])
ListFileRequestsResult._all_fields_ = [
    ('file_requests', ListFileRequestsResult._file_requests_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._all_field_names_ = set([
    'id',
    'title',
    'destination',
Пример #4
0
    @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,
        )


TeamSpaceAllocation_validator = bv.Struct(TeamSpaceAllocation)

AccountId_validator = bv.String(min_length=40, max_length=40)
GetAccountBatchResult_validator = bv.List(BasicAccount_validator)
Account._account_id_validator = 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_ = [
Пример #5
0
    'floor',
    'apartment',
    'zone',
    'district',
])
BaseAddress._all_fields_ = [
    ('firstLine', BaseAddress._stone_firstLine_validator),
    ('secondLine', BaseAddress._stone_secondLine_validator),
    ('floor', BaseAddress._stone_floor_validator),
    ('apartment', BaseAddress._stone_apartment_validator),
    ('zone', BaseAddress._stone_zone_validator),
    ('district', BaseAddress._stone_district_validator),
]

Address._stone_geoLocation_validator = bv.Nullable(
    bv.List(bv.Float32(), max_items=2))
Address._stone_city_validator = bv.String(pattern='^EG-0(1|2)$')
Address._all_field_names_ = BaseAddress._all_field_names_.union(
    set([
        'geoLocation',
        'city',
    ]))
Address._all_fields_ = BaseAddress._all_fields_ + [
    ('geoLocation', Address._stone_geoLocation_validator),
    ('city', Address._stone_city_validator),
]

City._stone__id_validator = bv.String()
City._stone_name_validator = bv.String()
City._all_field_names_ = set([
    '_id',
Пример #6
0
GetSubAccountResult._stone_subAccount_validator = SubAccount_validator
GetSubAccountResult._all_field_names_ = set(['subAccount'])
GetSubAccountResult._all_fields_ = [('subAccount', GetSubAccountResult._stone_subAccount_validator)]

ListSubAccountArg._stone_page_validator = bv.Nullable(bv.Int32())
ListSubAccountArg._stone_perPage_validator = bv.Nullable(bv.Int32())
ListSubAccountArg._all_field_names_ = set([
    'page',
    'perPage',
])
ListSubAccountArg._all_fields_ = [
    ('page', ListSubAccountArg._stone_page_validator),
    ('perPage', ListSubAccountArg._stone_perPage_validator),
]

ListSubAccountResult._stone_subAccounts_validator = bv.List(SubAccount_validator)
ListSubAccountResult._all_field_names_ = set(['subAccounts'])
ListSubAccountResult._all_fields_ = [('subAccounts', ListSubAccountResult._stone_subAccounts_validator)]

SubAccount._stone__id_validator = bv.String()
SubAccount._stone_name_validator = bv.String()
SubAccount._stone_phone_validator = bv.String()
SubAccount._stone_address_validator = common.ResultAddress_validator
SubAccount._all_field_names_ = set([
    '_id',
    'name',
    'phone',
    'address',
])
SubAccount._all_fields_ = [
    ('_id', SubAccount._stone__id_validator),