# 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 GetHelpdeskAgentSkillRuleListReq(object):
    pass


@attr.s
class GetHelpdeskAgentSkillRuleListRespRule(object):
    id: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # rule id, 看[获取客服技能rules](https://open.feishu.cn/document/ukTMukTMukTM/ucDOyYjL3gjM24yN4IjN/list-agent-skill-rules) 用于获取rules options
    operator_options: typing.List[int] = attr.ib(
        factory=lambda: [], metadata={"req_type": "json"}
    )  # rule操作数value，[客服技能及运算符](https://open.feishu.cn/document/ukTMukTMukTM/ucDOyYjL3gjM24yN4IjN/operator-options)
    operand: str = attr.ib(default="", metadata={"req_type": "json"})  # rule操作数value
    category: int = attr.ib(
        default=0, metadata={"req_type": "json"}
    )  # rule type，1-知识库，2-工单信息，3-用户飞书信息
    display_name: str = attr.ib(default="", metadata={"req_type": "json"})  # rule 名


@attr.s
class GetHelpdeskAgentSkillRuleListResp(object):
    rules: typing.List[GetHelpdeskAgentSkillRuleListRespRule] = attr.ib(
        factory=lambda: [], metadata={"req_type": "json"}
    )  # rules列表


def _gen_get_helpdesk_agent_skill_rule_list_req(request, options) -> RawRequestReq:
    return RawRequestReq(
        dataclass=GetHelpdeskAgentSkillRuleListResp,
        scope="Helpdesk",
        api="GetHelpdeskAgentSkillRuleList",
        method="GET",
        url="https://open.feishu.cn/open-apis/helpdesk/v1/agent_skill_rules",
        body=request,
        method_option=_new_method_option(options),
        need_tenant_access_token=True,
        need_helpdesk_auth=True,
    )
