# 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 .lang2fhir_and_create_multi_response_resource_info_item import Lang2FhirAndCreateMultiResponseResourceInfoItem
from .lang2fhir_and_create_multi_response_response_bundle import Lang2FhirAndCreateMultiResponseResponseBundle


class Lang2FhirAndCreateMultiResponse(UniversalBaseModel):
    success: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether the resources were created successfully
    """

    message: typing.Optional[str] = pydantic.Field(default=None)
    """
    Status message
    """

    response_bundle: typing.Optional[Lang2FhirAndCreateMultiResponseResponseBundle] = pydantic.Field(default=None)
    """
    FHIR transaction-response Bundle from the server with resolved resource IDs
    """

    resource_info: typing.Optional[typing.List[Lang2FhirAndCreateMultiResponseResourceInfoItem]] = pydantic.Field(
        default=None
    )
    """
    Metadata about created resources (temp IDs, types, descriptions)
    """

    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
