# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.model import BaseRequest
from lark_oapi.core.enum import HttpMethod, AccessTokenType
from .id_convert_card_request_body import IdConvertCardRequestBody


class IdConvertCardRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.request_body: Optional[IdConvertCardRequestBody] = None

    @staticmethod
    def builder() -> "IdConvertCardRequestBuilder":
        return IdConvertCardRequestBuilder()


class IdConvertCardRequestBuilder(object):

    def __init__(self) -> None:
        id_convert_card_request = IdConvertCardRequest()
        id_convert_card_request.http_method = HttpMethod.POST
        id_convert_card_request.uri = "/open-apis/cardkit/v1/cards/id_convert"
        id_convert_card_request.token_types = {AccessTokenType.TENANT}
        self._id_convert_card_request: IdConvertCardRequest = id_convert_card_request

    def request_body(self, request_body: IdConvertCardRequestBody) -> "IdConvertCardRequestBuilder":
        self._id_convert_card_request.request_body = request_body
        self._id_convert_card_request.body = request_body
        return self

    def build(self) -> IdConvertCardRequest:
        return self._id_convert_card_request
