# automatically generated by the FlatBuffers compiler, do not modify

# namespace: openmeteo_sdk

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

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

    @classmethod
    def SizeOf(cls) -> int:
        return 24

    # TimeRange
    def Init(self, buf: bytes, pos: int):
        self._tab = flatbuffers.table.Table(buf, pos)

    # TimeRange
    def Start(self): return self._tab.Get(flatbuffers.number_types.Int64Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0))
    # TimeRange
    def End(self): return self._tab.Get(flatbuffers.number_types.Int64Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(8))
    # TimeRange
    def Interval(self): return self._tab.Get(flatbuffers.number_types.Int32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(16))

def CreateTimeRange(builder, start, end, interval):
    builder.Prep(8, 24)
    builder.Pad(4)
    builder.PrependInt32(interval)
    builder.PrependInt64(end)
    builder.PrependInt64(start)
    return builder.Offset()
