# 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 .application import Application


class ListApplicationResponseBody(object):
    _types = {
        "app_list": List[Application],
        "page_token": str,
        "has_more": bool,
        "total_count": int,
    }

    def __init__(self, d=None):
        self.app_list: Optional[List[Application]] = None
        self.page_token: Optional[str] = None
        self.has_more: Optional[bool] = None
        self.total_count: Optional[int] = None
        init(self, d, self._types)

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


class ListApplicationResponseBodyBuilder(object):
    def __init__(self) -> None:
        self._list_application_response_body = ListApplicationResponseBody()

    def app_list(self, app_list: List[Application]) -> "ListApplicationResponseBodyBuilder":
        self._list_application_response_body.app_list = app_list
        return self

    def page_token(self, page_token: str) -> "ListApplicationResponseBodyBuilder":
        self._list_application_response_body.page_token = page_token
        return self

    def has_more(self, has_more: bool) -> "ListApplicationResponseBodyBuilder":
        self._list_application_response_body.has_more = has_more
        return self

    def total_count(self, total_count: int) -> "ListApplicationResponseBodyBuilder":
        self._list_application_response_body.total_count = total_count
        return self

    def build(self) -> "ListApplicationResponseBody":
        return self._list_application_response_body
