// Code generated by the FlatBuffers compiler. DO NOT EDIT.

package lextwt

import (
	flatbuffers "github.com/google/flatbuffers/go"
)

type DateTime struct {
	_tab flatbuffers.Table
}

func GetRootAsDateTime(buf []byte, offset flatbuffers.UOffsetT) *DateTime {
	n := flatbuffers.GetUOffsetT(buf[offset:])
	x := &DateTime{}
	x.Init(buf, n+offset)
	return x
}

func FinishDateTimeBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
	builder.Finish(offset)
}

func GetSizePrefixedRootAsDateTime(buf []byte, offset flatbuffers.UOffsetT) *DateTime {
	n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
	x := &DateTime{}
	x.Init(buf, n+offset+flatbuffers.SizeUint32)
	return x
}

func FinishSizePrefixedDateTimeBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
	builder.FinishSizePrefixed(offset)
}

func (rcv *DateTime) Init(buf []byte, i flatbuffers.UOffsetT) {
	rcv._tab.Bytes = buf
	rcv._tab.Pos = i
}

func (rcv *DateTime) Table() flatbuffers.Table {
	return rcv._tab
}

func (rcv *DateTime) Timestamp() int64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
	if o != 0 {
		return rcv._tab.GetInt64(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *DateTime) MutateTimestamp(n int64) bool {
	return rcv._tab.MutateInt64Slot(4, n)
}

func (rcv *DateTime) Offset() int16 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
	if o != 0 {
		return rcv._tab.GetInt16(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *DateTime) MutateOffset(n int16) bool {
	return rcv._tab.MutateInt16Slot(6, n)
}

func DateTimeStart(builder *flatbuffers.Builder) {
	builder.StartObject(2)
}
func DateTimeAddTimestamp(builder *flatbuffers.Builder, timestamp int64) {
	builder.PrependInt64Slot(0, timestamp, 0)
}
func DateTimeAddOffset(builder *flatbuffers.Builder, offset int16) {
	builder.PrependInt16Slot(1, offset, 0)
}
func DateTimeEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
