# 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 .rule import Rule


class QueryRuleResponseBody(object):
    _types = {
        "rules": List[Rule],
    }

    def __init__(self, d=None):
        self.rules: Optional[List[Rule]] = None
        init(self, d, self._types)

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


class QueryRuleResponseBodyBuilder(object):
    def __init__(self) -> None:
        self._query_rule_response_body = QueryRuleResponseBody()

    def rules(self, rules: List[Rule]) -> "QueryRuleResponseBodyBuilder":
        self._query_rule_response_body.rules = rules
        return self

    def build(self) -> "QueryRuleResponseBody":
        return self._query_rule_response_body
