# 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 AsyncRawVoiceAgentClient, RawVoiceAgentClient

if typing.TYPE_CHECKING:
    from .configurations.client import AsyncConfigurationsClient, ConfigurationsClient
    from .variables.client import AsyncVariablesClient, VariablesClient


class VoiceAgentClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawVoiceAgentClient(client_wrapper=client_wrapper)
        self._client_wrapper = client_wrapper
        self._configurations: typing.Optional[ConfigurationsClient] = None
        self._variables: typing.Optional[VariablesClient] = None

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

        Returns
        -------
        RawVoiceAgentClient
        """
        return self._raw_client

    @property
    def configurations(self):
        if self._configurations is None:
            from .configurations.client import ConfigurationsClient  # noqa: E402

            self._configurations = ConfigurationsClient(client_wrapper=self._client_wrapper)
        return self._configurations

    @property
    def variables(self):
        if self._variables is None:
            from .variables.client import VariablesClient  # noqa: E402

            self._variables = VariablesClient(client_wrapper=self._client_wrapper)
        return self._variables


class AsyncVoiceAgentClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawVoiceAgentClient(client_wrapper=client_wrapper)
        self._client_wrapper = client_wrapper
        self._configurations: typing.Optional[AsyncConfigurationsClient] = None
        self._variables: typing.Optional[AsyncVariablesClient] = None

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

        Returns
        -------
        AsyncRawVoiceAgentClient
        """
        return self._raw_client

    @property
    def configurations(self):
        if self._configurations is None:
            from .configurations.client import AsyncConfigurationsClient  # noqa: E402

            self._configurations = AsyncConfigurationsClient(client_wrapper=self._client_wrapper)
        return self._configurations

    @property
    def variables(self):
        if self._variables is None:
            from .variables.client import AsyncVariablesClient  # noqa: E402

            self._variables = AsyncVariablesClient(client_wrapper=self._client_wrapper)
        return self._variables
