# 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 .batch_update_card_request_body import BatchUpdateCardRequestBody


class BatchUpdateCardRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.card_id: Optional[str] = None
        self.request_body: Optional[BatchUpdateCardRequestBody] = None

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


class BatchUpdateCardRequestBuilder(object):

    def __init__(self) -> None:
        batch_update_card_request = BatchUpdateCardRequest()
        batch_update_card_request.http_method = HttpMethod.POST
        batch_update_card_request.uri = "/open-apis/cardkit/v1/cards/:card_id/batch_update"
        batch_update_card_request.token_types = {AccessTokenType.TENANT}
        self._batch_update_card_request: BatchUpdateCardRequest = batch_update_card_request

    def card_id(self, card_id: str) -> "BatchUpdateCardRequestBuilder":
        self._batch_update_card_request.card_id = card_id
        self._batch_update_card_request.paths["card_id"] = str(card_id)
        return self

    def request_body(self, request_body: BatchUpdateCardRequestBody) -> "BatchUpdateCardRequestBuilder":
        self._batch_update_card_request.request_body = request_body
        self._batch_update_card_request.body = request_body
        return self

    def build(self) -> BatchUpdateCardRequest:
        return self._batch_update_card_request
