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

package ztoc

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

type FileMetadata struct {
	_tab flatbuffers.Table
}

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

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

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

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

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

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

func (rcv *FileMetadata) UncompressedOffset() int64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
	if o != 0 {
		return rcv._tab.GetInt64(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *FileMetadata) MutateUncompressedOffset(n int64) bool {
	return rcv._tab.MutateInt64Slot(8, n)
}

func (rcv *FileMetadata) UncompressedSize() int64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
	if o != 0 {
		return rcv._tab.GetInt64(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *FileMetadata) MutateUncompressedSize(n int64) bool {
	return rcv._tab.MutateInt64Slot(10, n)
}

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

func (rcv *FileMetadata) Mode() int64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(14))
	if o != 0 {
		return rcv._tab.GetInt64(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *FileMetadata) MutateMode(n int64) bool {
	return rcv._tab.MutateInt64Slot(14, n)
}

func (rcv *FileMetadata) Uid() uint32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(16))
	if o != 0 {
		return rcv._tab.GetUint32(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *FileMetadata) MutateUid(n uint32) bool {
	return rcv._tab.MutateUint32Slot(16, n)
}

func (rcv *FileMetadata) Gid() uint32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(18))
	if o != 0 {
		return rcv._tab.GetUint32(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *FileMetadata) MutateGid(n uint32) bool {
	return rcv._tab.MutateUint32Slot(18, n)
}

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

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

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

func (rcv *FileMetadata) Devmajor() int64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(26))
	if o != 0 {
		return rcv._tab.GetInt64(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *FileMetadata) MutateDevmajor(n int64) bool {
	return rcv._tab.MutateInt64Slot(26, n)
}

func (rcv *FileMetadata) Devminor() int64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(28))
	if o != 0 {
		return rcv._tab.GetInt64(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *FileMetadata) MutateDevminor(n int64) bool {
	return rcv._tab.MutateInt64Slot(28, n)
}

func (rcv *FileMetadata) Xattrs(obj *Xattr, j int) bool {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(30))
	if o != 0 {
		x := rcv._tab.Vector(o)
		x += flatbuffers.UOffsetT(j) * 4
		x = rcv._tab.Indirect(x)
		obj.Init(rcv._tab.Bytes, x)
		return true
	}
	return false
}

func (rcv *FileMetadata) XattrsLength() int {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(30))
	if o != 0 {
		return rcv._tab.VectorLen(o)
	}
	return 0
}

func FileMetadataStart(builder *flatbuffers.Builder) {
	builder.StartObject(14)
}
func FileMetadataAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(name), 0)
}
func FileMetadataAddType(builder *flatbuffers.Builder, type_ flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(type_), 0)
}
func FileMetadataAddUncompressedOffset(builder *flatbuffers.Builder, uncompressedOffset int64) {
	builder.PrependInt64Slot(2, uncompressedOffset, 0)
}
func FileMetadataAddUncompressedSize(builder *flatbuffers.Builder, uncompressedSize int64) {
	builder.PrependInt64Slot(3, uncompressedSize, 0)
}
func FileMetadataAddLinkname(builder *flatbuffers.Builder, linkname flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(4, flatbuffers.UOffsetT(linkname), 0)
}
func FileMetadataAddMode(builder *flatbuffers.Builder, mode int64) {
	builder.PrependInt64Slot(5, mode, 0)
}
func FileMetadataAddUid(builder *flatbuffers.Builder, uid uint32) {
	builder.PrependUint32Slot(6, uid, 0)
}
func FileMetadataAddGid(builder *flatbuffers.Builder, gid uint32) {
	builder.PrependUint32Slot(7, gid, 0)
}
func FileMetadataAddUname(builder *flatbuffers.Builder, uname flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(8, flatbuffers.UOffsetT(uname), 0)
}
func FileMetadataAddGname(builder *flatbuffers.Builder, gname flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(9, flatbuffers.UOffsetT(gname), 0)
}
func FileMetadataAddModTime(builder *flatbuffers.Builder, modTime flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(10, flatbuffers.UOffsetT(modTime), 0)
}
func FileMetadataAddDevmajor(builder *flatbuffers.Builder, devmajor int64) {
	builder.PrependInt64Slot(11, devmajor, 0)
}
func FileMetadataAddDevminor(builder *flatbuffers.Builder, devminor int64) {
	builder.PrependInt64Slot(12, devminor, 0)
}
func FileMetadataAddXattrs(builder *flatbuffers.Builder, xattrs flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(13, flatbuffers.UOffsetT(xattrs), 0)
}
func FileMetadataStartXattrsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT {
	return builder.StartVector(4, numElems, 4)
}
func FileMetadataEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
