# 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


class PathwayUpdate(object):
    _types = {
        "code": str,
        "names": List[I18n],
        "descriptions": List[I18n],
    }

    def __init__(self, d=None):
        self.code: Optional[str] = None
        self.names: Optional[List[I18n]] = None
        self.descriptions: Optional[List[I18n]] = None
        init(self, d, self._types)

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


class PathwayUpdateBuilder(object):
    def __init__(self) -> None:
        self._pathway_update = PathwayUpdate()

    def code(self, code: str) -> "PathwayUpdateBuilder":
        self._pathway_update.code = code
        return self

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

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

    def build(self) -> "PathwayUpdate":
        return self._pathway_update
