# 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 OrgCalendarConnectionResponse(UniversalBaseModel):
    """
    Response schema for an org calendar connection.
    """

    id: str
    organization_id: str
    provider: str
    calendar_name: str
    account_email: str
    is_active: bool
    sync_interval_minutes: int
    last_sync_at: typing.Optional[dt.datetime] = None
    created_by: str
    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
