# Generated by smithplates HTTP codegen. Do not edit.

from __future__ import annotations

import httpx
from pydantic import Field  # noqa: F401

from generated.petstore.api.health_check_output import HealthCheckOutput
from generated.petstore.api.petstore.client.client_response import parse_client_response
from generated.petstore.api.petstore.client.operation_bindings import OPERATION_HTTP_BINDINGS


class HealthApiClient:
    def __init__(self, client: httpx.AsyncClient, base_url: str) -> None:
        self._client = client
        self._base_url = base_url.rstrip("/")

    async def health_check(
        self,
    ) -> HealthCheckOutput:
        headers: dict[str, str] | None = None

        request_url = f"{self._base_url}/health"
        response = await self._client.request(
            "GET",
            request_url,
            headers=headers,
        )
        return parse_client_response(
            response,
            OPERATION_HTTP_BINDINGS["health_check"],
        )
