// automatically generated by the FlatBuffers compiler, do not modify
console.log("csa_generated.js loaded");

/**
 * @const
 * @namespace
 */
var casymda = casymda || {};

/**
 * @const
 * @namespace
 */
casymda.visualization = casymda.visualization || {};

/**
 * @const
 * @namespace
 */
casymda.visualization.web_server = casymda.visualization.web_server || {};

/**
 * @const
 * @namespace
 */
casymda.visualization.web_server.flatbuffers =
  casymda.visualization.web_server.flatbuffers || {};

/**
 * @enum {number}
 */
casymda.visualization.web_server.flatbuffers.ElementsUnion = {
  NONE: 0,
  Photo: 1,
  Image: 2,
  Text: 3,
};

/**
 * @enum {string}
 */
casymda.visualization.web_server.flatbuffers.ElementsUnionName = {
  0: "NONE",
  1: "Photo",
  2: "Image",
  3: "Text",
};

/**
 * @constructor
 */
casymda.visualization.web_server.flatbuffers.Canvas = function () {
  /**
   * @type {flatbuffers.ByteBuffer}
   */
  this.bb = null;

  /**
   * @type {number}
   */
  this.bb_pos = 0;
};

/**
 * @param {number} i
 * @param {flatbuffers.ByteBuffer} bb
 * @returns {casymda.visualization.web_server.flatbuffers.Canvas}
 */
casymda.visualization.web_server.flatbuffers.Canvas.prototype.__init = function (
  i,
  bb
) {
  this.bb_pos = i;
  this.bb = bb;
  return this;
};

/**
 * @param {flatbuffers.ByteBuffer} bb
 * @param {casymda.visualization.web_server.flatbuffers.Canvas=} obj
 * @returns {casymda.visualization.web_server.flatbuffers.Canvas}
 */
casymda.visualization.web_server.flatbuffers.Canvas.getRootAsCanvas = function (
  bb,
  obj
) {
  return (
    obj || new casymda.visualization.web_server.flatbuffers.Canvas()
  ).__init(bb.readInt32(bb.position()) + bb.position(), bb);
};

/**
 * @param {flatbuffers.ByteBuffer} bb
 * @param {casymda.visualization.web_server.flatbuffers.Canvas=} obj
 * @returns {casymda.visualization.web_server.flatbuffers.Canvas}
 */
casymda.visualization.web_server.flatbuffers.Canvas.getSizePrefixedRootAsCanvas = function (
  bb,
  obj
) {
  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
  return (
    obj || new casymda.visualization.web_server.flatbuffers.Canvas()
  ).__init(bb.readInt32(bb.position()) + bb.position(), bb);
};

/**
 * @param {number} index
 * @param {casymda.visualization.web_server.flatbuffers.Element=} obj
 * @returns {casymda.visualization.web_server.flatbuffers.Element}
 */
casymda.visualization.web_server.flatbuffers.Canvas.prototype.content = function (
  index,
  obj
) {
  var offset = this.bb.__offset(this.bb_pos, 4);
  return offset
    ? (
        obj || new casymda.visualization.web_server.flatbuffers.Element()
      ).__init(
        this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4),
        this.bb
      )
    : null;
};

/**
 * @returns {number}
 */
casymda.visualization.web_server.flatbuffers.Canvas.prototype.contentLength = function () {
  var offset = this.bb.__offset(this.bb_pos, 4);
  return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
};

/**
 * @param {flatbuffers.Builder} builder
 */
casymda.visualization.web_server.flatbuffers.Canvas.startCanvas = function (
  builder
) {
  builder.startObject(1);
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {flatbuffers.Offset} contentOffset
 */
casymda.visualization.web_server.flatbuffers.Canvas.addContent = function (
  builder,
  contentOffset
) {
  builder.addFieldOffset(0, contentOffset, 0);
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {Array.<flatbuffers.Offset>} data
 * @returns {flatbuffers.Offset}
 */
casymda.visualization.web_server.flatbuffers.Canvas.createContentVector = function (
  builder,
  data
) {
  builder.startVector(4, data.length, 4);
  for (var i = data.length - 1; i >= 0; i--) {
    builder.addOffset(data[i]);
  }
  return builder.endVector();
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {number} numElems
 */
casymda.visualization.web_server.flatbuffers.Canvas.startContentVector = function (
  builder,
  numElems
) {
  builder.startVector(4, numElems, 4);
};

/**
 * @param {flatbuffers.Builder} builder
 * @returns {flatbuffers.Offset}
 */
casymda.visualization.web_server.flatbuffers.Canvas.endCanvas = function (
  builder
) {
  var offset = builder.endObject();
  return offset;
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {flatbuffers.Offset} offset
 */
casymda.visualization.web_server.flatbuffers.Canvas.finishCanvasBuffer = function (
  builder,
  offset
) {
  builder.finish(offset);
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {flatbuffers.Offset} offset
 */
casymda.visualization.web_server.flatbuffers.Canvas.finishSizePrefixedCanvasBuffer = function (
  builder,
  offset
) {
  builder.finish(offset, undefined, true);
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {flatbuffers.Offset} contentOffset
 * @returns {flatbuffers.Offset}
 */
casymda.visualization.web_server.flatbuffers.Canvas.createCanvas = function (
  builder,
  contentOffset
) {
  casymda.visualization.web_server.flatbuffers.Canvas.startCanvas(builder);
  casymda.visualization.web_server.flatbuffers.Canvas.addContent(
    builder,
    contentOffset
  );
  return casymda.visualization.web_server.flatbuffers.Canvas.endCanvas(builder);
};

/**
 * @constructor
 */
casymda.visualization.web_server.flatbuffers.Element = function () {
  /**
   * @type {flatbuffers.ByteBuffer}
   */
  this.bb = null;

  /**
   * @type {number}
   */
  this.bb_pos = 0;
};

/**
 * @param {number} i
 * @param {flatbuffers.ByteBuffer} bb
 * @returns {casymda.visualization.web_server.flatbuffers.Element}
 */
casymda.visualization.web_server.flatbuffers.Element.prototype.__init = function (
  i,
  bb
) {
  this.bb_pos = i;
  this.bb = bb;
  return this;
};

/**
 * @param {flatbuffers.ByteBuffer} bb
 * @param {casymda.visualization.web_server.flatbuffers.Element=} obj
 * @returns {casymda.visualization.web_server.flatbuffers.Element}
 */
casymda.visualization.web_server.flatbuffers.Element.getRootAsElement = function (
  bb,
  obj
) {
  return (
    obj || new casymda.visualization.web_server.flatbuffers.Element()
  ).__init(bb.readInt32(bb.position()) + bb.position(), bb);
};

/**
 * @param {flatbuffers.ByteBuffer} bb
 * @param {casymda.visualization.web_server.flatbuffers.Element=} obj
 * @returns {casymda.visualization.web_server.flatbuffers.Element}
 */
casymda.visualization.web_server.flatbuffers.Element.getSizePrefixedRootAsElement = function (
  bb,
  obj
) {
  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
  return (
    obj || new casymda.visualization.web_server.flatbuffers.Element()
  ).__init(bb.readInt32(bb.position()) + bb.position(), bb);
};

/**
 * @returns {number}
 */
casymda.visualization.web_server.flatbuffers.Element.prototype.id = function () {
  var offset = this.bb.__offset(this.bb_pos, 4);
  return offset ? this.bb.readUint16(this.bb_pos + offset) : 0;
};

/**
 * @returns {casymda.visualization.web_server.flatbuffers.ElementsUnion}
 */
casymda.visualization.web_server.flatbuffers.Element.prototype.elementType = function () {
  var offset = this.bb.__offset(this.bb_pos, 6);
  return offset
    ? /** @type {casymda.visualization.web_server.flatbuffers.ElementsUnion} */ (this.bb.readUint8(
        this.bb_pos + offset
      ))
    : casymda.visualization.web_server.flatbuffers.ElementsUnion.NONE;
};

/**
 * @param {flatbuffers.Table} obj
 * @returns {?flatbuffers.Table}
 */
casymda.visualization.web_server.flatbuffers.Element.prototype.element = function (
  obj
) {
  var offset = this.bb.__offset(this.bb_pos, 8);
  return offset ? this.bb.__union(obj, this.bb_pos + offset) : null;
};

/**
 * @param {flatbuffers.Builder} builder
 */
casymda.visualization.web_server.flatbuffers.Element.startElement = function (
  builder
) {
  builder.startObject(3);
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {number} id
 */
casymda.visualization.web_server.flatbuffers.Element.addId = function (
  builder,
  id
) {
  builder.addFieldInt16(0, id, 0);
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {casymda.visualization.web_server.flatbuffers.ElementsUnion} elementType
 */
casymda.visualization.web_server.flatbuffers.Element.addElementType = function (
  builder,
  elementType
) {
  builder.addFieldInt8(
    1,
    elementType,
    casymda.visualization.web_server.flatbuffers.ElementsUnion.NONE
  );
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {flatbuffers.Offset} elementOffset
 */
casymda.visualization.web_server.flatbuffers.Element.addElement = function (
  builder,
  elementOffset
) {
  builder.addFieldOffset(2, elementOffset, 0);
};

/**
 * @param {flatbuffers.Builder} builder
 * @returns {flatbuffers.Offset}
 */
casymda.visualization.web_server.flatbuffers.Element.endElement = function (
  builder
) {
  var offset = builder.endObject();
  return offset;
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {number} id
 * @param {casymda.visualization.web_server.flatbuffers.ElementsUnion} elementType
 * @param {flatbuffers.Offset} elementOffset
 * @returns {flatbuffers.Offset}
 */
casymda.visualization.web_server.flatbuffers.Element.createElement = function (
  builder,
  id,
  elementType,
  elementOffset
) {
  casymda.visualization.web_server.flatbuffers.Element.startElement(builder);
  casymda.visualization.web_server.flatbuffers.Element.addId(builder, id);
  casymda.visualization.web_server.flatbuffers.Element.addElementType(
    builder,
    elementType
  );
  casymda.visualization.web_server.flatbuffers.Element.addElement(
    builder,
    elementOffset
  );
  return casymda.visualization.web_server.flatbuffers.Element.endElement(
    builder
  );
};

/**
 * @constructor
 */
casymda.visualization.web_server.flatbuffers.Photo = function () {
  /**
   * @type {flatbuffers.ByteBuffer}
   */
  this.bb = null;

  /**
   * @type {number}
   */
  this.bb_pos = 0;
};

/**
 * @param {number} i
 * @param {flatbuffers.ByteBuffer} bb
 * @returns {casymda.visualization.web_server.flatbuffers.Photo}
 */
casymda.visualization.web_server.flatbuffers.Photo.prototype.__init = function (
  i,
  bb
) {
  this.bb_pos = i;
  this.bb = bb;
  return this;
};

/**
 * @param {flatbuffers.ByteBuffer} bb
 * @param {casymda.visualization.web_server.flatbuffers.Photo=} obj
 * @returns {casymda.visualization.web_server.flatbuffers.Photo}
 */
casymda.visualization.web_server.flatbuffers.Photo.getRootAsPhoto = function (
  bb,
  obj
) {
  return (
    obj || new casymda.visualization.web_server.flatbuffers.Photo()
  ).__init(bb.readInt32(bb.position()) + bb.position(), bb);
};

/**
 * @param {flatbuffers.ByteBuffer} bb
 * @param {casymda.visualization.web_server.flatbuffers.Photo=} obj
 * @returns {casymda.visualization.web_server.flatbuffers.Photo}
 */
casymda.visualization.web_server.flatbuffers.Photo.getSizePrefixedRootAsPhoto = function (
  bb,
  obj
) {
  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
  return (
    obj || new casymda.visualization.web_server.flatbuffers.Photo()
  ).__init(bb.readInt32(bb.position()) + bb.position(), bb);
};

/**
 * @returns {number}
 */
casymda.visualization.web_server.flatbuffers.Photo.prototype.factor = function () {
  var offset = this.bb.__offset(this.bb_pos, 4);
  return offset ? this.bb.readFloat32(this.bb_pos + offset) : 1.0;
};

/**
 * @param {flatbuffers.Encoding=} optionalEncoding
 * @returns {string|Uint8Array|null}
 */
casymda.visualization.web_server.flatbuffers.Photo.prototype.path = function (
  optionalEncoding
) {
  var offset = this.bb.__offset(this.bb_pos, 6);
  return offset
    ? this.bb.__string(this.bb_pos + offset, optionalEncoding)
    : null;
};

/**
 * @param {flatbuffers.Builder} builder
 */
casymda.visualization.web_server.flatbuffers.Photo.startPhoto = function (
  builder
) {
  builder.startObject(2);
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {number} factor
 */
casymda.visualization.web_server.flatbuffers.Photo.addFactor = function (
  builder,
  factor
) {
  builder.addFieldFloat32(0, factor, 1.0);
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {flatbuffers.Offset} pathOffset
 */
casymda.visualization.web_server.flatbuffers.Photo.addPath = function (
  builder,
  pathOffset
) {
  builder.addFieldOffset(1, pathOffset, 0);
};

/**
 * @param {flatbuffers.Builder} builder
 * @returns {flatbuffers.Offset}
 */
casymda.visualization.web_server.flatbuffers.Photo.endPhoto = function (
  builder
) {
  var offset = builder.endObject();
  return offset;
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {number} factor
 * @param {flatbuffers.Offset} pathOffset
 * @returns {flatbuffers.Offset}
 */
casymda.visualization.web_server.flatbuffers.Photo.createPhoto = function (
  builder,
  factor,
  pathOffset
) {
  casymda.visualization.web_server.flatbuffers.Photo.startPhoto(builder);
  casymda.visualization.web_server.flatbuffers.Photo.addFactor(builder, factor);
  casymda.visualization.web_server.flatbuffers.Photo.addPath(
    builder,
    pathOffset
  );
  return casymda.visualization.web_server.flatbuffers.Photo.endPhoto(builder);
};

/**
 * @constructor
 */
casymda.visualization.web_server.flatbuffers.Image = function () {
  /**
   * @type {flatbuffers.ByteBuffer}
   */
  this.bb = null;

  /**
   * @type {number}
   */
  this.bb_pos = 0;
};

/**
 * @param {number} i
 * @param {flatbuffers.ByteBuffer} bb
 * @returns {casymda.visualization.web_server.flatbuffers.Image}
 */
casymda.visualization.web_server.flatbuffers.Image.prototype.__init = function (
  i,
  bb
) {
  this.bb_pos = i;
  this.bb = bb;
  return this;
};

/**
 * @param {flatbuffers.ByteBuffer} bb
 * @param {casymda.visualization.web_server.flatbuffers.Image=} obj
 * @returns {casymda.visualization.web_server.flatbuffers.Image}
 */
casymda.visualization.web_server.flatbuffers.Image.getRootAsImage = function (
  bb,
  obj
) {
  return (
    obj || new casymda.visualization.web_server.flatbuffers.Image()
  ).__init(bb.readInt32(bb.position()) + bb.position(), bb);
};

/**
 * @param {flatbuffers.ByteBuffer} bb
 * @param {casymda.visualization.web_server.flatbuffers.Image=} obj
 * @returns {casymda.visualization.web_server.flatbuffers.Image}
 */
casymda.visualization.web_server.flatbuffers.Image.getSizePrefixedRootAsImage = function (
  bb,
  obj
) {
  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
  return (
    obj || new casymda.visualization.web_server.flatbuffers.Image()
  ).__init(bb.readInt32(bb.position()) + bb.position(), bb);
};

/**
 * @param {casymda.visualization.web_server.flatbuffers.CanvasPosition=} obj
 * @returns {casymda.visualization.web_server.flatbuffers.CanvasPosition|null}
 */
casymda.visualization.web_server.flatbuffers.Image.prototype.position = function (
  obj
) {
  var offset = this.bb.__offset(this.bb_pos, 4);
  return offset
    ? (
        obj || new casymda.visualization.web_server.flatbuffers.CanvasPosition()
      ).__init(this.bb_pos + offset, this.bb)
    : null;
};

/**
 * @param {casymda.visualization.web_server.flatbuffers.Anchor=} obj
 * @returns {casymda.visualization.web_server.flatbuffers.Anchor|null}
 */
casymda.visualization.web_server.flatbuffers.Image.prototype.anchor = function (
  obj
) {
  var offset = this.bb.__offset(this.bb_pos, 6);
  return offset
    ? (obj || new casymda.visualization.web_server.flatbuffers.Anchor()).__init(
        this.bb_pos + offset,
        this.bb
      )
    : null;
};

/**
 * @returns {number}
 */
casymda.visualization.web_server.flatbuffers.Image.prototype.photoId = function () {
  var offset = this.bb.__offset(this.bb_pos, 8);
  return offset ? this.bb.readUint16(this.bb_pos + offset) : 0;
};

/**
 * @param {flatbuffers.Encoding=} optionalEncoding
 * @returns {string|Uint8Array|null}
 */
casymda.visualization.web_server.flatbuffers.Image.prototype.path = function (
  optionalEncoding
) {
  var offset = this.bb.__offset(this.bb_pos, 10);
  return offset
    ? this.bb.__string(this.bb_pos + offset, optionalEncoding)
    : null;
};

/**
 * @returns {number}
 */
casymda.visualization.web_server.flatbuffers.Image.prototype.factor = function () {
  var offset = this.bb.__offset(this.bb_pos, 12);
  return offset ? this.bb.readFloat32(this.bb_pos + offset) : 1.0;
};

/**
 * @param {flatbuffers.Builder} builder
 */
casymda.visualization.web_server.flatbuffers.Image.startImage = function (
  builder
) {
  builder.startObject(5);
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {flatbuffers.Offset} positionOffset
 */
casymda.visualization.web_server.flatbuffers.Image.addPosition = function (
  builder,
  positionOffset
) {
  builder.addFieldStruct(0, positionOffset, 0);
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {flatbuffers.Offset} anchorOffset
 */
casymda.visualization.web_server.flatbuffers.Image.addAnchor = function (
  builder,
  anchorOffset
) {
  builder.addFieldStruct(1, anchorOffset, 0);
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {number} photoId
 */
casymda.visualization.web_server.flatbuffers.Image.addPhotoId = function (
  builder,
  photoId
) {
  builder.addFieldInt16(2, photoId, 0);
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {flatbuffers.Offset} pathOffset
 */
casymda.visualization.web_server.flatbuffers.Image.addPath = function (
  builder,
  pathOffset
) {
  builder.addFieldOffset(3, pathOffset, 0);
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {number} factor
 */
casymda.visualization.web_server.flatbuffers.Image.addFactor = function (
  builder,
  factor
) {
  builder.addFieldFloat32(4, factor, 1.0);
};

/**
 * @param {flatbuffers.Builder} builder
 * @returns {flatbuffers.Offset}
 */
casymda.visualization.web_server.flatbuffers.Image.endImage = function (
  builder
) {
  var offset = builder.endObject();
  return offset;
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {flatbuffers.Offset} positionOffset
 * @param {flatbuffers.Offset} anchorOffset
 * @param {number} photoId
 * @param {flatbuffers.Offset} pathOffset
 * @param {number} factor
 * @returns {flatbuffers.Offset}
 */
casymda.visualization.web_server.flatbuffers.Image.createImage = function (
  builder,
  positionOffset,
  anchorOffset,
  photoId,
  pathOffset,
  factor
) {
  casymda.visualization.web_server.flatbuffers.Image.startImage(builder);
  casymda.visualization.web_server.flatbuffers.Image.addPosition(
    builder,
    positionOffset
  );
  casymda.visualization.web_server.flatbuffers.Image.addAnchor(
    builder,
    anchorOffset
  );
  casymda.visualization.web_server.flatbuffers.Image.addPhotoId(
    builder,
    photoId
  );
  casymda.visualization.web_server.flatbuffers.Image.addPath(
    builder,
    pathOffset
  );
  casymda.visualization.web_server.flatbuffers.Image.addFactor(builder, factor);
  return casymda.visualization.web_server.flatbuffers.Image.endImage(builder);
};

/**
 * @constructor
 */
casymda.visualization.web_server.flatbuffers.Text = function () {
  /**
   * @type {flatbuffers.ByteBuffer}
   */
  this.bb = null;

  /**
   * @type {number}
   */
  this.bb_pos = 0;
};

/**
 * @param {number} i
 * @param {flatbuffers.ByteBuffer} bb
 * @returns {casymda.visualization.web_server.flatbuffers.Text}
 */
casymda.visualization.web_server.flatbuffers.Text.prototype.__init = function (
  i,
  bb
) {
  this.bb_pos = i;
  this.bb = bb;
  return this;
};

/**
 * @param {flatbuffers.ByteBuffer} bb
 * @param {casymda.visualization.web_server.flatbuffers.Text=} obj
 * @returns {casymda.visualization.web_server.flatbuffers.Text}
 */
casymda.visualization.web_server.flatbuffers.Text.getRootAsText = function (
  bb,
  obj
) {
  return (
    obj || new casymda.visualization.web_server.flatbuffers.Text()
  ).__init(bb.readInt32(bb.position()) + bb.position(), bb);
};

/**
 * @param {flatbuffers.ByteBuffer} bb
 * @param {casymda.visualization.web_server.flatbuffers.Text=} obj
 * @returns {casymda.visualization.web_server.flatbuffers.Text}
 */
casymda.visualization.web_server.flatbuffers.Text.getSizePrefixedRootAsText = function (
  bb,
  obj
) {
  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
  return (
    obj || new casymda.visualization.web_server.flatbuffers.Text()
  ).__init(bb.readInt32(bb.position()) + bb.position(), bb);
};

/**
 * @param {casymda.visualization.web_server.flatbuffers.CanvasPosition=} obj
 * @returns {casymda.visualization.web_server.flatbuffers.CanvasPosition|null}
 */
casymda.visualization.web_server.flatbuffers.Text.prototype.position = function (
  obj
) {
  var offset = this.bb.__offset(this.bb_pos, 4);
  return offset
    ? (
        obj || new casymda.visualization.web_server.flatbuffers.CanvasPosition()
      ).__init(this.bb_pos + offset, this.bb)
    : null;
};

/**
 * @param {casymda.visualization.web_server.flatbuffers.Anchor=} obj
 * @returns {casymda.visualization.web_server.flatbuffers.Anchor|null}
 */
casymda.visualization.web_server.flatbuffers.Text.prototype.anchor = function (
  obj
) {
  var offset = this.bb.__offset(this.bb_pos, 6);
  return offset
    ? (obj || new casymda.visualization.web_server.flatbuffers.Anchor()).__init(
        this.bb_pos + offset,
        this.bb
      )
    : null;
};

/**
 * @param {flatbuffers.Encoding=} optionalEncoding
 * @returns {string|Uint8Array|null}
 */
casymda.visualization.web_server.flatbuffers.Text.prototype.text = function (
  optionalEncoding
) {
  var offset = this.bb.__offset(this.bb_pos, 8);
  return offset
    ? this.bb.__string(this.bb_pos + offset, optionalEncoding)
    : null;
};

/**
 * @param {flatbuffers.Encoding=} optionalEncoding
 * @returns {string|Uint8Array|null}
 */
casymda.visualization.web_server.flatbuffers.Text.prototype.fill = function (
  optionalEncoding
) {
  var offset = this.bb.__offset(this.bb_pos, 10);
  return offset
    ? this.bb.__string(this.bb_pos + offset, optionalEncoding)
    : null;
};

/**
 * @param {flatbuffers.Encoding=} optionalEncoding
 * @returns {string|Uint8Array|null}
 */
casymda.visualization.web_server.flatbuffers.Text.prototype.fontFamily = function (
  optionalEncoding
) {
  var offset = this.bb.__offset(this.bb_pos, 12);
  return offset
    ? this.bb.__string(this.bb_pos + offset, optionalEncoding)
    : null;
};

/**
 * @returns {number}
 */
casymda.visualization.web_server.flatbuffers.Text.prototype.fontSize = function () {
  var offset = this.bb.__offset(this.bb_pos, 14);
  return offset ? this.bb.readUint8(this.bb_pos + offset) : 10;
};

/**
 * @param {flatbuffers.Builder} builder
 */
casymda.visualization.web_server.flatbuffers.Text.startText = function (
  builder
) {
  builder.startObject(6);
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {flatbuffers.Offset} positionOffset
 */
casymda.visualization.web_server.flatbuffers.Text.addPosition = function (
  builder,
  positionOffset
) {
  builder.addFieldStruct(0, positionOffset, 0);
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {flatbuffers.Offset} anchorOffset
 */
casymda.visualization.web_server.flatbuffers.Text.addAnchor = function (
  builder,
  anchorOffset
) {
  builder.addFieldStruct(1, anchorOffset, 0);
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {flatbuffers.Offset} textOffset
 */
casymda.visualization.web_server.flatbuffers.Text.addText = function (
  builder,
  textOffset
) {
  builder.addFieldOffset(2, textOffset, 0);
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {flatbuffers.Offset} fillOffset
 */
casymda.visualization.web_server.flatbuffers.Text.addFill = function (
  builder,
  fillOffset
) {
  builder.addFieldOffset(3, fillOffset, 0);
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {flatbuffers.Offset} fontFamilyOffset
 */
casymda.visualization.web_server.flatbuffers.Text.addFontFamily = function (
  builder,
  fontFamilyOffset
) {
  builder.addFieldOffset(4, fontFamilyOffset, 0);
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {number} fontSize
 */
casymda.visualization.web_server.flatbuffers.Text.addFontSize = function (
  builder,
  fontSize
) {
  builder.addFieldInt8(5, fontSize, 10);
};

/**
 * @param {flatbuffers.Builder} builder
 * @returns {flatbuffers.Offset}
 */
casymda.visualization.web_server.flatbuffers.Text.endText = function (builder) {
  var offset = builder.endObject();
  return offset;
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {flatbuffers.Offset} positionOffset
 * @param {flatbuffers.Offset} anchorOffset
 * @param {flatbuffers.Offset} textOffset
 * @param {flatbuffers.Offset} fillOffset
 * @param {flatbuffers.Offset} fontFamilyOffset
 * @param {number} fontSize
 * @returns {flatbuffers.Offset}
 */
casymda.visualization.web_server.flatbuffers.Text.createText = function (
  builder,
  positionOffset,
  anchorOffset,
  textOffset,
  fillOffset,
  fontFamilyOffset,
  fontSize
) {
  casymda.visualization.web_server.flatbuffers.Text.startText(builder);
  casymda.visualization.web_server.flatbuffers.Text.addPosition(
    builder,
    positionOffset
  );
  casymda.visualization.web_server.flatbuffers.Text.addAnchor(
    builder,
    anchorOffset
  );
  casymda.visualization.web_server.flatbuffers.Text.addText(
    builder,
    textOffset
  );
  casymda.visualization.web_server.flatbuffers.Text.addFill(
    builder,
    fillOffset
  );
  casymda.visualization.web_server.flatbuffers.Text.addFontFamily(
    builder,
    fontFamilyOffset
  );
  casymda.visualization.web_server.flatbuffers.Text.addFontSize(
    builder,
    fontSize
  );
  return casymda.visualization.web_server.flatbuffers.Text.endText(builder);
};

/**
 * @constructor
 */
casymda.visualization.web_server.flatbuffers.CanvasPosition = function () {
  /**
   * @type {flatbuffers.ByteBuffer}
   */
  this.bb = null;

  /**
   * @type {number}
   */
  this.bb_pos = 0;
};

/**
 * @param {number} i
 * @param {flatbuffers.ByteBuffer} bb
 * @returns {casymda.visualization.web_server.flatbuffers.CanvasPosition}
 */
casymda.visualization.web_server.flatbuffers.CanvasPosition.prototype.__init = function (
  i,
  bb
) {
  this.bb_pos = i;
  this.bb = bb;
  return this;
};

/**
 * @returns {number}
 */
casymda.visualization.web_server.flatbuffers.CanvasPosition.prototype.x = function () {
  return this.bb.readUint16(this.bb_pos);
};

/**
 * @returns {number}
 */
casymda.visualization.web_server.flatbuffers.CanvasPosition.prototype.y = function () {
  return this.bb.readUint16(this.bb_pos + 2);
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {number} x
 * @param {number} y
 * @returns {flatbuffers.Offset}
 */
casymda.visualization.web_server.flatbuffers.CanvasPosition.createCanvasPosition = function (
  builder,
  x,
  y
) {
  builder.prep(2, 4);
  builder.writeInt16(y);
  builder.writeInt16(x);
  return builder.offset();
};

/**
 * @constructor
 */
casymda.visualization.web_server.flatbuffers.Anchor = function () {
  /**
   * @type {flatbuffers.ByteBuffer}
   */
  this.bb = null;

  /**
   * @type {number}
   */
  this.bb_pos = 0;
};

/**
 * @param {number} i
 * @param {flatbuffers.ByteBuffer} bb
 * @returns {casymda.visualization.web_server.flatbuffers.Anchor}
 */
casymda.visualization.web_server.flatbuffers.Anchor.prototype.__init = function (
  i,
  bb
) {
  this.bb_pos = i;
  this.bb = bb;
  return this;
};

/**
 * @returns {number}
 */
casymda.visualization.web_server.flatbuffers.Anchor.prototype.x = function () {
  return this.bb.readFloat32(this.bb_pos);
};

/**
 * @returns {number}
 */
casymda.visualization.web_server.flatbuffers.Anchor.prototype.y = function () {
  return this.bb.readFloat32(this.bb_pos + 4);
};

/**
 * @param {flatbuffers.Builder} builder
 * @param {number} x
 * @param {number} y
 * @returns {flatbuffers.Offset}
 */
casymda.visualization.web_server.flatbuffers.Anchor.createAnchor = function (
  builder,
  x,
  y
) {
  builder.prep(4, 8);
  builder.writeFloat32(y);
  builder.writeFloat32(x);
  return builder.offset();
};

// Exports for Node.js and RequireJS
export { casymda };
