# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: proto/error/v1/error.proto
# plugin: python-betterproto
from dataclasses import dataclass
from typing import Dict

import betterproto
from betterproto.grpc.grpclib_server import ServiceBase


@dataclass(eq=False, repr=False)
class ErrorScope(betterproto.Message):
    # The API service invoked, e.g. 'Service.Method'.
    service: str = betterproto.string_field(1)
    # The plugin method invoked, e.g. 'PluginService.Method'.
    plugin: str = betterproto.string_field(2)
    # The plugin method arguments, ensure only non-sensitive data is specified.
    args: Dict[str, str] = betterproto.map_field(
        3, betterproto.TYPE_STRING, betterproto.TYPE_STRING
    )


@dataclass(eq=False, repr=False)
class ErrorDetails(betterproto.Message):
    # The developer error message, explaining the error and ideally solution.
    message: str = betterproto.string_field(1)
    # The error root cause.
    cause: str = betterproto.string_field(2)
    # The scope of the error.
    scope: "ErrorScope" = betterproto.message_field(3)
