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


@attr.s
class GetACSUserFaceReq(object):
    is_cropped: bool = attr.ib(
        default=None, metadata={"req_type": "query"}
    )  # 裁剪图, 示例值：true
    user_id_type: GetACSUserFaceReqUserIDType = attr.ib(
        default=None, metadata={"req_type": "query"}
    )  # 用户 ID 类型, 示例值："open_id", 可选值有: `open_id`：用户的 open id, `union_id`：用户的 union id, `user_id`：用户的 user id, 默认值: `open_id`,, 当值为 `user_id`, 字段权限要求: 获取用户 userid
    user_id: str = attr.ib(
        default="", metadata={"req_type": "path"}
    )  # 用户 ID, 示例值："ou_7dab8a3d3cdcc9da365777c7ad535d62"


@attr.s
class GetACSUserFaceRespFile(object):
    pass


@attr.s
class GetACSUserFaceResp(object):
    file: typing.Union[str, bytes, io.BytesIO] = attr.ib(
        default=None, metadata={"req_type": "json"}
    )


@attr.s
class GetACSUserFaceResp(object):
    is_file: bool = attr.ib(factory=lambda: bool(), metadata={"req_type": "json"})
    code: int = attr.ib(default=0, metadata={"req_type": "json"})
    msg: str = attr.ib(default="", metadata={"req_type": "json"})
    data: GetACSUserFaceResp = attr.ib(default=None, metadata={"req_type": "json"})


def _gen_get_acs_user_face_req(request, options) -> RawRequestReq:
    return RawRequestReq(
        dataclass=GetACSUserFaceResp,
        scope="ACS",
        api="GetACSUserFace",
        method="GET",
        url="https://open.feishu.cn/open-apis/acs/v1/users/:user_id/face",
        body=request,
        method_option=_new_method_option(options),
        need_tenant_access_token=True,
    )
