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

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

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


class PermissionScopeRuleBuilder(object):
    def __init__(self) -> None:
        self._permission_scope_rule = PermissionScopeRule()

    def rule_type(self, rule_type: int) -> "PermissionScopeRuleBuilder":
        self._permission_scope_rule.rule_type = rule_type
        return self

    def build(self) -> "PermissionScopeRule":
        return self._permission_scope_rule
