protobuf-platform 1.0.33 → 1.0.34

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,23 +26,20 @@ 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;
39
29
  oneof request {
40
- string one = 1;
41
- string two = 4;
42
- string three = 2;
43
- string four = 3;
30
+ CategoryItemRequest category_data = 1;
31
+ bytes media = 2;
44
32
  }
45
33
  }
34
+ message CategoryItemRequest {
35
+ int32 id = 1;
36
+ optional string title = 2;
37
+ optional string slug = 3;
38
+ optional string description = 4;
39
+ optional int32 is_active = 5;
40
+ optional string file_name = 6;
41
+ optional string file_type = 7;
42
+ }
46
43
  message GetCategoryRequest {
47
44
  int32 id = 1;
48
45
  }
@@ -61,11 +58,4 @@ message CategoryListResponse {
61
58
  }
62
59
  message CategoryStatusResponse {
63
60
  string status = 1;
64
- }
65
- message MetaDataFile {
66
- string name = 1;
67
- string type = 2;
68
- }
69
- message File {
70
- bytes content = 1;
71
61
  }
package/game/game_pb.js CHANGED
@@ -22,15 +22,14 @@ var global = (function() {
22
22
  }.call(null));
23
23
 
24
24
  goog.exportSymbol('proto.game.CategoryItem', null, global);
25
+ goog.exportSymbol('proto.game.CategoryItemRequest', null, global);
25
26
  goog.exportSymbol('proto.game.CategoryListResponse', null, global);
26
27
  goog.exportSymbol('proto.game.CategoryRequest', null, global);
27
28
  goog.exportSymbol('proto.game.CategoryRequest.RequestCase', null, global);
28
29
  goog.exportSymbol('proto.game.CategoryResponse', null, global);
29
30
  goog.exportSymbol('proto.game.CategoryStatusResponse', null, global);
30
- goog.exportSymbol('proto.game.File', null, global);
31
31
  goog.exportSymbol('proto.game.GetCategoryRequest', null, global);
32
32
  goog.exportSymbol('proto.game.GetListCategoryRequest', null, global);
33
- goog.exportSymbol('proto.game.MetaDataFile', null, global);
34
33
  goog.exportSymbol('proto.game.PingRequest', null, global);
35
34
  goog.exportSymbol('proto.game.PongResponse', null, global);
36
35
  /**
@@ -127,16 +126,16 @@ if (goog.DEBUG && !COMPILED) {
127
126
  * @extends {jspb.Message}
128
127
  * @constructor
129
128
  */
130
- proto.game.GetCategoryRequest = function(opt_data) {
129
+ proto.game.CategoryItemRequest = function(opt_data) {
131
130
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
132
131
  };
133
- goog.inherits(proto.game.GetCategoryRequest, jspb.Message);
132
+ goog.inherits(proto.game.CategoryItemRequest, jspb.Message);
134
133
  if (goog.DEBUG && !COMPILED) {
135
134
  /**
136
135
  * @public
137
136
  * @override
138
137
  */
139
- proto.game.GetCategoryRequest.displayName = 'proto.game.GetCategoryRequest';
138
+ proto.game.CategoryItemRequest.displayName = 'proto.game.CategoryItemRequest';
140
139
  }
141
140
  /**
142
141
  * Generated by JsPbCodeGenerator.
@@ -148,16 +147,16 @@ if (goog.DEBUG && !COMPILED) {
148
147
  * @extends {jspb.Message}
149
148
  * @constructor
150
149
  */
151
- proto.game.GetListCategoryRequest = function(opt_data) {
150
+ proto.game.GetCategoryRequest = function(opt_data) {
152
151
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
153
152
  };
154
- goog.inherits(proto.game.GetListCategoryRequest, jspb.Message);
153
+ goog.inherits(proto.game.GetCategoryRequest, jspb.Message);
155
154
  if (goog.DEBUG && !COMPILED) {
156
155
  /**
157
156
  * @public
158
157
  * @override
159
158
  */
160
- proto.game.GetListCategoryRequest.displayName = 'proto.game.GetListCategoryRequest';
159
+ proto.game.GetCategoryRequest.displayName = 'proto.game.GetCategoryRequest';
161
160
  }
162
161
  /**
163
162
  * Generated by JsPbCodeGenerator.
@@ -169,37 +168,16 @@ if (goog.DEBUG && !COMPILED) {
169
168
  * @extends {jspb.Message}
170
169
  * @constructor
171
170
  */
172
- proto.game.CategoryResponse = function(opt_data) {
171
+ proto.game.GetListCategoryRequest = function(opt_data) {
173
172
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
174
173
  };
175
- goog.inherits(proto.game.CategoryResponse, jspb.Message);
176
- if (goog.DEBUG && !COMPILED) {
177
- /**
178
- * @public
179
- * @override
180
- */
181
- proto.game.CategoryResponse.displayName = 'proto.game.CategoryResponse';
182
- }
183
- /**
184
- * Generated by JsPbCodeGenerator.
185
- * @param {Array=} opt_data Optional initial data array, typically from a
186
- * server response, or constructed directly in Javascript. The array is used
187
- * in place and becomes part of the constructed object. It is not cloned.
188
- * If no data is provided, the constructed object will be empty, but still
189
- * valid.
190
- * @extends {jspb.Message}
191
- * @constructor
192
- */
193
- proto.game.CategoryListResponse = function(opt_data) {
194
- jspb.Message.initialize(this, opt_data, 0, -1, proto.game.CategoryListResponse.repeatedFields_, null);
195
- };
196
- goog.inherits(proto.game.CategoryListResponse, jspb.Message);
174
+ goog.inherits(proto.game.GetListCategoryRequest, jspb.Message);
197
175
  if (goog.DEBUG && !COMPILED) {
198
176
  /**
199
177
  * @public
200
178
  * @override
201
179
  */
202
- proto.game.CategoryListResponse.displayName = 'proto.game.CategoryListResponse';
180
+ proto.game.GetListCategoryRequest.displayName = 'proto.game.GetListCategoryRequest';
203
181
  }
204
182
  /**
205
183
  * Generated by JsPbCodeGenerator.
@@ -211,16 +189,16 @@ if (goog.DEBUG && !COMPILED) {
211
189
  * @extends {jspb.Message}
212
190
  * @constructor
213
191
  */
214
- proto.game.CategoryStatusResponse = function(opt_data) {
192
+ proto.game.CategoryResponse = function(opt_data) {
215
193
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
216
194
  };
217
- goog.inherits(proto.game.CategoryStatusResponse, jspb.Message);
195
+ goog.inherits(proto.game.CategoryResponse, jspb.Message);
218
196
  if (goog.DEBUG && !COMPILED) {
219
197
  /**
220
198
  * @public
221
199
  * @override
222
200
  */
223
- proto.game.CategoryStatusResponse.displayName = 'proto.game.CategoryStatusResponse';
201
+ proto.game.CategoryResponse.displayName = 'proto.game.CategoryResponse';
224
202
  }
225
203
  /**
226
204
  * Generated by JsPbCodeGenerator.
@@ -232,16 +210,16 @@ if (goog.DEBUG && !COMPILED) {
232
210
  * @extends {jspb.Message}
233
211
  * @constructor
234
212
  */
235
- proto.game.MetaDataFile = function(opt_data) {
236
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
213
+ proto.game.CategoryListResponse = function(opt_data) {
214
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.game.CategoryListResponse.repeatedFields_, null);
237
215
  };
238
- goog.inherits(proto.game.MetaDataFile, jspb.Message);
216
+ goog.inherits(proto.game.CategoryListResponse, jspb.Message);
239
217
  if (goog.DEBUG && !COMPILED) {
240
218
  /**
241
219
  * @public
242
220
  * @override
243
221
  */
244
- proto.game.MetaDataFile.displayName = 'proto.game.MetaDataFile';
222
+ proto.game.CategoryListResponse.displayName = 'proto.game.CategoryListResponse';
245
223
  }
246
224
  /**
247
225
  * Generated by JsPbCodeGenerator.
@@ -253,16 +231,16 @@ if (goog.DEBUG && !COMPILED) {
253
231
  * @extends {jspb.Message}
254
232
  * @constructor
255
233
  */
256
- proto.game.File = function(opt_data) {
234
+ proto.game.CategoryStatusResponse = function(opt_data) {
257
235
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
258
236
  };
259
- goog.inherits(proto.game.File, jspb.Message);
237
+ goog.inherits(proto.game.CategoryStatusResponse, jspb.Message);
260
238
  if (goog.DEBUG && !COMPILED) {
261
239
  /**
262
240
  * @public
263
241
  * @override
264
242
  */
265
- proto.game.File.displayName = 'proto.game.File';
243
+ proto.game.CategoryStatusResponse.displayName = 'proto.game.CategoryStatusResponse';
266
244
  }
267
245
 
268
246
 
@@ -921,17 +899,15 @@ proto.game.CategoryItem.prototype.hasImagePath = function() {
921
899
  * @private {!Array<!Array<number>>}
922
900
  * @const
923
901
  */
924
- proto.game.CategoryRequest.oneofGroups_ = [[1,4,2,3]];
902
+ proto.game.CategoryRequest.oneofGroups_ = [[1,2]];
925
903
 
926
904
  /**
927
905
  * @enum {number}
928
906
  */
929
907
  proto.game.CategoryRequest.RequestCase = {
930
908
  REQUEST_NOT_SET: 0,
931
- ONE: 1,
932
- TWO: 4,
933
- THREE: 2,
934
- FOUR: 3
909
+ CATEGORY_DATA: 1,
910
+ MEDIA: 2
935
911
  };
936
912
 
937
913
  /**
@@ -972,10 +948,8 @@ proto.game.CategoryRequest.prototype.toObject = function(opt_includeInstance) {
972
948
  */
973
949
  proto.game.CategoryRequest.toObject = function(includeInstance, msg) {
974
950
  var f, obj = {
975
- one: jspb.Message.getFieldWithDefault(msg, 1, ""),
976
- two: jspb.Message.getFieldWithDefault(msg, 4, ""),
977
- three: jspb.Message.getFieldWithDefault(msg, 2, ""),
978
- four: jspb.Message.getFieldWithDefault(msg, 3, "")
951
+ categoryData: (f = msg.getCategoryData()) && proto.game.CategoryItemRequest.toObject(includeInstance, f),
952
+ media: msg.getMedia_asB64()
979
953
  };
980
954
 
981
955
  if (includeInstance) {
@@ -1013,20 +987,13 @@ proto.game.CategoryRequest.deserializeBinaryFromReader = function(msg, reader) {
1013
987
  var field = reader.getFieldNumber();
1014
988
  switch (field) {
1015
989
  case 1:
1016
- var value = /** @type {string} */ (reader.readString());
1017
- msg.setOne(value);
1018
- break;
1019
- case 4:
1020
- var value = /** @type {string} */ (reader.readString());
1021
- msg.setTwo(value);
990
+ var value = new proto.game.CategoryItemRequest;
991
+ reader.readMessage(value,proto.game.CategoryItemRequest.deserializeBinaryFromReader);
992
+ msg.setCategoryData(value);
1022
993
  break;
1023
994
  case 2:
1024
- var value = /** @type {string} */ (reader.readString());
1025
- msg.setThree(value);
1026
- break;
1027
- case 3:
1028
- var value = /** @type {string} */ (reader.readString());
1029
- msg.setFour(value);
995
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
996
+ msg.setMedia(value);
1030
997
  break;
1031
998
  default:
1032
999
  reader.skipField();
@@ -1057,61 +1024,49 @@ proto.game.CategoryRequest.prototype.serializeBinary = function() {
1057
1024
  */
1058
1025
  proto.game.CategoryRequest.serializeBinaryToWriter = function(message, writer) {
1059
1026
  var f = undefined;
1060
- f = /** @type {string} */ (jspb.Message.getField(message, 1));
1027
+ f = message.getCategoryData();
1061
1028
  if (f != null) {
1062
- writer.writeString(
1029
+ writer.writeMessage(
1063
1030
  1,
1064
- f
1065
- );
1066
- }
1067
- f = /** @type {string} */ (jspb.Message.getField(message, 4));
1068
- if (f != null) {
1069
- writer.writeString(
1070
- 4,
1071
- f
1031
+ f,
1032
+ proto.game.CategoryItemRequest.serializeBinaryToWriter
1072
1033
  );
1073
1034
  }
1074
- f = /** @type {string} */ (jspb.Message.getField(message, 2));
1035
+ f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2));
1075
1036
  if (f != null) {
1076
- writer.writeString(
1037
+ writer.writeBytes(
1077
1038
  2,
1078
1039
  f
1079
1040
  );
1080
1041
  }
1081
- f = /** @type {string} */ (jspb.Message.getField(message, 3));
1082
- if (f != null) {
1083
- writer.writeString(
1084
- 3,
1085
- f
1086
- );
1087
- }
1088
1042
  };
1089
1043
 
1090
1044
 
1091
1045
  /**
1092
- * optional string one = 1;
1093
- * @return {string}
1046
+ * optional CategoryItemRequest category_data = 1;
1047
+ * @return {?proto.game.CategoryItemRequest}
1094
1048
  */
1095
- proto.game.CategoryRequest.prototype.getOne = function() {
1096
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1049
+ proto.game.CategoryRequest.prototype.getCategoryData = function() {
1050
+ return /** @type{?proto.game.CategoryItemRequest} */ (
1051
+ jspb.Message.getWrapperField(this, proto.game.CategoryItemRequest, 1));
1097
1052
  };
1098
1053
 
1099
1054
 
1100
1055
  /**
1101
- * @param {string} value
1056
+ * @param {?proto.game.CategoryItemRequest|undefined} value
1102
1057
  * @return {!proto.game.CategoryRequest} returns this
1103
- */
1104
- proto.game.CategoryRequest.prototype.setOne = function(value) {
1105
- return jspb.Message.setOneofField(this, 1, proto.game.CategoryRequest.oneofGroups_[0], value);
1058
+ */
1059
+ proto.game.CategoryRequest.prototype.setCategoryData = function(value) {
1060
+ return jspb.Message.setOneofWrapperField(this, 1, proto.game.CategoryRequest.oneofGroups_[0], value);
1106
1061
  };
1107
1062
 
1108
1063
 
1109
1064
  /**
1110
- * Clears the field making it undefined.
1065
+ * Clears the message field making it undefined.
1111
1066
  * @return {!proto.game.CategoryRequest} returns this
1112
1067
  */
1113
- proto.game.CategoryRequest.prototype.clearOne = function() {
1114
- return jspb.Message.setOneofField(this, 1, proto.game.CategoryRequest.oneofGroups_[0], undefined);
1068
+ proto.game.CategoryRequest.prototype.clearCategoryData = function() {
1069
+ return this.setCategoryData(undefined);
1115
1070
  };
1116
1071
 
1117
1072
 
@@ -1119,61 +1074,49 @@ proto.game.CategoryRequest.prototype.clearOne = function() {
1119
1074
  * Returns whether this field is set.
1120
1075
  * @return {boolean}
1121
1076
  */
1122
- proto.game.CategoryRequest.prototype.hasOne = function() {
1077
+ proto.game.CategoryRequest.prototype.hasCategoryData = function() {
1123
1078
  return jspb.Message.getField(this, 1) != null;
1124
1079
  };
1125
1080
 
1126
1081
 
1127
1082
  /**
1128
- * optional string two = 4;
1129
- * @return {string}
1130
- */
1131
- proto.game.CategoryRequest.prototype.getTwo = function() {
1132
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1133
- };
1134
-
1135
-
1136
- /**
1137
- * @param {string} value
1138
- * @return {!proto.game.CategoryRequest} returns this
1139
- */
1140
- proto.game.CategoryRequest.prototype.setTwo = function(value) {
1141
- return jspb.Message.setOneofField(this, 4, proto.game.CategoryRequest.oneofGroups_[0], value);
1142
- };
1143
-
1144
-
1145
- /**
1146
- * Clears the field making it undefined.
1147
- * @return {!proto.game.CategoryRequest} returns this
1083
+ * optional bytes media = 2;
1084
+ * @return {!(string|Uint8Array)}
1148
1085
  */
1149
- proto.game.CategoryRequest.prototype.clearTwo = function() {
1150
- return jspb.Message.setOneofField(this, 4, proto.game.CategoryRequest.oneofGroups_[0], undefined);
1086
+ proto.game.CategoryRequest.prototype.getMedia = function() {
1087
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1151
1088
  };
1152
1089
 
1153
1090
 
1154
1091
  /**
1155
- * Returns whether this field is set.
1156
- * @return {boolean}
1092
+ * optional bytes media = 2;
1093
+ * This is a type-conversion wrapper around `getMedia()`
1094
+ * @return {string}
1157
1095
  */
1158
- proto.game.CategoryRequest.prototype.hasTwo = function() {
1159
- return jspb.Message.getField(this, 4) != null;
1096
+ proto.game.CategoryRequest.prototype.getMedia_asB64 = function() {
1097
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
1098
+ this.getMedia()));
1160
1099
  };
1161
1100
 
1162
1101
 
1163
1102
  /**
1164
- * optional string three = 2;
1165
- * @return {string}
1103
+ * optional bytes media = 2;
1104
+ * Note that Uint8Array is not supported on all browsers.
1105
+ * @see http://caniuse.com/Uint8Array
1106
+ * This is a type-conversion wrapper around `getMedia()`
1107
+ * @return {!Uint8Array}
1166
1108
  */
1167
- proto.game.CategoryRequest.prototype.getThree = function() {
1168
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1109
+ proto.game.CategoryRequest.prototype.getMedia_asU8 = function() {
1110
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
1111
+ this.getMedia()));
1169
1112
  };
1170
1113
 
1171
1114
 
1172
1115
  /**
1173
- * @param {string} value
1116
+ * @param {!(string|Uint8Array)} value
1174
1117
  * @return {!proto.game.CategoryRequest} returns this
1175
1118
  */
1176
- proto.game.CategoryRequest.prototype.setThree = function(value) {
1119
+ proto.game.CategoryRequest.prototype.setMedia = function(value) {
1177
1120
  return jspb.Message.setOneofField(this, 2, proto.game.CategoryRequest.oneofGroups_[0], value);
1178
1121
  };
1179
1122
 
@@ -1182,7 +1125,7 @@ proto.game.CategoryRequest.prototype.setThree = function(value) {
1182
1125
  * Clears the field making it undefined.
1183
1126
  * @return {!proto.game.CategoryRequest} returns this
1184
1127
  */
1185
- proto.game.CategoryRequest.prototype.clearThree = function() {
1128
+ proto.game.CategoryRequest.prototype.clearMedia = function() {
1186
1129
  return jspb.Message.setOneofField(this, 2, proto.game.CategoryRequest.oneofGroups_[0], undefined);
1187
1130
  };
1188
1131
 
@@ -1191,47 +1134,11 @@ proto.game.CategoryRequest.prototype.clearThree = function() {
1191
1134
  * Returns whether this field is set.
1192
1135
  * @return {boolean}
1193
1136
  */
1194
- proto.game.CategoryRequest.prototype.hasThree = function() {
1137
+ proto.game.CategoryRequest.prototype.hasMedia = function() {
1195
1138
  return jspb.Message.getField(this, 2) != null;
1196
1139
  };
1197
1140
 
1198
1141
 
1199
- /**
1200
- * optional string four = 3;
1201
- * @return {string}
1202
- */
1203
- proto.game.CategoryRequest.prototype.getFour = function() {
1204
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1205
- };
1206
-
1207
-
1208
- /**
1209
- * @param {string} value
1210
- * @return {!proto.game.CategoryRequest} returns this
1211
- */
1212
- proto.game.CategoryRequest.prototype.setFour = function(value) {
1213
- return jspb.Message.setOneofField(this, 3, proto.game.CategoryRequest.oneofGroups_[0], value);
1214
- };
1215
-
1216
-
1217
- /**
1218
- * Clears the field making it undefined.
1219
- * @return {!proto.game.CategoryRequest} returns this
1220
- */
1221
- proto.game.CategoryRequest.prototype.clearFour = function() {
1222
- return jspb.Message.setOneofField(this, 3, proto.game.CategoryRequest.oneofGroups_[0], undefined);
1223
- };
1224
-
1225
-
1226
- /**
1227
- * Returns whether this field is set.
1228
- * @return {boolean}
1229
- */
1230
- proto.game.CategoryRequest.prototype.hasFour = function() {
1231
- return jspb.Message.getField(this, 3) != null;
1232
- };
1233
-
1234
-
1235
1142
 
1236
1143
 
1237
1144
 
@@ -1248,8 +1155,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
1248
1155
  * http://goto/soy-param-migration
1249
1156
  * @return {!Object}
1250
1157
  */
1251
- proto.game.GetCategoryRequest.prototype.toObject = function(opt_includeInstance) {
1252
- return proto.game.GetCategoryRequest.toObject(opt_includeInstance, this);
1158
+ proto.game.CategoryItemRequest.prototype.toObject = function(opt_includeInstance) {
1159
+ return proto.game.CategoryItemRequest.toObject(opt_includeInstance, this);
1253
1160
  };
1254
1161
 
1255
1162
 
@@ -1258,13 +1165,19 @@ proto.game.GetCategoryRequest.prototype.toObject = function(opt_includeInstance)
1258
1165
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1259
1166
  * the JSPB instance for transitional soy proto support:
1260
1167
  * http://goto/soy-param-migration
1261
- * @param {!proto.game.GetCategoryRequest} msg The msg instance to transform.
1168
+ * @param {!proto.game.CategoryItemRequest} msg The msg instance to transform.
1262
1169
  * @return {!Object}
1263
1170
  * @suppress {unusedLocalVariables} f is only used for nested messages
1264
1171
  */
1265
- proto.game.GetCategoryRequest.toObject = function(includeInstance, msg) {
1172
+ proto.game.CategoryItemRequest.toObject = function(includeInstance, msg) {
1266
1173
  var f, obj = {
1267
- id: jspb.Message.getFieldWithDefault(msg, 1, 0)
1174
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
1175
+ title: jspb.Message.getFieldWithDefault(msg, 2, ""),
1176
+ slug: jspb.Message.getFieldWithDefault(msg, 3, ""),
1177
+ description: jspb.Message.getFieldWithDefault(msg, 4, ""),
1178
+ isActive: jspb.Message.getFieldWithDefault(msg, 5, 0),
1179
+ fileName: jspb.Message.getFieldWithDefault(msg, 6, ""),
1180
+ fileType: jspb.Message.getFieldWithDefault(msg, 7, "")
1268
1181
  };
1269
1182
 
1270
1183
  if (includeInstance) {
@@ -1278,23 +1191,23 @@ proto.game.GetCategoryRequest.toObject = function(includeInstance, msg) {
1278
1191
  /**
1279
1192
  * Deserializes binary data (in protobuf wire format).
1280
1193
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
1281
- * @return {!proto.game.GetCategoryRequest}
1194
+ * @return {!proto.game.CategoryItemRequest}
1282
1195
  */
1283
- proto.game.GetCategoryRequest.deserializeBinary = function(bytes) {
1196
+ proto.game.CategoryItemRequest.deserializeBinary = function(bytes) {
1284
1197
  var reader = new jspb.BinaryReader(bytes);
1285
- var msg = new proto.game.GetCategoryRequest;
1286
- return proto.game.GetCategoryRequest.deserializeBinaryFromReader(msg, reader);
1198
+ var msg = new proto.game.CategoryItemRequest;
1199
+ return proto.game.CategoryItemRequest.deserializeBinaryFromReader(msg, reader);
1287
1200
  };
1288
1201
 
1289
1202
 
1290
1203
  /**
1291
1204
  * Deserializes binary data (in protobuf wire format) from the
1292
1205
  * given reader into the given message object.
1293
- * @param {!proto.game.GetCategoryRequest} msg The message object to deserialize into.
1206
+ * @param {!proto.game.CategoryItemRequest} msg The message object to deserialize into.
1294
1207
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1295
- * @return {!proto.game.GetCategoryRequest}
1208
+ * @return {!proto.game.CategoryItemRequest}
1296
1209
  */
1297
- proto.game.GetCategoryRequest.deserializeBinaryFromReader = function(msg, reader) {
1210
+ proto.game.CategoryItemRequest.deserializeBinaryFromReader = function(msg, reader) {
1298
1211
  while (reader.nextField()) {
1299
1212
  if (reader.isEndGroup()) {
1300
1213
  break;
@@ -1305,6 +1218,30 @@ proto.game.GetCategoryRequest.deserializeBinaryFromReader = function(msg, reader
1305
1218
  var value = /** @type {number} */ (reader.readInt32());
1306
1219
  msg.setId(value);
1307
1220
  break;
1221
+ case 2:
1222
+ var value = /** @type {string} */ (reader.readString());
1223
+ msg.setTitle(value);
1224
+ break;
1225
+ case 3:
1226
+ var value = /** @type {string} */ (reader.readString());
1227
+ msg.setSlug(value);
1228
+ break;
1229
+ case 4:
1230
+ var value = /** @type {string} */ (reader.readString());
1231
+ msg.setDescription(value);
1232
+ break;
1233
+ case 5:
1234
+ var value = /** @type {number} */ (reader.readInt32());
1235
+ msg.setIsActive(value);
1236
+ break;
1237
+ case 6:
1238
+ var value = /** @type {string} */ (reader.readString());
1239
+ msg.setFileName(value);
1240
+ break;
1241
+ case 7:
1242
+ var value = /** @type {string} */ (reader.readString());
1243
+ msg.setFileType(value);
1244
+ break;
1308
1245
  default:
1309
1246
  reader.skipField();
1310
1247
  break;
@@ -1318,9 +1255,9 @@ proto.game.GetCategoryRequest.deserializeBinaryFromReader = function(msg, reader
1318
1255
  * Serializes the message to binary data (in protobuf wire format).
1319
1256
  * @return {!Uint8Array}
1320
1257
  */
1321
- proto.game.GetCategoryRequest.prototype.serializeBinary = function() {
1258
+ proto.game.CategoryItemRequest.prototype.serializeBinary = function() {
1322
1259
  var writer = new jspb.BinaryWriter();
1323
- proto.game.GetCategoryRequest.serializeBinaryToWriter(this, writer);
1260
+ proto.game.CategoryItemRequest.serializeBinaryToWriter(this, writer);
1324
1261
  return writer.getResultBuffer();
1325
1262
  };
1326
1263
 
@@ -1328,11 +1265,11 @@ proto.game.GetCategoryRequest.prototype.serializeBinary = function() {
1328
1265
  /**
1329
1266
  * Serializes the given message to binary data (in protobuf wire
1330
1267
  * format), writing to the given BinaryWriter.
1331
- * @param {!proto.game.GetCategoryRequest} message
1268
+ * @param {!proto.game.CategoryItemRequest} message
1332
1269
  * @param {!jspb.BinaryWriter} writer
1333
1270
  * @suppress {unusedLocalVariables} f is only used for nested messages
1334
1271
  */
1335
- proto.game.GetCategoryRequest.serializeBinaryToWriter = function(message, writer) {
1272
+ proto.game.CategoryItemRequest.serializeBinaryToWriter = function(message, writer) {
1336
1273
  var f = undefined;
1337
1274
  f = message.getId();
1338
1275
  if (f !== 0) {
@@ -1341,6 +1278,48 @@ proto.game.GetCategoryRequest.serializeBinaryToWriter = function(message, writer
1341
1278
  f
1342
1279
  );
1343
1280
  }
1281
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
1282
+ if (f != null) {
1283
+ writer.writeString(
1284
+ 2,
1285
+ f
1286
+ );
1287
+ }
1288
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
1289
+ if (f != null) {
1290
+ writer.writeString(
1291
+ 3,
1292
+ f
1293
+ );
1294
+ }
1295
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
1296
+ if (f != null) {
1297
+ writer.writeString(
1298
+ 4,
1299
+ f
1300
+ );
1301
+ }
1302
+ f = /** @type {number} */ (jspb.Message.getField(message, 5));
1303
+ if (f != null) {
1304
+ writer.writeInt32(
1305
+ 5,
1306
+ f
1307
+ );
1308
+ }
1309
+ f = /** @type {string} */ (jspb.Message.getField(message, 6));
1310
+ if (f != null) {
1311
+ writer.writeString(
1312
+ 6,
1313
+ f
1314
+ );
1315
+ }
1316
+ f = /** @type {string} */ (jspb.Message.getField(message, 7));
1317
+ if (f != null) {
1318
+ writer.writeString(
1319
+ 7,
1320
+ f
1321
+ );
1322
+ }
1344
1323
  };
1345
1324
 
1346
1325
 
@@ -1348,45 +1327,391 @@ proto.game.GetCategoryRequest.serializeBinaryToWriter = function(message, writer
1348
1327
  * optional int32 id = 1;
1349
1328
  * @return {number}
1350
1329
  */
1351
- proto.game.GetCategoryRequest.prototype.getId = function() {
1330
+ proto.game.CategoryItemRequest.prototype.getId = function() {
1352
1331
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1353
1332
  };
1354
1333
 
1355
1334
 
1356
1335
  /**
1357
1336
  * @param {number} value
1358
- * @return {!proto.game.GetCategoryRequest} returns this
1337
+ * @return {!proto.game.CategoryItemRequest} returns this
1359
1338
  */
1360
- proto.game.GetCategoryRequest.prototype.setId = function(value) {
1339
+ proto.game.CategoryItemRequest.prototype.setId = function(value) {
1361
1340
  return jspb.Message.setProto3IntField(this, 1, value);
1362
1341
  };
1363
1342
 
1364
1343
 
1344
+ /**
1345
+ * optional string title = 2;
1346
+ * @return {string}
1347
+ */
1348
+ proto.game.CategoryItemRequest.prototype.getTitle = function() {
1349
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1350
+ };
1365
1351
 
1366
1352
 
1367
-
1368
- if (jspb.Message.GENERATE_TO_OBJECT) {
1369
1353
  /**
1370
- * Creates an object representation of this proto.
1371
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1372
- * Optional fields that are not set will be set to undefined.
1373
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1374
- * For the list of reserved names please see:
1375
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1376
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1377
- * JSPB instance for transitional soy proto support:
1378
- * http://goto/soy-param-migration
1379
- * @return {!Object}
1354
+ * @param {string} value
1355
+ * @return {!proto.game.CategoryItemRequest} returns this
1380
1356
  */
1381
- proto.game.GetListCategoryRequest.prototype.toObject = function(opt_includeInstance) {
1382
- return proto.game.GetListCategoryRequest.toObject(opt_includeInstance, this);
1357
+ proto.game.CategoryItemRequest.prototype.setTitle = function(value) {
1358
+ return jspb.Message.setField(this, 2, value);
1383
1359
  };
1384
1360
 
1385
1361
 
1386
1362
  /**
1387
- * Static version of the {@see toObject} method.
1388
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1389
- * the JSPB instance for transitional soy proto support:
1363
+ * Clears the field making it undefined.
1364
+ * @return {!proto.game.CategoryItemRequest} returns this
1365
+ */
1366
+ proto.game.CategoryItemRequest.prototype.clearTitle = function() {
1367
+ return jspb.Message.setField(this, 2, undefined);
1368
+ };
1369
+
1370
+
1371
+ /**
1372
+ * Returns whether this field is set.
1373
+ * @return {boolean}
1374
+ */
1375
+ proto.game.CategoryItemRequest.prototype.hasTitle = function() {
1376
+ return jspb.Message.getField(this, 2) != null;
1377
+ };
1378
+
1379
+
1380
+ /**
1381
+ * optional string slug = 3;
1382
+ * @return {string}
1383
+ */
1384
+ proto.game.CategoryItemRequest.prototype.getSlug = function() {
1385
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1386
+ };
1387
+
1388
+
1389
+ /**
1390
+ * @param {string} value
1391
+ * @return {!proto.game.CategoryItemRequest} returns this
1392
+ */
1393
+ proto.game.CategoryItemRequest.prototype.setSlug = function(value) {
1394
+ return jspb.Message.setField(this, 3, value);
1395
+ };
1396
+
1397
+
1398
+ /**
1399
+ * Clears the field making it undefined.
1400
+ * @return {!proto.game.CategoryItemRequest} returns this
1401
+ */
1402
+ proto.game.CategoryItemRequest.prototype.clearSlug = function() {
1403
+ return jspb.Message.setField(this, 3, undefined);
1404
+ };
1405
+
1406
+
1407
+ /**
1408
+ * Returns whether this field is set.
1409
+ * @return {boolean}
1410
+ */
1411
+ proto.game.CategoryItemRequest.prototype.hasSlug = function() {
1412
+ return jspb.Message.getField(this, 3) != null;
1413
+ };
1414
+
1415
+
1416
+ /**
1417
+ * optional string description = 4;
1418
+ * @return {string}
1419
+ */
1420
+ proto.game.CategoryItemRequest.prototype.getDescription = function() {
1421
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1422
+ };
1423
+
1424
+
1425
+ /**
1426
+ * @param {string} value
1427
+ * @return {!proto.game.CategoryItemRequest} returns this
1428
+ */
1429
+ proto.game.CategoryItemRequest.prototype.setDescription = function(value) {
1430
+ return jspb.Message.setField(this, 4, value);
1431
+ };
1432
+
1433
+
1434
+ /**
1435
+ * Clears the field making it undefined.
1436
+ * @return {!proto.game.CategoryItemRequest} returns this
1437
+ */
1438
+ proto.game.CategoryItemRequest.prototype.clearDescription = function() {
1439
+ return jspb.Message.setField(this, 4, undefined);
1440
+ };
1441
+
1442
+
1443
+ /**
1444
+ * Returns whether this field is set.
1445
+ * @return {boolean}
1446
+ */
1447
+ proto.game.CategoryItemRequest.prototype.hasDescription = function() {
1448
+ return jspb.Message.getField(this, 4) != null;
1449
+ };
1450
+
1451
+
1452
+ /**
1453
+ * optional int32 is_active = 5;
1454
+ * @return {number}
1455
+ */
1456
+ proto.game.CategoryItemRequest.prototype.getIsActive = function() {
1457
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
1458
+ };
1459
+
1460
+
1461
+ /**
1462
+ * @param {number} value
1463
+ * @return {!proto.game.CategoryItemRequest} returns this
1464
+ */
1465
+ proto.game.CategoryItemRequest.prototype.setIsActive = function(value) {
1466
+ return jspb.Message.setField(this, 5, value);
1467
+ };
1468
+
1469
+
1470
+ /**
1471
+ * Clears the field making it undefined.
1472
+ * @return {!proto.game.CategoryItemRequest} returns this
1473
+ */
1474
+ proto.game.CategoryItemRequest.prototype.clearIsActive = function() {
1475
+ return jspb.Message.setField(this, 5, undefined);
1476
+ };
1477
+
1478
+
1479
+ /**
1480
+ * Returns whether this field is set.
1481
+ * @return {boolean}
1482
+ */
1483
+ proto.game.CategoryItemRequest.prototype.hasIsActive = function() {
1484
+ return jspb.Message.getField(this, 5) != null;
1485
+ };
1486
+
1487
+
1488
+ /**
1489
+ * optional string file_name = 6;
1490
+ * @return {string}
1491
+ */
1492
+ proto.game.CategoryItemRequest.prototype.getFileName = function() {
1493
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
1494
+ };
1495
+
1496
+
1497
+ /**
1498
+ * @param {string} value
1499
+ * @return {!proto.game.CategoryItemRequest} returns this
1500
+ */
1501
+ proto.game.CategoryItemRequest.prototype.setFileName = function(value) {
1502
+ return jspb.Message.setField(this, 6, value);
1503
+ };
1504
+
1505
+
1506
+ /**
1507
+ * Clears the field making it undefined.
1508
+ * @return {!proto.game.CategoryItemRequest} returns this
1509
+ */
1510
+ proto.game.CategoryItemRequest.prototype.clearFileName = function() {
1511
+ return jspb.Message.setField(this, 6, undefined);
1512
+ };
1513
+
1514
+
1515
+ /**
1516
+ * Returns whether this field is set.
1517
+ * @return {boolean}
1518
+ */
1519
+ proto.game.CategoryItemRequest.prototype.hasFileName = function() {
1520
+ return jspb.Message.getField(this, 6) != null;
1521
+ };
1522
+
1523
+
1524
+ /**
1525
+ * optional string file_type = 7;
1526
+ * @return {string}
1527
+ */
1528
+ proto.game.CategoryItemRequest.prototype.getFileType = function() {
1529
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
1530
+ };
1531
+
1532
+
1533
+ /**
1534
+ * @param {string} value
1535
+ * @return {!proto.game.CategoryItemRequest} returns this
1536
+ */
1537
+ proto.game.CategoryItemRequest.prototype.setFileType = function(value) {
1538
+ return jspb.Message.setField(this, 7, value);
1539
+ };
1540
+
1541
+
1542
+ /**
1543
+ * Clears the field making it undefined.
1544
+ * @return {!proto.game.CategoryItemRequest} returns this
1545
+ */
1546
+ proto.game.CategoryItemRequest.prototype.clearFileType = function() {
1547
+ return jspb.Message.setField(this, 7, undefined);
1548
+ };
1549
+
1550
+
1551
+ /**
1552
+ * Returns whether this field is set.
1553
+ * @return {boolean}
1554
+ */
1555
+ proto.game.CategoryItemRequest.prototype.hasFileType = function() {
1556
+ return jspb.Message.getField(this, 7) != null;
1557
+ };
1558
+
1559
+
1560
+
1561
+
1562
+
1563
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1564
+ /**
1565
+ * Creates an object representation of this proto.
1566
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1567
+ * Optional fields that are not set will be set to undefined.
1568
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1569
+ * For the list of reserved names please see:
1570
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1571
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1572
+ * JSPB instance for transitional soy proto support:
1573
+ * http://goto/soy-param-migration
1574
+ * @return {!Object}
1575
+ */
1576
+ proto.game.GetCategoryRequest.prototype.toObject = function(opt_includeInstance) {
1577
+ return proto.game.GetCategoryRequest.toObject(opt_includeInstance, this);
1578
+ };
1579
+
1580
+
1581
+ /**
1582
+ * Static version of the {@see toObject} method.
1583
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1584
+ * the JSPB instance for transitional soy proto support:
1585
+ * http://goto/soy-param-migration
1586
+ * @param {!proto.game.GetCategoryRequest} msg The msg instance to transform.
1587
+ * @return {!Object}
1588
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1589
+ */
1590
+ proto.game.GetCategoryRequest.toObject = function(includeInstance, msg) {
1591
+ var f, obj = {
1592
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0)
1593
+ };
1594
+
1595
+ if (includeInstance) {
1596
+ obj.$jspbMessageInstance = msg;
1597
+ }
1598
+ return obj;
1599
+ };
1600
+ }
1601
+
1602
+
1603
+ /**
1604
+ * Deserializes binary data (in protobuf wire format).
1605
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1606
+ * @return {!proto.game.GetCategoryRequest}
1607
+ */
1608
+ proto.game.GetCategoryRequest.deserializeBinary = function(bytes) {
1609
+ var reader = new jspb.BinaryReader(bytes);
1610
+ var msg = new proto.game.GetCategoryRequest;
1611
+ return proto.game.GetCategoryRequest.deserializeBinaryFromReader(msg, reader);
1612
+ };
1613
+
1614
+
1615
+ /**
1616
+ * Deserializes binary data (in protobuf wire format) from the
1617
+ * given reader into the given message object.
1618
+ * @param {!proto.game.GetCategoryRequest} msg The message object to deserialize into.
1619
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1620
+ * @return {!proto.game.GetCategoryRequest}
1621
+ */
1622
+ proto.game.GetCategoryRequest.deserializeBinaryFromReader = function(msg, reader) {
1623
+ while (reader.nextField()) {
1624
+ if (reader.isEndGroup()) {
1625
+ break;
1626
+ }
1627
+ var field = reader.getFieldNumber();
1628
+ switch (field) {
1629
+ case 1:
1630
+ var value = /** @type {number} */ (reader.readInt32());
1631
+ msg.setId(value);
1632
+ break;
1633
+ default:
1634
+ reader.skipField();
1635
+ break;
1636
+ }
1637
+ }
1638
+ return msg;
1639
+ };
1640
+
1641
+
1642
+ /**
1643
+ * Serializes the message to binary data (in protobuf wire format).
1644
+ * @return {!Uint8Array}
1645
+ */
1646
+ proto.game.GetCategoryRequest.prototype.serializeBinary = function() {
1647
+ var writer = new jspb.BinaryWriter();
1648
+ proto.game.GetCategoryRequest.serializeBinaryToWriter(this, writer);
1649
+ return writer.getResultBuffer();
1650
+ };
1651
+
1652
+
1653
+ /**
1654
+ * Serializes the given message to binary data (in protobuf wire
1655
+ * format), writing to the given BinaryWriter.
1656
+ * @param {!proto.game.GetCategoryRequest} message
1657
+ * @param {!jspb.BinaryWriter} writer
1658
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1659
+ */
1660
+ proto.game.GetCategoryRequest.serializeBinaryToWriter = function(message, writer) {
1661
+ var f = undefined;
1662
+ f = message.getId();
1663
+ if (f !== 0) {
1664
+ writer.writeInt32(
1665
+ 1,
1666
+ f
1667
+ );
1668
+ }
1669
+ };
1670
+
1671
+
1672
+ /**
1673
+ * optional int32 id = 1;
1674
+ * @return {number}
1675
+ */
1676
+ proto.game.GetCategoryRequest.prototype.getId = function() {
1677
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1678
+ };
1679
+
1680
+
1681
+ /**
1682
+ * @param {number} value
1683
+ * @return {!proto.game.GetCategoryRequest} returns this
1684
+ */
1685
+ proto.game.GetCategoryRequest.prototype.setId = function(value) {
1686
+ return jspb.Message.setProto3IntField(this, 1, value);
1687
+ };
1688
+
1689
+
1690
+
1691
+
1692
+
1693
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1694
+ /**
1695
+ * Creates an object representation of this proto.
1696
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1697
+ * Optional fields that are not set will be set to undefined.
1698
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1699
+ * For the list of reserved names please see:
1700
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1701
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1702
+ * JSPB instance for transitional soy proto support:
1703
+ * http://goto/soy-param-migration
1704
+ * @return {!Object}
1705
+ */
1706
+ proto.game.GetListCategoryRequest.prototype.toObject = function(opt_includeInstance) {
1707
+ return proto.game.GetListCategoryRequest.toObject(opt_includeInstance, this);
1708
+ };
1709
+
1710
+
1711
+ /**
1712
+ * Static version of the {@see toObject} method.
1713
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1714
+ * the JSPB instance for transitional soy proto support:
1390
1715
  * http://goto/soy-param-migration
1391
1716
  * @param {!proto.game.GetListCategoryRequest} msg The msg instance to transform.
1392
1717
  * @return {!Object}
@@ -2059,318 +2384,4 @@ proto.game.CategoryStatusResponse.prototype.setStatus = function(value) {
2059
2384
  };
2060
2385
 
2061
2386
 
2062
-
2063
-
2064
-
2065
- if (jspb.Message.GENERATE_TO_OBJECT) {
2066
- /**
2067
- * Creates an object representation of this proto.
2068
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2069
- * Optional fields that are not set will be set to undefined.
2070
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2071
- * For the list of reserved names please see:
2072
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2073
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2074
- * JSPB instance for transitional soy proto support:
2075
- * http://goto/soy-param-migration
2076
- * @return {!Object}
2077
- */
2078
- proto.game.MetaDataFile.prototype.toObject = function(opt_includeInstance) {
2079
- return proto.game.MetaDataFile.toObject(opt_includeInstance, this);
2080
- };
2081
-
2082
-
2083
- /**
2084
- * Static version of the {@see toObject} method.
2085
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2086
- * the JSPB instance for transitional soy proto support:
2087
- * http://goto/soy-param-migration
2088
- * @param {!proto.game.MetaDataFile} msg The msg instance to transform.
2089
- * @return {!Object}
2090
- * @suppress {unusedLocalVariables} f is only used for nested messages
2091
- */
2092
- proto.game.MetaDataFile.toObject = function(includeInstance, msg) {
2093
- var f, obj = {
2094
- name: jspb.Message.getFieldWithDefault(msg, 1, ""),
2095
- type: jspb.Message.getFieldWithDefault(msg, 2, "")
2096
- };
2097
-
2098
- if (includeInstance) {
2099
- obj.$jspbMessageInstance = msg;
2100
- }
2101
- return obj;
2102
- };
2103
- }
2104
-
2105
-
2106
- /**
2107
- * Deserializes binary data (in protobuf wire format).
2108
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2109
- * @return {!proto.game.MetaDataFile}
2110
- */
2111
- proto.game.MetaDataFile.deserializeBinary = function(bytes) {
2112
- var reader = new jspb.BinaryReader(bytes);
2113
- var msg = new proto.game.MetaDataFile;
2114
- return proto.game.MetaDataFile.deserializeBinaryFromReader(msg, reader);
2115
- };
2116
-
2117
-
2118
- /**
2119
- * Deserializes binary data (in protobuf wire format) from the
2120
- * given reader into the given message object.
2121
- * @param {!proto.game.MetaDataFile} msg The message object to deserialize into.
2122
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2123
- * @return {!proto.game.MetaDataFile}
2124
- */
2125
- proto.game.MetaDataFile.deserializeBinaryFromReader = function(msg, reader) {
2126
- while (reader.nextField()) {
2127
- if (reader.isEndGroup()) {
2128
- break;
2129
- }
2130
- var field = reader.getFieldNumber();
2131
- switch (field) {
2132
- case 1:
2133
- var value = /** @type {string} */ (reader.readString());
2134
- msg.setName(value);
2135
- break;
2136
- case 2:
2137
- var value = /** @type {string} */ (reader.readString());
2138
- msg.setType(value);
2139
- break;
2140
- default:
2141
- reader.skipField();
2142
- break;
2143
- }
2144
- }
2145
- return msg;
2146
- };
2147
-
2148
-
2149
- /**
2150
- * Serializes the message to binary data (in protobuf wire format).
2151
- * @return {!Uint8Array}
2152
- */
2153
- proto.game.MetaDataFile.prototype.serializeBinary = function() {
2154
- var writer = new jspb.BinaryWriter();
2155
- proto.game.MetaDataFile.serializeBinaryToWriter(this, writer);
2156
- return writer.getResultBuffer();
2157
- };
2158
-
2159
-
2160
- /**
2161
- * Serializes the given message to binary data (in protobuf wire
2162
- * format), writing to the given BinaryWriter.
2163
- * @param {!proto.game.MetaDataFile} message
2164
- * @param {!jspb.BinaryWriter} writer
2165
- * @suppress {unusedLocalVariables} f is only used for nested messages
2166
- */
2167
- proto.game.MetaDataFile.serializeBinaryToWriter = function(message, writer) {
2168
- var f = undefined;
2169
- f = message.getName();
2170
- if (f.length > 0) {
2171
- writer.writeString(
2172
- 1,
2173
- f
2174
- );
2175
- }
2176
- f = message.getType();
2177
- if (f.length > 0) {
2178
- writer.writeString(
2179
- 2,
2180
- f
2181
- );
2182
- }
2183
- };
2184
-
2185
-
2186
- /**
2187
- * optional string name = 1;
2188
- * @return {string}
2189
- */
2190
- proto.game.MetaDataFile.prototype.getName = function() {
2191
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2192
- };
2193
-
2194
-
2195
- /**
2196
- * @param {string} value
2197
- * @return {!proto.game.MetaDataFile} returns this
2198
- */
2199
- proto.game.MetaDataFile.prototype.setName = function(value) {
2200
- return jspb.Message.setProto3StringField(this, 1, value);
2201
- };
2202
-
2203
-
2204
- /**
2205
- * optional string type = 2;
2206
- * @return {string}
2207
- */
2208
- proto.game.MetaDataFile.prototype.getType = function() {
2209
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2210
- };
2211
-
2212
-
2213
- /**
2214
- * @param {string} value
2215
- * @return {!proto.game.MetaDataFile} returns this
2216
- */
2217
- proto.game.MetaDataFile.prototype.setType = function(value) {
2218
- return jspb.Message.setProto3StringField(this, 2, value);
2219
- };
2220
-
2221
-
2222
-
2223
-
2224
-
2225
- if (jspb.Message.GENERATE_TO_OBJECT) {
2226
- /**
2227
- * Creates an object representation of this proto.
2228
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2229
- * Optional fields that are not set will be set to undefined.
2230
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2231
- * For the list of reserved names please see:
2232
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2233
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2234
- * JSPB instance for transitional soy proto support:
2235
- * http://goto/soy-param-migration
2236
- * @return {!Object}
2237
- */
2238
- proto.game.File.prototype.toObject = function(opt_includeInstance) {
2239
- return proto.game.File.toObject(opt_includeInstance, this);
2240
- };
2241
-
2242
-
2243
- /**
2244
- * Static version of the {@see toObject} method.
2245
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2246
- * the JSPB instance for transitional soy proto support:
2247
- * http://goto/soy-param-migration
2248
- * @param {!proto.game.File} msg The msg instance to transform.
2249
- * @return {!Object}
2250
- * @suppress {unusedLocalVariables} f is only used for nested messages
2251
- */
2252
- proto.game.File.toObject = function(includeInstance, msg) {
2253
- var f, obj = {
2254
- content: msg.getContent_asB64()
2255
- };
2256
-
2257
- if (includeInstance) {
2258
- obj.$jspbMessageInstance = msg;
2259
- }
2260
- return obj;
2261
- };
2262
- }
2263
-
2264
-
2265
- /**
2266
- * Deserializes binary data (in protobuf wire format).
2267
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2268
- * @return {!proto.game.File}
2269
- */
2270
- proto.game.File.deserializeBinary = function(bytes) {
2271
- var reader = new jspb.BinaryReader(bytes);
2272
- var msg = new proto.game.File;
2273
- return proto.game.File.deserializeBinaryFromReader(msg, reader);
2274
- };
2275
-
2276
-
2277
- /**
2278
- * Deserializes binary data (in protobuf wire format) from the
2279
- * given reader into the given message object.
2280
- * @param {!proto.game.File} msg The message object to deserialize into.
2281
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2282
- * @return {!proto.game.File}
2283
- */
2284
- proto.game.File.deserializeBinaryFromReader = function(msg, reader) {
2285
- while (reader.nextField()) {
2286
- if (reader.isEndGroup()) {
2287
- break;
2288
- }
2289
- var field = reader.getFieldNumber();
2290
- switch (field) {
2291
- case 1:
2292
- var value = /** @type {!Uint8Array} */ (reader.readBytes());
2293
- msg.setContent(value);
2294
- break;
2295
- default:
2296
- reader.skipField();
2297
- break;
2298
- }
2299
- }
2300
- return msg;
2301
- };
2302
-
2303
-
2304
- /**
2305
- * Serializes the message to binary data (in protobuf wire format).
2306
- * @return {!Uint8Array}
2307
- */
2308
- proto.game.File.prototype.serializeBinary = function() {
2309
- var writer = new jspb.BinaryWriter();
2310
- proto.game.File.serializeBinaryToWriter(this, writer);
2311
- return writer.getResultBuffer();
2312
- };
2313
-
2314
-
2315
- /**
2316
- * Serializes the given message to binary data (in protobuf wire
2317
- * format), writing to the given BinaryWriter.
2318
- * @param {!proto.game.File} message
2319
- * @param {!jspb.BinaryWriter} writer
2320
- * @suppress {unusedLocalVariables} f is only used for nested messages
2321
- */
2322
- proto.game.File.serializeBinaryToWriter = function(message, writer) {
2323
- var f = undefined;
2324
- f = message.getContent_asU8();
2325
- if (f.length > 0) {
2326
- writer.writeBytes(
2327
- 1,
2328
- f
2329
- );
2330
- }
2331
- };
2332
-
2333
-
2334
- /**
2335
- * optional bytes content = 1;
2336
- * @return {!(string|Uint8Array)}
2337
- */
2338
- proto.game.File.prototype.getContent = function() {
2339
- return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2340
- };
2341
-
2342
-
2343
- /**
2344
- * optional bytes content = 1;
2345
- * This is a type-conversion wrapper around `getContent()`
2346
- * @return {string}
2347
- */
2348
- proto.game.File.prototype.getContent_asB64 = function() {
2349
- return /** @type {string} */ (jspb.Message.bytesAsB64(
2350
- this.getContent()));
2351
- };
2352
-
2353
-
2354
- /**
2355
- * optional bytes content = 1;
2356
- * Note that Uint8Array is not supported on all browsers.
2357
- * @see http://caniuse.com/Uint8Array
2358
- * This is a type-conversion wrapper around `getContent()`
2359
- * @return {!Uint8Array}
2360
- */
2361
- proto.game.File.prototype.getContent_asU8 = function() {
2362
- return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
2363
- this.getContent()));
2364
- };
2365
-
2366
-
2367
- /**
2368
- * @param {!(string|Uint8Array)} value
2369
- * @return {!proto.game.File} returns this
2370
- */
2371
- proto.game.File.prototype.setContent = function(value) {
2372
- return jspb.Message.setProto3BytesField(this, 1, value);
2373
- };
2374
-
2375
-
2376
2387
  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.33",
3
+ "version": "1.0.34",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {