70 lines
2.3 KiB
TypeScript
70 lines
2.3 KiB
TypeScript
// 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';
|
|
|
|
import { Update, unionToUpdate, unionListToUpdate } from '../video-update/update.js';
|
|
|
|
|
|
export class VideoUpdate {
|
|
bb: flatbuffers.ByteBuffer|null = null;
|
|
bb_pos = 0;
|
|
__init(i:number, bb:flatbuffers.ByteBuffer):VideoUpdate {
|
|
this.bb_pos = i;
|
|
this.bb = bb;
|
|
return this;
|
|
}
|
|
|
|
static getRootAsVideoUpdate(bb:flatbuffers.ByteBuffer, obj?:VideoUpdate):VideoUpdate {
|
|
return (obj || new VideoUpdate()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
}
|
|
|
|
static getSizePrefixedRootAsVideoUpdate(bb:flatbuffers.ByteBuffer, obj?:VideoUpdate):VideoUpdate {
|
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
return (obj || new VideoUpdate()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
}
|
|
|
|
updateType():Update {
|
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
return offset ? this.bb!.readUint8(this.bb_pos + offset) : Update.NONE;
|
|
}
|
|
|
|
update<T extends flatbuffers.Table>(obj:any):any|null {
|
|
const offset = this.bb!.__offset(this.bb_pos, 6);
|
|
return offset ? this.bb!.__union(obj, this.bb_pos + offset) : null;
|
|
}
|
|
|
|
static startVideoUpdate(builder:flatbuffers.Builder) {
|
|
builder.startObject(2);
|
|
}
|
|
|
|
static addUpdateType(builder:flatbuffers.Builder, updateType:Update) {
|
|
builder.addFieldInt8(0, updateType, Update.NONE);
|
|
}
|
|
|
|
static addUpdate(builder:flatbuffers.Builder, updateOffset:flatbuffers.Offset) {
|
|
builder.addFieldOffset(1, updateOffset, 0);
|
|
}
|
|
|
|
static endVideoUpdate(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
const offset = builder.endObject();
|
|
return offset;
|
|
}
|
|
|
|
static finishVideoUpdateBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
|
|
builder.finish(offset);
|
|
}
|
|
|
|
static finishSizePrefixedVideoUpdateBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
|
|
builder.finish(offset, undefined, true);
|
|
}
|
|
|
|
static createVideoUpdate(builder:flatbuffers.Builder, updateType:Update, updateOffset:flatbuffers.Offset):flatbuffers.Offset {
|
|
VideoUpdate.startVideoUpdate(builder);
|
|
VideoUpdate.addUpdateType(builder, updateType);
|
|
VideoUpdate.addUpdate(builder, updateOffset);
|
|
return VideoUpdate.endVideoUpdate(builder);
|
|
}
|
|
}
|