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

import builtins
import google.protobuf.descriptor
import google.protobuf.duration_pb2
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
import google.protobuf.timestamp_pb2
import sys
import typing

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

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

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

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

    class _StatusEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Execution._Status.ValueType], builtins.type):
        DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
        STATUS_UNSPECIFIED: Execution._Status.ValueType  # 0
        QUEUED: Execution._Status.ValueType  # 1
        """Workflow execution is being queued."""
        RUNNING: Execution._Status.ValueType  # 2
        """Workflow execution is running."""
        PAUSED: Execution._Status.ValueType  # 3
        """Workflow execution is being paused."""
        STOPPED: Execution._Status.ValueType  # 4
        """Workflow execution is stopped."""
        FAILED: Execution._Status.ValueType  # 5
        """Workflow execution is failed."""
        FINISHED: Execution._Status.ValueType  # 6
        """Workflow execution is finished."""

    class Status(_Status, metaclass=_StatusEnumTypeWrapper): ...
    STATUS_UNSPECIFIED: Execution.Status.ValueType  # 0
    QUEUED: Execution.Status.ValueType  # 1
    """Workflow execution is being queued."""
    RUNNING: Execution.Status.ValueType  # 2
    """Workflow execution is running."""
    PAUSED: Execution.Status.ValueType  # 3
    """Workflow execution is being paused."""
    STOPPED: Execution.Status.ValueType  # 4
    """Workflow execution is stopped."""
    FAILED: Execution.Status.ValueType  # 5
    """Workflow execution is failed."""
    FINISHED: Execution.Status.ValueType  # 6
    """Workflow execution is finished."""

    ID_FIELD_NUMBER: builtins.int
    WORKFLOW_ID_FIELD_NUMBER: builtins.int
    INPUT_FIELD_NUMBER: builtins.int
    RESULT_FIELD_NUMBER: builtins.int
    ERROR_FIELD_NUMBER: builtins.int
    STATUS_FIELD_NUMBER: builtins.int
    STARTED_AT_FIELD_NUMBER: builtins.int
    DURATION_FIELD_NUMBER: builtins.int
    id: builtins.str
    """ID of the Workflow execution. Generated at creation time."""
    workflow_id: builtins.str
    """ID of the Workflow."""
    status: global___Execution.Status.ValueType
    """Status of the Workflow execution"""
    @property
    def input(self) -> global___ExecutionInput:
        """Input data for the Workflow execution."""

    @property
    def result(self) -> global___ExecutionResult:
        """Result of the Workflow execution."""

    @property
    def error(self) -> global___ExecutionError:
        """Error details, in case Workflow execution failed."""

    @property
    def started_at(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Start timestamp for the Workflow execution."""

    @property
    def duration(self) -> google.protobuf.duration_pb2.Duration:
        """Duration of the Workflow execution."""

    def __init__(
        self,
        *,
        id: builtins.str = ...,
        workflow_id: builtins.str = ...,
        input: global___ExecutionInput | None = ...,
        result: global___ExecutionResult | None = ...,
        error: global___ExecutionError | None = ...,
        status: global___Execution.Status.ValueType = ...,
        started_at: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        duration: google.protobuf.duration_pb2.Duration | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["duration", b"duration", "error", b"error", "input", b"input", "result", b"result", "started_at", b"started_at"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["duration", b"duration", "error", b"error", "id", b"id", "input", b"input", "result", b"result", "started_at", b"started_at", "status", b"status", "workflow_id", b"workflow_id"]) -> None: ...

global___Execution = Execution

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

    ID_FIELD_NUMBER: builtins.int
    WORKFLOW_ID_FIELD_NUMBER: builtins.int
    STATUS_FIELD_NUMBER: builtins.int
    STARTED_AT_FIELD_NUMBER: builtins.int
    DURATION_FIELD_NUMBER: builtins.int
    id: builtins.str
    """ID of the Workflow execution. Generated at creation time."""
    workflow_id: builtins.str
    """ID of the Workflow."""
    status: global___Execution.Status.ValueType
    """Status of the Workflow execution"""
    @property
    def started_at(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Start timestamp for the Workflow execution."""

    @property
    def duration(self) -> google.protobuf.duration_pb2.Duration:
        """Duration of the Workflow execution."""

    def __init__(
        self,
        *,
        id: builtins.str = ...,
        workflow_id: builtins.str = ...,
        status: global___Execution.Status.ValueType = ...,
        started_at: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        duration: google.protobuf.duration_pb2.Duration | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["duration", b"duration", "started_at", b"started_at"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["duration", b"duration", "id", b"id", "started_at", b"started_at", "status", b"status", "workflow_id", b"workflow_id"]) -> None: ...

global___ExecutionPreview = ExecutionPreview

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

    INPUT_JSON_FIELD_NUMBER: builtins.int
    input_json: builtins.str
    """JSON input data for the Workflow execution."""
    def __init__(
        self,
        *,
        input_json: builtins.str = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["input", b"input", "input_json", b"input_json"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["input", b"input", "input_json", b"input_json"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["input", b"input"]) -> typing.Literal["input_json"] | None: ...

global___ExecutionInput = ExecutionInput

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

    RESULT_JSON_FIELD_NUMBER: builtins.int
    result_json: builtins.str
    """JSON result of the Workflow execution."""
    def __init__(
        self,
        *,
        result_json: builtins.str = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["result", b"result", "result_json", b"result_json"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["result", b"result", "result_json", b"result_json"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["result", b"result"]) -> typing.Literal["result_json"] | None: ...

global___ExecutionResult = ExecutionResult

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

    MESSAGE_FIELD_NUMBER: builtins.int
    ERROR_CODE_FIELD_NUMBER: builtins.int
    message: builtins.str
    """Error message of the Workflow execution."""
    error_code: builtins.str
    """Error code of the Workflow execution."""
    def __init__(
        self,
        *,
        message: builtins.str = ...,
        error_code: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["error_code", b"error_code", "message", b"message"]) -> None: ...

global___ExecutionError = ExecutionError
