# 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 UpdateHelpdeskAgentScheduleReqAgentScheduleSchedule(object):
    start_time: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # 开始时间, format 00:00 - 23:59, 示例值："00:00"
    end_time: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # 结束时间, format 00:00 - 23:59, 示例值："24:00"
    weekday: int = attr.ib(
        default=0, metadata={"req_type": "json"}
    )  # 星期几, 1 - Monday, 2 - Tuesday, 3 - Wednesday, 4 - Thursday, 5 - Friday, 6 - Saturday, 7 - Sunday, 9 - Everday, 10 - Weekday, 11 - Weekend, 示例值：9


@attr.s
class UpdateHelpdeskAgentScheduleReqAgentSchedule(object):
    schedule: UpdateHelpdeskAgentScheduleReqAgentScheduleSchedule = attr.ib(
        default=None, metadata={"req_type": "json"}
    )  # 工作日程列表
    agent_skill_ids: typing.List[str] = attr.ib(
        factory=lambda: [], metadata={"req_type": "json"}
    )  # 客服技能 ids


@attr.s
class UpdateHelpdeskAgentScheduleReq(object):
    agent_id: str = attr.ib(
        default="", metadata={"req_type": "path"}
    )  # 客服 id, 示例值："123456"
    agent_schedule: UpdateHelpdeskAgentScheduleReqAgentSchedule = attr.ib(
        default=None, metadata={"req_type": "json"}
    )  # 工作日程列表


@attr.s
class UpdateHelpdeskAgentScheduleResp(object):
    pass


def _gen_update_helpdesk_agent_schedule_req(request, options) -> RawRequestReq:
    return RawRequestReq(
        dataclass=UpdateHelpdeskAgentScheduleResp,
        scope="Helpdesk",
        api="UpdateHelpdeskAgentSchedule",
        method="PATCH",
        url="https://open.feishu.cn/open-apis/helpdesk/v1/agents/:agent_id/schedules",
        body=request,
        method_option=_new_method_option(options),
        need_user_access_token=True,
        need_helpdesk_auth=True,
    )
