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

    Do not edit the class manually.

    I2CDevice - a model defined in OpenAPI

        address: The address of this I2CDevice.
        type: The type of this I2CDevice.
        working: The working of this I2CDevice.
    """
    class Config:
        orm_mode = True

    address: str = Field(alias="address")
    type: str = Field(alias="type")
    working: bool = Field(alias="working")

    @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

I2CDevice.update_forward_refs()
