blob: 6b553b1a064bed03dafc838f9185e8ca416a95ef [file] [log] [blame]
Austin Schuh2dd86a92022-09-14 21:19:23 -07001// automatically generated by the FlatBuffers compiler, do not modify
2
3import * as flatbuffers from 'flatbuffers';
4
5
6export enum BaseType {
7 None = 0,
8 UType = 1,
9 Bool = 2,
10 Byte = 3,
11 UByte = 4,
12 Short = 5,
13 UShort = 6,
14 Int = 7,
15 UInt = 8,
16 Long = 9,
17 ULong = 10,
18 Float = 11,
19 Double = 12,
20 String = 13,
21 Vector = 14,
22 Obj = 15,
23 Union = 16,
24 Array = 17,
25 MaxBaseType = 18
26}
27
28/**
29 * New schema language features that are not supported by old code generators.
30 */
31export enum AdvancedFeatures {
32 AdvancedArrayFeatures = '1',
33 AdvancedUnionFeatures = '2',
34 OptionalScalars = '4',
35 DefaultVectorsAndStrings = '8'
36}
37
James Kuszmaul3b15b0c2022-11-08 14:03:16 -080038export class Type implements flatbuffers.IUnpackableObject<TypeT> {
Austin Schuh2dd86a92022-09-14 21:19:23 -070039 bb: flatbuffers.ByteBuffer|null = null;
40 bb_pos = 0;
41 __init(i:number, bb:flatbuffers.ByteBuffer):Type {
42 this.bb_pos = i;
43 this.bb = bb;
44 return this;
45}
46
47static getRootAsType(bb:flatbuffers.ByteBuffer, obj?:Type):Type {
48 return (obj || new Type()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
49}
50
51static getSizePrefixedRootAsType(bb:flatbuffers.ByteBuffer, obj?:Type):Type {
52 bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
53 return (obj || new Type()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
54}
55
56baseType():BaseType {
57 const offset = this.bb!.__offset(this.bb_pos, 4);
58 return offset ? this.bb!.readInt8(this.bb_pos + offset) : BaseType.None;
59}
60
61mutate_base_type(value:BaseType):boolean {
62 const offset = this.bb!.__offset(this.bb_pos, 4);
63
64 if (offset === 0) {
65 return false;
66 }
67
68 this.bb!.writeInt8(this.bb_pos + offset, value);
69 return true;
70}
71
72element():BaseType {
73 const offset = this.bb!.__offset(this.bb_pos, 6);
74 return offset ? this.bb!.readInt8(this.bb_pos + offset) : BaseType.None;
75}
76
77mutate_element(value:BaseType):boolean {
78 const offset = this.bb!.__offset(this.bb_pos, 6);
79
80 if (offset === 0) {
81 return false;
82 }
83
84 this.bb!.writeInt8(this.bb_pos + offset, value);
85 return true;
86}
87
88index():number {
89 const offset = this.bb!.__offset(this.bb_pos, 8);
90 return offset ? this.bb!.readInt32(this.bb_pos + offset) : -1;
91}
92
93mutate_index(value:number):boolean {
94 const offset = this.bb!.__offset(this.bb_pos, 8);
95
96 if (offset === 0) {
97 return false;
98 }
99
100 this.bb!.writeInt32(this.bb_pos + offset, value);
101 return true;
102}
103
104fixedLength():number {
105 const offset = this.bb!.__offset(this.bb_pos, 10);
106 return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0;
107}
108
109mutate_fixed_length(value:number):boolean {
110 const offset = this.bb!.__offset(this.bb_pos, 10);
111
112 if (offset === 0) {
113 return false;
114 }
115
116 this.bb!.writeUint16(this.bb_pos + offset, value);
117 return true;
118}
119
120/**
121 * The size (octets) of the `base_type` field.
122 */
123baseSize():number {
124 const offset = this.bb!.__offset(this.bb_pos, 12);
125 return offset ? this.bb!.readUint32(this.bb_pos + offset) : 4;
126}
127
128mutate_base_size(value:number):boolean {
129 const offset = this.bb!.__offset(this.bb_pos, 12);
130
131 if (offset === 0) {
132 return false;
133 }
134
135 this.bb!.writeUint32(this.bb_pos + offset, value);
136 return true;
137}
138
139/**
140 * The size (octets) of the `element` field, if present.
141 */
142elementSize():number {
143 const offset = this.bb!.__offset(this.bb_pos, 14);
144 return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0;
145}
146
147mutate_element_size(value:number):boolean {
148 const offset = this.bb!.__offset(this.bb_pos, 14);
149
150 if (offset === 0) {
151 return false;
152 }
153
154 this.bb!.writeUint32(this.bb_pos + offset, value);
155 return true;
156}
157
158static getFullyQualifiedName():string {
159 return 'reflection_Type';
160}
161
162static startType(builder:flatbuffers.Builder) {
163 builder.startObject(6);
164}
165
166static addBaseType(builder:flatbuffers.Builder, baseType:BaseType) {
167 builder.addFieldInt8(0, baseType, BaseType.None);
168}
169
170static addElement(builder:flatbuffers.Builder, element:BaseType) {
171 builder.addFieldInt8(1, element, BaseType.None);
172}
173
174static addIndex(builder:flatbuffers.Builder, index:number) {
175 builder.addFieldInt32(2, index, -1);
176}
177
178static addFixedLength(builder:flatbuffers.Builder, fixedLength:number) {
179 builder.addFieldInt16(3, fixedLength, 0);
180}
181
182static addBaseSize(builder:flatbuffers.Builder, baseSize:number) {
183 builder.addFieldInt32(4, baseSize, 4);
184}
185
186static addElementSize(builder:flatbuffers.Builder, elementSize:number) {
187 builder.addFieldInt32(5, elementSize, 0);
188}
189
190static endType(builder:flatbuffers.Builder):flatbuffers.Offset {
191 const offset = builder.endObject();
192 return offset;
193}
194
195static createType(builder:flatbuffers.Builder, baseType:BaseType, element:BaseType, index:number, fixedLength:number, baseSize:number, elementSize:number):flatbuffers.Offset {
196 Type.startType(builder);
197 Type.addBaseType(builder, baseType);
198 Type.addElement(builder, element);
199 Type.addIndex(builder, index);
200 Type.addFixedLength(builder, fixedLength);
201 Type.addBaseSize(builder, baseSize);
202 Type.addElementSize(builder, elementSize);
203 return Type.endType(builder);
204}
205
206unpack(): TypeT {
207 return new TypeT(
208 this.baseType(),
209 this.element(),
210 this.index(),
211 this.fixedLength(),
212 this.baseSize(),
213 this.elementSize()
214 );
215}
216
217
218unpackTo(_o: TypeT): void {
219 _o.baseType = this.baseType();
220 _o.element = this.element();
221 _o.index = this.index();
222 _o.fixedLength = this.fixedLength();
223 _o.baseSize = this.baseSize();
224 _o.elementSize = this.elementSize();
225}
226}
227
James Kuszmaul3b15b0c2022-11-08 14:03:16 -0800228export class TypeT implements flatbuffers.IGeneratedObject {
Austin Schuh2dd86a92022-09-14 21:19:23 -0700229constructor(
230 public baseType: BaseType = BaseType.None,
231 public element: BaseType = BaseType.None,
232 public index: number = -1,
233 public fixedLength: number = 0,
234 public baseSize: number = 4,
235 public elementSize: number = 0
236){}
237
238
239pack(builder:flatbuffers.Builder): flatbuffers.Offset {
240 return Type.createType(builder,
241 this.baseType,
242 this.element,
243 this.index,
244 this.fixedLength,
245 this.baseSize,
246 this.elementSize
247 );
248}
249}
250
James Kuszmaul3b15b0c2022-11-08 14:03:16 -0800251export class KeyValue implements flatbuffers.IUnpackableObject<KeyValueT> {
Austin Schuh2dd86a92022-09-14 21:19:23 -0700252 bb: flatbuffers.ByteBuffer|null = null;
253 bb_pos = 0;
254 __init(i:number, bb:flatbuffers.ByteBuffer):KeyValue {
255 this.bb_pos = i;
256 this.bb = bb;
257 return this;
258}
259
260static getRootAsKeyValue(bb:flatbuffers.ByteBuffer, obj?:KeyValue):KeyValue {
261 return (obj || new KeyValue()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
262}
263
264static getSizePrefixedRootAsKeyValue(bb:flatbuffers.ByteBuffer, obj?:KeyValue):KeyValue {
265 bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
266 return (obj || new KeyValue()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
267}
268
269key():string|null
270key(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
271key(optionalEncoding?:any):string|Uint8Array|null {
272 const offset = this.bb!.__offset(this.bb_pos, 4);
273 return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
274}
275
276value():string|null
277value(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
278value(optionalEncoding?:any):string|Uint8Array|null {
279 const offset = this.bb!.__offset(this.bb_pos, 6);
280 return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
281}
282
283static getFullyQualifiedName():string {
284 return 'reflection_KeyValue';
285}
286
287static startKeyValue(builder:flatbuffers.Builder) {
288 builder.startObject(2);
289}
290
291static addKey(builder:flatbuffers.Builder, keyOffset:flatbuffers.Offset) {
292 builder.addFieldOffset(0, keyOffset, 0);
293}
294
295static addValue(builder:flatbuffers.Builder, valueOffset:flatbuffers.Offset) {
296 builder.addFieldOffset(1, valueOffset, 0);
297}
298
299static endKeyValue(builder:flatbuffers.Builder):flatbuffers.Offset {
300 const offset = builder.endObject();
301 builder.requiredField(offset, 4) // key
302 return offset;
303}
304
305static createKeyValue(builder:flatbuffers.Builder, keyOffset:flatbuffers.Offset, valueOffset:flatbuffers.Offset):flatbuffers.Offset {
306 KeyValue.startKeyValue(builder);
307 KeyValue.addKey(builder, keyOffset);
308 KeyValue.addValue(builder, valueOffset);
309 return KeyValue.endKeyValue(builder);
310}
311
312unpack(): KeyValueT {
313 return new KeyValueT(
314 this.key(),
315 this.value()
316 );
317}
318
319
320unpackTo(_o: KeyValueT): void {
321 _o.key = this.key();
322 _o.value = this.value();
323}
324}
325
James Kuszmaul3b15b0c2022-11-08 14:03:16 -0800326export class KeyValueT implements flatbuffers.IGeneratedObject {
Austin Schuh2dd86a92022-09-14 21:19:23 -0700327constructor(
328 public key: string|Uint8Array|null = null,
329 public value: string|Uint8Array|null = null
330){}
331
332
333pack(builder:flatbuffers.Builder): flatbuffers.Offset {
334 const key = (this.key !== null ? builder.createString(this.key!) : 0);
335 const value = (this.value !== null ? builder.createString(this.value!) : 0);
336
337 return KeyValue.createKeyValue(builder,
338 key,
339 value
340 );
341}
342}
343
James Kuszmaul3b15b0c2022-11-08 14:03:16 -0800344export class EnumVal implements flatbuffers.IUnpackableObject<EnumValT> {
Austin Schuh2dd86a92022-09-14 21:19:23 -0700345 bb: flatbuffers.ByteBuffer|null = null;
346 bb_pos = 0;
347 __init(i:number, bb:flatbuffers.ByteBuffer):EnumVal {
348 this.bb_pos = i;
349 this.bb = bb;
350 return this;
351}
352
353static getRootAsEnumVal(bb:flatbuffers.ByteBuffer, obj?:EnumVal):EnumVal {
354 return (obj || new EnumVal()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
355}
356
357static getSizePrefixedRootAsEnumVal(bb:flatbuffers.ByteBuffer, obj?:EnumVal):EnumVal {
358 bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
359 return (obj || new EnumVal()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
360}
361
362name():string|null
363name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
364name(optionalEncoding?:any):string|Uint8Array|null {
365 const offset = this.bb!.__offset(this.bb_pos, 4);
366 return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
367}
368
369value():bigint {
370 const offset = this.bb!.__offset(this.bb_pos, 6);
371 return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
372}
373
374mutate_value(value:bigint):boolean {
375 const offset = this.bb!.__offset(this.bb_pos, 6);
376
377 if (offset === 0) {
378 return false;
379 }
380
381 this.bb!.writeInt64(this.bb_pos + offset, value);
382 return true;
383}
384
385unionType(obj?:Type):Type|null {
386 const offset = this.bb!.__offset(this.bb_pos, 10);
387 return offset ? (obj || new Type()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
388}
389
390documentation(index: number):string
391documentation(index: number,optionalEncoding:flatbuffers.Encoding):string|Uint8Array
392documentation(index: number,optionalEncoding?:any):string|Uint8Array|null {
393 const offset = this.bb!.__offset(this.bb_pos, 12);
394 return offset ? this.bb!.__string(this.bb!.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
395}
396
397documentationLength():number {
398 const offset = this.bb!.__offset(this.bb_pos, 12);
399 return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
400}
401
James Kuszmaul3b15b0c2022-11-08 14:03:16 -0800402attributes(index: number, obj?:KeyValue):KeyValue|null {
403 const offset = this.bb!.__offset(this.bb_pos, 14);
404 return offset ? (obj || new KeyValue()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
405}
406
407attributesLength():number {
408 const offset = this.bb!.__offset(this.bb_pos, 14);
409 return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
410}
411
Austin Schuh2dd86a92022-09-14 21:19:23 -0700412static getFullyQualifiedName():string {
413 return 'reflection_EnumVal';
414}
415
416static startEnumVal(builder:flatbuffers.Builder) {
James Kuszmaul3b15b0c2022-11-08 14:03:16 -0800417 builder.startObject(6);
Austin Schuh2dd86a92022-09-14 21:19:23 -0700418}
419
420static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
421 builder.addFieldOffset(0, nameOffset, 0);
422}
423
424static addValue(builder:flatbuffers.Builder, value:bigint) {
425 builder.addFieldInt64(1, value, BigInt('0'));
426}
427
428static addUnionType(builder:flatbuffers.Builder, unionTypeOffset:flatbuffers.Offset) {
429 builder.addFieldOffset(3, unionTypeOffset, 0);
430}
431
432static addDocumentation(builder:flatbuffers.Builder, documentationOffset:flatbuffers.Offset) {
433 builder.addFieldOffset(4, documentationOffset, 0);
434}
435
436static createDocumentationVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
437 builder.startVector(4, data.length, 4);
438 for (let i = data.length - 1; i >= 0; i--) {
439 builder.addOffset(data[i]!);
440 }
441 return builder.endVector();
442}
443
444static startDocumentationVector(builder:flatbuffers.Builder, numElems:number) {
445 builder.startVector(4, numElems, 4);
446}
447
James Kuszmaul3b15b0c2022-11-08 14:03:16 -0800448static addAttributes(builder:flatbuffers.Builder, attributesOffset:flatbuffers.Offset) {
449 builder.addFieldOffset(5, attributesOffset, 0);
450}
451
452static createAttributesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
453 builder.startVector(4, data.length, 4);
454 for (let i = data.length - 1; i >= 0; i--) {
455 builder.addOffset(data[i]!);
456 }
457 return builder.endVector();
458}
459
460static startAttributesVector(builder:flatbuffers.Builder, numElems:number) {
461 builder.startVector(4, numElems, 4);
462}
463
Austin Schuh2dd86a92022-09-14 21:19:23 -0700464static endEnumVal(builder:flatbuffers.Builder):flatbuffers.Offset {
465 const offset = builder.endObject();
466 builder.requiredField(offset, 4) // name
467 return offset;
468}
469
470
471unpack(): EnumValT {
472 return new EnumValT(
473 this.name(),
474 this.value(),
475 (this.unionType() !== null ? this.unionType()!.unpack() : null),
James Kuszmaul3b15b0c2022-11-08 14:03:16 -0800476 this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength()),
477 this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength())
Austin Schuh2dd86a92022-09-14 21:19:23 -0700478 );
479}
480
481
482unpackTo(_o: EnumValT): void {
483 _o.name = this.name();
484 _o.value = this.value();
485 _o.unionType = (this.unionType() !== null ? this.unionType()!.unpack() : null);
James Kuszmaul3b15b0c2022-11-08 14:03:16 -0800486 _o.documentation = this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength());
487 _o.attributes = this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength());
Austin Schuh2dd86a92022-09-14 21:19:23 -0700488}
489}
490
James Kuszmaul3b15b0c2022-11-08 14:03:16 -0800491export class EnumValT implements flatbuffers.IGeneratedObject {
Austin Schuh2dd86a92022-09-14 21:19:23 -0700492constructor(
493 public name: string|Uint8Array|null = null,
494 public value: bigint = BigInt('0'),
495 public unionType: TypeT|null = null,
James Kuszmaul3b15b0c2022-11-08 14:03:16 -0800496 public documentation: (string)[] = [],
497 public attributes: (KeyValueT)[] = []
Austin Schuh2dd86a92022-09-14 21:19:23 -0700498){}
499
500
501pack(builder:flatbuffers.Builder): flatbuffers.Offset {
502 const name = (this.name !== null ? builder.createString(this.name!) : 0);
503 const unionType = (this.unionType !== null ? this.unionType!.pack(builder) : 0);
504 const documentation = EnumVal.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation));
James Kuszmaul3b15b0c2022-11-08 14:03:16 -0800505 const attributes = EnumVal.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes));
Austin Schuh2dd86a92022-09-14 21:19:23 -0700506
507 EnumVal.startEnumVal(builder);
508 EnumVal.addName(builder, name);
509 EnumVal.addValue(builder, this.value);
510 EnumVal.addUnionType(builder, unionType);
511 EnumVal.addDocumentation(builder, documentation);
James Kuszmaul3b15b0c2022-11-08 14:03:16 -0800512 EnumVal.addAttributes(builder, attributes);
Austin Schuh2dd86a92022-09-14 21:19:23 -0700513
514 return EnumVal.endEnumVal(builder);
515}
516}
517
James Kuszmaul3b15b0c2022-11-08 14:03:16 -0800518export class Enum implements flatbuffers.IUnpackableObject<EnumT> {
Austin Schuh2dd86a92022-09-14 21:19:23 -0700519 bb: flatbuffers.ByteBuffer|null = null;
520 bb_pos = 0;
521 __init(i:number, bb:flatbuffers.ByteBuffer):Enum {
522 this.bb_pos = i;
523 this.bb = bb;
524 return this;
525}
526
527static getRootAsEnum(bb:flatbuffers.ByteBuffer, obj?:Enum):Enum {
528 return (obj || new Enum()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
529}
530
531static getSizePrefixedRootAsEnum(bb:flatbuffers.ByteBuffer, obj?:Enum):Enum {
532 bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
533 return (obj || new Enum()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
534}
535
536name():string|null
537name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
538name(optionalEncoding?:any):string|Uint8Array|null {
539 const offset = this.bb!.__offset(this.bb_pos, 4);
540 return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
541}
542
543values(index: number, obj?:EnumVal):EnumVal|null {
544 const offset = this.bb!.__offset(this.bb_pos, 6);
545 return offset ? (obj || new EnumVal()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
546}
547
548valuesLength():number {
549 const offset = this.bb!.__offset(this.bb_pos, 6);
550 return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
551}
552
553isUnion():boolean {
554 const offset = this.bb!.__offset(this.bb_pos, 8);
555 return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
556}
557
558mutate_is_union(value:boolean):boolean {
559 const offset = this.bb!.__offset(this.bb_pos, 8);
560
561 if (offset === 0) {
562 return false;
563 }
564
565 this.bb!.writeInt8(this.bb_pos + offset, +value);
566 return true;
567}
568
569underlyingType(obj?:Type):Type|null {
570 const offset = this.bb!.__offset(this.bb_pos, 10);
571 return offset ? (obj || new Type()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
572}
573
574attributes(index: number, obj?:KeyValue):KeyValue|null {
575 const offset = this.bb!.__offset(this.bb_pos, 12);
576 return offset ? (obj || new KeyValue()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
577}
578
579attributesLength():number {
580 const offset = this.bb!.__offset(this.bb_pos, 12);
581 return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
582}
583
584documentation(index: number):string
585documentation(index: number,optionalEncoding:flatbuffers.Encoding):string|Uint8Array
586documentation(index: number,optionalEncoding?:any):string|Uint8Array|null {
587 const offset = this.bb!.__offset(this.bb_pos, 14);
588 return offset ? this.bb!.__string(this.bb!.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
589}
590
591documentationLength():number {
592 const offset = this.bb!.__offset(this.bb_pos, 14);
593 return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
594}
595
596/**
597 * File that this Enum is declared in.
598 */
599declarationFile():string|null
600declarationFile(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
601declarationFile(optionalEncoding?:any):string|Uint8Array|null {
602 const offset = this.bb!.__offset(this.bb_pos, 16);
603 return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
604}
605
606static getFullyQualifiedName():string {
607 return 'reflection_Enum';
608}
609
610static startEnum(builder:flatbuffers.Builder) {
611 builder.startObject(7);
612}
613
614static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
615 builder.addFieldOffset(0, nameOffset, 0);
616}
617
618static addValues(builder:flatbuffers.Builder, valuesOffset:flatbuffers.Offset) {
619 builder.addFieldOffset(1, valuesOffset, 0);
620}
621
622static createValuesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
623 builder.startVector(4, data.length, 4);
624 for (let i = data.length - 1; i >= 0; i--) {
625 builder.addOffset(data[i]!);
626 }
627 return builder.endVector();
628}
629
630static startValuesVector(builder:flatbuffers.Builder, numElems:number) {
631 builder.startVector(4, numElems, 4);
632}
633
634static addIsUnion(builder:flatbuffers.Builder, isUnion:boolean) {
635 builder.addFieldInt8(2, +isUnion, +false);
636}
637
638static addUnderlyingType(builder:flatbuffers.Builder, underlyingTypeOffset:flatbuffers.Offset) {
639 builder.addFieldOffset(3, underlyingTypeOffset, 0);
640}
641
642static addAttributes(builder:flatbuffers.Builder, attributesOffset:flatbuffers.Offset) {
643 builder.addFieldOffset(4, attributesOffset, 0);
644}
645
646static createAttributesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
647 builder.startVector(4, data.length, 4);
648 for (let i = data.length - 1; i >= 0; i--) {
649 builder.addOffset(data[i]!);
650 }
651 return builder.endVector();
652}
653
654static startAttributesVector(builder:flatbuffers.Builder, numElems:number) {
655 builder.startVector(4, numElems, 4);
656}
657
658static addDocumentation(builder:flatbuffers.Builder, documentationOffset:flatbuffers.Offset) {
659 builder.addFieldOffset(5, documentationOffset, 0);
660}
661
662static createDocumentationVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
663 builder.startVector(4, data.length, 4);
664 for (let i = data.length - 1; i >= 0; i--) {
665 builder.addOffset(data[i]!);
666 }
667 return builder.endVector();
668}
669
670static startDocumentationVector(builder:flatbuffers.Builder, numElems:number) {
671 builder.startVector(4, numElems, 4);
672}
673
674static addDeclarationFile(builder:flatbuffers.Builder, declarationFileOffset:flatbuffers.Offset) {
675 builder.addFieldOffset(6, declarationFileOffset, 0);
676}
677
678static endEnum(builder:flatbuffers.Builder):flatbuffers.Offset {
679 const offset = builder.endObject();
680 builder.requiredField(offset, 4) // name
681 builder.requiredField(offset, 6) // values
682 builder.requiredField(offset, 10) // underlying_type
683 return offset;
684}
685
686
687unpack(): EnumT {
688 return new EnumT(
689 this.name(),
James Kuszmaul3b15b0c2022-11-08 14:03:16 -0800690 this.bb!.createObjList<EnumVal, EnumValT>(this.values.bind(this), this.valuesLength()),
Austin Schuh2dd86a92022-09-14 21:19:23 -0700691 this.isUnion(),
692 (this.underlyingType() !== null ? this.underlyingType()!.unpack() : null),
James Kuszmaul3b15b0c2022-11-08 14:03:16 -0800693 this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength()),
694 this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength()),
Austin Schuh2dd86a92022-09-14 21:19:23 -0700695 this.declarationFile()
696 );
697}
698
699
700unpackTo(_o: EnumT): void {
701 _o.name = this.name();
James Kuszmaul3b15b0c2022-11-08 14:03:16 -0800702 _o.values = this.bb!.createObjList<EnumVal, EnumValT>(this.values.bind(this), this.valuesLength());
Austin Schuh2dd86a92022-09-14 21:19:23 -0700703 _o.isUnion = this.isUnion();
704 _o.underlyingType = (this.underlyingType() !== null ? this.underlyingType()!.unpack() : null);
James Kuszmaul3b15b0c2022-11-08 14:03:16 -0800705 _o.attributes = this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength());
706 _o.documentation = this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength());
Austin Schuh2dd86a92022-09-14 21:19:23 -0700707 _o.declarationFile = this.declarationFile();
708}
709}
710
James Kuszmaul3b15b0c2022-11-08 14:03:16 -0800711export class EnumT implements flatbuffers.IGeneratedObject {
Austin Schuh2dd86a92022-09-14 21:19:23 -0700712constructor(
713 public name: string|Uint8Array|null = null,
714 public values: (EnumValT)[] = [],
715 public isUnion: boolean = false,
716 public underlyingType: TypeT|null = null,
717 public attributes: (KeyValueT)[] = [],
718 public documentation: (string)[] = [],
719 public declarationFile: string|Uint8Array|null = null
720){}
721
722
723pack(builder:flatbuffers.Builder): flatbuffers.Offset {
724 const name = (this.name !== null ? builder.createString(this.name!) : 0);
725 const values = Enum.createValuesVector(builder, builder.createObjectOffsetList(this.values));
726 const underlyingType = (this.underlyingType !== null ? this.underlyingType!.pack(builder) : 0);
727 const attributes = Enum.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes));
728 const documentation = Enum.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation));
729 const declarationFile = (this.declarationFile !== null ? builder.createString(this.declarationFile!) : 0);
730
731 Enum.startEnum(builder);
732 Enum.addName(builder, name);
733 Enum.addValues(builder, values);
734 Enum.addIsUnion(builder, this.isUnion);
735 Enum.addUnderlyingType(builder, underlyingType);
736 Enum.addAttributes(builder, attributes);
737 Enum.addDocumentation(builder, documentation);
738 Enum.addDeclarationFile(builder, declarationFile);
739
740 return Enum.endEnum(builder);
741}
742}
743
James Kuszmaul3b15b0c2022-11-08 14:03:16 -0800744export class Field implements flatbuffers.IUnpackableObject<FieldT> {
Austin Schuh2dd86a92022-09-14 21:19:23 -0700745 bb: flatbuffers.ByteBuffer|null = null;
746 bb_pos = 0;
747 __init(i:number, bb:flatbuffers.ByteBuffer):Field {
748 this.bb_pos = i;
749 this.bb = bb;
750 return this;
751}
752
753static getRootAsField(bb:flatbuffers.ByteBuffer, obj?:Field):Field {
754 return (obj || new Field()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
755}
756
757static getSizePrefixedRootAsField(bb:flatbuffers.ByteBuffer, obj?:Field):Field {
758 bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
759 return (obj || new Field()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
760}
761
762name():string|null
763name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
764name(optionalEncoding?:any):string|Uint8Array|null {
765 const offset = this.bb!.__offset(this.bb_pos, 4);
766 return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
767}
768
769type(obj?:Type):Type|null {
770 const offset = this.bb!.__offset(this.bb_pos, 6);
771 return offset ? (obj || new Type()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
772}
773
774id():number {
775 const offset = this.bb!.__offset(this.bb_pos, 8);
776 return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0;
777}
778
779mutate_id(value:number):boolean {
780 const offset = this.bb!.__offset(this.bb_pos, 8);
781
782 if (offset === 0) {
783 return false;
784 }
785
786 this.bb!.writeUint16(this.bb_pos + offset, value);
787 return true;
788}
789
790offset():number {
791 const offset = this.bb!.__offset(this.bb_pos, 10);
792 return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0;
793}
794
795mutate_offset(value:number):boolean {
796 const offset = this.bb!.__offset(this.bb_pos, 10);
797
798 if (offset === 0) {
799 return false;
800 }
801
802 this.bb!.writeUint16(this.bb_pos + offset, value);
803 return true;
804}
805
806defaultInteger():bigint {
807 const offset = this.bb!.__offset(this.bb_pos, 12);
808 return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
809}
810
811mutate_default_integer(value:bigint):boolean {
812 const offset = this.bb!.__offset(this.bb_pos, 12);
813
814 if (offset === 0) {
815 return false;
816 }
817
818 this.bb!.writeInt64(this.bb_pos + offset, value);
819 return true;
820}
821
822defaultReal():number {
823 const offset = this.bb!.__offset(this.bb_pos, 14);
824 return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 0.0;
825}
826
827mutate_default_real(value:number):boolean {
828 const offset = this.bb!.__offset(this.bb_pos, 14);
829
830 if (offset === 0) {
831 return false;
832 }
833
834 this.bb!.writeFloat64(this.bb_pos + offset, value);
835 return true;
836}
837
838deprecated():boolean {
839 const offset = this.bb!.__offset(this.bb_pos, 16);
840 return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
841}
842
843mutate_deprecated(value:boolean):boolean {
844 const offset = this.bb!.__offset(this.bb_pos, 16);
845
846 if (offset === 0) {
847 return false;
848 }
849
850 this.bb!.writeInt8(this.bb_pos + offset, +value);
851 return true;
852}
853
854required():boolean {
855 const offset = this.bb!.__offset(this.bb_pos, 18);
856 return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
857}
858
859mutate_required(value:boolean):boolean {
860 const offset = this.bb!.__offset(this.bb_pos, 18);
861
862 if (offset === 0) {
863 return false;
864 }
865
866 this.bb!.writeInt8(this.bb_pos + offset, +value);
867 return true;
868}
869
870key():boolean {
871 const offset = this.bb!.__offset(this.bb_pos, 20);
872 return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
873}
874
875mutate_key(value:boolean):boolean {
876 const offset = this.bb!.__offset(this.bb_pos, 20);
877
878 if (offset === 0) {
879 return false;
880 }
881
882 this.bb!.writeInt8(this.bb_pos + offset, +value);
883 return true;
884}
885
886attributes(index: number, obj?:KeyValue):KeyValue|null {
887 const offset = this.bb!.__offset(this.bb_pos, 22);
888 return offset ? (obj || new KeyValue()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
889}
890
891attributesLength():number {
892 const offset = this.bb!.__offset(this.bb_pos, 22);
893 return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
894}
895
896documentation(index: number):string
897documentation(index: number,optionalEncoding:flatbuffers.Encoding):string|Uint8Array
898documentation(index: number,optionalEncoding?:any):string|Uint8Array|null {
899 const offset = this.bb!.__offset(this.bb_pos, 24);
900 return offset ? this.bb!.__string(this.bb!.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
901}
902
903documentationLength():number {
904 const offset = this.bb!.__offset(this.bb_pos, 24);
905 return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
906}
907
908optional():boolean {
909 const offset = this.bb!.__offset(this.bb_pos, 26);
910 return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
911}
912
913mutate_optional(value:boolean):boolean {
914 const offset = this.bb!.__offset(this.bb_pos, 26);
915
916 if (offset === 0) {
917 return false;
918 }
919
920 this.bb!.writeInt8(this.bb_pos + offset, +value);
921 return true;
922}
923
924/**
925 * Number of padding octets to always add after this field. Structs only.
926 */
927padding():number {
928 const offset = this.bb!.__offset(this.bb_pos, 28);
929 return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0;
930}
931
932mutate_padding(value:number):boolean {
933 const offset = this.bb!.__offset(this.bb_pos, 28);
934
935 if (offset === 0) {
936 return false;
937 }
938
939 this.bb!.writeUint16(this.bb_pos + offset, value);
940 return true;
941}
942
943static getFullyQualifiedName():string {
944 return 'reflection_Field';
945}
946
947static startField(builder:flatbuffers.Builder) {
948 builder.startObject(13);
949}
950
951static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
952 builder.addFieldOffset(0, nameOffset, 0);
953}
954
955static addType(builder:flatbuffers.Builder, typeOffset:flatbuffers.Offset) {
956 builder.addFieldOffset(1, typeOffset, 0);
957}
958
959static addId(builder:flatbuffers.Builder, id:number) {
960 builder.addFieldInt16(2, id, 0);
961}
962
963static addOffset(builder:flatbuffers.Builder, offset:number) {
964 builder.addFieldInt16(3, offset, 0);
965}
966
967static addDefaultInteger(builder:flatbuffers.Builder, defaultInteger:bigint) {
968 builder.addFieldInt64(4, defaultInteger, BigInt('0'));
969}
970
971static addDefaultReal(builder:flatbuffers.Builder, defaultReal:number) {
972 builder.addFieldFloat64(5, defaultReal, 0.0);
973}
974
975static addDeprecated(builder:flatbuffers.Builder, deprecated:boolean) {
976 builder.addFieldInt8(6, +deprecated, +false);
977}
978
979static addRequired(builder:flatbuffers.Builder, required:boolean) {
980 builder.addFieldInt8(7, +required, +false);
981}
982
983static addKey(builder:flatbuffers.Builder, key:boolean) {
984 builder.addFieldInt8(8, +key, +false);
985}
986
987static addAttributes(builder:flatbuffers.Builder, attributesOffset:flatbuffers.Offset) {
988 builder.addFieldOffset(9, attributesOffset, 0);
989}
990
991static createAttributesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
992 builder.startVector(4, data.length, 4);
993 for (let i = data.length - 1; i >= 0; i--) {
994 builder.addOffset(data[i]!);
995 }
996 return builder.endVector();
997}
998
999static startAttributesVector(builder:flatbuffers.Builder, numElems:number) {
1000 builder.startVector(4, numElems, 4);
1001}
1002
1003static addDocumentation(builder:flatbuffers.Builder, documentationOffset:flatbuffers.Offset) {
1004 builder.addFieldOffset(10, documentationOffset, 0);
1005}
1006
1007static createDocumentationVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
1008 builder.startVector(4, data.length, 4);
1009 for (let i = data.length - 1; i >= 0; i--) {
1010 builder.addOffset(data[i]!);
1011 }
1012 return builder.endVector();
1013}
1014
1015static startDocumentationVector(builder:flatbuffers.Builder, numElems:number) {
1016 builder.startVector(4, numElems, 4);
1017}
1018
1019static addOptional(builder:flatbuffers.Builder, optional:boolean) {
1020 builder.addFieldInt8(11, +optional, +false);
1021}
1022
1023static addPadding(builder:flatbuffers.Builder, padding:number) {
1024 builder.addFieldInt16(12, padding, 0);
1025}
1026
1027static endField(builder:flatbuffers.Builder):flatbuffers.Offset {
1028 const offset = builder.endObject();
1029 builder.requiredField(offset, 4) // name
1030 builder.requiredField(offset, 6) // type
1031 return offset;
1032}
1033
1034
1035unpack(): FieldT {
1036 return new FieldT(
1037 this.name(),
1038 (this.type() !== null ? this.type()!.unpack() : null),
1039 this.id(),
1040 this.offset(),
1041 this.defaultInteger(),
1042 this.defaultReal(),
1043 this.deprecated(),
1044 this.required(),
1045 this.key(),
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001046 this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength()),
1047 this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength()),
Austin Schuh2dd86a92022-09-14 21:19:23 -07001048 this.optional(),
1049 this.padding()
1050 );
1051}
1052
1053
1054unpackTo(_o: FieldT): void {
1055 _o.name = this.name();
1056 _o.type = (this.type() !== null ? this.type()!.unpack() : null);
1057 _o.id = this.id();
1058 _o.offset = this.offset();
1059 _o.defaultInteger = this.defaultInteger();
1060 _o.defaultReal = this.defaultReal();
1061 _o.deprecated = this.deprecated();
1062 _o.required = this.required();
1063 _o.key = this.key();
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001064 _o.attributes = this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength());
1065 _o.documentation = this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength());
Austin Schuh2dd86a92022-09-14 21:19:23 -07001066 _o.optional = this.optional();
1067 _o.padding = this.padding();
1068}
1069}
1070
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001071export class FieldT implements flatbuffers.IGeneratedObject {
Austin Schuh2dd86a92022-09-14 21:19:23 -07001072constructor(
1073 public name: string|Uint8Array|null = null,
1074 public type: TypeT|null = null,
1075 public id: number = 0,
1076 public offset: number = 0,
1077 public defaultInteger: bigint = BigInt('0'),
1078 public defaultReal: number = 0.0,
1079 public deprecated: boolean = false,
1080 public required: boolean = false,
1081 public key: boolean = false,
1082 public attributes: (KeyValueT)[] = [],
1083 public documentation: (string)[] = [],
1084 public optional: boolean = false,
1085 public padding: number = 0
1086){}
1087
1088
1089pack(builder:flatbuffers.Builder): flatbuffers.Offset {
1090 const name = (this.name !== null ? builder.createString(this.name!) : 0);
1091 const type = (this.type !== null ? this.type!.pack(builder) : 0);
1092 const attributes = Field.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes));
1093 const documentation = Field.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation));
1094
1095 Field.startField(builder);
1096 Field.addName(builder, name);
1097 Field.addType(builder, type);
1098 Field.addId(builder, this.id);
1099 Field.addOffset(builder, this.offset);
1100 Field.addDefaultInteger(builder, this.defaultInteger);
1101 Field.addDefaultReal(builder, this.defaultReal);
1102 Field.addDeprecated(builder, this.deprecated);
1103 Field.addRequired(builder, this.required);
1104 Field.addKey(builder, this.key);
1105 Field.addAttributes(builder, attributes);
1106 Field.addDocumentation(builder, documentation);
1107 Field.addOptional(builder, this.optional);
1108 Field.addPadding(builder, this.padding);
1109
1110 return Field.endField(builder);
1111}
1112}
1113
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001114export class Object_ implements flatbuffers.IUnpackableObject<Object_T> {
Austin Schuh2dd86a92022-09-14 21:19:23 -07001115 bb: flatbuffers.ByteBuffer|null = null;
1116 bb_pos = 0;
1117 __init(i:number, bb:flatbuffers.ByteBuffer):Object_ {
1118 this.bb_pos = i;
1119 this.bb = bb;
1120 return this;
1121}
1122
1123static getRootAsObject(bb:flatbuffers.ByteBuffer, obj?:Object_):Object_ {
1124 return (obj || new Object_()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
1125}
1126
1127static getSizePrefixedRootAsObject(bb:flatbuffers.ByteBuffer, obj?:Object_):Object_ {
1128 bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
1129 return (obj || new Object_()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
1130}
1131
1132name():string|null
1133name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
1134name(optionalEncoding?:any):string|Uint8Array|null {
1135 const offset = this.bb!.__offset(this.bb_pos, 4);
1136 return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
1137}
1138
1139fields(index: number, obj?:Field):Field|null {
1140 const offset = this.bb!.__offset(this.bb_pos, 6);
1141 return offset ? (obj || new Field()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
1142}
1143
1144fieldsLength():number {
1145 const offset = this.bb!.__offset(this.bb_pos, 6);
1146 return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
1147}
1148
1149isStruct():boolean {
1150 const offset = this.bb!.__offset(this.bb_pos, 8);
1151 return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
1152}
1153
1154mutate_is_struct(value:boolean):boolean {
1155 const offset = this.bb!.__offset(this.bb_pos, 8);
1156
1157 if (offset === 0) {
1158 return false;
1159 }
1160
1161 this.bb!.writeInt8(this.bb_pos + offset, +value);
1162 return true;
1163}
1164
1165minalign():number {
1166 const offset = this.bb!.__offset(this.bb_pos, 10);
1167 return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0;
1168}
1169
1170mutate_minalign(value:number):boolean {
1171 const offset = this.bb!.__offset(this.bb_pos, 10);
1172
1173 if (offset === 0) {
1174 return false;
1175 }
1176
1177 this.bb!.writeInt32(this.bb_pos + offset, value);
1178 return true;
1179}
1180
1181bytesize():number {
1182 const offset = this.bb!.__offset(this.bb_pos, 12);
1183 return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0;
1184}
1185
1186mutate_bytesize(value:number):boolean {
1187 const offset = this.bb!.__offset(this.bb_pos, 12);
1188
1189 if (offset === 0) {
1190 return false;
1191 }
1192
1193 this.bb!.writeInt32(this.bb_pos + offset, value);
1194 return true;
1195}
1196
1197attributes(index: number, obj?:KeyValue):KeyValue|null {
1198 const offset = this.bb!.__offset(this.bb_pos, 14);
1199 return offset ? (obj || new KeyValue()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
1200}
1201
1202attributesLength():number {
1203 const offset = this.bb!.__offset(this.bb_pos, 14);
1204 return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
1205}
1206
1207documentation(index: number):string
1208documentation(index: number,optionalEncoding:flatbuffers.Encoding):string|Uint8Array
1209documentation(index: number,optionalEncoding?:any):string|Uint8Array|null {
1210 const offset = this.bb!.__offset(this.bb_pos, 16);
1211 return offset ? this.bb!.__string(this.bb!.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
1212}
1213
1214documentationLength():number {
1215 const offset = this.bb!.__offset(this.bb_pos, 16);
1216 return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
1217}
1218
1219/**
1220 * File that this Object is declared in.
1221 */
1222declarationFile():string|null
1223declarationFile(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
1224declarationFile(optionalEncoding?:any):string|Uint8Array|null {
1225 const offset = this.bb!.__offset(this.bb_pos, 18);
1226 return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
1227}
1228
1229static getFullyQualifiedName():string {
1230 return 'reflection_Object';
1231}
1232
1233static startObject(builder:flatbuffers.Builder) {
1234 builder.startObject(8);
1235}
1236
1237static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
1238 builder.addFieldOffset(0, nameOffset, 0);
1239}
1240
1241static addFields(builder:flatbuffers.Builder, fieldsOffset:flatbuffers.Offset) {
1242 builder.addFieldOffset(1, fieldsOffset, 0);
1243}
1244
1245static createFieldsVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
1246 builder.startVector(4, data.length, 4);
1247 for (let i = data.length - 1; i >= 0; i--) {
1248 builder.addOffset(data[i]!);
1249 }
1250 return builder.endVector();
1251}
1252
1253static startFieldsVector(builder:flatbuffers.Builder, numElems:number) {
1254 builder.startVector(4, numElems, 4);
1255}
1256
1257static addIsStruct(builder:flatbuffers.Builder, isStruct:boolean) {
1258 builder.addFieldInt8(2, +isStruct, +false);
1259}
1260
1261static addMinalign(builder:flatbuffers.Builder, minalign:number) {
1262 builder.addFieldInt32(3, minalign, 0);
1263}
1264
1265static addBytesize(builder:flatbuffers.Builder, bytesize:number) {
1266 builder.addFieldInt32(4, bytesize, 0);
1267}
1268
1269static addAttributes(builder:flatbuffers.Builder, attributesOffset:flatbuffers.Offset) {
1270 builder.addFieldOffset(5, attributesOffset, 0);
1271}
1272
1273static createAttributesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
1274 builder.startVector(4, data.length, 4);
1275 for (let i = data.length - 1; i >= 0; i--) {
1276 builder.addOffset(data[i]!);
1277 }
1278 return builder.endVector();
1279}
1280
1281static startAttributesVector(builder:flatbuffers.Builder, numElems:number) {
1282 builder.startVector(4, numElems, 4);
1283}
1284
1285static addDocumentation(builder:flatbuffers.Builder, documentationOffset:flatbuffers.Offset) {
1286 builder.addFieldOffset(6, documentationOffset, 0);
1287}
1288
1289static createDocumentationVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
1290 builder.startVector(4, data.length, 4);
1291 for (let i = data.length - 1; i >= 0; i--) {
1292 builder.addOffset(data[i]!);
1293 }
1294 return builder.endVector();
1295}
1296
1297static startDocumentationVector(builder:flatbuffers.Builder, numElems:number) {
1298 builder.startVector(4, numElems, 4);
1299}
1300
1301static addDeclarationFile(builder:flatbuffers.Builder, declarationFileOffset:flatbuffers.Offset) {
1302 builder.addFieldOffset(7, declarationFileOffset, 0);
1303}
1304
1305static endObject(builder:flatbuffers.Builder):flatbuffers.Offset {
1306 const offset = builder.endObject();
1307 builder.requiredField(offset, 4) // name
1308 builder.requiredField(offset, 6) // fields
1309 return offset;
1310}
1311
1312static createObject(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset, fieldsOffset:flatbuffers.Offset, isStruct:boolean, minalign:number, bytesize:number, attributesOffset:flatbuffers.Offset, documentationOffset:flatbuffers.Offset, declarationFileOffset:flatbuffers.Offset):flatbuffers.Offset {
1313 Object_.startObject(builder);
1314 Object_.addName(builder, nameOffset);
1315 Object_.addFields(builder, fieldsOffset);
1316 Object_.addIsStruct(builder, isStruct);
1317 Object_.addMinalign(builder, minalign);
1318 Object_.addBytesize(builder, bytesize);
1319 Object_.addAttributes(builder, attributesOffset);
1320 Object_.addDocumentation(builder, documentationOffset);
1321 Object_.addDeclarationFile(builder, declarationFileOffset);
1322 return Object_.endObject(builder);
1323}
1324
1325unpack(): Object_T {
1326 return new Object_T(
1327 this.name(),
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001328 this.bb!.createObjList<Field, FieldT>(this.fields.bind(this), this.fieldsLength()),
Austin Schuh2dd86a92022-09-14 21:19:23 -07001329 this.isStruct(),
1330 this.minalign(),
1331 this.bytesize(),
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001332 this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength()),
1333 this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength()),
Austin Schuh2dd86a92022-09-14 21:19:23 -07001334 this.declarationFile()
1335 );
1336}
1337
1338
1339unpackTo(_o: Object_T): void {
1340 _o.name = this.name();
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001341 _o.fields = this.bb!.createObjList<Field, FieldT>(this.fields.bind(this), this.fieldsLength());
Austin Schuh2dd86a92022-09-14 21:19:23 -07001342 _o.isStruct = this.isStruct();
1343 _o.minalign = this.minalign();
1344 _o.bytesize = this.bytesize();
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001345 _o.attributes = this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength());
1346 _o.documentation = this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength());
Austin Schuh2dd86a92022-09-14 21:19:23 -07001347 _o.declarationFile = this.declarationFile();
1348}
1349}
1350
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001351export class Object_T implements flatbuffers.IGeneratedObject {
Austin Schuh2dd86a92022-09-14 21:19:23 -07001352constructor(
1353 public name: string|Uint8Array|null = null,
1354 public fields: (FieldT)[] = [],
1355 public isStruct: boolean = false,
1356 public minalign: number = 0,
1357 public bytesize: number = 0,
1358 public attributes: (KeyValueT)[] = [],
1359 public documentation: (string)[] = [],
1360 public declarationFile: string|Uint8Array|null = null
1361){}
1362
1363
1364pack(builder:flatbuffers.Builder): flatbuffers.Offset {
1365 const name = (this.name !== null ? builder.createString(this.name!) : 0);
1366 const fields = Object_.createFieldsVector(builder, builder.createObjectOffsetList(this.fields));
1367 const attributes = Object_.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes));
1368 const documentation = Object_.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation));
1369 const declarationFile = (this.declarationFile !== null ? builder.createString(this.declarationFile!) : 0);
1370
1371 return Object_.createObject(builder,
1372 name,
1373 fields,
1374 this.isStruct,
1375 this.minalign,
1376 this.bytesize,
1377 attributes,
1378 documentation,
1379 declarationFile
1380 );
1381}
1382}
1383
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001384export class RPCCall implements flatbuffers.IUnpackableObject<RPCCallT> {
Austin Schuh2dd86a92022-09-14 21:19:23 -07001385 bb: flatbuffers.ByteBuffer|null = null;
1386 bb_pos = 0;
1387 __init(i:number, bb:flatbuffers.ByteBuffer):RPCCall {
1388 this.bb_pos = i;
1389 this.bb = bb;
1390 return this;
1391}
1392
1393static getRootAsRPCCall(bb:flatbuffers.ByteBuffer, obj?:RPCCall):RPCCall {
1394 return (obj || new RPCCall()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
1395}
1396
1397static getSizePrefixedRootAsRPCCall(bb:flatbuffers.ByteBuffer, obj?:RPCCall):RPCCall {
1398 bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
1399 return (obj || new RPCCall()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
1400}
1401
1402name():string|null
1403name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
1404name(optionalEncoding?:any):string|Uint8Array|null {
1405 const offset = this.bb!.__offset(this.bb_pos, 4);
1406 return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
1407}
1408
1409request(obj?:Object_):Object_|null {
1410 const offset = this.bb!.__offset(this.bb_pos, 6);
1411 return offset ? (obj || new Object_()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
1412}
1413
1414response(obj?:Object_):Object_|null {
1415 const offset = this.bb!.__offset(this.bb_pos, 8);
1416 return offset ? (obj || new Object_()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
1417}
1418
1419attributes(index: number, obj?:KeyValue):KeyValue|null {
1420 const offset = this.bb!.__offset(this.bb_pos, 10);
1421 return offset ? (obj || new KeyValue()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
1422}
1423
1424attributesLength():number {
1425 const offset = this.bb!.__offset(this.bb_pos, 10);
1426 return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
1427}
1428
1429documentation(index: number):string
1430documentation(index: number,optionalEncoding:flatbuffers.Encoding):string|Uint8Array
1431documentation(index: number,optionalEncoding?:any):string|Uint8Array|null {
1432 const offset = this.bb!.__offset(this.bb_pos, 12);
1433 return offset ? this.bb!.__string(this.bb!.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
1434}
1435
1436documentationLength():number {
1437 const offset = this.bb!.__offset(this.bb_pos, 12);
1438 return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
1439}
1440
1441static getFullyQualifiedName():string {
1442 return 'reflection_RPCCall';
1443}
1444
1445static startRPCCall(builder:flatbuffers.Builder) {
1446 builder.startObject(5);
1447}
1448
1449static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
1450 builder.addFieldOffset(0, nameOffset, 0);
1451}
1452
1453static addRequest(builder:flatbuffers.Builder, requestOffset:flatbuffers.Offset) {
1454 builder.addFieldOffset(1, requestOffset, 0);
1455}
1456
1457static addResponse(builder:flatbuffers.Builder, responseOffset:flatbuffers.Offset) {
1458 builder.addFieldOffset(2, responseOffset, 0);
1459}
1460
1461static addAttributes(builder:flatbuffers.Builder, attributesOffset:flatbuffers.Offset) {
1462 builder.addFieldOffset(3, attributesOffset, 0);
1463}
1464
1465static createAttributesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
1466 builder.startVector(4, data.length, 4);
1467 for (let i = data.length - 1; i >= 0; i--) {
1468 builder.addOffset(data[i]!);
1469 }
1470 return builder.endVector();
1471}
1472
1473static startAttributesVector(builder:flatbuffers.Builder, numElems:number) {
1474 builder.startVector(4, numElems, 4);
1475}
1476
1477static addDocumentation(builder:flatbuffers.Builder, documentationOffset:flatbuffers.Offset) {
1478 builder.addFieldOffset(4, documentationOffset, 0);
1479}
1480
1481static createDocumentationVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
1482 builder.startVector(4, data.length, 4);
1483 for (let i = data.length - 1; i >= 0; i--) {
1484 builder.addOffset(data[i]!);
1485 }
1486 return builder.endVector();
1487}
1488
1489static startDocumentationVector(builder:flatbuffers.Builder, numElems:number) {
1490 builder.startVector(4, numElems, 4);
1491}
1492
1493static endRPCCall(builder:flatbuffers.Builder):flatbuffers.Offset {
1494 const offset = builder.endObject();
1495 builder.requiredField(offset, 4) // name
1496 builder.requiredField(offset, 6) // request
1497 builder.requiredField(offset, 8) // response
1498 return offset;
1499}
1500
1501
1502unpack(): RPCCallT {
1503 return new RPCCallT(
1504 this.name(),
1505 (this.request() !== null ? this.request()!.unpack() : null),
1506 (this.response() !== null ? this.response()!.unpack() : null),
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001507 this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength()),
1508 this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength())
Austin Schuh2dd86a92022-09-14 21:19:23 -07001509 );
1510}
1511
1512
1513unpackTo(_o: RPCCallT): void {
1514 _o.name = this.name();
1515 _o.request = (this.request() !== null ? this.request()!.unpack() : null);
1516 _o.response = (this.response() !== null ? this.response()!.unpack() : null);
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001517 _o.attributes = this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength());
1518 _o.documentation = this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength());
Austin Schuh2dd86a92022-09-14 21:19:23 -07001519}
1520}
1521
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001522export class RPCCallT implements flatbuffers.IGeneratedObject {
Austin Schuh2dd86a92022-09-14 21:19:23 -07001523constructor(
1524 public name: string|Uint8Array|null = null,
1525 public request: Object_T|null = null,
1526 public response: Object_T|null = null,
1527 public attributes: (KeyValueT)[] = [],
1528 public documentation: (string)[] = []
1529){}
1530
1531
1532pack(builder:flatbuffers.Builder): flatbuffers.Offset {
1533 const name = (this.name !== null ? builder.createString(this.name!) : 0);
1534 const request = (this.request !== null ? this.request!.pack(builder) : 0);
1535 const response = (this.response !== null ? this.response!.pack(builder) : 0);
1536 const attributes = RPCCall.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes));
1537 const documentation = RPCCall.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation));
1538
1539 RPCCall.startRPCCall(builder);
1540 RPCCall.addName(builder, name);
1541 RPCCall.addRequest(builder, request);
1542 RPCCall.addResponse(builder, response);
1543 RPCCall.addAttributes(builder, attributes);
1544 RPCCall.addDocumentation(builder, documentation);
1545
1546 return RPCCall.endRPCCall(builder);
1547}
1548}
1549
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001550export class Service implements flatbuffers.IUnpackableObject<ServiceT> {
Austin Schuh2dd86a92022-09-14 21:19:23 -07001551 bb: flatbuffers.ByteBuffer|null = null;
1552 bb_pos = 0;
1553 __init(i:number, bb:flatbuffers.ByteBuffer):Service {
1554 this.bb_pos = i;
1555 this.bb = bb;
1556 return this;
1557}
1558
1559static getRootAsService(bb:flatbuffers.ByteBuffer, obj?:Service):Service {
1560 return (obj || new Service()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
1561}
1562
1563static getSizePrefixedRootAsService(bb:flatbuffers.ByteBuffer, obj?:Service):Service {
1564 bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
1565 return (obj || new Service()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
1566}
1567
1568name():string|null
1569name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
1570name(optionalEncoding?:any):string|Uint8Array|null {
1571 const offset = this.bb!.__offset(this.bb_pos, 4);
1572 return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
1573}
1574
1575calls(index: number, obj?:RPCCall):RPCCall|null {
1576 const offset = this.bb!.__offset(this.bb_pos, 6);
1577 return offset ? (obj || new RPCCall()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
1578}
1579
1580callsLength():number {
1581 const offset = this.bb!.__offset(this.bb_pos, 6);
1582 return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
1583}
1584
1585attributes(index: number, obj?:KeyValue):KeyValue|null {
1586 const offset = this.bb!.__offset(this.bb_pos, 8);
1587 return offset ? (obj || new KeyValue()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
1588}
1589
1590attributesLength():number {
1591 const offset = this.bb!.__offset(this.bb_pos, 8);
1592 return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
1593}
1594
1595documentation(index: number):string
1596documentation(index: number,optionalEncoding:flatbuffers.Encoding):string|Uint8Array
1597documentation(index: number,optionalEncoding?:any):string|Uint8Array|null {
1598 const offset = this.bb!.__offset(this.bb_pos, 10);
1599 return offset ? this.bb!.__string(this.bb!.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
1600}
1601
1602documentationLength():number {
1603 const offset = this.bb!.__offset(this.bb_pos, 10);
1604 return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
1605}
1606
1607/**
1608 * File that this Service is declared in.
1609 */
1610declarationFile():string|null
1611declarationFile(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
1612declarationFile(optionalEncoding?:any):string|Uint8Array|null {
1613 const offset = this.bb!.__offset(this.bb_pos, 12);
1614 return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
1615}
1616
1617static getFullyQualifiedName():string {
1618 return 'reflection_Service';
1619}
1620
1621static startService(builder:flatbuffers.Builder) {
1622 builder.startObject(5);
1623}
1624
1625static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
1626 builder.addFieldOffset(0, nameOffset, 0);
1627}
1628
1629static addCalls(builder:flatbuffers.Builder, callsOffset:flatbuffers.Offset) {
1630 builder.addFieldOffset(1, callsOffset, 0);
1631}
1632
1633static createCallsVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
1634 builder.startVector(4, data.length, 4);
1635 for (let i = data.length - 1; i >= 0; i--) {
1636 builder.addOffset(data[i]!);
1637 }
1638 return builder.endVector();
1639}
1640
1641static startCallsVector(builder:flatbuffers.Builder, numElems:number) {
1642 builder.startVector(4, numElems, 4);
1643}
1644
1645static addAttributes(builder:flatbuffers.Builder, attributesOffset:flatbuffers.Offset) {
1646 builder.addFieldOffset(2, attributesOffset, 0);
1647}
1648
1649static createAttributesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
1650 builder.startVector(4, data.length, 4);
1651 for (let i = data.length - 1; i >= 0; i--) {
1652 builder.addOffset(data[i]!);
1653 }
1654 return builder.endVector();
1655}
1656
1657static startAttributesVector(builder:flatbuffers.Builder, numElems:number) {
1658 builder.startVector(4, numElems, 4);
1659}
1660
1661static addDocumentation(builder:flatbuffers.Builder, documentationOffset:flatbuffers.Offset) {
1662 builder.addFieldOffset(3, documentationOffset, 0);
1663}
1664
1665static createDocumentationVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
1666 builder.startVector(4, data.length, 4);
1667 for (let i = data.length - 1; i >= 0; i--) {
1668 builder.addOffset(data[i]!);
1669 }
1670 return builder.endVector();
1671}
1672
1673static startDocumentationVector(builder:flatbuffers.Builder, numElems:number) {
1674 builder.startVector(4, numElems, 4);
1675}
1676
1677static addDeclarationFile(builder:flatbuffers.Builder, declarationFileOffset:flatbuffers.Offset) {
1678 builder.addFieldOffset(4, declarationFileOffset, 0);
1679}
1680
1681static endService(builder:flatbuffers.Builder):flatbuffers.Offset {
1682 const offset = builder.endObject();
1683 builder.requiredField(offset, 4) // name
1684 return offset;
1685}
1686
1687static createService(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset, callsOffset:flatbuffers.Offset, attributesOffset:flatbuffers.Offset, documentationOffset:flatbuffers.Offset, declarationFileOffset:flatbuffers.Offset):flatbuffers.Offset {
1688 Service.startService(builder);
1689 Service.addName(builder, nameOffset);
1690 Service.addCalls(builder, callsOffset);
1691 Service.addAttributes(builder, attributesOffset);
1692 Service.addDocumentation(builder, documentationOffset);
1693 Service.addDeclarationFile(builder, declarationFileOffset);
1694 return Service.endService(builder);
1695}
1696
1697unpack(): ServiceT {
1698 return new ServiceT(
1699 this.name(),
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001700 this.bb!.createObjList<RPCCall, RPCCallT>(this.calls.bind(this), this.callsLength()),
1701 this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength()),
1702 this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength()),
Austin Schuh2dd86a92022-09-14 21:19:23 -07001703 this.declarationFile()
1704 );
1705}
1706
1707
1708unpackTo(_o: ServiceT): void {
1709 _o.name = this.name();
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001710 _o.calls = this.bb!.createObjList<RPCCall, RPCCallT>(this.calls.bind(this), this.callsLength());
1711 _o.attributes = this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength());
1712 _o.documentation = this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength());
Austin Schuh2dd86a92022-09-14 21:19:23 -07001713 _o.declarationFile = this.declarationFile();
1714}
1715}
1716
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001717export class ServiceT implements flatbuffers.IGeneratedObject {
Austin Schuh2dd86a92022-09-14 21:19:23 -07001718constructor(
1719 public name: string|Uint8Array|null = null,
1720 public calls: (RPCCallT)[] = [],
1721 public attributes: (KeyValueT)[] = [],
1722 public documentation: (string)[] = [],
1723 public declarationFile: string|Uint8Array|null = null
1724){}
1725
1726
1727pack(builder:flatbuffers.Builder): flatbuffers.Offset {
1728 const name = (this.name !== null ? builder.createString(this.name!) : 0);
1729 const calls = Service.createCallsVector(builder, builder.createObjectOffsetList(this.calls));
1730 const attributes = Service.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes));
1731 const documentation = Service.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation));
1732 const declarationFile = (this.declarationFile !== null ? builder.createString(this.declarationFile!) : 0);
1733
1734 return Service.createService(builder,
1735 name,
1736 calls,
1737 attributes,
1738 documentation,
1739 declarationFile
1740 );
1741}
1742}
1743
1744/**
1745 * File specific information.
1746 * Symbols declared within a file may be recovered by iterating over all
1747 * symbols and examining the `declaration_file` field.
1748 */
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001749export class SchemaFile implements flatbuffers.IUnpackableObject<SchemaFileT> {
Austin Schuh2dd86a92022-09-14 21:19:23 -07001750 bb: flatbuffers.ByteBuffer|null = null;
1751 bb_pos = 0;
1752 __init(i:number, bb:flatbuffers.ByteBuffer):SchemaFile {
1753 this.bb_pos = i;
1754 this.bb = bb;
1755 return this;
1756}
1757
1758static getRootAsSchemaFile(bb:flatbuffers.ByteBuffer, obj?:SchemaFile):SchemaFile {
1759 return (obj || new SchemaFile()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
1760}
1761
1762static getSizePrefixedRootAsSchemaFile(bb:flatbuffers.ByteBuffer, obj?:SchemaFile):SchemaFile {
1763 bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
1764 return (obj || new SchemaFile()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
1765}
1766
1767/**
1768 * Filename, relative to project root.
1769 */
1770filename():string|null
1771filename(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
1772filename(optionalEncoding?:any):string|Uint8Array|null {
1773 const offset = this.bb!.__offset(this.bb_pos, 4);
1774 return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
1775}
1776
1777/**
1778 * Names of included files, relative to project root.
1779 */
1780includedFilenames(index: number):string
1781includedFilenames(index: number,optionalEncoding:flatbuffers.Encoding):string|Uint8Array
1782includedFilenames(index: number,optionalEncoding?:any):string|Uint8Array|null {
1783 const offset = this.bb!.__offset(this.bb_pos, 6);
1784 return offset ? this.bb!.__string(this.bb!.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
1785}
1786
1787includedFilenamesLength():number {
1788 const offset = this.bb!.__offset(this.bb_pos, 6);
1789 return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
1790}
1791
1792static getFullyQualifiedName():string {
1793 return 'reflection_SchemaFile';
1794}
1795
1796static startSchemaFile(builder:flatbuffers.Builder) {
1797 builder.startObject(2);
1798}
1799
1800static addFilename(builder:flatbuffers.Builder, filenameOffset:flatbuffers.Offset) {
1801 builder.addFieldOffset(0, filenameOffset, 0);
1802}
1803
1804static addIncludedFilenames(builder:flatbuffers.Builder, includedFilenamesOffset:flatbuffers.Offset) {
1805 builder.addFieldOffset(1, includedFilenamesOffset, 0);
1806}
1807
1808static createIncludedFilenamesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
1809 builder.startVector(4, data.length, 4);
1810 for (let i = data.length - 1; i >= 0; i--) {
1811 builder.addOffset(data[i]!);
1812 }
1813 return builder.endVector();
1814}
1815
1816static startIncludedFilenamesVector(builder:flatbuffers.Builder, numElems:number) {
1817 builder.startVector(4, numElems, 4);
1818}
1819
1820static endSchemaFile(builder:flatbuffers.Builder):flatbuffers.Offset {
1821 const offset = builder.endObject();
1822 builder.requiredField(offset, 4) // filename
1823 return offset;
1824}
1825
1826static createSchemaFile(builder:flatbuffers.Builder, filenameOffset:flatbuffers.Offset, includedFilenamesOffset:flatbuffers.Offset):flatbuffers.Offset {
1827 SchemaFile.startSchemaFile(builder);
1828 SchemaFile.addFilename(builder, filenameOffset);
1829 SchemaFile.addIncludedFilenames(builder, includedFilenamesOffset);
1830 return SchemaFile.endSchemaFile(builder);
1831}
1832
1833unpack(): SchemaFileT {
1834 return new SchemaFileT(
1835 this.filename(),
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001836 this.bb!.createScalarList<string>(this.includedFilenames.bind(this), this.includedFilenamesLength())
Austin Schuh2dd86a92022-09-14 21:19:23 -07001837 );
1838}
1839
1840
1841unpackTo(_o: SchemaFileT): void {
1842 _o.filename = this.filename();
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001843 _o.includedFilenames = this.bb!.createScalarList<string>(this.includedFilenames.bind(this), this.includedFilenamesLength());
Austin Schuh2dd86a92022-09-14 21:19:23 -07001844}
1845}
1846
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001847export class SchemaFileT implements flatbuffers.IGeneratedObject {
Austin Schuh2dd86a92022-09-14 21:19:23 -07001848constructor(
1849 public filename: string|Uint8Array|null = null,
1850 public includedFilenames: (string)[] = []
1851){}
1852
1853
1854pack(builder:flatbuffers.Builder): flatbuffers.Offset {
1855 const filename = (this.filename !== null ? builder.createString(this.filename!) : 0);
1856 const includedFilenames = SchemaFile.createIncludedFilenamesVector(builder, builder.createObjectOffsetList(this.includedFilenames));
1857
1858 return SchemaFile.createSchemaFile(builder,
1859 filename,
1860 includedFilenames
1861 );
1862}
1863}
1864
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001865export class Schema implements flatbuffers.IUnpackableObject<SchemaT> {
Austin Schuh2dd86a92022-09-14 21:19:23 -07001866 bb: flatbuffers.ByteBuffer|null = null;
1867 bb_pos = 0;
1868 __init(i:number, bb:flatbuffers.ByteBuffer):Schema {
1869 this.bb_pos = i;
1870 this.bb = bb;
1871 return this;
1872}
1873
1874static getRootAsSchema(bb:flatbuffers.ByteBuffer, obj?:Schema):Schema {
1875 return (obj || new Schema()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
1876}
1877
1878static getSizePrefixedRootAsSchema(bb:flatbuffers.ByteBuffer, obj?:Schema):Schema {
1879 bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
1880 return (obj || new Schema()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
1881}
1882
1883static bufferHasIdentifier(bb:flatbuffers.ByteBuffer):boolean {
1884 return bb.__has_identifier('BFBS');
1885}
1886
1887objects(index: number, obj?:Object_):Object_|null {
1888 const offset = this.bb!.__offset(this.bb_pos, 4);
1889 return offset ? (obj || new Object_()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
1890}
1891
1892objectsLength():number {
1893 const offset = this.bb!.__offset(this.bb_pos, 4);
1894 return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
1895}
1896
1897enums(index: number, obj?:Enum):Enum|null {
1898 const offset = this.bb!.__offset(this.bb_pos, 6);
1899 return offset ? (obj || new Enum()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
1900}
1901
1902enumsLength():number {
1903 const offset = this.bb!.__offset(this.bb_pos, 6);
1904 return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
1905}
1906
1907fileIdent():string|null
1908fileIdent(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
1909fileIdent(optionalEncoding?:any):string|Uint8Array|null {
1910 const offset = this.bb!.__offset(this.bb_pos, 8);
1911 return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
1912}
1913
1914fileExt():string|null
1915fileExt(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
1916fileExt(optionalEncoding?:any):string|Uint8Array|null {
1917 const offset = this.bb!.__offset(this.bb_pos, 10);
1918 return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
1919}
1920
1921rootTable(obj?:Object_):Object_|null {
1922 const offset = this.bb!.__offset(this.bb_pos, 12);
1923 return offset ? (obj || new Object_()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
1924}
1925
1926services(index: number, obj?:Service):Service|null {
1927 const offset = this.bb!.__offset(this.bb_pos, 14);
1928 return offset ? (obj || new Service()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
1929}
1930
1931servicesLength():number {
1932 const offset = this.bb!.__offset(this.bb_pos, 14);
1933 return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
1934}
1935
1936advancedFeatures():bigint {
1937 const offset = this.bb!.__offset(this.bb_pos, 16);
1938 return offset ? this.bb!.readUint64(this.bb_pos + offset) : BigInt('0');
1939}
1940
1941mutate_advanced_features(value:bigint):boolean {
1942 const offset = this.bb!.__offset(this.bb_pos, 16);
1943
1944 if (offset === 0) {
1945 return false;
1946 }
1947
1948 this.bb!.writeUint64(this.bb_pos + offset, value);
1949 return true;
1950}
1951
1952/**
1953 * All the files used in this compilation. Files are relative to where
1954 * flatc was invoked.
1955 */
1956fbsFiles(index: number, obj?:SchemaFile):SchemaFile|null {
1957 const offset = this.bb!.__offset(this.bb_pos, 18);
1958 return offset ? (obj || new SchemaFile()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
1959}
1960
1961fbsFilesLength():number {
1962 const offset = this.bb!.__offset(this.bb_pos, 18);
1963 return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
1964}
1965
1966static getFullyQualifiedName():string {
1967 return 'reflection_Schema';
1968}
1969
1970static startSchema(builder:flatbuffers.Builder) {
1971 builder.startObject(8);
1972}
1973
1974static addObjects(builder:flatbuffers.Builder, objectsOffset:flatbuffers.Offset) {
1975 builder.addFieldOffset(0, objectsOffset, 0);
1976}
1977
1978static createObjectsVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
1979 builder.startVector(4, data.length, 4);
1980 for (let i = data.length - 1; i >= 0; i--) {
1981 builder.addOffset(data[i]!);
1982 }
1983 return builder.endVector();
1984}
1985
1986static startObjectsVector(builder:flatbuffers.Builder, numElems:number) {
1987 builder.startVector(4, numElems, 4);
1988}
1989
1990static addEnums(builder:flatbuffers.Builder, enumsOffset:flatbuffers.Offset) {
1991 builder.addFieldOffset(1, enumsOffset, 0);
1992}
1993
1994static createEnumsVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
1995 builder.startVector(4, data.length, 4);
1996 for (let i = data.length - 1; i >= 0; i--) {
1997 builder.addOffset(data[i]!);
1998 }
1999 return builder.endVector();
2000}
2001
2002static startEnumsVector(builder:flatbuffers.Builder, numElems:number) {
2003 builder.startVector(4, numElems, 4);
2004}
2005
2006static addFileIdent(builder:flatbuffers.Builder, fileIdentOffset:flatbuffers.Offset) {
2007 builder.addFieldOffset(2, fileIdentOffset, 0);
2008}
2009
2010static addFileExt(builder:flatbuffers.Builder, fileExtOffset:flatbuffers.Offset) {
2011 builder.addFieldOffset(3, fileExtOffset, 0);
2012}
2013
2014static addRootTable(builder:flatbuffers.Builder, rootTableOffset:flatbuffers.Offset) {
2015 builder.addFieldOffset(4, rootTableOffset, 0);
2016}
2017
2018static addServices(builder:flatbuffers.Builder, servicesOffset:flatbuffers.Offset) {
2019 builder.addFieldOffset(5, servicesOffset, 0);
2020}
2021
2022static createServicesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
2023 builder.startVector(4, data.length, 4);
2024 for (let i = data.length - 1; i >= 0; i--) {
2025 builder.addOffset(data[i]!);
2026 }
2027 return builder.endVector();
2028}
2029
2030static startServicesVector(builder:flatbuffers.Builder, numElems:number) {
2031 builder.startVector(4, numElems, 4);
2032}
2033
2034static addAdvancedFeatures(builder:flatbuffers.Builder, advancedFeatures:bigint) {
2035 builder.addFieldInt64(6, advancedFeatures, BigInt('0'));
2036}
2037
2038static addFbsFiles(builder:flatbuffers.Builder, fbsFilesOffset:flatbuffers.Offset) {
2039 builder.addFieldOffset(7, fbsFilesOffset, 0);
2040}
2041
2042static createFbsFilesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
2043 builder.startVector(4, data.length, 4);
2044 for (let i = data.length - 1; i >= 0; i--) {
2045 builder.addOffset(data[i]!);
2046 }
2047 return builder.endVector();
2048}
2049
2050static startFbsFilesVector(builder:flatbuffers.Builder, numElems:number) {
2051 builder.startVector(4, numElems, 4);
2052}
2053
2054static endSchema(builder:flatbuffers.Builder):flatbuffers.Offset {
2055 const offset = builder.endObject();
2056 builder.requiredField(offset, 4) // objects
2057 builder.requiredField(offset, 6) // enums
2058 return offset;
2059}
2060
2061static finishSchemaBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
2062 builder.finish(offset, 'BFBS');
2063}
2064
2065static finishSizePrefixedSchemaBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
2066 builder.finish(offset, 'BFBS', true);
2067}
2068
2069
2070unpack(): SchemaT {
2071 return new SchemaT(
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08002072 this.bb!.createObjList<Object_, Object_T>(this.objects.bind(this), this.objectsLength()),
2073 this.bb!.createObjList<Enum, EnumT>(this.enums.bind(this), this.enumsLength()),
Austin Schuh2dd86a92022-09-14 21:19:23 -07002074 this.fileIdent(),
2075 this.fileExt(),
2076 (this.rootTable() !== null ? this.rootTable()!.unpack() : null),
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08002077 this.bb!.createObjList<Service, ServiceT>(this.services.bind(this), this.servicesLength()),
Austin Schuh2dd86a92022-09-14 21:19:23 -07002078 this.advancedFeatures(),
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08002079 this.bb!.createObjList<SchemaFile, SchemaFileT>(this.fbsFiles.bind(this), this.fbsFilesLength())
Austin Schuh2dd86a92022-09-14 21:19:23 -07002080 );
2081}
2082
2083
2084unpackTo(_o: SchemaT): void {
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08002085 _o.objects = this.bb!.createObjList<Object_, Object_T>(this.objects.bind(this), this.objectsLength());
2086 _o.enums = this.bb!.createObjList<Enum, EnumT>(this.enums.bind(this), this.enumsLength());
Austin Schuh2dd86a92022-09-14 21:19:23 -07002087 _o.fileIdent = this.fileIdent();
2088 _o.fileExt = this.fileExt();
2089 _o.rootTable = (this.rootTable() !== null ? this.rootTable()!.unpack() : null);
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08002090 _o.services = this.bb!.createObjList<Service, ServiceT>(this.services.bind(this), this.servicesLength());
Austin Schuh2dd86a92022-09-14 21:19:23 -07002091 _o.advancedFeatures = this.advancedFeatures();
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08002092 _o.fbsFiles = this.bb!.createObjList<SchemaFile, SchemaFileT>(this.fbsFiles.bind(this), this.fbsFilesLength());
Austin Schuh2dd86a92022-09-14 21:19:23 -07002093}
2094}
2095
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08002096export class SchemaT implements flatbuffers.IGeneratedObject {
Austin Schuh2dd86a92022-09-14 21:19:23 -07002097constructor(
2098 public objects: (Object_T)[] = [],
2099 public enums: (EnumT)[] = [],
2100 public fileIdent: string|Uint8Array|null = null,
2101 public fileExt: string|Uint8Array|null = null,
2102 public rootTable: Object_T|null = null,
2103 public services: (ServiceT)[] = [],
2104 public advancedFeatures: bigint = BigInt('0'),
2105 public fbsFiles: (SchemaFileT)[] = []
2106){}
2107
2108
2109pack(builder:flatbuffers.Builder): flatbuffers.Offset {
2110 const objects = Schema.createObjectsVector(builder, builder.createObjectOffsetList(this.objects));
2111 const enums = Schema.createEnumsVector(builder, builder.createObjectOffsetList(this.enums));
2112 const fileIdent = (this.fileIdent !== null ? builder.createString(this.fileIdent!) : 0);
2113 const fileExt = (this.fileExt !== null ? builder.createString(this.fileExt!) : 0);
2114 const rootTable = (this.rootTable !== null ? this.rootTable!.pack(builder) : 0);
2115 const services = Schema.createServicesVector(builder, builder.createObjectOffsetList(this.services));
2116 const fbsFiles = Schema.createFbsFilesVector(builder, builder.createObjectOffsetList(this.fbsFiles));
2117
2118 Schema.startSchema(builder);
2119 Schema.addObjects(builder, objects);
2120 Schema.addEnums(builder, enums);
2121 Schema.addFileIdent(builder, fileIdent);
2122 Schema.addFileExt(builder, fileExt);
2123 Schema.addRootTable(builder, rootTable);
2124 Schema.addServices(builder, services);
2125 Schema.addAdvancedFeatures(builder, this.advancedFeatures);
2126 Schema.addFbsFiles(builder, fbsFiles);
2127
2128 return Schema.endSchema(builder);
2129}
2130}
2131