# 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 GetHelpdeskAgentScheduleReq(object):
    agent_id: str = attr.ib(
        default="", metadata={"req_type": "path"}
    )  # 客服 id, 示例值："	客服 id"


@attr.s
class GetHelpdeskAgentScheduleRespAgentScheduleAgentSkill(object):
    id: str = attr.ib(default="", metadata={"req_type": "json"})  # 客服技能 id
    name: str = attr.ib(default="", metadata={"req_type": "json"})  # 客服技能名
    is_default: bool = attr.ib(
        factory=lambda: bool(), metadata={"req_type": "json"}
    )  # 是默认技能


@attr.s
class GetHelpdeskAgentScheduleRespAgentScheduleSchedule(object):
    start_time: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # 开始时间, format 00:00 - 23:59
    end_time: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # 结束时间, format 00:00 - 23:59
    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


@attr.s
class GetHelpdeskAgentScheduleRespAgentScheduleAgent(object):
    id: str = attr.ib(default="", metadata={"req_type": "json"})  # 客服 id
    avatar_url: str = attr.ib(default="", metadata={"req_type": "json"})  # avatar url
    name: str = attr.ib(default="", metadata={"req_type": "json"})  # 客服名字
    email: str = attr.ib(default="", metadata={"req_type": "json"})  # email
    department: str = attr.ib(default="", metadata={"req_type": "json"})  # 部门
    company_name: str = attr.ib(default="", metadata={"req_type": "json"})  # 公司名


@attr.s
class GetHelpdeskAgentScheduleRespAgentSchedule(object):
    status: int = attr.ib(
        default=0, metadata={"req_type": "json"}
    )  # 客服状态, 1 - online客服, 2 - offline(手动)客服, 3 - off duty(下班)自动处于非服务时间段
    agent: GetHelpdeskAgentScheduleRespAgentScheduleAgent = attr.ib(
        default=None, metadata={"req_type": "json"}
    )  # 客服信息
    schedule: GetHelpdeskAgentScheduleRespAgentScheduleSchedule = attr.ib(
        default=None, metadata={"req_type": "json"}
    )  # 工作日程列表
    agent_skills: typing.List[
        GetHelpdeskAgentScheduleRespAgentScheduleAgentSkill
    ] = attr.ib(
        factory=lambda: [], metadata={"req_type": "json"}
    )  # 客服技能


@attr.s
class GetHelpdeskAgentScheduleResp(object):
    agent_schedule: GetHelpdeskAgentScheduleRespAgentSchedule = attr.ib(
        default=None, metadata={"req_type": "json"}
    )  # 客服日程


def _gen_get_helpdesk_agent_schedule_req(request, options) -> RawRequestReq:
    return RawRequestReq(
        dataclass=GetHelpdeskAgentScheduleResp,
        scope="Helpdesk",
        api="GetHelpdeskAgentSchedule",
        method="GET",
        url="https://open.feishu.cn/open-apis/helpdesk/v1/agents/:agent_id/schedules",
        body=request,
        method_option=_new_method_option(options),
        need_tenant_access_token=True,
        need_helpdesk_auth=True,
    )
