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

package repo_fbs

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

type DatasetRef struct {
	_tab flatbuffers.Table
}

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

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

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

func (rcv *DatasetRef) Peername() []byte {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
	if o != 0 {
		return rcv._tab.ByteVector(o + rcv._tab.Pos)
	}
	return nil
}

func (rcv *DatasetRef) ProfileID() []byte {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
	if o != 0 {
		return rcv._tab.ByteVector(o + rcv._tab.Pos)
	}
	return nil
}

func (rcv *DatasetRef) Name() []byte {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
	if o != 0 {
		return rcv._tab.ByteVector(o + rcv._tab.Pos)
	}
	return nil
}

func (rcv *DatasetRef) Path() []byte {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
	if o != 0 {
		return rcv._tab.ByteVector(o + rcv._tab.Pos)
	}
	return nil
}

func (rcv *DatasetRef) FsiPath() []byte {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
	if o != 0 {
		return rcv._tab.ByteVector(o + rcv._tab.Pos)
	}
	return nil
}

func (rcv *DatasetRef) Published() bool {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(14))
	if o != 0 {
		return rcv._tab.GetBool(o + rcv._tab.Pos)
	}
	return false
}

func (rcv *DatasetRef) MutatePublished(n bool) bool {
	return rcv._tab.MutateBoolSlot(14, n)
}

func DatasetRefStart(builder *flatbuffers.Builder) {
	builder.StartObject(6)
}
func DatasetRefAddPeername(builder *flatbuffers.Builder, peername flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(peername), 0)
}
func DatasetRefAddProfileID(builder *flatbuffers.Builder, profileID flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(profileID), 0)
}
func DatasetRefAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(name), 0)
}
func DatasetRefAddPath(builder *flatbuffers.Builder, path flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(path), 0)
}
func DatasetRefAddFsiPath(builder *flatbuffers.Builder, fsiPath flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(4, flatbuffers.UOffsetT(fsiPath), 0)
}
func DatasetRefAddPublished(builder *flatbuffers.Builder, published bool) {
	builder.PrependBoolSlot(5, published, false)
}
func DatasetRefEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
