1// automatically generated by the FlatBuffers compiler, do not modify 2 3/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */ 4 5import * as flatbuffers from 'flatbuffers'; 6 7 8 9export class HelloReply { 10 bb: flatbuffers.ByteBuffer|null = null; 11 bb_pos = 0; 12 __init(i:number, bb:flatbuffers.ByteBuffer):HelloReply { 13 this.bb_pos = i; 14 this.bb = bb; 15 return this; 16} 17 18static getRootAsHelloReply(bb:flatbuffers.ByteBuffer, obj?:HelloReply):HelloReply { 19 return (obj || new HelloReply()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 20} 21 22static getSizePrefixedRootAsHelloReply(bb:flatbuffers.ByteBuffer, obj?:HelloReply):HelloReply { 23 bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); 24 return (obj || new HelloReply()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 25} 26 27message():string|null 28message(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null 29message(optionalEncoding?:any):string|Uint8Array|null { 30 const offset = this.bb!.__offset(this.bb_pos, 4); 31 return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; 32} 33 34static startHelloReply(builder:flatbuffers.Builder) { 35 builder.startObject(1); 36} 37 38static addMessage(builder:flatbuffers.Builder, messageOffset:flatbuffers.Offset) { 39 builder.addFieldOffset(0, messageOffset, 0); 40} 41 42static endHelloReply(builder:flatbuffers.Builder):flatbuffers.Offset { 43 const offset = builder.endObject(); 44 return offset; 45} 46 47static createHelloReply(builder:flatbuffers.Builder, messageOffset:flatbuffers.Offset):flatbuffers.Offset { 48 HelloReply.startHelloReply(builder); 49 HelloReply.addMessage(builder, messageOffset); 50 return HelloReply.endHelloReply(builder); 51} 52 53serialize():Uint8Array { 54 return this.bb!.bytes(); 55} 56 57static deserialize(buffer: Uint8Array):HelloReply { 58 return HelloReply.getRootAsHelloReply(new flatbuffers.ByteBuffer(buffer)) 59} 60} 61