# 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 .text_element import TextElement


class SourceSynced(object):
    _types = {
        "elements": List[TextElement],
        "align": int,
    }

    def __init__(self, d=None):
        self.elements: Optional[List[TextElement]] = None
        self.align: Optional[int] = None
        init(self, d, self._types)

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


class SourceSyncedBuilder(object):
    def __init__(self) -> None:
        self._source_synced = SourceSynced()

    def elements(self, elements: List[TextElement]) -> "SourceSyncedBuilder":
        self._source_synced.elements = elements
        return self

    def align(self, align: int) -> "SourceSyncedBuilder":
        self._source_synced.align = align
        return self

    def build(self) -> "SourceSynced":
        return self._source_synced
