protobuf-platform 1.0.22 → 1.0.24

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
@@ -7,7 +7,7 @@ service Game {
7
7
  //Categories
8
8
  rpc createSingleCategory(CategoryRequest) returns (CategoryResponse);
9
9
  rpc readSingleCategory(GetCategoryRequest) returns (CategoryResponse);
10
- rpc updateSingleCategory(CategoryRequest) returns (CategoryResponse);
10
+ rpc updateSingleCategory(stream CategoryRequest) returns (CategoryResponse);
11
11
  rpc deleteSingleCategory(GetCategoryRequest) returns (CategoryStatusResponse);
12
12
  rpc readListCategories(GetListCategoryRequest) returns (CategoryListResponse);
13
13
  }
@@ -26,11 +26,16 @@ message CategoryItem {
26
26
  }
27
27
  //Category CRUD | Requests
28
28
  message CategoryRequest {
29
- optional int32 id = 1;
30
- optional string title = 2;
29
+
31
30
  optional string slug = 3;
32
31
  optional string description = 4;
33
32
  optional int32 is_active = 5;
33
+ oneof request {
34
+ int32 id = 1;
35
+ string title = 2;
36
+ MetaDataFile metadata = 6;
37
+ File file = 7;
38
+ }
34
39
  }
35
40
  message GetCategoryRequest {
36
41
  int32 id = 1;
@@ -50,4 +55,11 @@ message CategoryListResponse {
50
55
  }
51
56
  message CategoryStatusResponse {
52
57
  string status = 1;
58
+ }
59
+ message MetaDataFile {
60
+ string name = 1;
61
+ string type = 2;
62
+ }
63
+ message File {
64
+ bytes content = 1;
53
65
  }
@@ -130,7 +130,7 @@ createSingleCategory: {
130
130
  },
131
131
  updateSingleCategory: {
132
132
  path: '/game.Game/updateSingleCategory',
133
- requestStream: false,
133
+ requestStream: true,
134
134
  responseStream: false,
135
135
  requestType: game_pb.CategoryRequest,
136
136
  responseType: game_pb.CategoryResponse,
package/game/game_pb.js CHANGED
@@ -24,10 +24,13 @@ var global = (function() {
24
24
  goog.exportSymbol('proto.game.CategoryItem', null, global);
25
25
  goog.exportSymbol('proto.game.CategoryListResponse', null, global);
26
26
  goog.exportSymbol('proto.game.CategoryRequest', null, global);
27
+ goog.exportSymbol('proto.game.CategoryRequest.RequestCase', null, global);
27
28
  goog.exportSymbol('proto.game.CategoryResponse', null, global);
28
29
  goog.exportSymbol('proto.game.CategoryStatusResponse', null, global);
30
+ goog.exportSymbol('proto.game.File', null, global);
29
31
  goog.exportSymbol('proto.game.GetCategoryRequest', null, global);
30
32
  goog.exportSymbol('proto.game.GetListCategoryRequest', null, global);
33
+ goog.exportSymbol('proto.game.MetaDataFile', null, global);
31
34
  goog.exportSymbol('proto.game.PingRequest', null, global);
32
35
  goog.exportSymbol('proto.game.PongResponse', null, global);
33
36
  /**
@@ -104,7 +107,7 @@ if (goog.DEBUG && !COMPILED) {
104
107
  * @constructor
105
108
  */
106
109
  proto.game.CategoryRequest = function(opt_data) {
107
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
110
+ jspb.Message.initialize(this, opt_data, 0, -1, null, proto.game.CategoryRequest.oneofGroups_);
108
111
  };
109
112
  goog.inherits(proto.game.CategoryRequest, jspb.Message);
110
113
  if (goog.DEBUG && !COMPILED) {
@@ -219,6 +222,48 @@ if (goog.DEBUG && !COMPILED) {
219
222
  */
220
223
  proto.game.CategoryStatusResponse.displayName = 'proto.game.CategoryStatusResponse';
221
224
  }
225
+ /**
226
+ * Generated by JsPbCodeGenerator.
227
+ * @param {Array=} opt_data Optional initial data array, typically from a
228
+ * server response, or constructed directly in Javascript. The array is used
229
+ * in place and becomes part of the constructed object. It is not cloned.
230
+ * If no data is provided, the constructed object will be empty, but still
231
+ * valid.
232
+ * @extends {jspb.Message}
233
+ * @constructor
234
+ */
235
+ proto.game.MetaDataFile = function(opt_data) {
236
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
237
+ };
238
+ goog.inherits(proto.game.MetaDataFile, jspb.Message);
239
+ if (goog.DEBUG && !COMPILED) {
240
+ /**
241
+ * @public
242
+ * @override
243
+ */
244
+ proto.game.MetaDataFile.displayName = 'proto.game.MetaDataFile';
245
+ }
246
+ /**
247
+ * Generated by JsPbCodeGenerator.
248
+ * @param {Array=} opt_data Optional initial data array, typically from a
249
+ * server response, or constructed directly in Javascript. The array is used
250
+ * in place and becomes part of the constructed object. It is not cloned.
251
+ * If no data is provided, the constructed object will be empty, but still
252
+ * valid.
253
+ * @extends {jspb.Message}
254
+ * @constructor
255
+ */
256
+ proto.game.File = function(opt_data) {
257
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
258
+ };
259
+ goog.inherits(proto.game.File, jspb.Message);
260
+ if (goog.DEBUG && !COMPILED) {
261
+ /**
262
+ * @public
263
+ * @override
264
+ */
265
+ proto.game.File.displayName = 'proto.game.File';
266
+ }
222
267
 
223
268
 
224
269
 
@@ -868,6 +913,34 @@ proto.game.CategoryItem.prototype.hasImagePath = function() {
868
913
 
869
914
 
870
915
 
916
+ /**
917
+ * Oneof group definitions for this message. Each group defines the field
918
+ * numbers belonging to that group. When of these fields' value is set, all
919
+ * other fields in the group are cleared. During deserialization, if multiple
920
+ * fields are encountered for a group, only the last value seen will be kept.
921
+ * @private {!Array<!Array<number>>}
922
+ * @const
923
+ */
924
+ proto.game.CategoryRequest.oneofGroups_ = [[1,2,6,7]];
925
+
926
+ /**
927
+ * @enum {number}
928
+ */
929
+ proto.game.CategoryRequest.RequestCase = {
930
+ REQUEST_NOT_SET: 0,
931
+ ID: 1,
932
+ TITLE: 2,
933
+ METADATA: 6,
934
+ FILE: 7
935
+ };
936
+
937
+ /**
938
+ * @return {proto.game.CategoryRequest.RequestCase}
939
+ */
940
+ proto.game.CategoryRequest.prototype.getRequestCase = function() {
941
+ return /** @type {proto.game.CategoryRequest.RequestCase} */(jspb.Message.computeOneofCase(this, proto.game.CategoryRequest.oneofGroups_[0]));
942
+ };
943
+
871
944
 
872
945
 
873
946
  if (jspb.Message.GENERATE_TO_OBJECT) {
@@ -899,11 +972,13 @@ proto.game.CategoryRequest.prototype.toObject = function(opt_includeInstance) {
899
972
  */
900
973
  proto.game.CategoryRequest.toObject = function(includeInstance, msg) {
901
974
  var f, obj = {
902
- id: jspb.Message.getFieldWithDefault(msg, 1, 0),
903
- title: jspb.Message.getFieldWithDefault(msg, 2, ""),
904
975
  slug: jspb.Message.getFieldWithDefault(msg, 3, ""),
905
976
  description: jspb.Message.getFieldWithDefault(msg, 4, ""),
906
- isActive: jspb.Message.getFieldWithDefault(msg, 5, 0)
977
+ isActive: jspb.Message.getFieldWithDefault(msg, 5, 0),
978
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
979
+ title: jspb.Message.getFieldWithDefault(msg, 2, ""),
980
+ metadata: (f = msg.getMetadata()) && proto.game.MetaDataFile.toObject(includeInstance, f),
981
+ file: (f = msg.getFile()) && proto.game.File.toObject(includeInstance, f)
907
982
  };
908
983
 
909
984
  if (includeInstance) {
@@ -940,14 +1015,6 @@ proto.game.CategoryRequest.deserializeBinaryFromReader = function(msg, reader) {
940
1015
  }
941
1016
  var field = reader.getFieldNumber();
942
1017
  switch (field) {
943
- case 1:
944
- var value = /** @type {number} */ (reader.readInt32());
945
- msg.setId(value);
946
- break;
947
- case 2:
948
- var value = /** @type {string} */ (reader.readString());
949
- msg.setTitle(value);
950
- break;
951
1018
  case 3:
952
1019
  var value = /** @type {string} */ (reader.readString());
953
1020
  msg.setSlug(value);
@@ -960,6 +1027,24 @@ proto.game.CategoryRequest.deserializeBinaryFromReader = function(msg, reader) {
960
1027
  var value = /** @type {number} */ (reader.readInt32());
961
1028
  msg.setIsActive(value);
962
1029
  break;
1030
+ case 1:
1031
+ var value = /** @type {number} */ (reader.readInt32());
1032
+ msg.setId(value);
1033
+ break;
1034
+ case 2:
1035
+ var value = /** @type {string} */ (reader.readString());
1036
+ msg.setTitle(value);
1037
+ break;
1038
+ case 6:
1039
+ var value = new proto.game.MetaDataFile;
1040
+ reader.readMessage(value,proto.game.MetaDataFile.deserializeBinaryFromReader);
1041
+ msg.setMetadata(value);
1042
+ break;
1043
+ case 7:
1044
+ var value = new proto.game.File;
1045
+ reader.readMessage(value,proto.game.File.deserializeBinaryFromReader);
1046
+ msg.setFile(value);
1047
+ break;
963
1048
  default:
964
1049
  reader.skipField();
965
1050
  break;
@@ -989,20 +1074,6 @@ proto.game.CategoryRequest.prototype.serializeBinary = function() {
989
1074
  */
990
1075
  proto.game.CategoryRequest.serializeBinaryToWriter = function(message, writer) {
991
1076
  var f = undefined;
992
- f = /** @type {number} */ (jspb.Message.getField(message, 1));
993
- if (f != null) {
994
- writer.writeInt32(
995
- 1,
996
- f
997
- );
998
- }
999
- f = /** @type {string} */ (jspb.Message.getField(message, 2));
1000
- if (f != null) {
1001
- writer.writeString(
1002
- 2,
1003
- f
1004
- );
1005
- }
1006
1077
  f = /** @type {string} */ (jspb.Message.getField(message, 3));
1007
1078
  if (f != null) {
1008
1079
  writer.writeString(
@@ -1024,24 +1095,54 @@ proto.game.CategoryRequest.serializeBinaryToWriter = function(message, writer) {
1024
1095
  f
1025
1096
  );
1026
1097
  }
1098
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
1099
+ if (f != null) {
1100
+ writer.writeInt32(
1101
+ 1,
1102
+ f
1103
+ );
1104
+ }
1105
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
1106
+ if (f != null) {
1107
+ writer.writeString(
1108
+ 2,
1109
+ f
1110
+ );
1111
+ }
1112
+ f = message.getMetadata();
1113
+ if (f != null) {
1114
+ writer.writeMessage(
1115
+ 6,
1116
+ f,
1117
+ proto.game.MetaDataFile.serializeBinaryToWriter
1118
+ );
1119
+ }
1120
+ f = message.getFile();
1121
+ if (f != null) {
1122
+ writer.writeMessage(
1123
+ 7,
1124
+ f,
1125
+ proto.game.File.serializeBinaryToWriter
1126
+ );
1127
+ }
1027
1128
  };
1028
1129
 
1029
1130
 
1030
1131
  /**
1031
- * optional int32 id = 1;
1032
- * @return {number}
1132
+ * optional string slug = 3;
1133
+ * @return {string}
1033
1134
  */
1034
- proto.game.CategoryRequest.prototype.getId = function() {
1035
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1135
+ proto.game.CategoryRequest.prototype.getSlug = function() {
1136
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1036
1137
  };
1037
1138
 
1038
1139
 
1039
1140
  /**
1040
- * @param {number} value
1141
+ * @param {string} value
1041
1142
  * @return {!proto.game.CategoryRequest} returns this
1042
1143
  */
1043
- proto.game.CategoryRequest.prototype.setId = function(value) {
1044
- return jspb.Message.setField(this, 1, value);
1144
+ proto.game.CategoryRequest.prototype.setSlug = function(value) {
1145
+ return jspb.Message.setField(this, 3, value);
1045
1146
  };
1046
1147
 
1047
1148
 
@@ -1049,8 +1150,8 @@ proto.game.CategoryRequest.prototype.setId = function(value) {
1049
1150
  * Clears the field making it undefined.
1050
1151
  * @return {!proto.game.CategoryRequest} returns this
1051
1152
  */
1052
- proto.game.CategoryRequest.prototype.clearId = function() {
1053
- return jspb.Message.setField(this, 1, undefined);
1153
+ proto.game.CategoryRequest.prototype.clearSlug = function() {
1154
+ return jspb.Message.setField(this, 3, undefined);
1054
1155
  };
1055
1156
 
1056
1157
 
@@ -1058,17 +1159,17 @@ proto.game.CategoryRequest.prototype.clearId = function() {
1058
1159
  * Returns whether this field is set.
1059
1160
  * @return {boolean}
1060
1161
  */
1061
- proto.game.CategoryRequest.prototype.hasId = function() {
1062
- return jspb.Message.getField(this, 1) != null;
1162
+ proto.game.CategoryRequest.prototype.hasSlug = function() {
1163
+ return jspb.Message.getField(this, 3) != null;
1063
1164
  };
1064
1165
 
1065
1166
 
1066
1167
  /**
1067
- * optional string title = 2;
1168
+ * optional string description = 4;
1068
1169
  * @return {string}
1069
1170
  */
1070
- proto.game.CategoryRequest.prototype.getTitle = function() {
1071
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1171
+ proto.game.CategoryRequest.prototype.getDescription = function() {
1172
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1072
1173
  };
1073
1174
 
1074
1175
 
@@ -1076,8 +1177,8 @@ proto.game.CategoryRequest.prototype.getTitle = function() {
1076
1177
  * @param {string} value
1077
1178
  * @return {!proto.game.CategoryRequest} returns this
1078
1179
  */
1079
- proto.game.CategoryRequest.prototype.setTitle = function(value) {
1080
- return jspb.Message.setField(this, 2, value);
1180
+ proto.game.CategoryRequest.prototype.setDescription = function(value) {
1181
+ return jspb.Message.setField(this, 4, value);
1081
1182
  };
1082
1183
 
1083
1184
 
@@ -1085,8 +1186,8 @@ proto.game.CategoryRequest.prototype.setTitle = function(value) {
1085
1186
  * Clears the field making it undefined.
1086
1187
  * @return {!proto.game.CategoryRequest} returns this
1087
1188
  */
1088
- proto.game.CategoryRequest.prototype.clearTitle = function() {
1089
- return jspb.Message.setField(this, 2, undefined);
1189
+ proto.game.CategoryRequest.prototype.clearDescription = function() {
1190
+ return jspb.Message.setField(this, 4, undefined);
1090
1191
  };
1091
1192
 
1092
1193
 
@@ -1094,26 +1195,26 @@ proto.game.CategoryRequest.prototype.clearTitle = function() {
1094
1195
  * Returns whether this field is set.
1095
1196
  * @return {boolean}
1096
1197
  */
1097
- proto.game.CategoryRequest.prototype.hasTitle = function() {
1098
- return jspb.Message.getField(this, 2) != null;
1198
+ proto.game.CategoryRequest.prototype.hasDescription = function() {
1199
+ return jspb.Message.getField(this, 4) != null;
1099
1200
  };
1100
1201
 
1101
1202
 
1102
1203
  /**
1103
- * optional string slug = 3;
1104
- * @return {string}
1204
+ * optional int32 is_active = 5;
1205
+ * @return {number}
1105
1206
  */
1106
- proto.game.CategoryRequest.prototype.getSlug = function() {
1107
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1207
+ proto.game.CategoryRequest.prototype.getIsActive = function() {
1208
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
1108
1209
  };
1109
1210
 
1110
1211
 
1111
1212
  /**
1112
- * @param {string} value
1213
+ * @param {number} value
1113
1214
  * @return {!proto.game.CategoryRequest} returns this
1114
1215
  */
1115
- proto.game.CategoryRequest.prototype.setSlug = function(value) {
1116
- return jspb.Message.setField(this, 3, value);
1216
+ proto.game.CategoryRequest.prototype.setIsActive = function(value) {
1217
+ return jspb.Message.setField(this, 5, value);
1117
1218
  };
1118
1219
 
1119
1220
 
@@ -1121,8 +1222,8 @@ proto.game.CategoryRequest.prototype.setSlug = function(value) {
1121
1222
  * Clears the field making it undefined.
1122
1223
  * @return {!proto.game.CategoryRequest} returns this
1123
1224
  */
1124
- proto.game.CategoryRequest.prototype.clearSlug = function() {
1125
- return jspb.Message.setField(this, 3, undefined);
1225
+ proto.game.CategoryRequest.prototype.clearIsActive = function() {
1226
+ return jspb.Message.setField(this, 5, undefined);
1126
1227
  };
1127
1228
 
1128
1229
 
@@ -1130,17 +1231,53 @@ proto.game.CategoryRequest.prototype.clearSlug = function() {
1130
1231
  * Returns whether this field is set.
1131
1232
  * @return {boolean}
1132
1233
  */
1133
- proto.game.CategoryRequest.prototype.hasSlug = function() {
1134
- return jspb.Message.getField(this, 3) != null;
1234
+ proto.game.CategoryRequest.prototype.hasIsActive = function() {
1235
+ return jspb.Message.getField(this, 5) != null;
1135
1236
  };
1136
1237
 
1137
1238
 
1138
1239
  /**
1139
- * optional string description = 4;
1240
+ * optional int32 id = 1;
1241
+ * @return {number}
1242
+ */
1243
+ proto.game.CategoryRequest.prototype.getId = function() {
1244
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1245
+ };
1246
+
1247
+
1248
+ /**
1249
+ * @param {number} value
1250
+ * @return {!proto.game.CategoryRequest} returns this
1251
+ */
1252
+ proto.game.CategoryRequest.prototype.setId = function(value) {
1253
+ return jspb.Message.setOneofField(this, 1, proto.game.CategoryRequest.oneofGroups_[0], value);
1254
+ };
1255
+
1256
+
1257
+ /**
1258
+ * Clears the field making it undefined.
1259
+ * @return {!proto.game.CategoryRequest} returns this
1260
+ */
1261
+ proto.game.CategoryRequest.prototype.clearId = function() {
1262
+ return jspb.Message.setOneofField(this, 1, proto.game.CategoryRequest.oneofGroups_[0], undefined);
1263
+ };
1264
+
1265
+
1266
+ /**
1267
+ * Returns whether this field is set.
1268
+ * @return {boolean}
1269
+ */
1270
+ proto.game.CategoryRequest.prototype.hasId = function() {
1271
+ return jspb.Message.getField(this, 1) != null;
1272
+ };
1273
+
1274
+
1275
+ /**
1276
+ * optional string title = 2;
1140
1277
  * @return {string}
1141
1278
  */
1142
- proto.game.CategoryRequest.prototype.getDescription = function() {
1143
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1279
+ proto.game.CategoryRequest.prototype.getTitle = function() {
1280
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1144
1281
  };
1145
1282
 
1146
1283
 
@@ -1148,8 +1285,8 @@ proto.game.CategoryRequest.prototype.getDescription = function() {
1148
1285
  * @param {string} value
1149
1286
  * @return {!proto.game.CategoryRequest} returns this
1150
1287
  */
1151
- proto.game.CategoryRequest.prototype.setDescription = function(value) {
1152
- return jspb.Message.setField(this, 4, value);
1288
+ proto.game.CategoryRequest.prototype.setTitle = function(value) {
1289
+ return jspb.Message.setOneofField(this, 2, proto.game.CategoryRequest.oneofGroups_[0], value);
1153
1290
  };
1154
1291
 
1155
1292
 
@@ -1157,8 +1294,8 @@ proto.game.CategoryRequest.prototype.setDescription = function(value) {
1157
1294
  * Clears the field making it undefined.
1158
1295
  * @return {!proto.game.CategoryRequest} returns this
1159
1296
  */
1160
- proto.game.CategoryRequest.prototype.clearDescription = function() {
1161
- return jspb.Message.setField(this, 4, undefined);
1297
+ proto.game.CategoryRequest.prototype.clearTitle = function() {
1298
+ return jspb.Message.setOneofField(this, 2, proto.game.CategoryRequest.oneofGroups_[0], undefined);
1162
1299
  };
1163
1300
 
1164
1301
 
@@ -1166,35 +1303,73 @@ proto.game.CategoryRequest.prototype.clearDescription = function() {
1166
1303
  * Returns whether this field is set.
1167
1304
  * @return {boolean}
1168
1305
  */
1169
- proto.game.CategoryRequest.prototype.hasDescription = function() {
1170
- return jspb.Message.getField(this, 4) != null;
1306
+ proto.game.CategoryRequest.prototype.hasTitle = function() {
1307
+ return jspb.Message.getField(this, 2) != null;
1171
1308
  };
1172
1309
 
1173
1310
 
1174
1311
  /**
1175
- * optional int32 is_active = 5;
1176
- * @return {number}
1312
+ * optional MetaDataFile metadata = 6;
1313
+ * @return {?proto.game.MetaDataFile}
1177
1314
  */
1178
- proto.game.CategoryRequest.prototype.getIsActive = function() {
1179
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
1315
+ proto.game.CategoryRequest.prototype.getMetadata = function() {
1316
+ return /** @type{?proto.game.MetaDataFile} */ (
1317
+ jspb.Message.getWrapperField(this, proto.game.MetaDataFile, 6));
1180
1318
  };
1181
1319
 
1182
1320
 
1183
1321
  /**
1184
- * @param {number} value
1322
+ * @param {?proto.game.MetaDataFile|undefined} value
1323
+ * @return {!proto.game.CategoryRequest} returns this
1324
+ */
1325
+ proto.game.CategoryRequest.prototype.setMetadata = function(value) {
1326
+ return jspb.Message.setOneofWrapperField(this, 6, proto.game.CategoryRequest.oneofGroups_[0], value);
1327
+ };
1328
+
1329
+
1330
+ /**
1331
+ * Clears the message field making it undefined.
1185
1332
  * @return {!proto.game.CategoryRequest} returns this
1186
1333
  */
1187
- proto.game.CategoryRequest.prototype.setIsActive = function(value) {
1188
- return jspb.Message.setField(this, 5, value);
1334
+ proto.game.CategoryRequest.prototype.clearMetadata = function() {
1335
+ return this.setMetadata(undefined);
1189
1336
  };
1190
1337
 
1191
1338
 
1192
1339
  /**
1193
- * Clears the field making it undefined.
1340
+ * Returns whether this field is set.
1341
+ * @return {boolean}
1342
+ */
1343
+ proto.game.CategoryRequest.prototype.hasMetadata = function() {
1344
+ return jspb.Message.getField(this, 6) != null;
1345
+ };
1346
+
1347
+
1348
+ /**
1349
+ * optional File file = 7;
1350
+ * @return {?proto.game.File}
1351
+ */
1352
+ proto.game.CategoryRequest.prototype.getFile = function() {
1353
+ return /** @type{?proto.game.File} */ (
1354
+ jspb.Message.getWrapperField(this, proto.game.File, 7));
1355
+ };
1356
+
1357
+
1358
+ /**
1359
+ * @param {?proto.game.File|undefined} value
1360
+ * @return {!proto.game.CategoryRequest} returns this
1361
+ */
1362
+ proto.game.CategoryRequest.prototype.setFile = function(value) {
1363
+ return jspb.Message.setOneofWrapperField(this, 7, proto.game.CategoryRequest.oneofGroups_[0], value);
1364
+ };
1365
+
1366
+
1367
+ /**
1368
+ * Clears the message field making it undefined.
1194
1369
  * @return {!proto.game.CategoryRequest} returns this
1195
1370
  */
1196
- proto.game.CategoryRequest.prototype.clearIsActive = function() {
1197
- return jspb.Message.setField(this, 5, undefined);
1371
+ proto.game.CategoryRequest.prototype.clearFile = function() {
1372
+ return this.setFile(undefined);
1198
1373
  };
1199
1374
 
1200
1375
 
@@ -1202,8 +1377,8 @@ proto.game.CategoryRequest.prototype.clearIsActive = function() {
1202
1377
  * Returns whether this field is set.
1203
1378
  * @return {boolean}
1204
1379
  */
1205
- proto.game.CategoryRequest.prototype.hasIsActive = function() {
1206
- return jspb.Message.getField(this, 5) != null;
1380
+ proto.game.CategoryRequest.prototype.hasFile = function() {
1381
+ return jspb.Message.getField(this, 7) != null;
1207
1382
  };
1208
1383
 
1209
1384
 
@@ -2034,4 +2209,318 @@ proto.game.CategoryStatusResponse.prototype.setStatus = function(value) {
2034
2209
  };
2035
2210
 
2036
2211
 
2212
+
2213
+
2214
+
2215
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2216
+ /**
2217
+ * Creates an object representation of this proto.
2218
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2219
+ * Optional fields that are not set will be set to undefined.
2220
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2221
+ * For the list of reserved names please see:
2222
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2223
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2224
+ * JSPB instance for transitional soy proto support:
2225
+ * http://goto/soy-param-migration
2226
+ * @return {!Object}
2227
+ */
2228
+ proto.game.MetaDataFile.prototype.toObject = function(opt_includeInstance) {
2229
+ return proto.game.MetaDataFile.toObject(opt_includeInstance, this);
2230
+ };
2231
+
2232
+
2233
+ /**
2234
+ * Static version of the {@see toObject} method.
2235
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2236
+ * the JSPB instance for transitional soy proto support:
2237
+ * http://goto/soy-param-migration
2238
+ * @param {!proto.game.MetaDataFile} msg The msg instance to transform.
2239
+ * @return {!Object}
2240
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2241
+ */
2242
+ proto.game.MetaDataFile.toObject = function(includeInstance, msg) {
2243
+ var f, obj = {
2244
+ name: jspb.Message.getFieldWithDefault(msg, 1, ""),
2245
+ type: jspb.Message.getFieldWithDefault(msg, 2, "")
2246
+ };
2247
+
2248
+ if (includeInstance) {
2249
+ obj.$jspbMessageInstance = msg;
2250
+ }
2251
+ return obj;
2252
+ };
2253
+ }
2254
+
2255
+
2256
+ /**
2257
+ * Deserializes binary data (in protobuf wire format).
2258
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2259
+ * @return {!proto.game.MetaDataFile}
2260
+ */
2261
+ proto.game.MetaDataFile.deserializeBinary = function(bytes) {
2262
+ var reader = new jspb.BinaryReader(bytes);
2263
+ var msg = new proto.game.MetaDataFile;
2264
+ return proto.game.MetaDataFile.deserializeBinaryFromReader(msg, reader);
2265
+ };
2266
+
2267
+
2268
+ /**
2269
+ * Deserializes binary data (in protobuf wire format) from the
2270
+ * given reader into the given message object.
2271
+ * @param {!proto.game.MetaDataFile} msg The message object to deserialize into.
2272
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2273
+ * @return {!proto.game.MetaDataFile}
2274
+ */
2275
+ proto.game.MetaDataFile.deserializeBinaryFromReader = function(msg, reader) {
2276
+ while (reader.nextField()) {
2277
+ if (reader.isEndGroup()) {
2278
+ break;
2279
+ }
2280
+ var field = reader.getFieldNumber();
2281
+ switch (field) {
2282
+ case 1:
2283
+ var value = /** @type {string} */ (reader.readString());
2284
+ msg.setName(value);
2285
+ break;
2286
+ case 2:
2287
+ var value = /** @type {string} */ (reader.readString());
2288
+ msg.setType(value);
2289
+ break;
2290
+ default:
2291
+ reader.skipField();
2292
+ break;
2293
+ }
2294
+ }
2295
+ return msg;
2296
+ };
2297
+
2298
+
2299
+ /**
2300
+ * Serializes the message to binary data (in protobuf wire format).
2301
+ * @return {!Uint8Array}
2302
+ */
2303
+ proto.game.MetaDataFile.prototype.serializeBinary = function() {
2304
+ var writer = new jspb.BinaryWriter();
2305
+ proto.game.MetaDataFile.serializeBinaryToWriter(this, writer);
2306
+ return writer.getResultBuffer();
2307
+ };
2308
+
2309
+
2310
+ /**
2311
+ * Serializes the given message to binary data (in protobuf wire
2312
+ * format), writing to the given BinaryWriter.
2313
+ * @param {!proto.game.MetaDataFile} message
2314
+ * @param {!jspb.BinaryWriter} writer
2315
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2316
+ */
2317
+ proto.game.MetaDataFile.serializeBinaryToWriter = function(message, writer) {
2318
+ var f = undefined;
2319
+ f = message.getName();
2320
+ if (f.length > 0) {
2321
+ writer.writeString(
2322
+ 1,
2323
+ f
2324
+ );
2325
+ }
2326
+ f = message.getType();
2327
+ if (f.length > 0) {
2328
+ writer.writeString(
2329
+ 2,
2330
+ f
2331
+ );
2332
+ }
2333
+ };
2334
+
2335
+
2336
+ /**
2337
+ * optional string name = 1;
2338
+ * @return {string}
2339
+ */
2340
+ proto.game.MetaDataFile.prototype.getName = function() {
2341
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2342
+ };
2343
+
2344
+
2345
+ /**
2346
+ * @param {string} value
2347
+ * @return {!proto.game.MetaDataFile} returns this
2348
+ */
2349
+ proto.game.MetaDataFile.prototype.setName = function(value) {
2350
+ return jspb.Message.setProto3StringField(this, 1, value);
2351
+ };
2352
+
2353
+
2354
+ /**
2355
+ * optional string type = 2;
2356
+ * @return {string}
2357
+ */
2358
+ proto.game.MetaDataFile.prototype.getType = function() {
2359
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2360
+ };
2361
+
2362
+
2363
+ /**
2364
+ * @param {string} value
2365
+ * @return {!proto.game.MetaDataFile} returns this
2366
+ */
2367
+ proto.game.MetaDataFile.prototype.setType = function(value) {
2368
+ return jspb.Message.setProto3StringField(this, 2, value);
2369
+ };
2370
+
2371
+
2372
+
2373
+
2374
+
2375
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2376
+ /**
2377
+ * Creates an object representation of this proto.
2378
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2379
+ * Optional fields that are not set will be set to undefined.
2380
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2381
+ * For the list of reserved names please see:
2382
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2383
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2384
+ * JSPB instance for transitional soy proto support:
2385
+ * http://goto/soy-param-migration
2386
+ * @return {!Object}
2387
+ */
2388
+ proto.game.File.prototype.toObject = function(opt_includeInstance) {
2389
+ return proto.game.File.toObject(opt_includeInstance, this);
2390
+ };
2391
+
2392
+
2393
+ /**
2394
+ * Static version of the {@see toObject} method.
2395
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2396
+ * the JSPB instance for transitional soy proto support:
2397
+ * http://goto/soy-param-migration
2398
+ * @param {!proto.game.File} msg The msg instance to transform.
2399
+ * @return {!Object}
2400
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2401
+ */
2402
+ proto.game.File.toObject = function(includeInstance, msg) {
2403
+ var f, obj = {
2404
+ content: msg.getContent_asB64()
2405
+ };
2406
+
2407
+ if (includeInstance) {
2408
+ obj.$jspbMessageInstance = msg;
2409
+ }
2410
+ return obj;
2411
+ };
2412
+ }
2413
+
2414
+
2415
+ /**
2416
+ * Deserializes binary data (in protobuf wire format).
2417
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2418
+ * @return {!proto.game.File}
2419
+ */
2420
+ proto.game.File.deserializeBinary = function(bytes) {
2421
+ var reader = new jspb.BinaryReader(bytes);
2422
+ var msg = new proto.game.File;
2423
+ return proto.game.File.deserializeBinaryFromReader(msg, reader);
2424
+ };
2425
+
2426
+
2427
+ /**
2428
+ * Deserializes binary data (in protobuf wire format) from the
2429
+ * given reader into the given message object.
2430
+ * @param {!proto.game.File} msg The message object to deserialize into.
2431
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2432
+ * @return {!proto.game.File}
2433
+ */
2434
+ proto.game.File.deserializeBinaryFromReader = function(msg, reader) {
2435
+ while (reader.nextField()) {
2436
+ if (reader.isEndGroup()) {
2437
+ break;
2438
+ }
2439
+ var field = reader.getFieldNumber();
2440
+ switch (field) {
2441
+ case 1:
2442
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
2443
+ msg.setContent(value);
2444
+ break;
2445
+ default:
2446
+ reader.skipField();
2447
+ break;
2448
+ }
2449
+ }
2450
+ return msg;
2451
+ };
2452
+
2453
+
2454
+ /**
2455
+ * Serializes the message to binary data (in protobuf wire format).
2456
+ * @return {!Uint8Array}
2457
+ */
2458
+ proto.game.File.prototype.serializeBinary = function() {
2459
+ var writer = new jspb.BinaryWriter();
2460
+ proto.game.File.serializeBinaryToWriter(this, writer);
2461
+ return writer.getResultBuffer();
2462
+ };
2463
+
2464
+
2465
+ /**
2466
+ * Serializes the given message to binary data (in protobuf wire
2467
+ * format), writing to the given BinaryWriter.
2468
+ * @param {!proto.game.File} message
2469
+ * @param {!jspb.BinaryWriter} writer
2470
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2471
+ */
2472
+ proto.game.File.serializeBinaryToWriter = function(message, writer) {
2473
+ var f = undefined;
2474
+ f = message.getContent_asU8();
2475
+ if (f.length > 0) {
2476
+ writer.writeBytes(
2477
+ 1,
2478
+ f
2479
+ );
2480
+ }
2481
+ };
2482
+
2483
+
2484
+ /**
2485
+ * optional bytes content = 1;
2486
+ * @return {!(string|Uint8Array)}
2487
+ */
2488
+ proto.game.File.prototype.getContent = function() {
2489
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2490
+ };
2491
+
2492
+
2493
+ /**
2494
+ * optional bytes content = 1;
2495
+ * This is a type-conversion wrapper around `getContent()`
2496
+ * @return {string}
2497
+ */
2498
+ proto.game.File.prototype.getContent_asB64 = function() {
2499
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
2500
+ this.getContent()));
2501
+ };
2502
+
2503
+
2504
+ /**
2505
+ * optional bytes content = 1;
2506
+ * Note that Uint8Array is not supported on all browsers.
2507
+ * @see http://caniuse.com/Uint8Array
2508
+ * This is a type-conversion wrapper around `getContent()`
2509
+ * @return {!Uint8Array}
2510
+ */
2511
+ proto.game.File.prototype.getContent_asU8 = function() {
2512
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
2513
+ this.getContent()));
2514
+ };
2515
+
2516
+
2517
+ /**
2518
+ * @param {!(string|Uint8Array)} value
2519
+ * @return {!proto.game.File} returns this
2520
+ */
2521
+ proto.game.File.prototype.setContent = function(value) {
2522
+ return jspb.Message.setProto3BytesField(this, 1, value);
2523
+ };
2524
+
2525
+
2037
2526
  goog.object.extend(exports, proto.game);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {