// 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/capability_info.proto
/* eslint-disable */
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
export const protobufPackage = "youtube.api.pfiinnertube";
function createBaseCapabilityInfo() {
    return { profile: undefined, supportedCapabilities: [], disabledCapabilities: [], snapshot: undefined };
}
export const CapabilityInfo = {
    encode(message, writer = new BinaryWriter()) {
        if (message.profile !== undefined) {
            writer.uint32(10).string(message.profile);
        }
        for (const v of message.supportedCapabilities) {
            InnerTubeCapability.encode(v, writer.uint32(18).fork()).join();
        }
        for (const v of message.disabledCapabilities) {
            InnerTubeCapability.encode(v, writer.uint32(26).fork()).join();
        }
        if (message.snapshot !== undefined) {
            writer.uint32(42).string(message.snapshot);
        }
        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 = createBaseCapabilityInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.profile = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.supportedCapabilities.push(InnerTubeCapability.decode(reader, reader.uint32()));
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.disabledCapabilities.push(InnerTubeCapability.decode(reader, reader.uint32()));
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.snapshot = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
};
function createBaseInnerTubeCapability() {
    return { capability: undefined, features: undefined, experimentFlags: undefined };
}
export const InnerTubeCapability = {
    encode(message, writer = new BinaryWriter()) {
        if (message.capability !== undefined) {
            writer.uint32(8).uint32(message.capability);
        }
        if (message.features !== undefined) {
            writer.uint32(16).uint32(message.features);
        }
        if (message.experimentFlags !== undefined) {
            writer.uint32(50).string(message.experimentFlags);
        }
        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 = createBaseInnerTubeCapability();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.capability = reader.uint32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.features = reader.uint32();
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.experimentFlags = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
};
//# sourceMappingURL=capability_info.js.map