func (box *ReadingBox) PutMany(objects []*Reading) ([]uint64, error) {
	return box.Box.PutMany(objects)
}
PutMany inserts multiple objects in single transaction.
In case Ids are not set on the objects, they would be assigned automatically (auto-increment).

Returns: IDs of the put objects (in the same order).
When inserting, the Reading.Id property on the objects in the slice will be assigned the new IDs as well.

Note: In case an error occurs during the transaction, some of the objects may already have the Reading.Id assigned
even though the transaction has been rolled back and the objects are not stored under those IDs.

Note: The slice may be empty or even nil; in both cases, an empty IDs slice and no error is returned.
package iot
import (
	"errors"
	"github.com/google/flatbuffers/go"
	"github.com/objectbox/objectbox-go/objectbox"
	"github.com/objectbox/objectbox-go/objectbox/fbutils"
)
type event_EntityInfo struct {
	objectbox.Entity
	Uid uint64
}
var EventBinding = event_EntityInfo{
	Entity: objectbox.Entity{
		Id: 1,
	},
	Uid: 1468539308767086854,
}
var Event_ = struct {
	Id      *objectbox.PropertyUint64
	Device  *objectbox.PropertyString
	Date    *objectbox.PropertyInt64
	Uid     *objectbox.PropertyString
	Picture *objectbox.PropertyByteVector
}{
	Id: &objectbox.PropertyUint64{
		BaseProperty: &objectbox.BaseProperty{
			Id:     1,
			Entity: &EventBinding.Entity,
		},
	},
	Device: &objectbox.PropertyString{
		BaseProperty: &objectbox.BaseProperty{
			Id:     2,
			Entity: &EventBinding.Entity,
		},
	},
	Date: &objectbox.PropertyInt64{
		BaseProperty: &objectbox.BaseProperty{
			Id:     3,
			Entity: &EventBinding.Entity,
		},
	},
	Uid: &objectbox.PropertyString{
		BaseProperty: &objectbox.BaseProperty{
			Id:     4,
			Entity: &EventBinding.Entity,
		},
	},
	Picture: &objectbox.PropertyByteVector{
		BaseProperty: &objectbox.BaseProperty{
			Id:     5,
			Entity: &EventBinding.Entity,
		},
	},
}
func (event_EntityInfo) GeneratorVersion() int {
	return 6
}
func (event_EntityInfo) AddToModel(model *objectbox.Model) {
	model.Entity("Event", 1, 1468539308767086854)
	model.Property("Id", 6, 1, 3098166604415018001)
	model.PropertyFlags(1)
	model.Property("Device", 9, 2, 1213411729427304641)
	model.Property("Date", 10, 3, 5907655274386702697)
	model.Property("Uid", 9, 4, 472416569173577818)
	model.PropertyFlags(2080)
	model.PropertyIndex(1, 3297791712577314158)
	model.Property("Picture", 23, 5, 6024563395733984005)
	model.EntityLastPropertyId(5, 6024563395733984005)
}
func (event_EntityInfo) GetId(object interface{}) (uint64, error) {
	return object.(*Event).Id, nil
}
func (event_EntityInfo) SetId(object interface{}, id uint64) error {
	object.(*Event).Id = id
	return nil
}
func (event_EntityInfo) PutRelated(ob *objectbox.ObjectBox, object interface{}, id uint64) error {
	return nil
}
func (event_EntityInfo) Flatten(object interface{}, fbb *flatbuffers.Builder, id uint64) error {
	obj := object.(*Event)
	var offsetDevice = fbutils.CreateStringOffset(fbb, obj.Device)
	var offsetUid = fbutils.CreateStringOffset(fbb, obj.Uid)
	var offsetPicture = fbutils.CreateByteVectorOffset(fbb, obj.Picture)
	fbb.StartObject(5)
	fbutils.SetUint64Slot(fbb, 0, id)
	fbutils.SetUOffsetTSlot(fbb, 3, offsetUid)
	fbutils.SetUOffsetTSlot(fbb, 1, offsetDevice)
	fbutils.SetInt64Slot(fbb, 2, obj.Date)
	fbutils.SetUOffsetTSlot(fbb, 4, offsetPicture)
	return nil
}
func (event_EntityInfo) Load(ob *objectbox.ObjectBox, bytes []byte) (interface{}, error) {
	if len(bytes) == 0 {  
		return nil, errors.New("can't deserialize an object of type 'Event' - no data received")
	}
	var table = &flatbuffers.Table{
		Bytes: bytes,
		Pos:   flatbuffers.GetUOffsetT(bytes),
	}
	var propId = table.GetUint64Slot(4, 0)
	return &Event{
		Id:      propId,
		Uid:     fbutils.GetStringSlot(table, 10),
		Device:  fbutils.GetStringSlot(table, 6),
		Date:    fbutils.GetInt64Slot(table, 8),
		Picture: fbutils.GetByteVectorSlot(table, 12),
	}, nil
}
func (event_EntityInfo) MakeSlice(capacity int) interface{} {
	return make([]*Event, 0, capacity)
}
func (event_EntityInfo) AppendToSlice(slice interface{}, object interface{}) interface{} {
	if object == nil {
		return append(slice.([]*Event), nil)
	}
	return append(slice.([]*Event), object.(*Event))
}
type EventBox struct {
	*objectbox.Box
}
func BoxForEvent(ob *objectbox.ObjectBox) *EventBox {
	return &EventBox{
		Box: ob.InternalBox(1),
	}
}
func (box *EventBox) Put(object *Event) (uint64, error) {
	return box.Box.Put(object)
}
func (box *EventBox) Insert(object *Event) (uint64, error) {
	return box.Box.Insert(object)
}
func (box *EventBox) Update(object *Event) error {
	return box.Box.Update(object)
}
func (box *EventBox) PutAsync(object *Event) (uint64, error) {
	return box.Box.PutAsync(object)
}
func (box *EventBox) PutMany(objects []*Event) ([]uint64, error) {
	return box.Box.PutMany(objects)
}
func (box *EventBox) Get(id uint64) (*Event, error) {
	object, err := box.Box.Get(id)
	if err != nil {
		return nil, err
	} else if object == nil {
		return nil, nil
	}
	return object.(*Event), nil
}
func (box *EventBox) GetMany(ids ...uint64) ([]*Event, error) {
	objects, err := box.Box.GetMany(ids...)
	if err != nil {
		return nil, err
	}
	return objects.([]*Event), nil
}
func (box *EventBox) GetManyExisting(ids ...uint64) ([]*Event, error) {
	objects, err := box.Box.GetManyExisting(ids...)
	if err != nil {
		return nil, err
	}
	return objects.([]*Event), nil
}
func (box *EventBox) GetAll() ([]*Event, error) {
	objects, err := box.Box.GetAll()
	if err != nil {
		return nil, err
	}
	return objects.([]*Event), nil
}
func (box *EventBox) Remove(object *Event) error {
	return box.Box.Remove(object)
}
func (box *EventBox) RemoveMany(objects ...*Event) (uint64, error) {
	var ids = make([]uint64, len(objects))
	for k, object := range objects {
		ids[k] = object.Id
	}
	return box.Box.RemoveIds(ids...)
}
func (box *EventBox) Query(conditions ...objectbox.Condition) *EventQuery {
	return &EventQuery{
		box.Box.Query(conditions...),
	}
}
func (box *EventBox) QueryOrError(conditions ...objectbox.Condition) (*EventQuery, error) {
	if query, err := box.Box.QueryOrError(conditions...); err != nil {
		return nil, err
	} else {
		return &EventQuery{query}, nil
	}
}
func (box *EventBox) Async() *EventAsyncBox {
	return &EventAsyncBox{AsyncBox: box.Box.Async()}
}
type EventAsyncBox struct {
	*objectbox.AsyncBox
}
func AsyncBoxForEvent(ob *objectbox.ObjectBox, timeoutMs uint64) *EventAsyncBox {
	var async, err = objectbox.NewAsyncBox(ob, 1, timeoutMs)
	if err != nil {
		panic("Could not create async box for entity ID 1: %s" + err.Error())
	}
	return &EventAsyncBox{AsyncBox: async}
}
func (asyncBox *EventAsyncBox) Put(object *Event) (uint64, error) {
	return asyncBox.AsyncBox.Put(object)
}
func (asyncBox *EventAsyncBox) Insert(object *Event) (id uint64, err error) {
	return asyncBox.AsyncBox.Insert(object)
}
func (asyncBox *EventAsyncBox) Update(object *Event) error {
	return asyncBox.AsyncBox.Update(object)
}
func (asyncBox *EventAsyncBox) Remove(object *Event) error {
	return asyncBox.AsyncBox.Remove(object)
}
type EventQuery struct {
	*objectbox.Query
}
func (query *EventQuery) Find() ([]*Event, error) {
	objects, err := query.Query.Find()
	if err != nil {
		return nil, err
	}
	return objects.([]*Event), nil
}
func (query *EventQuery) Offset(offset uint64) *EventQuery {
	query.Query.Offset(offset)
	return query
}
func (query *EventQuery) Limit(limit uint64) *EventQuery {
	query.Query.Limit(limit)
	return query
}
type reading_EntityInfo struct {
	objectbox.Entity
	Uid uint64
}
var ReadingBinding = reading_EntityInfo{
	Entity: objectbox.Entity{
		Id: 2,
	},
	Uid: 5284076134434938613,
}
var Reading_ = struct {
	Id              *objectbox.PropertyUint64
	Date            *objectbox.PropertyInt64
	EventId         *objectbox.RelationToOne
	ValueName       *objectbox.PropertyString
	ValueString     *objectbox.PropertyString
	ValueInteger    *objectbox.PropertyInt64
	ValueFloating   *objectbox.PropertyFloat64
	ValueInt32      *objectbox.PropertyInt32
	ValueFloating32 *objectbox.PropertyFloat32
}{
	Id: &objectbox.PropertyUint64{
		BaseProperty: &objectbox.BaseProperty{
			Id:     1,
			Entity: &ReadingBinding.Entity,
		},
	},
	Date: &objectbox.PropertyInt64{
		BaseProperty: &objectbox.BaseProperty{
			Id:     2,
			Entity: &ReadingBinding.Entity,
		},
	},
	EventId: &objectbox.RelationToOne{
		Property: &objectbox.BaseProperty{
			Id:     3,
			Entity: &ReadingBinding.Entity,
		},
		Target: &EventBinding.Entity,
	},
	ValueName: &objectbox.PropertyString{
		BaseProperty: &objectbox.BaseProperty{
			Id:     4,
			Entity: &ReadingBinding.Entity,
		},
	},
	ValueString: &objectbox.PropertyString{
		BaseProperty: &objectbox.BaseProperty{
			Id:     5,
			Entity: &ReadingBinding.Entity,
		},
	},
	ValueInteger: &objectbox.PropertyInt64{
		BaseProperty: &objectbox.BaseProperty{
			Id:     6,
			Entity: &ReadingBinding.Entity,
		},
	},
	ValueFloating: &objectbox.PropertyFloat64{
		BaseProperty: &objectbox.BaseProperty{
			Id:     7,
			Entity: &ReadingBinding.Entity,
		},
	},
	ValueInt32: &objectbox.PropertyInt32{
		BaseProperty: &objectbox.BaseProperty{
			Id:     8,
			Entity: &ReadingBinding.Entity,
		},
	},
	ValueFloating32: &objectbox.PropertyFloat32{
		BaseProperty: &objectbox.BaseProperty{
			Id:     9,
			Entity: &ReadingBinding.Entity,
		},
	},
}
func (reading_EntityInfo) GeneratorVersion() int {
	return 6
}
func (reading_EntityInfo) AddToModel(model *objectbox.Model) {
	model.Entity("Reading", 2, 5284076134434938613)
	model.Property("Id", 6, 1, 3968063745680890327)
	model.PropertyFlags(1)
	model.Property("Date", 10, 2, 4852407661923085028)
	model.Property("EventId", 11, 3, 1403806151574554320)
	model.PropertyFlags(520)
	model.PropertyRelation("Event", 2, 2642563953244304959)
	model.Property("ValueName", 9, 4, 5626221656121286670)
	model.Property("ValueString", 9, 5, 7303099924122013060)
	model.Property("ValueInteger", 6, 6, 1404333021836291657)
	model.Property("ValueFloating", 8, 7, 7102253623343671118)
	model.Property("ValueInt32", 5, 8, 7566830186276557216)
	model.Property("ValueFloating32", 7, 9, 6040892611651481730)
	model.EntityLastPropertyId(9, 6040892611651481730)
}
func (reading_EntityInfo) GetId(object interface{}) (uint64, error) {
	return object.(*Reading).Id, nil
}
func (reading_EntityInfo) SetId(object interface{}, id uint64) error {
	object.(*Reading).Id = id
	return nil
}
func (reading_EntityInfo) PutRelated(ob *objectbox.ObjectBox, object interface{}, id uint64) error {
	return nil
}
func (reading_EntityInfo) Flatten(object interface{}, fbb *flatbuffers.Builder, id uint64) error {
	obj := object.(*Reading)
	var offsetValueName = fbutils.CreateStringOffset(fbb, obj.ValueName)
	var offsetValueString = fbutils.CreateStringOffset(fbb, obj.ValueString)
	var rIdEventId = obj.EventId
	fbb.StartObject(9)
	fbutils.SetUint64Slot(fbb, 0, id)
	fbutils.SetInt64Slot(fbb, 1, obj.Date)
	fbutils.SetUint64Slot(fbb, 2, rIdEventId)
	fbutils.SetUOffsetTSlot(fbb, 3, offsetValueName)
	fbutils.SetUOffsetTSlot(fbb, 4, offsetValueString)
	fbutils.SetInt64Slot(fbb, 5, obj.ValueInteger)
	fbutils.SetFloat64Slot(fbb, 6, obj.ValueFloating)
	fbutils.SetInt32Slot(fbb, 7, obj.ValueInt32)
	fbutils.SetFloat32Slot(fbb, 8, obj.ValueFloating32)
	return nil
}
func (reading_EntityInfo) Load(ob *objectbox.ObjectBox, bytes []byte) (interface{}, error) {
	if len(bytes) == 0 {  
		return nil, errors.New("can't deserialize an object of type 'Reading' - no data received")
	}
	var table = &flatbuffers.Table{
		Bytes: bytes,
		Pos:   flatbuffers.GetUOffsetT(bytes),
	}
	var propId = table.GetUint64Slot(4, 0)
	return &Reading{
		Id:              propId,
		Date:            fbutils.GetInt64Slot(table, 6),
		EventId:         fbutils.GetUint64Slot(table, 8),
		ValueName:       fbutils.GetStringSlot(table, 10),
		ValueString:     fbutils.GetStringSlot(table, 12),
		ValueInteger:    fbutils.GetInt64Slot(table, 14),
		ValueFloating:   fbutils.GetFloat64Slot(table, 16),
		ValueInt32:      fbutils.GetInt32Slot(table, 18),
		ValueFloating32: fbutils.GetFloat32Slot(table, 20),
	}, nil
}
func (reading_EntityInfo) MakeSlice(capacity int) interface{} {
	return make([]*Reading, 0, capacity)
}
func (reading_EntityInfo) AppendToSlice(slice interface{}, object interface{}) interface{} {
	if object == nil {
		return append(slice.([]*Reading), nil)
	}
	return append(slice.([]*Reading), object.(*Reading))
}
type ReadingBox struct {
	*objectbox.Box
}
func BoxForReading(ob *objectbox.ObjectBox) *ReadingBox {
	return &ReadingBox{
		Box: ob.InternalBox(2),
	}
}
func (box *ReadingBox) Put(object *Reading) (uint64, error) {
	return box.Box.Put(object)
}
func (box *ReadingBox) Insert(object *Reading) (uint64, error) {
	return box.Box.Insert(object)
}
func (box *ReadingBox) Update(object *Reading) error {
	return box.Box.Update(object)
}
func (box *ReadingBox) PutAsync(object *Reading) (uint64, error) {
	return box.Box.PutAsync(object)
}