# automatically generated by the FlatBuffers compiler, do not modify

# namespace: fbs

import flatbuffers
from flatbuffers.compat import import_numpy
from typing import Any
from typing import Optional
np = import_numpy()

class VideoExport(object):
    __slots__ = ['_tab']

    @classmethod
    def GetRootAs(cls, buf, offset: int = 0):
        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
        x = VideoExport()
        x.Init(buf, n + offset)
        return x

    @classmethod
    def GetRootAsVideoExport(cls, buf, offset=0):
        """This method is deprecated. Please switch to GetRootAs."""
        return cls.GetRootAs(buf, offset)
    # VideoExport
    def Init(self, buf: bytes, pos: int):
        self._tab = flatbuffers.table.Table(buf, pos)

    # VideoExport
    def Recording(self) -> Optional[str]:
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

    # VideoExport
    def Filepath(self) -> Optional[str]:
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

    # VideoExport
    def Description(self) -> Optional[str]:
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

    # VideoExport
    def Format(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
        return 0

    # VideoExport
    def Fps(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
        return 0.0

    # VideoExport
    def TStart(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
        return 0

    # VideoExport
    def TEnd(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
        return 0

    # VideoExport
    def CloseAfterCompletion(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18))
        if o != 0:
            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
        return False

def VideoExportStart(builder: flatbuffers.Builder):
    builder.StartObject(8)

def Start(builder: flatbuffers.Builder):
    VideoExportStart(builder)

def VideoExportAddRecording(builder: flatbuffers.Builder, recording: int):
    builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(recording), 0)

def AddRecording(builder: flatbuffers.Builder, recording: int):
    VideoExportAddRecording(builder, recording)

def VideoExportAddFilepath(builder: flatbuffers.Builder, filepath: int):
    builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(filepath), 0)

def AddFilepath(builder: flatbuffers.Builder, filepath: int):
    VideoExportAddFilepath(builder, filepath)

def VideoExportAddDescription(builder: flatbuffers.Builder, description: int):
    builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(description), 0)

def AddDescription(builder: flatbuffers.Builder, description: int):
    VideoExportAddDescription(builder, description)

def VideoExportAddFormat(builder: flatbuffers.Builder, format: int):
    builder.PrependInt32Slot(3, format, 0)

def AddFormat(builder: flatbuffers.Builder, format: int):
    VideoExportAddFormat(builder, format)

def VideoExportAddFps(builder: flatbuffers.Builder, fps: float):
    builder.PrependFloat32Slot(4, fps, 0.0)

def AddFps(builder: flatbuffers.Builder, fps: float):
    VideoExportAddFps(builder, fps)

def VideoExportAddTStart(builder: flatbuffers.Builder, tStart: int):
    builder.PrependInt32Slot(5, tStart, 0)

def AddTStart(builder: flatbuffers.Builder, tStart: int):
    VideoExportAddTStart(builder, tStart)

def VideoExportAddTEnd(builder: flatbuffers.Builder, tEnd: int):
    builder.PrependInt32Slot(6, tEnd, 0)

def AddTEnd(builder: flatbuffers.Builder, tEnd: int):
    VideoExportAddTEnd(builder, tEnd)

def VideoExportAddCloseAfterCompletion(builder: flatbuffers.Builder, closeAfterCompletion: bool):
    builder.PrependBoolSlot(7, closeAfterCompletion, 0)

def AddCloseAfterCompletion(builder: flatbuffers.Builder, closeAfterCompletion: bool):
    VideoExportAddCloseAfterCompletion(builder, closeAfterCompletion)

def VideoExportEnd(builder: flatbuffers.Builder) -> int:
    return builder.EndObject()

def End(builder: flatbuffers.Builder) -> int:
    return VideoExportEnd(builder)
