// automatically generated by the FlatBuffers compiler, do not modify

import * as flatbuffers from 'flatbuffers';

export class FeedbackUnread {
  bb: flatbuffers.ByteBuffer|null = null;
  bb_pos = 0;
  __init(i:number, bb:flatbuffers.ByteBuffer):FeedbackUnread {
  this.bb_pos = i;
  this.bb = bb;
  return this;
}

static getRootAsFeedbackUnread(bb:flatbuffers.ByteBuffer, obj?:FeedbackUnread):FeedbackUnread {
  return (obj || new FeedbackUnread()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}

static getSizePrefixedRootAsFeedbackUnread(bb:flatbuffers.ByteBuffer, obj?:FeedbackUnread):FeedbackUnread {
  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
  return (obj || new FeedbackUnread()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}

replyUnread():boolean {
  const offset = this.bb!.__offset(this.bb_pos, 4);
  return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
}

static startFeedbackUnread(builder:flatbuffers.Builder) {
  builder.startObject(1);
}

static addReplyUnread(builder:flatbuffers.Builder, replyUnread:boolean) {
  builder.addFieldInt8(0, +replyUnread, +false);
}

static endFeedbackUnread(builder:flatbuffers.Builder):flatbuffers.Offset {
  const offset = builder.endObject();
  return offset;
}

static createFeedbackUnread(builder:flatbuffers.Builder, replyUnread:boolean):flatbuffers.Offset {
  FeedbackUnread.startFeedbackUnread(builder);
  FeedbackUnread.addReplyUnread(builder, replyUnread);
  return FeedbackUnread.endFeedbackUnread(builder);
}
}
