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

import typing

from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .....core.request_options import RequestOptions
from .raw_client import AsyncRawV1Client, RawV1Client
from .types.insurance_adjudication import InsuranceAdjudication
from .types.insurance_adjudication_id import InsuranceAdjudicationId


class V1Client:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawV1Client(client_wrapper=client_wrapper)

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

        Returns
        -------
        RawV1Client
        """
        return self._raw_client

    def get(
        self,
        insurance_adjudication_id: InsuranceAdjudicationId,
        *,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> InsuranceAdjudication:
        """
        Retrieves a previously created insurance adjudication by its `insurance_adjudication_id`.

        Parameters
        ----------
        insurance_adjudication_id : InsuranceAdjudicationId

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        InsuranceAdjudication

        Examples
        --------
        import uuid

        from candid import CandidApiClient

        client = CandidApiClient(
            client_id="YOUR_CLIENT_ID",
            client_secret="YOUR_CLIENT_SECRET",
        )
        client.insurance_adjudications.v_1.get(
            insurance_adjudication_id=uuid.UUID(
                "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
            ),
        )
        """
        _response = self._raw_client.get(insurance_adjudication_id, request_options=request_options)
        return _response.data


class AsyncV1Client:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawV1Client(client_wrapper=client_wrapper)

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

        Returns
        -------
        AsyncRawV1Client
        """
        return self._raw_client

    async def get(
        self,
        insurance_adjudication_id: InsuranceAdjudicationId,
        *,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> InsuranceAdjudication:
        """
        Retrieves a previously created insurance adjudication by its `insurance_adjudication_id`.

        Parameters
        ----------
        insurance_adjudication_id : InsuranceAdjudicationId

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        InsuranceAdjudication

        Examples
        --------
        import asyncio
        import uuid

        from candid import AsyncCandidApiClient

        client = AsyncCandidApiClient(
            client_id="YOUR_CLIENT_ID",
            client_secret="YOUR_CLIENT_SECRET",
        )


        async def main() -> None:
            await client.insurance_adjudications.v_1.get(
                insurance_adjudication_id=uuid.UUID(
                    "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
                ),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get(insurance_adjudication_id, request_options=request_options)
        return _response.data
