// 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 Float64Value {
  bb: flatbuffers.ByteBuffer|null = null;
  bb_pos = 0;
  __init(i:number, bb:flatbuffers.ByteBuffer):Float64Value {
  this.bb_pos = i;
  this.bb = bb;
  return this;
}

static getRootAsFloat64Value(bb:flatbuffers.ByteBuffer, obj?:Float64Value):Float64Value {
  return (obj || new Float64Value()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}

static getSizePrefixedRootAsFloat64Value(bb:flatbuffers.ByteBuffer, obj?:Float64Value):Float64Value {
  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
  return (obj || new Float64Value()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}

v():number {
  const offset = this.bb!.__offset(this.bb_pos, 4);
  return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 0.0;
}

static startFloat64Value(builder:flatbuffers.Builder) {
  builder.startObject(1);
}

static addV(builder:flatbuffers.Builder, v:number) {
  builder.addFieldFloat64(0, v, 0.0);
}

static endFloat64Value(builder:flatbuffers.Builder):flatbuffers.Offset {
  const offset = builder.endObject();
  return offset;
}

static createFloat64Value(builder:flatbuffers.Builder, v:number):flatbuffers.Offset {
  Float64Value.startFloat64Value(builder);
  Float64Value.addV(builder, v);
  return Float64Value.endFloat64Value(builder);
}
}
