// 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/player_request_caption_params.proto
/* eslint-disable */
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
export const protobufPackage = "youtube.api.pfiinnertube";
function createBasePlayerRequestCaptionParams() {
    return {
        deviceCaptionsOn: undefined,
        deviceCaptionsLangPref: undefined,
        viewerSelectedCaptionLangs: undefined,
        ccLangPref: undefined,
        ccLoadPolicyOn: undefined,
    };
}
export const PlayerRequestCaptionParams = {
    encode(message, writer = new BinaryWriter()) {
        if (message.deviceCaptionsOn !== undefined) {
            writer.uint32(8).bool(message.deviceCaptionsOn);
        }
        if (message.deviceCaptionsLangPref !== undefined) {
            writer.uint32(18).string(message.deviceCaptionsLangPref);
        }
        if (message.viewerSelectedCaptionLangs !== undefined) {
            writer.uint32(26).string(message.viewerSelectedCaptionLangs);
        }
        if (message.ccLangPref !== undefined) {
            writer.uint32(34).string(message.ccLangPref);
        }
        if (message.ccLoadPolicyOn !== undefined) {
            writer.uint32(40).bool(message.ccLoadPolicyOn);
        }
        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 = createBasePlayerRequestCaptionParams();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.deviceCaptionsOn = reader.bool();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.deviceCaptionsLangPref = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.viewerSelectedCaptionLangs = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.ccLangPref = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.ccLoadPolicyOn = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
};
//# sourceMappingURL=player_request_caption_params.js.map