"use strict";
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
//   protoc-gen-ts_proto  v2.7.0
//   protoc               v5.27.1
// source: data.proto
Object.defineProperty(exports, "__esModule", { value: true });
exports.Gift_CrossScreenEffectInfo_ActionEffectIdsEntry = exports.Gift_CrossScreenEffectInfo_SingleActionEffectIdsEntry = exports.Gift_CrossScreenEffectInfo = exports.Gift_BatchGiftInfo = exports.Gift_GiftPanelBanner = exports.Gift = exports.BadgeStruct_PaddingInfo = exports.BadgeStruct_StringBadge = exports.BadgeStruct_IconConfig = exports.BadgeStruct_TextBadge = exports.BadgeStruct_ImageBadge = exports.BadgeStruct_CombineBadgeBackground = exports.BadgeStruct_ProfileCardPanel = exports.BadgeStruct_NumberConfig = exports.BadgeStruct_ProjectionConfig = exports.BadgeStruct_ProfileContent = exports.BadgeStruct_ArrowConfig = exports.BadgeStruct_CombineBadge = exports.BadgeStruct = exports.Image_Content = exports.Image = exports.Text_PatternRef = exports.Text_TextPieceUser = exports.Text_TextPiecePatternRef = exports.Text_TextPieceGift = exports.Text_TextFormat = exports.Text_TextPiece = exports.Text = exports.CommonMessageData_LiveMessageID = exports.CommonMessageData_LiveMessageSEI = exports.CommonMessageData = exports.Emote_AuditInfo_AuditTaskType = exports.User_FansClub_FansClubData_UserFansClubStatus = exports.User_FansClub_FansClubData_BadgeIcon = exports.User_FansClub_PreferntialType = exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreBrandLabelType = exports.User_EcommerceEntrance_EntranceType = exports.User_EcommerceEntrance_CreatorType = exports.User_LiveEventInfo_EventPayMethod = exports.BadgeStruct_VerticalPaddingRule = exports.BadgeStruct_HorizontalPaddingRule = exports.BadgeStruct_Position = exports.BadgeStruct_BadgeExhibitionType = exports.BadgeStruct_DisplayStatus = exports.BadgeStruct_BadgeSceneType = exports.BadgeStruct_BadgePriorityType = exports.BadgeStruct_BadgeDisplayType = exports.Text_ShowType = exports.CommonMessageData_IMDispatchStrategy = exports.protobufPackage = void 0;
exports.TikTokColor = exports.Ranking = exports.LiveStreamGoalIndicator = exports.LiveStreamGoal_GoalStats_GoalComparison = exports.LiveStreamGoal_GoalStats = exports.LiveStreamGoal_LiveStreamGoalContributor_SubGoalContribution = exports.LiveStreamGoal_LiveStreamGoalContributor = exports.LiveStreamGoal_LiveStreamSubGoalGift = exports.LiveStreamGoal_LiveStreamSubGoal_SubGoalPinInfo = exports.LiveStreamGoal_LiveStreamSubGoal = exports.LiveStreamGoal_AuditInfo = exports.LiveStreamGoal = exports.UserIdentity = exports.MsgFilter = exports.PunishEventInfo = exports.Emote_EmoteUploadInfo = exports.Emote_AuditInfo = exports.Emote = exports.User_UserStats = exports.User_UserAttr = exports.User_SubscribeInfo = exports.User_SubscribeBadge = exports.User_PayGrade = exports.User_OwnRoom = exports.User_FollowInfo = exports.User_FansClubInfo = exports.User_FansClub_FansClubData = exports.User_FansClub = exports.User_EcommerceEntrance_ShowcaseEntranceInfo = exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreOfficialLabel_ShopLabelImage = exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreOfficialLabel = exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel = exports.User_EcommerceEntrance_ShopEntranceInfo = exports.User_EcommerceEntrance = exports.User_ComboBadgeInfo = exports.User_Border = exports.User_AuthorStats = exports.User_AuthenticationInfo = exports.User_AnchorLevel = exports.User_ActivityInfo = exports.User_LiveEventInfo_WalletPackage = exports.User_LiveEventInfo = exports.User = exports.Gift_GiftBoxInfo = exports.Gift_GiftSkinToGiftTextsInfo = exports.Gift_GiftText = exports.Gift_GiftSkin = exports.Gift_UGGiftStructInfo = exports.Gift_GiftSponsorInfo = exports.Gift_CrossScreenEffectInfo_ReactionEffectIdsEntry = void 0;
exports.LinkerWaitingListChangeContent = exports.LinkerUpdateUserSettingContent = exports.LinkerUpdateUserContent_UpdateInfoEntry = exports.LinkerUpdateUserContent = exports.LinkmicUserToastContent = exports.LinkerSysKickOutContent = exports.LinkerSetting = exports.LinkerReplyContent_LinkmicInfo = exports.LinkerReplyContent = exports.LinkerRandomMatchContent = exports.LinkerMuteContent = exports.LinkerMicIdxUpdateContent = exports.LinkerMediaChangeContent_LinkerMediaChangeOperator = exports.LinkerMediaChangeContent = exports.LinkerListChangeContent = exports.CohostListChangeContent = exports.LinkerLinkedListChangeContent = exports.LinkerLeaveContent = exports.LinkerKickOutContent = exports.CohostTopic = exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_OptPairInfo_OptPairUser = exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_OptPairInfo = exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_Hashtag = exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_AuthenticationInfo = exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra = exports.LinkerInviteContent_LinkerInviteMessageExtra = exports.LinkerInviteContent_CohostABTestSetting_CohostABTestList_CohostABTest = exports.LinkerInviteContent_CohostABTestSetting_CohostABTestList = exports.LinkerInviteContent_CohostABTestSetting = exports.LinkerInviteContent_PerceptionDialogInfo_PerceptionFeedbackOption = exports.LinkerInviteContent_PerceptionDialogInfo = exports.LinkerInviteContent_LinkmicUserInfo = exports.LinkerInviteContent_InviteTopHostInfo = exports.LinkerInviteContent_RtcExtInfoMapEntry = exports.LinkerInviteContent = exports.LinkerEnterContent = exports.LinkerCreateContent = exports.LinkerCloseContent = exports.ListUser = exports.LinkerCancelContent = exports.LinkerAcceptNoticeContent = exports.FanTicketRoomNoticeContent = exports.UserFanTicket = exports.PollUpdateVotesContent = exports.VoteUser = exports.PollOptionInfo = exports.PollEndContent = exports.PollStartContent = exports.TimeStampContainer = exports.ValueLabel = void 0;
exports.BusinessContent_PermitJoinGroupBizContent = exports.BusinessContent_CohostContent = exports.BusinessContent = exports.GroupChangeContent = exports.P2PGroupChangeContent = exports.CancelJoinGroupContent = exports.MigrationDetails = exports.PermitJoinGroupContent = exports.LeaveJoinGroupContent = exports.JoinDirectContent = exports.FinishChannelContent = exports.LeaveContent = exports.CancelInviteContent = exports.CancelApplyContent = exports.PosIdentity = exports.KickOutContent = exports.ReplyInviteContent = exports.PermitApplyContent = exports.ApplyContent = exports.InviteContent = exports.MultiLiveContent_KickOutBizContent = exports.MultiLiveContent_PermitBizContent = exports.MultiLiveContent_ReplyBizContent = exports.MultiLiveContent_InviteBizContent = exports.MultiLiveContent_JoinDirectBizContent = exports.MultiLiveContent_ApplyBizContent = exports.MultiLiveContent = exports.MicPositionData = exports.ContentPosition = exports.ListChangeContent = exports.CreateChannelContent = exports.RTCExtraInfo_RTCBitrateMap = exports.RTCExtraInfo_RTCVideoParam = exports.RTCExtraInfo_RTCLiveVideoParam = exports.RTCExtraInfo_RTCEngineConfig = exports.RTCExtraInfo_RTCOther = exports.RTCExtraInfo_RTCInfoExtra = exports.RTCExtraInfo_ByteRTCExtInfo = exports.RTCExtraInfo_RTCMixBase = exports.RTCExtraInfo = exports.GroupChannelUser = exports.GroupChannelAllUser = exports.DSLConfig = exports.GroupPlayer = exports.LinkPosition = exports.Position = exports.LinkLayerListUser = exports.AllListUser = exports.Player = exports.MultiLiveAnchorPanelSettings = void 0;
exports.HighScoreControlCfg = exports.BattleUserArmy = exports.BattleUserArmies = exports.BattleTeamUserArmies = exports.BattleSetting = exports.BattleTeamUser = exports.GiftModeMeta = exports.PublicAreaMessageCommon_UserInteractionInfo = exports.PublicAreaMessageCommon_PortraitInfo = exports.PublicAreaMessageCommon_PortraitTag = exports.PublicAreaMessageCommon_UserMetrics = exports.PublicAreaMessageCommon_CreatorSuccessInfo = exports.PublicAreaMessageCommon_Topic = exports.PublicAreaMessageCommon_TagItem = exports.PublicAreaMessageCommon = exports.PublicAreaCommon = exports.Author = exports.FansClubData_UserBadge_IconsEntry = exports.FansClubData_UserBadge = exports.FansClubData = exports.FansClubMember_PreferDataEntry = exports.FansClubMember = exports.BorderInfo = exports.GradeIcon = exports.UserHonor = exports.FontStyle = exports.PrivilegeLogExtra = exports.JoinGroupContent = exports.BusinessContent_TopHostInfo = exports.BusinessContent_Hashtag = exports.BusinessContent_JoinGroupMessageExtra_RivalExtra_AuthenticationInfo = exports.BusinessContent_JoinGroupMessageExtra_RivalExtra = exports.BusinessContent_JoinGroupMessageExtra = exports.BusinessContent_PerceptionFeedbackOption = exports.BusinessContent_PerceptionDialogInfo = exports.BusinessContent_Tag = exports.BusinessContent_JoinGroupBizContent_TagV2_SimilarInterestContent = exports.BusinessContent_JoinGroupBizContent_TagV2_SecondDegreeRelationContent = exports.BusinessContent_JoinGroupBizContent_TagV2_UserInfo = exports.BusinessContent_JoinGroupBizContent_TagV2 = exports.BusinessContent_JoinGroupBizContent_RivalsGameTag = exports.BusinessContent_JoinGroupBizContent = exports.BusinessContent_CohostUserInfo_CohostStreamConfig = exports.BusinessContent_CohostUserInfo = exports.BusinessContent_ListChangeBizContent_VirtualWaitingUser = exports.BusinessContent_ListChangeBizContent_UserInfosEntry = exports.BusinessContent_ListChangeBizContent = void 0;
/* eslint-disable */
const wire_1 = require("@bufbuild/protobuf/wire");
exports.protobufPackage = "";
var CommonMessageData_IMDispatchStrategy;
(function (CommonMessageData_IMDispatchStrategy) {
    CommonMessageData_IMDispatchStrategy[CommonMessageData_IMDispatchStrategy["IM_DISPATCH_STRATEGY_DEFAULT"] = 0] = "IM_DISPATCH_STRATEGY_DEFAULT";
    CommonMessageData_IMDispatchStrategy[CommonMessageData_IMDispatchStrategy["IM_DISPATCH_STRATEGY_BYPASS_DISPATCH_QUEUE"] = 1] = "IM_DISPATCH_STRATEGY_BYPASS_DISPATCH_QUEUE";
    CommonMessageData_IMDispatchStrategy[CommonMessageData_IMDispatchStrategy["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(CommonMessageData_IMDispatchStrategy = exports.CommonMessageData_IMDispatchStrategy || (exports.CommonMessageData_IMDispatchStrategy = {}));
var Text_ShowType;
(function (Text_ShowType) {
    Text_ShowType[Text_ShowType["SHOW_TYPE_NORMAL"] = 0] = "SHOW_TYPE_NORMAL";
    Text_ShowType[Text_ShowType["SHOW_TYPE_FADE_IN_OUT"] = 1] = "SHOW_TYPE_FADE_IN_OUT";
    Text_ShowType[Text_ShowType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(Text_ShowType = exports.Text_ShowType || (exports.Text_ShowType = {}));
var BadgeStruct_BadgeDisplayType;
(function (BadgeStruct_BadgeDisplayType) {
    BadgeStruct_BadgeDisplayType[BadgeStruct_BadgeDisplayType["BADGEDISPLAYTYPE_UNKNOWN"] = 0] = "BADGEDISPLAYTYPE_UNKNOWN";
    BadgeStruct_BadgeDisplayType[BadgeStruct_BadgeDisplayType["BADGEDISPLAYTYPE_IMAGE"] = 1] = "BADGEDISPLAYTYPE_IMAGE";
    BadgeStruct_BadgeDisplayType[BadgeStruct_BadgeDisplayType["BADGEDISPLAYTYPE_TEXT"] = 2] = "BADGEDISPLAYTYPE_TEXT";
    BadgeStruct_BadgeDisplayType[BadgeStruct_BadgeDisplayType["BADGEDISPLAYTYPE_STRING"] = 3] = "BADGEDISPLAYTYPE_STRING";
    BadgeStruct_BadgeDisplayType[BadgeStruct_BadgeDisplayType["BADGEDISPLAYTYPE_COMBINE"] = 4] = "BADGEDISPLAYTYPE_COMBINE";
    BadgeStruct_BadgeDisplayType[BadgeStruct_BadgeDisplayType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(BadgeStruct_BadgeDisplayType = exports.BadgeStruct_BadgeDisplayType || (exports.BadgeStruct_BadgeDisplayType = {}));
var BadgeStruct_BadgePriorityType;
(function (BadgeStruct_BadgePriorityType) {
    BadgeStruct_BadgePriorityType[BadgeStruct_BadgePriorityType["BADGE_PRIORITY_TYPE_UNKNOWN"] = 0] = "BADGE_PRIORITY_TYPE_UNKNOWN";
    BadgeStruct_BadgePriorityType[BadgeStruct_BadgePriorityType["BADGE_PRIORITY_TYPE_STRONG_RELATION"] = 10] = "BADGE_PRIORITY_TYPE_STRONG_RELATION";
    BadgeStruct_BadgePriorityType[BadgeStruct_BadgePriorityType["BADGE_PRIORITY_TYPE_PLATFORM"] = 20] = "BADGE_PRIORITY_TYPE_PLATFORM";
    BadgeStruct_BadgePriorityType[BadgeStruct_BadgePriorityType["BADGE_PRIORITY_TYPE_RELATION"] = 30] = "BADGE_PRIORITY_TYPE_RELATION";
    BadgeStruct_BadgePriorityType[BadgeStruct_BadgePriorityType["BADGE_PRIORITY_TYPE_ACTIVITY"] = 40] = "BADGE_PRIORITY_TYPE_ACTIVITY";
    BadgeStruct_BadgePriorityType[BadgeStruct_BadgePriorityType["BADGE_PRIORITY_TYPE_RANK_LIST"] = 50] = "BADGE_PRIORITY_TYPE_RANK_LIST";
    BadgeStruct_BadgePriorityType[BadgeStruct_BadgePriorityType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(BadgeStruct_BadgePriorityType = exports.BadgeStruct_BadgePriorityType || (exports.BadgeStruct_BadgePriorityType = {}));
var BadgeStruct_BadgeSceneType;
(function (BadgeStruct_BadgeSceneType) {
    BadgeStruct_BadgeSceneType[BadgeStruct_BadgeSceneType["BADGE_SCENE_TYPE_UNKNOWN"] = 0] = "BADGE_SCENE_TYPE_UNKNOWN";
    BadgeStruct_BadgeSceneType[BadgeStruct_BadgeSceneType["BADGE_SCENE_TYPE_ADMIN"] = 1] = "BADGE_SCENE_TYPE_ADMIN";
    BadgeStruct_BadgeSceneType[BadgeStruct_BadgeSceneType["BADGE_SCENE_TYPE_FIRST_RECHARGE"] = 2] = "BADGE_SCENE_TYPE_FIRST_RECHARGE";
    BadgeStruct_BadgeSceneType[BadgeStruct_BadgeSceneType["BADGE_SCENE_TYPE_FRIENDS"] = 3] = "BADGE_SCENE_TYPE_FRIENDS";
    BadgeStruct_BadgeSceneType[BadgeStruct_BadgeSceneType["BADGE_SCENE_TYPE_SUBSCRIBER"] = 4] = "BADGE_SCENE_TYPE_SUBSCRIBER";
    BadgeStruct_BadgeSceneType[BadgeStruct_BadgeSceneType["BADGE_SCENE_TYPE_ACTIVITY"] = 5] = "BADGE_SCENE_TYPE_ACTIVITY";
    BadgeStruct_BadgeSceneType[BadgeStruct_BadgeSceneType["BADGE_SCENE_TYPE_RANK_LIST"] = 6] = "BADGE_SCENE_TYPE_RANK_LIST";
    BadgeStruct_BadgeSceneType[BadgeStruct_BadgeSceneType["BADGE_SCENE_TYPE_NEW_SUBSCRIBER"] = 7] = "BADGE_SCENE_TYPE_NEW_SUBSCRIBER";
    BadgeStruct_BadgeSceneType[BadgeStruct_BadgeSceneType["BADGE_SCENE_TYPE_USER_GRADE"] = 8] = "BADGE_SCENE_TYPE_USER_GRADE";
    BadgeStruct_BadgeSceneType[BadgeStruct_BadgeSceneType["BADGE_SCENE_TYPE_STATE_CONTROLLED_MEDIA"] = 9] = "BADGE_SCENE_TYPE_STATE_CONTROLLED_MEDIA";
    BadgeStruct_BadgeSceneType[BadgeStruct_BadgeSceneType["BADGE_SCENE_TYPE_FANS"] = 10] = "BADGE_SCENE_TYPE_FANS";
    BadgeStruct_BadgeSceneType[BadgeStruct_BadgeSceneType["BADGE_SCENE_TYPE_LIVE_PRO"] = 11] = "BADGE_SCENE_TYPE_LIVE_PRO";
    BadgeStruct_BadgeSceneType[BadgeStruct_BadgeSceneType["BADGE_SCENE_TYPE_ANCHOR"] = 12] = "BADGE_SCENE_TYPE_ANCHOR";
    BadgeStruct_BadgeSceneType[BadgeStruct_BadgeSceneType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(BadgeStruct_BadgeSceneType = exports.BadgeStruct_BadgeSceneType || (exports.BadgeStruct_BadgeSceneType = {}));
var BadgeStruct_DisplayStatus;
(function (BadgeStruct_DisplayStatus) {
    BadgeStruct_DisplayStatus[BadgeStruct_DisplayStatus["DISPLAY_STATUS_NORMAL"] = 0] = "DISPLAY_STATUS_NORMAL";
    BadgeStruct_DisplayStatus[BadgeStruct_DisplayStatus["DISPLAY_STATUS_SHADOW"] = 1] = "DISPLAY_STATUS_SHADOW";
    BadgeStruct_DisplayStatus[BadgeStruct_DisplayStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(BadgeStruct_DisplayStatus = exports.BadgeStruct_DisplayStatus || (exports.BadgeStruct_DisplayStatus = {}));
var BadgeStruct_BadgeExhibitionType;
(function (BadgeStruct_BadgeExhibitionType) {
    BadgeStruct_BadgeExhibitionType[BadgeStruct_BadgeExhibitionType["BADGE_EXHIBITION_TYPE_BADGE"] = 0] = "BADGE_EXHIBITION_TYPE_BADGE";
    BadgeStruct_BadgeExhibitionType[BadgeStruct_BadgeExhibitionType["BADGE_EXHIBITION_TYPE_IDENTITY_LABEL"] = 1] = "BADGE_EXHIBITION_TYPE_IDENTITY_LABEL";
    BadgeStruct_BadgeExhibitionType[BadgeStruct_BadgeExhibitionType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(BadgeStruct_BadgeExhibitionType = exports.BadgeStruct_BadgeExhibitionType || (exports.BadgeStruct_BadgeExhibitionType = {}));
var BadgeStruct_Position;
(function (BadgeStruct_Position) {
    BadgeStruct_Position[BadgeStruct_Position["POSITIONUNKNOWN"] = 0] = "POSITIONUNKNOWN";
    BadgeStruct_Position[BadgeStruct_Position["POSITIONLEFT"] = 1] = "POSITIONLEFT";
    BadgeStruct_Position[BadgeStruct_Position["POSITIONRIGHT"] = 2] = "POSITIONRIGHT";
    BadgeStruct_Position[BadgeStruct_Position["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(BadgeStruct_Position = exports.BadgeStruct_Position || (exports.BadgeStruct_Position = {}));
var BadgeStruct_HorizontalPaddingRule;
(function (BadgeStruct_HorizontalPaddingRule) {
    BadgeStruct_HorizontalPaddingRule[BadgeStruct_HorizontalPaddingRule["HORIZONTAL_PADDING_RULE_USE_MIDDLE_AND_WIDTH"] = 0] = "HORIZONTAL_PADDING_RULE_USE_MIDDLE_AND_WIDTH";
    BadgeStruct_HorizontalPaddingRule[BadgeStruct_HorizontalPaddingRule["HORIZONTAL_PADDING_RULE_USE_LEFT_AND_MIDDLE_AND_RIGHT"] = 1] = "HORIZONTAL_PADDING_RULE_USE_LEFT_AND_MIDDLE_AND_RIGHT";
    BadgeStruct_HorizontalPaddingRule[BadgeStruct_HorizontalPaddingRule["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(BadgeStruct_HorizontalPaddingRule = exports.BadgeStruct_HorizontalPaddingRule || (exports.BadgeStruct_HorizontalPaddingRule = {}));
var BadgeStruct_VerticalPaddingRule;
(function (BadgeStruct_VerticalPaddingRule) {
    BadgeStruct_VerticalPaddingRule[BadgeStruct_VerticalPaddingRule["VERTICAL_PADDING_RULE_USE_DEFAULT"] = 0] = "VERTICAL_PADDING_RULE_USE_DEFAULT";
    BadgeStruct_VerticalPaddingRule[BadgeStruct_VerticalPaddingRule["VERTICAL_PADDING_RULE_USE_TOP_AND_BOTTOM"] = 1] = "VERTICAL_PADDING_RULE_USE_TOP_AND_BOTTOM";
    BadgeStruct_VerticalPaddingRule[BadgeStruct_VerticalPaddingRule["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(BadgeStruct_VerticalPaddingRule = exports.BadgeStruct_VerticalPaddingRule || (exports.BadgeStruct_VerticalPaddingRule = {}));
/**
 * @EventPayMethod
 * webcast.data.LiveEventInfo
 * C:\Users\ja\RiderProjects\TikTokProBufferGenerator\Application\output\sources\test.js
 */
var User_LiveEventInfo_EventPayMethod;
(function (User_LiveEventInfo_EventPayMethod) {
    User_LiveEventInfo_EventPayMethod[User_LiveEventInfo_EventPayMethod["EVENTPAYMETHODINVALID"] = 0] = "EVENTPAYMETHODINVALID";
    User_LiveEventInfo_EventPayMethod[User_LiveEventInfo_EventPayMethod["EVENTPAYMETHODCOINS"] = 1] = "EVENTPAYMETHODCOINS";
    User_LiveEventInfo_EventPayMethod[User_LiveEventInfo_EventPayMethod["EVENTPAYMETHODCASH"] = 2] = "EVENTPAYMETHODCASH";
    User_LiveEventInfo_EventPayMethod[User_LiveEventInfo_EventPayMethod["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(User_LiveEventInfo_EventPayMethod = exports.User_LiveEventInfo_EventPayMethod || (exports.User_LiveEventInfo_EventPayMethod = {}));
/**
 * @CreatorType
 * webcast.data.User.EcommerceEntrance
 * C:\Users\ja\RiderProjects\TikTokProBufferGenerator\Application\output\sources\test.js
 */
var User_EcommerceEntrance_CreatorType;
(function (User_EcommerceEntrance_CreatorType) {
    User_EcommerceEntrance_CreatorType[User_EcommerceEntrance_CreatorType["UNDEFINED"] = 0] = "UNDEFINED";
    User_EcommerceEntrance_CreatorType[User_EcommerceEntrance_CreatorType["OFFICIAL"] = 1] = "OFFICIAL";
    User_EcommerceEntrance_CreatorType[User_EcommerceEntrance_CreatorType["MARKET"] = 2] = "MARKET";
    User_EcommerceEntrance_CreatorType[User_EcommerceEntrance_CreatorType["NORMAL"] = 3] = "NORMAL";
    User_EcommerceEntrance_CreatorType[User_EcommerceEntrance_CreatorType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(User_EcommerceEntrance_CreatorType = exports.User_EcommerceEntrance_CreatorType || (exports.User_EcommerceEntrance_CreatorType = {}));
/**
 * @EntranceType
 * webcast.data.User.EcommerceEntrance
 * C:\Users\ja\RiderProjects\TikTokProBufferGenerator\Application\output\sources\test.js
 */
var User_EcommerceEntrance_EntranceType;
(function (User_EcommerceEntrance_EntranceType) {
    User_EcommerceEntrance_EntranceType[User_EcommerceEntrance_EntranceType["PROFILE"] = 0] = "PROFILE";
    User_EcommerceEntrance_EntranceType[User_EcommerceEntrance_EntranceType["SHOWCASE"] = 1] = "SHOWCASE";
    User_EcommerceEntrance_EntranceType[User_EcommerceEntrance_EntranceType["SHOP"] = 2] = "SHOP";
    User_EcommerceEntrance_EntranceType[User_EcommerceEntrance_EntranceType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(User_EcommerceEntrance_EntranceType = exports.User_EcommerceEntrance_EntranceType || (exports.User_EcommerceEntrance_EntranceType = {}));
/**
 * @StoreBrandLabelType
 * webcast.data.User.EcommerceEntrance.ShopEntranceInfo.StoreLabel
 * C:\Users\ja\RiderProjects\TikTokProBufferGenerator\Application\output\sources\test.js
 */
var User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreBrandLabelType;
(function (User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreBrandLabelType) {
    User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreBrandLabelType[User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreBrandLabelType["NONE"] = 0] = "NONE";
    User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreBrandLabelType[User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreBrandLabelType["OFFICIAL"] = 1] = "OFFICIAL";
    User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreBrandLabelType[User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreBrandLabelType["AUTHORIZED"] = 2] = "AUTHORIZED";
    User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreBrandLabelType[User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreBrandLabelType["STORE_BRAND_LABEL_TYPE_BLUE_V"] = 3] = "STORE_BRAND_LABEL_TYPE_BLUE_V";
    User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreBrandLabelType[User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreBrandLabelType["STORE_BRAND_LABEL_TYPE_TOP_CHOICE"] = 4] = "STORE_BRAND_LABEL_TYPE_TOP_CHOICE";
    User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreBrandLabelType[User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreBrandLabelType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreBrandLabelType = exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreBrandLabelType || (exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreBrandLabelType = {}));
/**
 * @PreferntialType
 * webcast.data.User.FansClub
 * C:\Users\ja\RiderProjects\TikTokProBufferGenerator\Application\output\sources\test.js
 */
var User_FansClub_PreferntialType;
(function (User_FansClub_PreferntialType) {
    User_FansClub_PreferntialType[User_FansClub_PreferntialType["PRESONALPROFILE"] = 0] = "PRESONALPROFILE";
    User_FansClub_PreferntialType[User_FansClub_PreferntialType["OTHERROOM"] = 1] = "OTHERROOM";
    User_FansClub_PreferntialType[User_FansClub_PreferntialType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(User_FansClub_PreferntialType = exports.User_FansClub_PreferntialType || (exports.User_FansClub_PreferntialType = {}));
/**
 * @BadgeIcon
 * webcast.data.User.FansClub.FansClubData
 * C:\Users\ja\RiderProjects\TikTokProBufferGenerator\Application\output\sources\test.js
 */
var User_FansClub_FansClubData_BadgeIcon;
(function (User_FansClub_FansClubData_BadgeIcon) {
    User_FansClub_FansClubData_BadgeIcon[User_FansClub_FansClubData_BadgeIcon["UNKNOWN"] = 0] = "UNKNOWN";
    User_FansClub_FansClubData_BadgeIcon[User_FansClub_FansClubData_BadgeIcon["ICON"] = 1] = "ICON";
    User_FansClub_FansClubData_BadgeIcon[User_FansClub_FansClubData_BadgeIcon["SMALLICON"] = 2] = "SMALLICON";
    User_FansClub_FansClubData_BadgeIcon[User_FansClub_FansClubData_BadgeIcon["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(User_FansClub_FansClubData_BadgeIcon = exports.User_FansClub_FansClubData_BadgeIcon || (exports.User_FansClub_FansClubData_BadgeIcon = {}));
/**
 * @UserFansClubStatus
 * webcast.data.User.FansClub.FansClubData
 * C:\Users\ja\RiderProjects\TikTokProBufferGenerator\Application\output\sources\test.js
 */
var User_FansClub_FansClubData_UserFansClubStatus;
(function (User_FansClub_FansClubData_UserFansClubStatus) {
    User_FansClub_FansClubData_UserFansClubStatus[User_FansClub_FansClubData_UserFansClubStatus["NOTJOINED"] = 0] = "NOTJOINED";
    User_FansClub_FansClubData_UserFansClubStatus[User_FansClub_FansClubData_UserFansClubStatus["ACTIVE"] = 1] = "ACTIVE";
    User_FansClub_FansClubData_UserFansClubStatus[User_FansClub_FansClubData_UserFansClubStatus["INACTIVE"] = 2] = "INACTIVE";
    User_FansClub_FansClubData_UserFansClubStatus[User_FansClub_FansClubData_UserFansClubStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(User_FansClub_FansClubData_UserFansClubStatus = exports.User_FansClub_FansClubData_UserFansClubStatus || (exports.User_FansClub_FansClubData_UserFansClubStatus = {}));
var Emote_AuditInfo_AuditTaskType;
(function (Emote_AuditInfo_AuditTaskType) {
    Emote_AuditInfo_AuditTaskType[Emote_AuditInfo_AuditTaskType["AUDIT_TASK_TYPE_DEFAULT"] = 0] = "AUDIT_TASK_TYPE_DEFAULT";
    Emote_AuditInfo_AuditTaskType[Emote_AuditInfo_AuditTaskType["AUDIT_TASK_TYPE_APPEAL"] = 1] = "AUDIT_TASK_TYPE_APPEAL";
    Emote_AuditInfo_AuditTaskType[Emote_AuditInfo_AuditTaskType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(Emote_AuditInfo_AuditTaskType = exports.Emote_AuditInfo_AuditTaskType || (exports.Emote_AuditInfo_AuditTaskType = {}));
function createBaseCommonMessageData() {
    return {
        method: "",
        msgId: "0",
        roomId: "0",
        createTime: "0",
        monitor: 0,
        isShowMsg: false,
        describe: "",
        displayText: undefined,
        foldType: "0",
        anchorFoldType: "0",
        priorityScore: "0",
        logId: "",
        msgProcessFilterK: "",
        msgProcessFilterV: "",
        fromIdc: "",
        toIdc: "",
        filterMsgTagsList: [],
        sei: undefined,
        dependRootId: undefined,
        dependId: undefined,
        anchorPriorityScore: "0",
        roomMessageHeatLevel: "0",
        foldTypeForWeb: "0",
        anchorFoldTypeForWeb: "0",
        clientSendTime: "0",
        dispatchStrategy: 0,
    };
}
exports.CommonMessageData = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.method !== "") {
            writer.uint32(10).string(message.method);
        }
        if (message.msgId !== "0") {
            writer.uint32(16).int64(message.msgId);
        }
        if (message.roomId !== "0") {
            writer.uint32(24).int64(message.roomId);
        }
        if (message.createTime !== "0") {
            writer.uint32(32).int64(message.createTime);
        }
        if (message.monitor !== 0) {
            writer.uint32(40).int32(message.monitor);
        }
        if (message.isShowMsg !== false) {
            writer.uint32(48).bool(message.isShowMsg);
        }
        if (message.describe !== "") {
            writer.uint32(58).string(message.describe);
        }
        if (message.displayText !== undefined) {
            exports.Text.encode(message.displayText, writer.uint32(66).fork()).join();
        }
        if (message.foldType !== "0") {
            writer.uint32(72).int64(message.foldType);
        }
        if (message.anchorFoldType !== "0") {
            writer.uint32(80).int64(message.anchorFoldType);
        }
        if (message.priorityScore !== "0") {
            writer.uint32(88).int64(message.priorityScore);
        }
        if (message.logId !== "") {
            writer.uint32(98).string(message.logId);
        }
        if (message.msgProcessFilterK !== "") {
            writer.uint32(106).string(message.msgProcessFilterK);
        }
        if (message.msgProcessFilterV !== "") {
            writer.uint32(114).string(message.msgProcessFilterV);
        }
        if (message.fromIdc !== "") {
            writer.uint32(122).string(message.fromIdc);
        }
        if (message.toIdc !== "") {
            writer.uint32(130).string(message.toIdc);
        }
        for (const v of message.filterMsgTagsList) {
            writer.uint32(138).string(v);
        }
        if (message.sei !== undefined) {
            exports.CommonMessageData_LiveMessageSEI.encode(message.sei, writer.uint32(146).fork()).join();
        }
        if (message.dependRootId !== undefined) {
            exports.CommonMessageData_LiveMessageID.encode(message.dependRootId, writer.uint32(154).fork()).join();
        }
        if (message.dependId !== undefined) {
            exports.CommonMessageData_LiveMessageID.encode(message.dependId, writer.uint32(162).fork()).join();
        }
        if (message.anchorPriorityScore !== "0") {
            writer.uint32(168).int64(message.anchorPriorityScore);
        }
        if (message.roomMessageHeatLevel !== "0") {
            writer.uint32(176).int64(message.roomMessageHeatLevel);
        }
        if (message.foldTypeForWeb !== "0") {
            writer.uint32(184).int64(message.foldTypeForWeb);
        }
        if (message.anchorFoldTypeForWeb !== "0") {
            writer.uint32(192).int64(message.anchorFoldTypeForWeb);
        }
        if (message.clientSendTime !== "0") {
            writer.uint32(200).int64(message.clientSendTime);
        }
        if (message.dispatchStrategy !== 0) {
            writer.uint32(208).int32(message.dispatchStrategy);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseCommonMessageData();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.method = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.msgId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.roomId = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.createTime = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.monitor = reader.int32();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.isShowMsg = reader.bool();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.describe = reader.string();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.displayText = exports.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.foldType = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.anchorFoldType = reader.int64().toString();
                    continue;
                }
                case 11: {
                    if (tag !== 88) {
                        break;
                    }
                    message.priorityScore = reader.int64().toString();
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.logId = reader.string();
                    continue;
                }
                case 13: {
                    if (tag !== 106) {
                        break;
                    }
                    message.msgProcessFilterK = reader.string();
                    continue;
                }
                case 14: {
                    if (tag !== 114) {
                        break;
                    }
                    message.msgProcessFilterV = reader.string();
                    continue;
                }
                case 15: {
                    if (tag !== 122) {
                        break;
                    }
                    message.fromIdc = reader.string();
                    continue;
                }
                case 16: {
                    if (tag !== 130) {
                        break;
                    }
                    message.toIdc = reader.string();
                    continue;
                }
                case 17: {
                    if (tag !== 138) {
                        break;
                    }
                    message.filterMsgTagsList.push(reader.string());
                    continue;
                }
                case 18: {
                    if (tag !== 146) {
                        break;
                    }
                    message.sei = exports.CommonMessageData_LiveMessageSEI.decode(reader, reader.uint32());
                    continue;
                }
                case 19: {
                    if (tag !== 154) {
                        break;
                    }
                    message.dependRootId = exports.CommonMessageData_LiveMessageID.decode(reader, reader.uint32());
                    continue;
                }
                case 20: {
                    if (tag !== 162) {
                        break;
                    }
                    message.dependId = exports.CommonMessageData_LiveMessageID.decode(reader, reader.uint32());
                    continue;
                }
                case 21: {
                    if (tag !== 168) {
                        break;
                    }
                    message.anchorPriorityScore = reader.int64().toString();
                    continue;
                }
                case 22: {
                    if (tag !== 176) {
                        break;
                    }
                    message.roomMessageHeatLevel = reader.int64().toString();
                    continue;
                }
                case 23: {
                    if (tag !== 184) {
                        break;
                    }
                    message.foldTypeForWeb = reader.int64().toString();
                    continue;
                }
                case 24: {
                    if (tag !== 192) {
                        break;
                    }
                    message.anchorFoldTypeForWeb = reader.int64().toString();
                    continue;
                }
                case 25: {
                    if (tag !== 200) {
                        break;
                    }
                    message.clientSendTime = reader.int64().toString();
                    continue;
                }
                case 26: {
                    if (tag !== 208) {
                        break;
                    }
                    message.dispatchStrategy = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.CommonMessageData.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseCommonMessageData();
        message.method = object.method ?? "";
        message.msgId = object.msgId ?? "0";
        message.roomId = object.roomId ?? "0";
        message.createTime = object.createTime ?? "0";
        message.monitor = object.monitor ?? 0;
        message.isShowMsg = object.isShowMsg ?? false;
        message.describe = object.describe ?? "";
        message.displayText = (object.displayText !== undefined && object.displayText !== null)
            ? exports.Text.fromPartial(object.displayText)
            : undefined;
        message.foldType = object.foldType ?? "0";
        message.anchorFoldType = object.anchorFoldType ?? "0";
        message.priorityScore = object.priorityScore ?? "0";
        message.logId = object.logId ?? "";
        message.msgProcessFilterK = object.msgProcessFilterK ?? "";
        message.msgProcessFilterV = object.msgProcessFilterV ?? "";
        message.fromIdc = object.fromIdc ?? "";
        message.toIdc = object.toIdc ?? "";
        message.filterMsgTagsList = object.filterMsgTagsList?.map((e) => e) || [];
        message.sei = (object.sei !== undefined && object.sei !== null)
            ? exports.CommonMessageData_LiveMessageSEI.fromPartial(object.sei)
            : undefined;
        message.dependRootId = (object.dependRootId !== undefined && object.dependRootId !== null)
            ? exports.CommonMessageData_LiveMessageID.fromPartial(object.dependRootId)
            : undefined;
        message.dependId = (object.dependId !== undefined && object.dependId !== null)
            ? exports.CommonMessageData_LiveMessageID.fromPartial(object.dependId)
            : undefined;
        message.anchorPriorityScore = object.anchorPriorityScore ?? "0";
        message.roomMessageHeatLevel = object.roomMessageHeatLevel ?? "0";
        message.foldTypeForWeb = object.foldTypeForWeb ?? "0";
        message.anchorFoldTypeForWeb = object.anchorFoldTypeForWeb ?? "0";
        message.clientSendTime = object.clientSendTime ?? "0";
        message.dispatchStrategy = object.dispatchStrategy ?? 0;
        return message;
    },
};
function createBaseCommonMessageData_LiveMessageSEI() {
    return { uniqueId: undefined, timestamp: "0" };
}
exports.CommonMessageData_LiveMessageSEI = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.uniqueId !== undefined) {
            exports.CommonMessageData_LiveMessageID.encode(message.uniqueId, writer.uint32(10).fork()).join();
        }
        if (message.timestamp !== "0") {
            writer.uint32(16).int64(message.timestamp);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseCommonMessageData_LiveMessageSEI();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.uniqueId = exports.CommonMessageData_LiveMessageID.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.timestamp = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.CommonMessageData_LiveMessageSEI.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseCommonMessageData_LiveMessageSEI();
        message.uniqueId = (object.uniqueId !== undefined && object.uniqueId !== null)
            ? exports.CommonMessageData_LiveMessageID.fromPartial(object.uniqueId)
            : undefined;
        message.timestamp = object.timestamp ?? "0";
        return message;
    },
};
function createBaseCommonMessageData_LiveMessageID() {
    return { primaryId: "", messageScene: "" };
}
exports.CommonMessageData_LiveMessageID = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.primaryId !== "") {
            writer.uint32(10).string(message.primaryId);
        }
        if (message.messageScene !== "") {
            writer.uint32(18).string(message.messageScene);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseCommonMessageData_LiveMessageID();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.primaryId = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.messageScene = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.CommonMessageData_LiveMessageID.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseCommonMessageData_LiveMessageID();
        message.primaryId = object.primaryId ?? "";
        message.messageScene = object.messageScene ?? "";
        return message;
    },
};
function createBaseText() {
    return { displayType: "", defaultPattern: "", defaultFormat: undefined, piecesList: [] };
}
exports.Text = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.displayType !== "") {
            writer.uint32(10).string(message.displayType);
        }
        if (message.defaultPattern !== "") {
            writer.uint32(18).string(message.defaultPattern);
        }
        if (message.defaultFormat !== undefined) {
            exports.Text_TextFormat.encode(message.defaultFormat, writer.uint32(26).fork()).join();
        }
        for (const v of message.piecesList) {
            exports.Text_TextPiece.encode(v, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseText();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.displayType = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.defaultPattern = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.defaultFormat = exports.Text_TextFormat.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.piecesList.push(exports.Text_TextPiece.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Text.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseText();
        message.displayType = object.displayType ?? "";
        message.defaultPattern = object.defaultPattern ?? "";
        message.defaultFormat = (object.defaultFormat !== undefined && object.defaultFormat !== null)
            ? exports.Text_TextFormat.fromPartial(object.defaultFormat)
            : undefined;
        message.piecesList = object.piecesList?.map((e) => exports.Text_TextPiece.fromPartial(e)) || [];
        return message;
    },
};
function createBaseText_TextPiece() {
    return {
        type: 0,
        format: undefined,
        stringValue: "",
        userValue: undefined,
        giftValue: undefined,
        patternRefValue: undefined,
    };
}
exports.Text_TextPiece = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.type !== 0) {
            writer.uint32(8).int32(message.type);
        }
        if (message.format !== undefined) {
            exports.Text_TextFormat.encode(message.format, writer.uint32(18).fork()).join();
        }
        if (message.stringValue !== "") {
            writer.uint32(90).string(message.stringValue);
        }
        if (message.userValue !== undefined) {
            exports.Text_TextPieceUser.encode(message.userValue, writer.uint32(170).fork()).join();
        }
        if (message.giftValue !== undefined) {
            exports.Text_TextPieceGift.encode(message.giftValue, writer.uint32(178).fork()).join();
        }
        if (message.patternRefValue !== undefined) {
            exports.Text_TextPiecePatternRef.encode(message.patternRefValue, writer.uint32(194).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseText_TextPiece();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.type = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.format = exports.Text_TextFormat.decode(reader, reader.uint32());
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.stringValue = reader.string();
                    continue;
                }
                case 21: {
                    if (tag !== 170) {
                        break;
                    }
                    message.userValue = exports.Text_TextPieceUser.decode(reader, reader.uint32());
                    continue;
                }
                case 22: {
                    if (tag !== 178) {
                        break;
                    }
                    message.giftValue = exports.Text_TextPieceGift.decode(reader, reader.uint32());
                    continue;
                }
                case 24: {
                    if (tag !== 194) {
                        break;
                    }
                    message.patternRefValue = exports.Text_TextPiecePatternRef.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Text_TextPiece.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseText_TextPiece();
        message.type = object.type ?? 0;
        message.format = (object.format !== undefined && object.format !== null)
            ? exports.Text_TextFormat.fromPartial(object.format)
            : undefined;
        message.stringValue = object.stringValue ?? "";
        message.userValue = (object.userValue !== undefined && object.userValue !== null)
            ? exports.Text_TextPieceUser.fromPartial(object.userValue)
            : undefined;
        message.giftValue = (object.giftValue !== undefined && object.giftValue !== null)
            ? exports.Text_TextPieceGift.fromPartial(object.giftValue)
            : undefined;
        message.patternRefValue = (object.patternRefValue !== undefined && object.patternRefValue !== null)
            ? exports.Text_TextPiecePatternRef.fromPartial(object.patternRefValue)
            : undefined;
        return message;
    },
};
function createBaseText_TextFormat() {
    return {
        color: "",
        bold: false,
        italic: false,
        weight: 0,
        italicAngle: 0,
        fontSize: 0,
        useHeighLightColor: false,
        useRemoteClor: false,
    };
}
exports.Text_TextFormat = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.color !== "") {
            writer.uint32(10).string(message.color);
        }
        if (message.bold !== false) {
            writer.uint32(16).bool(message.bold);
        }
        if (message.italic !== false) {
            writer.uint32(24).bool(message.italic);
        }
        if (message.weight !== 0) {
            writer.uint32(32).int32(message.weight);
        }
        if (message.italicAngle !== 0) {
            writer.uint32(40).int32(message.italicAngle);
        }
        if (message.fontSize !== 0) {
            writer.uint32(48).int32(message.fontSize);
        }
        if (message.useHeighLightColor !== false) {
            writer.uint32(56).bool(message.useHeighLightColor);
        }
        if (message.useRemoteClor !== false) {
            writer.uint32(64).bool(message.useRemoteClor);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseText_TextFormat();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.color = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.bold = reader.bool();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.italic = reader.bool();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.weight = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.italicAngle = reader.int32();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.fontSize = reader.int32();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.useHeighLightColor = reader.bool();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.useRemoteClor = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Text_TextFormat.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseText_TextFormat();
        message.color = object.color ?? "";
        message.bold = object.bold ?? false;
        message.italic = object.italic ?? false;
        message.weight = object.weight ?? 0;
        message.italicAngle = object.italicAngle ?? 0;
        message.fontSize = object.fontSize ?? 0;
        message.useHeighLightColor = object.useHeighLightColor ?? false;
        message.useRemoteClor = object.useRemoteClor ?? false;
        return message;
    },
};
function createBaseText_TextPieceGift() {
    return { giftId: 0, nameRef: undefined, showType: 0, colorId: "0" };
}
exports.Text_TextPieceGift = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.giftId !== 0) {
            writer.uint32(8).int32(message.giftId);
        }
        if (message.nameRef !== undefined) {
            exports.Text_PatternRef.encode(message.nameRef, writer.uint32(18).fork()).join();
        }
        if (message.showType !== 0) {
            writer.uint32(24).int32(message.showType);
        }
        if (message.colorId !== "0") {
            writer.uint32(32).int64(message.colorId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseText_TextPieceGift();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.giftId = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.nameRef = exports.Text_PatternRef.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.showType = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.colorId = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Text_TextPieceGift.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseText_TextPieceGift();
        message.giftId = object.giftId ?? 0;
        message.nameRef = (object.nameRef !== undefined && object.nameRef !== null)
            ? exports.Text_PatternRef.fromPartial(object.nameRef)
            : undefined;
        message.showType = object.showType ?? 0;
        message.colorId = object.colorId ?? "0";
        return message;
    },
};
function createBaseText_TextPiecePatternRef() {
    return { key: "", defaultPattern: "" };
}
exports.Text_TextPiecePatternRef = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.key !== "") {
            writer.uint32(10).string(message.key);
        }
        if (message.defaultPattern !== "") {
            writer.uint32(18).string(message.defaultPattern);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseText_TextPiecePatternRef();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.key = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.defaultPattern = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Text_TextPiecePatternRef.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseText_TextPiecePatternRef();
        message.key = object.key ?? "";
        message.defaultPattern = object.defaultPattern ?? "";
        return message;
    },
};
function createBaseText_TextPieceUser() {
    return { user: undefined, withColon: false };
}
exports.Text_TextPieceUser = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.user !== undefined) {
            exports.User.encode(message.user, writer.uint32(10).fork()).join();
        }
        if (message.withColon !== false) {
            writer.uint32(16).bool(message.withColon);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseText_TextPieceUser();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.user = exports.User.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.withColon = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Text_TextPieceUser.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseText_TextPieceUser();
        message.user = (object.user !== undefined && object.user !== null) ? exports.User.fromPartial(object.user) : undefined;
        message.withColon = object.withColon ?? false;
        return message;
    },
};
function createBaseText_PatternRef() {
    return { key: "", defaultPattern: "" };
}
exports.Text_PatternRef = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.key !== "") {
            writer.uint32(10).string(message.key);
        }
        if (message.defaultPattern !== "") {
            writer.uint32(18).string(message.defaultPattern);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseText_PatternRef();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.key = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.defaultPattern = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Text_PatternRef.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseText_PatternRef();
        message.key = object.key ?? "";
        message.defaultPattern = object.defaultPattern ?? "";
        return message;
    },
};
function createBaseImage() {
    return {
        url: [],
        mUri: "",
        height: 0,
        width: 0,
        avgColor: "",
        imageType: 0,
        schema: "",
        content: undefined,
        isAnimated: false,
    };
}
exports.Image = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.url) {
            writer.uint32(10).string(v);
        }
        if (message.mUri !== "") {
            writer.uint32(18).string(message.mUri);
        }
        if (message.height !== 0) {
            writer.uint32(24).int32(message.height);
        }
        if (message.width !== 0) {
            writer.uint32(32).int32(message.width);
        }
        if (message.avgColor !== "") {
            writer.uint32(42).string(message.avgColor);
        }
        if (message.imageType !== 0) {
            writer.uint32(48).int32(message.imageType);
        }
        if (message.schema !== "") {
            writer.uint32(58).string(message.schema);
        }
        if (message.content !== undefined) {
            exports.Image_Content.encode(message.content, writer.uint32(66).fork()).join();
        }
        if (message.isAnimated !== false) {
            writer.uint32(72).bool(message.isAnimated);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseImage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.url.push(reader.string());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.mUri = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.height = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.width = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.avgColor = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.imageType = reader.int32();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.schema = reader.string();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.content = exports.Image_Content.decode(reader, reader.uint32());
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.isAnimated = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Image.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseImage();
        message.url = object.url?.map((e) => e) || [];
        message.mUri = object.mUri ?? "";
        message.height = object.height ?? 0;
        message.width = object.width ?? 0;
        message.avgColor = object.avgColor ?? "";
        message.imageType = object.imageType ?? 0;
        message.schema = object.schema ?? "";
        message.content = (object.content !== undefined && object.content !== null)
            ? exports.Image_Content.fromPartial(object.content)
            : undefined;
        message.isAnimated = object.isAnimated ?? false;
        return message;
    },
};
function createBaseImage_Content() {
    return { name: "", fontColor: "", level: "0" };
}
exports.Image_Content = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.name !== "") {
            writer.uint32(10).string(message.name);
        }
        if (message.fontColor !== "") {
            writer.uint32(18).string(message.fontColor);
        }
        if (message.level !== "0") {
            writer.uint32(24).int64(message.level);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseImage_Content();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.name = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.fontColor = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.level = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Image_Content.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseImage_Content();
        message.name = object.name ?? "";
        message.fontColor = object.fontColor ?? "";
        message.level = object.level ?? "0";
        return message;
    },
};
function createBaseBadgeStruct() {
    return {
        badgeDisplayType: 0,
        badgePriorityType: 0,
        badgeScene: 0,
        position: 0,
        displayStatus: 0,
        greyedByClient: "0",
        exhibitionType: 0,
        schemaUrl: "",
        display: false,
        logExtra: undefined,
        image: undefined,
        text: undefined,
        str: undefined,
        combine: undefined,
        isCustomized: false,
    };
}
exports.BadgeStruct = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.badgeDisplayType !== 0) {
            writer.uint32(8).int32(message.badgeDisplayType);
        }
        if (message.badgePriorityType !== 0) {
            writer.uint32(16).int32(message.badgePriorityType);
        }
        if (message.badgeScene !== 0) {
            writer.uint32(24).int32(message.badgeScene);
        }
        if (message.position !== 0) {
            writer.uint32(32).int32(message.position);
        }
        if (message.displayStatus !== 0) {
            writer.uint32(40).int32(message.displayStatus);
        }
        if (message.greyedByClient !== "0") {
            writer.uint32(48).int64(message.greyedByClient);
        }
        if (message.exhibitionType !== 0) {
            writer.uint32(56).int32(message.exhibitionType);
        }
        if (message.schemaUrl !== "") {
            writer.uint32(82).string(message.schemaUrl);
        }
        if (message.display !== false) {
            writer.uint32(88).bool(message.display);
        }
        if (message.logExtra !== undefined) {
            exports.PrivilegeLogExtra.encode(message.logExtra, writer.uint32(98).fork()).join();
        }
        if (message.image !== undefined) {
            exports.BadgeStruct_ImageBadge.encode(message.image, writer.uint32(162).fork()).join();
        }
        if (message.text !== undefined) {
            exports.BadgeStruct_TextBadge.encode(message.text, writer.uint32(170).fork()).join();
        }
        if (message.str !== undefined) {
            exports.BadgeStruct_StringBadge.encode(message.str, writer.uint32(178).fork()).join();
        }
        if (message.combine !== undefined) {
            exports.BadgeStruct_CombineBadge.encode(message.combine, writer.uint32(186).fork()).join();
        }
        if (message.isCustomized !== false) {
            writer.uint32(192).bool(message.isCustomized);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBadgeStruct();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.badgeDisplayType = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.badgePriorityType = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.badgeScene = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.position = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.displayStatus = reader.int32();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.greyedByClient = reader.int64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.exhibitionType = reader.int32();
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.schemaUrl = reader.string();
                    continue;
                }
                case 11: {
                    if (tag !== 88) {
                        break;
                    }
                    message.display = reader.bool();
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.logExtra = exports.PrivilegeLogExtra.decode(reader, reader.uint32());
                    continue;
                }
                case 20: {
                    if (tag !== 162) {
                        break;
                    }
                    message.image = exports.BadgeStruct_ImageBadge.decode(reader, reader.uint32());
                    continue;
                }
                case 21: {
                    if (tag !== 170) {
                        break;
                    }
                    message.text = exports.BadgeStruct_TextBadge.decode(reader, reader.uint32());
                    continue;
                }
                case 22: {
                    if (tag !== 178) {
                        break;
                    }
                    message.str = exports.BadgeStruct_StringBadge.decode(reader, reader.uint32());
                    continue;
                }
                case 23: {
                    if (tag !== 186) {
                        break;
                    }
                    message.combine = exports.BadgeStruct_CombineBadge.decode(reader, reader.uint32());
                    continue;
                }
                case 24: {
                    if (tag !== 192) {
                        break;
                    }
                    message.isCustomized = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BadgeStruct.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBadgeStruct();
        message.badgeDisplayType = object.badgeDisplayType ?? 0;
        message.badgePriorityType = object.badgePriorityType ?? 0;
        message.badgeScene = object.badgeScene ?? 0;
        message.position = object.position ?? 0;
        message.displayStatus = object.displayStatus ?? 0;
        message.greyedByClient = object.greyedByClient ?? "0";
        message.exhibitionType = object.exhibitionType ?? 0;
        message.schemaUrl = object.schemaUrl ?? "";
        message.display = object.display ?? false;
        message.logExtra = (object.logExtra !== undefined && object.logExtra !== null)
            ? exports.PrivilegeLogExtra.fromPartial(object.logExtra)
            : undefined;
        message.image = (object.image !== undefined && object.image !== null)
            ? exports.BadgeStruct_ImageBadge.fromPartial(object.image)
            : undefined;
        message.text = (object.text !== undefined && object.text !== null)
            ? exports.BadgeStruct_TextBadge.fromPartial(object.text)
            : undefined;
        message.str = (object.str !== undefined && object.str !== null)
            ? exports.BadgeStruct_StringBadge.fromPartial(object.str)
            : undefined;
        message.combine = (object.combine !== undefined && object.combine !== null)
            ? exports.BadgeStruct_CombineBadge.fromPartial(object.combine)
            : undefined;
        message.isCustomized = object.isCustomized ?? false;
        return message;
    },
};
function createBaseBadgeStruct_CombineBadge() {
    return {
        badgeDisplayType: 0,
        icon: undefined,
        text: undefined,
        str: "",
        padding: undefined,
        fontStyle: undefined,
        profileCardPanel: undefined,
        background: undefined,
        backgroundDarkMode: undefined,
        iconAutoMirrored: false,
        bgAutoMirrored: false,
        publicScreenShowStyle: 0,
        personalCardShowStyle: 0,
        rankListOnlineAudienceShowStyle: 0,
        multiGuestShowStyle: 0,
        arrowConfig: undefined,
        paddingNewFont: undefined,
    };
}
exports.BadgeStruct_CombineBadge = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.badgeDisplayType !== 0) {
            writer.uint32(8).int32(message.badgeDisplayType);
        }
        if (message.icon !== undefined) {
            exports.Image.encode(message.icon, writer.uint32(18).fork()).join();
        }
        if (message.text !== undefined) {
            exports.BadgeStruct_TextBadge.encode(message.text, writer.uint32(26).fork()).join();
        }
        if (message.str !== "") {
            writer.uint32(34).string(message.str);
        }
        if (message.padding !== undefined) {
            exports.BadgeStruct_PaddingInfo.encode(message.padding, writer.uint32(42).fork()).join();
        }
        if (message.fontStyle !== undefined) {
            exports.FontStyle.encode(message.fontStyle, writer.uint32(50).fork()).join();
        }
        if (message.profileCardPanel !== undefined) {
            exports.BadgeStruct_ProfileCardPanel.encode(message.profileCardPanel, writer.uint32(58).fork()).join();
        }
        if (message.background !== undefined) {
            exports.BadgeStruct_CombineBadgeBackground.encode(message.background, writer.uint32(90).fork()).join();
        }
        if (message.backgroundDarkMode !== undefined) {
            exports.BadgeStruct_CombineBadgeBackground.encode(message.backgroundDarkMode, writer.uint32(98).fork()).join();
        }
        if (message.iconAutoMirrored !== false) {
            writer.uint32(104).bool(message.iconAutoMirrored);
        }
        if (message.bgAutoMirrored !== false) {
            writer.uint32(112).bool(message.bgAutoMirrored);
        }
        if (message.publicScreenShowStyle !== 0) {
            writer.uint32(120).int32(message.publicScreenShowStyle);
        }
        if (message.personalCardShowStyle !== 0) {
            writer.uint32(128).int32(message.personalCardShowStyle);
        }
        if (message.rankListOnlineAudienceShowStyle !== 0) {
            writer.uint32(136).int32(message.rankListOnlineAudienceShowStyle);
        }
        if (message.multiGuestShowStyle !== 0) {
            writer.uint32(144).int32(message.multiGuestShowStyle);
        }
        if (message.arrowConfig !== undefined) {
            exports.BadgeStruct_ArrowConfig.encode(message.arrowConfig, writer.uint32(154).fork()).join();
        }
        if (message.paddingNewFont !== undefined) {
            exports.BadgeStruct_PaddingInfo.encode(message.paddingNewFont, writer.uint32(162).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBadgeStruct_CombineBadge();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.badgeDisplayType = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.icon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.text = exports.BadgeStruct_TextBadge.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.str = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.padding = exports.BadgeStruct_PaddingInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.fontStyle = exports.FontStyle.decode(reader, reader.uint32());
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.profileCardPanel = exports.BadgeStruct_ProfileCardPanel.decode(reader, reader.uint32());
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.background = exports.BadgeStruct_CombineBadgeBackground.decode(reader, reader.uint32());
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.backgroundDarkMode = exports.BadgeStruct_CombineBadgeBackground.decode(reader, reader.uint32());
                    continue;
                }
                case 13: {
                    if (tag !== 104) {
                        break;
                    }
                    message.iconAutoMirrored = reader.bool();
                    continue;
                }
                case 14: {
                    if (tag !== 112) {
                        break;
                    }
                    message.bgAutoMirrored = reader.bool();
                    continue;
                }
                case 15: {
                    if (tag !== 120) {
                        break;
                    }
                    message.publicScreenShowStyle = reader.int32();
                    continue;
                }
                case 16: {
                    if (tag !== 128) {
                        break;
                    }
                    message.personalCardShowStyle = reader.int32();
                    continue;
                }
                case 17: {
                    if (tag !== 136) {
                        break;
                    }
                    message.rankListOnlineAudienceShowStyle = reader.int32();
                    continue;
                }
                case 18: {
                    if (tag !== 144) {
                        break;
                    }
                    message.multiGuestShowStyle = reader.int32();
                    continue;
                }
                case 19: {
                    if (tag !== 154) {
                        break;
                    }
                    message.arrowConfig = exports.BadgeStruct_ArrowConfig.decode(reader, reader.uint32());
                    continue;
                }
                case 20: {
                    if (tag !== 162) {
                        break;
                    }
                    message.paddingNewFont = exports.BadgeStruct_PaddingInfo.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BadgeStruct_CombineBadge.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBadgeStruct_CombineBadge();
        message.badgeDisplayType = object.badgeDisplayType ?? 0;
        message.icon = (object.icon !== undefined && object.icon !== null) ? exports.Image.fromPartial(object.icon) : undefined;
        message.text = (object.text !== undefined && object.text !== null)
            ? exports.BadgeStruct_TextBadge.fromPartial(object.text)
            : undefined;
        message.str = object.str ?? "";
        message.padding = (object.padding !== undefined && object.padding !== null)
            ? exports.BadgeStruct_PaddingInfo.fromPartial(object.padding)
            : undefined;
        message.fontStyle = (object.fontStyle !== undefined && object.fontStyle !== null)
            ? exports.FontStyle.fromPartial(object.fontStyle)
            : undefined;
        message.profileCardPanel = (object.profileCardPanel !== undefined && object.profileCardPanel !== null)
            ? exports.BadgeStruct_ProfileCardPanel.fromPartial(object.profileCardPanel)
            : undefined;
        message.background = (object.background !== undefined && object.background !== null)
            ? exports.BadgeStruct_CombineBadgeBackground.fromPartial(object.background)
            : undefined;
        message.backgroundDarkMode = (object.backgroundDarkMode !== undefined && object.backgroundDarkMode !== null)
            ? exports.BadgeStruct_CombineBadgeBackground.fromPartial(object.backgroundDarkMode)
            : undefined;
        message.iconAutoMirrored = object.iconAutoMirrored ?? false;
        message.bgAutoMirrored = object.bgAutoMirrored ?? false;
        message.publicScreenShowStyle = object.publicScreenShowStyle ?? 0;
        message.personalCardShowStyle = object.personalCardShowStyle ?? 0;
        message.rankListOnlineAudienceShowStyle = object.rankListOnlineAudienceShowStyle ?? 0;
        message.multiGuestShowStyle = object.multiGuestShowStyle ?? 0;
        message.arrowConfig = (object.arrowConfig !== undefined && object.arrowConfig !== null)
            ? exports.BadgeStruct_ArrowConfig.fromPartial(object.arrowConfig)
            : undefined;
        message.paddingNewFont = (object.paddingNewFont !== undefined && object.paddingNewFont !== null)
            ? exports.BadgeStruct_PaddingInfo.fromPartial(object.paddingNewFont)
            : undefined;
        return message;
    },
};
function createBaseBadgeStruct_ArrowConfig() {
    return { icon: undefined };
}
exports.BadgeStruct_ArrowConfig = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.icon !== undefined) {
            exports.Image.encode(message.icon, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBadgeStruct_ArrowConfig();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.icon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BadgeStruct_ArrowConfig.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBadgeStruct_ArrowConfig();
        message.icon = (object.icon !== undefined && object.icon !== null) ? exports.Image.fromPartial(object.icon) : undefined;
        return message;
    },
};
function createBaseBadgeStruct_ProfileContent() {
    return { useContent: false, iconList: [], numberConfig: undefined };
}
exports.BadgeStruct_ProfileContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.useContent !== false) {
            writer.uint32(8).bool(message.useContent);
        }
        for (const v of message.iconList) {
            exports.BadgeStruct_IconConfig.encode(v, writer.uint32(18).fork()).join();
        }
        if (message.numberConfig !== undefined) {
            exports.BadgeStruct_NumberConfig.encode(message.numberConfig, writer.uint32(26).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBadgeStruct_ProfileContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.useContent = reader.bool();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.iconList.push(exports.BadgeStruct_IconConfig.decode(reader, reader.uint32()));
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.numberConfig = exports.BadgeStruct_NumberConfig.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BadgeStruct_ProfileContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBadgeStruct_ProfileContent();
        message.useContent = object.useContent ?? false;
        message.iconList = object.iconList?.map((e) => exports.BadgeStruct_IconConfig.fromPartial(e)) || [];
        message.numberConfig = (object.numberConfig !== undefined && object.numberConfig !== null)
            ? exports.BadgeStruct_NumberConfig.fromPartial(object.numberConfig)
            : undefined;
        return message;
    },
};
function createBaseBadgeStruct_ProjectionConfig() {
    return { useProjection: false, icon: undefined };
}
exports.BadgeStruct_ProjectionConfig = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.useProjection !== false) {
            writer.uint32(8).bool(message.useProjection);
        }
        if (message.icon !== undefined) {
            exports.Image.encode(message.icon, writer.uint32(18).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBadgeStruct_ProjectionConfig();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.useProjection = reader.bool();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.icon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BadgeStruct_ProjectionConfig.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBadgeStruct_ProjectionConfig();
        message.useProjection = object.useProjection ?? false;
        message.icon = (object.icon !== undefined && object.icon !== null) ? exports.Image.fromPartial(object.icon) : undefined;
        return message;
    },
};
function createBaseBadgeStruct_NumberConfig() {
    return { number: "0", fontStyle: undefined, background: undefined };
}
exports.BadgeStruct_NumberConfig = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.number !== "0") {
            writer.uint32(8).int64(message.number);
        }
        if (message.fontStyle !== undefined) {
            exports.FontStyle.encode(message.fontStyle, writer.uint32(18).fork()).join();
        }
        if (message.background !== undefined) {
            exports.BadgeStruct_CombineBadgeBackground.encode(message.background, writer.uint32(26).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBadgeStruct_NumberConfig();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.number = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.fontStyle = exports.FontStyle.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.background = exports.BadgeStruct_CombineBadgeBackground.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BadgeStruct_NumberConfig.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBadgeStruct_NumberConfig();
        message.number = object.number ?? "0";
        message.fontStyle = (object.fontStyle !== undefined && object.fontStyle !== null)
            ? exports.FontStyle.fromPartial(object.fontStyle)
            : undefined;
        message.background = (object.background !== undefined && object.background !== null)
            ? exports.BadgeStruct_CombineBadgeBackground.fromPartial(object.background)
            : undefined;
        return message;
    },
};
function createBaseBadgeStruct_ProfileCardPanel() {
    return { useNewProfileCardStyle: false, projectionConfig: undefined, profileContent: undefined };
}
exports.BadgeStruct_ProfileCardPanel = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.useNewProfileCardStyle !== false) {
            writer.uint32(8).bool(message.useNewProfileCardStyle);
        }
        if (message.projectionConfig !== undefined) {
            exports.BadgeStruct_ProjectionConfig.encode(message.projectionConfig, writer.uint32(26).fork()).join();
        }
        if (message.profileContent !== undefined) {
            exports.BadgeStruct_ProfileContent.encode(message.profileContent, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBadgeStruct_ProfileCardPanel();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.useNewProfileCardStyle = reader.bool();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.projectionConfig = exports.BadgeStruct_ProjectionConfig.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.profileContent = exports.BadgeStruct_ProfileContent.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BadgeStruct_ProfileCardPanel.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBadgeStruct_ProfileCardPanel();
        message.useNewProfileCardStyle = object.useNewProfileCardStyle ?? false;
        message.projectionConfig = (object.projectionConfig !== undefined && object.projectionConfig !== null)
            ? exports.BadgeStruct_ProjectionConfig.fromPartial(object.projectionConfig)
            : undefined;
        message.profileContent = (object.profileContent !== undefined && object.profileContent !== null)
            ? exports.BadgeStruct_ProfileContent.fromPartial(object.profileContent)
            : undefined;
        return message;
    },
};
function createBaseBadgeStruct_CombineBadgeBackground() {
    return { image: undefined, backgroundColorCode: "", borderColorCode: "" };
}
exports.BadgeStruct_CombineBadgeBackground = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.image !== undefined) {
            exports.Image.encode(message.image, writer.uint32(10).fork()).join();
        }
        if (message.backgroundColorCode !== "") {
            writer.uint32(18).string(message.backgroundColorCode);
        }
        if (message.borderColorCode !== "") {
            writer.uint32(26).string(message.borderColorCode);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBadgeStruct_CombineBadgeBackground();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.image = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.backgroundColorCode = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.borderColorCode = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BadgeStruct_CombineBadgeBackground.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBadgeStruct_CombineBadgeBackground();
        message.image = (object.image !== undefined && object.image !== null) ? exports.Image.fromPartial(object.image) : undefined;
        message.backgroundColorCode = object.backgroundColorCode ?? "";
        message.borderColorCode = object.borderColorCode ?? "";
        return message;
    },
};
function createBaseBadgeStruct_ImageBadge() {
    return { badgeDisplayType: 0, image: undefined };
}
exports.BadgeStruct_ImageBadge = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.badgeDisplayType !== 0) {
            writer.uint32(8).int32(message.badgeDisplayType);
        }
        if (message.image !== undefined) {
            exports.Image.encode(message.image, writer.uint32(18).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBadgeStruct_ImageBadge();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.badgeDisplayType = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.image = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BadgeStruct_ImageBadge.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBadgeStruct_ImageBadge();
        message.badgeDisplayType = object.badgeDisplayType ?? 0;
        message.image = (object.image !== undefined && object.image !== null) ? exports.Image.fromPartial(object.image) : undefined;
        return message;
    },
};
function createBaseBadgeStruct_TextBadge() {
    return { badgeDisplayType: 0, key: "", defaultPattern: "", pieces: [] };
}
exports.BadgeStruct_TextBadge = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.badgeDisplayType !== 0) {
            writer.uint32(8).int32(message.badgeDisplayType);
        }
        if (message.key !== "") {
            writer.uint32(18).string(message.key);
        }
        if (message.defaultPattern !== "") {
            writer.uint32(26).string(message.defaultPattern);
        }
        for (const v of message.pieces) {
            writer.uint32(34).string(v);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBadgeStruct_TextBadge();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.badgeDisplayType = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.key = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.defaultPattern = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.pieces.push(reader.string());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BadgeStruct_TextBadge.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBadgeStruct_TextBadge();
        message.badgeDisplayType = object.badgeDisplayType ?? 0;
        message.key = object.key ?? "";
        message.defaultPattern = object.defaultPattern ?? "";
        message.pieces = object.pieces?.map((e) => e) || [];
        return message;
    },
};
function createBaseBadgeStruct_IconConfig() {
    return { icon: undefined, background: undefined };
}
exports.BadgeStruct_IconConfig = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.icon !== undefined) {
            exports.Image.encode(message.icon, writer.uint32(10).fork()).join();
        }
        if (message.background !== undefined) {
            exports.BadgeStruct_CombineBadgeBackground.encode(message.background, writer.uint32(18).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBadgeStruct_IconConfig();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.icon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.background = exports.BadgeStruct_CombineBadgeBackground.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BadgeStruct_IconConfig.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBadgeStruct_IconConfig();
        message.icon = (object.icon !== undefined && object.icon !== null) ? exports.Image.fromPartial(object.icon) : undefined;
        message.background = (object.background !== undefined && object.background !== null)
            ? exports.BadgeStruct_CombineBadgeBackground.fromPartial(object.background)
            : undefined;
        return message;
    },
};
function createBaseBadgeStruct_StringBadge() {
    return { badgeDisplayType: 0, str: "" };
}
exports.BadgeStruct_StringBadge = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.badgeDisplayType !== 0) {
            writer.uint32(8).int32(message.badgeDisplayType);
        }
        if (message.str !== "") {
            writer.uint32(18).string(message.str);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBadgeStruct_StringBadge();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.badgeDisplayType = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.str = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BadgeStruct_StringBadge.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBadgeStruct_StringBadge();
        message.badgeDisplayType = object.badgeDisplayType ?? 0;
        message.str = object.str ?? "";
        return message;
    },
};
function createBaseBadgeStruct_PaddingInfo() {
    return {
        useSpecific: false,
        middlePadding: 0,
        badgeWidth: 0,
        leftPadding: 0,
        rightPadding: 0,
        iconTopPadding: 0,
        iconBottomPadding: 0,
        horizontalPaddingRule: 0,
        verticalPaddingRule: 0,
    };
}
exports.BadgeStruct_PaddingInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.useSpecific !== false) {
            writer.uint32(8).bool(message.useSpecific);
        }
        if (message.middlePadding !== 0) {
            writer.uint32(16).int32(message.middlePadding);
        }
        if (message.badgeWidth !== 0) {
            writer.uint32(24).int32(message.badgeWidth);
        }
        if (message.leftPadding !== 0) {
            writer.uint32(32).int32(message.leftPadding);
        }
        if (message.rightPadding !== 0) {
            writer.uint32(40).int32(message.rightPadding);
        }
        if (message.iconTopPadding !== 0) {
            writer.uint32(48).int32(message.iconTopPadding);
        }
        if (message.iconBottomPadding !== 0) {
            writer.uint32(56).int32(message.iconBottomPadding);
        }
        if (message.horizontalPaddingRule !== 0) {
            writer.uint32(64).int32(message.horizontalPaddingRule);
        }
        if (message.verticalPaddingRule !== 0) {
            writer.uint32(72).int32(message.verticalPaddingRule);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBadgeStruct_PaddingInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.useSpecific = reader.bool();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.middlePadding = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.badgeWidth = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.leftPadding = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.rightPadding = reader.int32();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.iconTopPadding = reader.int32();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.iconBottomPadding = reader.int32();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.horizontalPaddingRule = reader.int32();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.verticalPaddingRule = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BadgeStruct_PaddingInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBadgeStruct_PaddingInfo();
        message.useSpecific = object.useSpecific ?? false;
        message.middlePadding = object.middlePadding ?? 0;
        message.badgeWidth = object.badgeWidth ?? 0;
        message.leftPadding = object.leftPadding ?? 0;
        message.rightPadding = object.rightPadding ?? 0;
        message.iconTopPadding = object.iconTopPadding ?? 0;
        message.iconBottomPadding = object.iconBottomPadding ?? 0;
        message.horizontalPaddingRule = object.horizontalPaddingRule ?? 0;
        message.verticalPaddingRule = object.verticalPaddingRule ?? 0;
        return message;
    },
};
function createBaseGift() {
    return {
        giftImage: undefined,
        describe: "",
        duration: 0,
        id: "0",
        forLinkMic: false,
        combo: false,
        giftType: 0,
        diamondCount: 0,
        isDisplayedOnPanel: false,
        primaryEffectId: "0",
        giftLabelIcon: undefined,
        giftName: "",
        icon: undefined,
        goldEffect: "",
        previewImage: undefined,
        giftPanelBanner: undefined,
        isBroadcastGift: false,
        isEffectBefview: false,
        isRandomGift: false,
        isBoxGift: false,
        canPutInGiftBox: false,
        giftBoxInfo: undefined,
    };
}
exports.Gift = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.giftImage !== undefined) {
            exports.Image.encode(message.giftImage, writer.uint32(10).fork()).join();
        }
        if (message.describe !== "") {
            writer.uint32(18).string(message.describe);
        }
        if (message.duration !== 0) {
            writer.uint32(32).int32(message.duration);
        }
        if (message.id !== "0") {
            writer.uint32(40).int64(message.id);
        }
        if (message.forLinkMic !== false) {
            writer.uint32(56).bool(message.forLinkMic);
        }
        if (message.combo !== false) {
            writer.uint32(80).bool(message.combo);
        }
        if (message.giftType !== 0) {
            writer.uint32(88).int32(message.giftType);
        }
        if (message.diamondCount !== 0) {
            writer.uint32(96).int32(message.diamondCount);
        }
        if (message.isDisplayedOnPanel !== false) {
            writer.uint32(104).bool(message.isDisplayedOnPanel);
        }
        if (message.primaryEffectId !== "0") {
            writer.uint32(112).int64(message.primaryEffectId);
        }
        if (message.giftLabelIcon !== undefined) {
            exports.Image.encode(message.giftLabelIcon, writer.uint32(122).fork()).join();
        }
        if (message.giftName !== "") {
            writer.uint32(130).string(message.giftName);
        }
        if (message.icon !== undefined) {
            exports.Image.encode(message.icon, writer.uint32(170).fork()).join();
        }
        if (message.goldEffect !== "") {
            writer.uint32(194).string(message.goldEffect);
        }
        if (message.previewImage !== undefined) {
            exports.Image.encode(message.previewImage, writer.uint32(378).fork()).join();
        }
        if (message.giftPanelBanner !== undefined) {
            exports.Gift_GiftPanelBanner.encode(message.giftPanelBanner, writer.uint32(386).fork()).join();
        }
        if (message.isBroadcastGift !== false) {
            writer.uint32(392).bool(message.isBroadcastGift);
        }
        if (message.isEffectBefview !== false) {
            writer.uint32(400).bool(message.isEffectBefview);
        }
        if (message.isRandomGift !== false) {
            writer.uint32(408).bool(message.isRandomGift);
        }
        if (message.isBoxGift !== false) {
            writer.uint32(416).bool(message.isBoxGift);
        }
        if (message.canPutInGiftBox !== false) {
            writer.uint32(424).bool(message.canPutInGiftBox);
        }
        if (message.giftBoxInfo !== undefined) {
            exports.Gift_GiftBoxInfo.encode(message.giftBoxInfo, writer.uint32(434).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGift();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.giftImage = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.describe = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.duration = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.id = reader.int64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.forLinkMic = reader.bool();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.combo = reader.bool();
                    continue;
                }
                case 11: {
                    if (tag !== 88) {
                        break;
                    }
                    message.giftType = reader.int32();
                    continue;
                }
                case 12: {
                    if (tag !== 96) {
                        break;
                    }
                    message.diamondCount = reader.int32();
                    continue;
                }
                case 13: {
                    if (tag !== 104) {
                        break;
                    }
                    message.isDisplayedOnPanel = reader.bool();
                    continue;
                }
                case 14: {
                    if (tag !== 112) {
                        break;
                    }
                    message.primaryEffectId = reader.int64().toString();
                    continue;
                }
                case 15: {
                    if (tag !== 122) {
                        break;
                    }
                    message.giftLabelIcon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 16: {
                    if (tag !== 130) {
                        break;
                    }
                    message.giftName = reader.string();
                    continue;
                }
                case 21: {
                    if (tag !== 170) {
                        break;
                    }
                    message.icon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 24: {
                    if (tag !== 194) {
                        break;
                    }
                    message.goldEffect = reader.string();
                    continue;
                }
                case 47: {
                    if (tag !== 378) {
                        break;
                    }
                    message.previewImage = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 48: {
                    if (tag !== 386) {
                        break;
                    }
                    message.giftPanelBanner = exports.Gift_GiftPanelBanner.decode(reader, reader.uint32());
                    continue;
                }
                case 49: {
                    if (tag !== 392) {
                        break;
                    }
                    message.isBroadcastGift = reader.bool();
                    continue;
                }
                case 50: {
                    if (tag !== 400) {
                        break;
                    }
                    message.isEffectBefview = reader.bool();
                    continue;
                }
                case 51: {
                    if (tag !== 408) {
                        break;
                    }
                    message.isRandomGift = reader.bool();
                    continue;
                }
                case 52: {
                    if (tag !== 416) {
                        break;
                    }
                    message.isBoxGift = reader.bool();
                    continue;
                }
                case 53: {
                    if (tag !== 424) {
                        break;
                    }
                    message.canPutInGiftBox = reader.bool();
                    continue;
                }
                case 54: {
                    if (tag !== 434) {
                        break;
                    }
                    message.giftBoxInfo = exports.Gift_GiftBoxInfo.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Gift.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGift();
        message.giftImage = (object.giftImage !== undefined && object.giftImage !== null)
            ? exports.Image.fromPartial(object.giftImage)
            : undefined;
        message.describe = object.describe ?? "";
        message.duration = object.duration ?? 0;
        message.id = object.id ?? "0";
        message.forLinkMic = object.forLinkMic ?? false;
        message.combo = object.combo ?? false;
        message.giftType = object.giftType ?? 0;
        message.diamondCount = object.diamondCount ?? 0;
        message.isDisplayedOnPanel = object.isDisplayedOnPanel ?? false;
        message.primaryEffectId = object.primaryEffectId ?? "0";
        message.giftLabelIcon = (object.giftLabelIcon !== undefined && object.giftLabelIcon !== null)
            ? exports.Image.fromPartial(object.giftLabelIcon)
            : undefined;
        message.giftName = object.giftName ?? "";
        message.icon = (object.icon !== undefined && object.icon !== null) ? exports.Image.fromPartial(object.icon) : undefined;
        message.goldEffect = object.goldEffect ?? "";
        message.previewImage = (object.previewImage !== undefined && object.previewImage !== null)
            ? exports.Image.fromPartial(object.previewImage)
            : undefined;
        message.giftPanelBanner = (object.giftPanelBanner !== undefined && object.giftPanelBanner !== null)
            ? exports.Gift_GiftPanelBanner.fromPartial(object.giftPanelBanner)
            : undefined;
        message.isBroadcastGift = object.isBroadcastGift ?? false;
        message.isEffectBefview = object.isEffectBefview ?? false;
        message.isRandomGift = object.isRandomGift ?? false;
        message.isBoxGift = object.isBoxGift ?? false;
        message.canPutInGiftBox = object.canPutInGiftBox ?? false;
        message.giftBoxInfo = (object.giftBoxInfo !== undefined && object.giftBoxInfo !== null)
            ? exports.Gift_GiftBoxInfo.fromPartial(object.giftBoxInfo)
            : undefined;
        return message;
    },
};
function createBaseGift_GiftPanelBanner() {
    return {
        displayText: undefined,
        leftIcon: undefined,
        schemaUrl: "",
        bgColors: [],
        bannerLynxUrl: "",
        bannerPriority: 0,
        bannerLynxExtra: "",
        bgImage: undefined,
    };
}
exports.Gift_GiftPanelBanner = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.displayText !== undefined) {
            exports.Text.encode(message.displayText, writer.uint32(10).fork()).join();
        }
        if (message.leftIcon !== undefined) {
            exports.Image.encode(message.leftIcon, writer.uint32(18).fork()).join();
        }
        if (message.schemaUrl !== "") {
            writer.uint32(26).string(message.schemaUrl);
        }
        for (const v of message.bgColors) {
            writer.uint32(42).string(v);
        }
        if (message.bannerLynxUrl !== "") {
            writer.uint32(50).string(message.bannerLynxUrl);
        }
        if (message.bannerPriority !== 0) {
            writer.uint32(56).int32(message.bannerPriority);
        }
        if (message.bannerLynxExtra !== "") {
            writer.uint32(66).string(message.bannerLynxExtra);
        }
        if (message.bgImage !== undefined) {
            exports.Image.encode(message.bgImage, writer.uint32(74).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGift_GiftPanelBanner();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.displayText = exports.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.leftIcon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.schemaUrl = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.bgColors.push(reader.string());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.bannerLynxUrl = reader.string();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.bannerPriority = reader.int32();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.bannerLynxExtra = reader.string();
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.bgImage = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Gift_GiftPanelBanner.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGift_GiftPanelBanner();
        message.displayText = (object.displayText !== undefined && object.displayText !== null)
            ? exports.Text.fromPartial(object.displayText)
            : undefined;
        message.leftIcon = (object.leftIcon !== undefined && object.leftIcon !== null)
            ? exports.Image.fromPartial(object.leftIcon)
            : undefined;
        message.schemaUrl = object.schemaUrl ?? "";
        message.bgColors = object.bgColors?.map((e) => e) || [];
        message.bannerLynxUrl = object.bannerLynxUrl ?? "";
        message.bannerPriority = object.bannerPriority ?? 0;
        message.bannerLynxExtra = object.bannerLynxExtra ?? "";
        message.bgImage = (object.bgImage !== undefined && object.bgImage !== null)
            ? exports.Image.fromPartial(object.bgImage)
            : undefined;
        return message;
    },
};
function createBaseGift_BatchGiftInfo() {
    return { canBatchSend: false, availableCounts: [] };
}
exports.Gift_BatchGiftInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.canBatchSend !== false) {
            writer.uint32(8).bool(message.canBatchSend);
        }
        writer.uint32(18).fork();
        for (const v of message.availableCounts) {
            writer.int64(v);
        }
        writer.join();
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGift_BatchGiftInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.canBatchSend = reader.bool();
                    continue;
                }
                case 2: {
                    if (tag === 16) {
                        message.availableCounts.push(reader.int64().toString());
                        continue;
                    }
                    if (tag === 18) {
                        const end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) {
                            message.availableCounts.push(reader.int64().toString());
                        }
                        continue;
                    }
                    break;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Gift_BatchGiftInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGift_BatchGiftInfo();
        message.canBatchSend = object.canBatchSend ?? false;
        message.availableCounts = object.availableCounts?.map((e) => e) || [];
        return message;
    },
};
function createBaseGift_CrossScreenEffectInfo() {
    return { singleActionEffectIds: {}, actionEffectIds: {}, reactionEffectIds: {} };
}
exports.Gift_CrossScreenEffectInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        Object.entries(message.singleActionEffectIds).forEach(([key, value]) => {
            exports.Gift_CrossScreenEffectInfo_SingleActionEffectIdsEntry.encode({ key: key, value }, writer.uint32(10).fork())
                .join();
        });
        Object.entries(message.actionEffectIds).forEach(([key, value]) => {
            exports.Gift_CrossScreenEffectInfo_ActionEffectIdsEntry.encode({ key: key, value }, writer.uint32(18).fork())
                .join();
        });
        Object.entries(message.reactionEffectIds).forEach(([key, value]) => {
            exports.Gift_CrossScreenEffectInfo_ReactionEffectIdsEntry.encode({ key: key, value }, writer.uint32(26).fork())
                .join();
        });
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGift_CrossScreenEffectInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    const entry1 = exports.Gift_CrossScreenEffectInfo_SingleActionEffectIdsEntry.decode(reader, reader.uint32());
                    if (entry1.value !== undefined) {
                        message.singleActionEffectIds[entry1.key] = entry1.value;
                    }
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    const entry2 = exports.Gift_CrossScreenEffectInfo_ActionEffectIdsEntry.decode(reader, reader.uint32());
                    if (entry2.value !== undefined) {
                        message.actionEffectIds[entry2.key] = entry2.value;
                    }
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    const entry3 = exports.Gift_CrossScreenEffectInfo_ReactionEffectIdsEntry.decode(reader, reader.uint32());
                    if (entry3.value !== undefined) {
                        message.reactionEffectIds[entry3.key] = entry3.value;
                    }
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Gift_CrossScreenEffectInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGift_CrossScreenEffectInfo();
        message.singleActionEffectIds = Object.entries(object.singleActionEffectIds ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = globalThis.Number(value);
            }
            return acc;
        }, {});
        message.actionEffectIds = Object.entries(object.actionEffectIds ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = globalThis.Number(value);
            }
            return acc;
        }, {});
        message.reactionEffectIds = Object.entries(object.reactionEffectIds ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = globalThis.Number(value);
            }
            return acc;
        }, {});
        return message;
    },
};
function createBaseGift_CrossScreenEffectInfo_SingleActionEffectIdsEntry() {
    return { key: "0", value: 0 };
}
exports.Gift_CrossScreenEffectInfo_SingleActionEffectIdsEntry = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.key !== "0") {
            writer.uint32(8).int64(message.key);
        }
        if (message.value !== 0) {
            writer.uint32(16).int32(message.value);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGift_CrossScreenEffectInfo_SingleActionEffectIdsEntry();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.key = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.value = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Gift_CrossScreenEffectInfo_SingleActionEffectIdsEntry.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGift_CrossScreenEffectInfo_SingleActionEffectIdsEntry();
        message.key = object.key ?? "0";
        message.value = object.value ?? 0;
        return message;
    },
};
function createBaseGift_CrossScreenEffectInfo_ActionEffectIdsEntry() {
    return { key: "0", value: 0 };
}
exports.Gift_CrossScreenEffectInfo_ActionEffectIdsEntry = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.key !== "0") {
            writer.uint32(8).int64(message.key);
        }
        if (message.value !== 0) {
            writer.uint32(16).int32(message.value);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGift_CrossScreenEffectInfo_ActionEffectIdsEntry();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.key = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.value = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Gift_CrossScreenEffectInfo_ActionEffectIdsEntry.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGift_CrossScreenEffectInfo_ActionEffectIdsEntry();
        message.key = object.key ?? "0";
        message.value = object.value ?? 0;
        return message;
    },
};
function createBaseGift_CrossScreenEffectInfo_ReactionEffectIdsEntry() {
    return { key: "0", value: 0 };
}
exports.Gift_CrossScreenEffectInfo_ReactionEffectIdsEntry = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.key !== "0") {
            writer.uint32(8).int64(message.key);
        }
        if (message.value !== 0) {
            writer.uint32(16).int32(message.value);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGift_CrossScreenEffectInfo_ReactionEffectIdsEntry();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.key = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.value = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Gift_CrossScreenEffectInfo_ReactionEffectIdsEntry.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGift_CrossScreenEffectInfo_ReactionEffectIdsEntry();
        message.key = object.key ?? "0";
        message.value = object.value ?? 0;
        return message;
    },
};
function createBaseGift_GiftSponsorInfo() {
    return { sponsorId: "0", sponsorCount: "0", currentCount: "0", leftCountToSponsor: "0", canSponsor: false };
}
exports.Gift_GiftSponsorInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.sponsorId !== "0") {
            writer.uint32(8).int64(message.sponsorId);
        }
        if (message.sponsorCount !== "0") {
            writer.uint32(16).int64(message.sponsorCount);
        }
        if (message.currentCount !== "0") {
            writer.uint32(24).int64(message.currentCount);
        }
        if (message.leftCountToSponsor !== "0") {
            writer.uint32(32).int64(message.leftCountToSponsor);
        }
        if (message.canSponsor !== false) {
            writer.uint32(40).bool(message.canSponsor);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGift_GiftSponsorInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.sponsorId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.sponsorCount = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.currentCount = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.leftCountToSponsor = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.canSponsor = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Gift_GiftSponsorInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGift_GiftSponsorInfo();
        message.sponsorId = object.sponsorId ?? "0";
        message.sponsorCount = object.sponsorCount ?? "0";
        message.currentCount = object.currentCount ?? "0";
        message.leftCountToSponsor = object.leftCountToSponsor ?? "0";
        message.canSponsor = object.canSponsor ?? false;
        return message;
    },
};
function createBaseGift_UGGiftStructInfo() {
    return { isUgGift: false, ugPointsCost: "0" };
}
exports.Gift_UGGiftStructInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.isUgGift !== false) {
            writer.uint32(8).bool(message.isUgGift);
        }
        if (message.ugPointsCost !== "0") {
            writer.uint32(16).int64(message.ugPointsCost);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGift_UGGiftStructInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.isUgGift = reader.bool();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.ugPointsCost = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Gift_UGGiftStructInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGift_UGGiftStructInfo();
        message.isUgGift = object.isUgGift ?? false;
        message.ugPointsCost = object.ugPointsCost ?? "0";
        return message;
    },
};
function createBaseGift_GiftSkin() {
    return { giftSkinId: "0", giftSkinName: "", staticImage: undefined, animatedImage: undefined };
}
exports.Gift_GiftSkin = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.giftSkinId !== "0") {
            writer.uint32(8).int64(message.giftSkinId);
        }
        if (message.giftSkinName !== "") {
            writer.uint32(18).string(message.giftSkinName);
        }
        if (message.staticImage !== undefined) {
            exports.Image.encode(message.staticImage, writer.uint32(26).fork()).join();
        }
        if (message.animatedImage !== undefined) {
            exports.Image.encode(message.animatedImage, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGift_GiftSkin();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.giftSkinId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.giftSkinName = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.staticImage = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.animatedImage = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Gift_GiftSkin.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGift_GiftSkin();
        message.giftSkinId = object.giftSkinId ?? "0";
        message.giftSkinName = object.giftSkinName ?? "";
        message.staticImage = (object.staticImage !== undefined && object.staticImage !== null)
            ? exports.Image.fromPartial(object.staticImage)
            : undefined;
        message.animatedImage = (object.animatedImage !== undefined && object.animatedImage !== null)
            ? exports.Image.fromPartial(object.animatedImage)
            : undefined;
        return message;
    },
};
function createBaseGift_GiftText() {
    return { giftTextId: "0", giftTextName: "" };
}
exports.Gift_GiftText = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.giftTextId !== "0") {
            writer.uint32(8).int64(message.giftTextId);
        }
        if (message.giftTextName !== "") {
            writer.uint32(18).string(message.giftTextName);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGift_GiftText();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.giftTextId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.giftTextName = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Gift_GiftText.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGift_GiftText();
        message.giftTextId = object.giftTextId ?? "0";
        message.giftTextName = object.giftTextName ?? "";
        return message;
    },
};
function createBaseGift_GiftSkinToGiftTextsInfo() {
    return { giftSkinId: "0", giftTextIds: [] };
}
exports.Gift_GiftSkinToGiftTextsInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.giftSkinId !== "0") {
            writer.uint32(8).int64(message.giftSkinId);
        }
        writer.uint32(18).fork();
        for (const v of message.giftTextIds) {
            writer.int64(v);
        }
        writer.join();
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGift_GiftSkinToGiftTextsInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.giftSkinId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag === 16) {
                        message.giftTextIds.push(reader.int64().toString());
                        continue;
                    }
                    if (tag === 18) {
                        const end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) {
                            message.giftTextIds.push(reader.int64().toString());
                        }
                        continue;
                    }
                    break;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Gift_GiftSkinToGiftTextsInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGift_GiftSkinToGiftTextsInfo();
        message.giftSkinId = object.giftSkinId ?? "0";
        message.giftTextIds = object.giftTextIds?.map((e) => e) || [];
        return message;
    },
};
function createBaseGift_GiftBoxInfo() {
    return { capacity: "0", isPrimaryBox: false, schemeUrl: "" };
}
exports.Gift_GiftBoxInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.capacity !== "0") {
            writer.uint32(8).int64(message.capacity);
        }
        if (message.isPrimaryBox !== false) {
            writer.uint32(16).bool(message.isPrimaryBox);
        }
        if (message.schemeUrl !== "") {
            writer.uint32(26).string(message.schemeUrl);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGift_GiftBoxInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.capacity = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.isPrimaryBox = reader.bool();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.schemeUrl = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Gift_GiftBoxInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGift_GiftBoxInfo();
        message.capacity = object.capacity ?? "0";
        message.isPrimaryBox = object.isPrimaryBox ?? false;
        message.schemeUrl = object.schemeUrl ?? "";
        return message;
    },
};
function createBaseUser() {
    return {
        userId: "0",
        nickname: "",
        bioDescription: "",
        profilePicture: undefined,
        profilePictureMedium: undefined,
        profilePictureLarge: undefined,
        verified: false,
        status: 0,
        createTime: "0",
        modifyTime: "0",
        secret: 0,
        shareQrcodeUri: "",
        badgeImageList: [],
        followInfo: undefined,
        userHonor: undefined,
        fansClub: undefined,
        border: undefined,
        specialId: "",
        avatarBorder: undefined,
        medal: undefined,
        userBadges: [],
        newUserBadges: [],
        topVipNo: 0,
        userAttr: undefined,
        ownRoom: undefined,
        payScore: "0",
        fanTicketCount: "0",
        anchorInfo: undefined,
        linkMicStats: 0,
        uniqueId: "",
        enableShowCommerceSale: false,
        withFusionShopEntry: false,
        payScores: "0",
        anchorLevel: undefined,
        verifiedContent: "",
        authorInfo: undefined,
        topFans: [],
        secUid: "",
        userRole: 0,
        rewardInfo: undefined,
        personalCard: undefined,
        authenticationInfo: undefined,
        mediaBadgeImageList: [],
        commerceWebcastConfigIds: [],
        borders: [],
        comboBadgeInfo: undefined,
        subscribeInfo: undefined,
        badges: [],
        mintTypeLabel: [],
        fansClubInfo: undefined,
        allowFindByContacts: false,
        allowOthersDownloadVideo: false,
        allowOthersDownloadWhenSharingVideo: false,
        allowShareShowProfile: false,
        allowShowInGossip: false,
        allowShowMyAction: false,
        allowStrangeComment: false,
        allowUnfollowerComment: false,
        allowUseLinkmic: false,
        avatarJpg: undefined,
        backgroundImgUrl: "",
        blockStatus: 0,
        commentRestrict: 0,
        constellation: "",
        disableIchat: 0,
        enableIchatImg: "0",
        exp: 0,
        foldStrangerChat: false,
        followStatus: "0",
        ichatRestrictType: 0,
        idStr: "",
        isFollower: false,
        isFollowing: false,
        needProfileGuide: false,
        pushCommentStatus: false,
        pushDigg: false,
        pushFollow: false,
        pushFriendAction: false,
        pushIchat: false,
        pushStatus: false,
        pushVideoPost: false,
        pushVideoRecommend: false,
        verifiedReason: "",
        enableCarManagementPermission: false,
        upcomingEventList: [],
        scmLabel: "",
        ecommerceEntrance: undefined,
        isBlock: false,
        isSubscribe: false,
        isAnchorMarked: false,
    };
}
exports.User = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.userId !== "0") {
            writer.uint32(8).int64(message.userId);
        }
        if (message.nickname !== "") {
            writer.uint32(26).string(message.nickname);
        }
        if (message.bioDescription !== "") {
            writer.uint32(42).string(message.bioDescription);
        }
        if (message.profilePicture !== undefined) {
            exports.Image.encode(message.profilePicture, writer.uint32(74).fork()).join();
        }
        if (message.profilePictureMedium !== undefined) {
            exports.Image.encode(message.profilePictureMedium, writer.uint32(82).fork()).join();
        }
        if (message.profilePictureLarge !== undefined) {
            exports.Image.encode(message.profilePictureLarge, writer.uint32(90).fork()).join();
        }
        if (message.verified !== false) {
            writer.uint32(96).bool(message.verified);
        }
        if (message.status !== 0) {
            writer.uint32(120).int32(message.status);
        }
        if (message.createTime !== "0") {
            writer.uint32(128).int64(message.createTime);
        }
        if (message.modifyTime !== "0") {
            writer.uint32(136).int64(message.modifyTime);
        }
        if (message.secret !== 0) {
            writer.uint32(144).int32(message.secret);
        }
        if (message.shareQrcodeUri !== "") {
            writer.uint32(154).string(message.shareQrcodeUri);
        }
        for (const v of message.badgeImageList) {
            exports.Image.encode(v, writer.uint32(170).fork()).join();
        }
        if (message.followInfo !== undefined) {
            exports.User_FollowInfo.encode(message.followInfo, writer.uint32(178).fork()).join();
        }
        if (message.userHonor !== undefined) {
            exports.UserHonor.encode(message.userHonor, writer.uint32(186).fork()).join();
        }
        if (message.fansClub !== undefined) {
            exports.FansClubMember.encode(message.fansClub, writer.uint32(194).fork()).join();
        }
        if (message.border !== undefined) {
            exports.BorderInfo.encode(message.border, writer.uint32(202).fork()).join();
        }
        if (message.specialId !== "") {
            writer.uint32(210).string(message.specialId);
        }
        if (message.avatarBorder !== undefined) {
            exports.Image.encode(message.avatarBorder, writer.uint32(218).fork()).join();
        }
        if (message.medal !== undefined) {
            exports.Image.encode(message.medal, writer.uint32(226).fork()).join();
        }
        for (const v of message.userBadges) {
            exports.Image.encode(v, writer.uint32(234).fork()).join();
        }
        for (const v of message.newUserBadges) {
            exports.Image.encode(v, writer.uint32(242).fork()).join();
        }
        if (message.topVipNo !== 0) {
            writer.uint32(248).int32(message.topVipNo);
        }
        if (message.userAttr !== undefined) {
            exports.User_UserAttr.encode(message.userAttr, writer.uint32(258).fork()).join();
        }
        if (message.ownRoom !== undefined) {
            exports.User_OwnRoom.encode(message.ownRoom, writer.uint32(266).fork()).join();
        }
        if (message.payScore !== "0") {
            writer.uint32(272).int64(message.payScore);
        }
        if (message.fanTicketCount !== "0") {
            writer.uint32(280).int64(message.fanTicketCount);
        }
        if (message.anchorInfo !== undefined) {
            exports.User_AnchorLevel.encode(message.anchorInfo, writer.uint32(290).fork()).join();
        }
        if (message.linkMicStats !== 0) {
            writer.uint32(296).int32(message.linkMicStats);
        }
        if (message.uniqueId !== "") {
            writer.uint32(306).string(message.uniqueId);
        }
        if (message.enableShowCommerceSale !== false) {
            writer.uint32(312).bool(message.enableShowCommerceSale);
        }
        if (message.withFusionShopEntry !== false) {
            writer.uint32(320).bool(message.withFusionShopEntry);
        }
        if (message.payScores !== "0") {
            writer.uint32(328).int64(message.payScores);
        }
        if (message.anchorLevel !== undefined) {
            exports.User_AnchorLevel.encode(message.anchorLevel, writer.uint32(338).fork()).join();
        }
        if (message.verifiedContent !== "") {
            writer.uint32(346).string(message.verifiedContent);
        }
        if (message.authorInfo !== undefined) {
            exports.Author.encode(message.authorInfo, writer.uint32(354).fork()).join();
        }
        for (const v of message.topFans) {
            exports.User.encode(v, writer.uint32(362).fork()).join();
        }
        if (message.secUid !== "") {
            writer.uint32(370).string(message.secUid);
        }
        if (message.userRole !== 0) {
            writer.uint32(376).int32(message.userRole);
        }
        if (message.rewardInfo !== undefined) {
            exports.User_ActivityInfo.encode(message.rewardInfo, writer.uint32(394).fork()).join();
        }
        if (message.personalCard !== undefined) {
            exports.Image.encode(message.personalCard, writer.uint32(418).fork()).join();
        }
        if (message.authenticationInfo !== undefined) {
            exports.User_AuthenticationInfo.encode(message.authenticationInfo, writer.uint32(426).fork()).join();
        }
        for (const v of message.mediaBadgeImageList) {
            exports.Image.encode(v, writer.uint32(458).fork()).join();
        }
        writer.uint32(482).fork();
        for (const v of message.commerceWebcastConfigIds) {
            writer.int64(v);
        }
        writer.join();
        for (const v of message.borders) {
            exports.BorderInfo.encode(v, writer.uint32(490).fork()).join();
        }
        if (message.comboBadgeInfo !== undefined) {
            exports.User_ComboBadgeInfo.encode(message.comboBadgeInfo, writer.uint32(498).fork()).join();
        }
        if (message.subscribeInfo !== undefined) {
            exports.User_SubscribeInfo.encode(message.subscribeInfo, writer.uint32(506).fork()).join();
        }
        for (const v of message.badges) {
            exports.BadgeStruct.encode(v, writer.uint32(514).fork()).join();
        }
        writer.uint32(522).fork();
        for (const v of message.mintTypeLabel) {
            writer.int64(v);
        }
        writer.join();
        if (message.fansClubInfo !== undefined) {
            exports.User_FansClubInfo.encode(message.fansClubInfo, writer.uint32(530).fork()).join();
        }
        if (message.allowFindByContacts !== false) {
            writer.uint32(8016).bool(message.allowFindByContacts);
        }
        if (message.allowOthersDownloadVideo !== false) {
            writer.uint32(8024).bool(message.allowOthersDownloadVideo);
        }
        if (message.allowOthersDownloadWhenSharingVideo !== false) {
            writer.uint32(8032).bool(message.allowOthersDownloadWhenSharingVideo);
        }
        if (message.allowShareShowProfile !== false) {
            writer.uint32(8040).bool(message.allowShareShowProfile);
        }
        if (message.allowShowInGossip !== false) {
            writer.uint32(8048).bool(message.allowShowInGossip);
        }
        if (message.allowShowMyAction !== false) {
            writer.uint32(8056).bool(message.allowShowMyAction);
        }
        if (message.allowStrangeComment !== false) {
            writer.uint32(8064).bool(message.allowStrangeComment);
        }
        if (message.allowUnfollowerComment !== false) {
            writer.uint32(8072).bool(message.allowUnfollowerComment);
        }
        if (message.allowUseLinkmic !== false) {
            writer.uint32(8080).bool(message.allowUseLinkmic);
        }
        if (message.avatarJpg !== undefined) {
            exports.Image.encode(message.avatarJpg, writer.uint32(8098).fork()).join();
        }
        if (message.backgroundImgUrl !== "") {
            writer.uint32(8106).string(message.backgroundImgUrl);
        }
        if (message.blockStatus !== 0) {
            writer.uint32(8128).int32(message.blockStatus);
        }
        if (message.commentRestrict !== 0) {
            writer.uint32(8136).int32(message.commentRestrict);
        }
        if (message.constellation !== "") {
            writer.uint32(8146).string(message.constellation);
        }
        if (message.disableIchat !== 0) {
            writer.uint32(8152).int32(message.disableIchat);
        }
        if (message.enableIchatImg !== "0") {
            writer.uint32(8160).int64(message.enableIchatImg);
        }
        if (message.exp !== 0) {
            writer.uint32(8168).int32(message.exp);
        }
        if (message.foldStrangerChat !== false) {
            writer.uint32(8184).bool(message.foldStrangerChat);
        }
        if (message.followStatus !== "0") {
            writer.uint32(8192).int64(message.followStatus);
        }
        if (message.ichatRestrictType !== 0) {
            writer.uint32(8216).int32(message.ichatRestrictType);
        }
        if (message.idStr !== "") {
            writer.uint32(8226).string(message.idStr);
        }
        if (message.isFollower !== false) {
            writer.uint32(8232).bool(message.isFollower);
        }
        if (message.isFollowing !== false) {
            writer.uint32(8240).bool(message.isFollowing);
        }
        if (message.needProfileGuide !== false) {
            writer.uint32(8248).bool(message.needProfileGuide);
        }
        if (message.pushCommentStatus !== false) {
            writer.uint32(8264).bool(message.pushCommentStatus);
        }
        if (message.pushDigg !== false) {
            writer.uint32(8272).bool(message.pushDigg);
        }
        if (message.pushFollow !== false) {
            writer.uint32(8280).bool(message.pushFollow);
        }
        if (message.pushFriendAction !== false) {
            writer.uint32(8288).bool(message.pushFriendAction);
        }
        if (message.pushIchat !== false) {
            writer.uint32(8296).bool(message.pushIchat);
        }
        if (message.pushStatus !== false) {
            writer.uint32(8304).bool(message.pushStatus);
        }
        if (message.pushVideoPost !== false) {
            writer.uint32(8312).bool(message.pushVideoPost);
        }
        if (message.pushVideoRecommend !== false) {
            writer.uint32(8320).bool(message.pushVideoRecommend);
        }
        if (message.verifiedReason !== "") {
            writer.uint32(8346).string(message.verifiedReason);
        }
        if (message.enableCarManagementPermission !== false) {
            writer.uint32(8352).bool(message.enableCarManagementPermission);
        }
        for (const v of message.upcomingEventList) {
            exports.User_LiveEventInfo.encode(v, writer.uint32(8362).fork()).join();
        }
        if (message.scmLabel !== "") {
            writer.uint32(8370).string(message.scmLabel);
        }
        if (message.ecommerceEntrance !== undefined) {
            exports.User_EcommerceEntrance.encode(message.ecommerceEntrance, writer.uint32(8378).fork()).join();
        }
        if (message.isBlock !== false) {
            writer.uint32(8384).bool(message.isBlock);
        }
        if (message.isSubscribe !== false) {
            writer.uint32(8720).bool(message.isSubscribe);
        }
        if (message.isAnchorMarked !== false) {
            writer.uint32(8728).bool(message.isAnchorMarked);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.userId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.nickname = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.bioDescription = reader.string();
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.profilePicture = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.profilePictureMedium = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.profilePictureLarge = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 12: {
                    if (tag !== 96) {
                        break;
                    }
                    message.verified = reader.bool();
                    continue;
                }
                case 15: {
                    if (tag !== 120) {
                        break;
                    }
                    message.status = reader.int32();
                    continue;
                }
                case 16: {
                    if (tag !== 128) {
                        break;
                    }
                    message.createTime = reader.int64().toString();
                    continue;
                }
                case 17: {
                    if (tag !== 136) {
                        break;
                    }
                    message.modifyTime = reader.int64().toString();
                    continue;
                }
                case 18: {
                    if (tag !== 144) {
                        break;
                    }
                    message.secret = reader.int32();
                    continue;
                }
                case 19: {
                    if (tag !== 154) {
                        break;
                    }
                    message.shareQrcodeUri = reader.string();
                    continue;
                }
                case 21: {
                    if (tag !== 170) {
                        break;
                    }
                    message.badgeImageList.push(exports.Image.decode(reader, reader.uint32()));
                    continue;
                }
                case 22: {
                    if (tag !== 178) {
                        break;
                    }
                    message.followInfo = exports.User_FollowInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 23: {
                    if (tag !== 186) {
                        break;
                    }
                    message.userHonor = exports.UserHonor.decode(reader, reader.uint32());
                    continue;
                }
                case 24: {
                    if (tag !== 194) {
                        break;
                    }
                    message.fansClub = exports.FansClubMember.decode(reader, reader.uint32());
                    continue;
                }
                case 25: {
                    if (tag !== 202) {
                        break;
                    }
                    message.border = exports.BorderInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 26: {
                    if (tag !== 210) {
                        break;
                    }
                    message.specialId = reader.string();
                    continue;
                }
                case 27: {
                    if (tag !== 218) {
                        break;
                    }
                    message.avatarBorder = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 28: {
                    if (tag !== 226) {
                        break;
                    }
                    message.medal = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 29: {
                    if (tag !== 234) {
                        break;
                    }
                    message.userBadges.push(exports.Image.decode(reader, reader.uint32()));
                    continue;
                }
                case 30: {
                    if (tag !== 242) {
                        break;
                    }
                    message.newUserBadges.push(exports.Image.decode(reader, reader.uint32()));
                    continue;
                }
                case 31: {
                    if (tag !== 248) {
                        break;
                    }
                    message.topVipNo = reader.int32();
                    continue;
                }
                case 32: {
                    if (tag !== 258) {
                        break;
                    }
                    message.userAttr = exports.User_UserAttr.decode(reader, reader.uint32());
                    continue;
                }
                case 33: {
                    if (tag !== 266) {
                        break;
                    }
                    message.ownRoom = exports.User_OwnRoom.decode(reader, reader.uint32());
                    continue;
                }
                case 34: {
                    if (tag !== 272) {
                        break;
                    }
                    message.payScore = reader.int64().toString();
                    continue;
                }
                case 35: {
                    if (tag !== 280) {
                        break;
                    }
                    message.fanTicketCount = reader.int64().toString();
                    continue;
                }
                case 36: {
                    if (tag !== 290) {
                        break;
                    }
                    message.anchorInfo = exports.User_AnchorLevel.decode(reader, reader.uint32());
                    continue;
                }
                case 37: {
                    if (tag !== 296) {
                        break;
                    }
                    message.linkMicStats = reader.int32();
                    continue;
                }
                case 38: {
                    if (tag !== 306) {
                        break;
                    }
                    message.uniqueId = reader.string();
                    continue;
                }
                case 39: {
                    if (tag !== 312) {
                        break;
                    }
                    message.enableShowCommerceSale = reader.bool();
                    continue;
                }
                case 40: {
                    if (tag !== 320) {
                        break;
                    }
                    message.withFusionShopEntry = reader.bool();
                    continue;
                }
                case 41: {
                    if (tag !== 328) {
                        break;
                    }
                    message.payScores = reader.int64().toString();
                    continue;
                }
                case 42: {
                    if (tag !== 338) {
                        break;
                    }
                    message.anchorLevel = exports.User_AnchorLevel.decode(reader, reader.uint32());
                    continue;
                }
                case 43: {
                    if (tag !== 346) {
                        break;
                    }
                    message.verifiedContent = reader.string();
                    continue;
                }
                case 44: {
                    if (tag !== 354) {
                        break;
                    }
                    message.authorInfo = exports.Author.decode(reader, reader.uint32());
                    continue;
                }
                case 45: {
                    if (tag !== 362) {
                        break;
                    }
                    message.topFans.push(exports.User.decode(reader, reader.uint32()));
                    continue;
                }
                case 46: {
                    if (tag !== 370) {
                        break;
                    }
                    message.secUid = reader.string();
                    continue;
                }
                case 47: {
                    if (tag !== 376) {
                        break;
                    }
                    message.userRole = reader.int32();
                    continue;
                }
                case 49: {
                    if (tag !== 394) {
                        break;
                    }
                    message.rewardInfo = exports.User_ActivityInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 52: {
                    if (tag !== 418) {
                        break;
                    }
                    message.personalCard = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 53: {
                    if (tag !== 426) {
                        break;
                    }
                    message.authenticationInfo = exports.User_AuthenticationInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 57: {
                    if (tag !== 458) {
                        break;
                    }
                    message.mediaBadgeImageList.push(exports.Image.decode(reader, reader.uint32()));
                    continue;
                }
                case 60: {
                    if (tag === 480) {
                        message.commerceWebcastConfigIds.push(reader.int64().toString());
                        continue;
                    }
                    if (tag === 482) {
                        const end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) {
                            message.commerceWebcastConfigIds.push(reader.int64().toString());
                        }
                        continue;
                    }
                    break;
                }
                case 61: {
                    if (tag !== 490) {
                        break;
                    }
                    message.borders.push(exports.BorderInfo.decode(reader, reader.uint32()));
                    continue;
                }
                case 62: {
                    if (tag !== 498) {
                        break;
                    }
                    message.comboBadgeInfo = exports.User_ComboBadgeInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 63: {
                    if (tag !== 506) {
                        break;
                    }
                    message.subscribeInfo = exports.User_SubscribeInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 64: {
                    if (tag !== 514) {
                        break;
                    }
                    message.badges.push(exports.BadgeStruct.decode(reader, reader.uint32()));
                    continue;
                }
                case 65: {
                    if (tag === 520) {
                        message.mintTypeLabel.push(reader.int64().toString());
                        continue;
                    }
                    if (tag === 522) {
                        const end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) {
                            message.mintTypeLabel.push(reader.int64().toString());
                        }
                        continue;
                    }
                    break;
                }
                case 66: {
                    if (tag !== 530) {
                        break;
                    }
                    message.fansClubInfo = exports.User_FansClubInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 1002: {
                    if (tag !== 8016) {
                        break;
                    }
                    message.allowFindByContacts = reader.bool();
                    continue;
                }
                case 1003: {
                    if (tag !== 8024) {
                        break;
                    }
                    message.allowOthersDownloadVideo = reader.bool();
                    continue;
                }
                case 1004: {
                    if (tag !== 8032) {
                        break;
                    }
                    message.allowOthersDownloadWhenSharingVideo = reader.bool();
                    continue;
                }
                case 1005: {
                    if (tag !== 8040) {
                        break;
                    }
                    message.allowShareShowProfile = reader.bool();
                    continue;
                }
                case 1006: {
                    if (tag !== 8048) {
                        break;
                    }
                    message.allowShowInGossip = reader.bool();
                    continue;
                }
                case 1007: {
                    if (tag !== 8056) {
                        break;
                    }
                    message.allowShowMyAction = reader.bool();
                    continue;
                }
                case 1008: {
                    if (tag !== 8064) {
                        break;
                    }
                    message.allowStrangeComment = reader.bool();
                    continue;
                }
                case 1009: {
                    if (tag !== 8072) {
                        break;
                    }
                    message.allowUnfollowerComment = reader.bool();
                    continue;
                }
                case 1010: {
                    if (tag !== 8080) {
                        break;
                    }
                    message.allowUseLinkmic = reader.bool();
                    continue;
                }
                case 1012: {
                    if (tag !== 8098) {
                        break;
                    }
                    message.avatarJpg = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 1013: {
                    if (tag !== 8106) {
                        break;
                    }
                    message.backgroundImgUrl = reader.string();
                    continue;
                }
                case 1016: {
                    if (tag !== 8128) {
                        break;
                    }
                    message.blockStatus = reader.int32();
                    continue;
                }
                case 1017: {
                    if (tag !== 8136) {
                        break;
                    }
                    message.commentRestrict = reader.int32();
                    continue;
                }
                case 1018: {
                    if (tag !== 8146) {
                        break;
                    }
                    message.constellation = reader.string();
                    continue;
                }
                case 1019: {
                    if (tag !== 8152) {
                        break;
                    }
                    message.disableIchat = reader.int32();
                    continue;
                }
                case 1020: {
                    if (tag !== 8160) {
                        break;
                    }
                    message.enableIchatImg = reader.int64().toString();
                    continue;
                }
                case 1021: {
                    if (tag !== 8168) {
                        break;
                    }
                    message.exp = reader.int32();
                    continue;
                }
                case 1023: {
                    if (tag !== 8184) {
                        break;
                    }
                    message.foldStrangerChat = reader.bool();
                    continue;
                }
                case 1024: {
                    if (tag !== 8192) {
                        break;
                    }
                    message.followStatus = reader.int64().toString();
                    continue;
                }
                case 1027: {
                    if (tag !== 8216) {
                        break;
                    }
                    message.ichatRestrictType = reader.int32();
                    continue;
                }
                case 1028: {
                    if (tag !== 8226) {
                        break;
                    }
                    message.idStr = reader.string();
                    continue;
                }
                case 1029: {
                    if (tag !== 8232) {
                        break;
                    }
                    message.isFollower = reader.bool();
                    continue;
                }
                case 1030: {
                    if (tag !== 8240) {
                        break;
                    }
                    message.isFollowing = reader.bool();
                    continue;
                }
                case 1031: {
                    if (tag !== 8248) {
                        break;
                    }
                    message.needProfileGuide = reader.bool();
                    continue;
                }
                case 1033: {
                    if (tag !== 8264) {
                        break;
                    }
                    message.pushCommentStatus = reader.bool();
                    continue;
                }
                case 1034: {
                    if (tag !== 8272) {
                        break;
                    }
                    message.pushDigg = reader.bool();
                    continue;
                }
                case 1035: {
                    if (tag !== 8280) {
                        break;
                    }
                    message.pushFollow = reader.bool();
                    continue;
                }
                case 1036: {
                    if (tag !== 8288) {
                        break;
                    }
                    message.pushFriendAction = reader.bool();
                    continue;
                }
                case 1037: {
                    if (tag !== 8296) {
                        break;
                    }
                    message.pushIchat = reader.bool();
                    continue;
                }
                case 1038: {
                    if (tag !== 8304) {
                        break;
                    }
                    message.pushStatus = reader.bool();
                    continue;
                }
                case 1039: {
                    if (tag !== 8312) {
                        break;
                    }
                    message.pushVideoPost = reader.bool();
                    continue;
                }
                case 1040: {
                    if (tag !== 8320) {
                        break;
                    }
                    message.pushVideoRecommend = reader.bool();
                    continue;
                }
                case 1043: {
                    if (tag !== 8346) {
                        break;
                    }
                    message.verifiedReason = reader.string();
                    continue;
                }
                case 1044: {
                    if (tag !== 8352) {
                        break;
                    }
                    message.enableCarManagementPermission = reader.bool();
                    continue;
                }
                case 1045: {
                    if (tag !== 8362) {
                        break;
                    }
                    message.upcomingEventList.push(exports.User_LiveEventInfo.decode(reader, reader.uint32()));
                    continue;
                }
                case 1046: {
                    if (tag !== 8370) {
                        break;
                    }
                    message.scmLabel = reader.string();
                    continue;
                }
                case 1047: {
                    if (tag !== 8378) {
                        break;
                    }
                    message.ecommerceEntrance = exports.User_EcommerceEntrance.decode(reader, reader.uint32());
                    continue;
                }
                case 1048: {
                    if (tag !== 8384) {
                        break;
                    }
                    message.isBlock = reader.bool();
                    continue;
                }
                case 1090: {
                    if (tag !== 8720) {
                        break;
                    }
                    message.isSubscribe = reader.bool();
                    continue;
                }
                case 1091: {
                    if (tag !== 8728) {
                        break;
                    }
                    message.isAnchorMarked = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser();
        message.userId = object.userId ?? "0";
        message.nickname = object.nickname ?? "";
        message.bioDescription = object.bioDescription ?? "";
        message.profilePicture = (object.profilePicture !== undefined && object.profilePicture !== null)
            ? exports.Image.fromPartial(object.profilePicture)
            : undefined;
        message.profilePictureMedium = (object.profilePictureMedium !== undefined && object.profilePictureMedium !== null)
            ? exports.Image.fromPartial(object.profilePictureMedium)
            : undefined;
        message.profilePictureLarge = (object.profilePictureLarge !== undefined && object.profilePictureLarge !== null)
            ? exports.Image.fromPartial(object.profilePictureLarge)
            : undefined;
        message.verified = object.verified ?? false;
        message.status = object.status ?? 0;
        message.createTime = object.createTime ?? "0";
        message.modifyTime = object.modifyTime ?? "0";
        message.secret = object.secret ?? 0;
        message.shareQrcodeUri = object.shareQrcodeUri ?? "";
        message.badgeImageList = object.badgeImageList?.map((e) => exports.Image.fromPartial(e)) || [];
        message.followInfo = (object.followInfo !== undefined && object.followInfo !== null)
            ? exports.User_FollowInfo.fromPartial(object.followInfo)
            : undefined;
        message.userHonor = (object.userHonor !== undefined && object.userHonor !== null)
            ? exports.UserHonor.fromPartial(object.userHonor)
            : undefined;
        message.fansClub = (object.fansClub !== undefined && object.fansClub !== null)
            ? exports.FansClubMember.fromPartial(object.fansClub)
            : undefined;
        message.border = (object.border !== undefined && object.border !== null)
            ? exports.BorderInfo.fromPartial(object.border)
            : undefined;
        message.specialId = object.specialId ?? "";
        message.avatarBorder = (object.avatarBorder !== undefined && object.avatarBorder !== null)
            ? exports.Image.fromPartial(object.avatarBorder)
            : undefined;
        message.medal = (object.medal !== undefined && object.medal !== null) ? exports.Image.fromPartial(object.medal) : undefined;
        message.userBadges = object.userBadges?.map((e) => exports.Image.fromPartial(e)) || [];
        message.newUserBadges = object.newUserBadges?.map((e) => exports.Image.fromPartial(e)) || [];
        message.topVipNo = object.topVipNo ?? 0;
        message.userAttr = (object.userAttr !== undefined && object.userAttr !== null)
            ? exports.User_UserAttr.fromPartial(object.userAttr)
            : undefined;
        message.ownRoom = (object.ownRoom !== undefined && object.ownRoom !== null)
            ? exports.User_OwnRoom.fromPartial(object.ownRoom)
            : undefined;
        message.payScore = object.payScore ?? "0";
        message.fanTicketCount = object.fanTicketCount ?? "0";
        message.anchorInfo = (object.anchorInfo !== undefined && object.anchorInfo !== null)
            ? exports.User_AnchorLevel.fromPartial(object.anchorInfo)
            : undefined;
        message.linkMicStats = object.linkMicStats ?? 0;
        message.uniqueId = object.uniqueId ?? "";
        message.enableShowCommerceSale = object.enableShowCommerceSale ?? false;
        message.withFusionShopEntry = object.withFusionShopEntry ?? false;
        message.payScores = object.payScores ?? "0";
        message.anchorLevel = (object.anchorLevel !== undefined && object.anchorLevel !== null)
            ? exports.User_AnchorLevel.fromPartial(object.anchorLevel)
            : undefined;
        message.verifiedContent = object.verifiedContent ?? "";
        message.authorInfo = (object.authorInfo !== undefined && object.authorInfo !== null)
            ? exports.Author.fromPartial(object.authorInfo)
            : undefined;
        message.topFans = object.topFans?.map((e) => exports.User.fromPartial(e)) || [];
        message.secUid = object.secUid ?? "";
        message.userRole = object.userRole ?? 0;
        message.rewardInfo = (object.rewardInfo !== undefined && object.rewardInfo !== null)
            ? exports.User_ActivityInfo.fromPartial(object.rewardInfo)
            : undefined;
        message.personalCard = (object.personalCard !== undefined && object.personalCard !== null)
            ? exports.Image.fromPartial(object.personalCard)
            : undefined;
        message.authenticationInfo = (object.authenticationInfo !== undefined && object.authenticationInfo !== null)
            ? exports.User_AuthenticationInfo.fromPartial(object.authenticationInfo)
            : undefined;
        message.mediaBadgeImageList = object.mediaBadgeImageList?.map((e) => exports.Image.fromPartial(e)) || [];
        message.commerceWebcastConfigIds = object.commerceWebcastConfigIds?.map((e) => e) || [];
        message.borders = object.borders?.map((e) => exports.BorderInfo.fromPartial(e)) || [];
        message.comboBadgeInfo = (object.comboBadgeInfo !== undefined && object.comboBadgeInfo !== null)
            ? exports.User_ComboBadgeInfo.fromPartial(object.comboBadgeInfo)
            : undefined;
        message.subscribeInfo = (object.subscribeInfo !== undefined && object.subscribeInfo !== null)
            ? exports.User_SubscribeInfo.fromPartial(object.subscribeInfo)
            : undefined;
        message.badges = object.badges?.map((e) => exports.BadgeStruct.fromPartial(e)) || [];
        message.mintTypeLabel = object.mintTypeLabel?.map((e) => e) || [];
        message.fansClubInfo = (object.fansClubInfo !== undefined && object.fansClubInfo !== null)
            ? exports.User_FansClubInfo.fromPartial(object.fansClubInfo)
            : undefined;
        message.allowFindByContacts = object.allowFindByContacts ?? false;
        message.allowOthersDownloadVideo = object.allowOthersDownloadVideo ?? false;
        message.allowOthersDownloadWhenSharingVideo = object.allowOthersDownloadWhenSharingVideo ?? false;
        message.allowShareShowProfile = object.allowShareShowProfile ?? false;
        message.allowShowInGossip = object.allowShowInGossip ?? false;
        message.allowShowMyAction = object.allowShowMyAction ?? false;
        message.allowStrangeComment = object.allowStrangeComment ?? false;
        message.allowUnfollowerComment = object.allowUnfollowerComment ?? false;
        message.allowUseLinkmic = object.allowUseLinkmic ?? false;
        message.avatarJpg = (object.avatarJpg !== undefined && object.avatarJpg !== null)
            ? exports.Image.fromPartial(object.avatarJpg)
            : undefined;
        message.backgroundImgUrl = object.backgroundImgUrl ?? "";
        message.blockStatus = object.blockStatus ?? 0;
        message.commentRestrict = object.commentRestrict ?? 0;
        message.constellation = object.constellation ?? "";
        message.disableIchat = object.disableIchat ?? 0;
        message.enableIchatImg = object.enableIchatImg ?? "0";
        message.exp = object.exp ?? 0;
        message.foldStrangerChat = object.foldStrangerChat ?? false;
        message.followStatus = object.followStatus ?? "0";
        message.ichatRestrictType = object.ichatRestrictType ?? 0;
        message.idStr = object.idStr ?? "";
        message.isFollower = object.isFollower ?? false;
        message.isFollowing = object.isFollowing ?? false;
        message.needProfileGuide = object.needProfileGuide ?? false;
        message.pushCommentStatus = object.pushCommentStatus ?? false;
        message.pushDigg = object.pushDigg ?? false;
        message.pushFollow = object.pushFollow ?? false;
        message.pushFriendAction = object.pushFriendAction ?? false;
        message.pushIchat = object.pushIchat ?? false;
        message.pushStatus = object.pushStatus ?? false;
        message.pushVideoPost = object.pushVideoPost ?? false;
        message.pushVideoRecommend = object.pushVideoRecommend ?? false;
        message.verifiedReason = object.verifiedReason ?? "";
        message.enableCarManagementPermission = object.enableCarManagementPermission ?? false;
        message.upcomingEventList = object.upcomingEventList?.map((e) => exports.User_LiveEventInfo.fromPartial(e)) || [];
        message.scmLabel = object.scmLabel ?? "";
        message.ecommerceEntrance = (object.ecommerceEntrance !== undefined && object.ecommerceEntrance !== null)
            ? exports.User_EcommerceEntrance.fromPartial(object.ecommerceEntrance)
            : undefined;
        message.isBlock = object.isBlock ?? false;
        message.isSubscribe = object.isSubscribe ?? false;
        message.isAnchorMarked = object.isAnchorMarked ?? false;
        return message;
    },
};
function createBaseUser_LiveEventInfo() {
    return {
        eventId: "0",
        startTime: "0",
        duration: "0",
        title: "",
        description: "",
        hasSubscribed: false,
        isPaidEvent: false,
        ticketAmount: "0",
        payMethod: "0",
    };
}
exports.User_LiveEventInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.eventId !== "0") {
            writer.uint32(8).int64(message.eventId);
        }
        if (message.startTime !== "0") {
            writer.uint32(16).int64(message.startTime);
        }
        if (message.duration !== "0") {
            writer.uint32(24).int64(message.duration);
        }
        if (message.title !== "") {
            writer.uint32(34).string(message.title);
        }
        if (message.description !== "") {
            writer.uint32(42).string(message.description);
        }
        if (message.hasSubscribed !== false) {
            writer.uint32(48).bool(message.hasSubscribed);
        }
        if (message.isPaidEvent !== false) {
            writer.uint32(56).bool(message.isPaidEvent);
        }
        if (message.ticketAmount !== "0") {
            writer.uint32(64).int64(message.ticketAmount);
        }
        if (message.payMethod !== "0") {
            writer.uint32(72).int64(message.payMethod);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_LiveEventInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.eventId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.startTime = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.duration = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.title = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.description = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.hasSubscribed = reader.bool();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.isPaidEvent = reader.bool();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.ticketAmount = reader.int64().toString();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.payMethod = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_LiveEventInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_LiveEventInfo();
        message.eventId = object.eventId ?? "0";
        message.startTime = object.startTime ?? "0";
        message.duration = object.duration ?? "0";
        message.title = object.title ?? "";
        message.description = object.description ?? "";
        message.hasSubscribed = object.hasSubscribed ?? false;
        message.isPaidEvent = object.isPaidEvent ?? false;
        message.ticketAmount = object.ticketAmount ?? "0";
        message.payMethod = object.payMethod ?? "0";
        return message;
    },
};
function createBaseUser_LiveEventInfo_WalletPackage() {
    return { iapId: "", usdPriceShow: "" };
}
exports.User_LiveEventInfo_WalletPackage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.iapId !== "") {
            writer.uint32(10).string(message.iapId);
        }
        if (message.usdPriceShow !== "") {
            writer.uint32(18).string(message.usdPriceShow);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_LiveEventInfo_WalletPackage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.iapId = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.usdPriceShow = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_LiveEventInfo_WalletPackage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_LiveEventInfo_WalletPackage();
        message.iapId = object.iapId ?? "";
        message.usdPriceShow = object.usdPriceShow ?? "";
        return message;
    },
};
function createBaseUser_ActivityInfo() {
    return { badge: undefined, storytag: undefined };
}
exports.User_ActivityInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.badge !== undefined) {
            exports.Image.encode(message.badge, writer.uint32(10).fork()).join();
        }
        if (message.storytag !== undefined) {
            exports.Image.encode(message.storytag, writer.uint32(18).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_ActivityInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.badge = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.storytag = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_ActivityInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_ActivityInfo();
        message.badge = (object.badge !== undefined && object.badge !== null) ? exports.Image.fromPartial(object.badge) : undefined;
        message.storytag = (object.storytag !== undefined && object.storytag !== null)
            ? exports.Image.fromPartial(object.storytag)
            : undefined;
        return message;
    },
};
function createBaseUser_AnchorLevel() {
    return {
        level: "0",
        experience: "0",
        lowestExperienceThisLevel: "0",
        highestExperienceThisLevel: "0",
        taskStartExperience: "0",
        taskStartTime: "0",
        taskDecreaseExperience: "0",
        taskTargetExperience: "0",
        taskEndTime: "0",
        profileDialogBg: undefined,
        profileDialogBgBack: undefined,
        stageLevel: undefined,
        smallIcon: undefined,
    };
}
exports.User_AnchorLevel = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.level !== "0") {
            writer.uint32(8).int64(message.level);
        }
        if (message.experience !== "0") {
            writer.uint32(16).int64(message.experience);
        }
        if (message.lowestExperienceThisLevel !== "0") {
            writer.uint32(24).int64(message.lowestExperienceThisLevel);
        }
        if (message.highestExperienceThisLevel !== "0") {
            writer.uint32(32).int64(message.highestExperienceThisLevel);
        }
        if (message.taskStartExperience !== "0") {
            writer.uint32(40).int64(message.taskStartExperience);
        }
        if (message.taskStartTime !== "0") {
            writer.uint32(48).int64(message.taskStartTime);
        }
        if (message.taskDecreaseExperience !== "0") {
            writer.uint32(56).int64(message.taskDecreaseExperience);
        }
        if (message.taskTargetExperience !== "0") {
            writer.uint32(64).int64(message.taskTargetExperience);
        }
        if (message.taskEndTime !== "0") {
            writer.uint32(72).int64(message.taskEndTime);
        }
        if (message.profileDialogBg !== undefined) {
            exports.Image.encode(message.profileDialogBg, writer.uint32(82).fork()).join();
        }
        if (message.profileDialogBgBack !== undefined) {
            exports.Image.encode(message.profileDialogBgBack, writer.uint32(90).fork()).join();
        }
        if (message.stageLevel !== undefined) {
            exports.Image.encode(message.stageLevel, writer.uint32(98).fork()).join();
        }
        if (message.smallIcon !== undefined) {
            exports.Image.encode(message.smallIcon, writer.uint32(106).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_AnchorLevel();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.level = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.experience = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.lowestExperienceThisLevel = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.highestExperienceThisLevel = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.taskStartExperience = reader.int64().toString();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.taskStartTime = reader.int64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.taskDecreaseExperience = reader.int64().toString();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.taskTargetExperience = reader.int64().toString();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.taskEndTime = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.profileDialogBg = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.profileDialogBgBack = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.stageLevel = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 13: {
                    if (tag !== 106) {
                        break;
                    }
                    message.smallIcon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_AnchorLevel.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_AnchorLevel();
        message.level = object.level ?? "0";
        message.experience = object.experience ?? "0";
        message.lowestExperienceThisLevel = object.lowestExperienceThisLevel ?? "0";
        message.highestExperienceThisLevel = object.highestExperienceThisLevel ?? "0";
        message.taskStartExperience = object.taskStartExperience ?? "0";
        message.taskStartTime = object.taskStartTime ?? "0";
        message.taskDecreaseExperience = object.taskDecreaseExperience ?? "0";
        message.taskTargetExperience = object.taskTargetExperience ?? "0";
        message.taskEndTime = object.taskEndTime ?? "0";
        message.profileDialogBg = (object.profileDialogBg !== undefined && object.profileDialogBg !== null)
            ? exports.Image.fromPartial(object.profileDialogBg)
            : undefined;
        message.profileDialogBgBack = (object.profileDialogBgBack !== undefined && object.profileDialogBgBack !== null)
            ? exports.Image.fromPartial(object.profileDialogBgBack)
            : undefined;
        message.stageLevel = (object.stageLevel !== undefined && object.stageLevel !== null)
            ? exports.Image.fromPartial(object.stageLevel)
            : undefined;
        message.smallIcon = (object.smallIcon !== undefined && object.smallIcon !== null)
            ? exports.Image.fromPartial(object.smallIcon)
            : undefined;
        return message;
    },
};
function createBaseUser_AuthenticationInfo() {
    return { customVerify: "", enterpriseVerifyReason: "", authenticationBadge: undefined };
}
exports.User_AuthenticationInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.customVerify !== "") {
            writer.uint32(10).string(message.customVerify);
        }
        if (message.enterpriseVerifyReason !== "") {
            writer.uint32(18).string(message.enterpriseVerifyReason);
        }
        if (message.authenticationBadge !== undefined) {
            exports.Image.encode(message.authenticationBadge, writer.uint32(26).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_AuthenticationInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.customVerify = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.enterpriseVerifyReason = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.authenticationBadge = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_AuthenticationInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_AuthenticationInfo();
        message.customVerify = object.customVerify ?? "";
        message.enterpriseVerifyReason = object.enterpriseVerifyReason ?? "";
        message.authenticationBadge = (object.authenticationBadge !== undefined && object.authenticationBadge !== null)
            ? exports.Image.fromPartial(object.authenticationBadge)
            : undefined;
        return message;
    },
};
function createBaseUser_AuthorStats() {
    return {
        videoTotalCount: "0",
        videoTotalPlayCount: "0",
        videoTotalShareCount: "0",
        videoTotalSeriesCount: "0",
        varietyShowPlayCount: "0",
        videoTotalFavoriteCount: "0",
    };
}
exports.User_AuthorStats = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.videoTotalCount !== "0") {
            writer.uint32(8).int64(message.videoTotalCount);
        }
        if (message.videoTotalPlayCount !== "0") {
            writer.uint32(16).int64(message.videoTotalPlayCount);
        }
        if (message.videoTotalShareCount !== "0") {
            writer.uint32(24).int64(message.videoTotalShareCount);
        }
        if (message.videoTotalSeriesCount !== "0") {
            writer.uint32(32).int64(message.videoTotalSeriesCount);
        }
        if (message.varietyShowPlayCount !== "0") {
            writer.uint32(40).int64(message.varietyShowPlayCount);
        }
        if (message.videoTotalFavoriteCount !== "0") {
            writer.uint32(48).int64(message.videoTotalFavoriteCount);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_AuthorStats();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.videoTotalCount = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.videoTotalPlayCount = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.videoTotalShareCount = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.videoTotalSeriesCount = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.varietyShowPlayCount = reader.int64().toString();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.videoTotalFavoriteCount = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_AuthorStats.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_AuthorStats();
        message.videoTotalCount = object.videoTotalCount ?? "0";
        message.videoTotalPlayCount = object.videoTotalPlayCount ?? "0";
        message.videoTotalShareCount = object.videoTotalShareCount ?? "0";
        message.videoTotalSeriesCount = object.videoTotalSeriesCount ?? "0";
        message.varietyShowPlayCount = object.varietyShowPlayCount ?? "0";
        message.videoTotalFavoriteCount = object.videoTotalFavoriteCount ?? "0";
        return message;
    },
};
function createBaseUser_Border() {
    return {
        icon: undefined,
        level: "0",
        source: "",
        profileDecorationRibbon: undefined,
        avatarBackgroundColor: "",
        avatarBackgroundBorderColor: "",
    };
}
exports.User_Border = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.icon !== undefined) {
            exports.Image.encode(message.icon, writer.uint32(10).fork()).join();
        }
        if (message.level !== "0") {
            writer.uint32(16).int64(message.level);
        }
        if (message.source !== "") {
            writer.uint32(26).string(message.source);
        }
        if (message.profileDecorationRibbon !== undefined) {
            exports.Image.encode(message.profileDecorationRibbon, writer.uint32(34).fork()).join();
        }
        if (message.avatarBackgroundColor !== "") {
            writer.uint32(58).string(message.avatarBackgroundColor);
        }
        if (message.avatarBackgroundBorderColor !== "") {
            writer.uint32(66).string(message.avatarBackgroundBorderColor);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_Border();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.icon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.level = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.source = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.profileDecorationRibbon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.avatarBackgroundColor = reader.string();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.avatarBackgroundBorderColor = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_Border.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_Border();
        message.icon = (object.icon !== undefined && object.icon !== null) ? exports.Image.fromPartial(object.icon) : undefined;
        message.level = object.level ?? "0";
        message.source = object.source ?? "";
        message.profileDecorationRibbon =
            (object.profileDecorationRibbon !== undefined && object.profileDecorationRibbon !== null)
                ? exports.Image.fromPartial(object.profileDecorationRibbon)
                : undefined;
        message.avatarBackgroundColor = object.avatarBackgroundColor ?? "";
        message.avatarBackgroundBorderColor = object.avatarBackgroundBorderColor ?? "";
        return message;
    },
};
function createBaseUser_ComboBadgeInfo() {
    return { icon: undefined, comboCount: "0" };
}
exports.User_ComboBadgeInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.icon !== undefined) {
            exports.Image.encode(message.icon, writer.uint32(10).fork()).join();
        }
        if (message.comboCount !== "0") {
            writer.uint32(16).int64(message.comboCount);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_ComboBadgeInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.icon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.comboCount = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_ComboBadgeInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_ComboBadgeInfo();
        message.icon = (object.icon !== undefined && object.icon !== null) ? exports.Image.fromPartial(object.icon) : undefined;
        message.comboCount = object.comboCount ?? "0";
        return message;
    },
};
function createBaseUser_EcommerceEntrance() {
    return { entranceType: 0, creatorType: 0, schema: "", shopEntranceInfo: undefined, showcaseEntranceInfo: undefined };
}
exports.User_EcommerceEntrance = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.entranceType !== 0) {
            writer.uint32(8).int32(message.entranceType);
        }
        if (message.creatorType !== 0) {
            writer.uint32(16).int32(message.creatorType);
        }
        if (message.schema !== "") {
            writer.uint32(26).string(message.schema);
        }
        if (message.shopEntranceInfo !== undefined) {
            exports.User_EcommerceEntrance_ShopEntranceInfo.encode(message.shopEntranceInfo, writer.uint32(34).fork()).join();
        }
        if (message.showcaseEntranceInfo !== undefined) {
            exports.User_EcommerceEntrance_ShowcaseEntranceInfo.encode(message.showcaseEntranceInfo, writer.uint32(42).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_EcommerceEntrance();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.entranceType = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.creatorType = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.schema = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.shopEntranceInfo = exports.User_EcommerceEntrance_ShopEntranceInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.showcaseEntranceInfo = exports.User_EcommerceEntrance_ShowcaseEntranceInfo.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_EcommerceEntrance.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_EcommerceEntrance();
        message.entranceType = object.entranceType ?? 0;
        message.creatorType = object.creatorType ?? 0;
        message.schema = object.schema ?? "";
        message.shopEntranceInfo = (object.shopEntranceInfo !== undefined && object.shopEntranceInfo !== null)
            ? exports.User_EcommerceEntrance_ShopEntranceInfo.fromPartial(object.shopEntranceInfo)
            : undefined;
        message.showcaseEntranceInfo = (object.showcaseEntranceInfo !== undefined && object.showcaseEntranceInfo !== null)
            ? exports.User_EcommerceEntrance_ShowcaseEntranceInfo.fromPartial(object.showcaseEntranceInfo)
            : undefined;
        return message;
    },
};
function createBaseUser_EcommerceEntrance_ShopEntranceInfo() {
    return {
        shopId: "",
        shopName: "",
        shopRating: "",
        storeLabel: undefined,
        formatSoldCount: "",
        soldCount: "0",
        expRatePercentile: 0,
        expRateTopDisplay: "",
        rateDisplayStyle: 0,
        showRateNotApplicable: false,
    };
}
exports.User_EcommerceEntrance_ShopEntranceInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.shopId !== "") {
            writer.uint32(10).string(message.shopId);
        }
        if (message.shopName !== "") {
            writer.uint32(18).string(message.shopName);
        }
        if (message.shopRating !== "") {
            writer.uint32(26).string(message.shopRating);
        }
        if (message.storeLabel !== undefined) {
            exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel.encode(message.storeLabel, writer.uint32(34).fork()).join();
        }
        if (message.formatSoldCount !== "") {
            writer.uint32(42).string(message.formatSoldCount);
        }
        if (message.soldCount !== "0") {
            writer.uint32(48).int64(message.soldCount);
        }
        if (message.expRatePercentile !== 0) {
            writer.uint32(56).int32(message.expRatePercentile);
        }
        if (message.expRateTopDisplay !== "") {
            writer.uint32(66).string(message.expRateTopDisplay);
        }
        if (message.rateDisplayStyle !== 0) {
            writer.uint32(72).int32(message.rateDisplayStyle);
        }
        if (message.showRateNotApplicable !== false) {
            writer.uint32(80).bool(message.showRateNotApplicable);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_EcommerceEntrance_ShopEntranceInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.shopId = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.shopName = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.shopRating = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.storeLabel = exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.formatSoldCount = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.soldCount = reader.int64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.expRatePercentile = reader.int32();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.expRateTopDisplay = reader.string();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.rateDisplayStyle = reader.int32();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.showRateNotApplicable = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_EcommerceEntrance_ShopEntranceInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_EcommerceEntrance_ShopEntranceInfo();
        message.shopId = object.shopId ?? "";
        message.shopName = object.shopName ?? "";
        message.shopRating = object.shopRating ?? "";
        message.storeLabel = (object.storeLabel !== undefined && object.storeLabel !== null)
            ? exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel.fromPartial(object.storeLabel)
            : undefined;
        message.formatSoldCount = object.formatSoldCount ?? "";
        message.soldCount = object.soldCount ?? "0";
        message.expRatePercentile = object.expRatePercentile ?? 0;
        message.expRateTopDisplay = object.expRateTopDisplay ?? "";
        message.rateDisplayStyle = object.rateDisplayStyle ?? 0;
        message.showRateNotApplicable = object.showRateNotApplicable ?? false;
        return message;
    },
};
function createBaseUser_EcommerceEntrance_ShopEntranceInfo_StoreLabel() {
    return { officialLabel: undefined, isBytemall: false };
}
exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.officialLabel !== undefined) {
            exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreOfficialLabel.encode(message.officialLabel, writer.uint32(10).fork()).join();
        }
        if (message.isBytemall !== false) {
            writer.uint32(16).bool(message.isBytemall);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_EcommerceEntrance_ShopEntranceInfo_StoreLabel();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.officialLabel = exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreOfficialLabel.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.isBytemall = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_EcommerceEntrance_ShopEntranceInfo_StoreLabel();
        message.officialLabel = (object.officialLabel !== undefined && object.officialLabel !== null)
            ? exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreOfficialLabel.fromPartial(object.officialLabel)
            : undefined;
        message.isBytemall = object.isBytemall ?? false;
        return message;
    },
};
function createBaseUser_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreOfficialLabel() {
    return { labelImageLight: undefined, labelImageDark: undefined, labelType: "0", labelTypeStr: "" };
}
exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreOfficialLabel = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.labelImageLight !== undefined) {
            exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreOfficialLabel_ShopLabelImage.encode(message.labelImageLight, writer.uint32(10).fork()).join();
        }
        if (message.labelImageDark !== undefined) {
            exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreOfficialLabel_ShopLabelImage.encode(message.labelImageDark, writer.uint32(18).fork()).join();
        }
        if (message.labelType !== "0") {
            writer.uint32(24).int64(message.labelType);
        }
        if (message.labelTypeStr !== "") {
            writer.uint32(34).string(message.labelTypeStr);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreOfficialLabel();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.labelImageLight = exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreOfficialLabel_ShopLabelImage
                        .decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.labelImageDark = exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreOfficialLabel_ShopLabelImage
                        .decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.labelType = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.labelTypeStr = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreOfficialLabel.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreOfficialLabel();
        message.labelImageLight = (object.labelImageLight !== undefined && object.labelImageLight !== null)
            ? exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreOfficialLabel_ShopLabelImage.fromPartial(object.labelImageLight)
            : undefined;
        message.labelImageDark = (object.labelImageDark !== undefined && object.labelImageDark !== null)
            ? exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreOfficialLabel_ShopLabelImage.fromPartial(object.labelImageDark)
            : undefined;
        message.labelType = object.labelType ?? "0";
        message.labelTypeStr = object.labelTypeStr ?? "";
        return message;
    },
};
function createBaseUser_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreOfficialLabel_ShopLabelImage() {
    return { height: 0, width: 0, minetype: "", thumbUri: "", thumbUriList: [], uri: "", urlList: [], color: "" };
}
exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreOfficialLabel_ShopLabelImage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.height !== 0) {
            writer.uint32(8).int32(message.height);
        }
        if (message.width !== 0) {
            writer.uint32(16).int32(message.width);
        }
        if (message.minetype !== "") {
            writer.uint32(26).string(message.minetype);
        }
        if (message.thumbUri !== "") {
            writer.uint32(34).string(message.thumbUri);
        }
        for (const v of message.thumbUriList) {
            writer.uint32(42).string(v);
        }
        if (message.uri !== "") {
            writer.uint32(50).string(message.uri);
        }
        for (const v of message.urlList) {
            writer.uint32(58).string(v);
        }
        if (message.color !== "") {
            writer.uint32(66).string(message.color);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreOfficialLabel_ShopLabelImage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.height = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.width = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.minetype = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.thumbUri = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.thumbUriList.push(reader.string());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.uri = reader.string();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.urlList.push(reader.string());
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.color = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreOfficialLabel_ShopLabelImage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_EcommerceEntrance_ShopEntranceInfo_StoreLabel_StoreOfficialLabel_ShopLabelImage();
        message.height = object.height ?? 0;
        message.width = object.width ?? 0;
        message.minetype = object.minetype ?? "";
        message.thumbUri = object.thumbUri ?? "";
        message.thumbUriList = object.thumbUriList?.map((e) => e) || [];
        message.uri = object.uri ?? "";
        message.urlList = object.urlList?.map((e) => e) || [];
        message.color = object.color ?? "";
        return message;
    },
};
function createBaseUser_EcommerceEntrance_ShowcaseEntranceInfo() {
    return { formatSoldCount: "", soldCount: "0" };
}
exports.User_EcommerceEntrance_ShowcaseEntranceInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.formatSoldCount !== "") {
            writer.uint32(10).string(message.formatSoldCount);
        }
        if (message.soldCount !== "0") {
            writer.uint32(16).int64(message.soldCount);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_EcommerceEntrance_ShowcaseEntranceInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.formatSoldCount = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.soldCount = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_EcommerceEntrance_ShowcaseEntranceInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_EcommerceEntrance_ShowcaseEntranceInfo();
        message.formatSoldCount = object.formatSoldCount ?? "";
        message.soldCount = object.soldCount ?? "0";
        return message;
    },
};
function createBaseUser_FansClub() {
    return { data: undefined };
}
exports.User_FansClub = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.data !== undefined) {
            exports.User_FansClub_FansClubData.encode(message.data, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_FansClub();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.data = exports.User_FansClub_FansClubData.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_FansClub.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_FansClub();
        message.data = (object.data !== undefined && object.data !== null)
            ? exports.User_FansClub_FansClubData.fromPartial(object.data)
            : undefined;
        return message;
    },
};
function createBaseUser_FansClub_FansClubData() {
    return { clubName: "", level: 0, userFansClubStatus: 0, availableGiftIdsList: [], anchorId: "0" };
}
exports.User_FansClub_FansClubData = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.clubName !== "") {
            writer.uint32(10).string(message.clubName);
        }
        if (message.level !== 0) {
            writer.uint32(16).int32(message.level);
        }
        if (message.userFansClubStatus !== 0) {
            writer.uint32(24).int32(message.userFansClubStatus);
        }
        writer.uint32(42).fork();
        for (const v of message.availableGiftIdsList) {
            writer.int64(v);
        }
        writer.join();
        if (message.anchorId !== "0") {
            writer.uint32(48).int64(message.anchorId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_FansClub_FansClubData();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.clubName = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.level = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.userFansClubStatus = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag === 40) {
                        message.availableGiftIdsList.push(reader.int64().toString());
                        continue;
                    }
                    if (tag === 42) {
                        const end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) {
                            message.availableGiftIdsList.push(reader.int64().toString());
                        }
                        continue;
                    }
                    break;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.anchorId = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_FansClub_FansClubData.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_FansClub_FansClubData();
        message.clubName = object.clubName ?? "";
        message.level = object.level ?? 0;
        message.userFansClubStatus = object.userFansClubStatus ?? 0;
        message.availableGiftIdsList = object.availableGiftIdsList?.map((e) => e) || [];
        message.anchorId = object.anchorId ?? "0";
        return message;
    },
};
function createBaseUser_FansClubInfo() {
    return { isSleeping: false, fansLevel: "0", fansScore: "0", badge: undefined, fansCount: "0", fansClubName: "" };
}
exports.User_FansClubInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.isSleeping !== false) {
            writer.uint32(8).bool(message.isSleeping);
        }
        if (message.fansLevel !== "0") {
            writer.uint32(16).int64(message.fansLevel);
        }
        if (message.fansScore !== "0") {
            writer.uint32(24).int64(message.fansScore);
        }
        if (message.badge !== undefined) {
            exports.Image.encode(message.badge, writer.uint32(34).fork()).join();
        }
        if (message.fansCount !== "0") {
            writer.uint32(40).int64(message.fansCount);
        }
        if (message.fansClubName !== "") {
            writer.uint32(50).string(message.fansClubName);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_FansClubInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.isSleeping = reader.bool();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.fansLevel = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.fansScore = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.badge = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.fansCount = reader.int64().toString();
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.fansClubName = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_FansClubInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_FansClubInfo();
        message.isSleeping = object.isSleeping ?? false;
        message.fansLevel = object.fansLevel ?? "0";
        message.fansScore = object.fansScore ?? "0";
        message.badge = (object.badge !== undefined && object.badge !== null) ? exports.Image.fromPartial(object.badge) : undefined;
        message.fansCount = object.fansCount ?? "0";
        message.fansClubName = object.fansClubName ?? "";
        return message;
    },
};
function createBaseUser_FollowInfo() {
    return { followingCount: "0", followerCount: "0", followStatus: "0", pushStatus: "0" };
}
exports.User_FollowInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.followingCount !== "0") {
            writer.uint32(8).int64(message.followingCount);
        }
        if (message.followerCount !== "0") {
            writer.uint32(16).int64(message.followerCount);
        }
        if (message.followStatus !== "0") {
            writer.uint32(24).int64(message.followStatus);
        }
        if (message.pushStatus !== "0") {
            writer.uint32(32).int64(message.pushStatus);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_FollowInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.followingCount = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.followerCount = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.followStatus = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.pushStatus = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_FollowInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_FollowInfo();
        message.followingCount = object.followingCount ?? "0";
        message.followerCount = object.followerCount ?? "0";
        message.followStatus = object.followStatus ?? "0";
        message.pushStatus = object.pushStatus ?? "0";
        return message;
    },
};
function createBaseUser_OwnRoom() {
    return { roomIdsList: [], roomIdsStrList: [] };
}
exports.User_OwnRoom = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        writer.uint32(10).fork();
        for (const v of message.roomIdsList) {
            writer.int64(v);
        }
        writer.join();
        for (const v of message.roomIdsStrList) {
            writer.uint32(18).string(v);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_OwnRoom();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag === 8) {
                        message.roomIdsList.push(reader.int64().toString());
                        continue;
                    }
                    if (tag === 10) {
                        const end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) {
                            message.roomIdsList.push(reader.int64().toString());
                        }
                        continue;
                    }
                    break;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.roomIdsStrList.push(reader.string());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_OwnRoom.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_OwnRoom();
        message.roomIdsList = object.roomIdsList?.map((e) => e) || [];
        message.roomIdsStrList = object.roomIdsStrList?.map((e) => e) || [];
        return message;
    },
};
function createBaseUser_PayGrade() {
    return {
        diamondIcon: undefined,
        name: "",
        icon: undefined,
        nextName: "",
        level: "0",
        nextIcon: undefined,
        gradeDescribe: "",
        gradeIconList: [],
        screenChatType: "0",
        imIcon: undefined,
        imIconWithLevel: undefined,
        liveIcon: undefined,
        newImIconWithLevel: undefined,
        newLiveIcon: undefined,
        upgradeNeedConsume: "0",
        nextPrivileges: "",
        background: undefined,
        backgroundBack: undefined,
        score: "0",
        gradeBanner: "",
        profileDialogBg: undefined,
        profileDialogBgBack: undefined,
    };
}
exports.User_PayGrade = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.diamondIcon !== undefined) {
            exports.Image.encode(message.diamondIcon, writer.uint32(18).fork()).join();
        }
        if (message.name !== "") {
            writer.uint32(26).string(message.name);
        }
        if (message.icon !== undefined) {
            exports.Image.encode(message.icon, writer.uint32(34).fork()).join();
        }
        if (message.nextName !== "") {
            writer.uint32(42).string(message.nextName);
        }
        if (message.level !== "0") {
            writer.uint32(48).int64(message.level);
        }
        if (message.nextIcon !== undefined) {
            exports.Image.encode(message.nextIcon, writer.uint32(58).fork()).join();
        }
        if (message.gradeDescribe !== "") {
            writer.uint32(106).string(message.gradeDescribe);
        }
        for (const v of message.gradeIconList) {
            exports.GradeIcon.encode(v, writer.uint32(114).fork()).join();
        }
        if (message.screenChatType !== "0") {
            writer.uint32(120).int64(message.screenChatType);
        }
        if (message.imIcon !== undefined) {
            exports.Image.encode(message.imIcon, writer.uint32(130).fork()).join();
        }
        if (message.imIconWithLevel !== undefined) {
            exports.Image.encode(message.imIconWithLevel, writer.uint32(138).fork()).join();
        }
        if (message.liveIcon !== undefined) {
            exports.Image.encode(message.liveIcon, writer.uint32(146).fork()).join();
        }
        if (message.newImIconWithLevel !== undefined) {
            exports.Image.encode(message.newImIconWithLevel, writer.uint32(154).fork()).join();
        }
        if (message.newLiveIcon !== undefined) {
            exports.Image.encode(message.newLiveIcon, writer.uint32(162).fork()).join();
        }
        if (message.upgradeNeedConsume !== "0") {
            writer.uint32(168).int64(message.upgradeNeedConsume);
        }
        if (message.nextPrivileges !== "") {
            writer.uint32(178).string(message.nextPrivileges);
        }
        if (message.background !== undefined) {
            exports.Image.encode(message.background, writer.uint32(186).fork()).join();
        }
        if (message.backgroundBack !== undefined) {
            exports.Image.encode(message.backgroundBack, writer.uint32(194).fork()).join();
        }
        if (message.score !== "0") {
            writer.uint32(200).int64(message.score);
        }
        if (message.gradeBanner !== "") {
            writer.uint32(8010).string(message.gradeBanner);
        }
        if (message.profileDialogBg !== undefined) {
            exports.Image.encode(message.profileDialogBg, writer.uint32(8018).fork()).join();
        }
        if (message.profileDialogBgBack !== undefined) {
            exports.Image.encode(message.profileDialogBgBack, writer.uint32(8026).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_PayGrade();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.diamondIcon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.name = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.icon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.nextName = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.level = reader.int64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.nextIcon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 13: {
                    if (tag !== 106) {
                        break;
                    }
                    message.gradeDescribe = reader.string();
                    continue;
                }
                case 14: {
                    if (tag !== 114) {
                        break;
                    }
                    message.gradeIconList.push(exports.GradeIcon.decode(reader, reader.uint32()));
                    continue;
                }
                case 15: {
                    if (tag !== 120) {
                        break;
                    }
                    message.screenChatType = reader.int64().toString();
                    continue;
                }
                case 16: {
                    if (tag !== 130) {
                        break;
                    }
                    message.imIcon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 17: {
                    if (tag !== 138) {
                        break;
                    }
                    message.imIconWithLevel = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 18: {
                    if (tag !== 146) {
                        break;
                    }
                    message.liveIcon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 19: {
                    if (tag !== 154) {
                        break;
                    }
                    message.newImIconWithLevel = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 20: {
                    if (tag !== 162) {
                        break;
                    }
                    message.newLiveIcon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 21: {
                    if (tag !== 168) {
                        break;
                    }
                    message.upgradeNeedConsume = reader.int64().toString();
                    continue;
                }
                case 22: {
                    if (tag !== 178) {
                        break;
                    }
                    message.nextPrivileges = reader.string();
                    continue;
                }
                case 23: {
                    if (tag !== 186) {
                        break;
                    }
                    message.background = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 24: {
                    if (tag !== 194) {
                        break;
                    }
                    message.backgroundBack = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 25: {
                    if (tag !== 200) {
                        break;
                    }
                    message.score = reader.int64().toString();
                    continue;
                }
                case 1001: {
                    if (tag !== 8010) {
                        break;
                    }
                    message.gradeBanner = reader.string();
                    continue;
                }
                case 1002: {
                    if (tag !== 8018) {
                        break;
                    }
                    message.profileDialogBg = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 1003: {
                    if (tag !== 8026) {
                        break;
                    }
                    message.profileDialogBgBack = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_PayGrade.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_PayGrade();
        message.diamondIcon = (object.diamondIcon !== undefined && object.diamondIcon !== null)
            ? exports.Image.fromPartial(object.diamondIcon)
            : undefined;
        message.name = object.name ?? "";
        message.icon = (object.icon !== undefined && object.icon !== null) ? exports.Image.fromPartial(object.icon) : undefined;
        message.nextName = object.nextName ?? "";
        message.level = object.level ?? "0";
        message.nextIcon = (object.nextIcon !== undefined && object.nextIcon !== null)
            ? exports.Image.fromPartial(object.nextIcon)
            : undefined;
        message.gradeDescribe = object.gradeDescribe ?? "";
        message.gradeIconList = object.gradeIconList?.map((e) => exports.GradeIcon.fromPartial(e)) || [];
        message.screenChatType = object.screenChatType ?? "0";
        message.imIcon = (object.imIcon !== undefined && object.imIcon !== null)
            ? exports.Image.fromPartial(object.imIcon)
            : undefined;
        message.imIconWithLevel = (object.imIconWithLevel !== undefined && object.imIconWithLevel !== null)
            ? exports.Image.fromPartial(object.imIconWithLevel)
            : undefined;
        message.liveIcon = (object.liveIcon !== undefined && object.liveIcon !== null)
            ? exports.Image.fromPartial(object.liveIcon)
            : undefined;
        message.newImIconWithLevel = (object.newImIconWithLevel !== undefined && object.newImIconWithLevel !== null)
            ? exports.Image.fromPartial(object.newImIconWithLevel)
            : undefined;
        message.newLiveIcon = (object.newLiveIcon !== undefined && object.newLiveIcon !== null)
            ? exports.Image.fromPartial(object.newLiveIcon)
            : undefined;
        message.upgradeNeedConsume = object.upgradeNeedConsume ?? "0";
        message.nextPrivileges = object.nextPrivileges ?? "";
        message.background = (object.background !== undefined && object.background !== null)
            ? exports.Image.fromPartial(object.background)
            : undefined;
        message.backgroundBack = (object.backgroundBack !== undefined && object.backgroundBack !== null)
            ? exports.Image.fromPartial(object.backgroundBack)
            : undefined;
        message.score = object.score ?? "0";
        message.gradeBanner = object.gradeBanner ?? "";
        message.profileDialogBg = (object.profileDialogBg !== undefined && object.profileDialogBg !== null)
            ? exports.Image.fromPartial(object.profileDialogBg)
            : undefined;
        message.profileDialogBgBack = (object.profileDialogBgBack !== undefined && object.profileDialogBgBack !== null)
            ? exports.Image.fromPartial(object.profileDialogBgBack)
            : undefined;
        return message;
    },
};
function createBaseUser_SubscribeBadge() {
    return { originImg: undefined, previewImg: undefined };
}
exports.User_SubscribeBadge = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.originImg !== undefined) {
            exports.Image.encode(message.originImg, writer.uint32(26).fork()).join();
        }
        if (message.previewImg !== undefined) {
            exports.Image.encode(message.previewImg, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_SubscribeBadge();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.originImg = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.previewImg = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_SubscribeBadge.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_SubscribeBadge();
        message.originImg = (object.originImg !== undefined && object.originImg !== null)
            ? exports.Image.fromPartial(object.originImg)
            : undefined;
        message.previewImg = (object.previewImg !== undefined && object.previewImg !== null)
            ? exports.Image.fromPartial(object.previewImg)
            : undefined;
        return message;
    },
};
function createBaseUser_SubscribeInfo() {
    return {
        qualification: false,
        isSubscribe: false,
        badge: undefined,
        enableSubscription: false,
        subscriberCount: "0",
        isInGracePeriod: false,
        isSubscribedToAnchor: false,
        userGiftSubAuth: false,
        anchorGiftSubAuth: false,
    };
}
exports.User_SubscribeInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.qualification !== false) {
            writer.uint32(8).bool(message.qualification);
        }
        if (message.isSubscribe !== false) {
            writer.uint32(16).bool(message.isSubscribe);
        }
        if (message.badge !== undefined) {
            exports.User_SubscribeBadge.encode(message.badge, writer.uint32(26).fork()).join();
        }
        if (message.enableSubscription !== false) {
            writer.uint32(32).bool(message.enableSubscription);
        }
        if (message.subscriberCount !== "0") {
            writer.uint32(40).int64(message.subscriberCount);
        }
        if (message.isInGracePeriod !== false) {
            writer.uint32(48).bool(message.isInGracePeriod);
        }
        if (message.isSubscribedToAnchor !== false) {
            writer.uint32(56).bool(message.isSubscribedToAnchor);
        }
        if (message.userGiftSubAuth !== false) {
            writer.uint32(72).bool(message.userGiftSubAuth);
        }
        if (message.anchorGiftSubAuth !== false) {
            writer.uint32(80).bool(message.anchorGiftSubAuth);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_SubscribeInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.qualification = reader.bool();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.isSubscribe = reader.bool();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.badge = exports.User_SubscribeBadge.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.enableSubscription = reader.bool();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.subscriberCount = reader.int64().toString();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.isInGracePeriod = reader.bool();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.isSubscribedToAnchor = reader.bool();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.userGiftSubAuth = reader.bool();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.anchorGiftSubAuth = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_SubscribeInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_SubscribeInfo();
        message.qualification = object.qualification ?? false;
        message.isSubscribe = object.isSubscribe ?? false;
        message.badge = (object.badge !== undefined && object.badge !== null)
            ? exports.User_SubscribeBadge.fromPartial(object.badge)
            : undefined;
        message.enableSubscription = object.enableSubscription ?? false;
        message.subscriberCount = object.subscriberCount ?? "0";
        message.isInGracePeriod = object.isInGracePeriod ?? false;
        message.isSubscribedToAnchor = object.isSubscribedToAnchor ?? false;
        message.userGiftSubAuth = object.userGiftSubAuth ?? false;
        message.anchorGiftSubAuth = object.anchorGiftSubAuth ?? false;
        return message;
    },
};
function createBaseUser_UserAttr() {
    return { isMuted: false, isAdmin: false, isSuperAdmin: false, muteDuration: "0" };
}
exports.User_UserAttr = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.isMuted !== false) {
            writer.uint32(8).bool(message.isMuted);
        }
        if (message.isAdmin !== false) {
            writer.uint32(16).bool(message.isAdmin);
        }
        if (message.isSuperAdmin !== false) {
            writer.uint32(24).bool(message.isSuperAdmin);
        }
        if (message.muteDuration !== "0") {
            writer.uint32(32).int64(message.muteDuration);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_UserAttr();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.isMuted = reader.bool();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.isAdmin = reader.bool();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.isSuperAdmin = reader.bool();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.muteDuration = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_UserAttr.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_UserAttr();
        message.isMuted = object.isMuted ?? false;
        message.isAdmin = object.isAdmin ?? false;
        message.isSuperAdmin = object.isSuperAdmin ?? false;
        message.muteDuration = object.muteDuration ?? "0";
        return message;
    },
};
function createBaseUser_UserStats() {
    return {
        id: "0",
        idStr: "",
        followingCount: "0",
        followerCount: "0",
        recordCount: "0",
        totalDuration: "0",
        dailyFanTicketCount: "0",
        dailyIncome: "0",
        itemCount: "0",
        favoriteItemCount: "0",
        diamondConsumedCount: "0",
        tuwenItemCount: "0",
    };
}
exports.User_UserStats = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.id !== "0") {
            writer.uint32(8).int64(message.id);
        }
        if (message.idStr !== "") {
            writer.uint32(18).string(message.idStr);
        }
        if (message.followingCount !== "0") {
            writer.uint32(24).int64(message.followingCount);
        }
        if (message.followerCount !== "0") {
            writer.uint32(32).int64(message.followerCount);
        }
        if (message.recordCount !== "0") {
            writer.uint32(40).int64(message.recordCount);
        }
        if (message.totalDuration !== "0") {
            writer.uint32(48).int64(message.totalDuration);
        }
        if (message.dailyFanTicketCount !== "0") {
            writer.uint32(56).int64(message.dailyFanTicketCount);
        }
        if (message.dailyIncome !== "0") {
            writer.uint32(64).int64(message.dailyIncome);
        }
        if (message.itemCount !== "0") {
            writer.uint32(72).int64(message.itemCount);
        }
        if (message.favoriteItemCount !== "0") {
            writer.uint32(80).int64(message.favoriteItemCount);
        }
        if (message.diamondConsumedCount !== "0") {
            writer.uint32(96).int64(message.diamondConsumedCount);
        }
        if (message.tuwenItemCount !== "0") {
            writer.uint32(104).int64(message.tuwenItemCount);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUser_UserStats();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.id = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.idStr = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.followingCount = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.followerCount = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.recordCount = reader.int64().toString();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.totalDuration = reader.int64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.dailyFanTicketCount = reader.int64().toString();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.dailyIncome = reader.int64().toString();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.itemCount = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.favoriteItemCount = reader.int64().toString();
                    continue;
                }
                case 12: {
                    if (tag !== 96) {
                        break;
                    }
                    message.diamondConsumedCount = reader.int64().toString();
                    continue;
                }
                case 13: {
                    if (tag !== 104) {
                        break;
                    }
                    message.tuwenItemCount = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.User_UserStats.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUser_UserStats();
        message.id = object.id ?? "0";
        message.idStr = object.idStr ?? "";
        message.followingCount = object.followingCount ?? "0";
        message.followerCount = object.followerCount ?? "0";
        message.recordCount = object.recordCount ?? "0";
        message.totalDuration = object.totalDuration ?? "0";
        message.dailyFanTicketCount = object.dailyFanTicketCount ?? "0";
        message.dailyIncome = object.dailyIncome ?? "0";
        message.itemCount = object.itemCount ?? "0";
        message.favoriteItemCount = object.favoriteItemCount ?? "0";
        message.diamondConsumedCount = object.diamondConsumedCount ?? "0";
        message.tuwenItemCount = object.tuwenItemCount ?? "0";
        return message;
    },
};
function createBaseEmote() {
    return {
        emoteId: "",
        image: undefined,
        auditStatus: 0,
        uuid: "",
        emoteType: 0,
        contentSource: 0,
        emotePrivateType: 0,
        packageId: "",
        auditInfo: undefined,
        rewardCondition: 0,
        emoteUploadInfo: undefined,
        createTime: "0",
        emoteScene: 0,
    };
}
exports.Emote = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.emoteId !== "") {
            writer.uint32(10).string(message.emoteId);
        }
        if (message.image !== undefined) {
            exports.Image.encode(message.image, writer.uint32(18).fork()).join();
        }
        if (message.auditStatus !== 0) {
            writer.uint32(24).int32(message.auditStatus);
        }
        if (message.uuid !== "") {
            writer.uint32(34).string(message.uuid);
        }
        if (message.emoteType !== 0) {
            writer.uint32(40).int32(message.emoteType);
        }
        if (message.contentSource !== 0) {
            writer.uint32(48).int32(message.contentSource);
        }
        if (message.emotePrivateType !== 0) {
            writer.uint32(56).int32(message.emotePrivateType);
        }
        if (message.packageId !== "") {
            writer.uint32(66).string(message.packageId);
        }
        if (message.auditInfo !== undefined) {
            exports.Emote_AuditInfo.encode(message.auditInfo, writer.uint32(74).fork()).join();
        }
        if (message.rewardCondition !== 0) {
            writer.uint32(80).int32(message.rewardCondition);
        }
        if (message.emoteUploadInfo !== undefined) {
            exports.Emote_EmoteUploadInfo.encode(message.emoteUploadInfo, writer.uint32(90).fork()).join();
        }
        if (message.createTime !== "0") {
            writer.uint32(96).int64(message.createTime);
        }
        if (message.emoteScene !== 0) {
            writer.uint32(104).int32(message.emoteScene);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseEmote();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.emoteId = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.image = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.auditStatus = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.uuid = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.emoteType = reader.int32();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.contentSource = reader.int32();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.emotePrivateType = reader.int32();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.packageId = reader.string();
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.auditInfo = exports.Emote_AuditInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.rewardCondition = reader.int32();
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.emoteUploadInfo = exports.Emote_EmoteUploadInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 12: {
                    if (tag !== 96) {
                        break;
                    }
                    message.createTime = reader.int64().toString();
                    continue;
                }
                case 13: {
                    if (tag !== 104) {
                        break;
                    }
                    message.emoteScene = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Emote.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseEmote();
        message.emoteId = object.emoteId ?? "";
        message.image = (object.image !== undefined && object.image !== null) ? exports.Image.fromPartial(object.image) : undefined;
        message.auditStatus = object.auditStatus ?? 0;
        message.uuid = object.uuid ?? "";
        message.emoteType = object.emoteType ?? 0;
        message.contentSource = object.contentSource ?? 0;
        message.emotePrivateType = object.emotePrivateType ?? 0;
        message.packageId = object.packageId ?? "";
        message.auditInfo = (object.auditInfo !== undefined && object.auditInfo !== null)
            ? exports.Emote_AuditInfo.fromPartial(object.auditInfo)
            : undefined;
        message.rewardCondition = object.rewardCondition ?? 0;
        message.emoteUploadInfo = (object.emoteUploadInfo !== undefined && object.emoteUploadInfo !== null)
            ? exports.Emote_EmoteUploadInfo.fromPartial(object.emoteUploadInfo)
            : undefined;
        message.createTime = object.createTime ?? "0";
        message.emoteScene = object.emoteScene ?? 0;
        return message;
    },
};
function createBaseEmote_AuditInfo() {
    return { violationId: "0", taskType: 0 };
}
exports.Emote_AuditInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.violationId !== "0") {
            writer.uint32(8).int64(message.violationId);
        }
        if (message.taskType !== 0) {
            writer.uint32(16).int32(message.taskType);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseEmote_AuditInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.violationId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.taskType = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Emote_AuditInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseEmote_AuditInfo();
        message.violationId = object.violationId ?? "0";
        message.taskType = object.taskType ?? 0;
        return message;
    },
};
function createBaseEmote_EmoteUploadInfo() {
    return { userId: "0", emoteUploadSource: 0, userInfo: undefined, userIdStr: "" };
}
exports.Emote_EmoteUploadInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.userId !== "0") {
            writer.uint32(8).int64(message.userId);
        }
        if (message.emoteUploadSource !== 0) {
            writer.uint32(16).int32(message.emoteUploadSource);
        }
        if (message.userInfo !== undefined) {
            exports.User.encode(message.userInfo, writer.uint32(26).fork()).join();
        }
        if (message.userIdStr !== "") {
            writer.uint32(34).string(message.userIdStr);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseEmote_EmoteUploadInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.userId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.emoteUploadSource = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.userInfo = exports.User.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.userIdStr = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Emote_EmoteUploadInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseEmote_EmoteUploadInfo();
        message.userId = object.userId ?? "0";
        message.emoteUploadSource = object.emoteUploadSource ?? 0;
        message.userInfo = (object.userInfo !== undefined && object.userInfo !== null)
            ? exports.User.fromPartial(object.userInfo)
            : undefined;
        message.userIdStr = object.userIdStr ?? "";
        return message;
    },
};
function createBasePunishEventInfo() {
    return {
        punishType: "",
        punishReason: "",
        punishId: "",
        violationUid: "0",
        punishTypeId: 0,
        duration: "0",
        punishPerceptionCode: "",
        violationUidStr: "",
        showReason: "",
    };
}
exports.PunishEventInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.punishType !== "") {
            writer.uint32(10).string(message.punishType);
        }
        if (message.punishReason !== "") {
            writer.uint32(18).string(message.punishReason);
        }
        if (message.punishId !== "") {
            writer.uint32(26).string(message.punishId);
        }
        if (message.violationUid !== "0") {
            writer.uint32(32).int64(message.violationUid);
        }
        if (message.punishTypeId !== 0) {
            writer.uint32(40).int32(message.punishTypeId);
        }
        if (message.duration !== "0") {
            writer.uint32(48).int64(message.duration);
        }
        if (message.punishPerceptionCode !== "") {
            writer.uint32(58).string(message.punishPerceptionCode);
        }
        if (message.violationUidStr !== "") {
            writer.uint32(74).string(message.violationUidStr);
        }
        if (message.showReason !== "") {
            writer.uint32(82).string(message.showReason);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePunishEventInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.punishType = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.punishReason = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.punishId = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.violationUid = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.punishTypeId = reader.int32();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.duration = reader.int64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.punishPerceptionCode = reader.string();
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.violationUidStr = reader.string();
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.showReason = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.PunishEventInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePunishEventInfo();
        message.punishType = object.punishType ?? "";
        message.punishReason = object.punishReason ?? "";
        message.punishId = object.punishId ?? "";
        message.violationUid = object.violationUid ?? "0";
        message.punishTypeId = object.punishTypeId ?? 0;
        message.duration = object.duration ?? "0";
        message.punishPerceptionCode = object.punishPerceptionCode ?? "";
        message.violationUidStr = object.violationUidStr ?? "";
        message.showReason = object.showReason ?? "";
        return message;
    },
};
function createBaseMsgFilter() {
    return { isGifter: false, isSubscribedToAnchor: false };
}
exports.MsgFilter = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.isGifter !== false) {
            writer.uint32(8).bool(message.isGifter);
        }
        if (message.isSubscribedToAnchor !== false) {
            writer.uint32(16).bool(message.isSubscribedToAnchor);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseMsgFilter();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.isGifter = reader.bool();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.isSubscribedToAnchor = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.MsgFilter.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseMsgFilter();
        message.isGifter = object.isGifter ?? false;
        message.isSubscribedToAnchor = object.isSubscribedToAnchor ?? false;
        return message;
    },
};
function createBaseUserIdentity() {
    return {
        isGiftGiverOfAnchor: false,
        isSubscriberOfAnchor: false,
        isMutualFollowingWithAnchor: false,
        isFollowerOfAnchor: false,
        isModeratorOfAnchor: false,
        isAnchor: false,
    };
}
exports.UserIdentity = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.isGiftGiverOfAnchor !== false) {
            writer.uint32(8).bool(message.isGiftGiverOfAnchor);
        }
        if (message.isSubscriberOfAnchor !== false) {
            writer.uint32(16).bool(message.isSubscriberOfAnchor);
        }
        if (message.isMutualFollowingWithAnchor !== false) {
            writer.uint32(24).bool(message.isMutualFollowingWithAnchor);
        }
        if (message.isFollowerOfAnchor !== false) {
            writer.uint32(32).bool(message.isFollowerOfAnchor);
        }
        if (message.isModeratorOfAnchor !== false) {
            writer.uint32(40).bool(message.isModeratorOfAnchor);
        }
        if (message.isAnchor !== false) {
            writer.uint32(48).bool(message.isAnchor);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUserIdentity();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.isGiftGiverOfAnchor = reader.bool();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.isSubscriberOfAnchor = reader.bool();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.isMutualFollowingWithAnchor = reader.bool();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.isFollowerOfAnchor = reader.bool();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.isModeratorOfAnchor = reader.bool();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.isAnchor = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.UserIdentity.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUserIdentity();
        message.isGiftGiverOfAnchor = object.isGiftGiverOfAnchor ?? false;
        message.isSubscriberOfAnchor = object.isSubscriberOfAnchor ?? false;
        message.isMutualFollowingWithAnchor = object.isMutualFollowingWithAnchor ?? false;
        message.isFollowerOfAnchor = object.isFollowerOfAnchor ?? false;
        message.isModeratorOfAnchor = object.isModeratorOfAnchor ?? false;
        message.isAnchor = object.isAnchor ?? false;
        return message;
    },
};
function createBaseLiveStreamGoal() {
    return {
        id: "0",
        type: 0,
        status: 0,
        subGoals: [],
        description: "",
        auditStatus: 0,
        cycleType: 0,
        startTime: "0",
        expireTime: "0",
        realFinishTime: "0",
        contributors: [],
        contributorsLength: 0,
        idStr: "",
        auditDescription: "",
        stats: undefined,
        goalExtraInfo: "",
        mode: 0,
        auditInfo: undefined,
        challengeType: "",
        isUneditable: false,
    };
}
exports.LiveStreamGoal = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.id !== "0") {
            writer.uint32(8).int64(message.id);
        }
        if (message.type !== 0) {
            writer.uint32(16).int32(message.type);
        }
        if (message.status !== 0) {
            writer.uint32(24).int32(message.status);
        }
        for (const v of message.subGoals) {
            exports.LiveStreamGoal_LiveStreamSubGoal.encode(v, writer.uint32(34).fork()).join();
        }
        if (message.description !== "") {
            writer.uint32(42).string(message.description);
        }
        if (message.auditStatus !== 0) {
            writer.uint32(48).int32(message.auditStatus);
        }
        if (message.cycleType !== 0) {
            writer.uint32(56).int32(message.cycleType);
        }
        if (message.startTime !== "0") {
            writer.uint32(64).int64(message.startTime);
        }
        if (message.expireTime !== "0") {
            writer.uint32(72).int64(message.expireTime);
        }
        if (message.realFinishTime !== "0") {
            writer.uint32(80).int64(message.realFinishTime);
        }
        for (const v of message.contributors) {
            exports.LiveStreamGoal_LiveStreamGoalContributor.encode(v, writer.uint32(90).fork()).join();
        }
        if (message.contributorsLength !== 0) {
            writer.uint32(96).int32(message.contributorsLength);
        }
        if (message.idStr !== "") {
            writer.uint32(106).string(message.idStr);
        }
        if (message.auditDescription !== "") {
            writer.uint32(114).string(message.auditDescription);
        }
        if (message.stats !== undefined) {
            exports.LiveStreamGoal_GoalStats.encode(message.stats, writer.uint32(122).fork()).join();
        }
        if (message.goalExtraInfo !== "") {
            writer.uint32(130).string(message.goalExtraInfo);
        }
        if (message.mode !== 0) {
            writer.uint32(136).int32(message.mode);
        }
        if (message.auditInfo !== undefined) {
            exports.LiveStreamGoal_AuditInfo.encode(message.auditInfo, writer.uint32(146).fork()).join();
        }
        if (message.challengeType !== "") {
            writer.uint32(162).string(message.challengeType);
        }
        if (message.isUneditable !== false) {
            writer.uint32(168).bool(message.isUneditable);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLiveStreamGoal();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.id = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.type = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.status = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.subGoals.push(exports.LiveStreamGoal_LiveStreamSubGoal.decode(reader, reader.uint32()));
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.description = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.auditStatus = reader.int32();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.cycleType = reader.int32();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.startTime = reader.int64().toString();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.expireTime = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.realFinishTime = reader.int64().toString();
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.contributors.push(exports.LiveStreamGoal_LiveStreamGoalContributor.decode(reader, reader.uint32()));
                    continue;
                }
                case 12: {
                    if (tag !== 96) {
                        break;
                    }
                    message.contributorsLength = reader.int32();
                    continue;
                }
                case 13: {
                    if (tag !== 106) {
                        break;
                    }
                    message.idStr = reader.string();
                    continue;
                }
                case 14: {
                    if (tag !== 114) {
                        break;
                    }
                    message.auditDescription = reader.string();
                    continue;
                }
                case 15: {
                    if (tag !== 122) {
                        break;
                    }
                    message.stats = exports.LiveStreamGoal_GoalStats.decode(reader, reader.uint32());
                    continue;
                }
                case 16: {
                    if (tag !== 130) {
                        break;
                    }
                    message.goalExtraInfo = reader.string();
                    continue;
                }
                case 17: {
                    if (tag !== 136) {
                        break;
                    }
                    message.mode = reader.int32();
                    continue;
                }
                case 18: {
                    if (tag !== 146) {
                        break;
                    }
                    message.auditInfo = exports.LiveStreamGoal_AuditInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 20: {
                    if (tag !== 162) {
                        break;
                    }
                    message.challengeType = reader.string();
                    continue;
                }
                case 21: {
                    if (tag !== 168) {
                        break;
                    }
                    message.isUneditable = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LiveStreamGoal.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLiveStreamGoal();
        message.id = object.id ?? "0";
        message.type = object.type ?? 0;
        message.status = object.status ?? 0;
        message.subGoals = object.subGoals?.map((e) => exports.LiveStreamGoal_LiveStreamSubGoal.fromPartial(e)) || [];
        message.description = object.description ?? "";
        message.auditStatus = object.auditStatus ?? 0;
        message.cycleType = object.cycleType ?? 0;
        message.startTime = object.startTime ?? "0";
        message.expireTime = object.expireTime ?? "0";
        message.realFinishTime = object.realFinishTime ?? "0";
        message.contributors = object.contributors?.map((e) => exports.LiveStreamGoal_LiveStreamGoalContributor.fromPartial(e)) ||
            [];
        message.contributorsLength = object.contributorsLength ?? 0;
        message.idStr = object.idStr ?? "";
        message.auditDescription = object.auditDescription ?? "";
        message.stats = (object.stats !== undefined && object.stats !== null)
            ? exports.LiveStreamGoal_GoalStats.fromPartial(object.stats)
            : undefined;
        message.goalExtraInfo = object.goalExtraInfo ?? "";
        message.mode = object.mode ?? 0;
        message.auditInfo = (object.auditInfo !== undefined && object.auditInfo !== null)
            ? exports.LiveStreamGoal_AuditInfo.fromPartial(object.auditInfo)
            : undefined;
        message.challengeType = object.challengeType ?? "";
        message.isUneditable = object.isUneditable ?? false;
        return message;
    },
};
function createBaseLiveStreamGoal_AuditInfo() {
    return { violationId: "0", taskType: 0 };
}
exports.LiveStreamGoal_AuditInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.violationId !== "0") {
            writer.uint32(8).int64(message.violationId);
        }
        if (message.taskType !== 0) {
            writer.uint32(16).int32(message.taskType);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLiveStreamGoal_AuditInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.violationId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.taskType = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LiveStreamGoal_AuditInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLiveStreamGoal_AuditInfo();
        message.violationId = object.violationId ?? "0";
        message.taskType = object.taskType ?? 0;
        return message;
    },
};
function createBaseLiveStreamGoal_LiveStreamSubGoal() {
    return {
        type: 0,
        id: "0",
        progress: "0",
        target: "0",
        gift: undefined,
        idStr: "",
        pinInfo: undefined,
        source: 0,
        recommendedText: "",
        recommendedHeader: "",
    };
}
exports.LiveStreamGoal_LiveStreamSubGoal = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.type !== 0) {
            writer.uint32(8).int32(message.type);
        }
        if (message.id !== "0") {
            writer.uint32(16).int64(message.id);
        }
        if (message.progress !== "0") {
            writer.uint32(24).int64(message.progress);
        }
        if (message.target !== "0") {
            writer.uint32(32).int64(message.target);
        }
        if (message.gift !== undefined) {
            exports.LiveStreamGoal_LiveStreamSubGoalGift.encode(message.gift, writer.uint32(42).fork()).join();
        }
        if (message.idStr !== "") {
            writer.uint32(50).string(message.idStr);
        }
        if (message.pinInfo !== undefined) {
            exports.LiveStreamGoal_LiveStreamSubGoal_SubGoalPinInfo.encode(message.pinInfo, writer.uint32(58).fork()).join();
        }
        if (message.source !== 0) {
            writer.uint32(64).int32(message.source);
        }
        if (message.recommendedText !== "") {
            writer.uint32(74).string(message.recommendedText);
        }
        if (message.recommendedHeader !== "") {
            writer.uint32(82).string(message.recommendedHeader);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLiveStreamGoal_LiveStreamSubGoal();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.type = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.id = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.progress = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.target = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.gift = exports.LiveStreamGoal_LiveStreamSubGoalGift.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.idStr = reader.string();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.pinInfo = exports.LiveStreamGoal_LiveStreamSubGoal_SubGoalPinInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.source = reader.int32();
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.recommendedText = reader.string();
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.recommendedHeader = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LiveStreamGoal_LiveStreamSubGoal.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLiveStreamGoal_LiveStreamSubGoal();
        message.type = object.type ?? 0;
        message.id = object.id ?? "0";
        message.progress = object.progress ?? "0";
        message.target = object.target ?? "0";
        message.gift = (object.gift !== undefined && object.gift !== null)
            ? exports.LiveStreamGoal_LiveStreamSubGoalGift.fromPartial(object.gift)
            : undefined;
        message.idStr = object.idStr ?? "";
        message.pinInfo = (object.pinInfo !== undefined && object.pinInfo !== null)
            ? exports.LiveStreamGoal_LiveStreamSubGoal_SubGoalPinInfo.fromPartial(object.pinInfo)
            : undefined;
        message.source = object.source ?? 0;
        message.recommendedText = object.recommendedText ?? "";
        message.recommendedHeader = object.recommendedHeader ?? "";
        return message;
    },
};
function createBaseLiveStreamGoal_LiveStreamSubGoal_SubGoalPinInfo() {
    return { pinStartTime: "0", pinEndTime: "0", pinReadyTime: "0" };
}
exports.LiveStreamGoal_LiveStreamSubGoal_SubGoalPinInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.pinStartTime !== "0") {
            writer.uint32(8).int64(message.pinStartTime);
        }
        if (message.pinEndTime !== "0") {
            writer.uint32(16).int64(message.pinEndTime);
        }
        if (message.pinReadyTime !== "0") {
            writer.uint32(24).int64(message.pinReadyTime);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLiveStreamGoal_LiveStreamSubGoal_SubGoalPinInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.pinStartTime = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.pinEndTime = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.pinReadyTime = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LiveStreamGoal_LiveStreamSubGoal_SubGoalPinInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLiveStreamGoal_LiveStreamSubGoal_SubGoalPinInfo();
        message.pinStartTime = object.pinStartTime ?? "0";
        message.pinEndTime = object.pinEndTime ?? "0";
        message.pinReadyTime = object.pinReadyTime ?? "0";
        return message;
    },
};
function createBaseLiveStreamGoal_LiveStreamSubGoalGift() {
    return { name: "", icon: undefined, diamondCount: "0", type: 0 };
}
exports.LiveStreamGoal_LiveStreamSubGoalGift = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.name !== "") {
            writer.uint32(10).string(message.name);
        }
        if (message.icon !== undefined) {
            exports.Image.encode(message.icon, writer.uint32(18).fork()).join();
        }
        if (message.diamondCount !== "0") {
            writer.uint32(24).int64(message.diamondCount);
        }
        if (message.type !== 0) {
            writer.uint32(32).int32(message.type);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLiveStreamGoal_LiveStreamSubGoalGift();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.name = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.icon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.diamondCount = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.type = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LiveStreamGoal_LiveStreamSubGoalGift.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLiveStreamGoal_LiveStreamSubGoalGift();
        message.name = object.name ?? "";
        message.icon = (object.icon !== undefined && object.icon !== null) ? exports.Image.fromPartial(object.icon) : undefined;
        message.diamondCount = object.diamondCount ?? "0";
        message.type = object.type ?? 0;
        return message;
    },
};
function createBaseLiveStreamGoal_LiveStreamGoalContributor() {
    return {
        userId: "0",
        avatar: undefined,
        displayId: "",
        score: "0",
        userIdStr: "",
        inRoom: false,
        isFriend: false,
        followByOwner: false,
        isFistContribute: false,
        subGoalContributions: [],
    };
}
exports.LiveStreamGoal_LiveStreamGoalContributor = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.userId !== "0") {
            writer.uint32(8).int64(message.userId);
        }
        if (message.avatar !== undefined) {
            exports.Image.encode(message.avatar, writer.uint32(18).fork()).join();
        }
        if (message.displayId !== "") {
            writer.uint32(26).string(message.displayId);
        }
        if (message.score !== "0") {
            writer.uint32(32).int64(message.score);
        }
        if (message.userIdStr !== "") {
            writer.uint32(42).string(message.userIdStr);
        }
        if (message.inRoom !== false) {
            writer.uint32(48).bool(message.inRoom);
        }
        if (message.isFriend !== false) {
            writer.uint32(56).bool(message.isFriend);
        }
        if (message.followByOwner !== false) {
            writer.uint32(72).bool(message.followByOwner);
        }
        if (message.isFistContribute !== false) {
            writer.uint32(80).bool(message.isFistContribute);
        }
        for (const v of message.subGoalContributions) {
            exports.LiveStreamGoal_LiveStreamGoalContributor_SubGoalContribution.encode(v, writer.uint32(90).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLiveStreamGoal_LiveStreamGoalContributor();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.userId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.avatar = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.displayId = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.score = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.userIdStr = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.inRoom = reader.bool();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.isFriend = reader.bool();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.followByOwner = reader.bool();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.isFistContribute = reader.bool();
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.subGoalContributions.push(exports.LiveStreamGoal_LiveStreamGoalContributor_SubGoalContribution.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LiveStreamGoal_LiveStreamGoalContributor.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLiveStreamGoal_LiveStreamGoalContributor();
        message.userId = object.userId ?? "0";
        message.avatar = (object.avatar !== undefined && object.avatar !== null)
            ? exports.Image.fromPartial(object.avatar)
            : undefined;
        message.displayId = object.displayId ?? "";
        message.score = object.score ?? "0";
        message.userIdStr = object.userIdStr ?? "";
        message.inRoom = object.inRoom ?? false;
        message.isFriend = object.isFriend ?? false;
        message.followByOwner = object.followByOwner ?? false;
        message.isFistContribute = object.isFistContribute ?? false;
        message.subGoalContributions =
            object.subGoalContributions?.map((e) => exports.LiveStreamGoal_LiveStreamGoalContributor_SubGoalContribution.fromPartial(e)) || [];
        return message;
    },
};
function createBaseLiveStreamGoal_LiveStreamGoalContributor_SubGoalContribution() {
    return { id: "", contributionCount: "0" };
}
exports.LiveStreamGoal_LiveStreamGoalContributor_SubGoalContribution = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.id !== "") {
            writer.uint32(10).string(message.id);
        }
        if (message.contributionCount !== "0") {
            writer.uint32(16).int64(message.contributionCount);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLiveStreamGoal_LiveStreamGoalContributor_SubGoalContribution();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.contributionCount = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LiveStreamGoal_LiveStreamGoalContributor_SubGoalContribution.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLiveStreamGoal_LiveStreamGoalContributor_SubGoalContribution();
        message.id = object.id ?? "";
        message.contributionCount = object.contributionCount ?? "0";
        return message;
    },
};
function createBaseLiveStreamGoal_GoalStats() {
    return { totalCoins: "0", totalContributor: "0", comparison: undefined, totalNewFans: "0" };
}
exports.LiveStreamGoal_GoalStats = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.totalCoins !== "0") {
            writer.uint32(8).int64(message.totalCoins);
        }
        if (message.totalContributor !== "0") {
            writer.uint32(16).int64(message.totalContributor);
        }
        if (message.comparison !== undefined) {
            exports.LiveStreamGoal_GoalStats_GoalComparison.encode(message.comparison, writer.uint32(26).fork()).join();
        }
        if (message.totalNewFans !== "0") {
            writer.uint32(32).int64(message.totalNewFans);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLiveStreamGoal_GoalStats();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.totalCoins = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.totalContributor = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.comparison = exports.LiveStreamGoal_GoalStats_GoalComparison.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.totalNewFans = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LiveStreamGoal_GoalStats.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLiveStreamGoal_GoalStats();
        message.totalCoins = object.totalCoins ?? "0";
        message.totalContributor = object.totalContributor ?? "0";
        message.comparison = (object.comparison !== undefined && object.comparison !== null)
            ? exports.LiveStreamGoal_GoalStats_GoalComparison.fromPartial(object.comparison)
            : undefined;
        message.totalNewFans = object.totalNewFans ?? "0";
        return message;
    },
};
function createBaseLiveStreamGoal_GoalStats_GoalComparison() {
    return { coinsIncr: "0", contributorIncr: "0" };
}
exports.LiveStreamGoal_GoalStats_GoalComparison = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.coinsIncr !== "0") {
            writer.uint32(8).int64(message.coinsIncr);
        }
        if (message.contributorIncr !== "0") {
            writer.uint32(16).int64(message.contributorIncr);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLiveStreamGoal_GoalStats_GoalComparison();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.coinsIncr = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.contributorIncr = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LiveStreamGoal_GoalStats_GoalComparison.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLiveStreamGoal_GoalStats_GoalComparison();
        message.coinsIncr = object.coinsIncr ?? "0";
        message.contributorIncr = object.contributorIncr ?? "0";
        return message;
    },
};
function createBaseLiveStreamGoalIndicator() {
    return { key: "", op: 0 };
}
exports.LiveStreamGoalIndicator = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.key !== "") {
            writer.uint32(10).string(message.key);
        }
        if (message.op !== 0) {
            writer.uint32(16).int32(message.op);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLiveStreamGoalIndicator();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.key = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.op = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LiveStreamGoalIndicator.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLiveStreamGoalIndicator();
        message.key = object.key ?? "";
        message.op = object.op ?? 0;
        return message;
    },
};
function createBaseRanking() {
    return { type: "", label: "", color: undefined, details: [] };
}
exports.Ranking = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.type !== "") {
            writer.uint32(10).string(message.type);
        }
        if (message.label !== "") {
            writer.uint32(18).string(message.label);
        }
        if (message.color !== undefined) {
            exports.TikTokColor.encode(message.color, writer.uint32(26).fork()).join();
        }
        for (const v of message.details) {
            exports.ValueLabel.encode(v, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRanking();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.type = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.label = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.color = exports.TikTokColor.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.details.push(exports.ValueLabel.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Ranking.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRanking();
        message.type = object.type ?? "";
        message.label = object.label ?? "";
        message.color = (object.color !== undefined && object.color !== null)
            ? exports.TikTokColor.fromPartial(object.color)
            : undefined;
        message.details = object.details?.map((e) => exports.ValueLabel.fromPartial(e)) || [];
        return message;
    },
};
function createBaseTikTokColor() {
    return { color: "", id: "0", data1: 0 };
}
exports.TikTokColor = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.color !== "") {
            writer.uint32(10).string(message.color);
        }
        if (message.id !== "0") {
            writer.uint32(32).uint64(message.id);
        }
        if (message.data1 !== 0) {
            writer.uint32(48).uint32(message.data1);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseTikTokColor();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.color = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.id = reader.uint64().toString();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.data1 = reader.uint32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.TikTokColor.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseTikTokColor();
        message.color = object.color ?? "";
        message.id = object.id ?? "0";
        message.data1 = object.data1 ?? 0;
        return message;
    },
};
function createBaseValueLabel() {
    return { data: 0, label: "", label2: "", label3: "" };
}
exports.ValueLabel = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.data !== 0) {
            writer.uint32(8).uint32(message.data);
        }
        if (message.label !== "") {
            writer.uint32(18).string(message.label);
        }
        if (message.label2 !== "") {
            writer.uint32(26).string(message.label2);
        }
        if (message.label3 !== "") {
            writer.uint32(90).string(message.label3);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseValueLabel();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.data = reader.uint32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.label = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.label2 = reader.string();
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.label3 = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.ValueLabel.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseValueLabel();
        message.data = object.data ?? 0;
        message.label = object.label ?? "";
        message.label2 = object.label2 ?? "";
        message.label3 = object.label3 ?? "";
        return message;
    },
};
function createBaseTimeStampContainer() {
    return { timestamp1: "0", timestamp2: "0", timestamp3: "0" };
}
exports.TimeStampContainer = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.timestamp1 !== "0") {
            writer.uint32(8).uint64(message.timestamp1);
        }
        if (message.timestamp2 !== "0") {
            writer.uint32(16).uint64(message.timestamp2);
        }
        if (message.timestamp3 !== "0") {
            writer.uint32(24).uint64(message.timestamp3);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseTimeStampContainer();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.timestamp1 = reader.uint64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.timestamp2 = reader.uint64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.timestamp3 = reader.uint64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.TimeStampContainer.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseTimeStampContainer();
        message.timestamp1 = object.timestamp1 ?? "0";
        message.timestamp2 = object.timestamp2 ?? "0";
        message.timestamp3 = object.timestamp3 ?? "0";
        return message;
    },
};
function createBasePollStartContent() {
    return { StartTime: "0", EndTime: "0", OptionList: [], Title: "", Operator: undefined };
}
exports.PollStartContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.StartTime !== "0") {
            writer.uint32(8).int64(message.StartTime);
        }
        if (message.EndTime !== "0") {
            writer.uint32(16).int64(message.EndTime);
        }
        for (const v of message.OptionList) {
            exports.PollOptionInfo.encode(v, writer.uint32(26).fork()).join();
        }
        if (message.Title !== "") {
            writer.uint32(34).string(message.Title);
        }
        if (message.Operator !== undefined) {
            exports.User.encode(message.Operator, writer.uint32(42).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePollStartContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.StartTime = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.EndTime = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.OptionList.push(exports.PollOptionInfo.decode(reader, reader.uint32()));
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.Title = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.Operator = exports.User.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.PollStartContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePollStartContent();
        message.StartTime = object.StartTime ?? "0";
        message.EndTime = object.EndTime ?? "0";
        message.OptionList = object.OptionList?.map((e) => exports.PollOptionInfo.fromPartial(e)) || [];
        message.Title = object.Title ?? "";
        message.Operator = (object.Operator !== undefined && object.Operator !== null)
            ? exports.User.fromPartial(object.Operator)
            : undefined;
        return message;
    },
};
function createBasePollEndContent() {
    return { EndType: 0, OptionList: [], Operator: undefined };
}
exports.PollEndContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.EndType !== 0) {
            writer.uint32(8).int32(message.EndType);
        }
        for (const v of message.OptionList) {
            exports.PollOptionInfo.encode(v, writer.uint32(18).fork()).join();
        }
        if (message.Operator !== undefined) {
            exports.User.encode(message.Operator, writer.uint32(26).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePollEndContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.EndType = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.OptionList.push(exports.PollOptionInfo.decode(reader, reader.uint32()));
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.Operator = exports.User.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.PollEndContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePollEndContent();
        message.EndType = object.EndType ?? 0;
        message.OptionList = object.OptionList?.map((e) => exports.PollOptionInfo.fromPartial(e)) || [];
        message.Operator = (object.Operator !== undefined && object.Operator !== null)
            ? exports.User.fromPartial(object.Operator)
            : undefined;
        return message;
    },
};
function createBasePollOptionInfo() {
    return { Votes: 0, DisplayContent: "", OptionIdx: 0, VoteUserList: [] };
}
exports.PollOptionInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.Votes !== 0) {
            writer.uint32(8).int32(message.Votes);
        }
        if (message.DisplayContent !== "") {
            writer.uint32(18).string(message.DisplayContent);
        }
        if (message.OptionIdx !== 0) {
            writer.uint32(24).int32(message.OptionIdx);
        }
        for (const v of message.VoteUserList) {
            exports.VoteUser.encode(v, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePollOptionInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.Votes = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.DisplayContent = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.OptionIdx = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.VoteUserList.push(exports.VoteUser.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.PollOptionInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePollOptionInfo();
        message.Votes = object.Votes ?? 0;
        message.DisplayContent = object.DisplayContent ?? "";
        message.OptionIdx = object.OptionIdx ?? 0;
        message.VoteUserList = object.VoteUserList?.map((e) => exports.VoteUser.fromPartial(e)) || [];
        return message;
    },
};
function createBaseVoteUser() {
    return { UserId: "0", NickName: "", AvatarThumb: undefined };
}
exports.VoteUser = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.UserId !== "0") {
            writer.uint32(8).int64(message.UserId);
        }
        if (message.NickName !== "") {
            writer.uint32(18).string(message.NickName);
        }
        if (message.AvatarThumb !== undefined) {
            exports.Image.encode(message.AvatarThumb, writer.uint32(26).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseVoteUser();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.UserId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.NickName = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.AvatarThumb = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.VoteUser.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseVoteUser();
        message.UserId = object.UserId ?? "0";
        message.NickName = object.NickName ?? "";
        message.AvatarThumb = (object.AvatarThumb !== undefined && object.AvatarThumb !== null)
            ? exports.Image.fromPartial(object.AvatarThumb)
            : undefined;
        return message;
    },
};
function createBasePollUpdateVotesContent() {
    return { OptionList: [] };
}
exports.PollUpdateVotesContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.OptionList) {
            exports.PollOptionInfo.encode(v, writer.uint32(18).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePollUpdateVotesContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.OptionList.push(exports.PollOptionInfo.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.PollUpdateVotesContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePollUpdateVotesContent();
        message.OptionList = object.OptionList?.map((e) => exports.PollOptionInfo.fromPartial(e)) || [];
        return message;
    },
};
function createBaseUserFanTicket() {
    return { UserId: "0", FanTicket: "0", MatchTotalScore: "0", MatchRank: 0 };
}
exports.UserFanTicket = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.UserId !== "0") {
            writer.uint32(8).int64(message.UserId);
        }
        if (message.FanTicket !== "0") {
            writer.uint32(16).int64(message.FanTicket);
        }
        if (message.MatchTotalScore !== "0") {
            writer.uint32(24).int64(message.MatchTotalScore);
        }
        if (message.MatchRank !== 0) {
            writer.uint32(32).int32(message.MatchRank);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUserFanTicket();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.UserId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.FanTicket = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.MatchTotalScore = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.MatchRank = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.UserFanTicket.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUserFanTicket();
        message.UserId = object.UserId ?? "0";
        message.FanTicket = object.FanTicket ?? "0";
        message.MatchTotalScore = object.MatchTotalScore ?? "0";
        message.MatchRank = object.MatchRank ?? 0;
        return message;
    },
};
function createBaseFanTicketRoomNoticeContent() {
    return {
        UserFanTicketList: [],
        TotalLinkMicFanTicket: "0",
        MatchId: "0",
        EventTime: "0",
        FanTicketIconUrl: "",
        playId: "0",
        playScene: 0,
    };
}
exports.FanTicketRoomNoticeContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.UserFanTicketList) {
            exports.UserFanTicket.encode(v, writer.uint32(10).fork()).join();
        }
        if (message.TotalLinkMicFanTicket !== "0") {
            writer.uint32(16).int64(message.TotalLinkMicFanTicket);
        }
        if (message.MatchId !== "0") {
            writer.uint32(24).int64(message.MatchId);
        }
        if (message.EventTime !== "0") {
            writer.uint32(32).int64(message.EventTime);
        }
        if (message.FanTicketIconUrl !== "") {
            writer.uint32(42).string(message.FanTicketIconUrl);
        }
        if (message.playId !== "0") {
            writer.uint32(48).int64(message.playId);
        }
        if (message.playScene !== 0) {
            writer.uint32(56).int32(message.playScene);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseFanTicketRoomNoticeContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.UserFanTicketList.push(exports.UserFanTicket.decode(reader, reader.uint32()));
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.TotalLinkMicFanTicket = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.MatchId = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.EventTime = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.FanTicketIconUrl = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.playId = reader.int64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.playScene = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.FanTicketRoomNoticeContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseFanTicketRoomNoticeContent();
        message.UserFanTicketList = object.UserFanTicketList?.map((e) => exports.UserFanTicket.fromPartial(e)) || [];
        message.TotalLinkMicFanTicket = object.TotalLinkMicFanTicket ?? "0";
        message.MatchId = object.MatchId ?? "0";
        message.EventTime = object.EventTime ?? "0";
        message.FanTicketIconUrl = object.FanTicketIconUrl ?? "";
        message.playId = object.playId ?? "0";
        message.playScene = object.playScene ?? 0;
        return message;
    },
};
function createBaseLinkerAcceptNoticeContent() {
    return { fromUserId: "0", fromRoomId: "0", toUserId: "0" };
}
exports.LinkerAcceptNoticeContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.fromUserId !== "0") {
            writer.uint32(8).int64(message.fromUserId);
        }
        if (message.fromRoomId !== "0") {
            writer.uint32(16).int64(message.fromRoomId);
        }
        if (message.toUserId !== "0") {
            writer.uint32(24).int64(message.toUserId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerAcceptNoticeContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.fromUserId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.fromRoomId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.toUserId = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerAcceptNoticeContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerAcceptNoticeContent();
        message.fromUserId = object.fromUserId ?? "0";
        message.fromRoomId = object.fromRoomId ?? "0";
        message.toUserId = object.toUserId ?? "0";
        return message;
    },
};
function createBaseLinkerCancelContent() {
    return { fromUserId: "0", toUserId: "0", cancelType: "0", actionId: "0" };
}
exports.LinkerCancelContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.fromUserId !== "0") {
            writer.uint32(8).int64(message.fromUserId);
        }
        if (message.toUserId !== "0") {
            writer.uint32(16).int64(message.toUserId);
        }
        if (message.cancelType !== "0") {
            writer.uint32(24).int64(message.cancelType);
        }
        if (message.actionId !== "0") {
            writer.uint32(32).int64(message.actionId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerCancelContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.fromUserId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.toUserId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.cancelType = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.actionId = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerCancelContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerCancelContent();
        message.fromUserId = object.fromUserId ?? "0";
        message.toUserId = object.toUserId ?? "0";
        message.cancelType = object.cancelType ?? "0";
        message.actionId = object.actionId ?? "0";
        return message;
    },
};
function createBaseListUser() {
    return {
        user: undefined,
        linkmicId: "0",
        linkmicIdStr: "",
        linkStatus: 0,
        linkType: 0,
        userPosition: 0,
        silenceStatus: 0,
        modifyTime: "0",
        linkerId: "0",
        roleType: 0,
    };
}
exports.ListUser = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.user !== undefined) {
            exports.User.encode(message.user, writer.uint32(10).fork()).join();
        }
        if (message.linkmicId !== "0") {
            writer.uint32(16).int64(message.linkmicId);
        }
        if (message.linkmicIdStr !== "") {
            writer.uint32(26).string(message.linkmicIdStr);
        }
        if (message.linkStatus !== 0) {
            writer.uint32(32).int32(message.linkStatus);
        }
        if (message.linkType !== 0) {
            writer.uint32(40).int32(message.linkType);
        }
        if (message.userPosition !== 0) {
            writer.uint32(48).int32(message.userPosition);
        }
        if (message.silenceStatus !== 0) {
            writer.uint32(56).int32(message.silenceStatus);
        }
        if (message.modifyTime !== "0") {
            writer.uint32(64).int64(message.modifyTime);
        }
        if (message.linkerId !== "0") {
            writer.uint32(72).int64(message.linkerId);
        }
        if (message.roleType !== 0) {
            writer.uint32(80).int32(message.roleType);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseListUser();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.user = exports.User.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.linkmicId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.linkmicIdStr = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.linkStatus = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.linkType = reader.int32();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.userPosition = reader.int32();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.silenceStatus = reader.int32();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.modifyTime = reader.int64().toString();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.linkerId = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.roleType = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.ListUser.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseListUser();
        message.user = (object.user !== undefined && object.user !== null) ? exports.User.fromPartial(object.user) : undefined;
        message.linkmicId = object.linkmicId ?? "0";
        message.linkmicIdStr = object.linkmicIdStr ?? "";
        message.linkStatus = object.linkStatus ?? 0;
        message.linkType = object.linkType ?? 0;
        message.userPosition = object.userPosition ?? 0;
        message.silenceStatus = object.silenceStatus ?? 0;
        message.modifyTime = object.modifyTime ?? "0";
        message.linkerId = object.linkerId ?? "0";
        message.roleType = object.roleType ?? 0;
        return message;
    },
};
function createBaseLinkerCloseContent() {
    return {};
}
exports.LinkerCloseContent = {
    encode(_, writer = new wire_1.BinaryWriter()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerCloseContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerCloseContent.fromPartial(base ?? {});
    },
    fromPartial(_) {
        const message = createBaseLinkerCloseContent();
        return message;
    },
};
function createBaseLinkerCreateContent() {
    return { ownerId: "0", ownerRoomId: "0", linkType: "0" };
}
exports.LinkerCreateContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.ownerId !== "0") {
            writer.uint32(8).int64(message.ownerId);
        }
        if (message.ownerRoomId !== "0") {
            writer.uint32(16).int64(message.ownerRoomId);
        }
        if (message.linkType !== "0") {
            writer.uint32(24).int64(message.linkType);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerCreateContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.ownerId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.ownerRoomId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.linkType = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerCreateContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerCreateContent();
        message.ownerId = object.ownerId ?? "0";
        message.ownerRoomId = object.ownerRoomId ?? "0";
        message.linkType = object.linkType ?? "0";
        return message;
    },
};
function createBaseLinkerEnterContent() {
    return { linkedUsersList: [], anchorMultiLiveEnum: 0, anchorSettingInfo: undefined };
}
exports.LinkerEnterContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.linkedUsersList) {
            exports.ListUser.encode(v, writer.uint32(10).fork()).join();
        }
        if (message.anchorMultiLiveEnum !== 0) {
            writer.uint32(16).int32(message.anchorMultiLiveEnum);
        }
        if (message.anchorSettingInfo !== undefined) {
            exports.MultiLiveAnchorPanelSettings.encode(message.anchorSettingInfo, writer.uint32(26).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerEnterContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.linkedUsersList.push(exports.ListUser.decode(reader, reader.uint32()));
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.anchorMultiLiveEnum = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.anchorSettingInfo = exports.MultiLiveAnchorPanelSettings.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerEnterContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerEnterContent();
        message.linkedUsersList = object.linkedUsersList?.map((e) => exports.ListUser.fromPartial(e)) || [];
        message.anchorMultiLiveEnum = object.anchorMultiLiveEnum ?? 0;
        message.anchorSettingInfo = (object.anchorSettingInfo !== undefined && object.anchorSettingInfo !== null)
            ? exports.MultiLiveAnchorPanelSettings.fromPartial(object.anchorSettingInfo)
            : undefined;
        return message;
    },
};
function createBaseLinkerInviteContent() {
    return {
        fromUserId: "0",
        fromRoomId: "0",
        toRtcExtInfo: "",
        rtcJoinChannel: false,
        vendor: "0",
        secFromUserId: "",
        toLinkmicIdStr: "",
        fromUser: undefined,
        requiredMicIdx: "0",
        rtcExtInfoMap: {},
        multiLiveLayoutEnable: 0,
        multiLiveSetting: undefined,
        fromLinkmicIdStr: "",
        fromTopHostInfo: undefined,
        actionId: "0",
        linkedUsers: [],
        dialogInfo: undefined,
        punishEventInfo: undefined,
        fromRoomAgeRestricted: 0,
        abTestSetting: [],
        linkerInviteMsgExtra: undefined,
    };
}
exports.LinkerInviteContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.fromUserId !== "0") {
            writer.uint32(8).int64(message.fromUserId);
        }
        if (message.fromRoomId !== "0") {
            writer.uint32(16).int64(message.fromRoomId);
        }
        if (message.toRtcExtInfo !== "") {
            writer.uint32(26).string(message.toRtcExtInfo);
        }
        if (message.rtcJoinChannel !== false) {
            writer.uint32(32).bool(message.rtcJoinChannel);
        }
        if (message.vendor !== "0") {
            writer.uint32(40).int64(message.vendor);
        }
        if (message.secFromUserId !== "") {
            writer.uint32(50).string(message.secFromUserId);
        }
        if (message.toLinkmicIdStr !== "") {
            writer.uint32(58).string(message.toLinkmicIdStr);
        }
        if (message.fromUser !== undefined) {
            exports.User.encode(message.fromUser, writer.uint32(66).fork()).join();
        }
        if (message.requiredMicIdx !== "0") {
            writer.uint32(72).int64(message.requiredMicIdx);
        }
        Object.entries(message.rtcExtInfoMap).forEach(([key, value]) => {
            exports.LinkerInviteContent_RtcExtInfoMapEntry.encode({ key: key, value }, writer.uint32(82).fork()).join();
        });
        if (message.multiLiveLayoutEnable !== 0) {
            writer.uint32(88).int32(message.multiLiveLayoutEnable);
        }
        if (message.multiLiveSetting !== undefined) {
            exports.MultiLiveAnchorPanelSettings.encode(message.multiLiveSetting, writer.uint32(98).fork()).join();
        }
        if (message.fromLinkmicIdStr !== "") {
            writer.uint32(106).string(message.fromLinkmicIdStr);
        }
        if (message.fromTopHostInfo !== undefined) {
            exports.LinkerInviteContent_InviteTopHostInfo.encode(message.fromTopHostInfo, writer.uint32(130).fork()).join();
        }
        if (message.actionId !== "0") {
            writer.uint32(136).int64(message.actionId);
        }
        for (const v of message.linkedUsers) {
            exports.LinkerInviteContent_LinkmicUserInfo.encode(v, writer.uint32(146).fork()).join();
        }
        if (message.dialogInfo !== undefined) {
            exports.LinkerInviteContent_PerceptionDialogInfo.encode(message.dialogInfo, writer.uint32(154).fork()).join();
        }
        if (message.punishEventInfo !== undefined) {
            exports.PunishEventInfo.encode(message.punishEventInfo, writer.uint32(162).fork()).join();
        }
        if (message.fromRoomAgeRestricted !== 0) {
            writer.uint32(168).int32(message.fromRoomAgeRestricted);
        }
        for (const v of message.abTestSetting) {
            exports.LinkerInviteContent_CohostABTestSetting.encode(v, writer.uint32(186).fork()).join();
        }
        if (message.linkerInviteMsgExtra !== undefined) {
            exports.LinkerInviteContent_LinkerInviteMessageExtra.encode(message.linkerInviteMsgExtra, writer.uint32(810).fork())
                .join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerInviteContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.fromUserId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.fromRoomId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.toRtcExtInfo = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.rtcJoinChannel = reader.bool();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.vendor = reader.int64().toString();
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.secFromUserId = reader.string();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.toLinkmicIdStr = reader.string();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.fromUser = exports.User.decode(reader, reader.uint32());
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.requiredMicIdx = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    const entry10 = exports.LinkerInviteContent_RtcExtInfoMapEntry.decode(reader, reader.uint32());
                    if (entry10.value !== undefined) {
                        message.rtcExtInfoMap[entry10.key] = entry10.value;
                    }
                    continue;
                }
                case 11: {
                    if (tag !== 88) {
                        break;
                    }
                    message.multiLiveLayoutEnable = reader.int32();
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.multiLiveSetting = exports.MultiLiveAnchorPanelSettings.decode(reader, reader.uint32());
                    continue;
                }
                case 13: {
                    if (tag !== 106) {
                        break;
                    }
                    message.fromLinkmicIdStr = reader.string();
                    continue;
                }
                case 16: {
                    if (tag !== 130) {
                        break;
                    }
                    message.fromTopHostInfo = exports.LinkerInviteContent_InviteTopHostInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 17: {
                    if (tag !== 136) {
                        break;
                    }
                    message.actionId = reader.int64().toString();
                    continue;
                }
                case 18: {
                    if (tag !== 146) {
                        break;
                    }
                    message.linkedUsers.push(exports.LinkerInviteContent_LinkmicUserInfo.decode(reader, reader.uint32()));
                    continue;
                }
                case 19: {
                    if (tag !== 154) {
                        break;
                    }
                    message.dialogInfo = exports.LinkerInviteContent_PerceptionDialogInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 20: {
                    if (tag !== 162) {
                        break;
                    }
                    message.punishEventInfo = exports.PunishEventInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 21: {
                    if (tag !== 168) {
                        break;
                    }
                    message.fromRoomAgeRestricted = reader.int32();
                    continue;
                }
                case 23: {
                    if (tag !== 186) {
                        break;
                    }
                    message.abTestSetting.push(exports.LinkerInviteContent_CohostABTestSetting.decode(reader, reader.uint32()));
                    continue;
                }
                case 101: {
                    if (tag !== 810) {
                        break;
                    }
                    message.linkerInviteMsgExtra = exports.LinkerInviteContent_LinkerInviteMessageExtra.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerInviteContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerInviteContent();
        message.fromUserId = object.fromUserId ?? "0";
        message.fromRoomId = object.fromRoomId ?? "0";
        message.toRtcExtInfo = object.toRtcExtInfo ?? "";
        message.rtcJoinChannel = object.rtcJoinChannel ?? false;
        message.vendor = object.vendor ?? "0";
        message.secFromUserId = object.secFromUserId ?? "";
        message.toLinkmicIdStr = object.toLinkmicIdStr ?? "";
        message.fromUser = (object.fromUser !== undefined && object.fromUser !== null)
            ? exports.User.fromPartial(object.fromUser)
            : undefined;
        message.requiredMicIdx = object.requiredMicIdx ?? "0";
        message.rtcExtInfoMap = Object.entries(object.rtcExtInfoMap ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = globalThis.String(value);
            }
            return acc;
        }, {});
        message.multiLiveLayoutEnable = object.multiLiveLayoutEnable ?? 0;
        message.multiLiveSetting = (object.multiLiveSetting !== undefined && object.multiLiveSetting !== null)
            ? exports.MultiLiveAnchorPanelSettings.fromPartial(object.multiLiveSetting)
            : undefined;
        message.fromLinkmicIdStr = object.fromLinkmicIdStr ?? "";
        message.fromTopHostInfo = (object.fromTopHostInfo !== undefined && object.fromTopHostInfo !== null)
            ? exports.LinkerInviteContent_InviteTopHostInfo.fromPartial(object.fromTopHostInfo)
            : undefined;
        message.actionId = object.actionId ?? "0";
        message.linkedUsers = object.linkedUsers?.map((e) => exports.LinkerInviteContent_LinkmicUserInfo.fromPartial(e)) || [];
        message.dialogInfo = (object.dialogInfo !== undefined && object.dialogInfo !== null)
            ? exports.LinkerInviteContent_PerceptionDialogInfo.fromPartial(object.dialogInfo)
            : undefined;
        message.punishEventInfo = (object.punishEventInfo !== undefined && object.punishEventInfo !== null)
            ? exports.PunishEventInfo.fromPartial(object.punishEventInfo)
            : undefined;
        message.fromRoomAgeRestricted = object.fromRoomAgeRestricted ?? 0;
        message.abTestSetting = object.abTestSetting?.map((e) => exports.LinkerInviteContent_CohostABTestSetting.fromPartial(e)) ||
            [];
        message.linkerInviteMsgExtra = (object.linkerInviteMsgExtra !== undefined && object.linkerInviteMsgExtra !== null)
            ? exports.LinkerInviteContent_LinkerInviteMessageExtra.fromPartial(object.linkerInviteMsgExtra)
            : undefined;
        return message;
    },
};
function createBaseLinkerInviteContent_RtcExtInfoMapEntry() {
    return { key: "0", value: "" };
}
exports.LinkerInviteContent_RtcExtInfoMapEntry = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.key !== "0") {
            writer.uint32(8).int64(message.key);
        }
        if (message.value !== "") {
            writer.uint32(18).string(message.value);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerInviteContent_RtcExtInfoMapEntry();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.key = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.value = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerInviteContent_RtcExtInfoMapEntry.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerInviteContent_RtcExtInfoMapEntry();
        message.key = object.key ?? "0";
        message.value = object.value ?? "";
        return message;
    },
};
function createBaseLinkerInviteContent_InviteTopHostInfo() {
    return { rankType: "", topIndex: "0" };
}
exports.LinkerInviteContent_InviteTopHostInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.rankType !== "") {
            writer.uint32(10).string(message.rankType);
        }
        if (message.topIndex !== "0") {
            writer.uint32(16).int64(message.topIndex);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerInviteContent_InviteTopHostInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.rankType = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.topIndex = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerInviteContent_InviteTopHostInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerInviteContent_InviteTopHostInfo();
        message.rankType = object.rankType ?? "";
        message.topIndex = object.topIndex ?? "0";
        return message;
    },
};
function createBaseLinkerInviteContent_LinkmicUserInfo() {
    return { userId: "0", linkmicIdStr: "", roomId: "0", linkedTime: "0" };
}
exports.LinkerInviteContent_LinkmicUserInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.userId !== "0") {
            writer.uint32(8).int64(message.userId);
        }
        if (message.linkmicIdStr !== "") {
            writer.uint32(18).string(message.linkmicIdStr);
        }
        if (message.roomId !== "0") {
            writer.uint32(24).int64(message.roomId);
        }
        if (message.linkedTime !== "0") {
            writer.uint32(32).int64(message.linkedTime);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerInviteContent_LinkmicUserInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.userId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.linkmicIdStr = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.roomId = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.linkedTime = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerInviteContent_LinkmicUserInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerInviteContent_LinkmicUserInfo();
        message.userId = object.userId ?? "0";
        message.linkmicIdStr = object.linkmicIdStr ?? "";
        message.roomId = object.roomId ?? "0";
        message.linkedTime = object.linkedTime ?? "0";
        return message;
    },
};
function createBaseLinkerInviteContent_PerceptionDialogInfo() {
    return {
        iconType: 0,
        title: undefined,
        subTitle: undefined,
        adviceActionText: undefined,
        defaultActionText: undefined,
        violationDetailUrl: "",
        scene: 0,
        targetUserId: "0",
        targetRoomId: "0",
        countDownTime: "0",
        showFeedback: false,
        feedbackOptions: [],
        policyTip: "0",
        appealPopup: 0,
    };
}
exports.LinkerInviteContent_PerceptionDialogInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.iconType !== 0) {
            writer.uint32(8).int32(message.iconType);
        }
        if (message.title !== undefined) {
            exports.Text.encode(message.title, writer.uint32(18).fork()).join();
        }
        if (message.subTitle !== undefined) {
            exports.Text.encode(message.subTitle, writer.uint32(26).fork()).join();
        }
        if (message.adviceActionText !== undefined) {
            exports.Text.encode(message.adviceActionText, writer.uint32(34).fork()).join();
        }
        if (message.defaultActionText !== undefined) {
            exports.Text.encode(message.defaultActionText, writer.uint32(42).fork()).join();
        }
        if (message.violationDetailUrl !== "") {
            writer.uint32(50).string(message.violationDetailUrl);
        }
        if (message.scene !== 0) {
            writer.uint32(56).int32(message.scene);
        }
        if (message.targetUserId !== "0") {
            writer.uint32(64).int64(message.targetUserId);
        }
        if (message.targetRoomId !== "0") {
            writer.uint32(72).int64(message.targetRoomId);
        }
        if (message.countDownTime !== "0") {
            writer.uint32(80).int64(message.countDownTime);
        }
        if (message.showFeedback !== false) {
            writer.uint32(88).bool(message.showFeedback);
        }
        for (const v of message.feedbackOptions) {
            exports.LinkerInviteContent_PerceptionDialogInfo_PerceptionFeedbackOption.encode(v, writer.uint32(98).fork()).join();
        }
        if (message.policyTip !== "0") {
            writer.uint32(104).int64(message.policyTip);
        }
        if (message.appealPopup !== 0) {
            writer.uint32(112).int32(message.appealPopup);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerInviteContent_PerceptionDialogInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.iconType = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.title = exports.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.subTitle = exports.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.adviceActionText = exports.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.defaultActionText = exports.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.violationDetailUrl = reader.string();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.scene = reader.int32();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.targetUserId = reader.int64().toString();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.targetRoomId = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.countDownTime = reader.int64().toString();
                    continue;
                }
                case 11: {
                    if (tag !== 88) {
                        break;
                    }
                    message.showFeedback = reader.bool();
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.feedbackOptions.push(exports.LinkerInviteContent_PerceptionDialogInfo_PerceptionFeedbackOption.decode(reader, reader.uint32()));
                    continue;
                }
                case 13: {
                    if (tag !== 104) {
                        break;
                    }
                    message.policyTip = reader.int64().toString();
                    continue;
                }
                case 14: {
                    if (tag !== 112) {
                        break;
                    }
                    message.appealPopup = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerInviteContent_PerceptionDialogInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerInviteContent_PerceptionDialogInfo();
        message.iconType = object.iconType ?? 0;
        message.title = (object.title !== undefined && object.title !== null) ? exports.Text.fromPartial(object.title) : undefined;
        message.subTitle = (object.subTitle !== undefined && object.subTitle !== null)
            ? exports.Text.fromPartial(object.subTitle)
            : undefined;
        message.adviceActionText = (object.adviceActionText !== undefined && object.adviceActionText !== null)
            ? exports.Text.fromPartial(object.adviceActionText)
            : undefined;
        message.defaultActionText = (object.defaultActionText !== undefined && object.defaultActionText !== null)
            ? exports.Text.fromPartial(object.defaultActionText)
            : undefined;
        message.violationDetailUrl = object.violationDetailUrl ?? "";
        message.scene = object.scene ?? 0;
        message.targetUserId = object.targetUserId ?? "0";
        message.targetRoomId = object.targetRoomId ?? "0";
        message.countDownTime = object.countDownTime ?? "0";
        message.showFeedback = object.showFeedback ?? false;
        message.feedbackOptions =
            object.feedbackOptions?.map((e) => exports.LinkerInviteContent_PerceptionDialogInfo_PerceptionFeedbackOption.fromPartial(e)) || [];
        message.policyTip = object.policyTip ?? "0";
        message.appealPopup = object.appealPopup ?? 0;
        return message;
    },
};
function createBaseLinkerInviteContent_PerceptionDialogInfo_PerceptionFeedbackOption() {
    return { id: "0", contentKey: "" };
}
exports.LinkerInviteContent_PerceptionDialogInfo_PerceptionFeedbackOption = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.id !== "0") {
            writer.uint32(8).int64(message.id);
        }
        if (message.contentKey !== "") {
            writer.uint32(18).string(message.contentKey);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerInviteContent_PerceptionDialogInfo_PerceptionFeedbackOption();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.id = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.contentKey = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerInviteContent_PerceptionDialogInfo_PerceptionFeedbackOption.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerInviteContent_PerceptionDialogInfo_PerceptionFeedbackOption();
        message.id = object.id ?? "0";
        message.contentKey = object.contentKey ?? "";
        return message;
    },
};
function createBaseLinkerInviteContent_CohostABTestSetting() {
    return { key: "0", value: undefined };
}
exports.LinkerInviteContent_CohostABTestSetting = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.key !== "0") {
            writer.uint32(8).int64(message.key);
        }
        if (message.value !== undefined) {
            exports.LinkerInviteContent_CohostABTestSetting_CohostABTestList.encode(message.value, writer.uint32(18).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerInviteContent_CohostABTestSetting();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.key = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.value = exports.LinkerInviteContent_CohostABTestSetting_CohostABTestList.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerInviteContent_CohostABTestSetting.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerInviteContent_CohostABTestSetting();
        message.key = object.key ?? "0";
        message.value = (object.value !== undefined && object.value !== null)
            ? exports.LinkerInviteContent_CohostABTestSetting_CohostABTestList.fromPartial(object.value)
            : undefined;
        return message;
    },
};
function createBaseLinkerInviteContent_CohostABTestSetting_CohostABTestList() {
    return { abTestList: [] };
}
exports.LinkerInviteContent_CohostABTestSetting_CohostABTestList = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.abTestList) {
            exports.LinkerInviteContent_CohostABTestSetting_CohostABTestList_CohostABTest.encode(v, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerInviteContent_CohostABTestSetting_CohostABTestList();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.abTestList.push(exports.LinkerInviteContent_CohostABTestSetting_CohostABTestList_CohostABTest.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerInviteContent_CohostABTestSetting_CohostABTestList.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerInviteContent_CohostABTestSetting_CohostABTestList();
        message.abTestList =
            object.abTestList?.map((e) => exports.LinkerInviteContent_CohostABTestSetting_CohostABTestList_CohostABTest.fromPartial(e)) || [];
        return message;
    },
};
function createBaseLinkerInviteContent_CohostABTestSetting_CohostABTestList_CohostABTest() {
    return { abTestType: 0, group: "0" };
}
exports.LinkerInviteContent_CohostABTestSetting_CohostABTestList_CohostABTest = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.abTestType !== 0) {
            writer.uint32(8).int32(message.abTestType);
        }
        if (message.group !== "0") {
            writer.uint32(16).int64(message.group);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerInviteContent_CohostABTestSetting_CohostABTestList_CohostABTest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.abTestType = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.group = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerInviteContent_CohostABTestSetting_CohostABTestList_CohostABTest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerInviteContent_CohostABTestSetting_CohostABTestList_CohostABTest();
        message.abTestType = object.abTestType ?? 0;
        message.group = object.group ?? "0";
        return message;
    },
};
function createBaseLinkerInviteContent_LinkerInviteMessageExtra() {
    return {
        matchType: 0,
        inviteType: 0,
        subType: 0,
        theme: "",
        duration: 0,
        layout: 0,
        tips: "",
        inviterRivalExtra: undefined,
        otherRivalExtra: [],
        topicInfo: undefined,
        algoRequestId: "",
    };
}
exports.LinkerInviteContent_LinkerInviteMessageExtra = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.matchType !== 0) {
            writer.uint32(8).int32(message.matchType);
        }
        if (message.inviteType !== 0) {
            writer.uint32(16).int32(message.inviteType);
        }
        if (message.subType !== 0) {
            writer.uint32(24).int32(message.subType);
        }
        if (message.theme !== "") {
            writer.uint32(34).string(message.theme);
        }
        if (message.duration !== 0) {
            writer.uint32(40).int32(message.duration);
        }
        if (message.layout !== 0) {
            writer.uint32(48).int32(message.layout);
        }
        if (message.tips !== "") {
            writer.uint32(58).string(message.tips);
        }
        if (message.inviterRivalExtra !== undefined) {
            exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra.encode(message.inviterRivalExtra, writer.uint32(66).fork()).join();
        }
        for (const v of message.otherRivalExtra) {
            exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra.encode(v, writer.uint32(74).fork()).join();
        }
        if (message.topicInfo !== undefined) {
            exports.CohostTopic.encode(message.topicInfo, writer.uint32(82).fork()).join();
        }
        if (message.algoRequestId !== "") {
            writer.uint32(90).string(message.algoRequestId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerInviteContent_LinkerInviteMessageExtra();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.matchType = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.inviteType = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.subType = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.theme = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.duration = reader.int32();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.layout = reader.int32();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.tips = reader.string();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.inviterRivalExtra = exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra.decode(reader, reader.uint32());
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.otherRivalExtra.push(exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra.decode(reader, reader.uint32()));
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.topicInfo = exports.CohostTopic.decode(reader, reader.uint32());
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.algoRequestId = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerInviteContent_LinkerInviteMessageExtra.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerInviteContent_LinkerInviteMessageExtra();
        message.matchType = object.matchType ?? 0;
        message.inviteType = object.inviteType ?? 0;
        message.subType = object.subType ?? 0;
        message.theme = object.theme ?? "";
        message.duration = object.duration ?? 0;
        message.layout = object.layout ?? 0;
        message.tips = object.tips ?? "";
        message.inviterRivalExtra = (object.inviterRivalExtra !== undefined && object.inviterRivalExtra !== null)
            ? exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra.fromPartial(object.inviterRivalExtra)
            : undefined;
        message.otherRivalExtra =
            object.otherRivalExtra?.map((e) => exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra.fromPartial(e)) || [];
        message.topicInfo = (object.topicInfo !== undefined && object.topicInfo !== null)
            ? exports.CohostTopic.fromPartial(object.topicInfo)
            : undefined;
        message.algoRequestId = object.algoRequestId ?? "";
        return message;
    },
};
function createBaseLinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra() {
    return {
        textType: 0,
        text: "",
        label: "",
        userCount: 0,
        avatarThumb: undefined,
        displayId: "",
        authenticationInfo: undefined,
        nickname: "",
        followStatus: "0",
        mHashtag: undefined,
        userId: "0",
        isBestTeammate: false,
        optPairInfo: undefined,
        followerCount: "0",
    };
}
exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.textType !== 0) {
            writer.uint32(8).int32(message.textType);
        }
        if (message.text !== "") {
            writer.uint32(18).string(message.text);
        }
        if (message.label !== "") {
            writer.uint32(26).string(message.label);
        }
        if (message.userCount !== 0) {
            writer.uint32(32).int32(message.userCount);
        }
        if (message.avatarThumb !== undefined) {
            exports.Image.encode(message.avatarThumb, writer.uint32(42).fork()).join();
        }
        if (message.displayId !== "") {
            writer.uint32(50).string(message.displayId);
        }
        if (message.authenticationInfo !== undefined) {
            exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_AuthenticationInfo.encode(message.authenticationInfo, writer.uint32(58).fork()).join();
        }
        if (message.nickname !== "") {
            writer.uint32(66).string(message.nickname);
        }
        if (message.followStatus !== "0") {
            writer.uint32(72).int64(message.followStatus);
        }
        if (message.mHashtag !== undefined) {
            exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_Hashtag.encode(message.mHashtag, writer.uint32(82).fork()).join();
        }
        if (message.userId !== "0") {
            writer.uint32(96).int64(message.userId);
        }
        if (message.isBestTeammate !== false) {
            writer.uint32(104).bool(message.isBestTeammate);
        }
        if (message.optPairInfo !== undefined) {
            exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_OptPairInfo.encode(message.optPairInfo, writer.uint32(114).fork()).join();
        }
        if (message.followerCount !== "0") {
            writer.uint32(120).int64(message.followerCount);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.textType = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.text = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.label = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.userCount = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.avatarThumb = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.displayId = reader.string();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.authenticationInfo = exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_AuthenticationInfo
                        .decode(reader, reader.uint32());
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.nickname = reader.string();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.followStatus = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.mHashtag = exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_Hashtag.decode(reader, reader.uint32());
                    continue;
                }
                case 12: {
                    if (tag !== 96) {
                        break;
                    }
                    message.userId = reader.int64().toString();
                    continue;
                }
                case 13: {
                    if (tag !== 104) {
                        break;
                    }
                    message.isBestTeammate = reader.bool();
                    continue;
                }
                case 14: {
                    if (tag !== 114) {
                        break;
                    }
                    message.optPairInfo = exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_OptPairInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 15: {
                    if (tag !== 120) {
                        break;
                    }
                    message.followerCount = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra();
        message.textType = object.textType ?? 0;
        message.text = object.text ?? "";
        message.label = object.label ?? "";
        message.userCount = object.userCount ?? 0;
        message.avatarThumb = (object.avatarThumb !== undefined && object.avatarThumb !== null)
            ? exports.Image.fromPartial(object.avatarThumb)
            : undefined;
        message.displayId = object.displayId ?? "";
        message.authenticationInfo = (object.authenticationInfo !== undefined && object.authenticationInfo !== null)
            ? exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_AuthenticationInfo.fromPartial(object.authenticationInfo)
            : undefined;
        message.nickname = object.nickname ?? "";
        message.followStatus = object.followStatus ?? "0";
        message.mHashtag = (object.mHashtag !== undefined && object.mHashtag !== null)
            ? exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_Hashtag.fromPartial(object.mHashtag)
            : undefined;
        message.userId = object.userId ?? "0";
        message.isBestTeammate = object.isBestTeammate ?? false;
        message.optPairInfo = (object.optPairInfo !== undefined && object.optPairInfo !== null)
            ? exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_OptPairInfo.fromPartial(object.optPairInfo)
            : undefined;
        message.followerCount = object.followerCount ?? "0";
        return message;
    },
};
function createBaseLinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_AuthenticationInfo() {
    return { customVerify: "", enterpriseVerifyReason: "", authenticationBadge: undefined };
}
exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_AuthenticationInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.customVerify !== "") {
            writer.uint32(10).string(message.customVerify);
        }
        if (message.enterpriseVerifyReason !== "") {
            writer.uint32(18).string(message.enterpriseVerifyReason);
        }
        if (message.authenticationBadge !== undefined) {
            exports.Image.encode(message.authenticationBadge, writer.uint32(26).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_AuthenticationInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.customVerify = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.enterpriseVerifyReason = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.authenticationBadge = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_AuthenticationInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_AuthenticationInfo();
        message.customVerify = object.customVerify ?? "";
        message.enterpriseVerifyReason = object.enterpriseVerifyReason ?? "";
        message.authenticationBadge = (object.authenticationBadge !== undefined && object.authenticationBadge !== null)
            ? exports.Image.fromPartial(object.authenticationBadge)
            : undefined;
        return message;
    },
};
function createBaseLinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_Hashtag() {
    return { id: "0", title: "", image: undefined, namespace: 0 };
}
exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_Hashtag = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.id !== "0") {
            writer.uint32(8).int64(message.id);
        }
        if (message.title !== "") {
            writer.uint32(18).string(message.title);
        }
        if (message.image !== undefined) {
            exports.Image.encode(message.image, writer.uint32(26).fork()).join();
        }
        if (message.namespace !== 0) {
            writer.uint32(32).int32(message.namespace);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_Hashtag();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.id = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.title = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.image = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.namespace = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_Hashtag.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_Hashtag();
        message.id = object.id ?? "0";
        message.title = object.title ?? "";
        message.image = (object.image !== undefined && object.image !== null) ? exports.Image.fromPartial(object.image) : undefined;
        message.namespace = object.namespace ?? 0;
        return message;
    },
};
function createBaseLinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_OptPairInfo() {
    return { mappingId: "0", displayUserList: [], buttonNoticeType: 0, expectedTimeSec: "0", optPairType: "0" };
}
exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_OptPairInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.mappingId !== "0") {
            writer.uint32(8).int64(message.mappingId);
        }
        for (const v of message.displayUserList) {
            exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_OptPairInfo_OptPairUser.encode(v, writer.uint32(18).fork()).join();
        }
        if (message.buttonNoticeType !== 0) {
            writer.uint32(24).int32(message.buttonNoticeType);
        }
        if (message.expectedTimeSec !== "0") {
            writer.uint32(32).int64(message.expectedTimeSec);
        }
        if (message.optPairType !== "0") {
            writer.uint32(40).int64(message.optPairType);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_OptPairInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.mappingId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.displayUserList.push(exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_OptPairInfo_OptPairUser.decode(reader, reader.uint32()));
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.buttonNoticeType = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.expectedTimeSec = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.optPairType = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_OptPairInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_OptPairInfo();
        message.mappingId = object.mappingId ?? "0";
        message.displayUserList =
            object.displayUserList?.map((e) => exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_OptPairInfo_OptPairUser.fromPartial(e)) || [];
        message.buttonNoticeType = object.buttonNoticeType ?? 0;
        message.expectedTimeSec = object.expectedTimeSec ?? "0";
        message.optPairType = object.optPairType ?? "0";
        return message;
    },
};
function createBaseLinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_OptPairInfo_OptPairUser() {
    return { user: undefined, roomId: "0" };
}
exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_OptPairInfo_OptPairUser = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.user !== undefined) {
            exports.User.encode(message.user, writer.uint32(10).fork()).join();
        }
        if (message.roomId !== "0") {
            writer.uint32(16).int64(message.roomId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_OptPairInfo_OptPairUser();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.user = exports.User.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.roomId = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_OptPairInfo_OptPairUser.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerInviteContent_LinkerInviteMessageExtra_InviterRivalExtra_OptPairInfo_OptPairUser();
        message.user = (object.user !== undefined && object.user !== null) ? exports.User.fromPartial(object.user) : undefined;
        message.roomId = object.roomId ?? "0";
        return message;
    },
};
function createBaseCohostTopic() {
    return { id: "0", titleKey: "", titleText: "", liked: false, totalHeat: "0", totalRivals: "0", rivalsAvatar: [] };
}
exports.CohostTopic = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.id !== "0") {
            writer.uint32(8).int64(message.id);
        }
        if (message.titleKey !== "") {
            writer.uint32(18).string(message.titleKey);
        }
        if (message.titleText !== "") {
            writer.uint32(26).string(message.titleText);
        }
        if (message.liked !== false) {
            writer.uint32(168).bool(message.liked);
        }
        if (message.totalHeat !== "0") {
            writer.uint32(176).int64(message.totalHeat);
        }
        if (message.totalRivals !== "0") {
            writer.uint32(184).int64(message.totalRivals);
        }
        for (const v of message.rivalsAvatar) {
            exports.Image.encode(v, writer.uint32(194).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseCohostTopic();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.id = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.titleKey = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.titleText = reader.string();
                    continue;
                }
                case 21: {
                    if (tag !== 168) {
                        break;
                    }
                    message.liked = reader.bool();
                    continue;
                }
                case 22: {
                    if (tag !== 176) {
                        break;
                    }
                    message.totalHeat = reader.int64().toString();
                    continue;
                }
                case 23: {
                    if (tag !== 184) {
                        break;
                    }
                    message.totalRivals = reader.int64().toString();
                    continue;
                }
                case 24: {
                    if (tag !== 194) {
                        break;
                    }
                    message.rivalsAvatar.push(exports.Image.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.CohostTopic.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseCohostTopic();
        message.id = object.id ?? "0";
        message.titleKey = object.titleKey ?? "";
        message.titleText = object.titleText ?? "";
        message.liked = object.liked ?? false;
        message.totalHeat = object.totalHeat ?? "0";
        message.totalRivals = object.totalRivals ?? "0";
        message.rivalsAvatar = object.rivalsAvatar?.map((e) => exports.Image.fromPartial(e)) || [];
        return message;
    },
};
function createBaseLinkerKickOutContent() {
    return { fromUserId: "0", kickoutReason: 0 };
}
exports.LinkerKickOutContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.fromUserId !== "0") {
            writer.uint32(8).int64(message.fromUserId);
        }
        if (message.kickoutReason !== 0) {
            writer.uint32(16).int32(message.kickoutReason);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerKickOutContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.fromUserId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.kickoutReason = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerKickOutContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerKickOutContent();
        message.fromUserId = object.fromUserId ?? "0";
        message.kickoutReason = object.kickoutReason ?? 0;
        return message;
    },
};
function createBaseLinkerLeaveContent() {
    return { userId: "0", linkmicIdStr: "", sendLeaveUid: "0", leaveReason: "0" };
}
exports.LinkerLeaveContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.userId !== "0") {
            writer.uint32(8).int64(message.userId);
        }
        if (message.linkmicIdStr !== "") {
            writer.uint32(18).string(message.linkmicIdStr);
        }
        if (message.sendLeaveUid !== "0") {
            writer.uint32(24).int64(message.sendLeaveUid);
        }
        if (message.leaveReason !== "0") {
            writer.uint32(32).int64(message.leaveReason);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerLeaveContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.userId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.linkmicIdStr = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.sendLeaveUid = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.leaveReason = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerLeaveContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerLeaveContent();
        message.userId = object.userId ?? "0";
        message.linkmicIdStr = object.linkmicIdStr ?? "";
        message.sendLeaveUid = object.sendLeaveUid ?? "0";
        message.leaveReason = object.leaveReason ?? "0";
        return message;
    },
};
function createBaseLinkerLinkedListChangeContent() {
    return {};
}
exports.LinkerLinkedListChangeContent = {
    encode(_, writer = new wire_1.BinaryWriter()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerLinkedListChangeContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerLinkedListChangeContent.fromPartial(base ?? {});
    },
    fromPartial(_) {
        const message = createBaseLinkerLinkedListChangeContent();
        return message;
    },
};
function createBaseCohostListChangeContent() {
    return {};
}
exports.CohostListChangeContent = {
    encode(_, writer = new wire_1.BinaryWriter()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseCohostListChangeContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.CohostListChangeContent.fromPartial(base ?? {});
    },
    fromPartial(_) {
        const message = createBaseCohostListChangeContent();
        return message;
    },
};
function createBaseLinkerListChangeContent() {
    return { linkedUsers: [], appliedUsers: [], connectingUsers: [] };
}
exports.LinkerListChangeContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.linkedUsers) {
            exports.ListUser.encode(v, writer.uint32(10).fork()).join();
        }
        for (const v of message.appliedUsers) {
            exports.ListUser.encode(v, writer.uint32(18).fork()).join();
        }
        for (const v of message.connectingUsers) {
            exports.ListUser.encode(v, writer.uint32(26).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerListChangeContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.linkedUsers.push(exports.ListUser.decode(reader, reader.uint32()));
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.appliedUsers.push(exports.ListUser.decode(reader, reader.uint32()));
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.connectingUsers.push(exports.ListUser.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerListChangeContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerListChangeContent();
        message.linkedUsers = object.linkedUsers?.map((e) => exports.ListUser.fromPartial(e)) || [];
        message.appliedUsers = object.appliedUsers?.map((e) => exports.ListUser.fromPartial(e)) || [];
        message.connectingUsers = object.connectingUsers?.map((e) => exports.ListUser.fromPartial(e)) || [];
        return message;
    },
};
function createBaseLinkerMediaChangeContent() {
    return { op: 0, toUserId: "0", anchorId: "0", roomId: "0", changeScene: 0, operatorInfo: undefined };
}
exports.LinkerMediaChangeContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.op !== 0) {
            writer.uint32(8).int32(message.op);
        }
        if (message.toUserId !== "0") {
            writer.uint32(16).int64(message.toUserId);
        }
        if (message.anchorId !== "0") {
            writer.uint32(24).int64(message.anchorId);
        }
        if (message.roomId !== "0") {
            writer.uint32(32).int64(message.roomId);
        }
        if (message.changeScene !== 0) {
            writer.uint32(40).int32(message.changeScene);
        }
        if (message.operatorInfo !== undefined) {
            exports.LinkerMediaChangeContent_LinkerMediaChangeOperator.encode(message.operatorInfo, writer.uint32(58).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerMediaChangeContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.op = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.toUserId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.anchorId = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.roomId = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.changeScene = reader.int32();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.operatorInfo = exports.LinkerMediaChangeContent_LinkerMediaChangeOperator.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerMediaChangeContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerMediaChangeContent();
        message.op = object.op ?? 0;
        message.toUserId = object.toUserId ?? "0";
        message.anchorId = object.anchorId ?? "0";
        message.roomId = object.roomId ?? "0";
        message.changeScene = object.changeScene ?? 0;
        message.operatorInfo = (object.operatorInfo !== undefined && object.operatorInfo !== null)
            ? exports.LinkerMediaChangeContent_LinkerMediaChangeOperator.fromPartial(object.operatorInfo)
            : undefined;
        return message;
    },
};
function createBaseLinkerMediaChangeContent_LinkerMediaChangeOperator() {
    return { userId: "0", operatorType: 0, nickName: "", displayId: "" };
}
exports.LinkerMediaChangeContent_LinkerMediaChangeOperator = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.userId !== "0") {
            writer.uint32(8).int64(message.userId);
        }
        if (message.operatorType !== 0) {
            writer.uint32(16).int32(message.operatorType);
        }
        if (message.nickName !== "") {
            writer.uint32(26).string(message.nickName);
        }
        if (message.displayId !== "") {
            writer.uint32(34).string(message.displayId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerMediaChangeContent_LinkerMediaChangeOperator();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.userId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.operatorType = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.nickName = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.displayId = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerMediaChangeContent_LinkerMediaChangeOperator.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerMediaChangeContent_LinkerMediaChangeOperator();
        message.userId = object.userId ?? "0";
        message.operatorType = object.operatorType ?? 0;
        message.nickName = object.nickName ?? "";
        message.displayId = object.displayId ?? "";
        return message;
    },
};
function createBaseLinkerMicIdxUpdateContent() {
    return {};
}
exports.LinkerMicIdxUpdateContent = {
    encode(_, writer = new wire_1.BinaryWriter()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerMicIdxUpdateContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerMicIdxUpdateContent.fromPartial(base ?? {});
    },
    fromPartial(_) {
        const message = createBaseLinkerMicIdxUpdateContent();
        return message;
    },
};
function createBaseLinkerMuteContent() {
    return { userId: "0", status: 0 };
}
exports.LinkerMuteContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.userId !== "0") {
            writer.uint32(8).int64(message.userId);
        }
        if (message.status !== 0) {
            writer.uint32(16).int32(message.status);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerMuteContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.userId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.status = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerMuteContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerMuteContent();
        message.userId = object.userId ?? "0";
        message.status = object.status ?? 0;
        return message;
    },
};
function createBaseLinkerRandomMatchContent() {
    return { user: undefined, roomId: "0", inviteType: "0", matchId: "", innerChannelId: "0" };
}
exports.LinkerRandomMatchContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.user !== undefined) {
            exports.User.encode(message.user, writer.uint32(10).fork()).join();
        }
        if (message.roomId !== "0") {
            writer.uint32(16).int64(message.roomId);
        }
        if (message.inviteType !== "0") {
            writer.uint32(24).int64(message.inviteType);
        }
        if (message.matchId !== "") {
            writer.uint32(34).string(message.matchId);
        }
        if (message.innerChannelId !== "0") {
            writer.uint32(40).int64(message.innerChannelId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerRandomMatchContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.user = exports.User.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.roomId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.inviteType = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.matchId = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.innerChannelId = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerRandomMatchContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerRandomMatchContent();
        message.user = (object.user !== undefined && object.user !== null) ? exports.User.fromPartial(object.user) : undefined;
        message.roomId = object.roomId ?? "0";
        message.inviteType = object.inviteType ?? "0";
        message.matchId = object.matchId ?? "";
        message.innerChannelId = object.innerChannelId ?? "0";
        return message;
    },
};
function createBaseLinkerReplyContent() {
    return {
        fromUserId: "0",
        fromRoomId: "0",
        fromUserLinkmicInfo: undefined,
        toUserId: "0",
        toUserLinkmicInfo: undefined,
        linkType: "0",
        replyStatus: "0",
        linkerSetting: undefined,
        fromUser: undefined,
        toUser: undefined,
    };
}
exports.LinkerReplyContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.fromUserId !== "0") {
            writer.uint32(8).int64(message.fromUserId);
        }
        if (message.fromRoomId !== "0") {
            writer.uint32(16).int64(message.fromRoomId);
        }
        if (message.fromUserLinkmicInfo !== undefined) {
            exports.LinkerReplyContent_LinkmicInfo.encode(message.fromUserLinkmicInfo, writer.uint32(26).fork()).join();
        }
        if (message.toUserId !== "0") {
            writer.uint32(32).int64(message.toUserId);
        }
        if (message.toUserLinkmicInfo !== undefined) {
            exports.LinkerReplyContent_LinkmicInfo.encode(message.toUserLinkmicInfo, writer.uint32(42).fork()).join();
        }
        if (message.linkType !== "0") {
            writer.uint32(48).int64(message.linkType);
        }
        if (message.replyStatus !== "0") {
            writer.uint32(56).int64(message.replyStatus);
        }
        if (message.linkerSetting !== undefined) {
            exports.LinkerSetting.encode(message.linkerSetting, writer.uint32(66).fork()).join();
        }
        if (message.fromUser !== undefined) {
            exports.User.encode(message.fromUser, writer.uint32(74).fork()).join();
        }
        if (message.toUser !== undefined) {
            exports.User.encode(message.toUser, writer.uint32(82).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerReplyContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.fromUserId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.fromRoomId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.fromUserLinkmicInfo = exports.LinkerReplyContent_LinkmicInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.toUserId = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.toUserLinkmicInfo = exports.LinkerReplyContent_LinkmicInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.linkType = reader.int64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.replyStatus = reader.int64().toString();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.linkerSetting = exports.LinkerSetting.decode(reader, reader.uint32());
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.fromUser = exports.User.decode(reader, reader.uint32());
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.toUser = exports.User.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerReplyContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerReplyContent();
        message.fromUserId = object.fromUserId ?? "0";
        message.fromRoomId = object.fromRoomId ?? "0";
        message.fromUserLinkmicInfo = (object.fromUserLinkmicInfo !== undefined && object.fromUserLinkmicInfo !== null)
            ? exports.LinkerReplyContent_LinkmicInfo.fromPartial(object.fromUserLinkmicInfo)
            : undefined;
        message.toUserId = object.toUserId ?? "0";
        message.toUserLinkmicInfo = (object.toUserLinkmicInfo !== undefined && object.toUserLinkmicInfo !== null)
            ? exports.LinkerReplyContent_LinkmicInfo.fromPartial(object.toUserLinkmicInfo)
            : undefined;
        message.linkType = object.linkType ?? "0";
        message.replyStatus = object.replyStatus ?? "0";
        message.linkerSetting = (object.linkerSetting !== undefined && object.linkerSetting !== null)
            ? exports.LinkerSetting.fromPartial(object.linkerSetting)
            : undefined;
        message.fromUser = (object.fromUser !== undefined && object.fromUser !== null)
            ? exports.User.fromPartial(object.fromUser)
            : undefined;
        message.toUser = (object.toUser !== undefined && object.toUser !== null)
            ? exports.User.fromPartial(object.toUser)
            : undefined;
        return message;
    },
};
function createBaseLinkerReplyContent_LinkmicInfo() {
    return {
        accessKey: "",
        linkMicId: "0",
        joinable: false,
        confluenceType: 0,
        rtcExtInfo: "",
        rtcAppId: "",
        rtcAppSign: "",
        linkmicIdStr: "",
        vendor: "0",
    };
}
exports.LinkerReplyContent_LinkmicInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.accessKey !== "") {
            writer.uint32(10).string(message.accessKey);
        }
        if (message.linkMicId !== "0") {
            writer.uint32(16).int64(message.linkMicId);
        }
        if (message.joinable !== false) {
            writer.uint32(24).bool(message.joinable);
        }
        if (message.confluenceType !== 0) {
            writer.uint32(32).int32(message.confluenceType);
        }
        if (message.rtcExtInfo !== "") {
            writer.uint32(42).string(message.rtcExtInfo);
        }
        if (message.rtcAppId !== "") {
            writer.uint32(50).string(message.rtcAppId);
        }
        if (message.rtcAppSign !== "") {
            writer.uint32(58).string(message.rtcAppSign);
        }
        if (message.linkmicIdStr !== "") {
            writer.uint32(66).string(message.linkmicIdStr);
        }
        if (message.vendor !== "0") {
            writer.uint32(72).int64(message.vendor);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerReplyContent_LinkmicInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.accessKey = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.linkMicId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.joinable = reader.bool();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.confluenceType = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.rtcExtInfo = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.rtcAppId = reader.string();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.rtcAppSign = reader.string();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.linkmicIdStr = reader.string();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.vendor = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerReplyContent_LinkmicInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerReplyContent_LinkmicInfo();
        message.accessKey = object.accessKey ?? "";
        message.linkMicId = object.linkMicId ?? "0";
        message.joinable = object.joinable ?? false;
        message.confluenceType = object.confluenceType ?? 0;
        message.rtcExtInfo = object.rtcExtInfo ?? "";
        message.rtcAppId = object.rtcAppId ?? "";
        message.rtcAppSign = object.rtcAppSign ?? "";
        message.linkmicIdStr = object.linkmicIdStr ?? "";
        message.vendor = object.vendor ?? "0";
        return message;
    },
};
function createBaseLinkerSetting() {
    return { MaxMemberLimit: "0", LinkType: "0", Scene: 0, OwnerUserId: "0", OwnerRoomId: "0", Vendor: "0" };
}
exports.LinkerSetting = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.MaxMemberLimit !== "0") {
            writer.uint32(8).int64(message.MaxMemberLimit);
        }
        if (message.LinkType !== "0") {
            writer.uint32(16).int64(message.LinkType);
        }
        if (message.Scene !== 0) {
            writer.uint32(24).int32(message.Scene);
        }
        if (message.OwnerUserId !== "0") {
            writer.uint32(32).int64(message.OwnerUserId);
        }
        if (message.OwnerRoomId !== "0") {
            writer.uint32(40).int64(message.OwnerRoomId);
        }
        if (message.Vendor !== "0") {
            writer.uint32(48).int64(message.Vendor);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerSetting();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.MaxMemberLimit = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.LinkType = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.Scene = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.OwnerUserId = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.OwnerRoomId = reader.int64().toString();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.Vendor = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerSetting.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerSetting();
        message.MaxMemberLimit = object.MaxMemberLimit ?? "0";
        message.LinkType = object.LinkType ?? "0";
        message.Scene = object.Scene ?? 0;
        message.OwnerUserId = object.OwnerUserId ?? "0";
        message.OwnerRoomId = object.OwnerRoomId ?? "0";
        message.Vendor = object.Vendor ?? "0";
        return message;
    },
};
function createBaseLinkerSysKickOutContent() {
    return { userId: "0", linkmicIdStr: "" };
}
exports.LinkerSysKickOutContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.userId !== "0") {
            writer.uint32(8).int64(message.userId);
        }
        if (message.linkmicIdStr !== "") {
            writer.uint32(18).string(message.linkmicIdStr);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerSysKickOutContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.userId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.linkmicIdStr = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerSysKickOutContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerSysKickOutContent();
        message.userId = object.userId ?? "0";
        message.linkmicIdStr = object.linkmicIdStr ?? "";
        return message;
    },
};
function createBaseLinkmicUserToastContent() {
    return { userId: "0", roomId: "0", displayText: undefined, leavedUserId: "0" };
}
exports.LinkmicUserToastContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.userId !== "0") {
            writer.uint32(8).int64(message.userId);
        }
        if (message.roomId !== "0") {
            writer.uint32(16).int64(message.roomId);
        }
        if (message.displayText !== undefined) {
            exports.Text.encode(message.displayText, writer.uint32(26).fork()).join();
        }
        if (message.leavedUserId !== "0") {
            writer.uint32(32).int64(message.leavedUserId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkmicUserToastContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.userId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.roomId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.displayText = exports.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.leavedUserId = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkmicUserToastContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkmicUserToastContent();
        message.userId = object.userId ?? "0";
        message.roomId = object.roomId ?? "0";
        message.displayText = (object.displayText !== undefined && object.displayText !== null)
            ? exports.Text.fromPartial(object.displayText)
            : undefined;
        message.leavedUserId = object.leavedUserId ?? "0";
        return message;
    },
};
function createBaseLinkerUpdateUserContent() {
    return { fromUserId: "0", toUserId: "0", updateInfo: {} };
}
exports.LinkerUpdateUserContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.fromUserId !== "0") {
            writer.uint32(8).int64(message.fromUserId);
        }
        if (message.toUserId !== "0") {
            writer.uint32(16).int64(message.toUserId);
        }
        Object.entries(message.updateInfo).forEach(([key, value]) => {
            exports.LinkerUpdateUserContent_UpdateInfoEntry.encode({ key: key, value }, writer.uint32(26).fork()).join();
        });
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerUpdateUserContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.fromUserId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.toUserId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    const entry3 = exports.LinkerUpdateUserContent_UpdateInfoEntry.decode(reader, reader.uint32());
                    if (entry3.value !== undefined) {
                        message.updateInfo[entry3.key] = entry3.value;
                    }
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerUpdateUserContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerUpdateUserContent();
        message.fromUserId = object.fromUserId ?? "0";
        message.toUserId = object.toUserId ?? "0";
        message.updateInfo = Object.entries(object.updateInfo ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = globalThis.String(value);
            }
            return acc;
        }, {});
        return message;
    },
};
function createBaseLinkerUpdateUserContent_UpdateInfoEntry() {
    return { key: "", value: "" };
}
exports.LinkerUpdateUserContent_UpdateInfoEntry = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.key !== "") {
            writer.uint32(10).string(message.key);
        }
        if (message.value !== "") {
            writer.uint32(18).string(message.value);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerUpdateUserContent_UpdateInfoEntry();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.key = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.value = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerUpdateUserContent_UpdateInfoEntry.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerUpdateUserContent_UpdateInfoEntry();
        message.key = object.key ?? "";
        message.value = object.value ?? "";
        return message;
    },
};
function createBaseLinkerUpdateUserSettingContent() {
    return { multiLiveAnchorPanelSettings: undefined };
}
exports.LinkerUpdateUserSettingContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.multiLiveAnchorPanelSettings !== undefined) {
            exports.MultiLiveAnchorPanelSettings.encode(message.multiLiveAnchorPanelSettings, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerUpdateUserSettingContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.multiLiveAnchorPanelSettings = exports.MultiLiveAnchorPanelSettings.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerUpdateUserSettingContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkerUpdateUserSettingContent();
        message.multiLiveAnchorPanelSettings =
            (object.multiLiveAnchorPanelSettings !== undefined && object.multiLiveAnchorPanelSettings !== null)
                ? exports.MultiLiveAnchorPanelSettings.fromPartial(object.multiLiveAnchorPanelSettings)
                : undefined;
        return message;
    },
};
function createBaseLinkerWaitingListChangeContent() {
    return {};
}
exports.LinkerWaitingListChangeContent = {
    encode(_, writer = new wire_1.BinaryWriter()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkerWaitingListChangeContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkerWaitingListChangeContent.fromPartial(base ?? {});
    },
    fromPartial(_) {
        const message = createBaseLinkerWaitingListChangeContent();
        return message;
    },
};
function createBaseMultiLiveAnchorPanelSettings() {
    return {
        userId: "0",
        layout: "0",
        fixMicNum: "0",
        allowRequestFromUser: "0",
        allowRequestFromFollowerOnly: "0",
        applierSortSetting: 0,
        applierSortGiftScoreThreshold: "0",
        allowRequestFromFriends: 0,
        allowRequestFromFollowers: 0,
        allowRequestFromOthers: 0,
        enableShowMultiGuestLayout: 0,
    };
}
exports.MultiLiveAnchorPanelSettings = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.userId !== "0") {
            writer.uint32(8).int64(message.userId);
        }
        if (message.layout !== "0") {
            writer.uint32(16).int64(message.layout);
        }
        if (message.fixMicNum !== "0") {
            writer.uint32(24).int64(message.fixMicNum);
        }
        if (message.allowRequestFromUser !== "0") {
            writer.uint32(32).int64(message.allowRequestFromUser);
        }
        if (message.allowRequestFromFollowerOnly !== "0") {
            writer.uint32(40).int64(message.allowRequestFromFollowerOnly);
        }
        if (message.applierSortSetting !== 0) {
            writer.uint32(56).int32(message.applierSortSetting);
        }
        if (message.applierSortGiftScoreThreshold !== "0") {
            writer.uint32(64).int64(message.applierSortGiftScoreThreshold);
        }
        if (message.allowRequestFromFriends !== 0) {
            writer.uint32(72).int32(message.allowRequestFromFriends);
        }
        if (message.allowRequestFromFollowers !== 0) {
            writer.uint32(80).int32(message.allowRequestFromFollowers);
        }
        if (message.allowRequestFromOthers !== 0) {
            writer.uint32(88).int32(message.allowRequestFromOthers);
        }
        if (message.enableShowMultiGuestLayout !== 0) {
            writer.uint32(96).int32(message.enableShowMultiGuestLayout);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseMultiLiveAnchorPanelSettings();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.userId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.layout = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.fixMicNum = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.allowRequestFromUser = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.allowRequestFromFollowerOnly = reader.int64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.applierSortSetting = reader.int32();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.applierSortGiftScoreThreshold = reader.int64().toString();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.allowRequestFromFriends = reader.int32();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.allowRequestFromFollowers = reader.int32();
                    continue;
                }
                case 11: {
                    if (tag !== 88) {
                        break;
                    }
                    message.allowRequestFromOthers = reader.int32();
                    continue;
                }
                case 12: {
                    if (tag !== 96) {
                        break;
                    }
                    message.enableShowMultiGuestLayout = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.MultiLiveAnchorPanelSettings.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseMultiLiveAnchorPanelSettings();
        message.userId = object.userId ?? "0";
        message.layout = object.layout ?? "0";
        message.fixMicNum = object.fixMicNum ?? "0";
        message.allowRequestFromUser = object.allowRequestFromUser ?? "0";
        message.allowRequestFromFollowerOnly = object.allowRequestFromFollowerOnly ?? "0";
        message.applierSortSetting = object.applierSortSetting ?? 0;
        message.applierSortGiftScoreThreshold = object.applierSortGiftScoreThreshold ?? "0";
        message.allowRequestFromFriends = object.allowRequestFromFriends ?? 0;
        message.allowRequestFromFollowers = object.allowRequestFromFollowers ?? 0;
        message.allowRequestFromOthers = object.allowRequestFromOthers ?? 0;
        message.enableShowMultiGuestLayout = object.enableShowMultiGuestLayout ?? 0;
        return message;
    },
};
function createBasePlayer() {
    return { roomId: "0", userId: "0" };
}
exports.Player = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.roomId !== "0") {
            writer.uint32(8).int64(message.roomId);
        }
        if (message.userId !== "0") {
            writer.uint32(16).int64(message.userId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePlayer();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.roomId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.userId = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Player.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePlayer();
        message.roomId = object.roomId ?? "0";
        message.userId = object.userId ?? "0";
        return message;
    },
};
function createBaseAllListUser() {
    return { linkedList: [], appliedList: [], invitedList: [], readyList: [] };
}
exports.AllListUser = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.linkedList) {
            exports.LinkLayerListUser.encode(v, writer.uint32(18).fork()).join();
        }
        for (const v of message.appliedList) {
            exports.LinkLayerListUser.encode(v, writer.uint32(26).fork()).join();
        }
        for (const v of message.invitedList) {
            exports.LinkLayerListUser.encode(v, writer.uint32(34).fork()).join();
        }
        for (const v of message.readyList) {
            exports.LinkLayerListUser.encode(v, writer.uint32(42).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseAllListUser();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.linkedList.push(exports.LinkLayerListUser.decode(reader, reader.uint32()));
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.appliedList.push(exports.LinkLayerListUser.decode(reader, reader.uint32()));
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.invitedList.push(exports.LinkLayerListUser.decode(reader, reader.uint32()));
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.readyList.push(exports.LinkLayerListUser.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.AllListUser.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseAllListUser();
        message.linkedList = object.linkedList?.map((e) => exports.LinkLayerListUser.fromPartial(e)) || [];
        message.appliedList = object.appliedList?.map((e) => exports.LinkLayerListUser.fromPartial(e)) || [];
        message.invitedList = object.invitedList?.map((e) => exports.LinkLayerListUser.fromPartial(e)) || [];
        message.readyList = object.readyList?.map((e) => exports.LinkLayerListUser.fromPartial(e)) || [];
        return message;
    },
};
function createBaseLinkLayerListUser() {
    return { user: undefined, linkmicId: "0", pos: undefined, linkedTimeNano: "0", appVersion: "", magicNumber1: "0" };
}
exports.LinkLayerListUser = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.user !== undefined) {
            exports.User.encode(message.user, writer.uint32(10).fork()).join();
        }
        if (message.linkmicId !== "0") {
            writer.uint32(16).int64(message.linkmicId);
        }
        if (message.pos !== undefined) {
            exports.Position.encode(message.pos, writer.uint32(26).fork()).join();
        }
        if (message.linkedTimeNano !== "0") {
            writer.uint32(32).int64(message.linkedTimeNano);
        }
        if (message.appVersion !== "") {
            writer.uint32(42).string(message.appVersion);
        }
        if (message.magicNumber1 !== "0") {
            writer.uint32(56).int64(message.magicNumber1);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkLayerListUser();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.user = exports.User.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.linkmicId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.pos = exports.Position.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.linkedTimeNano = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.appVersion = reader.string();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.magicNumber1 = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkLayerListUser.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkLayerListUser();
        message.user = (object.user !== undefined && object.user !== null) ? exports.User.fromPartial(object.user) : undefined;
        message.linkmicId = object.linkmicId ?? "0";
        message.pos = (object.pos !== undefined && object.pos !== null) ? exports.Position.fromPartial(object.pos) : undefined;
        message.linkedTimeNano = object.linkedTimeNano ?? "0";
        message.appVersion = object.appVersion ?? "";
        message.magicNumber1 = object.magicNumber1 ?? "0";
        return message;
    },
};
function createBasePosition() {
    return { type: 0, link: undefined };
}
exports.Position = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.type !== 0) {
            writer.uint32(8).int32(message.type);
        }
        if (message.link !== undefined) {
            exports.LinkPosition.encode(message.link, writer.uint32(18).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePosition();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.type = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.link = exports.LinkPosition.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Position.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePosition();
        message.type = object.type ?? 0;
        message.link = (object.link !== undefined && object.link !== null)
            ? exports.LinkPosition.fromPartial(object.link)
            : undefined;
        return message;
    },
};
function createBaseLinkPosition() {
    return { position: 0, opt: 0 };
}
exports.LinkPosition = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.position !== 0) {
            writer.uint32(8).int32(message.position);
        }
        if (message.opt !== 0) {
            writer.uint32(16).int32(message.opt);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLinkPosition();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.position = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.opt = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LinkPosition.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLinkPosition();
        message.position = object.position ?? 0;
        message.opt = object.opt ?? 0;
        return message;
    },
};
function createBaseGroupPlayer() {
    return { channelId: "0", user: undefined };
}
exports.GroupPlayer = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.channelId !== "0") {
            writer.uint32(8).int64(message.channelId);
        }
        if (message.user !== undefined) {
            exports.User.encode(message.user, writer.uint32(18).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGroupPlayer();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.channelId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.user = exports.User.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.GroupPlayer.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGroupPlayer();
        message.channelId = object.channelId ?? "0";
        message.user = (object.user !== undefined && object.user !== null) ? exports.User.fromPartial(object.user) : undefined;
        return message;
    },
};
function createBaseDSLConfig() {
    return { sceneVersion: 0, layoutId: "" };
}
exports.DSLConfig = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.sceneVersion !== 0) {
            writer.uint32(8).int32(message.sceneVersion);
        }
        if (message.layoutId !== "") {
            writer.uint32(18).string(message.layoutId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseDSLConfig();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.sceneVersion = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.layoutId = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.DSLConfig.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseDSLConfig();
        message.sceneVersion = object.sceneVersion ?? 0;
        message.layoutId = object.layoutId ?? "";
        return message;
    },
};
function createBaseGroupChannelAllUser() {
    return { groupChannelId: "0", userList: [], contentVersion: "0" };
}
exports.GroupChannelAllUser = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.groupChannelId !== "0") {
            writer.uint32(8).int64(message.groupChannelId);
        }
        for (const v of message.userList) {
            exports.GroupChannelUser.encode(v, writer.uint32(18).fork()).join();
        }
        if (message.contentVersion !== "0") {
            writer.uint32(24).int64(message.contentVersion);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGroupChannelAllUser();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.groupChannelId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.userList.push(exports.GroupChannelUser.decode(reader, reader.uint32()));
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.contentVersion = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.GroupChannelAllUser.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGroupChannelAllUser();
        message.groupChannelId = object.groupChannelId ?? "0";
        message.userList = object.userList?.map((e) => exports.GroupChannelUser.fromPartial(e)) || [];
        message.contentVersion = object.contentVersion ?? "0";
        return message;
    },
};
function createBaseGroupChannelUser() {
    return {
        channelId: "0",
        status: 0,
        type: 0,
        allUser: undefined,
        joinTime: "0",
        linkedTime: "0",
        ownerUser: undefined,
        groupLinkmicId: "",
    };
}
exports.GroupChannelUser = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.channelId !== "0") {
            writer.uint32(8).int64(message.channelId);
        }
        if (message.status !== 0) {
            writer.uint32(16).int32(message.status);
        }
        if (message.type !== 0) {
            writer.uint32(24).int32(message.type);
        }
        if (message.allUser !== undefined) {
            exports.AllListUser.encode(message.allUser, writer.uint32(34).fork()).join();
        }
        if (message.joinTime !== "0") {
            writer.uint32(40).int64(message.joinTime);
        }
        if (message.linkedTime !== "0") {
            writer.uint32(48).int64(message.linkedTime);
        }
        if (message.ownerUser !== undefined) {
            exports.GroupPlayer.encode(message.ownerUser, writer.uint32(58).fork()).join();
        }
        if (message.groupLinkmicId !== "") {
            writer.uint32(66).string(message.groupLinkmicId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGroupChannelUser();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.channelId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.status = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.type = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.allUser = exports.AllListUser.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.joinTime = reader.int64().toString();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.linkedTime = reader.int64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.ownerUser = exports.GroupPlayer.decode(reader, reader.uint32());
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.groupLinkmicId = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.GroupChannelUser.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGroupChannelUser();
        message.channelId = object.channelId ?? "0";
        message.status = object.status ?? 0;
        message.type = object.type ?? 0;
        message.allUser = (object.allUser !== undefined && object.allUser !== null)
            ? exports.AllListUser.fromPartial(object.allUser)
            : undefined;
        message.joinTime = object.joinTime ?? "0";
        message.linkedTime = object.linkedTime ?? "0";
        message.ownerUser = (object.ownerUser !== undefined && object.ownerUser !== null)
            ? exports.GroupPlayer.fromPartial(object.ownerUser)
            : undefined;
        message.groupLinkmicId = object.groupLinkmicId ?? "";
        return message;
    },
};
function createBaseRTCExtraInfo() {
    return {
        liveRtcEngineConfig: undefined,
        liveRtcVideoParamList: [],
        rtcBitrateMap: undefined,
        rtcFps: 0,
        rtcMixBase: undefined,
        byteRtcExtInfo: undefined,
        rtcInfoExtra: undefined,
        rtcBusinessId: "",
        rtcOther: undefined,
        interactClientType: 0,
    };
}
exports.RTCExtraInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.liveRtcEngineConfig !== undefined) {
            exports.RTCExtraInfo_RTCEngineConfig.encode(message.liveRtcEngineConfig, writer.uint32(10).fork()).join();
        }
        for (const v of message.liveRtcVideoParamList) {
            exports.RTCExtraInfo_RTCLiveVideoParam.encode(v, writer.uint32(18).fork()).join();
        }
        if (message.rtcBitrateMap !== undefined) {
            exports.RTCExtraInfo_RTCBitrateMap.encode(message.rtcBitrateMap, writer.uint32(26).fork()).join();
        }
        if (message.rtcFps !== 0) {
            writer.uint32(32).int32(message.rtcFps);
        }
        if (message.rtcMixBase !== undefined) {
            exports.RTCExtraInfo_RTCMixBase.encode(message.rtcMixBase, writer.uint32(42).fork()).join();
        }
        if (message.byteRtcExtInfo !== undefined) {
            exports.RTCExtraInfo_ByteRTCExtInfo.encode(message.byteRtcExtInfo, writer.uint32(50).fork()).join();
        }
        if (message.rtcInfoExtra !== undefined) {
            exports.RTCExtraInfo_RTCInfoExtra.encode(message.rtcInfoExtra, writer.uint32(58).fork()).join();
        }
        if (message.rtcBusinessId !== "") {
            writer.uint32(66).string(message.rtcBusinessId);
        }
        if (message.rtcOther !== undefined) {
            exports.RTCExtraInfo_RTCOther.encode(message.rtcOther, writer.uint32(74).fork()).join();
        }
        if (message.interactClientType !== 0) {
            writer.uint32(80).int32(message.interactClientType);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRTCExtraInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.liveRtcEngineConfig = exports.RTCExtraInfo_RTCEngineConfig.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.liveRtcVideoParamList.push(exports.RTCExtraInfo_RTCLiveVideoParam.decode(reader, reader.uint32()));
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.rtcBitrateMap = exports.RTCExtraInfo_RTCBitrateMap.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.rtcFps = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.rtcMixBase = exports.RTCExtraInfo_RTCMixBase.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.byteRtcExtInfo = exports.RTCExtraInfo_ByteRTCExtInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.rtcInfoExtra = exports.RTCExtraInfo_RTCInfoExtra.decode(reader, reader.uint32());
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.rtcBusinessId = reader.string();
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.rtcOther = exports.RTCExtraInfo_RTCOther.decode(reader, reader.uint32());
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.interactClientType = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.RTCExtraInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRTCExtraInfo();
        message.liveRtcEngineConfig = (object.liveRtcEngineConfig !== undefined && object.liveRtcEngineConfig !== null)
            ? exports.RTCExtraInfo_RTCEngineConfig.fromPartial(object.liveRtcEngineConfig)
            : undefined;
        message.liveRtcVideoParamList =
            object.liveRtcVideoParamList?.map((e) => exports.RTCExtraInfo_RTCLiveVideoParam.fromPartial(e)) || [];
        message.rtcBitrateMap = (object.rtcBitrateMap !== undefined && object.rtcBitrateMap !== null)
            ? exports.RTCExtraInfo_RTCBitrateMap.fromPartial(object.rtcBitrateMap)
            : undefined;
        message.rtcFps = object.rtcFps ?? 0;
        message.rtcMixBase = (object.rtcMixBase !== undefined && object.rtcMixBase !== null)
            ? exports.RTCExtraInfo_RTCMixBase.fromPartial(object.rtcMixBase)
            : undefined;
        message.byteRtcExtInfo = (object.byteRtcExtInfo !== undefined && object.byteRtcExtInfo !== null)
            ? exports.RTCExtraInfo_ByteRTCExtInfo.fromPartial(object.byteRtcExtInfo)
            : undefined;
        message.rtcInfoExtra = (object.rtcInfoExtra !== undefined && object.rtcInfoExtra !== null)
            ? exports.RTCExtraInfo_RTCInfoExtra.fromPartial(object.rtcInfoExtra)
            : undefined;
        message.rtcBusinessId = object.rtcBusinessId ?? "";
        message.rtcOther = (object.rtcOther !== undefined && object.rtcOther !== null)
            ? exports.RTCExtraInfo_RTCOther.fromPartial(object.rtcOther)
            : undefined;
        message.interactClientType = object.interactClientType ?? 0;
        return message;
    },
};
function createBaseRTCExtraInfo_RTCMixBase() {
    return { bitrate: 0 };
}
exports.RTCExtraInfo_RTCMixBase = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.bitrate !== 0) {
            writer.uint32(8).int32(message.bitrate);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRTCExtraInfo_RTCMixBase();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.bitrate = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.RTCExtraInfo_RTCMixBase.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRTCExtraInfo_RTCMixBase();
        message.bitrate = object.bitrate ?? 0;
        return message;
    },
};
function createBaseRTCExtraInfo_ByteRTCExtInfo() {
    return { defaultSignaling: 0 };
}
exports.RTCExtraInfo_ByteRTCExtInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.defaultSignaling !== 0) {
            writer.uint32(8).int32(message.defaultSignaling);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRTCExtraInfo_ByteRTCExtInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.defaultSignaling = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.RTCExtraInfo_ByteRTCExtInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRTCExtraInfo_ByteRTCExtInfo();
        message.defaultSignaling = object.defaultSignaling ?? 0;
        return message;
    },
};
function createBaseRTCExtraInfo_RTCInfoExtra() {
    return { version: "" };
}
exports.RTCExtraInfo_RTCInfoExtra = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.version !== "") {
            writer.uint32(10).string(message.version);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRTCExtraInfo_RTCInfoExtra();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.version = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.RTCExtraInfo_RTCInfoExtra.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRTCExtraInfo_RTCInfoExtra();
        message.version = object.version ?? "";
        return message;
    },
};
function createBaseRTCExtraInfo_RTCOther() {
    return { transCodingSecond: 0 };
}
exports.RTCExtraInfo_RTCOther = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.transCodingSecond !== 0) {
            writer.uint32(8).int32(message.transCodingSecond);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRTCExtraInfo_RTCOther();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.transCodingSecond = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.RTCExtraInfo_RTCOther.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRTCExtraInfo_RTCOther();
        message.transCodingSecond = object.transCodingSecond ?? 0;
        return message;
    },
};
function createBaseRTCExtraInfo_RTCEngineConfig() {
    return { rtcAppId: "", rtcUserId: "", rtcToken: "", rtcChannelId: "0" };
}
exports.RTCExtraInfo_RTCEngineConfig = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.rtcAppId !== "") {
            writer.uint32(10).string(message.rtcAppId);
        }
        if (message.rtcUserId !== "") {
            writer.uint32(18).string(message.rtcUserId);
        }
        if (message.rtcToken !== "") {
            writer.uint32(26).string(message.rtcToken);
        }
        if (message.rtcChannelId !== "0") {
            writer.uint32(32).int64(message.rtcChannelId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRTCExtraInfo_RTCEngineConfig();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.rtcAppId = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.rtcUserId = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.rtcToken = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.rtcChannelId = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.RTCExtraInfo_RTCEngineConfig.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRTCExtraInfo_RTCEngineConfig();
        message.rtcAppId = object.rtcAppId ?? "";
        message.rtcUserId = object.rtcUserId ?? "";
        message.rtcToken = object.rtcToken ?? "";
        message.rtcChannelId = object.rtcChannelId ?? "0";
        return message;
    },
};
function createBaseRTCExtraInfo_RTCLiveVideoParam() {
    return { strategyId: 0, params: undefined };
}
exports.RTCExtraInfo_RTCLiveVideoParam = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.strategyId !== 0) {
            writer.uint32(8).int32(message.strategyId);
        }
        if (message.params !== undefined) {
            exports.RTCExtraInfo_RTCVideoParam.encode(message.params, writer.uint32(18).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRTCExtraInfo_RTCLiveVideoParam();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.strategyId = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.params = exports.RTCExtraInfo_RTCVideoParam.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.RTCExtraInfo_RTCLiveVideoParam.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRTCExtraInfo_RTCLiveVideoParam();
        message.strategyId = object.strategyId ?? 0;
        message.params = (object.params !== undefined && object.params !== null)
            ? exports.RTCExtraInfo_RTCVideoParam.fromPartial(object.params)
            : undefined;
        return message;
    },
};
function createBaseRTCExtraInfo_RTCVideoParam() {
    return { width: 0, height: 0, fps: 0, bitrateKbps: 0 };
}
exports.RTCExtraInfo_RTCVideoParam = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.width !== 0) {
            writer.uint32(8).int32(message.width);
        }
        if (message.height !== 0) {
            writer.uint32(16).int32(message.height);
        }
        if (message.fps !== 0) {
            writer.uint32(24).int32(message.fps);
        }
        if (message.bitrateKbps !== 0) {
            writer.uint32(32).int32(message.bitrateKbps);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRTCExtraInfo_RTCVideoParam();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.width = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.height = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.fps = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.bitrateKbps = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.RTCExtraInfo_RTCVideoParam.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRTCExtraInfo_RTCVideoParam();
        message.width = object.width ?? 0;
        message.height = object.height ?? 0;
        message.fps = object.fps ?? 0;
        message.bitrateKbps = object.bitrateKbps ?? 0;
        return message;
    },
};
function createBaseRTCExtraInfo_RTCBitrateMap() {
    return { xx1: 0, xx2: 0, xx3: 0, xx4: 0 };
}
exports.RTCExtraInfo_RTCBitrateMap = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.xx1 !== 0) {
            writer.uint32(8).int32(message.xx1);
        }
        if (message.xx2 !== 0) {
            writer.uint32(16).int32(message.xx2);
        }
        if (message.xx3 !== 0) {
            writer.uint32(24).int32(message.xx3);
        }
        if (message.xx4 !== 0) {
            writer.uint32(32).int32(message.xx4);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRTCExtraInfo_RTCBitrateMap();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.xx1 = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.xx2 = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.xx3 = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.xx4 = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.RTCExtraInfo_RTCBitrateMap.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRTCExtraInfo_RTCBitrateMap();
        message.xx1 = object.xx1 ?? 0;
        message.xx2 = object.xx2 ?? 0;
        message.xx3 = object.xx3 ?? 0;
        message.xx4 = object.xx4 ?? 0;
        return message;
    },
};
function createBaseCreateChannelContent() {
    return { owner: undefined, ownerLinkMicId: "" };
}
exports.CreateChannelContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.owner !== undefined) {
            exports.Player.encode(message.owner, writer.uint32(10).fork()).join();
        }
        if (message.ownerLinkMicId !== "") {
            writer.uint32(18).string(message.ownerLinkMicId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseCreateChannelContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.owner = exports.Player.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.ownerLinkMicId = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.CreateChannelContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseCreateChannelContent();
        message.owner = (object.owner !== undefined && object.owner !== null)
            ? exports.Player.fromPartial(object.owner)
            : undefined;
        message.ownerLinkMicId = object.ownerLinkMicId ?? "";
        return message;
    },
};
function createBaseListChangeContent() {
    return { listChangeType: 0, userList: undefined, linkedUserUiPositions: [], contentPos: [] };
}
exports.ListChangeContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.listChangeType !== 0) {
            writer.uint32(8).int32(message.listChangeType);
        }
        if (message.userList !== undefined) {
            exports.AllListUser.encode(message.userList, writer.uint32(18).fork()).join();
        }
        for (const v of message.linkedUserUiPositions) {
            writer.uint32(26).string(v);
        }
        for (const v of message.contentPos) {
            exports.ContentPosition.encode(v, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseListChangeContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.listChangeType = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.userList = exports.AllListUser.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.linkedUserUiPositions.push(reader.string());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.contentPos.push(exports.ContentPosition.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.ListChangeContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseListChangeContent();
        message.listChangeType = object.listChangeType ?? 0;
        message.userList = (object.userList !== undefined && object.userList !== null)
            ? exports.AllListUser.fromPartial(object.userList)
            : undefined;
        message.linkedUserUiPositions = object.linkedUserUiPositions?.map((e) => e) || [];
        message.contentPos = object.contentPos?.map((e) => exports.ContentPosition.fromPartial(e)) || [];
        return message;
    },
};
function createBaseContentPosition() {
    return { contentID: "", contentType: 0, pos: undefined, contentLinkmicID: "", startTimeNano: "0" };
}
exports.ContentPosition = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.contentID !== "") {
            writer.uint32(10).string(message.contentID);
        }
        if (message.contentType !== 0) {
            writer.uint32(16).int32(message.contentType);
        }
        if (message.pos !== undefined) {
            exports.MicPositionData.encode(message.pos, writer.uint32(26).fork()).join();
        }
        if (message.contentLinkmicID !== "") {
            writer.uint32(34).string(message.contentLinkmicID);
        }
        if (message.startTimeNano !== "0") {
            writer.uint32(40).int64(message.startTimeNano);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseContentPosition();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.contentID = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.contentType = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.pos = exports.MicPositionData.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.contentLinkmicID = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.startTimeNano = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.ContentPosition.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseContentPosition();
        message.contentID = object.contentID ?? "";
        message.contentType = object.contentType ?? 0;
        message.pos = (object.pos !== undefined && object.pos !== null)
            ? exports.MicPositionData.fromPartial(object.pos)
            : undefined;
        message.contentLinkmicID = object.contentLinkmicID ?? "";
        message.startTimeNano = object.startTimeNano ?? "0";
        return message;
    },
};
function createBaseMicPositionData() {
    return { type: 0, linkPosition: undefined };
}
exports.MicPositionData = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.type !== 0) {
            writer.uint32(8).int32(message.type);
        }
        if (message.linkPosition !== undefined) {
            exports.LinkPosition.encode(message.linkPosition, writer.uint32(18).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseMicPositionData();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.type = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.linkPosition = exports.LinkPosition.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.MicPositionData.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseMicPositionData();
        message.type = object.type ?? 0;
        message.linkPosition = (object.linkPosition !== undefined && object.linkPosition !== null)
            ? exports.LinkPosition.fromPartial(object.linkPosition)
            : undefined;
        return message;
    },
};
function createBaseMultiLiveContent() {
    return {
        applyBizContent: undefined,
        inviteBizContent: undefined,
        replyBizContent: undefined,
        permitBizContent: undefined,
        joinDirectBizContent: undefined,
        kickOutBizContent: undefined,
    };
}
exports.MultiLiveContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.applyBizContent !== undefined) {
            exports.MultiLiveContent_ApplyBizContent.encode(message.applyBizContent, writer.uint32(10).fork()).join();
        }
        if (message.inviteBizContent !== undefined) {
            exports.MultiLiveContent_InviteBizContent.encode(message.inviteBizContent, writer.uint32(18).fork()).join();
        }
        if (message.replyBizContent !== undefined) {
            exports.MultiLiveContent_ReplyBizContent.encode(message.replyBizContent, writer.uint32(26).fork()).join();
        }
        if (message.permitBizContent !== undefined) {
            exports.MultiLiveContent_PermitBizContent.encode(message.permitBizContent, writer.uint32(34).fork()).join();
        }
        if (message.joinDirectBizContent !== undefined) {
            exports.MultiLiveContent_JoinDirectBizContent.encode(message.joinDirectBizContent, writer.uint32(42).fork()).join();
        }
        if (message.kickOutBizContent !== undefined) {
            exports.MultiLiveContent_KickOutBizContent.encode(message.kickOutBizContent, writer.uint32(50).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseMultiLiveContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.applyBizContent = exports.MultiLiveContent_ApplyBizContent.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.inviteBizContent = exports.MultiLiveContent_InviteBizContent.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.replyBizContent = exports.MultiLiveContent_ReplyBizContent.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.permitBizContent = exports.MultiLiveContent_PermitBizContent.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.joinDirectBizContent = exports.MultiLiveContent_JoinDirectBizContent.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.kickOutBizContent = exports.MultiLiveContent_KickOutBizContent.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.MultiLiveContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseMultiLiveContent();
        message.applyBizContent = (object.applyBizContent !== undefined && object.applyBizContent !== null)
            ? exports.MultiLiveContent_ApplyBizContent.fromPartial(object.applyBizContent)
            : undefined;
        message.inviteBizContent = (object.inviteBizContent !== undefined && object.inviteBizContent !== null)
            ? exports.MultiLiveContent_InviteBizContent.fromPartial(object.inviteBizContent)
            : undefined;
        message.replyBizContent = (object.replyBizContent !== undefined && object.replyBizContent !== null)
            ? exports.MultiLiveContent_ReplyBizContent.fromPartial(object.replyBizContent)
            : undefined;
        message.permitBizContent = (object.permitBizContent !== undefined && object.permitBizContent !== null)
            ? exports.MultiLiveContent_PermitBizContent.fromPartial(object.permitBizContent)
            : undefined;
        message.joinDirectBizContent = (object.joinDirectBizContent !== undefined && object.joinDirectBizContent !== null)
            ? exports.MultiLiveContent_JoinDirectBizContent.fromPartial(object.joinDirectBizContent)
            : undefined;
        message.kickOutBizContent = (object.kickOutBizContent !== undefined && object.kickOutBizContent !== null)
            ? exports.MultiLiveContent_KickOutBizContent.fromPartial(object.kickOutBizContent)
            : undefined;
        return message;
    },
};
function createBaseMultiLiveContent_ApplyBizContent() {
    return { user: undefined };
}
exports.MultiLiveContent_ApplyBizContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.user !== undefined) {
            exports.User.encode(message.user, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseMultiLiveContent_ApplyBizContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.user = exports.User.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.MultiLiveContent_ApplyBizContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseMultiLiveContent_ApplyBizContent();
        message.user = (object.user !== undefined && object.user !== null) ? exports.User.fromPartial(object.user) : undefined;
        return message;
    },
};
function createBaseMultiLiveContent_JoinDirectBizContent() {
    return { replyImMsgId: "0", outsideRoomInviteSource: 0 };
}
exports.MultiLiveContent_JoinDirectBizContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.replyImMsgId !== "0") {
            writer.uint32(8).int64(message.replyImMsgId);
        }
        if (message.outsideRoomInviteSource !== 0) {
            writer.uint32(16).int32(message.outsideRoomInviteSource);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseMultiLiveContent_JoinDirectBizContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.replyImMsgId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.outsideRoomInviteSource = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.MultiLiveContent_JoinDirectBizContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseMultiLiveContent_JoinDirectBizContent();
        message.replyImMsgId = object.replyImMsgId ?? "0";
        message.outsideRoomInviteSource = object.outsideRoomInviteSource ?? 0;
        return message;
    },
};
function createBaseMultiLiveContent_InviteBizContent() {
    return {
        anchorSettingInfo: undefined,
        inviteSource: 0,
        operatorUserInfo: undefined,
        operatorLinkAdminType: 0,
        inviteeUserInfo: undefined,
        shareRevenueSetting: 0,
    };
}
exports.MultiLiveContent_InviteBizContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.anchorSettingInfo !== undefined) {
            exports.MultiLiveAnchorPanelSettings.encode(message.anchorSettingInfo, writer.uint32(10).fork()).join();
        }
        if (message.inviteSource !== 0) {
            writer.uint32(16).int32(message.inviteSource);
        }
        if (message.operatorUserInfo !== undefined) {
            exports.User.encode(message.operatorUserInfo, writer.uint32(26).fork()).join();
        }
        if (message.operatorLinkAdminType !== 0) {
            writer.uint32(32).int32(message.operatorLinkAdminType);
        }
        if (message.inviteeUserInfo !== undefined) {
            exports.User.encode(message.inviteeUserInfo, writer.uint32(42).fork()).join();
        }
        if (message.shareRevenueSetting !== 0) {
            writer.uint32(48).int32(message.shareRevenueSetting);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseMultiLiveContent_InviteBizContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.anchorSettingInfo = exports.MultiLiveAnchorPanelSettings.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.inviteSource = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.operatorUserInfo = exports.User.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.operatorLinkAdminType = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.inviteeUserInfo = exports.User.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.shareRevenueSetting = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.MultiLiveContent_InviteBizContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseMultiLiveContent_InviteBizContent();
        message.anchorSettingInfo = (object.anchorSettingInfo !== undefined && object.anchorSettingInfo !== null)
            ? exports.MultiLiveAnchorPanelSettings.fromPartial(object.anchorSettingInfo)
            : undefined;
        message.inviteSource = object.inviteSource ?? 0;
        message.operatorUserInfo = (object.operatorUserInfo !== undefined && object.operatorUserInfo !== null)
            ? exports.User.fromPartial(object.operatorUserInfo)
            : undefined;
        message.operatorLinkAdminType = object.operatorLinkAdminType ?? 0;
        message.inviteeUserInfo = (object.inviteeUserInfo !== undefined && object.inviteeUserInfo !== null)
            ? exports.User.fromPartial(object.inviteeUserInfo)
            : undefined;
        message.shareRevenueSetting = object.shareRevenueSetting ?? 0;
        return message;
    },
};
function createBaseMultiLiveContent_ReplyBizContent() {
    return { linkType: 0, isTurnOffInvitation: 0, replyUserInfo: undefined };
}
exports.MultiLiveContent_ReplyBizContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.linkType !== 0) {
            writer.uint32(8).int32(message.linkType);
        }
        if (message.isTurnOffInvitation !== 0) {
            writer.uint32(16).int32(message.isTurnOffInvitation);
        }
        if (message.replyUserInfo !== undefined) {
            exports.User.encode(message.replyUserInfo, writer.uint32(26).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseMultiLiveContent_ReplyBizContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.linkType = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.isTurnOffInvitation = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.replyUserInfo = exports.User.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.MultiLiveContent_ReplyBizContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseMultiLiveContent_ReplyBizContent();
        message.linkType = object.linkType ?? 0;
        message.isTurnOffInvitation = object.isTurnOffInvitation ?? 0;
        message.replyUserInfo = (object.replyUserInfo !== undefined && object.replyUserInfo !== null)
            ? exports.User.fromPartial(object.replyUserInfo)
            : undefined;
        return message;
    },
};
function createBaseMultiLiveContent_PermitBizContent() {
    return {
        anchorSettingInfo: undefined,
        expireTimestamp: "0",
        operatorUserInfo: undefined,
        operatorLinkAdminType: 0,
        linkUserType: 0,
    };
}
exports.MultiLiveContent_PermitBizContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.anchorSettingInfo !== undefined) {
            exports.MultiLiveAnchorPanelSettings.encode(message.anchorSettingInfo, writer.uint32(10).fork()).join();
        }
        if (message.expireTimestamp !== "0") {
            writer.uint32(16).int64(message.expireTimestamp);
        }
        if (message.operatorUserInfo !== undefined) {
            exports.User.encode(message.operatorUserInfo, writer.uint32(26).fork()).join();
        }
        if (message.operatorLinkAdminType !== 0) {
            writer.uint32(32).int32(message.operatorLinkAdminType);
        }
        if (message.linkUserType !== 0) {
            writer.uint32(40).int32(message.linkUserType);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseMultiLiveContent_PermitBizContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.anchorSettingInfo = exports.MultiLiveAnchorPanelSettings.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.expireTimestamp = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.operatorUserInfo = exports.User.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.operatorLinkAdminType = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.linkUserType = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.MultiLiveContent_PermitBizContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseMultiLiveContent_PermitBizContent();
        message.anchorSettingInfo = (object.anchorSettingInfo !== undefined && object.anchorSettingInfo !== null)
            ? exports.MultiLiveAnchorPanelSettings.fromPartial(object.anchorSettingInfo)
            : undefined;
        message.expireTimestamp = object.expireTimestamp ?? "0";
        message.operatorUserInfo = (object.operatorUserInfo !== undefined && object.operatorUserInfo !== null)
            ? exports.User.fromPartial(object.operatorUserInfo)
            : undefined;
        message.operatorLinkAdminType = object.operatorLinkAdminType ?? 0;
        message.linkUserType = object.linkUserType ?? 0;
        return message;
    },
};
function createBaseMultiLiveContent_KickOutBizContent() {
    return { operatorUserInfo: undefined, operatorLinkAdminType: 0, kickPlayerUserInfo: undefined };
}
exports.MultiLiveContent_KickOutBizContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.operatorUserInfo !== undefined) {
            exports.User.encode(message.operatorUserInfo, writer.uint32(10).fork()).join();
        }
        if (message.operatorLinkAdminType !== 0) {
            writer.uint32(16).int32(message.operatorLinkAdminType);
        }
        if (message.kickPlayerUserInfo !== undefined) {
            exports.User.encode(message.kickPlayerUserInfo, writer.uint32(26).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseMultiLiveContent_KickOutBizContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.operatorUserInfo = exports.User.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.operatorLinkAdminType = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.kickPlayerUserInfo = exports.User.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.MultiLiveContent_KickOutBizContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseMultiLiveContent_KickOutBizContent();
        message.operatorUserInfo = (object.operatorUserInfo !== undefined && object.operatorUserInfo !== null)
            ? exports.User.fromPartial(object.operatorUserInfo)
            : undefined;
        message.operatorLinkAdminType = object.operatorLinkAdminType ?? 0;
        message.kickPlayerUserInfo = (object.kickPlayerUserInfo !== undefined && object.kickPlayerUserInfo !== null)
            ? exports.User.fromPartial(object.kickPlayerUserInfo)
            : undefined;
        return message;
    },
};
function createBaseInviteContent() {
    return {
        invitor: undefined,
        inviteeRtcExtInfo: undefined,
        invitorLinkMicId: "",
        inviteeLinkMicId: "",
        isOwner: false,
        pos: undefined,
        dsl: undefined,
        invitee: undefined,
        operator: undefined,
    };
}
exports.InviteContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.invitor !== undefined) {
            exports.Player.encode(message.invitor, writer.uint32(10).fork()).join();
        }
        if (message.inviteeRtcExtInfo !== undefined) {
            exports.RTCExtraInfo.encode(message.inviteeRtcExtInfo, writer.uint32(18).fork()).join();
        }
        if (message.invitorLinkMicId !== "") {
            writer.uint32(26).string(message.invitorLinkMicId);
        }
        if (message.inviteeLinkMicId !== "") {
            writer.uint32(34).string(message.inviteeLinkMicId);
        }
        if (message.isOwner !== false) {
            writer.uint32(40).bool(message.isOwner);
        }
        if (message.pos !== undefined) {
            exports.Position.encode(message.pos, writer.uint32(50).fork()).join();
        }
        if (message.dsl !== undefined) {
            exports.DSLConfig.encode(message.dsl, writer.uint32(58).fork()).join();
        }
        if (message.invitee !== undefined) {
            exports.User.encode(message.invitee, writer.uint32(66).fork()).join();
        }
        if (message.operator !== undefined) {
            exports.User.encode(message.operator, writer.uint32(74).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseInviteContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.invitor = exports.Player.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.inviteeRtcExtInfo = exports.RTCExtraInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.invitorLinkMicId = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.inviteeLinkMicId = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.isOwner = reader.bool();
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.pos = exports.Position.decode(reader, reader.uint32());
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.dsl = exports.DSLConfig.decode(reader, reader.uint32());
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.invitee = exports.User.decode(reader, reader.uint32());
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.operator = exports.User.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.InviteContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseInviteContent();
        message.invitor = (object.invitor !== undefined && object.invitor !== null)
            ? exports.Player.fromPartial(object.invitor)
            : undefined;
        message.inviteeRtcExtInfo = (object.inviteeRtcExtInfo !== undefined && object.inviteeRtcExtInfo !== null)
            ? exports.RTCExtraInfo.fromPartial(object.inviteeRtcExtInfo)
            : undefined;
        message.invitorLinkMicId = object.invitorLinkMicId ?? "";
        message.inviteeLinkMicId = object.inviteeLinkMicId ?? "";
        message.isOwner = object.isOwner ?? false;
        message.pos = (object.pos !== undefined && object.pos !== null) ? exports.Position.fromPartial(object.pos) : undefined;
        message.dsl = (object.dsl !== undefined && object.dsl !== null) ? exports.DSLConfig.fromPartial(object.dsl) : undefined;
        message.invitee = (object.invitee !== undefined && object.invitee !== null)
            ? exports.User.fromPartial(object.invitee)
            : undefined;
        message.operator = (object.operator !== undefined && object.operator !== null)
            ? exports.User.fromPartial(object.operator)
            : undefined;
        return message;
    },
};
function createBaseApplyContent() {
    return { applier: undefined, applierLinkMicId: "" };
}
exports.ApplyContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.applier !== undefined) {
            exports.Player.encode(message.applier, writer.uint32(10).fork()).join();
        }
        if (message.applierLinkMicId !== "") {
            writer.uint32(18).string(message.applierLinkMicId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseApplyContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.applier = exports.Player.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.applierLinkMicId = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.ApplyContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseApplyContent();
        message.applier = (object.applier !== undefined && object.applier !== null)
            ? exports.Player.fromPartial(object.applier)
            : undefined;
        message.applierLinkMicId = object.applierLinkMicId ?? "";
        return message;
    },
};
function createBasePermitApplyContent() {
    return {
        permiter: undefined,
        permiterLinkMicId: "",
        applierPos: undefined,
        replyStatus: 0,
        dsl: undefined,
        applier: undefined,
        operator: undefined,
        applierLinkMicId: "",
    };
}
exports.PermitApplyContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.permiter !== undefined) {
            exports.Player.encode(message.permiter, writer.uint32(10).fork()).join();
        }
        if (message.permiterLinkMicId !== "") {
            writer.uint32(18).string(message.permiterLinkMicId);
        }
        if (message.applierPos !== undefined) {
            exports.Position.encode(message.applierPos, writer.uint32(26).fork()).join();
        }
        if (message.replyStatus !== 0) {
            writer.uint32(32).int32(message.replyStatus);
        }
        if (message.dsl !== undefined) {
            exports.DSLConfig.encode(message.dsl, writer.uint32(42).fork()).join();
        }
        if (message.applier !== undefined) {
            exports.User.encode(message.applier, writer.uint32(50).fork()).join();
        }
        if (message.operator !== undefined) {
            exports.User.encode(message.operator, writer.uint32(58).fork()).join();
        }
        if (message.applierLinkMicId !== "") {
            writer.uint32(66).string(message.applierLinkMicId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePermitApplyContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.permiter = exports.Player.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.permiterLinkMicId = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.applierPos = exports.Position.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.replyStatus = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.dsl = exports.DSLConfig.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.applier = exports.User.decode(reader, reader.uint32());
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.operator = exports.User.decode(reader, reader.uint32());
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.applierLinkMicId = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.PermitApplyContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePermitApplyContent();
        message.permiter = (object.permiter !== undefined && object.permiter !== null)
            ? exports.Player.fromPartial(object.permiter)
            : undefined;
        message.permiterLinkMicId = object.permiterLinkMicId ?? "";
        message.applierPos = (object.applierPos !== undefined && object.applierPos !== null)
            ? exports.Position.fromPartial(object.applierPos)
            : undefined;
        message.replyStatus = object.replyStatus ?? 0;
        message.dsl = (object.dsl !== undefined && object.dsl !== null) ? exports.DSLConfig.fromPartial(object.dsl) : undefined;
        message.applier = (object.applier !== undefined && object.applier !== null)
            ? exports.User.fromPartial(object.applier)
            : undefined;
        message.operator = (object.operator !== undefined && object.operator !== null)
            ? exports.User.fromPartial(object.operator)
            : undefined;
        message.applierLinkMicId = object.applierLinkMicId ?? "";
        return message;
    },
};
function createBaseReplyInviteContent() {
    return {
        invitee: undefined,
        replyStatus: 0,
        inviteeLinkMicId: "",
        inviteePos: undefined,
        inviteOperatorUser: undefined,
        linkedUserUiPositions: [],
        uiPos: [],
    };
}
exports.ReplyInviteContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.invitee !== undefined) {
            exports.Player.encode(message.invitee, writer.uint32(10).fork()).join();
        }
        if (message.replyStatus !== 0) {
            writer.uint32(16).int32(message.replyStatus);
        }
        if (message.inviteeLinkMicId !== "") {
            writer.uint32(26).string(message.inviteeLinkMicId);
        }
        if (message.inviteePos !== undefined) {
            exports.Position.encode(message.inviteePos, writer.uint32(34).fork()).join();
        }
        if (message.inviteOperatorUser !== undefined) {
            exports.Player.encode(message.inviteOperatorUser, writer.uint32(42).fork()).join();
        }
        for (const v of message.linkedUserUiPositions) {
            writer.uint32(50).string(v);
        }
        for (const v of message.uiPos) {
            exports.PosIdentity.encode(v, writer.uint32(58).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseReplyInviteContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.invitee = exports.Player.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.replyStatus = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.inviteeLinkMicId = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.inviteePos = exports.Position.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.inviteOperatorUser = exports.Player.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.linkedUserUiPositions.push(reader.string());
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.uiPos.push(exports.PosIdentity.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.ReplyInviteContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseReplyInviteContent();
        message.invitee = (object.invitee !== undefined && object.invitee !== null)
            ? exports.Player.fromPartial(object.invitee)
            : undefined;
        message.replyStatus = object.replyStatus ?? 0;
        message.inviteeLinkMicId = object.inviteeLinkMicId ?? "";
        message.inviteePos = (object.inviteePos !== undefined && object.inviteePos !== null)
            ? exports.Position.fromPartial(object.inviteePos)
            : undefined;
        message.inviteOperatorUser = (object.inviteOperatorUser !== undefined && object.inviteOperatorUser !== null)
            ? exports.Player.fromPartial(object.inviteOperatorUser)
            : undefined;
        message.linkedUserUiPositions = object.linkedUserUiPositions?.map((e) => e) || [];
        message.uiPos = object.uiPos?.map((e) => exports.PosIdentity.fromPartial(e)) || [];
        return message;
    },
};
function createBaseKickOutContent() {
    return { offliner: undefined, kickoutReason: 0, linkedUserUiPositions: [], uiPos: [] };
}
exports.KickOutContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.offliner !== undefined) {
            exports.Player.encode(message.offliner, writer.uint32(10).fork()).join();
        }
        if (message.kickoutReason !== 0) {
            writer.uint32(16).int32(message.kickoutReason);
        }
        for (const v of message.linkedUserUiPositions) {
            writer.uint32(26).string(v);
        }
        for (const v of message.uiPos) {
            exports.PosIdentity.encode(v, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseKickOutContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.offliner = exports.Player.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.kickoutReason = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.linkedUserUiPositions.push(reader.string());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.uiPos.push(exports.PosIdentity.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.KickOutContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseKickOutContent();
        message.offliner = (object.offliner !== undefined && object.offliner !== null)
            ? exports.Player.fromPartial(object.offliner)
            : undefined;
        message.kickoutReason = object.kickoutReason ?? 0;
        message.linkedUserUiPositions = object.linkedUserUiPositions?.map((e) => e) || [];
        message.uiPos = object.uiPos?.map((e) => exports.PosIdentity.fromPartial(e)) || [];
        return message;
    },
};
function createBasePosIdentity() {
    return { type: 0, value: "" };
}
exports.PosIdentity = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.type !== 0) {
            writer.uint32(8).int32(message.type);
        }
        if (message.value !== "") {
            writer.uint32(18).string(message.value);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePosIdentity();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.type = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.value = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.PosIdentity.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePosIdentity();
        message.type = object.type ?? 0;
        message.value = object.value ?? "";
        return message;
    },
};
function createBaseCancelApplyContent() {
    return { applier: undefined, applierLinkMicId: "" };
}
exports.CancelApplyContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.applier !== undefined) {
            exports.Player.encode(message.applier, writer.uint32(10).fork()).join();
        }
        if (message.applierLinkMicId !== "") {
            writer.uint32(18).string(message.applierLinkMicId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseCancelApplyContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.applier = exports.Player.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.applierLinkMicId = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.CancelApplyContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseCancelApplyContent();
        message.applier = (object.applier !== undefined && object.applier !== null)
            ? exports.Player.fromPartial(object.applier)
            : undefined;
        message.applierLinkMicId = object.applierLinkMicId ?? "";
        return message;
    },
};
function createBaseCancelInviteContent() {
    return { invitor: undefined, invitorLinkMicId: "", inviteeLinkMicId: "", inviteSeqId: "0", invitee: undefined };
}
exports.CancelInviteContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.invitor !== undefined) {
            exports.Player.encode(message.invitor, writer.uint32(10).fork()).join();
        }
        if (message.invitorLinkMicId !== "") {
            writer.uint32(18).string(message.invitorLinkMicId);
        }
        if (message.inviteeLinkMicId !== "") {
            writer.uint32(26).string(message.inviteeLinkMicId);
        }
        if (message.inviteSeqId !== "0") {
            writer.uint32(32).int64(message.inviteSeqId);
        }
        if (message.invitee !== undefined) {
            exports.Player.encode(message.invitee, writer.uint32(42).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseCancelInviteContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.invitor = exports.Player.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.invitorLinkMicId = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.inviteeLinkMicId = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.inviteSeqId = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.invitee = exports.Player.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.CancelInviteContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseCancelInviteContent();
        message.invitor = (object.invitor !== undefined && object.invitor !== null)
            ? exports.Player.fromPartial(object.invitor)
            : undefined;
        message.invitorLinkMicId = object.invitorLinkMicId ?? "";
        message.inviteeLinkMicId = object.inviteeLinkMicId ?? "";
        message.inviteSeqId = object.inviteSeqId ?? "0";
        message.invitee = (object.invitee !== undefined && object.invitee !== null)
            ? exports.Player.fromPartial(object.invitee)
            : undefined;
        return message;
    },
};
function createBaseLeaveContent() {
    return { leaver: undefined, leaveReason: "0", linkedUserUiPositions: [], uiPos: [] };
}
exports.LeaveContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.leaver !== undefined) {
            exports.Player.encode(message.leaver, writer.uint32(10).fork()).join();
        }
        if (message.leaveReason !== "0") {
            writer.uint32(16).int64(message.leaveReason);
        }
        for (const v of message.linkedUserUiPositions) {
            writer.uint32(26).string(v);
        }
        for (const v of message.uiPos) {
            exports.PosIdentity.encode(v, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLeaveContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.leaver = exports.Player.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.leaveReason = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.linkedUserUiPositions.push(reader.string());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.uiPos.push(exports.PosIdentity.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LeaveContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLeaveContent();
        message.leaver = (object.leaver !== undefined && object.leaver !== null)
            ? exports.Player.fromPartial(object.leaver)
            : undefined;
        message.leaveReason = object.leaveReason ?? "0";
        message.linkedUserUiPositions = object.linkedUserUiPositions?.map((e) => e) || [];
        message.uiPos = object.uiPos?.map((e) => exports.PosIdentity.fromPartial(e)) || [];
        return message;
    },
};
function createBaseFinishChannelContent() {
    return { owner: undefined, finishReason: "0" };
}
exports.FinishChannelContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.owner !== undefined) {
            exports.Player.encode(message.owner, writer.uint32(10).fork()).join();
        }
        if (message.finishReason !== "0") {
            writer.uint32(16).int64(message.finishReason);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseFinishChannelContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.owner = exports.Player.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.finishReason = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.FinishChannelContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseFinishChannelContent();
        message.owner = (object.owner !== undefined && object.owner !== null)
            ? exports.Player.fromPartial(object.owner)
            : undefined;
        message.finishReason = object.finishReason ?? "0";
        return message;
    },
};
function createBaseJoinDirectContent() {
    return { joiner: undefined, allUsers: undefined };
}
exports.JoinDirectContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.joiner !== undefined) {
            exports.LinkLayerListUser.encode(message.joiner, writer.uint32(10).fork()).join();
        }
        if (message.allUsers !== undefined) {
            exports.AllListUser.encode(message.allUsers, writer.uint32(18).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseJoinDirectContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.joiner = exports.LinkLayerListUser.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.allUsers = exports.AllListUser.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.JoinDirectContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseJoinDirectContent();
        message.joiner = (object.joiner !== undefined && object.joiner !== null)
            ? exports.LinkLayerListUser.fromPartial(object.joiner)
            : undefined;
        message.allUsers = (object.allUsers !== undefined && object.allUsers !== null)
            ? exports.AllListUser.fromPartial(object.allUsers)
            : undefined;
        return message;
    },
};
function createBaseLeaveJoinGroupContent() {
    return { operator: undefined, groupChannelId: "0", leaveSource: "", linkedUserUiPositions: [] };
}
exports.LeaveJoinGroupContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.operator !== undefined) {
            exports.GroupPlayer.encode(message.operator, writer.uint32(10).fork()).join();
        }
        if (message.groupChannelId !== "0") {
            writer.uint32(16).int64(message.groupChannelId);
        }
        if (message.leaveSource !== "") {
            writer.uint32(26).string(message.leaveSource);
        }
        for (const v of message.linkedUserUiPositions) {
            writer.uint32(34).string(v);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLeaveJoinGroupContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.operator = exports.GroupPlayer.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.groupChannelId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.leaveSource = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.linkedUserUiPositions.push(reader.string());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LeaveJoinGroupContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLeaveJoinGroupContent();
        message.operator = (object.operator !== undefined && object.operator !== null)
            ? exports.GroupPlayer.fromPartial(object.operator)
            : undefined;
        message.groupChannelId = object.groupChannelId ?? "0";
        message.leaveSource = object.leaveSource ?? "";
        message.linkedUserUiPositions = object.linkedUserUiPositions?.map((e) => e) || [];
        return message;
    },
};
function createBasePermitJoinGroupContent() {
    return {
        approver: undefined,
        agreeStatus: 0,
        type: 0,
        groupExtInfoList: [],
        groupUser: undefined,
        migrationDetails: undefined,
        linkedUserUiPositions: [],
    };
}
exports.PermitJoinGroupContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.approver !== undefined) {
            exports.GroupPlayer.encode(message.approver, writer.uint32(10).fork()).join();
        }
        if (message.agreeStatus !== 0) {
            writer.uint32(16).int32(message.agreeStatus);
        }
        if (message.type !== 0) {
            writer.uint32(24).int32(message.type);
        }
        for (const v of message.groupExtInfoList) {
            exports.RTCExtraInfo.encode(v, writer.uint32(34).fork()).join();
        }
        if (message.groupUser !== undefined) {
            exports.GroupChannelAllUser.encode(message.groupUser, writer.uint32(42).fork()).join();
        }
        if (message.migrationDetails !== undefined) {
            exports.MigrationDetails.encode(message.migrationDetails, writer.uint32(50).fork()).join();
        }
        for (const v of message.linkedUserUiPositions) {
            writer.uint32(58).string(v);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePermitJoinGroupContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.approver = exports.GroupPlayer.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.agreeStatus = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.type = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.groupExtInfoList.push(exports.RTCExtraInfo.decode(reader, reader.uint32()));
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.groupUser = exports.GroupChannelAllUser.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.migrationDetails = exports.MigrationDetails.decode(reader, reader.uint32());
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.linkedUserUiPositions.push(reader.string());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.PermitJoinGroupContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePermitJoinGroupContent();
        message.approver = (object.approver !== undefined && object.approver !== null)
            ? exports.GroupPlayer.fromPartial(object.approver)
            : undefined;
        message.agreeStatus = object.agreeStatus ?? 0;
        message.type = object.type ?? 0;
        message.groupExtInfoList = object.groupExtInfoList?.map((e) => exports.RTCExtraInfo.fromPartial(e)) || [];
        message.groupUser = (object.groupUser !== undefined && object.groupUser !== null)
            ? exports.GroupChannelAllUser.fromPartial(object.groupUser)
            : undefined;
        message.migrationDetails = (object.migrationDetails !== undefined && object.migrationDetails !== null)
            ? exports.MigrationDetails.fromPartial(object.migrationDetails)
            : undefined;
        message.linkedUserUiPositions = object.linkedUserUiPositions?.map((e) => e) || [];
        return message;
    },
};
function createBaseMigrationDetails() {
    return { isMigrate: false, sourceGroupChannelId: "0", targetGroupChannelId: "0" };
}
exports.MigrationDetails = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.isMigrate !== false) {
            writer.uint32(8).bool(message.isMigrate);
        }
        if (message.sourceGroupChannelId !== "0") {
            writer.uint32(16).int64(message.sourceGroupChannelId);
        }
        if (message.targetGroupChannelId !== "0") {
            writer.uint32(24).int64(message.targetGroupChannelId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseMigrationDetails();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.isMigrate = reader.bool();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.sourceGroupChannelId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.targetGroupChannelId = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.MigrationDetails.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseMigrationDetails();
        message.isMigrate = object.isMigrate ?? false;
        message.sourceGroupChannelId = object.sourceGroupChannelId ?? "0";
        message.targetGroupChannelId = object.targetGroupChannelId ?? "0";
        return message;
    },
};
function createBaseCancelJoinGroupContent() {
    return { leaverList: [], operator: undefined, type: 0, groupUser: undefined };
}
exports.CancelJoinGroupContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.leaverList) {
            exports.GroupPlayer.encode(v, writer.uint32(10).fork()).join();
        }
        if (message.operator !== undefined) {
            exports.GroupPlayer.encode(message.operator, writer.uint32(18).fork()).join();
        }
        if (message.type !== 0) {
            writer.uint32(24).int32(message.type);
        }
        if (message.groupUser !== undefined) {
            exports.GroupChannelAllUser.encode(message.groupUser, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseCancelJoinGroupContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.leaverList.push(exports.GroupPlayer.decode(reader, reader.uint32()));
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.operator = exports.GroupPlayer.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.type = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.groupUser = exports.GroupChannelAllUser.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.CancelJoinGroupContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseCancelJoinGroupContent();
        message.leaverList = object.leaverList?.map((e) => exports.GroupPlayer.fromPartial(e)) || [];
        message.operator = (object.operator !== undefined && object.operator !== null)
            ? exports.GroupPlayer.fromPartial(object.operator)
            : undefined;
        message.type = object.type ?? 0;
        message.groupUser = (object.groupUser !== undefined && object.groupUser !== null)
            ? exports.GroupChannelAllUser.fromPartial(object.groupUser)
            : undefined;
        return message;
    },
};
function createBaseP2PGroupChangeContent() {
    return { groupExtInfoList: [], groupUser: undefined, migrationDetails: undefined, contentPos: [] };
}
exports.P2PGroupChangeContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.groupExtInfoList) {
            exports.RTCExtraInfo.encode(v, writer.uint32(10).fork()).join();
        }
        if (message.groupUser !== undefined) {
            exports.GroupChannelAllUser.encode(message.groupUser, writer.uint32(18).fork()).join();
        }
        if (message.migrationDetails !== undefined) {
            exports.MigrationDetails.encode(message.migrationDetails, writer.uint32(26).fork()).join();
        }
        for (const v of message.contentPos) {
            exports.ContentPosition.encode(v, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseP2PGroupChangeContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.groupExtInfoList.push(exports.RTCExtraInfo.decode(reader, reader.uint32()));
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.groupUser = exports.GroupChannelAllUser.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.migrationDetails = exports.MigrationDetails.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.contentPos.push(exports.ContentPosition.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.P2PGroupChangeContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseP2PGroupChangeContent();
        message.groupExtInfoList = object.groupExtInfoList?.map((e) => exports.RTCExtraInfo.fromPartial(e)) || [];
        message.groupUser = (object.groupUser !== undefined && object.groupUser !== null)
            ? exports.GroupChannelAllUser.fromPartial(object.groupUser)
            : undefined;
        message.migrationDetails = (object.migrationDetails !== undefined && object.migrationDetails !== null)
            ? exports.MigrationDetails.fromPartial(object.migrationDetails)
            : undefined;
        message.contentPos = object.contentPos?.map((e) => exports.ContentPosition.fromPartial(e)) || [];
        return message;
    },
};
function createBaseGroupChangeContent() {
    return { groupUser: undefined, linkedUserUiPositions: [] };
}
exports.GroupChangeContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.groupUser !== undefined) {
            exports.GroupChannelAllUser.encode(message.groupUser, writer.uint32(10).fork()).join();
        }
        for (const v of message.linkedUserUiPositions) {
            writer.uint32(18).string(v);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGroupChangeContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.groupUser = exports.GroupChannelAllUser.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.linkedUserUiPositions.push(reader.string());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.GroupChangeContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGroupChangeContent();
        message.groupUser = (object.groupUser !== undefined && object.groupUser !== null)
            ? exports.GroupChannelAllUser.fromPartial(object.groupUser)
            : undefined;
        message.linkedUserUiPositions = object.linkedUserUiPositions?.map((e) => e) || [];
        return message;
    },
};
function createBaseBusinessContent() {
    return { overLength: "0", multiLiveContent: undefined, cohostContent: undefined };
}
exports.BusinessContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.overLength !== "0") {
            writer.uint32(8).int64(message.overLength);
        }
        if (message.multiLiveContent !== undefined) {
            exports.MultiLiveContent.encode(message.multiLiveContent, writer.uint32(802).fork()).join();
        }
        if (message.cohostContent !== undefined) {
            exports.BusinessContent_CohostContent.encode(message.cohostContent, writer.uint32(1602).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.overLength = reader.int64().toString();
                    continue;
                }
                case 100: {
                    if (tag !== 802) {
                        break;
                    }
                    message.multiLiveContent = exports.MultiLiveContent.decode(reader, reader.uint32());
                    continue;
                }
                case 200: {
                    if (tag !== 1602) {
                        break;
                    }
                    message.cohostContent = exports.BusinessContent_CohostContent.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent();
        message.overLength = object.overLength ?? "0";
        message.multiLiveContent = (object.multiLiveContent !== undefined && object.multiLiveContent !== null)
            ? exports.MultiLiveContent.fromPartial(object.multiLiveContent)
            : undefined;
        message.cohostContent = (object.cohostContent !== undefined && object.cohostContent !== null)
            ? exports.BusinessContent_CohostContent.fromPartial(object.cohostContent)
            : undefined;
        return message;
    },
};
function createBaseBusinessContent_CohostContent() {
    return { joinGroupBizContent: undefined, permitJoinGroupBizContent: undefined, listChangeBizContent: undefined };
}
exports.BusinessContent_CohostContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.joinGroupBizContent !== undefined) {
            exports.BusinessContent_JoinGroupBizContent.encode(message.joinGroupBizContent, writer.uint32(10).fork()).join();
        }
        if (message.permitJoinGroupBizContent !== undefined) {
            exports.BusinessContent_PermitJoinGroupBizContent.encode(message.permitJoinGroupBizContent, writer.uint32(18).fork())
                .join();
        }
        if (message.listChangeBizContent !== undefined) {
            exports.BusinessContent_ListChangeBizContent.encode(message.listChangeBizContent, writer.uint32(90).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent_CohostContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.joinGroupBizContent = exports.BusinessContent_JoinGroupBizContent.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.permitJoinGroupBizContent = exports.BusinessContent_PermitJoinGroupBizContent.decode(reader, reader.uint32());
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.listChangeBizContent = exports.BusinessContent_ListChangeBizContent.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent_CohostContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent_CohostContent();
        message.joinGroupBizContent = (object.joinGroupBizContent !== undefined && object.joinGroupBizContent !== null)
            ? exports.BusinessContent_JoinGroupBizContent.fromPartial(object.joinGroupBizContent)
            : undefined;
        message.permitJoinGroupBizContent =
            (object.permitJoinGroupBizContent !== undefined && object.permitJoinGroupBizContent !== null)
                ? exports.BusinessContent_PermitJoinGroupBizContent.fromPartial(object.permitJoinGroupBizContent)
                : undefined;
        message.listChangeBizContent = (object.listChangeBizContent !== undefined && object.listChangeBizContent !== null)
            ? exports.BusinessContent_ListChangeBizContent.fromPartial(object.listChangeBizContent)
            : undefined;
        return message;
    },
};
function createBaseBusinessContent_PermitJoinGroupBizContent() {
    return { replyStatus: 0, sourceType: 0 };
}
exports.BusinessContent_PermitJoinGroupBizContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.replyStatus !== 0) {
            writer.uint32(8).int32(message.replyStatus);
        }
        if (message.sourceType !== 0) {
            writer.uint32(16).int32(message.sourceType);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent_PermitJoinGroupBizContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.replyStatus = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.sourceType = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent_PermitJoinGroupBizContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent_PermitJoinGroupBizContent();
        message.replyStatus = object.replyStatus ?? 0;
        message.sourceType = object.sourceType ?? 0;
        return message;
    },
};
function createBaseBusinessContent_ListChangeBizContent() {
    return { userInfos: {}, waitingUsers: [] };
}
exports.BusinessContent_ListChangeBizContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        Object.entries(message.userInfos).forEach(([key, value]) => {
            exports.BusinessContent_ListChangeBizContent_UserInfosEntry.encode({ key: key, value }, writer.uint32(10).fork())
                .join();
        });
        for (const v of message.waitingUsers) {
            exports.BusinessContent_ListChangeBizContent_VirtualWaitingUser.encode(v, writer.uint32(18).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent_ListChangeBizContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    const entry1 = exports.BusinessContent_ListChangeBizContent_UserInfosEntry.decode(reader, reader.uint32());
                    if (entry1.value !== undefined) {
                        message.userInfos[entry1.key] = entry1.value;
                    }
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.waitingUsers.push(exports.BusinessContent_ListChangeBizContent_VirtualWaitingUser.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent_ListChangeBizContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent_ListChangeBizContent();
        message.userInfos = Object.entries(object.userInfos ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = exports.BusinessContent_CohostUserInfo.fromPartial(value);
            }
            return acc;
        }, {});
        message.waitingUsers =
            object.waitingUsers?.map((e) => exports.BusinessContent_ListChangeBizContent_VirtualWaitingUser.fromPartial(e)) || [];
        return message;
    },
};
function createBaseBusinessContent_ListChangeBizContent_UserInfosEntry() {
    return { key: "0", value: undefined };
}
exports.BusinessContent_ListChangeBizContent_UserInfosEntry = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.key !== "0") {
            writer.uint32(8).int64(message.key);
        }
        if (message.value !== undefined) {
            exports.BusinessContent_CohostUserInfo.encode(message.value, writer.uint32(18).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent_ListChangeBizContent_UserInfosEntry();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.key = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.value = exports.BusinessContent_CohostUserInfo.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent_ListChangeBizContent_UserInfosEntry.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent_ListChangeBizContent_UserInfosEntry();
        message.key = object.key ?? "0";
        message.value = (object.value !== undefined && object.value !== null)
            ? exports.BusinessContent_CohostUserInfo.fromPartial(object.value)
            : undefined;
        return message;
    },
};
function createBaseBusinessContent_ListChangeBizContent_VirtualWaitingUser() {
    return { userId: "0", timestamp: "0", avatars: [] };
}
exports.BusinessContent_ListChangeBizContent_VirtualWaitingUser = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.userId !== "0") {
            writer.uint32(8).int64(message.userId);
        }
        if (message.timestamp !== "0") {
            writer.uint32(16).int64(message.timestamp);
        }
        for (const v of message.avatars) {
            exports.Image.encode(v, writer.uint32(26).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent_ListChangeBizContent_VirtualWaitingUser();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.userId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.timestamp = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.avatars.push(exports.Image.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent_ListChangeBizContent_VirtualWaitingUser.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent_ListChangeBizContent_VirtualWaitingUser();
        message.userId = object.userId ?? "0";
        message.timestamp = object.timestamp ?? "0";
        message.avatars = object.avatars?.map((e) => exports.Image.fromPartial(e)) || [];
        return message;
    },
};
function createBaseBusinessContent_CohostUserInfo() {
    return {
        permissionType: "0",
        sourceType: 0,
        isLowVersion: false,
        bestTeammateUid: "0",
        hasTopicPerm: false,
        streamConfig: undefined,
        inDifferentInviteTypeControlGroup: false,
        nickname: "",
        displayId: "",
        avatarThumb: undefined,
        followStatus: "0",
        userIdStr: "",
    };
}
exports.BusinessContent_CohostUserInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.permissionType !== "0") {
            writer.uint32(8).int64(message.permissionType);
        }
        if (message.sourceType !== 0) {
            writer.uint32(16).int32(message.sourceType);
        }
        if (message.isLowVersion !== false) {
            writer.uint32(24).bool(message.isLowVersion);
        }
        if (message.bestTeammateUid !== "0") {
            writer.uint32(32).int64(message.bestTeammateUid);
        }
        if (message.hasTopicPerm !== false) {
            writer.uint32(40).bool(message.hasTopicPerm);
        }
        if (message.streamConfig !== undefined) {
            exports.BusinessContent_CohostUserInfo_CohostStreamConfig.encode(message.streamConfig, writer.uint32(50).fork()).join();
        }
        if (message.inDifferentInviteTypeControlGroup !== false) {
            writer.uint32(56).bool(message.inDifferentInviteTypeControlGroup);
        }
        if (message.nickname !== "") {
            writer.uint32(90).string(message.nickname);
        }
        if (message.displayId !== "") {
            writer.uint32(98).string(message.displayId);
        }
        if (message.avatarThumb !== undefined) {
            exports.Image.encode(message.avatarThumb, writer.uint32(106).fork()).join();
        }
        if (message.followStatus !== "0") {
            writer.uint32(112).int64(message.followStatus);
        }
        if (message.userIdStr !== "") {
            writer.uint32(122).string(message.userIdStr);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent_CohostUserInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.permissionType = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.sourceType = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.isLowVersion = reader.bool();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.bestTeammateUid = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.hasTopicPerm = reader.bool();
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.streamConfig = exports.BusinessContent_CohostUserInfo_CohostStreamConfig.decode(reader, reader.uint32());
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.inDifferentInviteTypeControlGroup = reader.bool();
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.nickname = reader.string();
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.displayId = reader.string();
                    continue;
                }
                case 13: {
                    if (tag !== 106) {
                        break;
                    }
                    message.avatarThumb = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 14: {
                    if (tag !== 112) {
                        break;
                    }
                    message.followStatus = reader.int64().toString();
                    continue;
                }
                case 15: {
                    if (tag !== 122) {
                        break;
                    }
                    message.userIdStr = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent_CohostUserInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent_CohostUserInfo();
        message.permissionType = object.permissionType ?? "0";
        message.sourceType = object.sourceType ?? 0;
        message.isLowVersion = object.isLowVersion ?? false;
        message.bestTeammateUid = object.bestTeammateUid ?? "0";
        message.hasTopicPerm = object.hasTopicPerm ?? false;
        message.streamConfig = (object.streamConfig !== undefined && object.streamConfig !== null)
            ? exports.BusinessContent_CohostUserInfo_CohostStreamConfig.fromPartial(object.streamConfig)
            : undefined;
        message.inDifferentInviteTypeControlGroup = object.inDifferentInviteTypeControlGroup ?? false;
        message.nickname = object.nickname ?? "";
        message.displayId = object.displayId ?? "";
        message.avatarThumb = (object.avatarThumb !== undefined && object.avatarThumb !== null)
            ? exports.Image.fromPartial(object.avatarThumb)
            : undefined;
        message.followStatus = object.followStatus ?? "0";
        message.userIdStr = object.userIdStr ?? "";
        return message;
    },
};
function createBaseBusinessContent_CohostUserInfo_CohostStreamConfig() {
    return { screenShareStreamId: "" };
}
exports.BusinessContent_CohostUserInfo_CohostStreamConfig = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.screenShareStreamId !== "") {
            writer.uint32(10).string(message.screenShareStreamId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent_CohostUserInfo_CohostStreamConfig();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.screenShareStreamId = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent_CohostUserInfo_CohostStreamConfig.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent_CohostUserInfo_CohostStreamConfig();
        message.screenShareStreamId = object.screenShareStreamId ?? "";
        return message;
    },
};
function createBaseBusinessContent_JoinGroupBizContent() {
    return {
        fromRoomAgeRestricted: 0,
        fromTag: undefined,
        dialog: undefined,
        punishInfo: undefined,
        topicInfo: undefined,
        algoRequestId: "",
        cohostLayoutMode: 0,
        tag: undefined,
        gameTag: undefined,
        newUserEducation: "",
        joinGroupMsgExtra: undefined,
    };
}
exports.BusinessContent_JoinGroupBizContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.fromRoomAgeRestricted !== 0) {
            writer.uint32(8).int32(message.fromRoomAgeRestricted);
        }
        if (message.fromTag !== undefined) {
            exports.BusinessContent_Tag.encode(message.fromTag, writer.uint32(18).fork()).join();
        }
        if (message.dialog !== undefined) {
            exports.BusinessContent_PerceptionDialogInfo.encode(message.dialog, writer.uint32(26).fork()).join();
        }
        if (message.punishInfo !== undefined) {
            exports.PunishEventInfo.encode(message.punishInfo, writer.uint32(34).fork()).join();
        }
        if (message.topicInfo !== undefined) {
            exports.CohostTopic.encode(message.topicInfo, writer.uint32(42).fork()).join();
        }
        if (message.algoRequestId !== "") {
            writer.uint32(50).string(message.algoRequestId);
        }
        if (message.cohostLayoutMode !== 0) {
            writer.uint32(56).int32(message.cohostLayoutMode);
        }
        if (message.tag !== undefined) {
            exports.BusinessContent_JoinGroupBizContent_TagV2.encode(message.tag, writer.uint32(66).fork()).join();
        }
        if (message.gameTag !== undefined) {
            exports.BusinessContent_JoinGroupBizContent_RivalsGameTag.encode(message.gameTag, writer.uint32(74).fork()).join();
        }
        if (message.newUserEducation !== "") {
            writer.uint32(90).string(message.newUserEducation);
        }
        if (message.joinGroupMsgExtra !== undefined) {
            exports.BusinessContent_JoinGroupMessageExtra.encode(message.joinGroupMsgExtra, writer.uint32(810).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent_JoinGroupBizContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.fromRoomAgeRestricted = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.fromTag = exports.BusinessContent_Tag.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.dialog = exports.BusinessContent_PerceptionDialogInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.punishInfo = exports.PunishEventInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.topicInfo = exports.CohostTopic.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.algoRequestId = reader.string();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.cohostLayoutMode = reader.int32();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.tag = exports.BusinessContent_JoinGroupBizContent_TagV2.decode(reader, reader.uint32());
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.gameTag = exports.BusinessContent_JoinGroupBizContent_RivalsGameTag.decode(reader, reader.uint32());
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.newUserEducation = reader.string();
                    continue;
                }
                case 101: {
                    if (tag !== 810) {
                        break;
                    }
                    message.joinGroupMsgExtra = exports.BusinessContent_JoinGroupMessageExtra.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent_JoinGroupBizContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent_JoinGroupBizContent();
        message.fromRoomAgeRestricted = object.fromRoomAgeRestricted ?? 0;
        message.fromTag = (object.fromTag !== undefined && object.fromTag !== null)
            ? exports.BusinessContent_Tag.fromPartial(object.fromTag)
            : undefined;
        message.dialog = (object.dialog !== undefined && object.dialog !== null)
            ? exports.BusinessContent_PerceptionDialogInfo.fromPartial(object.dialog)
            : undefined;
        message.punishInfo = (object.punishInfo !== undefined && object.punishInfo !== null)
            ? exports.PunishEventInfo.fromPartial(object.punishInfo)
            : undefined;
        message.topicInfo = (object.topicInfo !== undefined && object.topicInfo !== null)
            ? exports.CohostTopic.fromPartial(object.topicInfo)
            : undefined;
        message.algoRequestId = object.algoRequestId ?? "";
        message.cohostLayoutMode = object.cohostLayoutMode ?? 0;
        message.tag = (object.tag !== undefined && object.tag !== null)
            ? exports.BusinessContent_JoinGroupBizContent_TagV2.fromPartial(object.tag)
            : undefined;
        message.gameTag = (object.gameTag !== undefined && object.gameTag !== null)
            ? exports.BusinessContent_JoinGroupBizContent_RivalsGameTag.fromPartial(object.gameTag)
            : undefined;
        message.newUserEducation = object.newUserEducation ?? "";
        message.joinGroupMsgExtra = (object.joinGroupMsgExtra !== undefined && object.joinGroupMsgExtra !== null)
            ? exports.BusinessContent_JoinGroupMessageExtra.fromPartial(object.joinGroupMsgExtra)
            : undefined;
        return message;
    },
};
function createBaseBusinessContent_JoinGroupBizContent_RivalsGameTag() {
    return { tagId: "0", tagDisplayText: "" };
}
exports.BusinessContent_JoinGroupBizContent_RivalsGameTag = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.tagId !== "0") {
            writer.uint32(8).int64(message.tagId);
        }
        if (message.tagDisplayText !== "") {
            writer.uint32(18).string(message.tagDisplayText);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent_JoinGroupBizContent_RivalsGameTag();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.tagId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.tagDisplayText = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent_JoinGroupBizContent_RivalsGameTag.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent_JoinGroupBizContent_RivalsGameTag();
        message.tagId = object.tagId ?? "0";
        message.tagDisplayText = object.tagDisplayText ?? "";
        return message;
    },
};
function createBaseBusinessContent_JoinGroupBizContent_TagV2() {
    return {
        tagClassification: 0,
        tagType: 0,
        tagValue: "",
        starlingKey: "",
        secondDegreeRelationContent: undefined,
        cohostHistoryDay: "0",
        similarInterestContent: undefined,
    };
}
exports.BusinessContent_JoinGroupBizContent_TagV2 = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.tagClassification !== 0) {
            writer.uint32(8).int32(message.tagClassification);
        }
        if (message.tagType !== 0) {
            writer.uint32(16).int32(message.tagType);
        }
        if (message.tagValue !== "") {
            writer.uint32(26).string(message.tagValue);
        }
        if (message.starlingKey !== "") {
            writer.uint32(34).string(message.starlingKey);
        }
        if (message.secondDegreeRelationContent !== undefined) {
            exports.BusinessContent_JoinGroupBizContent_TagV2_SecondDegreeRelationContent.encode(message.secondDegreeRelationContent, writer.uint32(82).fork()).join();
        }
        if (message.cohostHistoryDay !== "0") {
            writer.uint32(88).int64(message.cohostHistoryDay);
        }
        if (message.similarInterestContent !== undefined) {
            exports.BusinessContent_JoinGroupBizContent_TagV2_SimilarInterestContent.encode(message.similarInterestContent, writer.uint32(98).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent_JoinGroupBizContent_TagV2();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.tagClassification = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.tagType = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.tagValue = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.starlingKey = reader.string();
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.secondDegreeRelationContent = exports.BusinessContent_JoinGroupBizContent_TagV2_SecondDegreeRelationContent
                        .decode(reader, reader.uint32());
                    continue;
                }
                case 11: {
                    if (tag !== 88) {
                        break;
                    }
                    message.cohostHistoryDay = reader.int64().toString();
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.similarInterestContent = exports.BusinessContent_JoinGroupBizContent_TagV2_SimilarInterestContent.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent_JoinGroupBizContent_TagV2.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent_JoinGroupBizContent_TagV2();
        message.tagClassification = object.tagClassification ?? 0;
        message.tagType = object.tagType ?? 0;
        message.tagValue = object.tagValue ?? "";
        message.starlingKey = object.starlingKey ?? "";
        message.secondDegreeRelationContent =
            (object.secondDegreeRelationContent !== undefined && object.secondDegreeRelationContent !== null)
                ? exports.BusinessContent_JoinGroupBizContent_TagV2_SecondDegreeRelationContent.fromPartial(object.secondDegreeRelationContent)
                : undefined;
        message.cohostHistoryDay = object.cohostHistoryDay ?? "0";
        message.similarInterestContent =
            (object.similarInterestContent !== undefined && object.similarInterestContent !== null)
                ? exports.BusinessContent_JoinGroupBizContent_TagV2_SimilarInterestContent.fromPartial(object.similarInterestContent)
                : undefined;
        return message;
    },
};
function createBaseBusinessContent_JoinGroupBizContent_TagV2_UserInfo() {
    return { userId: "0", nickName: "", avatarThumb: undefined };
}
exports.BusinessContent_JoinGroupBizContent_TagV2_UserInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.userId !== "0") {
            writer.uint32(8).int64(message.userId);
        }
        if (message.nickName !== "") {
            writer.uint32(18).string(message.nickName);
        }
        if (message.avatarThumb !== undefined) {
            exports.Image.encode(message.avatarThumb, writer.uint32(26).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent_JoinGroupBizContent_TagV2_UserInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.userId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.nickName = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.avatarThumb = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent_JoinGroupBizContent_TagV2_UserInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent_JoinGroupBizContent_TagV2_UserInfo();
        message.userId = object.userId ?? "0";
        message.nickName = object.nickName ?? "";
        message.avatarThumb = (object.avatarThumb !== undefined && object.avatarThumb !== null)
            ? exports.Image.fromPartial(object.avatarThumb)
            : undefined;
        return message;
    },
};
function createBaseBusinessContent_JoinGroupBizContent_TagV2_SecondDegreeRelationContent() {
    return { relatedUsers: [], totalRelatedUserCnt: "0" };
}
exports.BusinessContent_JoinGroupBizContent_TagV2_SecondDegreeRelationContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.relatedUsers) {
            exports.BusinessContent_JoinGroupBizContent_TagV2_UserInfo.encode(v, writer.uint32(10).fork()).join();
        }
        if (message.totalRelatedUserCnt !== "0") {
            writer.uint32(16).int64(message.totalRelatedUserCnt);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent_JoinGroupBizContent_TagV2_SecondDegreeRelationContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.relatedUsers.push(exports.BusinessContent_JoinGroupBizContent_TagV2_UserInfo.decode(reader, reader.uint32()));
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.totalRelatedUserCnt = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent_JoinGroupBizContent_TagV2_SecondDegreeRelationContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent_JoinGroupBizContent_TagV2_SecondDegreeRelationContent();
        message.relatedUsers =
            object.relatedUsers?.map((e) => exports.BusinessContent_JoinGroupBizContent_TagV2_UserInfo.fromPartial(e)) || [];
        message.totalRelatedUserCnt = object.totalRelatedUserCnt ?? "0";
        return message;
    },
};
function createBaseBusinessContent_JoinGroupBizContent_TagV2_SimilarInterestContent() {
    return { contentId: "0", displayText: "" };
}
exports.BusinessContent_JoinGroupBizContent_TagV2_SimilarInterestContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.contentId !== "0") {
            writer.uint32(8).int64(message.contentId);
        }
        if (message.displayText !== "") {
            writer.uint32(18).string(message.displayText);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent_JoinGroupBizContent_TagV2_SimilarInterestContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.contentId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.displayText = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent_JoinGroupBizContent_TagV2_SimilarInterestContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent_JoinGroupBizContent_TagV2_SimilarInterestContent();
        message.contentId = object.contentId ?? "0";
        message.displayText = object.displayText ?? "";
        return message;
    },
};
function createBaseBusinessContent_Tag() {
    return { tagType: 0, tagValue: "", tagText: "" };
}
exports.BusinessContent_Tag = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.tagType !== 0) {
            writer.uint32(8).int32(message.tagType);
        }
        if (message.tagValue !== "") {
            writer.uint32(18).string(message.tagValue);
        }
        if (message.tagText !== "") {
            writer.uint32(26).string(message.tagText);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent_Tag();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.tagType = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.tagValue = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.tagText = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent_Tag.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent_Tag();
        message.tagType = object.tagType ?? 0;
        message.tagValue = object.tagValue ?? "";
        message.tagText = object.tagText ?? "";
        return message;
    },
};
function createBaseBusinessContent_PerceptionDialogInfo() {
    return {
        iconType: "0",
        title: undefined,
        subTitle: undefined,
        adviceActionText: undefined,
        defaultActionText: undefined,
        violationDetailUrl: "",
        scene: 0,
        targetUserId: "0",
        targetRoomId: "0",
        countDownTime: "0",
        showFeedback: false,
        feedbackOptionsList: [],
        policyTip: "0",
    };
}
exports.BusinessContent_PerceptionDialogInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.iconType !== "0") {
            writer.uint32(8).int64(message.iconType);
        }
        if (message.title !== undefined) {
            exports.Text.encode(message.title, writer.uint32(18).fork()).join();
        }
        if (message.subTitle !== undefined) {
            exports.Text.encode(message.subTitle, writer.uint32(26).fork()).join();
        }
        if (message.adviceActionText !== undefined) {
            exports.Text.encode(message.adviceActionText, writer.uint32(34).fork()).join();
        }
        if (message.defaultActionText !== undefined) {
            exports.Text.encode(message.defaultActionText, writer.uint32(42).fork()).join();
        }
        if (message.violationDetailUrl !== "") {
            writer.uint32(50).string(message.violationDetailUrl);
        }
        if (message.scene !== 0) {
            writer.uint32(56).int32(message.scene);
        }
        if (message.targetUserId !== "0") {
            writer.uint32(64).int64(message.targetUserId);
        }
        if (message.targetRoomId !== "0") {
            writer.uint32(72).int64(message.targetRoomId);
        }
        if (message.countDownTime !== "0") {
            writer.uint32(80).int64(message.countDownTime);
        }
        if (message.showFeedback !== false) {
            writer.uint32(88).bool(message.showFeedback);
        }
        for (const v of message.feedbackOptionsList) {
            exports.BusinessContent_PerceptionFeedbackOption.encode(v, writer.uint32(98).fork()).join();
        }
        if (message.policyTip !== "0") {
            writer.uint32(104).int64(message.policyTip);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent_PerceptionDialogInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.iconType = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.title = exports.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.subTitle = exports.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.adviceActionText = exports.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.defaultActionText = exports.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.violationDetailUrl = reader.string();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.scene = reader.int32();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.targetUserId = reader.int64().toString();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.targetRoomId = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.countDownTime = reader.int64().toString();
                    continue;
                }
                case 11: {
                    if (tag !== 88) {
                        break;
                    }
                    message.showFeedback = reader.bool();
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.feedbackOptionsList.push(exports.BusinessContent_PerceptionFeedbackOption.decode(reader, reader.uint32()));
                    continue;
                }
                case 13: {
                    if (tag !== 104) {
                        break;
                    }
                    message.policyTip = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent_PerceptionDialogInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent_PerceptionDialogInfo();
        message.iconType = object.iconType ?? "0";
        message.title = (object.title !== undefined && object.title !== null) ? exports.Text.fromPartial(object.title) : undefined;
        message.subTitle = (object.subTitle !== undefined && object.subTitle !== null)
            ? exports.Text.fromPartial(object.subTitle)
            : undefined;
        message.adviceActionText = (object.adviceActionText !== undefined && object.adviceActionText !== null)
            ? exports.Text.fromPartial(object.adviceActionText)
            : undefined;
        message.defaultActionText = (object.defaultActionText !== undefined && object.defaultActionText !== null)
            ? exports.Text.fromPartial(object.defaultActionText)
            : undefined;
        message.violationDetailUrl = object.violationDetailUrl ?? "";
        message.scene = object.scene ?? 0;
        message.targetUserId = object.targetUserId ?? "0";
        message.targetRoomId = object.targetRoomId ?? "0";
        message.countDownTime = object.countDownTime ?? "0";
        message.showFeedback = object.showFeedback ?? false;
        message.feedbackOptionsList =
            object.feedbackOptionsList?.map((e) => exports.BusinessContent_PerceptionFeedbackOption.fromPartial(e)) || [];
        message.policyTip = object.policyTip ?? "0";
        return message;
    },
};
function createBaseBusinessContent_PerceptionFeedbackOption() {
    return { id: "0", contentKey: "" };
}
exports.BusinessContent_PerceptionFeedbackOption = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.id !== "0") {
            writer.uint32(8).int64(message.id);
        }
        if (message.contentKey !== "") {
            writer.uint32(18).string(message.contentKey);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent_PerceptionFeedbackOption();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.id = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.contentKey = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent_PerceptionFeedbackOption.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent_PerceptionFeedbackOption();
        message.id = object.id ?? "0";
        message.contentKey = object.contentKey ?? "";
        return message;
    },
};
function createBaseBusinessContent_JoinGroupMessageExtra() {
    return { sourceType: "0", extra: undefined, otherUsersList: [] };
}
exports.BusinessContent_JoinGroupMessageExtra = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.sourceType !== "0") {
            writer.uint32(8).int64(message.sourceType);
        }
        if (message.extra !== undefined) {
            exports.BusinessContent_JoinGroupMessageExtra_RivalExtra.encode(message.extra, writer.uint32(18).fork()).join();
        }
        for (const v of message.otherUsersList) {
            exports.BusinessContent_JoinGroupMessageExtra_RivalExtra.encode(v, writer.uint32(26).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent_JoinGroupMessageExtra();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.sourceType = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.extra = exports.BusinessContent_JoinGroupMessageExtra_RivalExtra.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.otherUsersList.push(exports.BusinessContent_JoinGroupMessageExtra_RivalExtra.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent_JoinGroupMessageExtra.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent_JoinGroupMessageExtra();
        message.sourceType = object.sourceType ?? "0";
        message.extra = (object.extra !== undefined && object.extra !== null)
            ? exports.BusinessContent_JoinGroupMessageExtra_RivalExtra.fromPartial(object.extra)
            : undefined;
        message.otherUsersList =
            object.otherUsersList?.map((e) => exports.BusinessContent_JoinGroupMessageExtra_RivalExtra.fromPartial(e)) || [];
        return message;
    },
};
function createBaseBusinessContent_JoinGroupMessageExtra_RivalExtra() {
    return {
        userCount: "0",
        avatarThumb: undefined,
        displayId: "",
        authenticationInfo: undefined,
        nickname: "",
        followStatus: "0",
        hashtag: undefined,
        topHostInfo: undefined,
        userId: "0",
        isBestTeammate: false,
    };
}
exports.BusinessContent_JoinGroupMessageExtra_RivalExtra = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.userCount !== "0") {
            writer.uint32(32).int64(message.userCount);
        }
        if (message.avatarThumb !== undefined) {
            exports.Image.encode(message.avatarThumb, writer.uint32(42).fork()).join();
        }
        if (message.displayId !== "") {
            writer.uint32(50).string(message.displayId);
        }
        if (message.authenticationInfo !== undefined) {
            exports.BusinessContent_JoinGroupMessageExtra_RivalExtra_AuthenticationInfo.encode(message.authenticationInfo, writer.uint32(58).fork()).join();
        }
        if (message.nickname !== "") {
            writer.uint32(66).string(message.nickname);
        }
        if (message.followStatus !== "0") {
            writer.uint32(72).int64(message.followStatus);
        }
        if (message.hashtag !== undefined) {
            exports.BusinessContent_Hashtag.encode(message.hashtag, writer.uint32(82).fork()).join();
        }
        if (message.topHostInfo !== undefined) {
            exports.BusinessContent_TopHostInfo.encode(message.topHostInfo, writer.uint32(90).fork()).join();
        }
        if (message.userId !== "0") {
            writer.uint32(96).int64(message.userId);
        }
        if (message.isBestTeammate !== false) {
            writer.uint32(104).bool(message.isBestTeammate);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent_JoinGroupMessageExtra_RivalExtra();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.userCount = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.avatarThumb = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.displayId = reader.string();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.authenticationInfo = exports.BusinessContent_JoinGroupMessageExtra_RivalExtra_AuthenticationInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.nickname = reader.string();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.followStatus = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.hashtag = exports.BusinessContent_Hashtag.decode(reader, reader.uint32());
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.topHostInfo = exports.BusinessContent_TopHostInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 12: {
                    if (tag !== 96) {
                        break;
                    }
                    message.userId = reader.int64().toString();
                    continue;
                }
                case 13: {
                    if (tag !== 104) {
                        break;
                    }
                    message.isBestTeammate = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent_JoinGroupMessageExtra_RivalExtra.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent_JoinGroupMessageExtra_RivalExtra();
        message.userCount = object.userCount ?? "0";
        message.avatarThumb = (object.avatarThumb !== undefined && object.avatarThumb !== null)
            ? exports.Image.fromPartial(object.avatarThumb)
            : undefined;
        message.displayId = object.displayId ?? "";
        message.authenticationInfo = (object.authenticationInfo !== undefined && object.authenticationInfo !== null)
            ? exports.BusinessContent_JoinGroupMessageExtra_RivalExtra_AuthenticationInfo.fromPartial(object.authenticationInfo)
            : undefined;
        message.nickname = object.nickname ?? "";
        message.followStatus = object.followStatus ?? "0";
        message.hashtag = (object.hashtag !== undefined && object.hashtag !== null)
            ? exports.BusinessContent_Hashtag.fromPartial(object.hashtag)
            : undefined;
        message.topHostInfo = (object.topHostInfo !== undefined && object.topHostInfo !== null)
            ? exports.BusinessContent_TopHostInfo.fromPartial(object.topHostInfo)
            : undefined;
        message.userId = object.userId ?? "0";
        message.isBestTeammate = object.isBestTeammate ?? false;
        return message;
    },
};
function createBaseBusinessContent_JoinGroupMessageExtra_RivalExtra_AuthenticationInfo() {
    return { customVerify: "", enterpriseVerifyReason: "", authenticationBadge: undefined };
}
exports.BusinessContent_JoinGroupMessageExtra_RivalExtra_AuthenticationInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.customVerify !== "") {
            writer.uint32(10).string(message.customVerify);
        }
        if (message.enterpriseVerifyReason !== "") {
            writer.uint32(18).string(message.enterpriseVerifyReason);
        }
        if (message.authenticationBadge !== undefined) {
            exports.Image.encode(message.authenticationBadge, writer.uint32(26).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent_JoinGroupMessageExtra_RivalExtra_AuthenticationInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.customVerify = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.enterpriseVerifyReason = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.authenticationBadge = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent_JoinGroupMessageExtra_RivalExtra_AuthenticationInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent_JoinGroupMessageExtra_RivalExtra_AuthenticationInfo();
        message.customVerify = object.customVerify ?? "";
        message.enterpriseVerifyReason = object.enterpriseVerifyReason ?? "";
        message.authenticationBadge = (object.authenticationBadge !== undefined && object.authenticationBadge !== null)
            ? exports.Image.fromPartial(object.authenticationBadge)
            : undefined;
        return message;
    },
};
function createBaseBusinessContent_Hashtag() {
    return { id: "0", title: "", image: undefined, namespace: 0 };
}
exports.BusinessContent_Hashtag = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.id !== "0") {
            writer.uint32(8).int64(message.id);
        }
        if (message.title !== "") {
            writer.uint32(18).string(message.title);
        }
        if (message.image !== undefined) {
            exports.Image.encode(message.image, writer.uint32(26).fork()).join();
        }
        if (message.namespace !== 0) {
            writer.uint32(32).int32(message.namespace);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent_Hashtag();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.id = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.title = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.image = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.namespace = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent_Hashtag.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent_Hashtag();
        message.id = object.id ?? "0";
        message.title = object.title ?? "";
        message.image = (object.image !== undefined && object.image !== null) ? exports.Image.fromPartial(object.image) : undefined;
        message.namespace = object.namespace ?? 0;
        return message;
    },
};
function createBaseBusinessContent_TopHostInfo() {
    return { rankType: "", topIndex: "0" };
}
exports.BusinessContent_TopHostInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.rankType !== "") {
            writer.uint32(10).string(message.rankType);
        }
        if (message.topIndex !== "0") {
            writer.uint32(16).int64(message.topIndex);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBusinessContent_TopHostInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.rankType = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.topIndex = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BusinessContent_TopHostInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBusinessContent_TopHostInfo();
        message.rankType = object.rankType ?? "";
        message.topIndex = object.topIndex ?? "0";
        return message;
    },
};
function createBaseJoinGroupContent() {
    return { groupUser: undefined, joinUser: undefined, type: 0, groupExtInfo: [] };
}
exports.JoinGroupContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.groupUser !== undefined) {
            exports.GroupChannelAllUser.encode(message.groupUser, writer.uint32(10).fork()).join();
        }
        if (message.joinUser !== undefined) {
            exports.GroupPlayer.encode(message.joinUser, writer.uint32(18).fork()).join();
        }
        if (message.type !== 0) {
            writer.uint32(24).int32(message.type);
        }
        for (const v of message.groupExtInfo) {
            exports.RTCExtraInfo.encode(v, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseJoinGroupContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.groupUser = exports.GroupChannelAllUser.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.joinUser = exports.GroupPlayer.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.type = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.groupExtInfo.push(exports.RTCExtraInfo.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.JoinGroupContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseJoinGroupContent();
        message.groupUser = (object.groupUser !== undefined && object.groupUser !== null)
            ? exports.GroupChannelAllUser.fromPartial(object.groupUser)
            : undefined;
        message.joinUser = (object.joinUser !== undefined && object.joinUser !== null)
            ? exports.GroupPlayer.fromPartial(object.joinUser)
            : undefined;
        message.type = object.type ?? 0;
        message.groupExtInfo = object.groupExtInfo?.map((e) => exports.RTCExtraInfo.fromPartial(e)) || [];
        return message;
    },
};
function createBasePrivilegeLogExtra() {
    return { dataVersion: "", privilegeId: "", privilegeVersion: "", privilegeOrderId: "", level: "" };
}
exports.PrivilegeLogExtra = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.dataVersion !== "") {
            writer.uint32(10).string(message.dataVersion);
        }
        if (message.privilegeId !== "") {
            writer.uint32(18).string(message.privilegeId);
        }
        if (message.privilegeVersion !== "") {
            writer.uint32(26).string(message.privilegeVersion);
        }
        if (message.privilegeOrderId !== "") {
            writer.uint32(34).string(message.privilegeOrderId);
        }
        if (message.level !== "") {
            writer.uint32(42).string(message.level);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePrivilegeLogExtra();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.dataVersion = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.privilegeId = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.privilegeVersion = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.privilegeOrderId = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.level = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.PrivilegeLogExtra.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePrivilegeLogExtra();
        message.dataVersion = object.dataVersion ?? "";
        message.privilegeId = object.privilegeId ?? "";
        message.privilegeVersion = object.privilegeVersion ?? "";
        message.privilegeOrderId = object.privilegeOrderId ?? "";
        message.level = object.level ?? "";
        return message;
    },
};
function createBaseFontStyle() {
    return { fontSize: 0, fontWidth: 0, fontColor: "", borderColor: "" };
}
exports.FontStyle = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.fontSize !== 0) {
            writer.uint32(8).int32(message.fontSize);
        }
        if (message.fontWidth !== 0) {
            writer.uint32(16).int32(message.fontWidth);
        }
        if (message.fontColor !== "") {
            writer.uint32(26).string(message.fontColor);
        }
        if (message.borderColor !== "") {
            writer.uint32(34).string(message.borderColor);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseFontStyle();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.fontSize = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.fontWidth = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.fontColor = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.borderColor = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.FontStyle.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseFontStyle();
        message.fontSize = object.fontSize ?? 0;
        message.fontWidth = object.fontWidth ?? 0;
        message.fontColor = object.fontColor ?? "";
        message.borderColor = object.borderColor ?? "";
        return message;
    },
};
function createBaseUserHonor() {
    return {
        totalDiamond: "0",
        diamondIcon: undefined,
        currentHonorName: "",
        currentHonorIcon: undefined,
        nextHonorName: "",
        level: 0,
        nextHonorIcon: undefined,
        currentDiamond: "0",
        thisGradeMinDiamond: "0",
        thisGradeMaxDiamond: "0",
        gradeDescribe: "",
        gradeIconList: [],
        screenChatType: "0",
        imIcon: undefined,
        imIconWithLevel: undefined,
        liveIcon: undefined,
        newImIconWithLevel: undefined,
        newLiveIcon: undefined,
        upgradeNeedConsume: "0",
        nextPrivileges: "",
        profileDialogBg: undefined,
        profileDialogBackBg: undefined,
        score: "0",
        gradeBanner: "",
    };
}
exports.UserHonor = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.totalDiamond !== "0") {
            writer.uint32(8).int64(message.totalDiamond);
        }
        if (message.diamondIcon !== undefined) {
            exports.Image.encode(message.diamondIcon, writer.uint32(18).fork()).join();
        }
        if (message.currentHonorName !== "") {
            writer.uint32(26).string(message.currentHonorName);
        }
        if (message.currentHonorIcon !== undefined) {
            exports.Image.encode(message.currentHonorIcon, writer.uint32(34).fork()).join();
        }
        if (message.nextHonorName !== "") {
            writer.uint32(42).string(message.nextHonorName);
        }
        if (message.level !== 0) {
            writer.uint32(48).int32(message.level);
        }
        if (message.nextHonorIcon !== undefined) {
            exports.Image.encode(message.nextHonorIcon, writer.uint32(58).fork()).join();
        }
        if (message.currentDiamond !== "0") {
            writer.uint32(72).int64(message.currentDiamond);
        }
        if (message.thisGradeMinDiamond !== "0") {
            writer.uint32(80).int64(message.thisGradeMinDiamond);
        }
        if (message.thisGradeMaxDiamond !== "0") {
            writer.uint32(88).int64(message.thisGradeMaxDiamond);
        }
        if (message.gradeDescribe !== "") {
            writer.uint32(106).string(message.gradeDescribe);
        }
        for (const v of message.gradeIconList) {
            exports.GradeIcon.encode(v, writer.uint32(114).fork()).join();
        }
        if (message.screenChatType !== "0") {
            writer.uint32(120).int64(message.screenChatType);
        }
        if (message.imIcon !== undefined) {
            exports.Image.encode(message.imIcon, writer.uint32(130).fork()).join();
        }
        if (message.imIconWithLevel !== undefined) {
            exports.Image.encode(message.imIconWithLevel, writer.uint32(138).fork()).join();
        }
        if (message.liveIcon !== undefined) {
            exports.Image.encode(message.liveIcon, writer.uint32(146).fork()).join();
        }
        if (message.newImIconWithLevel !== undefined) {
            exports.Image.encode(message.newImIconWithLevel, writer.uint32(154).fork()).join();
        }
        if (message.newLiveIcon !== undefined) {
            exports.Image.encode(message.newLiveIcon, writer.uint32(162).fork()).join();
        }
        if (message.upgradeNeedConsume !== "0") {
            writer.uint32(168).int64(message.upgradeNeedConsume);
        }
        if (message.nextPrivileges !== "") {
            writer.uint32(178).string(message.nextPrivileges);
        }
        if (message.profileDialogBg !== undefined) {
            exports.Image.encode(message.profileDialogBg, writer.uint32(186).fork()).join();
        }
        if (message.profileDialogBackBg !== undefined) {
            exports.Image.encode(message.profileDialogBackBg, writer.uint32(194).fork()).join();
        }
        if (message.score !== "0") {
            writer.uint32(200).int64(message.score);
        }
        if (message.gradeBanner !== "") {
            writer.uint32(8010).string(message.gradeBanner);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUserHonor();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.totalDiamond = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.diamondIcon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.currentHonorName = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.currentHonorIcon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.nextHonorName = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.level = reader.int32();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.nextHonorIcon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.currentDiamond = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.thisGradeMinDiamond = reader.int64().toString();
                    continue;
                }
                case 11: {
                    if (tag !== 88) {
                        break;
                    }
                    message.thisGradeMaxDiamond = reader.int64().toString();
                    continue;
                }
                case 13: {
                    if (tag !== 106) {
                        break;
                    }
                    message.gradeDescribe = reader.string();
                    continue;
                }
                case 14: {
                    if (tag !== 114) {
                        break;
                    }
                    message.gradeIconList.push(exports.GradeIcon.decode(reader, reader.uint32()));
                    continue;
                }
                case 15: {
                    if (tag !== 120) {
                        break;
                    }
                    message.screenChatType = reader.int64().toString();
                    continue;
                }
                case 16: {
                    if (tag !== 130) {
                        break;
                    }
                    message.imIcon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 17: {
                    if (tag !== 138) {
                        break;
                    }
                    message.imIconWithLevel = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 18: {
                    if (tag !== 146) {
                        break;
                    }
                    message.liveIcon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 19: {
                    if (tag !== 154) {
                        break;
                    }
                    message.newImIconWithLevel = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 20: {
                    if (tag !== 162) {
                        break;
                    }
                    message.newLiveIcon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 21: {
                    if (tag !== 168) {
                        break;
                    }
                    message.upgradeNeedConsume = reader.int64().toString();
                    continue;
                }
                case 22: {
                    if (tag !== 178) {
                        break;
                    }
                    message.nextPrivileges = reader.string();
                    continue;
                }
                case 23: {
                    if (tag !== 186) {
                        break;
                    }
                    message.profileDialogBg = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 24: {
                    if (tag !== 194) {
                        break;
                    }
                    message.profileDialogBackBg = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 25: {
                    if (tag !== 200) {
                        break;
                    }
                    message.score = reader.int64().toString();
                    continue;
                }
                case 1001: {
                    if (tag !== 8010) {
                        break;
                    }
                    message.gradeBanner = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.UserHonor.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUserHonor();
        message.totalDiamond = object.totalDiamond ?? "0";
        message.diamondIcon = (object.diamondIcon !== undefined && object.diamondIcon !== null)
            ? exports.Image.fromPartial(object.diamondIcon)
            : undefined;
        message.currentHonorName = object.currentHonorName ?? "";
        message.currentHonorIcon = (object.currentHonorIcon !== undefined && object.currentHonorIcon !== null)
            ? exports.Image.fromPartial(object.currentHonorIcon)
            : undefined;
        message.nextHonorName = object.nextHonorName ?? "";
        message.level = object.level ?? 0;
        message.nextHonorIcon = (object.nextHonorIcon !== undefined && object.nextHonorIcon !== null)
            ? exports.Image.fromPartial(object.nextHonorIcon)
            : undefined;
        message.currentDiamond = object.currentDiamond ?? "0";
        message.thisGradeMinDiamond = object.thisGradeMinDiamond ?? "0";
        message.thisGradeMaxDiamond = object.thisGradeMaxDiamond ?? "0";
        message.gradeDescribe = object.gradeDescribe ?? "";
        message.gradeIconList = object.gradeIconList?.map((e) => exports.GradeIcon.fromPartial(e)) || [];
        message.screenChatType = object.screenChatType ?? "0";
        message.imIcon = (object.imIcon !== undefined && object.imIcon !== null)
            ? exports.Image.fromPartial(object.imIcon)
            : undefined;
        message.imIconWithLevel = (object.imIconWithLevel !== undefined && object.imIconWithLevel !== null)
            ? exports.Image.fromPartial(object.imIconWithLevel)
            : undefined;
        message.liveIcon = (object.liveIcon !== undefined && object.liveIcon !== null)
            ? exports.Image.fromPartial(object.liveIcon)
            : undefined;
        message.newImIconWithLevel = (object.newImIconWithLevel !== undefined && object.newImIconWithLevel !== null)
            ? exports.Image.fromPartial(object.newImIconWithLevel)
            : undefined;
        message.newLiveIcon = (object.newLiveIcon !== undefined && object.newLiveIcon !== null)
            ? exports.Image.fromPartial(object.newLiveIcon)
            : undefined;
        message.upgradeNeedConsume = object.upgradeNeedConsume ?? "0";
        message.nextPrivileges = object.nextPrivileges ?? "";
        message.profileDialogBg = (object.profileDialogBg !== undefined && object.profileDialogBg !== null)
            ? exports.Image.fromPartial(object.profileDialogBg)
            : undefined;
        message.profileDialogBackBg = (object.profileDialogBackBg !== undefined && object.profileDialogBackBg !== null)
            ? exports.Image.fromPartial(object.profileDialogBackBg)
            : undefined;
        message.score = object.score ?? "0";
        message.gradeBanner = object.gradeBanner ?? "";
        return message;
    },
};
function createBaseGradeIcon() {
    return { icon: undefined, iconDiamond: "0", level: "0", levelStr: "" };
}
exports.GradeIcon = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.icon !== undefined) {
            exports.Image.encode(message.icon, writer.uint32(10).fork()).join();
        }
        if (message.iconDiamond !== "0") {
            writer.uint32(16).int64(message.iconDiamond);
        }
        if (message.level !== "0") {
            writer.uint32(24).int64(message.level);
        }
        if (message.levelStr !== "") {
            writer.uint32(34).string(message.levelStr);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGradeIcon();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.icon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.iconDiamond = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.level = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.levelStr = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.GradeIcon.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGradeIcon();
        message.icon = (object.icon !== undefined && object.icon !== null) ? exports.Image.fromPartial(object.icon) : undefined;
        message.iconDiamond = object.iconDiamond ?? "0";
        message.level = object.level ?? "0";
        message.levelStr = object.levelStr ?? "";
        return message;
    },
};
function createBaseBorderInfo() {
    return {
        icon: undefined,
        level: "0",
        source: "",
        profileDecorationRibbon: undefined,
        borderLogExtra: undefined,
        ribbonLogExtra: undefined,
        avatarBackgroundColor: "",
        avatarBackgroundBorderColor: "",
    };
}
exports.BorderInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.icon !== undefined) {
            exports.Image.encode(message.icon, writer.uint32(10).fork()).join();
        }
        if (message.level !== "0") {
            writer.uint32(16).int64(message.level);
        }
        if (message.source !== "") {
            writer.uint32(26).string(message.source);
        }
        if (message.profileDecorationRibbon !== undefined) {
            exports.Image.encode(message.profileDecorationRibbon, writer.uint32(34).fork()).join();
        }
        if (message.borderLogExtra !== undefined) {
            exports.PrivilegeLogExtra.encode(message.borderLogExtra, writer.uint32(42).fork()).join();
        }
        if (message.ribbonLogExtra !== undefined) {
            exports.PrivilegeLogExtra.encode(message.ribbonLogExtra, writer.uint32(50).fork()).join();
        }
        if (message.avatarBackgroundColor !== "") {
            writer.uint32(58).string(message.avatarBackgroundColor);
        }
        if (message.avatarBackgroundBorderColor !== "") {
            writer.uint32(66).string(message.avatarBackgroundBorderColor);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBorderInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.icon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.level = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.source = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.profileDecorationRibbon = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.borderLogExtra = exports.PrivilegeLogExtra.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.ribbonLogExtra = exports.PrivilegeLogExtra.decode(reader, reader.uint32());
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.avatarBackgroundColor = reader.string();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.avatarBackgroundBorderColor = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BorderInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBorderInfo();
        message.icon = (object.icon !== undefined && object.icon !== null) ? exports.Image.fromPartial(object.icon) : undefined;
        message.level = object.level ?? "0";
        message.source = object.source ?? "";
        message.profileDecorationRibbon =
            (object.profileDecorationRibbon !== undefined && object.profileDecorationRibbon !== null)
                ? exports.Image.fromPartial(object.profileDecorationRibbon)
                : undefined;
        message.borderLogExtra = (object.borderLogExtra !== undefined && object.borderLogExtra !== null)
            ? exports.PrivilegeLogExtra.fromPartial(object.borderLogExtra)
            : undefined;
        message.ribbonLogExtra = (object.ribbonLogExtra !== undefined && object.ribbonLogExtra !== null)
            ? exports.PrivilegeLogExtra.fromPartial(object.ribbonLogExtra)
            : undefined;
        message.avatarBackgroundColor = object.avatarBackgroundColor ?? "";
        message.avatarBackgroundBorderColor = object.avatarBackgroundBorderColor ?? "";
        return message;
    },
};
function createBaseFansClubMember() {
    return { data: undefined, preferData: {} };
}
exports.FansClubMember = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.data !== undefined) {
            exports.FansClubData.encode(message.data, writer.uint32(10).fork()).join();
        }
        Object.entries(message.preferData).forEach(([key, value]) => {
            exports.FansClubMember_PreferDataEntry.encode({ key: key, value }, writer.uint32(18).fork()).join();
        });
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseFansClubMember();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.data = exports.FansClubData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    const entry2 = exports.FansClubMember_PreferDataEntry.decode(reader, reader.uint32());
                    if (entry2.value !== undefined) {
                        message.preferData[entry2.key] = entry2.value;
                    }
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.FansClubMember.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseFansClubMember();
        message.data = (object.data !== undefined && object.data !== null)
            ? exports.FansClubData.fromPartial(object.data)
            : undefined;
        message.preferData = Object.entries(object.preferData ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[globalThis.Number(key)] = exports.FansClubData.fromPartial(value);
            }
            return acc;
        }, {});
        return message;
    },
};
function createBaseFansClubMember_PreferDataEntry() {
    return { key: 0, value: undefined };
}
exports.FansClubMember_PreferDataEntry = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.key !== 0) {
            writer.uint32(8).int32(message.key);
        }
        if (message.value !== undefined) {
            exports.FansClubData.encode(message.value, writer.uint32(18).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseFansClubMember_PreferDataEntry();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.key = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.value = exports.FansClubData.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.FansClubMember_PreferDataEntry.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseFansClubMember_PreferDataEntry();
        message.key = object.key ?? 0;
        message.value = (object.value !== undefined && object.value !== null)
            ? exports.FansClubData.fromPartial(object.value)
            : undefined;
        return message;
    },
};
function createBaseFansClubData() {
    return { clubName: "", level: 0, userFansClubStatus: 0, badge: undefined, availableGiftIds: [], anchorId: "0" };
}
exports.FansClubData = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.clubName !== "") {
            writer.uint32(10).string(message.clubName);
        }
        if (message.level !== 0) {
            writer.uint32(16).int32(message.level);
        }
        if (message.userFansClubStatus !== 0) {
            writer.uint32(24).int32(message.userFansClubStatus);
        }
        if (message.badge !== undefined) {
            exports.FansClubData_UserBadge.encode(message.badge, writer.uint32(34).fork()).join();
        }
        writer.uint32(42).fork();
        for (const v of message.availableGiftIds) {
            writer.int64(v);
        }
        writer.join();
        if (message.anchorId !== "0") {
            writer.uint32(48).int64(message.anchorId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseFansClubData();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.clubName = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.level = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.userFansClubStatus = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.badge = exports.FansClubData_UserBadge.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag === 40) {
                        message.availableGiftIds.push(reader.int64().toString());
                        continue;
                    }
                    if (tag === 42) {
                        const end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) {
                            message.availableGiftIds.push(reader.int64().toString());
                        }
                        continue;
                    }
                    break;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.anchorId = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.FansClubData.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseFansClubData();
        message.clubName = object.clubName ?? "";
        message.level = object.level ?? 0;
        message.userFansClubStatus = object.userFansClubStatus ?? 0;
        message.badge = (object.badge !== undefined && object.badge !== null)
            ? exports.FansClubData_UserBadge.fromPartial(object.badge)
            : undefined;
        message.availableGiftIds = object.availableGiftIds?.map((e) => e) || [];
        message.anchorId = object.anchorId ?? "0";
        return message;
    },
};
function createBaseFansClubData_UserBadge() {
    return { icons: {}, title: "" };
}
exports.FansClubData_UserBadge = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        Object.entries(message.icons).forEach(([key, value]) => {
            exports.FansClubData_UserBadge_IconsEntry.encode({ key: key, value }, writer.uint32(10).fork()).join();
        });
        if (message.title !== "") {
            writer.uint32(18).string(message.title);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseFansClubData_UserBadge();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    const entry1 = exports.FansClubData_UserBadge_IconsEntry.decode(reader, reader.uint32());
                    if (entry1.value !== undefined) {
                        message.icons[entry1.key] = entry1.value;
                    }
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.title = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.FansClubData_UserBadge.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseFansClubData_UserBadge();
        message.icons = Object.entries(object.icons ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[globalThis.Number(key)] = exports.Image.fromPartial(value);
            }
            return acc;
        }, {});
        message.title = object.title ?? "";
        return message;
    },
};
function createBaseFansClubData_UserBadge_IconsEntry() {
    return { key: 0, value: undefined };
}
exports.FansClubData_UserBadge_IconsEntry = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.key !== 0) {
            writer.uint32(8).int32(message.key);
        }
        if (message.value !== undefined) {
            exports.Image.encode(message.value, writer.uint32(18).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseFansClubData_UserBadge_IconsEntry();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.key = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.value = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.FansClubData_UserBadge_IconsEntry.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseFansClubData_UserBadge_IconsEntry();
        message.key = object.key ?? 0;
        message.value = (object.value !== undefined && object.value !== null) ? exports.Image.fromPartial(object.value) : undefined;
        return message;
    },
};
function createBaseAuthor() {
    return { videoTotalCount: "0", videoTotalPlayCount: "0", videoTotalFavoriteCount: "0" };
}
exports.Author = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.videoTotalCount !== "0") {
            writer.uint32(8).int64(message.videoTotalCount);
        }
        if (message.videoTotalPlayCount !== "0") {
            writer.uint32(16).int64(message.videoTotalPlayCount);
        }
        if (message.videoTotalFavoriteCount !== "0") {
            writer.uint32(48).int64(message.videoTotalFavoriteCount);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseAuthor();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.videoTotalCount = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.videoTotalPlayCount = reader.int64().toString();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.videoTotalFavoriteCount = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Author.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseAuthor();
        message.videoTotalCount = object.videoTotalCount ?? "0";
        message.videoTotalPlayCount = object.videoTotalPlayCount ?? "0";
        message.videoTotalFavoriteCount = object.videoTotalFavoriteCount ?? "0";
        return message;
    },
};
function createBasePublicAreaCommon() {
    return { userLabel: undefined, userConsumeInRoom: "0" };
}
exports.PublicAreaCommon = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.userLabel !== undefined) {
            exports.Image.encode(message.userLabel, writer.uint32(10).fork()).join();
        }
        if (message.userConsumeInRoom !== "0") {
            writer.uint32(16).int64(message.userConsumeInRoom);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePublicAreaCommon();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.userLabel = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.userConsumeInRoom = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.PublicAreaCommon.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePublicAreaCommon();
        message.userLabel = (object.userLabel !== undefined && object.userLabel !== null)
            ? exports.Image.fromPartial(object.userLabel)
            : undefined;
        message.userConsumeInRoom = object.userConsumeInRoom ?? "0";
        return message;
    },
};
function createBasePublicAreaMessageCommon() {
    return {
        scrollGapCount: "0",
        anchorScrollGapCount: "0",
        releaseToScrollArea: false,
        anchorReleaseToScrollArea: false,
        isAnchorMarked: false,
        creatorSuccessInfo: undefined,
        portraitInfo: undefined,
        userInteractionInfo: undefined,
        adminFoldType: "0",
    };
}
exports.PublicAreaMessageCommon = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.scrollGapCount !== "0") {
            writer.uint32(8).int64(message.scrollGapCount);
        }
        if (message.anchorScrollGapCount !== "0") {
            writer.uint32(16).int64(message.anchorScrollGapCount);
        }
        if (message.releaseToScrollArea !== false) {
            writer.uint32(24).bool(message.releaseToScrollArea);
        }
        if (message.anchorReleaseToScrollArea !== false) {
            writer.uint32(32).bool(message.anchorReleaseToScrollArea);
        }
        if (message.isAnchorMarked !== false) {
            writer.uint32(40).bool(message.isAnchorMarked);
        }
        if (message.creatorSuccessInfo !== undefined) {
            exports.PublicAreaMessageCommon_CreatorSuccessInfo.encode(message.creatorSuccessInfo, writer.uint32(50).fork()).join();
        }
        if (message.portraitInfo !== undefined) {
            exports.PublicAreaMessageCommon_PortraitInfo.encode(message.portraitInfo, writer.uint32(58).fork()).join();
        }
        if (message.userInteractionInfo !== undefined) {
            exports.PublicAreaMessageCommon_UserInteractionInfo.encode(message.userInteractionInfo, writer.uint32(66).fork()).join();
        }
        if (message.adminFoldType !== "0") {
            writer.uint32(72).int64(message.adminFoldType);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePublicAreaMessageCommon();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.scrollGapCount = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.anchorScrollGapCount = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.releaseToScrollArea = reader.bool();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.anchorReleaseToScrollArea = reader.bool();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.isAnchorMarked = reader.bool();
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.creatorSuccessInfo = exports.PublicAreaMessageCommon_CreatorSuccessInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.portraitInfo = exports.PublicAreaMessageCommon_PortraitInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.userInteractionInfo = exports.PublicAreaMessageCommon_UserInteractionInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.adminFoldType = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.PublicAreaMessageCommon.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePublicAreaMessageCommon();
        message.scrollGapCount = object.scrollGapCount ?? "0";
        message.anchorScrollGapCount = object.anchorScrollGapCount ?? "0";
        message.releaseToScrollArea = object.releaseToScrollArea ?? false;
        message.anchorReleaseToScrollArea = object.anchorReleaseToScrollArea ?? false;
        message.isAnchorMarked = object.isAnchorMarked ?? false;
        message.creatorSuccessInfo = (object.creatorSuccessInfo !== undefined && object.creatorSuccessInfo !== null)
            ? exports.PublicAreaMessageCommon_CreatorSuccessInfo.fromPartial(object.creatorSuccessInfo)
            : undefined;
        message.portraitInfo = (object.portraitInfo !== undefined && object.portraitInfo !== null)
            ? exports.PublicAreaMessageCommon_PortraitInfo.fromPartial(object.portraitInfo)
            : undefined;
        message.userInteractionInfo = (object.userInteractionInfo !== undefined && object.userInteractionInfo !== null)
            ? exports.PublicAreaMessageCommon_UserInteractionInfo.fromPartial(object.userInteractionInfo)
            : undefined;
        message.adminFoldType = object.adminFoldType ?? "0";
        return message;
    },
};
function createBasePublicAreaMessageCommon_TagItem() {
    return { tagType: 0, tagText: undefined };
}
exports.PublicAreaMessageCommon_TagItem = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.tagType !== 0) {
            writer.uint32(8).int32(message.tagType);
        }
        if (message.tagText !== undefined) {
            exports.Text.encode(message.tagText, writer.uint32(18).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePublicAreaMessageCommon_TagItem();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.tagType = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.tagText = exports.Text.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.PublicAreaMessageCommon_TagItem.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePublicAreaMessageCommon_TagItem();
        message.tagType = object.tagType ?? 0;
        message.tagText = (object.tagText !== undefined && object.tagText !== null)
            ? exports.Text.fromPartial(object.tagText)
            : undefined;
        return message;
    },
};
function createBasePublicAreaMessageCommon_Topic() {
    return { topicActionType: 0, topicText: undefined, topicTips: undefined };
}
exports.PublicAreaMessageCommon_Topic = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.topicActionType !== 0) {
            writer.uint32(8).int32(message.topicActionType);
        }
        if (message.topicText !== undefined) {
            exports.Text.encode(message.topicText, writer.uint32(18).fork()).join();
        }
        if (message.topicTips !== undefined) {
            exports.Text.encode(message.topicTips, writer.uint32(26).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePublicAreaMessageCommon_Topic();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.topicActionType = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.topicText = exports.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.topicTips = exports.Text.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.PublicAreaMessageCommon_Topic.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePublicAreaMessageCommon_Topic();
        message.topicActionType = object.topicActionType ?? 0;
        message.topicText = (object.topicText !== undefined && object.topicText !== null)
            ? exports.Text.fromPartial(object.topicText)
            : undefined;
        message.topicTips = (object.topicTips !== undefined && object.topicTips !== null)
            ? exports.Text.fromPartial(object.topicTips)
            : undefined;
        return message;
    },
};
function createBasePublicAreaMessageCommon_CreatorSuccessInfo() {
    return { tags: [], topic: undefined };
}
exports.PublicAreaMessageCommon_CreatorSuccessInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.tags) {
            exports.PublicAreaMessageCommon_TagItem.encode(v, writer.uint32(10).fork()).join();
        }
        if (message.topic !== undefined) {
            exports.PublicAreaMessageCommon_Topic.encode(message.topic, writer.uint32(18).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePublicAreaMessageCommon_CreatorSuccessInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.tags.push(exports.PublicAreaMessageCommon_TagItem.decode(reader, reader.uint32()));
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.topic = exports.PublicAreaMessageCommon_Topic.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.PublicAreaMessageCommon_CreatorSuccessInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePublicAreaMessageCommon_CreatorSuccessInfo();
        message.tags = object.tags?.map((e) => exports.PublicAreaMessageCommon_TagItem.fromPartial(e)) || [];
        message.topic = (object.topic !== undefined && object.topic !== null)
            ? exports.PublicAreaMessageCommon_Topic.fromPartial(object.topic)
            : undefined;
        return message;
    },
};
function createBasePublicAreaMessageCommon_UserMetrics() {
    return { type: 0, metricsValue: "" };
}
exports.PublicAreaMessageCommon_UserMetrics = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.type !== 0) {
            writer.uint32(8).int32(message.type);
        }
        if (message.metricsValue !== "") {
            writer.uint32(18).string(message.metricsValue);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePublicAreaMessageCommon_UserMetrics();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.type = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.metricsValue = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.PublicAreaMessageCommon_UserMetrics.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePublicAreaMessageCommon_UserMetrics();
        message.type = object.type ?? 0;
        message.metricsValue = object.metricsValue ?? "";
        return message;
    },
};
function createBasePublicAreaMessageCommon_PortraitTag() {
    return { tagId: "", priority: "0", showValue: "", showArgs: "" };
}
exports.PublicAreaMessageCommon_PortraitTag = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.tagId !== "") {
            writer.uint32(10).string(message.tagId);
        }
        if (message.priority !== "0") {
            writer.uint32(16).int64(message.priority);
        }
        if (message.showValue !== "") {
            writer.uint32(26).string(message.showValue);
        }
        if (message.showArgs !== "") {
            writer.uint32(34).string(message.showArgs);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePublicAreaMessageCommon_PortraitTag();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.tagId = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.priority = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.showValue = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.showArgs = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.PublicAreaMessageCommon_PortraitTag.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePublicAreaMessageCommon_PortraitTag();
        message.tagId = object.tagId ?? "";
        message.priority = object.priority ?? "0";
        message.showValue = object.showValue ?? "";
        message.showArgs = object.showArgs ?? "";
        return message;
    },
};
function createBasePublicAreaMessageCommon_PortraitInfo() {
    return { userMetrics: [], portraitTag: [] };
}
exports.PublicAreaMessageCommon_PortraitInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.userMetrics) {
            exports.PublicAreaMessageCommon_UserMetrics.encode(v, writer.uint32(10).fork()).join();
        }
        for (const v of message.portraitTag) {
            exports.PublicAreaMessageCommon_PortraitTag.encode(v, writer.uint32(18).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePublicAreaMessageCommon_PortraitInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.userMetrics.push(exports.PublicAreaMessageCommon_UserMetrics.decode(reader, reader.uint32()));
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.portraitTag.push(exports.PublicAreaMessageCommon_PortraitTag.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.PublicAreaMessageCommon_PortraitInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePublicAreaMessageCommon_PortraitInfo();
        message.userMetrics = object.userMetrics?.map((e) => exports.PublicAreaMessageCommon_UserMetrics.fromPartial(e)) || [];
        message.portraitTag = object.portraitTag?.map((e) => exports.PublicAreaMessageCommon_PortraitTag.fromPartial(e)) || [];
        return message;
    },
};
function createBasePublicAreaMessageCommon_UserInteractionInfo() {
    return { likeCnt: "0", commentCnt: "0", shareCnt: "0" };
}
exports.PublicAreaMessageCommon_UserInteractionInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.likeCnt !== "0") {
            writer.uint32(8).int64(message.likeCnt);
        }
        if (message.commentCnt !== "0") {
            writer.uint32(16).int64(message.commentCnt);
        }
        if (message.shareCnt !== "0") {
            writer.uint32(24).int64(message.shareCnt);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePublicAreaMessageCommon_UserInteractionInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.likeCnt = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.commentCnt = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.shareCnt = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.PublicAreaMessageCommon_UserInteractionInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePublicAreaMessageCommon_UserInteractionInfo();
        message.likeCnt = object.likeCnt ?? "0";
        message.commentCnt = object.commentCnt ?? "0";
        message.shareCnt = object.shareCnt ?? "0";
        return message;
    },
};
function createBaseGiftModeMeta() {
    return { giftId: "0", giftNameKey: "", giftIconImage: undefined, giftModeDesc: undefined };
}
exports.GiftModeMeta = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.giftId !== "0") {
            writer.uint32(8).int64(message.giftId);
        }
        if (message.giftNameKey !== "") {
            writer.uint32(18).string(message.giftNameKey);
        }
        if (message.giftIconImage !== undefined) {
            exports.Image.encode(message.giftIconImage, writer.uint32(26).fork()).join();
        }
        if (message.giftModeDesc !== undefined) {
            exports.Text.encode(message.giftModeDesc, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGiftModeMeta();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.giftId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.giftNameKey = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.giftIconImage = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.giftModeDesc = exports.Text.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.GiftModeMeta.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGiftModeMeta();
        message.giftId = object.giftId ?? "0";
        message.giftNameKey = object.giftNameKey ?? "";
        message.giftIconImage = (object.giftIconImage !== undefined && object.giftIconImage !== null)
            ? exports.Image.fromPartial(object.giftIconImage)
            : undefined;
        message.giftModeDesc = (object.giftModeDesc !== undefined && object.giftModeDesc !== null)
            ? exports.Text.fromPartial(object.giftModeDesc)
            : undefined;
        return message;
    },
};
function createBaseBattleTeamUser() {
    return { userId: "0", score: "0", userIdStr: "" };
}
exports.BattleTeamUser = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.userId !== "0") {
            writer.uint32(8).int64(message.userId);
        }
        if (message.score !== "0") {
            writer.uint32(16).int64(message.score);
        }
        if (message.userIdStr !== "") {
            writer.uint32(26).string(message.userIdStr);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBattleTeamUser();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.userId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.score = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.userIdStr = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BattleTeamUser.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBattleTeamUser();
        message.userId = object.userId ?? "0";
        message.score = object.score ?? "0";
        message.userIdStr = object.userIdStr ?? "";
        return message;
    },
};
function createBaseBattleSetting() {
    return {
        battleId: "0",
        startTimeMs: "0",
        duration: 0,
        channelId: "0",
        status: 0,
        inviteType: 0,
        giftModeMeta: undefined,
        battleType: 0,
        extraDurationSecond: "0",
        endTimeMs: "0",
    };
}
exports.BattleSetting = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.battleId !== "0") {
            writer.uint32(8).int64(message.battleId);
        }
        if (message.startTimeMs !== "0") {
            writer.uint32(16).int64(message.startTimeMs);
        }
        if (message.duration !== 0) {
            writer.uint32(24).int32(message.duration);
        }
        if (message.channelId !== "0") {
            writer.uint32(32).int64(message.channelId);
        }
        if (message.status !== 0) {
            writer.uint32(40).int32(message.status);
        }
        if (message.inviteType !== 0) {
            writer.uint32(48).int32(message.inviteType);
        }
        if (message.giftModeMeta !== undefined) {
            exports.GiftModeMeta.encode(message.giftModeMeta, writer.uint32(58).fork()).join();
        }
        if (message.battleType !== 0) {
            writer.uint32(64).int32(message.battleType);
        }
        if (message.extraDurationSecond !== "0") {
            writer.uint32(72).int64(message.extraDurationSecond);
        }
        if (message.endTimeMs !== "0") {
            writer.uint32(80).int64(message.endTimeMs);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBattleSetting();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.battleId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.startTimeMs = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.duration = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.channelId = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.status = reader.int32();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.inviteType = reader.int32();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.giftModeMeta = exports.GiftModeMeta.decode(reader, reader.uint32());
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.battleType = reader.int32();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.extraDurationSecond = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.endTimeMs = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BattleSetting.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBattleSetting();
        message.battleId = object.battleId ?? "0";
        message.startTimeMs = object.startTimeMs ?? "0";
        message.duration = object.duration ?? 0;
        message.channelId = object.channelId ?? "0";
        message.status = object.status ?? 0;
        message.inviteType = object.inviteType ?? 0;
        message.giftModeMeta = (object.giftModeMeta !== undefined && object.giftModeMeta !== null)
            ? exports.GiftModeMeta.fromPartial(object.giftModeMeta)
            : undefined;
        message.battleType = object.battleType ?? 0;
        message.extraDurationSecond = object.extraDurationSecond ?? "0";
        message.endTimeMs = object.endTimeMs ?? "0";
        return message;
    },
};
function createBaseBattleTeamUserArmies() {
    return { teamId: "0", teamUsers: [], teamTotalScore: "0", userArmies: undefined, hostRank: "0" };
}
exports.BattleTeamUserArmies = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.teamId !== "0") {
            writer.uint32(8).int64(message.teamId);
        }
        for (const v of message.teamUsers) {
            exports.BattleTeamUser.encode(v, writer.uint32(18).fork()).join();
        }
        if (message.teamTotalScore !== "0") {
            writer.uint32(24).int64(message.teamTotalScore);
        }
        if (message.userArmies !== undefined) {
            exports.BattleUserArmies.encode(message.userArmies, writer.uint32(34).fork()).join();
        }
        if (message.hostRank !== "0") {
            writer.uint32(40).int64(message.hostRank);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBattleTeamUserArmies();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.teamId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.teamUsers.push(exports.BattleTeamUser.decode(reader, reader.uint32()));
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.teamTotalScore = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.userArmies = exports.BattleUserArmies.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.hostRank = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BattleTeamUserArmies.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBattleTeamUserArmies();
        message.teamId = object.teamId ?? "0";
        message.teamUsers = object.teamUsers?.map((e) => exports.BattleTeamUser.fromPartial(e)) || [];
        message.teamTotalScore = object.teamTotalScore ?? "0";
        message.userArmies = (object.userArmies !== undefined && object.userArmies !== null)
            ? exports.BattleUserArmies.fromPartial(object.userArmies)
            : undefined;
        message.hostRank = object.hostRank ?? "0";
        return message;
    },
};
function createBaseBattleUserArmies() {
    return { userArmy: [], hostScore: "0", anchorIdStr: "" };
}
exports.BattleUserArmies = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.userArmy) {
            exports.BattleUserArmy.encode(v, writer.uint32(10).fork()).join();
        }
        if (message.hostScore !== "0") {
            writer.uint32(16).int64(message.hostScore);
        }
        if (message.anchorIdStr !== "") {
            writer.uint32(26).string(message.anchorIdStr);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBattleUserArmies();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.userArmy.push(exports.BattleUserArmy.decode(reader, reader.uint32()));
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.hostScore = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.anchorIdStr = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BattleUserArmies.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBattleUserArmies();
        message.userArmy = object.userArmy?.map((e) => exports.BattleUserArmy.fromPartial(e)) || [];
        message.hostScore = object.hostScore ?? "0";
        message.anchorIdStr = object.anchorIdStr ?? "";
        return message;
    },
};
function createBaseBattleUserArmy() {
    return { userId: "0", score: "0", nickname: "", avatarThumb: undefined, diamondScore: "0", userIdStr: "" };
}
exports.BattleUserArmy = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.userId !== "0") {
            writer.uint32(8).int64(message.userId);
        }
        if (message.score !== "0") {
            writer.uint32(16).int64(message.score);
        }
        if (message.nickname !== "") {
            writer.uint32(26).string(message.nickname);
        }
        if (message.avatarThumb !== undefined) {
            exports.Image.encode(message.avatarThumb, writer.uint32(34).fork()).join();
        }
        if (message.diamondScore !== "0") {
            writer.uint32(40).int64(message.diamondScore);
        }
        if (message.userIdStr !== "") {
            writer.uint32(50).string(message.userIdStr);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseBattleUserArmy();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.userId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.score = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.nickname = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.avatarThumb = exports.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.diamondScore = reader.int64().toString();
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.userIdStr = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BattleUserArmy.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBattleUserArmy();
        message.userId = object.userId ?? "0";
        message.score = object.score ?? "0";
        message.nickname = object.nickname ?? "";
        message.avatarThumb = (object.avatarThumb !== undefined && object.avatarThumb !== null)
            ? exports.Image.fromPartial(object.avatarThumb)
            : undefined;
        message.diamondScore = object.diamondScore ?? "0";
        message.userIdStr = object.userIdStr ?? "";
        return message;
    },
};
function createBaseHighScoreControlCfg() {
    return { normalControlApplied: false, threshold: "0", originDisplayToUserList: [] };
}
exports.HighScoreControlCfg = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.normalControlApplied !== false) {
            writer.uint32(8).bool(message.normalControlApplied);
        }
        if (message.threshold !== "0") {
            writer.uint32(16).int64(message.threshold);
        }
        writer.uint32(26).fork();
        for (const v of message.originDisplayToUserList) {
            writer.int64(v);
        }
        writer.join();
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseHighScoreControlCfg();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.normalControlApplied = reader.bool();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.threshold = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag === 24) {
                        message.originDisplayToUserList.push(reader.int64().toString());
                        continue;
                    }
                    if (tag === 26) {
                        const end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) {
                            message.originDisplayToUserList.push(reader.int64().toString());
                        }
                        continue;
                    }
                    break;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.HighScoreControlCfg.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseHighScoreControlCfg();
        message.normalControlApplied = object.normalControlApplied ?? false;
        message.threshold = object.threshold ?? "0";
        message.originDisplayToUserList = object.originDisplayToUserList?.map((e) => e) || [];
        return message;
    },
};
//# sourceMappingURL=data.js.map