# 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 .cimd_mapped_client_fields import CimdMappedClientFields
from .cimd_validation_result import CimdValidationResult


class PreviewCimdMetadataResponseContent(UniversalBaseModel):
    client_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The client_id of an existing client registered with this external_client_id, if one exists.
    """

    errors: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Array of retrieval errors (populated when the metadata document could not be fetched). When present, validation is omitted.
    """

    validation: typing.Optional[CimdValidationResult] = None
    mapped_fields: typing.Optional[CimdMappedClientFields] = None

    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
