# 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 ChargeParamBptEVDyn(BaseModel):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.

    ChargeParamBptEVDyn - a model defined in OpenAPI

        ev_target_energy_req: The ev_target_energy_req of this ChargeParamBptEVDyn [Optional].
        ev_min_energy_req: The ev_min_energy_req of this ChargeParamBptEVDyn [Optional].
        ev_max_energy_req: The ev_max_energy_req of this ChargeParamBptEVDyn [Optional].
        ev_max_charge_power: The ev_max_charge_power of this ChargeParamBptEVDyn [Optional].
        ev_max_discharge_power: The ev_max_discharge_power of this ChargeParamBptEVDyn [Optional].
        ev_max_charge_current: The ev_max_charge_current of this ChargeParamBptEVDyn [Optional].
        ev_max_discharge_current: The ev_max_discharge_current of this ChargeParamBptEVDyn [Optional].
        ev_min_voltage: The ev_min_voltage of this ChargeParamBptEVDyn [Optional].
        ev_max_v2_x_energy_req: The ev_max_v2_x_energy_req of this ChargeParamBptEVDyn [Optional].
        ev_min_v2_x_energy_req: The ev_min_v2_x_energy_req of this ChargeParamBptEVDyn [Optional].
    """
    class Config:
        orm_mode = True

    ev_target_energy_req: Optional[int] = Field(alias="EVTargetEnergyReq", default=None)
    ev_min_energy_req: Optional[int] = Field(alias="EVMinEnergyReq", default=None)
    ev_max_energy_req: Optional[int] = Field(alias="EVMaxEnergyReq", default=None)
    ev_max_charge_power: Optional[int] = Field(alias="EVMaxChargePower", default=None)
    ev_max_discharge_power: Optional[int] = Field(alias="EVMaxDischargePower", default=None)
    ev_max_charge_current: Optional[int] = Field(alias="EVMaxChargeCurrent", default=None)
    ev_max_discharge_current: Optional[int] = Field(alias="EVMaxDischargeCurrent", default=None)
    ev_min_voltage: Optional[int] = Field(alias="EVMinVoltage", default=None)
    ev_max_v2_x_energy_req: Optional[int] = Field(alias="EVMaxV2XEnergyReq", default=None)
    ev_min_v2_x_energy_req: Optional[int] = Field(alias="EVMinV2XEnergyReq", default=None)

    @validator("ev_target_energy_req")
    def ev_target_energy_req_max(cls, value):
        assert value <= 8190
        return value

    @validator("ev_target_energy_req")
    def ev_target_energy_req_min(cls, value):
        assert value >= -8190
        return value

    @validator("ev_min_energy_req")
    def ev_min_energy_req_max(cls, value):
        assert value <= 8190
        return value

    @validator("ev_min_energy_req")
    def ev_min_energy_req_min(cls, value):
        assert value >= -8190
        return value

    @validator("ev_max_energy_req")
    def ev_max_energy_req_max(cls, value):
        assert value <= 81900
        return value

    @validator("ev_max_energy_req")
    def ev_max_energy_req_min(cls, value):
        assert value >= -81900
        return value

    @validator("ev_max_charge_power")
    def ev_max_charge_power_max(cls, value):
        assert value <= 1300000
        return value

    @validator("ev_max_charge_power")
    def ev_max_charge_power_min(cls, value):
        assert value >= 0
        return value

    @validator("ev_max_discharge_power")
    def ev_max_discharge_power_max(cls, value):
        assert value <= 1300000
        return value

    @validator("ev_max_discharge_power")
    def ev_max_discharge_power_min(cls, value):
        assert value >= 0
        return value

    @validator("ev_max_charge_current")
    def ev_max_charge_current_max(cls, value):
        assert value <= 16000
        return value

    @validator("ev_max_charge_current")
    def ev_max_charge_current_min(cls, value):
        assert value >= 0
        return value

    @validator("ev_max_discharge_current")
    def ev_max_discharge_current_max(cls, value):
        assert value <= 16000
        return value

    @validator("ev_max_discharge_current")
    def ev_max_discharge_current_min(cls, value):
        assert value >= 0
        return value

    @validator("ev_min_voltage")
    def ev_min_voltage_max(cls, value):
        assert value <= 15000
        return value

    @validator("ev_min_voltage")
    def ev_min_voltage_min(cls, value):
        assert value >= 0
        return value

    @validator("ev_max_v2_x_energy_req")
    def ev_max_v2_x_energy_req_max(cls, value):
        assert value <= 8190
        return value

    @validator("ev_max_v2_x_energy_req")
    def ev_max_v2_x_energy_req_min(cls, value):
        assert value >= -8190
        return value

    @validator("ev_min_v2_x_energy_req")
    def ev_min_v2_x_energy_req_max(cls, value):
        assert value <= 8190
        return value

    @validator("ev_min_v2_x_energy_req")
    def ev_min_v2_x_energy_req_min(cls, value):
        assert value >= -8190
        return value

ChargeParamBptEVDyn.update_forward_refs()
