# 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 Pathway(object):
    _types = {
        "pathway_id": str,
        "code": str,
        "names": List[I18n],
        "descriptions": List[I18n],
        "active": bool,
    }

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

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


class PathwayBuilder(object):
    def __init__(self) -> None:
        self._pathway = Pathway()

    def pathway_id(self, pathway_id: str) -> "PathwayBuilder":
        self._pathway.pathway_id = pathway_id
        return self

    def code(self, code: str) -> "PathwayBuilder":
        self._pathway.code = code
        return self

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

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

    def active(self, active: bool) -> "PathwayBuilder":
        self._pathway.active = active
        return self

    def build(self) -> "Pathway":
        return self._pathway
