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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .contact_email import ContactEmail
from .contact_first_name import ContactFirstName
from .contact_id import ContactId
from .contact_last_name import ContactLastName
from .contact_phone import ContactPhone


class Contact(UniversalBaseModel):
    """
    Information about a notification contact for alerts.
    """

    email: ContactEmail
    first_name: typing_extensions.Annotated[
        ContactFirstName, FieldMetadata(alias="firstName"), pydantic.Field(alias="firstName")
    ]
    id: ContactId
    last_name: typing_extensions.Annotated[
        ContactLastName, FieldMetadata(alias="lastName"), pydantic.Field(alias="lastName")
    ]
    phone: ContactPhone

    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
