// 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/innertube_context.proto
/* eslint-disable */
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import { KeyValuePair } from "../../../misc/common.js";
import { CapabilityInfo } from "./capability_info.js";
import { ClientInfo } from "./client_info.js";
import { RequestInfo } from "./request_info.js";
import { ThirdPartyInfo } from "./third_party_info.js";
import { UserInfo } from "./user_info.js";
export const protobufPackage = "youtube.api.pfiinnertube";
function createBaseInnerTubeContext() {
    return {
        client: undefined,
        user: undefined,
        capabilities: undefined,
        request: undefined,
        clickTracking: undefined,
        thirdParty: undefined,
        remoteClient: undefined,
        adSignalsInfo: undefined,
        experimentalData: undefined,
        clientScreenNonce: undefined,
        activePlayers: [],
    };
}
export const InnerTubeContext = {
    encode(message, writer = new BinaryWriter()) {
        if (message.client !== undefined) {
            ClientInfo.encode(message.client, writer.uint32(10).fork()).join();
        }
        if (message.user !== undefined) {
            UserInfo.encode(message.user, writer.uint32(26).fork()).join();
        }
        if (message.capabilities !== undefined) {
            CapabilityInfo.encode(message.capabilities, writer.uint32(34).fork()).join();
        }
        if (message.request !== undefined) {
            RequestInfo.encode(message.request, writer.uint32(42).fork()).join();
        }
        if (message.clickTracking !== undefined) {
            InnerTubeContext_ClickTrackingInfo.encode(message.clickTracking, writer.uint32(50).fork()).join();
        }
        if (message.thirdParty !== undefined) {
            ThirdPartyInfo.encode(message.thirdParty, writer.uint32(58).fork()).join();
        }
        if (message.remoteClient !== undefined) {
            ClientInfo.encode(message.remoteClient, writer.uint32(66).fork()).join();
        }
        if (message.adSignalsInfo !== undefined) {
            InnerTubeContext_AdSignalsInfo.encode(message.adSignalsInfo, writer.uint32(74).fork()).join();
        }
        if (message.experimentalData !== undefined) {
            InnerTubeContext_ExperimentalData.encode(message.experimentalData, writer.uint32(82).fork()).join();
        }
        if (message.clientScreenNonce !== undefined) {
            writer.uint32(90).string(message.clientScreenNonce);
        }
        for (const v of message.activePlayers) {
            InnerTubeContext_ActivePlayerInfo.encode(v, writer.uint32(98).fork()).join();
        }
        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 = createBaseInnerTubeContext();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.client = ClientInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.user = UserInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.capabilities = CapabilityInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.request = RequestInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.clickTracking = InnerTubeContext_ClickTrackingInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.thirdParty = ThirdPartyInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.remoteClient = ClientInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.adSignalsInfo = InnerTubeContext_AdSignalsInfo.decode(reader, reader.uint32());
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.experimentalData = InnerTubeContext_ExperimentalData.decode(reader, reader.uint32());
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.clientScreenNonce = reader.string();
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.activePlayers.push(InnerTubeContext_ActivePlayerInfo.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
};
function createBaseInnerTubeContext_ExperimentalData() {
    return { params: [] };
}
export const InnerTubeContext_ExperimentalData = {
    encode(message, writer = new BinaryWriter()) {
        for (const v of message.params) {
            KeyValuePair.encode(v, writer.uint32(10).fork()).join();
        }
        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 = createBaseInnerTubeContext_ExperimentalData();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.params.push(KeyValuePair.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
};
function createBaseInnerTubeContext_ActivePlayerInfo() {
    return { playerContextParams: undefined };
}
export const InnerTubeContext_ActivePlayerInfo = {
    encode(message, writer = new BinaryWriter()) {
        if (message.playerContextParams !== undefined) {
            writer.uint32(10).bytes(message.playerContextParams);
        }
        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 = createBaseInnerTubeContext_ActivePlayerInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.playerContextParams = reader.bytes();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
};
function createBaseInnerTubeContext_ClickTrackingInfo() {
    return { clickTrackingParams: undefined };
}
export const InnerTubeContext_ClickTrackingInfo = {
    encode(message, writer = new BinaryWriter()) {
        if (message.clickTrackingParams !== undefined) {
            writer.uint32(18).bytes(message.clickTrackingParams);
        }
        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 = createBaseInnerTubeContext_ClickTrackingInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.clickTrackingParams = reader.bytes();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
};
function createBaseInnerTubeContext_AdSignalsInfo() {
    return {
        params: [],
        bid: undefined,
        mutsuId: undefined,
        consentBumpState: undefined,
        advertisingId: undefined,
        limitAdTracking: undefined,
        attributionOsSupportedVersion: undefined,
    };
}
export const InnerTubeContext_AdSignalsInfo = {
    encode(message, writer = new BinaryWriter()) {
        for (const v of message.params) {
            KeyValuePair.encode(v, writer.uint32(10).fork()).join();
        }
        if (message.bid !== undefined) {
            writer.uint32(18).string(message.bid);
        }
        if (message.mutsuId !== undefined) {
            writer.uint32(26).string(message.mutsuId);
        }
        if (message.consentBumpState !== undefined) {
            writer.uint32(34).string(message.consentBumpState);
        }
        if (message.advertisingId !== undefined) {
            writer.uint32(58).string(message.advertisingId);
        }
        if (message.limitAdTracking !== undefined) {
            writer.uint32(72).bool(message.limitAdTracking);
        }
        if (message.attributionOsSupportedVersion !== undefined) {
            writer.uint32(82).string(message.attributionOsSupportedVersion);
        }
        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 = createBaseInnerTubeContext_AdSignalsInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.params.push(KeyValuePair.decode(reader, reader.uint32()));
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.bid = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.mutsuId = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.consentBumpState = reader.string();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.advertisingId = reader.string();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.limitAdTracking = reader.bool();
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.attributionOsSupportedVersion = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
};
//# sourceMappingURL=innertube_context.js.map