protobuf-platform 1.0.36 → 1.0.37
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 +3 -2
- package/game/game_pb.js +37 -34
- package/package.json +1 -1
package/game/game.proto
CHANGED
@@ -28,11 +28,12 @@ message CategoryItem {
|
|
28
28
|
message CategoryRequest {
|
29
29
|
//oneof request {
|
30
30
|
CategoryItemRequest category_data = 1;
|
31
|
-
File file = 2;
|
31
|
+
//File file = 2;
|
32
|
+
bytes media = 2;
|
32
33
|
//}
|
33
34
|
}
|
34
35
|
message File {
|
35
|
-
bytes media =
|
36
|
+
bytes media = 1;
|
36
37
|
}
|
37
38
|
message CategoryItemRequest {
|
38
39
|
int32 id = 1;
|
package/game/game_pb.js
CHANGED
@@ -944,7 +944,7 @@ proto.game.CategoryRequest.prototype.toObject = function(opt_includeInstance) {
|
|
944
944
|
proto.game.CategoryRequest.toObject = function(includeInstance, msg) {
|
945
945
|
var f, obj = {
|
946
946
|
categoryData: (f = msg.getCategoryData()) && proto.game.CategoryItemRequest.toObject(includeInstance, f),
|
947
|
-
|
947
|
+
media: msg.getMedia_asB64()
|
948
948
|
};
|
949
949
|
|
950
950
|
if (includeInstance) {
|
@@ -987,9 +987,8 @@ proto.game.CategoryRequest.deserializeBinaryFromReader = function(msg, reader) {
|
|
987
987
|
msg.setCategoryData(value);
|
988
988
|
break;
|
989
989
|
case 2:
|
990
|
-
var value =
|
991
|
-
|
992
|
-
msg.setFile(value);
|
990
|
+
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
991
|
+
msg.setMedia(value);
|
993
992
|
break;
|
994
993
|
default:
|
995
994
|
reader.skipField();
|
@@ -1028,12 +1027,11 @@ proto.game.CategoryRequest.serializeBinaryToWriter = function(message, writer) {
|
|
1028
1027
|
proto.game.CategoryItemRequest.serializeBinaryToWriter
|
1029
1028
|
);
|
1030
1029
|
}
|
1031
|
-
f = message.
|
1032
|
-
if (f
|
1033
|
-
writer.
|
1030
|
+
f = message.getMedia_asU8();
|
1031
|
+
if (f.length > 0) {
|
1032
|
+
writer.writeBytes(
|
1034
1033
|
2,
|
1035
|
-
f
|
1036
|
-
proto.game.File.serializeBinaryToWriter
|
1034
|
+
f
|
1037
1035
|
);
|
1038
1036
|
}
|
1039
1037
|
};
|
@@ -1077,39 +1075,44 @@ proto.game.CategoryRequest.prototype.hasCategoryData = function() {
|
|
1077
1075
|
|
1078
1076
|
|
1079
1077
|
/**
|
1080
|
-
* optional
|
1081
|
-
* @return {
|
1078
|
+
* optional bytes media = 2;
|
1079
|
+
* @return {!(string|Uint8Array)}
|
1082
1080
|
*/
|
1083
|
-
proto.game.CategoryRequest.prototype.
|
1084
|
-
return /** @type{
|
1085
|
-
jspb.Message.getWrapperField(this, proto.game.File, 2));
|
1081
|
+
proto.game.CategoryRequest.prototype.getMedia = function() {
|
1082
|
+
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
1086
1083
|
};
|
1087
1084
|
|
1088
1085
|
|
1089
1086
|
/**
|
1090
|
-
*
|
1091
|
-
*
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1087
|
+
* optional bytes media = 2;
|
1088
|
+
* This is a type-conversion wrapper around `getMedia()`
|
1089
|
+
* @return {string}
|
1090
|
+
*/
|
1091
|
+
proto.game.CategoryRequest.prototype.getMedia_asB64 = function() {
|
1092
|
+
return /** @type {string} */ (jspb.Message.bytesAsB64(
|
1093
|
+
this.getMedia()));
|
1095
1094
|
};
|
1096
1095
|
|
1097
1096
|
|
1098
1097
|
/**
|
1099
|
-
*
|
1100
|
-
*
|
1098
|
+
* optional bytes media = 2;
|
1099
|
+
* Note that Uint8Array is not supported on all browsers.
|
1100
|
+
* @see http://caniuse.com/Uint8Array
|
1101
|
+
* This is a type-conversion wrapper around `getMedia()`
|
1102
|
+
* @return {!Uint8Array}
|
1101
1103
|
*/
|
1102
|
-
proto.game.CategoryRequest.prototype.
|
1103
|
-
return
|
1104
|
+
proto.game.CategoryRequest.prototype.getMedia_asU8 = function() {
|
1105
|
+
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
|
1106
|
+
this.getMedia()));
|
1104
1107
|
};
|
1105
1108
|
|
1106
1109
|
|
1107
1110
|
/**
|
1108
|
-
*
|
1109
|
-
* @return {
|
1111
|
+
* @param {!(string|Uint8Array)} value
|
1112
|
+
* @return {!proto.game.CategoryRequest} returns this
|
1110
1113
|
*/
|
1111
|
-
proto.game.CategoryRequest.prototype.
|
1112
|
-
return jspb.Message.
|
1114
|
+
proto.game.CategoryRequest.prototype.setMedia = function(value) {
|
1115
|
+
return jspb.Message.setProto3BytesField(this, 2, value);
|
1113
1116
|
};
|
1114
1117
|
|
1115
1118
|
|
@@ -1182,7 +1185,7 @@ proto.game.File.deserializeBinaryFromReader = function(msg, reader) {
|
|
1182
1185
|
}
|
1183
1186
|
var field = reader.getFieldNumber();
|
1184
1187
|
switch (field) {
|
1185
|
-
case
|
1188
|
+
case 1:
|
1186
1189
|
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
1187
1190
|
msg.setMedia(value);
|
1188
1191
|
break;
|
@@ -1218,7 +1221,7 @@ proto.game.File.serializeBinaryToWriter = function(message, writer) {
|
|
1218
1221
|
f = message.getMedia_asU8();
|
1219
1222
|
if (f.length > 0) {
|
1220
1223
|
writer.writeBytes(
|
1221
|
-
|
1224
|
+
1,
|
1222
1225
|
f
|
1223
1226
|
);
|
1224
1227
|
}
|
@@ -1226,16 +1229,16 @@ proto.game.File.serializeBinaryToWriter = function(message, writer) {
|
|
1226
1229
|
|
1227
1230
|
|
1228
1231
|
/**
|
1229
|
-
* optional bytes media =
|
1232
|
+
* optional bytes media = 1;
|
1230
1233
|
* @return {!(string|Uint8Array)}
|
1231
1234
|
*/
|
1232
1235
|
proto.game.File.prototype.getMedia = function() {
|
1233
|
-
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this,
|
1236
|
+
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
1234
1237
|
};
|
1235
1238
|
|
1236
1239
|
|
1237
1240
|
/**
|
1238
|
-
* optional bytes media =
|
1241
|
+
* optional bytes media = 1;
|
1239
1242
|
* This is a type-conversion wrapper around `getMedia()`
|
1240
1243
|
* @return {string}
|
1241
1244
|
*/
|
@@ -1246,7 +1249,7 @@ proto.game.File.prototype.getMedia_asB64 = function() {
|
|
1246
1249
|
|
1247
1250
|
|
1248
1251
|
/**
|
1249
|
-
* optional bytes media =
|
1252
|
+
* optional bytes media = 1;
|
1250
1253
|
* Note that Uint8Array is not supported on all browsers.
|
1251
1254
|
* @see http://caniuse.com/Uint8Array
|
1252
1255
|
* This is a type-conversion wrapper around `getMedia()`
|
@@ -1263,7 +1266,7 @@ proto.game.File.prototype.getMedia_asU8 = function() {
|
|
1263
1266
|
* @return {!proto.game.File} returns this
|
1264
1267
|
*/
|
1265
1268
|
proto.game.File.prototype.setMedia = function(value) {
|
1266
|
-
return jspb.Message.setProto3BytesField(this,
|
1269
|
+
return jspb.Message.setProto3BytesField(this, 1, value);
|
1267
1270
|
};
|
1268
1271
|
|
1269
1272
|
|