chore(gRPC): add PushType and Development (#702)

fix #697
This commit is contained in:
Bo-Yi Wu
2022-12-17 21:17:41 +08:00
committed by GitHub
parent a8ad48cb11
commit 1d839f56c5
4 changed files with 151 additions and 34 deletions

View File

@@ -2,6 +2,7 @@
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
@@ -12,7 +13,7 @@
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js');
goog.object.extend(proto, google_protobuf_struct_pb);
@@ -627,7 +628,10 @@ proto.proto.NotificationRequest.toObject = function(includeInstance, msg) {
mutablecontent: jspb.Message.getBooleanFieldWithDefault(msg, 13, false),
data: (f = msg.getData()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f),
image: jspb.Message.getFieldWithDefault(msg, 15, ""),
priority: jspb.Message.getFieldWithDefault(msg, 16, 0)
priority: jspb.Message.getFieldWithDefault(msg, 16, 0),
id: jspb.Message.getFieldWithDefault(msg, 17, ""),
pushtype: jspb.Message.getFieldWithDefault(msg, 18, ""),
development: jspb.Message.getBooleanFieldWithDefault(msg, 19, false)
};
if (includeInstance) {
@@ -730,6 +734,18 @@ proto.proto.NotificationRequest.deserializeBinaryFromReader = function(msg, read
var value = /** @type {!proto.proto.NotificationRequest.Priority} */ (reader.readEnum());
msg.setPriority(value);
break;
case 17:
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 18:
var value = /** @type {string} */ (reader.readString());
msg.setPushtype(value);
break;
case 19:
var value = /** @type {boolean} */ (reader.readBool());
msg.setDevelopment(value);
break;
default:
reader.skipField();
break;
@@ -873,6 +889,27 @@ proto.proto.NotificationRequest.serializeBinaryToWriter = function(message, writ
f
);
}
f = message.getId();
if (f.length > 0) {
writer.writeString(
17,
f
);
}
f = message.getPushtype();
if (f.length > 0) {
writer.writeString(
18,
f
);
}
f = message.getDevelopment();
if (f) {
writer.writeBool(
19,
f
);
}
};
@@ -1229,6 +1266,60 @@ proto.proto.NotificationRequest.prototype.setPriority = function(value) {
};
/**
* optional string ID = 17;
* @return {string}
*/
proto.proto.NotificationRequest.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 17, ""));
};
/**
* @param {string} value
* @return {!proto.proto.NotificationRequest} returns this
*/
proto.proto.NotificationRequest.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 17, value);
};
/**
* optional string pushType = 18;
* @return {string}
*/
proto.proto.NotificationRequest.prototype.getPushtype = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 18, ""));
};
/**
* @param {string} value
* @return {!proto.proto.NotificationRequest} returns this
*/
proto.proto.NotificationRequest.prototype.setPushtype = function(value) {
return jspb.Message.setProto3StringField(this, 18, value);
};
/**
* optional bool development = 19;
* @return {boolean}
*/
proto.proto.NotificationRequest.prototype.getDevelopment = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 19, false));
};
/**
* @param {boolean} value
* @return {!proto.proto.NotificationRequest} returns this
*/
proto.proto.NotificationRequest.prototype.setDevelopment = function(value) {
return jspb.Message.setProto3BooleanField(this, 19, value);
};