// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
//   protoc-gen-ts_proto  v2.7.7
//   protoc               v6.33.5
// source: youtube/api/pfiinnertube/watch_next_request.proto
/* eslint-disable */
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import { InnerTubeContext } from "./innertube_context.js";
export const protobufPackage = "youtube.api.pfiinnertube";
function createBaseWatchNextRequest() {
    return {
        context: undefined,
        videoId: undefined,
        playlistId: undefined,
        params: undefined,
        continuation: undefined,
        isAdPlayback: undefined,
        mdxUseDevServer: undefined,
        referrer: undefined,
        referringApp: undefined,
        adParams: undefined,
        requestMusicSequence: undefined,
        enableMdxAutoplay: undefined,
        isMdxPlayback: undefined,
        racyCheckOk: undefined,
        contentCheckOk: undefined,
        isAudioOnly: undefined,
        autonavEnabled: undefined,
        enablePersistentPlaylistPanel: undefined,
        playlistSetVideoId: undefined,
        showRuInvalidTokenMessage: undefined,
        serializedThirdPartyEmbedConfig: undefined,
        showContentOwnerOnly: undefined,
        isEmbedPreview: undefined,
        lastScrubbedInlinePlaybackVideoId: undefined,
        lastAudioTurnedOnInlinePlaybackVideoId: undefined,
        lastAudioTurnedOffInlinePlaybackVideoId: undefined,
        captionsRequested: undefined,
        queueContextParams: undefined,
        showShortsOnly: undefined,
    };
}
export const WatchNextRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.context !== undefined) {
            InnerTubeContext.encode(message.context, writer.uint32(10).fork()).join();
        }
        if (message.videoId !== undefined) {
            writer.uint32(18).string(message.videoId);
        }
        if (message.playlistId !== undefined) {
            writer.uint32(34).string(message.playlistId);
        }
        if (message.params !== undefined) {
            writer.uint32(50).string(message.params);
        }
        if (message.continuation !== undefined) {
            writer.uint32(66).string(message.continuation);
        }
        if (message.isAdPlayback !== undefined) {
            writer.uint32(72).bool(message.isAdPlayback);
        }
        if (message.mdxUseDevServer !== undefined) {
            writer.uint32(80).bool(message.mdxUseDevServer);
        }
        if (message.referrer !== undefined) {
            writer.uint32(98).string(message.referrer);
        }
        if (message.referringApp !== undefined) {
            writer.uint32(106).string(message.referringApp);
        }
        if (message.adParams !== undefined) {
            writer.uint32(130).string(message.adParams);
        }
        if (message.requestMusicSequence !== undefined) {
            writer.uint32(144).bool(message.requestMusicSequence);
        }
        if (message.enableMdxAutoplay !== undefined) {
            writer.uint32(168).bool(message.enableMdxAutoplay);
        }
        if (message.isMdxPlayback !== undefined) {
            writer.uint32(176).bool(message.isMdxPlayback);
        }
        if (message.racyCheckOk !== undefined) {
            writer.uint32(192).bool(message.racyCheckOk);
        }
        if (message.contentCheckOk !== undefined) {
            writer.uint32(200).bool(message.contentCheckOk);
        }
        if (message.isAudioOnly !== undefined) {
            writer.uint32(208).bool(message.isAudioOnly);
        }
        if (message.autonavEnabled !== undefined) {
            writer.uint32(216).bool(message.autonavEnabled);
        }
        if (message.enablePersistentPlaylistPanel !== undefined) {
            writer.uint32(240).bool(message.enablePersistentPlaylistPanel);
        }
        if (message.playlistSetVideoId !== undefined) {
            writer.uint32(250).string(message.playlistSetVideoId);
        }
        if (message.showRuInvalidTokenMessage !== undefined) {
            writer.uint32(280).bool(message.showRuInvalidTokenMessage);
        }
        if (message.serializedThirdPartyEmbedConfig !== undefined) {
            writer.uint32(298).string(message.serializedThirdPartyEmbedConfig);
        }
        if (message.showContentOwnerOnly !== undefined) {
            writer.uint32(304).bool(message.showContentOwnerOnly);
        }
        if (message.isEmbedPreview !== undefined) {
            writer.uint32(336).bool(message.isEmbedPreview);
        }
        if (message.lastScrubbedInlinePlaybackVideoId !== undefined) {
            writer.uint32(346).string(message.lastScrubbedInlinePlaybackVideoId);
        }
        if (message.lastAudioTurnedOnInlinePlaybackVideoId !== undefined) {
            writer.uint32(354).string(message.lastAudioTurnedOnInlinePlaybackVideoId);
        }
        if (message.lastAudioTurnedOffInlinePlaybackVideoId !== undefined) {
            writer.uint32(362).string(message.lastAudioTurnedOffInlinePlaybackVideoId);
        }
        if (message.captionsRequested !== undefined) {
            writer.uint32(376).bool(message.captionsRequested);
        }
        if (message.queueContextParams !== undefined) {
            writer.uint32(402).bytes(message.queueContextParams);
        }
        if (message.showShortsOnly !== undefined) {
            writer.uint32(440).bool(message.showShortsOnly);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseWatchNextRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.context = InnerTubeContext.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.videoId = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.playlistId = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.params = reader.string();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.continuation = reader.string();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.isAdPlayback = reader.bool();
                    continue;
                }
                case 10: {
                    if (tag !== 80) {
                        break;
                    }
                    message.mdxUseDevServer = reader.bool();
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.referrer = reader.string();
                    continue;
                }
                case 13: {
                    if (tag !== 106) {
                        break;
                    }
                    message.referringApp = reader.string();
                    continue;
                }
                case 16: {
                    if (tag !== 130) {
                        break;
                    }
                    message.adParams = reader.string();
                    continue;
                }
                case 18: {
                    if (tag !== 144) {
                        break;
                    }
                    message.requestMusicSequence = reader.bool();
                    continue;
                }
                case 21: {
                    if (tag !== 168) {
                        break;
                    }
                    message.enableMdxAutoplay = reader.bool();
                    continue;
                }
                case 22: {
                    if (tag !== 176) {
                        break;
                    }
                    message.isMdxPlayback = reader.bool();
                    continue;
                }
                case 24: {
                    if (tag !== 192) {
                        break;
                    }
                    message.racyCheckOk = reader.bool();
                    continue;
                }
                case 25: {
                    if (tag !== 200) {
                        break;
                    }
                    message.contentCheckOk = reader.bool();
                    continue;
                }
                case 26: {
                    if (tag !== 208) {
                        break;
                    }
                    message.isAudioOnly = reader.bool();
                    continue;
                }
                case 27: {
                    if (tag !== 216) {
                        break;
                    }
                    message.autonavEnabled = reader.bool();
                    continue;
                }
                case 30: {
                    if (tag !== 240) {
                        break;
                    }
                    message.enablePersistentPlaylistPanel = reader.bool();
                    continue;
                }
                case 31: {
                    if (tag !== 250) {
                        break;
                    }
                    message.playlistSetVideoId = reader.string();
                    continue;
                }
                case 35: {
                    if (tag !== 280) {
                        break;
                    }
                    message.showRuInvalidTokenMessage = reader.bool();
                    continue;
                }
                case 37: {
                    if (tag !== 298) {
                        break;
                    }
                    message.serializedThirdPartyEmbedConfig = reader.string();
                    continue;
                }
                case 38: {
                    if (tag !== 304) {
                        break;
                    }
                    message.showContentOwnerOnly = reader.bool();
                    continue;
                }
                case 42: {
                    if (tag !== 336) {
                        break;
                    }
                    message.isEmbedPreview = reader.bool();
                    continue;
                }
                case 43: {
                    if (tag !== 346) {
                        break;
                    }
                    message.lastScrubbedInlinePlaybackVideoId = reader.string();
                    continue;
                }
                case 44: {
                    if (tag !== 354) {
                        break;
                    }
                    message.lastAudioTurnedOnInlinePlaybackVideoId = reader.string();
                    continue;
                }
                case 45: {
                    if (tag !== 362) {
                        break;
                    }
                    message.lastAudioTurnedOffInlinePlaybackVideoId = reader.string();
                    continue;
                }
                case 47: {
                    if (tag !== 376) {
                        break;
                    }
                    message.captionsRequested = reader.bool();
                    continue;
                }
                case 50: {
                    if (tag !== 402) {
                        break;
                    }
                    message.queueContextParams = reader.bytes();
                    continue;
                }
                case 55: {
                    if (tag !== 440) {
                        break;
                    }
                    message.showShortsOnly = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
};
//# sourceMappingURL=watch_next_request.js.map