# 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_version_data import LocationVersionData
from .address import Address


class LocationTimeline(object):
    _types = {
        "location_version_data": List[LocationVersionData],
        "address": List[Address],
    }

    def __init__(self, d=None):
        self.location_version_data: Optional[List[LocationVersionData]] = None
        self.address: Optional[List[Address]] = None
        init(self, d, self._types)

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


class LocationTimelineBuilder(object):
    def __init__(self) -> None:
        self._location_timeline = LocationTimeline()

    def location_version_data(self, location_version_data: List[LocationVersionData]) -> "LocationTimelineBuilder":
        self._location_timeline.location_version_data = location_version_data
        return self

    def address(self, address: List[Address]) -> "LocationTimelineBuilder":
        self._location_timeline.address = address
        return self

    def build(self) -> "LocationTimeline":
        return self._location_timeline
