"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""
import builtins
import collections.abc
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
import sys
import typing

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

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

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

class _LogSourceEnumTypeWrapper(
    google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_LogSource.ValueType],
    builtins.type,
):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    BUILDER: _LogSource.ValueType  # 0
    BRIDGE: _LogSource.ValueType  # 1
    USER: _LogSource.ValueType  # 2

class LogSource(_LogSource, metaclass=_LogSourceEnumTypeWrapper): ...

BUILDER: LogSource.ValueType  # 0
BRIDGE: LogSource.ValueType  # 1
USER: LogSource.ValueType  # 2
global___LogSource = LogSource

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

class _LogLevelEnumTypeWrapper(
    google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_LogLevel.ValueType],
    builtins.type,
):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    TRACE: _LogLevel.ValueType  # 0
    DEBUG: _LogLevel.ValueType  # 1
    INFO: _LogLevel.ValueType  # 2
    WARNING: _LogLevel.ValueType  # 3
    ERROR: _LogLevel.ValueType  # 4
    STDOUT: _LogLevel.ValueType  # 5
    STDERR: _LogLevel.ValueType  # 6

class LogLevel(_LogLevel, metaclass=_LogLevelEnumTypeWrapper): ...

TRACE: LogLevel.ValueType  # 0
DEBUG: LogLevel.ValueType  # 1
INFO: LogLevel.ValueType  # 2
WARNING: LogLevel.ValueType  # 3
ERROR: LogLevel.ValueType  # 4
STDOUT: LogLevel.ValueType  # 5
STDERR: LogLevel.ValueType  # 6
global___LogLevel = LogLevel

@typing_extensions.final
class SerializedObject(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    METHOD_FIELD_NUMBER: builtins.int
    DEFINITION_FIELD_NUMBER: builtins.int
    WAS_IT_RAISED_FIELD_NUMBER: builtins.int
    STRINGIZED_TRACEBACK_FIELD_NUMBER: builtins.int
    method: builtins.str
    """The serialization method used to serialize the the raw_object. Must be
    present in the environment that is running the agent itself.
    """
    definition: builtins.bytes
    """The Python object serialized with the method above."""
    was_it_raised: builtins.bool
    """A flag indicating whether the given object was raised (e.g. an exception
    that was captured) or not.
    """
    stringized_traceback: builtins.str
    """The stringized version of the traceback, if it was raised."""
    def __init__(
        self,
        *,
        method: builtins.str = ...,
        definition: builtins.bytes = ...,
        was_it_raised: builtins.bool = ...,
        stringized_traceback: builtins.str | None = ...,
    ) -> None: ...
    def HasField(
        self,
        field_name: typing_extensions.Literal[
            "_stringized_traceback",
            b"_stringized_traceback",
            "stringized_traceback",
            b"stringized_traceback",
        ],
    ) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "_stringized_traceback",
            b"_stringized_traceback",
            "definition",
            b"definition",
            "method",
            b"method",
            "stringized_traceback",
            b"stringized_traceback",
            "was_it_raised",
            b"was_it_raised",
        ],
    ) -> None: ...
    def WhichOneof(
        self,
        oneof_group: typing_extensions.Literal[
            "_stringized_traceback", b"_stringized_traceback"
        ],
    ) -> typing_extensions.Literal["stringized_traceback"] | None: ...

global___SerializedObject = SerializedObject

@typing_extensions.final
class PartialRunResult(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    IS_COMPLETE_FIELD_NUMBER: builtins.int
    LOGS_FIELD_NUMBER: builtins.int
    RESULT_FIELD_NUMBER: builtins.int
    is_complete: builtins.bool
    """A flag indicating whether the run has completed."""
    @property
    def logs(
        self,
    ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[
        global___Log
    ]:
        """A list of logs collected during this partial execution. It does
        not include old logs.
        """
    @property
    def result(self) -> global___SerializedObject:
        """The result of the run, if it is complete."""
    def __init__(
        self,
        *,
        is_complete: builtins.bool = ...,
        logs: collections.abc.Iterable[global___Log] | None = ...,
        result: global___SerializedObject | None = ...,
    ) -> None: ...
    def HasField(
        self,
        field_name: typing_extensions.Literal[
            "_result", b"_result", "result", b"result"
        ],
    ) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "_result",
            b"_result",
            "is_complete",
            b"is_complete",
            "logs",
            b"logs",
            "result",
            b"result",
        ],
    ) -> None: ...
    def WhichOneof(
        self, oneof_group: typing_extensions.Literal["_result", b"_result"]
    ) -> typing_extensions.Literal["result"] | None: ...

global___PartialRunResult = PartialRunResult

@typing_extensions.final
class Log(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    MESSAGE_FIELD_NUMBER: builtins.int
    SOURCE_FIELD_NUMBER: builtins.int
    LEVEL_FIELD_NUMBER: builtins.int
    message: builtins.str
    source: global___LogSource.ValueType
    level: global___LogLevel.ValueType
    def __init__(
        self,
        *,
        message: builtins.str = ...,
        source: global___LogSource.ValueType = ...,
        level: global___LogLevel.ValueType = ...,
    ) -> None: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "level", b"level", "message", b"message", "source", b"source"
        ],
    ) -> None: ...

global___Log = Log
