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

from abc import abstractmethod

from friendli.endpoint import AsyncEndpoint, SyncEndpoint
from friendli.friendli_chat import AsyncFriendliChat, SyncFriendliChat
from friendli.friendli_completions import (
    AsyncFriendliCompletions,
    SyncFriendliCompletions,
)
from friendli.friendli_token import AsyncFriendliToken, SyncFriendliToken
from friendli.image import AsyncImage, SyncImage

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


class BaseDedicated(BaseSDK):
    def __init__(self, sdk_config: SDKConfiguration) -> None:
        BaseSDK.__init__(self, sdk_config)
        self.sdk_configuration = sdk_config
        self._init_sdks()

    @abstractmethod
    def _init_sdks(self):
        pass


class SyncDedicated(BaseDedicated, SyncSDK):
    chat: SyncFriendliChat
    completions: SyncFriendliCompletions
    token: SyncFriendliToken
    image: SyncImage
    endpoint: SyncEndpoint

    def _init_sdks(self):
        self.chat = SyncFriendliChat(self.sdk_configuration)
        self.completions = SyncFriendliCompletions(self.sdk_configuration)
        self.token = SyncFriendliToken(self.sdk_configuration)
        self.image = SyncImage(self.sdk_configuration)
        self.endpoint = SyncEndpoint(self.sdk_configuration)


class AsyncDedicated(BaseDedicated, AsyncSDK):
    chat: AsyncFriendliChat
    completions: AsyncFriendliCompletions
    token: AsyncFriendliToken
    image: AsyncImage
    endpoint: AsyncEndpoint

    def _init_sdks(self):
        self.chat = AsyncFriendliChat(self.sdk_configuration)
        self.completions = AsyncFriendliCompletions(self.sdk_configuration)
        self.token = AsyncFriendliToken(self.sdk_configuration)
        self.image = AsyncImage(self.sdk_configuration)
        self.endpoint = AsyncEndpoint(self.sdk_configuration)
