# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init
from .task import Task


class CreateTaskSubtaskResponseBody(object):
    _types = {
        "subtask": Task,
    }

    def __init__(self, d=None):
        self.subtask: Optional[Task] = None
        init(self, d, self._types)

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


class CreateTaskSubtaskResponseBodyBuilder(object):
    def __init__(self) -> None:
        self._create_task_subtask_response_body = CreateTaskSubtaskResponseBody()

    def subtask(self, subtask: Task) -> "CreateTaskSubtaskResponseBodyBuilder":
        self._create_task_subtask_response_body.subtask = subtask
        return self

    def build(self) -> "CreateTaskSubtaskResponseBody":
        return self._create_task_subtask_response_body
