"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""

import builtins
import collections.abc
import typing

import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.message

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@typing.final
class ValuesDef(google.protobuf.message.Message):
    """Control flow context related protocol buffers.

    Protocol buffer representing the values in ControlFlowContext.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

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

        KEY_FIELD_NUMBER: builtins.int
        VALUE_FIELD_NUMBER: builtins.int
        key: builtins.str
        value: builtins.str
        def __init__(self, *, key: builtins.str | None = ..., value: builtins.str | None = ...) -> None: ...
        def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...

    VALUES_FIELD_NUMBER: builtins.int
    EXTERNAL_VALUES_FIELD_NUMBER: builtins.int
    @property
    def values(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """Value names that have been seen in this context."""

    @property
    def external_values(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]:
        """Value names referenced by but external to this context."""

    def __init__(
        self,
        *,
        values: collections.abc.Iterable[builtins.str] | None = ...,
        external_values: collections.abc.Mapping[builtins.str, builtins.str] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["external_values", b"external_values", "values", b"values"]) -> None: ...

global___ValuesDef = ValuesDef

@typing.final
class ControlFlowContextDef(google.protobuf.message.Message):
    """Container for any kind of control flow context. Any other control flow
    contexts that are added below should also be added here.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    COND_CTXT_FIELD_NUMBER: builtins.int
    WHILE_CTXT_FIELD_NUMBER: builtins.int
    @property
    def cond_ctxt(self) -> global___CondContextDef: ...
    @property
    def while_ctxt(self) -> global___WhileContextDef: ...
    def __init__(
        self, *, cond_ctxt: global___CondContextDef | None = ..., while_ctxt: global___WhileContextDef | None = ...
    ) -> None: ...
    def HasField(
        self, field_name: typing.Literal["cond_ctxt", b"cond_ctxt", "ctxt", b"ctxt", "while_ctxt", b"while_ctxt"]
    ) -> builtins.bool: ...
    def ClearField(
        self, field_name: typing.Literal["cond_ctxt", b"cond_ctxt", "ctxt", b"ctxt", "while_ctxt", b"while_ctxt"]
    ) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["ctxt", b"ctxt"]) -> typing.Literal["cond_ctxt", "while_ctxt"] | None: ...

global___ControlFlowContextDef = ControlFlowContextDef

@typing.final
class CondContextDef(google.protobuf.message.Message):
    """Protocol buffer representing a CondContext object."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    CONTEXT_NAME_FIELD_NUMBER: builtins.int
    PRED_NAME_FIELD_NUMBER: builtins.int
    PIVOT_NAME_FIELD_NUMBER: builtins.int
    BRANCH_FIELD_NUMBER: builtins.int
    VALUES_DEF_FIELD_NUMBER: builtins.int
    NESTED_CONTEXTS_FIELD_NUMBER: builtins.int
    context_name: builtins.str
    """Name of the context."""
    pred_name: builtins.str
    """Name of the pred tensor."""
    pivot_name: builtins.str
    """Name of the pivot tensor."""
    branch: builtins.int
    """Branch prediction. 0 or 1."""
    @property
    def values_def(self) -> global___ValuesDef:
        """Values and external values in control flow context."""

    @property
    def nested_contexts(
        self,
    ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ControlFlowContextDef]:
        """Contexts contained inside this context (e.g. nested conds)."""

    def __init__(
        self,
        *,
        context_name: builtins.str | None = ...,
        pred_name: builtins.str | None = ...,
        pivot_name: builtins.str | None = ...,
        branch: builtins.int | None = ...,
        values_def: global___ValuesDef | None = ...,
        nested_contexts: collections.abc.Iterable[global___ControlFlowContextDef] | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["values_def", b"values_def"]) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing.Literal[
            "branch",
            b"branch",
            "context_name",
            b"context_name",
            "nested_contexts",
            b"nested_contexts",
            "pivot_name",
            b"pivot_name",
            "pred_name",
            b"pred_name",
            "values_def",
            b"values_def",
        ],
    ) -> None: ...

global___CondContextDef = CondContextDef

@typing.final
class WhileContextDef(google.protobuf.message.Message):
    """Protocol buffer representing a WhileContext object."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    CONTEXT_NAME_FIELD_NUMBER: builtins.int
    PARALLEL_ITERATIONS_FIELD_NUMBER: builtins.int
    BACK_PROP_FIELD_NUMBER: builtins.int
    SWAP_MEMORY_FIELD_NUMBER: builtins.int
    PIVOT_NAME_FIELD_NUMBER: builtins.int
    PIVOT_FOR_PRED_NAME_FIELD_NUMBER: builtins.int
    PIVOT_FOR_BODY_NAME_FIELD_NUMBER: builtins.int
    LOOP_EXIT_NAMES_FIELD_NUMBER: builtins.int
    LOOP_ENTER_NAMES_FIELD_NUMBER: builtins.int
    VALUES_DEF_FIELD_NUMBER: builtins.int
    MAXIMUM_ITERATIONS_NAME_FIELD_NUMBER: builtins.int
    NESTED_CONTEXTS_FIELD_NUMBER: builtins.int
    context_name: builtins.str
    """Name of the context."""
    parallel_iterations: builtins.int
    """The number of iterations allowed to run in parallel."""
    back_prop: builtins.bool
    """Whether backprop is enabled for this while loop."""
    swap_memory: builtins.bool
    """Whether GPU-CPU memory swap is enabled for this loop."""
    pivot_name: builtins.str
    """Name of the pivot tensor."""
    pivot_for_pred_name: builtins.str
    """Name of the pivot_for_pred tensor."""
    pivot_for_body_name: builtins.str
    """Name of the pivot_for_body tensor."""
    maximum_iterations_name: builtins.str
    """Optional name of the maximum_iterations tensor."""
    @property
    def loop_exit_names(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """List of names for exit tensors."""

    @property
    def loop_enter_names(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """List of names for enter tensors."""

    @property
    def values_def(self) -> global___ValuesDef:
        """Values and external values in control flow context."""

    @property
    def nested_contexts(
        self,
    ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ControlFlowContextDef]:
        """Contexts contained inside this context (e.g. nested whiles)."""

    def __init__(
        self,
        *,
        context_name: builtins.str | None = ...,
        parallel_iterations: builtins.int | None = ...,
        back_prop: builtins.bool | None = ...,
        swap_memory: builtins.bool | None = ...,
        pivot_name: builtins.str | None = ...,
        pivot_for_pred_name: builtins.str | None = ...,
        pivot_for_body_name: builtins.str | None = ...,
        loop_exit_names: collections.abc.Iterable[builtins.str] | None = ...,
        loop_enter_names: collections.abc.Iterable[builtins.str] | None = ...,
        values_def: global___ValuesDef | None = ...,
        maximum_iterations_name: builtins.str | None = ...,
        nested_contexts: collections.abc.Iterable[global___ControlFlowContextDef] | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["values_def", b"values_def"]) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing.Literal[
            "back_prop",
            b"back_prop",
            "context_name",
            b"context_name",
            "loop_enter_names",
            b"loop_enter_names",
            "loop_exit_names",
            b"loop_exit_names",
            "maximum_iterations_name",
            b"maximum_iterations_name",
            "nested_contexts",
            b"nested_contexts",
            "parallel_iterations",
            b"parallel_iterations",
            "pivot_for_body_name",
            b"pivot_for_body_name",
            "pivot_for_pred_name",
            b"pivot_for_pred_name",
            "pivot_name",
            b"pivot_name",
            "swap_memory",
            b"swap_memory",
            "values_def",
            b"values_def",
        ],
    ) -> None: ...

global___WhileContextDef = WhileContextDef
