# generated by datamodel-codegen:
#   filename:  Health/HealthCheckRequest.json

from __future__ import annotations
from architect_py.grpc.models.Health.HealthCheckResponse import HealthCheckResponse

from typing import Annotated, Optional

from msgspec import Meta, Struct


class HealthCheckRequest(Struct, omit_defaults=True):
    include_metrics: Optional[bool] = None
    service: Optional[
        Annotated[
            Optional[str],
            Meta(
                description="The service to check status for; if not provided, status of the queried server overall is returned.\n\nGenerally, this will only be set when querying the API gateway.  It's not recommended to rely on internal subservice names being stable."
            ),
        ]
    ] = None
    """
    The service to check status for; if not provided, status of the queried server overall is returned.

    Generally, this will only be set when querying the API gateway.  It's not recommended to rely on internal subservice names being stable.
    """

    # Constructor that takes all field titles as arguments for convenience
    @classmethod
    def new(
        cls,
        include_metrics: Optional[bool] = None,
        service: Optional[str] = None,
    ):
        return cls(
            include_metrics,
            service,
        )

    def __str__(self) -> str:
        return f"HealthCheckRequest(include_metrics={self.include_metrics},service={self.service})"

    @staticmethod
    def get_response_type():
        return HealthCheckResponse

    @staticmethod
    def get_unannotated_response_type():
        return HealthCheckResponse

    @staticmethod
    def get_route() -> str:
        return "/json.architect.Health/Check"

    @staticmethod
    def get_rpc_method():
        return "unary"
