# 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 StandardScopeExpression(object):
    _types = {
        "api_name": str,
        "operator_type": int,
        "contain_sub": bool,
        "values": List[str],
        "scope_name": I18n,
    }

    def __init__(self, d=None):
        self.api_name: Optional[str] = None
        self.operator_type: Optional[int] = None
        self.contain_sub: Optional[bool] = None
        self.values: Optional[List[str]] = None
        self.scope_name: Optional[I18n] = None
        init(self, d, self._types)

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


class StandardScopeExpressionBuilder(object):
    def __init__(self) -> None:
        self._standard_scope_expression = StandardScopeExpression()

    def api_name(self, api_name: str) -> "StandardScopeExpressionBuilder":
        self._standard_scope_expression.api_name = api_name
        return self

    def operator_type(self, operator_type: int) -> "StandardScopeExpressionBuilder":
        self._standard_scope_expression.operator_type = operator_type
        return self

    def contain_sub(self, contain_sub: bool) -> "StandardScopeExpressionBuilder":
        self._standard_scope_expression.contain_sub = contain_sub
        return self

    def values(self, values: List[str]) -> "StandardScopeExpressionBuilder":
        self._standard_scope_expression.values = values
        return self

    def scope_name(self, scope_name: I18n) -> "StandardScopeExpressionBuilder":
        self._standard_scope_expression.scope_name = scope_name
        return self

    def build(self) -> "StandardScopeExpression":
        return self._standard_scope_expression
