# 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_content import I18nContent
from .i18n_content import I18nContent


class ChangeReason(object):
    _types = {
        "id": str,
        "name": str,
        "note": str,
        "active_status": int,
        "i18n_names": List[I18nContent],
        "i18n_notes": List[I18nContent],
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.name: Optional[str] = None
        self.note: Optional[str] = None
        self.active_status: Optional[int] = None
        self.i18n_names: Optional[List[I18nContent]] = None
        self.i18n_notes: Optional[List[I18nContent]] = None
        init(self, d, self._types)

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


class ChangeReasonBuilder(object):
    def __init__(self) -> None:
        self._change_reason = ChangeReason()

    def id(self, id: str) -> "ChangeReasonBuilder":
        self._change_reason.id = id
        return self

    def name(self, name: str) -> "ChangeReasonBuilder":
        self._change_reason.name = name
        return self

    def note(self, note: str) -> "ChangeReasonBuilder":
        self._change_reason.note = note
        return self

    def active_status(self, active_status: int) -> "ChangeReasonBuilder":
        self._change_reason.active_status = active_status
        return self

    def i18n_names(self, i18n_names: List[I18nContent]) -> "ChangeReasonBuilder":
        self._change_reason.i18n_names = i18n_names
        return self

    def i18n_notes(self, i18n_notes: List[I18nContent]) -> "ChangeReasonBuilder":
        self._change_reason.i18n_notes = i18n_notes
        return self

    def build(self) -> "ChangeReason":
        return self._change_reason
