"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from typing import Optional

from friendli.core.audio import AsyncAudio, SyncAudio
from friendli.core.dedicated_chat import AsyncDedicatedChat, SyncDedicatedChat
from friendli.core.dedicated_completions import (
    AsyncDedicatedCompletions,
    SyncDedicatedCompletions,
)
from friendli.core.dedicated_image import AsyncDedicatedImage, SyncDedicatedImage
from friendli.core.dedicated_token import AsyncDedicatedToken, SyncDedicatedToken
from friendli.core.endpoint import AsyncEndpoint, SyncEndpoint

from .basesdk import AsyncSDK, BaseSDK, SyncSDK
from .sdkconfiguration import SDKConfiguration


class BaseDedicated(BaseSDK):
    def __init__(
        self,
        sdk_config: SDKConfiguration,
        parent_ref: Optional[object] = None,
    ) -> None:
        BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref)
        self.sdk_configuration = sdk_config
        self._init_sdks()

    def _init_sdks(self) -> None: ...


class SyncDedicated(BaseDedicated, SyncSDK):
    chat: SyncDedicatedChat
    completions: SyncDedicatedCompletions
    token: SyncDedicatedToken
    image: SyncDedicatedImage
    audio: SyncAudio
    endpoint: SyncEndpoint

    def _init_sdks(self):
        self.chat = SyncDedicatedChat(
            self.sdk_configuration,
            parent_ref=self.parent_ref,
        )
        self.completions = SyncDedicatedCompletions(
            self.sdk_configuration,
            parent_ref=self.parent_ref,
        )
        self.token = SyncDedicatedToken(
            self.sdk_configuration,
            parent_ref=self.parent_ref,
        )
        self.image = SyncDedicatedImage(
            self.sdk_configuration,
            parent_ref=self.parent_ref,
        )
        self.audio = SyncAudio(self.sdk_configuration, parent_ref=self.parent_ref)
        self.endpoint = SyncEndpoint(self.sdk_configuration, parent_ref=self.parent_ref)


class AsyncDedicated(BaseDedicated, AsyncSDK):
    chat: AsyncDedicatedChat
    completions: AsyncDedicatedCompletions
    token: AsyncDedicatedToken
    image: AsyncDedicatedImage
    audio: AsyncAudio
    endpoint: AsyncEndpoint

    def _init_sdks(self):
        self.chat = AsyncDedicatedChat(
            self.sdk_configuration,
            parent_ref=self.parent_ref,
        )
        self.completions = AsyncDedicatedCompletions(
            self.sdk_configuration,
            parent_ref=self.parent_ref,
        )
        self.token = AsyncDedicatedToken(
            self.sdk_configuration,
            parent_ref=self.parent_ref,
        )
        self.image = AsyncDedicatedImage(
            self.sdk_configuration,
            parent_ref=self.parent_ref,
        )
        self.audio = AsyncAudio(self.sdk_configuration, parent_ref=self.parent_ref)
        self.endpoint = AsyncEndpoint(
            self.sdk_configuration,
            parent_ref=self.parent_ref,
        )
