# 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
from ecp4_msi_api_fast.models.temperature_sensors import TemperatureSensors


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

    Do not edit the class manually.

    Ccs - a model defined in OpenAPI

        temperature_sensors: The temperature_sensors of this Ccs [Optional].
        proximity_pilot_resistor: The proximity_pilot_resistor of this Ccs [Optional].
        control_pilot_high_voltage: The control_pilot_high_voltage of this Ccs [Optional].
        control_pilot_low_voltage: The control_pilot_low_voltage of this Ccs [Optional].
        control_pilot_state: The control_pilot_state of this Ccs [Optional].
    """
    class Config:
        orm_mode = True

    temperature_sensors: Optional[TemperatureSensors] = Field(alias="temperatureSensors", default=None)
    proximity_pilot_resistor: Optional[int] = Field(alias="proximityPilotResistor", default=None)
    control_pilot_high_voltage: Optional[int] = Field(alias="controlPilotHighVoltage", default=None)
    control_pilot_low_voltage: Optional[int] = Field(alias="controlPilotLowVoltage", default=None)
    control_pilot_state: Optional[str] = Field(alias="controlPilotState", default=None)

    @validator("proximity_pilot_resistor")
    def proximity_pilot_resistor_max(cls, value):
        assert value <= 4096
        return value

    @validator("proximity_pilot_resistor")
    def proximity_pilot_resistor_min(cls, value):
        assert value >= 0
        return value

    @validator("control_pilot_high_voltage")
    def control_pilot_high_voltage_max(cls, value):
        assert value <= 105
        return value

    @validator("control_pilot_high_voltage")
    def control_pilot_high_voltage_min(cls, value):
        assert value >= -100
        return value

    @validator("control_pilot_low_voltage")
    def control_pilot_low_voltage_max(cls, value):
        assert value <= 105
        return value

    @validator("control_pilot_low_voltage")
    def control_pilot_low_voltage_min(cls, value):
        assert value >= -100
        return value

Ccs.update_forward_refs()
