UNPKG

@snap/camera-kit

Version:
90 lines 3.65 kB
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; export const protobufPackage = "snapchat.common"; export var Ruid_Type; (function (Ruid_Type) { Ruid_Type[Ruid_Type["UNSET"] = 0] = "UNSET"; Ruid_Type[Ruid_Type["USER"] = 1] = "USER"; Ruid_Type[Ruid_Type["DEVICE"] = 2] = "DEVICE"; Ruid_Type[Ruid_Type["WEB_CLIENT"] = 3] = "WEB_CLIENT"; Ruid_Type[Ruid_Type["AD_ACCOUNT"] = 4] = "AD_ACCOUNT"; Ruid_Type[Ruid_Type["USERNAME"] = 5] = "USERNAME"; Ruid_Type[Ruid_Type["AD_MODERATION_AD"] = 6] = "AD_MODERATION_AD"; Ruid_Type[Ruid_Type["WEB_SNAPCHAT_USER"] = 7] = "WEB_SNAPCHAT_USER"; Ruid_Type[Ruid_Type["INTERNAL"] = 8] = "INTERNAL"; Ruid_Type[Ruid_Type["AM_ORGANIZATION"] = 9] = "AM_ORGANIZATION"; Ruid_Type[Ruid_Type["AM_MEMBER"] = 10] = "AM_MEMBER"; Ruid_Type[Ruid_Type["AM_SESSION"] = 11] = "AM_SESSION"; Ruid_Type[Ruid_Type["AM_PROFILE"] = 12] = "AM_PROFILE"; Ruid_Type[Ruid_Type["AM_SNAPCHAT_USER"] = 13] = "AM_SNAPCHAT_USER"; Ruid_Type[Ruid_Type["SNAPCHAT_ADVERTISING"] = 14] = "SNAPCHAT_ADVERTISING"; Ruid_Type[Ruid_Type["AM_CLIENT"] = 15] = "AM_CLIENT"; Ruid_Type[Ruid_Type["MISCHIEF"] = 16] = "MISCHIEF"; Ruid_Type[Ruid_Type["ARES_VISITOR"] = 17] = "ARES_VISITOR"; Ruid_Type[Ruid_Type["POD_NAME"] = 18] = "POD_NAME"; Ruid_Type[Ruid_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; })(Ruid_Type || (Ruid_Type = {})); function createBaseRuid() { return { type: 0, stringValue: "", loggingIdValue: "" }; } export const Ruid = { encode(message, writer = new BinaryWriter()) { if (message.type !== 0) { writer.uint32(8).int32(message.type); } if (message.stringValue !== "") { writer.uint32(18).string(message.stringValue); } if (message.loggingIdValue !== "") { writer.uint32(26).string(message.loggingIdValue); } return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRuid(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 8) { break; } message.type = reader.int32(); continue; } case 2: { if (tag !== 18) { break; } message.stringValue = reader.string(); continue; } case 3: { if (tag !== 26) { break; } message.loggingIdValue = reader.string(); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, create(base) { return Ruid.fromPartial(base !== null && base !== void 0 ? base : {}); }, fromPartial(object) { var _a, _b, _c; const message = createBaseRuid(); message.type = (_a = object.type) !== null && _a !== void 0 ? _a : 0; message.stringValue = (_b = object.stringValue) !== null && _b !== void 0 ? _b : ""; message.loggingIdValue = (_c = object.loggingIdValue) !== null && _c !== void 0 ? _c : ""; return message; }, }; //# sourceMappingURL=ruid.js.map