UNPKG

wechaty-grpc

Version:
2,067 lines 67.5 kB
// source: wechaty/puppet/friendship.proto
/**
 * @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
 */
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck

var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() {
  if (this) { return this; }
  if (typeof window !== 'undefined') { return window; }
  if (typeof global !== 'undefined') { return global; }
  if (typeof self !== 'undefined') { return self; }
  return Function('return this')();
}.call(null));

var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js');
goog.object.extend(proto, google_protobuf_wrappers_pb);
var wechaty_puppet_referrer_pb = require('../../wechaty/puppet/referrer_pb.js');
goog.object.extend(proto, wechaty_puppet_referrer_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, ""),
    payloadStringValueDeprecated: (f = msg.getPayloadStringValueDeprecated()) && google_protobuf_wrappers_pb.StringValue.toObject(includeInstance, f),
    payload: jspb.Message.getFieldWithDefault(msg, 3, "")
  };

  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.setPayloadStringValueDeprecated(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      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.getPayloadStringValueDeprecated();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter
    );
  }
  f = message.getPayload();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
};


/**
 * 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_string_value_deprecated = 2;
 * @return {?proto.google.protobuf.StringValue}
 */
proto.wechaty.puppet.FriendshipPayloadRequest.prototype.getPayloadStringValueDeprecated = 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.setPayloadStringValueDeprecated = 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.clearPayloadStringValueDeprecated = function() {
  return this.setPayloadStringValueDeprecated(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.wechaty.puppet.FriendshipPayloadRequest.prototype.hasPayloadStringValueDeprecated = function() {
  return jspb.Message.getField(this, 2) != null;
};


/**
 * optional string payload = 3;
 * @return {string}
 */
proto.wechaty.puppet.FriendshipPayloadRequest.prototype.getPayload = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.wechaty.puppet.FriendshipPayloadRequest} returns this
 */
proto.wechaty.puppet.FriendshipPayloadRequest.prototype.setPayload = function(value) {
  return jspb.Message.setProto3StringField(this, 3, 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.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 = {
    contactIdStringValueDeprecated: (f = msg.getContactIdStringValueDeprecated()) && google_protobuf_wrappers_pb.StringValue.toObject(includeInstance, f),
    contactId: 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.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.setContactIdStringValueDeprecated(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      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.getContactIdStringValueDeprecated();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter
    );
  }
  f = message.getContactId();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
};


/**
 * optional google.protobuf.StringValue contact_id_string_value_deprecated = 1;
 * @return {?proto.google.protobuf.StringValue}
 */
proto.wechaty.puppet.FriendshipSearchPhoneResponse.prototype.getContactIdStringValueDeprecated = 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.setContactIdStringValueDeprecated = 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.clearContactIdStringValueDeprecated = function() {
  return this.setContactIdStringValueDeprecated(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.wechaty.puppet.FriendshipSearchPhoneResponse.prototype.hasContactIdStringValueDeprecated = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional string contact_id = 2;
 * @return {string}
 */
proto.wechaty.puppet.FriendshipSearchPhoneResponse.prototype.getContactId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.wechaty.puppet.FriendshipSearchPhoneResponse} returns this
 */
proto.wechaty.puppet.FriendshipSearchPhoneResponse.prototype.setContactId = 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.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 = {
    contactIdStringValueDeprecated: (f = msg.getContactIdStringValueDeprecated()) && google_protobuf_wrappers_pb.StringValue.toObject(includeInstance, f),
    contactId: 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.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.setContactIdStringValueDeprecated(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      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.getContactIdStringValueDeprecated();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter
    );
  }
  f = message.getContactId();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
};


/**
 * optional google.protobuf.StringValue contact_id_string_value_deprecated = 1;
 * @return {?proto.google.protobuf.StringValue}
 */
proto.wechaty.puppet.FriendshipSearchWeixinResponse.prototype.getContactIdStringValueDeprecated = 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.setContactIdStringValueDeprecated = 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.clearContactIdStringValueDeprecated = function() {
  return this.setContactIdStringValueDeprecated(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.wechaty.puppet.FriendshipSearchWeixinResponse.prototype.hasContactIdStringValueDeprecated = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional string contact_id = 2;
 * @return {string}
 */
proto.wechaty.puppet.FriendshipSearchWeixinResponse.prototype.getContactId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.wechaty.puppet.FriendshipSearchWeixinResponse} returns this
 */
proto.wechaty.puppet.FriendshipSearchWeixinResponse.prototype.setContactId = 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.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, ""),
    sourceRoomIdStringValueDeprecated: (f = msg.getSourceRoomIdStringValueDeprecated()) && google_protobuf_wrappers_pb.StringValue.toObject(includeInstance, f),
    sourceContactIdStringValueDeprecated: (f = msg.getSourceContactIdStringValueDeprecated()) && google_protobuf_wrappers_pb.StringValue.toObject(includeInstance, f),
    referrer: (f = msg.getReferrer()) && wechaty_puppet_referrer_pb.Referrer.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.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;
    case 3:
      var value = new google_protobuf_wrappers_pb.StringValue;
      reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader);
      msg.setSourceRoomIdStringValueDeprecated(value);
      break;
    case 4:
      var value = new google_protobuf_wrappers_pb.StringValue;
      reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader);
      msg.setSourceContactIdStringValueDeprecated(value);
      break;
    case 5:
      var value = new wechaty_puppet_referrer_pb.Referrer;
      reader.readMessage(value,wechaty_puppet_referrer_pb.Referrer.deserializeBinaryFromReader);
      msg.setReferrer(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
    );
  }
  f = message.getSourceRoomIdStringValueDeprecated();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter
    );
  }
  f = message.getSourceContactIdStringValueDeprecated();
  if (f != null) {
    writer.writeMessage(
      4,
      f,
      google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter
    );
  }
  f = message.getReferrer();
  if (f != null) {
    writer.writeMessage(
      5,
      f,
      wechaty_puppet_referrer_pb.Referrer.serializeBinaryToWriter
    );
  }
};


/**
 * 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);
};


/**
 * optional google.protobuf.StringValue source_room_id_string_value_deprecated = 3;
 * @return {?proto.google.protobuf.StringValue}
 */
proto.wechaty.puppet.FriendshipAddRequest.prototype.getSourceRoomIdStringValueDeprecated = function() {
  return /** @type{?proto.google.protobuf.StringValue} */ (
    jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.StringValue, 3));
};


/**
 * @param {?proto.google.protobuf.StringValue|undefined} value
 * @return {!proto.wechaty.puppet.FriendshipAddRequest} returns this
*/
proto.wechaty.puppet.FriendshipAddRequest.prototype.setSourceRoomIdStringValueDeprecated = function(value) {
  return jspb.Message.setWrapperField(this, 3, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.wechaty.puppet.FriendshipAddRequest} returns this
 */
proto.wechaty.puppet.FriendshipAddRequest.prototype.clearSourceRoomIdStringValueDeprecated = function() {
  return this.setSourceRoomIdStringValueDeprecated(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.wechaty.puppet.FriendshipAddRequest.prototype.hasSourceRoomIdStringValueDeprecated = function() {
  return jspb.Message.getField(this, 3) != null;
};


/**
 * optional google.protobuf.StringValue source_contact_id_string_value_deprecated = 4;
 * @return {?proto.google.protobuf.StringValue}
 */
proto.wechaty.puppet.FriendshipAddRequest.prototype.getSourceContactIdStringValueDeprecated = function() {
  return /** @type{?proto.google.protobuf.StringValue} */ (
    jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.StringValue, 4));
};


/**
 * @param {?proto.google.protobuf.StringValue|undefined} value
 * @return {!proto.wechaty.puppet.FriendshipAddRequest} returns this
*/
proto.wechaty.puppet.FriendshipAddRequest.prototype.setSourceContactIdStringValueDeprecated = function(value) {
  return jspb.Message.setWrapperField(this, 4, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.wechaty.puppet.FriendshipAddRequest} returns this
 */
proto.wechaty.puppet.FriendshipAddRequest.prototype.clearSourceContactIdStringValueDeprecated = function() {
  return this.setSourceContactIdStringValueDeprecated(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.wechaty.puppet.FriendshipAddRequest.prototype.hasSourceContactIdStringValueDeprecated = function() {
  return jspb.Message.getField(this, 4) != null;
};


/**
 * optional Referrer referrer = 5;
 * @return {?proto.wechaty.puppet.Referrer}
 */
proto.wechaty.puppet.FriendshipAddRequest.prototype.getReferrer = function() {
  return /** @type{?proto.wechaty.puppet.Referrer} */ (
    jspb.Message.getWrapperField(this, wechaty_puppet_referrer_pb.Referrer, 5));
};


/**
 * @param {?proto.wechaty.puppet.Referrer|undefined} value
 * @return {!proto.wechaty.puppet.FriendshipAddRequest} returns this
*/
proto.wechaty.puppet.FriendshipAddRequest.prototype.setReferrer = function(value) {
  return jspb.Message.setWrapperField(this, 5, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.wechaty.puppet.FriendshipAddRequest} returns this
 */
proto.wechaty.puppet.FriendshipAddRequest.prototype.clearReferrer = function() {
  return this.setReferrer(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.wechaty.puppet.FriendshipAddRequest.prototype.hasReferrer = function() {
  return jspb.Message.getField(this, 5) != 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.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).
 * @return {!Uint8Array}
 */
proto.wechaty.puppet.FriendshipAddResponse.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.wechaty.puppet.FriendshipAddResponse.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.FriendshipAddResponse} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.wechaty.puppet.FriendshipAddResponse.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
};





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.FriendshipAcceptRequest.prototype.toObject = function(opt_includeInstance) {
  return proto.wechaty.puppet.FriendshipAcceptRequest.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.FriendshipAcceptRequest} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.wechaty.puppet.FriendshipAcceptRequest.toObject = function(includeInstance, msg) {
  var f, obj = {
    id: 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.FriendshipAcceptRequest}
 */
proto.wechaty.puppet.FriendshipAcceptRequest.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.wechaty.puppet.FriendshipAcceptRequest;
  return proto.wechaty.puppet.FriendshipAcceptRequest.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.wechaty.puppet.FriendshipAcceptRequest} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.wechaty.puppet.FriendshipAcceptRequest}
 */
proto.wechaty.puppet.FriendshipAcceptRequest.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;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.wechaty.puppet.FriendshipAcceptRequest.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.wechaty.puppet.FriendshipAcceptRequest.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.FriendshipAcceptRequest} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.wechaty.puppet.FriendshipAcceptRequest.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getId();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
};


/**
 * optional string id = 1;
 * @return {string}
 */
proto.wechaty.puppet.FriendshipAcceptRequest.prototype.getId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.wechaty.puppet.FriendshipAcceptRequest} returns this
 */
proto.wechaty.puppet.FriendshipAcceptRequest.prototype.setId = 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.FriendshipAcceptResponse.prototype.toObject = function(opt_includeInstance) {
  return proto.wechaty.puppet.FriendshipAcceptResponse.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.FriendshipAcceptResponse} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.wechaty.puppet.FriendshipAcceptResponse.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.FriendshipAcceptResponse}
 */
proto.wechaty.puppet.FriendshipAcceptResponse.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.wechaty.puppet.FriendshipAcceptResponse;
  return proto.wechaty.puppet.FriendshipAcceptResponse.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.wechaty.puppet.FriendshipAcceptResponse} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.wechaty.puppet.FriendshipAcceptResponse}
 */
proto.wechaty.puppet.FriendshipAcceptResponse.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).
 * @return {!Uint8Array}
 */
proto.wechaty.puppet.FriendshipAcceptResponse.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.wechaty.puppet.FriendshipAcceptResponse.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.FriendshipAcceptResponse} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.wechaty.puppet.FriendshipAcceptResponse.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
};


/**
 * @enum {number}
 */
proto.wechaty.puppet.FriendshipType = {
  FRIENDSHIP_TYPE_UNSPECIFIED: 0,
  FRIENDSHIP_TYPE_CONFIRM: 1,
  FRIENDSHIP_TYPE_RECEIVE: 2,
  FRIENDSHIP_TYPE_VERIFY: 3
};

/**
 * @enum {number}
 */
proto.wechaty.puppet.FriendshipSceneType = {
  FRIENDSHIP_SCENE_TYPE_UNSPECIFIED: 0,
  FRIENDSHIP_SCENE_TYPE_QQ: 1,
  FRIENDSHIP_SCENE_TYPE_EMAIL: 2,
  FRIENDSHIP_SCENE_TYPE_WEIXIN: 3,
  FRIENDSHIP_SCENE_TYPE_QQTBD: 12,
  FRIENDSHIP_SCENE_TYPE_ROOM: 14,
  FRIENDSHIP_SCENE_TYPE_PHONE: 15,
  FRIENDSHIP_SCENE_TYPE_CARD: 17,
  FRIENDSHIP_SCENE_TYPE_LOCATION: 18,
  FRIENDSHIP_SCENE_TYPE_BOTTLE: 25,
  FRIENDSHIP_SCENE_TYPE_SHAKING: 29,
  FRIENDSHIP_SCENE_TYPE_QRCODE: 30
};

goog.object.extend(exports, proto.wechaty.puppet);