class Dummy(mapping.Mapping): foo = mapping.Field(default='bar') bar = mapping.ComponentField(mapping=mapping.Component.build( mapping.IntegerField(name='a'), mapping.IntegerField(name='b'), mapping.IntegerField(name='c'), ), default=[1, 2, 3])
class Thing(mapping.Mapping): numbers = mapping.RepeatedComponentField( mapping.Component.build(mapping.IntegerField(name='a'), mapping.IntegerField(name='b')))
class Dummy(mapping.Mapping): field = mapping.IntegerField()
class Dummy(mapping.Mapping): field = mapping.RepeatedComponentField( mapping.Component.build( mapping.TextField(name='key'), mapping.IntegerField(name='value'), ))
class Dummy(mapping.Mapping): field = mapping.ComponentField(mapping=mapping.Component.build( mapping.Field(name='foo'), mapping.IntegerField(name='bar'), mapping.ConstantField(name='baz', default='42')))
class Dummy(mapping.Mapping): field = mapping.SetField(values=[1, 2, 3], field=mapping.IntegerField())