package common

type AddCarRequest struct {
	VIN         string   `json:"vin" validate:"required,vin"`
	LogLevel    LogLevel `json:"log_level,omitempty" swaggertype:"string"`
	CANBus      *CANBus  `json:"canbus,omitempty"`
	IDPSEnabled bool     `json:"idps_enabled,omitempty"`
}

type UpdateCarRequest struct {
	VIN         string   `json:"vin" validate:"required,vin"`
	ICCID       string   `json:"iccid,omitempty" validate:"omitempty,max=50"`
	Year        int      `json:"year,omitempty" validate:"required,gte=1000,lte=9999"`
	Model       string   `json:"model,omitempty" validate:"required,max=256"`
	Trim        string   `json:"trim,omitempty" validate:"required,max=256"`
	Country     string   `json:"country,omitempty" validate:"max=256"`
	Powertrain  string   `json:"powertrain,omitempty" validate:"max=256"`
	Restraint   string   `json:"restraint,omitempty" validate:"max=256"`
	BodyType    string   `json:"body_type,omitempty" validate:"max=256"`
	LogLevel    LogLevel `json:"log_level,omitempty" swaggertype:"string"`
	DLTEnabled  bool     `json:"dlt_enabled,omitempty" swaggertype:"boolean"`
	DLTLevel    int      `json:"dlt_level,omitempty" validate:"oneof=0 1 2 3 4 5 6 255"`
	CANBus      *CANBus  `json:"canbus,omitempty"`
	IDPSEnabled bool     `json:"idps_enabled,omitempty"`
	DebugMask   string   `json:"debug_mask,omitempty"`
	Tags        []string `json:"tags,omitempty"`
	SUMSVersion string   `json:"sums_version,omitempty"`
}
