# 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 LocationCountry(object):
    _types = {
        "country_code": str,
        "country_name_info": LocationNameInfo,
    }

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

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


class LocationCountryBuilder(object):
    def __init__(self) -> None:
        self._location_country = LocationCountry()

    def country_code(self, country_code: str) -> "LocationCountryBuilder":
        self._location_country.country_code = country_code
        return self

    def country_name_info(self, country_name_info: LocationNameInfo) -> "LocationCountryBuilder":
        self._location_country.country_name_info = country_name_info
        return self

    def build(self) -> "LocationCountry":
        return self._location_country
