# 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 .country_region import CountryRegion


class ListCountryRegionResponseBody(object):
    _types = {
        "data": List[CountryRegion],
        "total": str,
        "next_page_token": str,
    }

    def __init__(self, d=None):
        self.data: Optional[List[CountryRegion]] = None
        self.total: Optional[str] = None
        self.next_page_token: Optional[str] = None
        init(self, d, self._types)

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


class ListCountryRegionResponseBodyBuilder(object):
    def __init__(self) -> None:
        self._list_country_region_response_body = ListCountryRegionResponseBody()

    def data(self, data: List[CountryRegion]) -> "ListCountryRegionResponseBodyBuilder":
        self._list_country_region_response_body.data = data
        return self

    def total(self, total: str) -> "ListCountryRegionResponseBodyBuilder":
        self._list_country_region_response_body.total = total
        return self

    def next_page_token(self, next_page_token: str) -> "ListCountryRegionResponseBodyBuilder":
        self._list_country_region_response_body.next_page_token = next_page_token
        return self

    def build(self) -> "ListCountryRegionResponseBody":
        return self._list_country_region_response_body
