# Code generated by Lark OpenAPI.

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


class DataPermission(object):
    _types = {
        "id": str,
        "name": I18n,
        "select_status": int,
    }

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

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


class DataPermissionBuilder(object):
    def __init__(self) -> None:
        self._data_permission = DataPermission()

    def id(self, id: str) -> "DataPermissionBuilder":
        self._data_permission.id = id
        return self

    def name(self, name: I18n) -> "DataPermissionBuilder":
        self._data_permission.name = name
        return self

    def select_status(self, select_status: int) -> "DataPermissionBuilder":
        self._data_permission.select_status = select_status
        return self

    def build(self) -> "DataPermission":
        return self._data_permission
