import uuid
from ..schema.base_schema import PermissionType as PermissionType
from ..schema.iot_schema import WappstoMethod as WappstoMethod
from ..service.template import ServiceClass as ServiceClass
from ..utils import name_check as name_check
from .network import Network as Network
from .template import ValueBaseType as ValueBaseType, ValueTemplate as ValueTemplate, valueSettings as valueSettings
from .value import Value as Value
from _typeshed import Incomplete
from enum import Enum
from typing import Callable, Dict, Optional, Union

class RequestType(str, Enum):
    refresh: str
    delete: str

class ChangeType(str, Enum):
    value: str
    name: str
    manufacturer: str
    product: str
    version: str
    serial: str
    description: str

class Device:
    schema: Incomplete
    log: Incomplete
    parent: Incomplete
    element: Incomplete
    children_uuid_mapping: Incomplete
    children_name_mapping: Incomplete
    cloud_id_mapping: Incomplete
    connection: Incomplete
    def __init__(self, parent: Network, device_uuid: Optional[uuid.UUID], name: Optional[str] = ..., manufacturer: Optional[str] = ..., product: Optional[str] = ..., version: Optional[str] = ..., protocol: Optional[str] = ..., communication: Optional[str] = ..., serial: Optional[str] = ..., description: Optional[str] = ...) -> None: ...
    @property
    def name(self) -> str: ...
    @property
    def uuid(self) -> uuid.UUID: ...
    def onDelete(self, callback: Callable[[Device], None]) -> Callable[[Device], None]: ...
    def cancelOnDelete(self) -> None: ...
    def onRefresh(self, callback: Callable[[Device], None]) -> Callable[[Device], None]: ...
    def cancelOnRefresh(self) -> None: ...
    def onChange(self, callback: Callable[[Device], None]) -> Callable[[Device], None]: ...
    def cancelOnChange(self) -> None: ...
    def onCreate(self, callback: Callable[[Device], None]) -> Callable[[Device], None]: ...
    def cancelOnCreate(self) -> None: ...
    def refresh(self) -> None: ...
    def change(self, change_type: ChangeType) -> None: ...
    def delete(self) -> None: ...
    def createNumberValue(self, name: str, *, permission: PermissionType, type: str, min: Union[int, float], max: Union[int, float], step: Union[int, float], unit: str, description: Optional[str] = ..., si_conversion: Optional[str] = ..., period: Optional[int] = ..., delta: Optional[Union[int, float]] = ..., mapping: Optional[Dict[str, str]] = ..., meaningful_zero: Optional[bool] = ..., ordered_mapping: Optional[bool] = ...) -> Value: ...
    def createStringValue(self, name: str, *, permission: PermissionType, type: str, max: Union[int, float], encoding: Optional[str] = ..., description: Optional[str] = ..., period: Optional[int] = ..., delta: Optional[Union[int, float]] = ...) -> Value: ...
    def createBlobValue(self, name: str, *, permission: PermissionType, type: str, max: Union[int, float], encoding: Optional[str] = ..., description: Optional[str] = ..., period: Optional[int] = ..., delta: Optional[Union[int, float]] = ...) -> Value: ...
    def createXmlValue(self, name: str, *, permission: PermissionType, type: str, xsd: Optional[str] = ..., namespace: Optional[str] = ..., description: Optional[str] = ..., period: Optional[int] = ..., delta: Optional[Union[int, float]] = ...) -> Value: ...
    def createValue(self, name: str, permission: PermissionType, value_template: ValueTemplate, description: Optional[str] = ...) -> Value: ...
    def close(self) -> None: ...
