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


@attr.s
class GetContactGroupMemberReq(object):
    page_size: int = attr.ib(
        default=0, metadata={"req_type": "query"}
    )  # 分页大小, 示例值：50, 默认值: `50`
    page_token: str = attr.ib(
        default="", metadata={"req_type": "query"}
    )  # 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果, 示例值："AQD9/Rn9eij9Pm39ED40/dk53s4Ebp882DYfFaPFbz00L4CMZJrqGdzNyc8BcZtDbwVUvRmQTvyMYicnGWrde9X56TgdBuS+JKiSIkdexPw="
    member_id_type: GetContactGroupMemberReqMemberIDType = attr.ib(
        default=None, metadata={"req_type": "query"}
    )  # 欲获取成员ID类型。当member_type =user时候，member_id_type表示user_id_type，枚举值为open_id, union_id, user_id, 示例值："open_id", 可选值有: `open_id`：member_type =user时候，表示用户的open_id, `union_id`：member_type =user时候，表示用户的union_id, `user_id`：member_type =user时候，表示用户的user_id, 默认值: `open_id`
    member_type: str = attr.ib(
        default="", metadata={"req_type": "query"}
    )  # 期待获取的用户组成员的类型，取值为 user, 示例值："user", 可选值有: `user`：user, 默认值: `user`
    group_id: str = attr.ib(
        default="", metadata={"req_type": "path"}
    )  # 用户组ID, 示例值："g128187"


@attr.s
class GetContactGroupMemberRespMember(object):
    member_id: str = attr.ib(default="", metadata={"req_type": "json"})  # 成员ID
    member_type: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # 用户组成员的类型，目前取值为 user。未来将支持department


@attr.s
class GetContactGroupMemberResp(object):
    memberlist: typing.List[GetContactGroupMemberRespMember] = attr.ib(
        factory=lambda: [], metadata={"req_type": "json"}
    )  # 成员列表
    page_token: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # 下次分页获取的page_token
    has_more: bool = attr.ib(
        factory=lambda: bool(), metadata={"req_type": "json"}
    )  # 是否还需要分页获取


def _gen_get_contact_group_member_req(request, options) -> RawRequestReq:
    return RawRequestReq(
        dataclass=GetContactGroupMemberResp,
        scope="Contact",
        api="GetContactGroupMember",
        method="GET",
        url="https://open.feishu.cn/open-apis/contact/v3/group/:group_id/member/simplelist",
        body=request,
        method_option=_new_method_option(options),
        need_tenant_access_token=True,
    )
