# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: steammessages_chat.proto
# plugin: python-betterproto
# Last updated 09/09/2021

from dataclasses import dataclass

import betterproto

from .friends import CMsgClientPersonaStateFriend
from .msg import UnifiedMessage


class EChatRoomJoinState(betterproto.Enum):
    Default = 0
    NONE = 1
    Joined = 2
    TestInvalid = 99


class EChatRoomGroupRank(betterproto.Enum):
    Default = 0
    Viewer = 10
    Guest = 15
    Member = 20
    Moderator = 30
    Officer = 40
    Owner = 50
    TestInvalid = 99


class EChatRoomNotificationLevel(betterproto.Enum):
    Invalid = 0
    NONE = 1
    MentionMe = 2
    MentionAll = 3
    AllMessages = 4


class EChatRoomServerMessage(betterproto.Enum):
    Invalid = 0
    RenameChatRoom = 1
    Joined = 2
    Parted = 3
    Kicked = 4
    Invited = 5
    InviteDismissed = 8
    ChatRoomTaglineChanged = 9
    ChatRoomAvatarChanged = 10
    AppCustom = 11


class EChatRoomMessageReactionType(betterproto.Enum):
    Invalid = 0
    Emoticon = 1
    Sticker = 2


class EChatRoomMemberStateChange(betterproto.Enum):
    Invalid = 0
    Joined = 1
    Parted = 2
    Kicked = 3
    Invited = 4
    RankChanged = 7
    InviteDismissed = 8
    Muted = 9
    Banned = 10
    RolesChanged = 12


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


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


class CreateChatRoomGroupRequest(UnifiedMessage, um_name="ChatRoom.CreateChatRoomGroup"):
    steamid_partner: int = betterproto.fixed64_field(1)
    steamid_invited: int = betterproto.fixed64_field(2)
    name: str = betterproto.string_field(3)
    steamid_invitees: list[int] = betterproto.fixed64_field(4)
    watching_broadcast_accountid: int = betterproto.uint32_field(6)
    watching_broadcast_channel_id: int = betterproto.uint64_field(7)


@dataclass(eq=False, repr=False)
class Role(betterproto.Message):
    role_id: int = betterproto.uint64_field(1)
    name: str = betterproto.string_field(2)
    ordinal: int = betterproto.uint32_field(3)


@dataclass(eq=False, repr=False)
class RoleActions(betterproto.Message):
    role_id: int = betterproto.uint64_field(1)
    can_create_rename_delete_channel: bool = betterproto.bool_field(2)
    can_kick: bool = betterproto.bool_field(3)
    can_ban: bool = betterproto.bool_field(4)
    can_invite: bool = betterproto.bool_field(5)
    can_change_tagline_avatar_name: bool = betterproto.bool_field(6)
    can_chat: bool = betterproto.bool_field(7)
    can_view_history: bool = betterproto.bool_field(8)
    can_change_group_roles: bool = betterproto.bool_field(9)
    can_change_user_roles: bool = betterproto.bool_field(10)
    can_mention_all: bool = betterproto.bool_field(11)
    can_set_watching_broadcast: bool = betterproto.bool_field(12)


@dataclass(eq=False, repr=False)
class PartyBeacon(betterproto.Message):
    app_id: int = betterproto.uint32_field(1)
    steamid_owner: int = betterproto.fixed64_field(2)
    beacon_id: int = betterproto.fixed64_field(3)
    game_metadata: str = betterproto.string_field(4)


@dataclass(eq=False, repr=False)
class GroupHeaderState(betterproto.Message):
    chat_group_id: int = betterproto.uint64_field(1)
    chat_name: str = betterproto.string_field(2)
    clanid: int = betterproto.uint32_field(13)
    accountid_owner: int = betterproto.uint32_field(14)
    appid: int = betterproto.uint32_field(21)
    tagline: str = betterproto.string_field(15)
    avatar_sha: bytes = betterproto.bytes_field(16)
    default_role_id: int = betterproto.uint64_field(17)
    roles: "list[Role]" = betterproto.message_field(18)
    role_actions: "list[RoleActions]" = betterproto.message_field(19)
    watching_broadcast_accountid: int = betterproto.uint32_field(20)
    party_beacons: "list[PartyBeacon]" = betterproto.message_field(22)
    watching_broadcast_channel_id: int = betterproto.uint64_field(23)
    active_minigame_id: int = betterproto.uint64_field(24)
    avatar_ugc_url: str = betterproto.string_field(25)
    disabled: bool = betterproto.bool_field(26)


@dataclass(eq=False, repr=False)
class Member(betterproto.Message):
    accountid: int = betterproto.uint32_field(1)
    state: "EChatRoomJoinState" = betterproto.enum_field(3)
    rank: "EChatRoomGroupRank" = betterproto.enum_field(4)
    time_kick_expire: int = betterproto.uint32_field(6)
    role_ids: list[int] = betterproto.uint64_field(7)


@dataclass(eq=False, repr=False)
class State(betterproto.Message):
    chat_id: int = betterproto.uint64_field(1)
    chat_name: str = betterproto.string_field(2)
    voice_allowed: bool = betterproto.bool_field(3)
    members_in_voice: list[int] = betterproto.uint32_field(4)
    time_last_message: int = betterproto.uint32_field(5)
    sort_order: int = betterproto.uint32_field(6)
    last_message: str = betterproto.string_field(7)
    accountid_last_message: int = betterproto.uint32_field(8)


@dataclass(eq=False, repr=False)
class GroupState(betterproto.Message):
    header_state: "GroupHeaderState" = betterproto.message_field(1)
    members: "list[Member]" = betterproto.message_field(2)
    default_chat_id: int = betterproto.uint64_field(4)
    chat_rooms: "list[State]" = betterproto.message_field(5)
    kicked: "list[Member]" = betterproto.message_field(7)


@dataclass(eq=False, repr=False)
class ChatRoomState(betterproto.Message):
    chat_id: int = betterproto.uint64_field(1)
    time_joined: int = betterproto.uint32_field(2)
    time_last_ack: int = betterproto.uint32_field(3)
    desktop_notification_level: "EChatRoomNotificationLevel" = betterproto.enum_field(4)
    mobile_notification_level: "EChatRoomNotificationLevel" = betterproto.enum_field(5)
    time_last_mention: int = betterproto.uint32_field(6)
    unread_indicator_muted: bool = betterproto.bool_field(7)
    time_first_unread: int = betterproto.uint32_field(8)


@dataclass(eq=False, repr=False)
class ChatRoomGroupState(betterproto.Message):
    chat_group_id: int = betterproto.uint64_field(1)
    time_joined: int = betterproto.uint32_field(2)
    user_chat_room_state: "list[ChatRoomState]" = betterproto.message_field(3)
    desktop_notification_level: "EChatRoomNotificationLevel" = betterproto.enum_field(4)
    mobile_notification_level: "EChatRoomNotificationLevel" = betterproto.enum_field(5)
    time_last_group_ack: int = betterproto.uint32_field(6)
    unread_indicator_muted: bool = betterproto.bool_field(7)


class CreateChatRoomGroupResponse(UnifiedMessage, um_name="ChatRoom.CreateChatRoomGroup"):
    chat_group_id: int = betterproto.uint64_field(1)
    state: "GroupState" = betterproto.message_field(2)
    user_chat_state: "ChatRoomGroupState" = betterproto.message_field(3)


class SaveChatRoomGroupRequest(UnifiedMessage, um_name="ChatRoom.SaveChatRoomGroup"):
    chat_group_id: int = betterproto.uint64_field(1)
    name: str = betterproto.string_field(2)


class SaveChatRoomGroupResponse(UnifiedMessage, um_name="ChatRoom.SaveChatRoomGroup"):
    pass


class RenameChatRoomGroupRequest(UnifiedMessage, um_name="ChatRoom.RenameChatRoomGroup"):
    chat_group_id: int = betterproto.uint64_field(1)
    name: str = betterproto.string_field(2)


class RenameChatRoomGroupResponse(UnifiedMessage, um_name="ChatRoom.RenameChatRoomGroup"):
    name: str = betterproto.string_field(1)


class SetChatRoomGroupTaglineRequest(UnifiedMessage, um_name="ChatRoom.SetChatRoomGroupTagline"):
    chat_group_id: int = betterproto.uint64_field(1)
    tagline: str = betterproto.string_field(2)


class SetChatRoomGroupTaglineResponse(UnifiedMessage, um_name="ChatRoom.SetChatRoomGroupTagline"):
    pass


class SetChatRoomGroupAvatarRequest(UnifiedMessage, um_name="ChatRoom.SetChatRoomGroupAvatar"):
    chat_group_id: int = betterproto.uint64_field(1)
    avatar_sha: bytes = betterproto.bytes_field(2)


class SetChatRoomGroupAvatarResponse(UnifiedMessage, um_name="ChatRoom.SetChatRoomGroupAvatar"):
    pass


class SetChatRoomGroupWatchingBroadcastRequest(UnifiedMessage, um_name="ChatRoom.SetChatRoomGroupWatchingBroadcast"):
    chat_group_id: int = betterproto.uint64_field(1)
    watching_broadcast_accountid: int = betterproto.uint32_field(2)
    watching_broadcast_channel_id: int = betterproto.uint64_field(3)


class SetChatRoomGroupWatchingBroadcastResponse(UnifiedMessage, um_name="ChatRoom.SetChatRoomGroupWatchingBroadcast"):
    pass


class JoinMiniGameForChatRoomGroupRequest(UnifiedMessage, um_name="ChatRoom.JoinMiniGameForChatRoomGroup"):
    chat_group_id: int = betterproto.uint64_field(1)
    chat_id: int = betterproto.uint64_field(2)


class JoinMiniGameForChatRoomGroupResponse(UnifiedMessage, um_name="ChatRoom.JoinMiniGameForChatRoomGroup"):
    minigame_id: int = betterproto.uint64_field(1)


class EndMiniGameForChatRoomGroupRequest(UnifiedMessage, um_name="ChatRoom.EndMiniGameForChatRoomGroup"):
    chat_group_id: int = betterproto.uint64_field(1)
    chat_id: int = betterproto.uint64_field(2)
    minigame_id: int = betterproto.uint64_field(3)


class EndMiniGameForChatRoomGroupResponse(UnifiedMessage, um_name="ChatRoom.EndMiniGameForChatRoomGroup"):
    pass


class MuteUserRequest(UnifiedMessage, um_name="ChatRoom.MuteUserInGroup"):
    chat_group_id: int = betterproto.uint64_field(1)
    steamid: int = betterproto.fixed64_field(2)
    expiration: int = betterproto.int32_field(3)


class MuteUserResponse(UnifiedMessage, um_name="ChatRoom.MuteUserInGroup"):
    pass


class KickUserRequest(UnifiedMessage, um_name="ChatRoom.KickUserFromGroup"):
    chat_group_id: int = betterproto.uint64_field(1)
    steamid: int = betterproto.fixed64_field(2)
    expiration: int = betterproto.int32_field(3)


class KickUserResponse(UnifiedMessage, um_name="ChatRoom.KickUserFromGroup"):
    pass


class SetUserBanStateRequest(UnifiedMessage, um_name="ChatRoom.SetUserBanState"):
    chat_group_id: int = betterproto.uint64_field(1)
    steamid: int = betterproto.fixed64_field(2)
    ban_state: bool = betterproto.bool_field(3)


class SetUserBanStateResponse(UnifiedMessage, um_name="ChatRoom.SetUserBanState"):
    pass


class RevokeInviteRequest(UnifiedMessage, um_name="ChatRoom.RevokeInviteToGroup"):
    chat_group_id: int = betterproto.uint64_field(1)
    steamid: int = betterproto.fixed64_field(2)


class RevokeInviteResponse(UnifiedMessage, um_name="ChatRoom.RevokeInviteToGroup"):
    pass


class CreateRoleRequest(UnifiedMessage, um_name="ChatRoom.CreateRole"):
    chat_group_id: int = betterproto.uint64_field(1)
    name: str = betterproto.string_field(2)


class CreateRoleResponse(UnifiedMessage, um_name="ChatRoom.CreateRole"):
    actions: "RoleActions" = betterproto.message_field(2)


class GetRolesRequest(UnifiedMessage, um_name="ChatRoom.GetRoles"):
    chat_group_id: int = betterproto.uint64_field(1)


class GetRolesResponse(UnifiedMessage, um_name="ChatRoom.GetRoles"):
    roles: "list[Role]" = betterproto.message_field(1)


class RenameRoleRequest(UnifiedMessage, um_name="ChatRoom.RenameRole"):
    chat_group_id: int = betterproto.uint64_field(1)
    role_id: int = betterproto.uint64_field(2)
    name: str = betterproto.string_field(3)


class RenameRoleResponse(UnifiedMessage, um_name="ChatRoom.RenameRole"):
    pass


class ReorderRoleRequest(UnifiedMessage, um_name="ChatRoom.ReorderRole"):
    chat_group_id: int = betterproto.uint64_field(1)
    role_id: int = betterproto.uint64_field(2)
    ordinal: int = betterproto.uint32_field(3)


class ReorderRoleResponse(UnifiedMessage, um_name="ChatRoom.ReorderRole"):
    pass


class DeleteRoleRequest(UnifiedMessage, um_name="ChatRoom.DeleteRole"):
    chat_group_id: int = betterproto.uint64_field(1)
    role_id: int = betterproto.uint64_field(2)


class DeleteRoleResponse(UnifiedMessage, um_name="ChatRoom.DeleteRole"):
    pass


class GetRoleActionsRequest(UnifiedMessage, um_name="ChatRoom.GetRoleActions"):
    chat_group_id: int = betterproto.uint64_field(1)
    role_id: int = betterproto.uint64_field(2)


class GetRoleActionsResponse(UnifiedMessage, um_name="ChatRoom.GetRoleActions"):
    actions: "list[RoleActions]" = betterproto.message_field(1)


class ReplaceRoleActionsRequest(UnifiedMessage, um_name="ChatRoom.ReplaceRoleActions"):
    chat_group_id: int = betterproto.uint64_field(1)
    role_id: int = betterproto.uint64_field(2)
    actions: "RoleActions" = betterproto.message_field(4)


class ReplaceRoleActionsResponse(UnifiedMessage, um_name="ChatRoom.ReplaceRoleActions"):
    pass


class AddRoleToUserRequest(UnifiedMessage, um_name="ChatRoom.AddRoleToUser"):
    chat_group_id: int = betterproto.uint64_field(1)
    role_id: int = betterproto.uint64_field(3)
    steamid: int = betterproto.fixed64_field(4)


class AddRoleToUserResponse(UnifiedMessage, um_name="ChatRoom.AddRoleToUser"):
    pass


class GetRolesForUserRequest(UnifiedMessage, um_name="ChatRoom.GetRolesForUser"):
    chat_group_id: int = betterproto.uint64_field(1)
    steamid: int = betterproto.fixed64_field(3)


class GetRolesForUserResponse(UnifiedMessage, um_name="ChatRoom.GetRolesForUser"):
    role_ids: list[int] = betterproto.uint64_field(1)


class DeleteRoleFromUserRequest(UnifiedMessage, um_name="ChatRoom.DeleteRoleFromUser"):
    chat_group_id: int = betterproto.uint64_field(1)
    role_id: int = betterproto.uint64_field(3)
    steamid: int = betterproto.fixed64_field(4)


class DeleteRoleFromUserResponse(UnifiedMessage, um_name="ChatRoom.DeleteRoleFromUser"):
    pass


class JoinChatRoomGroupRequest(UnifiedMessage, um_name="ChatRoom.JoinChatRoomGroup"):
    chat_group_id: int = betterproto.uint64_field(1)
    invite_code: str = betterproto.string_field(2)
    chat_id: int = betterproto.uint64_field(3)


class JoinChatRoomGroupResponse(UnifiedMessage, um_name="ChatRoom.JoinChatRoomGroup"):
    state: "GroupState" = betterproto.message_field(1)
    user_chat_state: "ChatRoomGroupState" = betterproto.message_field(3)
    join_chat_id: int = betterproto.uint64_field(4)
    time_expire: int = betterproto.uint32_field(5)


class InviteFriendToChatRoomGroupRequest(UnifiedMessage, um_name="ChatRoom.InviteFriendToChatRoomGroup"):
    chat_group_id: int = betterproto.uint64_field(1)
    steamid: int = betterproto.fixed64_field(2)
    chat_id: int = betterproto.uint64_field(3)
    skip_friendsui_check: bool = betterproto.bool_field(4)


class InviteFriendToChatRoomGroupResponse(UnifiedMessage, um_name="ChatRoom.InviteFriendToChatRoomGroup"):
    pass


class LeaveChatRoomGroupRequest(UnifiedMessage, um_name="ChatRoom.LeaveChatRoomGroup"):
    chat_group_id: int = betterproto.uint64_field(1)


class LeaveChatRoomGroupResponse(UnifiedMessage, um_name="ChatRoom.LeaveChatRoomGroup"):
    pass


class CreateChatRoomRequest(UnifiedMessage, um_name="ChatRoom.CreateChatRoom"):
    chat_group_id: int = betterproto.uint64_field(1)
    name: str = betterproto.string_field(2)
    allow_voice: bool = betterproto.bool_field(3)


class CreateChatRoomResponse(UnifiedMessage, um_name="ChatRoom.CreateChatRoom"):
    chat_room: "State" = betterproto.message_field(1)


class DeleteChatRoomRequest(UnifiedMessage, um_name="ChatRoom.DeleteChatRoom"):
    chat_group_id: int = betterproto.uint64_field(1)
    chat_id: int = betterproto.uint64_field(2)


class DeleteChatRoomResponse(UnifiedMessage, um_name="ChatRoom.DeleteChatRoom"):
    pass


class RenameChatRoomRequest(UnifiedMessage, um_name="ChatRoom.RenameChatRoom"):
    chat_group_id: int = betterproto.uint64_field(1)
    chat_id: int = betterproto.uint64_field(2)
    name: str = betterproto.string_field(3)


class RenameChatRoomResponse(UnifiedMessage, um_name="ChatRoom.RenameChatRoom"):
    pass


class ReorderChatRoomRequest(UnifiedMessage, um_name="ChatRoom.ReorderChatRoom"):
    chat_group_id: int = betterproto.uint64_field(1)
    chat_id: int = betterproto.uint64_field(2)
    move_after_chat_id: int = betterproto.uint64_field(3)


class ReorderChatRoomResponse(UnifiedMessage, um_name="ChatRoom.ReorderChatRoom"):
    pass


class SendChatMessageRequest(UnifiedMessage, um_name="ChatRoom.SendChatMessage"):
    chat_group_id: int = betterproto.uint64_field(1)
    chat_id: int = betterproto.uint64_field(2)
    message: str = betterproto.string_field(3)
    echo_to_sender: bool = betterproto.bool_field(4)


class SendChatMessageResponse(UnifiedMessage, um_name="ChatRoom.SendChatMessage"):
    modified_message: str = betterproto.string_field(1)
    server_timestamp: int = betterproto.uint32_field(2)
    ordinal: int = betterproto.uint32_field(3)
    message_without_bb_code: str = betterproto.string_field(4)


class JoinVoiceChatRequest(UnifiedMessage, um_name="ChatRoom.JoinVoiceChat"):
    chat_group_id: int = betterproto.uint64_field(1)
    chat_id: int = betterproto.uint64_field(2)


class JoinVoiceChatResponse(UnifiedMessage, um_name="ChatRoom.JoinVoiceChat"):
    voice_chatid: int = betterproto.uint64_field(1)


class LeaveVoiceChatRequest(UnifiedMessage, um_name="ChatRoom.LeaveVoiceChat"):
    chat_group_id: int = betterproto.uint64_field(1)
    chat_id: int = betterproto.uint64_field(2)


class LeaveVoiceChatResponse(UnifiedMessage, um_name="ChatRoom.LeaveVoiceChat"):
    pass


class GetMessageHistoryRequest(UnifiedMessage, um_name="ChatRoom.GetMessageHistory"):
    chat_group_id: int = betterproto.uint64_field(1)
    chat_id: int = betterproto.uint64_field(2)
    last_time: int = betterproto.uint32_field(3)
    last_ordinal: int = betterproto.uint32_field(4)
    start_time: int = betterproto.uint32_field(5)
    start_ordinal: int = betterproto.uint32_field(6)
    max_count: int = betterproto.uint32_field(7)


@dataclass(eq=False, repr=False)
class ServerMessage(betterproto.Message):
    message: "EChatRoomServerMessage" = betterproto.enum_field(1)
    string_param: str = betterproto.string_field(2)
    accountid_param: int = betterproto.uint32_field(3)


class GetMessageHistoryResponse(UnifiedMessage, um_name="ChatRoom.GetMessageHistory"):
    messages: "list[GetMessageHistoryResponseChatMessage]" = betterproto.message_field(1)
    more_available: bool = betterproto.bool_field(4)


@dataclass(eq=False, repr=False)
class GetMessageHistoryResponseChatMessage(betterproto.Message):
    sender: int = betterproto.uint32_field(1)
    server_timestamp: int = betterproto.uint32_field(2)
    message: str = betterproto.string_field(3)
    ordinal: int = betterproto.uint32_field(4)
    server_message: "ServerMessage" = betterproto.message_field(5)
    deleted: bool = betterproto.bool_field(6)
    reactions: "list[GetMessageHistoryResponseChatMessageMessageReaction]" = betterproto.message_field(7)


@dataclass(eq=False, repr=False)
class GetMessageHistoryResponseChatMessageMessageReaction(betterproto.Message):
    reaction_type: "EChatRoomMessageReactionType" = betterproto.enum_field(1)
    reaction: str = betterproto.string_field(2)
    num_reactors: int = betterproto.uint32_field(3)
    has_user_reacted: bool = betterproto.bool_field(4)


class GetMyChatRoomGroupsRequest(UnifiedMessage, um_name="ChatRoom.GetMyChatRoomGroups"):
    pass


class GetChatRoomGroupSummaryResponse(UnifiedMessage, um_name="ChatRoom.GetChatRoomGroupSummary"):
    chat_group_id: int = betterproto.uint64_field(1)
    chat_group_name: str = betterproto.string_field(2)
    active_member_count: int = betterproto.uint32_field(3)
    active_voice_member_count: int = betterproto.uint32_field(4)
    default_chat_id: int = betterproto.uint64_field(5)
    chat_rooms: "list[State]" = betterproto.message_field(6)
    clanid: int = betterproto.uint32_field(7)
    chat_group_tagline: str = betterproto.string_field(8)
    accountid_owner: int = betterproto.uint32_field(9)
    top_members: list[int] = betterproto.uint32_field(10)
    chat_group_avatar_sha: bytes = betterproto.bytes_field(11)
    rank: "EChatRoomGroupRank" = betterproto.enum_field(12)
    default_role_id: int = betterproto.uint64_field(13)
    role_ids: list[int] = betterproto.uint64_field(14)
    role_actions: "list[RoleActions]" = betterproto.message_field(15)
    watching_broadcast_accountid: int = betterproto.uint32_field(16)
    appid: int = betterproto.uint32_field(17)
    party_beacons: "list[PartyBeacon]" = betterproto.message_field(18)
    watching_broadcast_channel_id: int = betterproto.uint64_field(19)
    active_minigame_id: int = betterproto.uint64_field(20)
    avatar_ugc_url: str = betterproto.string_field(21)
    disabled: bool = betterproto.bool_field(22)


@dataclass(eq=False, repr=False)
class SummaryPair(betterproto.Message):
    user_chat_group_state: "ChatRoomGroupState" = betterproto.message_field(1)
    group_summary: "GetChatRoomGroupSummaryResponse" = betterproto.message_field(2)


class GetMyChatRoomGroupsResponse(UnifiedMessage, um_name="ChatRoom.GetMyChatRoomGroups"):
    chat_room_groups: "list[SummaryPair]" = betterproto.message_field(1)


class GetChatRoomGroupStateRequest(UnifiedMessage, um_name="ChatRoom.GetChatRoomGroupState"):
    chat_group_id: int = betterproto.uint64_field(1)


class GetChatRoomGroupStateResponse(UnifiedMessage, um_name="ChatRoom.GetChatRoomGroupState"):
    state: "GroupState" = betterproto.message_field(1)


class GetChatRoomGroupSummaryRequest(UnifiedMessage, um_name="ChatRoom.GetChatRoomGroupSummary"):
    chat_group_id: int = betterproto.uint64_field(1)


class SetAppChatRoomGroupForceActiveRequest(UnifiedMessage, um_name="ChatRoom.SetAppChatRoomGroupForceActive"):
    chat_group_id: int = betterproto.uint64_field(1)
    requesting_app_id: int = betterproto.uint32_field(2)


class SetAppChatRoomGroupForceActiveResponse(UnifiedMessage, um_name="ChatRoom.SetAppChatRoomGroupForceActive"):
    eresult: int = betterproto.uint32_field(1)
    accounts_in_channel: list[int] = betterproto.uint32_field(2)


class SetAppChatRoomGroupStopForceActiveNotification(
    UnifiedMessage, um_name="ChatRoom.SetAppChatRoomGroupStopForceActive"
):
    chat_group_id: int = betterproto.uint64_field(1)
    requesting_app_id: int = betterproto.uint32_field(2)


class AckChatMessageNotification(UnifiedMessage, um_name="ChatRoom.AckChatMessage"):
    chat_group_id: int = betterproto.uint64_field(1)
    chat_id: int = betterproto.uint64_field(2)
    timestamp: int = betterproto.uint32_field(3)


class CreateInviteLinkRequest(UnifiedMessage, um_name="ChatRoom.CreateInviteLink"):
    chat_group_id: int = betterproto.uint64_field(1)
    seconds_valid: int = betterproto.uint32_field(2)
    chat_id: int = betterproto.uint64_field(3)


class CreateInviteLinkResponse(UnifiedMessage, um_name="ChatRoom.CreateInviteLink"):
    invite_code: str = betterproto.string_field(1)
    seconds_valid: int = betterproto.uint32_field(2)


class GetInviteLinkInfoRequest(UnifiedMessage, um_name="ChatRoom.GetInviteLinkInfo"):
    invite_code: str = betterproto.string_field(1)


class GetInviteLinkInfoResponse(UnifiedMessage, um_name="ChatRoom.GetInviteLinkInfo"):
    steamid_sender: int = betterproto.fixed64_field(3)
    time_expires: int = betterproto.uint32_field(4)
    chat_id: int = betterproto.uint64_field(6)
    group_summary: "GetChatRoomGroupSummaryResponse" = betterproto.message_field(8)
    user_chat_group_state: "ChatRoomGroupState" = betterproto.message_field(9)
    time_kick_expire: int = betterproto.uint32_field(10)
    banned: bool = betterproto.bool_field(11)


class GetInviteInfoRequest(UnifiedMessage, um_name="ChatRoom.GetInviteInfo"):
    steamid_invitee: int = betterproto.fixed64_field(1)
    chat_group_id: int = betterproto.uint64_field(2)
    chat_id: int = betterproto.uint64_field(3)
    invite_code: str = betterproto.string_field(4)


class GetInviteInfoResponse(UnifiedMessage, um_name="ChatRoom.GetInviteInfo"):
    group_summary: "GetChatRoomGroupSummaryResponse" = betterproto.message_field(1)
    time_kick_expire: int = betterproto.uint32_field(2)
    banned: bool = betterproto.bool_field(3)


class GetInviteLinksForGroupRequest(UnifiedMessage, um_name="ChatRoom.GetInviteLinksForGroup"):
    chat_group_id: int = betterproto.uint64_field(1)


class GetInviteLinksForGroupResponse(UnifiedMessage, um_name="ChatRoom.GetInviteLinksForGroup"):
    invite_links: "list[GetInviteLinksForGroupResponseLinkInfo]" = betterproto.message_field(1)


@dataclass(eq=False, repr=False)
class GetInviteLinksForGroupResponseLinkInfo(betterproto.Message):
    invite_code: str = betterproto.string_field(1)
    steamid_creator: int = betterproto.fixed64_field(2)
    time_expires: int = betterproto.uint32_field(3)
    chat_id: int = betterproto.uint64_field(4)


class GetBanListRequest(UnifiedMessage, um_name="ChatRoom.GetBanList"):
    chat_group_id: int = betterproto.uint64_field(1)


class GetBanListResponse(UnifiedMessage, um_name="ChatRoom.GetBanList"):
    bans: "list[GetBanListResponseBanInfo]" = betterproto.message_field(1)


@dataclass(eq=False, repr=False)
class GetBanListResponseBanInfo(betterproto.Message):
    accountid: int = betterproto.uint32_field(1)
    accountid_actor: int = betterproto.uint32_field(2)
    time_banned: int = betterproto.uint32_field(3)
    ban_reason: str = betterproto.string_field(4)


class GetInviteListRequest(UnifiedMessage, um_name="ChatRoom.GetInviteList"):
    chat_group_id: int = betterproto.uint64_field(1)


@dataclass(eq=False, repr=False)
class GroupInvite(betterproto.Message):
    accountid: int = betterproto.uint32_field(1)
    accountid_actor: int = betterproto.uint32_field(2)
    time_invited: int = betterproto.uint32_field(3)


class GetInviteListResponse(UnifiedMessage, um_name="ChatRoom.GetInviteList"):
    invites: "list[GroupInvite]" = betterproto.message_field(1)


class DeleteInviteLinkRequest(UnifiedMessage, um_name="ChatRoom.DeleteInviteLink"):
    chat_group_id: int = betterproto.uint64_field(1)
    invite_code: str = betterproto.string_field(2)


class DeleteInviteLinkResponse(UnifiedMessage, um_name="ChatRoom.DeleteInviteLink"):
    pass


class SetSessionActiveChatRoomGroupsRequest(UnifiedMessage, um_name="ChatRoom.SetSessionActiveChatRoomGroups"):
    chat_group_ids: list[int] = betterproto.uint64_field(1)
    chat_groups_data_requested: list[int] = betterproto.uint64_field(2)
    virtualize_members_threshold: int = betterproto.int32_field(3)


class SetSessionActiveChatRoomGroupsResponse(UnifiedMessage, um_name="ChatRoom.SetSessionActiveChatRoomGroups"):
    chat_states: "list[GroupState]" = betterproto.message_field(1)
    virtualize_members_chat_group_ids: list[int] = betterproto.uint64_field(2)


class SetUserChatGroupPreferencesRequest(UnifiedMessage, um_name="ChatRoom.SetUserChatGroupPreferences"):
    chat_group_id: int = betterproto.uint64_field(1)
    chat_group_preferences: "SetUserChatGroupPreferencesRequestChatGroupPreferences" = betterproto.message_field(2)
    chat_room_preferences: "list[SetUserChatGroupPreferencesRequestChatRoomPreferences]" = betterproto.message_field(3)


@dataclass(eq=False, repr=False)
class SetUserChatGroupPreferencesRequestChatGroupPreferences(betterproto.Message):
    desktop_notification_level: "EChatRoomNotificationLevel" = betterproto.enum_field(1)
    mobile_notification_level: "EChatRoomNotificationLevel" = betterproto.enum_field(2)
    unread_indicator_muted: bool = betterproto.bool_field(3)


@dataclass(eq=False, repr=False)
class SetUserChatGroupPreferencesRequestChatRoomPreferences(betterproto.Message):
    chat_id: int = betterproto.uint64_field(1)
    desktop_notification_level: "EChatRoomNotificationLevel" = betterproto.enum_field(2)
    mobile_notification_level: "EChatRoomNotificationLevel" = betterproto.enum_field(3)
    unread_indicator_muted: bool = betterproto.bool_field(4)


class SetUserChatGroupPreferencesResponse(UnifiedMessage, um_name="ChatRoom.SetUserChatGroupPreferences"):
    pass


class DeleteChatMessagesRequest(UnifiedMessage, um_name="ChatRoom.DeleteChatMessages"):
    chat_group_id: int = betterproto.uint64_field(1)
    chat_id: int = betterproto.uint64_field(2)
    messages: "list[DeleteChatMessagesRequestMessage]" = betterproto.message_field(3)


@dataclass(eq=False, repr=False)
class DeleteChatMessagesRequestMessage(betterproto.Message):
    server_timestamp: int = betterproto.uint32_field(1)
    ordinal: int = betterproto.uint32_field(2)


class DeleteChatMessagesResponse(UnifiedMessage, um_name="ChatRoom.DeleteChatMessages"):
    pass


class UpdateMemberListViewNotification(UnifiedMessage, um_name="ChatRoom.UpdateMemberListView"):
    chat_group_id: int = betterproto.uint64_field(1)
    view_id: int = betterproto.uint64_field(2)
    start: int = betterproto.int32_field(3)
    end: int = betterproto.int32_field(4)
    client_changenumber: int = betterproto.int32_field(5)
    delete_view: bool = betterproto.bool_field(6)
    persona_subscribe_accountids: list[int] = betterproto.int32_field(7)
    persona_unsubscribe_accountids: list[int] = betterproto.int32_field(8)


class SearchMembersRequest(UnifiedMessage, um_name="ChatRoom.SearchMembers"):
    chat_group_id: int = betterproto.uint64_field(1)
    search_id: int = betterproto.uint64_field(2)
    search_text: str = betterproto.string_field(3)
    max_results: int = betterproto.int32_field(4)


class SearchMembersResponse(UnifiedMessage, um_name="ChatRoom.SearchMembers"):
    matching_members: "list[SearchMembersResponseMemberMatch]" = betterproto.message_field(1)
    status_flags: int = betterproto.uint32_field(2)


@dataclass(eq=False, repr=False)
class SearchMembersResponseMemberMatch(betterproto.Message):
    accountid: int = betterproto.int32_field(1)
    persona: CMsgClientPersonaStateFriend = betterproto.message_field(2)


class UpdateMessageReactionRequest(UnifiedMessage, um_name="ChatRoom.UpdateMessageReaction"):
    chat_group_id: int = betterproto.uint64_field(1)
    chat_id: int = betterproto.uint64_field(2)
    server_timestamp: int = betterproto.uint32_field(3)
    ordinal: int = betterproto.uint32_field(4)
    reaction_type: "EChatRoomMessageReactionType" = betterproto.enum_field(5)
    reaction: str = betterproto.string_field(6)
    is_add: bool = betterproto.bool_field(7)


class UpdateMessageReactionResponse(UnifiedMessage, um_name="ChatRoom.UpdateMessageReaction"):
    num_reactors: int = betterproto.uint32_field(1)


class GetMessageReactionReactorsRequest(UnifiedMessage, um_name="ChatRoom.GetMessageReactionReactors"):
    chat_group_id: int = betterproto.uint64_field(1)
    chat_id: int = betterproto.uint64_field(2)
    server_timestamp: int = betterproto.uint32_field(3)
    ordinal: int = betterproto.uint32_field(4)
    reaction_type: "EChatRoomMessageReactionType" = betterproto.enum_field(5)
    reaction: str = betterproto.string_field(6)
    limit: int = betterproto.uint32_field(7)


class GetMessageReactionReactorsResponse(UnifiedMessage, um_name="ChatRoom.GetMessageReactionReactors"):
    reactors: list[int] = betterproto.uint32_field(1)


class GetClanChatRoomInfoRequest(UnifiedMessage, um_name="ClanChatRooms.GetClanChatRoomInfo"):
    steamid: int = betterproto.fixed64_field(1)
    autocreate: bool = betterproto.bool_field(2)


class GetClanChatRoomInfoResponse(UnifiedMessage, um_name="ClanChatRooms.GetClanChatRoomInfo"):
    chat_group_summary: "GetChatRoomGroupSummaryResponse" = betterproto.message_field(1)


class SetClanChatRoomPrivateRequest(UnifiedMessage, um_name="ClanChatRooms.SetClanChatRoomPrivate"):
    steamid: int = betterproto.fixed64_field(1)
    chat_room_private: bool = betterproto.bool_field(2)


class SetClanChatRoomPrivateResponse(UnifiedMessage, um_name="ClanChatRooms.SetClanChatRoomPrivate"):
    chat_room_private: bool = betterproto.bool_field(1)


@dataclass(eq=False, repr=False)
class Mentions(betterproto.Message):
    mention_all: bool = betterproto.bool_field(1)
    mention_here: bool = betterproto.bool_field(2)
    ids: list[int] = betterproto.uint32_field(3)


class IncomingChatMessageNotification(UnifiedMessage, um_name="ChatRoomClient.NotifyIncomingChatMessage"):
    chat_group_id: int = betterproto.uint64_field(1)
    chat_id: int = betterproto.uint64_field(2)
    steamid_sender: int = betterproto.fixed64_field(3)
    message: str = betterproto.string_field(4)
    timestamp: int = betterproto.uint32_field(5)
    mentions: "Mentions" = betterproto.message_field(6)
    ordinal: int = betterproto.uint32_field(7)
    server_message: "ServerMessage" = betterproto.message_field(8)
    message_no_bbcode: str = betterproto.string_field(9)
    chat_name: str = betterproto.string_field(10)


class ChatMessageModifiedNotification(UnifiedMessage, um_name="ChatRoomClient.NotifyChatMessageModified"):
    chat_group_id: int = betterproto.uint64_field(1)
    chat_id: int = betterproto.uint64_field(2)
    messages: "list[ChatMessageModifiedNotificationChatMessage]" = betterproto.message_field(3)


@dataclass(eq=False, repr=False)
class ChatMessageModifiedNotificationChatMessage(betterproto.Message):
    server_timestamp: int = betterproto.uint32_field(1)
    ordinal: int = betterproto.uint32_field(2)
    deleted: bool = betterproto.bool_field(3)


class MemberStateChangeNotification(UnifiedMessage, um_name="ChatRoomClient.NotifyMemberStateChange"):
    chat_group_id: int = betterproto.uint64_field(1)
    member: "Member" = betterproto.message_field(2)
    change: "EChatRoomMemberStateChange" = betterproto.enum_field(3)


class ChatRoomHeaderStateNotification(UnifiedMessage, um_name="ChatRoomClient.NotifyChatRoomHeaderStateChange"):
    header_state: "GroupHeaderState" = betterproto.message_field(1)


class ChatRoomGroupRoomsChangeNotification(UnifiedMessage, um_name="ChatRoomClient.NotifyChatRoomGroupRoomsChange"):
    chat_group_id: int = betterproto.uint64_field(1)
    default_chat_id: int = betterproto.uint64_field(2)
    chat_rooms: "list[State]" = betterproto.message_field(3)


class NotifyShouldRejoinChatRoomVoiceChatNotification(
    UnifiedMessage, um_name="ChatRoomClient.NotifyShouldRejoinChatRoomVoiceChat"
):
    chat_id: int = betterproto.uint64_field(1)
    chat_group_id: int = betterproto.uint64_field(2)


class NotifyChatGroupUserStateChangedNotification(
    UnifiedMessage, um_name="ChatRoomClient.NotifyChatGroupUserStateChanged"
):
    chat_group_id: int = betterproto.uint64_field(1)
    user_chat_group_state: "ChatRoomGroupState" = betterproto.message_field(2)
    group_summary: "GetChatRoomGroupSummaryResponse" = betterproto.message_field(3)
    user_action: "EChatRoomMemberStateChange" = betterproto.enum_field(4)


class NotifyChatRoomDisconnectNotification(UnifiedMessage, um_name="ChatRoomClient.NotifyChatRoomDisconnect"):
    chat_group_ids: list[int] = betterproto.uint64_field(1)


@dataclass(eq=False, repr=False)
class MemberListView(betterproto.Message):
    start: int = betterproto.int32_field(3)
    end: int = betterproto.int32_field(4)
    total_count: int = betterproto.int32_field(5)
    client_changenumber: int = betterproto.int32_field(6)
    server_changenumber: int = betterproto.int32_field(7)


@dataclass(eq=False, repr=False)
class MemberSummaryCounts(betterproto.Message):
    ingame: int = betterproto.int32_field(1)
    online: int = betterproto.int32_field(2)
    offline: int = betterproto.int32_field(3)


class MemberListViewUpdatedNotification(UnifiedMessage, um_name="ChatRoomClient.NotifyMemberListViewUpdated"):
    chat_group_id: int = betterproto.uint64_field(1)
    view_id: int = betterproto.uint64_field(2)
    view: "MemberListView" = betterproto.message_field(3)
    members: "list[MemberListViewUpdatedNotificationMemberListViewEntry]" = betterproto.message_field(4)
    status_flags: int = betterproto.uint32_field(5)
    member_summary: "MemberSummaryCounts" = betterproto.message_field(6)
    subscribed_personas: list[CMsgClientPersonaStateFriend] = betterproto.message_field(7)


@dataclass(eq=False, repr=False)
class MemberListViewUpdatedNotificationMemberListViewEntry(betterproto.Message):
    rank: int = betterproto.int32_field(1)
    accountid: int = betterproto.uint32_field(2)
    persona: CMsgClientPersonaStateFriend = betterproto.message_field(3)


class MessageReactionNotification(UnifiedMessage, um_name="ChatRoomClient.NotifyMessageReaction"):
    chat_group_id: int = betterproto.uint64_field(1)
    chat_id: int = betterproto.uint64_field(2)
    server_timestamp: int = betterproto.uint32_field(3)
    ordinal: int = betterproto.uint32_field(4)
    reactor: int = betterproto.fixed64_field(5)
    reaction_type: "EChatRoomMessageReactionType" = betterproto.enum_field(6)
    reaction: str = betterproto.string_field(7)
    is_add: bool = betterproto.bool_field(8)


@dataclass(eq=False, repr=False)
class UsabilityClientUsabilityMetricsNotification(betterproto.Message):
    metrics_run_id: int = betterproto.uint32_field(1)
    client_build: int = betterproto.uint32_field(2)
    metrics_version: int = betterproto.uint32_field(3)
    in_web: bool = betterproto.bool_field(4)
    settings: "UsabilityClientUsabilityMetricsNotificationSettings" = betterproto.message_field(10)
    voice_settings: "UsabilityClientUsabilityMetricsNotificationVoiceSettings" = betterproto.message_field(11)
    ui_state: "UsabilityClientUsabilityMetricsNotificationUiState" = betterproto.message_field(12)
    metrics: "UsabilityClientUsabilityMetricsNotificationMetrics" = betterproto.message_field(13)


@dataclass(eq=False, repr=False)
class UsabilityClientUsabilityMetricsNotificationSettings(betterproto.Message):
    notifications_show_ingame: bool = betterproto.bool_field(1)
    notifications_show_online: bool = betterproto.bool_field(2)
    notifications_show_message: bool = betterproto.bool_field(3)
    notifications_events_and_announcements: bool = betterproto.bool_field(4)
    sounds_play_ingame: bool = betterproto.bool_field(5)
    sounds_play_online: bool = betterproto.bool_field(6)
    sounds_play_message: bool = betterproto.bool_field(7)
    sounds_events_and_announcements: bool = betterproto.bool_field(8)
    always_new_chat_window: bool = betterproto.bool_field(9)
    force_alphabetic_friend_sorting: bool = betterproto.bool_field(10)
    chat_flash_mode: int = betterproto.int32_field(11)
    remember_open_chats: bool = betterproto.bool_field(12)
    compact_quick_access: bool = betterproto.bool_field(13)
    compact_friends_list: bool = betterproto.bool_field(14)
    notifications_show_chat_room_notification: bool = betterproto.bool_field(15)
    sounds_play_chat_room_notification: bool = betterproto.bool_field(16)
    hide_offline_friends_in_tag_groups: bool = betterproto.bool_field(17)
    hide_categorized_friends: bool = betterproto.bool_field(18)
    categorize_in_game_friends_by_game: bool = betterproto.bool_field(19)
    chat_font_size: int = betterproto.int32_field(20)
    use24_hour_clock: bool = betterproto.bool_field(21)
    do_not_disturb_mode: bool = betterproto.bool_field(22)
    disable_embed_inlining: bool = betterproto.bool_field(23)
    sign_into_friends: bool = betterproto.bool_field(24)
    animated_avatars: bool = betterproto.bool_field(25)


@dataclass(eq=False, repr=False)
class UsabilityClientUsabilityMetricsNotificationVoiceSettings(betterproto.Message):
    voice_input_gain: float = betterproto.float_field(1)
    voice_output_gain: float = betterproto.float_field(2)
    noise_gate_level: int = betterproto.int32_field(3)
    voice_use_echo_cancellation: bool = betterproto.bool_field(4)
    voice_use_noise_cancellation: bool = betterproto.bool_field(5)
    voice_use_auto_gain_control: bool = betterproto.bool_field(6)
    selected_non_default_mic: bool = betterproto.bool_field(7)
    selected_non_default_output: bool = betterproto.bool_field(8)
    push_to_talk_enabled: bool = betterproto.bool_field(9)
    push_to_mute_enabled: bool = betterproto.bool_field(10)
    play_ptt_sounds: bool = betterproto.bool_field(11)


@dataclass(eq=False, repr=False)
class UsabilityClientUsabilityMetricsNotificationUiState(betterproto.Message):
    friends_list_height: int = betterproto.int32_field(1)
    friends_list_width: int = betterproto.int32_field(2)
    friends_list_docked: bool = betterproto.bool_field(3)
    friends_list_collapsed: bool = betterproto.bool_field(4)
    friends_list_group_chats_height: int = betterproto.int32_field(5)
    friends_list_visible: bool = betterproto.bool_field(6)
    chat_popups_opened: int = betterproto.int32_field(7)
    group_chat_tabs_opened: int = betterproto.int32_field(8)
    friend_chat_tabs_opened: int = betterproto.int32_field(9)
    chat_window_width: int = betterproto.int32_field(10)
    chat_window_height: int = betterproto.int32_field(11)
    category_collapse: "UsabilityClientUsabilityMetricsNotificationUiStateCategoryCollapseState" = (
        betterproto.message_field(12)
    )
    group_chat_left_col_collapsed: int = betterproto.int32_field(13)
    group_chat_right_col_collapsed: int = betterproto.int32_field(14)
    in_one_on_one_voice_chat: bool = betterproto.bool_field(15)
    in_group_voice_chat: bool = betterproto.bool_field(16)


@dataclass(eq=False, repr=False)
class UsabilityClientUsabilityMetricsNotificationUiStateCategoryCollapseState(betterproto.Message):
    in_game_collapsed: bool = betterproto.bool_field(1)
    online_collapsed: bool = betterproto.bool_field(2)
    offline_collapsed: bool = betterproto.bool_field(3)
    game_groups_collapsed: int = betterproto.int32_field(4)
    categories_collapsed: int = betterproto.int32_field(5)


@dataclass(eq=False, repr=False)
class UsabilityClientUsabilityMetricsNotificationMetrics(betterproto.Message):
    friends_count: int = betterproto.int32_field(1)
    friends_category_count: int = betterproto.int32_field(2)
    friends_categorized_count: int = betterproto.int32_field(3)
    friends_online_count: int = betterproto.int32_field(4)
    friends_in_game_count: int = betterproto.int32_field(5)
    friends_in_game_singleton_count: int = betterproto.int32_field(6)
    game_group_count: int = betterproto.int32_field(7)
    friends_favorite_count: int = betterproto.int32_field(8)
    group_chat_count: int = betterproto.int32_field(9)
    group_chat_favorite_count: int = betterproto.int32_field(10)


@dataclass(eq=False, repr=False)
class UsabilityRequestClientUsabilityMetricsNotification(betterproto.Message):
    metrics_run_id: int = betterproto.uint32_field(1)
