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

import datetime as dt
import typing

from ..........core.datetime_utils import serialize_datetime
from ...base.types.timestamp import Timestamp
from .meeting_attendee import MeetingAttendee

try:
    import pydantic.v1 as pydantic  # type: ignore
except ImportError:
    import pydantic  # type: ignore


class Meeting(pydantic.BaseModel):
    """
    The Meeting object encompasses information relating to a meeting, such as might be present in typical office calendar software like Teams, Outlook, Google Calendar, etc.
    """

    attendees: typing.Optional[typing.List[MeetingAttendee]] = pydantic.Field(default=None)
    """
    Actors who are attendees of the meeting.
    """

    end_time: typing.Optional[Timestamp] = pydantic.Field(default=None)
    """
    Time at which the meeting is scheduled to end.
    """

    end_time_dt: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Time at which the meeting is scheduled to end.
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    The meeting's display name.
    """

    start_time: typing.Optional[Timestamp] = pydantic.Field(default=None)
    """
    Time at which the meeting is scheduled to begin.
    """

    start_time_dt: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Time at which the meeting is scheduled to begin.
    """

    uid: typing.Optional[str] = pydantic.Field(default=None)
    """
    Unique ID associated with the meeting.
    """

    urls: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    URLs associated with the meeting, e.g. video conference links.
    """

    def json(self, **kwargs: typing.Any) -> str:
        kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
        return super().json(**kwargs_with_defaults)

    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
        kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
        return super().dict(**kwargs_with_defaults)

    class Config:
        frozen = True
        smart_union = True
        extra = pydantic.Extra.allow
        json_encoders = {dt.datetime: serialize_datetime}
