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

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';



export class InviteDeclineRequest implements flatbuffers.IUnpackableObject<InviteDeclineRequestT> {
  bb: flatbuffers.ByteBuffer|null = null;
  bb_pos = 0;
  __init(i:number, bb:flatbuffers.ByteBuffer):InviteDeclineRequest {
  this.bb_pos = i;
  this.bb = bb;
  return this;
}

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

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

gameId():string|null
gameId(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
gameId(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;
}

inviteId():string|null
inviteId(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
inviteId(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;
}

static startInviteDeclineRequest(builder:flatbuffers.Builder) {
  builder.startObject(2);
}

static addGameId(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset) {
  builder.addFieldOffset(0, gameIdOffset, 0);
}

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

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

static createInviteDeclineRequest(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset, inviteIdOffset:flatbuffers.Offset):flatbuffers.Offset {
  InviteDeclineRequest.startInviteDeclineRequest(builder);
  InviteDeclineRequest.addGameId(builder, gameIdOffset);
  InviteDeclineRequest.addInviteId(builder, inviteIdOffset);
  return InviteDeclineRequest.endInviteDeclineRequest(builder);
}

unpack(): InviteDeclineRequestT {
  return new InviteDeclineRequestT(
    this.gameId(),
    this.inviteId()
  );
}


unpackTo(_o: InviteDeclineRequestT): void {
  _o.gameId = this.gameId();
  _o.inviteId = this.inviteId();
}
}

export class InviteDeclineRequestT implements flatbuffers.IGeneratedObject {
constructor(
  public gameId: string|Uint8Array|null = null,
  public inviteId: string|Uint8Array|null = null
){}


pack(builder:flatbuffers.Builder): flatbuffers.Offset {
  const gameId = (this.gameId !== null ? builder.createString(this.gameId!) : 0);
  const inviteId = (this.inviteId !== null ? builder.createString(this.inviteId!) : 0);

  return InviteDeclineRequest.createInviteDeclineRequest(builder,
    gameId,
    inviteId
  );
}
}
