"""
@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.message
import google.protobuf.timestamp_pb2
import sys

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

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@typing_extensions.final
class ApiException(google.protobuf.message.Message):
    """标准异常响应"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    CODE_FIELD_NUMBER: builtins.int
    DETAIL_FIELD_NUMBER: builtins.int
    MESSAGE_FIELD_NUMBER: builtins.int
    DATA_FIELD_NUMBER: builtins.int
    code: builtins.str
    """错误码，详见：paperpilot-common-python/paperpilot_common.response.ResponseType"""
    detail: builtins.str
    """获取异常详情(面向开发者)"""
    message: builtins.str
    """获取异常信息(面向用户)"""
    @property
    def data(self) -> global___ApiExceptionData:
        """其他数据"""
    def __init__(
        self,
        *,
        code: builtins.str = ...,
        detail: builtins.str = ...,
        message: builtins.str = ...,
        data: global___ApiExceptionData | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["data", b"data"]) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "code", b"code", "data", b"data", "detail", b"detail", "message", b"message"
        ],
    ) -> None: ...

global___ApiException = ApiException

@typing_extensions.final
class ApiExceptionData(google.protobuf.message.Message):
    """详细异常数据"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    EID_FIELD_NUMBER: builtins.int
    SENTRY_ID_FIELD_NUMBER: builtins.int
    TIME_FIELD_NUMBER: builtins.int
    INFO_FIELD_NUMBER: builtins.int
    eid: builtins.str
    """异常 id(可选，仅限异常被数据库记录时返回)"""
    sentry_id: builtins.str
    """sentry id(可选，仅限异常被sentry记录时返回)"""
    @property
    def time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """时间"""
    @property
    def info(self) -> global___ExceptionInfo:
        """python异常信息(可选，仅限debug时返回)"""
    def __init__(
        self,
        *,
        eid: builtins.str = ...,
        sentry_id: builtins.str = ...,
        time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        info: global___ExceptionInfo | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["info", b"info", "time", b"time"]) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "eid", b"eid", "info", b"info", "sentry_id", b"sentry_id", "time", b"time"
        ],
    ) -> None: ...

global___ApiExceptionData = ApiExceptionData

@typing_extensions.final
class ExceptionInfo(google.protobuf.message.Message):
    """python异常信息"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    TYPE_FIELD_NUMBER: builtins.int
    VALUE_FIELD_NUMBER: builtins.int
    TRACEBACK_FIELD_NUMBER: builtins.int
    INNER_TYPE_FIELD_NUMBER: builtins.int
    INNER_VALUE_FIELD_NUMBER: builtins.int
    type: builtins.str
    """异常类型"""
    value: builtins.str
    """异常内容"""
    @property
    def traceback(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """异常堆栈"""
    inner_type: builtins.str
    """内部异常类型"""
    inner_value: builtins.str
    """内部异常内容"""
    def __init__(
        self,
        *,
        type: builtins.str = ...,
        value: builtins.str = ...,
        traceback: collections.abc.Iterable[builtins.str] | None = ...,
        inner_type: builtins.str = ...,
        inner_value: builtins.str = ...,
    ) -> None: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "inner_type",
            b"inner_type",
            "inner_value",
            b"inner_value",
            "traceback",
            b"traceback",
            "type",
            b"type",
            "value",
            b"value",
        ],
    ) -> None: ...

global___ExceptionInfo = ExceptionInfo
