import enum
from dataclasses import dataclass

@dataclass
class BoardInfo:
    type: str
    configVersion: str
    ecpVersion: str

class PlugType(str, enum.Enum):
    DUMMY = "XFCDummy",
    CHADEMO = "XFCCHAdeMO",
    CCS = "XFCCombo",
    AC = "XFCAC"

class PowerUnitType(str, enum.Enum):
    PRE = "PRE",
    PRE_EVC30KW = "PRE_EVC30KW",
    PRE_V2G = "PRE_V2G",
    REV_EVC500V32A = "1.x_32A",
    REV_EVC500V35A = "1.x_35A",
    REV_EVDC500V63A = "1.x_63A_DC",
    DELTA_GW = "DELTA_GW",
    DELTA_GW_EVMA253 = "DELTA_GW_EVMA253",
    DELTA_EVMA253 = "DELTA_EVMA253",
    DELTA_EIPM25KTC = "DELTA_EIPM25KTC",
    AC = "AC",
    INFY_REG = "INFY_REG",
    INFY_BEG = "INFY_BEG",
    REMOTE = "REMOTE",
    DUMMY = "DUMMY"

@dataclass
class PlugInfo:
    type: PlugType
    ocppConnectorId: int

@dataclass
class PowerUnitInfo:
    type: str
    canId: list[int]

@dataclass
class SimCardDto:
    IPv4IP: str
    ICCID: str

@dataclass
class OCPPDto:
    backendUrl: str
    boxID: str
    enabled: bool

@dataclass
class SystemInfoDto:
    serialNumber: str
    modelName: str
    jsonShemaVersion: str
    boardInfos: list[BoardInfo]
    plugInfos: list[PlugInfo]
    cardReader: list[str]           # list of used cardReader [Type]
    fiscalModule: list[str]         # list of used FM [version]
    router: list[str]               # list of used Router [version]
    GPS: str                        # coordinate
    simCard: list[SimCardDto]
    ocpp: list[OCPPDto]
    powerUnits: list[PowerUnitInfo]
    gridCurrent: int                # Grid current [A]
