# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init


class DeviceExternal(object):
    _types = {
        "id": int,
        "name": str,
    }

    def __init__(self, d=None):
        self.id: Optional[int] = None
        self.name: Optional[str] = None
        init(self, d, self._types)

    @staticmethod
    def builder() -> "DeviceExternalBuilder":
        return DeviceExternalBuilder()


class DeviceExternalBuilder(object):
    def __init__(self) -> None:
        self._device_external = DeviceExternal()

    def id(self, id: int) -> "DeviceExternalBuilder":
        self._device_external.id = id
        return self

    def name(self, name: str) -> "DeviceExternalBuilder":
        self._device_external.name = name
        return self

    def build(self) -> "DeviceExternal":
        return self._device_external
