# 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 .match_rules import MatchRules


class UpdateRuleCustomOrgRequestBody(object):
    _types = {
        "object_api_name": str,
        "org_id": str,
        "match_rule_groups": List[MatchRules],
    }

    def __init__(self, d=None):
        self.object_api_name: Optional[str] = None
        self.org_id: Optional[str] = None
        self.match_rule_groups: Optional[List[MatchRules]] = None
        init(self, d, self._types)

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


class UpdateRuleCustomOrgRequestBodyBuilder(object):
    def __init__(self) -> None:
        self._update_rule_custom_org_request_body = UpdateRuleCustomOrgRequestBody()

    def object_api_name(self, object_api_name: str) -> "UpdateRuleCustomOrgRequestBodyBuilder":
        self._update_rule_custom_org_request_body.object_api_name = object_api_name
        return self

    def org_id(self, org_id: str) -> "UpdateRuleCustomOrgRequestBodyBuilder":
        self._update_rule_custom_org_request_body.org_id = org_id
        return self

    def match_rule_groups(self, match_rule_groups: List[MatchRules]) -> "UpdateRuleCustomOrgRequestBodyBuilder":
        self._update_rule_custom_org_request_body.match_rule_groups = match_rule_groups
        return self

    def build(self) -> "UpdateRuleCustomOrgRequestBody":
        return self._update_rule_custom_org_request_body
