1// automatically generated by the FlatBuffers compiler, do not modify 2/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */ 3import * as flatbuffers from 'flatbuffers'; 4export class B { 5 constructor() { 6 this.bb = null; 7 this.bb_pos = 0; 8 } 9 __init(i, bb) { 10 this.bb_pos = i; 11 this.bb = bb; 12 return this; 13 } 14 static getRootAsB(bb, obj) { 15 return (obj || new B()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 16 } 17 static getSizePrefixedRootAsB(bb, obj) { 18 bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); 19 return (obj || new B()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 20 } 21 b(optionalEncoding) { 22 const offset = this.bb.__offset(this.bb_pos, 4); 23 return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; 24 } 25 static getFullyQualifiedName() { 26 return 'UnionUnderlyingType.B'; 27 } 28 static startB(builder) { 29 builder.startObject(1); 30 } 31 static addB(builder, bOffset) { 32 builder.addFieldOffset(0, bOffset, 0); 33 } 34 static endB(builder) { 35 const offset = builder.endObject(); 36 return offset; 37 } 38 static createB(builder, bOffset) { 39 B.startB(builder); 40 B.addB(builder, bOffset); 41 return B.endB(builder); 42 } 43 unpack() { 44 return new BT(this.b()); 45 } 46 unpackTo(_o) { 47 _o.b = this.b(); 48 } 49} 50export class BT { 51 constructor(b = null) { 52 this.b = b; 53 } 54 pack(builder) { 55 const b = (this.b !== null ? builder.createString(this.b) : 0); 56 return B.createB(builder, b); 57 } 58} 59