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

import * as flatbuffers from 'flatbuffers';

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

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

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

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

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

static addInvitationId(builder:flatbuffers.Builder, invitationIdOffset:flatbuffers.Offset) {
  builder.addFieldOffset(0, invitationIdOffset, 0);
}

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

static createInvitationActionRequest(builder:flatbuffers.Builder, invitationIdOffset:flatbuffers.Offset):flatbuffers.Offset {
  InvitationActionRequest.startInvitationActionRequest(builder);
  InvitationActionRequest.addInvitationId(builder, invitationIdOffset);
  return InvitationActionRequest.endInvitationActionRequest(builder);
}
}
