@chatie/grpc
Version:
gRPC for Chatie
1,534 lines (1,334 loc) • 58.9 kB
JavaScript
// source: puppet/friendship.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js');
goog.object.extend(proto, google_protobuf_wrappers_pb);
goog.exportSymbol('proto.wechaty.puppet.FriendshipAcceptRequest', null, global);
goog.exportSymbol('proto.wechaty.puppet.FriendshipAcceptResponse', null, global);
goog.exportSymbol('proto.wechaty.puppet.FriendshipAddRequest', null, global);
goog.exportSymbol('proto.wechaty.puppet.FriendshipAddResponse', null, global);
goog.exportSymbol('proto.wechaty.puppet.FriendshipPayloadRequest', null, global);
goog.exportSymbol('proto.wechaty.puppet.FriendshipPayloadResponse', null, global);
goog.exportSymbol('proto.wechaty.puppet.FriendshipSceneType', null, global);
goog.exportSymbol('proto.wechaty.puppet.FriendshipSearchPhoneRequest', null, global);
goog.exportSymbol('proto.wechaty.puppet.FriendshipSearchPhoneResponse', null, global);
goog.exportSymbol('proto.wechaty.puppet.FriendshipSearchWeixinRequest', null, global);
goog.exportSymbol('proto.wechaty.puppet.FriendshipSearchWeixinResponse', null, global);
goog.exportSymbol('proto.wechaty.puppet.FriendshipType', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.wechaty.puppet.FriendshipPayloadRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wechaty.puppet.FriendshipPayloadRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wechaty.puppet.FriendshipPayloadRequest.displayName = 'proto.wechaty.puppet.FriendshipPayloadRequest';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.wechaty.puppet.FriendshipPayloadResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wechaty.puppet.FriendshipPayloadResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wechaty.puppet.FriendshipPayloadResponse.displayName = 'proto.wechaty.puppet.FriendshipPayloadResponse';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.wechaty.puppet.FriendshipSearchPhoneRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wechaty.puppet.FriendshipSearchPhoneRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wechaty.puppet.FriendshipSearchPhoneRequest.displayName = 'proto.wechaty.puppet.FriendshipSearchPhoneRequest';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.wechaty.puppet.FriendshipSearchPhoneResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wechaty.puppet.FriendshipSearchPhoneResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wechaty.puppet.FriendshipSearchPhoneResponse.displayName = 'proto.wechaty.puppet.FriendshipSearchPhoneResponse';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.wechaty.puppet.FriendshipSearchWeixinRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wechaty.puppet.FriendshipSearchWeixinRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wechaty.puppet.FriendshipSearchWeixinRequest.displayName = 'proto.wechaty.puppet.FriendshipSearchWeixinRequest';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.wechaty.puppet.FriendshipSearchWeixinResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wechaty.puppet.FriendshipSearchWeixinResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wechaty.puppet.FriendshipSearchWeixinResponse.displayName = 'proto.wechaty.puppet.FriendshipSearchWeixinResponse';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.wechaty.puppet.FriendshipAddRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wechaty.puppet.FriendshipAddRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wechaty.puppet.FriendshipAddRequest.displayName = 'proto.wechaty.puppet.FriendshipAddRequest';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.wechaty.puppet.FriendshipAddResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wechaty.puppet.FriendshipAddResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wechaty.puppet.FriendshipAddResponse.displayName = 'proto.wechaty.puppet.FriendshipAddResponse';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.wechaty.puppet.FriendshipAcceptRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wechaty.puppet.FriendshipAcceptRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wechaty.puppet.FriendshipAcceptRequest.displayName = 'proto.wechaty.puppet.FriendshipAcceptRequest';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.wechaty.puppet.FriendshipAcceptResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wechaty.puppet.FriendshipAcceptResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wechaty.puppet.FriendshipAcceptResponse.displayName = 'proto.wechaty.puppet.FriendshipAcceptResponse';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.wechaty.puppet.FriendshipPayloadRequest.prototype.toObject = function(opt_includeInstance) {
return proto.wechaty.puppet.FriendshipPayloadRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.wechaty.puppet.FriendshipPayloadRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wechaty.puppet.FriendshipPayloadRequest.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
payload: (f = msg.getPayload()) && google_protobuf_wrappers_pb.StringValue.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.wechaty.puppet.FriendshipPayloadRequest}
*/
proto.wechaty.puppet.FriendshipPayloadRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.wechaty.puppet.FriendshipPayloadRequest;
return proto.wechaty.puppet.FriendshipPayloadRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.wechaty.puppet.FriendshipPayloadRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.wechaty.puppet.FriendshipPayloadRequest}
*/
proto.wechaty.puppet.FriendshipPayloadRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 2:
var value = new google_protobuf_wrappers_pb.StringValue;
reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader);
msg.setPayload(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.wechaty.puppet.FriendshipPayloadRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.wechaty.puppet.FriendshipPayloadRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.wechaty.puppet.FriendshipPayloadRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wechaty.puppet.FriendshipPayloadRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getPayload();
if (f != null) {
writer.writeMessage(
2,
f,
google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.wechaty.puppet.FriendshipPayloadRequest.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.wechaty.puppet.FriendshipPayloadRequest} returns this
*/
proto.wechaty.puppet.FriendshipPayloadRequest.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional google.protobuf.StringValue payload = 2;
* @return {?proto.google.protobuf.StringValue}
*/
proto.wechaty.puppet.FriendshipPayloadRequest.prototype.getPayload = function() {
return /** @type{?proto.google.protobuf.StringValue} */ (
jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.StringValue, 2));
};
/**
* @param {?proto.google.protobuf.StringValue|undefined} value
* @return {!proto.wechaty.puppet.FriendshipPayloadRequest} returns this
*/
proto.wechaty.puppet.FriendshipPayloadRequest.prototype.setPayload = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.wechaty.puppet.FriendshipPayloadRequest} returns this
*/
proto.wechaty.puppet.FriendshipPayloadRequest.prototype.clearPayload = function() {
return this.setPayload(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.wechaty.puppet.FriendshipPayloadRequest.prototype.hasPayload = function() {
return jspb.Message.getField(this, 2) != null;
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.wechaty.puppet.FriendshipPayloadResponse.prototype.toObject = function(opt_includeInstance) {
return proto.wechaty.puppet.FriendshipPayloadResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.wechaty.puppet.FriendshipPayloadResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wechaty.puppet.FriendshipPayloadResponse.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
contactId: jspb.Message.getFieldWithDefault(msg, 2, ""),
hello: jspb.Message.getFieldWithDefault(msg, 3, ""),
type: jspb.Message.getFieldWithDefault(msg, 4, 0),
stranger: jspb.Message.getFieldWithDefault(msg, 5, ""),
ticket: jspb.Message.getFieldWithDefault(msg, 6, ""),
scene: jspb.Message.getFieldWithDefault(msg, 7, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.wechaty.puppet.FriendshipPayloadResponse}
*/
proto.wechaty.puppet.FriendshipPayloadResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.wechaty.puppet.FriendshipPayloadResponse;
return proto.wechaty.puppet.FriendshipPayloadResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.wechaty.puppet.FriendshipPayloadResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.wechaty.puppet.FriendshipPayloadResponse}
*/
proto.wechaty.puppet.FriendshipPayloadResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setContactId(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setHello(value);
break;
case 4:
var value = /** @type {!proto.wechaty.puppet.FriendshipType} */ (reader.readEnum());
msg.setType(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setStranger(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setTicket(value);
break;
case 7:
var value = /** @type {!proto.wechaty.puppet.FriendshipSceneType} */ (reader.readEnum());
msg.setScene(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.wechaty.puppet.FriendshipPayloadResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.wechaty.puppet.FriendshipPayloadResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.wechaty.puppet.FriendshipPayloadResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wechaty.puppet.FriendshipPayloadResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getContactId();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getHello();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getType();
if (f !== 0.0) {
writer.writeEnum(
4,
f
);
}
f = message.getStranger();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = message.getTicket();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = message.getScene();
if (f !== 0.0) {
writer.writeEnum(
7,
f
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.wechaty.puppet.FriendshipPayloadResponse.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.wechaty.puppet.FriendshipPayloadResponse} returns this
*/
proto.wechaty.puppet.FriendshipPayloadResponse.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string contact_id = 2;
* @return {string}
*/
proto.wechaty.puppet.FriendshipPayloadResponse.prototype.getContactId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.wechaty.puppet.FriendshipPayloadResponse} returns this
*/
proto.wechaty.puppet.FriendshipPayloadResponse.prototype.setContactId = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string hello = 3;
* @return {string}
*/
proto.wechaty.puppet.FriendshipPayloadResponse.prototype.getHello = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.wechaty.puppet.FriendshipPayloadResponse} returns this
*/
proto.wechaty.puppet.FriendshipPayloadResponse.prototype.setHello = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional FriendshipType type = 4;
* @return {!proto.wechaty.puppet.FriendshipType}
*/
proto.wechaty.puppet.FriendshipPayloadResponse.prototype.getType = function() {
return /** @type {!proto.wechaty.puppet.FriendshipType} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {!proto.wechaty.puppet.FriendshipType} value
* @return {!proto.wechaty.puppet.FriendshipPayloadResponse} returns this
*/
proto.wechaty.puppet.FriendshipPayloadResponse.prototype.setType = function(value) {
return jspb.Message.setProto3EnumField(this, 4, value);
};
/**
* optional string stranger = 5;
* @return {string}
*/
proto.wechaty.puppet.FriendshipPayloadResponse.prototype.getStranger = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.wechaty.puppet.FriendshipPayloadResponse} returns this
*/
proto.wechaty.puppet.FriendshipPayloadResponse.prototype.setStranger = function(value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional string ticket = 6;
* @return {string}
*/
proto.wechaty.puppet.FriendshipPayloadResponse.prototype.getTicket = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/**
* @param {string} value
* @return {!proto.wechaty.puppet.FriendshipPayloadResponse} returns this
*/
proto.wechaty.puppet.FriendshipPayloadResponse.prototype.setTicket = function(value) {
return jspb.Message.setProto3StringField(this, 6, value);
};
/**
* optional FriendshipSceneType scene = 7;
* @return {!proto.wechaty.puppet.FriendshipSceneType}
*/
proto.wechaty.puppet.FriendshipPayloadResponse.prototype.getScene = function() {
return /** @type {!proto.wechaty.puppet.FriendshipSceneType} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};
/**
* @param {!proto.wechaty.puppet.FriendshipSceneType} value
* @return {!proto.wechaty.puppet.FriendshipPayloadResponse} returns this
*/
proto.wechaty.puppet.FriendshipPayloadResponse.prototype.setScene = function(value) {
return jspb.Message.setProto3EnumField(this, 7, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.wechaty.puppet.FriendshipSearchPhoneRequest.prototype.toObject = function(opt_includeInstance) {
return proto.wechaty.puppet.FriendshipSearchPhoneRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.wechaty.puppet.FriendshipSearchPhoneRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wechaty.puppet.FriendshipSearchPhoneRequest.toObject = function(includeInstance, msg) {
var f, obj = {
phone: jspb.Message.getFieldWithDefault(msg, 1, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.wechaty.puppet.FriendshipSearchPhoneRequest}
*/
proto.wechaty.puppet.FriendshipSearchPhoneRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.wechaty.puppet.FriendshipSearchPhoneRequest;
return proto.wechaty.puppet.FriendshipSearchPhoneRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.wechaty.puppet.FriendshipSearchPhoneRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.wechaty.puppet.FriendshipSearchPhoneRequest}
*/
proto.wechaty.puppet.FriendshipSearchPhoneRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setPhone(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.wechaty.puppet.FriendshipSearchPhoneRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.wechaty.puppet.FriendshipSearchPhoneRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.wechaty.puppet.FriendshipSearchPhoneRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wechaty.puppet.FriendshipSearchPhoneRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getPhone();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string phone = 1;
* @return {string}
*/
proto.wechaty.puppet.FriendshipSearchPhoneRequest.prototype.getPhone = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.wechaty.puppet.FriendshipSearchPhoneRequest} returns this
*/
proto.wechaty.puppet.FriendshipSearchPhoneRequest.prototype.setPhone = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.wechaty.puppet.FriendshipSearchPhoneResponse.prototype.toObject = function(opt_includeInstance) {
return proto.wechaty.puppet.FriendshipSearchPhoneResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.wechaty.puppet.FriendshipSearchPhoneResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wechaty.puppet.FriendshipSearchPhoneResponse.toObject = function(includeInstance, msg) {
var f, obj = {
contactId: (f = msg.getContactId()) && google_protobuf_wrappers_pb.StringValue.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.wechaty.puppet.FriendshipSearchPhoneResponse}
*/
proto.wechaty.puppet.FriendshipSearchPhoneResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.wechaty.puppet.FriendshipSearchPhoneResponse;
return proto.wechaty.puppet.FriendshipSearchPhoneResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.wechaty.puppet.FriendshipSearchPhoneResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.wechaty.puppet.FriendshipSearchPhoneResponse}
*/
proto.wechaty.puppet.FriendshipSearchPhoneResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new google_protobuf_wrappers_pb.StringValue;
reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader);
msg.setContactId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.wechaty.puppet.FriendshipSearchPhoneResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.wechaty.puppet.FriendshipSearchPhoneResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.wechaty.puppet.FriendshipSearchPhoneResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wechaty.puppet.FriendshipSearchPhoneResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getContactId();
if (f != null) {
writer.writeMessage(
1,
f,
google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter
);
}
};
/**
* optional google.protobuf.StringValue contact_id = 1;
* @return {?proto.google.protobuf.StringValue}
*/
proto.wechaty.puppet.FriendshipSearchPhoneResponse.prototype.getContactId = function() {
return /** @type{?proto.google.protobuf.StringValue} */ (
jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.StringValue, 1));
};
/**
* @param {?proto.google.protobuf.StringValue|undefined} value
* @return {!proto.wechaty.puppet.FriendshipSearchPhoneResponse} returns this
*/
proto.wechaty.puppet.FriendshipSearchPhoneResponse.prototype.setContactId = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.wechaty.puppet.FriendshipSearchPhoneResponse} returns this
*/
proto.wechaty.puppet.FriendshipSearchPhoneResponse.prototype.clearContactId = function() {
return this.setContactId(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.wechaty.puppet.FriendshipSearchPhoneResponse.prototype.hasContactId = function() {
return jspb.Message.getField(this, 1) != null;
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.wechaty.puppet.FriendshipSearchWeixinRequest.prototype.toObject = function(opt_includeInstance) {
return proto.wechaty.puppet.FriendshipSearchWeixinRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.wechaty.puppet.FriendshipSearchWeixinRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wechaty.puppet.FriendshipSearchWeixinRequest.toObject = function(includeInstance, msg) {
var f, obj = {
weixin: jspb.Message.getFieldWithDefault(msg, 1, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.wechaty.puppet.FriendshipSearchWeixinRequest}
*/
proto.wechaty.puppet.FriendshipSearchWeixinRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.wechaty.puppet.FriendshipSearchWeixinRequest;
return proto.wechaty.puppet.FriendshipSearchWeixinRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.wechaty.puppet.FriendshipSearchWeixinRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.wechaty.puppet.FriendshipSearchWeixinRequest}
*/
proto.wechaty.puppet.FriendshipSearchWeixinRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setWeixin(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.wechaty.puppet.FriendshipSearchWeixinRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.wechaty.puppet.FriendshipSearchWeixinRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.wechaty.puppet.FriendshipSearchWeixinRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wechaty.puppet.FriendshipSearchWeixinRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getWeixin();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string weixin = 1;
* @return {string}
*/
proto.wechaty.puppet.FriendshipSearchWeixinRequest.prototype.getWeixin = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.wechaty.puppet.FriendshipSearchWeixinRequest} returns this
*/
proto.wechaty.puppet.FriendshipSearchWeixinRequest.prototype.setWeixin = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.wechaty.puppet.FriendshipSearchWeixinResponse.prototype.toObject = function(opt_includeInstance) {
return proto.wechaty.puppet.FriendshipSearchWeixinResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.wechaty.puppet.FriendshipSearchWeixinResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wechaty.puppet.FriendshipSearchWeixinResponse.toObject = function(includeInstance, msg) {
var f, obj = {
contactId: (f = msg.getContactId()) && google_protobuf_wrappers_pb.StringValue.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.wechaty.puppet.FriendshipSearchWeixinResponse}
*/
proto.wechaty.puppet.FriendshipSearchWeixinResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.wechaty.puppet.FriendshipSearchWeixinResponse;
return proto.wechaty.puppet.FriendshipSearchWeixinResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.wechaty.puppet.FriendshipSearchWeixinResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.wechaty.puppet.FriendshipSearchWeixinResponse}
*/
proto.wechaty.puppet.FriendshipSearchWeixinResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new google_protobuf_wrappers_pb.StringValue;
reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader);
msg.setContactId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.wechaty.puppet.FriendshipSearchWeixinResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.wechaty.puppet.FriendshipSearchWeixinResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.wechaty.puppet.FriendshipSearchWeixinResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wechaty.puppet.FriendshipSearchWeixinResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getContactId();
if (f != null) {
writer.writeMessage(
1,
f,
google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter
);
}
};
/**
* optional google.protobuf.StringValue contact_id = 1;
* @return {?proto.google.protobuf.StringValue}
*/
proto.wechaty.puppet.FriendshipSearchWeixinResponse.prototype.getContactId = function() {
return /** @type{?proto.google.protobuf.StringValue} */ (
jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.StringValue, 1));
};
/**
* @param {?proto.google.protobuf.StringValue|undefined} value
* @return {!proto.wechaty.puppet.FriendshipSearchWeixinResponse} returns this
*/
proto.wechaty.puppet.FriendshipSearchWeixinResponse.prototype.setContactId = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.wechaty.puppet.FriendshipSearchWeixinResponse} returns this
*/
proto.wechaty.puppet.FriendshipSearchWeixinResponse.prototype.clearContactId = function() {
return this.setContactId(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.wechaty.puppet.FriendshipSearchWeixinResponse.prototype.hasContactId = function() {
return jspb.Message.getField(this, 1) != null;
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.wechaty.puppet.FriendshipAddRequest.prototype.toObject = function(opt_includeInstance) {
return proto.wechaty.puppet.FriendshipAddRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.wechaty.puppet.FriendshipAddRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wechaty.puppet.FriendshipAddRequest.toObject = function(includeInstance, msg) {
var f, obj = {
contactId: jspb.Message.getFieldWithDefault(msg, 1, ""),
hello: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.wechaty.puppet.FriendshipAddRequest}
*/
proto.wechaty.puppet.FriendshipAddRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.wechaty.puppet.FriendshipAddRequest;
return proto.wechaty.puppet.FriendshipAddRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.wechaty.puppet.FriendshipAddRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.wechaty.puppet.FriendshipAddRequest}
*/
proto.wechaty.puppet.FriendshipAddRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setContactId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setHello(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.wechaty.puppet.FriendshipAddRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.wechaty.puppet.FriendshipAddRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.wechaty.puppet.FriendshipAddRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wechaty.puppet.FriendshipAddRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getContactId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getHello();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string contact_id = 1;
* @return {string}
*/
proto.wechaty.puppet.FriendshipAddRequest.prototype.getContactId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.wechaty.puppet.FriendshipAddRequest} returns this
*/
proto.wechaty.puppet.FriendshipAddRequest.prototype.setContactId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string hello = 2;
* @return {string}
*/
proto.wechaty.puppet.FriendshipAddRequest.prototype.getHello = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.wechaty.puppet.FriendshipAddRequest} returns this
*/
proto.wechaty.puppet.FriendshipAddRequest.prototype.setHello = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.wechaty.puppet.FriendshipAddResponse.prototype.toObject = function(opt_includeInstance) {
return proto.wechaty.puppet.FriendshipAddResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.wechaty.puppet.FriendshipAddResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wechaty.puppet.FriendshipAddResponse.toObject = function(includeInstance, msg) {
var f, obj = {
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.wechaty.puppet.FriendshipAddResponse}
*/
proto.wechaty.puppet.FriendshipAddResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.wechaty.puppet.FriendshipAddResponse;
return proto.wechaty.puppet.FriendshipAddResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.wechaty.puppet.FriendshipAddResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.wechaty.puppet.FriendshipAddResponse}
*/
proto.wechaty.puppet.FriendshipAddResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).