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


class LocationUpdate(object):
    _types = {
        "parent_id": str,
        "names": List[I18n],
        "active": bool,
        "effective_time": str,
        "code": str,
        "descriptions": List[I18n],
        "location_usages": List[Enum],
        "working_hours_type_id": str,
        "locale": Enum,
        "time_zone_id": str,
        "display_language_id": str,
    }

    def __init__(self, d=None):
        self.parent_id: Optional[str] = None
        self.names: Optional[List[I18n]] = None
        self.active: Optional[bool] = None
        self.effective_time: Optional[str] = None
        self.code: Optional[str] = None
        self.descriptions: Optional[List[I18n]] = None
        self.location_usages: Optional[List[Enum]] = None
        self.working_hours_type_id: Optional[str] = None
        self.locale: Optional[Enum] = None
        self.time_zone_id: Optional[str] = None
        self.display_language_id: Optional[str] = None
        init(self, d, self._types)

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


class LocationUpdateBuilder(object):
    def __init__(self) -> None:
        self._location_update = LocationUpdate()

    def parent_id(self, parent_id: str) -> "LocationUpdateBuilder":
        self._location_update.parent_id = parent_id
        return self

    def names(self, names: List[I18n]) -> "LocationUpdateBuilder":
        self._location_update.names = names
        return self

    def active(self, active: bool) -> "LocationUpdateBuilder":
        self._location_update.active = active
        return self

    def effective_time(self, effective_time: str) -> "LocationUpdateBuilder":
        self._location_update.effective_time = effective_time
        return self

    def code(self, code: str) -> "LocationUpdateBuilder":
        self._location_update.code = code
        return self

    def descriptions(self, descriptions: List[I18n]) -> "LocationUpdateBuilder":
        self._location_update.descriptions = descriptions
        return self

    def location_usages(self, location_usages: List[Enum]) -> "LocationUpdateBuilder":
        self._location_update.location_usages = location_usages
        return self

    def working_hours_type_id(self, working_hours_type_id: str) -> "LocationUpdateBuilder":
        self._location_update.working_hours_type_id = working_hours_type_id
        return self

    def locale(self, locale: Enum) -> "LocationUpdateBuilder":
        self._location_update.locale = locale
        return self

    def time_zone_id(self, time_zone_id: str) -> "LocationUpdateBuilder":
        self._location_update.time_zone_id = time_zone_id
        return self

    def display_language_id(self, display_language_id: str) -> "LocationUpdateBuilder":
        self._location_update.display_language_id = display_language_id
        return self

    def build(self) -> "LocationUpdate":
        return self._location_update
