# Code generated by Lark OpenAPI.

from typing import Optional, List

from lark_oapi.core.construct import init
from .task_dependency import TaskDependency


class AddDependenciesTaskRequestBody(object):
    _types = {
        "dependencies": List[TaskDependency],
    }

    def __init__(self, d=None):
        self.dependencies: Optional[List[TaskDependency]] = None
        init(self, d, self._types)

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


class AddDependenciesTaskRequestBodyBuilder(object):
    def __init__(self) -> None:
        self._add_dependencies_task_request_body = AddDependenciesTaskRequestBody()

    def dependencies(self, dependencies: List[TaskDependency]) -> "AddDependenciesTaskRequestBodyBuilder":
        self._add_dependencies_task_request_body.dependencies = dependencies
        return self

    def build(self) -> "AddDependenciesTaskRequestBody":
        return self._add_dependencies_task_request_body
