from typing import Optional

from pydantic import BaseModel, Field


class DeviceInfo(BaseModel):
    """
    Hard and software information about the device.
    """

    serial: Optional[str] = Field(alias="serial", default=None)
    device_id: Optional[str] = Field(alias="deviceId", default=None)
    ecp_version: Optional[str] = Field(alias="ecpVersion", default=None)
    msii_version: Optional[str] = Field(alias="msiiVersion", default=None)
    os_release_version: Optional[str] = Field(alias="osReleaseVersion", default=None)
    rescue_os_version: Optional[str] = Field(alias="rescueOsVersion", default=None)
    role: Optional[str] = Field(alias="role", default=None)


DeviceInfo.update_forward_refs()
