# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class AllowedEditModes(object):
    _types = {
        "manual": bool,
        "scan": bool,
    }

    def __init__(self, d=None):
        self.manual: Optional[bool] = None
        self.scan: Optional[bool] = None
        init(self, d, self._types)

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


class AllowedEditModesBuilder(object):
    def __init__(self) -> None:
        self._allowed_edit_modes = AllowedEditModes()

    def manual(self, manual: bool) -> "AllowedEditModesBuilder":
        self._allowed_edit_modes.manual = manual
        return self

    def scan(self, scan: bool) -> "AllowedEditModesBuilder":
        self._allowed_edit_modes.scan = scan
        return self

    def build(self) -> "AllowedEditModes":
        return self._allowed_edit_modes
