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

import builtins
import google.protobuf.descriptor
import google.protobuf.message
import insightproto.proto.common.v1.common_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 JobStartEvent(google.protobuf.message.Message):
    """send when a job starts"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    ID_FIELD_NUMBER: builtins.int
    ORG_FIELD_NUMBER: builtins.int
    id: builtins.str
    """the id of the job"""
    @property
    def org(self) -> insightproto.proto.common.v1.common_pb2.Organisation:
        """The organization that owns the investigation."""

    def __init__(
        self,
        *,
        id: builtins.str = ...,
        org: insightproto.proto.common.v1.common_pb2.Organisation | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["org", b"org"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["id", b"id", "org", b"org"]) -> None: ...

Global___JobStartEvent: typing_extensions.TypeAlias = JobStartEvent

@typing.final
class JobStopEvent(google.protobuf.message.Message):
    """send when a job as stopped"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    ID_FIELD_NUMBER: builtins.int
    ORG_FIELD_NUMBER: builtins.int
    ERROR_FIELD_NUMBER: builtins.int
    id: builtins.str
    """the id of the job"""
    @property
    def org(self) -> insightproto.proto.common.v1.common_pb2.Organisation:
        """The organization that owns the investigation."""

    @property
    def error(self) -> Global___Error:
        """the error from the job"""

    def __init__(
        self,
        *,
        id: builtins.str = ...,
        org: insightproto.proto.common.v1.common_pb2.Organisation | None = ...,
        error: Global___Error | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["_error", b"_error", "error", b"error", "org", b"org"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["_error", b"_error", "error", b"error", "id", b"id", "org", b"org"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["_error", b"_error"]) -> typing.Literal["error"] | None: ...

Global___JobStopEvent: typing_extensions.TypeAlias = JobStopEvent

@typing.final
class Error(google.protobuf.message.Message):
    """An Error from the job running"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    ERRTYPE_FIELD_NUMBER: builtins.int
    MESSAGE_FIELD_NUMBER: builtins.int
    TRACE_FIELD_NUMBER: builtins.int
    errType: builtins.str
    """the error type e.g. NullPointerException"""
    message: builtins.str
    """the error message"""
    trace: builtins.str
    """the trace as a string"""
    def __init__(
        self,
        *,
        errType: builtins.str = ...,
        message: builtins.str = ...,
        trace: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["errType", b"errType", "message", b"message", "trace", b"trace"]) -> None: ...

Global___Error: typing_extensions.TypeAlias = Error
