# 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 .input_task import InputTask


class PatchTaskRequestBody(object):
    _types = {
        "task": InputTask,
        "update_fields": List[str],
    }

    def __init__(self, d=None):
        self.task: Optional[InputTask] = None
        self.update_fields: Optional[List[str]] = None
        init(self, d, self._types)

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


class PatchTaskRequestBodyBuilder(object):
    def __init__(self) -> None:
        self._patch_task_request_body = PatchTaskRequestBody()

    def task(self, task: InputTask) -> "PatchTaskRequestBodyBuilder":
        self._patch_task_request_body.task = task
        return self

    def update_fields(self, update_fields: List[str]) -> "PatchTaskRequestBodyBuilder":
        self._patch_task_request_body.update_fields = update_fields
        return self

    def build(self) -> "PatchTaskRequestBody":
        return self._patch_task_request_body
