# Path: grpclib/const.py
# class Status(enum.Enum):
#     """Predefined gRPC status codes represented as enum
# 
#     See also: https://github.com/grpc/grpc/blob/master/doc/statuscodes.md
#     """
#     #: The operation completed successfully
#     OK = 0
#     #: The operation was cancelled (typically by the caller)
#     CANCELLED = 1
#     #: Generic status to describe error when it can't be described using
#     #: other statuses
#     UNKNOWN = 2
#     #: Client specified an invalid argument
#     INVALID_ARGUMENT = 3
#     #: Deadline expired before operation could complete
#     DEADLINE_EXCEEDED = 4
#     #: Some requested entity was not found
#     NOT_FOUND = 5
#     #: Some entity that we attempted to create already exists
#     ALREADY_EXISTS = 6
#     #: The caller does not have permission to execute the specified operation
#     PERMISSION_DENIED = 7
#     #: Some resource has been exhausted, perhaps a per-user quota, or perhaps
#     #: the entire file system is out of space
#     RESOURCE_EXHAUSTED = 8
#     #: Operation was rejected because the system is not in a state required
#     #: for the operation's execution
#     FAILED_PRECONDITION = 9
#     #: The operation was aborted
#     ABORTED = 10
#     #: Operation was attempted past the valid range
#     OUT_OF_RANGE = 11
#     #: Operation is not implemented or not supported/enabled in this service
#     UNIMPLEMENTED = 12
#     #: Internal errors
#     INTERNAL = 13
#     #: The service is currently unavailable
#     UNAVAILABLE = 14
#     #: Unrecoverable data loss or corruption
#     DATA_LOSS = 15
#     #: The request does not have valid authentication credentials for the
#     #: operation
#     UNAUTHENTICATED = 16
# 
# Path: grpclib/utils.py
# def _cached(func: Callable[[], Any]) -> Callable[[], Any]:
#     @wraps(func)
#     def wrapper() -> Any:
#         try:
#             return func.__result__  # type: ignore
#         except AttributeError:
#             func.__result__ = func()  # type: ignore
#             return func.__result__  # type: ignore
#     return wrapper
# 
# Path: grpclib/encoding/base.py
# class CodecBase(abc.ABC):
# 
#     @property
#     @abc.abstractmethod
#     def __content_subtype__(self) -> str:
#         pass
# 
#     @abc.abstractmethod
#     def encode(self, message: Any, message_type: Any) -> bytes:
#         pass
# 
#     @abc.abstractmethod
#     def decode(self, data: bytes, message_type: Any) -> Any:
#         pass
# 
# class StatusDetailsCodecBase(abc.ABC):
# 
#     @abc.abstractmethod
#     def encode(
#         self, status: Status, message: Optional[str], details: Any,
#     ) -> bytes:
#         pass
# 
#     @abc.abstractmethod
#     def decode(
#         self, status: Status, message: Optional[str], data: bytes,
#     ) -> Any:
#         pass


from typing import TYPE_CHECKING, Type, Optional, Sequence, Any
from ..const import Status
from ..utils import _cached
from .base import CodecBase, StatusDetailsCodecBase
    from google.protobuf.message import Message  # noqa
    from .._typing import IProtoMessage  # noqa
    from google.rpc import status_pb2
    from google.protobuf.symbol_database import Default
        import google.rpc.status_pb2  # noqa




if TYPE_CHECKING:


@_cached
def _status_pb2() -> Any:
    return status_pb2



# Path: grpclib/const.py
# class Status(enum.Enum):
#     """Predefined gRPC status codes represented as enum
# 
#     See also: https://github.com/grpc/grpc/blob/master/doc/statuscodes.md
#     """
#     #: The operation completed successfully
#     OK = 0
#     #: The operation was cancelled (typically by the caller)
#     CANCELLED = 1
#     #: Generic status to describe error when it can't be described using
#     #: other statuses
#     UNKNOWN = 2
#     #: Client specified an invalid argument
#     INVALID_ARGUMENT = 3
#     #: Deadline expired before operation could complete
#     DEADLINE_EXCEEDED = 4
#     #: Some requested entity was not found
#     NOT_FOUND = 5
#     #: Some entity that we attempted to create already exists
#     ALREADY_EXISTS = 6
#     #: The caller does not have permission to execute the specified operation
#     PERMISSION_DENIED = 7
#     #: Some resource has been exhausted, perhaps a per-user quota, or perhaps
#     #: the entire file system is out of space
#     RESOURCE_EXHAUSTED = 8
#     #: Operation was rejected because the system is not in a state required
#     #: for the operation's execution
#     FAILED_PRECONDITION = 9
#     #: The operation was aborted
#     ABORTED = 10
#     #: Operation was attempted past the valid range
#     OUT_OF_RANGE = 11
#     #: Operation is not implemented or not supported/enabled in this service
#     UNIMPLEMENTED = 12
#     #: Internal errors
#     INTERNAL = 13
#     #: The service is currently unavailable
#     UNAVAILABLE = 14
#     #: Unrecoverable data loss or corruption
#     DATA_LOSS = 15
#     #: The request does not have valid authentication credentials for the
#     #: operation
#     UNAUTHENTICATED = 16
# 
# Path: grpclib/utils.py
# def _cached(func: Callable[[], Any]) -> Callable[[], Any]:
#     @wraps(func)
#     def wrapper() -> Any:
#         try:
#             return func.__result__  # type: ignore
#         except AttributeError:
#             func.__result__ = func()  # type: ignore
#             return func.__result__  # type: ignore
#     return wrapper
# 
# Path: grpclib/encoding/base.py
# class CodecBase(abc.ABC):
# 
#     @property
#     @abc.abstractmethod
#     def __content_subtype__(self) -> str:
#         pass
# 
#     @abc.abstractmethod
#     def encode(self, message: Any, message_type: Any) -> bytes:
#         pass
# 
#     @abc.abstractmethod
#     def decode(self, data: bytes, message_type: Any) -> Any:
#         pass
# 
# class StatusDetailsCodecBase(abc.ABC):
# 
#     @abc.abstractmethod
#     def encode(
#         self, status: Status, message: Optional[str], details: Any,
#     ) -> bytes:
#         pass
# 
#     @abc.abstractmethod
#     def decode(
#         self, status: Status, message: Optional[str], data: bytes,
#     ) -> Any:
#         pass


# Path: grpclib/encoding/proto.py
from typing import TYPE_CHECKING, Type, Optional, Sequence, Any
from ..const import Status
from ..utils import _cached
from .base import CodecBase, StatusDetailsCodecBase
    from google.protobuf.message import Message  # noqa
    from .._typing import IProtoMessage  # noqa
    from google.rpc import status_pb2
    from google.protobuf.symbol_database import Default
        import google.rpc.status_pb2  # noqa





if TYPE_CHECKING:


@_cached
def _status_pb2() -> Any:
    return status_pb2



@_cached