# 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 .connection_status_response_object_response_body_health_status import (
    ConnectionStatusResponseObjectResponseBodyHealthStatus,
)


class ConnectionStatusResponseObjectResponseBody(UniversalBaseModel):
    """
    An objecting containing information about the connectivity status of the gateway
    """

    health_status: typing_extensions.Annotated[
        typing.Optional[ConnectionStatusResponseObjectResponseBodyHealthStatus],
        FieldMetadata(alias="healthStatus"),
        pydantic.Field(
            alias="healthStatus",
            description="The most recent health status of the gateway.  Valid values: `Status Not Set`, `Connected`, `Not Installed`, `Power Source Off - Active Vehicle`, `Power Source Off - Inactive Vehicle`, `Weak Cellular Signal`, `Requires Investigation`, `Requires Charge`, `Unsupported Product`, `Low Battery. Replace Device.`, `Low Vehicle Battery`, `Unplugged`, `Low Charging State`, `Vehicle Off`, `Weak GPS Signal`, `Low Gateway Battery`, `Low Gateway Battery (AG24)`, `Low Gateway Battery (AG45)`, `Low Gateway Battery (AG26)`, `Low Gateway Battery (AG46)`, `Low Gateway Battery (AG46-P)`, `Temporarily Offline`, `Prolonged Offline`, `Recently Offline`, `Replacement Required`, `Status Unknown`",
        ),
    ] = None
    last_connected: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="lastConnected"),
        pydantic.Field(
            alias="lastConnected",
            description="The last time the gateway was connected in RFC 3339 format. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).",
        ),
    ] = None

    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
