// 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/user_info.proto
/* eslint-disable */
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
export const protobufPackage = "youtube.api.pfiinnertube";
function createBaseUserInfo() {
    return {
        onBehalfOfUser: undefined,
        enableSafetyMode: undefined,
        credentialTransferTokens: [],
        delegatePurchases: undefined,
        kidsParent: undefined,
        isIncognito: undefined,
        lockedSafetyMode: undefined,
        delegationContext: undefined,
        serializedDelegationContext: undefined,
    };
}
export const UserInfo = {
    encode(message, writer = new BinaryWriter()) {
        if (message.onBehalfOfUser !== undefined) {
            writer.uint32(26).string(message.onBehalfOfUser);
        }
        if (message.enableSafetyMode !== undefined) {
            writer.uint32(56).bool(message.enableSafetyMode);
        }
        for (const v of message.credentialTransferTokens) {
            UserInfo_CredentialTransferToken.encode(v, writer.uint32(98).fork()).join();
        }
        if (message.delegatePurchases !== undefined) {
            UserInfo_DelegatePurchases.encode(message.delegatePurchases, writer.uint32(106).fork()).join();
        }
        if (message.kidsParent !== undefined) {
            UserInfo_KidsParent.encode(message.kidsParent, writer.uint32(114).fork()).join();
        }
        if (message.isIncognito !== undefined) {
            writer.uint32(120).bool(message.isIncognito);
        }
        if (message.lockedSafetyMode !== undefined) {
            writer.uint32(128).bool(message.lockedSafetyMode);
        }
        if (message.delegationContext !== undefined) {
            UserInfo_DelegationContext.encode(message.delegationContext, writer.uint32(138).fork()).join();
        }
        if (message.serializedDelegationContext !== undefined) {
            writer.uint32(146).string(message.serializedDelegationContext);
        }
        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 = createBaseUserInfo();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.onBehalfOfUser = reader.string();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.enableSafetyMode = reader.bool();
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    message.credentialTransferTokens.push(UserInfo_CredentialTransferToken.decode(reader, reader.uint32()));
                    continue;
                }
                case 13: {
                    if (tag !== 106) {
                        break;
                    }
                    message.delegatePurchases = UserInfo_DelegatePurchases.decode(reader, reader.uint32());
                    continue;
                }
                case 14: {
                    if (tag !== 114) {
                        break;
                    }
                    message.kidsParent = UserInfo_KidsParent.decode(reader, reader.uint32());
                    continue;
                }
                case 15: {
                    if (tag !== 120) {
                        break;
                    }
                    message.isIncognito = reader.bool();
                    continue;
                }
                case 16: {
                    if (tag !== 128) {
                        break;
                    }
                    message.lockedSafetyMode = reader.bool();
                    continue;
                }
                case 17: {
                    if (tag !== 138) {
                        break;
                    }
                    message.delegationContext = UserInfo_DelegationContext.decode(reader, reader.uint32());
                    continue;
                }
                case 18: {
                    if (tag !== 146) {
                        break;
                    }
                    message.serializedDelegationContext = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
};
function createBaseUserInfo_KidsParent() {
    return {};
}
export const UserInfo_KidsParent = {
    encode(_, writer = new BinaryWriter()) {
        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 = createBaseUserInfo_KidsParent();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
};
function createBaseUserInfo_DelegatePurchases() {
    return {};
}
export const UserInfo_DelegatePurchases = {
    encode(_, writer = new BinaryWriter()) {
        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 = createBaseUserInfo_DelegatePurchases();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
};
function createBaseUserInfo_DelegationContext() {
    return {};
}
export const UserInfo_DelegationContext = {
    encode(_, writer = new BinaryWriter()) {
        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 = createBaseUserInfo_DelegationContext();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
};
function createBaseUserInfo_CredentialTransferToken() {
    return {};
}
export const UserInfo_CredentialTransferToken = {
    encode(_, writer = new BinaryWriter()) {
        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 = createBaseUserInfo_CredentialTransferToken();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
};
//# sourceMappingURL=user_info.js.map