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

package dscachefb

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

type UserAssoc struct {
	_tab flatbuffers.Table
}

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

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

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

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

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

func UserAssocStart(builder *flatbuffers.Builder) {
	builder.StartObject(2)
}
func UserAssocAddUsername(builder *flatbuffers.Builder, username flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(username), 0)
}
func UserAssocAddProfileID(builder *flatbuffers.Builder, profileID flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(profileID), 0)
}
func UserAssocEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
