# automatically generated by the FlatBuffers compiler, do not modify

# namespace: foxglove

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

# GeoJSON data for annotating maps
class GeoJSON(object):
    __slots__ = ['_tab']

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

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

    # GeoJSON data encoded as a UTF-8 string
    # GeoJSON
    def Geojson(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

def GeoJSONStart(builder): builder.StartObject(1)
def Start(builder):
    return GeoJSONStart(builder)
def GeoJSONAddGeojson(builder, geojson): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(geojson), 0)
def AddGeojson(builder, geojson):
    return GeoJSONAddGeojson(builder, geojson)
def GeoJSONEnd(builder): return builder.EndObject()
def End(builder):
    return GeoJSONEnd(builder)