# 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


class AllowedRollbaclkTaskItemType(object):
    _types = {
        "id": str,
        "activity_label": List[I18n],
        "is_start": bool,
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.activity_label: Optional[List[I18n]] = None
        self.is_start: Optional[bool] = None
        init(self, d, self._types)

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


class AllowedRollbaclkTaskItemTypeBuilder(object):
    def __init__(self) -> None:
        self._allowed_rollbaclk_task_item_type = AllowedRollbaclkTaskItemType()

    def id(self, id: str) -> "AllowedRollbaclkTaskItemTypeBuilder":
        self._allowed_rollbaclk_task_item_type.id = id
        return self

    def activity_label(self, activity_label: List[I18n]) -> "AllowedRollbaclkTaskItemTypeBuilder":
        self._allowed_rollbaclk_task_item_type.activity_label = activity_label
        return self

    def is_start(self, is_start: bool) -> "AllowedRollbaclkTaskItemTypeBuilder":
        self._allowed_rollbaclk_task_item_type.is_start = is_start
        return self

    def build(self) -> "AllowedRollbaclkTaskItemType":
        return self._allowed_rollbaclk_task_item_type
