# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class ExternalInstanceTask(object):
    _types = {
        "task_id": str,
        "update_time": int,
    }

    def __init__(self, d=None):
        self.task_id: Optional[str] = None
        self.update_time: Optional[int] = None
        init(self, d, self._types)

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


class ExternalInstanceTaskBuilder(object):
    def __init__(self) -> None:
        self._external_instance_task = ExternalInstanceTask()

    def task_id(self, task_id: str) -> "ExternalInstanceTaskBuilder":
        self._external_instance_task.task_id = task_id
        return self

    def update_time(self, update_time: int) -> "ExternalInstanceTaskBuilder":
        self._external_instance_task.update_time = update_time
        return self

    def build(self) -> "ExternalInstanceTask":
        return self._external_instance_task
