# 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 RecordPermission(object):
    _types = {
        "api_id": str,
        "api_name": str,
    }

    def __init__(self, d=None):
        self.api_id: Optional[str] = None
        self.api_name: Optional[str] = None
        init(self, d, self._types)

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


class RecordPermissionBuilder(object):
    def __init__(self) -> None:
        self._record_permission = RecordPermission()

    def api_id(self, api_id: str) -> "RecordPermissionBuilder":
        self._record_permission.api_id = api_id
        return self

    def api_name(self, api_name: str) -> "RecordPermissionBuilder":
        self._record_permission.api_name = api_name
        return self

    def build(self) -> "RecordPermission":
        return self._record_permission
