# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class Count(object):
    _types = {
        "total": int,
        "has_more": bool,
    }

    def __init__(self, d=None):
        self.total: Optional[int] = None
        self.has_more: Optional[bool] = None
        init(self, d, self._types)

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


class CountBuilder(object):
    def __init__(self) -> None:
        self._count = Count()

    def total(self, total: int) -> "CountBuilder":
        self._count.total = total
        return self

    def has_more(self, has_more: bool) -> "CountBuilder":
        self._count.has_more = has_more
        return self

    def build(self) -> "Count":
        return self._count
