def validate(self, value): if value is not None and not isinstance(value, Flow): raise db.BadValueError('Property %s must be convertible ' 'to a FlowThreeLegged instance (%s)' % (self.name, value)) return super(FlowProperty, self).validate(value)
def validate(self, value): if value is not None and not isinstance(value, (dict, list, tuple)): raise db.BadValueError('Property %s must be a dict, list or ' 'tuple.' % self.name) return value
def __init__(self, *args, **kwargs): if 'key' not in kwargs and 'key_name' not in kwargs: raise db.BadValueError('key_name must be email address') super(SubscriptionStateEntity, self).__init__(*args, **kwargs)
def validate(self, value): if not isinstance(value, dict): raise db.BadValueError( 'Property %s needs to be convertible to a dict instance (%s) of class dict' % (self.name, value)) return super(DictProperty, self).validate(value)
def validate(self, value): if value is not None and not isinstance(value, client.Flow): raise db.BadValueError( 'Property {0} must be convertible ' 'to a FlowThreeLegged instance ({1})'.format(self.name, value)) return super(FlowProperty, self).validate(value)