# 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 .location_name_info import LocationNameInfo


class LocationCity(object):
    _types = {
        "city_code": str,
        "state_code": str,
        "country_code": str,
        "city_name_info": LocationNameInfo,
    }

    def __init__(self, d=None):
        self.city_code: Optional[str] = None
        self.state_code: Optional[str] = None
        self.country_code: Optional[str] = None
        self.city_name_info: Optional[LocationNameInfo] = None
        init(self, d, self._types)

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


class LocationCityBuilder(object):
    def __init__(self) -> None:
        self._location_city = LocationCity()

    def city_code(self, city_code: str) -> "LocationCityBuilder":
        self._location_city.city_code = city_code
        return self

    def state_code(self, state_code: str) -> "LocationCityBuilder":
        self._location_city.state_code = state_code
        return self

    def country_code(self, country_code: str) -> "LocationCityBuilder":
        self._location_city.country_code = country_code
        return self

    def city_name_info(self, city_name_info: LocationNameInfo) -> "LocationCityBuilder":
        self._location_city.city_name_info = city_name_info
        return self

    def build(self) -> "LocationCity":
        return self._location_city
