# 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 .i18n import I18n


class CommonCityInfo(object):
    _types = {
        "city_code": str,
        "name": I18n,
    }

    def __init__(self, d=None):
        self.city_code: Optional[str] = None
        self.name: Optional[I18n] = None
        init(self, d, self._types)

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


class CommonCityInfoBuilder(object):
    def __init__(self) -> None:
        self._common_city_info = CommonCityInfo()

    def city_code(self, city_code: str) -> "CommonCityInfoBuilder":
        self._common_city_info.city_code = city_code
        return self

    def name(self, name: I18n) -> "CommonCityInfoBuilder":
        self._common_city_info.name = name
        return self

    def build(self) -> "CommonCityInfo":
        return self._common_city_info
