# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: wechaty/puppet/base.proto, wechaty/puppet/contact.proto, wechaty/puppet/event.proto, wechaty/puppet/file-box.proto, wechaty/puppet/friendship.proto, wechaty/puppet/location.proto, wechaty/puppet/message.proto, wechaty/puppet/mini-program.proto, wechaty/puppet/room-invitation.proto, wechaty/puppet/room-member.proto, wechaty/puppet/room.proto, wechaty/puppet/tag.proto, wechaty/puppet/url-link.proto
# plugin: python-betterproto
import warnings
from dataclasses import dataclass
from typing import List, Optional

import betterproto
from betterproto.grpc.grpclib_server import ServiceBase


class PayloadType(betterproto.Enum):
    PAYLOAD_TYPE_UNKNOWN = 0
    PAYLOAD_TYPE_MESSAGE = 1
    PAYLOAD_TYPE_CONTACT = 2
    PAYLOAD_TYPE_ROOM = 3
    PAYLOAD_TYPE_ROOM_MEMBER = 4
    PAYLOAD_TYPE_FRIENDSHIP = 5


class ContactGender(betterproto.Enum):
    CONTACT_GENDER_UNSPECIFIED = 0
    CONTACT_GENDER_MALE = 1
    CONTACT_GENDER_FEMALE = 2


class ContactType(betterproto.Enum):
    CONTACT_TYPE_UNSPECIFIED = 0
    CONTACT_TYPE_PERSONAL = 1
    CONTACT_TYPE_OFFICIAL = 2
    CONTACT_TYPE_CORPORATION = 3


class EventType(betterproto.Enum):
    EVENT_TYPE_UNSPECIFIED = 0
    EVENT_TYPE_HEARTBEAT = 1
    EVENT_TYPE_MESSAGE = 2
    EVENT_TYPE_DONG = 3
    EVENT_TYPE_ERROR = 16
    EVENT_TYPE_FRIENDSHIP = 17
    EVENT_TYPE_ROOM_INVITE = 18
    EVENT_TYPE_ROOM_JOIN = 19
    EVENT_TYPE_ROOM_LEAVE = 20
    EVENT_TYPE_ROOM_TOPIC = 21
    EVENT_TYPE_SCAN = 22
    EVENT_TYPE_READY = 23
    EVENT_TYPE_RESET = 24
    EVENT_TYPE_LOGIN = 25
    EVENT_TYPE_LOGOUT = 26
    EVENT_TYPE_DIRTY = 27


class FriendshipType(betterproto.Enum):
    FRIENDSHIP_TYPE_UNSPECIFIED = 0
    FRIENDSHIP_TYPE_CONFIRM = 1
    FRIENDSHIP_TYPE_RECEIVE = 2
    FRIENDSHIP_TYPE_VERIFY = 3


class FriendshipSceneType(betterproto.Enum):
    FRIENDSHIP_SCENE_TYPE_UNSPECIFIED = 0
    FRIENDSHIP_SCENE_TYPE_QQ = 1
    FRIENDSHIP_SCENE_TYPE_EMAIL = 2
    FRIENDSHIP_SCENE_TYPE_WEIXIN = 3
    FRIENDSHIP_SCENE_TYPE_QQTBD = 12
    FRIENDSHIP_SCENE_TYPE_ROOM = 14
    FRIENDSHIP_SCENE_TYPE_PHONE = 15
    FRIENDSHIP_SCENE_TYPE_CARD = 17
    FRIENDSHIP_SCENE_TYPE_LOCATION = 18
    FRIENDSHIP_SCENE_TYPE_BOTTLE = 25
    FRIENDSHIP_SCENE_TYPE_SHAKING = 29
    FRIENDSHIP_SCENE_TYPE_QRCODE = 30


class MessageType(betterproto.Enum):
    MESSAGE_TYPE_UNSPECIFIED = 0
    MESSAGE_TYPE_ATTACHMENT = 1
    MESSAGE_TYPE_AUDIO = 2
    MESSAGE_TYPE_CONTACT = 3
    MESSAGE_TYPE_EMOTICON = 4
    MESSAGE_TYPE_IMAGE = 5
    MESSAGE_TYPE_TEXT = 6
    MESSAGE_TYPE_VIDEO = 7
    MESSAGE_TYPE_CHAT_HISTORY = 8
    MESSAGE_TYPE_LOCATION = 9
    MESSAGE_TYPE_MINI_PROGRAM = 10
    MESSAGE_TYPE_TRANSFER = 11
    MESSAGE_TYPE_RED_ENVELOPE = 12
    MESSAGE_TYPE_RECALLED = 13
    MESSAGE_TYPE_URL = 14


class ImageType(betterproto.Enum):
    IMAGE_TYPE_UNSPECIFIED = 0
    IMAGE_TYPE_THUMBNAIL = 1
    IMAGE_TYPE_HD = 2
    IMAGE_TYPE_ARTWORK = 3


@dataclass(eq=False, repr=False)
class StartRequest(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class StartResponse(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class StopRequest(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class StopResponse(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class VersionRequest(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class VersionResponse(betterproto.Message):
    version: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class LogoutRequest(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class LogoutResponse(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class DingRequest(betterproto.Message):
    data: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class DingResponse(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class DirtyPayloadRequest(betterproto.Message):
    type: "PayloadType" = betterproto.enum_field(1)
    id: str = betterproto.string_field(2)


@dataclass(eq=False, repr=False)
class DirtyPayloadResponse(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class ContactListRequest(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class ContactListResponse(betterproto.Message):
    ids: List[str] = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class ContactPayloadRequest(betterproto.Message):
    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class ContactPayloadResponse(betterproto.Message):
    id: str = betterproto.string_field(1)
    gender: "ContactGender" = betterproto.enum_field(2)
    type: "ContactType" = betterproto.enum_field(3)
    name: str = betterproto.string_field(4)
    avatar: str = betterproto.string_field(5)
    address: str = betterproto.string_field(6)
    alias: str = betterproto.string_field(7)
    city: str = betterproto.string_field(8)
    friend: bool = betterproto.bool_field(9)
    province: str = betterproto.string_field(10)
    signature: str = betterproto.string_field(11)
    star: bool = betterproto.bool_field(12)
    weixin: str = betterproto.string_field(13)
    corporation: str = betterproto.string_field(14)
    title: str = betterproto.string_field(15)
    description: str = betterproto.string_field(16)
    coworker: bool = betterproto.bool_field(17)
    phone: List[str] = betterproto.string_field(18)


@dataclass(eq=False, repr=False)
class ContactSelfQrCodeRequest(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class ContactSelfQrCodeResponse(betterproto.Message):
    qrcode: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class ContactSelfNameRequest(betterproto.Message):
    name: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class ContactSelfNameResponse(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class ContactSelfSignatureRequest(betterproto.Message):
    signature: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class ContactSelfSignatureResponse(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class ContactAliasRequest(betterproto.Message):
    id: str = betterproto.string_field(1)
    # nullable
    alias: Optional[str] = betterproto.message_field(2, wraps=betterproto.TYPE_STRING)


@dataclass(eq=False, repr=False)
class ContactAliasResponse(betterproto.Message):
    alias: Optional[str] = betterproto.message_field(1, wraps=betterproto.TYPE_STRING)


@dataclass(eq=False, repr=False)
class ContactAvatarRequest(betterproto.Message):
    id: str = betterproto.string_field(1)
    # * Huan(202011) TODO:  1. rename to file_box  2. replace it by FileBoxChunk
    # with stream support
    filebox: Optional[str] = betterproto.message_field(2, wraps=betterproto.TYPE_STRING)


@dataclass(eq=False, repr=False)
class ContactAvatarResponse(betterproto.Message):
    # * Huan(202011) TODO:  1. rename to file_box  2. replace it by FileBoxChunk
    # with stream support
    filebox: Optional[str] = betterproto.message_field(1, wraps=betterproto.TYPE_STRING)


@dataclass(eq=False, repr=False)
class ContactPhoneRequest(betterproto.Message):
    contact_id: str = betterproto.string_field(1)
    phone_list: List[str] = betterproto.string_field(2)


@dataclass(eq=False, repr=False)
class ContactPhoneResponse(betterproto.Message):
    phone_list: List[str] = betterproto.string_field(2)


@dataclass(eq=False, repr=False)
class ContactCorporationRemarkRequest(betterproto.Message):
    contact_id: str = betterproto.string_field(1)
    corporation_remark: Optional[str] = betterproto.message_field(
        2, wraps=betterproto.TYPE_STRING
    )


@dataclass(eq=False, repr=False)
class ContactCorporationRemarkResponse(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class ContactDescriptionRequest(betterproto.Message):
    contact_id: str = betterproto.string_field(1)
    description: Optional[str] = betterproto.message_field(
        2, wraps=betterproto.TYPE_STRING
    )


@dataclass(eq=False, repr=False)
class ContactDescriptionResponse(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class EventRequest(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class EventResponse(betterproto.Message):
    type: "EventType" = betterproto.enum_field(1)
    # TODO: Huan(202002) consider to use a PB Map?
    payload: str = betterproto.string_field(2)


@dataclass(eq=False, repr=False)
class FriendshipPayloadRequest(betterproto.Message):
    id: str = betterproto.string_field(1)
    # * Huan(202003):  What's the reason we need belowing payload?  We should
    # remove it if possible.
    payload: Optional[str] = betterproto.message_field(2, wraps=betterproto.TYPE_STRING)


@dataclass(eq=False, repr=False)
class FriendshipPayloadResponse(betterproto.Message):
    id: str = betterproto.string_field(1)
    contact_id: str = betterproto.string_field(2)
    hello: str = betterproto.string_field(3)
    type: "FriendshipType" = betterproto.enum_field(4)
    stranger: str = betterproto.string_field(5)
    ticket: str = betterproto.string_field(6)
    scene: "FriendshipSceneType" = betterproto.enum_field(7)


@dataclass(eq=False, repr=False)
class FriendshipSearchPhoneRequest(betterproto.Message):
    phone: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class FriendshipSearchPhoneResponse(betterproto.Message):
    # nullable
    contact_id: Optional[str] = betterproto.message_field(
        1, wraps=betterproto.TYPE_STRING
    )


@dataclass(eq=False, repr=False)
class FriendshipSearchWeixinRequest(betterproto.Message):
    weixin: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class FriendshipSearchWeixinResponse(betterproto.Message):
    # nullable
    contact_id: Optional[str] = betterproto.message_field(
        1, wraps=betterproto.TYPE_STRING
    )


@dataclass(eq=False, repr=False)
class FriendshipAddRequest(betterproto.Message):
    contact_id: str = betterproto.string_field(1)
    hello: str = betterproto.string_field(2)
    source_room_id: Optional[str] = betterproto.message_field(
        3, wraps=betterproto.TYPE_STRING
    )
    source_contact_id: Optional[str] = betterproto.message_field(
        4, wraps=betterproto.TYPE_STRING
    )


@dataclass(eq=False, repr=False)
class FriendshipAddResponse(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class FriendshipAcceptRequest(betterproto.Message):
    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class FriendshipAcceptResponse(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class FileBoxChunk(betterproto.Message):
    data: bytes = betterproto.bytes_field(1, group="payload")
    name: str = betterproto.string_field(2, group="payload")


@dataclass(eq=False, repr=False)
class LocationPayload(betterproto.Message):
    accuracy: float = betterproto.float_field(1)
    address: str = betterproto.string_field(2)
    latitude: float = betterproto.double_field(3)
    longitude: float = betterproto.double_field(4)
    name: str = betterproto.string_field(5)


@dataclass(eq=False, repr=False)
class MiniProgramPayload(betterproto.Message):
    appid: str = betterproto.string_field(1)
    description: str = betterproto.string_field(2)
    page_path: str = betterproto.string_field(3)
    icon_url: str = betterproto.string_field(4)
    share_id: str = betterproto.string_field(5)
    thumb_url: str = betterproto.string_field(6)
    title: str = betterproto.string_field(7)
    username: str = betterproto.string_field(8)
    thumb_key: str = betterproto.string_field(9)


@dataclass(eq=False, repr=False)
class UrlLinkPayload(betterproto.Message):
    description: str = betterproto.string_field(1)
    thumbnail_url: str = betterproto.string_field(2)
    title: str = betterproto.string_field(3)
    url: str = betterproto.string_field(4)


@dataclass(eq=False, repr=False)
class MessagePayloadRequest(betterproto.Message):
    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class MessagePayloadResponse(betterproto.Message):
    id: str = betterproto.string_field(1)
    filename: str = betterproto.string_field(2)
    text: str = betterproto.string_field(3)
    timestamp: int = betterproto.uint64_field(4)
    type: "MessageType" = betterproto.enum_field(5)
    from_id: str = betterproto.string_field(6)
    room_id: str = betterproto.string_field(7)
    to_id: str = betterproto.string_field(8)
    mention_ids: List[str] = betterproto.string_field(9)


@dataclass(eq=False, repr=False)
class MessageImageRequest(betterproto.Message):
    id: str = betterproto.string_field(1)
    type: "ImageType" = betterproto.enum_field(2)


@dataclass(eq=False, repr=False)
class MessageImageResponse(betterproto.Message):
    # * Huan(202011) TODO:  1. rename to file_box  2. replace it by FileBoxChunk
    # with stream support
    filebox: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class MessageImageStreamRequest(betterproto.Message):
    id: str = betterproto.string_field(1)
    type: "ImageType" = betterproto.enum_field(2)


@dataclass(eq=False, repr=False)
class MessageImageStreamResponse(betterproto.Message):
    file_box_chunk: "FileBoxChunk" = betterproto.message_field(1)


@dataclass(eq=False, repr=False)
class MessageContactRequest(betterproto.Message):
    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class MessageContactResponse(betterproto.Message):
    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class MessageFileRequest(betterproto.Message):
    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class MessageFileResponse(betterproto.Message):
    # * Huan(202011) deprecated: use MessageFileStreamResponse instead
    filebox: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class MessageFileStreamRequest(betterproto.Message):
    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class MessageFileStreamResponse(betterproto.Message):
    file_box_chunk: "FileBoxChunk" = betterproto.message_field(1)


@dataclass(eq=False, repr=False)
class MessageMiniProgramRequest(betterproto.Message):
    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class MessageMiniProgramResponse(betterproto.Message):
    # * Huan(202110): We should use payload instead of JSON.stringify string  The
    # compatible code will be removed after Dec 31, 2022
    mini_program_deprecated: str = betterproto.string_field(1)
    mini_program: "MiniProgramPayload" = betterproto.message_field(2)

    def __post_init__(self) -> None:
        super().__post_init__()
        if self.mini_program_deprecated:
            warnings.warn(
                "MessageMiniProgramResponse.mini_program_deprecated is deprecated",
                DeprecationWarning,
            )


@dataclass(eq=False, repr=False)
class MessageUrlRequest(betterproto.Message):
    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class MessageUrlResponse(betterproto.Message):
    # * Huan(202110): We should use payload instead of JSON.stringify string  The
    # compatible code will be removed after Dec 31, 2022
    url_link_deprecated: str = betterproto.string_field(1)
    url_link: "UrlLinkPayload" = betterproto.message_field(2)

    def __post_init__(self) -> None:
        super().__post_init__()
        if self.url_link_deprecated:
            warnings.warn(
                "MessageUrlResponse.url_link_deprecated is deprecated",
                DeprecationWarning,
            )


@dataclass(eq=False, repr=False)
class MessageSendContactRequest(betterproto.Message):
    conversation_id: str = betterproto.string_field(1)
    contact_id: str = betterproto.string_field(2)


@dataclass(eq=False, repr=False)
class MessageSendContactResponse(betterproto.Message):
    # nullable
    id: Optional[str] = betterproto.message_field(1, wraps=betterproto.TYPE_STRING)


@dataclass(eq=False, repr=False)
class MessageSendFileRequest(betterproto.Message):
    conversation_id: str = betterproto.string_field(1)
    filebox: str = betterproto.string_field(2)


@dataclass(eq=False, repr=False)
class MessageSendFileResponse(betterproto.Message):
    id: Optional[str] = betterproto.message_field(1, wraps=betterproto.TYPE_STRING)


@dataclass(eq=False, repr=False)
class MessageSendFileStreamRequest(betterproto.Message):
    conversation_id: str = betterproto.string_field(1, group="payload")
    file_box_chunk: "FileBoxChunk" = betterproto.message_field(2, group="payload")


@dataclass(eq=False, repr=False)
class MessageSendFileStreamResponse(betterproto.Message):
    id: Optional[str] = betterproto.message_field(1, wraps=betterproto.TYPE_STRING)


@dataclass(eq=False, repr=False)
class MessageSendTextRequest(betterproto.Message):
    conversation_id: str = betterproto.string_field(1)
    text: str = betterproto.string_field(2)
    # Huan(202011) FIXME: Issue #99 https://github.com/wechaty/grpc/issues/99
    mentional_ids: List[str] = betterproto.string_field(3)


@dataclass(eq=False, repr=False)
class MessageSendTextResponse(betterproto.Message):
    id: Optional[str] = betterproto.message_field(1, wraps=betterproto.TYPE_STRING)


@dataclass(eq=False, repr=False)
class MessageSendMiniProgramRequest(betterproto.Message):
    conversation_id: str = betterproto.string_field(1)
    # * Huan(202110): We should use payload instead of JSON.stringify string  The
    # compatible code will be removed after Dec 31, 2022
    mini_program_deprecated: str = betterproto.string_field(2)
    mini_program: "MiniProgramPayload" = betterproto.message_field(3)

    def __post_init__(self) -> None:
        super().__post_init__()
        if self.mini_program_deprecated:
            warnings.warn(
                "MessageSendMiniProgramRequest.mini_program_deprecated is deprecated",
                DeprecationWarning,
            )


@dataclass(eq=False, repr=False)
class MessageSendMiniProgramResponse(betterproto.Message):
    id: Optional[str] = betterproto.message_field(1, wraps=betterproto.TYPE_STRING)


@dataclass(eq=False, repr=False)
class MessageSendUrlRequest(betterproto.Message):
    conversation_id: str = betterproto.string_field(1)
    # * Huan(202110): We should use payload instead of JSON.stringify string  The
    # compatible code will be removed after Dec 31, 2022
    url_link_deprecated: str = betterproto.string_field(2)
    url_link: "UrlLinkPayload" = betterproto.message_field(3)

    def __post_init__(self) -> None:
        super().__post_init__()
        if self.url_link_deprecated:
            warnings.warn(
                "MessageSendUrlRequest.url_link_deprecated is deprecated",
                DeprecationWarning,
            )


@dataclass(eq=False, repr=False)
class MessageSendUrlResponse(betterproto.Message):
    id: Optional[str] = betterproto.message_field(1, wraps=betterproto.TYPE_STRING)


@dataclass(eq=False, repr=False)
class MessageRecallRequest(betterproto.Message):
    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class MessageRecallResponse(betterproto.Message):
    success: bool = betterproto.bool_field(1)


@dataclass(eq=False, repr=False)
class MessageForwardRequest(betterproto.Message):
    message_id: str = betterproto.string_field(1)
    conversation_id: str = betterproto.string_field(2)


@dataclass(eq=False, repr=False)
class MessageForwardResponse(betterproto.Message):
    id: Optional[str] = betterproto.message_field(1, wraps=betterproto.TYPE_STRING)


@dataclass(eq=False, repr=False)
class MessageLocationRequest(betterproto.Message):
    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class MessageLocationResponse(betterproto.Message):
    location: "LocationPayload" = betterproto.message_field(1)


@dataclass(eq=False, repr=False)
class MessageSendLocationRequest(betterproto.Message):
    conversation_id: str = betterproto.string_field(1)
    location: "LocationPayload" = betterproto.message_field(2)


@dataclass(eq=False, repr=False)
class MessageSendLocationResponse(betterproto.Message):
    # * Huan(202110): we will not use wrappers any more by following the Google
    # Style Guide:  If not using optional would add complexity or ambiguity, then
    # use optional primitive fields,  Wrapper types must not be used going
    # forward.  — Optional Primitive Fields
    # (https://cloud.google.com/apis/design/design_patterns.md#optional-
    # primitive-fields)
    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class RoomListRequest(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class RoomListResponse(betterproto.Message):
    ids: List[str] = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class RoomPayloadRequest(betterproto.Message):
    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class RoomPayloadResponse(betterproto.Message):
    id: str = betterproto.string_field(1)
    topic: str = betterproto.string_field(2)
    avatar: str = betterproto.string_field(3)
    owner_id: str = betterproto.string_field(4)
    admin_ids: List[str] = betterproto.string_field(5)
    member_ids: List[str] = betterproto.string_field(6)


@dataclass(eq=False, repr=False)
class RoomAddRequest(betterproto.Message):
    id: str = betterproto.string_field(1)
    contact_id: str = betterproto.string_field(2)
    invite_only: bool = betterproto.bool_field(3)


@dataclass(eq=False, repr=False)
class RoomAddResponse(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class RoomAvatarRequest(betterproto.Message):
    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class RoomAvatarResponse(betterproto.Message):
    # * Huan(202011) TODO:  1. rename to file_box  2. replace it by FileBoxChunk
    # with stream support
    filebox: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class RoomCreateRequest(betterproto.Message):
    contact_ids: List[str] = betterproto.string_field(1)
    topic: str = betterproto.string_field(2)


@dataclass(eq=False, repr=False)
class RoomCreateResponse(betterproto.Message):
    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class RoomDelRequest(betterproto.Message):
    id: str = betterproto.string_field(1)
    contact_id: str = betterproto.string_field(2)


@dataclass(eq=False, repr=False)
class RoomDelResponse(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class RoomQuitRequest(betterproto.Message):
    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class RoomQuitResponse(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class RoomTopicRequest(betterproto.Message):
    id: str = betterproto.string_field(1)
    topic: Optional[str] = betterproto.message_field(2, wraps=betterproto.TYPE_STRING)


@dataclass(eq=False, repr=False)
class RoomTopicResponse(betterproto.Message):
    topic: Optional[str] = betterproto.message_field(1, wraps=betterproto.TYPE_STRING)


@dataclass(eq=False, repr=False)
class RoomQrCodeRequest(betterproto.Message):
    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class RoomQrCodeResponse(betterproto.Message):
    qrcode: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class RoomAnnounceRequest(betterproto.Message):
    id: str = betterproto.string_field(1)
    text: Optional[str] = betterproto.message_field(2, wraps=betterproto.TYPE_STRING)


@dataclass(eq=False, repr=False)
class RoomAnnounceResponse(betterproto.Message):
    text: Optional[str] = betterproto.message_field(1, wraps=betterproto.TYPE_STRING)


@dataclass(eq=False, repr=False)
class RoomInvitationPayloadRequest(betterproto.Message):
    id: str = betterproto.string_field(1)
    # * Huan(202002): `payload` should be removed.  The puppet server should take
    # the responsibilities  for storing the unaccepted friend-request payload.
    payload: Optional[str] = betterproto.message_field(2, wraps=betterproto.TYPE_STRING)


@dataclass(eq=False, repr=False)
class RoomInvitationPayloadResponse(betterproto.Message):
    id: str = betterproto.string_field(1)
    inviter_id: str = betterproto.string_field(2)
    topic: str = betterproto.string_field(3)
    member_count: int = betterproto.int32_field(4)
    member_ids: List[str] = betterproto.string_field(5)
    timestamp: int = betterproto.uint64_field(6)
    avatar: str = betterproto.string_field(7)
    invitation: str = betterproto.string_field(8)
    receiver_id: str = betterproto.string_field(9)


@dataclass(eq=False, repr=False)
class RoomInvitationAcceptRequest(betterproto.Message):
    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class RoomInvitationAcceptResponse(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class RoomMemberPayloadRequest(betterproto.Message):
    id: str = betterproto.string_field(1)
    member_id: str = betterproto.string_field(2)


@dataclass(eq=False, repr=False)
class RoomMemberPayloadResponse(betterproto.Message):
    id: str = betterproto.string_field(1)
    room_alias: str = betterproto.string_field(2)
    inviter_id: str = betterproto.string_field(3)
    avatar: str = betterproto.string_field(4)
    name: str = betterproto.string_field(5)


@dataclass(eq=False, repr=False)
class RoomMemberListRequest(betterproto.Message):
    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class RoomMemberListResponse(betterproto.Message):
    member_ids: List[str] = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class TagContactAddRequest(betterproto.Message):
    id: str = betterproto.string_field(1)
    contact_id: str = betterproto.string_field(2)


@dataclass(eq=False, repr=False)
class TagContactAddResponse(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class TagContactRemoveRequest(betterproto.Message):
    id: str = betterproto.string_field(1)
    contact_id: str = betterproto.string_field(2)


@dataclass(eq=False, repr=False)
class TagContactRemoveResponse(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class TagContactDeleteRequest(betterproto.Message):
    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class TagContactDeleteResponse(betterproto.Message):
    pass


@dataclass(eq=False, repr=False)
class TagContactListRequest(betterproto.Message):
    contact_id: Optional[str] = betterproto.message_field(
        1, wraps=betterproto.TYPE_STRING
    )


@dataclass(eq=False, repr=False)
class TagContactListResponse(betterproto.Message):
    ids: List[str] = betterproto.string_field(1)
