class ToStringModel(apilib.Model): fstring = apilib.Field(apilib.String()) fint = apilib.Field(apilib.Integer()) ffloat = apilib.Field(apilib.Float()) fbool = apilib.Field(apilib.Boolean()) fdate = apilib.Field(apilib.Date()) fdatetime = apilib.Field(apilib.DateTime()) fdecimal = apilib.Field(apilib.Decimal()) fenum = apilib.Field(apilib.Enum(['JERRY', 'GEORGE'])) fbytes = apilib.Field(apilib.Bytes()) fchild = apilib.Field(apilib.ModelType(BasicScalarModel)) lchild = apilib.Field(apilib.ListType(BasicScalarModel)) dchild = apilib.Field(apilib.DictType(BasicScalarModel))
class ScalarDictModel(apilib.Model): dstring = apilib.Field(apilib.DictType(apilib.String())) dint = apilib.Field(apilib.DictType(apilib.Integer())) dfloat = apilib.Field(apilib.DictType(apilib.Float())) dbool = apilib.Field(apilib.DictType(apilib.Boolean()))
class DeeplyNested(apilib.Model): fdeep = apilib.Field( apilib.DictType(apilib.ListType(apilib.ModelType(BasicScalarModel))))
class ArbitraryPrimitivesModel(apilib.Model): fany = apilib.Field(apilib.AnyPrimitive()) lany = apilib.Field(apilib.ListType(apilib.AnyPrimitive())) dany = apilib.Field(apilib.DictType(apilib.AnyPrimitive()))
class Model(apilib.Model): fchild = apilib.Field(apilib.ModelType(SimpleChild), readonly=True) lchild = apilib.Field(apilib.ListType(SimpleChild), readonly=True) dchild = apilib.Field(apilib.DictType(SimpleChild), readonly=True)
class Model(apilib.Model): lstring = apilib.Field(apilib.ListType(apilib.String()), readonly=True) dstring = apilib.Field(apilib.DictType(apilib.String()), readonly=True)
class ErrorFieldTestParent(apilib.Model): fchild = apilib.Field(apilib.ModelType(ErrorFieldTestChild)) lchild = apilib.Field(apilib.ListType(ErrorFieldTestChild)) dchild = apilib.Field(apilib.DictType(ErrorFieldTestChild))
class DictWithCustomErrorCodeModel(apilib.Model): dchild = apilib.Field(apilib.DictType( apilib.ModelType(SimpleValidationModel)), required=True)
class DeeplyNestedModel(apilib.Model): field = apilib.Field( apilib.DictType( apilib.ListType(apilib.ListType(SimpleRequiredParent))))