# 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 .settings_card_request_body import SettingsCardRequestBody


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

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


class SettingsCardRequestBuilder(object):

    def __init__(self) -> None:
        settings_card_request = SettingsCardRequest()
        settings_card_request.http_method = HttpMethod.PATCH
        settings_card_request.uri = "/open-apis/cardkit/v1/cards/:card_id/settings"
        settings_card_request.token_types = {AccessTokenType.TENANT}
        self._settings_card_request: SettingsCardRequest = settings_card_request

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

    def request_body(self, request_body: SettingsCardRequestBody) -> "SettingsCardRequestBuilder":
        self._settings_card_request.request_body = request_body
        self._settings_card_request.body = request_body
        return self

    def build(self) -> SettingsCardRequest:
        return self._settings_card_request
