// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
 * @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
export class C {
  constructor() {
    this.bb = null;
    this.bb_pos = 0;
  }
  __init(i, bb) {
    this.bb_pos = i;
    this.bb = bb;
    return this;
  }
  static getRootAsC(bb, obj) {
    return (obj || new C())
        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
  }
  static getSizePrefixedRootAsC(bb, obj) {
    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
    return (obj || new C())
        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
  }
  c() {
    const offset = this.bb.__offset(this.bb_pos, 4);
    return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
  }
  mutate_c(value) {
    const offset = this.bb.__offset(this.bb_pos, 4);
    if (offset === 0) {
      return false;
    }
    this.bb.writeInt8(this.bb_pos + offset, +value);
    return true;
  }
  static getFullyQualifiedName() {
    return 'UnionUnderlyingType.C';
  }
  static startC(builder) {
    builder.startObject(1);
  }
  static addC(builder, c) {
    builder.addFieldInt8(0, +c, +false);
  }
  static endC(builder) {
    const offset = builder.endObject();
    return offset;
  }
  static createC(builder, c) {
    C.startC(builder);
    C.addC(builder, c);
    return C.endC(builder);
  }
  unpack() {
    return new CT(this.c());
  }
  unpackTo(_o) {
    _o.c = this.c();
  }
}
export class CT {
  constructor(c = false) {
    this.c = c;
  }
  pack(builder) {
    return C.createC(builder, this.c);
  }
}
