protobuf-platform 1.0.30 → 1.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/game/game.proto CHANGED
@@ -26,16 +26,23 @@ message CategoryItem {
26
26
  }
27
27
  //Category CRUD | Requests
28
28
  message CategoryRequest {
29
+ //oneof request {
30
+ // string title = 1;
31
+ // MetaDataFile metadata = 2;
32
+ // string slug = 3;
33
+ // int32 category_id = 4;
34
+ //}
35
+ //int32 id = 5;
36
+ //optional string description = 6;
37
+ //optional int32 is_active = 7;
38
+ //optional File file = 8;
29
39
  oneof request {
30
- string title = 1;
31
- MetaDataFile metadata = 2;
32
- string slug = 3;
33
- int32 category_id = 4;
40
+ string one = 1;
41
+ string two = 2;
42
+
43
+ string four = 4;
44
+ string three = 3;
34
45
  }
35
- int32 id = 5;
36
- optional string description = 6;
37
- optional int32 is_active = 7;
38
- optional File file = 8;
39
46
  }
40
47
  message GetCategoryRequest {
41
48
  int32 id = 1;
package/game/game_pb.js CHANGED
@@ -921,17 +921,17 @@ proto.game.CategoryItem.prototype.hasImagePath = function() {
921
921
  * @private {!Array<!Array<number>>}
922
922
  * @const
923
923
  */
924
- proto.game.CategoryRequest.oneofGroups_ = [[1,2,3,4]];
924
+ proto.game.CategoryRequest.oneofGroups_ = [[1,2,4,3]];
925
925
 
926
926
  /**
927
927
  * @enum {number}
928
928
  */
929
929
  proto.game.CategoryRequest.RequestCase = {
930
930
  REQUEST_NOT_SET: 0,
931
- TITLE: 1,
932
- METADATA: 2,
933
- SLUG: 3,
934
- CATEGORY_ID: 4
931
+ ONE: 1,
932
+ TWO: 2,
933
+ FOUR: 4,
934
+ THREE: 3
935
935
  };
936
936
 
937
937
  /**
@@ -972,14 +972,10 @@ proto.game.CategoryRequest.prototype.toObject = function(opt_includeInstance) {
972
972
  */
973
973
  proto.game.CategoryRequest.toObject = function(includeInstance, msg) {
974
974
  var f, obj = {
975
- title: jspb.Message.getFieldWithDefault(msg, 1, ""),
976
- metadata: (f = msg.getMetadata()) && proto.game.MetaDataFile.toObject(includeInstance, f),
977
- slug: jspb.Message.getFieldWithDefault(msg, 3, ""),
978
- categoryId: jspb.Message.getFieldWithDefault(msg, 4, 0),
979
- id: jspb.Message.getFieldWithDefault(msg, 5, 0),
980
- description: jspb.Message.getFieldWithDefault(msg, 6, ""),
981
- isActive: jspb.Message.getFieldWithDefault(msg, 7, 0),
982
- file: (f = msg.getFile()) && proto.game.File.toObject(includeInstance, f)
975
+ one: jspb.Message.getFieldWithDefault(msg, 1, ""),
976
+ two: jspb.Message.getFieldWithDefault(msg, 2, ""),
977
+ four: jspb.Message.getFieldWithDefault(msg, 4, ""),
978
+ three: jspb.Message.getFieldWithDefault(msg, 3, "")
983
979
  };
984
980
 
985
981
  if (includeInstance) {
@@ -1018,37 +1014,19 @@ proto.game.CategoryRequest.deserializeBinaryFromReader = function(msg, reader) {
1018
1014
  switch (field) {
1019
1015
  case 1:
1020
1016
  var value = /** @type {string} */ (reader.readString());
1021
- msg.setTitle(value);
1017
+ msg.setOne(value);
1022
1018
  break;
1023
1019
  case 2:
1024
- var value = new proto.game.MetaDataFile;
1025
- reader.readMessage(value,proto.game.MetaDataFile.deserializeBinaryFromReader);
1026
- msg.setMetadata(value);
1027
- break;
1028
- case 3:
1029
1020
  var value = /** @type {string} */ (reader.readString());
1030
- msg.setSlug(value);
1021
+ msg.setTwo(value);
1031
1022
  break;
1032
1023
  case 4:
1033
- var value = /** @type {number} */ (reader.readInt32());
1034
- msg.setCategoryId(value);
1035
- break;
1036
- case 5:
1037
- var value = /** @type {number} */ (reader.readInt32());
1038
- msg.setId(value);
1039
- break;
1040
- case 6:
1041
1024
  var value = /** @type {string} */ (reader.readString());
1042
- msg.setDescription(value);
1043
- break;
1044
- case 7:
1045
- var value = /** @type {number} */ (reader.readInt32());
1046
- msg.setIsActive(value);
1025
+ msg.setFour(value);
1047
1026
  break;
1048
- case 8:
1049
- var value = new proto.game.File;
1050
- reader.readMessage(value,proto.game.File.deserializeBinaryFromReader);
1051
- msg.setFile(value);
1027
+ case 3:
1028
+ var value = /** @type {string} */ (reader.readString());
1029
+ msg.setThree(value);
1052
1030
  break;
1053
1031
  default:
1054
1032
  reader.skipField();
@@ -1086,65 +1064,35 @@ proto.game.CategoryRequest.serializeBinaryToWriter = function(message, writer) {
1086
1064
  f
1087
1065
  );
1088
1066
  }
1089
- f = message.getMetadata();
1090
- if (f != null) {
1091
- writer.writeMessage(
1092
- 2,
1093
- f,
1094
- proto.game.MetaDataFile.serializeBinaryToWriter
1095
- );
1096
- }
1097
- f = /** @type {string} */ (jspb.Message.getField(message, 3));
1067
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
1098
1068
  if (f != null) {
1099
1069
  writer.writeString(
1100
- 3,
1070
+ 2,
1101
1071
  f
1102
1072
  );
1103
1073
  }
1104
- f = /** @type {number} */ (jspb.Message.getField(message, 4));
1074
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
1105
1075
  if (f != null) {
1106
- writer.writeInt32(
1076
+ writer.writeString(
1107
1077
  4,
1108
1078
  f
1109
1079
  );
1110
1080
  }
1111
- f = message.getId();
1112
- if (f !== 0) {
1113
- writer.writeInt32(
1114
- 5,
1115
- f
1116
- );
1117
- }
1118
- f = /** @type {string} */ (jspb.Message.getField(message, 6));
1081
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
1119
1082
  if (f != null) {
1120
1083
  writer.writeString(
1121
- 6,
1122
- f
1123
- );
1124
- }
1125
- f = /** @type {number} */ (jspb.Message.getField(message, 7));
1126
- if (f != null) {
1127
- writer.writeInt32(
1128
- 7,
1084
+ 3,
1129
1085
  f
1130
1086
  );
1131
1087
  }
1132
- f = message.getFile();
1133
- if (f != null) {
1134
- writer.writeMessage(
1135
- 8,
1136
- f,
1137
- proto.game.File.serializeBinaryToWriter
1138
- );
1139
- }
1140
1088
  };
1141
1089
 
1142
1090
 
1143
1091
  /**
1144
- * optional string title = 1;
1092
+ * optional string one = 1;
1145
1093
  * @return {string}
1146
1094
  */
1147
- proto.game.CategoryRequest.prototype.getTitle = function() {
1095
+ proto.game.CategoryRequest.prototype.getOne = function() {
1148
1096
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1149
1097
  };
1150
1098
 
@@ -1153,7 +1101,7 @@ proto.game.CategoryRequest.prototype.getTitle = function() {
1153
1101
  * @param {string} value
1154
1102
  * @return {!proto.game.CategoryRequest} returns this
1155
1103
  */
1156
- proto.game.CategoryRequest.prototype.setTitle = function(value) {
1104
+ proto.game.CategoryRequest.prototype.setOne = function(value) {
1157
1105
  return jspb.Message.setOneofField(this, 1, proto.game.CategoryRequest.oneofGroups_[0], value);
1158
1106
  };
1159
1107
 
@@ -1162,7 +1110,7 @@ proto.game.CategoryRequest.prototype.setTitle = function(value) {
1162
1110
  * Clears the field making it undefined.
1163
1111
  * @return {!proto.game.CategoryRequest} returns this
1164
1112
  */
1165
- proto.game.CategoryRequest.prototype.clearTitle = function() {
1113
+ proto.game.CategoryRequest.prototype.clearOne = function() {
1166
1114
  return jspb.Message.setOneofField(this, 1, proto.game.CategoryRequest.oneofGroups_[0], undefined);
1167
1115
  };
1168
1116
 
@@ -1171,54 +1119,17 @@ proto.game.CategoryRequest.prototype.clearTitle = function() {
1171
1119
  * Returns whether this field is set.
1172
1120
  * @return {boolean}
1173
1121
  */
1174
- proto.game.CategoryRequest.prototype.hasTitle = function() {
1122
+ proto.game.CategoryRequest.prototype.hasOne = function() {
1175
1123
  return jspb.Message.getField(this, 1) != null;
1176
1124
  };
1177
1125
 
1178
1126
 
1179
1127
  /**
1180
- * optional MetaDataFile metadata = 2;
1181
- * @return {?proto.game.MetaDataFile}
1182
- */
1183
- proto.game.CategoryRequest.prototype.getMetadata = function() {
1184
- return /** @type{?proto.game.MetaDataFile} */ (
1185
- jspb.Message.getWrapperField(this, proto.game.MetaDataFile, 2));
1186
- };
1187
-
1188
-
1189
- /**
1190
- * @param {?proto.game.MetaDataFile|undefined} value
1191
- * @return {!proto.game.CategoryRequest} returns this
1192
- */
1193
- proto.game.CategoryRequest.prototype.setMetadata = function(value) {
1194
- return jspb.Message.setOneofWrapperField(this, 2, proto.game.CategoryRequest.oneofGroups_[0], value);
1195
- };
1196
-
1197
-
1198
- /**
1199
- * Clears the message field making it undefined.
1200
- * @return {!proto.game.CategoryRequest} returns this
1201
- */
1202
- proto.game.CategoryRequest.prototype.clearMetadata = function() {
1203
- return this.setMetadata(undefined);
1204
- };
1205
-
1206
-
1207
- /**
1208
- * Returns whether this field is set.
1209
- * @return {boolean}
1210
- */
1211
- proto.game.CategoryRequest.prototype.hasMetadata = function() {
1212
- return jspb.Message.getField(this, 2) != null;
1213
- };
1214
-
1215
-
1216
- /**
1217
- * optional string slug = 3;
1128
+ * optional string two = 2;
1218
1129
  * @return {string}
1219
1130
  */
1220
- proto.game.CategoryRequest.prototype.getSlug = function() {
1221
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1131
+ proto.game.CategoryRequest.prototype.getTwo = function() {
1132
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1222
1133
  };
1223
1134
 
1224
1135
 
@@ -1226,8 +1137,8 @@ proto.game.CategoryRequest.prototype.getSlug = function() {
1226
1137
  * @param {string} value
1227
1138
  * @return {!proto.game.CategoryRequest} returns this
1228
1139
  */
1229
- proto.game.CategoryRequest.prototype.setSlug = function(value) {
1230
- return jspb.Message.setOneofField(this, 3, proto.game.CategoryRequest.oneofGroups_[0], value);
1140
+ proto.game.CategoryRequest.prototype.setTwo = function(value) {
1141
+ return jspb.Message.setOneofField(this, 2, proto.game.CategoryRequest.oneofGroups_[0], value);
1231
1142
  };
1232
1143
 
1233
1144
 
@@ -1235,8 +1146,8 @@ proto.game.CategoryRequest.prototype.setSlug = function(value) {
1235
1146
  * Clears the field making it undefined.
1236
1147
  * @return {!proto.game.CategoryRequest} returns this
1237
1148
  */
1238
- proto.game.CategoryRequest.prototype.clearSlug = function() {
1239
- return jspb.Message.setOneofField(this, 3, proto.game.CategoryRequest.oneofGroups_[0], undefined);
1149
+ proto.game.CategoryRequest.prototype.clearTwo = function() {
1150
+ return jspb.Message.setOneofField(this, 2, proto.game.CategoryRequest.oneofGroups_[0], undefined);
1240
1151
  };
1241
1152
 
1242
1153
 
@@ -1244,25 +1155,25 @@ proto.game.CategoryRequest.prototype.clearSlug = function() {
1244
1155
  * Returns whether this field is set.
1245
1156
  * @return {boolean}
1246
1157
  */
1247
- proto.game.CategoryRequest.prototype.hasSlug = function() {
1248
- return jspb.Message.getField(this, 3) != null;
1158
+ proto.game.CategoryRequest.prototype.hasTwo = function() {
1159
+ return jspb.Message.getField(this, 2) != null;
1249
1160
  };
1250
1161
 
1251
1162
 
1252
1163
  /**
1253
- * optional int32 category_id = 4;
1254
- * @return {number}
1164
+ * optional string four = 4;
1165
+ * @return {string}
1255
1166
  */
1256
- proto.game.CategoryRequest.prototype.getCategoryId = function() {
1257
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
1167
+ proto.game.CategoryRequest.prototype.getFour = function() {
1168
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1258
1169
  };
1259
1170
 
1260
1171
 
1261
1172
  /**
1262
- * @param {number} value
1173
+ * @param {string} value
1263
1174
  * @return {!proto.game.CategoryRequest} returns this
1264
1175
  */
1265
- proto.game.CategoryRequest.prototype.setCategoryId = function(value) {
1176
+ proto.game.CategoryRequest.prototype.setFour = function(value) {
1266
1177
  return jspb.Message.setOneofField(this, 4, proto.game.CategoryRequest.oneofGroups_[0], value);
1267
1178
  };
1268
1179
 
@@ -1271,7 +1182,7 @@ proto.game.CategoryRequest.prototype.setCategoryId = function(value) {
1271
1182
  * Clears the field making it undefined.
1272
1183
  * @return {!proto.game.CategoryRequest} returns this
1273
1184
  */
1274
- proto.game.CategoryRequest.prototype.clearCategoryId = function() {
1185
+ proto.game.CategoryRequest.prototype.clearFour = function() {
1275
1186
  return jspb.Message.setOneofField(this, 4, proto.game.CategoryRequest.oneofGroups_[0], undefined);
1276
1187
  };
1277
1188
 
@@ -1280,35 +1191,17 @@ proto.game.CategoryRequest.prototype.clearCategoryId = function() {
1280
1191
  * Returns whether this field is set.
1281
1192
  * @return {boolean}
1282
1193
  */
1283
- proto.game.CategoryRequest.prototype.hasCategoryId = function() {
1194
+ proto.game.CategoryRequest.prototype.hasFour = function() {
1284
1195
  return jspb.Message.getField(this, 4) != null;
1285
1196
  };
1286
1197
 
1287
1198
 
1288
1199
  /**
1289
- * optional int32 id = 5;
1290
- * @return {number}
1291
- */
1292
- proto.game.CategoryRequest.prototype.getId = function() {
1293
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
1294
- };
1295
-
1296
-
1297
- /**
1298
- * @param {number} value
1299
- * @return {!proto.game.CategoryRequest} returns this
1300
- */
1301
- proto.game.CategoryRequest.prototype.setId = function(value) {
1302
- return jspb.Message.setProto3IntField(this, 5, value);
1303
- };
1304
-
1305
-
1306
- /**
1307
- * optional string description = 6;
1200
+ * optional string three = 3;
1308
1201
  * @return {string}
1309
1202
  */
1310
- proto.game.CategoryRequest.prototype.getDescription = function() {
1311
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
1203
+ proto.game.CategoryRequest.prototype.getThree = function() {
1204
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1312
1205
  };
1313
1206
 
1314
1207
 
@@ -1316,44 +1209,8 @@ proto.game.CategoryRequest.prototype.getDescription = function() {
1316
1209
  * @param {string} value
1317
1210
  * @return {!proto.game.CategoryRequest} returns this
1318
1211
  */
1319
- proto.game.CategoryRequest.prototype.setDescription = function(value) {
1320
- return jspb.Message.setField(this, 6, value);
1321
- };
1322
-
1323
-
1324
- /**
1325
- * Clears the field making it undefined.
1326
- * @return {!proto.game.CategoryRequest} returns this
1327
- */
1328
- proto.game.CategoryRequest.prototype.clearDescription = function() {
1329
- return jspb.Message.setField(this, 6, undefined);
1330
- };
1331
-
1332
-
1333
- /**
1334
- * Returns whether this field is set.
1335
- * @return {boolean}
1336
- */
1337
- proto.game.CategoryRequest.prototype.hasDescription = function() {
1338
- return jspb.Message.getField(this, 6) != null;
1339
- };
1340
-
1341
-
1342
- /**
1343
- * optional int32 is_active = 7;
1344
- * @return {number}
1345
- */
1346
- proto.game.CategoryRequest.prototype.getIsActive = function() {
1347
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
1348
- };
1349
-
1350
-
1351
- /**
1352
- * @param {number} value
1353
- * @return {!proto.game.CategoryRequest} returns this
1354
- */
1355
- proto.game.CategoryRequest.prototype.setIsActive = function(value) {
1356
- return jspb.Message.setField(this, 7, value);
1212
+ proto.game.CategoryRequest.prototype.setThree = function(value) {
1213
+ return jspb.Message.setOneofField(this, 3, proto.game.CategoryRequest.oneofGroups_[0], value);
1357
1214
  };
1358
1215
 
1359
1216
 
@@ -1361,45 +1218,8 @@ proto.game.CategoryRequest.prototype.setIsActive = function(value) {
1361
1218
  * Clears the field making it undefined.
1362
1219
  * @return {!proto.game.CategoryRequest} returns this
1363
1220
  */
1364
- proto.game.CategoryRequest.prototype.clearIsActive = function() {
1365
- return jspb.Message.setField(this, 7, undefined);
1366
- };
1367
-
1368
-
1369
- /**
1370
- * Returns whether this field is set.
1371
- * @return {boolean}
1372
- */
1373
- proto.game.CategoryRequest.prototype.hasIsActive = function() {
1374
- return jspb.Message.getField(this, 7) != null;
1375
- };
1376
-
1377
-
1378
- /**
1379
- * optional File file = 8;
1380
- * @return {?proto.game.File}
1381
- */
1382
- proto.game.CategoryRequest.prototype.getFile = function() {
1383
- return /** @type{?proto.game.File} */ (
1384
- jspb.Message.getWrapperField(this, proto.game.File, 8));
1385
- };
1386
-
1387
-
1388
- /**
1389
- * @param {?proto.game.File|undefined} value
1390
- * @return {!proto.game.CategoryRequest} returns this
1391
- */
1392
- proto.game.CategoryRequest.prototype.setFile = function(value) {
1393
- return jspb.Message.setWrapperField(this, 8, value);
1394
- };
1395
-
1396
-
1397
- /**
1398
- * Clears the message field making it undefined.
1399
- * @return {!proto.game.CategoryRequest} returns this
1400
- */
1401
- proto.game.CategoryRequest.prototype.clearFile = function() {
1402
- return this.setFile(undefined);
1221
+ proto.game.CategoryRequest.prototype.clearThree = function() {
1222
+ return jspb.Message.setOneofField(this, 3, proto.game.CategoryRequest.oneofGroups_[0], undefined);
1403
1223
  };
1404
1224
 
1405
1225
 
@@ -1407,8 +1227,8 @@ proto.game.CategoryRequest.prototype.clearFile = function() {
1407
1227
  * Returns whether this field is set.
1408
1228
  * @return {boolean}
1409
1229
  */
1410
- proto.game.CategoryRequest.prototype.hasFile = function() {
1411
- return jspb.Message.getField(this, 8) != null;
1230
+ proto.game.CategoryRequest.prototype.hasThree = function() {
1231
+ return jspb.Message.getField(this, 3) != null;
1412
1232
  };
1413
1233
 
1414
1234
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.0.30",
3
+ "version": "1.0.32",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {