# automatically generated by the FlatBuffers compiler, do not modify

# namespace: proto

from autobahn import flatbuffers
from autobahn.flatbuffers.compat import import_numpy

np = import_numpy()


class PublisherFeatures(object):
    __slots__ = ["_tab"]

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

    @classmethod
    def GetRootAsPublisherFeatures(cls, buf, offset=0):
        """This method is deprecated. Please switch to GetRootAs."""
        return cls.GetRootAs(buf, offset)

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

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

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

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

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

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

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


def PublisherFeaturesStart(builder):
    builder.StartObject(6)


def Start(builder):
    PublisherFeaturesStart(builder)


def PublisherFeaturesAddPublisherIdentification(builder, publisherIdentification):
    builder.PrependBoolSlot(0, publisherIdentification, 0)


def AddPublisherIdentification(builder, publisherIdentification):
    PublisherFeaturesAddPublisherIdentification(builder, publisherIdentification)


def PublisherFeaturesAddPublisherExclusion(builder, publisherExclusion):
    builder.PrependBoolSlot(1, publisherExclusion, 0)


def AddPublisherExclusion(builder, publisherExclusion):
    PublisherFeaturesAddPublisherExclusion(builder, publisherExclusion)


def PublisherFeaturesAddSubscriberBlackwhiteListing(
    builder, subscriberBlackwhiteListing
):
    builder.PrependBoolSlot(2, subscriberBlackwhiteListing, 0)


def AddSubscriberBlackwhiteListing(builder, subscriberBlackwhiteListing):
    PublisherFeaturesAddSubscriberBlackwhiteListing(
        builder, subscriberBlackwhiteListing
    )


def PublisherFeaturesAddAcknowledgeEventReceived(builder, acknowledgeEventReceived):
    builder.PrependBoolSlot(3, acknowledgeEventReceived, 0)


def AddAcknowledgeEventReceived(builder, acknowledgeEventReceived):
    PublisherFeaturesAddAcknowledgeEventReceived(builder, acknowledgeEventReceived)


def PublisherFeaturesAddPayloadTransparency(builder, payloadTransparency):
    builder.PrependBoolSlot(4, payloadTransparency, 0)


def AddPayloadTransparency(builder, payloadTransparency):
    PublisherFeaturesAddPayloadTransparency(builder, payloadTransparency)


def PublisherFeaturesAddPayloadEncryptionCryptobox(builder, payloadEncryptionCryptobox):
    builder.PrependBoolSlot(5, payloadEncryptionCryptobox, 0)


def AddPayloadEncryptionCryptobox(builder, payloadEncryptionCryptobox):
    PublisherFeaturesAddPayloadEncryptionCryptobox(builder, payloadEncryptionCryptobox)


def PublisherFeaturesEnd(builder):
    return builder.EndObject()


def End(builder):
    return PublisherFeaturesEnd(builder)
