# Code generated by lark_sdk_gen. DO NOT EDIT.

from pylark.lark_request import RawRequestReq, _new_method_option
import attr
import typing
import io


@attr.s
class GetTaskCommentReq(object):
    task_id: str = attr.ib(
        default="", metadata={"req_type": "path"}
    )  # 任务ID, 示例值："83912691-2e43-47fc-94a4-d512e03984fa"
    comment_id: str = attr.ib(
        default="", metadata={"req_type": "path"}
    )  # 评论ID, 示例值："6937231762296684564"


@attr.s
class GetTaskCommentRespComment(object):
    content: str = attr.ib(default="", metadata={"req_type": "json"})  # 评论内容
    parent_id: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # 评论的父ID，创建评论时若不为空则为某条评论的回复，若不为空则不是回复
    id: str = attr.ib(default="", metadata={"req_type": "json"})  # 评论ID，由飞书服务器发号


@attr.s
class GetTaskCommentResp(object):
    comment: GetTaskCommentRespComment = attr.ib(
        default=None, metadata={"req_type": "json"}
    )  # 返回新的任务评论详情


def _gen_get_task_comment_req(request, options) -> RawRequestReq:
    return RawRequestReq(
        dataclass=GetTaskCommentResp,
        scope="Task",
        api="GetTaskComment",
        method="GET",
        url="https://open.feishu.cn/open-apis/task/v1/tasks/:task_id/comments/:comment_id",
        body=request,
        method_option=_new_method_option(options),
        need_tenant_access_token=True,
    )
