# 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 .clinical_data import ClinicalData
from .dosing_data import DosingData
from .food_data import FoodData
from .interactions_data import InteractionsData
from .reproductive_safety_data import ReproductiveSafetyData
from .side_effects_data import SideEffectsData


class SafetyData(UniversalBaseModel):
    """
    Safety screening results organized by domain. Each domain key maps
    to domain-specific data. Domains not requested via `include` will
    be absent from this object.
    """

    side_effects: typing.Optional[typing.Dict[str, SideEffectsData]] = pydantic.Field(default=None)
    """
    Adverse effects data keyed by sfrx_id. Includes risk level,
    Black Box Warnings, severe/common effects, monitoring, and
    dose classification.
    """

    interactions: typing.Optional[InteractionsData] = None
    reproductive_safety: typing.Optional[typing.Dict[str, ReproductiveSafetyData]] = pydantic.Field(default=None)
    """
    Pregnancy & lactation risk data keyed by sfrx_id
    """

    food: typing.Optional[typing.Dict[str, FoodData]] = pydantic.Field(default=None)
    """
    Food-drug interaction data keyed by sfrx_id
    """

    clinical: typing.Optional[ClinicalData] = None
    dosing: typing.Optional[typing.Dict[str, DosingData]] = pydantic.Field(default=None)
    """
    Maximum daily dose data keyed by sfrx_id
    """

    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
