UNPKG

@snap/camera-kit

Version:
98 lines 4.51 kB
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; export const protobufPackage = "com.snap.camerakit.v3"; export var RankingData_OSType; (function (RankingData_OSType) { RankingData_OSType[RankingData_OSType["OS_TYPE_UNSET"] = 0] = "OS_TYPE_UNSET"; RankingData_OSType[RankingData_OSType["OS_TYPE_ANDROID"] = 1] = "OS_TYPE_ANDROID"; RankingData_OSType[RankingData_OSType["OS_TYPE_IOS"] = 2] = "OS_TYPE_IOS"; RankingData_OSType[RankingData_OSType["OS_TYPE_IPAD_OS"] = 3] = "OS_TYPE_IPAD_OS"; RankingData_OSType[RankingData_OSType["OS_TYPE_MAC_OS"] = 4] = "OS_TYPE_MAC_OS"; RankingData_OSType[RankingData_OSType["OS_TYPE_WINDOWS"] = 5] = "OS_TYPE_WINDOWS"; RankingData_OSType[RankingData_OSType["OS_TYPE_LINUX"] = 6] = "OS_TYPE_LINUX"; RankingData_OSType[RankingData_OSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; })(RankingData_OSType || (RankingData_OSType = {})); export var RankingData_ConnectivityType; (function (RankingData_ConnectivityType) { RankingData_ConnectivityType[RankingData_ConnectivityType["CONNECTIVITY_TYPE_UNSET"] = 0] = "CONNECTIVITY_TYPE_UNSET"; RankingData_ConnectivityType[RankingData_ConnectivityType["CONNECTIVITY_TYPE_WIFI"] = 1] = "CONNECTIVITY_TYPE_WIFI"; RankingData_ConnectivityType[RankingData_ConnectivityType["CONNECTIVITY_TYPE_MOBILE"] = 2] = "CONNECTIVITY_TYPE_MOBILE"; RankingData_ConnectivityType[RankingData_ConnectivityType["CONNECTIVITY_TYPE_UNREACHABLE"] = 3] = "CONNECTIVITY_TYPE_UNREACHABLE"; RankingData_ConnectivityType[RankingData_ConnectivityType["CONNECTIVITY_TYPE_BLUETOOTH"] = 4] = "CONNECTIVITY_TYPE_BLUETOOTH"; RankingData_ConnectivityType[RankingData_ConnectivityType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; })(RankingData_ConnectivityType || (RankingData_ConnectivityType = {})); function createBaseRankingData() { return { sessionId: "", locale: "", osType: 0, connectivityType: 0 }; } export const RankingData = { encode(message, writer = new BinaryWriter()) { if (message.sessionId !== "") { writer.uint32(10).string(message.sessionId); } if (message.locale !== "") { writer.uint32(18).string(message.locale); } if (message.osType !== 0) { writer.uint32(24).int32(message.osType); } if (message.connectivityType !== 0) { writer.uint32(32).int32(message.connectivityType); } 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 = createBaseRankingData(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.sessionId = reader.string(); continue; } case 2: { if (tag !== 18) { break; } message.locale = reader.string(); continue; } case 3: { if (tag !== 24) { break; } message.osType = reader.int32(); continue; } case 4: { if (tag !== 32) { break; } message.connectivityType = reader.int32(); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, create(base) { return RankingData.fromPartial(base !== null && base !== void 0 ? base : {}); }, fromPartial(object) { var _a, _b, _c, _d; const message = createBaseRankingData(); message.sessionId = (_a = object.sessionId) !== null && _a !== void 0 ? _a : ""; message.locale = (_b = object.locale) !== null && _b !== void 0 ? _b : ""; message.osType = (_c = object.osType) !== null && _c !== void 0 ? _c : 0; message.connectivityType = (_d = object.connectivityType) !== null && _d !== void 0 ? _d : 0; return message; }, }; //# sourceMappingURL=ranking.js.map