"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
Copyright 2013-present Barefoot Networks, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

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 P4Data(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    BITSTRING_FIELD_NUMBER: builtins.int
    VARBIT_FIELD_NUMBER: builtins.int
    BOOL_FIELD_NUMBER: builtins.int
    TUPLE_FIELD_NUMBER: builtins.int
    STRUCT_FIELD_NUMBER: builtins.int
    HEADER_FIELD_NUMBER: builtins.int
    HEADER_UNION_FIELD_NUMBER: builtins.int
    HEADER_STACK_FIELD_NUMBER: builtins.int
    HEADER_UNION_STACK_FIELD_NUMBER: builtins.int
    ENUM_FIELD_NUMBER: builtins.int
    ERROR_FIELD_NUMBER: builtins.int
    ENUM_VALUE_FIELD_NUMBER: builtins.int
    bitstring: builtins.bytes
    """for bit<W>, int<W>"""
    bool: builtins.bool
    enum: builtins.str
    """safe (non-serializable) enums only"""
    error: builtins.str
    enum_value: builtins.bytes
    """serializable enums only"""
    @property
    def varbit(self) -> global___P4Varbit:
        """for varbit<W>"""

    @property
    def tuple(self) -> global___P4StructLike: ...
    @property
    def struct(self) -> global___P4StructLike: ...
    @property
    def header(self) -> global___P4Header: ...
    @property
    def header_union(self) -> global___P4HeaderUnion: ...
    @property
    def header_stack(self) -> global___P4HeaderStack: ...
    @property
    def header_union_stack(self) -> global___P4HeaderUnionStack: ...
    def __init__(
        self,
        *,
        bitstring: builtins.bytes = ...,
        varbit: global___P4Varbit | None = ...,
        bool: builtins.bool = ...,
        tuple: global___P4StructLike | None = ...,
        struct: global___P4StructLike | None = ...,
        header: global___P4Header | None = ...,
        header_union: global___P4HeaderUnion | None = ...,
        header_stack: global___P4HeaderStack | None = ...,
        header_union_stack: global___P4HeaderUnionStack | None = ...,
        enum: builtins.str = ...,
        error: builtins.str = ...,
        enum_value: builtins.bytes = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["bitstring", b"bitstring", "bool", b"bool", "data", b"data", "enum", b"enum", "enum_value", b"enum_value", "error", b"error", "header", b"header", "header_stack", b"header_stack", "header_union", b"header_union", "header_union_stack", b"header_union_stack", "struct", b"struct", "tuple", b"tuple", "varbit", b"varbit"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["bitstring", b"bitstring", "bool", b"bool", "data", b"data", "enum", b"enum", "enum_value", b"enum_value", "error", b"error", "header", b"header", "header_stack", b"header_stack", "header_union", b"header_union", "header_union_stack", b"header_union_stack", "struct", b"struct", "tuple", b"tuple", "varbit", b"varbit"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["data", b"data"]) -> typing.Literal["bitstring", "varbit", "bool", "tuple", "struct", "header", "header_union", "header_stack", "header_union_stack", "enum", "error", "enum_value"] | None: ...

global___P4Data = P4Data

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

    BITSTRING_FIELD_NUMBER: builtins.int
    BITWIDTH_FIELD_NUMBER: builtins.int
    bitstring: builtins.bytes
    bitwidth: builtins.int
    """dynamic bitwidth of the field"""
    def __init__(
        self,
        *,
        bitstring: builtins.bytes = ...,
        bitwidth: builtins.int = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["bitstring", b"bitstring", "bitwidth", b"bitwidth"]) -> None: ...

global___P4Varbit = P4Varbit

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

    MEMBERS_FIELD_NUMBER: builtins.int
    @property
    def members(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___P4Data]: ...
    def __init__(
        self,
        *,
        members: collections.abc.Iterable[global___P4Data] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["members", b"members"]) -> None: ...

global___P4StructLike = P4StructLike

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

    IS_VALID_FIELD_NUMBER: builtins.int
    BITSTRINGS_FIELD_NUMBER: builtins.int
    is_valid: builtins.bool
    """If the header is invalid (is_valid is "false"), then the bitstrings
    repeated field must be empty.
    """
    @property
    def bitstrings(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]: ...
    def __init__(
        self,
        *,
        is_valid: builtins.bool = ...,
        bitstrings: collections.abc.Iterable[builtins.bytes] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["bitstrings", b"bitstrings", "is_valid", b"is_valid"]) -> None: ...

global___P4Header = P4Header

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

    VALID_HEADER_NAME_FIELD_NUMBER: builtins.int
    VALID_HEADER_FIELD_NUMBER: builtins.int
    valid_header_name: builtins.str
    """An empty string indicates that none of the union members are valid and
    valid_header must therefore be unset.
    """
    @property
    def valid_header(self) -> global___P4Header: ...
    def __init__(
        self,
        *,
        valid_header_name: builtins.str = ...,
        valid_header: global___P4Header | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["valid_header", b"valid_header"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["valid_header", b"valid_header", "valid_header_name", b"valid_header_name"]) -> None: ...

global___P4HeaderUnion = P4HeaderUnion

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

    ENTRIES_FIELD_NUMBER: builtins.int
    @property
    def entries(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___P4Header]:
        """The length of this repeated field must always be equal to the compile-time
        size of the header stack, which is specified in P4Info.
        """

    def __init__(
        self,
        *,
        entries: collections.abc.Iterable[global___P4Header] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["entries", b"entries"]) -> None: ...

global___P4HeaderStack = P4HeaderStack

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

    ENTRIES_FIELD_NUMBER: builtins.int
    @property
    def entries(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___P4HeaderUnion]:
        """The length of this repeated field must always be equal to the compile-time
        size of the header union stack, which is specified in P4Info.
        """

    def __init__(
        self,
        *,
        entries: collections.abc.Iterable[global___P4HeaderUnion] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["entries", b"entries"]) -> None: ...

global___P4HeaderUnionStack = P4HeaderUnionStack
