@snap/camera-kit
Version:
Camera Kit Web
83 lines • 3.99 kB
JavaScript
import Long from "long";
import _m0 from "protobufjs/minimal";
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 = _m0.Writer.create()) {
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 _m0.Reader ? input : new _m0.Reader(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:
message.sessionId = reader.string();
break;
case 2:
message.locale = reader.string();
break;
case 3:
message.osType = reader.int32();
break;
case 4:
message.connectivityType = reader.int32();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
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;
},
};
if (_m0.util.Long !== Long) {
_m0.util.Long = Long;
_m0.configure();
}
//# sourceMappingURL=ranking.js.map