# 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.ads1115 import ADS1115
from ecp4_msi_api_fast.models.mc24_aa02_e48 import MC24AA02E48
from ecp4_msi_api_fast.models.pca9634 import PCA9634


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

    Do not edit the class manually.

    I2cDeviceData - a model defined in OpenAPI

        address: The address of this I2cDeviceData.
        mc24aa02e48: The mc24aa02e48 of this I2cDeviceData [Optional].
        ads1115: The ads1115 of this I2cDeviceData [Optional].
        pca9634: The pca9634 of this I2cDeviceData [Optional].
    """
    class Config:
        orm_mode = True

    address: str = Field(alias="address")
    mc24aa02e48: Optional[MC24AA02E48] = Field(alias="mc24aa02e48", default=None)
    ads1115: Optional[ADS1115] = Field(alias="ads1115", default=None)
    pca9634: Optional[PCA9634] = Field(alias="pca9634", default=None)

    @validator("address")
    def address_pattern(cls, value):
        assert value is not None and re.match(r"^0x[0-9A-Fa-f]{2}$", value)
        return value

I2cDeviceData.update_forward_refs()
