# This file was auto-generated by Fern from our API Definition.

from __future__ import annotations

import typing

from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .raw_client import AsyncRawAuthClient, RawAuthClient

if typing.TYPE_CHECKING:
    from .v1.client import AsyncV1Client, V1Client


class AuthClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawAuthClient(client_wrapper=client_wrapper)
        self._client_wrapper = client_wrapper
        self._v1: typing.Optional[V1Client] = None

    @property
    def with_raw_response(self) -> RawAuthClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawAuthClient
        """
        return self._raw_client

    @property
    def v1(self):
        if self._v1 is None:
            from .v1.client import V1Client  # noqa: E402

            self._v1 = V1Client(client_wrapper=self._client_wrapper)
        return self._v1


class AsyncAuthClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawAuthClient(client_wrapper=client_wrapper)
        self._client_wrapper = client_wrapper
        self._v1: typing.Optional[AsyncV1Client] = None

    @property
    def with_raw_response(self) -> AsyncRawAuthClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawAuthClient
        """
        return self._raw_client

    @property
    def v1(self):
        if self._v1 is None:
            from .v1.client import AsyncV1Client  # noqa: E402

            self._v1 = AsyncV1Client(client_wrapper=self._client_wrapper)
        return self._v1
