protobuf-platform 1.0.30 → 1.0.31

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,22 @@ 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
+ string three = 3;
43
+ string four = 4;
34
44
  }
35
- int32 id = 5;
36
- optional string description = 6;
37
- optional int32 is_active = 7;
38
- optional File file = 8;
39
45
  }
40
46
  message GetCategoryRequest {
41
47
  int32 id = 1;
package/game/game_pb.js CHANGED
@@ -928,10 +928,10 @@ proto.game.CategoryRequest.oneofGroups_ = [[1,2,3,4]];
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
+ THREE: 3,
934
+ FOUR: 4
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
+ three: jspb.Message.getFieldWithDefault(msg, 3, ""),
978
+ four: jspb.Message.getFieldWithDefault(msg, 4, "")
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);
1020
+ var value = /** @type {string} */ (reader.readString());
1021
+ msg.setTwo(value);
1027
1022
  break;
1028
1023
  case 3:
1029
1024
  var value = /** @type {string} */ (reader.readString());
1030
- msg.setSlug(value);
1025
+ msg.setThree(value);
1031
1026
  break;
1032
1027
  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
1028
  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);
1047
- break;
1048
- case 8:
1049
- var value = new proto.game.File;
1050
- reader.readMessage(value,proto.game.File.deserializeBinaryFromReader);
1051
- msg.setFile(value);
1029
+ msg.setFour(value);
1052
1030
  break;
1053
1031
  default:
1054
1032
  reader.skipField();
@@ -1086,12 +1064,11 @@ proto.game.CategoryRequest.serializeBinaryToWriter = function(message, writer) {
1086
1064
  f
1087
1065
  );
1088
1066
  }
1089
- f = message.getMetadata();
1067
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
1090
1068
  if (f != null) {
1091
- writer.writeMessage(
1069
+ writer.writeString(
1092
1070
  2,
1093
- f,
1094
- proto.game.MetaDataFile.serializeBinaryToWriter
1071
+ f
1095
1072
  );
1096
1073
  }
1097
1074
  f = /** @type {string} */ (jspb.Message.getField(message, 3));
@@ -1101,50 +1078,21 @@ proto.game.CategoryRequest.serializeBinaryToWriter = function(message, writer) {
1101
1078
  f
1102
1079
  );
1103
1080
  }
1104
- f = /** @type {number} */ (jspb.Message.getField(message, 4));
1105
- if (f != null) {
1106
- writer.writeInt32(
1107
- 4,
1108
- f
1109
- );
1110
- }
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, 4));
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
+ 4,
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,36 +1119,35 @@ 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}
1128
+ * optional string two = 2;
1129
+ * @return {string}
1182
1130
  */
1183
- proto.game.CategoryRequest.prototype.getMetadata = function() {
1184
- return /** @type{?proto.game.MetaDataFile} */ (
1185
- jspb.Message.getWrapperField(this, proto.game.MetaDataFile, 2));
1131
+ proto.game.CategoryRequest.prototype.getTwo = function() {
1132
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1186
1133
  };
1187
1134
 
1188
1135
 
1189
1136
  /**
1190
- * @param {?proto.game.MetaDataFile|undefined} value
1137
+ * @param {string} value
1191
1138
  * @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);
1139
+ */
1140
+ proto.game.CategoryRequest.prototype.setTwo = function(value) {
1141
+ return jspb.Message.setOneofField(this, 2, proto.game.CategoryRequest.oneofGroups_[0], value);
1195
1142
  };
1196
1143
 
1197
1144
 
1198
1145
  /**
1199
- * Clears the message field making it undefined.
1146
+ * Clears the field making it undefined.
1200
1147
  * @return {!proto.game.CategoryRequest} returns this
1201
1148
  */
1202
- proto.game.CategoryRequest.prototype.clearMetadata = function() {
1203
- return this.setMetadata(undefined);
1149
+ proto.game.CategoryRequest.prototype.clearTwo = function() {
1150
+ return jspb.Message.setOneofField(this, 2, proto.game.CategoryRequest.oneofGroups_[0], undefined);
1204
1151
  };
1205
1152
 
1206
1153
 
@@ -1208,16 +1155,16 @@ proto.game.CategoryRequest.prototype.clearMetadata = function() {
1208
1155
  * Returns whether this field is set.
1209
1156
  * @return {boolean}
1210
1157
  */
1211
- proto.game.CategoryRequest.prototype.hasMetadata = function() {
1158
+ proto.game.CategoryRequest.prototype.hasTwo = function() {
1212
1159
  return jspb.Message.getField(this, 2) != null;
1213
1160
  };
1214
1161
 
1215
1162
 
1216
1163
  /**
1217
- * optional string slug = 3;
1164
+ * optional string three = 3;
1218
1165
  * @return {string}
1219
1166
  */
1220
- proto.game.CategoryRequest.prototype.getSlug = function() {
1167
+ proto.game.CategoryRequest.prototype.getThree = function() {
1221
1168
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1222
1169
  };
1223
1170
 
@@ -1226,7 +1173,7 @@ proto.game.CategoryRequest.prototype.getSlug = function() {
1226
1173
  * @param {string} value
1227
1174
  * @return {!proto.game.CategoryRequest} returns this
1228
1175
  */
1229
- proto.game.CategoryRequest.prototype.setSlug = function(value) {
1176
+ proto.game.CategoryRequest.prototype.setThree = function(value) {
1230
1177
  return jspb.Message.setOneofField(this, 3, proto.game.CategoryRequest.oneofGroups_[0], value);
1231
1178
  };
1232
1179
 
@@ -1235,7 +1182,7 @@ proto.game.CategoryRequest.prototype.setSlug = function(value) {
1235
1182
  * Clears the field making it undefined.
1236
1183
  * @return {!proto.game.CategoryRequest} returns this
1237
1184
  */
1238
- proto.game.CategoryRequest.prototype.clearSlug = function() {
1185
+ proto.game.CategoryRequest.prototype.clearThree = function() {
1239
1186
  return jspb.Message.setOneofField(this, 3, proto.game.CategoryRequest.oneofGroups_[0], undefined);
1240
1187
  };
1241
1188
 
@@ -1244,25 +1191,25 @@ proto.game.CategoryRequest.prototype.clearSlug = function() {
1244
1191
  * Returns whether this field is set.
1245
1192
  * @return {boolean}
1246
1193
  */
1247
- proto.game.CategoryRequest.prototype.hasSlug = function() {
1194
+ proto.game.CategoryRequest.prototype.hasThree = function() {
1248
1195
  return jspb.Message.getField(this, 3) != null;
1249
1196
  };
1250
1197
 
1251
1198
 
1252
1199
  /**
1253
- * optional int32 category_id = 4;
1254
- * @return {number}
1200
+ * optional string four = 4;
1201
+ * @return {string}
1255
1202
  */
1256
- proto.game.CategoryRequest.prototype.getCategoryId = function() {
1257
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
1203
+ proto.game.CategoryRequest.prototype.getFour = function() {
1204
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1258
1205
  };
1259
1206
 
1260
1207
 
1261
1208
  /**
1262
- * @param {number} value
1209
+ * @param {string} value
1263
1210
  * @return {!proto.game.CategoryRequest} returns this
1264
1211
  */
1265
- proto.game.CategoryRequest.prototype.setCategoryId = function(value) {
1212
+ proto.game.CategoryRequest.prototype.setFour = function(value) {
1266
1213
  return jspb.Message.setOneofField(this, 4, proto.game.CategoryRequest.oneofGroups_[0], value);
1267
1214
  };
1268
1215
 
@@ -1271,7 +1218,7 @@ proto.game.CategoryRequest.prototype.setCategoryId = function(value) {
1271
1218
  * Clears the field making it undefined.
1272
1219
  * @return {!proto.game.CategoryRequest} returns this
1273
1220
  */
1274
- proto.game.CategoryRequest.prototype.clearCategoryId = function() {
1221
+ proto.game.CategoryRequest.prototype.clearFour = function() {
1275
1222
  return jspb.Message.setOneofField(this, 4, proto.game.CategoryRequest.oneofGroups_[0], undefined);
1276
1223
  };
1277
1224
 
@@ -1280,138 +1227,11 @@ proto.game.CategoryRequest.prototype.clearCategoryId = function() {
1280
1227
  * Returns whether this field is set.
1281
1228
  * @return {boolean}
1282
1229
  */
1283
- proto.game.CategoryRequest.prototype.hasCategoryId = function() {
1230
+ proto.game.CategoryRequest.prototype.hasFour = function() {
1284
1231
  return jspb.Message.getField(this, 4) != null;
1285
1232
  };
1286
1233
 
1287
1234
 
1288
- /**
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;
1308
- * @return {string}
1309
- */
1310
- proto.game.CategoryRequest.prototype.getDescription = function() {
1311
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
1312
- };
1313
-
1314
-
1315
- /**
1316
- * @param {string} value
1317
- * @return {!proto.game.CategoryRequest} returns this
1318
- */
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);
1357
- };
1358
-
1359
-
1360
- /**
1361
- * Clears the field making it undefined.
1362
- * @return {!proto.game.CategoryRequest} returns this
1363
- */
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);
1403
- };
1404
-
1405
-
1406
- /**
1407
- * Returns whether this field is set.
1408
- * @return {boolean}
1409
- */
1410
- proto.game.CategoryRequest.prototype.hasFile = function() {
1411
- return jspb.Message.getField(this, 8) != null;
1412
- };
1413
-
1414
-
1415
1235
 
1416
1236
 
1417
1237
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {