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

package scrabblefb

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

type BannerInfo struct {
	_tab flatbuffers.Table
}

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

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

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

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

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

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

func (rcv *BannerInfo) Campaigns(obj *BannerCampaign, j int) bool {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
	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 *BannerInfo) CampaignsLength() int {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
	if o != 0 {
		return rcv._tab.VectorLen(o)
	}
	return 0
}

func (rcv *BannerInfo) HoldMs() int32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
	if o != 0 {
		return rcv._tab.GetInt32(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *BannerInfo) MutateHoldMs(n int32) bool {
	return rcv._tab.MutateInt32Slot(6, n)
}

func (rcv *BannerInfo) EdgePauseMs() int32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
	if o != 0 {
		return rcv._tab.GetInt32(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *BannerInfo) MutateEdgePauseMs(n int32) bool {
	return rcv._tab.MutateInt32Slot(8, n)
}

func (rcv *BannerInfo) ScrollPxPerSec() int32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
	if o != 0 {
		return rcv._tab.GetInt32(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *BannerInfo) MutateScrollPxPerSec(n int32) bool {
	return rcv._tab.MutateInt32Slot(10, n)
}

func (rcv *BannerInfo) FadeOutMs() int32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
	if o != 0 {
		return rcv._tab.GetInt32(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *BannerInfo) MutateFadeOutMs(n int32) bool {
	return rcv._tab.MutateInt32Slot(12, n)
}

func (rcv *BannerInfo) GapMs() int32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(14))
	if o != 0 {
		return rcv._tab.GetInt32(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *BannerInfo) MutateGapMs(n int32) bool {
	return rcv._tab.MutateInt32Slot(14, n)
}

func (rcv *BannerInfo) FadeInMs() int32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(16))
	if o != 0 {
		return rcv._tab.GetInt32(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *BannerInfo) MutateFadeInMs(n int32) bool {
	return rcv._tab.MutateInt32Slot(16, n)
}

func BannerInfoStart(builder *flatbuffers.Builder) {
	builder.StartObject(7)
}
func BannerInfoAddCampaigns(builder *flatbuffers.Builder, campaigns flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(campaigns), 0)
}
func BannerInfoStartCampaignsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT {
	return builder.StartVector(4, numElems, 4)
}
func BannerInfoAddHoldMs(builder *flatbuffers.Builder, holdMs int32) {
	builder.PrependInt32Slot(1, holdMs, 0)
}
func BannerInfoAddEdgePauseMs(builder *flatbuffers.Builder, edgePauseMs int32) {
	builder.PrependInt32Slot(2, edgePauseMs, 0)
}
func BannerInfoAddScrollPxPerSec(builder *flatbuffers.Builder, scrollPxPerSec int32) {
	builder.PrependInt32Slot(3, scrollPxPerSec, 0)
}
func BannerInfoAddFadeOutMs(builder *flatbuffers.Builder, fadeOutMs int32) {
	builder.PrependInt32Slot(4, fadeOutMs, 0)
}
func BannerInfoAddGapMs(builder *flatbuffers.Builder, gapMs int32) {
	builder.PrependInt32Slot(5, gapMs, 0)
}
func BannerInfoAddFadeInMs(builder *flatbuffers.Builder, fadeInMs int32) {
	builder.PrependInt32Slot(6, fadeInMs, 0)
}
func BannerInfoEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
