# 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 QueryCustomOrgRequestBody(object):
    _types = {
        "object_api_name": str,
        "org_fields": List[str],
        "org_role_fields": List[str],
        "org_ids": List[str],
        "code": str,
        "parent_id": str,
        "active": bool,
        "need_match_rule": bool,
    }

    def __init__(self, d=None):
        self.object_api_name: Optional[str] = None
        self.org_fields: Optional[List[str]] = None
        self.org_role_fields: Optional[List[str]] = None
        self.org_ids: Optional[List[str]] = None
        self.code: Optional[str] = None
        self.parent_id: Optional[str] = None
        self.active: Optional[bool] = None
        self.need_match_rule: Optional[bool] = None
        init(self, d, self._types)

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


class QueryCustomOrgRequestBodyBuilder(object):
    def __init__(self) -> None:
        self._query_custom_org_request_body = QueryCustomOrgRequestBody()

    def object_api_name(self, object_api_name: str) -> "QueryCustomOrgRequestBodyBuilder":
        self._query_custom_org_request_body.object_api_name = object_api_name
        return self

    def org_fields(self, org_fields: List[str]) -> "QueryCustomOrgRequestBodyBuilder":
        self._query_custom_org_request_body.org_fields = org_fields
        return self

    def org_role_fields(self, org_role_fields: List[str]) -> "QueryCustomOrgRequestBodyBuilder":
        self._query_custom_org_request_body.org_role_fields = org_role_fields
        return self

    def org_ids(self, org_ids: List[str]) -> "QueryCustomOrgRequestBodyBuilder":
        self._query_custom_org_request_body.org_ids = org_ids
        return self

    def code(self, code: str) -> "QueryCustomOrgRequestBodyBuilder":
        self._query_custom_org_request_body.code = code
        return self

    def parent_id(self, parent_id: str) -> "QueryCustomOrgRequestBodyBuilder":
        self._query_custom_org_request_body.parent_id = parent_id
        return self

    def active(self, active: bool) -> "QueryCustomOrgRequestBodyBuilder":
        self._query_custom_org_request_body.active = active
        return self

    def need_match_rule(self, need_match_rule: bool) -> "QueryCustomOrgRequestBodyBuilder":
        self._query_custom_org_request_body.need_match_rule = need_match_rule
        return self

    def build(self) -> "QueryCustomOrgRequestBody":
        return self._query_custom_org_request_body
