# 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_delete_chat_announcement_block_children_request_body import \
    BatchDeleteChatAnnouncementBlockChildrenRequestBody


class BatchDeleteChatAnnouncementBlockChildrenRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.revision_id: Optional[int] = None
        self.client_token: Optional[str] = None
        self.chat_id: Optional[str] = None
        self.block_id: Optional[str] = None
        self.request_body: Optional[BatchDeleteChatAnnouncementBlockChildrenRequestBody] = None

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


class BatchDeleteChatAnnouncementBlockChildrenRequestBuilder(object):

    def __init__(self) -> None:
        batch_delete_chat_announcement_block_children_request = BatchDeleteChatAnnouncementBlockChildrenRequest()
        batch_delete_chat_announcement_block_children_request.http_method = HttpMethod.DELETE
        batch_delete_chat_announcement_block_children_request.uri = "/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children/batch_delete"
        batch_delete_chat_announcement_block_children_request.token_types = {AccessTokenType.TENANT,
                                                                             AccessTokenType.USER}
        self._batch_delete_chat_announcement_block_children_request: BatchDeleteChatAnnouncementBlockChildrenRequest = batch_delete_chat_announcement_block_children_request

    def revision_id(self, revision_id: int) -> "BatchDeleteChatAnnouncementBlockChildrenRequestBuilder":
        self._batch_delete_chat_announcement_block_children_request.revision_id = revision_id
        self._batch_delete_chat_announcement_block_children_request.add_query("revision_id", revision_id)
        return self

    def client_token(self, client_token: str) -> "BatchDeleteChatAnnouncementBlockChildrenRequestBuilder":
        self._batch_delete_chat_announcement_block_children_request.client_token = client_token
        self._batch_delete_chat_announcement_block_children_request.add_query("client_token", client_token)
        return self

    def chat_id(self, chat_id: str) -> "BatchDeleteChatAnnouncementBlockChildrenRequestBuilder":
        self._batch_delete_chat_announcement_block_children_request.chat_id = chat_id
        self._batch_delete_chat_announcement_block_children_request.paths["chat_id"] = str(chat_id)
        return self

    def block_id(self, block_id: str) -> "BatchDeleteChatAnnouncementBlockChildrenRequestBuilder":
        self._batch_delete_chat_announcement_block_children_request.block_id = block_id
        self._batch_delete_chat_announcement_block_children_request.paths["block_id"] = str(block_id)
        return self

    def request_body(self,
                     request_body: BatchDeleteChatAnnouncementBlockChildrenRequestBody) -> "BatchDeleteChatAnnouncementBlockChildrenRequestBuilder":
        self._batch_delete_chat_announcement_block_children_request.request_body = request_body
        self._batch_delete_chat_announcement_block_children_request.body = request_body
        return self

    def build(self) -> BatchDeleteChatAnnouncementBlockChildrenRequest:
        return self._batch_delete_chat_announcement_block_children_request
