"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
Copyright 2022-present Open Networking Foundation
Copyright 2022 Intel Corporation
SPDX-License-Identifier: Apache-2.0
"""

import builtins
import collections.abc
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.message
import typing

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@typing.final
class P4RoleConfig(google.protobuf.message.Message):
    """The P4RoleConfig message conists of these fields:
     exclusive_p4_ids - A list of P4 entities for which this role exclusivly may
         issue Write updates. Those entities are also filtered out of Read
         responses.
     shared_p4_ids - A list of P4 entities for which this role may issue Write
         updates. Access to those entities is shared with other roles. Those
         entities are also filtered out of Read responses.
     packet_in_filter - A single PacketFilter that is applied to incoming packets
         to determine whether this role should receive them. An empty list
         results in no filtering. This is a positive filter, a packet must
         contain the exact specified value to be forwarded.
     receives_packet_ins - A toggle to set if this role should receive PacketIns.
     can_push_pipeline - Determines if this role is allowed to push a pipeline.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    @typing.final
    class PacketFilter(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        METADATA_ID_FIELD_NUMBER: builtins.int
        VALUE_FIELD_NUMBER: builtins.int
        metadata_id: builtins.int
        """Must match an ID in the P4Info."""
        value: builtins.bytes
        """Should be given in canonical form."""
        def __init__(
            self,
            *,
            metadata_id: builtins.int = ...,
            value: builtins.bytes = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["metadata_id", b"metadata_id", "value", b"value"]) -> None: ...

    EXCLUSIVE_P4_IDS_FIELD_NUMBER: builtins.int
    SHARED_P4_IDS_FIELD_NUMBER: builtins.int
    PACKET_IN_FILTER_FIELD_NUMBER: builtins.int
    RECEIVES_PACKET_INS_FIELD_NUMBER: builtins.int
    CAN_PUSH_PIPELINE_FIELD_NUMBER: builtins.int
    receives_packet_ins: builtins.bool
    can_push_pipeline: builtins.bool
    @property
    def exclusive_p4_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ...
    @property
    def shared_p4_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ...
    @property
    def packet_in_filter(self) -> global___P4RoleConfig.PacketFilter: ...
    def __init__(
        self,
        *,
        exclusive_p4_ids: collections.abc.Iterable[builtins.int] | None = ...,
        shared_p4_ids: collections.abc.Iterable[builtins.int] | None = ...,
        packet_in_filter: global___P4RoleConfig.PacketFilter | None = ...,
        receives_packet_ins: builtins.bool = ...,
        can_push_pipeline: builtins.bool = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["packet_in_filter", b"packet_in_filter"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["can_push_pipeline", b"can_push_pipeline", "exclusive_p4_ids", b"exclusive_p4_ids", "packet_in_filter", b"packet_in_filter", "receives_packet_ins", b"receives_packet_ins", "shared_p4_ids", b"shared_p4_ids"]) -> None: ...

global___P4RoleConfig = P4RoleConfig
