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 A { 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 getRootAsA(bb, obj) { 15 return (obj || new A()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 16 } 17 static getSizePrefixedRootAsA(bb, obj) { 18 bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); 19 return (obj || new A()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 20 } 21 a() { 22 const offset = this.bb.__offset(this.bb_pos, 4); 23 return offset ? this.bb.readInt32(this.bb_pos + offset) : 0; 24 } 25 mutate_a(value) { 26 const offset = this.bb.__offset(this.bb_pos, 4); 27 if (offset === 0) { 28 return false; 29 } 30 this.bb.writeInt32(this.bb_pos + offset, value); 31 return true; 32 } 33 static getFullyQualifiedName() { 34 return 'UnionUnderlyingType.A'; 35 } 36 static startA(builder) { 37 builder.startObject(1); 38 } 39 static addA(builder, a) { 40 builder.addFieldInt32(0, a, 0); 41 } 42 static endA(builder) { 43 const offset = builder.endObject(); 44 return offset; 45 } 46 static createA(builder, a) { 47 A.startA(builder); 48 A.addA(builder, a); 49 return A.endA(builder); 50 } 51 unpack() { 52 return new AT(this.a()); 53 } 54 unpackTo(_o) { 55 _o.a = this.a(); 56 } 57} 58export class AT { 59 constructor(a = 0) { 60 this.a = a; 61 } 62 pack(builder) { 63 return A.createA(builder, this.a); 64 } 65} 66