# 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 .attendee_response_status import AttendeeResponseStatus


class GoogleCalendarAttendee(UniversalBaseModel):
    """
    Google Calendar event attendee
    """

    email: str = pydantic.Field()
    """
    Attendee email address (required)
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Attendee display name
    """

    is_optional: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isOptional")] = pydantic.Field(
        default=None
    )
    """
    Whether attendance is optional
    """

    comment: typing.Optional[str] = pydantic.Field(default=None)
    """
    Attendee's response comment
    """

    accepted: typing.Optional[AttendeeResponseStatus] = pydantic.Field(default=None)
    """
    Response status
    """

    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
