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

import builtins
import collections.abc
import sys
import typing

import google.protobuf.descriptor
import google.protobuf.duration_pb2
import google.protobuf.empty_pb2
import google.protobuf.field_mask_pb2
import google.protobuf.internal.containers
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
import google.protobuf.timestamp_pb2

import temporalio.api.activity.v1.message_pb2
import temporalio.api.common.v1.message_pb2
import temporalio.api.deployment.v1.message_pb2
import temporalio.api.enums.v1.common_pb2
import temporalio.api.enums.v1.event_type_pb2
import temporalio.api.enums.v1.workflow_pb2
import temporalio.api.failure.v1.message_pb2
import temporalio.api.sdk.v1.user_metadata_pb2
import temporalio.api.taskqueue.v1.message_pb2

if sys.version_info >= (3, 10):
    import typing as typing_extensions
else:
    import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

class WorkflowExecutionInfo(google.protobuf.message.Message):
    """Hold basic information about a workflow execution.
    This structure is a part of visibility, and thus contain a limited subset of information.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    EXECUTION_FIELD_NUMBER: builtins.int
    TYPE_FIELD_NUMBER: builtins.int
    START_TIME_FIELD_NUMBER: builtins.int
    CLOSE_TIME_FIELD_NUMBER: builtins.int
    STATUS_FIELD_NUMBER: builtins.int
    HISTORY_LENGTH_FIELD_NUMBER: builtins.int
    PARENT_NAMESPACE_ID_FIELD_NUMBER: builtins.int
    PARENT_EXECUTION_FIELD_NUMBER: builtins.int
    EXECUTION_TIME_FIELD_NUMBER: builtins.int
    MEMO_FIELD_NUMBER: builtins.int
    SEARCH_ATTRIBUTES_FIELD_NUMBER: builtins.int
    AUTO_RESET_POINTS_FIELD_NUMBER: builtins.int
    TASK_QUEUE_FIELD_NUMBER: builtins.int
    STATE_TRANSITION_COUNT_FIELD_NUMBER: builtins.int
    HISTORY_SIZE_BYTES_FIELD_NUMBER: builtins.int
    MOST_RECENT_WORKER_VERSION_STAMP_FIELD_NUMBER: builtins.int
    EXECUTION_DURATION_FIELD_NUMBER: builtins.int
    ROOT_EXECUTION_FIELD_NUMBER: builtins.int
    ASSIGNED_BUILD_ID_FIELD_NUMBER: builtins.int
    INHERITED_BUILD_ID_FIELD_NUMBER: builtins.int
    FIRST_RUN_ID_FIELD_NUMBER: builtins.int
    VERSIONING_INFO_FIELD_NUMBER: builtins.int
    WORKER_DEPLOYMENT_NAME_FIELD_NUMBER: builtins.int
    PRIORITY_FIELD_NUMBER: builtins.int
    @property
    def execution(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ...
    @property
    def type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ...
    @property
    def start_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    @property
    def close_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    status: temporalio.api.enums.v1.workflow_pb2.WorkflowExecutionStatus.ValueType
    history_length: builtins.int
    parent_namespace_id: builtins.str
    @property
    def parent_execution(
        self,
    ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ...
    @property
    def execution_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    @property
    def memo(self) -> temporalio.api.common.v1.message_pb2.Memo: ...
    @property
    def search_attributes(
        self,
    ) -> temporalio.api.common.v1.message_pb2.SearchAttributes: ...
    @property
    def auto_reset_points(self) -> global___ResetPoints: ...
    task_queue: builtins.str
    state_transition_count: builtins.int
    history_size_bytes: builtins.int
    @property
    def most_recent_worker_version_stamp(
        self,
    ) -> temporalio.api.common.v1.message_pb2.WorkerVersionStamp:
        """If set, the most recent worker version stamp that appeared in a workflow task completion
        Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
        """
    @property
    def execution_duration(self) -> google.protobuf.duration_pb2.Duration:
        """Workflow execution duration is defined as difference between close time and execution time.
        This field is only populated if the workflow is closed.
        """
    @property
    def root_execution(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution:
        """Contains information about the root workflow execution.
        The root workflow execution is defined as follows:
        1. A workflow without parent workflow is its own root workflow.
        2. A workflow that has a parent workflow has the same root workflow as its parent workflow.
        Note: workflows continued as new or reseted may or may not have parents, check examples below.

        Examples:
          Scenario 1: Workflow W1 starts child workflow W2, and W2 starts child workflow W3.
            - The root workflow of all three workflows is W1.
          Scenario 2: Workflow W1 starts child workflow W2, and W2 continued as new W3.
            - The root workflow of all three workflows is W1.
          Scenario 3: Workflow W1 continued as new W2.
            - The root workflow of W1 is W1 and the root workflow of W2 is W2.
          Scenario 4: Workflow W1 starts child workflow W2, and W2 is reseted, creating W3
            - The root workflow of all three workflows is W1.
          Scenario 5: Workflow W1 is reseted, creating W2.
            - The root workflow of W1 is W1 and the root workflow of W2 is W2.
        """
    assigned_build_id: builtins.str
    """The currently assigned build ID for this execution. Presence of this value means worker versioning is used
    for this execution. Assigned build ID is selected based on Worker Versioning Assignment Rules
    when the first workflow task of the execution is scheduled. If the first workflow task fails and is scheduled
    again, the assigned build ID may change according to the latest versioning rules.
    Assigned build ID can also change in the middle of a execution if Compatible Redirect Rules are applied to
    this execution.
    Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
    """
    inherited_build_id: builtins.str
    """Build ID inherited from a previous/parent execution. If present, assigned_build_id will be set to this, instead
    of using the assignment rules.
    Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
    """
    first_run_id: builtins.str
    """The first run ID in the execution chain.
    Executions created via the following operations are considered to be in the same chain
    - ContinueAsNew
    - Workflow Retry
    - Workflow Reset
    - Cron Schedule
    """
    @property
    def versioning_info(self) -> global___WorkflowExecutionVersioningInfo:
        """Absent value means the workflow execution is not versioned. When present, the execution might
        be versioned or unversioned, depending on `versioning_info.behavior` and `versioning_info.versioning_override`.
        Experimental. Versioning info is experimental and might change in the future.
        """
    worker_deployment_name: builtins.str
    """The name of Worker Deployment that completed the most recent workflow task.
    Experimental. Worker Deployments are experimental and might change in the future.
    """
    @property
    def priority(self) -> temporalio.api.common.v1.message_pb2.Priority:
        """Priority metadata"""
    def __init__(
        self,
        *,
        execution: temporalio.api.common.v1.message_pb2.WorkflowExecution | None = ...,
        type: temporalio.api.common.v1.message_pb2.WorkflowType | None = ...,
        start_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        close_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        status: temporalio.api.enums.v1.workflow_pb2.WorkflowExecutionStatus.ValueType = ...,
        history_length: builtins.int = ...,
        parent_namespace_id: builtins.str = ...,
        parent_execution: temporalio.api.common.v1.message_pb2.WorkflowExecution
        | None = ...,
        execution_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        memo: temporalio.api.common.v1.message_pb2.Memo | None = ...,
        search_attributes: temporalio.api.common.v1.message_pb2.SearchAttributes
        | None = ...,
        auto_reset_points: global___ResetPoints | None = ...,
        task_queue: builtins.str = ...,
        state_transition_count: builtins.int = ...,
        history_size_bytes: builtins.int = ...,
        most_recent_worker_version_stamp: temporalio.api.common.v1.message_pb2.WorkerVersionStamp
        | None = ...,
        execution_duration: google.protobuf.duration_pb2.Duration | None = ...,
        root_execution: temporalio.api.common.v1.message_pb2.WorkflowExecution
        | None = ...,
        assigned_build_id: builtins.str = ...,
        inherited_build_id: builtins.str = ...,
        first_run_id: builtins.str = ...,
        versioning_info: global___WorkflowExecutionVersioningInfo | None = ...,
        worker_deployment_name: builtins.str = ...,
        priority: temporalio.api.common.v1.message_pb2.Priority | None = ...,
    ) -> None: ...
    def HasField(
        self,
        field_name: typing_extensions.Literal[
            "auto_reset_points",
            b"auto_reset_points",
            "close_time",
            b"close_time",
            "execution",
            b"execution",
            "execution_duration",
            b"execution_duration",
            "execution_time",
            b"execution_time",
            "memo",
            b"memo",
            "most_recent_worker_version_stamp",
            b"most_recent_worker_version_stamp",
            "parent_execution",
            b"parent_execution",
            "priority",
            b"priority",
            "root_execution",
            b"root_execution",
            "search_attributes",
            b"search_attributes",
            "start_time",
            b"start_time",
            "type",
            b"type",
            "versioning_info",
            b"versioning_info",
        ],
    ) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "assigned_build_id",
            b"assigned_build_id",
            "auto_reset_points",
            b"auto_reset_points",
            "close_time",
            b"close_time",
            "execution",
            b"execution",
            "execution_duration",
            b"execution_duration",
            "execution_time",
            b"execution_time",
            "first_run_id",
            b"first_run_id",
            "history_length",
            b"history_length",
            "history_size_bytes",
            b"history_size_bytes",
            "inherited_build_id",
            b"inherited_build_id",
            "memo",
            b"memo",
            "most_recent_worker_version_stamp",
            b"most_recent_worker_version_stamp",
            "parent_execution",
            b"parent_execution",
            "parent_namespace_id",
            b"parent_namespace_id",
            "priority",
            b"priority",
            "root_execution",
            b"root_execution",
            "search_attributes",
            b"search_attributes",
            "start_time",
            b"start_time",
            "state_transition_count",
            b"state_transition_count",
            "status",
            b"status",
            "task_queue",
            b"task_queue",
            "type",
            b"type",
            "versioning_info",
            b"versioning_info",
            "worker_deployment_name",
            b"worker_deployment_name",
        ],
    ) -> None: ...

global___WorkflowExecutionInfo = WorkflowExecutionInfo

class WorkflowExecutionExtendedInfo(google.protobuf.message.Message):
    """Holds all the extra information about workflow execution that is not part of Visibility."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    class RequestIdInfosEntry(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

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

    EXECUTION_EXPIRATION_TIME_FIELD_NUMBER: builtins.int
    RUN_EXPIRATION_TIME_FIELD_NUMBER: builtins.int
    CANCEL_REQUESTED_FIELD_NUMBER: builtins.int
    LAST_RESET_TIME_FIELD_NUMBER: builtins.int
    ORIGINAL_START_TIME_FIELD_NUMBER: builtins.int
    RESET_RUN_ID_FIELD_NUMBER: builtins.int
    REQUEST_ID_INFOS_FIELD_NUMBER: builtins.int
    @property
    def execution_expiration_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Workflow execution expiration time is defined as workflow start time plus expiration timeout.
        Workflow start time may change after workflow reset.
        """
    @property
    def run_expiration_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Workflow run expiration time is defined as current workflow run start time plus workflow run timeout."""
    cancel_requested: builtins.bool
    """indicates if the workflow received a cancel request"""
    @property
    def last_reset_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Last workflow reset time. Nil if the workflow was never reset."""
    @property
    def original_start_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Original workflow start time."""
    reset_run_id: builtins.str
    """Reset Run ID points to the new run when this execution is reset. If the execution is reset multiple times, it points to the latest run."""
    @property
    def request_id_infos(
        self,
    ) -> google.protobuf.internal.containers.MessageMap[
        builtins.str, global___RequestIdInfo
    ]:
        """Request ID information (eg: history event information associated with the request ID).
        Note: It only contains request IDs from StartWorkflowExecution requests, including indirect
        calls (eg: if SignalWithStartWorkflowExecution starts a new workflow, then the request ID is
        used in the StartWorkflowExecution request).
        """
    def __init__(
        self,
        *,
        execution_expiration_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        run_expiration_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        cancel_requested: builtins.bool = ...,
        last_reset_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        original_start_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        reset_run_id: builtins.str = ...,
        request_id_infos: collections.abc.Mapping[builtins.str, global___RequestIdInfo]
        | None = ...,
    ) -> None: ...
    def HasField(
        self,
        field_name: typing_extensions.Literal[
            "execution_expiration_time",
            b"execution_expiration_time",
            "last_reset_time",
            b"last_reset_time",
            "original_start_time",
            b"original_start_time",
            "run_expiration_time",
            b"run_expiration_time",
        ],
    ) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "cancel_requested",
            b"cancel_requested",
            "execution_expiration_time",
            b"execution_expiration_time",
            "last_reset_time",
            b"last_reset_time",
            "original_start_time",
            b"original_start_time",
            "request_id_infos",
            b"request_id_infos",
            "reset_run_id",
            b"reset_run_id",
            "run_expiration_time",
            b"run_expiration_time",
        ],
    ) -> None: ...

global___WorkflowExecutionExtendedInfo = WorkflowExecutionExtendedInfo

class WorkflowExecutionVersioningInfo(google.protobuf.message.Message):
    """Holds all the information about worker versioning for a particular workflow execution.
    Experimental. Versioning info is experimental and might change in the future.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    BEHAVIOR_FIELD_NUMBER: builtins.int
    DEPLOYMENT_FIELD_NUMBER: builtins.int
    VERSION_FIELD_NUMBER: builtins.int
    DEPLOYMENT_VERSION_FIELD_NUMBER: builtins.int
    VERSIONING_OVERRIDE_FIELD_NUMBER: builtins.int
    DEPLOYMENT_TRANSITION_FIELD_NUMBER: builtins.int
    VERSION_TRANSITION_FIELD_NUMBER: builtins.int
    behavior: temporalio.api.enums.v1.workflow_pb2.VersioningBehavior.ValueType
    """Versioning behavior determines how the server should treat this execution when workers are
    upgraded. When present it means this workflow execution is versioned; UNSPECIFIED means
    unversioned. See the comments in `VersioningBehavior` enum for more info about different
    behaviors.
    This field is first set after an execution completes its first workflow task on a versioned
    worker, and set again on completion of every subsequent workflow task.
    For child workflows of Pinned parents, this will be set to Pinned (along with `deployment_version`) when
    the the child starts so that child's first workflow task goes to the same Version as the
    parent. After the first workflow task, it depends on the child workflow itself if it wants
    to stay pinned or become unpinned (according to Versioning Behavior set in the worker).
    Note that `behavior` is overridden by `versioning_override` if the latter is present.
    """
    @property
    def deployment(self) -> temporalio.api.deployment.v1.message_pb2.Deployment:
        """The worker deployment that completed the last workflow task of this workflow execution. Must
        be present if `behavior` is set. Absent value means no workflow task is completed, or the
        last workflow task was completed by an unversioned worker. Unversioned workers may still send
        a deployment value which will be stored here, so the right way to check if an execution is
        versioned if an execution is versioned or not is via the `behavior` field.
        Note that `deployment` is overridden by `versioning_override` if the latter is present.
        Deprecated. Use `deployment_version`.
        """
    version: builtins.str
    """Deprecated. Use `deployment_version`."""
    @property
    def deployment_version(
        self,
    ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion:
        """The Worker Deployment Version that completed the last workflow task of this workflow execution.
        An absent value means no workflow task is completed, or the workflow is unversioned.
        If present, and `behavior` is UNSPECIFIED, the last task of this workflow execution was completed
        by a worker that is not using versioning but _is_ passing Deployment Name and Build ID.

        For child workflows of Pinned parents, this will be set to the parent's Pinned Version when
        the child starts, so that the child's first workflow task goes to the same Version as the parent.
        Note that if `versioning_override.behavior` is PINNED then `versioning_override.pinned_version`
        will override this value.
        """
    @property
    def versioning_override(self) -> global___VersioningOverride:
        """Present if user has set an execution-specific versioning override. This override takes
        precedence over SDK-sent `behavior` (and `version` when override is PINNED). An
        override can be set when starting a new execution, as well as afterwards by calling the
        `UpdateWorkflowExecutionOptions` API.
        Pinned overrides are automatically inherited by child workflows, continue-as-new workflows,
        workflow retries, and cron workflows.
        """
    @property
    def deployment_transition(self) -> global___DeploymentTransition:
        """When present, indicates the workflow is transitioning to a different deployment. Can
        indicate one of the following transitions: unversioned -> versioned, versioned -> versioned
        on a different deployment, or versioned -> unversioned.
        Not applicable to workflows with PINNED behavior.
        When a workflow with AUTO_UPGRADE behavior creates a new workflow task, it will automatically
        start a transition to the task queue's current deployment if the task queue's current
        deployment is different from the workflow's deployment.
        If the AUTO_UPGRADE workflow is stuck due to backlogged activity or workflow tasks, those
        tasks will be redirected to the task queue's current deployment. As soon as a poller from
        that deployment is available to receive the task, the workflow will automatically start a
        transition to that deployment and continue execution there.
        A deployment transition can only exist while there is a pending or started workflow task.
        Once the pending workflow task completes on the transition's target deployment, the
        transition completes and the workflow's `deployment` and `behavior` fields are updated per
        the worker's task completion response.
        Pending activities will not start new attempts during a transition. Once the transition is
        completed, pending activities will start their next attempt on the new deployment.
        Deprecated. Use version_transition.
        """
    @property
    def version_transition(self) -> global___DeploymentVersionTransition:
        """When present, indicates the workflow is transitioning to a different deployment version
        (which may belong to the same deployment name or another). Can indicate one of the following
        transitions: unversioned -> versioned, versioned -> versioned
        on a different deployment version, or versioned -> unversioned.
        Not applicable to workflows with PINNED behavior.
        When a workflow with AUTO_UPGRADE behavior creates a new workflow task, it will automatically
        start a transition to the task queue's current version if the task queue's current version is
        different from the workflow's current deployment version.
        If the AUTO_UPGRADE workflow is stuck due to backlogged activity or workflow tasks, those
        tasks will be redirected to the task queue's current version. As soon as a poller from
        that deployment version is available to receive the task, the workflow will automatically
        start a transition to that version and continue execution there.
        A version transition can only exist while there is a pending or started workflow task.
        Once the pending workflow task completes on the transition's target version, the
        transition completes and the workflow's `behavior`, and `deployment_version` fields are updated per the
        worker's task completion response.
        Pending activities will not start new attempts during a transition. Once the transition is
        completed, pending activities will start their next attempt on the new version.
        """
    def __init__(
        self,
        *,
        behavior: temporalio.api.enums.v1.workflow_pb2.VersioningBehavior.ValueType = ...,
        deployment: temporalio.api.deployment.v1.message_pb2.Deployment | None = ...,
        version: builtins.str = ...,
        deployment_version: temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion
        | None = ...,
        versioning_override: global___VersioningOverride | None = ...,
        deployment_transition: global___DeploymentTransition | None = ...,
        version_transition: global___DeploymentVersionTransition | None = ...,
    ) -> None: ...
    def HasField(
        self,
        field_name: typing_extensions.Literal[
            "deployment",
            b"deployment",
            "deployment_transition",
            b"deployment_transition",
            "deployment_version",
            b"deployment_version",
            "version_transition",
            b"version_transition",
            "versioning_override",
            b"versioning_override",
        ],
    ) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "behavior",
            b"behavior",
            "deployment",
            b"deployment",
            "deployment_transition",
            b"deployment_transition",
            "deployment_version",
            b"deployment_version",
            "version",
            b"version",
            "version_transition",
            b"version_transition",
            "versioning_override",
            b"versioning_override",
        ],
    ) -> None: ...

global___WorkflowExecutionVersioningInfo = WorkflowExecutionVersioningInfo

class DeploymentTransition(google.protobuf.message.Message):
    """Holds information about ongoing transition of a workflow execution from one deployment to another.
    Deprecated. Use DeploymentVersionTransition.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    DEPLOYMENT_FIELD_NUMBER: builtins.int
    @property
    def deployment(self) -> temporalio.api.deployment.v1.message_pb2.Deployment:
        """The target deployment of the transition. Null means a so-far-versioned workflow is
        transitioning to unversioned workers.
        """
    def __init__(
        self,
        *,
        deployment: temporalio.api.deployment.v1.message_pb2.Deployment | None = ...,
    ) -> None: ...
    def HasField(
        self, field_name: typing_extensions.Literal["deployment", b"deployment"]
    ) -> builtins.bool: ...
    def ClearField(
        self, field_name: typing_extensions.Literal["deployment", b"deployment"]
    ) -> None: ...

global___DeploymentTransition = DeploymentTransition

class DeploymentVersionTransition(google.protobuf.message.Message):
    """Holds information about ongoing transition of a workflow execution from one worker
    deployment version to another.
    Experimental. Might change in the future.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    VERSION_FIELD_NUMBER: builtins.int
    DEPLOYMENT_VERSION_FIELD_NUMBER: builtins.int
    version: builtins.str
    """Deprecated. Use `deployment_version`."""
    @property
    def deployment_version(
        self,
    ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion:
        """The target Version of the transition.
        If nil, a so-far-versioned workflow is transitioning to unversioned workers.
        """
    def __init__(
        self,
        *,
        version: builtins.str = ...,
        deployment_version: temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion
        | None = ...,
    ) -> None: ...
    def HasField(
        self,
        field_name: typing_extensions.Literal[
            "deployment_version", b"deployment_version"
        ],
    ) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "deployment_version", b"deployment_version", "version", b"version"
        ],
    ) -> None: ...

global___DeploymentVersionTransition = DeploymentVersionTransition

class WorkflowExecutionConfig(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    TASK_QUEUE_FIELD_NUMBER: builtins.int
    WORKFLOW_EXECUTION_TIMEOUT_FIELD_NUMBER: builtins.int
    WORKFLOW_RUN_TIMEOUT_FIELD_NUMBER: builtins.int
    DEFAULT_WORKFLOW_TASK_TIMEOUT_FIELD_NUMBER: builtins.int
    USER_METADATA_FIELD_NUMBER: builtins.int
    @property
    def task_queue(self) -> temporalio.api.taskqueue.v1.message_pb2.TaskQueue: ...
    @property
    def workflow_execution_timeout(self) -> google.protobuf.duration_pb2.Duration: ...
    @property
    def workflow_run_timeout(self) -> google.protobuf.duration_pb2.Duration: ...
    @property
    def default_workflow_task_timeout(
        self,
    ) -> google.protobuf.duration_pb2.Duration: ...
    @property
    def user_metadata(self) -> temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata:
        """User metadata provided on start workflow."""
    def __init__(
        self,
        *,
        task_queue: temporalio.api.taskqueue.v1.message_pb2.TaskQueue | None = ...,
        workflow_execution_timeout: google.protobuf.duration_pb2.Duration | None = ...,
        workflow_run_timeout: google.protobuf.duration_pb2.Duration | None = ...,
        default_workflow_task_timeout: google.protobuf.duration_pb2.Duration
        | None = ...,
        user_metadata: temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata
        | None = ...,
    ) -> None: ...
    def HasField(
        self,
        field_name: typing_extensions.Literal[
            "default_workflow_task_timeout",
            b"default_workflow_task_timeout",
            "task_queue",
            b"task_queue",
            "user_metadata",
            b"user_metadata",
            "workflow_execution_timeout",
            b"workflow_execution_timeout",
            "workflow_run_timeout",
            b"workflow_run_timeout",
        ],
    ) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "default_workflow_task_timeout",
            b"default_workflow_task_timeout",
            "task_queue",
            b"task_queue",
            "user_metadata",
            b"user_metadata",
            "workflow_execution_timeout",
            b"workflow_execution_timeout",
            "workflow_run_timeout",
            b"workflow_run_timeout",
        ],
    ) -> None: ...

global___WorkflowExecutionConfig = WorkflowExecutionConfig

class PendingActivityInfo(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    class PauseInfo(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        class Manual(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor

            IDENTITY_FIELD_NUMBER: builtins.int
            REASON_FIELD_NUMBER: builtins.int
            identity: builtins.str
            """The identity of the actor that paused the activity."""
            reason: builtins.str
            """Reason for pausing the activity."""
            def __init__(
                self,
                *,
                identity: builtins.str = ...,
                reason: builtins.str = ...,
            ) -> None: ...
            def ClearField(
                self,
                field_name: typing_extensions.Literal[
                    "identity", b"identity", "reason", b"reason"
                ],
            ) -> None: ...

        class Rule(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor

            RULE_ID_FIELD_NUMBER: builtins.int
            IDENTITY_FIELD_NUMBER: builtins.int
            REASON_FIELD_NUMBER: builtins.int
            rule_id: builtins.str
            """The rule that paused the activity."""
            identity: builtins.str
            """The identity of the actor that created the rule."""
            reason: builtins.str
            """Reason why rule was created. Populated from rule description."""
            def __init__(
                self,
                *,
                rule_id: builtins.str = ...,
                identity: builtins.str = ...,
                reason: builtins.str = ...,
            ) -> None: ...
            def ClearField(
                self,
                field_name: typing_extensions.Literal[
                    "identity", b"identity", "reason", b"reason", "rule_id", b"rule_id"
                ],
            ) -> None: ...

        PAUSE_TIME_FIELD_NUMBER: builtins.int
        MANUAL_FIELD_NUMBER: builtins.int
        RULE_FIELD_NUMBER: builtins.int
        @property
        def pause_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
            """The time when the activity was paused."""
        @property
        def manual(self) -> global___PendingActivityInfo.PauseInfo.Manual:
            """activity was paused by the manual intervention"""
        @property
        def rule(self) -> global___PendingActivityInfo.PauseInfo.Rule:
            """activity was paused by the rule"""
        def __init__(
            self,
            *,
            pause_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
            manual: global___PendingActivityInfo.PauseInfo.Manual | None = ...,
            rule: global___PendingActivityInfo.PauseInfo.Rule | None = ...,
        ) -> None: ...
        def HasField(
            self,
            field_name: typing_extensions.Literal[
                "manual",
                b"manual",
                "pause_time",
                b"pause_time",
                "paused_by",
                b"paused_by",
                "rule",
                b"rule",
            ],
        ) -> builtins.bool: ...
        def ClearField(
            self,
            field_name: typing_extensions.Literal[
                "manual",
                b"manual",
                "pause_time",
                b"pause_time",
                "paused_by",
                b"paused_by",
                "rule",
                b"rule",
            ],
        ) -> None: ...
        def WhichOneof(
            self, oneof_group: typing_extensions.Literal["paused_by", b"paused_by"]
        ) -> typing_extensions.Literal["manual", "rule"] | None: ...

    ACTIVITY_ID_FIELD_NUMBER: builtins.int
    ACTIVITY_TYPE_FIELD_NUMBER: builtins.int
    STATE_FIELD_NUMBER: builtins.int
    HEARTBEAT_DETAILS_FIELD_NUMBER: builtins.int
    LAST_HEARTBEAT_TIME_FIELD_NUMBER: builtins.int
    LAST_STARTED_TIME_FIELD_NUMBER: builtins.int
    ATTEMPT_FIELD_NUMBER: builtins.int
    MAXIMUM_ATTEMPTS_FIELD_NUMBER: builtins.int
    SCHEDULED_TIME_FIELD_NUMBER: builtins.int
    EXPIRATION_TIME_FIELD_NUMBER: builtins.int
    LAST_FAILURE_FIELD_NUMBER: builtins.int
    LAST_WORKER_IDENTITY_FIELD_NUMBER: builtins.int
    USE_WORKFLOW_BUILD_ID_FIELD_NUMBER: builtins.int
    LAST_INDEPENDENTLY_ASSIGNED_BUILD_ID_FIELD_NUMBER: builtins.int
    LAST_WORKER_VERSION_STAMP_FIELD_NUMBER: builtins.int
    CURRENT_RETRY_INTERVAL_FIELD_NUMBER: builtins.int
    LAST_ATTEMPT_COMPLETE_TIME_FIELD_NUMBER: builtins.int
    NEXT_ATTEMPT_SCHEDULE_TIME_FIELD_NUMBER: builtins.int
    PAUSED_FIELD_NUMBER: builtins.int
    LAST_DEPLOYMENT_FIELD_NUMBER: builtins.int
    LAST_WORKER_DEPLOYMENT_VERSION_FIELD_NUMBER: builtins.int
    LAST_DEPLOYMENT_VERSION_FIELD_NUMBER: builtins.int
    PRIORITY_FIELD_NUMBER: builtins.int
    PAUSE_INFO_FIELD_NUMBER: builtins.int
    ACTIVITY_OPTIONS_FIELD_NUMBER: builtins.int
    activity_id: builtins.str
    @property
    def activity_type(self) -> temporalio.api.common.v1.message_pb2.ActivityType: ...
    state: temporalio.api.enums.v1.workflow_pb2.PendingActivityState.ValueType
    @property
    def heartbeat_details(self) -> temporalio.api.common.v1.message_pb2.Payloads: ...
    @property
    def last_heartbeat_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    @property
    def last_started_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    attempt: builtins.int
    maximum_attempts: builtins.int
    @property
    def scheduled_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    @property
    def expiration_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    @property
    def last_failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: ...
    last_worker_identity: builtins.str
    @property
    def use_workflow_build_id(self) -> google.protobuf.empty_pb2.Empty:
        """Deprecated. When present, it means this activity is assigned to the build ID of its workflow."""
    last_independently_assigned_build_id: builtins.str
    """Deprecated. This means the activity is independently versioned and not bound to the build ID of its workflow.
    The activity will use the build id in this field instead.
    If the task fails and is scheduled again, the assigned build ID may change according to the latest versioning
    rules.
    """
    @property
    def last_worker_version_stamp(
        self,
    ) -> temporalio.api.common.v1.message_pb2.WorkerVersionStamp:
        """Deprecated. The version stamp of the worker to whom this activity was most recently dispatched
        This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
        """
    @property
    def current_retry_interval(self) -> google.protobuf.duration_pb2.Duration:
        """The time activity will wait until the next retry.
        If activity is currently running it will be next retry interval if activity failed.
        If activity is currently waiting it will be current retry interval.
        If there will be no retry it will be null.
        """
    @property
    def last_attempt_complete_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """The time when the last activity attempt was completed. If activity has not been completed yet then it will be null."""
    @property
    def next_attempt_schedule_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Next time when activity will be scheduled.
        If activity is currently scheduled or started it will be null.
        """
    paused: builtins.bool
    """Indicates if activity is paused."""
    @property
    def last_deployment(self) -> temporalio.api.deployment.v1.message_pb2.Deployment:
        """The deployment this activity was dispatched to most recently. Present only if the activity
        was dispatched to a versioned worker.
        Deprecated. Use `last_deployment_version`.
        """
    last_worker_deployment_version: builtins.str
    """The Worker Deployment Version this activity was dispatched to most recently.
    Deprecated. Use `last_deployment_version`.
    """
    @property
    def last_deployment_version(
        self,
    ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion:
        """The Worker Deployment Version this activity was dispatched to most recently.
        If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker.
        """
    @property
    def priority(self) -> temporalio.api.common.v1.message_pb2.Priority:
        """Priority metadata"""
    @property
    def pause_info(self) -> global___PendingActivityInfo.PauseInfo: ...
    @property
    def activity_options(
        self,
    ) -> temporalio.api.activity.v1.message_pb2.ActivityOptions:
        """Current activity options. May be different from the one used to start the activity."""
    def __init__(
        self,
        *,
        activity_id: builtins.str = ...,
        activity_type: temporalio.api.common.v1.message_pb2.ActivityType | None = ...,
        state: temporalio.api.enums.v1.workflow_pb2.PendingActivityState.ValueType = ...,
        heartbeat_details: temporalio.api.common.v1.message_pb2.Payloads | None = ...,
        last_heartbeat_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        last_started_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        attempt: builtins.int = ...,
        maximum_attempts: builtins.int = ...,
        scheduled_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        expiration_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        last_failure: temporalio.api.failure.v1.message_pb2.Failure | None = ...,
        last_worker_identity: builtins.str = ...,
        use_workflow_build_id: google.protobuf.empty_pb2.Empty | None = ...,
        last_independently_assigned_build_id: builtins.str = ...,
        last_worker_version_stamp: temporalio.api.common.v1.message_pb2.WorkerVersionStamp
        | None = ...,
        current_retry_interval: google.protobuf.duration_pb2.Duration | None = ...,
        last_attempt_complete_time: google.protobuf.timestamp_pb2.Timestamp
        | None = ...,
        next_attempt_schedule_time: google.protobuf.timestamp_pb2.Timestamp
        | None = ...,
        paused: builtins.bool = ...,
        last_deployment: temporalio.api.deployment.v1.message_pb2.Deployment
        | None = ...,
        last_worker_deployment_version: builtins.str = ...,
        last_deployment_version: temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion
        | None = ...,
        priority: temporalio.api.common.v1.message_pb2.Priority | None = ...,
        pause_info: global___PendingActivityInfo.PauseInfo | None = ...,
        activity_options: temporalio.api.activity.v1.message_pb2.ActivityOptions
        | None = ...,
    ) -> None: ...
    def HasField(
        self,
        field_name: typing_extensions.Literal[
            "activity_options",
            b"activity_options",
            "activity_type",
            b"activity_type",
            "assigned_build_id",
            b"assigned_build_id",
            "current_retry_interval",
            b"current_retry_interval",
            "expiration_time",
            b"expiration_time",
            "heartbeat_details",
            b"heartbeat_details",
            "last_attempt_complete_time",
            b"last_attempt_complete_time",
            "last_deployment",
            b"last_deployment",
            "last_deployment_version",
            b"last_deployment_version",
            "last_failure",
            b"last_failure",
            "last_heartbeat_time",
            b"last_heartbeat_time",
            "last_independently_assigned_build_id",
            b"last_independently_assigned_build_id",
            "last_started_time",
            b"last_started_time",
            "last_worker_version_stamp",
            b"last_worker_version_stamp",
            "next_attempt_schedule_time",
            b"next_attempt_schedule_time",
            "pause_info",
            b"pause_info",
            "priority",
            b"priority",
            "scheduled_time",
            b"scheduled_time",
            "use_workflow_build_id",
            b"use_workflow_build_id",
        ],
    ) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "activity_id",
            b"activity_id",
            "activity_options",
            b"activity_options",
            "activity_type",
            b"activity_type",
            "assigned_build_id",
            b"assigned_build_id",
            "attempt",
            b"attempt",
            "current_retry_interval",
            b"current_retry_interval",
            "expiration_time",
            b"expiration_time",
            "heartbeat_details",
            b"heartbeat_details",
            "last_attempt_complete_time",
            b"last_attempt_complete_time",
            "last_deployment",
            b"last_deployment",
            "last_deployment_version",
            b"last_deployment_version",
            "last_failure",
            b"last_failure",
            "last_heartbeat_time",
            b"last_heartbeat_time",
            "last_independently_assigned_build_id",
            b"last_independently_assigned_build_id",
            "last_started_time",
            b"last_started_time",
            "last_worker_deployment_version",
            b"last_worker_deployment_version",
            "last_worker_identity",
            b"last_worker_identity",
            "last_worker_version_stamp",
            b"last_worker_version_stamp",
            "maximum_attempts",
            b"maximum_attempts",
            "next_attempt_schedule_time",
            b"next_attempt_schedule_time",
            "pause_info",
            b"pause_info",
            "paused",
            b"paused",
            "priority",
            b"priority",
            "scheduled_time",
            b"scheduled_time",
            "state",
            b"state",
            "use_workflow_build_id",
            b"use_workflow_build_id",
        ],
    ) -> None: ...
    def WhichOneof(
        self,
        oneof_group: typing_extensions.Literal[
            "assigned_build_id", b"assigned_build_id"
        ],
    ) -> (
        typing_extensions.Literal[
            "use_workflow_build_id", "last_independently_assigned_build_id"
        ]
        | None
    ): ...

global___PendingActivityInfo = PendingActivityInfo

class PendingChildExecutionInfo(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    WORKFLOW_ID_FIELD_NUMBER: builtins.int
    RUN_ID_FIELD_NUMBER: builtins.int
    WORKFLOW_TYPE_NAME_FIELD_NUMBER: builtins.int
    INITIATED_ID_FIELD_NUMBER: builtins.int
    PARENT_CLOSE_POLICY_FIELD_NUMBER: builtins.int
    workflow_id: builtins.str
    run_id: builtins.str
    workflow_type_name: builtins.str
    initiated_id: builtins.int
    parent_close_policy: (
        temporalio.api.enums.v1.workflow_pb2.ParentClosePolicy.ValueType
    )
    """Default: PARENT_CLOSE_POLICY_TERMINATE."""
    def __init__(
        self,
        *,
        workflow_id: builtins.str = ...,
        run_id: builtins.str = ...,
        workflow_type_name: builtins.str = ...,
        initiated_id: builtins.int = ...,
        parent_close_policy: temporalio.api.enums.v1.workflow_pb2.ParentClosePolicy.ValueType = ...,
    ) -> None: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "initiated_id",
            b"initiated_id",
            "parent_close_policy",
            b"parent_close_policy",
            "run_id",
            b"run_id",
            "workflow_id",
            b"workflow_id",
            "workflow_type_name",
            b"workflow_type_name",
        ],
    ) -> None: ...

global___PendingChildExecutionInfo = PendingChildExecutionInfo

class PendingWorkflowTaskInfo(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    STATE_FIELD_NUMBER: builtins.int
    SCHEDULED_TIME_FIELD_NUMBER: builtins.int
    ORIGINAL_SCHEDULED_TIME_FIELD_NUMBER: builtins.int
    STARTED_TIME_FIELD_NUMBER: builtins.int
    ATTEMPT_FIELD_NUMBER: builtins.int
    state: temporalio.api.enums.v1.workflow_pb2.PendingWorkflowTaskState.ValueType
    @property
    def scheduled_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    @property
    def original_scheduled_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """original_scheduled_time is the scheduled time of the first workflow task during workflow task heartbeat.
        Heartbeat workflow task is done by RespondWorkflowTaskComplete with ForceCreateNewWorkflowTask == true and no command
        In this case, OriginalScheduledTime won't change. Then when current time - original_scheduled_time exceeds
        some threshold, the workflow task will be forced timeout.
        """
    @property
    def started_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    attempt: builtins.int
    def __init__(
        self,
        *,
        state: temporalio.api.enums.v1.workflow_pb2.PendingWorkflowTaskState.ValueType = ...,
        scheduled_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        original_scheduled_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        started_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        attempt: builtins.int = ...,
    ) -> None: ...
    def HasField(
        self,
        field_name: typing_extensions.Literal[
            "original_scheduled_time",
            b"original_scheduled_time",
            "scheduled_time",
            b"scheduled_time",
            "started_time",
            b"started_time",
        ],
    ) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "attempt",
            b"attempt",
            "original_scheduled_time",
            b"original_scheduled_time",
            "scheduled_time",
            b"scheduled_time",
            "started_time",
            b"started_time",
            "state",
            b"state",
        ],
    ) -> None: ...

global___PendingWorkflowTaskInfo = PendingWorkflowTaskInfo

class ResetPoints(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

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

global___ResetPoints = ResetPoints

class ResetPointInfo(google.protobuf.message.Message):
    """ResetPointInfo records the workflow event id that is the first one processed by a given
    build id or binary checksum. A new reset point will be created if either build id or binary
    checksum changes (although in general only one or the other will be used at a time).
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    BUILD_ID_FIELD_NUMBER: builtins.int
    BINARY_CHECKSUM_FIELD_NUMBER: builtins.int
    RUN_ID_FIELD_NUMBER: builtins.int
    FIRST_WORKFLOW_TASK_COMPLETED_ID_FIELD_NUMBER: builtins.int
    CREATE_TIME_FIELD_NUMBER: builtins.int
    EXPIRE_TIME_FIELD_NUMBER: builtins.int
    RESETTABLE_FIELD_NUMBER: builtins.int
    build_id: builtins.str
    """Worker build id."""
    binary_checksum: builtins.str
    """Deprecated. A worker binary version identifier."""
    run_id: builtins.str
    """The first run ID in the execution chain that was touched by this worker build."""
    first_workflow_task_completed_id: builtins.int
    """Event ID of the first WorkflowTaskCompleted event processed by this worker build."""
    @property
    def create_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    @property
    def expire_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """(-- api-linter: core::0214::resource-expiry=disabled
            aip.dev/not-precedent: TTL is not defined for ResetPointInfo. --)
        The time that the run is deleted due to retention.
        """
    resettable: builtins.bool
    """false if the reset point has pending childWFs/reqCancels/signalExternals."""
    def __init__(
        self,
        *,
        build_id: builtins.str = ...,
        binary_checksum: builtins.str = ...,
        run_id: builtins.str = ...,
        first_workflow_task_completed_id: builtins.int = ...,
        create_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        expire_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        resettable: builtins.bool = ...,
    ) -> None: ...
    def HasField(
        self,
        field_name: typing_extensions.Literal[
            "create_time", b"create_time", "expire_time", b"expire_time"
        ],
    ) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "binary_checksum",
            b"binary_checksum",
            "build_id",
            b"build_id",
            "create_time",
            b"create_time",
            "expire_time",
            b"expire_time",
            "first_workflow_task_completed_id",
            b"first_workflow_task_completed_id",
            "resettable",
            b"resettable",
            "run_id",
            b"run_id",
        ],
    ) -> None: ...

global___ResetPointInfo = ResetPointInfo

class NewWorkflowExecutionInfo(google.protobuf.message.Message):
    """NewWorkflowExecutionInfo is a shared message that encapsulates all the
    required arguments to starting a workflow in different contexts.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    WORKFLOW_ID_FIELD_NUMBER: builtins.int
    WORKFLOW_TYPE_FIELD_NUMBER: builtins.int
    TASK_QUEUE_FIELD_NUMBER: builtins.int
    INPUT_FIELD_NUMBER: builtins.int
    WORKFLOW_EXECUTION_TIMEOUT_FIELD_NUMBER: builtins.int
    WORKFLOW_RUN_TIMEOUT_FIELD_NUMBER: builtins.int
    WORKFLOW_TASK_TIMEOUT_FIELD_NUMBER: builtins.int
    WORKFLOW_ID_REUSE_POLICY_FIELD_NUMBER: builtins.int
    RETRY_POLICY_FIELD_NUMBER: builtins.int
    CRON_SCHEDULE_FIELD_NUMBER: builtins.int
    MEMO_FIELD_NUMBER: builtins.int
    SEARCH_ATTRIBUTES_FIELD_NUMBER: builtins.int
    HEADER_FIELD_NUMBER: builtins.int
    USER_METADATA_FIELD_NUMBER: builtins.int
    VERSIONING_OVERRIDE_FIELD_NUMBER: builtins.int
    PRIORITY_FIELD_NUMBER: builtins.int
    workflow_id: builtins.str
    @property
    def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ...
    @property
    def task_queue(self) -> temporalio.api.taskqueue.v1.message_pb2.TaskQueue: ...
    @property
    def input(self) -> temporalio.api.common.v1.message_pb2.Payloads:
        """Serialized arguments to the workflow."""
    @property
    def workflow_execution_timeout(self) -> google.protobuf.duration_pb2.Duration:
        """Total workflow execution timeout including retries and continue as new."""
    @property
    def workflow_run_timeout(self) -> google.protobuf.duration_pb2.Duration:
        """Timeout of a single workflow run."""
    @property
    def workflow_task_timeout(self) -> google.protobuf.duration_pb2.Duration:
        """Timeout of a single workflow task."""
    workflow_id_reuse_policy: (
        temporalio.api.enums.v1.workflow_pb2.WorkflowIdReusePolicy.ValueType
    )
    """Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE."""
    @property
    def retry_policy(self) -> temporalio.api.common.v1.message_pb2.RetryPolicy:
        """The retry policy for the workflow. Will never exceed `workflow_execution_timeout`."""
    cron_schedule: builtins.str
    """See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/"""
    @property
    def memo(self) -> temporalio.api.common.v1.message_pb2.Memo: ...
    @property
    def search_attributes(
        self,
    ) -> temporalio.api.common.v1.message_pb2.SearchAttributes: ...
    @property
    def header(self) -> temporalio.api.common.v1.message_pb2.Header: ...
    @property
    def user_metadata(self) -> temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata:
        """Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionConfig
        for use by user interfaces to display the fixed as-of-start summary and details of the
        workflow.
        """
    @property
    def versioning_override(self) -> global___VersioningOverride:
        """If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
        To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions.
        """
    @property
    def priority(self) -> temporalio.api.common.v1.message_pb2.Priority:
        """Priority metadata"""
    def __init__(
        self,
        *,
        workflow_id: builtins.str = ...,
        workflow_type: temporalio.api.common.v1.message_pb2.WorkflowType | None = ...,
        task_queue: temporalio.api.taskqueue.v1.message_pb2.TaskQueue | None = ...,
        input: temporalio.api.common.v1.message_pb2.Payloads | None = ...,
        workflow_execution_timeout: google.protobuf.duration_pb2.Duration | None = ...,
        workflow_run_timeout: google.protobuf.duration_pb2.Duration | None = ...,
        workflow_task_timeout: google.protobuf.duration_pb2.Duration | None = ...,
        workflow_id_reuse_policy: temporalio.api.enums.v1.workflow_pb2.WorkflowIdReusePolicy.ValueType = ...,
        retry_policy: temporalio.api.common.v1.message_pb2.RetryPolicy | None = ...,
        cron_schedule: builtins.str = ...,
        memo: temporalio.api.common.v1.message_pb2.Memo | None = ...,
        search_attributes: temporalio.api.common.v1.message_pb2.SearchAttributes
        | None = ...,
        header: temporalio.api.common.v1.message_pb2.Header | None = ...,
        user_metadata: temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata
        | None = ...,
        versioning_override: global___VersioningOverride | None = ...,
        priority: temporalio.api.common.v1.message_pb2.Priority | None = ...,
    ) -> None: ...
    def HasField(
        self,
        field_name: typing_extensions.Literal[
            "header",
            b"header",
            "input",
            b"input",
            "memo",
            b"memo",
            "priority",
            b"priority",
            "retry_policy",
            b"retry_policy",
            "search_attributes",
            b"search_attributes",
            "task_queue",
            b"task_queue",
            "user_metadata",
            b"user_metadata",
            "versioning_override",
            b"versioning_override",
            "workflow_execution_timeout",
            b"workflow_execution_timeout",
            "workflow_run_timeout",
            b"workflow_run_timeout",
            "workflow_task_timeout",
            b"workflow_task_timeout",
            "workflow_type",
            b"workflow_type",
        ],
    ) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "cron_schedule",
            b"cron_schedule",
            "header",
            b"header",
            "input",
            b"input",
            "memo",
            b"memo",
            "priority",
            b"priority",
            "retry_policy",
            b"retry_policy",
            "search_attributes",
            b"search_attributes",
            "task_queue",
            b"task_queue",
            "user_metadata",
            b"user_metadata",
            "versioning_override",
            b"versioning_override",
            "workflow_execution_timeout",
            b"workflow_execution_timeout",
            "workflow_id",
            b"workflow_id",
            "workflow_id_reuse_policy",
            b"workflow_id_reuse_policy",
            "workflow_run_timeout",
            b"workflow_run_timeout",
            "workflow_task_timeout",
            b"workflow_task_timeout",
            "workflow_type",
            b"workflow_type",
        ],
    ) -> None: ...

global___NewWorkflowExecutionInfo = NewWorkflowExecutionInfo

class CallbackInfo(google.protobuf.message.Message):
    """CallbackInfo contains the state of an attached workflow callback."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    class WorkflowClosed(google.protobuf.message.Message):
        """Trigger for when the workflow is closed."""

        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        def __init__(
            self,
        ) -> None: ...

    class Trigger(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        WORKFLOW_CLOSED_FIELD_NUMBER: builtins.int
        @property
        def workflow_closed(self) -> global___CallbackInfo.WorkflowClosed: ...
        def __init__(
            self,
            *,
            workflow_closed: global___CallbackInfo.WorkflowClosed | None = ...,
        ) -> None: ...
        def HasField(
            self,
            field_name: typing_extensions.Literal[
                "variant", b"variant", "workflow_closed", b"workflow_closed"
            ],
        ) -> builtins.bool: ...
        def ClearField(
            self,
            field_name: typing_extensions.Literal[
                "variant", b"variant", "workflow_closed", b"workflow_closed"
            ],
        ) -> None: ...
        def WhichOneof(
            self, oneof_group: typing_extensions.Literal["variant", b"variant"]
        ) -> typing_extensions.Literal["workflow_closed"] | None: ...

    CALLBACK_FIELD_NUMBER: builtins.int
    TRIGGER_FIELD_NUMBER: builtins.int
    REGISTRATION_TIME_FIELD_NUMBER: builtins.int
    STATE_FIELD_NUMBER: builtins.int
    ATTEMPT_FIELD_NUMBER: builtins.int
    LAST_ATTEMPT_COMPLETE_TIME_FIELD_NUMBER: builtins.int
    LAST_ATTEMPT_FAILURE_FIELD_NUMBER: builtins.int
    NEXT_ATTEMPT_SCHEDULE_TIME_FIELD_NUMBER: builtins.int
    BLOCKED_REASON_FIELD_NUMBER: builtins.int
    @property
    def callback(self) -> temporalio.api.common.v1.message_pb2.Callback:
        """Information on how this callback should be invoked (e.g. its URL and type)."""
    @property
    def trigger(self) -> global___CallbackInfo.Trigger:
        """Trigger for this callback."""
    @property
    def registration_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """The time when the callback was registered."""
    state: temporalio.api.enums.v1.common_pb2.CallbackState.ValueType
    attempt: builtins.int
    """The number of attempts made to deliver the callback.
    This number represents a minimum bound since the attempt is incremented after the callback request completes.
    """
    @property
    def last_attempt_complete_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """The time when the last attempt completed."""
    @property
    def last_attempt_failure(self) -> temporalio.api.failure.v1.message_pb2.Failure:
        """The last attempt's failure, if any."""
    @property
    def next_attempt_schedule_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """The time when the next attempt is scheduled."""
    blocked_reason: builtins.str
    """If the state is BLOCKED, blocked reason provides additional information."""
    def __init__(
        self,
        *,
        callback: temporalio.api.common.v1.message_pb2.Callback | None = ...,
        trigger: global___CallbackInfo.Trigger | None = ...,
        registration_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        state: temporalio.api.enums.v1.common_pb2.CallbackState.ValueType = ...,
        attempt: builtins.int = ...,
        last_attempt_complete_time: google.protobuf.timestamp_pb2.Timestamp
        | None = ...,
        last_attempt_failure: temporalio.api.failure.v1.message_pb2.Failure
        | None = ...,
        next_attempt_schedule_time: google.protobuf.timestamp_pb2.Timestamp
        | None = ...,
        blocked_reason: builtins.str = ...,
    ) -> None: ...
    def HasField(
        self,
        field_name: typing_extensions.Literal[
            "callback",
            b"callback",
            "last_attempt_complete_time",
            b"last_attempt_complete_time",
            "last_attempt_failure",
            b"last_attempt_failure",
            "next_attempt_schedule_time",
            b"next_attempt_schedule_time",
            "registration_time",
            b"registration_time",
            "trigger",
            b"trigger",
        ],
    ) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "attempt",
            b"attempt",
            "blocked_reason",
            b"blocked_reason",
            "callback",
            b"callback",
            "last_attempt_complete_time",
            b"last_attempt_complete_time",
            "last_attempt_failure",
            b"last_attempt_failure",
            "next_attempt_schedule_time",
            b"next_attempt_schedule_time",
            "registration_time",
            b"registration_time",
            "state",
            b"state",
            "trigger",
            b"trigger",
        ],
    ) -> None: ...

global___CallbackInfo = CallbackInfo

class PendingNexusOperationInfo(google.protobuf.message.Message):
    """PendingNexusOperationInfo contains the state of a pending Nexus operation."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    ENDPOINT_FIELD_NUMBER: builtins.int
    SERVICE_FIELD_NUMBER: builtins.int
    OPERATION_FIELD_NUMBER: builtins.int
    OPERATION_ID_FIELD_NUMBER: builtins.int
    SCHEDULE_TO_CLOSE_TIMEOUT_FIELD_NUMBER: builtins.int
    SCHEDULED_TIME_FIELD_NUMBER: builtins.int
    STATE_FIELD_NUMBER: builtins.int
    ATTEMPT_FIELD_NUMBER: builtins.int
    LAST_ATTEMPT_COMPLETE_TIME_FIELD_NUMBER: builtins.int
    LAST_ATTEMPT_FAILURE_FIELD_NUMBER: builtins.int
    NEXT_ATTEMPT_SCHEDULE_TIME_FIELD_NUMBER: builtins.int
    CANCELLATION_INFO_FIELD_NUMBER: builtins.int
    SCHEDULED_EVENT_ID_FIELD_NUMBER: builtins.int
    BLOCKED_REASON_FIELD_NUMBER: builtins.int
    OPERATION_TOKEN_FIELD_NUMBER: builtins.int
    endpoint: builtins.str
    """Endpoint name.
    Resolved to a URL via the cluster's endpoint registry.
    """
    service: builtins.str
    """Service name."""
    operation: builtins.str
    """Operation name."""
    operation_id: builtins.str
    """Operation ID. Only set for asynchronous operations after a successful StartOperation call.

    Deprecated. Renamed to operation_token.
    """
    @property
    def schedule_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration:
        """Schedule-to-close timeout for this operation.
        This is the only timeout settable by a workflow.
        (-- api-linter: core::0140::prepositions=disabled
            aip.dev/not-precedent: "to" is used to indicate interval. --)
        """
    @property
    def scheduled_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """The time when the operation was scheduled."""
    state: temporalio.api.enums.v1.common_pb2.PendingNexusOperationState.ValueType
    attempt: builtins.int
    """The number of attempts made to deliver the start operation request.
    This number represents a minimum bound since the attempt is incremented after the request completes.
    """
    @property
    def last_attempt_complete_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """The time when the last attempt completed."""
    @property
    def last_attempt_failure(self) -> temporalio.api.failure.v1.message_pb2.Failure:
        """The last attempt's failure, if any."""
    @property
    def next_attempt_schedule_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """The time when the next attempt is scheduled."""
    @property
    def cancellation_info(self) -> global___NexusOperationCancellationInfo: ...
    scheduled_event_id: builtins.int
    """The event ID of the NexusOperationScheduled event. Can be used to correlate an operation in the
    DescribeWorkflowExecution response with workflow history.
    """
    blocked_reason: builtins.str
    """If the state is BLOCKED, blocked reason provides additional information."""
    operation_token: builtins.str
    """Operation token. Only set for asynchronous operations after a successful StartOperation call."""
    def __init__(
        self,
        *,
        endpoint: builtins.str = ...,
        service: builtins.str = ...,
        operation: builtins.str = ...,
        operation_id: builtins.str = ...,
        schedule_to_close_timeout: google.protobuf.duration_pb2.Duration | None = ...,
        scheduled_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        state: temporalio.api.enums.v1.common_pb2.PendingNexusOperationState.ValueType = ...,
        attempt: builtins.int = ...,
        last_attempt_complete_time: google.protobuf.timestamp_pb2.Timestamp
        | None = ...,
        last_attempt_failure: temporalio.api.failure.v1.message_pb2.Failure
        | None = ...,
        next_attempt_schedule_time: google.protobuf.timestamp_pb2.Timestamp
        | None = ...,
        cancellation_info: global___NexusOperationCancellationInfo | None = ...,
        scheduled_event_id: builtins.int = ...,
        blocked_reason: builtins.str = ...,
        operation_token: builtins.str = ...,
    ) -> None: ...
    def HasField(
        self,
        field_name: typing_extensions.Literal[
            "cancellation_info",
            b"cancellation_info",
            "last_attempt_complete_time",
            b"last_attempt_complete_time",
            "last_attempt_failure",
            b"last_attempt_failure",
            "next_attempt_schedule_time",
            b"next_attempt_schedule_time",
            "schedule_to_close_timeout",
            b"schedule_to_close_timeout",
            "scheduled_time",
            b"scheduled_time",
        ],
    ) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "attempt",
            b"attempt",
            "blocked_reason",
            b"blocked_reason",
            "cancellation_info",
            b"cancellation_info",
            "endpoint",
            b"endpoint",
            "last_attempt_complete_time",
            b"last_attempt_complete_time",
            "last_attempt_failure",
            b"last_attempt_failure",
            "next_attempt_schedule_time",
            b"next_attempt_schedule_time",
            "operation",
            b"operation",
            "operation_id",
            b"operation_id",
            "operation_token",
            b"operation_token",
            "schedule_to_close_timeout",
            b"schedule_to_close_timeout",
            "scheduled_event_id",
            b"scheduled_event_id",
            "scheduled_time",
            b"scheduled_time",
            "service",
            b"service",
            "state",
            b"state",
        ],
    ) -> None: ...

global___PendingNexusOperationInfo = PendingNexusOperationInfo

class NexusOperationCancellationInfo(google.protobuf.message.Message):
    """NexusOperationCancellationInfo contains the state of a nexus operation cancellation."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    REQUESTED_TIME_FIELD_NUMBER: builtins.int
    STATE_FIELD_NUMBER: builtins.int
    ATTEMPT_FIELD_NUMBER: builtins.int
    LAST_ATTEMPT_COMPLETE_TIME_FIELD_NUMBER: builtins.int
    LAST_ATTEMPT_FAILURE_FIELD_NUMBER: builtins.int
    NEXT_ATTEMPT_SCHEDULE_TIME_FIELD_NUMBER: builtins.int
    BLOCKED_REASON_FIELD_NUMBER: builtins.int
    @property
    def requested_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """The time when cancellation was requested."""
    state: temporalio.api.enums.v1.common_pb2.NexusOperationCancellationState.ValueType
    attempt: builtins.int
    """The number of attempts made to deliver the cancel operation request.
    This number represents a minimum bound since the attempt is incremented after the request completes.
    """
    @property
    def last_attempt_complete_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """The time when the last attempt completed."""
    @property
    def last_attempt_failure(self) -> temporalio.api.failure.v1.message_pb2.Failure:
        """The last attempt's failure, if any."""
    @property
    def next_attempt_schedule_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """The time when the next attempt is scheduled."""
    blocked_reason: builtins.str
    """If the state is BLOCKED, blocked reason provides additional information."""
    def __init__(
        self,
        *,
        requested_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        state: temporalio.api.enums.v1.common_pb2.NexusOperationCancellationState.ValueType = ...,
        attempt: builtins.int = ...,
        last_attempt_complete_time: google.protobuf.timestamp_pb2.Timestamp
        | None = ...,
        last_attempt_failure: temporalio.api.failure.v1.message_pb2.Failure
        | None = ...,
        next_attempt_schedule_time: google.protobuf.timestamp_pb2.Timestamp
        | None = ...,
        blocked_reason: builtins.str = ...,
    ) -> None: ...
    def HasField(
        self,
        field_name: typing_extensions.Literal[
            "last_attempt_complete_time",
            b"last_attempt_complete_time",
            "last_attempt_failure",
            b"last_attempt_failure",
            "next_attempt_schedule_time",
            b"next_attempt_schedule_time",
            "requested_time",
            b"requested_time",
        ],
    ) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "attempt",
            b"attempt",
            "blocked_reason",
            b"blocked_reason",
            "last_attempt_complete_time",
            b"last_attempt_complete_time",
            "last_attempt_failure",
            b"last_attempt_failure",
            "next_attempt_schedule_time",
            b"next_attempt_schedule_time",
            "requested_time",
            b"requested_time",
            "state",
            b"state",
        ],
    ) -> None: ...

global___NexusOperationCancellationInfo = NexusOperationCancellationInfo

class WorkflowExecutionOptions(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    VERSIONING_OVERRIDE_FIELD_NUMBER: builtins.int
    @property
    def versioning_override(self) -> global___VersioningOverride:
        """If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion."""
    def __init__(
        self,
        *,
        versioning_override: global___VersioningOverride | None = ...,
    ) -> None: ...
    def HasField(
        self,
        field_name: typing_extensions.Literal[
            "versioning_override", b"versioning_override"
        ],
    ) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "versioning_override", b"versioning_override"
        ],
    ) -> None: ...

global___WorkflowExecutionOptions = WorkflowExecutionOptions

class VersioningOverride(google.protobuf.message.Message):
    """Used to override the versioning behavior (and pinned deployment version, if applicable) of a
    specific workflow execution. If set, takes precedence over the worker-sent values. See
    `WorkflowExecutionInfo.VersioningInfo` for more information. To remove the override, call
    `UpdateWorkflowExecutionOptions` with a null `VersioningOverride`, and use the `update_mask`
    to indicate that it should be mutated.
    Pinned overrides are automatically inherited by child workflows, continue-as-new workflows,
    workflow retries, and cron workflows.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    class _PinnedOverrideBehavior:
        ValueType = typing.NewType("ValueType", builtins.int)
        V: typing_extensions.TypeAlias = ValueType

    class _PinnedOverrideBehaviorEnumTypeWrapper(
        google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[
            VersioningOverride._PinnedOverrideBehavior.ValueType
        ],
        builtins.type,
    ):  # noqa: F821
        DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
        PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED: (
            VersioningOverride._PinnedOverrideBehavior.ValueType
        )  # 0
        """Unspecified."""
        PINNED_OVERRIDE_BEHAVIOR_PINNED: (
            VersioningOverride._PinnedOverrideBehavior.ValueType
        )  # 1
        """Override workflow behavior to be Pinned."""

    class PinnedOverrideBehavior(
        _PinnedOverrideBehavior, metaclass=_PinnedOverrideBehaviorEnumTypeWrapper
    ):
        """Used to specify different sub-types of Pinned override that we plan to add in the future."""

    PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED: (
        VersioningOverride.PinnedOverrideBehavior.ValueType
    )  # 0
    """Unspecified."""
    PINNED_OVERRIDE_BEHAVIOR_PINNED: (
        VersioningOverride.PinnedOverrideBehavior.ValueType
    )  # 1
    """Override workflow behavior to be Pinned."""

    class PinnedOverride(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        BEHAVIOR_FIELD_NUMBER: builtins.int
        VERSION_FIELD_NUMBER: builtins.int
        behavior: global___VersioningOverride.PinnedOverrideBehavior.ValueType
        """Defaults to PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED.
        See `PinnedOverrideBehavior` for details.
        """
        @property
        def version(
            self,
        ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion:
            """Required."""
        def __init__(
            self,
            *,
            behavior: global___VersioningOverride.PinnedOverrideBehavior.ValueType = ...,
            version: temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion
            | None = ...,
        ) -> None: ...
        def HasField(
            self, field_name: typing_extensions.Literal["version", b"version"]
        ) -> builtins.bool: ...
        def ClearField(
            self,
            field_name: typing_extensions.Literal[
                "behavior", b"behavior", "version", b"version"
            ],
        ) -> None: ...

    PINNED_FIELD_NUMBER: builtins.int
    AUTO_UPGRADE_FIELD_NUMBER: builtins.int
    BEHAVIOR_FIELD_NUMBER: builtins.int
    DEPLOYMENT_FIELD_NUMBER: builtins.int
    PINNED_VERSION_FIELD_NUMBER: builtins.int
    @property
    def pinned(self) -> global___VersioningOverride.PinnedOverride:
        """Send the next workflow task to the Version specified in the override."""
    auto_upgrade: builtins.bool
    """Send the next workflow task to the Current Deployment Version
    of its Task Queue when the next workflow task is dispatched.
    """
    behavior: temporalio.api.enums.v1.workflow_pb2.VersioningBehavior.ValueType
    """Required.
    Deprecated. Use `override`.
    """
    @property
    def deployment(self) -> temporalio.api.deployment.v1.message_pb2.Deployment:
        """Required if behavior is `PINNED`. Must be null if behavior is `AUTO_UPGRADE`.
        Identifies the worker deployment to pin the workflow to.
        Deprecated. Use `override.pinned.version`.
        """
    pinned_version: builtins.str
    """Required if behavior is `PINNED`. Must be absent if behavior is not `PINNED`.
    Identifies the worker deployment version to pin the workflow to, in the format
    "<deployment_name>.<build_id>".
    Deprecated. Use `override.pinned.version`.
    """
    def __init__(
        self,
        *,
        pinned: global___VersioningOverride.PinnedOverride | None = ...,
        auto_upgrade: builtins.bool = ...,
        behavior: temporalio.api.enums.v1.workflow_pb2.VersioningBehavior.ValueType = ...,
        deployment: temporalio.api.deployment.v1.message_pb2.Deployment | None = ...,
        pinned_version: builtins.str = ...,
    ) -> None: ...
    def HasField(
        self,
        field_name: typing_extensions.Literal[
            "auto_upgrade",
            b"auto_upgrade",
            "deployment",
            b"deployment",
            "override",
            b"override",
            "pinned",
            b"pinned",
        ],
    ) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "auto_upgrade",
            b"auto_upgrade",
            "behavior",
            b"behavior",
            "deployment",
            b"deployment",
            "override",
            b"override",
            "pinned",
            b"pinned",
            "pinned_version",
            b"pinned_version",
        ],
    ) -> None: ...
    def WhichOneof(
        self, oneof_group: typing_extensions.Literal["override", b"override"]
    ) -> typing_extensions.Literal["pinned", "auto_upgrade"] | None: ...

global___VersioningOverride = VersioningOverride

class OnConflictOptions(google.protobuf.message.Message):
    """When StartWorkflowExecution uses the conflict policy WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING and
    there is already an existing running workflow, OnConflictOptions defines actions to be taken on
    the existing running workflow. In this case, it will create a WorkflowExecutionOptionsUpdatedEvent
    history event in the running workflow with the changes requested in this object.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    ATTACH_REQUEST_ID_FIELD_NUMBER: builtins.int
    ATTACH_COMPLETION_CALLBACKS_FIELD_NUMBER: builtins.int
    ATTACH_LINKS_FIELD_NUMBER: builtins.int
    attach_request_id: builtins.bool
    """Attaches the request ID to the running workflow."""
    attach_completion_callbacks: builtins.bool
    """Attaches the completion callbacks to the running workflow."""
    attach_links: builtins.bool
    """Attaches the links to the WorkflowExecutionOptionsUpdatedEvent history event."""
    def __init__(
        self,
        *,
        attach_request_id: builtins.bool = ...,
        attach_completion_callbacks: builtins.bool = ...,
        attach_links: builtins.bool = ...,
    ) -> None: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "attach_completion_callbacks",
            b"attach_completion_callbacks",
            "attach_links",
            b"attach_links",
            "attach_request_id",
            b"attach_request_id",
        ],
    ) -> None: ...

global___OnConflictOptions = OnConflictOptions

class RequestIdInfo(google.protobuf.message.Message):
    """RequestIdInfo contains details of a request ID."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    EVENT_TYPE_FIELD_NUMBER: builtins.int
    EVENT_ID_FIELD_NUMBER: builtins.int
    BUFFERED_FIELD_NUMBER: builtins.int
    event_type: temporalio.api.enums.v1.event_type_pb2.EventType.ValueType
    """The event type of the history event generated by the request."""
    event_id: builtins.int
    """The event id of the history event generated by the request. It's possible the event ID is not
    known (unflushed buffered event). In this case, the value will be zero or a negative value,
    representing an invalid ID.
    """
    buffered: builtins.bool
    """Indicate if the request is still buffered. If so, the event ID is not known and its value
    will be an invalid event ID.
    """
    def __init__(
        self,
        *,
        event_type: temporalio.api.enums.v1.event_type_pb2.EventType.ValueType = ...,
        event_id: builtins.int = ...,
        buffered: builtins.bool = ...,
    ) -> None: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "buffered",
            b"buffered",
            "event_id",
            b"event_id",
            "event_type",
            b"event_type",
        ],
    ) -> None: ...

global___RequestIdInfo = RequestIdInfo

class PostResetOperation(google.protobuf.message.Message):
    """PostResetOperation represents an operation to be performed on the new workflow execution after a workflow reset."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    class SignalWorkflow(google.protobuf.message.Message):
        """SignalWorkflow represents sending a signal after a workflow reset.
        Keep the parameter in sync with temporalio.api.workflowservice.v1.SignalWorkflowExecutionRequest.
        """

        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        SIGNAL_NAME_FIELD_NUMBER: builtins.int
        INPUT_FIELD_NUMBER: builtins.int
        HEADER_FIELD_NUMBER: builtins.int
        LINKS_FIELD_NUMBER: builtins.int
        signal_name: builtins.str
        """The workflow author-defined name of the signal to send to the workflow."""
        @property
        def input(self) -> temporalio.api.common.v1.message_pb2.Payloads:
            """Serialized value(s) to provide with the signal."""
        @property
        def header(self) -> temporalio.api.common.v1.message_pb2.Header:
            """Headers that are passed with the signal to the processing workflow."""
        @property
        def links(
            self,
        ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[
            temporalio.api.common.v1.message_pb2.Link
        ]:
            """Links to be associated with the WorkflowExecutionSignaled event."""
        def __init__(
            self,
            *,
            signal_name: builtins.str = ...,
            input: temporalio.api.common.v1.message_pb2.Payloads | None = ...,
            header: temporalio.api.common.v1.message_pb2.Header | None = ...,
            links: collections.abc.Iterable[temporalio.api.common.v1.message_pb2.Link]
            | None = ...,
        ) -> None: ...
        def HasField(
            self,
            field_name: typing_extensions.Literal[
                "header", b"header", "input", b"input"
            ],
        ) -> builtins.bool: ...
        def ClearField(
            self,
            field_name: typing_extensions.Literal[
                "header",
                b"header",
                "input",
                b"input",
                "links",
                b"links",
                "signal_name",
                b"signal_name",
            ],
        ) -> None: ...

    class UpdateWorkflowOptions(google.protobuf.message.Message):
        """UpdateWorkflowOptions represents updating workflow execution options after a workflow reset.
        Keep the parameters in sync with temporalio.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest.
        """

        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        WORKFLOW_EXECUTION_OPTIONS_FIELD_NUMBER: builtins.int
        UPDATE_MASK_FIELD_NUMBER: builtins.int
        @property
        def workflow_execution_options(self) -> global___WorkflowExecutionOptions:
            """Update Workflow options that were originally specified via StartWorkflowExecution. Partial updates are accepted and controlled by update_mask."""
        @property
        def update_mask(self) -> google.protobuf.field_mask_pb2.FieldMask:
            """Controls which fields from `workflow_execution_options` will be applied.
            To unset a field, set it to null and use the update mask to indicate that it should be mutated.
            """
        def __init__(
            self,
            *,
            workflow_execution_options: global___WorkflowExecutionOptions | None = ...,
            update_mask: google.protobuf.field_mask_pb2.FieldMask | None = ...,
        ) -> None: ...
        def HasField(
            self,
            field_name: typing_extensions.Literal[
                "update_mask",
                b"update_mask",
                "workflow_execution_options",
                b"workflow_execution_options",
            ],
        ) -> builtins.bool: ...
        def ClearField(
            self,
            field_name: typing_extensions.Literal[
                "update_mask",
                b"update_mask",
                "workflow_execution_options",
                b"workflow_execution_options",
            ],
        ) -> None: ...

    SIGNAL_WORKFLOW_FIELD_NUMBER: builtins.int
    UPDATE_WORKFLOW_OPTIONS_FIELD_NUMBER: builtins.int
    @property
    def signal_workflow(self) -> global___PostResetOperation.SignalWorkflow: ...
    @property
    def update_workflow_options(
        self,
    ) -> global___PostResetOperation.UpdateWorkflowOptions: ...
    def __init__(
        self,
        *,
        signal_workflow: global___PostResetOperation.SignalWorkflow | None = ...,
        update_workflow_options: global___PostResetOperation.UpdateWorkflowOptions
        | None = ...,
    ) -> None: ...
    def HasField(
        self,
        field_name: typing_extensions.Literal[
            "signal_workflow",
            b"signal_workflow",
            "update_workflow_options",
            b"update_workflow_options",
            "variant",
            b"variant",
        ],
    ) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "signal_workflow",
            b"signal_workflow",
            "update_workflow_options",
            b"update_workflow_options",
            "variant",
            b"variant",
        ],
    ) -> None: ...
    def WhichOneof(
        self, oneof_group: typing_extensions.Literal["variant", b"variant"]
    ) -> (
        typing_extensions.Literal["signal_workflow", "update_workflow_options"] | None
    ): ...

global___PostResetOperation = PostResetOperation
