# coding: utf-8

from __future__ import annotations
from datetime import date, datetime  # noqa: F401

import re  # noqa: F401
from typing import Any, Dict, List, Optional  # noqa: F401

from pydantic import AnyUrl, BaseModel, EmailStr, Field, validator  # noqa: F401


class ChargeParamBptEVFix(BaseModel):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.

    ChargeParamBptEVFix - a model defined in OpenAPI

        ev_bpt_cat: The ev_bpt_cat of this ChargeParamBptEVFix [Optional].
        ev_bpt_req: The ev_bpt_req of this ChargeParamBptEVFix [Optional].
        ev_target_soc: The ev_target_soc of this ChargeParamBptEVFix [Optional].
        ev_min_charge_power: The ev_min_charge_power of this ChargeParamBptEVFix [Optional].
        ev_min_discharge_power: The ev_min_discharge_power of this ChargeParamBptEVFix [Optional].
        ev_min_charge_current: The ev_min_charge_current of this ChargeParamBptEVFix [Optional].
        ev_min_discharge_current: The ev_min_discharge_current of this ChargeParamBptEVFix [Optional].
    """
    class Config:
        orm_mode = True

    ev_bpt_cat: Optional[int] = Field(alias="EVBptCat", default=None)
    ev_bpt_req: Optional[bool] = Field(alias="EVBptReq", default=None)
    ev_target_soc: Optional[int] = Field(alias="EVTargetSoc", default=None)
    ev_min_charge_power: Optional[int] = Field(alias="EVMinChargePower", default=None)
    ev_min_discharge_power: Optional[int] = Field(alias="EVMinDischargePower", default=None)
    ev_min_charge_current: Optional[int] = Field(alias="EVMinChargeCurrent", default=None)
    ev_min_discharge_current: Optional[int] = Field(alias="EVMinDischargeCurrent", default=None)

    @validator("ev_bpt_cat")
    def ev_bpt_cat_max(cls, value):
        assert value <= 10
        return value

    @validator("ev_bpt_cat")
    def ev_bpt_cat_min(cls, value):
        assert value >= 0
        return value

    @validator("ev_target_soc")
    def ev_target_soc_max(cls, value):
        assert value <= 100
        return value

    @validator("ev_target_soc")
    def ev_target_soc_min(cls, value):
        assert value >= 0
        return value

    @validator("ev_min_charge_power")
    def ev_min_charge_power_max(cls, value):
        assert value <= 10000
        return value

    @validator("ev_min_charge_power")
    def ev_min_charge_power_min(cls, value):
        assert value >= 0
        return value

    @validator("ev_min_discharge_power")
    def ev_min_discharge_power_max(cls, value):
        assert value <= 10000
        return value

    @validator("ev_min_discharge_power")
    def ev_min_discharge_power_min(cls, value):
        assert value >= 0
        return value

    @validator("ev_min_charge_current")
    def ev_min_charge_current_max(cls, value):
        assert value <= 16000
        return value

    @validator("ev_min_charge_current")
    def ev_min_charge_current_min(cls, value):
        assert value >= 0
        return value

    @validator("ev_min_discharge_current")
    def ev_min_discharge_current_max(cls, value):
        assert value <= 16000
        return value

    @validator("ev_min_discharge_current")
    def ev_min_discharge_current_min(cls, value):
        assert value >= 0
        return value

ChargeParamBptEVFix.update_forward_refs()
