# 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 Params(object):
    _types = {
        "type": str,
        "target_element_id": str,
        "elements": List[str],
        "element_ids": List[str],
        "element_id": str,
        "partial_element": str,
        "element": str,
        "settings": str,
    }

    def __init__(self, d=None):
        self.type: Optional[str] = None
        self.target_element_id: Optional[str] = None
        self.elements: Optional[List[str]] = None
        self.element_ids: Optional[List[str]] = None
        self.element_id: Optional[str] = None
        self.partial_element: Optional[str] = None
        self.element: Optional[str] = None
        self.settings: Optional[str] = None
        init(self, d, self._types)

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


class ParamsBuilder(object):
    def __init__(self) -> None:
        self._params = Params()

    def type(self, type: str) -> "ParamsBuilder":
        self._params.type = type
        return self

    def target_element_id(self, target_element_id: str) -> "ParamsBuilder":
        self._params.target_element_id = target_element_id
        return self

    def elements(self, elements: List[str]) -> "ParamsBuilder":
        self._params.elements = elements
        return self

    def element_ids(self, element_ids: List[str]) -> "ParamsBuilder":
        self._params.element_ids = element_ids
        return self

    def element_id(self, element_id: str) -> "ParamsBuilder":
        self._params.element_id = element_id
        return self

    def partial_element(self, partial_element: str) -> "ParamsBuilder":
        self._params.partial_element = partial_element
        return self

    def element(self, element: str) -> "ParamsBuilder":
        self._params.element = element
        return self

    def settings(self, settings: str) -> "ParamsBuilder":
        self._params.settings = settings
        return self

    def build(self) -> "Params":
        return self._params
