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

import datetime as dt
import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .behavior_response_body import BehaviorResponseBody
from .coaching_sessions_response_response_body_coaching_type import CoachingSessionsResponseResponseBodyCoachingType
from .coaching_sessions_response_response_body_session_status import CoachingSessionsResponseResponseBodySessionStatus
from .driver_with_external_id_object_response_body import DriverWithExternalIdObjectResponseBody


class CoachingSessionsResponseResponseBody(UniversalBaseModel):
    """
    List of coaching sessions objects.
    """

    assigned_coach_id: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="assignedCoachId"),
        pydantic.Field(
            alias="assignedCoachId",
            description="Unique user ID for a coaching session. Returned when a coaching session status is “incomplete”.",
        ),
    ] = None
    behaviors: typing.List[BehaviorResponseBody] = pydantic.Field()
    """
    Object references for the behaviors within the session.
    """

    coaching_type: typing_extensions.Annotated[
        CoachingSessionsResponseResponseBodyCoachingType,
        FieldMetadata(alias="coachingType"),
        pydantic.Field(
            alias="coachingType",
            description="Coaching type for the coaching session.  Valid values: `fullySharedWithManager`, `selfCoaching`, `unknown`, `unshared`, `withManager`",
        ),
    ]
    completed_at_time: typing_extensions.Annotated[
        typing.Optional[dt.datetime],
        FieldMetadata(alias="completedAtTime"),
        pydantic.Field(
            alias="completedAtTime",
            description="Time coaching session is completed in UTC. Returned when a coaching session status is “completed”.",
        ),
    ] = None
    completed_coach_id: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="completedCoachId"),
        pydantic.Field(
            alias="completedCoachId",
            description="Unique user ID for a completed coaching session. Returned when a coaching session status is “completed”.",
        ),
    ] = None
    driver: DriverWithExternalIdObjectResponseBody
    due_at_time: typing_extensions.Annotated[
        dt.datetime,
        FieldMetadata(alias="dueAtTime"),
        pydantic.Field(alias="dueAtTime", description="Time coaching session is due in UTC."),
    ]
    id: str = pydantic.Field()
    """
    Unique ID for the coaching session.
    """

    session_note: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="sessionNote"),
        pydantic.Field(
            alias="sessionNote", description="Associated note for the coaching session. Returned when present."
        ),
    ] = None
    session_status: typing_extensions.Annotated[
        CoachingSessionsResponseResponseBodySessionStatus,
        FieldMetadata(alias="sessionStatus"),
        pydantic.Field(
            alias="sessionStatus",
            description="Status for the coaching session.  Valid values: `unknown`, `upcoming`, `completed`, `deleted`",
        ),
    ]
    updated_at_time: typing_extensions.Annotated[
        dt.datetime,
        FieldMetadata(alias="updatedAtTime"),
        pydantic.Field(alias="updatedAtTime", description="Time coaching session was updated in UTC."),
    ]

    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
