# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.model import BaseRequest
from lark_oapi.core.enum import HttpMethod, AccessTokenType
from .cc_user_task_request_body import CcUserTaskRequestBody


class CcUserTaskRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.task_id: Optional[str] = None
        self.request_body: Optional[CcUserTaskRequestBody] = None

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


class CcUserTaskRequestBuilder(object):

    def __init__(self) -> None:
        cc_user_task_request = CcUserTaskRequest()
        cc_user_task_request.http_method = HttpMethod.POST
        cc_user_task_request.uri = "/open-apis/apaas/v1/user_tasks/:task_id/cc"
        cc_user_task_request.token_types = {AccessTokenType.TENANT}
        self._cc_user_task_request: CcUserTaskRequest = cc_user_task_request

    def task_id(self, task_id: str) -> "CcUserTaskRequestBuilder":
        self._cc_user_task_request.task_id = task_id
        self._cc_user_task_request.paths["task_id"] = str(task_id)
        return self

    def request_body(self, request_body: CcUserTaskRequestBody) -> "CcUserTaskRequestBuilder":
        self._cc_user_task_request.request_body = request_body
        self._cc_user_task_request.body = request_body
        return self

    def build(self) -> CcUserTaskRequest:
        return self._cc_user_task_request
