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

    Do not edit the class manually.

    PCA9634Control - a model defined in OpenAPI

        channel0: The channel0 of this PCA9634Control [Optional].
        channel1: The channel1 of this PCA9634Control [Optional].
        channel2: The channel2 of this PCA9634Control [Optional].
        channel3: The channel3 of this PCA9634Control [Optional].
    """
    class Config:
        orm_mode = True

    channel0: Optional[int] = Field(alias="channel0", default=None)
    channel1: Optional[int] = Field(alias="channel1", default=None)
    channel2: Optional[int] = Field(alias="channel2", default=None)
    channel3: Optional[int] = Field(alias="channel3", default=None)

    @validator("channel0")
    def channel0_max(cls, value):
        assert value <= 100
        return value

    @validator("channel0")
    def channel0_min(cls, value):
        assert value >= 0
        return value

    @validator("channel1")
    def channel1_max(cls, value):
        assert value <= 100
        return value

    @validator("channel1")
    def channel1_min(cls, value):
        assert value >= 0
        return value

    @validator("channel2")
    def channel2_max(cls, value):
        assert value <= 100
        return value

    @validator("channel2")
    def channel2_min(cls, value):
        assert value >= 0
        return value

    @validator("channel3")
    def channel3_max(cls, value):
        assert value <= 100
        return value

    @validator("channel3")
    def channel3_min(cls, value):
        assert value >= 0
        return value

PCA9634Control.update_forward_refs()
