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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .domain_code import DomainCode
from .metadata_response_database_stats import MetadataResponseDatabaseStats
from .metadata_response_database_versions import MetadataResponseDatabaseVersions
from .metadata_response_patient_profile_options import MetadataResponsePatientProfileOptions
from .metadata_response_risk_scales import MetadataResponseRiskScales
from .metadata_response_status import MetadataResponseStatus
from .metadata_response_tier import MetadataResponseTier


class MetadataResponse(UniversalBaseModel):
    status: MetadataResponseStatus
    max_drugs_per_request: typing.Optional[int] = pydantic.Field(default=None)
    """
    Maximum drugs allowed per request for your tier
    """

    available_domains: typing.List[DomainCode] = pydantic.Field()
    """
    All available safety domains
    """

    patient_profile_options: MetadataResponsePatientProfileOptions = pydantic.Field()
    """
    Valid values for the `patient_profile` field
    """

    risk_scales: MetadataResponseRiskScales = pydantic.Field()
    """
    Risk/severity scales used across domains
    """

    database_versions: typing.Optional[MetadataResponseDatabaseVersions] = pydantic.Field(default=None)
    """
    Current database versions
    """

    database_stats: typing.Optional[MetadataResponseDatabaseStats] = pydantic.Field(default=None)
    """
    Database coverage statistics
    """

    supported_languages: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Supported response languages
    """

    tier: typing.Optional[MetadataResponseTier] = pydantic.Field(default=None)
    """
    Caller's current tier
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
