# 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 .assets_location_link_response_config_object_response_body import (
    AssetsLocationLinkResponseConfigObjectResponseBody,
)
from .assets_near_location_link_config_object_response_body import AssetsNearLocationLinkConfigObjectResponseBody
from .assets_on_route_link_config_object_response_body import AssetsOnRouteLinkConfigObjectResponseBody
from .live_sharing_link_full_response_object_response_body_type import LiveSharingLinkFullResponseObjectResponseBodyType


class LiveSharingLinkFullResponseObjectResponseBody(UniversalBaseModel):
    """
    Live Sharing Link object
    """

    assets_location_link_config: typing_extensions.Annotated[
        typing.Optional[AssetsLocationLinkResponseConfigObjectResponseBody],
        FieldMetadata(alias="assetsLocationLinkConfig"),
        pydantic.Field(alias="assetsLocationLinkConfig"),
    ] = None
    assets_near_location_link_config: typing_extensions.Annotated[
        typing.Optional[AssetsNearLocationLinkConfigObjectResponseBody],
        FieldMetadata(alias="assetsNearLocationLinkConfig"),
        pydantic.Field(alias="assetsNearLocationLinkConfig"),
    ] = None
    assets_on_route_link_config: typing_extensions.Annotated[
        typing.Optional[AssetsOnRouteLinkConfigObjectResponseBody],
        FieldMetadata(alias="assetsOnRouteLinkConfig"),
        pydantic.Field(alias="assetsOnRouteLinkConfig"),
    ] = None
    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    Description for the Live Sharing Link (not applicable for 'assetsOnRoute' type).
    """

    expires_at_time: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="expiresAtTime"),
        pydantic.Field(alias="expiresAtTime", description="Date that this link expires, in RFC 3339 format."),
    ] = None
    id: str = pydantic.Field()
    """
    Unique identifier for the Live Sharing Link.
    """

    live_sharing_url: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="liveSharingUrl"),
        pydantic.Field(alias="liveSharingUrl", description="The shareable URL of the vehicle's location."),
    ]
    name: str = pydantic.Field()
    """
    Name of the Live Sharing Link.
    """

    type: LiveSharingLinkFullResponseObjectResponseBodyType = pydantic.Field()
    """
    Type of the Live Sharing Link.  Valid values: `assetsLocation`, `assetsNearLocation`, `assetsOnRoute`
    """

    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
