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

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class CalendarEventResponse(UniversalBaseModel):
    """
    Response schema for a calendar event.
    """

    id: str
    calendar_provider: str
    title: typing.Optional[str] = None
    start_time: dt.datetime
    end_time: dt.datetime
    timezone: typing.Optional[str] = None
    meeting_link: typing.Optional[str] = None
    meeting_platform: typing.Optional[str] = None
    is_joinable: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether Meeting Buddy can join this event (true when a supported meeting link is detected)
    """

    organizer_email: typing.Optional[str] = None
    attendee_count: int
    is_recurring: bool
    status: str
    auto_join_status: str
    session_id: typing.Optional[str] = None
    synced_at: dt.datetime
    created_at: dt.datetime

    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
