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

import * as flatbuffers from 'flatbuffers';

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

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

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

accountId():string|null
accountId(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
accountId(optionalEncoding?:any):string|Uint8Array|null {
  const offset = this.bb!.__offset(this.bb_pos, 4);
  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}

displayName():string|null
displayName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
displayName(optionalEncoding?:any):string|Uint8Array|null {
  const offset = this.bb!.__offset(this.bb_pos, 6);
  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}

seat():number {
  const offset = this.bb!.__offset(this.bb_pos, 8);
  return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0;
}

response():string|null
response(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
response(optionalEncoding?:any):string|Uint8Array|null {
  const offset = this.bb!.__offset(this.bb_pos, 10);
  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}

static startInvitationInvitee(builder:flatbuffers.Builder) {
  builder.startObject(4);
}

static addAccountId(builder:flatbuffers.Builder, accountIdOffset:flatbuffers.Offset) {
  builder.addFieldOffset(0, accountIdOffset, 0);
}

static addDisplayName(builder:flatbuffers.Builder, displayNameOffset:flatbuffers.Offset) {
  builder.addFieldOffset(1, displayNameOffset, 0);
}

static addSeat(builder:flatbuffers.Builder, seat:number) {
  builder.addFieldInt32(2, seat, 0);
}

static addResponse(builder:flatbuffers.Builder, responseOffset:flatbuffers.Offset) {
  builder.addFieldOffset(3, responseOffset, 0);
}

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

static createInvitationInvitee(builder:flatbuffers.Builder, accountIdOffset:flatbuffers.Offset, displayNameOffset:flatbuffers.Offset, seat:number, responseOffset:flatbuffers.Offset):flatbuffers.Offset {
  InvitationInvitee.startInvitationInvitee(builder);
  InvitationInvitee.addAccountId(builder, accountIdOffset);
  InvitationInvitee.addDisplayName(builder, displayNameOffset);
  InvitationInvitee.addSeat(builder, seat);
  InvitationInvitee.addResponse(builder, responseOffset);
  return InvitationInvitee.endInvitationInvitee(builder);
}
}
