# generated by datamodel-codegen:
#   timestamp: 2025-10-13T03:43:13+00:00

from __future__ import annotations

from pydantic import BaseModel


class LifecycleStatus(BaseModel):  # type: ignore
    name: str
    icon: str
    color: str
    type: str


class IpInfo(BaseModel):  # type: ignore
    ip: str
    country: str
    isoStateCode: str
    lat: float
    lon: float


class Header(BaseModel):  # type: ignore
    name: str
    type: str


class Row(BaseModel):  # type: ignore
    values: list[str]


class MetaField(BaseModel):  # type: ignore
    id: int
    isEditableByUser: bool
    includeInProvision: bool
    isMandatory: bool
    isExcludedFromRecentUsed: bool
    isDisabled: bool
    icon: str
    isDefault: bool
    value: str | None = None
    name: str
    type: str
    userId: int | None = None
    description: str | None = None
    isFirstNameEnabled: bool | None = None
    isLastNameEnabled: bool | None = None
    isEmailEnabled: bool | None = None
    isPhoneEnabled: bool | None = None
    streetAddress: str | None = None
    isStreetAddressEnabled: bool | None = None
    isStreetAddress2Enabled: bool | None = None
    country: str | None = None
    isCountryEnabled: bool | None = None
    city: str | None = None
    isCityEnabled: bool | None = None
    state: str | None = None
    isStateEnabled: bool | None = None
    zip: str | None = None
    isZipEnabled: bool | None = None
    isDefaultsEnabled: bool | None = None
    filename: str | None = None
    headers: list[Header] | None = None
    rows: list[Row] | None = None
    selectedRowIndex: int | None = None


class HardwareInfo(BaseModel):  # type: ignore
    version: str
    fwType: str
    blynkVersion: str
    build: str
    templateId: str
    heartbeatInterval: int
    buffIn: int
    type: str


class TabPage(BaseModel):  # type: ignore
    id: int
    name: str
    hideTimeRange: bool


class Visualization(BaseModel):  # type: ignore
    type: str
    value: str


class OnOffDataStream(BaseModel):  # type: ignore
    id: int
    name: str
    visualization: Visualization
    pin: int
    units: str


class Visualization1(BaseModel):  # type: ignore
    type: str
    value: str
    step: float | None = None
    min: float | None = None
    max: float | None = None
    units: str | None = None


class DisplayDataStream(BaseModel):  # type: ignore
    id: int
    name: str
    visualization: Visualization1
    pin: int
    units: str


class Module(BaseModel):  # type: ignore
    name: str
    onOffDataStream: OnOffDataStream
    displayDataStreams: list[DisplayDataStream]
    backgroundColor: str


class Widget(BaseModel):  # type: ignore
    type: str
    id: int
    x: int
    y: int
    width: int
    height: int
    isDisabled: bool
    isHidden: bool
    modules: list[Module]
    alignment: str


class Dashboard(BaseModel):  # type: ignore
    widgets: list[Widget]
    hideTimeRange: bool
    lifecycleStatus: LifecycleStatus


class EviqoDevicePageModel(BaseModel):  # type: ignore
    id: int
    productId: int
    orgId: int
    name: str
    token: str
    updatedAt: int
    status: str
    lifecycleStatus: LifecycleStatus
    activatedAt: int
    activatedBy: str
    disconnectTime: int
    ipInfo: IpInfo
    metadataUpdatedAt: int
    lastReportedAt: int
    connectTime: int
    iconName: str
    color: int
    metaFields: list[MetaField]
    productName: str
    productLogoUrl: str
    orgName: str
    ownerEmail: str
    ownerId: int
    ownerOrgId: int
    hardwareInfo: HardwareInfo
    productHierarchy: list[int]
    locationId: int
    isSsl: bool
    showOnMap: bool
    originalProductOrgId: int
    automationsCount: int
    tabPages: list[TabPage]
    dashboard: Dashboard
    templateId: str
    tz: str
    connectionType: str
    isSharedWithUser: bool
    isLocked: bool
