# Code generated by Lark OpenAPI.

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


class AuditRecipientDetail(object):
    _types = {
        "permission_action_type": str,
        "chat_id": str,
        "chat_name": str,
        "chat_type": int,
        "external_flag": bool,
    }

    def __init__(self, d=None):
        self.permission_action_type: Optional[str] = None
        self.chat_id: Optional[str] = None
        self.chat_name: Optional[str] = None
        self.chat_type: Optional[int] = None
        self.external_flag: Optional[bool] = None
        init(self, d, self._types)

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


class AuditRecipientDetailBuilder(object):
    def __init__(self) -> None:
        self._audit_recipient_detail = AuditRecipientDetail()

    def permission_action_type(self, permission_action_type: str) -> "AuditRecipientDetailBuilder":
        self._audit_recipient_detail.permission_action_type = permission_action_type
        return self

    def chat_id(self, chat_id: str) -> "AuditRecipientDetailBuilder":
        self._audit_recipient_detail.chat_id = chat_id
        return self

    def chat_name(self, chat_name: str) -> "AuditRecipientDetailBuilder":
        self._audit_recipient_detail.chat_name = chat_name
        return self

    def chat_type(self, chat_type: int) -> "AuditRecipientDetailBuilder":
        self._audit_recipient_detail.chat_type = chat_type
        return self

    def external_flag(self, external_flag: bool) -> "AuditRecipientDetailBuilder":
        self._audit_recipient_detail.external_flag = external_flag
        return self

    def build(self) -> "AuditRecipientDetail":
        return self._audit_recipient_detail
