"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: webcast.proto
Object.defineProperty(exports, "__esModule", { value: true });
exports.WebcastGiftMessage_AssetsModel_VideoResource = exports.WebcastGiftMessage_AssetsModel_LokiExtraContent_BEFViewRenderSize = exports.WebcastGiftMessage_AssetsModel_LokiExtraContent = exports.WebcastGiftMessage_AssetsModel_ResourceModel = exports.WebcastGiftMessage_AssetsModel_AssetExtra = exports.WebcastGiftMessage_AssetsModel = exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_FaceRecognitionMeta = exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_VideoResource = exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_LokiExtraContent_BEFViewRenderSize = exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_LokiExtraContent = exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_ResourceModel = exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_AssetExtra = exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel = exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox = exports.WebcastGiftMessage_GiftsBoxInfo = exports.WebcastGiftMessage_MatchInfo = exports.WebcastGiftMessage_GiftMonitorInfo = exports.WebcastGiftMessage_GiftTrayInfo = exports.WebcastGiftMessage_TextEffect_Detail = exports.WebcastGiftMessage_TextEffect = exports.WebcastGiftMessage_GiftIMPriority = exports.WebcastGiftMessage_InteractiveGiftInfo = exports.WebcastGiftMessage = exports.WebcastMemberMessage_EffectConfigBean = exports.WebcastMemberMessage_WaveAlgorithmData = exports.WebcastMemberMessage_EffectConfig = exports.WebcastMemberMessage_AdminPermissionsEntry = exports.WebcastMemberMessage = exports.WebcastSubEmote = exports.WebcastEmoteChatMessage = exports.EmoteUploadInfo = exports.WebcastChatMessage_CommentQualityScore = exports.WebcastChatMessage_UserIdentity = exports.WebcastChatMessage = exports.ImageModel_Content = exports.ImageModel = exports.WebcastRoomUserSeqMessage_Contributor = exports.WebcastRoomUserSeqMessage = exports.WebsocketParam = exports.Message = exports.WebcastLinkmicBattleTaskMessage_BattleTaskSettle_Result = exports.WebcastBarrageMessage_IconDisplayType = exports.WebcastBarrageMessage_RenderType = exports.WebcastBarrageMessage_ShowType = exports.WebcastBarrageMessage_BarrageType = exports.WebcastMemberMessage_HitABStatus = exports.WebcastMemberMessage_DisplayStyle = exports.EmoteUploadInfo_UserEmoteUploadSource = exports.WebcastChatMessage_CommentTag = exports.protobufPackage = void 0;
exports.WebcastSubNotifyMessage = exports.TreasureBoxData = exports.WebcastEnvelopeMessage_EnvelopeInfo = exports.WebcastEnvelopeMessage = exports.EmoteImage = exports.EmoteDetails = exports.WebcastHourlyRankMessage_RankContainer_RankingData2 = exports.WebcastHourlyRankMessage_RankContainer_RankingData = exports.WebcastHourlyRankMessage_RankContainer = exports.WebcastHourlyRankMessage = exports.RankItem = exports.SystemMessage = exports.WebcastLiveIntroMessage = exports.WebcastMessageEventDetails = exports.WebcastQuestionNewMessage_Question = exports.WebcastQuestionNewMessage = exports.LikeEffect = exports.SpecifiedDisplayText = exports.WebcastLikeMessage = exports.WebcastSocialMessage = exports.WebcastLinkMicArmiesGroup = exports.WebcastLinkMicArmiesItems = exports.WebcastLinkMicArmies_BattleItemsEntry = exports.WebcastLinkMicArmies = exports.WebcastLinkMicBattle_BattleABTestSetting_BattleABTestList_BattleABTest = exports.WebcastLinkMicBattle_BattleABTestSetting_BattleABTestList = exports.WebcastLinkMicBattle_BattleABTestSetting = exports.WebcastLinkMicBattle_BattleUserInfo_BattleRivalTag = exports.WebcastLinkMicBattle_BattleUserInfo_BattleBaseUserInfo = exports.WebcastLinkMicBattle_BattleUserInfo = exports.WebcastLinkMicBattle_BattleDisplayConfig_ExemptStrategy = exports.WebcastLinkMicBattle_BattleDisplayConfig = exports.WebcastLinkMicBattle_BattleResult = exports.WebcastLinkMicBattle_BattleComboInfo = exports.WebcastLinkMicBattle_TeamUsersInfo = exports.WebcastLinkMicBattle_SupportedActionsWrapper = exports.WebcastLinkMicBattle_BattleInviteeGiftPermission = exports.WebcastLinkMicBattle_BattleTeamResult = exports.WebcastLinkMicBattle_TeamMatchCampaign_BestTeammateRelation = exports.WebcastLinkMicBattle_TeamMatchCampaign = exports.WebcastLinkMicBattle_BattleCombosEntry = exports.WebcastLinkMicBattle_AnchorInfoEntry = exports.WebcastLinkMicBattle_ArmiesEntry = exports.WebcastLinkMicBattle_BattleResultEntry = exports.WebcastLinkMicBattle = exports.WebcastGiftMessage_SponsorshipInfo = exports.WebcastGiftMessage_FlyingMicResources_TransitionConfig = exports.WebcastGiftMessage_FlyingMicResources = exports.WebcastGiftMessage_LynxGiftExtra = exports.WebcastGiftMessage_AssetsModel_FaceRecognitionMeta = void 0;
exports.WebcastRankUpdateMessage_RankListTabInfo = exports.WebcastRankUpdateMessage_UnionAnimationInfo = exports.WebcastRankUpdateMessage = exports.WebcastInRoomBannerMessage_DataEntry = exports.WebcastInRoomBannerMessage = exports.WebcastImDeleteMessage = exports.WebcastGoalUpdateMessage_GoalPinInfo = exports.WebcastGoalUpdateMessage_LiveStreamSubGoal_SubGoalPinInfo = exports.WebcastGoalUpdateMessage_LiveStreamSubGoal_LiveStreamSubGoalGift = exports.WebcastGoalUpdateMessage_LiveStreamSubGoal = exports.WebcastGoalUpdateMessage = exports.WebcastControlMessage_PerceptionDialogInfo_PerceptionFeedbackOption = exports.WebcastControlMessage_PerceptionDialogInfo = exports.WebcastControlMessage_Extra = exports.WebcastControlMessage = exports.WebcastCaptionMessage_CaptionContent = exports.WebcastCaptionMessage = exports.WebcastRoomMessage = exports.BaseProtoMessage = exports.ProtoMessageFetchResult_WsParamsEntry = exports.ProtoMessageFetchResult = exports.WebcastPushFrame_HeadersEntry = exports.WebcastPushFrame = exports.WebcastBarrageMessage_RightLabel = exports.WebcastBarrageMessage_DisplayControl_ShowResult = exports.WebcastBarrageMessage_DisplayControl_TargetGroupShowRstEntry = exports.WebcastBarrageMessage_DisplayControl = exports.WebcastBarrageMessage_BarrageTypeGiftGalleryParam = exports.WebcastBarrageMessage_AnimationData = exports.WebcastBarrageMessage_BarrageTypeSubscribeGiftParam = exports.WebcastBarrageMessage_BarrageTypeFansLevelParam = exports.WebcastBarrageMessage_BarrageTypeUserGradeParam = exports.WebcastBarrageMessage_BarrageEvent_ParamsEntry = exports.WebcastBarrageMessage_BarrageEvent = exports.WebcastBarrageMessage = exports.ImEnterRoomMessagePushFrame_ImEnterRoomMessage = exports.ImEnterRoomMessagePushFrame_Metadata = exports.ImEnterRoomMessagePushFrame = exports.HeartbeatFrame = exports.HeartbeatFrameMetadataField7 = exports.HeartbeatFrameMetadataField6 = exports.HeartbeatFrameRoomInfo = exports.WebSocketAckMessage = exports.UserImageBadgeImage = exports.UserImageBadge = exports.UserBadge = exports.UserBadgesAttributes = exports.ProfilePicture = exports.FollowInfo = exports.WebcastSubNotifyMessage_EventTracking = void 0;
exports.RoomVerifyMessage = exports.WebcastLinkLayerMessage = exports.WebcastLinkMessage = exports.WebcastRoomPinMessage = exports.WebcastOecLiveShoppingMessage_LiveShoppingDetails = exports.WebcastOecLiveShoppingMessage_LiveShoppingData = exports.WebcastOecLiveShoppingMessage = exports.WebcastMsgDetectMessage_TriggerCondition = exports.WebcastMsgDetectMessage_TimeInfo = exports.WebcastMsgDetectMessage = exports.WebcastUnauthorizedMemberMessage = exports.WebcastLinkMicMethod = exports.WebcastLinkMicFanTicketMethod = exports.WebcastLinkmicBattleTaskMessage_BattleRewardSettle = exports.WebcastLinkmicBattleTaskMessage_BattleTaskSettle = exports.WebcastLinkmicBattleTaskMessage_BattleTaskUpdate = exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_BattleTaskGiftAmountGuide = exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_RewardPeriodConfig = exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_TaskPeriodConfig = exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_PreviewPeriod = exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_TaskGiftGuideEntry = exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig = exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart = exports.WebcastLinkmicBattleTaskMessage_BattlePrompt_BattlePromptElem = exports.WebcastLinkmicBattleTaskMessage_BattlePrompt = exports.WebcastLinkmicBattleTaskMessage = exports.WebcastLinkMicBattlePunishFinish = exports.WebcastRankTextMessage = exports.WebcastPollMessage_PollBasicInfo = exports.WebcastPollMessage_TemplateContent = exports.WebcastPollMessage = exports.WebcastRankUpdateMessage_RankUpdate = exports.WebcastRankUpdateMessage_RankTabInfo = void 0;
/* eslint-disable */
const wire_1 = require("@bufbuild/protobuf/wire");
const data_1 = require("./data");
exports.protobufPackage = "";
var WebcastChatMessage_CommentTag;
(function (WebcastChatMessage_CommentTag) {
    WebcastChatMessage_CommentTag[WebcastChatMessage_CommentTag["COMMENT_TAG_NORMAL"] = 0] = "COMMENT_TAG_NORMAL";
    WebcastChatMessage_CommentTag[WebcastChatMessage_CommentTag["COMMENT_TAG_CANDIDATE"] = 1] = "COMMENT_TAG_CANDIDATE";
    WebcastChatMessage_CommentTag[WebcastChatMessage_CommentTag["COMMENT_TAG_OVERAGE"] = 2] = "COMMENT_TAG_OVERAGE";
    WebcastChatMessage_CommentTag[WebcastChatMessage_CommentTag["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(WebcastChatMessage_CommentTag = exports.WebcastChatMessage_CommentTag || (exports.WebcastChatMessage_CommentTag = {}));
var EmoteUploadInfo_UserEmoteUploadSource;
(function (EmoteUploadInfo_UserEmoteUploadSource) {
    EmoteUploadInfo_UserEmoteUploadSource[EmoteUploadInfo_UserEmoteUploadSource["USER_EMOTE_UPLOAD_SOURCE_EMOTE_UPLOAD_SOURCE_ANCHOR"] = 0] = "USER_EMOTE_UPLOAD_SOURCE_EMOTE_UPLOAD_SOURCE_ANCHOR";
    EmoteUploadInfo_UserEmoteUploadSource[EmoteUploadInfo_UserEmoteUploadSource["USER_EMOTE_UPLOAD_SOURCE_EMOTE_UPLOAD_SOURCE_SUBSCRIBER"] = 1] = "USER_EMOTE_UPLOAD_SOURCE_EMOTE_UPLOAD_SOURCE_SUBSCRIBER";
    EmoteUploadInfo_UserEmoteUploadSource[EmoteUploadInfo_UserEmoteUploadSource["USER_EMOTE_UPLOAD_SOURCE_EMOTE_UPLOAD_SOURCE_MODERATOR"] = 2] = "USER_EMOTE_UPLOAD_SOURCE_EMOTE_UPLOAD_SOURCE_MODERATOR";
    EmoteUploadInfo_UserEmoteUploadSource[EmoteUploadInfo_UserEmoteUploadSource["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(EmoteUploadInfo_UserEmoteUploadSource = exports.EmoteUploadInfo_UserEmoteUploadSource || (exports.EmoteUploadInfo_UserEmoteUploadSource = {}));
var WebcastMemberMessage_DisplayStyle;
(function (WebcastMemberMessage_DisplayStyle) {
    WebcastMemberMessage_DisplayStyle[WebcastMemberMessage_DisplayStyle["DISPLAY_STYLE_NORMAL"] = 0] = "DISPLAY_STYLE_NORMAL";
    WebcastMemberMessage_DisplayStyle[WebcastMemberMessage_DisplayStyle["DISPLAY_STYLE_STAY"] = 1] = "DISPLAY_STYLE_STAY";
    WebcastMemberMessage_DisplayStyle[WebcastMemberMessage_DisplayStyle["DISPLAY_STYLE_CHAT"] = 2] = "DISPLAY_STYLE_CHAT";
    WebcastMemberMessage_DisplayStyle[WebcastMemberMessage_DisplayStyle["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(WebcastMemberMessage_DisplayStyle = exports.WebcastMemberMessage_DisplayStyle || (exports.WebcastMemberMessage_DisplayStyle = {}));
var WebcastMemberMessage_HitABStatus;
(function (WebcastMemberMessage_HitABStatus) {
    WebcastMemberMessage_HitABStatus[WebcastMemberMessage_HitABStatus["HIT_A_B_STATUS_HIT_AB_STATUS_NO_HIT"] = 0] = "HIT_A_B_STATUS_HIT_AB_STATUS_NO_HIT";
    WebcastMemberMessage_HitABStatus[WebcastMemberMessage_HitABStatus["HIT_A_B_STATUS_HIT_AB_STATUS_ENTER_FROM_EXTERNAL_LINK_NEW_TEXT"] = 1] = "HIT_A_B_STATUS_HIT_AB_STATUS_ENTER_FROM_EXTERNAL_LINK_NEW_TEXT";
    WebcastMemberMessage_HitABStatus[WebcastMemberMessage_HitABStatus["HIT_A_B_STATUS_HIT_AB_STATUS_ENTER_FROM_RE_POST_NEW_TEXT"] = 2] = "HIT_A_B_STATUS_HIT_AB_STATUS_ENTER_FROM_RE_POST_NEW_TEXT";
    WebcastMemberMessage_HitABStatus[WebcastMemberMessage_HitABStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(WebcastMemberMessage_HitABStatus = exports.WebcastMemberMessage_HitABStatus || (exports.WebcastMemberMessage_HitABStatus = {}));
var WebcastBarrageMessage_BarrageType;
(function (WebcastBarrageMessage_BarrageType) {
    WebcastBarrageMessage_BarrageType[WebcastBarrageMessage_BarrageType["BARRAGE_TYPE_UNKNOWN"] = 0] = "BARRAGE_TYPE_UNKNOWN";
    WebcastBarrageMessage_BarrageType[WebcastBarrageMessage_BarrageType["BARRAGE_TYPE_E_COM_ORDERING"] = 1] = "BARRAGE_TYPE_E_COM_ORDERING";
    WebcastBarrageMessage_BarrageType[WebcastBarrageMessage_BarrageType["BARRAGE_TYPE_E_COM_BUYING"] = 2] = "BARRAGE_TYPE_E_COM_BUYING";
    WebcastBarrageMessage_BarrageType[WebcastBarrageMessage_BarrageType["BARRAGE_TYPE_NORMAL"] = 3] = "BARRAGE_TYPE_NORMAL";
    WebcastBarrageMessage_BarrageType[WebcastBarrageMessage_BarrageType["BARRAGE_TYPE_SUBSCRIBE"] = 4] = "BARRAGE_TYPE_SUBSCRIBE";
    WebcastBarrageMessage_BarrageType[WebcastBarrageMessage_BarrageType["BARRAGE_TYPE_EVENT_VIEW"] = 5] = "BARRAGE_TYPE_EVENT_VIEW";
    WebcastBarrageMessage_BarrageType[WebcastBarrageMessage_BarrageType["BARRAGE_TYPE_EVENT_REGISTERED"] = 6] = "BARRAGE_TYPE_EVENT_REGISTERED";
    WebcastBarrageMessage_BarrageType[WebcastBarrageMessage_BarrageType["BARRAGE_TYPE_SUBSCRIBE_GIFT"] = 7] = "BARRAGE_TYPE_SUBSCRIBE_GIFT";
    WebcastBarrageMessage_BarrageType[WebcastBarrageMessage_BarrageType["BARRAGE_TYPE_USER_UPGRADE"] = 8] = "BARRAGE_TYPE_USER_UPGRADE";
    WebcastBarrageMessage_BarrageType[WebcastBarrageMessage_BarrageType["BARRAGE_TYPE_GRADE_USER_ENTRANCE_NOTIFICATION"] = 9] = "BARRAGE_TYPE_GRADE_USER_ENTRANCE_NOTIFICATION";
    WebcastBarrageMessage_BarrageType[WebcastBarrageMessage_BarrageType["BARRAGE_TYPE_FANS_LEVEL_UPGRADE"] = 10] = "BARRAGE_TYPE_FANS_LEVEL_UPGRADE";
    WebcastBarrageMessage_BarrageType[WebcastBarrageMessage_BarrageType["BARRAGE_TYPE_FANS_LEVEL_ENTRANCE"] = 11] = "BARRAGE_TYPE_FANS_LEVEL_ENTRANCE";
    WebcastBarrageMessage_BarrageType[WebcastBarrageMessage_BarrageType["BARRAGE_TYPE_GAME_PARTNERSHIP"] = 12] = "BARRAGE_TYPE_GAME_PARTNERSHIP";
    WebcastBarrageMessage_BarrageType[WebcastBarrageMessage_BarrageType["BARRAGE_TYPE_GIFT_GALLERY"] = 13] = "BARRAGE_TYPE_GIFT_GALLERY";
    WebcastBarrageMessage_BarrageType[WebcastBarrageMessage_BarrageType["BARRAGE_TYPE_E_COM_BOUGHT"] = 14] = "BARRAGE_TYPE_E_COM_BOUGHT";
    WebcastBarrageMessage_BarrageType[WebcastBarrageMessage_BarrageType["BARRAGE_TYPE_COMMON_BARRAGE"] = 100] = "BARRAGE_TYPE_COMMON_BARRAGE";
    WebcastBarrageMessage_BarrageType[WebcastBarrageMessage_BarrageType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(WebcastBarrageMessage_BarrageType = exports.WebcastBarrageMessage_BarrageType || (exports.WebcastBarrageMessage_BarrageType = {}));
var WebcastBarrageMessage_ShowType;
(function (WebcastBarrageMessage_ShowType) {
    WebcastBarrageMessage_ShowType[WebcastBarrageMessage_ShowType["SHOW_TYPE_NORMAL"] = 0] = "SHOW_TYPE_NORMAL";
    WebcastBarrageMessage_ShowType[WebcastBarrageMessage_ShowType["SHOW_TYPE_FADE_IN_OUT"] = 1] = "SHOW_TYPE_FADE_IN_OUT";
    WebcastBarrageMessage_ShowType[WebcastBarrageMessage_ShowType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(WebcastBarrageMessage_ShowType = exports.WebcastBarrageMessage_ShowType || (exports.WebcastBarrageMessage_ShowType = {}));
var WebcastBarrageMessage_RenderType;
(function (WebcastBarrageMessage_RenderType) {
    WebcastBarrageMessage_RenderType[WebcastBarrageMessage_RenderType["RENDER_TYPE_NATIVE"] = 0] = "RENDER_TYPE_NATIVE";
    WebcastBarrageMessage_RenderType[WebcastBarrageMessage_RenderType["RENDER_TYPE_HYBRID"] = 1] = "RENDER_TYPE_HYBRID";
    WebcastBarrageMessage_RenderType[WebcastBarrageMessage_RenderType["RENDER_TYPE_ALPHA"] = 2] = "RENDER_TYPE_ALPHA";
    WebcastBarrageMessage_RenderType[WebcastBarrageMessage_RenderType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(WebcastBarrageMessage_RenderType = exports.WebcastBarrageMessage_RenderType || (exports.WebcastBarrageMessage_RenderType = {}));
var WebcastBarrageMessage_IconDisplayType;
(function (WebcastBarrageMessage_IconDisplayType) {
    WebcastBarrageMessage_IconDisplayType[WebcastBarrageMessage_IconDisplayType["ICON_DISPLAY_TYPE_IMAGE"] = 0] = "ICON_DISPLAY_TYPE_IMAGE";
    WebcastBarrageMessage_IconDisplayType[WebcastBarrageMessage_IconDisplayType["ICON_DISPLAY_TYPE_BADGE"] = 1] = "ICON_DISPLAY_TYPE_BADGE";
    WebcastBarrageMessage_IconDisplayType[WebcastBarrageMessage_IconDisplayType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(WebcastBarrageMessage_IconDisplayType = exports.WebcastBarrageMessage_IconDisplayType || (exports.WebcastBarrageMessage_IconDisplayType = {}));
var WebcastLinkmicBattleTaskMessage_BattleTaskSettle_Result;
(function (WebcastLinkmicBattleTaskMessage_BattleTaskSettle_Result) {
    WebcastLinkmicBattleTaskMessage_BattleTaskSettle_Result[WebcastLinkmicBattleTaskMessage_BattleTaskSettle_Result["RESULT_SUCCEED"] = 0] = "RESULT_SUCCEED";
    WebcastLinkmicBattleTaskMessage_BattleTaskSettle_Result[WebcastLinkmicBattleTaskMessage_BattleTaskSettle_Result["RESULT_FAILED"] = 1] = "RESULT_FAILED";
    WebcastLinkmicBattleTaskMessage_BattleTaskSettle_Result[WebcastLinkmicBattleTaskMessage_BattleTaskSettle_Result["RESULT_BOTH_SUCCEED"] = 2] = "RESULT_BOTH_SUCCEED";
    WebcastLinkmicBattleTaskMessage_BattleTaskSettle_Result[WebcastLinkmicBattleTaskMessage_BattleTaskSettle_Result["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(WebcastLinkmicBattleTaskMessage_BattleTaskSettle_Result = exports.WebcastLinkmicBattleTaskMessage_BattleTaskSettle_Result || (exports.WebcastLinkmicBattleTaskMessage_BattleTaskSettle_Result = {}));
function createBaseMessage() {
    return { type: "", binary: new Uint8Array(0) };
}
exports.Message = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.type !== "") {
            writer.uint32(10).string(message.type);
        }
        if (message.binary.length !== 0) {
            writer.uint32(18).bytes(message.binary);
        }
        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 = createBaseMessage();
        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.binary = reader.bytes();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.Message.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseMessage();
        message.type = object.type ?? "";
        message.binary = object.binary ?? new Uint8Array(0);
        return message;
    },
};
function createBaseWebsocketParam() {
    return { name: "", value: "" };
}
exports.WebsocketParam = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.name !== "") {
            writer.uint32(10).string(message.name);
        }
        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 = createBaseWebsocketParam();
        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.value = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebsocketParam.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebsocketParam();
        message.name = object.name ?? "";
        message.value = object.value ?? "";
        return message;
    },
};
function createBaseWebcastRoomUserSeqMessage() {
    return {
        common: undefined,
        viewerCount: 0,
        ranksList: [],
        popStr: "",
        seatsList: [],
        popularity: "0",
        totalUser: 0,
        anonymous: "0",
    };
}
exports.WebcastRoomUserSeqMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.viewerCount !== 0) {
            writer.uint32(24).int32(message.viewerCount);
        }
        for (const v of message.ranksList) {
            exports.WebcastRoomUserSeqMessage_Contributor.encode(v, writer.uint32(18).fork()).join();
        }
        if (message.popStr !== "") {
            writer.uint32(34).string(message.popStr);
        }
        for (const v of message.seatsList) {
            exports.WebcastRoomUserSeqMessage_Contributor.encode(v, writer.uint32(42).fork()).join();
        }
        if (message.popularity !== "0") {
            writer.uint32(48).int64(message.popularity);
        }
        if (message.totalUser !== 0) {
            writer.uint32(56).int32(message.totalUser);
        }
        if (message.anonymous !== "0") {
            writer.uint32(64).int64(message.anonymous);
        }
        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 = createBaseWebcastRoomUserSeqMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.viewerCount = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.ranksList.push(exports.WebcastRoomUserSeqMessage_Contributor.decode(reader, reader.uint32()));
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.popStr = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.seatsList.push(exports.WebcastRoomUserSeqMessage_Contributor.decode(reader, reader.uint32()));
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.popularity = reader.int64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.totalUser = reader.int32();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.anonymous = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastRoomUserSeqMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastRoomUserSeqMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.viewerCount = object.viewerCount ?? 0;
        message.ranksList = object.ranksList?.map((e) => exports.WebcastRoomUserSeqMessage_Contributor.fromPartial(e)) || [];
        message.popStr = object.popStr ?? "";
        message.seatsList = object.seatsList?.map((e) => exports.WebcastRoomUserSeqMessage_Contributor.fromPartial(e)) || [];
        message.popularity = object.popularity ?? "0";
        message.totalUser = object.totalUser ?? 0;
        message.anonymous = object.anonymous ?? "0";
        return message;
    },
};
function createBaseWebcastRoomUserSeqMessage_Contributor() {
    return { coinCount: 0, user: undefined, rank: 0, delta: "0" };
}
exports.WebcastRoomUserSeqMessage_Contributor = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.coinCount !== 0) {
            writer.uint32(8).int32(message.coinCount);
        }
        if (message.user !== undefined) {
            data_1.User.encode(message.user, writer.uint32(18).fork()).join();
        }
        if (message.rank !== 0) {
            writer.uint32(24).int32(message.rank);
        }
        if (message.delta !== "0") {
            writer.uint32(32).int64(message.delta);
        }
        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 = createBaseWebcastRoomUserSeqMessage_Contributor();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.coinCount = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.user = data_1.User.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.rank = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.delta = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastRoomUserSeqMessage_Contributor.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastRoomUserSeqMessage_Contributor();
        message.coinCount = object.coinCount ?? 0;
        message.user = (object.user !== undefined && object.user !== null) ? data_1.User.fromPartial(object.user) : undefined;
        message.rank = object.rank ?? 0;
        message.delta = object.delta ?? "0";
        return message;
    },
};
function createBaseImageModel() {
    return {
        mUrls: [],
        mUri: "",
        height: 0,
        width: 0,
        avgColor: "",
        imageType: 0,
        schema: "",
        content: undefined,
        isAnimated: false,
    };
}
exports.ImageModel = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.mUrls) {
            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.ImageModel_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 = createBaseImageModel();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.mUrls.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.ImageModel_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.ImageModel.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseImageModel();
        message.mUrls = object.mUrls?.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.ImageModel_Content.fromPartial(object.content)
            : undefined;
        message.isAnimated = object.isAnimated ?? false;
        return message;
    },
};
function createBaseImageModel_Content() {
    return { name: "", fontColor: "", level: "0" };
}
exports.ImageModel_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 = createBaseImageModel_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.ImageModel_Content.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseImageModel_Content();
        message.name = object.name ?? "";
        message.fontColor = object.fontColor ?? "";
        message.level = object.level ?? "0";
        return message;
    },
};
function createBaseWebcastChatMessage() {
    return {
        common: undefined,
        user: undefined,
        comment: "",
        visibleToSender: false,
        background: undefined,
        fullScreenTextColor: "",
        backgroundImageV2: undefined,
        publicAreaCommon: undefined,
        giftImage: undefined,
        inputType: 0,
        atUser: undefined,
        emotes: [],
        contentLanguage: "",
        msgFilter: undefined,
        quickChatScene: 0,
        communityflaggedStatus: 0,
        commentQualityScores: [],
        userIdentity: undefined,
        commentTag: [],
        publicAreaMessageCommon: undefined,
        screenTime: "0",
        signature: "",
        signatureVersion: "",
        ecStreamerKey: "",
    };
}
exports.WebcastChatMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.user !== undefined) {
            data_1.User.encode(message.user, writer.uint32(18).fork()).join();
        }
        if (message.comment !== "") {
            writer.uint32(26).string(message.comment);
        }
        if (message.visibleToSender !== false) {
            writer.uint32(32).bool(message.visibleToSender);
        }
        if (message.background !== undefined) {
            exports.ImageModel.encode(message.background, writer.uint32(42).fork()).join();
        }
        if (message.fullScreenTextColor !== "") {
            writer.uint32(50).string(message.fullScreenTextColor);
        }
        if (message.backgroundImageV2 !== undefined) {
            exports.ImageModel.encode(message.backgroundImageV2, writer.uint32(58).fork()).join();
        }
        if (message.publicAreaCommon !== undefined) {
            data_1.PublicAreaCommon.encode(message.publicAreaCommon, writer.uint32(74).fork()).join();
        }
        if (message.giftImage !== undefined) {
            exports.ImageModel.encode(message.giftImage, writer.uint32(82).fork()).join();
        }
        if (message.inputType !== 0) {
            writer.uint32(88).int32(message.inputType);
        }
        if (message.atUser !== undefined) {
            data_1.User.encode(message.atUser, writer.uint32(98).fork()).join();
        }
        for (const v of message.emotes) {
            exports.WebcastSubEmote.encode(v, writer.uint32(106).fork()).join();
        }
        if (message.contentLanguage !== "") {
            writer.uint32(114).string(message.contentLanguage);
        }
        if (message.msgFilter !== undefined) {
            data_1.MsgFilter.encode(message.msgFilter, writer.uint32(122).fork()).join();
        }
        if (message.quickChatScene !== 0) {
            writer.uint32(128).int32(message.quickChatScene);
        }
        if (message.communityflaggedStatus !== 0) {
            writer.uint32(136).int32(message.communityflaggedStatus);
        }
        for (const v of message.commentQualityScores) {
            exports.WebcastChatMessage_CommentQualityScore.encode(v, writer.uint32(154).fork()).join();
        }
        if (message.userIdentity !== undefined) {
            exports.WebcastChatMessage_UserIdentity.encode(message.userIdentity, writer.uint32(146).fork()).join();
        }
        writer.uint32(162).fork();
        for (const v of message.commentTag) {
            writer.int32(v);
        }
        writer.join();
        if (message.publicAreaMessageCommon !== undefined) {
            data_1.PublicAreaMessageCommon.encode(message.publicAreaMessageCommon, writer.uint32(170).fork()).join();
        }
        if (message.screenTime !== "0") {
            writer.uint32(176).int64(message.screenTime);
        }
        if (message.signature !== "") {
            writer.uint32(186).string(message.signature);
        }
        if (message.signatureVersion !== "") {
            writer.uint32(194).string(message.signatureVersion);
        }
        if (message.ecStreamerKey !== "") {
            writer.uint32(202).string(message.ecStreamerKey);
        }
        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 = createBaseWebcastChatMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.user = data_1.User.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.comment = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.visibleToSender = reader.bool();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.background = exports.ImageModel.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.fullScreenTextColor = reader.string();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.backgroundImageV2 = exports.ImageModel.decode(reader, reader.uint32());
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.publicAreaCommon = data_1.PublicAreaCommon.decode(reader, reader.uint32());
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.giftImage = exports.ImageModel.decode(reader, reader.uint32());
                    continue;
                }
                case 11: {
                    if (tag !== 88) {
                        break;
                    }
                    message.inputType = reader.int32();
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.atUser = data_1.User.decode(reader, reader.uint32());
                    continue;
                }
                case 13: {
                    if (tag !== 106) {
                        break;
                    }
                    message.emotes.push(exports.WebcastSubEmote.decode(reader, reader.uint32()));
                    continue;
                }
                case 14: {
                    if (tag !== 114) {
                        break;
                    }
                    message.contentLanguage = reader.string();
                    continue;
                }
                case 15: {
                    if (tag !== 122) {
                        break;
                    }
                    message.msgFilter = data_1.MsgFilter.decode(reader, reader.uint32());
                    continue;
                }
                case 16: {
                    if (tag !== 128) {
                        break;
                    }
                    message.quickChatScene = reader.int32();
                    continue;
                }
                case 17: {
                    if (tag !== 136) {
                        break;
                    }
                    message.communityflaggedStatus = reader.int32();
                    continue;
                }
                case 19: {
                    if (tag !== 154) {
                        break;
                    }
                    message.commentQualityScores.push(exports.WebcastChatMessage_CommentQualityScore.decode(reader, reader.uint32()));
                    continue;
                }
                case 18: {
                    if (tag !== 146) {
                        break;
                    }
                    message.userIdentity = exports.WebcastChatMessage_UserIdentity.decode(reader, reader.uint32());
                    continue;
                }
                case 20: {
                    if (tag === 160) {
                        message.commentTag.push(reader.int32());
                        continue;
                    }
                    if (tag === 162) {
                        const end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) {
                            message.commentTag.push(reader.int32());
                        }
                        continue;
                    }
                    break;
                }
                case 21: {
                    if (tag !== 170) {
                        break;
                    }
                    message.publicAreaMessageCommon = data_1.PublicAreaMessageCommon.decode(reader, reader.uint32());
                    continue;
                }
                case 22: {
                    if (tag !== 176) {
                        break;
                    }
                    message.screenTime = reader.int64().toString();
                    continue;
                }
                case 23: {
                    if (tag !== 186) {
                        break;
                    }
                    message.signature = reader.string();
                    continue;
                }
                case 24: {
                    if (tag !== 194) {
                        break;
                    }
                    message.signatureVersion = reader.string();
                    continue;
                }
                case 25: {
                    if (tag !== 202) {
                        break;
                    }
                    message.ecStreamerKey = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastChatMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastChatMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.user = (object.user !== undefined && object.user !== null) ? data_1.User.fromPartial(object.user) : undefined;
        message.comment = object.comment ?? "";
        message.visibleToSender = object.visibleToSender ?? false;
        message.background = (object.background !== undefined && object.background !== null)
            ? exports.ImageModel.fromPartial(object.background)
            : undefined;
        message.fullScreenTextColor = object.fullScreenTextColor ?? "";
        message.backgroundImageV2 = (object.backgroundImageV2 !== undefined && object.backgroundImageV2 !== null)
            ? exports.ImageModel.fromPartial(object.backgroundImageV2)
            : undefined;
        message.publicAreaCommon = (object.publicAreaCommon !== undefined && object.publicAreaCommon !== null)
            ? data_1.PublicAreaCommon.fromPartial(object.publicAreaCommon)
            : undefined;
        message.giftImage = (object.giftImage !== undefined && object.giftImage !== null)
            ? exports.ImageModel.fromPartial(object.giftImage)
            : undefined;
        message.inputType = object.inputType ?? 0;
        message.atUser = (object.atUser !== undefined && object.atUser !== null)
            ? data_1.User.fromPartial(object.atUser)
            : undefined;
        message.emotes = object.emotes?.map((e) => exports.WebcastSubEmote.fromPartial(e)) || [];
        message.contentLanguage = object.contentLanguage ?? "";
        message.msgFilter = (object.msgFilter !== undefined && object.msgFilter !== null)
            ? data_1.MsgFilter.fromPartial(object.msgFilter)
            : undefined;
        message.quickChatScene = object.quickChatScene ?? 0;
        message.communityflaggedStatus = object.communityflaggedStatus ?? 0;
        message.commentQualityScores =
            object.commentQualityScores?.map((e) => exports.WebcastChatMessage_CommentQualityScore.fromPartial(e)) || [];
        message.userIdentity = (object.userIdentity !== undefined && object.userIdentity !== null)
            ? exports.WebcastChatMessage_UserIdentity.fromPartial(object.userIdentity)
            : undefined;
        message.commentTag = object.commentTag?.map((e) => e) || [];
        message.publicAreaMessageCommon =
            (object.publicAreaMessageCommon !== undefined && object.publicAreaMessageCommon !== null)
                ? data_1.PublicAreaMessageCommon.fromPartial(object.publicAreaMessageCommon)
                : undefined;
        message.screenTime = object.screenTime ?? "0";
        message.signature = object.signature ?? "";
        message.signatureVersion = object.signatureVersion ?? "";
        message.ecStreamerKey = object.ecStreamerKey ?? "";
        return message;
    },
};
function createBaseWebcastChatMessage_UserIdentity() {
    return {
        isGiftGiverOfAnchor: false,
        isSubscriberOfAnchor: false,
        isMutualFollowingWithAnchor: false,
        isFollowerOfAnchor: false,
        isModeratorOfAnchor: false,
        isAnchor: false,
    };
}
exports.WebcastChatMessage_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 = createBaseWebcastChatMessage_UserIdentity();
        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.WebcastChatMessage_UserIdentity.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastChatMessage_UserIdentity();
        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 createBaseWebcastChatMessage_CommentQualityScore() {
    return { version: "", score: "0" };
}
exports.WebcastChatMessage_CommentQualityScore = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.version !== "") {
            writer.uint32(10).string(message.version);
        }
        if (message.score !== "0") {
            writer.uint32(16).int64(message.score);
        }
        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 = createBaseWebcastChatMessage_CommentQualityScore();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.version = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.score = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastChatMessage_CommentQualityScore.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastChatMessage_CommentQualityScore();
        message.version = object.version ?? "";
        message.score = object.score ?? "0";
        return message;
    },
};
function createBaseEmoteUploadInfo() {
    return { userId: "0", emoteUploadSource: undefined, userInfo: undefined, userIdStr: "" };
}
exports.EmoteUploadInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.userId !== "0") {
            writer.uint32(8).int64(message.userId);
        }
        if (message.emoteUploadSource !== undefined) {
            writer.uint32(16).int32(message.emoteUploadSource);
        }
        if (message.userInfo !== undefined) {
            data_1.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 = createBaseEmoteUploadInfo();
        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 = data_1.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.EmoteUploadInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseEmoteUploadInfo();
        message.userId = object.userId ?? "0";
        message.emoteUploadSource = object.emoteUploadSource ?? undefined;
        message.userInfo = (object.userInfo !== undefined && object.userInfo !== null)
            ? data_1.User.fromPartial(object.userInfo)
            : undefined;
        message.userIdStr = object.userIdStr ?? "";
        return message;
    },
};
function createBaseWebcastEmoteChatMessage() {
    return { common: undefined, user: undefined, emoteList: [], msgFilter: undefined, userIdentity: undefined };
}
exports.WebcastEmoteChatMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.user !== undefined) {
            data_1.User.encode(message.user, writer.uint32(18).fork()).join();
        }
        for (const v of message.emoteList) {
            data_1.Emote.encode(v, writer.uint32(26).fork()).join();
        }
        if (message.msgFilter !== undefined) {
            data_1.MsgFilter.encode(message.msgFilter, writer.uint32(34).fork()).join();
        }
        if (message.userIdentity !== undefined) {
            data_1.UserIdentity.encode(message.userIdentity, 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 = createBaseWebcastEmoteChatMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.user = data_1.User.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.emoteList.push(data_1.Emote.decode(reader, reader.uint32()));
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.msgFilter = data_1.MsgFilter.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.userIdentity = data_1.UserIdentity.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastEmoteChatMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastEmoteChatMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.user = (object.user !== undefined && object.user !== null) ? data_1.User.fromPartial(object.user) : undefined;
        message.emoteList = object.emoteList?.map((e) => data_1.Emote.fromPartial(e)) || [];
        message.msgFilter = (object.msgFilter !== undefined && object.msgFilter !== null)
            ? data_1.MsgFilter.fromPartial(object.msgFilter)
            : undefined;
        message.userIdentity = (object.userIdentity !== undefined && object.userIdentity !== null)
            ? data_1.UserIdentity.fromPartial(object.userIdentity)
            : undefined;
        return message;
    },
};
function createBaseWebcastSubEmote() {
    return { placeInComment: 0, emote: undefined };
}
exports.WebcastSubEmote = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.placeInComment !== 0) {
            writer.uint32(8).int32(message.placeInComment);
        }
        if (message.emote !== undefined) {
            exports.EmoteDetails.encode(message.emote, 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 = createBaseWebcastSubEmote();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.placeInComment = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.emote = exports.EmoteDetails.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastSubEmote.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastSubEmote();
        message.placeInComment = object.placeInComment ?? 0;
        message.emote = (object.emote !== undefined && object.emote !== null)
            ? exports.EmoteDetails.fromPartial(object.emote)
            : undefined;
        return message;
    },
};
function createBaseWebcastMemberMessage() {
    return {
        common: undefined,
        user: undefined,
        action: 0,
        memberCount: 0,
        operator: undefined,
        isSetToAdmin: false,
        isTopUser: false,
        rankScore: "0",
        topUserNo: "0",
        enterType: "0",
        actionDescription: "",
        userId: "0",
        effectConfig: undefined,
        popStr: "",
        enterEffectConfig: undefined,
        backgroundImage: undefined,
        backgroundImageV2: undefined,
        anchorDisplayText: undefined,
        clientEnterSource: "",
        clientEnterType: "",
        clientLiveReason: "",
        actionDuration: "0",
        userShareType: "",
        displayStyle: 0,
        adminPermissions: {},
        kickSource: 0,
        allowPreviewTime: "0",
        lastSubscriptionAction: "0",
        publicAreaMessageCommon: undefined,
        liveSubOnlyTier: "0",
        liveSubOnlyMonth: "0",
        ecStreamerKey: "",
        showWave: "0",
        waveAlgorithmData: undefined,
        hitAbStatus: 0,
    };
}
exports.WebcastMemberMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.user !== undefined) {
            data_1.User.encode(message.user, writer.uint32(18).fork()).join();
        }
        if (message.action !== 0) {
            writer.uint32(80).int32(message.action);
        }
        if (message.memberCount !== 0) {
            writer.uint32(24).int32(message.memberCount);
        }
        if (message.operator !== undefined) {
            data_1.User.encode(message.operator, writer.uint32(34).fork()).join();
        }
        if (message.isSetToAdmin !== false) {
            writer.uint32(40).bool(message.isSetToAdmin);
        }
        if (message.isTopUser !== false) {
            writer.uint32(48).bool(message.isTopUser);
        }
        if (message.rankScore !== "0") {
            writer.uint32(56).int64(message.rankScore);
        }
        if (message.topUserNo !== "0") {
            writer.uint32(64).int64(message.topUserNo);
        }
        if (message.enterType !== "0") {
            writer.uint32(72).int64(message.enterType);
        }
        if (message.actionDescription !== "") {
            writer.uint32(90).string(message.actionDescription);
        }
        if (message.userId !== "0") {
            writer.uint32(96).int64(message.userId);
        }
        if (message.effectConfig !== undefined) {
            exports.WebcastMemberMessage_EffectConfig.encode(message.effectConfig, writer.uint32(106).fork()).join();
        }
        if (message.popStr !== "") {
            writer.uint32(114).string(message.popStr);
        }
        if (message.enterEffectConfig !== undefined) {
            exports.WebcastMemberMessage_EffectConfig.encode(message.enterEffectConfig, writer.uint32(122).fork()).join();
        }
        if (message.backgroundImage !== undefined) {
            data_1.Image.encode(message.backgroundImage, writer.uint32(130).fork()).join();
        }
        if (message.backgroundImageV2 !== undefined) {
            data_1.Image.encode(message.backgroundImageV2, writer.uint32(138).fork()).join();
        }
        if (message.anchorDisplayText !== undefined) {
            data_1.Text.encode(message.anchorDisplayText, writer.uint32(146).fork()).join();
        }
        if (message.clientEnterSource !== "") {
            writer.uint32(154).string(message.clientEnterSource);
        }
        if (message.clientEnterType !== "") {
            writer.uint32(162).string(message.clientEnterType);
        }
        if (message.clientLiveReason !== "") {
            writer.uint32(170).string(message.clientLiveReason);
        }
        if (message.actionDuration !== "0") {
            writer.uint32(176).int64(message.actionDuration);
        }
        if (message.userShareType !== "") {
            writer.uint32(186).string(message.userShareType);
        }
        if (message.displayStyle !== 0) {
            writer.uint32(192).int32(message.displayStyle);
        }
        Object.entries(message.adminPermissions).forEach(([key, value]) => {
            exports.WebcastMemberMessage_AdminPermissionsEntry.encode({ key: key, value }, writer.uint32(202).fork()).join();
        });
        if (message.kickSource !== 0) {
            writer.uint32(208).int32(message.kickSource);
        }
        if (message.allowPreviewTime !== "0") {
            writer.uint32(216).int64(message.allowPreviewTime);
        }
        if (message.lastSubscriptionAction !== "0") {
            writer.uint32(224).int64(message.lastSubscriptionAction);
        }
        if (message.publicAreaMessageCommon !== undefined) {
            data_1.PublicAreaMessageCommon.encode(message.publicAreaMessageCommon, writer.uint32(234).fork()).join();
        }
        if (message.liveSubOnlyTier !== "0") {
            writer.uint32(240).int64(message.liveSubOnlyTier);
        }
        if (message.liveSubOnlyMonth !== "0") {
            writer.uint32(248).int64(message.liveSubOnlyMonth);
        }
        if (message.ecStreamerKey !== "") {
            writer.uint32(258).string(message.ecStreamerKey);
        }
        if (message.showWave !== "0") {
            writer.uint32(264).int64(message.showWave);
        }
        if (message.waveAlgorithmData !== undefined) {
            exports.WebcastMemberMessage_WaveAlgorithmData.encode(message.waveAlgorithmData, writer.uint32(274).fork()).join();
        }
        if (message.hitAbStatus !== 0) {
            writer.uint32(280).int32(message.hitAbStatus);
        }
        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 = createBaseWebcastMemberMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.user = data_1.User.decode(reader, reader.uint32());
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.action = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.memberCount = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.operator = data_1.User.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.isSetToAdmin = reader.bool();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.isTopUser = reader.bool();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.rankScore = reader.int64().toString();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.topUserNo = reader.int64().toString();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.enterType = reader.int64().toString();
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.actionDescription = reader.string();
                    continue;
                }
                case 12: {
                    if (tag !== 96) {
                        break;
                    }
                    message.userId = reader.int64().toString();
                    continue;
                }
                case 13: {
                    if (tag !== 106) {
                        break;
                    }
                    message.effectConfig = exports.WebcastMemberMessage_EffectConfig.decode(reader, reader.uint32());
                    continue;
                }
                case 14: {
                    if (tag !== 114) {
                        break;
                    }
                    message.popStr = reader.string();
                    continue;
                }
                case 15: {
                    if (tag !== 122) {
                        break;
                    }
                    message.enterEffectConfig = exports.WebcastMemberMessage_EffectConfig.decode(reader, reader.uint32());
                    continue;
                }
                case 16: {
                    if (tag !== 130) {
                        break;
                    }
                    message.backgroundImage = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 17: {
                    if (tag !== 138) {
                        break;
                    }
                    message.backgroundImageV2 = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 18: {
                    if (tag !== 146) {
                        break;
                    }
                    message.anchorDisplayText = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 19: {
                    if (tag !== 154) {
                        break;
                    }
                    message.clientEnterSource = reader.string();
                    continue;
                }
                case 20: {
                    if (tag !== 162) {
                        break;
                    }
                    message.clientEnterType = reader.string();
                    continue;
                }
                case 21: {
                    if (tag !== 170) {
                        break;
                    }
                    message.clientLiveReason = reader.string();
                    continue;
                }
                case 22: {
                    if (tag !== 176) {
                        break;
                    }
                    message.actionDuration = reader.int64().toString();
                    continue;
                }
                case 23: {
                    if (tag !== 186) {
                        break;
                    }
                    message.userShareType = reader.string();
                    continue;
                }
                case 24: {
                    if (tag !== 192) {
                        break;
                    }
                    message.displayStyle = reader.int32();
                    continue;
                }
                case 25: {
                    if (tag !== 202) {
                        break;
                    }
                    const entry25 = exports.WebcastMemberMessage_AdminPermissionsEntry.decode(reader, reader.uint32());
                    if (entry25.value !== undefined) {
                        message.adminPermissions[entry25.key] = entry25.value;
                    }
                    continue;
                }
                case 26: {
                    if (tag !== 208) {
                        break;
                    }
                    message.kickSource = reader.int32();
                    continue;
                }
                case 27: {
                    if (tag !== 216) {
                        break;
                    }
                    message.allowPreviewTime = reader.int64().toString();
                    continue;
                }
                case 28: {
                    if (tag !== 224) {
                        break;
                    }
                    message.lastSubscriptionAction = reader.int64().toString();
                    continue;
                }
                case 29: {
                    if (tag !== 234) {
                        break;
                    }
                    message.publicAreaMessageCommon = data_1.PublicAreaMessageCommon.decode(reader, reader.uint32());
                    continue;
                }
                case 30: {
                    if (tag !== 240) {
                        break;
                    }
                    message.liveSubOnlyTier = reader.int64().toString();
                    continue;
                }
                case 31: {
                    if (tag !== 248) {
                        break;
                    }
                    message.liveSubOnlyMonth = reader.int64().toString();
                    continue;
                }
                case 32: {
                    if (tag !== 258) {
                        break;
                    }
                    message.ecStreamerKey = reader.string();
                    continue;
                }
                case 33: {
                    if (tag !== 264) {
                        break;
                    }
                    message.showWave = reader.int64().toString();
                    continue;
                }
                case 34: {
                    if (tag !== 274) {
                        break;
                    }
                    message.waveAlgorithmData = exports.WebcastMemberMessage_WaveAlgorithmData.decode(reader, reader.uint32());
                    continue;
                }
                case 35: {
                    if (tag !== 280) {
                        break;
                    }
                    message.hitAbStatus = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastMemberMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastMemberMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.user = (object.user !== undefined && object.user !== null) ? data_1.User.fromPartial(object.user) : undefined;
        message.action = object.action ?? 0;
        message.memberCount = object.memberCount ?? 0;
        message.operator = (object.operator !== undefined && object.operator !== null)
            ? data_1.User.fromPartial(object.operator)
            : undefined;
        message.isSetToAdmin = object.isSetToAdmin ?? false;
        message.isTopUser = object.isTopUser ?? false;
        message.rankScore = object.rankScore ?? "0";
        message.topUserNo = object.topUserNo ?? "0";
        message.enterType = object.enterType ?? "0";
        message.actionDescription = object.actionDescription ?? "";
        message.userId = object.userId ?? "0";
        message.effectConfig = (object.effectConfig !== undefined && object.effectConfig !== null)
            ? exports.WebcastMemberMessage_EffectConfig.fromPartial(object.effectConfig)
            : undefined;
        message.popStr = object.popStr ?? "";
        message.enterEffectConfig = (object.enterEffectConfig !== undefined && object.enterEffectConfig !== null)
            ? exports.WebcastMemberMessage_EffectConfig.fromPartial(object.enterEffectConfig)
            : undefined;
        message.backgroundImage = (object.backgroundImage !== undefined && object.backgroundImage !== null)
            ? data_1.Image.fromPartial(object.backgroundImage)
            : undefined;
        message.backgroundImageV2 = (object.backgroundImageV2 !== undefined && object.backgroundImageV2 !== null)
            ? data_1.Image.fromPartial(object.backgroundImageV2)
            : undefined;
        message.anchorDisplayText = (object.anchorDisplayText !== undefined && object.anchorDisplayText !== null)
            ? data_1.Text.fromPartial(object.anchorDisplayText)
            : undefined;
        message.clientEnterSource = object.clientEnterSource ?? "";
        message.clientEnterType = object.clientEnterType ?? "";
        message.clientLiveReason = object.clientLiveReason ?? "";
        message.actionDuration = object.actionDuration ?? "0";
        message.userShareType = object.userShareType ?? "";
        message.displayStyle = object.displayStyle ?? 0;
        message.adminPermissions = Object.entries(object.adminPermissions ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[globalThis.Number(key)] = globalThis.Number(value);
            }
            return acc;
        }, {});
        message.kickSource = object.kickSource ?? 0;
        message.allowPreviewTime = object.allowPreviewTime ?? "0";
        message.lastSubscriptionAction = object.lastSubscriptionAction ?? "0";
        message.publicAreaMessageCommon =
            (object.publicAreaMessageCommon !== undefined && object.publicAreaMessageCommon !== null)
                ? data_1.PublicAreaMessageCommon.fromPartial(object.publicAreaMessageCommon)
                : undefined;
        message.liveSubOnlyTier = object.liveSubOnlyTier ?? "0";
        message.liveSubOnlyMonth = object.liveSubOnlyMonth ?? "0";
        message.ecStreamerKey = object.ecStreamerKey ?? "";
        message.showWave = object.showWave ?? "0";
        message.waveAlgorithmData = (object.waveAlgorithmData !== undefined && object.waveAlgorithmData !== null)
            ? exports.WebcastMemberMessage_WaveAlgorithmData.fromPartial(object.waveAlgorithmData)
            : undefined;
        message.hitAbStatus = object.hitAbStatus ?? 0;
        return message;
    },
};
function createBaseWebcastMemberMessage_AdminPermissionsEntry() {
    return { key: 0, value: 0 };
}
exports.WebcastMemberMessage_AdminPermissionsEntry = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.key !== 0) {
            writer.uint32(8).int32(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 = createBaseWebcastMemberMessage_AdminPermissionsEntry();
        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 !== 16) {
                        break;
                    }
                    message.value = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastMemberMessage_AdminPermissionsEntry.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastMemberMessage_AdminPermissionsEntry();
        message.key = object.key ?? 0;
        message.value = object.value ?? 0;
        return message;
    },
};
function createBaseWebcastMemberMessage_EffectConfig() {
    return {
        type: "0",
        icon: undefined,
        avatarPos: "0",
        text: undefined,
        textIcon: undefined,
        stayTime: 0,
        animAssetId: "0",
        badge: undefined,
        flexSettingArrayList: [],
    };
}
exports.WebcastMemberMessage_EffectConfig = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.type !== "0") {
            writer.uint32(8).int64(message.type);
        }
        if (message.icon !== undefined) {
            data_1.Image.encode(message.icon, writer.uint32(18).fork()).join();
        }
        if (message.avatarPos !== "0") {
            writer.uint32(24).int64(message.avatarPos);
        }
        if (message.text !== undefined) {
            data_1.Text.encode(message.text, writer.uint32(34).fork()).join();
        }
        if (message.textIcon !== undefined) {
            data_1.Image.encode(message.textIcon, writer.uint32(42).fork()).join();
        }
        if (message.stayTime !== 0) {
            writer.uint32(48).int32(message.stayTime);
        }
        if (message.animAssetId !== "0") {
            writer.uint32(56).int64(message.animAssetId);
        }
        if (message.badge !== undefined) {
            data_1.Image.encode(message.badge, writer.uint32(66).fork()).join();
        }
        writer.uint32(74).fork();
        for (const v of message.flexSettingArrayList) {
            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 = createBaseWebcastMemberMessage_EffectConfig();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.type = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.icon = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.avatarPos = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.text = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.textIcon = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.stayTime = reader.int32();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.animAssetId = reader.int64().toString();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.badge = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 9: {
                    if (tag === 72) {
                        message.flexSettingArrayList.push(reader.int64().toString());
                        continue;
                    }
                    if (tag === 74) {
                        const end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) {
                            message.flexSettingArrayList.push(reader.int64().toString());
                        }
                        continue;
                    }
                    break;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastMemberMessage_EffectConfig.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastMemberMessage_EffectConfig();
        message.type = object.type ?? "0";
        message.icon = (object.icon !== undefined && object.icon !== null) ? data_1.Image.fromPartial(object.icon) : undefined;
        message.avatarPos = object.avatarPos ?? "0";
        message.text = (object.text !== undefined && object.text !== null) ? data_1.Text.fromPartial(object.text) : undefined;
        message.textIcon = (object.textIcon !== undefined && object.textIcon !== null)
            ? data_1.Image.fromPartial(object.textIcon)
            : undefined;
        message.stayTime = object.stayTime ?? 0;
        message.animAssetId = object.animAssetId ?? "0";
        message.badge = (object.badge !== undefined && object.badge !== null) ? data_1.Image.fromPartial(object.badge) : undefined;
        message.flexSettingArrayList = object.flexSettingArrayList?.map((e) => e) || [];
        return message;
    },
};
function createBaseWebcastMemberMessage_WaveAlgorithmData() {
    return { algorithmVersion: "", isAlgHit: false, predictScore: "", isRewatch: false, isFollow: false };
}
exports.WebcastMemberMessage_WaveAlgorithmData = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.algorithmVersion !== "") {
            writer.uint32(10).string(message.algorithmVersion);
        }
        if (message.isAlgHit !== false) {
            writer.uint32(16).bool(message.isAlgHit);
        }
        if (message.predictScore !== "") {
            writer.uint32(26).string(message.predictScore);
        }
        if (message.isRewatch !== false) {
            writer.uint32(32).bool(message.isRewatch);
        }
        if (message.isFollow !== false) {
            writer.uint32(40).bool(message.isFollow);
        }
        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 = createBaseWebcastMemberMessage_WaveAlgorithmData();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.algorithmVersion = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.isAlgHit = reader.bool();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.predictScore = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.isRewatch = reader.bool();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.isFollow = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastMemberMessage_WaveAlgorithmData.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastMemberMessage_WaveAlgorithmData();
        message.algorithmVersion = object.algorithmVersion ?? "";
        message.isAlgHit = object.isAlgHit ?? false;
        message.predictScore = object.predictScore ?? "";
        message.isRewatch = object.isRewatch ?? false;
        message.isFollow = object.isFollow ?? false;
        return message;
    },
};
function createBaseWebcastMemberMessage_EffectConfigBean() {
    return { type: 0, icon: undefined, textKey: undefined, badge: undefined };
}
exports.WebcastMemberMessage_EffectConfigBean = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.type !== 0) {
            writer.uint32(8).int32(message.type);
        }
        if (message.icon !== undefined) {
            exports.ImageModel.encode(message.icon, writer.uint32(18).fork()).join();
        }
        if (message.textKey !== undefined) {
            data_1.Text.encode(message.textKey, writer.uint32(34).fork()).join();
        }
        if (message.badge !== undefined) {
            exports.ImageModel.encode(message.badge, writer.uint32(66).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 = createBaseWebcastMemberMessage_EffectConfigBean();
        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.icon = exports.ImageModel.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.textKey = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.badge = exports.ImageModel.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastMemberMessage_EffectConfigBean.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastMemberMessage_EffectConfigBean();
        message.type = object.type ?? 0;
        message.icon = (object.icon !== undefined && object.icon !== null)
            ? exports.ImageModel.fromPartial(object.icon)
            : undefined;
        message.textKey = (object.textKey !== undefined && object.textKey !== null)
            ? data_1.Text.fromPartial(object.textKey)
            : undefined;
        message.badge = (object.badge !== undefined && object.badge !== null)
            ? exports.ImageModel.fromPartial(object.badge)
            : undefined;
        return message;
    },
};
function createBaseWebcastGiftMessage() {
    return {
        common: undefined,
        giftId: 0,
        user: undefined,
        repeatEnd: 0,
        groupId: "0",
        giftDetails: undefined,
        monitorExtra: "",
        fanTicketCount: "0",
        groupCount: 0,
        repeatCount: 0,
        comboCount: 0,
        toUser: undefined,
        textEffect: undefined,
        incomeTaskgifts: "0",
        roomFanTicketCount: "0",
        priority: undefined,
        logId: "",
        sendType: "0",
        publicAreaCommon: undefined,
        trayDisplayText: undefined,
        bannedDisplayEffects: "0",
        mTrayInfo: undefined,
        giftExtra: undefined,
        colorId: "0",
        isFirstSent: false,
        displayTextForAnchor: undefined,
        displayTextForAudience: undefined,
        orderId: "",
        giftsInBox: undefined,
        msgFilter: undefined,
        lynxExtra: [],
        userIdentity: undefined,
        matchInfo: undefined,
        linkmicGiftExpressionStrategy: 0,
        flyingMicResources: undefined,
        disableGiftTracking: false,
        asset: undefined,
        version: 0,
        sponsorshipInfo: [],
        flyingMicResourcesV2: undefined,
        publicAreaMessageCommon: undefined,
        signature: "",
        signatureVersion: "",
        multiGenerateMessage: false,
        toMemberId: "",
        toMemberIdInt: "0",
        toMemberNickname: "",
        interactiveGiftInfo: undefined,
    };
}
exports.WebcastGiftMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.giftId !== 0) {
            writer.uint32(16).int32(message.giftId);
        }
        if (message.user !== undefined) {
            data_1.User.encode(message.user, writer.uint32(58).fork()).join();
        }
        if (message.repeatEnd !== 0) {
            writer.uint32(72).int32(message.repeatEnd);
        }
        if (message.groupId !== "0") {
            writer.uint32(88).uint64(message.groupId);
        }
        if (message.giftDetails !== undefined) {
            data_1.Gift.encode(message.giftDetails, writer.uint32(122).fork()).join();
        }
        if (message.monitorExtra !== "") {
            writer.uint32(178).string(message.monitorExtra);
        }
        if (message.fanTicketCount !== "0") {
            writer.uint32(24).int64(message.fanTicketCount);
        }
        if (message.groupCount !== 0) {
            writer.uint32(32).int32(message.groupCount);
        }
        if (message.repeatCount !== 0) {
            writer.uint32(40).int32(message.repeatCount);
        }
        if (message.comboCount !== 0) {
            writer.uint32(48).int32(message.comboCount);
        }
        if (message.toUser !== undefined) {
            data_1.User.encode(message.toUser, writer.uint32(66).fork()).join();
        }
        if (message.textEffect !== undefined) {
            exports.WebcastGiftMessage_TextEffect.encode(message.textEffect, writer.uint32(82).fork()).join();
        }
        if (message.incomeTaskgifts !== "0") {
            writer.uint32(96).int64(message.incomeTaskgifts);
        }
        if (message.roomFanTicketCount !== "0") {
            writer.uint32(104).int64(message.roomFanTicketCount);
        }
        if (message.priority !== undefined) {
            exports.WebcastGiftMessage_GiftIMPriority.encode(message.priority, writer.uint32(114).fork()).join();
        }
        if (message.logId !== "") {
            writer.uint32(130).string(message.logId);
        }
        if (message.sendType !== "0") {
            writer.uint32(136).int64(message.sendType);
        }
        if (message.publicAreaCommon !== undefined) {
            data_1.PublicAreaCommon.encode(message.publicAreaCommon, writer.uint32(146).fork()).join();
        }
        if (message.trayDisplayText !== undefined) {
            data_1.Text.encode(message.trayDisplayText, writer.uint32(154).fork()).join();
        }
        if (message.bannedDisplayEffects !== "0") {
            writer.uint32(160).int64(message.bannedDisplayEffects);
        }
        if (message.mTrayInfo !== undefined) {
            exports.WebcastGiftMessage_GiftTrayInfo.encode(message.mTrayInfo, writer.uint32(170).fork()).join();
        }
        if (message.giftExtra !== undefined) {
            exports.WebcastGiftMessage_GiftMonitorInfo.encode(message.giftExtra, writer.uint32(186).fork()).join();
        }
        if (message.colorId !== "0") {
            writer.uint32(192).int64(message.colorId);
        }
        if (message.isFirstSent !== false) {
            writer.uint32(200).bool(message.isFirstSent);
        }
        if (message.displayTextForAnchor !== undefined) {
            data_1.Text.encode(message.displayTextForAnchor, writer.uint32(210).fork()).join();
        }
        if (message.displayTextForAudience !== undefined) {
            data_1.Text.encode(message.displayTextForAudience, writer.uint32(218).fork()).join();
        }
        if (message.orderId !== "") {
            writer.uint32(226).string(message.orderId);
        }
        if (message.giftsInBox !== undefined) {
            exports.WebcastGiftMessage_GiftsBoxInfo.encode(message.giftsInBox, writer.uint32(234).fork()).join();
        }
        if (message.msgFilter !== undefined) {
            data_1.MsgFilter.encode(message.msgFilter, writer.uint32(242).fork()).join();
        }
        for (const v of message.lynxExtra) {
            exports.WebcastGiftMessage_LynxGiftExtra.encode(v, writer.uint32(250).fork()).join();
        }
        if (message.userIdentity !== undefined) {
            data_1.UserIdentity.encode(message.userIdentity, writer.uint32(258).fork()).join();
        }
        if (message.matchInfo !== undefined) {
            exports.WebcastGiftMessage_MatchInfo.encode(message.matchInfo, writer.uint32(266).fork()).join();
        }
        if (message.linkmicGiftExpressionStrategy !== 0) {
            writer.uint32(272).int32(message.linkmicGiftExpressionStrategy);
        }
        if (message.flyingMicResources !== undefined) {
            exports.WebcastGiftMessage_FlyingMicResources.encode(message.flyingMicResources, writer.uint32(282).fork()).join();
        }
        if (message.disableGiftTracking !== false) {
            writer.uint32(288).bool(message.disableGiftTracking);
        }
        if (message.asset !== undefined) {
            exports.WebcastGiftMessage_AssetsModel.encode(message.asset, writer.uint32(298).fork()).join();
        }
        if (message.version !== 0) {
            writer.uint32(304).int32(message.version);
        }
        for (const v of message.sponsorshipInfo) {
            exports.WebcastGiftMessage_SponsorshipInfo.encode(v, writer.uint32(314).fork()).join();
        }
        if (message.flyingMicResourcesV2 !== undefined) {
            exports.WebcastGiftMessage_FlyingMicResources.encode(message.flyingMicResourcesV2, writer.uint32(322).fork()).join();
        }
        if (message.publicAreaMessageCommon !== undefined) {
            data_1.PublicAreaMessageCommon.encode(message.publicAreaMessageCommon, writer.uint32(330).fork()).join();
        }
        if (message.signature !== "") {
            writer.uint32(338).string(message.signature);
        }
        if (message.signatureVersion !== "") {
            writer.uint32(346).string(message.signatureVersion);
        }
        if (message.multiGenerateMessage !== false) {
            writer.uint32(352).bool(message.multiGenerateMessage);
        }
        if (message.toMemberId !== "") {
            writer.uint32(362).string(message.toMemberId);
        }
        if (message.toMemberIdInt !== "0") {
            writer.uint32(368).int64(message.toMemberIdInt);
        }
        if (message.toMemberNickname !== "") {
            writer.uint32(378).string(message.toMemberNickname);
        }
        if (message.interactiveGiftInfo !== undefined) {
            exports.WebcastGiftMessage_InteractiveGiftInfo.encode(message.interactiveGiftInfo, writer.uint32(386).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 = createBaseWebcastGiftMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.giftId = reader.int32();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.user = data_1.User.decode(reader, reader.uint32());
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.repeatEnd = reader.int32();
                    continue;
                }
                case 11: {
                    if (tag !== 88) {
                        break;
                    }
                    message.groupId = reader.uint64().toString();
                    continue;
                }
                case 15: {
                    if (tag !== 122) {
                        break;
                    }
                    message.giftDetails = data_1.Gift.decode(reader, reader.uint32());
                    continue;
                }
                case 22: {
                    if (tag !== 178) {
                        break;
                    }
                    message.monitorExtra = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.fanTicketCount = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.groupCount = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.repeatCount = reader.int32();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.comboCount = reader.int32();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.toUser = data_1.User.decode(reader, reader.uint32());
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.textEffect = exports.WebcastGiftMessage_TextEffect.decode(reader, reader.uint32());
                    continue;
                }
                case 12: {
                    if (tag !== 96) {
                        break;
                    }
                    message.incomeTaskgifts = reader.int64().toString();
                    continue;
                }
                case 13: {
                    if (tag !== 104) {
                        break;
                    }
                    message.roomFanTicketCount = reader.int64().toString();
                    continue;
                }
                case 14: {
                    if (tag !== 114) {
                        break;
                    }
                    message.priority = exports.WebcastGiftMessage_GiftIMPriority.decode(reader, reader.uint32());
                    continue;
                }
                case 16: {
                    if (tag !== 130) {
                        break;
                    }
                    message.logId = reader.string();
                    continue;
                }
                case 17: {
                    if (tag !== 136) {
                        break;
                    }
                    message.sendType = reader.int64().toString();
                    continue;
                }
                case 18: {
                    if (tag !== 146) {
                        break;
                    }
                    message.publicAreaCommon = data_1.PublicAreaCommon.decode(reader, reader.uint32());
                    continue;
                }
                case 19: {
                    if (tag !== 154) {
                        break;
                    }
                    message.trayDisplayText = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 20: {
                    if (tag !== 160) {
                        break;
                    }
                    message.bannedDisplayEffects = reader.int64().toString();
                    continue;
                }
                case 21: {
                    if (tag !== 170) {
                        break;
                    }
                    message.mTrayInfo = exports.WebcastGiftMessage_GiftTrayInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 23: {
                    if (tag !== 186) {
                        break;
                    }
                    message.giftExtra = exports.WebcastGiftMessage_GiftMonitorInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 24: {
                    if (tag !== 192) {
                        break;
                    }
                    message.colorId = reader.int64().toString();
                    continue;
                }
                case 25: {
                    if (tag !== 200) {
                        break;
                    }
                    message.isFirstSent = reader.bool();
                    continue;
                }
                case 26: {
                    if (tag !== 210) {
                        break;
                    }
                    message.displayTextForAnchor = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 27: {
                    if (tag !== 218) {
                        break;
                    }
                    message.displayTextForAudience = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 28: {
                    if (tag !== 226) {
                        break;
                    }
                    message.orderId = reader.string();
                    continue;
                }
                case 29: {
                    if (tag !== 234) {
                        break;
                    }
                    message.giftsInBox = exports.WebcastGiftMessage_GiftsBoxInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 30: {
                    if (tag !== 242) {
                        break;
                    }
                    message.msgFilter = data_1.MsgFilter.decode(reader, reader.uint32());
                    continue;
                }
                case 31: {
                    if (tag !== 250) {
                        break;
                    }
                    message.lynxExtra.push(exports.WebcastGiftMessage_LynxGiftExtra.decode(reader, reader.uint32()));
                    continue;
                }
                case 32: {
                    if (tag !== 258) {
                        break;
                    }
                    message.userIdentity = data_1.UserIdentity.decode(reader, reader.uint32());
                    continue;
                }
                case 33: {
                    if (tag !== 266) {
                        break;
                    }
                    message.matchInfo = exports.WebcastGiftMessage_MatchInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 34: {
                    if (tag !== 272) {
                        break;
                    }
                    message.linkmicGiftExpressionStrategy = reader.int32();
                    continue;
                }
                case 35: {
                    if (tag !== 282) {
                        break;
                    }
                    message.flyingMicResources = exports.WebcastGiftMessage_FlyingMicResources.decode(reader, reader.uint32());
                    continue;
                }
                case 36: {
                    if (tag !== 288) {
                        break;
                    }
                    message.disableGiftTracking = reader.bool();
                    continue;
                }
                case 37: {
                    if (tag !== 298) {
                        break;
                    }
                    message.asset = exports.WebcastGiftMessage_AssetsModel.decode(reader, reader.uint32());
                    continue;
                }
                case 38: {
                    if (tag !== 304) {
                        break;
                    }
                    message.version = reader.int32();
                    continue;
                }
                case 39: {
                    if (tag !== 314) {
                        break;
                    }
                    message.sponsorshipInfo.push(exports.WebcastGiftMessage_SponsorshipInfo.decode(reader, reader.uint32()));
                    continue;
                }
                case 40: {
                    if (tag !== 322) {
                        break;
                    }
                    message.flyingMicResourcesV2 = exports.WebcastGiftMessage_FlyingMicResources.decode(reader, reader.uint32());
                    continue;
                }
                case 41: {
                    if (tag !== 330) {
                        break;
                    }
                    message.publicAreaMessageCommon = data_1.PublicAreaMessageCommon.decode(reader, reader.uint32());
                    continue;
                }
                case 42: {
                    if (tag !== 338) {
                        break;
                    }
                    message.signature = reader.string();
                    continue;
                }
                case 43: {
                    if (tag !== 346) {
                        break;
                    }
                    message.signatureVersion = reader.string();
                    continue;
                }
                case 44: {
                    if (tag !== 352) {
                        break;
                    }
                    message.multiGenerateMessage = reader.bool();
                    continue;
                }
                case 45: {
                    if (tag !== 362) {
                        break;
                    }
                    message.toMemberId = reader.string();
                    continue;
                }
                case 46: {
                    if (tag !== 368) {
                        break;
                    }
                    message.toMemberIdInt = reader.int64().toString();
                    continue;
                }
                case 47: {
                    if (tag !== 378) {
                        break;
                    }
                    message.toMemberNickname = reader.string();
                    continue;
                }
                case 48: {
                    if (tag !== 386) {
                        break;
                    }
                    message.interactiveGiftInfo = exports.WebcastGiftMessage_InteractiveGiftInfo.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.giftId = object.giftId ?? 0;
        message.user = (object.user !== undefined && object.user !== null) ? data_1.User.fromPartial(object.user) : undefined;
        message.repeatEnd = object.repeatEnd ?? 0;
        message.groupId = object.groupId ?? "0";
        message.giftDetails = (object.giftDetails !== undefined && object.giftDetails !== null)
            ? data_1.Gift.fromPartial(object.giftDetails)
            : undefined;
        message.monitorExtra = object.monitorExtra ?? "";
        message.fanTicketCount = object.fanTicketCount ?? "0";
        message.groupCount = object.groupCount ?? 0;
        message.repeatCount = object.repeatCount ?? 0;
        message.comboCount = object.comboCount ?? 0;
        message.toUser = (object.toUser !== undefined && object.toUser !== null)
            ? data_1.User.fromPartial(object.toUser)
            : undefined;
        message.textEffect = (object.textEffect !== undefined && object.textEffect !== null)
            ? exports.WebcastGiftMessage_TextEffect.fromPartial(object.textEffect)
            : undefined;
        message.incomeTaskgifts = object.incomeTaskgifts ?? "0";
        message.roomFanTicketCount = object.roomFanTicketCount ?? "0";
        message.priority = (object.priority !== undefined && object.priority !== null)
            ? exports.WebcastGiftMessage_GiftIMPriority.fromPartial(object.priority)
            : undefined;
        message.logId = object.logId ?? "";
        message.sendType = object.sendType ?? "0";
        message.publicAreaCommon = (object.publicAreaCommon !== undefined && object.publicAreaCommon !== null)
            ? data_1.PublicAreaCommon.fromPartial(object.publicAreaCommon)
            : undefined;
        message.trayDisplayText = (object.trayDisplayText !== undefined && object.trayDisplayText !== null)
            ? data_1.Text.fromPartial(object.trayDisplayText)
            : undefined;
        message.bannedDisplayEffects = object.bannedDisplayEffects ?? "0";
        message.mTrayInfo = (object.mTrayInfo !== undefined && object.mTrayInfo !== null)
            ? exports.WebcastGiftMessage_GiftTrayInfo.fromPartial(object.mTrayInfo)
            : undefined;
        message.giftExtra = (object.giftExtra !== undefined && object.giftExtra !== null)
            ? exports.WebcastGiftMessage_GiftMonitorInfo.fromPartial(object.giftExtra)
            : undefined;
        message.colorId = object.colorId ?? "0";
        message.isFirstSent = object.isFirstSent ?? false;
        message.displayTextForAnchor = (object.displayTextForAnchor !== undefined && object.displayTextForAnchor !== null)
            ? data_1.Text.fromPartial(object.displayTextForAnchor)
            : undefined;
        message.displayTextForAudience =
            (object.displayTextForAudience !== undefined && object.displayTextForAudience !== null)
                ? data_1.Text.fromPartial(object.displayTextForAudience)
                : undefined;
        message.orderId = object.orderId ?? "";
        message.giftsInBox = (object.giftsInBox !== undefined && object.giftsInBox !== null)
            ? exports.WebcastGiftMessage_GiftsBoxInfo.fromPartial(object.giftsInBox)
            : undefined;
        message.msgFilter = (object.msgFilter !== undefined && object.msgFilter !== null)
            ? data_1.MsgFilter.fromPartial(object.msgFilter)
            : undefined;
        message.lynxExtra = object.lynxExtra?.map((e) => exports.WebcastGiftMessage_LynxGiftExtra.fromPartial(e)) || [];
        message.userIdentity = (object.userIdentity !== undefined && object.userIdentity !== null)
            ? data_1.UserIdentity.fromPartial(object.userIdentity)
            : undefined;
        message.matchInfo = (object.matchInfo !== undefined && object.matchInfo !== null)
            ? exports.WebcastGiftMessage_MatchInfo.fromPartial(object.matchInfo)
            : undefined;
        message.linkmicGiftExpressionStrategy = object.linkmicGiftExpressionStrategy ?? 0;
        message.flyingMicResources = (object.flyingMicResources !== undefined && object.flyingMicResources !== null)
            ? exports.WebcastGiftMessage_FlyingMicResources.fromPartial(object.flyingMicResources)
            : undefined;
        message.disableGiftTracking = object.disableGiftTracking ?? false;
        message.asset = (object.asset !== undefined && object.asset !== null)
            ? exports.WebcastGiftMessage_AssetsModel.fromPartial(object.asset)
            : undefined;
        message.version = object.version ?? 0;
        message.sponsorshipInfo = object.sponsorshipInfo?.map((e) => exports.WebcastGiftMessage_SponsorshipInfo.fromPartial(e)) ||
            [];
        message.flyingMicResourcesV2 = (object.flyingMicResourcesV2 !== undefined && object.flyingMicResourcesV2 !== null)
            ? exports.WebcastGiftMessage_FlyingMicResources.fromPartial(object.flyingMicResourcesV2)
            : undefined;
        message.publicAreaMessageCommon =
            (object.publicAreaMessageCommon !== undefined && object.publicAreaMessageCommon !== null)
                ? data_1.PublicAreaMessageCommon.fromPartial(object.publicAreaMessageCommon)
                : undefined;
        message.signature = object.signature ?? "";
        message.signatureVersion = object.signatureVersion ?? "";
        message.multiGenerateMessage = object.multiGenerateMessage ?? false;
        message.toMemberId = object.toMemberId ?? "";
        message.toMemberIdInt = object.toMemberIdInt ?? "0";
        message.toMemberNickname = object.toMemberNickname ?? "";
        message.interactiveGiftInfo = (object.interactiveGiftInfo !== undefined && object.interactiveGiftInfo !== null)
            ? exports.WebcastGiftMessage_InteractiveGiftInfo.fromPartial(object.interactiveGiftInfo)
            : undefined;
        return message;
    },
};
function createBaseWebcastGiftMessage_InteractiveGiftInfo() {
    return { crossScreenDelay: "0", crossScreenRole: "0", ignoreConfig: 0, uniqId: "0", toUserTeamId: "0" };
}
exports.WebcastGiftMessage_InteractiveGiftInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.crossScreenDelay !== "0") {
            writer.uint32(8).int64(message.crossScreenDelay);
        }
        if (message.crossScreenRole !== "0") {
            writer.uint32(16).int64(message.crossScreenRole);
        }
        if (message.ignoreConfig !== 0) {
            writer.uint32(24).int32(message.ignoreConfig);
        }
        if (message.uniqId !== "0") {
            writer.uint32(32).int64(message.uniqId);
        }
        if (message.toUserTeamId !== "0") {
            writer.uint32(40).int64(message.toUserTeamId);
        }
        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 = createBaseWebcastGiftMessage_InteractiveGiftInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.crossScreenDelay = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.crossScreenRole = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.ignoreConfig = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.uniqId = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.toUserTeamId = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_InteractiveGiftInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_InteractiveGiftInfo();
        message.crossScreenDelay = object.crossScreenDelay ?? "0";
        message.crossScreenRole = object.crossScreenRole ?? "0";
        message.ignoreConfig = object.ignoreConfig ?? 0;
        message.uniqId = object.uniqId ?? "0";
        message.toUserTeamId = object.toUserTeamId ?? "0";
        return message;
    },
};
function createBaseWebcastGiftMessage_GiftIMPriority() {
    return { queueSizesList: [], selfQueuePriority: "0", priority: "0" };
}
exports.WebcastGiftMessage_GiftIMPriority = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        writer.uint32(10).fork();
        for (const v of message.queueSizesList) {
            writer.int64(v);
        }
        writer.join();
        if (message.selfQueuePriority !== "0") {
            writer.uint32(16).int64(message.selfQueuePriority);
        }
        if (message.priority !== "0") {
            writer.uint32(24).int64(message.priority);
        }
        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 = createBaseWebcastGiftMessage_GiftIMPriority();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag === 8) {
                        message.queueSizesList.push(reader.int64().toString());
                        continue;
                    }
                    if (tag === 10) {
                        const end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) {
                            message.queueSizesList.push(reader.int64().toString());
                        }
                        continue;
                    }
                    break;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.selfQueuePriority = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.priority = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_GiftIMPriority.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_GiftIMPriority();
        message.queueSizesList = object.queueSizesList?.map((e) => e) || [];
        message.selfQueuePriority = object.selfQueuePriority ?? "0";
        message.priority = object.priority ?? "0";
        return message;
    },
};
function createBaseWebcastGiftMessage_TextEffect() {
    return { portraitDetail: undefined, landscapeDetail: undefined };
}
exports.WebcastGiftMessage_TextEffect = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.portraitDetail !== undefined) {
            exports.WebcastGiftMessage_TextEffect_Detail.encode(message.portraitDetail, writer.uint32(10).fork()).join();
        }
        if (message.landscapeDetail !== undefined) {
            exports.WebcastGiftMessage_TextEffect_Detail.encode(message.landscapeDetail, 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 = createBaseWebcastGiftMessage_TextEffect();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.portraitDetail = exports.WebcastGiftMessage_TextEffect_Detail.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.landscapeDetail = exports.WebcastGiftMessage_TextEffect_Detail.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_TextEffect.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_TextEffect();
        message.portraitDetail = (object.portraitDetail !== undefined && object.portraitDetail !== null)
            ? exports.WebcastGiftMessage_TextEffect_Detail.fromPartial(object.portraitDetail)
            : undefined;
        message.landscapeDetail = (object.landscapeDetail !== undefined && object.landscapeDetail !== null)
            ? exports.WebcastGiftMessage_TextEffect_Detail.fromPartial(object.landscapeDetail)
            : undefined;
        return message;
    },
};
function createBaseWebcastGiftMessage_TextEffect_Detail() {
    return {
        text: undefined,
        textFontSize: 0,
        background: undefined,
        start: "0",
        duration: "0",
        x: 0,
        y: 0,
        width: 0,
        height: 0,
        shadowDx: 0,
        shadowDy: 0,
        shadowRadius: 0,
        shadowColor: "",
        strokeColor: "",
        strokeWidth: 0,
    };
}
exports.WebcastGiftMessage_TextEffect_Detail = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.text !== undefined) {
            data_1.Text.encode(message.text, writer.uint32(10).fork()).join();
        }
        if (message.textFontSize !== 0) {
            writer.uint32(16).int32(message.textFontSize);
        }
        if (message.background !== undefined) {
            data_1.Image.encode(message.background, writer.uint32(26).fork()).join();
        }
        if (message.start !== "0") {
            writer.uint32(32).int64(message.start);
        }
        if (message.duration !== "0") {
            writer.uint32(40).int64(message.duration);
        }
        if (message.x !== 0) {
            writer.uint32(48).int32(message.x);
        }
        if (message.y !== 0) {
            writer.uint32(56).int32(message.y);
        }
        if (message.width !== 0) {
            writer.uint32(64).int32(message.width);
        }
        if (message.height !== 0) {
            writer.uint32(72).int32(message.height);
        }
        if (message.shadowDx !== 0) {
            writer.uint32(80).int32(message.shadowDx);
        }
        if (message.shadowDy !== 0) {
            writer.uint32(88).int32(message.shadowDy);
        }
        if (message.shadowRadius !== 0) {
            writer.uint32(96).int32(message.shadowRadius);
        }
        if (message.shadowColor !== "") {
            writer.uint32(106).string(message.shadowColor);
        }
        if (message.strokeColor !== "") {
            writer.uint32(114).string(message.strokeColor);
        }
        if (message.strokeWidth !== 0) {
            writer.uint32(120).int32(message.strokeWidth);
        }
        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 = createBaseWebcastGiftMessage_TextEffect_Detail();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.text = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.textFontSize = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.background = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.start = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.duration = reader.int64().toString();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.x = reader.int32();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.y = reader.int32();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.width = reader.int32();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.height = reader.int32();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.shadowDx = reader.int32();
                    continue;
                }
                case 11: {
                    if (tag !== 88) {
                        break;
                    }
                    message.shadowDy = reader.int32();
                    continue;
                }
                case 12: {
                    if (tag !== 96) {
                        break;
                    }
                    message.shadowRadius = reader.int32();
                    continue;
                }
                case 13: {
                    if (tag !== 106) {
                        break;
                    }
                    message.shadowColor = reader.string();
                    continue;
                }
                case 14: {
                    if (tag !== 114) {
                        break;
                    }
                    message.strokeColor = reader.string();
                    continue;
                }
                case 15: {
                    if (tag !== 120) {
                        break;
                    }
                    message.strokeWidth = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_TextEffect_Detail.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_TextEffect_Detail();
        message.text = (object.text !== undefined && object.text !== null) ? data_1.Text.fromPartial(object.text) : undefined;
        message.textFontSize = object.textFontSize ?? 0;
        message.background = (object.background !== undefined && object.background !== null)
            ? data_1.Image.fromPartial(object.background)
            : undefined;
        message.start = object.start ?? "0";
        message.duration = object.duration ?? "0";
        message.x = object.x ?? 0;
        message.y = object.y ?? 0;
        message.width = object.width ?? 0;
        message.height = object.height ?? 0;
        message.shadowDx = object.shadowDx ?? 0;
        message.shadowDy = object.shadowDy ?? 0;
        message.shadowRadius = object.shadowRadius ?? 0;
        message.shadowColor = object.shadowColor ?? "";
        message.strokeColor = object.strokeColor ?? "";
        message.strokeWidth = object.strokeWidth ?? 0;
        return message;
    },
};
function createBaseWebcastGiftMessage_GiftTrayInfo() {
    return {
        mDynamicImg: undefined,
        canMirror: false,
        trayNormalBgImg: undefined,
        trayNormalBgColor: [],
        traySmallBgImg: undefined,
        traySmallBgColor: [],
        rightTagText: undefined,
        rightTagBgImg: undefined,
        rightTagBgColor: [],
        trayNameTextColor: "",
        trayDescTextColor: "",
        rightTagJumpSchema: "",
    };
}
exports.WebcastGiftMessage_GiftTrayInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.mDynamicImg !== undefined) {
            data_1.Image.encode(message.mDynamicImg, writer.uint32(10).fork()).join();
        }
        if (message.canMirror !== false) {
            writer.uint32(16).bool(message.canMirror);
        }
        if (message.trayNormalBgImg !== undefined) {
            data_1.Image.encode(message.trayNormalBgImg, writer.uint32(26).fork()).join();
        }
        for (const v of message.trayNormalBgColor) {
            writer.uint32(34).string(v);
        }
        if (message.traySmallBgImg !== undefined) {
            data_1.Image.encode(message.traySmallBgImg, writer.uint32(42).fork()).join();
        }
        for (const v of message.traySmallBgColor) {
            writer.uint32(50).string(v);
        }
        if (message.rightTagText !== undefined) {
            data_1.Text.encode(message.rightTagText, writer.uint32(58).fork()).join();
        }
        if (message.rightTagBgImg !== undefined) {
            data_1.Image.encode(message.rightTagBgImg, writer.uint32(66).fork()).join();
        }
        for (const v of message.rightTagBgColor) {
            writer.uint32(74).string(v);
        }
        if (message.trayNameTextColor !== "") {
            writer.uint32(82).string(message.trayNameTextColor);
        }
        if (message.trayDescTextColor !== "") {
            writer.uint32(90).string(message.trayDescTextColor);
        }
        if (message.rightTagJumpSchema !== "") {
            writer.uint32(98).string(message.rightTagJumpSchema);
        }
        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 = createBaseWebcastGiftMessage_GiftTrayInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.mDynamicImg = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.canMirror = reader.bool();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.trayNormalBgImg = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.trayNormalBgColor.push(reader.string());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.traySmallBgImg = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.traySmallBgColor.push(reader.string());
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.rightTagText = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.rightTagBgImg = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.rightTagBgColor.push(reader.string());
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.trayNameTextColor = reader.string();
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.trayDescTextColor = reader.string();
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.rightTagJumpSchema = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_GiftTrayInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_GiftTrayInfo();
        message.mDynamicImg = (object.mDynamicImg !== undefined && object.mDynamicImg !== null)
            ? data_1.Image.fromPartial(object.mDynamicImg)
            : undefined;
        message.canMirror = object.canMirror ?? false;
        message.trayNormalBgImg = (object.trayNormalBgImg !== undefined && object.trayNormalBgImg !== null)
            ? data_1.Image.fromPartial(object.trayNormalBgImg)
            : undefined;
        message.trayNormalBgColor = object.trayNormalBgColor?.map((e) => e) || [];
        message.traySmallBgImg = (object.traySmallBgImg !== undefined && object.traySmallBgImg !== null)
            ? data_1.Image.fromPartial(object.traySmallBgImg)
            : undefined;
        message.traySmallBgColor = object.traySmallBgColor?.map((e) => e) || [];
        message.rightTagText = (object.rightTagText !== undefined && object.rightTagText !== null)
            ? data_1.Text.fromPartial(object.rightTagText)
            : undefined;
        message.rightTagBgImg = (object.rightTagBgImg !== undefined && object.rightTagBgImg !== null)
            ? data_1.Image.fromPartial(object.rightTagBgImg)
            : undefined;
        message.rightTagBgColor = object.rightTagBgColor?.map((e) => e) || [];
        message.trayNameTextColor = object.trayNameTextColor ?? "";
        message.trayDescTextColor = object.trayDescTextColor ?? "";
        message.rightTagJumpSchema = object.rightTagJumpSchema ?? "";
        return message;
    },
};
function createBaseWebcastGiftMessage_GiftMonitorInfo() {
    return {
        anchorId: "0",
        profitApiMessageDur: "0",
        sendGiftProfitApiStartMs: "0",
        sendGiftProfitCoreStartMs: "0",
        sendGiftReqStartMs: "0",
        sendGiftSendMessageSuccessMs: "0",
        sendProfitApiDur: "0",
        toUserId: "0",
        sendGiftStartClientLocalMs: "0",
        fromPlatform: "",
        fromVersion: "",
    };
}
exports.WebcastGiftMessage_GiftMonitorInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.anchorId !== "0") {
            writer.uint32(8).int64(message.anchorId);
        }
        if (message.profitApiMessageDur !== "0") {
            writer.uint32(16).int64(message.profitApiMessageDur);
        }
        if (message.sendGiftProfitApiStartMs !== "0") {
            writer.uint32(24).int64(message.sendGiftProfitApiStartMs);
        }
        if (message.sendGiftProfitCoreStartMs !== "0") {
            writer.uint32(32).int64(message.sendGiftProfitCoreStartMs);
        }
        if (message.sendGiftReqStartMs !== "0") {
            writer.uint32(40).int64(message.sendGiftReqStartMs);
        }
        if (message.sendGiftSendMessageSuccessMs !== "0") {
            writer.uint32(48).int64(message.sendGiftSendMessageSuccessMs);
        }
        if (message.sendProfitApiDur !== "0") {
            writer.uint32(56).int64(message.sendProfitApiDur);
        }
        if (message.toUserId !== "0") {
            writer.uint32(64).int64(message.toUserId);
        }
        if (message.sendGiftStartClientLocalMs !== "0") {
            writer.uint32(72).int64(message.sendGiftStartClientLocalMs);
        }
        if (message.fromPlatform !== "") {
            writer.uint32(82).string(message.fromPlatform);
        }
        if (message.fromVersion !== "") {
            writer.uint32(90).string(message.fromVersion);
        }
        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 = createBaseWebcastGiftMessage_GiftMonitorInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.anchorId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.profitApiMessageDur = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.sendGiftProfitApiStartMs = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.sendGiftProfitCoreStartMs = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.sendGiftReqStartMs = reader.int64().toString();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.sendGiftSendMessageSuccessMs = reader.int64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.sendProfitApiDur = reader.int64().toString();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.toUserId = reader.int64().toString();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.sendGiftStartClientLocalMs = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.fromPlatform = reader.string();
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.fromVersion = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_GiftMonitorInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_GiftMonitorInfo();
        message.anchorId = object.anchorId ?? "0";
        message.profitApiMessageDur = object.profitApiMessageDur ?? "0";
        message.sendGiftProfitApiStartMs = object.sendGiftProfitApiStartMs ?? "0";
        message.sendGiftProfitCoreStartMs = object.sendGiftProfitCoreStartMs ?? "0";
        message.sendGiftReqStartMs = object.sendGiftReqStartMs ?? "0";
        message.sendGiftSendMessageSuccessMs = object.sendGiftSendMessageSuccessMs ?? "0";
        message.sendProfitApiDur = object.sendProfitApiDur ?? "0";
        message.toUserId = object.toUserId ?? "0";
        message.sendGiftStartClientLocalMs = object.sendGiftStartClientLocalMs ?? "0";
        message.fromPlatform = object.fromPlatform ?? "";
        message.fromVersion = object.fromVersion ?? "";
        return message;
    },
};
function createBaseWebcastGiftMessage_MatchInfo() {
    return { critical: "0", effectCardInUse: false, multiplierType: 0, multiplierValue: "0" };
}
exports.WebcastGiftMessage_MatchInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.critical !== "0") {
            writer.uint32(8).int64(message.critical);
        }
        if (message.effectCardInUse !== false) {
            writer.uint32(16).bool(message.effectCardInUse);
        }
        if (message.multiplierType !== 0) {
            writer.uint32(24).int32(message.multiplierType);
        }
        if (message.multiplierValue !== "0") {
            writer.uint32(32).int64(message.multiplierValue);
        }
        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 = createBaseWebcastGiftMessage_MatchInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.critical = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.effectCardInUse = reader.bool();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.multiplierType = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.multiplierValue = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_MatchInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_MatchInfo();
        message.critical = object.critical ?? "0";
        message.effectCardInUse = object.effectCardInUse ?? false;
        message.multiplierType = object.multiplierType ?? 0;
        message.multiplierValue = object.multiplierValue ?? "0";
        return message;
    },
};
function createBaseWebcastGiftMessage_GiftsBoxInfo() {
    return { gifts: [] };
}
exports.WebcastGiftMessage_GiftsBoxInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.gifts) {
            exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox.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 = createBaseWebcastGiftMessage_GiftsBoxInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.gifts.push(exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_GiftsBoxInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_GiftsBoxInfo();
        message.gifts = object.gifts?.map((e) => exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox.fromPartial(e)) || [];
        return message;
    },
};
function createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox() {
    return { giftId: "0", effectId: "0", colorId: "0", remainTimes: 0, asset: undefined };
}
exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.giftId !== "0") {
            writer.uint32(8).int64(message.giftId);
        }
        if (message.effectId !== "0") {
            writer.uint32(16).int64(message.effectId);
        }
        if (message.colorId !== "0") {
            writer.uint32(24).int64(message.colorId);
        }
        if (message.remainTimes !== 0) {
            writer.uint32(32).int32(message.remainTimes);
        }
        if (message.asset !== undefined) {
            exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel.encode(message.asset, 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 = createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox();
        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 !== 16) {
                        break;
                    }
                    message.effectId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.colorId = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.remainTimes = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.asset = exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox();
        message.giftId = object.giftId ?? "0";
        message.effectId = object.effectId ?? "0";
        message.colorId = object.colorId ?? "0";
        message.remainTimes = object.remainTimes ?? 0;
        message.asset = (object.asset !== undefined && object.asset !== null)
            ? exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel.fromPartial(object.asset)
            : undefined;
        return message;
    },
};
function createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel() {
    return {
        name: "",
        resourceUri: "",
        resourceModel: undefined,
        describe: "",
        id: "0",
        resourceType: 0,
        md5: "",
        size: "0",
        lokiExtraContent: undefined,
        downloadType: 0,
        resourceByteVC1Model: undefined,
        bytevc1Md5: "",
        videoResourceList: [],
        faceRecognitionArchiveMeta: undefined,
        lynxUrlSettingsKey: "",
        downgradeResourceType: 0,
        assetExtra: undefined,
        stickerAssetVariant: 0,
        immediateDownload: false,
        stickerAssetVariantReason: 0,
    };
}
exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.name !== "") {
            writer.uint32(10).string(message.name);
        }
        if (message.resourceUri !== "") {
            writer.uint32(18).string(message.resourceUri);
        }
        if (message.resourceModel !== undefined) {
            exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_ResourceModel.encode(message.resourceModel, writer.uint32(34).fork()).join();
        }
        if (message.describe !== "") {
            writer.uint32(42).string(message.describe);
        }
        if (message.id !== "0") {
            writer.uint32(48).int64(message.id);
        }
        if (message.resourceType !== 0) {
            writer.uint32(56).int32(message.resourceType);
        }
        if (message.md5 !== "") {
            writer.uint32(66).string(message.md5);
        }
        if (message.size !== "0") {
            writer.uint32(72).int64(message.size);
        }
        if (message.lokiExtraContent !== undefined) {
            exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_LokiExtraContent.encode(message.lokiExtraContent, writer.uint32(82).fork()).join();
        }
        if (message.downloadType !== 0) {
            writer.uint32(208).int32(message.downloadType);
        }
        if (message.resourceByteVC1Model !== undefined) {
            exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_ResourceModel.encode(message.resourceByteVC1Model, writer.uint32(226).fork()).join();
        }
        if (message.bytevc1Md5 !== "") {
            writer.uint32(234).string(message.bytevc1Md5);
        }
        for (const v of message.videoResourceList) {
            exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_VideoResource.encode(v, writer.uint32(242).fork())
                .join();
        }
        if (message.faceRecognitionArchiveMeta !== undefined) {
            exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_FaceRecognitionMeta.encode(message.faceRecognitionArchiveMeta, writer.uint32(250).fork()).join();
        }
        if (message.lynxUrlSettingsKey !== "") {
            writer.uint32(258).string(message.lynxUrlSettingsKey);
        }
        if (message.downgradeResourceType !== 0) {
            writer.uint32(264).int32(message.downgradeResourceType);
        }
        if (message.assetExtra !== undefined) {
            exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_AssetExtra.encode(message.assetExtra, writer.uint32(274).fork()).join();
        }
        if (message.stickerAssetVariant !== 0) {
            writer.uint32(280).int32(message.stickerAssetVariant);
        }
        if (message.immediateDownload !== false) {
            writer.uint32(288).bool(message.immediateDownload);
        }
        if (message.stickerAssetVariantReason !== 0) {
            writer.uint32(296).int32(message.stickerAssetVariantReason);
        }
        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 = createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel();
        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.resourceUri = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.resourceModel = exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_ResourceModel.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.describe = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.id = reader.int64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.resourceType = reader.int32();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.md5 = reader.string();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.size = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.lokiExtraContent = exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_LokiExtraContent.decode(reader, reader.uint32());
                    continue;
                }
                case 26: {
                    if (tag !== 208) {
                        break;
                    }
                    message.downloadType = reader.int32();
                    continue;
                }
                case 28: {
                    if (tag !== 226) {
                        break;
                    }
                    message.resourceByteVC1Model = exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_ResourceModel.decode(reader, reader.uint32());
                    continue;
                }
                case 29: {
                    if (tag !== 234) {
                        break;
                    }
                    message.bytevc1Md5 = reader.string();
                    continue;
                }
                case 30: {
                    if (tag !== 242) {
                        break;
                    }
                    message.videoResourceList.push(exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_VideoResource.decode(reader, reader.uint32()));
                    continue;
                }
                case 31: {
                    if (tag !== 250) {
                        break;
                    }
                    message.faceRecognitionArchiveMeta =
                        exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_FaceRecognitionMeta.decode(reader, reader.uint32());
                    continue;
                }
                case 32: {
                    if (tag !== 258) {
                        break;
                    }
                    message.lynxUrlSettingsKey = reader.string();
                    continue;
                }
                case 33: {
                    if (tag !== 264) {
                        break;
                    }
                    message.downgradeResourceType = reader.int32();
                    continue;
                }
                case 34: {
                    if (tag !== 274) {
                        break;
                    }
                    message.assetExtra = exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_AssetExtra.decode(reader, reader.uint32());
                    continue;
                }
                case 35: {
                    if (tag !== 280) {
                        break;
                    }
                    message.stickerAssetVariant = reader.int32();
                    continue;
                }
                case 36: {
                    if (tag !== 288) {
                        break;
                    }
                    message.immediateDownload = reader.bool();
                    continue;
                }
                case 37: {
                    if (tag !== 296) {
                        break;
                    }
                    message.stickerAssetVariantReason = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel();
        message.name = object.name ?? "";
        message.resourceUri = object.resourceUri ?? "";
        message.resourceModel = (object.resourceModel !== undefined && object.resourceModel !== null)
            ? exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_ResourceModel.fromPartial(object.resourceModel)
            : undefined;
        message.describe = object.describe ?? "";
        message.id = object.id ?? "0";
        message.resourceType = object.resourceType ?? 0;
        message.md5 = object.md5 ?? "";
        message.size = object.size ?? "0";
        message.lokiExtraContent = (object.lokiExtraContent !== undefined && object.lokiExtraContent !== null)
            ? exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_LokiExtraContent.fromPartial(object.lokiExtraContent)
            : undefined;
        message.downloadType = object.downloadType ?? 0;
        message.resourceByteVC1Model = (object.resourceByteVC1Model !== undefined && object.resourceByteVC1Model !== null)
            ? exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_ResourceModel.fromPartial(object.resourceByteVC1Model)
            : undefined;
        message.bytevc1Md5 = object.bytevc1Md5 ?? "";
        message.videoResourceList =
            object.videoResourceList?.map((e) => exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_VideoResource.fromPartial(e)) || [];
        message.faceRecognitionArchiveMeta =
            (object.faceRecognitionArchiveMeta !== undefined && object.faceRecognitionArchiveMeta !== null)
                ? exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_FaceRecognitionMeta.fromPartial(object.faceRecognitionArchiveMeta)
                : undefined;
        message.lynxUrlSettingsKey = object.lynxUrlSettingsKey ?? "";
        message.downgradeResourceType = object.downgradeResourceType ?? 0;
        message.assetExtra = (object.assetExtra !== undefined && object.assetExtra !== null)
            ? exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_AssetExtra.fromPartial(object.assetExtra)
            : undefined;
        message.stickerAssetVariant = object.stickerAssetVariant ?? 0;
        message.immediateDownload = object.immediateDownload ?? false;
        message.stickerAssetVariantReason = object.stickerAssetVariantReason ?? 0;
        return message;
    },
};
function createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_AssetExtra() {
    return { effectStarlingKey: "" };
}
exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_AssetExtra = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.effectStarlingKey !== "") {
            writer.uint32(10).string(message.effectStarlingKey);
        }
        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 = createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_AssetExtra();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.effectStarlingKey = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_AssetExtra.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_AssetExtra();
        message.effectStarlingKey = object.effectStarlingKey ?? "";
        return message;
    },
};
function createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_ResourceModel() {
    return { urlList: [], uri: "" };
}
exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_ResourceModel = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.urlList) {
            writer.uint32(10).string(v);
        }
        if (message.uri !== "") {
            writer.uint32(18).string(message.uri);
        }
        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 = createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_ResourceModel();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.urlList.push(reader.string());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.uri = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_ResourceModel.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_ResourceModel();
        message.urlList = object.urlList?.map((e) => e) || [];
        message.uri = object.uri ?? "";
        return message;
    },
};
function createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_LokiExtraContent() {
    return {
        giftType: "",
        giftDuration: "0",
        needScreenShot: false,
        ismultiFrame: false,
        viewOverlay: "",
        befViewRenderSize: undefined,
        befViewRenderFPS: 0,
        befViewFitMode: 0,
        modelNames: "",
        requirements: [],
    };
}
exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_LokiExtraContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.giftType !== "") {
            writer.uint32(10).string(message.giftType);
        }
        if (message.giftDuration !== "0") {
            writer.uint32(16).int64(message.giftDuration);
        }
        if (message.needScreenShot !== false) {
            writer.uint32(24).bool(message.needScreenShot);
        }
        if (message.ismultiFrame !== false) {
            writer.uint32(32).bool(message.ismultiFrame);
        }
        if (message.viewOverlay !== "") {
            writer.uint32(42).string(message.viewOverlay);
        }
        if (message.befViewRenderSize !== undefined) {
            exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_LokiExtraContent_BEFViewRenderSize.encode(message.befViewRenderSize, writer.uint32(50).fork()).join();
        }
        if (message.befViewRenderFPS !== 0) {
            writer.uint32(56).int32(message.befViewRenderFPS);
        }
        if (message.befViewFitMode !== 0) {
            writer.uint32(64).int32(message.befViewFitMode);
        }
        if (message.modelNames !== "") {
            writer.uint32(74).string(message.modelNames);
        }
        for (const v of message.requirements) {
            writer.uint32(82).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 = createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_LokiExtraContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.giftType = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.giftDuration = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.needScreenShot = reader.bool();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.ismultiFrame = reader.bool();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.viewOverlay = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.befViewRenderSize =
                        exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_LokiExtraContent_BEFViewRenderSize.decode(reader, reader.uint32());
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.befViewRenderFPS = reader.int32();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.befViewFitMode = reader.int32();
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.modelNames = reader.string();
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.requirements.push(reader.string());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_LokiExtraContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_LokiExtraContent();
        message.giftType = object.giftType ?? "";
        message.giftDuration = object.giftDuration ?? "0";
        message.needScreenShot = object.needScreenShot ?? false;
        message.ismultiFrame = object.ismultiFrame ?? false;
        message.viewOverlay = object.viewOverlay ?? "";
        message.befViewRenderSize = (object.befViewRenderSize !== undefined && object.befViewRenderSize !== null)
            ? exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_LokiExtraContent_BEFViewRenderSize.fromPartial(object.befViewRenderSize)
            : undefined;
        message.befViewRenderFPS = object.befViewRenderFPS ?? 0;
        message.befViewFitMode = object.befViewFitMode ?? 0;
        message.modelNames = object.modelNames ?? "";
        message.requirements = object.requirements?.map((e) => e) || [];
        return message;
    },
};
function createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_LokiExtraContent_BEFViewRenderSize() {
    return { with: 0, height: 0 };
}
exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_LokiExtraContent_BEFViewRenderSize = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.with !== 0) {
            writer.uint32(8).int32(message.with);
        }
        if (message.height !== 0) {
            writer.uint32(16).int32(message.height);
        }
        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 = createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_LokiExtraContent_BEFViewRenderSize();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.with = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.height = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_LokiExtraContent_BEFViewRenderSize.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_LokiExtraContent_BEFViewRenderSize();
        message.with = object.with ?? 0;
        message.height = object.height ?? 0;
        return message;
    },
};
function createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_VideoResource() {
    return { videoTypeName: "", videoUrl: undefined, videoMd5: "" };
}
exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_VideoResource = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.videoTypeName !== "") {
            writer.uint32(10).string(message.videoTypeName);
        }
        if (message.videoUrl !== undefined) {
            exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_ResourceModel.encode(message.videoUrl, writer.uint32(18).fork()).join();
        }
        if (message.videoMd5 !== "") {
            writer.uint32(26).string(message.videoMd5);
        }
        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 = createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_VideoResource();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.videoTypeName = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.videoUrl = exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_ResourceModel.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.videoMd5 = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_VideoResource.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_VideoResource();
        message.videoTypeName = object.videoTypeName ?? "";
        message.videoUrl = (object.videoUrl !== undefined && object.videoUrl !== null)
            ? exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_ResourceModel.fromPartial(object.videoUrl)
            : undefined;
        message.videoMd5 = object.videoMd5 ?? "";
        return message;
    },
};
function createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_FaceRecognitionMeta() {
    return { version: "", requirements: [], modelNames: "", sdkExtra: "" };
}
exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_FaceRecognitionMeta = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.version !== "") {
            writer.uint32(10).string(message.version);
        }
        for (const v of message.requirements) {
            writer.uint32(18).string(v);
        }
        if (message.modelNames !== "") {
            writer.uint32(26).string(message.modelNames);
        }
        if (message.sdkExtra !== "") {
            writer.uint32(34).string(message.sdkExtra);
        }
        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 = createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_FaceRecognitionMeta();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.version = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.requirements.push(reader.string());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.modelNames = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.sdkExtra = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_FaceRecognitionMeta.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_GiftsBoxInfo_GiftInfoInBox_AssetsModel_FaceRecognitionMeta();
        message.version = object.version ?? "";
        message.requirements = object.requirements?.map((e) => e) || [];
        message.modelNames = object.modelNames ?? "";
        message.sdkExtra = object.sdkExtra ?? "";
        return message;
    },
};
function createBaseWebcastGiftMessage_AssetsModel() {
    return {
        name: "",
        resourceUri: "",
        resourceModel: undefined,
        describe: "",
        id: "0",
        resourceType: 0,
        md5: "",
        size: "0",
        lokiExtraContent: undefined,
        downloadType: 0,
        resourceByteVC1Model: undefined,
        bytevc1Md5: "",
        videoResourceList: [],
        faceRecognitionArchiveMeta: undefined,
        lynxUrlSettingsKey: "",
        downgradeResourceType: 0,
        assetExtra: undefined,
        stickerAssetVariant: 0,
        immediateDownload: false,
        stickerAssetVariantReason: 0,
    };
}
exports.WebcastGiftMessage_AssetsModel = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.name !== "") {
            writer.uint32(10).string(message.name);
        }
        if (message.resourceUri !== "") {
            writer.uint32(18).string(message.resourceUri);
        }
        if (message.resourceModel !== undefined) {
            exports.WebcastGiftMessage_AssetsModel_ResourceModel.encode(message.resourceModel, writer.uint32(34).fork()).join();
        }
        if (message.describe !== "") {
            writer.uint32(42).string(message.describe);
        }
        if (message.id !== "0") {
            writer.uint32(48).int64(message.id);
        }
        if (message.resourceType !== 0) {
            writer.uint32(56).int32(message.resourceType);
        }
        if (message.md5 !== "") {
            writer.uint32(66).string(message.md5);
        }
        if (message.size !== "0") {
            writer.uint32(72).int64(message.size);
        }
        if (message.lokiExtraContent !== undefined) {
            exports.WebcastGiftMessage_AssetsModel_LokiExtraContent.encode(message.lokiExtraContent, writer.uint32(82).fork()).join();
        }
        if (message.downloadType !== 0) {
            writer.uint32(208).int32(message.downloadType);
        }
        if (message.resourceByteVC1Model !== undefined) {
            exports.WebcastGiftMessage_AssetsModel_ResourceModel.encode(message.resourceByteVC1Model, writer.uint32(226).fork())
                .join();
        }
        if (message.bytevc1Md5 !== "") {
            writer.uint32(234).string(message.bytevc1Md5);
        }
        for (const v of message.videoResourceList) {
            exports.WebcastGiftMessage_AssetsModel_VideoResource.encode(v, writer.uint32(242).fork()).join();
        }
        if (message.faceRecognitionArchiveMeta !== undefined) {
            exports.WebcastGiftMessage_AssetsModel_FaceRecognitionMeta.encode(message.faceRecognitionArchiveMeta, writer.uint32(250).fork()).join();
        }
        if (message.lynxUrlSettingsKey !== "") {
            writer.uint32(258).string(message.lynxUrlSettingsKey);
        }
        if (message.downgradeResourceType !== 0) {
            writer.uint32(264).int32(message.downgradeResourceType);
        }
        if (message.assetExtra !== undefined) {
            exports.WebcastGiftMessage_AssetsModel_AssetExtra.encode(message.assetExtra, writer.uint32(274).fork()).join();
        }
        if (message.stickerAssetVariant !== 0) {
            writer.uint32(280).int32(message.stickerAssetVariant);
        }
        if (message.immediateDownload !== false) {
            writer.uint32(288).bool(message.immediateDownload);
        }
        if (message.stickerAssetVariantReason !== 0) {
            writer.uint32(296).int32(message.stickerAssetVariantReason);
        }
        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 = createBaseWebcastGiftMessage_AssetsModel();
        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.resourceUri = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.resourceModel = exports.WebcastGiftMessage_AssetsModel_ResourceModel.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.describe = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.id = reader.int64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.resourceType = reader.int32();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.md5 = reader.string();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.size = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.lokiExtraContent = exports.WebcastGiftMessage_AssetsModel_LokiExtraContent.decode(reader, reader.uint32());
                    continue;
                }
                case 26: {
                    if (tag !== 208) {
                        break;
                    }
                    message.downloadType = reader.int32();
                    continue;
                }
                case 28: {
                    if (tag !== 226) {
                        break;
                    }
                    message.resourceByteVC1Model = exports.WebcastGiftMessage_AssetsModel_ResourceModel.decode(reader, reader.uint32());
                    continue;
                }
                case 29: {
                    if (tag !== 234) {
                        break;
                    }
                    message.bytevc1Md5 = reader.string();
                    continue;
                }
                case 30: {
                    if (tag !== 242) {
                        break;
                    }
                    message.videoResourceList.push(exports.WebcastGiftMessage_AssetsModel_VideoResource.decode(reader, reader.uint32()));
                    continue;
                }
                case 31: {
                    if (tag !== 250) {
                        break;
                    }
                    message.faceRecognitionArchiveMeta = exports.WebcastGiftMessage_AssetsModel_FaceRecognitionMeta.decode(reader, reader.uint32());
                    continue;
                }
                case 32: {
                    if (tag !== 258) {
                        break;
                    }
                    message.lynxUrlSettingsKey = reader.string();
                    continue;
                }
                case 33: {
                    if (tag !== 264) {
                        break;
                    }
                    message.downgradeResourceType = reader.int32();
                    continue;
                }
                case 34: {
                    if (tag !== 274) {
                        break;
                    }
                    message.assetExtra = exports.WebcastGiftMessage_AssetsModel_AssetExtra.decode(reader, reader.uint32());
                    continue;
                }
                case 35: {
                    if (tag !== 280) {
                        break;
                    }
                    message.stickerAssetVariant = reader.int32();
                    continue;
                }
                case 36: {
                    if (tag !== 288) {
                        break;
                    }
                    message.immediateDownload = reader.bool();
                    continue;
                }
                case 37: {
                    if (tag !== 296) {
                        break;
                    }
                    message.stickerAssetVariantReason = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_AssetsModel.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_AssetsModel();
        message.name = object.name ?? "";
        message.resourceUri = object.resourceUri ?? "";
        message.resourceModel = (object.resourceModel !== undefined && object.resourceModel !== null)
            ? exports.WebcastGiftMessage_AssetsModel_ResourceModel.fromPartial(object.resourceModel)
            : undefined;
        message.describe = object.describe ?? "";
        message.id = object.id ?? "0";
        message.resourceType = object.resourceType ?? 0;
        message.md5 = object.md5 ?? "";
        message.size = object.size ?? "0";
        message.lokiExtraContent = (object.lokiExtraContent !== undefined && object.lokiExtraContent !== null)
            ? exports.WebcastGiftMessage_AssetsModel_LokiExtraContent.fromPartial(object.lokiExtraContent)
            : undefined;
        message.downloadType = object.downloadType ?? 0;
        message.resourceByteVC1Model = (object.resourceByteVC1Model !== undefined && object.resourceByteVC1Model !== null)
            ? exports.WebcastGiftMessage_AssetsModel_ResourceModel.fromPartial(object.resourceByteVC1Model)
            : undefined;
        message.bytevc1Md5 = object.bytevc1Md5 ?? "";
        message.videoResourceList =
            object.videoResourceList?.map((e) => exports.WebcastGiftMessage_AssetsModel_VideoResource.fromPartial(e)) || [];
        message.faceRecognitionArchiveMeta =
            (object.faceRecognitionArchiveMeta !== undefined && object.faceRecognitionArchiveMeta !== null)
                ? exports.WebcastGiftMessage_AssetsModel_FaceRecognitionMeta.fromPartial(object.faceRecognitionArchiveMeta)
                : undefined;
        message.lynxUrlSettingsKey = object.lynxUrlSettingsKey ?? "";
        message.downgradeResourceType = object.downgradeResourceType ?? 0;
        message.assetExtra = (object.assetExtra !== undefined && object.assetExtra !== null)
            ? exports.WebcastGiftMessage_AssetsModel_AssetExtra.fromPartial(object.assetExtra)
            : undefined;
        message.stickerAssetVariant = object.stickerAssetVariant ?? 0;
        message.immediateDownload = object.immediateDownload ?? false;
        message.stickerAssetVariantReason = object.stickerAssetVariantReason ?? 0;
        return message;
    },
};
function createBaseWebcastGiftMessage_AssetsModel_AssetExtra() {
    return { effectStarlingKey: "" };
}
exports.WebcastGiftMessage_AssetsModel_AssetExtra = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.effectStarlingKey !== "") {
            writer.uint32(10).string(message.effectStarlingKey);
        }
        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 = createBaseWebcastGiftMessage_AssetsModel_AssetExtra();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.effectStarlingKey = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_AssetsModel_AssetExtra.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_AssetsModel_AssetExtra();
        message.effectStarlingKey = object.effectStarlingKey ?? "";
        return message;
    },
};
function createBaseWebcastGiftMessage_AssetsModel_ResourceModel() {
    return { urlList: [], uri: "" };
}
exports.WebcastGiftMessage_AssetsModel_ResourceModel = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.urlList) {
            writer.uint32(10).string(v);
        }
        if (message.uri !== "") {
            writer.uint32(18).string(message.uri);
        }
        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 = createBaseWebcastGiftMessage_AssetsModel_ResourceModel();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.urlList.push(reader.string());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.uri = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_AssetsModel_ResourceModel.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_AssetsModel_ResourceModel();
        message.urlList = object.urlList?.map((e) => e) || [];
        message.uri = object.uri ?? "";
        return message;
    },
};
function createBaseWebcastGiftMessage_AssetsModel_LokiExtraContent() {
    return {
        giftType: "",
        giftDuration: "0",
        needScreenShot: false,
        ismultiFrame: false,
        viewOverlay: "",
        befViewRenderSize: undefined,
        befViewRenderFPS: 0,
        befViewFitMode: 0,
        modelNames: "",
        requirements: [],
    };
}
exports.WebcastGiftMessage_AssetsModel_LokiExtraContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.giftType !== "") {
            writer.uint32(10).string(message.giftType);
        }
        if (message.giftDuration !== "0") {
            writer.uint32(16).int64(message.giftDuration);
        }
        if (message.needScreenShot !== false) {
            writer.uint32(24).bool(message.needScreenShot);
        }
        if (message.ismultiFrame !== false) {
            writer.uint32(32).bool(message.ismultiFrame);
        }
        if (message.viewOverlay !== "") {
            writer.uint32(42).string(message.viewOverlay);
        }
        if (message.befViewRenderSize !== undefined) {
            exports.WebcastGiftMessage_AssetsModel_LokiExtraContent_BEFViewRenderSize.encode(message.befViewRenderSize, writer.uint32(50).fork()).join();
        }
        if (message.befViewRenderFPS !== 0) {
            writer.uint32(56).int32(message.befViewRenderFPS);
        }
        if (message.befViewFitMode !== 0) {
            writer.uint32(64).int32(message.befViewFitMode);
        }
        if (message.modelNames !== "") {
            writer.uint32(74).string(message.modelNames);
        }
        for (const v of message.requirements) {
            writer.uint32(82).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 = createBaseWebcastGiftMessage_AssetsModel_LokiExtraContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.giftType = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.giftDuration = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.needScreenShot = reader.bool();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.ismultiFrame = reader.bool();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.viewOverlay = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.befViewRenderSize = exports.WebcastGiftMessage_AssetsModel_LokiExtraContent_BEFViewRenderSize.decode(reader, reader.uint32());
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.befViewRenderFPS = reader.int32();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.befViewFitMode = reader.int32();
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.modelNames = reader.string();
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.requirements.push(reader.string());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_AssetsModel_LokiExtraContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_AssetsModel_LokiExtraContent();
        message.giftType = object.giftType ?? "";
        message.giftDuration = object.giftDuration ?? "0";
        message.needScreenShot = object.needScreenShot ?? false;
        message.ismultiFrame = object.ismultiFrame ?? false;
        message.viewOverlay = object.viewOverlay ?? "";
        message.befViewRenderSize = (object.befViewRenderSize !== undefined && object.befViewRenderSize !== null)
            ? exports.WebcastGiftMessage_AssetsModel_LokiExtraContent_BEFViewRenderSize.fromPartial(object.befViewRenderSize)
            : undefined;
        message.befViewRenderFPS = object.befViewRenderFPS ?? 0;
        message.befViewFitMode = object.befViewFitMode ?? 0;
        message.modelNames = object.modelNames ?? "";
        message.requirements = object.requirements?.map((e) => e) || [];
        return message;
    },
};
function createBaseWebcastGiftMessage_AssetsModel_LokiExtraContent_BEFViewRenderSize() {
    return { with: 0, height: 0 };
}
exports.WebcastGiftMessage_AssetsModel_LokiExtraContent_BEFViewRenderSize = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.with !== 0) {
            writer.uint32(8).int32(message.with);
        }
        if (message.height !== 0) {
            writer.uint32(16).int32(message.height);
        }
        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 = createBaseWebcastGiftMessage_AssetsModel_LokiExtraContent_BEFViewRenderSize();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.with = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.height = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_AssetsModel_LokiExtraContent_BEFViewRenderSize.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_AssetsModel_LokiExtraContent_BEFViewRenderSize();
        message.with = object.with ?? 0;
        message.height = object.height ?? 0;
        return message;
    },
};
function createBaseWebcastGiftMessage_AssetsModel_VideoResource() {
    return { videoTypeName: "", videoUrl: undefined, videoMd5: "" };
}
exports.WebcastGiftMessage_AssetsModel_VideoResource = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.videoTypeName !== "") {
            writer.uint32(10).string(message.videoTypeName);
        }
        if (message.videoUrl !== undefined) {
            exports.WebcastGiftMessage_AssetsModel_ResourceModel.encode(message.videoUrl, writer.uint32(18).fork()).join();
        }
        if (message.videoMd5 !== "") {
            writer.uint32(26).string(message.videoMd5);
        }
        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 = createBaseWebcastGiftMessage_AssetsModel_VideoResource();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.videoTypeName = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.videoUrl = exports.WebcastGiftMessage_AssetsModel_ResourceModel.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.videoMd5 = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_AssetsModel_VideoResource.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_AssetsModel_VideoResource();
        message.videoTypeName = object.videoTypeName ?? "";
        message.videoUrl = (object.videoUrl !== undefined && object.videoUrl !== null)
            ? exports.WebcastGiftMessage_AssetsModel_ResourceModel.fromPartial(object.videoUrl)
            : undefined;
        message.videoMd5 = object.videoMd5 ?? "";
        return message;
    },
};
function createBaseWebcastGiftMessage_AssetsModel_FaceRecognitionMeta() {
    return { version: "", requirements: [], modelNames: "", sdkExtra: "" };
}
exports.WebcastGiftMessage_AssetsModel_FaceRecognitionMeta = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.version !== "") {
            writer.uint32(10).string(message.version);
        }
        for (const v of message.requirements) {
            writer.uint32(18).string(v);
        }
        if (message.modelNames !== "") {
            writer.uint32(26).string(message.modelNames);
        }
        if (message.sdkExtra !== "") {
            writer.uint32(34).string(message.sdkExtra);
        }
        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 = createBaseWebcastGiftMessage_AssetsModel_FaceRecognitionMeta();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.version = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.requirements.push(reader.string());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.modelNames = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.sdkExtra = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_AssetsModel_FaceRecognitionMeta.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_AssetsModel_FaceRecognitionMeta();
        message.version = object.version ?? "";
        message.requirements = object.requirements?.map((e) => e) || [];
        message.modelNames = object.modelNames ?? "";
        message.sdkExtra = object.sdkExtra ?? "";
        return message;
    },
};
function createBaseWebcastGiftMessage_LynxGiftExtra() {
    return { id: "0", code: "0", type: "0", params: [], extra: "" };
}
exports.WebcastGiftMessage_LynxGiftExtra = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.id !== "0") {
            writer.uint32(8).int64(message.id);
        }
        if (message.code !== "0") {
            writer.uint32(16).int64(message.code);
        }
        if (message.type !== "0") {
            writer.uint32(24).int64(message.type);
        }
        for (const v of message.params) {
            writer.uint32(34).string(v);
        }
        if (message.extra !== "") {
            writer.uint32(42).string(message.extra);
        }
        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 = createBaseWebcastGiftMessage_LynxGiftExtra();
        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.code = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.type = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.params.push(reader.string());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.extra = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_LynxGiftExtra.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_LynxGiftExtra();
        message.id = object.id ?? "0";
        message.code = object.code ?? "0";
        message.type = object.type ?? "0";
        message.params = object.params?.map((e) => e) || [];
        message.extra = object.extra ?? "";
        return message;
    },
};
function createBaseWebcastGiftMessage_FlyingMicResources() {
    return { pathImage: undefined, micImage: undefined, transitionConfigs: [] };
}
exports.WebcastGiftMessage_FlyingMicResources = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.pathImage !== undefined) {
            data_1.Image.encode(message.pathImage, writer.uint32(10).fork()).join();
        }
        if (message.micImage !== undefined) {
            data_1.Image.encode(message.micImage, writer.uint32(18).fork()).join();
        }
        for (const v of message.transitionConfigs) {
            exports.WebcastGiftMessage_FlyingMicResources_TransitionConfig.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 = createBaseWebcastGiftMessage_FlyingMicResources();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.pathImage = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.micImage = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.transitionConfigs.push(exports.WebcastGiftMessage_FlyingMicResources_TransitionConfig.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_FlyingMicResources.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_FlyingMicResources();
        message.pathImage = (object.pathImage !== undefined && object.pathImage !== null)
            ? data_1.Image.fromPartial(object.pathImage)
            : undefined;
        message.micImage = (object.micImage !== undefined && object.micImage !== null)
            ? data_1.Image.fromPartial(object.micImage)
            : undefined;
        message.transitionConfigs =
            object.transitionConfigs?.map((e) => exports.WebcastGiftMessage_FlyingMicResources_TransitionConfig.fromPartial(e)) || [];
        return message;
    },
};
function createBaseWebcastGiftMessage_FlyingMicResources_TransitionConfig() {
    return { configId: "0", resourceImage: undefined };
}
exports.WebcastGiftMessage_FlyingMicResources_TransitionConfig = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.configId !== "0") {
            writer.uint32(8).int64(message.configId);
        }
        if (message.resourceImage !== undefined) {
            data_1.Image.encode(message.resourceImage, 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 = createBaseWebcastGiftMessage_FlyingMicResources_TransitionConfig();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.configId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.resourceImage = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_FlyingMicResources_TransitionConfig.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_FlyingMicResources_TransitionConfig();
        message.configId = object.configId ?? "0";
        message.resourceImage = (object.resourceImage !== undefined && object.resourceImage !== null)
            ? data_1.Image.fromPartial(object.resourceImage)
            : undefined;
        return message;
    },
};
function createBaseWebcastGiftMessage_SponsorshipInfo() {
    return {
        giftId: "0",
        sponsorId: "0",
        lightGiftUp: false,
        unlightedGiftIcon: "",
        giftGalleryDetailPageSchemeUrl: "",
        giftGalleryClickSponsor: false,
        becomeAllSponsored: false,
    };
}
exports.WebcastGiftMessage_SponsorshipInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.giftId !== "0") {
            writer.uint32(8).int64(message.giftId);
        }
        if (message.sponsorId !== "0") {
            writer.uint32(16).int64(message.sponsorId);
        }
        if (message.lightGiftUp !== false) {
            writer.uint32(24).bool(message.lightGiftUp);
        }
        if (message.unlightedGiftIcon !== "") {
            writer.uint32(34).string(message.unlightedGiftIcon);
        }
        if (message.giftGalleryDetailPageSchemeUrl !== "") {
            writer.uint32(42).string(message.giftGalleryDetailPageSchemeUrl);
        }
        if (message.giftGalleryClickSponsor !== false) {
            writer.uint32(48).bool(message.giftGalleryClickSponsor);
        }
        if (message.becomeAllSponsored !== false) {
            writer.uint32(168).bool(message.becomeAllSponsored);
        }
        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 = createBaseWebcastGiftMessage_SponsorshipInfo();
        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 !== 16) {
                        break;
                    }
                    message.sponsorId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.lightGiftUp = reader.bool();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.unlightedGiftIcon = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.giftGalleryDetailPageSchemeUrl = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.giftGalleryClickSponsor = reader.bool();
                    continue;
                }
                case 21: {
                    if (tag !== 168) {
                        break;
                    }
                    message.becomeAllSponsored = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGiftMessage_SponsorshipInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGiftMessage_SponsorshipInfo();
        message.giftId = object.giftId ?? "0";
        message.sponsorId = object.sponsorId ?? "0";
        message.lightGiftUp = object.lightGiftUp ?? false;
        message.unlightedGiftIcon = object.unlightedGiftIcon ?? "";
        message.giftGalleryDetailPageSchemeUrl = object.giftGalleryDetailPageSchemeUrl ?? "";
        message.giftGalleryClickSponsor = object.giftGalleryClickSponsor ?? false;
        message.becomeAllSponsored = object.becomeAllSponsored ?? false;
        return message;
    },
};
function createBaseWebcastLinkMicBattle() {
    return {
        common: undefined,
        battleId: "0",
        battleSetting: undefined,
        action: 0,
        battleResult: {},
        mBattleDisplayConfig: undefined,
        inviteeGiftPermissionType: 0,
        armies: {},
        anchorInfo: {},
        bubbleText: "",
        supportedActions: [],
        battleCombos: {},
        teamUsers: [],
        inviteeGiftPermissionTypes: [],
        actionByUserId: "0",
        teamBattleResult: [],
        teamArmies: [],
        abtestSettings: [],
        teamMatchCampaign: undefined,
        fuzzyDisplayConfigV2: undefined,
    };
}
exports.WebcastLinkMicBattle = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.battleId !== "0") {
            writer.uint32(16).int64(message.battleId);
        }
        if (message.battleSetting !== undefined) {
            data_1.BattleSetting.encode(message.battleSetting, writer.uint32(26).fork()).join();
        }
        if (message.action !== 0) {
            writer.uint32(32).int32(message.action);
        }
        Object.entries(message.battleResult).forEach(([key, value]) => {
            exports.WebcastLinkMicBattle_BattleResultEntry.encode({ key: key, value }, writer.uint32(42).fork()).join();
        });
        if (message.mBattleDisplayConfig !== undefined) {
            exports.WebcastLinkMicBattle_BattleDisplayConfig.encode(message.mBattleDisplayConfig, writer.uint32(50).fork()).join();
        }
        if (message.inviteeGiftPermissionType !== 0) {
            writer.uint32(64).int32(message.inviteeGiftPermissionType);
        }
        Object.entries(message.armies).forEach(([key, value]) => {
            exports.WebcastLinkMicBattle_ArmiesEntry.encode({ key: key, value }, writer.uint32(74).fork()).join();
        });
        Object.entries(message.anchorInfo).forEach(([key, value]) => {
            exports.WebcastLinkMicBattle_AnchorInfoEntry.encode({ key: key, value }, writer.uint32(82).fork()).join();
        });
        if (message.bubbleText !== "") {
            writer.uint32(90).string(message.bubbleText);
        }
        for (const v of message.supportedActions) {
            exports.WebcastLinkMicBattle_SupportedActionsWrapper.encode(v, writer.uint32(98).fork()).join();
        }
        Object.entries(message.battleCombos).forEach(([key, value]) => {
            exports.WebcastLinkMicBattle_BattleCombosEntry.encode({ key: key, value }, writer.uint32(106).fork()).join();
        });
        for (const v of message.teamUsers) {
            exports.WebcastLinkMicBattle_TeamUsersInfo.encode(v, writer.uint32(114).fork()).join();
        }
        for (const v of message.inviteeGiftPermissionTypes) {
            exports.WebcastLinkMicBattle_BattleInviteeGiftPermission.encode(v, writer.uint32(122).fork()).join();
        }
        if (message.actionByUserId !== "0") {
            writer.uint32(128).int64(message.actionByUserId);
        }
        for (const v of message.teamBattleResult) {
            exports.WebcastLinkMicBattle_BattleTeamResult.encode(v, writer.uint32(138).fork()).join();
        }
        for (const v of message.teamArmies) {
            data_1.BattleTeamUserArmies.encode(v, writer.uint32(146).fork()).join();
        }
        for (const v of message.abtestSettings) {
            exports.WebcastLinkMicBattle_BattleABTestSetting.encode(v, writer.uint32(154).fork()).join();
        }
        if (message.teamMatchCampaign !== undefined) {
            exports.WebcastLinkMicBattle_TeamMatchCampaign.encode(message.teamMatchCampaign, writer.uint32(162).fork()).join();
        }
        if (message.fuzzyDisplayConfigV2 !== undefined) {
            data_1.HighScoreControlCfg.encode(message.fuzzyDisplayConfigV2, writer.uint32(170).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 = createBaseWebcastLinkMicBattle();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.battleId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.battleSetting = data_1.BattleSetting.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.action = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    const entry5 = exports.WebcastLinkMicBattle_BattleResultEntry.decode(reader, reader.uint32());
                    if (entry5.value !== undefined) {
                        message.battleResult[entry5.key] = entry5.value;
                    }
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.mBattleDisplayConfig = exports.WebcastLinkMicBattle_BattleDisplayConfig.decode(reader, reader.uint32());
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.inviteeGiftPermissionType = reader.int32();
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    const entry9 = exports.WebcastLinkMicBattle_ArmiesEntry.decode(reader, reader.uint32());
                    if (entry9.value !== undefined) {
                        message.armies[entry9.key] = entry9.value;
                    }
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    const entry10 = exports.WebcastLinkMicBattle_AnchorInfoEntry.decode(reader, reader.uint32());
                    if (entry10.value !== undefined) {
                        message.anchorInfo[entry10.key] = entry10.value;
                    }
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.bubbleText = reader.string();
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.supportedActions.push(exports.WebcastLinkMicBattle_SupportedActionsWrapper.decode(reader, reader.uint32()));
                    continue;
                }
                case 13: {
                    if (tag !== 106) {
                        break;
                    }
                    const entry13 = exports.WebcastLinkMicBattle_BattleCombosEntry.decode(reader, reader.uint32());
                    if (entry13.value !== undefined) {
                        message.battleCombos[entry13.key] = entry13.value;
                    }
                    continue;
                }
                case 14: {
                    if (tag !== 114) {
                        break;
                    }
                    message.teamUsers.push(exports.WebcastLinkMicBattle_TeamUsersInfo.decode(reader, reader.uint32()));
                    continue;
                }
                case 15: {
                    if (tag !== 122) {
                        break;
                    }
                    message.inviteeGiftPermissionTypes.push(exports.WebcastLinkMicBattle_BattleInviteeGiftPermission.decode(reader, reader.uint32()));
                    continue;
                }
                case 16: {
                    if (tag !== 128) {
                        break;
                    }
                    message.actionByUserId = reader.int64().toString();
                    continue;
                }
                case 17: {
                    if (tag !== 138) {
                        break;
                    }
                    message.teamBattleResult.push(exports.WebcastLinkMicBattle_BattleTeamResult.decode(reader, reader.uint32()));
                    continue;
                }
                case 18: {
                    if (tag !== 146) {
                        break;
                    }
                    message.teamArmies.push(data_1.BattleTeamUserArmies.decode(reader, reader.uint32()));
                    continue;
                }
                case 19: {
                    if (tag !== 154) {
                        break;
                    }
                    message.abtestSettings.push(exports.WebcastLinkMicBattle_BattleABTestSetting.decode(reader, reader.uint32()));
                    continue;
                }
                case 20: {
                    if (tag !== 162) {
                        break;
                    }
                    message.teamMatchCampaign = exports.WebcastLinkMicBattle_TeamMatchCampaign.decode(reader, reader.uint32());
                    continue;
                }
                case 21: {
                    if (tag !== 170) {
                        break;
                    }
                    message.fuzzyDisplayConfigV2 = data_1.HighScoreControlCfg.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicBattle.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattle();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.battleId = object.battleId ?? "0";
        message.battleSetting = (object.battleSetting !== undefined && object.battleSetting !== null)
            ? data_1.BattleSetting.fromPartial(object.battleSetting)
            : undefined;
        message.action = object.action ?? 0;
        message.battleResult = Object.entries(object.battleResult ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = exports.WebcastLinkMicBattle_BattleResult.fromPartial(value);
            }
            return acc;
        }, {});
        message.mBattleDisplayConfig = (object.mBattleDisplayConfig !== undefined && object.mBattleDisplayConfig !== null)
            ? exports.WebcastLinkMicBattle_BattleDisplayConfig.fromPartial(object.mBattleDisplayConfig)
            : undefined;
        message.inviteeGiftPermissionType = object.inviteeGiftPermissionType ?? 0;
        message.armies = Object.entries(object.armies ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = data_1.BattleUserArmies.fromPartial(value);
            }
            return acc;
        }, {});
        message.anchorInfo = Object.entries(object.anchorInfo ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = exports.WebcastLinkMicBattle_BattleUserInfo.fromPartial(value);
            }
            return acc;
        }, {});
        message.bubbleText = object.bubbleText ?? "";
        message.supportedActions =
            object.supportedActions?.map((e) => exports.WebcastLinkMicBattle_SupportedActionsWrapper.fromPartial(e)) || [];
        message.battleCombos = Object.entries(object.battleCombos ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = exports.WebcastLinkMicBattle_BattleComboInfo.fromPartial(value);
            }
            return acc;
        }, {});
        message.teamUsers = object.teamUsers?.map((e) => exports.WebcastLinkMicBattle_TeamUsersInfo.fromPartial(e)) || [];
        message.inviteeGiftPermissionTypes =
            object.inviteeGiftPermissionTypes?.map((e) => exports.WebcastLinkMicBattle_BattleInviteeGiftPermission.fromPartial(e)) ||
                [];
        message.actionByUserId = object.actionByUserId ?? "0";
        message.teamBattleResult =
            object.teamBattleResult?.map((e) => exports.WebcastLinkMicBattle_BattleTeamResult.fromPartial(e)) || [];
        message.teamArmies = object.teamArmies?.map((e) => data_1.BattleTeamUserArmies.fromPartial(e)) || [];
        message.abtestSettings =
            object.abtestSettings?.map((e) => exports.WebcastLinkMicBattle_BattleABTestSetting.fromPartial(e)) || [];
        message.teamMatchCampaign = (object.teamMatchCampaign !== undefined && object.teamMatchCampaign !== null)
            ? exports.WebcastLinkMicBattle_TeamMatchCampaign.fromPartial(object.teamMatchCampaign)
            : undefined;
        message.fuzzyDisplayConfigV2 = (object.fuzzyDisplayConfigV2 !== undefined && object.fuzzyDisplayConfigV2 !== null)
            ? data_1.HighScoreControlCfg.fromPartial(object.fuzzyDisplayConfigV2)
            : undefined;
        return message;
    },
};
function createBaseWebcastLinkMicBattle_BattleResultEntry() {
    return { key: "0", value: undefined };
}
exports.WebcastLinkMicBattle_BattleResultEntry = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.key !== "0") {
            writer.uint32(8).int64(message.key);
        }
        if (message.value !== undefined) {
            exports.WebcastLinkMicBattle_BattleResult.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 = createBaseWebcastLinkMicBattle_BattleResultEntry();
        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.WebcastLinkMicBattle_BattleResult.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicBattle_BattleResultEntry.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattle_BattleResultEntry();
        message.key = object.key ?? "0";
        message.value = (object.value !== undefined && object.value !== null)
            ? exports.WebcastLinkMicBattle_BattleResult.fromPartial(object.value)
            : undefined;
        return message;
    },
};
function createBaseWebcastLinkMicBattle_ArmiesEntry() {
    return { key: "0", value: undefined };
}
exports.WebcastLinkMicBattle_ArmiesEntry = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.key !== "0") {
            writer.uint32(8).int64(message.key);
        }
        if (message.value !== undefined) {
            data_1.BattleUserArmies.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 = createBaseWebcastLinkMicBattle_ArmiesEntry();
        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 = data_1.BattleUserArmies.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicBattle_ArmiesEntry.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattle_ArmiesEntry();
        message.key = object.key ?? "0";
        message.value = (object.value !== undefined && object.value !== null)
            ? data_1.BattleUserArmies.fromPartial(object.value)
            : undefined;
        return message;
    },
};
function createBaseWebcastLinkMicBattle_AnchorInfoEntry() {
    return { key: "0", value: undefined };
}
exports.WebcastLinkMicBattle_AnchorInfoEntry = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.key !== "0") {
            writer.uint32(8).int64(message.key);
        }
        if (message.value !== undefined) {
            exports.WebcastLinkMicBattle_BattleUserInfo.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 = createBaseWebcastLinkMicBattle_AnchorInfoEntry();
        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.WebcastLinkMicBattle_BattleUserInfo.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicBattle_AnchorInfoEntry.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattle_AnchorInfoEntry();
        message.key = object.key ?? "0";
        message.value = (object.value !== undefined && object.value !== null)
            ? exports.WebcastLinkMicBattle_BattleUserInfo.fromPartial(object.value)
            : undefined;
        return message;
    },
};
function createBaseWebcastLinkMicBattle_BattleCombosEntry() {
    return { key: "0", value: undefined };
}
exports.WebcastLinkMicBattle_BattleCombosEntry = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.key !== "0") {
            writer.uint32(8).int64(message.key);
        }
        if (message.value !== undefined) {
            exports.WebcastLinkMicBattle_BattleComboInfo.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 = createBaseWebcastLinkMicBattle_BattleCombosEntry();
        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.WebcastLinkMicBattle_BattleComboInfo.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicBattle_BattleCombosEntry.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattle_BattleCombosEntry();
        message.key = object.key ?? "0";
        message.value = (object.value !== undefined && object.value !== null)
            ? exports.WebcastLinkMicBattle_BattleComboInfo.fromPartial(object.value)
            : undefined;
        return message;
    },
};
function createBaseWebcastLinkMicBattle_TeamMatchCampaign() {
    return { bestTeammateRelation: [], startSfxTeamId: [], hasTeamMatchMvpSfx: false };
}
exports.WebcastLinkMicBattle_TeamMatchCampaign = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.bestTeammateRelation) {
            exports.WebcastLinkMicBattle_TeamMatchCampaign_BestTeammateRelation.encode(v, writer.uint32(10).fork()).join();
        }
        writer.uint32(18).fork();
        for (const v of message.startSfxTeamId) {
            writer.int64(v);
        }
        writer.join();
        if (message.hasTeamMatchMvpSfx !== false) {
            writer.uint32(24).bool(message.hasTeamMatchMvpSfx);
        }
        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 = createBaseWebcastLinkMicBattle_TeamMatchCampaign();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.bestTeammateRelation.push(exports.WebcastLinkMicBattle_TeamMatchCampaign_BestTeammateRelation.decode(reader, reader.uint32()));
                    continue;
                }
                case 2: {
                    if (tag === 16) {
                        message.startSfxTeamId.push(reader.int64().toString());
                        continue;
                    }
                    if (tag === 18) {
                        const end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) {
                            message.startSfxTeamId.push(reader.int64().toString());
                        }
                        continue;
                    }
                    break;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.hasTeamMatchMvpSfx = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicBattle_TeamMatchCampaign.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattle_TeamMatchCampaign();
        message.bestTeammateRelation =
            object.bestTeammateRelation?.map((e) => exports.WebcastLinkMicBattle_TeamMatchCampaign_BestTeammateRelation.fromPartial(e)) || [];
        message.startSfxTeamId = object.startSfxTeamId?.map((e) => e) || [];
        message.hasTeamMatchMvpSfx = object.hasTeamMatchMvpSfx ?? false;
        return message;
    },
};
function createBaseWebcastLinkMicBattle_TeamMatchCampaign_BestTeammateRelation() {
    return { userId: "0", bestTeammateId: "0" };
}
exports.WebcastLinkMicBattle_TeamMatchCampaign_BestTeammateRelation = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.userId !== "0") {
            writer.uint32(8).int64(message.userId);
        }
        if (message.bestTeammateId !== "0") {
            writer.uint32(16).int64(message.bestTeammateId);
        }
        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 = createBaseWebcastLinkMicBattle_TeamMatchCampaign_BestTeammateRelation();
        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.bestTeammateId = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicBattle_TeamMatchCampaign_BestTeammateRelation.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattle_TeamMatchCampaign_BestTeammateRelation();
        message.userId = object.userId ?? "0";
        message.bestTeammateId = object.bestTeammateId ?? "0";
        return message;
    },
};
function createBaseWebcastLinkMicBattle_BattleTeamResult() {
    return { teamId: "0", teamUsers: [], result: 0, totalScore: "0" };
}
exports.WebcastLinkMicBattle_BattleTeamResult = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.teamId !== "0") {
            writer.uint32(8).int64(message.teamId);
        }
        for (const v of message.teamUsers) {
            data_1.BattleTeamUser.encode(v, writer.uint32(18).fork()).join();
        }
        if (message.result !== 0) {
            writer.uint32(24).int32(message.result);
        }
        if (message.totalScore !== "0") {
            writer.uint32(32).int64(message.totalScore);
        }
        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 = createBaseWebcastLinkMicBattle_BattleTeamResult();
        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(data_1.BattleTeamUser.decode(reader, reader.uint32()));
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.result = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.totalScore = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicBattle_BattleTeamResult.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattle_BattleTeamResult();
        message.teamId = object.teamId ?? "0";
        message.teamUsers = object.teamUsers?.map((e) => data_1.BattleTeamUser.fromPartial(e)) || [];
        message.result = object.result ?? 0;
        message.totalScore = object.totalScore ?? "0";
        return message;
    },
};
function createBaseWebcastLinkMicBattle_BattleInviteeGiftPermission() {
    return { userId: "0", giftPermissionType: 0 };
}
exports.WebcastLinkMicBattle_BattleInviteeGiftPermission = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.userId !== "0") {
            writer.uint32(8).int64(message.userId);
        }
        if (message.giftPermissionType !== 0) {
            writer.uint32(16).int32(message.giftPermissionType);
        }
        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 = createBaseWebcastLinkMicBattle_BattleInviteeGiftPermission();
        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.giftPermissionType = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicBattle_BattleInviteeGiftPermission.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattle_BattleInviteeGiftPermission();
        message.userId = object.userId ?? "0";
        message.giftPermissionType = object.giftPermissionType ?? 0;
        return message;
    },
};
function createBaseWebcastLinkMicBattle_SupportedActionsWrapper() {
    return { actionType: "0" };
}
exports.WebcastLinkMicBattle_SupportedActionsWrapper = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.actionType !== "0") {
            writer.uint32(8).int64(message.actionType);
        }
        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 = createBaseWebcastLinkMicBattle_SupportedActionsWrapper();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.actionType = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicBattle_SupportedActionsWrapper.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattle_SupportedActionsWrapper();
        message.actionType = object.actionType ?? "0";
        return message;
    },
};
function createBaseWebcastLinkMicBattle_TeamUsersInfo() {
    return { teamId: "0", userIds: [] };
}
exports.WebcastLinkMicBattle_TeamUsersInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.teamId !== "0") {
            writer.uint32(8).int64(message.teamId);
        }
        writer.uint32(18).fork();
        for (const v of message.userIds) {
            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 = createBaseWebcastLinkMicBattle_TeamUsersInfo();
        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 === 16) {
                        message.userIds.push(reader.int64().toString());
                        continue;
                    }
                    if (tag === 18) {
                        const end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) {
                            message.userIds.push(reader.int64().toString());
                        }
                        continue;
                    }
                    break;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicBattle_TeamUsersInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattle_TeamUsersInfo();
        message.teamId = object.teamId ?? "0";
        message.userIds = object.userIds?.map((e) => e) || [];
        return message;
    },
};
function createBaseWebcastLinkMicBattle_BattleComboInfo() {
    return { userId: "0", comboStatus: "0", comboCount: "0", comboIconUrl: "", comboType: 0, comboRuleGuideSchema: "" };
}
exports.WebcastLinkMicBattle_BattleComboInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.userId !== "0") {
            writer.uint32(8).int64(message.userId);
        }
        if (message.comboStatus !== "0") {
            writer.uint32(16).int64(message.comboStatus);
        }
        if (message.comboCount !== "0") {
            writer.uint32(24).int64(message.comboCount);
        }
        if (message.comboIconUrl !== "") {
            writer.uint32(34).string(message.comboIconUrl);
        }
        if (message.comboType !== 0) {
            writer.uint32(40).int32(message.comboType);
        }
        if (message.comboRuleGuideSchema !== "") {
            writer.uint32(50).string(message.comboRuleGuideSchema);
        }
        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 = createBaseWebcastLinkMicBattle_BattleComboInfo();
        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.comboStatus = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.comboCount = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.comboIconUrl = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.comboType = reader.int32();
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.comboRuleGuideSchema = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicBattle_BattleComboInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattle_BattleComboInfo();
        message.userId = object.userId ?? "0";
        message.comboStatus = object.comboStatus ?? "0";
        message.comboCount = object.comboCount ?? "0";
        message.comboIconUrl = object.comboIconUrl ?? "";
        message.comboType = object.comboType ?? 0;
        message.comboRuleGuideSchema = object.comboRuleGuideSchema ?? "";
        return message;
    },
};
function createBaseWebcastLinkMicBattle_BattleResult() {
    return { userId: "0", result: 0, score: "0" };
}
exports.WebcastLinkMicBattle_BattleResult = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.userId !== "0") {
            writer.uint32(8).int64(message.userId);
        }
        if (message.result !== 0) {
            writer.uint32(16).int32(message.result);
        }
        if (message.score !== "0") {
            writer.uint32(24).int64(message.score);
        }
        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 = createBaseWebcastLinkMicBattle_BattleResult();
        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.result = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.score = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicBattle_BattleResult.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattle_BattleResult();
        message.userId = object.userId ?? "0";
        message.result = object.result ?? 0;
        message.score = object.score ?? "0";
        return message;
    },
};
function createBaseWebcastLinkMicBattle_BattleDisplayConfig() {
    return { threshold: 0, text: "", diffThreshold: 0, diffText: "", exemptStrategy: undefined };
}
exports.WebcastLinkMicBattle_BattleDisplayConfig = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.threshold !== 0) {
            writer.uint32(8).int32(message.threshold);
        }
        if (message.text !== "") {
            writer.uint32(18).string(message.text);
        }
        if (message.diffThreshold !== 0) {
            writer.uint32(24).int32(message.diffThreshold);
        }
        if (message.diffText !== "") {
            writer.uint32(34).string(message.diffText);
        }
        if (message.exemptStrategy !== undefined) {
            exports.WebcastLinkMicBattle_BattleDisplayConfig_ExemptStrategy.encode(message.exemptStrategy, 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 = createBaseWebcastLinkMicBattle_BattleDisplayConfig();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.threshold = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.text = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.diffThreshold = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.diffText = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.exemptStrategy = exports.WebcastLinkMicBattle_BattleDisplayConfig_ExemptStrategy.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicBattle_BattleDisplayConfig.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattle_BattleDisplayConfig();
        message.threshold = object.threshold ?? 0;
        message.text = object.text ?? "";
        message.diffThreshold = object.diffThreshold ?? 0;
        message.diffText = object.diffText ?? "";
        message.exemptStrategy = (object.exemptStrategy !== undefined && object.exemptStrategy !== null)
            ? exports.WebcastLinkMicBattle_BattleDisplayConfig_ExemptStrategy.fromPartial(object.exemptStrategy)
            : undefined;
        return message;
    },
};
function createBaseWebcastLinkMicBattle_BattleDisplayConfig_ExemptStrategy() {
    return { exemptBothHost: false, exemptAudienceTop: 0 };
}
exports.WebcastLinkMicBattle_BattleDisplayConfig_ExemptStrategy = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.exemptBothHost !== false) {
            writer.uint32(8).bool(message.exemptBothHost);
        }
        if (message.exemptAudienceTop !== 0) {
            writer.uint32(16).int32(message.exemptAudienceTop);
        }
        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 = createBaseWebcastLinkMicBattle_BattleDisplayConfig_ExemptStrategy();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.exemptBothHost = reader.bool();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.exemptAudienceTop = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicBattle_BattleDisplayConfig_ExemptStrategy.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattle_BattleDisplayConfig_ExemptStrategy();
        message.exemptBothHost = object.exemptBothHost ?? false;
        message.exemptAudienceTop = object.exemptAudienceTop ?? 0;
        return message;
    },
};
function createBaseWebcastLinkMicBattle_BattleUserInfo() {
    return { user: undefined, tags: [] };
}
exports.WebcastLinkMicBattle_BattleUserInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.user !== undefined) {
            exports.WebcastLinkMicBattle_BattleUserInfo_BattleBaseUserInfo.encode(message.user, writer.uint32(10).fork()).join();
        }
        for (const v of message.tags) {
            exports.WebcastLinkMicBattle_BattleUserInfo_BattleRivalTag.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 = createBaseWebcastLinkMicBattle_BattleUserInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.user = exports.WebcastLinkMicBattle_BattleUserInfo_BattleBaseUserInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.tags.push(exports.WebcastLinkMicBattle_BattleUserInfo_BattleRivalTag.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicBattle_BattleUserInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattle_BattleUserInfo();
        message.user = (object.user !== undefined && object.user !== null)
            ? exports.WebcastLinkMicBattle_BattleUserInfo_BattleBaseUserInfo.fromPartial(object.user)
            : undefined;
        message.tags = object.tags?.map((e) => exports.WebcastLinkMicBattle_BattleUserInfo_BattleRivalTag.fromPartial(e)) || [];
        return message;
    },
};
function createBaseWebcastLinkMicBattle_BattleUserInfo_BattleBaseUserInfo() {
    return { userId: "0", nickName: "", avatarThumb: undefined, displayId: "" };
}
exports.WebcastLinkMicBattle_BattleUserInfo_BattleBaseUserInfo = {
    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) {
            data_1.Image.encode(message.avatarThumb, writer.uint32(26).fork()).join();
        }
        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 = createBaseWebcastLinkMicBattle_BattleUserInfo_BattleBaseUserInfo();
        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 = data_1.Image.decode(reader, reader.uint32());
                    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.WebcastLinkMicBattle_BattleUserInfo_BattleBaseUserInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattle_BattleUserInfo_BattleBaseUserInfo();
        message.userId = object.userId ?? "0";
        message.nickName = object.nickName ?? "";
        message.avatarThumb = (object.avatarThumb !== undefined && object.avatarThumb !== null)
            ? data_1.Image.fromPartial(object.avatarThumb)
            : undefined;
        message.displayId = object.displayId ?? "";
        return message;
    },
};
function createBaseWebcastLinkMicBattle_BattleUserInfo_BattleRivalTag() {
    return { bgImage: undefined, iconImage: undefined, content: "" };
}
exports.WebcastLinkMicBattle_BattleUserInfo_BattleRivalTag = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.bgImage !== undefined) {
            data_1.Image.encode(message.bgImage, writer.uint32(10).fork()).join();
        }
        if (message.iconImage !== undefined) {
            data_1.Image.encode(message.iconImage, writer.uint32(18).fork()).join();
        }
        if (message.content !== "") {
            writer.uint32(26).string(message.content);
        }
        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 = createBaseWebcastLinkMicBattle_BattleUserInfo_BattleRivalTag();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.bgImage = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.iconImage = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.content = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicBattle_BattleUserInfo_BattleRivalTag.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattle_BattleUserInfo_BattleRivalTag();
        message.bgImage = (object.bgImage !== undefined && object.bgImage !== null)
            ? data_1.Image.fromPartial(object.bgImage)
            : undefined;
        message.iconImage = (object.iconImage !== undefined && object.iconImage !== null)
            ? data_1.Image.fromPartial(object.iconImage)
            : undefined;
        message.content = object.content ?? "";
        return message;
    },
};
function createBaseWebcastLinkMicBattle_BattleABTestSetting() {
    return { uid: "0", abTestList: undefined };
}
exports.WebcastLinkMicBattle_BattleABTestSetting = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.uid !== "0") {
            writer.uint32(8).int64(message.uid);
        }
        if (message.abTestList !== undefined) {
            exports.WebcastLinkMicBattle_BattleABTestSetting_BattleABTestList.encode(message.abTestList, 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 = createBaseWebcastLinkMicBattle_BattleABTestSetting();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.uid = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.abTestList = exports.WebcastLinkMicBattle_BattleABTestSetting_BattleABTestList.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicBattle_BattleABTestSetting.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattle_BattleABTestSetting();
        message.uid = object.uid ?? "0";
        message.abTestList = (object.abTestList !== undefined && object.abTestList !== null)
            ? exports.WebcastLinkMicBattle_BattleABTestSetting_BattleABTestList.fromPartial(object.abTestList)
            : undefined;
        return message;
    },
};
function createBaseWebcastLinkMicBattle_BattleABTestSetting_BattleABTestList() {
    return { abTestList: [] };
}
exports.WebcastLinkMicBattle_BattleABTestSetting_BattleABTestList = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.abTestList) {
            exports.WebcastLinkMicBattle_BattleABTestSetting_BattleABTestList_BattleABTest.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 = createBaseWebcastLinkMicBattle_BattleABTestSetting_BattleABTestList();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.abTestList.push(exports.WebcastLinkMicBattle_BattleABTestSetting_BattleABTestList_BattleABTest.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicBattle_BattleABTestSetting_BattleABTestList.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattle_BattleABTestSetting_BattleABTestList();
        message.abTestList =
            object.abTestList?.map((e) => exports.WebcastLinkMicBattle_BattleABTestSetting_BattleABTestList_BattleABTest.fromPartial(e)) || [];
        return message;
    },
};
function createBaseWebcastLinkMicBattle_BattleABTestSetting_BattleABTestList_BattleABTest() {
    return { abTestType: 0, group: 0 };
}
exports.WebcastLinkMicBattle_BattleABTestSetting_BattleABTestList_BattleABTest = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.abTestType !== 0) {
            writer.uint32(8).int32(message.abTestType);
        }
        if (message.group !== 0) {
            writer.uint32(16).int32(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 = createBaseWebcastLinkMicBattle_BattleABTestSetting_BattleABTestList_BattleABTest();
        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.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicBattle_BattleABTestSetting_BattleABTestList_BattleABTest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattle_BattleABTestSetting_BattleABTestList_BattleABTest();
        message.abTestType = object.abTestType ?? 0;
        message.group = object.group ?? 0;
        return message;
    },
};
function createBaseWebcastLinkMicArmies() {
    return {
        common: undefined,
        battleId: "0",
        battleItems: {},
        channelId: "0",
        giftSentTime: "0",
        scoreUpdateTime: "0",
        battleStatus: 0,
        fromUserId: "0",
        giftId: "0",
        giftCount: 0,
        gifIconImage: undefined,
        totalDiamondCount: 0,
        repeatCount: 0,
        teamArmies: [],
        triggerCriticalStrike: false,
        hasTeamMatchMvpSfx: false,
        logId: "",
        battleSettings: undefined,
        fuzzyDisplayConfigV2: undefined,
    };
}
exports.WebcastLinkMicArmies = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.battleId !== "0") {
            writer.uint32(16).int64(message.battleId);
        }
        Object.entries(message.battleItems).forEach(([key, value]) => {
            exports.WebcastLinkMicArmies_BattleItemsEntry.encode({ key: key, value }, writer.uint32(26).fork()).join();
        });
        if (message.channelId !== "0") {
            writer.uint32(32).int64(message.channelId);
        }
        if (message.giftSentTime !== "0") {
            writer.uint32(40).int64(message.giftSentTime);
        }
        if (message.scoreUpdateTime !== "0") {
            writer.uint32(48).int64(message.scoreUpdateTime);
        }
        if (message.battleStatus !== 0) {
            writer.uint32(56).int32(message.battleStatus);
        }
        if (message.fromUserId !== "0") {
            writer.uint32(64).int64(message.fromUserId);
        }
        if (message.giftId !== "0") {
            writer.uint32(72).int64(message.giftId);
        }
        if (message.giftCount !== 0) {
            writer.uint32(80).int32(message.giftCount);
        }
        if (message.gifIconImage !== undefined) {
            data_1.Image.encode(message.gifIconImage, writer.uint32(90).fork()).join();
        }
        if (message.totalDiamondCount !== 0) {
            writer.uint32(96).int32(message.totalDiamondCount);
        }
        if (message.repeatCount !== 0) {
            writer.uint32(104).int32(message.repeatCount);
        }
        for (const v of message.teamArmies) {
            data_1.BattleTeamUserArmies.encode(v, writer.uint32(114).fork()).join();
        }
        if (message.triggerCriticalStrike !== false) {
            writer.uint32(120).bool(message.triggerCriticalStrike);
        }
        if (message.hasTeamMatchMvpSfx !== false) {
            writer.uint32(128).bool(message.hasTeamMatchMvpSfx);
        }
        if (message.logId !== "") {
            writer.uint32(138).string(message.logId);
        }
        if (message.battleSettings !== undefined) {
            data_1.BattleSetting.encode(message.battleSettings, writer.uint32(146).fork()).join();
        }
        if (message.fuzzyDisplayConfigV2 !== undefined) {
            data_1.HighScoreControlCfg.encode(message.fuzzyDisplayConfigV2, writer.uint32(154).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 = createBaseWebcastLinkMicArmies();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.battleId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    const entry3 = exports.WebcastLinkMicArmies_BattleItemsEntry.decode(reader, reader.uint32());
                    if (entry3.value !== undefined) {
                        message.battleItems[entry3.key] = entry3.value;
                    }
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.channelId = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.giftSentTime = reader.int64().toString();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.scoreUpdateTime = reader.int64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.battleStatus = reader.int32();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.fromUserId = reader.int64().toString();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.giftId = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.giftCount = reader.int32();
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.gifIconImage = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 12: {
                    if (tag !== 96) {
                        break;
                    }
                    message.totalDiamondCount = reader.int32();
                    continue;
                }
                case 13: {
                    if (tag !== 104) {
                        break;
                    }
                    message.repeatCount = reader.int32();
                    continue;
                }
                case 14: {
                    if (tag !== 114) {
                        break;
                    }
                    message.teamArmies.push(data_1.BattleTeamUserArmies.decode(reader, reader.uint32()));
                    continue;
                }
                case 15: {
                    if (tag !== 120) {
                        break;
                    }
                    message.triggerCriticalStrike = reader.bool();
                    continue;
                }
                case 16: {
                    if (tag !== 128) {
                        break;
                    }
                    message.hasTeamMatchMvpSfx = reader.bool();
                    continue;
                }
                case 17: {
                    if (tag !== 138) {
                        break;
                    }
                    message.logId = reader.string();
                    continue;
                }
                case 18: {
                    if (tag !== 146) {
                        break;
                    }
                    message.battleSettings = data_1.BattleSetting.decode(reader, reader.uint32());
                    continue;
                }
                case 19: {
                    if (tag !== 154) {
                        break;
                    }
                    message.fuzzyDisplayConfigV2 = data_1.HighScoreControlCfg.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicArmies.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicArmies();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.battleId = object.battleId ?? "0";
        message.battleItems = Object.entries(object.battleItems ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = data_1.BattleUserArmies.fromPartial(value);
            }
            return acc;
        }, {});
        message.channelId = object.channelId ?? "0";
        message.giftSentTime = object.giftSentTime ?? "0";
        message.scoreUpdateTime = object.scoreUpdateTime ?? "0";
        message.battleStatus = object.battleStatus ?? 0;
        message.fromUserId = object.fromUserId ?? "0";
        message.giftId = object.giftId ?? "0";
        message.giftCount = object.giftCount ?? 0;
        message.gifIconImage = (object.gifIconImage !== undefined && object.gifIconImage !== null)
            ? data_1.Image.fromPartial(object.gifIconImage)
            : undefined;
        message.totalDiamondCount = object.totalDiamondCount ?? 0;
        message.repeatCount = object.repeatCount ?? 0;
        message.teamArmies = object.teamArmies?.map((e) => data_1.BattleTeamUserArmies.fromPartial(e)) || [];
        message.triggerCriticalStrike = object.triggerCriticalStrike ?? false;
        message.hasTeamMatchMvpSfx = object.hasTeamMatchMvpSfx ?? false;
        message.logId = object.logId ?? "";
        message.battleSettings = (object.battleSettings !== undefined && object.battleSettings !== null)
            ? data_1.BattleSetting.fromPartial(object.battleSettings)
            : undefined;
        message.fuzzyDisplayConfigV2 = (object.fuzzyDisplayConfigV2 !== undefined && object.fuzzyDisplayConfigV2 !== null)
            ? data_1.HighScoreControlCfg.fromPartial(object.fuzzyDisplayConfigV2)
            : undefined;
        return message;
    },
};
function createBaseWebcastLinkMicArmies_BattleItemsEntry() {
    return { key: "0", value: undefined };
}
exports.WebcastLinkMicArmies_BattleItemsEntry = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.key !== "0") {
            writer.uint32(8).int64(message.key);
        }
        if (message.value !== undefined) {
            data_1.BattleUserArmies.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 = createBaseWebcastLinkMicArmies_BattleItemsEntry();
        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 = data_1.BattleUserArmies.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicArmies_BattleItemsEntry.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicArmies_BattleItemsEntry();
        message.key = object.key ?? "0";
        message.value = (object.value !== undefined && object.value !== null)
            ? data_1.BattleUserArmies.fromPartial(object.value)
            : undefined;
        return message;
    },
};
function createBaseWebcastLinkMicArmiesItems() {
    return { hostUserId: "0", battleGroups: [] };
}
exports.WebcastLinkMicArmiesItems = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.hostUserId !== "0") {
            writer.uint32(8).uint64(message.hostUserId);
        }
        for (const v of message.battleGroups) {
            exports.WebcastLinkMicArmiesGroup.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 = createBaseWebcastLinkMicArmiesItems();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.hostUserId = reader.uint64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.battleGroups.push(exports.WebcastLinkMicArmiesGroup.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicArmiesItems.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicArmiesItems();
        message.hostUserId = object.hostUserId ?? "0";
        message.battleGroups = object.battleGroups?.map((e) => exports.WebcastLinkMicArmiesGroup.fromPartial(e)) || [];
        return message;
    },
};
function createBaseWebcastLinkMicArmiesGroup() {
    return { users: [], points: 0 };
}
exports.WebcastLinkMicArmiesGroup = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.users) {
            data_1.User.encode(v, writer.uint32(10).fork()).join();
        }
        if (message.points !== 0) {
            writer.uint32(16).int32(message.points);
        }
        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 = createBaseWebcastLinkMicArmiesGroup();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.users.push(data_1.User.decode(reader, reader.uint32()));
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.points = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicArmiesGroup.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicArmiesGroup();
        message.users = object.users?.map((e) => data_1.User.fromPartial(e)) || [];
        message.points = object.points ?? 0;
        return message;
    },
};
function createBaseWebcastSocialMessage() {
    return {
        common: undefined,
        user: undefined,
        shareType: "0",
        action: "0",
        shareTarget: "",
        followCount: 0,
        shareDisplayStyle: "0",
        shareCount: 0,
        publicAreaMessageCommon: undefined,
        signature: "",
        signatureVersion: "",
        showDurationMs: "0",
    };
}
exports.WebcastSocialMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.user !== undefined) {
            data_1.User.encode(message.user, writer.uint32(18).fork()).join();
        }
        if (message.shareType !== "0") {
            writer.uint32(24).int64(message.shareType);
        }
        if (message.action !== "0") {
            writer.uint32(32).int64(message.action);
        }
        if (message.shareTarget !== "") {
            writer.uint32(42).string(message.shareTarget);
        }
        if (message.followCount !== 0) {
            writer.uint32(48).int32(message.followCount);
        }
        if (message.shareDisplayStyle !== "0") {
            writer.uint32(56).int64(message.shareDisplayStyle);
        }
        if (message.shareCount !== 0) {
            writer.uint32(64).int32(message.shareCount);
        }
        if (message.publicAreaMessageCommon !== undefined) {
            data_1.PublicAreaMessageCommon.encode(message.publicAreaMessageCommon, writer.uint32(74).fork()).join();
        }
        if (message.signature !== "") {
            writer.uint32(82).string(message.signature);
        }
        if (message.signatureVersion !== "") {
            writer.uint32(90).string(message.signatureVersion);
        }
        if (message.showDurationMs !== "0") {
            writer.uint32(96).int64(message.showDurationMs);
        }
        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 = createBaseWebcastSocialMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.user = data_1.User.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.shareType = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.action = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.shareTarget = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.followCount = reader.int32();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.shareDisplayStyle = reader.int64().toString();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.shareCount = reader.int32();
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.publicAreaMessageCommon = data_1.PublicAreaMessageCommon.decode(reader, reader.uint32());
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.signature = reader.string();
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.signatureVersion = reader.string();
                    continue;
                }
                case 12: {
                    if (tag !== 96) {
                        break;
                    }
                    message.showDurationMs = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastSocialMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastSocialMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.user = (object.user !== undefined && object.user !== null) ? data_1.User.fromPartial(object.user) : undefined;
        message.shareType = object.shareType ?? "0";
        message.action = object.action ?? "0";
        message.shareTarget = object.shareTarget ?? "";
        message.followCount = object.followCount ?? 0;
        message.shareDisplayStyle = object.shareDisplayStyle ?? "0";
        message.shareCount = object.shareCount ?? 0;
        message.publicAreaMessageCommon =
            (object.publicAreaMessageCommon !== undefined && object.publicAreaMessageCommon !== null)
                ? data_1.PublicAreaMessageCommon.fromPartial(object.publicAreaMessageCommon)
                : undefined;
        message.signature = object.signature ?? "";
        message.signatureVersion = object.signatureVersion ?? "";
        message.showDurationMs = object.showDurationMs ?? "0";
        return message;
    },
};
function createBaseWebcastLikeMessage() {
    return {
        common: undefined,
        likeCount: 0,
        totalLikeCount: 0,
        color: 0,
        user: undefined,
        icon: "",
        icons: [],
        specifiedDisplayText: [],
        effectCnt: "0",
        likeEffect: [],
        publicAreaMessageCommon: undefined,
        roomMessageHeatLevel: "0",
    };
}
exports.WebcastLikeMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.likeCount !== 0) {
            writer.uint32(16).int32(message.likeCount);
        }
        if (message.totalLikeCount !== 0) {
            writer.uint32(24).int32(message.totalLikeCount);
        }
        if (message.color !== 0) {
            writer.uint32(32).int32(message.color);
        }
        if (message.user !== undefined) {
            data_1.User.encode(message.user, writer.uint32(42).fork()).join();
        }
        if (message.icon !== "") {
            writer.uint32(50).string(message.icon);
        }
        for (const v of message.icons) {
            data_1.Image.encode(v, writer.uint32(58).fork()).join();
        }
        for (const v of message.specifiedDisplayText) {
            exports.SpecifiedDisplayText.encode(v, writer.uint32(66).fork()).join();
        }
        if (message.effectCnt !== "0") {
            writer.uint32(72).int64(message.effectCnt);
        }
        for (const v of message.likeEffect) {
            exports.LikeEffect.encode(v, writer.uint32(82).fork()).join();
        }
        if (message.publicAreaMessageCommon !== undefined) {
            data_1.PublicAreaMessageCommon.encode(message.publicAreaMessageCommon, writer.uint32(90).fork()).join();
        }
        if (message.roomMessageHeatLevel !== "0") {
            writer.uint32(96).int64(message.roomMessageHeatLevel);
        }
        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 = createBaseWebcastLikeMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.likeCount = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.totalLikeCount = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.color = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.user = data_1.User.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.icon = reader.string();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.icons.push(data_1.Image.decode(reader, reader.uint32()));
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.specifiedDisplayText.push(exports.SpecifiedDisplayText.decode(reader, reader.uint32()));
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.effectCnt = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.likeEffect.push(exports.LikeEffect.decode(reader, reader.uint32()));
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.publicAreaMessageCommon = data_1.PublicAreaMessageCommon.decode(reader, reader.uint32());
                    continue;
                }
                case 12: {
                    if (tag !== 96) {
                        break;
                    }
                    message.roomMessageHeatLevel = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLikeMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLikeMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.likeCount = object.likeCount ?? 0;
        message.totalLikeCount = object.totalLikeCount ?? 0;
        message.color = object.color ?? 0;
        message.user = (object.user !== undefined && object.user !== null) ? data_1.User.fromPartial(object.user) : undefined;
        message.icon = object.icon ?? "";
        message.icons = object.icons?.map((e) => data_1.Image.fromPartial(e)) || [];
        message.specifiedDisplayText = object.specifiedDisplayText?.map((e) => exports.SpecifiedDisplayText.fromPartial(e)) || [];
        message.effectCnt = object.effectCnt ?? "0";
        message.likeEffect = object.likeEffect?.map((e) => exports.LikeEffect.fromPartial(e)) || [];
        message.publicAreaMessageCommon =
            (object.publicAreaMessageCommon !== undefined && object.publicAreaMessageCommon !== null)
                ? data_1.PublicAreaMessageCommon.fromPartial(object.publicAreaMessageCommon)
                : undefined;
        message.roomMessageHeatLevel = object.roomMessageHeatLevel ?? "0";
        return message;
    },
};
function createBaseSpecifiedDisplayText() {
    return { uid: "0", displayText: undefined };
}
exports.SpecifiedDisplayText = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.uid !== "0") {
            writer.uint32(8).int64(message.uid);
        }
        if (message.displayText !== undefined) {
            data_1.Text.encode(message.displayText, 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 = createBaseSpecifiedDisplayText();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.uid = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.displayText = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.SpecifiedDisplayText.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseSpecifiedDisplayText();
        message.uid = object.uid ?? "0";
        message.displayText = (object.displayText !== undefined && object.displayText !== null)
            ? data_1.Text.fromPartial(object.displayText)
            : undefined;
        return message;
    },
};
function createBaseLikeEffect() {
    return { version: "0", effectCnt: "0", effectIntervalMs: "0", level: "0" };
}
exports.LikeEffect = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.version !== "0") {
            writer.uint32(8).int64(message.version);
        }
        if (message.effectCnt !== "0") {
            writer.uint32(16).int64(message.effectCnt);
        }
        if (message.effectIntervalMs !== "0") {
            writer.uint32(24).int64(message.effectIntervalMs);
        }
        if (message.level !== "0") {
            writer.uint32(32).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 = createBaseLikeEffect();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.version = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.effectCnt = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.effectIntervalMs = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.level = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.LikeEffect.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLikeEffect();
        message.version = object.version ?? "0";
        message.effectCnt = object.effectCnt ?? "0";
        message.effectIntervalMs = object.effectIntervalMs ?? "0";
        message.level = object.level ?? "0";
        return message;
    },
};
function createBaseWebcastQuestionNewMessage() {
    return { common: undefined, details: undefined };
}
exports.WebcastQuestionNewMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.details !== undefined) {
            exports.WebcastQuestionNewMessage_Question.encode(message.details, 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 = createBaseWebcastQuestionNewMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.details = exports.WebcastQuestionNewMessage_Question.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastQuestionNewMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastQuestionNewMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.details = (object.details !== undefined && object.details !== null)
            ? exports.WebcastQuestionNewMessage_Question.fromPartial(object.details)
            : undefined;
        return message;
    },
};
function createBaseWebcastQuestionNewMessage_Question() {
    return {
        questionId: "0",
        questionText: "",
        answerStatus: 0,
        createTime: "0",
        user: undefined,
        createFrom: 0,
        answerFrom: 0,
    };
}
exports.WebcastQuestionNewMessage_Question = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.questionId !== "0") {
            writer.uint32(8).int64(message.questionId);
        }
        if (message.questionText !== "") {
            writer.uint32(18).string(message.questionText);
        }
        if (message.answerStatus !== 0) {
            writer.uint32(24).int32(message.answerStatus);
        }
        if (message.createTime !== "0") {
            writer.uint32(32).int64(message.createTime);
        }
        if (message.user !== undefined) {
            data_1.User.encode(message.user, writer.uint32(42).fork()).join();
        }
        if (message.createFrom !== 0) {
            writer.uint32(160).int32(message.createFrom);
        }
        if (message.answerFrom !== 0) {
            writer.uint32(168).int32(message.answerFrom);
        }
        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 = createBaseWebcastQuestionNewMessage_Question();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.questionId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.questionText = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.answerStatus = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.createTime = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.user = data_1.User.decode(reader, reader.uint32());
                    continue;
                }
                case 20: {
                    if (tag !== 160) {
                        break;
                    }
                    message.createFrom = reader.int32();
                    continue;
                }
                case 21: {
                    if (tag !== 168) {
                        break;
                    }
                    message.answerFrom = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastQuestionNewMessage_Question.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastQuestionNewMessage_Question();
        message.questionId = object.questionId ?? "0";
        message.questionText = object.questionText ?? "";
        message.answerStatus = object.answerStatus ?? 0;
        message.createTime = object.createTime ?? "0";
        message.user = (object.user !== undefined && object.user !== null) ? data_1.User.fromPartial(object.user) : undefined;
        message.createFrom = object.createFrom ?? 0;
        message.answerFrom = object.answerFrom ?? 0;
        return message;
    },
};
function createBaseWebcastMessageEventDetails() {
    return { displayType: "", label: "" };
}
exports.WebcastMessageEventDetails = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.displayType !== "") {
            writer.uint32(10).string(message.displayType);
        }
        if (message.label !== "") {
            writer.uint32(18).string(message.label);
        }
        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 = createBaseWebcastMessageEventDetails();
        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.label = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastMessageEventDetails.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastMessageEventDetails();
        message.displayType = object.displayType ?? "";
        message.label = object.label ?? "";
        return message;
    },
};
function createBaseWebcastLiveIntroMessage() {
    return {
        common: undefined,
        roomId: "0",
        auditStatus: 0,
        description: "",
        host: undefined,
        introMode: 0,
        badges: [],
        language: "",
    };
}
exports.WebcastLiveIntroMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.roomId !== "0") {
            writer.uint32(16).int64(message.roomId);
        }
        if (message.auditStatus !== 0) {
            writer.uint32(24).int32(message.auditStatus);
        }
        if (message.description !== "") {
            writer.uint32(34).string(message.description);
        }
        if (message.host !== undefined) {
            data_1.User.encode(message.host, writer.uint32(42).fork()).join();
        }
        if (message.introMode !== 0) {
            writer.uint32(48).int32(message.introMode);
        }
        for (const v of message.badges) {
            data_1.BadgeStruct.encode(v, writer.uint32(58).fork()).join();
        }
        if (message.language !== "") {
            writer.uint32(66).string(message.language);
        }
        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 = createBaseWebcastLiveIntroMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.roomId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.auditStatus = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.description = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.host = data_1.User.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.introMode = reader.int32();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.badges.push(data_1.BadgeStruct.decode(reader, reader.uint32()));
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.language = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLiveIntroMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLiveIntroMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.roomId = object.roomId ?? "0";
        message.auditStatus = object.auditStatus ?? 0;
        message.description = object.description ?? "";
        message.host = (object.host !== undefined && object.host !== null) ? data_1.User.fromPartial(object.host) : undefined;
        message.introMode = object.introMode ?? 0;
        message.badges = object.badges?.map((e) => data_1.BadgeStruct.fromPartial(e)) || [];
        message.language = object.language ?? "";
        return message;
    },
};
function createBaseSystemMessage() {
    return { description: "" };
}
exports.SystemMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.description !== "") {
            writer.uint32(18).string(message.description);
        }
        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 = createBaseSystemMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.description = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.SystemMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseSystemMessage();
        message.description = object.description ?? "";
        return message;
    },
};
function createBaseRankItem() {
    return { colour: "", id: "0" };
}
exports.RankItem = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.colour !== "") {
            writer.uint32(10).string(message.colour);
        }
        if (message.id !== "0") {
            writer.uint32(32).uint64(message.id);
        }
        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 = createBaseRankItem();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.colour = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.id = reader.uint64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.RankItem.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRankItem();
        message.colour = object.colour ?? "";
        message.id = object.id ?? "0";
        return message;
    },
};
function createBaseWebcastHourlyRankMessage() {
    return { data: undefined, common: undefined, data2: 0 };
}
exports.WebcastHourlyRankMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.data !== undefined) {
            exports.WebcastHourlyRankMessage_RankContainer.encode(message.data, writer.uint32(18).fork()).join();
        }
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.data2 !== 0) {
            writer.uint32(24).uint32(message.data2);
        }
        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 = createBaseWebcastHourlyRankMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.data = exports.WebcastHourlyRankMessage_RankContainer.decode(reader, reader.uint32());
                    continue;
                }
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.data2 = reader.uint32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastHourlyRankMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastHourlyRankMessage();
        message.data = (object.data !== undefined && object.data !== null)
            ? exports.WebcastHourlyRankMessage_RankContainer.fromPartial(object.data)
            : undefined;
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.data2 = object.data2 ?? 0;
        return message;
    },
};
function createBaseWebcastHourlyRankMessage_RankContainer() {
    return {
        data1: 0,
        rankingData: undefined,
        data2: 0,
        rankings: undefined,
        rankingData2: undefined,
        data3: 0,
        data4: 0,
    };
}
exports.WebcastHourlyRankMessage_RankContainer = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.data1 !== 0) {
            writer.uint32(8).uint32(message.data1);
        }
        if (message.rankingData !== undefined) {
            exports.WebcastHourlyRankMessage_RankContainer_RankingData.encode(message.rankingData, writer.uint32(18).fork()).join();
        }
        if (message.data2 !== 0) {
            writer.uint32(24).uint32(message.data2);
        }
        if (message.rankings !== undefined) {
            data_1.Ranking.encode(message.rankings, writer.uint32(34).fork()).join();
        }
        if (message.rankingData2 !== undefined) {
            exports.WebcastHourlyRankMessage_RankContainer_RankingData2.encode(message.rankingData2, writer.uint32(42).fork()).join();
        }
        if (message.data3 !== 0) {
            writer.uint32(48).uint32(message.data3);
        }
        if (message.data4 !== 0) {
            writer.uint32(56).uint32(message.data4);
        }
        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 = createBaseWebcastHourlyRankMessage_RankContainer();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.data1 = reader.uint32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.rankingData = exports.WebcastHourlyRankMessage_RankContainer_RankingData.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.data2 = reader.uint32();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.rankings = data_1.Ranking.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.rankingData2 = exports.WebcastHourlyRankMessage_RankContainer_RankingData2.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.data3 = reader.uint32();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.data4 = reader.uint32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastHourlyRankMessage_RankContainer.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastHourlyRankMessage_RankContainer();
        message.data1 = object.data1 ?? 0;
        message.rankingData = (object.rankingData !== undefined && object.rankingData !== null)
            ? exports.WebcastHourlyRankMessage_RankContainer_RankingData.fromPartial(object.rankingData)
            : undefined;
        message.data2 = object.data2 ?? 0;
        message.rankings = (object.rankings !== undefined && object.rankings !== null)
            ? data_1.Ranking.fromPartial(object.rankings)
            : undefined;
        message.rankingData2 = (object.rankingData2 !== undefined && object.rankingData2 !== null)
            ? exports.WebcastHourlyRankMessage_RankContainer_RankingData2.fromPartial(object.rankingData2)
            : undefined;
        message.data3 = object.data3 ?? 0;
        message.data4 = object.data4 ?? 0;
        return message;
    },
};
function createBaseWebcastHourlyRankMessage_RankContainer_RankingData() {
    return { data1: 0, rankdata: undefined, data2: "" };
}
exports.WebcastHourlyRankMessage_RankContainer_RankingData = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.data1 !== 0) {
            writer.uint32(8).uint32(message.data1);
        }
        if (message.rankdata !== undefined) {
            data_1.Ranking.encode(message.rankdata, writer.uint32(18).fork()).join();
        }
        if (message.data2 !== "") {
            writer.uint32(26).string(message.data2);
        }
        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 = createBaseWebcastHourlyRankMessage_RankContainer_RankingData();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.data1 = reader.uint32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.rankdata = data_1.Ranking.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.data2 = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastHourlyRankMessage_RankContainer_RankingData.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastHourlyRankMessage_RankContainer_RankingData();
        message.data1 = object.data1 ?? 0;
        message.rankdata = (object.rankdata !== undefined && object.rankdata !== null)
            ? data_1.Ranking.fromPartial(object.rankdata)
            : undefined;
        message.data2 = object.data2 ?? "";
        return message;
    },
};
function createBaseWebcastHourlyRankMessage_RankContainer_RankingData2() {
    return { data1: 0, data2: 0, rankdata: undefined, data3: "", data4: 0, data5: 0 };
}
exports.WebcastHourlyRankMessage_RankContainer_RankingData2 = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.data1 !== 0) {
            writer.uint32(8).uint32(message.data1);
        }
        if (message.data2 !== 0) {
            writer.uint32(16).uint32(message.data2);
        }
        if (message.rankdata !== undefined) {
            data_1.Ranking.encode(message.rankdata, writer.uint32(26).fork()).join();
        }
        if (message.data3 !== "") {
            writer.uint32(34).string(message.data3);
        }
        if (message.data4 !== 0) {
            writer.uint32(40).uint32(message.data4);
        }
        if (message.data5 !== 0) {
            writer.uint32(48).uint32(message.data5);
        }
        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 = createBaseWebcastHourlyRankMessage_RankContainer_RankingData2();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.data1 = reader.uint32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.data2 = reader.uint32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.rankdata = data_1.Ranking.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.data3 = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.data4 = reader.uint32();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.data5 = reader.uint32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastHourlyRankMessage_RankContainer_RankingData2.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastHourlyRankMessage_RankContainer_RankingData2();
        message.data1 = object.data1 ?? 0;
        message.data2 = object.data2 ?? 0;
        message.rankdata = (object.rankdata !== undefined && object.rankdata !== null)
            ? data_1.Ranking.fromPartial(object.rankdata)
            : undefined;
        message.data3 = object.data3 ?? "";
        message.data4 = object.data4 ?? 0;
        message.data5 = object.data5 ?? 0;
        return message;
    },
};
function createBaseEmoteDetails() {
    return { emoteId: "", image: undefined };
}
exports.EmoteDetails = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.emoteId !== "") {
            writer.uint32(10).string(message.emoteId);
        }
        if (message.image !== undefined) {
            exports.EmoteImage.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 = createBaseEmoteDetails();
        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.EmoteImage.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.EmoteDetails.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseEmoteDetails();
        message.emoteId = object.emoteId ?? "";
        message.image = (object.image !== undefined && object.image !== null)
            ? exports.EmoteImage.fromPartial(object.image)
            : undefined;
        return message;
    },
};
function createBaseEmoteImage() {
    return { imageUrl: "" };
}
exports.EmoteImage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.imageUrl !== "") {
            writer.uint32(10).string(message.imageUrl);
        }
        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 = createBaseEmoteImage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.imageUrl = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.EmoteImage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseEmoteImage();
        message.imageUrl = object.imageUrl ?? "";
        return message;
    },
};
function createBaseWebcastEnvelopeMessage() {
    return { common: undefined, envelopeInfo: undefined, display: 0 };
}
exports.WebcastEnvelopeMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.envelopeInfo !== undefined) {
            exports.WebcastEnvelopeMessage_EnvelopeInfo.encode(message.envelopeInfo, writer.uint32(18).fork()).join();
        }
        if (message.display !== 0) {
            writer.uint32(24).int32(message.display);
        }
        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 = createBaseWebcastEnvelopeMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.envelopeInfo = exports.WebcastEnvelopeMessage_EnvelopeInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.display = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastEnvelopeMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastEnvelopeMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.envelopeInfo = (object.envelopeInfo !== undefined && object.envelopeInfo !== null)
            ? exports.WebcastEnvelopeMessage_EnvelopeInfo.fromPartial(object.envelopeInfo)
            : undefined;
        message.display = object.display ?? 0;
        return message;
    },
};
function createBaseWebcastEnvelopeMessage_EnvelopeInfo() {
    return {
        envelopeId: "",
        businessType: 0,
        envelopeIdc: "",
        sendUserName: "",
        diamondCount: 0,
        peopleCount: 0,
        unpackAt: 0,
        sendUserId: "",
        sendUserAvatar: undefined,
        createAt: "",
        roomId: "",
        followShowStatus: 0,
        skinId: 0,
    };
}
exports.WebcastEnvelopeMessage_EnvelopeInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.envelopeId !== "") {
            writer.uint32(10).string(message.envelopeId);
        }
        if (message.businessType !== 0) {
            writer.uint32(16).int32(message.businessType);
        }
        if (message.envelopeIdc !== "") {
            writer.uint32(26).string(message.envelopeIdc);
        }
        if (message.sendUserName !== "") {
            writer.uint32(34).string(message.sendUserName);
        }
        if (message.diamondCount !== 0) {
            writer.uint32(40).int32(message.diamondCount);
        }
        if (message.peopleCount !== 0) {
            writer.uint32(48).int32(message.peopleCount);
        }
        if (message.unpackAt !== 0) {
            writer.uint32(56).int32(message.unpackAt);
        }
        if (message.sendUserId !== "") {
            writer.uint32(66).string(message.sendUserId);
        }
        if (message.sendUserAvatar !== undefined) {
            data_1.Image.encode(message.sendUserAvatar, writer.uint32(74).fork()).join();
        }
        if (message.createAt !== "") {
            writer.uint32(82).string(message.createAt);
        }
        if (message.roomId !== "") {
            writer.uint32(90).string(message.roomId);
        }
        if (message.followShowStatus !== 0) {
            writer.uint32(96).int32(message.followShowStatus);
        }
        if (message.skinId !== 0) {
            writer.uint32(104).int32(message.skinId);
        }
        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 = createBaseWebcastEnvelopeMessage_EnvelopeInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.envelopeId = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.businessType = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.envelopeIdc = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.sendUserName = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.diamondCount = reader.int32();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.peopleCount = reader.int32();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.unpackAt = reader.int32();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.sendUserId = reader.string();
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.sendUserAvatar = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.createAt = reader.string();
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.roomId = reader.string();
                    continue;
                }
                case 12: {
                    if (tag !== 96) {
                        break;
                    }
                    message.followShowStatus = reader.int32();
                    continue;
                }
                case 13: {
                    if (tag !== 104) {
                        break;
                    }
                    message.skinId = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastEnvelopeMessage_EnvelopeInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastEnvelopeMessage_EnvelopeInfo();
        message.envelopeId = object.envelopeId ?? "";
        message.businessType = object.businessType ?? 0;
        message.envelopeIdc = object.envelopeIdc ?? "";
        message.sendUserName = object.sendUserName ?? "";
        message.diamondCount = object.diamondCount ?? 0;
        message.peopleCount = object.peopleCount ?? 0;
        message.unpackAt = object.unpackAt ?? 0;
        message.sendUserId = object.sendUserId ?? "";
        message.sendUserAvatar = (object.sendUserAvatar !== undefined && object.sendUserAvatar !== null)
            ? data_1.Image.fromPartial(object.sendUserAvatar)
            : undefined;
        message.createAt = object.createAt ?? "";
        message.roomId = object.roomId ?? "";
        message.followShowStatus = object.followShowStatus ?? 0;
        message.skinId = object.skinId ?? 0;
        return message;
    },
};
function createBaseTreasureBoxData() {
    return { coins: 0, canOpen: 0, timestamp: "0" };
}
exports.TreasureBoxData = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.coins !== 0) {
            writer.uint32(40).uint32(message.coins);
        }
        if (message.canOpen !== 0) {
            writer.uint32(48).uint32(message.canOpen);
        }
        if (message.timestamp !== "0") {
            writer.uint32(56).uint64(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 = createBaseTreasureBoxData();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.coins = reader.uint32();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.canOpen = reader.uint32();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.timestamp = reader.uint64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.TreasureBoxData.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseTreasureBoxData();
        message.coins = object.coins ?? 0;
        message.canOpen = object.canOpen ?? 0;
        message.timestamp = object.timestamp ?? "0";
        return message;
    },
};
function createBaseWebcastSubNotifyMessage() {
    return {
        common: undefined,
        user: undefined,
        exhibitionType: 0,
        subMonth: "0",
        subscribeType: 0,
        oldSubscribeStatus: 0,
        subscribeMessageType: undefined,
        subscribingStatus: 0,
        isSend: false,
        isCustom: false,
        giftSource: 0,
        messageDisplayStyle: 0,
        publicAreaMessageCommon: undefined,
        packageId: "",
        eventTracking: undefined,
    };
}
exports.WebcastSubNotifyMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.user !== undefined) {
            data_1.User.encode(message.user, writer.uint32(18).fork()).join();
        }
        if (message.exhibitionType !== 0) {
            writer.uint32(24).int32(message.exhibitionType);
        }
        if (message.subMonth !== "0") {
            writer.uint32(32).int64(message.subMonth);
        }
        if (message.subscribeType !== 0) {
            writer.uint32(40).int32(message.subscribeType);
        }
        if (message.oldSubscribeStatus !== 0) {
            writer.uint32(48).int32(message.oldSubscribeStatus);
        }
        if (message.subscribeMessageType !== undefined) {
            writer.uint32(56).int32(message.subscribeMessageType);
        }
        if (message.subscribingStatus !== 0) {
            writer.uint32(64).int32(message.subscribingStatus);
        }
        if (message.isSend !== false) {
            writer.uint32(72).bool(message.isSend);
        }
        if (message.isCustom !== false) {
            writer.uint32(80).bool(message.isCustom);
        }
        if (message.giftSource !== 0) {
            writer.uint32(88).int32(message.giftSource);
        }
        if (message.messageDisplayStyle !== 0) {
            writer.uint32(96).int32(message.messageDisplayStyle);
        }
        if (message.publicAreaMessageCommon !== undefined) {
            data_1.PublicAreaMessageCommon.encode(message.publicAreaMessageCommon, writer.uint32(106).fork()).join();
        }
        if (message.packageId !== "") {
            writer.uint32(114).string(message.packageId);
        }
        if (message.eventTracking !== undefined) {
            exports.WebcastSubNotifyMessage_EventTracking.encode(message.eventTracking, writer.uint32(122).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 = createBaseWebcastSubNotifyMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.user = data_1.User.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.exhibitionType = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.subMonth = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.subscribeType = reader.int32();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.oldSubscribeStatus = reader.int32();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.subscribeMessageType = reader.int32();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.subscribingStatus = reader.int32();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.isSend = reader.bool();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.isCustom = reader.bool();
                    continue;
                }
                case 11: {
                    if (tag !== 88) {
                        break;
                    }
                    message.giftSource = reader.int32();
                    continue;
                }
                case 12: {
                    if (tag !== 96) {
                        break;
                    }
                    message.messageDisplayStyle = reader.int32();
                    continue;
                }
                case 13: {
                    if (tag !== 106) {
                        break;
                    }
                    message.publicAreaMessageCommon = data_1.PublicAreaMessageCommon.decode(reader, reader.uint32());
                    continue;
                }
                case 14: {
                    if (tag !== 114) {
                        break;
                    }
                    message.packageId = reader.string();
                    continue;
                }
                case 15: {
                    if (tag !== 122) {
                        break;
                    }
                    message.eventTracking = exports.WebcastSubNotifyMessage_EventTracking.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastSubNotifyMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastSubNotifyMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.user = (object.user !== undefined && object.user !== null) ? data_1.User.fromPartial(object.user) : undefined;
        message.exhibitionType = object.exhibitionType ?? 0;
        message.subMonth = object.subMonth ?? "0";
        message.subscribeType = object.subscribeType ?? 0;
        message.oldSubscribeStatus = object.oldSubscribeStatus ?? 0;
        message.subscribeMessageType = object.subscribeMessageType ?? undefined;
        message.subscribingStatus = object.subscribingStatus ?? 0;
        message.isSend = object.isSend ?? false;
        message.isCustom = object.isCustom ?? false;
        message.giftSource = object.giftSource ?? 0;
        message.messageDisplayStyle = object.messageDisplayStyle ?? 0;
        message.publicAreaMessageCommon =
            (object.publicAreaMessageCommon !== undefined && object.publicAreaMessageCommon !== null)
                ? data_1.PublicAreaMessageCommon.fromPartial(object.publicAreaMessageCommon)
                : undefined;
        message.packageId = object.packageId ?? "";
        message.eventTracking = (object.eventTracking !== undefined && object.eventTracking !== null)
            ? exports.WebcastSubNotifyMessage_EventTracking.fromPartial(object.eventTracking)
            : undefined;
        return message;
    },
};
function createBaseWebcastSubNotifyMessage_EventTracking() {
    return { giftSubSenderId: "0", giftSubReceiverId: "0", anchorId: "0", giftSubOrderCreateTime: "0" };
}
exports.WebcastSubNotifyMessage_EventTracking = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.giftSubSenderId !== "0") {
            writer.uint32(8).int64(message.giftSubSenderId);
        }
        if (message.giftSubReceiverId !== "0") {
            writer.uint32(16).int64(message.giftSubReceiverId);
        }
        if (message.anchorId !== "0") {
            writer.uint32(24).int64(message.anchorId);
        }
        if (message.giftSubOrderCreateTime !== "0") {
            writer.uint32(32).int64(message.giftSubOrderCreateTime);
        }
        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 = createBaseWebcastSubNotifyMessage_EventTracking();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.giftSubSenderId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.giftSubReceiverId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.anchorId = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.giftSubOrderCreateTime = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastSubNotifyMessage_EventTracking.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastSubNotifyMessage_EventTracking();
        message.giftSubSenderId = object.giftSubSenderId ?? "0";
        message.giftSubReceiverId = object.giftSubReceiverId ?? "0";
        message.anchorId = object.anchorId ?? "0";
        message.giftSubOrderCreateTime = object.giftSubOrderCreateTime ?? "0";
        return message;
    },
};
function createBaseFollowInfo() {
    return { followingCount: 0, followerCount: 0, followStatus: 0, pushStatus: 0 };
}
exports.FollowInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.followingCount !== 0) {
            writer.uint32(8).int32(message.followingCount);
        }
        if (message.followerCount !== 0) {
            writer.uint32(16).int32(message.followerCount);
        }
        if (message.followStatus !== 0) {
            writer.uint32(24).int32(message.followStatus);
        }
        if (message.pushStatus !== 0) {
            writer.uint32(32).int32(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 = createBaseFollowInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.followingCount = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.followerCount = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.followStatus = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.pushStatus = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.FollowInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseFollowInfo();
        message.followingCount = object.followingCount ?? 0;
        message.followerCount = object.followerCount ?? 0;
        message.followStatus = object.followStatus ?? 0;
        message.pushStatus = object.pushStatus ?? 0;
        return message;
    },
};
function createBaseProfilePicture() {
    return { urls: [] };
}
exports.ProfilePicture = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.urls) {
            writer.uint32(10).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 = createBaseProfilePicture();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.urls.push(reader.string());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.ProfilePicture.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseProfilePicture();
        message.urls = object.urls?.map((e) => e) || [];
        return message;
    },
};
function createBaseUserBadgesAttributes() {
    return { badgeSceneType: 0, imageBadges: [], badges: [], privilegeLogExtra: undefined };
}
exports.UserBadgesAttributes = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.badgeSceneType !== 0) {
            writer.uint32(24).int32(message.badgeSceneType);
        }
        for (const v of message.imageBadges) {
            exports.UserImageBadge.encode(v, writer.uint32(162).fork()).join();
        }
        for (const v of message.badges) {
            exports.UserBadge.encode(v, writer.uint32(170).fork()).join();
        }
        if (message.privilegeLogExtra !== undefined) {
            data_1.PrivilegeLogExtra.encode(message.privilegeLogExtra, 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 = createBaseUserBadgesAttributes();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.badgeSceneType = reader.int32();
                    continue;
                }
                case 20: {
                    if (tag !== 162) {
                        break;
                    }
                    message.imageBadges.push(exports.UserImageBadge.decode(reader, reader.uint32()));
                    continue;
                }
                case 21: {
                    if (tag !== 170) {
                        break;
                    }
                    message.badges.push(exports.UserBadge.decode(reader, reader.uint32()));
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.privilegeLogExtra = data_1.PrivilegeLogExtra.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.UserBadgesAttributes.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUserBadgesAttributes();
        message.badgeSceneType = object.badgeSceneType ?? 0;
        message.imageBadges = object.imageBadges?.map((e) => exports.UserImageBadge.fromPartial(e)) || [];
        message.badges = object.badges?.map((e) => exports.UserBadge.fromPartial(e)) || [];
        message.privilegeLogExtra = (object.privilegeLogExtra !== undefined && object.privilegeLogExtra !== null)
            ? data_1.PrivilegeLogExtra.fromPartial(object.privilegeLogExtra)
            : undefined;
        return message;
    },
};
function createBaseUserBadge() {
    return { type: "", name: "" };
}
exports.UserBadge = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.type !== "") {
            writer.uint32(18).string(message.type);
        }
        if (message.name !== "") {
            writer.uint32(26).string(message.name);
        }
        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 = createBaseUserBadge();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.type = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.name = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.UserBadge.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUserBadge();
        message.type = object.type ?? "";
        message.name = object.name ?? "";
        return message;
    },
};
function createBaseUserImageBadge() {
    return { displayType: 0, image: undefined };
}
exports.UserImageBadge = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.displayType !== 0) {
            writer.uint32(8).int32(message.displayType);
        }
        if (message.image !== undefined) {
            exports.UserImageBadgeImage.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 = createBaseUserImageBadge();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.displayType = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.image = exports.UserImageBadgeImage.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.UserImageBadge.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUserImageBadge();
        message.displayType = object.displayType ?? 0;
        message.image = (object.image !== undefined && object.image !== null)
            ? exports.UserImageBadgeImage.fromPartial(object.image)
            : undefined;
        return message;
    },
};
function createBaseUserImageBadgeImage() {
    return { url: "" };
}
exports.UserImageBadgeImage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.url !== "") {
            writer.uint32(10).string(message.url);
        }
        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 = createBaseUserImageBadgeImage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.url = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.UserImageBadgeImage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUserImageBadgeImage();
        message.url = object.url ?? "";
        return message;
    },
};
function createBaseWebSocketAckMessage() {
    return { id: "0", type: "" };
}
exports.WebSocketAckMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.id !== "0") {
            writer.uint32(16).uint64(message.id);
        }
        if (message.type !== "") {
            writer.uint32(58).string(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 = createBaseWebSocketAckMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.id = reader.uint64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.type = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebSocketAckMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebSocketAckMessage();
        message.id = object.id ?? "0";
        message.type = object.type ?? "";
        return message;
    },
};
function createBaseHeartbeatFrameRoomInfo() {
    return { roomId: "0" };
}
exports.HeartbeatFrameRoomInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.roomId !== "0") {
            writer.uint32(8).uint64(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 = createBaseHeartbeatFrameRoomInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.roomId = reader.uint64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.HeartbeatFrameRoomInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseHeartbeatFrameRoomInfo();
        message.roomId = object.roomId ?? "0";
        return message;
    },
};
function createBaseHeartbeatFrameMetadataField6() {
    return { unknown1: 0 };
}
exports.HeartbeatFrameMetadataField6 = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.unknown1 !== 0) {
            writer.uint32(112).uint32(message.unknown1);
        }
        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 = createBaseHeartbeatFrameMetadataField6();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 14: {
                    if (tag !== 112) {
                        break;
                    }
                    message.unknown1 = reader.uint32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.HeartbeatFrameMetadataField6.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseHeartbeatFrameMetadataField6();
        message.unknown1 = object.unknown1 ?? 0;
        return message;
    },
};
function createBaseHeartbeatFrameMetadataField7() {
    return { unknown1: 0 };
}
exports.HeartbeatFrameMetadataField7 = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.unknown1 !== 0) {
            writer.uint32(104).uint32(message.unknown1);
        }
        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 = createBaseHeartbeatFrameMetadataField7();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 13: {
                    if (tag !== 104) {
                        break;
                    }
                    message.unknown1 = reader.uint32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.HeartbeatFrameMetadataField7.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseHeartbeatFrameMetadataField7();
        message.unknown1 = object.unknown1 ?? 0;
        return message;
    },
};
function createBaseHeartbeatFrame() {
    return { metadataField6: undefined, metadataField7: undefined, roomInfo: undefined };
}
exports.HeartbeatFrame = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.metadataField6 !== undefined) {
            exports.HeartbeatFrameMetadataField6.encode(message.metadataField6, writer.uint32(50).fork()).join();
        }
        if (message.metadataField7 !== undefined) {
            exports.HeartbeatFrameMetadataField7.encode(message.metadataField7, writer.uint32(58).fork()).join();
        }
        if (message.roomInfo !== undefined) {
            exports.HeartbeatFrameRoomInfo.encode(message.roomInfo, writer.uint32(66).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 = createBaseHeartbeatFrame();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.metadataField6 = exports.HeartbeatFrameMetadataField6.decode(reader, reader.uint32());
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.metadataField7 = exports.HeartbeatFrameMetadataField7.decode(reader, reader.uint32());
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.roomInfo = exports.HeartbeatFrameRoomInfo.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.HeartbeatFrame.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseHeartbeatFrame();
        message.metadataField6 = (object.metadataField6 !== undefined && object.metadataField6 !== null)
            ? exports.HeartbeatFrameMetadataField6.fromPartial(object.metadataField6)
            : undefined;
        message.metadataField7 = (object.metadataField7 !== undefined && object.metadataField7 !== null)
            ? exports.HeartbeatFrameMetadataField7.fromPartial(object.metadataField7)
            : undefined;
        message.roomInfo = (object.roomInfo !== undefined && object.roomInfo !== null)
            ? exports.HeartbeatFrameRoomInfo.fromPartial(object.roomInfo)
            : undefined;
        return message;
    },
};
function createBaseImEnterRoomMessagePushFrame() {
    return { metadata: undefined, payloadType: "", payload: undefined };
}
exports.ImEnterRoomMessagePushFrame = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.metadata !== undefined) {
            exports.ImEnterRoomMessagePushFrame_Metadata.encode(message.metadata, writer.uint32(50).fork()).join();
        }
        if (message.payloadType !== "") {
            writer.uint32(58).string(message.payloadType);
        }
        if (message.payload !== undefined) {
            exports.ImEnterRoomMessagePushFrame_ImEnterRoomMessage.encode(message.payload, writer.uint32(66).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 = createBaseImEnterRoomMessagePushFrame();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.metadata = exports.ImEnterRoomMessagePushFrame_Metadata.decode(reader, reader.uint32());
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.payloadType = reader.string();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.payload = exports.ImEnterRoomMessagePushFrame_ImEnterRoomMessage.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.ImEnterRoomMessagePushFrame.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseImEnterRoomMessagePushFrame();
        message.metadata = (object.metadata !== undefined && object.metadata !== null)
            ? exports.ImEnterRoomMessagePushFrame_Metadata.fromPartial(object.metadata)
            : undefined;
        message.payloadType = object.payloadType ?? "";
        message.payload = (object.payload !== undefined && object.payload !== null)
            ? exports.ImEnterRoomMessagePushFrame_ImEnterRoomMessage.fromPartial(object.payload)
            : undefined;
        return message;
    },
};
function createBaseImEnterRoomMessagePushFrame_Metadata() {
    return { unknown1: 0 };
}
exports.ImEnterRoomMessagePushFrame_Metadata = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.unknown1 !== 0) {
            writer.uint32(112).uint32(message.unknown1);
        }
        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 = createBaseImEnterRoomMessagePushFrame_Metadata();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 14: {
                    if (tag !== 112) {
                        break;
                    }
                    message.unknown1 = reader.uint32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.ImEnterRoomMessagePushFrame_Metadata.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseImEnterRoomMessagePushFrame_Metadata();
        message.unknown1 = object.unknown1 ?? 0;
        return message;
    },
};
function createBaseImEnterRoomMessagePushFrame_ImEnterRoomMessage() {
    return { roomId: "0", unknown1: 0, role: "", cursor: "", unknown2: undefined, unknown3: "", unknown4: undefined };
}
exports.ImEnterRoomMessagePushFrame_ImEnterRoomMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.roomId !== "0") {
            writer.uint32(8).uint64(message.roomId);
        }
        if (message.unknown1 !== 0) {
            writer.uint32(32).uint32(message.unknown1);
        }
        if (message.role !== "") {
            writer.uint32(42).string(message.role);
        }
        if (message.cursor !== "") {
            writer.uint32(50).string(message.cursor);
        }
        if (message.unknown2 !== undefined) {
            writer.uint32(56).int32(message.unknown2);
        }
        if (message.unknown3 !== "") {
            writer.uint32(74).string(message.unknown3);
        }
        if (message.unknown4 !== undefined) {
            writer.uint32(80).int32(message.unknown4);
        }
        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 = createBaseImEnterRoomMessagePushFrame_ImEnterRoomMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.roomId = reader.uint64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.unknown1 = reader.uint32();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.role = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.cursor = reader.string();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.unknown2 = reader.int32();
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.unknown3 = reader.string();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.unknown4 = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.ImEnterRoomMessagePushFrame_ImEnterRoomMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseImEnterRoomMessagePushFrame_ImEnterRoomMessage();
        message.roomId = object.roomId ?? "0";
        message.unknown1 = object.unknown1 ?? 0;
        message.role = object.role ?? "";
        message.cursor = object.cursor ?? "";
        message.unknown2 = object.unknown2 ?? undefined;
        message.unknown3 = object.unknown3 ?? "";
        message.unknown4 = object.unknown4 ?? undefined;
        return message;
    },
};
function createBaseWebcastBarrageMessage() {
    return {
        common: undefined,
        event: undefined,
        msgType: undefined,
        icon: undefined,
        duration: "0",
        backGround: undefined,
        rightIcon: undefined,
        displayConfig: 0,
        galleryGiftId: "0",
        useMarquee: false,
        showType: undefined,
        renderType: undefined,
        leftIconDisplayType: undefined,
        ribbonAnimation: undefined,
        hybridUrl: "",
        schema: "",
        subType: "",
        privilegeLogExtra: undefined,
        content: undefined,
        scene: 0,
        control: undefined,
        rightLabel: undefined,
        badge: undefined,
        animationData: undefined,
        commonBarrageContent: undefined,
        userGradeParam: undefined,
        fansLevelParam: undefined,
        subscribeGiftParam: undefined,
        giftGalleryParams: undefined,
    };
}
exports.WebcastBarrageMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.event !== undefined) {
            exports.WebcastBarrageMessage_BarrageEvent.encode(message.event, writer.uint32(18).fork()).join();
        }
        if (message.msgType !== undefined) {
            writer.uint32(24).int32(message.msgType);
        }
        if (message.icon !== undefined) {
            exports.ImageModel.encode(message.icon, writer.uint32(34).fork()).join();
        }
        if (message.duration !== "0") {
            writer.uint32(48).int64(message.duration);
        }
        if (message.backGround !== undefined) {
            exports.ImageModel.encode(message.backGround, writer.uint32(58).fork()).join();
        }
        if (message.rightIcon !== undefined) {
            exports.ImageModel.encode(message.rightIcon, writer.uint32(66).fork()).join();
        }
        if (message.displayConfig !== 0) {
            writer.uint32(72).int32(message.displayConfig);
        }
        if (message.galleryGiftId !== "0") {
            writer.uint32(80).int64(message.galleryGiftId);
        }
        if (message.useMarquee !== false) {
            writer.uint32(112).bool(message.useMarquee);
        }
        if (message.showType !== undefined) {
            writer.uint32(120).int32(message.showType);
        }
        if (message.renderType !== undefined) {
            writer.uint32(136).int32(message.renderType);
        }
        if (message.leftIconDisplayType !== undefined) {
            writer.uint32(144).int32(message.leftIconDisplayType);
        }
        if (message.ribbonAnimation !== undefined) {
            exports.ImageModel.encode(message.ribbonAnimation, writer.uint32(154).fork()).join();
        }
        if (message.hybridUrl !== "") {
            writer.uint32(170).string(message.hybridUrl);
        }
        if (message.schema !== "") {
            writer.uint32(178).string(message.schema);
        }
        if (message.subType !== "") {
            writer.uint32(186).string(message.subType);
        }
        if (message.privilegeLogExtra !== undefined) {
            data_1.PrivilegeLogExtra.encode(message.privilegeLogExtra, writer.uint32(826).fork()).join();
        }
        if (message.content !== undefined) {
            data_1.Text.encode(message.content, writer.uint32(42).fork()).join();
        }
        if (message.scene !== 0) {
            writer.uint32(88).int32(message.scene);
        }
        if (message.control !== undefined) {
            exports.WebcastBarrageMessage_DisplayControl.encode(message.control, writer.uint32(98).fork()).join();
        }
        if (message.rightLabel !== undefined) {
            exports.WebcastBarrageMessage_RightLabel.encode(message.rightLabel, writer.uint32(106).fork()).join();
        }
        if (message.badge !== undefined) {
            data_1.BadgeStruct.encode(message.badge, writer.uint32(130).fork()).join();
        }
        if (message.animationData !== undefined) {
            exports.WebcastBarrageMessage_AnimationData.encode(message.animationData, writer.uint32(162).fork()).join();
        }
        if (message.commonBarrageContent !== undefined) {
            data_1.Text.encode(message.commonBarrageContent, writer.uint32(194).fork()).join();
        }
        if (message.userGradeParam !== undefined) {
            exports.WebcastBarrageMessage_BarrageTypeUserGradeParam.encode(message.userGradeParam, writer.uint32(802).fork()).join();
        }
        if (message.fansLevelParam !== undefined) {
            exports.WebcastBarrageMessage_BarrageTypeFansLevelParam.encode(message.fansLevelParam, writer.uint32(810).fork()).join();
        }
        if (message.subscribeGiftParam !== undefined) {
            exports.WebcastBarrageMessage_BarrageTypeSubscribeGiftParam.encode(message.subscribeGiftParam, writer.uint32(818).fork())
                .join();
        }
        if (message.giftGalleryParams !== undefined) {
            exports.WebcastBarrageMessage_BarrageTypeGiftGalleryParam.encode(message.giftGalleryParams, writer.uint32(834).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 = createBaseWebcastBarrageMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.event = exports.WebcastBarrageMessage_BarrageEvent.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.msgType = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.icon = exports.ImageModel.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.duration = reader.int64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.backGround = exports.ImageModel.decode(reader, reader.uint32());
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.rightIcon = exports.ImageModel.decode(reader, reader.uint32());
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.displayConfig = reader.int32();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.galleryGiftId = reader.int64().toString();
                    continue;
                }
                case 14: {
                    if (tag !== 112) {
                        break;
                    }
                    message.useMarquee = reader.bool();
                    continue;
                }
                case 15: {
                    if (tag !== 120) {
                        break;
                    }
                    message.showType = reader.int32();
                    continue;
                }
                case 17: {
                    if (tag !== 136) {
                        break;
                    }
                    message.renderType = reader.int32();
                    continue;
                }
                case 18: {
                    if (tag !== 144) {
                        break;
                    }
                    message.leftIconDisplayType = reader.int32();
                    continue;
                }
                case 19: {
                    if (tag !== 154) {
                        break;
                    }
                    message.ribbonAnimation = exports.ImageModel.decode(reader, reader.uint32());
                    continue;
                }
                case 21: {
                    if (tag !== 170) {
                        break;
                    }
                    message.hybridUrl = reader.string();
                    continue;
                }
                case 22: {
                    if (tag !== 178) {
                        break;
                    }
                    message.schema = reader.string();
                    continue;
                }
                case 23: {
                    if (tag !== 186) {
                        break;
                    }
                    message.subType = reader.string();
                    continue;
                }
                case 103: {
                    if (tag !== 826) {
                        break;
                    }
                    message.privilegeLogExtra = data_1.PrivilegeLogExtra.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.content = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 11: {
                    if (tag !== 88) {
                        break;
                    }
                    message.scene = reader.int32();
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.control = exports.WebcastBarrageMessage_DisplayControl.decode(reader, reader.uint32());
                    continue;
                }
                case 13: {
                    if (tag !== 106) {
                        break;
                    }
                    message.rightLabel = exports.WebcastBarrageMessage_RightLabel.decode(reader, reader.uint32());
                    continue;
                }
                case 16: {
                    if (tag !== 130) {
                        break;
                    }
                    message.badge = data_1.BadgeStruct.decode(reader, reader.uint32());
                    continue;
                }
                case 20: {
                    if (tag !== 162) {
                        break;
                    }
                    message.animationData = exports.WebcastBarrageMessage_AnimationData.decode(reader, reader.uint32());
                    continue;
                }
                case 24: {
                    if (tag !== 194) {
                        break;
                    }
                    message.commonBarrageContent = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 100: {
                    if (tag !== 802) {
                        break;
                    }
                    message.userGradeParam = exports.WebcastBarrageMessage_BarrageTypeUserGradeParam.decode(reader, reader.uint32());
                    continue;
                }
                case 101: {
                    if (tag !== 810) {
                        break;
                    }
                    message.fansLevelParam = exports.WebcastBarrageMessage_BarrageTypeFansLevelParam.decode(reader, reader.uint32());
                    continue;
                }
                case 102: {
                    if (tag !== 818) {
                        break;
                    }
                    message.subscribeGiftParam = exports.WebcastBarrageMessage_BarrageTypeSubscribeGiftParam.decode(reader, reader.uint32());
                    continue;
                }
                case 104: {
                    if (tag !== 834) {
                        break;
                    }
                    message.giftGalleryParams = exports.WebcastBarrageMessage_BarrageTypeGiftGalleryParam.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastBarrageMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastBarrageMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.event = (object.event !== undefined && object.event !== null)
            ? exports.WebcastBarrageMessage_BarrageEvent.fromPartial(object.event)
            : undefined;
        message.msgType = object.msgType ?? undefined;
        message.icon = (object.icon !== undefined && object.icon !== null)
            ? exports.ImageModel.fromPartial(object.icon)
            : undefined;
        message.duration = object.duration ?? "0";
        message.backGround = (object.backGround !== undefined && object.backGround !== null)
            ? exports.ImageModel.fromPartial(object.backGround)
            : undefined;
        message.rightIcon = (object.rightIcon !== undefined && object.rightIcon !== null)
            ? exports.ImageModel.fromPartial(object.rightIcon)
            : undefined;
        message.displayConfig = object.displayConfig ?? 0;
        message.galleryGiftId = object.galleryGiftId ?? "0";
        message.useMarquee = object.useMarquee ?? false;
        message.showType = object.showType ?? undefined;
        message.renderType = object.renderType ?? undefined;
        message.leftIconDisplayType = object.leftIconDisplayType ?? undefined;
        message.ribbonAnimation = (object.ribbonAnimation !== undefined && object.ribbonAnimation !== null)
            ? exports.ImageModel.fromPartial(object.ribbonAnimation)
            : undefined;
        message.hybridUrl = object.hybridUrl ?? "";
        message.schema = object.schema ?? "";
        message.subType = object.subType ?? "";
        message.privilegeLogExtra = (object.privilegeLogExtra !== undefined && object.privilegeLogExtra !== null)
            ? data_1.PrivilegeLogExtra.fromPartial(object.privilegeLogExtra)
            : undefined;
        message.content = (object.content !== undefined && object.content !== null)
            ? data_1.Text.fromPartial(object.content)
            : undefined;
        message.scene = object.scene ?? 0;
        message.control = (object.control !== undefined && object.control !== null)
            ? exports.WebcastBarrageMessage_DisplayControl.fromPartial(object.control)
            : undefined;
        message.rightLabel = (object.rightLabel !== undefined && object.rightLabel !== null)
            ? exports.WebcastBarrageMessage_RightLabel.fromPartial(object.rightLabel)
            : undefined;
        message.badge = (object.badge !== undefined && object.badge !== null)
            ? data_1.BadgeStruct.fromPartial(object.badge)
            : undefined;
        message.animationData = (object.animationData !== undefined && object.animationData !== null)
            ? exports.WebcastBarrageMessage_AnimationData.fromPartial(object.animationData)
            : undefined;
        message.commonBarrageContent = (object.commonBarrageContent !== undefined && object.commonBarrageContent !== null)
            ? data_1.Text.fromPartial(object.commonBarrageContent)
            : undefined;
        message.userGradeParam = (object.userGradeParam !== undefined && object.userGradeParam !== null)
            ? exports.WebcastBarrageMessage_BarrageTypeUserGradeParam.fromPartial(object.userGradeParam)
            : undefined;
        message.fansLevelParam = (object.fansLevelParam !== undefined && object.fansLevelParam !== null)
            ? exports.WebcastBarrageMessage_BarrageTypeFansLevelParam.fromPartial(object.fansLevelParam)
            : undefined;
        message.subscribeGiftParam = (object.subscribeGiftParam !== undefined && object.subscribeGiftParam !== null)
            ? exports.WebcastBarrageMessage_BarrageTypeSubscribeGiftParam.fromPartial(object.subscribeGiftParam)
            : undefined;
        message.giftGalleryParams = (object.giftGalleryParams !== undefined && object.giftGalleryParams !== null)
            ? exports.WebcastBarrageMessage_BarrageTypeGiftGalleryParam.fromPartial(object.giftGalleryParams)
            : undefined;
        return message;
    },
};
function createBaseWebcastBarrageMessage_BarrageEvent() {
    return { eventName: "", params: {} };
}
exports.WebcastBarrageMessage_BarrageEvent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.eventName !== "") {
            writer.uint32(10).string(message.eventName);
        }
        Object.entries(message.params).forEach(([key, value]) => {
            exports.WebcastBarrageMessage_BarrageEvent_ParamsEntry.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 = createBaseWebcastBarrageMessage_BarrageEvent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.eventName = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    const entry2 = exports.WebcastBarrageMessage_BarrageEvent_ParamsEntry.decode(reader, reader.uint32());
                    if (entry2.value !== undefined) {
                        message.params[entry2.key] = entry2.value;
                    }
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastBarrageMessage_BarrageEvent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastBarrageMessage_BarrageEvent();
        message.eventName = object.eventName ?? "";
        message.params = Object.entries(object.params ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = globalThis.String(value);
            }
            return acc;
        }, {});
        return message;
    },
};
function createBaseWebcastBarrageMessage_BarrageEvent_ParamsEntry() {
    return { key: "", value: "" };
}
exports.WebcastBarrageMessage_BarrageEvent_ParamsEntry = {
    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 = createBaseWebcastBarrageMessage_BarrageEvent_ParamsEntry();
        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.WebcastBarrageMessage_BarrageEvent_ParamsEntry.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastBarrageMessage_BarrageEvent_ParamsEntry();
        message.key = object.key ?? "";
        message.value = object.value ?? "";
        return message;
    },
};
function createBaseWebcastBarrageMessage_BarrageTypeUserGradeParam() {
    return { currentGrade: 0, displayConfig: 0, userId: "", user: undefined };
}
exports.WebcastBarrageMessage_BarrageTypeUserGradeParam = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.currentGrade !== 0) {
            writer.uint32(8).int32(message.currentGrade);
        }
        if (message.displayConfig !== 0) {
            writer.uint32(16).int32(message.displayConfig);
        }
        if (message.userId !== "") {
            writer.uint32(26).string(message.userId);
        }
        if (message.user !== undefined) {
            data_1.User.encode(message.user, 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 = createBaseWebcastBarrageMessage_BarrageTypeUserGradeParam();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.currentGrade = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.displayConfig = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.userId = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.user = data_1.User.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastBarrageMessage_BarrageTypeUserGradeParam.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastBarrageMessage_BarrageTypeUserGradeParam();
        message.currentGrade = object.currentGrade ?? 0;
        message.displayConfig = object.displayConfig ?? 0;
        message.userId = object.userId ?? "";
        message.user = (object.user !== undefined && object.user !== null) ? data_1.User.fromPartial(object.user) : undefined;
        return message;
    },
};
function createBaseWebcastBarrageMessage_BarrageTypeFansLevelParam() {
    return { currentGrade: 0, displayConfig: 0, user: undefined };
}
exports.WebcastBarrageMessage_BarrageTypeFansLevelParam = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.currentGrade !== 0) {
            writer.uint32(8).int32(message.currentGrade);
        }
        if (message.displayConfig !== 0) {
            writer.uint32(16).int32(message.displayConfig);
        }
        if (message.user !== undefined) {
            data_1.User.encode(message.user, 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 = createBaseWebcastBarrageMessage_BarrageTypeFansLevelParam();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.currentGrade = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.displayConfig = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.user = data_1.User.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastBarrageMessage_BarrageTypeFansLevelParam.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastBarrageMessage_BarrageTypeFansLevelParam();
        message.currentGrade = object.currentGrade ?? 0;
        message.displayConfig = object.displayConfig ?? 0;
        message.user = (object.user !== undefined && object.user !== null) ? data_1.User.fromPartial(object.user) : undefined;
        return message;
    },
};
function createBaseWebcastBarrageMessage_BarrageTypeSubscribeGiftParam() {
    return { giftSubCount: "0", showGiftSubCount: false };
}
exports.WebcastBarrageMessage_BarrageTypeSubscribeGiftParam = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.giftSubCount !== "0") {
            writer.uint32(8).int64(message.giftSubCount);
        }
        if (message.showGiftSubCount !== false) {
            writer.uint32(16).bool(message.showGiftSubCount);
        }
        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 = createBaseWebcastBarrageMessage_BarrageTypeSubscribeGiftParam();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.giftSubCount = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.showGiftSubCount = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastBarrageMessage_BarrageTypeSubscribeGiftParam.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastBarrageMessage_BarrageTypeSubscribeGiftParam();
        message.giftSubCount = object.giftSubCount ?? "0";
        message.showGiftSubCount = object.showGiftSubCount ?? false;
        return message;
    },
};
function createBaseWebcastBarrageMessage_AnimationData() {
    return { geckoChannelName: "", fileName: "", height: "0", width: "0", rightOffset: "0" };
}
exports.WebcastBarrageMessage_AnimationData = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.geckoChannelName !== "") {
            writer.uint32(10).string(message.geckoChannelName);
        }
        if (message.fileName !== "") {
            writer.uint32(18).string(message.fileName);
        }
        if (message.height !== "0") {
            writer.uint32(24).int64(message.height);
        }
        if (message.width !== "0") {
            writer.uint32(32).int64(message.width);
        }
        if (message.rightOffset !== "0") {
            writer.uint32(40).int64(message.rightOffset);
        }
        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 = createBaseWebcastBarrageMessage_AnimationData();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.geckoChannelName = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.fileName = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.height = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.width = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.rightOffset = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastBarrageMessage_AnimationData.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastBarrageMessage_AnimationData();
        message.geckoChannelName = object.geckoChannelName ?? "";
        message.fileName = object.fileName ?? "";
        message.height = object.height ?? "0";
        message.width = object.width ?? "0";
        message.rightOffset = object.rightOffset ?? "0";
        return message;
    },
};
function createBaseWebcastBarrageMessage_BarrageTypeGiftGalleryParam() {
    return { fromUserId: "0", toUserId: "0" };
}
exports.WebcastBarrageMessage_BarrageTypeGiftGalleryParam = {
    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);
        }
        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 = createBaseWebcastBarrageMessage_BarrageTypeGiftGalleryParam();
        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;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastBarrageMessage_BarrageTypeGiftGalleryParam.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastBarrageMessage_BarrageTypeGiftGalleryParam();
        message.fromUserId = object.fromUserId ?? "0";
        message.toUserId = object.toUserId ?? "0";
        return message;
    },
};
function createBaseWebcastBarrageMessage_DisplayControl() {
    return { priority: 0, duration: "0", targetGroupShowRst: {}, horizontalTriggerType: 0 };
}
exports.WebcastBarrageMessage_DisplayControl = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.priority !== 0) {
            writer.uint32(8).int32(message.priority);
        }
        if (message.duration !== "0") {
            writer.uint32(16).int64(message.duration);
        }
        Object.entries(message.targetGroupShowRst).forEach(([key, value]) => {
            exports.WebcastBarrageMessage_DisplayControl_TargetGroupShowRstEntry.encode({ key: key, value }, writer.uint32(26).fork()).join();
        });
        if (message.horizontalTriggerType !== 0) {
            writer.uint32(32).int32(message.horizontalTriggerType);
        }
        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 = createBaseWebcastBarrageMessage_DisplayControl();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.priority = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.duration = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    const entry3 = exports.WebcastBarrageMessage_DisplayControl_TargetGroupShowRstEntry.decode(reader, reader.uint32());
                    if (entry3.value !== undefined) {
                        message.targetGroupShowRst[entry3.key] = entry3.value;
                    }
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.horizontalTriggerType = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastBarrageMessage_DisplayControl.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastBarrageMessage_DisplayControl();
        message.priority = object.priority ?? 0;
        message.duration = object.duration ?? "0";
        message.targetGroupShowRst = Object.entries(object.targetGroupShowRst ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[globalThis.Number(key)] = exports.WebcastBarrageMessage_DisplayControl_ShowResult.fromPartial(value);
            }
            return acc;
        }, {});
        message.horizontalTriggerType = object.horizontalTriggerType ?? 0;
        return message;
    },
};
function createBaseWebcastBarrageMessage_DisplayControl_TargetGroupShowRstEntry() {
    return { key: 0, value: undefined };
}
exports.WebcastBarrageMessage_DisplayControl_TargetGroupShowRstEntry = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.key !== 0) {
            writer.uint32(8).int32(message.key);
        }
        if (message.value !== undefined) {
            exports.WebcastBarrageMessage_DisplayControl_ShowResult.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 = createBaseWebcastBarrageMessage_DisplayControl_TargetGroupShowRstEntry();
        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.WebcastBarrageMessage_DisplayControl_ShowResult.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastBarrageMessage_DisplayControl_TargetGroupShowRstEntry.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastBarrageMessage_DisplayControl_TargetGroupShowRstEntry();
        message.key = object.key ?? 0;
        message.value = (object.value !== undefined && object.value !== null)
            ? exports.WebcastBarrageMessage_DisplayControl_ShowResult.fromPartial(object.value)
            : undefined;
        return message;
    },
};
function createBaseWebcastBarrageMessage_DisplayControl_ShowResult() {
    return { banned: false };
}
exports.WebcastBarrageMessage_DisplayControl_ShowResult = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.banned !== false) {
            writer.uint32(8).bool(message.banned);
        }
        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 = createBaseWebcastBarrageMessage_DisplayControl_ShowResult();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.banned = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastBarrageMessage_DisplayControl_ShowResult.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastBarrageMessage_DisplayControl_ShowResult();
        message.banned = object.banned ?? false;
        return message;
    },
};
function createBaseWebcastBarrageMessage_RightLabel() {
    return { backgroundColor: "", content: undefined, height: "0" };
}
exports.WebcastBarrageMessage_RightLabel = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.backgroundColor !== "") {
            writer.uint32(10).string(message.backgroundColor);
        }
        if (message.content !== undefined) {
            data_1.Text.encode(message.content, writer.uint32(18).fork()).join();
        }
        if (message.height !== "0") {
            writer.uint32(24).int64(message.height);
        }
        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 = createBaseWebcastBarrageMessage_RightLabel();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.backgroundColor = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.content = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.height = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastBarrageMessage_RightLabel.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastBarrageMessage_RightLabel();
        message.backgroundColor = object.backgroundColor ?? "";
        message.content = (object.content !== undefined && object.content !== null)
            ? data_1.Text.fromPartial(object.content)
            : undefined;
        message.height = object.height ?? "0";
        return message;
    },
};
function createBaseWebcastPushFrame() {
    return {
        seqId: "0",
        id: "0",
        service: "0",
        method: "0",
        headers: {},
        payloadEncoding: "",
        type: "",
        binary: new Uint8Array(0),
    };
}
exports.WebcastPushFrame = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.seqId !== "0") {
            writer.uint32(8).int64(message.seqId);
        }
        if (message.id !== "0") {
            writer.uint32(16).int64(message.id);
        }
        if (message.service !== "0") {
            writer.uint32(24).int64(message.service);
        }
        if (message.method !== "0") {
            writer.uint32(32).int64(message.method);
        }
        Object.entries(message.headers).forEach(([key, value]) => {
            exports.WebcastPushFrame_HeadersEntry.encode({ key: key, value }, writer.uint32(42).fork()).join();
        });
        if (message.payloadEncoding !== "") {
            writer.uint32(50).string(message.payloadEncoding);
        }
        if (message.type !== "") {
            writer.uint32(58).string(message.type);
        }
        if (message.binary.length !== 0) {
            writer.uint32(66).bytes(message.binary);
        }
        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 = createBaseWebcastPushFrame();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.seqId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.id = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.service = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.method = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    const entry5 = exports.WebcastPushFrame_HeadersEntry.decode(reader, reader.uint32());
                    if (entry5.value !== undefined) {
                        message.headers[entry5.key] = entry5.value;
                    }
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.payloadEncoding = reader.string();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.type = reader.string();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.binary = reader.bytes();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastPushFrame.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastPushFrame();
        message.seqId = object.seqId ?? "0";
        message.id = object.id ?? "0";
        message.service = object.service ?? "0";
        message.method = object.method ?? "0";
        message.headers = Object.entries(object.headers ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = globalThis.String(value);
            }
            return acc;
        }, {});
        message.payloadEncoding = object.payloadEncoding ?? "";
        message.type = object.type ?? "";
        message.binary = object.binary ?? new Uint8Array(0);
        return message;
    },
};
function createBaseWebcastPushFrame_HeadersEntry() {
    return { key: "", value: "" };
}
exports.WebcastPushFrame_HeadersEntry = {
    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 = createBaseWebcastPushFrame_HeadersEntry();
        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.WebcastPushFrame_HeadersEntry.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastPushFrame_HeadersEntry();
        message.key = object.key ?? "";
        message.value = object.value ?? "";
        return message;
    },
};
function createBaseProtoMessageFetchResult() {
    return {
        messages: [],
        cursor: "",
        fetchInterval: "0",
        now: "0",
        internalExt: "",
        fetchType: 0,
        wsParams: {},
        heartBeatDuration: "0",
        needsAck: false,
        wsUrl: "",
        isFirst: false,
        historyCommentCursor: "",
        historyNoMore: false,
    };
}
exports.ProtoMessageFetchResult = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.messages) {
            exports.BaseProtoMessage.encode(v, writer.uint32(10).fork()).join();
        }
        if (message.cursor !== "") {
            writer.uint32(18).string(message.cursor);
        }
        if (message.fetchInterval !== "0") {
            writer.uint32(24).int64(message.fetchInterval);
        }
        if (message.now !== "0") {
            writer.uint32(32).int64(message.now);
        }
        if (message.internalExt !== "") {
            writer.uint32(42).string(message.internalExt);
        }
        if (message.fetchType !== 0) {
            writer.uint32(48).int32(message.fetchType);
        }
        Object.entries(message.wsParams).forEach(([key, value]) => {
            exports.ProtoMessageFetchResult_WsParamsEntry.encode({ key: key, value }, writer.uint32(58).fork()).join();
        });
        if (message.heartBeatDuration !== "0") {
            writer.uint32(64).int64(message.heartBeatDuration);
        }
        if (message.needsAck !== false) {
            writer.uint32(72).bool(message.needsAck);
        }
        if (message.wsUrl !== "") {
            writer.uint32(82).string(message.wsUrl);
        }
        if (message.isFirst !== false) {
            writer.uint32(88).bool(message.isFirst);
        }
        if (message.historyCommentCursor !== "") {
            writer.uint32(98).string(message.historyCommentCursor);
        }
        if (message.historyNoMore !== false) {
            writer.uint32(104).bool(message.historyNoMore);
        }
        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 = createBaseProtoMessageFetchResult();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.messages.push(exports.BaseProtoMessage.decode(reader, reader.uint32()));
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.cursor = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.fetchInterval = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.now = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.internalExt = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.fetchType = reader.int32();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    const entry7 = exports.ProtoMessageFetchResult_WsParamsEntry.decode(reader, reader.uint32());
                    if (entry7.value !== undefined) {
                        message.wsParams[entry7.key] = entry7.value;
                    }
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.heartBeatDuration = reader.int64().toString();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.needsAck = reader.bool();
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.wsUrl = reader.string();
                    continue;
                }
                case 11: {
                    if (tag !== 88) {
                        break;
                    }
                    message.isFirst = reader.bool();
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.historyCommentCursor = reader.string();
                    continue;
                }
                case 13: {
                    if (tag !== 104) {
                        break;
                    }
                    message.historyNoMore = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.ProtoMessageFetchResult.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseProtoMessageFetchResult();
        message.messages = object.messages?.map((e) => exports.BaseProtoMessage.fromPartial(e)) || [];
        message.cursor = object.cursor ?? "";
        message.fetchInterval = object.fetchInterval ?? "0";
        message.now = object.now ?? "0";
        message.internalExt = object.internalExt ?? "";
        message.fetchType = object.fetchType ?? 0;
        message.wsParams = Object.entries(object.wsParams ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = globalThis.String(value);
            }
            return acc;
        }, {});
        message.heartBeatDuration = object.heartBeatDuration ?? "0";
        message.needsAck = object.needsAck ?? false;
        message.wsUrl = object.wsUrl ?? "";
        message.isFirst = object.isFirst ?? false;
        message.historyCommentCursor = object.historyCommentCursor ?? "";
        message.historyNoMore = object.historyNoMore ?? false;
        return message;
    },
};
function createBaseProtoMessageFetchResult_WsParamsEntry() {
    return { key: "", value: "" };
}
exports.ProtoMessageFetchResult_WsParamsEntry = {
    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 = createBaseProtoMessageFetchResult_WsParamsEntry();
        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.ProtoMessageFetchResult_WsParamsEntry.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseProtoMessageFetchResult_WsParamsEntry();
        message.key = object.key ?? "";
        message.value = object.value ?? "";
        return message;
    },
};
function createBaseBaseProtoMessage() {
    return { type: "", payload: new Uint8Array(0), msgId: "0", msgType: 0, offset: "0", isHistory: false };
}
exports.BaseProtoMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.type !== "") {
            writer.uint32(10).string(message.type);
        }
        if (message.payload.length !== 0) {
            writer.uint32(18).bytes(message.payload);
        }
        if (message.msgId !== "0") {
            writer.uint32(24).int64(message.msgId);
        }
        if (message.msgType !== 0) {
            writer.uint32(32).int32(message.msgType);
        }
        if (message.offset !== "0") {
            writer.uint32(40).int64(message.offset);
        }
        if (message.isHistory !== false) {
            writer.uint32(48).bool(message.isHistory);
        }
        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 = createBaseBaseProtoMessage();
        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.payload = reader.bytes();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.msgId = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.msgType = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.offset = reader.int64().toString();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.isHistory = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.BaseProtoMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseBaseProtoMessage();
        message.type = object.type ?? "";
        message.payload = object.payload ?? new Uint8Array(0);
        message.msgId = object.msgId ?? "0";
        message.msgType = object.msgType ?? 0;
        message.offset = object.offset ?? "0";
        message.isHistory = object.isHistory ?? false;
        return message;
    },
};
function createBaseWebcastRoomMessage() {
    return {
        common: undefined,
        content: "",
        supportLandscape: false,
        source: "0",
        icon: undefined,
        scene: 0,
        isWelcome: false,
        publicAreaCommon: undefined,
        showDurationMs: "0",
        subScene: "",
    };
}
exports.WebcastRoomMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.content !== "") {
            writer.uint32(18).string(message.content);
        }
        if (message.supportLandscape !== false) {
            writer.uint32(24).bool(message.supportLandscape);
        }
        if (message.source !== "0") {
            writer.uint32(32).int64(message.source);
        }
        if (message.icon !== undefined) {
            data_1.Image.encode(message.icon, writer.uint32(42).fork()).join();
        }
        if (message.scene !== 0) {
            writer.uint32(48).int32(message.scene);
        }
        if (message.isWelcome !== false) {
            writer.uint32(56).bool(message.isWelcome);
        }
        if (message.publicAreaCommon !== undefined) {
            data_1.PublicAreaMessageCommon.encode(message.publicAreaCommon, writer.uint32(66).fork()).join();
        }
        if (message.showDurationMs !== "0") {
            writer.uint32(72).int64(message.showDurationMs);
        }
        if (message.subScene !== "") {
            writer.uint32(82).string(message.subScene);
        }
        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 = createBaseWebcastRoomMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.content = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.supportLandscape = reader.bool();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.source = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.icon = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.scene = reader.int32();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.isWelcome = reader.bool();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.publicAreaCommon = data_1.PublicAreaMessageCommon.decode(reader, reader.uint32());
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.showDurationMs = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.subScene = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastRoomMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastRoomMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.content = object.content ?? "";
        message.supportLandscape = object.supportLandscape ?? false;
        message.source = object.source ?? "0";
        message.icon = (object.icon !== undefined && object.icon !== null) ? data_1.Image.fromPartial(object.icon) : undefined;
        message.scene = object.scene ?? 0;
        message.isWelcome = object.isWelcome ?? false;
        message.publicAreaCommon = (object.publicAreaCommon !== undefined && object.publicAreaCommon !== null)
            ? data_1.PublicAreaMessageCommon.fromPartial(object.publicAreaCommon)
            : undefined;
        message.showDurationMs = object.showDurationMs ?? "0";
        message.subScene = object.subScene ?? "";
        return message;
    },
};
function createBaseWebcastCaptionMessage() {
    return {
        common: undefined,
        timestampMs: "0",
        durationMs: "0",
        content: [],
        sentenceId: "0",
        sequenceId: "0",
        definite: false,
    };
}
exports.WebcastCaptionMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.timestampMs !== "0") {
            writer.uint32(16).int64(message.timestampMs);
        }
        if (message.durationMs !== "0") {
            writer.uint32(24).int64(message.durationMs);
        }
        for (const v of message.content) {
            exports.WebcastCaptionMessage_CaptionContent.encode(v, writer.uint32(34).fork()).join();
        }
        if (message.sentenceId !== "0") {
            writer.uint32(40).int64(message.sentenceId);
        }
        if (message.sequenceId !== "0") {
            writer.uint32(48).int64(message.sequenceId);
        }
        if (message.definite !== false) {
            writer.uint32(56).bool(message.definite);
        }
        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 = createBaseWebcastCaptionMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.timestampMs = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.durationMs = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.content.push(exports.WebcastCaptionMessage_CaptionContent.decode(reader, reader.uint32()));
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.sentenceId = reader.int64().toString();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.sequenceId = reader.int64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.definite = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastCaptionMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastCaptionMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.timestampMs = object.timestampMs ?? "0";
        message.durationMs = object.durationMs ?? "0";
        message.content = object.content?.map((e) => exports.WebcastCaptionMessage_CaptionContent.fromPartial(e)) || [];
        message.sentenceId = object.sentenceId ?? "0";
        message.sequenceId = object.sequenceId ?? "0";
        message.definite = object.definite ?? false;
        return message;
    },
};
function createBaseWebcastCaptionMessage_CaptionContent() {
    return { lang: "", content: "" };
}
exports.WebcastCaptionMessage_CaptionContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.lang !== "") {
            writer.uint32(10).string(message.lang);
        }
        if (message.content !== "") {
            writer.uint32(18).string(message.content);
        }
        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 = createBaseWebcastCaptionMessage_CaptionContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.lang = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.content = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastCaptionMessage_CaptionContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastCaptionMessage_CaptionContent();
        message.lang = object.lang ?? "";
        message.content = object.content ?? "";
        return message;
    },
};
function createBaseWebcastControlMessage() {
    return {
        common: undefined,
        action: 0,
        tips: "",
        extra: undefined,
        perceptionDialog: undefined,
        perceptionAudienceText: undefined,
        punishInfo: undefined,
        floatText: undefined,
        floatStyle: 0,
    };
}
exports.WebcastControlMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.action !== 0) {
            writer.uint32(16).int32(message.action);
        }
        if (message.tips !== "") {
            writer.uint32(26).string(message.tips);
        }
        if (message.extra !== undefined) {
            exports.WebcastControlMessage_Extra.encode(message.extra, writer.uint32(34).fork()).join();
        }
        if (message.perceptionDialog !== undefined) {
            exports.WebcastControlMessage_PerceptionDialogInfo.encode(message.perceptionDialog, writer.uint32(42).fork()).join();
        }
        if (message.perceptionAudienceText !== undefined) {
            data_1.Text.encode(message.perceptionAudienceText, writer.uint32(50).fork()).join();
        }
        if (message.punishInfo !== undefined) {
            data_1.PunishEventInfo.encode(message.punishInfo, writer.uint32(58).fork()).join();
        }
        if (message.floatText !== undefined) {
            data_1.Text.encode(message.floatText, writer.uint32(66).fork()).join();
        }
        if (message.floatStyle !== 0) {
            writer.uint32(72).int32(message.floatStyle);
        }
        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 = createBaseWebcastControlMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.action = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.tips = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.extra = exports.WebcastControlMessage_Extra.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.perceptionDialog = exports.WebcastControlMessage_PerceptionDialogInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.perceptionAudienceText = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.punishInfo = data_1.PunishEventInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.floatText = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.floatStyle = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastControlMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastControlMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.action = object.action ?? 0;
        message.tips = object.tips ?? "";
        message.extra = (object.extra !== undefined && object.extra !== null)
            ? exports.WebcastControlMessage_Extra.fromPartial(object.extra)
            : undefined;
        message.perceptionDialog = (object.perceptionDialog !== undefined && object.perceptionDialog !== null)
            ? exports.WebcastControlMessage_PerceptionDialogInfo.fromPartial(object.perceptionDialog)
            : undefined;
        message.perceptionAudienceText =
            (object.perceptionAudienceText !== undefined && object.perceptionAudienceText !== null)
                ? data_1.Text.fromPartial(object.perceptionAudienceText)
                : undefined;
        message.punishInfo = (object.punishInfo !== undefined && object.punishInfo !== null)
            ? data_1.PunishEventInfo.fromPartial(object.punishInfo)
            : undefined;
        message.floatText = (object.floatText !== undefined && object.floatText !== null)
            ? data_1.Text.fromPartial(object.floatText)
            : undefined;
        message.floatStyle = object.floatStyle ?? 0;
        return message;
    },
};
function createBaseWebcastControlMessage_Extra() {
    return {
        banInfoUrl: "",
        reasonNo: "0",
        title: undefined,
        violationReason: undefined,
        content: undefined,
        gotItButton: undefined,
        banDetailButton: undefined,
        source: "",
    };
}
exports.WebcastControlMessage_Extra = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.banInfoUrl !== "") {
            writer.uint32(10).string(message.banInfoUrl);
        }
        if (message.reasonNo !== "0") {
            writer.uint32(16).int64(message.reasonNo);
        }
        if (message.title !== undefined) {
            data_1.Text.encode(message.title, writer.uint32(26).fork()).join();
        }
        if (message.violationReason !== undefined) {
            data_1.Text.encode(message.violationReason, writer.uint32(34).fork()).join();
        }
        if (message.content !== undefined) {
            data_1.Text.encode(message.content, writer.uint32(42).fork()).join();
        }
        if (message.gotItButton !== undefined) {
            data_1.Text.encode(message.gotItButton, writer.uint32(50).fork()).join();
        }
        if (message.banDetailButton !== undefined) {
            data_1.Text.encode(message.banDetailButton, writer.uint32(58).fork()).join();
        }
        if (message.source !== "") {
            writer.uint32(66).string(message.source);
        }
        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 = createBaseWebcastControlMessage_Extra();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.banInfoUrl = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.reasonNo = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.title = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.violationReason = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.content = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.gotItButton = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.banDetailButton = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.source = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastControlMessage_Extra.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastControlMessage_Extra();
        message.banInfoUrl = object.banInfoUrl ?? "";
        message.reasonNo = object.reasonNo ?? "0";
        message.title = (object.title !== undefined && object.title !== null) ? data_1.Text.fromPartial(object.title) : undefined;
        message.violationReason = (object.violationReason !== undefined && object.violationReason !== null)
            ? data_1.Text.fromPartial(object.violationReason)
            : undefined;
        message.content = (object.content !== undefined && object.content !== null)
            ? data_1.Text.fromPartial(object.content)
            : undefined;
        message.gotItButton = (object.gotItButton !== undefined && object.gotItButton !== null)
            ? data_1.Text.fromPartial(object.gotItButton)
            : undefined;
        message.banDetailButton = (object.banDetailButton !== undefined && object.banDetailButton !== null)
            ? data_1.Text.fromPartial(object.banDetailButton)
            : undefined;
        message.source = object.source ?? "";
        return message;
    },
};
function createBaseWebcastControlMessage_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.WebcastControlMessage_PerceptionDialogInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.iconType !== 0) {
            writer.uint32(8).int32(message.iconType);
        }
        if (message.title !== undefined) {
            data_1.Text.encode(message.title, writer.uint32(18).fork()).join();
        }
        if (message.subTitle !== undefined) {
            data_1.Text.encode(message.subTitle, writer.uint32(26).fork()).join();
        }
        if (message.adviceActionText !== undefined) {
            data_1.Text.encode(message.adviceActionText, writer.uint32(34).fork()).join();
        }
        if (message.defaultActionText !== undefined) {
            data_1.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.WebcastControlMessage_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 = createBaseWebcastControlMessage_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 = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.subTitle = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.adviceActionText = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.defaultActionText = data_1.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.WebcastControlMessage_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.WebcastControlMessage_PerceptionDialogInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastControlMessage_PerceptionDialogInfo();
        message.iconType = object.iconType ?? 0;
        message.title = (object.title !== undefined && object.title !== null) ? data_1.Text.fromPartial(object.title) : undefined;
        message.subTitle = (object.subTitle !== undefined && object.subTitle !== null)
            ? data_1.Text.fromPartial(object.subTitle)
            : undefined;
        message.adviceActionText = (object.adviceActionText !== undefined && object.adviceActionText !== null)
            ? data_1.Text.fromPartial(object.adviceActionText)
            : undefined;
        message.defaultActionText = (object.defaultActionText !== undefined && object.defaultActionText !== null)
            ? data_1.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.WebcastControlMessage_PerceptionDialogInfo_PerceptionFeedbackOption.fromPartial(e)) || [];
        message.policyTip = object.policyTip ?? "0";
        message.appealPopup = object.appealPopup ?? 0;
        return message;
    },
};
function createBaseWebcastControlMessage_PerceptionDialogInfo_PerceptionFeedbackOption() {
    return { id: "0", contentKey: "" };
}
exports.WebcastControlMessage_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 = createBaseWebcastControlMessage_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.WebcastControlMessage_PerceptionDialogInfo_PerceptionFeedbackOption.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastControlMessage_PerceptionDialogInfo_PerceptionFeedbackOption();
        message.id = object.id ?? "0";
        message.contentKey = object.contentKey ?? "";
        return message;
    },
};
function createBaseWebcastGoalUpdateMessage() {
    return {
        common: undefined,
        indicator: undefined,
        goal: undefined,
        contributorId: "0",
        contributorAvatar: undefined,
        contributorDisplayId: "",
        contributeSubgoal: undefined,
        contributeCount: "0",
        contributeScore: "0",
        giftRepeatCount: "0",
        contributorIdStr: "",
        pin: false,
        unpin: false,
        pinInfo: undefined,
        updateSource: 0,
        goalExtra: "",
    };
}
exports.WebcastGoalUpdateMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.indicator !== undefined) {
            data_1.LiveStreamGoalIndicator.encode(message.indicator, writer.uint32(18).fork()).join();
        }
        if (message.goal !== undefined) {
            data_1.LiveStreamGoal.encode(message.goal, writer.uint32(26).fork()).join();
        }
        if (message.contributorId !== "0") {
            writer.uint32(32).int64(message.contributorId);
        }
        if (message.contributorAvatar !== undefined) {
            data_1.Image.encode(message.contributorAvatar, writer.uint32(42).fork()).join();
        }
        if (message.contributorDisplayId !== "") {
            writer.uint32(50).string(message.contributorDisplayId);
        }
        if (message.contributeSubgoal !== undefined) {
            exports.WebcastGoalUpdateMessage_LiveStreamSubGoal.encode(message.contributeSubgoal, writer.uint32(58).fork()).join();
        }
        if (message.contributeCount !== "0") {
            writer.uint32(72).int64(message.contributeCount);
        }
        if (message.contributeScore !== "0") {
            writer.uint32(80).int64(message.contributeScore);
        }
        if (message.giftRepeatCount !== "0") {
            writer.uint32(88).int64(message.giftRepeatCount);
        }
        if (message.contributorIdStr !== "") {
            writer.uint32(98).string(message.contributorIdStr);
        }
        if (message.pin !== false) {
            writer.uint32(104).bool(message.pin);
        }
        if (message.unpin !== false) {
            writer.uint32(112).bool(message.unpin);
        }
        if (message.pinInfo !== undefined) {
            exports.WebcastGoalUpdateMessage_GoalPinInfo.encode(message.pinInfo, writer.uint32(122).fork()).join();
        }
        if (message.updateSource !== 0) {
            writer.uint32(128).int32(message.updateSource);
        }
        if (message.goalExtra !== "") {
            writer.uint32(138).string(message.goalExtra);
        }
        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 = createBaseWebcastGoalUpdateMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.indicator = data_1.LiveStreamGoalIndicator.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.goal = data_1.LiveStreamGoal.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.contributorId = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.contributorAvatar = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.contributorDisplayId = reader.string();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.contributeSubgoal = exports.WebcastGoalUpdateMessage_LiveStreamSubGoal.decode(reader, reader.uint32());
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.contributeCount = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.contributeScore = reader.int64().toString();
                    continue;
                }
                case 11: {
                    if (tag !== 88) {
                        break;
                    }
                    message.giftRepeatCount = reader.int64().toString();
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.contributorIdStr = reader.string();
                    continue;
                }
                case 13: {
                    if (tag !== 104) {
                        break;
                    }
                    message.pin = reader.bool();
                    continue;
                }
                case 14: {
                    if (tag !== 112) {
                        break;
                    }
                    message.unpin = reader.bool();
                    continue;
                }
                case 15: {
                    if (tag !== 122) {
                        break;
                    }
                    message.pinInfo = exports.WebcastGoalUpdateMessage_GoalPinInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 16: {
                    if (tag !== 128) {
                        break;
                    }
                    message.updateSource = reader.int32();
                    continue;
                }
                case 17: {
                    if (tag !== 138) {
                        break;
                    }
                    message.goalExtra = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGoalUpdateMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGoalUpdateMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.indicator = (object.indicator !== undefined && object.indicator !== null)
            ? data_1.LiveStreamGoalIndicator.fromPartial(object.indicator)
            : undefined;
        message.goal = (object.goal !== undefined && object.goal !== null)
            ? data_1.LiveStreamGoal.fromPartial(object.goal)
            : undefined;
        message.contributorId = object.contributorId ?? "0";
        message.contributorAvatar = (object.contributorAvatar !== undefined && object.contributorAvatar !== null)
            ? data_1.Image.fromPartial(object.contributorAvatar)
            : undefined;
        message.contributorDisplayId = object.contributorDisplayId ?? "";
        message.contributeSubgoal = (object.contributeSubgoal !== undefined && object.contributeSubgoal !== null)
            ? exports.WebcastGoalUpdateMessage_LiveStreamSubGoal.fromPartial(object.contributeSubgoal)
            : undefined;
        message.contributeCount = object.contributeCount ?? "0";
        message.contributeScore = object.contributeScore ?? "0";
        message.giftRepeatCount = object.giftRepeatCount ?? "0";
        message.contributorIdStr = object.contributorIdStr ?? "";
        message.pin = object.pin ?? false;
        message.unpin = object.unpin ?? false;
        message.pinInfo = (object.pinInfo !== undefined && object.pinInfo !== null)
            ? exports.WebcastGoalUpdateMessage_GoalPinInfo.fromPartial(object.pinInfo)
            : undefined;
        message.updateSource = object.updateSource ?? 0;
        message.goalExtra = object.goalExtra ?? "";
        return message;
    },
};
function createBaseWebcastGoalUpdateMessage_LiveStreamSubGoal() {
    return {
        type: 0,
        id: "0",
        progress: "0",
        target: "0",
        gift: undefined,
        idStr: "",
        pinInfo: undefined,
        source: 0,
        recommendedText: "",
        recommendedCommon: "",
    };
}
exports.WebcastGoalUpdateMessage_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.WebcastGoalUpdateMessage_LiveStreamSubGoal_LiveStreamSubGoalGift.encode(message.gift, writer.uint32(42).fork())
                .join();
        }
        if (message.idStr !== "") {
            writer.uint32(50).string(message.idStr);
        }
        if (message.pinInfo !== undefined) {
            exports.WebcastGoalUpdateMessage_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.recommendedCommon !== "") {
            writer.uint32(82).string(message.recommendedCommon);
        }
        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 = createBaseWebcastGoalUpdateMessage_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.WebcastGoalUpdateMessage_LiveStreamSubGoal_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.WebcastGoalUpdateMessage_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.recommendedCommon = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGoalUpdateMessage_LiveStreamSubGoal.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGoalUpdateMessage_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.WebcastGoalUpdateMessage_LiveStreamSubGoal_LiveStreamSubGoalGift.fromPartial(object.gift)
            : undefined;
        message.idStr = object.idStr ?? "";
        message.pinInfo = (object.pinInfo !== undefined && object.pinInfo !== null)
            ? exports.WebcastGoalUpdateMessage_LiveStreamSubGoal_SubGoalPinInfo.fromPartial(object.pinInfo)
            : undefined;
        message.source = object.source ?? 0;
        message.recommendedText = object.recommendedText ?? "";
        message.recommendedCommon = object.recommendedCommon ?? "";
        return message;
    },
};
function createBaseWebcastGoalUpdateMessage_LiveStreamSubGoal_LiveStreamSubGoalGift() {
    return { name: "", icon: undefined, diamondCount: "0", type: 0 };
}
exports.WebcastGoalUpdateMessage_LiveStreamSubGoal_LiveStreamSubGoalGift = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.name !== "") {
            writer.uint32(10).string(message.name);
        }
        if (message.icon !== undefined) {
            data_1.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 = createBaseWebcastGoalUpdateMessage_LiveStreamSubGoal_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 = data_1.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.WebcastGoalUpdateMessage_LiveStreamSubGoal_LiveStreamSubGoalGift.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGoalUpdateMessage_LiveStreamSubGoal_LiveStreamSubGoalGift();
        message.name = object.name ?? "";
        message.icon = (object.icon !== undefined && object.icon !== null) ? data_1.Image.fromPartial(object.icon) : undefined;
        message.diamondCount = object.diamondCount ?? "0";
        message.type = object.type ?? 0;
        return message;
    },
};
function createBaseWebcastGoalUpdateMessage_LiveStreamSubGoal_SubGoalPinInfo() {
    return { pinStartTime: "0", pinEndTime: "0", pinReadyTime: "0" };
}
exports.WebcastGoalUpdateMessage_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 = createBaseWebcastGoalUpdateMessage_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.WebcastGoalUpdateMessage_LiveStreamSubGoal_SubGoalPinInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGoalUpdateMessage_LiveStreamSubGoal_SubGoalPinInfo();
        message.pinStartTime = object.pinStartTime ?? "0";
        message.pinEndTime = object.pinEndTime ?? "0";
        message.pinReadyTime = object.pinReadyTime ?? "0";
        return message;
    },
};
function createBaseWebcastGoalUpdateMessage_GoalPinInfo() {
    return { pin: false, unpin: false, pinEndTime: "0", subGoalId: "0", subGoalIdStr: "" };
}
exports.WebcastGoalUpdateMessage_GoalPinInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.pin !== false) {
            writer.uint32(8).bool(message.pin);
        }
        if (message.unpin !== false) {
            writer.uint32(16).bool(message.unpin);
        }
        if (message.pinEndTime !== "0") {
            writer.uint32(24).int64(message.pinEndTime);
        }
        if (message.subGoalId !== "0") {
            writer.uint32(32).int64(message.subGoalId);
        }
        if (message.subGoalIdStr !== "") {
            writer.uint32(42).string(message.subGoalIdStr);
        }
        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 = createBaseWebcastGoalUpdateMessage_GoalPinInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.pin = reader.bool();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.unpin = reader.bool();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.pinEndTime = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.subGoalId = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.subGoalIdStr = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastGoalUpdateMessage_GoalPinInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastGoalUpdateMessage_GoalPinInfo();
        message.pin = object.pin ?? false;
        message.unpin = object.unpin ?? false;
        message.pinEndTime = object.pinEndTime ?? "0";
        message.subGoalId = object.subGoalId ?? "0";
        message.subGoalIdStr = object.subGoalIdStr ?? "";
        return message;
    },
};
function createBaseWebcastImDeleteMessage() {
    return { common: undefined, deleteMsgIdsList: [], deleteUserIdsList: [] };
}
exports.WebcastImDeleteMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        writer.uint32(18).fork();
        for (const v of message.deleteMsgIdsList) {
            writer.int64(v);
        }
        writer.join();
        writer.uint32(26).fork();
        for (const v of message.deleteUserIdsList) {
            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 = createBaseWebcastImDeleteMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag === 16) {
                        message.deleteMsgIdsList.push(reader.int64().toString());
                        continue;
                    }
                    if (tag === 18) {
                        const end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) {
                            message.deleteMsgIdsList.push(reader.int64().toString());
                        }
                        continue;
                    }
                    break;
                }
                case 3: {
                    if (tag === 24) {
                        message.deleteUserIdsList.push(reader.int64().toString());
                        continue;
                    }
                    if (tag === 26) {
                        const end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) {
                            message.deleteUserIdsList.push(reader.int64().toString());
                        }
                        continue;
                    }
                    break;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastImDeleteMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastImDeleteMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.deleteMsgIdsList = object.deleteMsgIdsList?.map((e) => e) || [];
        message.deleteUserIdsList = object.deleteUserIdsList?.map((e) => e) || [];
        return message;
    },
};
function createBaseWebcastInRoomBannerMessage() {
    return { common: undefined, data: {}, position: 0, actionType: 0 };
}
exports.WebcastInRoomBannerMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        Object.entries(message.data).forEach(([key, value]) => {
            exports.WebcastInRoomBannerMessage_DataEntry.encode({ key: key, value }, writer.uint32(18).fork()).join();
        });
        if (message.position !== 0) {
            writer.uint32(24).int32(message.position);
        }
        if (message.actionType !== 0) {
            writer.uint32(32).int32(message.actionType);
        }
        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 = createBaseWebcastInRoomBannerMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    const entry2 = exports.WebcastInRoomBannerMessage_DataEntry.decode(reader, reader.uint32());
                    if (entry2.value !== undefined) {
                        message.data[entry2.key] = entry2.value;
                    }
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.position = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.actionType = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastInRoomBannerMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastInRoomBannerMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.data = Object.entries(object.data ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = globalThis.String(value);
            }
            return acc;
        }, {});
        message.position = object.position ?? 0;
        message.actionType = object.actionType ?? 0;
        return message;
    },
};
function createBaseWebcastInRoomBannerMessage_DataEntry() {
    return { key: "", value: "" };
}
exports.WebcastInRoomBannerMessage_DataEntry = {
    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 = createBaseWebcastInRoomBannerMessage_DataEntry();
        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.WebcastInRoomBannerMessage_DataEntry.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastInRoomBannerMessage_DataEntry();
        message.key = object.key ?? "";
        message.value = object.value ?? "";
        return message;
    },
};
function createBaseWebcastRankUpdateMessage() {
    return {
        common: undefined,
        updatesList: [],
        groupType: "0",
        priority: "0",
        tabsList: [],
        isAnimationLoopPlay: false,
        animationLoopForOff: false,
        unionAnimation: [],
        tabInfo: [],
    };
}
exports.WebcastRankUpdateMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        for (const v of message.updatesList) {
            exports.WebcastRankUpdateMessage_RankUpdate.encode(v, writer.uint32(18).fork()).join();
        }
        if (message.groupType !== "0") {
            writer.uint32(24).int64(message.groupType);
        }
        if (message.priority !== "0") {
            writer.uint32(40).int64(message.priority);
        }
        for (const v of message.tabsList) {
            exports.WebcastRankUpdateMessage_RankTabInfo.encode(v, writer.uint32(50).fork()).join();
        }
        if (message.isAnimationLoopPlay !== false) {
            writer.uint32(56).bool(message.isAnimationLoopPlay);
        }
        if (message.animationLoopForOff !== false) {
            writer.uint32(64).bool(message.animationLoopForOff);
        }
        for (const v of message.unionAnimation) {
            exports.WebcastRankUpdateMessage_UnionAnimationInfo.encode(v, writer.uint32(74).fork()).join();
        }
        for (const v of message.tabInfo) {
            exports.WebcastRankUpdateMessage_RankListTabInfo.encode(v, 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 = createBaseWebcastRankUpdateMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.updatesList.push(exports.WebcastRankUpdateMessage_RankUpdate.decode(reader, reader.uint32()));
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.groupType = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.priority = reader.int64().toString();
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.tabsList.push(exports.WebcastRankUpdateMessage_RankTabInfo.decode(reader, reader.uint32()));
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.isAnimationLoopPlay = reader.bool();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.animationLoopForOff = reader.bool();
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.unionAnimation.push(exports.WebcastRankUpdateMessage_UnionAnimationInfo.decode(reader, reader.uint32()));
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.tabInfo.push(exports.WebcastRankUpdateMessage_RankListTabInfo.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastRankUpdateMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastRankUpdateMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.updatesList = object.updatesList?.map((e) => exports.WebcastRankUpdateMessage_RankUpdate.fromPartial(e)) || [];
        message.groupType = object.groupType ?? "0";
        message.priority = object.priority ?? "0";
        message.tabsList = object.tabsList?.map((e) => exports.WebcastRankUpdateMessage_RankTabInfo.fromPartial(e)) || [];
        message.isAnimationLoopPlay = object.isAnimationLoopPlay ?? false;
        message.animationLoopForOff = object.animationLoopForOff ?? false;
        message.unionAnimation =
            object.unionAnimation?.map((e) => exports.WebcastRankUpdateMessage_UnionAnimationInfo.fromPartial(e)) || [];
        message.tabInfo = object.tabInfo?.map((e) => exports.WebcastRankUpdateMessage_RankListTabInfo.fromPartial(e)) || [];
        return message;
    },
};
function createBaseWebcastRankUpdateMessage_UnionAnimationInfo() {
    return { unionType: 0, rankTypeArray: 0, supportedVersion: "0" };
}
exports.WebcastRankUpdateMessage_UnionAnimationInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.unionType !== 0) {
            writer.uint32(8).int32(message.unionType);
        }
        if (message.rankTypeArray !== 0) {
            writer.uint32(16).int32(message.rankTypeArray);
        }
        if (message.supportedVersion !== "0") {
            writer.uint32(24).int64(message.supportedVersion);
        }
        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 = createBaseWebcastRankUpdateMessage_UnionAnimationInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.unionType = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.rankTypeArray = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.supportedVersion = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastRankUpdateMessage_UnionAnimationInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastRankUpdateMessage_UnionAnimationInfo();
        message.unionType = object.unionType ?? 0;
        message.rankTypeArray = object.rankTypeArray ?? 0;
        message.supportedVersion = object.supportedVersion ?? "0";
        return message;
    },
};
function createBaseWebcastRankUpdateMessage_RankListTabInfo() {
    return { tabs: [], supportedVersion: "0" };
}
exports.WebcastRankUpdateMessage_RankListTabInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        for (const v of message.tabs) {
            exports.WebcastRankUpdateMessage_RankTabInfo.encode(v, writer.uint32(10).fork()).join();
        }
        if (message.supportedVersion !== "0") {
            writer.uint32(16).int64(message.supportedVersion);
        }
        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 = createBaseWebcastRankUpdateMessage_RankListTabInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.tabs.push(exports.WebcastRankUpdateMessage_RankTabInfo.decode(reader, reader.uint32()));
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.supportedVersion = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastRankUpdateMessage_RankListTabInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastRankUpdateMessage_RankListTabInfo();
        message.tabs = object.tabs?.map((e) => exports.WebcastRankUpdateMessage_RankTabInfo.fromPartial(e)) || [];
        message.supportedVersion = object.supportedVersion ?? "0";
        return message;
    },
};
function createBaseWebcastRankUpdateMessage_RankTabInfo() {
    return { rankType: 0, title: "", titleText: undefined, listLynxType: "0" };
}
exports.WebcastRankUpdateMessage_RankTabInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.rankType !== 0) {
            writer.uint32(8).int32(message.rankType);
        }
        if (message.title !== "") {
            writer.uint32(18).string(message.title);
        }
        if (message.titleText !== undefined) {
            data_1.Text.encode(message.titleText, writer.uint32(26).fork()).join();
        }
        if (message.listLynxType !== "0") {
            writer.uint32(32).int64(message.listLynxType);
        }
        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 = createBaseWebcastRankUpdateMessage_RankTabInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.rankType = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.title = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.titleText = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.listLynxType = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastRankUpdateMessage_RankTabInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastRankUpdateMessage_RankTabInfo();
        message.rankType = object.rankType ?? 0;
        message.title = object.title ?? "";
        message.titleText = (object.titleText !== undefined && object.titleText !== null)
            ? data_1.Text.fromPartial(object.titleText)
            : undefined;
        message.listLynxType = object.listLynxType ?? "0";
        return message;
    },
};
function createBaseWebcastRankUpdateMessage_RankUpdate() {
    return {
        rankType: "0",
        ownerRank: "0",
        defaultContent: undefined,
        showEntranceAnimation: false,
        countdown: "0",
        relatedTabRankType: "0",
        requestFirstShowType: "0",
        supportedVersion: "0",
        owneronrank: false,
    };
}
exports.WebcastRankUpdateMessage_RankUpdate = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.rankType !== "0") {
            writer.uint32(8).int64(message.rankType);
        }
        if (message.ownerRank !== "0") {
            writer.uint32(16).int64(message.ownerRank);
        }
        if (message.defaultContent !== undefined) {
            data_1.Text.encode(message.defaultContent, writer.uint32(26).fork()).join();
        }
        if (message.showEntranceAnimation !== false) {
            writer.uint32(40).bool(message.showEntranceAnimation);
        }
        if (message.countdown !== "0") {
            writer.uint32(48).int64(message.countdown);
        }
        if (message.relatedTabRankType !== "0") {
            writer.uint32(64).int64(message.relatedTabRankType);
        }
        if (message.requestFirstShowType !== "0") {
            writer.uint32(72).int64(message.requestFirstShowType);
        }
        if (message.supportedVersion !== "0") {
            writer.uint32(80).int64(message.supportedVersion);
        }
        if (message.owneronrank !== false) {
            writer.uint32(88).bool(message.owneronrank);
        }
        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 = createBaseWebcastRankUpdateMessage_RankUpdate();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.rankType = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.ownerRank = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.defaultContent = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.showEntranceAnimation = reader.bool();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.countdown = reader.int64().toString();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.relatedTabRankType = reader.int64().toString();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.requestFirstShowType = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.supportedVersion = reader.int64().toString();
                    continue;
                }
                case 11: {
                    if (tag !== 88) {
                        break;
                    }
                    message.owneronrank = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastRankUpdateMessage_RankUpdate.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastRankUpdateMessage_RankUpdate();
        message.rankType = object.rankType ?? "0";
        message.ownerRank = object.ownerRank ?? "0";
        message.defaultContent = (object.defaultContent !== undefined && object.defaultContent !== null)
            ? data_1.Text.fromPartial(object.defaultContent)
            : undefined;
        message.showEntranceAnimation = object.showEntranceAnimation ?? false;
        message.countdown = object.countdown ?? "0";
        message.relatedTabRankType = object.relatedTabRankType ?? "0";
        message.requestFirstShowType = object.requestFirstShowType ?? "0";
        message.supportedVersion = object.supportedVersion ?? "0";
        message.owneronrank = object.owneronrank ?? false;
        return message;
    },
};
function createBaseWebcastPollMessage() {
    return {
        common: undefined,
        messageType: 0,
        pollId: "0",
        startContent: undefined,
        endContent: undefined,
        updateContent: undefined,
        pollKind: 0,
        pollBasicInfo: undefined,
        templateContent: undefined,
    };
}
exports.WebcastPollMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.messageType !== 0) {
            writer.uint32(16).int32(message.messageType);
        }
        if (message.pollId !== "0") {
            writer.uint32(24).int64(message.pollId);
        }
        if (message.startContent !== undefined) {
            data_1.PollStartContent.encode(message.startContent, writer.uint32(34).fork()).join();
        }
        if (message.endContent !== undefined) {
            data_1.PollEndContent.encode(message.endContent, writer.uint32(42).fork()).join();
        }
        if (message.updateContent !== undefined) {
            data_1.PollUpdateVotesContent.encode(message.updateContent, writer.uint32(50).fork()).join();
        }
        if (message.pollKind !== 0) {
            writer.uint32(56).int32(message.pollKind);
        }
        if (message.pollBasicInfo !== undefined) {
            exports.WebcastPollMessage_PollBasicInfo.encode(message.pollBasicInfo, writer.uint32(66).fork()).join();
        }
        if (message.templateContent !== undefined) {
            exports.WebcastPollMessage_TemplateContent.encode(message.templateContent, 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 = createBaseWebcastPollMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.messageType = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.pollId = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.startContent = data_1.PollStartContent.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.endContent = data_1.PollEndContent.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.updateContent = data_1.PollUpdateVotesContent.decode(reader, reader.uint32());
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.pollKind = reader.int32();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.pollBasicInfo = exports.WebcastPollMessage_PollBasicInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.templateContent = exports.WebcastPollMessage_TemplateContent.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastPollMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastPollMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.messageType = object.messageType ?? 0;
        message.pollId = object.pollId ?? "0";
        message.startContent = (object.startContent !== undefined && object.startContent !== null)
            ? data_1.PollStartContent.fromPartial(object.startContent)
            : undefined;
        message.endContent = (object.endContent !== undefined && object.endContent !== null)
            ? data_1.PollEndContent.fromPartial(object.endContent)
            : undefined;
        message.updateContent = (object.updateContent !== undefined && object.updateContent !== null)
            ? data_1.PollUpdateVotesContent.fromPartial(object.updateContent)
            : undefined;
        message.pollKind = object.pollKind ?? 0;
        message.pollBasicInfo = (object.pollBasicInfo !== undefined && object.pollBasicInfo !== null)
            ? exports.WebcastPollMessage_PollBasicInfo.fromPartial(object.pollBasicInfo)
            : undefined;
        message.templateContent = (object.templateContent !== undefined && object.templateContent !== null)
            ? exports.WebcastPollMessage_TemplateContent.fromPartial(object.templateContent)
            : undefined;
        return message;
    },
};
function createBaseWebcastPollMessage_TemplateContent() {
    return { templateId: "0", templateIdStr: "", status: 0, pollKind: 0, appealStatus: 0, violationIdStr: "" };
}
exports.WebcastPollMessage_TemplateContent = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.templateId !== "0") {
            writer.uint32(8).int64(message.templateId);
        }
        if (message.templateIdStr !== "") {
            writer.uint32(18).string(message.templateIdStr);
        }
        if (message.status !== 0) {
            writer.uint32(24).int32(message.status);
        }
        if (message.pollKind !== 0) {
            writer.uint32(32).int32(message.pollKind);
        }
        if (message.appealStatus !== 0) {
            writer.uint32(40).int32(message.appealStatus);
        }
        if (message.violationIdStr !== "") {
            writer.uint32(50).string(message.violationIdStr);
        }
        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 = createBaseWebcastPollMessage_TemplateContent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.templateId = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.templateIdStr = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.status = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.pollKind = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.appealStatus = reader.int32();
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.violationIdStr = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastPollMessage_TemplateContent.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastPollMessage_TemplateContent();
        message.templateId = object.templateId ?? "0";
        message.templateIdStr = object.templateIdStr ?? "";
        message.status = object.status ?? 0;
        message.pollKind = object.pollKind ?? 0;
        message.appealStatus = object.appealStatus ?? 0;
        message.violationIdStr = object.violationIdStr ?? "";
        return message;
    },
};
function createBaseWebcastPollMessage_PollBasicInfo() {
    return {
        pollSponsor: "",
        giftId: "0",
        title: "",
        isSuggestedQuestion: false,
        userCnt: "0",
        gift: undefined,
        pollIdStr: "",
        suggestedQuestionKey: "",
        pollDuration: "0",
        timeRemain: "0",
        pollIndex: "0",
        templateId: "0",
    };
}
exports.WebcastPollMessage_PollBasicInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.pollSponsor !== "") {
            writer.uint32(10).string(message.pollSponsor);
        }
        if (message.giftId !== "0") {
            writer.uint32(16).int64(message.giftId);
        }
        if (message.title !== "") {
            writer.uint32(26).string(message.title);
        }
        if (message.isSuggestedQuestion !== false) {
            writer.uint32(32).bool(message.isSuggestedQuestion);
        }
        if (message.userCnt !== "0") {
            writer.uint32(40).int64(message.userCnt);
        }
        if (message.gift !== undefined) {
            data_1.Gift.encode(message.gift, writer.uint32(50).fork()).join();
        }
        if (message.pollIdStr !== "") {
            writer.uint32(58).string(message.pollIdStr);
        }
        if (message.suggestedQuestionKey !== "") {
            writer.uint32(66).string(message.suggestedQuestionKey);
        }
        if (message.pollDuration !== "0") {
            writer.uint32(72).int64(message.pollDuration);
        }
        if (message.timeRemain !== "0") {
            writer.uint32(80).int64(message.timeRemain);
        }
        if (message.pollIndex !== "0") {
            writer.uint32(88).int64(message.pollIndex);
        }
        if (message.templateId !== "0") {
            writer.uint32(96).int64(message.templateId);
        }
        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 = createBaseWebcastPollMessage_PollBasicInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.pollSponsor = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.giftId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.title = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.isSuggestedQuestion = reader.bool();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.userCnt = reader.int64().toString();
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.gift = data_1.Gift.decode(reader, reader.uint32());
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.pollIdStr = reader.string();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.suggestedQuestionKey = reader.string();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.pollDuration = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.timeRemain = reader.int64().toString();
                    continue;
                }
                case 11: {
                    if (tag !== 88) {
                        break;
                    }
                    message.pollIndex = reader.int64().toString();
                    continue;
                }
                case 12: {
                    if (tag !== 96) {
                        break;
                    }
                    message.templateId = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastPollMessage_PollBasicInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastPollMessage_PollBasicInfo();
        message.pollSponsor = object.pollSponsor ?? "";
        message.giftId = object.giftId ?? "0";
        message.title = object.title ?? "";
        message.isSuggestedQuestion = object.isSuggestedQuestion ?? false;
        message.userCnt = object.userCnt ?? "0";
        message.gift = (object.gift !== undefined && object.gift !== null) ? data_1.Gift.fromPartial(object.gift) : undefined;
        message.pollIdStr = object.pollIdStr ?? "";
        message.suggestedQuestionKey = object.suggestedQuestionKey ?? "";
        message.pollDuration = object.pollDuration ?? "0";
        message.timeRemain = object.timeRemain ?? "0";
        message.pollIndex = object.pollIndex ?? "0";
        message.templateId = object.templateId ?? "0";
        return message;
    },
};
function createBaseWebcastRankTextMessage() {
    return {
        common: undefined,
        scene: 0,
        ownerIdxBeforeUpdate: "0",
        ownerIdxAfterUpdate: "0",
        selfGetBadgeMsg: undefined,
        otherGetBadgeMsg: undefined,
        curUserId: "0",
    };
}
exports.WebcastRankTextMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.scene !== 0) {
            writer.uint32(16).int32(message.scene);
        }
        if (message.ownerIdxBeforeUpdate !== "0") {
            writer.uint32(24).int64(message.ownerIdxBeforeUpdate);
        }
        if (message.ownerIdxAfterUpdate !== "0") {
            writer.uint32(32).int64(message.ownerIdxAfterUpdate);
        }
        if (message.selfGetBadgeMsg !== undefined) {
            data_1.Text.encode(message.selfGetBadgeMsg, writer.uint32(42).fork()).join();
        }
        if (message.otherGetBadgeMsg !== undefined) {
            data_1.Text.encode(message.otherGetBadgeMsg, writer.uint32(50).fork()).join();
        }
        if (message.curUserId !== "0") {
            writer.uint32(56).int64(message.curUserId);
        }
        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 = createBaseWebcastRankTextMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.scene = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.ownerIdxBeforeUpdate = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.ownerIdxAfterUpdate = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.selfGetBadgeMsg = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.otherGetBadgeMsg = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.curUserId = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastRankTextMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastRankTextMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.scene = object.scene ?? 0;
        message.ownerIdxBeforeUpdate = object.ownerIdxBeforeUpdate ?? "0";
        message.ownerIdxAfterUpdate = object.ownerIdxAfterUpdate ?? "0";
        message.selfGetBadgeMsg = (object.selfGetBadgeMsg !== undefined && object.selfGetBadgeMsg !== null)
            ? data_1.Text.fromPartial(object.selfGetBadgeMsg)
            : undefined;
        message.otherGetBadgeMsg = (object.otherGetBadgeMsg !== undefined && object.otherGetBadgeMsg !== null)
            ? data_1.Text.fromPartial(object.otherGetBadgeMsg)
            : undefined;
        message.curUserId = object.curUserId ?? "0";
        return message;
    },
};
function createBaseWebcastLinkMicBattlePunishFinish() {
    return { common: undefined, channelId: "0", opUid: "0", reason: 0, battleId: "0", battleSettings: undefined };
}
exports.WebcastLinkMicBattlePunishFinish = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.channelId !== "0") {
            writer.uint32(16).int64(message.channelId);
        }
        if (message.opUid !== "0") {
            writer.uint32(24).int64(message.opUid);
        }
        if (message.reason !== 0) {
            writer.uint32(32).int32(message.reason);
        }
        if (message.battleId !== "0") {
            writer.uint32(40).int64(message.battleId);
        }
        if (message.battleSettings !== undefined) {
            data_1.BattleSetting.encode(message.battleSettings, 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 = createBaseWebcastLinkMicBattlePunishFinish();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.channelId = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.opUid = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.reason = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.battleId = reader.int64().toString();
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.battleSettings = data_1.BattleSetting.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicBattlePunishFinish.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicBattlePunishFinish();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.channelId = object.channelId ?? "0";
        message.opUid = object.opUid ?? "0";
        message.reason = object.reason ?? 0;
        message.battleId = object.battleId ?? "0";
        message.battleSettings = (object.battleSettings !== undefined && object.battleSettings !== null)
            ? data_1.BattleSetting.fromPartial(object.battleSettings)
            : undefined;
        return message;
    },
};
function createBaseWebcastLinkmicBattleTaskMessage() {
    return {
        common: undefined,
        battleTaskMessageType: 0,
        taskStart: undefined,
        taskUpdate: undefined,
        taskSettle: undefined,
        rewardSettle: undefined,
        battleId: "0",
    };
}
exports.WebcastLinkmicBattleTaskMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.battleTaskMessageType !== 0) {
            writer.uint32(16).int32(message.battleTaskMessageType);
        }
        if (message.taskStart !== undefined) {
            exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart.encode(message.taskStart, writer.uint32(26).fork()).join();
        }
        if (message.taskUpdate !== undefined) {
            exports.WebcastLinkmicBattleTaskMessage_BattleTaskUpdate.encode(message.taskUpdate, writer.uint32(34).fork()).join();
        }
        if (message.taskSettle !== undefined) {
            exports.WebcastLinkmicBattleTaskMessage_BattleTaskSettle.encode(message.taskSettle, writer.uint32(42).fork()).join();
        }
        if (message.rewardSettle !== undefined) {
            exports.WebcastLinkmicBattleTaskMessage_BattleRewardSettle.encode(message.rewardSettle, writer.uint32(50).fork()).join();
        }
        if (message.battleId !== "0") {
            writer.uint32(160).int64(message.battleId);
        }
        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 = createBaseWebcastLinkmicBattleTaskMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.battleTaskMessageType = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.taskStart = exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.taskUpdate = exports.WebcastLinkmicBattleTaskMessage_BattleTaskUpdate.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.taskSettle = exports.WebcastLinkmicBattleTaskMessage_BattleTaskSettle.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.rewardSettle = exports.WebcastLinkmicBattleTaskMessage_BattleRewardSettle.decode(reader, reader.uint32());
                    continue;
                }
                case 20: {
                    if (tag !== 160) {
                        break;
                    }
                    message.battleId = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkmicBattleTaskMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkmicBattleTaskMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.battleTaskMessageType = object.battleTaskMessageType ?? 0;
        message.taskStart = (object.taskStart !== undefined && object.taskStart !== null)
            ? exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart.fromPartial(object.taskStart)
            : undefined;
        message.taskUpdate = (object.taskUpdate !== undefined && object.taskUpdate !== null)
            ? exports.WebcastLinkmicBattleTaskMessage_BattleTaskUpdate.fromPartial(object.taskUpdate)
            : undefined;
        message.taskSettle = (object.taskSettle !== undefined && object.taskSettle !== null)
            ? exports.WebcastLinkmicBattleTaskMessage_BattleTaskSettle.fromPartial(object.taskSettle)
            : undefined;
        message.rewardSettle = (object.rewardSettle !== undefined && object.rewardSettle !== null)
            ? exports.WebcastLinkmicBattleTaskMessage_BattleRewardSettle.fromPartial(object.rewardSettle)
            : undefined;
        message.battleId = object.battleId ?? "0";
        return message;
    },
};
function createBaseWebcastLinkmicBattleTaskMessage_BattlePrompt() {
    return { promptKey: "", promptElements: [] };
}
exports.WebcastLinkmicBattleTaskMessage_BattlePrompt = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.promptKey !== "") {
            writer.uint32(10).string(message.promptKey);
        }
        for (const v of message.promptElements) {
            exports.WebcastLinkmicBattleTaskMessage_BattlePrompt_BattlePromptElem.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 = createBaseWebcastLinkmicBattleTaskMessage_BattlePrompt();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.promptKey = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.promptElements.push(exports.WebcastLinkmicBattleTaskMessage_BattlePrompt_BattlePromptElem.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkmicBattleTaskMessage_BattlePrompt();
        message.promptKey = object.promptKey ?? "";
        message.promptElements =
            object.promptElements?.map((e) => exports.WebcastLinkmicBattleTaskMessage_BattlePrompt_BattlePromptElem.fromPartial(e)) ||
                [];
        return message;
    },
};
function createBaseWebcastLinkmicBattleTaskMessage_BattlePrompt_BattlePromptElem() {
    return { promptFieldKey: "", promptFieldValue: "" };
}
exports.WebcastLinkmicBattleTaskMessage_BattlePrompt_BattlePromptElem = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.promptFieldKey !== "") {
            writer.uint32(10).string(message.promptFieldKey);
        }
        if (message.promptFieldValue !== "") {
            writer.uint32(18).string(message.promptFieldValue);
        }
        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 = createBaseWebcastLinkmicBattleTaskMessage_BattlePrompt_BattlePromptElem();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.promptFieldKey = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.promptFieldValue = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkmicBattleTaskMessage_BattlePrompt_BattlePromptElem.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkmicBattleTaskMessage_BattlePrompt_BattlePromptElem();
        message.promptFieldKey = object.promptFieldKey ?? "";
        message.promptFieldValue = object.promptFieldValue ?? "";
        return message;
    },
};
function createBaseWebcastLinkmicBattleTaskMessage_BattleTaskStart() {
    return { battleBonusConfig: undefined };
}
exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.battleBonusConfig !== undefined) {
            exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig.encode(message.battleBonusConfig, 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 = createBaseWebcastLinkmicBattleTaskMessage_BattleTaskStart();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.battleBonusConfig = exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkmicBattleTaskMessage_BattleTaskStart();
        message.battleBonusConfig = (object.battleBonusConfig !== undefined && object.battleBonusConfig !== null)
            ? exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig.fromPartial(object.battleBonusConfig)
            : undefined;
        return message;
    },
};
function createBaseWebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig() {
    return {
        previewStartTime: "0",
        previewPeriodConfig: [],
        taskPeriodConfig: undefined,
        rewardPeriodConfig: undefined,
        taskGiftGuide: {},
        previewStartTimestamp: "0",
        previewClickActionSchemaUrl: "",
    };
}
exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.previewStartTime !== "0") {
            writer.uint32(8).int64(message.previewStartTime);
        }
        for (const v of message.previewPeriodConfig) {
            exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_PreviewPeriod.encode(v, writer.uint32(18).fork()).join();
        }
        if (message.taskPeriodConfig !== undefined) {
            exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_TaskPeriodConfig.encode(message.taskPeriodConfig, writer.uint32(26).fork()).join();
        }
        if (message.rewardPeriodConfig !== undefined) {
            exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_RewardPeriodConfig.encode(message.rewardPeriodConfig, writer.uint32(34).fork()).join();
        }
        Object.entries(message.taskGiftGuide).forEach(([key, value]) => {
            exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_TaskGiftGuideEntry.encode({
                key: key,
                value,
            }, writer.uint32(42).fork()).join();
        });
        if (message.previewStartTimestamp !== "0") {
            writer.uint32(48).int64(message.previewStartTimestamp);
        }
        if (message.previewClickActionSchemaUrl !== "") {
            writer.uint32(58).string(message.previewClickActionSchemaUrl);
        }
        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 = createBaseWebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.previewStartTime = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.previewPeriodConfig.push(exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_PreviewPeriod.decode(reader, reader.uint32()));
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.taskPeriodConfig = exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_TaskPeriodConfig
                        .decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.rewardPeriodConfig =
                        exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_RewardPeriodConfig.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    const entry5 = exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_TaskGiftGuideEntry.decode(reader, reader.uint32());
                    if (entry5.value !== undefined) {
                        message.taskGiftGuide[entry5.key] = entry5.value;
                    }
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.previewStartTimestamp = reader.int64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.previewClickActionSchemaUrl = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig();
        message.previewStartTime = object.previewStartTime ?? "0";
        message.previewPeriodConfig =
            object.previewPeriodConfig?.map((e) => exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_PreviewPeriod.fromPartial(e)) || [];
        message.taskPeriodConfig = (object.taskPeriodConfig !== undefined && object.taskPeriodConfig !== null)
            ? exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_TaskPeriodConfig.fromPartial(object.taskPeriodConfig)
            : undefined;
        message.rewardPeriodConfig = (object.rewardPeriodConfig !== undefined && object.rewardPeriodConfig !== null)
            ? exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_RewardPeriodConfig.fromPartial(object.rewardPeriodConfig)
            : undefined;
        message.taskGiftGuide = Object.entries(object.taskGiftGuide ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_BattleTaskGiftAmountGuide
                    .fromPartial(value);
            }
            return acc;
        }, {});
        message.previewStartTimestamp = object.previewStartTimestamp ?? "0";
        message.previewClickActionSchemaUrl = object.previewClickActionSchemaUrl ?? "";
        return message;
    },
};
function createBaseWebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_TaskGiftGuideEntry() {
    return { key: "0", value: undefined };
}
exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_TaskGiftGuideEntry = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.key !== "0") {
            writer.uint32(8).int64(message.key);
        }
        if (message.value !== undefined) {
            exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_BattleTaskGiftAmountGuide.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 = createBaseWebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_TaskGiftGuideEntry();
        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.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_BattleTaskGiftAmountGuide
                        .decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_TaskGiftGuideEntry.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_TaskGiftGuideEntry();
        message.key = object.key ?? "0";
        message.value = (object.value !== undefined && object.value !== null)
            ? exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_BattleTaskGiftAmountGuide.fromPartial(object.value)
            : undefined;
        return message;
    },
};
function createBaseWebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_PreviewPeriod() {
    return { duration: "0", promot: undefined, icon: undefined };
}
exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_PreviewPeriod = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.duration !== "0") {
            writer.uint32(8).int64(message.duration);
        }
        if (message.promot !== undefined) {
            exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.encode(message.promot, writer.uint32(18).fork()).join();
        }
        if (message.icon !== undefined) {
            data_1.Image.encode(message.icon, writer.uint32(202).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 = createBaseWebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_PreviewPeriod();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.duration = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.promot = exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.decode(reader, reader.uint32());
                    continue;
                }
                case 25: {
                    if (tag !== 202) {
                        break;
                    }
                    message.icon = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_PreviewPeriod.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_PreviewPeriod();
        message.duration = object.duration ?? "0";
        message.promot = (object.promot !== undefined && object.promot !== null)
            ? exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.fromPartial(object.promot)
            : undefined;
        message.icon = (object.icon !== undefined && object.icon !== null) ? data_1.Image.fromPartial(object.icon) : undefined;
        return message;
    },
};
function createBaseWebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_TaskPeriodConfig() {
    return {
        taskStartTime: "0",
        duration: "0",
        targetStartTimestamp: "0",
        clickAction: 0,
        clickToastPrompt: undefined,
        promptType: 0,
        taskStaticPrompt: undefined,
        progressTarget: "0",
        targetType: 0,
        icon: undefined,
        clickActionSchemaUrl: "",
    };
}
exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_TaskPeriodConfig = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.taskStartTime !== "0") {
            writer.uint32(8).int64(message.taskStartTime);
        }
        if (message.duration !== "0") {
            writer.uint32(16).int64(message.duration);
        }
        if (message.targetStartTimestamp !== "0") {
            writer.uint32(24).int64(message.targetStartTimestamp);
        }
        if (message.clickAction !== 0) {
            writer.uint32(88).int32(message.clickAction);
        }
        if (message.clickToastPrompt !== undefined) {
            exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.encode(message.clickToastPrompt, writer.uint32(98).fork()).join();
        }
        if (message.promptType !== 0) {
            writer.uint32(168).int32(message.promptType);
        }
        if (message.taskStaticPrompt !== undefined) {
            exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.encode(message.taskStaticPrompt, writer.uint32(178).fork()).join();
        }
        if (message.progressTarget !== "0") {
            writer.uint32(184).int64(message.progressTarget);
        }
        if (message.targetType !== 0) {
            writer.uint32(192).int32(message.targetType);
        }
        if (message.icon !== undefined) {
            data_1.Image.encode(message.icon, writer.uint32(202).fork()).join();
        }
        if (message.clickActionSchemaUrl !== "") {
            writer.uint32(210).string(message.clickActionSchemaUrl);
        }
        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 = createBaseWebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_TaskPeriodConfig();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.taskStartTime = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.duration = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.targetStartTimestamp = reader.int64().toString();
                    continue;
                }
                case 11: {
                    if (tag !== 88) {
                        break;
                    }
                    message.clickAction = reader.int32();
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.clickToastPrompt = exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.decode(reader, reader.uint32());
                    continue;
                }
                case 21: {
                    if (tag !== 168) {
                        break;
                    }
                    message.promptType = reader.int32();
                    continue;
                }
                case 22: {
                    if (tag !== 178) {
                        break;
                    }
                    message.taskStaticPrompt = exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.decode(reader, reader.uint32());
                    continue;
                }
                case 23: {
                    if (tag !== 184) {
                        break;
                    }
                    message.progressTarget = reader.int64().toString();
                    continue;
                }
                case 24: {
                    if (tag !== 192) {
                        break;
                    }
                    message.targetType = reader.int32();
                    continue;
                }
                case 25: {
                    if (tag !== 202) {
                        break;
                    }
                    message.icon = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 26: {
                    if (tag !== 210) {
                        break;
                    }
                    message.clickActionSchemaUrl = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_TaskPeriodConfig.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_TaskPeriodConfig();
        message.taskStartTime = object.taskStartTime ?? "0";
        message.duration = object.duration ?? "0";
        message.targetStartTimestamp = object.targetStartTimestamp ?? "0";
        message.clickAction = object.clickAction ?? 0;
        message.clickToastPrompt = (object.clickToastPrompt !== undefined && object.clickToastPrompt !== null)
            ? exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.fromPartial(object.clickToastPrompt)
            : undefined;
        message.promptType = object.promptType ?? 0;
        message.taskStaticPrompt = (object.taskStaticPrompt !== undefined && object.taskStaticPrompt !== null)
            ? exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.fromPartial(object.taskStaticPrompt)
            : undefined;
        message.progressTarget = object.progressTarget ?? "0";
        message.targetType = object.targetType ?? 0;
        message.icon = (object.icon !== undefined && object.icon !== null) ? data_1.Image.fromPartial(object.icon) : undefined;
        message.clickActionSchemaUrl = object.clickActionSchemaUrl ?? "";
        return message;
    },
};
function createBaseWebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_RewardPeriodConfig() {
    return {
        rewardStartTime: "0",
        duration: "0",
        rewardMultiple: 0,
        rewardStartTimestamp: "0",
        rewardPraparePrompt: undefined,
        rewardingPrompt: undefined,
        clickPrompt: undefined,
    };
}
exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_RewardPeriodConfig = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.rewardStartTime !== "0") {
            writer.uint32(8).int64(message.rewardStartTime);
        }
        if (message.duration !== "0") {
            writer.uint32(16).int64(message.duration);
        }
        if (message.rewardMultiple !== 0) {
            writer.uint32(24).int32(message.rewardMultiple);
        }
        if (message.rewardStartTimestamp !== "0") {
            writer.uint32(32).int64(message.rewardStartTimestamp);
        }
        if (message.rewardPraparePrompt !== undefined) {
            exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.encode(message.rewardPraparePrompt, writer.uint32(90).fork()).join();
        }
        if (message.rewardingPrompt !== undefined) {
            exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.encode(message.rewardingPrompt, writer.uint32(98).fork()).join();
        }
        if (message.clickPrompt !== undefined) {
            exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.encode(message.clickPrompt, 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 = createBaseWebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_RewardPeriodConfig();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.rewardStartTime = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.duration = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.rewardMultiple = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.rewardStartTimestamp = reader.int64().toString();
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.rewardPraparePrompt = exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.decode(reader, reader.uint32());
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.rewardingPrompt = exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.decode(reader, reader.uint32());
                    continue;
                }
                case 13: {
                    if (tag !== 106) {
                        break;
                    }
                    message.clickPrompt = exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_RewardPeriodConfig.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_RewardPeriodConfig();
        message.rewardStartTime = object.rewardStartTime ?? "0";
        message.duration = object.duration ?? "0";
        message.rewardMultiple = object.rewardMultiple ?? 0;
        message.rewardStartTimestamp = object.rewardStartTimestamp ?? "0";
        message.rewardPraparePrompt = (object.rewardPraparePrompt !== undefined && object.rewardPraparePrompt !== null)
            ? exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.fromPartial(object.rewardPraparePrompt)
            : undefined;
        message.rewardingPrompt = (object.rewardingPrompt !== undefined && object.rewardingPrompt !== null)
            ? exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.fromPartial(object.rewardingPrompt)
            : undefined;
        message.clickPrompt = (object.clickPrompt !== undefined && object.clickPrompt !== null)
            ? exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.fromPartial(object.clickPrompt)
            : undefined;
        return message;
    },
};
function createBaseWebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_BattleTaskGiftAmountGuide() {
    return {
        guidePrompt: undefined,
        promptType: 0,
        disappearDuration: 0,
        iconImage: undefined,
        giftImage: undefined,
        recommendGiftId: "0",
        recommendGiftCount: 0,
        guideContent: undefined,
    };
}
exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_BattleTaskGiftAmountGuide = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.guidePrompt !== undefined) {
            exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.encode(message.guidePrompt, writer.uint32(10).fork()).join();
        }
        if (message.promptType !== 0) {
            writer.uint32(16).int32(message.promptType);
        }
        if (message.disappearDuration !== 0) {
            writer.uint32(24).int32(message.disappearDuration);
        }
        if (message.iconImage !== undefined) {
            data_1.Image.encode(message.iconImage, writer.uint32(90).fork()).join();
        }
        if (message.giftImage !== undefined) {
            data_1.Image.encode(message.giftImage, writer.uint32(98).fork()).join();
        }
        if (message.recommendGiftId !== "0") {
            writer.uint32(168).int64(message.recommendGiftId);
        }
        if (message.recommendGiftCount !== 0) {
            writer.uint32(176).int32(message.recommendGiftCount);
        }
        if (message.guideContent !== undefined) {
            data_1.Text.encode(message.guideContent, writer.uint32(186).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 = createBaseWebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_BattleTaskGiftAmountGuide();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.guidePrompt = exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.promptType = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.disappearDuration = reader.int32();
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.iconImage = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.giftImage = data_1.Image.decode(reader, reader.uint32());
                    continue;
                }
                case 21: {
                    if (tag !== 168) {
                        break;
                    }
                    message.recommendGiftId = reader.int64().toString();
                    continue;
                }
                case 22: {
                    if (tag !== 176) {
                        break;
                    }
                    message.recommendGiftCount = reader.int32();
                    continue;
                }
                case 23: {
                    if (tag !== 186) {
                        break;
                    }
                    message.guideContent = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_BattleTaskGiftAmountGuide.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkmicBattleTaskMessage_BattleTaskStart_BattleBonusConfig_BattleTaskGiftAmountGuide();
        message.guidePrompt = (object.guidePrompt !== undefined && object.guidePrompt !== null)
            ? exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.fromPartial(object.guidePrompt)
            : undefined;
        message.promptType = object.promptType ?? 0;
        message.disappearDuration = object.disappearDuration ?? 0;
        message.iconImage = (object.iconImage !== undefined && object.iconImage !== null)
            ? data_1.Image.fromPartial(object.iconImage)
            : undefined;
        message.giftImage = (object.giftImage !== undefined && object.giftImage !== null)
            ? data_1.Image.fromPartial(object.giftImage)
            : undefined;
        message.recommendGiftId = object.recommendGiftId ?? "0";
        message.recommendGiftCount = object.recommendGiftCount ?? 0;
        message.guideContent = (object.guideContent !== undefined && object.guideContent !== null)
            ? data_1.Text.fromPartial(object.guideContent)
            : undefined;
        return message;
    },
};
function createBaseWebcastLinkmicBattleTaskMessage_BattleTaskUpdate() {
    return { taskProgress: "0", fromUserUid: "0", promptKey: "", logId: "" };
}
exports.WebcastLinkmicBattleTaskMessage_BattleTaskUpdate = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.taskProgress !== "0") {
            writer.uint32(8).int64(message.taskProgress);
        }
        if (message.fromUserUid !== "0") {
            writer.uint32(16).int64(message.fromUserUid);
        }
        if (message.promptKey !== "") {
            writer.uint32(26).string(message.promptKey);
        }
        if (message.logId !== "") {
            writer.uint32(170).string(message.logId);
        }
        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 = createBaseWebcastLinkmicBattleTaskMessage_BattleTaskUpdate();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.taskProgress = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.fromUserUid = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.promptKey = reader.string();
                    continue;
                }
                case 21: {
                    if (tag !== 170) {
                        break;
                    }
                    message.logId = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkmicBattleTaskMessage_BattleTaskUpdate.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkmicBattleTaskMessage_BattleTaskUpdate();
        message.taskProgress = object.taskProgress ?? "0";
        message.fromUserUid = object.fromUserUid ?? "0";
        message.promptKey = object.promptKey ?? "";
        message.logId = object.logId ?? "";
        return message;
    },
};
function createBaseWebcastLinkmicBattleTaskMessage_BattleTaskSettle() {
    return { taskResult: 0, rewardStartTime: "0", rewardStartTimestamp: "0" };
}
exports.WebcastLinkmicBattleTaskMessage_BattleTaskSettle = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.taskResult !== 0) {
            writer.uint32(8).int32(message.taskResult);
        }
        if (message.rewardStartTime !== "0") {
            writer.uint32(16).int64(message.rewardStartTime);
        }
        if (message.rewardStartTimestamp !== "0") {
            writer.uint32(24).int64(message.rewardStartTimestamp);
        }
        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 = createBaseWebcastLinkmicBattleTaskMessage_BattleTaskSettle();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.taskResult = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.rewardStartTime = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.rewardStartTimestamp = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkmicBattleTaskMessage_BattleTaskSettle.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkmicBattleTaskMessage_BattleTaskSettle();
        message.taskResult = object.taskResult ?? 0;
        message.rewardStartTime = object.rewardStartTime ?? "0";
        message.rewardStartTimestamp = object.rewardStartTimestamp ?? "0";
        return message;
    },
};
function createBaseWebcastLinkmicBattleTaskMessage_BattleRewardSettle() {
    return { rewardSettlePrompt: undefined, status: 0 };
}
exports.WebcastLinkmicBattleTaskMessage_BattleRewardSettle = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.rewardSettlePrompt !== undefined) {
            exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.encode(message.rewardSettlePrompt, writer.uint32(10).fork()).join();
        }
        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 = createBaseWebcastLinkmicBattleTaskMessage_BattleRewardSettle();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.rewardSettlePrompt = exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.decode(reader, reader.uint32());
                    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.WebcastLinkmicBattleTaskMessage_BattleRewardSettle.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkmicBattleTaskMessage_BattleRewardSettle();
        message.rewardSettlePrompt = (object.rewardSettlePrompt !== undefined && object.rewardSettlePrompt !== null)
            ? exports.WebcastLinkmicBattleTaskMessage_BattlePrompt.fromPartial(object.rewardSettlePrompt)
            : undefined;
        message.status = object.status ?? 0;
        return message;
    },
};
function createBaseWebcastLinkMicFanTicketMethod() {
    return { common: undefined, FanTicketRoomNotice: undefined };
}
exports.WebcastLinkMicFanTicketMethod = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.FanTicketRoomNotice !== undefined) {
            data_1.FanTicketRoomNoticeContent.encode(message.FanTicketRoomNotice, 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 = createBaseWebcastLinkMicFanTicketMethod();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.FanTicketRoomNotice = data_1.FanTicketRoomNoticeContent.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicFanTicketMethod.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicFanTicketMethod();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.FanTicketRoomNotice = (object.FanTicketRoomNotice !== undefined && object.FanTicketRoomNotice !== null)
            ? data_1.FanTicketRoomNoticeContent.fromPartial(object.FanTicketRoomNotice)
            : undefined;
        return message;
    },
};
function createBaseWebcastLinkMicMethod() {
    return {
        common: undefined,
        messageType: 0,
        accessKey: "",
        anchorLinkmicId: "0",
        userId: "0",
        fanTicket: "0",
        totalLinkMicFanTicket: "0",
        channelId: "0",
        layout: "0",
        vendor: "0",
        dimension: "0",
        theme: "",
        inviteUid: "0",
        reply: 0,
        duration: 0,
        matchType: 0,
        win: false,
        prompts: "",
        toUserId: "0",
        tips: "",
        startTimeMs: "0",
        confluenceType: 0,
        fromRoomId: "0",
        inviteType: 0,
        subType: "0",
        rtcExtInfo: "",
        appId: "",
        appSign: "",
        anchorLinkMicIdStr: "",
        rivalAnchorId: "0",
        rivalLinkmicId: 0,
        rivalLinkmicIdStr: "",
        shouldShowPopup: false,
        rtcJoinChannel: false,
        fanTicketType: 0,
    };
}
exports.WebcastLinkMicMethod = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.messageType !== 0) {
            writer.uint32(16).int32(message.messageType);
        }
        if (message.accessKey !== "") {
            writer.uint32(26).string(message.accessKey);
        }
        if (message.anchorLinkmicId !== "0") {
            writer.uint32(32).int64(message.anchorLinkmicId);
        }
        if (message.userId !== "0") {
            writer.uint32(40).int64(message.userId);
        }
        if (message.fanTicket !== "0") {
            writer.uint32(48).int64(message.fanTicket);
        }
        if (message.totalLinkMicFanTicket !== "0") {
            writer.uint32(56).int64(message.totalLinkMicFanTicket);
        }
        if (message.channelId !== "0") {
            writer.uint32(64).int64(message.channelId);
        }
        if (message.layout !== "0") {
            writer.uint32(72).int64(message.layout);
        }
        if (message.vendor !== "0") {
            writer.uint32(80).int64(message.vendor);
        }
        if (message.dimension !== "0") {
            writer.uint32(88).int64(message.dimension);
        }
        if (message.theme !== "") {
            writer.uint32(98).string(message.theme);
        }
        if (message.inviteUid !== "0") {
            writer.uint32(104).int64(message.inviteUid);
        }
        if (message.reply !== 0) {
            writer.uint32(112).int32(message.reply);
        }
        if (message.duration !== 0) {
            writer.uint32(128).int32(message.duration);
        }
        if (message.matchType !== 0) {
            writer.uint32(144).int32(message.matchType);
        }
        if (message.win !== false) {
            writer.uint32(152).bool(message.win);
        }
        if (message.prompts !== "") {
            writer.uint32(162).string(message.prompts);
        }
        if (message.toUserId !== "0") {
            writer.uint32(168).int64(message.toUserId);
        }
        if (message.tips !== "") {
            writer.uint32(202).string(message.tips);
        }
        if (message.startTimeMs !== "0") {
            writer.uint32(208).int64(message.startTimeMs);
        }
        if (message.confluenceType !== 0) {
            writer.uint32(216).int32(message.confluenceType);
        }
        if (message.fromRoomId !== "0") {
            writer.uint32(224).int64(message.fromRoomId);
        }
        if (message.inviteType !== 0) {
            writer.uint32(232).int32(message.inviteType);
        }
        if (message.subType !== "0") {
            writer.uint32(240).int64(message.subType);
        }
        if (message.rtcExtInfo !== "") {
            writer.uint32(258).string(message.rtcExtInfo);
        }
        if (message.appId !== "") {
            writer.uint32(274).string(message.appId);
        }
        if (message.appSign !== "") {
            writer.uint32(282).string(message.appSign);
        }
        if (message.anchorLinkMicIdStr !== "") {
            writer.uint32(298).string(message.anchorLinkMicIdStr);
        }
        if (message.rivalAnchorId !== "0") {
            writer.uint32(304).int64(message.rivalAnchorId);
        }
        if (message.rivalLinkmicId !== 0) {
            writer.uint32(312).int32(message.rivalLinkmicId);
        }
        if (message.rivalLinkmicIdStr !== "") {
            writer.uint32(322).string(message.rivalLinkmicIdStr);
        }
        if (message.shouldShowPopup !== false) {
            writer.uint32(328).bool(message.shouldShowPopup);
        }
        if (message.rtcJoinChannel !== false) {
            writer.uint32(408).bool(message.rtcJoinChannel);
        }
        if (message.fanTicketType !== 0) {
            writer.uint32(416).int32(message.fanTicketType);
        }
        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 = createBaseWebcastLinkMicMethod();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.messageType = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.accessKey = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.anchorLinkmicId = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.userId = reader.int64().toString();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.fanTicket = reader.int64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.totalLinkMicFanTicket = reader.int64().toString();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.channelId = reader.int64().toString();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.layout = reader.int64().toString();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.vendor = reader.int64().toString();
                    continue;
                }
                case 11: {
                    if (tag !== 88) {
                        break;
                    }
                    message.dimension = reader.int64().toString();
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.theme = reader.string();
                    continue;
                }
                case 13: {
                    if (tag !== 104) {
                        break;
                    }
                    message.inviteUid = reader.int64().toString();
                    continue;
                }
                case 14: {
                    if (tag !== 112) {
                        break;
                    }
                    message.reply = reader.int32();
                    continue;
                }
                case 16: {
                    if (tag !== 128) {
                        break;
                    }
                    message.duration = reader.int32();
                    continue;
                }
                case 18: {
                    if (tag !== 144) {
                        break;
                    }
                    message.matchType = reader.int32();
                    continue;
                }
                case 19: {
                    if (tag !== 152) {
                        break;
                    }
                    message.win = reader.bool();
                    continue;
                }
                case 20: {
                    if (tag !== 162) {
                        break;
                    }
                    message.prompts = reader.string();
                    continue;
                }
                case 21: {
                    if (tag !== 168) {
                        break;
                    }
                    message.toUserId = reader.int64().toString();
                    continue;
                }
                case 25: {
                    if (tag !== 202) {
                        break;
                    }
                    message.tips = reader.string();
                    continue;
                }
                case 26: {
                    if (tag !== 208) {
                        break;
                    }
                    message.startTimeMs = reader.int64().toString();
                    continue;
                }
                case 27: {
                    if (tag !== 216) {
                        break;
                    }
                    message.confluenceType = reader.int32();
                    continue;
                }
                case 28: {
                    if (tag !== 224) {
                        break;
                    }
                    message.fromRoomId = reader.int64().toString();
                    continue;
                }
                case 29: {
                    if (tag !== 232) {
                        break;
                    }
                    message.inviteType = reader.int32();
                    continue;
                }
                case 30: {
                    if (tag !== 240) {
                        break;
                    }
                    message.subType = reader.int64().toString();
                    continue;
                }
                case 32: {
                    if (tag !== 258) {
                        break;
                    }
                    message.rtcExtInfo = reader.string();
                    continue;
                }
                case 34: {
                    if (tag !== 274) {
                        break;
                    }
                    message.appId = reader.string();
                    continue;
                }
                case 35: {
                    if (tag !== 282) {
                        break;
                    }
                    message.appSign = reader.string();
                    continue;
                }
                case 37: {
                    if (tag !== 298) {
                        break;
                    }
                    message.anchorLinkMicIdStr = reader.string();
                    continue;
                }
                case 38: {
                    if (tag !== 304) {
                        break;
                    }
                    message.rivalAnchorId = reader.int64().toString();
                    continue;
                }
                case 39: {
                    if (tag !== 312) {
                        break;
                    }
                    message.rivalLinkmicId = reader.int32();
                    continue;
                }
                case 40: {
                    if (tag !== 322) {
                        break;
                    }
                    message.rivalLinkmicIdStr = reader.string();
                    continue;
                }
                case 41: {
                    if (tag !== 328) {
                        break;
                    }
                    message.shouldShowPopup = reader.bool();
                    continue;
                }
                case 51: {
                    if (tag !== 408) {
                        break;
                    }
                    message.rtcJoinChannel = reader.bool();
                    continue;
                }
                case 52: {
                    if (tag !== 416) {
                        break;
                    }
                    message.fanTicketType = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMicMethod.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMicMethod();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.messageType = object.messageType ?? 0;
        message.accessKey = object.accessKey ?? "";
        message.anchorLinkmicId = object.anchorLinkmicId ?? "0";
        message.userId = object.userId ?? "0";
        message.fanTicket = object.fanTicket ?? "0";
        message.totalLinkMicFanTicket = object.totalLinkMicFanTicket ?? "0";
        message.channelId = object.channelId ?? "0";
        message.layout = object.layout ?? "0";
        message.vendor = object.vendor ?? "0";
        message.dimension = object.dimension ?? "0";
        message.theme = object.theme ?? "";
        message.inviteUid = object.inviteUid ?? "0";
        message.reply = object.reply ?? 0;
        message.duration = object.duration ?? 0;
        message.matchType = object.matchType ?? 0;
        message.win = object.win ?? false;
        message.prompts = object.prompts ?? "";
        message.toUserId = object.toUserId ?? "0";
        message.tips = object.tips ?? "";
        message.startTimeMs = object.startTimeMs ?? "0";
        message.confluenceType = object.confluenceType ?? 0;
        message.fromRoomId = object.fromRoomId ?? "0";
        message.inviteType = object.inviteType ?? 0;
        message.subType = object.subType ?? "0";
        message.rtcExtInfo = object.rtcExtInfo ?? "";
        message.appId = object.appId ?? "";
        message.appSign = object.appSign ?? "";
        message.anchorLinkMicIdStr = object.anchorLinkMicIdStr ?? "";
        message.rivalAnchorId = object.rivalAnchorId ?? "0";
        message.rivalLinkmicId = object.rivalLinkmicId ?? 0;
        message.rivalLinkmicIdStr = object.rivalLinkmicIdStr ?? "";
        message.shouldShowPopup = object.shouldShowPopup ?? false;
        message.rtcJoinChannel = object.rtcJoinChannel ?? false;
        message.fanTicketType = object.fanTicketType ?? 0;
        return message;
    },
};
function createBaseWebcastUnauthorizedMemberMessage() {
    return {
        common: undefined,
        action: 0,
        nickNamePrefix: undefined,
        nickName: "",
        enterText: undefined,
        publicAreaCommon: undefined,
    };
}
exports.WebcastUnauthorizedMemberMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.action !== 0) {
            writer.uint32(16).int32(message.action);
        }
        if (message.nickNamePrefix !== undefined) {
            data_1.Text.encode(message.nickNamePrefix, writer.uint32(26).fork()).join();
        }
        if (message.nickName !== "") {
            writer.uint32(34).string(message.nickName);
        }
        if (message.enterText !== undefined) {
            data_1.Text.encode(message.enterText, writer.uint32(42).fork()).join();
        }
        if (message.publicAreaCommon !== undefined) {
            data_1.PublicAreaMessageCommon.encode(message.publicAreaCommon, 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 = createBaseWebcastUnauthorizedMemberMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.action = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.nickNamePrefix = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.nickName = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.enterText = data_1.Text.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.publicAreaCommon = data_1.PublicAreaMessageCommon.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastUnauthorizedMemberMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastUnauthorizedMemberMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.action = object.action ?? 0;
        message.nickNamePrefix = (object.nickNamePrefix !== undefined && object.nickNamePrefix !== null)
            ? data_1.Text.fromPartial(object.nickNamePrefix)
            : undefined;
        message.nickName = object.nickName ?? "";
        message.enterText = (object.enterText !== undefined && object.enterText !== null)
            ? data_1.Text.fromPartial(object.enterText)
            : undefined;
        message.publicAreaCommon = (object.publicAreaCommon !== undefined && object.publicAreaCommon !== null)
            ? data_1.PublicAreaMessageCommon.fromPartial(object.publicAreaCommon)
            : undefined;
        return message;
    },
};
function createBaseWebcastMsgDetectMessage() {
    return {
        common: undefined,
        detectType: 0,
        triggerCondition: undefined,
        timeInfo: undefined,
        triggerBy: 0,
        fromRegion: "",
    };
}
exports.WebcastMsgDetectMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.detectType !== 0) {
            writer.uint32(16).int32(message.detectType);
        }
        if (message.triggerCondition !== undefined) {
            exports.WebcastMsgDetectMessage_TriggerCondition.encode(message.triggerCondition, writer.uint32(26).fork()).join();
        }
        if (message.timeInfo !== undefined) {
            exports.WebcastMsgDetectMessage_TimeInfo.encode(message.timeInfo, writer.uint32(34).fork()).join();
        }
        if (message.triggerBy !== 0) {
            writer.uint32(40).int32(message.triggerBy);
        }
        if (message.fromRegion !== "") {
            writer.uint32(50).string(message.fromRegion);
        }
        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 = createBaseWebcastMsgDetectMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.detectType = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.triggerCondition = exports.WebcastMsgDetectMessage_TriggerCondition.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.timeInfo = exports.WebcastMsgDetectMessage_TimeInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.triggerBy = reader.int32();
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.fromRegion = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastMsgDetectMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastMsgDetectMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.detectType = object.detectType ?? 0;
        message.triggerCondition = (object.triggerCondition !== undefined && object.triggerCondition !== null)
            ? exports.WebcastMsgDetectMessage_TriggerCondition.fromPartial(object.triggerCondition)
            : undefined;
        message.timeInfo = (object.timeInfo !== undefined && object.timeInfo !== null)
            ? exports.WebcastMsgDetectMessage_TimeInfo.fromPartial(object.timeInfo)
            : undefined;
        message.triggerBy = object.triggerBy ?? 0;
        message.fromRegion = object.fromRegion ?? "";
        return message;
    },
};
function createBaseWebcastMsgDetectMessage_TimeInfo() {
    return { clientStartMs: "0", apiRecvTimeMs: "0", apiSendToGoimMs: "0" };
}
exports.WebcastMsgDetectMessage_TimeInfo = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.clientStartMs !== "0") {
            writer.uint32(8).int64(message.clientStartMs);
        }
        if (message.apiRecvTimeMs !== "0") {
            writer.uint32(16).int64(message.apiRecvTimeMs);
        }
        if (message.apiSendToGoimMs !== "0") {
            writer.uint32(24).int64(message.apiSendToGoimMs);
        }
        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 = createBaseWebcastMsgDetectMessage_TimeInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.clientStartMs = reader.int64().toString();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.apiRecvTimeMs = reader.int64().toString();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.apiSendToGoimMs = reader.int64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastMsgDetectMessage_TimeInfo.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastMsgDetectMessage_TimeInfo();
        message.clientStartMs = object.clientStartMs ?? "0";
        message.apiRecvTimeMs = object.apiRecvTimeMs ?? "0";
        message.apiSendToGoimMs = object.apiSendToGoimMs ?? "0";
        return message;
    },
};
function createBaseWebcastMsgDetectMessage_TriggerCondition() {
    return {
        uplinkDetectHttp: false,
        uplinkDetectWebSocket: false,
        detectP2PMsg: false,
        detectRoomMsg: false,
        httpOptimize: false,
    };
}
exports.WebcastMsgDetectMessage_TriggerCondition = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.uplinkDetectHttp !== false) {
            writer.uint32(8).bool(message.uplinkDetectHttp);
        }
        if (message.uplinkDetectWebSocket !== false) {
            writer.uint32(16).bool(message.uplinkDetectWebSocket);
        }
        if (message.detectP2PMsg !== false) {
            writer.uint32(24).bool(message.detectP2PMsg);
        }
        if (message.detectRoomMsg !== false) {
            writer.uint32(32).bool(message.detectRoomMsg);
        }
        if (message.httpOptimize !== false) {
            writer.uint32(40).bool(message.httpOptimize);
        }
        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 = createBaseWebcastMsgDetectMessage_TriggerCondition();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.uplinkDetectHttp = reader.bool();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.uplinkDetectWebSocket = reader.bool();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.detectP2PMsg = reader.bool();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.detectRoomMsg = reader.bool();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.httpOptimize = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastMsgDetectMessage_TriggerCondition.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastMsgDetectMessage_TriggerCondition();
        message.uplinkDetectHttp = object.uplinkDetectHttp ?? false;
        message.uplinkDetectWebSocket = object.uplinkDetectWebSocket ?? false;
        message.detectP2PMsg = object.detectP2PMsg ?? false;
        message.detectRoomMsg = object.detectRoomMsg ?? false;
        message.httpOptimize = object.httpOptimize ?? false;
        return message;
    },
};
function createBaseWebcastOecLiveShoppingMessage() {
    return { common: undefined, data1: 0, shopData: undefined, shopTimings: undefined, details: undefined };
}
exports.WebcastOecLiveShoppingMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.data1 !== 0) {
            writer.uint32(16).uint32(message.data1);
        }
        if (message.shopData !== undefined) {
            exports.WebcastOecLiveShoppingMessage_LiveShoppingData.encode(message.shopData, writer.uint32(34).fork()).join();
        }
        if (message.shopTimings !== undefined) {
            data_1.TimeStampContainer.encode(message.shopTimings, writer.uint32(42).fork()).join();
        }
        if (message.details !== undefined) {
            exports.WebcastOecLiveShoppingMessage_LiveShoppingDetails.encode(message.details, 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 = createBaseWebcastOecLiveShoppingMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.data1 = reader.uint32();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.shopData = exports.WebcastOecLiveShoppingMessage_LiveShoppingData.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.shopTimings = data_1.TimeStampContainer.decode(reader, reader.uint32());
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.details = exports.WebcastOecLiveShoppingMessage_LiveShoppingDetails.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastOecLiveShoppingMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastOecLiveShoppingMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.data1 = object.data1 ?? 0;
        message.shopData = (object.shopData !== undefined && object.shopData !== null)
            ? exports.WebcastOecLiveShoppingMessage_LiveShoppingData.fromPartial(object.shopData)
            : undefined;
        message.shopTimings = (object.shopTimings !== undefined && object.shopTimings !== null)
            ? data_1.TimeStampContainer.fromPartial(object.shopTimings)
            : undefined;
        message.details = (object.details !== undefined && object.details !== null)
            ? exports.WebcastOecLiveShoppingMessage_LiveShoppingDetails.fromPartial(object.details)
            : undefined;
        return message;
    },
};
function createBaseWebcastOecLiveShoppingMessage_LiveShoppingData() {
    return {
        title: "",
        priceString: "",
        imageUrl: "",
        shopUrl: "",
        data1: "0",
        shopName: "",
        data2: "0",
        shopUrl2: "",
        data3: "0",
        data4: "0",
    };
}
exports.WebcastOecLiveShoppingMessage_LiveShoppingData = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.title !== "") {
            writer.uint32(10).string(message.title);
        }
        if (message.priceString !== "") {
            writer.uint32(18).string(message.priceString);
        }
        if (message.imageUrl !== "") {
            writer.uint32(26).string(message.imageUrl);
        }
        if (message.shopUrl !== "") {
            writer.uint32(34).string(message.shopUrl);
        }
        if (message.data1 !== "0") {
            writer.uint32(48).uint64(message.data1);
        }
        if (message.shopName !== "") {
            writer.uint32(58).string(message.shopName);
        }
        if (message.data2 !== "0") {
            writer.uint32(64).uint64(message.data2);
        }
        if (message.shopUrl2 !== "") {
            writer.uint32(74).string(message.shopUrl2);
        }
        if (message.data3 !== "0") {
            writer.uint32(80).uint64(message.data3);
        }
        if (message.data4 !== "0") {
            writer.uint32(88).uint64(message.data4);
        }
        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 = createBaseWebcastOecLiveShoppingMessage_LiveShoppingData();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.title = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.priceString = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.imageUrl = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.shopUrl = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.data1 = reader.uint64().toString();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.shopName = reader.string();
                    continue;
                }
                case 8: {
                    if (tag !== 64) {
                        break;
                    }
                    message.data2 = reader.uint64().toString();
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.shopUrl2 = reader.string();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.data3 = reader.uint64().toString();
                    continue;
                }
                case 11: {
                    if (tag !== 88) {
                        break;
                    }
                    message.data4 = reader.uint64().toString();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastOecLiveShoppingMessage_LiveShoppingData.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastOecLiveShoppingMessage_LiveShoppingData();
        message.title = object.title ?? "";
        message.priceString = object.priceString ?? "";
        message.imageUrl = object.imageUrl ?? "";
        message.shopUrl = object.shopUrl ?? "";
        message.data1 = object.data1 ?? "0";
        message.shopName = object.shopName ?? "";
        message.data2 = object.data2 ?? "0";
        message.shopUrl2 = object.shopUrl2 ?? "";
        message.data3 = object.data3 ?? "0";
        message.data4 = object.data4 ?? "0";
        return message;
    },
};
function createBaseWebcastOecLiveShoppingMessage_LiveShoppingDetails() {
    return { id1: "", data1: "", data2: 0, timestamp: "0", data: undefined };
}
exports.WebcastOecLiveShoppingMessage_LiveShoppingDetails = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.id1 !== "") {
            writer.uint32(10).string(message.id1);
        }
        if (message.data1 !== "") {
            writer.uint32(26).string(message.data1);
        }
        if (message.data2 !== 0) {
            writer.uint32(32).uint32(message.data2);
        }
        if (message.timestamp !== "0") {
            writer.uint32(40).uint64(message.timestamp);
        }
        if (message.data !== undefined) {
            data_1.ValueLabel.encode(message.data, 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 = createBaseWebcastOecLiveShoppingMessage_LiveShoppingDetails();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.id1 = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.data1 = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.data2 = reader.uint32();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.timestamp = reader.uint64().toString();
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.data = data_1.ValueLabel.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastOecLiveShoppingMessage_LiveShoppingDetails.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastOecLiveShoppingMessage_LiveShoppingDetails();
        message.id1 = object.id1 ?? "";
        message.data1 = object.data1 ?? "";
        message.data2 = object.data2 ?? 0;
        message.timestamp = object.timestamp ?? "0";
        message.data = (object.data !== undefined && object.data !== null)
            ? data_1.ValueLabel.fromPartial(object.data)
            : undefined;
        return message;
    },
};
function createBaseWebcastRoomPinMessage() {
    return {
        common: undefined,
        chatMessage: undefined,
        socialMessage: undefined,
        giftMessage: undefined,
        memberMessage: undefined,
        likeMessage: undefined,
        method: "",
        pinTime: "0",
        operator: undefined,
        action: 0,
        displayDuration: "0",
        pinId: "0",
        ecStreamerKey: "",
    };
}
exports.WebcastRoomPinMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.chatMessage !== undefined) {
            exports.WebcastChatMessage.encode(message.chatMessage, writer.uint32(18).fork()).join();
        }
        if (message.socialMessage !== undefined) {
            exports.WebcastSocialMessage.encode(message.socialMessage, writer.uint32(26).fork()).join();
        }
        if (message.giftMessage !== undefined) {
            exports.WebcastGiftMessage.encode(message.giftMessage, writer.uint32(34).fork()).join();
        }
        if (message.memberMessage !== undefined) {
            exports.WebcastMemberMessage.encode(message.memberMessage, writer.uint32(42).fork()).join();
        }
        if (message.likeMessage !== undefined) {
            exports.WebcastLikeMessage.encode(message.likeMessage, writer.uint32(50).fork()).join();
        }
        if (message.method !== "") {
            writer.uint32(242).string(message.method);
        }
        if (message.pinTime !== "0") {
            writer.uint32(248).int64(message.pinTime);
        }
        if (message.operator !== undefined) {
            data_1.User.encode(message.operator, writer.uint32(258).fork()).join();
        }
        if (message.action !== 0) {
            writer.uint32(264).int32(message.action);
        }
        if (message.displayDuration !== "0") {
            writer.uint32(272).int64(message.displayDuration);
        }
        if (message.pinId !== "0") {
            writer.uint32(280).int64(message.pinId);
        }
        if (message.ecStreamerKey !== "") {
            writer.uint32(290).string(message.ecStreamerKey);
        }
        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 = createBaseWebcastRoomPinMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.chatMessage = exports.WebcastChatMessage.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.socialMessage = exports.WebcastSocialMessage.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.giftMessage = exports.WebcastGiftMessage.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.memberMessage = exports.WebcastMemberMessage.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.likeMessage = exports.WebcastLikeMessage.decode(reader, reader.uint32());
                    continue;
                }
                case 30: {
                    if (tag !== 242) {
                        break;
                    }
                    message.method = reader.string();
                    continue;
                }
                case 31: {
                    if (tag !== 248) {
                        break;
                    }
                    message.pinTime = reader.int64().toString();
                    continue;
                }
                case 32: {
                    if (tag !== 258) {
                        break;
                    }
                    message.operator = data_1.User.decode(reader, reader.uint32());
                    continue;
                }
                case 33: {
                    if (tag !== 264) {
                        break;
                    }
                    message.action = reader.int32();
                    continue;
                }
                case 34: {
                    if (tag !== 272) {
                        break;
                    }
                    message.displayDuration = reader.int64().toString();
                    continue;
                }
                case 35: {
                    if (tag !== 280) {
                        break;
                    }
                    message.pinId = reader.int64().toString();
                    continue;
                }
                case 36: {
                    if (tag !== 290) {
                        break;
                    }
                    message.ecStreamerKey = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastRoomPinMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastRoomPinMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.chatMessage = (object.chatMessage !== undefined && object.chatMessage !== null)
            ? exports.WebcastChatMessage.fromPartial(object.chatMessage)
            : undefined;
        message.socialMessage = (object.socialMessage !== undefined && object.socialMessage !== null)
            ? exports.WebcastSocialMessage.fromPartial(object.socialMessage)
            : undefined;
        message.giftMessage = (object.giftMessage !== undefined && object.giftMessage !== null)
            ? exports.WebcastGiftMessage.fromPartial(object.giftMessage)
            : undefined;
        message.memberMessage = (object.memberMessage !== undefined && object.memberMessage !== null)
            ? exports.WebcastMemberMessage.fromPartial(object.memberMessage)
            : undefined;
        message.likeMessage = (object.likeMessage !== undefined && object.likeMessage !== null)
            ? exports.WebcastLikeMessage.fromPartial(object.likeMessage)
            : undefined;
        message.method = object.method ?? "";
        message.pinTime = object.pinTime ?? "0";
        message.operator = (object.operator !== undefined && object.operator !== null)
            ? data_1.User.fromPartial(object.operator)
            : undefined;
        message.action = object.action ?? 0;
        message.displayDuration = object.displayDuration ?? "0";
        message.pinId = object.pinId ?? "0";
        message.ecStreamerKey = object.ecStreamerKey ?? "";
        return message;
    },
};
function createBaseWebcastLinkMessage() {
    return {
        common: undefined,
        MessageType: 0,
        LinkerId: "0",
        Scene: 0,
        InviteContent: undefined,
        ReplyContent: undefined,
        CreateContent: undefined,
        CloseContent: undefined,
        EnterContent: undefined,
        LeaveContent: undefined,
        CancelContent: undefined,
        KickOutContent: undefined,
        LinkedListChangeContent: undefined,
        UpdateUserContent: undefined,
        WaitingListChangeContent: undefined,
        MuteContent: undefined,
        RandomMatchContent: undefined,
        UpdateUserSettingContent: undefined,
        MicIdxUpdateContent: undefined,
        ListChangeContent: undefined,
        CohostListChangeContent: undefined,
        MediaChangeContent: undefined,
        AcceptNoticeContent: undefined,
        SysKickOutContent: undefined,
        UserToastContent: undefined,
        extra: "",
        expireTimestamp: "0",
        transferExtra: "",
    };
}
exports.WebcastLinkMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.MessageType !== 0) {
            writer.uint32(16).int32(message.MessageType);
        }
        if (message.LinkerId !== "0") {
            writer.uint32(24).int64(message.LinkerId);
        }
        if (message.Scene !== 0) {
            writer.uint32(32).int32(message.Scene);
        }
        if (message.InviteContent !== undefined) {
            data_1.LinkerInviteContent.encode(message.InviteContent, writer.uint32(42).fork()).join();
        }
        if (message.ReplyContent !== undefined) {
            data_1.LinkerReplyContent.encode(message.ReplyContent, writer.uint32(50).fork()).join();
        }
        if (message.CreateContent !== undefined) {
            data_1.LinkerCreateContent.encode(message.CreateContent, writer.uint32(58).fork()).join();
        }
        if (message.CloseContent !== undefined) {
            data_1.LinkerCloseContent.encode(message.CloseContent, writer.uint32(66).fork()).join();
        }
        if (message.EnterContent !== undefined) {
            data_1.LinkerEnterContent.encode(message.EnterContent, writer.uint32(74).fork()).join();
        }
        if (message.LeaveContent !== undefined) {
            data_1.LinkerLeaveContent.encode(message.LeaveContent, writer.uint32(82).fork()).join();
        }
        if (message.CancelContent !== undefined) {
            data_1.LinkerCancelContent.encode(message.CancelContent, writer.uint32(90).fork()).join();
        }
        if (message.KickOutContent !== undefined) {
            data_1.LinkerKickOutContent.encode(message.KickOutContent, writer.uint32(98).fork()).join();
        }
        if (message.LinkedListChangeContent !== undefined) {
            data_1.LinkerLinkedListChangeContent.encode(message.LinkedListChangeContent, writer.uint32(106).fork()).join();
        }
        if (message.UpdateUserContent !== undefined) {
            data_1.LinkerUpdateUserContent.encode(message.UpdateUserContent, writer.uint32(114).fork()).join();
        }
        if (message.WaitingListChangeContent !== undefined) {
            data_1.LinkerWaitingListChangeContent.encode(message.WaitingListChangeContent, writer.uint32(122).fork()).join();
        }
        if (message.MuteContent !== undefined) {
            data_1.LinkerMuteContent.encode(message.MuteContent, writer.uint32(130).fork()).join();
        }
        if (message.RandomMatchContent !== undefined) {
            data_1.LinkerRandomMatchContent.encode(message.RandomMatchContent, writer.uint32(138).fork()).join();
        }
        if (message.UpdateUserSettingContent !== undefined) {
            data_1.LinkerUpdateUserSettingContent.encode(message.UpdateUserSettingContent, writer.uint32(146).fork()).join();
        }
        if (message.MicIdxUpdateContent !== undefined) {
            data_1.LinkerMicIdxUpdateContent.encode(message.MicIdxUpdateContent, writer.uint32(154).fork()).join();
        }
        if (message.ListChangeContent !== undefined) {
            data_1.LinkerListChangeContent.encode(message.ListChangeContent, writer.uint32(162).fork()).join();
        }
        if (message.CohostListChangeContent !== undefined) {
            data_1.CohostListChangeContent.encode(message.CohostListChangeContent, writer.uint32(170).fork()).join();
        }
        if (message.MediaChangeContent !== undefined) {
            data_1.LinkerMediaChangeContent.encode(message.MediaChangeContent, writer.uint32(178).fork()).join();
        }
        if (message.AcceptNoticeContent !== undefined) {
            data_1.LinkerAcceptNoticeContent.encode(message.AcceptNoticeContent, writer.uint32(186).fork()).join();
        }
        if (message.SysKickOutContent !== undefined) {
            data_1.LinkerSysKickOutContent.encode(message.SysKickOutContent, writer.uint32(810).fork()).join();
        }
        if (message.UserToastContent !== undefined) {
            data_1.LinkmicUserToastContent.encode(message.UserToastContent, writer.uint32(818).fork()).join();
        }
        if (message.extra !== "") {
            writer.uint32(1602).string(message.extra);
        }
        if (message.expireTimestamp !== "0") {
            writer.uint32(1608).int64(message.expireTimestamp);
        }
        if (message.transferExtra !== "") {
            writer.uint32(1618).string(message.transferExtra);
        }
        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 = createBaseWebcastLinkMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.MessageType = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.LinkerId = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.Scene = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.InviteContent = data_1.LinkerInviteContent.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.ReplyContent = data_1.LinkerReplyContent.decode(reader, reader.uint32());
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.CreateContent = data_1.LinkerCreateContent.decode(reader, reader.uint32());
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.CloseContent = data_1.LinkerCloseContent.decode(reader, reader.uint32());
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.EnterContent = data_1.LinkerEnterContent.decode(reader, reader.uint32());
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.LeaveContent = data_1.LinkerLeaveContent.decode(reader, reader.uint32());
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.CancelContent = data_1.LinkerCancelContent.decode(reader, reader.uint32());
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.KickOutContent = data_1.LinkerKickOutContent.decode(reader, reader.uint32());
                    continue;
                }
                case 13: {
                    if (tag !== 106) {
                        break;
                    }
                    message.LinkedListChangeContent = data_1.LinkerLinkedListChangeContent.decode(reader, reader.uint32());
                    continue;
                }
                case 14: {
                    if (tag !== 114) {
                        break;
                    }
                    message.UpdateUserContent = data_1.LinkerUpdateUserContent.decode(reader, reader.uint32());
                    continue;
                }
                case 15: {
                    if (tag !== 122) {
                        break;
                    }
                    message.WaitingListChangeContent = data_1.LinkerWaitingListChangeContent.decode(reader, reader.uint32());
                    continue;
                }
                case 16: {
                    if (tag !== 130) {
                        break;
                    }
                    message.MuteContent = data_1.LinkerMuteContent.decode(reader, reader.uint32());
                    continue;
                }
                case 17: {
                    if (tag !== 138) {
                        break;
                    }
                    message.RandomMatchContent = data_1.LinkerRandomMatchContent.decode(reader, reader.uint32());
                    continue;
                }
                case 18: {
                    if (tag !== 146) {
                        break;
                    }
                    message.UpdateUserSettingContent = data_1.LinkerUpdateUserSettingContent.decode(reader, reader.uint32());
                    continue;
                }
                case 19: {
                    if (tag !== 154) {
                        break;
                    }
                    message.MicIdxUpdateContent = data_1.LinkerMicIdxUpdateContent.decode(reader, reader.uint32());
                    continue;
                }
                case 20: {
                    if (tag !== 162) {
                        break;
                    }
                    message.ListChangeContent = data_1.LinkerListChangeContent.decode(reader, reader.uint32());
                    continue;
                }
                case 21: {
                    if (tag !== 170) {
                        break;
                    }
                    message.CohostListChangeContent = data_1.CohostListChangeContent.decode(reader, reader.uint32());
                    continue;
                }
                case 22: {
                    if (tag !== 178) {
                        break;
                    }
                    message.MediaChangeContent = data_1.LinkerMediaChangeContent.decode(reader, reader.uint32());
                    continue;
                }
                case 23: {
                    if (tag !== 186) {
                        break;
                    }
                    message.AcceptNoticeContent = data_1.LinkerAcceptNoticeContent.decode(reader, reader.uint32());
                    continue;
                }
                case 101: {
                    if (tag !== 810) {
                        break;
                    }
                    message.SysKickOutContent = data_1.LinkerSysKickOutContent.decode(reader, reader.uint32());
                    continue;
                }
                case 102: {
                    if (tag !== 818) {
                        break;
                    }
                    message.UserToastContent = data_1.LinkmicUserToastContent.decode(reader, reader.uint32());
                    continue;
                }
                case 200: {
                    if (tag !== 1602) {
                        break;
                    }
                    message.extra = reader.string();
                    continue;
                }
                case 201: {
                    if (tag !== 1608) {
                        break;
                    }
                    message.expireTimestamp = reader.int64().toString();
                    continue;
                }
                case 202: {
                    if (tag !== 1618) {
                        break;
                    }
                    message.transferExtra = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.MessageType = object.MessageType ?? 0;
        message.LinkerId = object.LinkerId ?? "0";
        message.Scene = object.Scene ?? 0;
        message.InviteContent = (object.InviteContent !== undefined && object.InviteContent !== null)
            ? data_1.LinkerInviteContent.fromPartial(object.InviteContent)
            : undefined;
        message.ReplyContent = (object.ReplyContent !== undefined && object.ReplyContent !== null)
            ? data_1.LinkerReplyContent.fromPartial(object.ReplyContent)
            : undefined;
        message.CreateContent = (object.CreateContent !== undefined && object.CreateContent !== null)
            ? data_1.LinkerCreateContent.fromPartial(object.CreateContent)
            : undefined;
        message.CloseContent = (object.CloseContent !== undefined && object.CloseContent !== null)
            ? data_1.LinkerCloseContent.fromPartial(object.CloseContent)
            : undefined;
        message.EnterContent = (object.EnterContent !== undefined && object.EnterContent !== null)
            ? data_1.LinkerEnterContent.fromPartial(object.EnterContent)
            : undefined;
        message.LeaveContent = (object.LeaveContent !== undefined && object.LeaveContent !== null)
            ? data_1.LinkerLeaveContent.fromPartial(object.LeaveContent)
            : undefined;
        message.CancelContent = (object.CancelContent !== undefined && object.CancelContent !== null)
            ? data_1.LinkerCancelContent.fromPartial(object.CancelContent)
            : undefined;
        message.KickOutContent = (object.KickOutContent !== undefined && object.KickOutContent !== null)
            ? data_1.LinkerKickOutContent.fromPartial(object.KickOutContent)
            : undefined;
        message.LinkedListChangeContent =
            (object.LinkedListChangeContent !== undefined && object.LinkedListChangeContent !== null)
                ? data_1.LinkerLinkedListChangeContent.fromPartial(object.LinkedListChangeContent)
                : undefined;
        message.UpdateUserContent = (object.UpdateUserContent !== undefined && object.UpdateUserContent !== null)
            ? data_1.LinkerUpdateUserContent.fromPartial(object.UpdateUserContent)
            : undefined;
        message.WaitingListChangeContent =
            (object.WaitingListChangeContent !== undefined && object.WaitingListChangeContent !== null)
                ? data_1.LinkerWaitingListChangeContent.fromPartial(object.WaitingListChangeContent)
                : undefined;
        message.MuteContent = (object.MuteContent !== undefined && object.MuteContent !== null)
            ? data_1.LinkerMuteContent.fromPartial(object.MuteContent)
            : undefined;
        message.RandomMatchContent = (object.RandomMatchContent !== undefined && object.RandomMatchContent !== null)
            ? data_1.LinkerRandomMatchContent.fromPartial(object.RandomMatchContent)
            : undefined;
        message.UpdateUserSettingContent =
            (object.UpdateUserSettingContent !== undefined && object.UpdateUserSettingContent !== null)
                ? data_1.LinkerUpdateUserSettingContent.fromPartial(object.UpdateUserSettingContent)
                : undefined;
        message.MicIdxUpdateContent = (object.MicIdxUpdateContent !== undefined && object.MicIdxUpdateContent !== null)
            ? data_1.LinkerMicIdxUpdateContent.fromPartial(object.MicIdxUpdateContent)
            : undefined;
        message.ListChangeContent = (object.ListChangeContent !== undefined && object.ListChangeContent !== null)
            ? data_1.LinkerListChangeContent.fromPartial(object.ListChangeContent)
            : undefined;
        message.CohostListChangeContent =
            (object.CohostListChangeContent !== undefined && object.CohostListChangeContent !== null)
                ? data_1.CohostListChangeContent.fromPartial(object.CohostListChangeContent)
                : undefined;
        message.MediaChangeContent = (object.MediaChangeContent !== undefined && object.MediaChangeContent !== null)
            ? data_1.LinkerMediaChangeContent.fromPartial(object.MediaChangeContent)
            : undefined;
        message.AcceptNoticeContent = (object.AcceptNoticeContent !== undefined && object.AcceptNoticeContent !== null)
            ? data_1.LinkerAcceptNoticeContent.fromPartial(object.AcceptNoticeContent)
            : undefined;
        message.SysKickOutContent = (object.SysKickOutContent !== undefined && object.SysKickOutContent !== null)
            ? data_1.LinkerSysKickOutContent.fromPartial(object.SysKickOutContent)
            : undefined;
        message.UserToastContent = (object.UserToastContent !== undefined && object.UserToastContent !== null)
            ? data_1.LinkmicUserToastContent.fromPartial(object.UserToastContent)
            : undefined;
        message.extra = object.extra ?? "";
        message.expireTimestamp = object.expireTimestamp ?? "0";
        message.transferExtra = object.transferExtra ?? "";
        return message;
    },
};
function createBaseWebcastLinkLayerMessage() {
    return {
        common: undefined,
        messageType: 0,
        channelId: "0",
        scene: 0,
        source: "",
        centerizedIdc: "",
        rtcRoomId: "0",
        createChannelContent: undefined,
        listChangeContent: undefined,
        inviteContent: undefined,
        applyContent: undefined,
        permitApplyContent: undefined,
        replyInviteContent: undefined,
        kickOutContent: undefined,
        cancelApplyContent: undefined,
        cancelInviteContent: undefined,
        leaveContent: undefined,
        finishContent: undefined,
        joinDirectContent: undefined,
        joinGroupContent: undefined,
        permitGroupContent: undefined,
        cancelGroupContent: undefined,
        leaveGroupContent: undefined,
        p2pGroupChangeContent: undefined,
        groupChangeContent: undefined,
        businessContent: undefined,
    };
}
exports.WebcastLinkLayerMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.messageType !== 0) {
            writer.uint32(16).int32(message.messageType);
        }
        if (message.channelId !== "0") {
            writer.uint32(24).int64(message.channelId);
        }
        if (message.scene !== 0) {
            writer.uint32(32).int32(message.scene);
        }
        if (message.source !== "") {
            writer.uint32(42).string(message.source);
        }
        if (message.centerizedIdc !== "") {
            writer.uint32(50).string(message.centerizedIdc);
        }
        if (message.rtcRoomId !== "0") {
            writer.uint32(56).int64(message.rtcRoomId);
        }
        if (message.createChannelContent !== undefined) {
            data_1.CreateChannelContent.encode(message.createChannelContent, writer.uint32(802).fork()).join();
        }
        if (message.listChangeContent !== undefined) {
            data_1.ListChangeContent.encode(message.listChangeContent, writer.uint32(818).fork()).join();
        }
        if (message.inviteContent !== undefined) {
            data_1.InviteContent.encode(message.inviteContent, writer.uint32(826).fork()).join();
        }
        if (message.applyContent !== undefined) {
            data_1.ApplyContent.encode(message.applyContent, writer.uint32(834).fork()).join();
        }
        if (message.permitApplyContent !== undefined) {
            data_1.PermitApplyContent.encode(message.permitApplyContent, writer.uint32(842).fork()).join();
        }
        if (message.replyInviteContent !== undefined) {
            data_1.ReplyInviteContent.encode(message.replyInviteContent, writer.uint32(850).fork()).join();
        }
        if (message.kickOutContent !== undefined) {
            data_1.KickOutContent.encode(message.kickOutContent, writer.uint32(858).fork()).join();
        }
        if (message.cancelApplyContent !== undefined) {
            data_1.CancelApplyContent.encode(message.cancelApplyContent, writer.uint32(866).fork()).join();
        }
        if (message.cancelInviteContent !== undefined) {
            data_1.CancelInviteContent.encode(message.cancelInviteContent, writer.uint32(874).fork()).join();
        }
        if (message.leaveContent !== undefined) {
            data_1.LeaveContent.encode(message.leaveContent, writer.uint32(882).fork()).join();
        }
        if (message.finishContent !== undefined) {
            data_1.FinishChannelContent.encode(message.finishContent, writer.uint32(890).fork()).join();
        }
        if (message.joinDirectContent !== undefined) {
            data_1.JoinDirectContent.encode(message.joinDirectContent, writer.uint32(898).fork()).join();
        }
        if (message.joinGroupContent !== undefined) {
            data_1.JoinGroupContent.encode(message.joinGroupContent, writer.uint32(906).fork()).join();
        }
        if (message.permitGroupContent !== undefined) {
            data_1.PermitJoinGroupContent.encode(message.permitGroupContent, writer.uint32(914).fork()).join();
        }
        if (message.cancelGroupContent !== undefined) {
            data_1.CancelJoinGroupContent.encode(message.cancelGroupContent, writer.uint32(922).fork()).join();
        }
        if (message.leaveGroupContent !== undefined) {
            data_1.LeaveJoinGroupContent.encode(message.leaveGroupContent, writer.uint32(930).fork()).join();
        }
        if (message.p2pGroupChangeContent !== undefined) {
            data_1.P2PGroupChangeContent.encode(message.p2pGroupChangeContent, writer.uint32(938).fork()).join();
        }
        if (message.groupChangeContent !== undefined) {
            data_1.GroupChangeContent.encode(message.groupChangeContent, writer.uint32(946).fork()).join();
        }
        if (message.businessContent !== undefined) {
            data_1.BusinessContent.encode(message.businessContent, 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 = createBaseWebcastLinkLayerMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.messageType = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.channelId = reader.int64().toString();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.scene = reader.int32();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.source = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.centerizedIdc = reader.string();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.rtcRoomId = reader.int64().toString();
                    continue;
                }
                case 100: {
                    if (tag !== 802) {
                        break;
                    }
                    message.createChannelContent = data_1.CreateChannelContent.decode(reader, reader.uint32());
                    continue;
                }
                case 102: {
                    if (tag !== 818) {
                        break;
                    }
                    message.listChangeContent = data_1.ListChangeContent.decode(reader, reader.uint32());
                    continue;
                }
                case 103: {
                    if (tag !== 826) {
                        break;
                    }
                    message.inviteContent = data_1.InviteContent.decode(reader, reader.uint32());
                    continue;
                }
                case 104: {
                    if (tag !== 834) {
                        break;
                    }
                    message.applyContent = data_1.ApplyContent.decode(reader, reader.uint32());
                    continue;
                }
                case 105: {
                    if (tag !== 842) {
                        break;
                    }
                    message.permitApplyContent = data_1.PermitApplyContent.decode(reader, reader.uint32());
                    continue;
                }
                case 106: {
                    if (tag !== 850) {
                        break;
                    }
                    message.replyInviteContent = data_1.ReplyInviteContent.decode(reader, reader.uint32());
                    continue;
                }
                case 107: {
                    if (tag !== 858) {
                        break;
                    }
                    message.kickOutContent = data_1.KickOutContent.decode(reader, reader.uint32());
                    continue;
                }
                case 108: {
                    if (tag !== 866) {
                        break;
                    }
                    message.cancelApplyContent = data_1.CancelApplyContent.decode(reader, reader.uint32());
                    continue;
                }
                case 109: {
                    if (tag !== 874) {
                        break;
                    }
                    message.cancelInviteContent = data_1.CancelInviteContent.decode(reader, reader.uint32());
                    continue;
                }
                case 110: {
                    if (tag !== 882) {
                        break;
                    }
                    message.leaveContent = data_1.LeaveContent.decode(reader, reader.uint32());
                    continue;
                }
                case 111: {
                    if (tag !== 890) {
                        break;
                    }
                    message.finishContent = data_1.FinishChannelContent.decode(reader, reader.uint32());
                    continue;
                }
                case 112: {
                    if (tag !== 898) {
                        break;
                    }
                    message.joinDirectContent = data_1.JoinDirectContent.decode(reader, reader.uint32());
                    continue;
                }
                case 113: {
                    if (tag !== 906) {
                        break;
                    }
                    message.joinGroupContent = data_1.JoinGroupContent.decode(reader, reader.uint32());
                    continue;
                }
                case 114: {
                    if (tag !== 914) {
                        break;
                    }
                    message.permitGroupContent = data_1.PermitJoinGroupContent.decode(reader, reader.uint32());
                    continue;
                }
                case 115: {
                    if (tag !== 922) {
                        break;
                    }
                    message.cancelGroupContent = data_1.CancelJoinGroupContent.decode(reader, reader.uint32());
                    continue;
                }
                case 116: {
                    if (tag !== 930) {
                        break;
                    }
                    message.leaveGroupContent = data_1.LeaveJoinGroupContent.decode(reader, reader.uint32());
                    continue;
                }
                case 117: {
                    if (tag !== 938) {
                        break;
                    }
                    message.p2pGroupChangeContent = data_1.P2PGroupChangeContent.decode(reader, reader.uint32());
                    continue;
                }
                case 118: {
                    if (tag !== 946) {
                        break;
                    }
                    message.groupChangeContent = data_1.GroupChangeContent.decode(reader, reader.uint32());
                    continue;
                }
                case 200: {
                    if (tag !== 1602) {
                        break;
                    }
                    message.businessContent = data_1.BusinessContent.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.WebcastLinkLayerMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWebcastLinkLayerMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.messageType = object.messageType ?? 0;
        message.channelId = object.channelId ?? "0";
        message.scene = object.scene ?? 0;
        message.source = object.source ?? "";
        message.centerizedIdc = object.centerizedIdc ?? "";
        message.rtcRoomId = object.rtcRoomId ?? "0";
        message.createChannelContent = (object.createChannelContent !== undefined && object.createChannelContent !== null)
            ? data_1.CreateChannelContent.fromPartial(object.createChannelContent)
            : undefined;
        message.listChangeContent = (object.listChangeContent !== undefined && object.listChangeContent !== null)
            ? data_1.ListChangeContent.fromPartial(object.listChangeContent)
            : undefined;
        message.inviteContent = (object.inviteContent !== undefined && object.inviteContent !== null)
            ? data_1.InviteContent.fromPartial(object.inviteContent)
            : undefined;
        message.applyContent = (object.applyContent !== undefined && object.applyContent !== null)
            ? data_1.ApplyContent.fromPartial(object.applyContent)
            : undefined;
        message.permitApplyContent = (object.permitApplyContent !== undefined && object.permitApplyContent !== null)
            ? data_1.PermitApplyContent.fromPartial(object.permitApplyContent)
            : undefined;
        message.replyInviteContent = (object.replyInviteContent !== undefined && object.replyInviteContent !== null)
            ? data_1.ReplyInviteContent.fromPartial(object.replyInviteContent)
            : undefined;
        message.kickOutContent = (object.kickOutContent !== undefined && object.kickOutContent !== null)
            ? data_1.KickOutContent.fromPartial(object.kickOutContent)
            : undefined;
        message.cancelApplyContent = (object.cancelApplyContent !== undefined && object.cancelApplyContent !== null)
            ? data_1.CancelApplyContent.fromPartial(object.cancelApplyContent)
            : undefined;
        message.cancelInviteContent = (object.cancelInviteContent !== undefined && object.cancelInviteContent !== null)
            ? data_1.CancelInviteContent.fromPartial(object.cancelInviteContent)
            : undefined;
        message.leaveContent = (object.leaveContent !== undefined && object.leaveContent !== null)
            ? data_1.LeaveContent.fromPartial(object.leaveContent)
            : undefined;
        message.finishContent = (object.finishContent !== undefined && object.finishContent !== null)
            ? data_1.FinishChannelContent.fromPartial(object.finishContent)
            : undefined;
        message.joinDirectContent = (object.joinDirectContent !== undefined && object.joinDirectContent !== null)
            ? data_1.JoinDirectContent.fromPartial(object.joinDirectContent)
            : undefined;
        message.joinGroupContent = (object.joinGroupContent !== undefined && object.joinGroupContent !== null)
            ? data_1.JoinGroupContent.fromPartial(object.joinGroupContent)
            : undefined;
        message.permitGroupContent = (object.permitGroupContent !== undefined && object.permitGroupContent !== null)
            ? data_1.PermitJoinGroupContent.fromPartial(object.permitGroupContent)
            : undefined;
        message.cancelGroupContent = (object.cancelGroupContent !== undefined && object.cancelGroupContent !== null)
            ? data_1.CancelJoinGroupContent.fromPartial(object.cancelGroupContent)
            : undefined;
        message.leaveGroupContent = (object.leaveGroupContent !== undefined && object.leaveGroupContent !== null)
            ? data_1.LeaveJoinGroupContent.fromPartial(object.leaveGroupContent)
            : undefined;
        message.p2pGroupChangeContent =
            (object.p2pGroupChangeContent !== undefined && object.p2pGroupChangeContent !== null)
                ? data_1.P2PGroupChangeContent.fromPartial(object.p2pGroupChangeContent)
                : undefined;
        message.groupChangeContent = (object.groupChangeContent !== undefined && object.groupChangeContent !== null)
            ? data_1.GroupChangeContent.fromPartial(object.groupChangeContent)
            : undefined;
        message.businessContent = (object.businessContent !== undefined && object.businessContent !== null)
            ? data_1.BusinessContent.fromPartial(object.businessContent)
            : undefined;
        return message;
    },
};
function createBaseRoomVerifyMessage() {
    return { common: undefined, action: 0, content: "", noticeType: "0", closeRoom: false };
}
exports.RoomVerifyMessage = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.common !== undefined) {
            data_1.CommonMessageData.encode(message.common, writer.uint32(10).fork()).join();
        }
        if (message.action !== 0) {
            writer.uint32(16).int32(message.action);
        }
        if (message.content !== "") {
            writer.uint32(26).string(message.content);
        }
        if (message.noticeType !== "0") {
            writer.uint32(32).int64(message.noticeType);
        }
        if (message.closeRoom !== false) {
            writer.uint32(40).bool(message.closeRoom);
        }
        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 = createBaseRoomVerifyMessage();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.common = data_1.CommonMessageData.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.action = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.content = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.noticeType = reader.int64().toString();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.closeRoom = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    create(base) {
        return exports.RoomVerifyMessage.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRoomVerifyMessage();
        message.common = (object.common !== undefined && object.common !== null)
            ? data_1.CommonMessageData.fromPartial(object.common)
            : undefined;
        message.action = object.action ?? 0;
        message.content = object.content ?? "";
        message.noticeType = object.noticeType ?? "0";
        message.closeRoom = object.closeRoom ?? false;
        return message;
    },
};
//# sourceMappingURL=webcast.js.map