# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init
from .block import Block


class CreateChatAnnouncementBlockChildrenRequestBody(object):
    _types = {
        "children": List[Block],
        "index": int,
    }

    def __init__(self, d=None):
        self.children: Optional[List[Block]] = None
        self.index: Optional[int] = None
        init(self, d, self._types)

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


class CreateChatAnnouncementBlockChildrenRequestBodyBuilder(object):
    def __init__(self) -> None:
        self._create_chat_announcement_block_children_request_body = CreateChatAnnouncementBlockChildrenRequestBody()

    def children(self, children: List[Block]) -> "CreateChatAnnouncementBlockChildrenRequestBodyBuilder":
        self._create_chat_announcement_block_children_request_body.children = children
        return self

    def index(self, index: int) -> "CreateChatAnnouncementBlockChildrenRequestBodyBuilder":
        self._create_chat_announcement_block_children_request_body.index = index
        return self

    def build(self) -> "CreateChatAnnouncementBlockChildrenRequestBody":
        return self._create_chat_announcement_block_children_request_body
