func (asyncBox *EventAsyncBox) Put(object *Event) (uint64, error) {
	return asyncBox.AsyncBox.Put(object)
}
Put inserts/updates a single object asynchronously.
When inserting a new object, the Id property on the passed object will be assigned the new ID the entity would hold
if the insert is ultimately successful. The newly assigned ID may not become valid if the insert fails.
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}
}