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


@attr.s
class CreateIdentityReq(object):
    user_id: str = attr.ib(
        default="", metadata={"req_type": "query"}
    )  # 用户的唯一标识, 示例值: "ou_2eb5483cb377daa5054bc6f86e2089a5"
    user_id_type: CreateIdentityReqUserIDType = 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
    identity_name: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # user identity name, 示例值: "张三"
    identity_code: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # user identity code, 示例值: "4xxxxxxxx"
    mobile: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # user mobile, 示例值: "13xxxxxxx"


@attr.s
class CreateIdentityResp(object):
    verify_uid: str = attr.ib(default="", metadata={"req_type": "json"})  # 用户绑定实名身份的uid


def _gen_create_identity_req(request, options) -> RawRequestReq:
    return RawRequestReq(
        dataclass=CreateIdentityResp,
        scope="HumanAuth",
        api="CreateIdentity",
        method="POST",
        url="https://open.feishu.cn/open-apis/human_authentication/v1/identities",
        body=request,
        method_option=_new_method_option(options),
        need_tenant_access_token=True,
    )
