# 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 Device(object):
    _types = {
        "device_id": int,
        "legacy_device_id": int,
    }

    def __init__(self, d=None):
        self.device_id: Optional[int] = None
        self.legacy_device_id: Optional[int] = None
        init(self, d, self._types)

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


class DeviceBuilder(object):
    def __init__(self) -> None:
        self._device = Device()

    def device_id(self, device_id: int) -> "DeviceBuilder":
        self._device.device_id = device_id
        return self

    def legacy_device_id(self, legacy_device_id: int) -> "DeviceBuilder":
        self._device.legacy_device_id = legacy_device_id
        return self

    def build(self) -> "Device":
        return self._device
