"""
This type stub file was generated by pyright.
"""

import asyncio
from typing import TYPE_CHECKING
from nats.aio.subscription import Subscription

if TYPE_CHECKING:
    ...
class Error(Exception):
    ...


class TimeoutError(Error, asyncio.TimeoutError):
    def __str__(self) -> str:
        ...
    


class NoRespondersError(Error):
    def __str__(self) -> str:
        ...
    


class StaleConnectionError(Error):
    def __str__(self) -> str:
        ...
    


class OutboundBufferLimitError(Error):
    def __str__(self) -> str:
        ...
    


class UnexpectedEOF(StaleConnectionError):
    def __str__(self) -> str:
        ...
    


class FlushTimeoutError(TimeoutError):
    def __str__(self) -> str:
        ...
    


class ConnectionClosedError(Error):
    def __str__(self) -> str:
        ...
    


class SecureConnRequiredError(Error):
    def __str__(self) -> str:
        ...
    


class SecureConnWantedError(Error):
    def __str__(self) -> str:
        ...
    


class SecureConnFailedError(Error):
    def __str__(self) -> str:
        ...
    


class BadSubscriptionError(Error):
    def __str__(self) -> str:
        ...
    


class BadSubjectError(Error):
    def __str__(self) -> str:
        ...
    


class SlowConsumerError(Error):
    def __init__(self, subject: str, reply: str, sid: int, sub: Subscription) -> None:
        ...
    
    def __str__(self) -> str:
        ...
    


class BadTimeoutError(Error):
    def __str__(self) -> str:
        ...
    


class AuthorizationError(Error):
    def __str__(self) -> str:
        ...
    


class NoServersError(Error):
    def __str__(self) -> str:
        ...
    


class JsonParseError(Error):
    def __str__(self) -> str:
        ...
    


class MaxPayloadError(Error):
    def __str__(self) -> str:
        ...
    


class DrainTimeoutError(TimeoutError):
    def __str__(self) -> str:
        ...
    


class ConnectionDrainingError(Error):
    def __str__(self) -> str:
        ...
    


class ConnectionReconnectingError(Error):
    def __str__(self) -> str:
        ...
    


class InvalidUserCredentialsError(Error):
    def __str__(self) -> str:
        ...
    


class InvalidCallbackTypeError(Error):
    def __str__(self) -> str:
        ...
    


class ProtocolError(Error):
    def __str__(self) -> str:
        ...
    


class NotJSMessageError(Error):
    """
    When it is attempted to use an API meant for JetStream on a message
    that does not belong to a stream.
    """
    def __str__(self) -> str:
        ...
    


class MsgAlreadyAckdError(Error):
    def __init__(self, msg=...) -> None:
        ...
    
    def __str__(self) -> str:
        ...
    


